polotno-node 2.11.0 → 2.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index-DVNrzy9Q.js +303 -0
- package/dist/index.html +1 -1
- package/package.json +7 -7
- package/dist/assets/index-4xh-0axv.js +0 -303
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function t(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(a){if(a.ep)return;a.ep=!0;const l=t(a);fetch(a.href,l)}})();var ic=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ad(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xl(e){if(e.__esModule)return e;var i=e.default;if(typeof i=="function"){var t=function n(){return this instanceof n?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};t.prototype=i.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),t}var S0={exports:{}},Nt={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var em;function b_(){if(em)return Nt;em=1;var e=Symbol.for("react.element"),i=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),k=Symbol.iterator;function O(z){return z===null||typeof z!="object"?null:(z=k&&z[k]||z["@@iterator"],typeof z=="function"?z:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,g={};function p(z,H,K){this.props=z,this.context=H,this.refs=g,this.updater=K||v}p.prototype.isReactComponent={},p.prototype.setState=function(z,H){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,H,"setState")},p.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function P(){}P.prototype=p.prototype;function d(z,H,K){this.props=z,this.context=H,this.refs=g,this.updater=K||v}var m=d.prototype=new P;m.constructor=d,x(m,p.prototype),m.isPureReactComponent=!0;var y=Array.isArray,w=Object.prototype.hasOwnProperty,L={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function D(z,H,K){var ee,V={},Z=null,Y=null;if(H!=null)for(ee in H.ref!==void 0&&(Y=H.ref),H.key!==void 0&&(Z=""+H.key),H)w.call(H,ee)&&!R.hasOwnProperty(ee)&&(V[ee]=H[ee]);var ne=arguments.length-2;if(ne===1)V.children=K;else if(1<ne){for(var re=Array(ne),ie=0;ie<ne;ie++)re[ie]=arguments[ie+2];V.children=re}if(z&&z.defaultProps)for(ee in ne=z.defaultProps,ne)V[ee]===void 0&&(V[ee]=ne[ee]);return{$$typeof:e,type:z,key:Z,ref:Y,props:V,_owner:L.current}}function E(z,H){return{$$typeof:e,type:z.type,key:H,ref:z.ref,props:z.props,_owner:z._owner}}function S(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function A(z){var H={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(K){return H[K]})}var M=/\/+/g;function T(z,H){return typeof z=="object"&&z!==null&&z.key!=null?A(""+z.key):H.toString(36)}function B(z,H,K,ee,V){var Z=typeof z;(Z==="undefined"||Z==="boolean")&&(z=null);var Y=!1;if(z===null)Y=!0;else switch(Z){case"string":case"number":Y=!0;break;case"object":switch(z.$$typeof){case e:case i:Y=!0}}if(Y)return Y=z,V=V(Y),z=ee===""?"."+T(Y,0):ee,y(V)?(K="",z!=null&&(K=z.replace(M,"$&/")+"/"),B(V,H,K,"",function(ie){return ie})):V!=null&&(S(V)&&(V=E(V,K+(!V.key||Y&&Y.key===V.key?"":(""+V.key).replace(M,"$&/")+"/")+z)),H.push(V)),1;if(Y=0,ee=ee===""?".":ee+":",y(z))for(var ne=0;ne<z.length;ne++){Z=z[ne];var re=ee+T(Z,ne);Y+=B(Z,H,K,re,V)}else if(re=O(z),typeof re=="function")for(z=re.call(z),ne=0;!(Z=z.next()).done;)Z=Z.value,re=ee+T(Z,ne++),Y+=B(Z,H,K,re,V);else if(Z==="object")throw H=String(z),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return Y}function U(z,H,K){if(z==null)return z;var ee=[],V=0;return B(z,ee,"","",function(Z){return H.call(K,Z,V++)}),ee}function Q(z){if(z._status===-1){var H=z._result;H=H(),H.then(function(K){(z._status===0||z._status===-1)&&(z._status=1,z._result=K)},function(K){(z._status===0||z._status===-1)&&(z._status=2,z._result=K)}),z._status===-1&&(z._status=0,z._result=H)}if(z._status===1)return z._result.default;throw z._result}var X={current:null},$={transition:null},j={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:$,ReactCurrentOwner:L};function I(){throw Error("act(...) is not supported in production builds of React.")}return Nt.Children={map:U,forEach:function(z,H,K){U(z,function(){H.apply(this,arguments)},K)},count:function(z){var H=0;return U(z,function(){H++}),H},toArray:function(z){return U(z,function(H){return H})||[]},only:function(z){if(!S(z))throw Error("React.Children.only expected to receive a single React element child.");return z}},Nt.Component=p,Nt.Fragment=t,Nt.Profiler=a,Nt.PureComponent=d,Nt.StrictMode=n,Nt.Suspense=h,Nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,Nt.act=I,Nt.cloneElement=function(z,H,K){if(z==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ee=x({},z.props),V=z.key,Z=z.ref,Y=z._owner;if(H!=null){if(H.ref!==void 0&&(Z=H.ref,Y=L.current),H.key!==void 0&&(V=""+H.key),z.type&&z.type.defaultProps)var ne=z.type.defaultProps;for(re in H)w.call(H,re)&&!R.hasOwnProperty(re)&&(ee[re]=H[re]===void 0&&ne!==void 0?ne[re]:H[re])}var re=arguments.length-2;if(re===1)ee.children=K;else if(1<re){ne=Array(re);for(var ie=0;ie<re;ie++)ne[ie]=arguments[ie+2];ee.children=ne}return{$$typeof:e,type:z.type,key:V,ref:Z,props:ee,_owner:Y}},Nt.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},z.Provider={$$typeof:l,_context:z},z.Consumer=z},Nt.createElement=D,Nt.createFactory=function(z){var H=D.bind(null,z);return H.type=z,H},Nt.createRef=function(){return{current:null}},Nt.forwardRef=function(z){return{$$typeof:c,render:z}},Nt.isValidElement=S,Nt.lazy=function(z){return{$$typeof:_,_payload:{_status:-1,_result:z},_init:Q}},Nt.memo=function(z,H){return{$$typeof:b,type:z,compare:H===void 0?null:H}},Nt.startTransition=function(z){var H=$.transition;$.transition={};try{z()}finally{$.transition=H}},Nt.unstable_act=I,Nt.useCallback=function(z,H){return X.current.useCallback(z,H)},Nt.useContext=function(z){return X.current.useContext(z)},Nt.useDebugValue=function(){},Nt.useDeferredValue=function(z){return X.current.useDeferredValue(z)},Nt.useEffect=function(z,H){return X.current.useEffect(z,H)},Nt.useId=function(){return X.current.useId()},Nt.useImperativeHandle=function(z,H,K){return X.current.useImperativeHandle(z,H,K)},Nt.useInsertionEffect=function(z,H){return X.current.useInsertionEffect(z,H)},Nt.useLayoutEffect=function(z,H){return X.current.useLayoutEffect(z,H)},Nt.useMemo=function(z,H){return X.current.useMemo(z,H)},Nt.useReducer=function(z,H,K){return X.current.useReducer(z,H,K)},Nt.useRef=function(z){return X.current.useRef(z)},Nt.useState=function(z){return X.current.useState(z)},Nt.useSyncExternalStore=function(z,H,K){return X.current.useSyncExternalStore(z,H,K)},Nt.useTransition=function(){return X.current.useTransition()},Nt.version="18.3.1",Nt}var tm;function Tn(){return tm||(tm=1,S0.exports=b_()),S0.exports}var On=Tn();const jt=Ad(On);var $h={},E0={exports:{}},pi={},O0={exports:{}},x0={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* scheduler.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var nm;function __(){return nm||(nm=1,function(e){function i($,j){var I=$.length;$.push(j);e:for(;0<I;){var z=I-1>>>1,H=$[z];if(0<a(H,j))$[z]=j,$[I]=H,I=z;else break e}}function t($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var j=$[0],I=$.pop();if(I!==j){$[0]=I;e:for(var z=0,H=$.length,K=H>>>1;z<K;){var ee=2*(z+1)-1,V=$[ee],Z=ee+1,Y=$[Z];if(0>a(V,I))Z<H&&0>a(Y,V)?($[z]=Y,$[Z]=I,z=Z):($[z]=V,$[ee]=I,z=ee);else if(Z<H&&0>a(Y,I))$[z]=Y,$[Z]=I,z=Z;else break e}}return j}function a($,j){var I=$.sortIndex-j.sortIndex;return I!==0?I:$.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var h=[],b=[],_=1,k=null,O=3,v=!1,x=!1,g=!1,p=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m($){for(var j=t(b);j!==null;){if(j.callback===null)n(b);else if(j.startTime<=$)n(b),j.sortIndex=j.expirationTime,i(h,j);else break;j=t(b)}}function y($){if(g=!1,m($),!x)if(t(h)!==null)x=!0,Q(w);else{var j=t(b);j!==null&&X(y,j.startTime-$)}}function w($,j){x=!1,g&&(g=!1,P(D),D=-1),v=!0;var I=O;try{for(m(j),k=t(h);k!==null&&(!(k.expirationTime>j)||$&&!A());){var z=k.callback;if(typeof z=="function"){k.callback=null,O=k.priorityLevel;var H=z(k.expirationTime<=j);j=e.unstable_now(),typeof H=="function"?k.callback=H:k===t(h)&&n(h),m(j)}else n(h);k=t(h)}if(k!==null)var K=!0;else{var ee=t(b);ee!==null&&X(y,ee.startTime-j),K=!1}return K}finally{k=null,O=I,v=!1}}var L=!1,R=null,D=-1,E=5,S=-1;function A(){return!(e.unstable_now()-S<E)}function M(){if(R!==null){var $=e.unstable_now();S=$;var j=!0;try{j=R(!0,$)}finally{j?T():(L=!1,R=null)}}else L=!1}var T;if(typeof d=="function")T=function(){d(M)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,U=B.port2;B.port1.onmessage=M,T=function(){U.postMessage(null)}}else T=function(){p(M,0)};function Q($){R=$,L||(L=!0,T())}function X($,j){D=p(function(){$(e.unstable_now())},j)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_continueExecution=function(){x||v||(x=!0,Q(w))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return O},e.unstable_getFirstCallbackNode=function(){return t(h)},e.unstable_next=function($){switch(O){case 1:case 2:case 3:var j=3;break;default:j=O}var I=O;O=j;try{return $()}finally{O=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,j){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var I=O;O=$;try{return j()}finally{O=I}},e.unstable_scheduleCallback=function($,j,I){var z=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?z+I:z):I=z,$){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=I+H,$={id:_++,callback:j,priorityLevel:$,startTime:I,expirationTime:H,sortIndex:-1},I>z?($.sortIndex=I,i(b,$),t(h)===null&&$===t(b)&&(g?(P(D),D=-1):g=!0,X(y,I-z))):($.sortIndex=H,i(h,$),x||v||(x=!0,Q(w))),$},e.unstable_shouldYield=A,e.unstable_wrapCallback=function($){var j=O;return function(){var I=O;O=j;try{return $.apply(this,arguments)}finally{O=I}}}}(x0)),x0}var rm;function Mg(){return rm||(rm=1,O0.exports=__()),O0.exports}/**
|
|
18
|
-
* @license React
|
|
19
|
-
* react-dom.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var im;function w_(){if(im)return pi;im=1;var e=Tn(),i=Mg();function t(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,C=1;C<arguments.length;C++)o+="&args[]="+encodeURIComponent(arguments[C]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,a={};function l(r,o){u(r,o),u(r+"Capture",o)}function u(r,o){for(a[r]=o,r=0;r<o.length;r++)n.add(o[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,b=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,_={},k={};function O(r){return h.call(k,r)?!0:h.call(_,r)?!1:b.test(r)?k[r]=!0:(_[r]=!0,!1)}function v(r,o,C,F){if(C!==null&&C.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return F?!1:C!==null?!C.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function x(r,o,C,F){if(o===null||typeof o>"u"||v(r,o,C,F))return!0;if(F)return!1;if(C!==null)switch(C.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function g(r,o,C,F,G,J,oe){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=F,this.attributeNamespace=G,this.mustUseProperty=C,this.propertyName=r,this.type=o,this.sanitizeURL=J,this.removeEmptyString=oe}var p={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){p[r]=new g(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];p[o]=new g(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){p[r]=new g(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){p[r]=new g(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){p[r]=new g(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){p[r]=new g(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){p[r]=new g(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){p[r]=new g(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){p[r]=new g(r,5,!1,r.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function d(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var o=r.replace(P,d);p[o]=new g(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(P,d);p[o]=new g(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(P,d);p[o]=new g(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){p[r]=new g(r,1,!1,r.toLowerCase(),null,!1,!1)}),p.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){p[r]=new g(r,1,!1,r.toLowerCase(),null,!0,!0)});function m(r,o,C,F){var G=p.hasOwnProperty(o)?p[o]:null;(G!==null?G.type!==0:F||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(x(o,C,G,F)&&(C=null),F||G===null?O(o)&&(C===null?r.removeAttribute(o):r.setAttribute(o,""+C)):G.mustUseProperty?r[G.propertyName]=C===null?G.type===3?!1:"":C:(o=G.attributeName,F=G.attributeNamespace,C===null?r.removeAttribute(o):(G=G.type,C=G===3||G===4&&C===!0?"":""+C,F?r.setAttributeNS(F,o,C):r.setAttribute(o,C))))}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),L=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),A=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),$=Symbol.iterator;function j(r){return r===null||typeof r!="object"?null:(r=$&&r[$]||r["@@iterator"],typeof r=="function"?r:null)}var I=Object.assign,z;function H(r){if(z===void 0)try{throw Error()}catch(C){var o=C.stack.trim().match(/\n( *(at )?)/);z=o&&o[1]||""}return`
|
|
26
|
-
`+z+r}var K=!1;function ee(r,o){if(!r||K)return"";K=!0;var C=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Ae){var F=Ae}Reflect.construct(r,[],o)}else{try{o.call()}catch(Ae){F=Ae}r.call(o.prototype)}else{try{throw Error()}catch(Ae){F=Ae}r()}}catch(Ae){if(Ae&&F&&typeof Ae.stack=="string"){for(var G=Ae.stack.split(`
|
|
27
|
-
`),J=F.stack.split(`
|
|
28
|
-
`),oe=G.length-1,ce=J.length-1;1<=oe&&0<=ce&&G[oe]!==J[ce];)ce--;for(;1<=oe&&0<=ce;oe--,ce--)if(G[oe]!==J[ce]){if(oe!==1||ce!==1)do if(oe--,ce--,0>ce||G[oe]!==J[ce]){var pe=`
|
|
29
|
-
`+G[oe].replace(" at new "," at ");return r.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",r.displayName)),pe}while(1<=oe&&0<=ce);break}}}finally{K=!1,Error.prepareStackTrace=C}return(r=r?r.displayName||r.name:"")?H(r):""}function V(r){switch(r.tag){case 5:return H(r.type);case 16:return H("Lazy");case 13:return H("Suspense");case 19:return H("SuspenseList");case 0:case 2:case 15:return r=ee(r.type,!1),r;case 11:return r=ee(r.type.render,!1),r;case 1:return r=ee(r.type,!0),r;default:return""}}function Z(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case R:return"Fragment";case L:return"Portal";case E:return"Profiler";case D:return"StrictMode";case T:return"Suspense";case B:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case A:return(r.displayName||"Context")+".Consumer";case S:return(r._context.displayName||"Context")+".Provider";case M:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case U:return o=r.displayName||null,o!==null?o:Z(r.type)||"Memo";case Q:o=r._payload,r=r._init;try{return Z(r(o))}catch{}}return null}function Y(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Z(o);case 8:return o===D?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function ne(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function re(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ie(r){var o=re(r)?"checked":"value",C=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),F=""+r[o];if(!r.hasOwnProperty(o)&&typeof C<"u"&&typeof C.get=="function"&&typeof C.set=="function"){var G=C.get,J=C.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return G.call(this)},set:function(oe){F=""+oe,J.call(this,oe)}}),Object.defineProperty(r,o,{enumerable:C.enumerable}),{getValue:function(){return F},setValue:function(oe){F=""+oe},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function ae(r){r._valueTracker||(r._valueTracker=ie(r))}function se(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var C=o.getValue(),F="";return r&&(F=re(r)?r.checked?"true":"false":r.value),r=F,r!==C?(o.setValue(r),!0):!1}function de(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function he(r,o){var C=o.checked;return I({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:C??r._wrapperState.initialChecked})}function Se(r,o){var C=o.defaultValue==null?"":o.defaultValue,F=o.checked!=null?o.checked:o.defaultChecked;C=ne(o.value!=null?o.value:C),r._wrapperState={initialChecked:F,initialValue:C,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ee(r,o){o=o.checked,o!=null&&m(r,"checked",o,!1)}function De(r,o){Ee(r,o);var C=ne(o.value),F=o.type;if(C!=null)F==="number"?(C===0&&r.value===""||r.value!=C)&&(r.value=""+C):r.value!==""+C&&(r.value=""+C);else if(F==="submit"||F==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?ge(r,o.type,C):o.hasOwnProperty("defaultValue")&&ge(r,o.type,ne(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function fe(r,o,C){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var F=o.type;if(!(F!=="submit"&&F!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,C||o===r.value||(r.value=o),r.defaultValue=o}C=r.name,C!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,C!==""&&(r.name=C)}function ge(r,o,C){(o!=="number"||de(r.ownerDocument)!==r)&&(C==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+C&&(r.defaultValue=""+C))}var Te=Array.isArray;function Re(r,o,C,F){if(r=r.options,o){o={};for(var G=0;G<C.length;G++)o["$"+C[G]]=!0;for(C=0;C<r.length;C++)G=o.hasOwnProperty("$"+r[C].value),r[C].selected!==G&&(r[C].selected=G),G&&F&&(r[C].defaultSelected=!0)}else{for(C=""+ne(C),o=null,G=0;G<r.length;G++){if(r[G].value===C){r[G].selected=!0,F&&(r[G].defaultSelected=!0);return}o!==null||r[G].disabled||(o=r[G])}o!==null&&(o.selected=!0)}}function ue(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(t(91));return I({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function me(r,o){var C=o.value;if(C==null){if(C=o.children,o=o.defaultValue,C!=null){if(o!=null)throw Error(t(92));if(Te(C)){if(1<C.length)throw Error(t(93));C=C[0]}o=C}o==null&&(o=""),C=o}r._wrapperState={initialValue:ne(C)}}function xe(r,o){var C=ne(o.value),F=ne(o.defaultValue);C!=null&&(C=""+C,C!==r.value&&(r.value=C),o.defaultValue==null&&r.defaultValue!==C&&(r.defaultValue=C)),F!=null&&(r.defaultValue=""+F)}function Ie(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function tt(r){switch(r){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 lt(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?tt(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Fe,ze=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,C,F,G){MSApp.execUnsafeLocalFunction(function(){return r(o,C,F,G)})}:r}(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(Fe=Fe||document.createElement("div"),Fe.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Fe.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function Ue(r,o){if(o){var C=r.firstChild;if(C&&C===r.lastChild&&C.nodeType===3){C.nodeValue=o;return}}r.textContent=o}var Xe={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},dt=["Webkit","ms","Moz","O"];Object.keys(Xe).forEach(function(r){dt.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),Xe[o]=Xe[r]})});function kt(r,o,C){return o==null||typeof o=="boolean"||o===""?"":C||typeof o!="number"||o===0||Xe.hasOwnProperty(r)&&Xe[r]?(""+o).trim():o+"px"}function Et(r,o){r=r.style;for(var C in o)if(o.hasOwnProperty(C)){var F=C.indexOf("--")===0,G=kt(C,o[C],F);C==="float"&&(C="cssFloat"),F?r.setProperty(C,G):r[C]=G}}var be=I({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 we(r,o){if(o){if(be[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(t(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(t(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(t(61))}if(o.style!=null&&typeof o.style!="object")throw Error(t(62))}}function Ne(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){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 Ye=null;function Ze(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var ke=null,vt=null,je=null;function ot(r){if(r=_s(r)){if(typeof ke!="function")throw Error(t(280));var o=r.stateNode;o&&(o=Yn(o),ke(r.stateNode,r.type,o))}}function dn(r){vt?je?je.push(r):je=[r]:vt=r}function Yt(){if(vt){var r=vt,o=je;if(je=vt=null,ot(r),o)for(r=0;r<o.length;r++)ot(o[r])}}function hn(r,o){return r(o)}function Ge(){}var pt=!1;function Ot(r,o,C){if(pt)return r(o,C);pt=!0;try{return hn(r,o,C)}finally{pt=!1,(vt!==null||je!==null)&&(Ge(),Yt())}}function zt(r,o){var C=r.stateNode;if(C===null)return null;var F=Yn(C);if(F===null)return null;C=F[o];e:switch(o){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)||(r=r.type,F=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!F;break e;default:r=!1}if(r)return null;if(C&&typeof C!="function")throw Error(t(231,o,typeof C));return C}var Ut=!1;if(c)try{var pn={};Object.defineProperty(pn,"passive",{get:function(){Ut=!0}}),window.addEventListener("test",pn,pn),window.removeEventListener("test",pn,pn)}catch{Ut=!1}function In(r,o,C,F,G,J,oe,ce,pe){var Ae=Array.prototype.slice.call(arguments,3);try{o.apply(C,Ae)}catch(qe){this.onError(qe)}}var wn=!1,Qn=null,ii=!1,Sr=null,Qe={onError:function(r){wn=!0,Qn=r}};function _t(r,o,C,F,G,J,oe,ce,pe){wn=!1,Qn=null,In.apply(Qe,arguments)}function At(r,o,C,F,G,J,oe,ce,pe){if(_t.apply(this,arguments),wn){if(wn){var Ae=Qn;wn=!1,Qn=null}else throw Error(t(198));ii||(ii=!0,Sr=Ae)}}function Ht(r){var o=r,C=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,o.flags&4098&&(C=o.return),r=o.return;while(r)}return o.tag===3?C:null}function Gt(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function Jn(r){if(Ht(r)!==r)throw Error(t(188))}function Gn(r){var o=r.alternate;if(!o){if(o=Ht(r),o===null)throw Error(t(188));return o!==r?null:r}for(var C=r,F=o;;){var G=C.return;if(G===null)break;var J=G.alternate;if(J===null){if(F=G.return,F!==null){C=F;continue}break}if(G.child===J.child){for(J=G.child;J;){if(J===C)return Jn(G),r;if(J===F)return Jn(G),o;J=J.sibling}throw Error(t(188))}if(C.return!==F.return)C=G,F=J;else{for(var oe=!1,ce=G.child;ce;){if(ce===C){oe=!0,C=G,F=J;break}if(ce===F){oe=!0,F=G,C=J;break}ce=ce.sibling}if(!oe){for(ce=J.child;ce;){if(ce===C){oe=!0,C=J,F=G;break}if(ce===F){oe=!0,F=J,C=G;break}ce=ce.sibling}if(!oe)throw Error(t(189))}}if(C.alternate!==F)throw Error(t(190))}if(C.tag!==3)throw Error(t(188));return C.stateNode.current===C?r:o}function Sn(r){return r=Gn(r),r!==null?oi(r):null}function oi(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=oi(r);if(o!==null)return o;r=r.sibling}return null}var Ir=i.unstable_scheduleCallback,Ii=i.unstable_cancelCallback,No=i.unstable_shouldYield,rs=i.unstable_requestPaint,Qt=i.unstable_now,to=i.unstable_getCurrentPriorityLevel,Dr=i.unstable_ImmediatePriority,ha=i.unstable_UserBlockingPriority,no=i.unstable_NormalPriority,Gp=i.unstable_LowPriority,Qs=i.unstable_IdlePriority,ro=null,er=null;function sn(r){if(er&&typeof er.onCommitFiberRoot=="function")try{er.onCommitFiberRoot(ro,r,void 0,(r.current.flags&128)===128)}catch{}}var Mt=Math.clz32?Math.clz32:jr,Io=Math.log,fr=Math.LN2;function jr(r){return r>>>=0,r===0?32:31-(Io(r)/fr|0)|0}var Di=64,io=4194304;function Vn(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function pa(r,o){var C=r.pendingLanes;if(C===0)return 0;var F=0,G=r.suspendedLanes,J=r.pingedLanes,oe=C&268435455;if(oe!==0){var ce=oe&~G;ce!==0?F=Vn(ce):(J&=oe,J!==0&&(F=Vn(J)))}else oe=C&~G,oe!==0?F=Vn(oe):J!==0&&(F=Vn(J));if(F===0)return 0;if(o!==0&&o!==F&&!(o&G)&&(G=F&-F,J=o&-o,G>=J||G===16&&(J&4194240)!==0))return o;if(F&4&&(F|=C&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=F;0<o;)C=31-Mt(o),G=1<<C,F|=r[C],o&=~G;return F}function Gd(r,o){switch(r){case 1:case 2:case 4:return o+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 o+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 Vd(r,o){for(var C=r.suspendedLanes,F=r.pingedLanes,G=r.expirationTimes,J=r.pendingLanes;0<J;){var oe=31-Mt(J),ce=1<<oe,pe=G[oe];pe===-1?(!(ce&C)||ce&F)&&(G[oe]=Gd(ce,o)):pe<=o&&(r.expiredLanes|=ce),J&=~ce}}function tl(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Ec(){var r=Di;return Di<<=1,!(Di&4194240)&&(Di=64),r}function Gr(r){for(var o=[],C=0;31>C;C++)o.push(r);return o}function is(r,o,C){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-Mt(o),r[o]=C}function Vp(r,o){var C=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var F=r.eventTimes;for(r=r.expirationTimes;0<C;){var G=31-Mt(C),J=1<<G;o[G]=0,F[G]=-1,r[G]=-1,C&=~J}}function Oc(r,o){var C=r.entangledLanes|=o;for(r=r.entanglements;C;){var F=31-Mt(C),G=1<<F;G&o|r[F]&o&&(r[F]|=o),C&=~G}}var qt=0;function os(r){return r&=-r,1<r?4<r?r&268435455?16:536870912:4:1}var nl,rl,$d,Wd,Js,eu=!1,il=[],ai=null,Do=null,ji=null,Lt=new Map,ol=new Map,Fi=[],Yd="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 Kd(r,o){switch(r){case"focusin":case"focusout":ai=null;break;case"dragenter":case"dragleave":Do=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":Lt.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ol.delete(o.pointerId)}}function as(r,o,C,F,G,J){return r===null||r.nativeEvent!==J?(r={blockedOn:o,domEventName:C,eventSystemFlags:F,nativeEvent:J,targetContainers:[G]},o!==null&&(o=_s(o),o!==null&&rl(o)),r):(r.eventSystemFlags|=F,o=r.targetContainers,G!==null&&o.indexOf(G)===-1&&o.push(G),r)}function $n(r,o,C,F,G){switch(o){case"focusin":return ai=as(ai,r,o,C,F,G),!0;case"dragenter":return Do=as(Do,r,o,C,F,G),!0;case"mouseover":return ji=as(ji,r,o,C,F,G),!0;case"pointerover":var J=G.pointerId;return Lt.set(J,as(Lt.get(J)||null,r,o,C,F,G)),!0;case"gotpointercapture":return J=G.pointerId,ol.set(J,as(ol.get(J)||null,r,o,C,F,G)),!0}return!1}function tu(r){var o=$o(r.target);if(o!==null){var C=Ht(o);if(C!==null){if(o=C.tag,o===13){if(o=Gt(C),o!==null){r.blockedOn=o,Js(r.priority,function(){$d(C)});return}}else if(o===3&&C.stateNode.current.memoizedState.isDehydrated){r.blockedOn=C.tag===3?C.stateNode.containerInfo:null;return}}}r.blockedOn=null}function nu(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var C=ou(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(C===null){C=r.nativeEvent;var F=new C.constructor(C.type,C);Ye=F,C.target.dispatchEvent(F),Ye=null}else return o=_s(C),o!==null&&rl(o),r.blockedOn=C,!1;o.shift()}return!0}function ru(r,o,C){nu(r)&&C.delete(o)}function $p(){eu=!1,ai!==null&&nu(ai)&&(ai=null),Do!==null&&nu(Do)&&(Do=null),ji!==null&&nu(ji)&&(ji=null),Lt.forEach(ru),ol.forEach(ru)}function jo(r,o){r.blockedOn===o&&(r.blockedOn=null,eu||(eu=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,$p)))}function Fr(r){function o(G){return jo(G,r)}if(0<il.length){jo(il[0],r);for(var C=1;C<il.length;C++){var F=il[C];F.blockedOn===r&&(F.blockedOn=null)}}for(ai!==null&&jo(ai,r),Do!==null&&jo(Do,r),ji!==null&&jo(ji,r),Lt.forEach(o),ol.forEach(o),C=0;C<Fi.length;C++)F=Fi[C],F.blockedOn===r&&(F.blockedOn=null);for(;0<Fi.length&&(C=Fi[0],C.blockedOn===null);)tu(C),C.blockedOn===null&&Fi.shift()}var al=y.ReactCurrentBatchConfig,iu=!0;function wi(r,o,C,F){var G=qt,J=al.transition;al.transition=null;try{qt=1,ll(r,o,C,F)}finally{qt=G,al.transition=J}}function oo(r,o,C,F){var G=qt,J=al.transition;al.transition=null;try{qt=4,ll(r,o,C,F)}finally{qt=G,al.transition=J}}function ll(r,o,C,F){if(iu){var G=ou(r,o,C,F);if(G===null)wu(r,o,F,sl,C),Kd(r,F);else if($n(G,r,o,C,F))F.stopPropagation();else if(Kd(r,F),o&4&&-1<Yd.indexOf(r)){for(;G!==null;){var J=_s(G);if(J!==null&&nl(J),J=ou(r,o,C,F),J===null&&wu(r,o,F,sl,C),J===G)break;G=J}G!==null&&F.stopPropagation()}else wu(r,o,F,null,C)}}var sl=null;function ou(r,o,C,F){if(sl=null,r=Ze(F),r=$o(r),r!==null)if(o=Ht(r),o===null)r=null;else if(C=o.tag,C===13){if(r=Gt(o),r!==null)return r;r=null}else if(C===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return sl=r,null}function Xd(r){switch(r){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(to()){case Dr:return 1;case ha:return 4;case no:case Gp:return 16;case Qs:return 536870912;default:return 16}default:return 16}}var tr=null,Fo=null,ao=null;function ls(){if(ao)return ao;var r,o=Fo,C=o.length,F,G="value"in tr?tr.value:tr.textContent,J=G.length;for(r=0;r<C&&o[r]===G[r];r++);var oe=C-r;for(F=1;F<=oe&&o[C-F]===G[J-F];F++);return ao=G.slice(r,1<F?1-F:void 0)}function ga(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Er(){return!0}function Vr(){return!1}function Dn(r){function o(C,F,G,J,oe){this._reactName=C,this._targetInst=G,this.type=F,this.nativeEvent=J,this.target=oe,this.currentTarget=null;for(var ce in r)r.hasOwnProperty(ce)&&(C=r[ce],this[ce]=C?C(J):J[ce]);return this.isDefaultPrevented=(J.defaultPrevented!=null?J.defaultPrevented:J.returnValue===!1)?Er:Vr,this.isPropagationStopped=Vr,this}return I(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var C=this.nativeEvent;C&&(C.preventDefault?C.preventDefault():typeof C.returnValue!="unknown"&&(C.returnValue=!1),this.isDefaultPrevented=Er)},stopPropagation:function(){var C=this.nativeEvent;C&&(C.stopPropagation?C.stopPropagation():typeof C.cancelBubble!="unknown"&&(C.cancelBubble=!0),this.isPropagationStopped=Er)},persist:function(){},isPersistent:Er}),o}var zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Si=Dn(zr),Ei=I({},zr,{view:0,detail:0}),Zd=Dn(Ei),ss,us,nr,Or=I({},Ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ma,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==nr&&(nr&&r.type==="mousemove"?(ss=r.screenX-nr.screenX,us=r.screenY-nr.screenY):us=ss=0,nr=r),ss)},movementY:function(r){return"movementY"in r?r.movementY:us}}),un=Dn(Or),cs=I({},Or,{dataTransfer:0}),Oi=Dn(cs),Qd=I({},Ei,{relatedTarget:0}),au=Dn(Qd),xc=I({},zr,{animationName:0,elapsedTime:0,pseudoElement:0}),Pc=Dn(xc),Jd=I({},zr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),lu=Dn(Jd),eh=I({},zr,{data:0}),va=Dn(eh),Cc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wp={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"},su={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yp(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=su[r])?!!o[r]:!1}function ma(){return Yp}var uu=I({},Ei,{key:function(r){if(r.key){var o=Cc[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=ga(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Wp[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ma,charCode:function(r){return r.type==="keypress"?ga(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ga(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),th=Dn(uu),nh=I({},Or,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ya=Dn(nh),rh=I({},Ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ma}),cu=Dn(rh),fu=I({},zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ul=Dn(fu),kc=I({},Or,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Tc=Dn(kc),ih=[9,13,27,32],fs=c&&"CompositionEvent"in window,ba=null;c&&"documentMode"in document&&(ba=document.documentMode);var cl=c&&"TextEvent"in window&&!ba,$r=c&&(!fs||ba&&8<ba&&11>=ba),zo=" ",du=!1;function Ac(r,o){switch(r){case"keyup":return ih.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xi(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Wr=!1;function Rc(r,o){switch(r){case"compositionend":return xi(o);case"keypress":return o.which!==32?null:(du=!0,zo);case"textInput":return r=o.data,r===zo&&du?null:r;default:return null}}function oh(r,o){if(Wr)return r==="compositionend"||!fs&&Ac(r,o)?(r=ls(),ao=Fo=tr=null,Wr=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return $r&&o.locale!=="ko"?null:o.data;default:return null}}var lo={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 so(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!lo[r.type]:o==="textarea"}function ds(r,o,C,F){dn(F),o=Su(o,"onChange"),0<o.length&&(C=new Si("onChange","change",null,C,F),r.push({event:C,listeners:o}))}var fl=null,Bo=null;function ah(r){qc(r,0)}function Uo(r){var o=Fn(r);if(se(o))return r}function li(r,o){if(r==="change")return o}var dl=!1;if(c){var qo;if(c){var si="oninput"in document;if(!si){var hu=document.createElement("div");hu.setAttribute("oninput","return;"),si=typeof hu.oninput=="function"}qo=si}else qo=!1;dl=qo&&(!document.documentMode||9<document.documentMode)}function _a(){fl&&(fl.detachEvent("onpropertychange",Mc),Bo=fl=null)}function Mc(r){if(r.propertyName==="value"&&Uo(Bo)){var o=[];ds(o,Bo,r,Ze(r)),Ot(ah,o)}}function Lc(r,o,C){r==="focusin"?(_a(),fl=o,Bo=C,fl.attachEvent("onpropertychange",Mc)):r==="focusout"&&_a()}function En(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Uo(Bo)}function pu(r,o){if(r==="click")return Uo(o)}function Nc(r,o){if(r==="input"||r==="change")return Uo(o)}function Ic(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var Br=typeof Object.is=="function"?Object.is:Ic;function wa(r,o){if(Br(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var C=Object.keys(r),F=Object.keys(o);if(C.length!==F.length)return!1;for(F=0;F<C.length;F++){var G=C[F];if(!h.call(o,G)||!Br(r[G],o[G]))return!1}return!0}function Ho(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function gn(r,o){var C=Ho(r);r=0;for(var F;C;){if(C.nodeType===3){if(F=r+C.textContent.length,r<=o&&F>=o)return{node:C,offset:o-r};r=F}e:{for(;C;){if(C.nextSibling){C=C.nextSibling;break e}C=C.parentNode}C=void 0}C=Ho(C)}}function An(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?An(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function jn(){for(var r=window,o=de();o instanceof r.HTMLIFrameElement;){try{var C=typeof o.contentWindow.location.href=="string"}catch{C=!1}if(C)r=o.contentWindow;else break;o=de(r.document)}return o}function hl(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function hs(r){var o=jn(),C=r.focusedElem,F=r.selectionRange;if(o!==C&&C&&C.ownerDocument&&An(C.ownerDocument.documentElement,C)){if(F!==null&&hl(C)){if(o=F.start,r=F.end,r===void 0&&(r=o),"selectionStart"in C)C.selectionStart=o,C.selectionEnd=Math.min(r,C.value.length);else if(r=(o=C.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var G=C.textContent.length,J=Math.min(F.start,G);F=F.end===void 0?J:Math.min(F.end,G),!r.extend&&J>F&&(G=F,F=J,J=G),G=gn(C,J);var oe=gn(C,F);G&&oe&&(r.rangeCount!==1||r.anchorNode!==G.node||r.anchorOffset!==G.offset||r.focusNode!==oe.node||r.focusOffset!==oe.offset)&&(o=o.createRange(),o.setStart(G.node,G.offset),r.removeAllRanges(),J>F?(r.addRange(o),r.extend(oe.node,oe.offset)):(o.setEnd(oe.node,oe.offset),r.addRange(o)))}}for(o=[],r=C;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<o.length;C++)r=o[C],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var ps=c&&"documentMode"in document&&11>=document.documentMode,pl=null,Wn=null,Sa=null,gs=!1;function gu(r,o,C){var F=C.window===C?C.document:C.nodeType===9?C:C.ownerDocument;gs||pl==null||pl!==de(F)||(F=pl,"selectionStart"in F&&hl(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}),Sa&&wa(Sa,F)||(Sa=F,F=Su(Wn,"onSelect"),0<F.length&&(o=new Si("onSelect","select",null,o,C),r.push({event:o,listeners:F}),o.target=pl)))}function Yr(r,o){var C={};return C[r.toLowerCase()]=o.toLowerCase(),C["Webkit"+r]="webkit"+o,C["Moz"+r]="moz"+o,C}var rr={animationend:Yr("Animation","AnimationEnd"),animationiteration:Yr("Animation","AnimationIteration"),animationstart:Yr("Animation","AnimationStart"),transitionend:Yr("Transition","TransitionEnd")},Ea={},vu={};c&&(vu=document.createElement("div").style,"AnimationEvent"in window||(delete rr.animationend.animation,delete rr.animationiteration.animation,delete rr.animationstart.animation),"TransitionEvent"in window||delete rr.transitionend.transition);function gl(r){if(Ea[r])return Ea[r];if(!rr[r])return r;var o=rr[r],C;for(C in o)if(o.hasOwnProperty(C)&&C in vu)return Ea[r]=o[C];return r}var Dc=gl("animationend"),jc=gl("animationiteration"),Fc=gl("animationstart"),zc=gl("transitionend"),Bc=new Map,Uc="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 uo(r,o){Bc.set(r,o),l(o,[r])}for(var mu=0;mu<Uc.length;mu++){var Oa=Uc[mu],lh=Oa.toLowerCase(),yu=Oa[0].toUpperCase()+Oa.slice(1);uo(lh,"on"+yu)}uo(Dc,"onAnimationEnd"),uo(jc,"onAnimationIteration"),uo(Fc,"onAnimationStart"),uo("dblclick","onDoubleClick"),uo("focusin","onFocus"),uo("focusout","onBlur"),uo(zc,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Go="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(" "),sh=new Set("cancel close invalid load scroll toggle".split(" ").concat(Go));function bu(r,o,C){var F=r.type||"unknown-event";r.currentTarget=C,At(F,o,void 0,r),r.currentTarget=null}function qc(r,o){o=(o&4)!==0;for(var C=0;C<r.length;C++){var F=r[C],G=F.event;F=F.listeners;e:{var J=void 0;if(o)for(var oe=F.length-1;0<=oe;oe--){var ce=F[oe],pe=ce.instance,Ae=ce.currentTarget;if(ce=ce.listener,pe!==J&&G.isPropagationStopped())break e;bu(G,ce,Ae),J=pe}else for(oe=0;oe<F.length;oe++){if(ce=F[oe],pe=ce.instance,Ae=ce.currentTarget,ce=ce.listener,pe!==J&&G.isPropagationStopped())break e;bu(G,ce,Ae),J=pe}}}if(ii)throw r=Sr,ii=!1,Sr=null,r}function nn(r,o){var C=o[Ou];C===void 0&&(C=o[Ou]=new Set);var F=r+"__bubble";C.has(F)||(Hc(o,r,2,!1),C.add(F))}function _u(r,o,C){var F=0;o&&(F|=4),Hc(C,r,F,o)}var vs="_reactListening"+Math.random().toString(36).slice(2);function xa(r){if(!r[vs]){r[vs]=!0,n.forEach(function(C){C!=="selectionchange"&&(sh.has(C)||_u(C,!1,r),_u(C,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[vs]||(o[vs]=!0,_u("selectionchange",!1,o))}}function Hc(r,o,C,F){switch(Xd(o)){case 1:var G=wi;break;case 4:G=oo;break;default:G=ll}C=G.bind(null,o,C,r),G=void 0,!Ut||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(G=!0),F?G!==void 0?r.addEventListener(o,C,{capture:!0,passive:G}):r.addEventListener(o,C,!0):G!==void 0?r.addEventListener(o,C,{passive:G}):r.addEventListener(o,C,!1)}function wu(r,o,C,F,G){var J=F;if(!(o&1)&&!(o&2)&&F!==null)e:for(;;){if(F===null)return;var oe=F.tag;if(oe===3||oe===4){var ce=F.stateNode.containerInfo;if(ce===G||ce.nodeType===8&&ce.parentNode===G)break;if(oe===4)for(oe=F.return;oe!==null;){var pe=oe.tag;if((pe===3||pe===4)&&(pe=oe.stateNode.containerInfo,pe===G||pe.nodeType===8&&pe.parentNode===G))return;oe=oe.return}for(;ce!==null;){if(oe=$o(ce),oe===null)return;if(pe=oe.tag,pe===5||pe===6){F=J=oe;continue e}ce=ce.parentNode}}F=F.return}Ot(function(){var Ae=J,qe=Ze(C),He=[];e:{var Be=Bc.get(r);if(Be!==void 0){var nt=Si,st=r;switch(r){case"keypress":if(ga(C)===0)break e;case"keydown":case"keyup":nt=th;break;case"focusin":st="focus",nt=au;break;case"focusout":st="blur",nt=au;break;case"beforeblur":case"afterblur":nt=au;break;case"click":if(C.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":nt=un;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":nt=Oi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":nt=cu;break;case Dc:case jc:case Fc:nt=Pc;break;case zc:nt=ul;break;case"scroll":nt=Zd;break;case"wheel":nt=Tc;break;case"copy":case"cut":case"paste":nt=lu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":nt=ya}var ct=(o&4)!==0,qn=!ct&&r==="scroll",Oe=ct?Be!==null?Be+"Capture":null:Be;ct=[];for(var ve=Ae,Pe;ve!==null;){Pe=ve;var $e=Pe.stateNode;if(Pe.tag===5&&$e!==null&&(Pe=$e,Oe!==null&&($e=zt(ve,Oe),$e!=null&&ct.push(vl(ve,$e,Pe)))),qn)break;ve=ve.return}0<ct.length&&(Be=new nt(Be,st,null,C,qe),He.push({event:Be,listeners:ct}))}}if(!(o&7)){e:{if(Be=r==="mouseover"||r==="pointerover",nt=r==="mouseout"||r==="pointerout",Be&&C!==Ye&&(st=C.relatedTarget||C.fromElement)&&($o(st)||st[Bi]))break e;if((nt||Be)&&(Be=qe.window===qe?qe:(Be=qe.ownerDocument)?Be.defaultView||Be.parentWindow:window,nt?(st=C.relatedTarget||C.toElement,nt=Ae,st=st?$o(st):null,st!==null&&(qn=Ht(st),st!==qn||st.tag!==5&&st.tag!==6)&&(st=null)):(nt=null,st=Ae),nt!==st)){if(ct=un,$e="onMouseLeave",Oe="onMouseEnter",ve="mouse",(r==="pointerout"||r==="pointerover")&&(ct=ya,$e="onPointerLeave",Oe="onPointerEnter",ve="pointer"),qn=nt==null?Be:Fn(nt),Pe=st==null?Be:Fn(st),Be=new ct($e,ve+"leave",nt,C,qe),Be.target=qn,Be.relatedTarget=Pe,$e=null,$o(qe)===Ae&&(ct=new ct(Oe,ve+"enter",st,C,qe),ct.target=Pe,ct.relatedTarget=qn,$e=ct),qn=$e,nt&&st)t:{for(ct=nt,Oe=st,ve=0,Pe=ct;Pe;Pe=Pa(Pe))ve++;for(Pe=0,$e=Oe;$e;$e=Pa($e))Pe++;for(;0<ve-Pe;)ct=Pa(ct),ve--;for(;0<Pe-ve;)Oe=Pa(Oe),Pe--;for(;ve--;){if(ct===Oe||Oe!==null&&ct===Oe.alternate)break t;ct=Pa(ct),Oe=Pa(Oe)}ct=null}else ct=null;nt!==null&&uh(He,Be,nt,ct,!1),st!==null&&qn!==null&&uh(He,qn,st,ct,!0)}}e:{if(Be=Ae?Fn(Ae):window,nt=Be.nodeName&&Be.nodeName.toLowerCase(),nt==="select"||nt==="input"&&Be.type==="file")var ft=li;else if(so(Be))if(dl)ft=Nc;else{ft=En;var mt=Lc}else(nt=Be.nodeName)&&nt.toLowerCase()==="input"&&(Be.type==="checkbox"||Be.type==="radio")&&(ft=pu);if(ft&&(ft=ft(r,Ae))){ds(He,ft,C,qe);break e}mt&&mt(r,Be,Ae),r==="focusout"&&(mt=Be._wrapperState)&&mt.controlled&&Be.type==="number"&&ge(Be,"number",Be.value)}switch(mt=Ae?Fn(Ae):window,r){case"focusin":(so(mt)||mt.contentEditable==="true")&&(pl=mt,Wn=Ae,Sa=null);break;case"focusout":Sa=Wn=pl=null;break;case"mousedown":gs=!0;break;case"contextmenu":case"mouseup":case"dragend":gs=!1,gu(He,C,qe);break;case"selectionchange":if(ps)break;case"keydown":case"keyup":gu(He,C,qe)}var yt;if(fs)e:{switch(r){case"compositionstart":var bt="onCompositionStart";break e;case"compositionend":bt="onCompositionEnd";break e;case"compositionupdate":bt="onCompositionUpdate";break e}bt=void 0}else Wr?Ac(r,C)&&(bt="onCompositionEnd"):r==="keydown"&&C.keyCode===229&&(bt="onCompositionStart");bt&&($r&&C.locale!=="ko"&&(Wr||bt!=="onCompositionStart"?bt==="onCompositionEnd"&&Wr&&(yt=ls()):(tr=qe,Fo="value"in tr?tr.value:tr.textContent,Wr=!0)),mt=Su(Ae,bt),0<mt.length&&(bt=new va(bt,r,null,C,qe),He.push({event:bt,listeners:mt}),yt?bt.data=yt:(yt=xi(C),yt!==null&&(bt.data=yt)))),(yt=cl?Rc(r,C):oh(r,C))&&(Ae=Su(Ae,"onBeforeInput"),0<Ae.length&&(qe=new va("onBeforeInput","beforeinput",null,C,qe),He.push({event:qe,listeners:Ae}),qe.data=yt))}qc(He,o)})}function vl(r,o,C){return{instance:r,listener:o,currentTarget:C}}function Su(r,o){for(var C=o+"Capture",F=[];r!==null;){var G=r,J=G.stateNode;G.tag===5&&J!==null&&(G=J,J=zt(r,C),J!=null&&F.unshift(vl(r,J,G)),J=zt(r,o),J!=null&&F.push(vl(r,J,G))),r=r.return}return F}function Pa(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function uh(r,o,C,F,G){for(var J=o._reactName,oe=[];C!==null&&C!==F;){var ce=C,pe=ce.alternate,Ae=ce.stateNode;if(pe!==null&&pe===F)break;ce.tag===5&&Ae!==null&&(ce=Ae,G?(pe=zt(C,J),pe!=null&&oe.unshift(vl(C,pe,ce))):G||(pe=zt(C,J),pe!=null&&oe.push(vl(C,pe,ce)))),C=C.return}oe.length!==0&&r.push({event:o,listeners:oe})}var Kp=/\r\n?/g,ch=/\u0000|\uFFFD/g;function Gc(r){return(typeof r=="string"?r:""+r).replace(Kp,`
|
|
30
|
-
`).replace(ch,"")}function ms(r,o,C){if(o=Gc(o),Gc(r)!==o&&C)throw Error(t(425))}function Ca(){}var Vc=null,$c=null;function Wc(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Kr=typeof setTimeout=="function"?setTimeout:void 0,Yc=typeof clearTimeout=="function"?clearTimeout:void 0,ys=typeof Promise=="function"?Promise:void 0,fh=typeof queueMicrotask=="function"?queueMicrotask:typeof ys<"u"?function(r){return ys.resolve(null).then(r).catch(dh)}:Kr;function dh(r){setTimeout(function(){throw r})}function Eu(r,o){var C=o,F=0;do{var G=C.nextSibling;if(r.removeChild(C),G&&G.nodeType===8)if(C=G.data,C==="/$"){if(F===0){r.removeChild(G),Fr(o);return}F--}else C!=="$"&&C!=="$?"&&C!=="$!"||F++;C=G}while(C);Fr(o)}function zi(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function ka(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var C=r.data;if(C==="$"||C==="$!"||C==="$?"){if(o===0)return r;o--}else C==="/$"&&o++}r=r.previousSibling}return null}var Vo=Math.random().toString(36).slice(2),ui="__reactFiber$"+Vo,bs="__reactProps$"+Vo,Bi="__reactContainer$"+Vo,Ou="__reactEvents$"+Vo,hh="__reactListeners$"+Vo,ph="__reactHandles$"+Vo;function $o(r){var o=r[ui];if(o)return o;for(var C=r.parentNode;C;){if(o=C[Bi]||C[ui]){if(C=o.alternate,o.child!==null||C!==null&&C.child!==null)for(r=ka(r);r!==null;){if(C=r[ui])return C;r=ka(r)}return o}r=C,C=r.parentNode}return null}function _s(r){return r=r[ui]||r[Bi],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Fn(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(t(33))}function Yn(r){return r[bs]||null}var xu=[],Ta=-1;function co(r){return{current:r}}function rn(r){0>Ta||(r.current=xu[Ta],xu[Ta]=null,Ta--)}function Jt(r,o){Ta++,xu[Ta]=r.current,r.current=o}var Ui={},ir=co(Ui),dr=co(!1),Wo=Ui;function Aa(r,o){var C=r.type.contextTypes;if(!C)return Ui;var F=r.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===o)return F.__reactInternalMemoizedMaskedChildContext;var G={},J;for(J in C)G[J]=o[J];return F&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=G),G}function hr(r){return r=r.childContextTypes,r!=null}function ml(){rn(dr),rn(ir)}function Kc(r,o,C){if(ir.current!==Ui)throw Error(t(168));Jt(ir,o),Jt(dr,C)}function Pu(r,o,C){var F=r.stateNode;if(o=o.childContextTypes,typeof F.getChildContext!="function")return C;F=F.getChildContext();for(var G in F)if(!(G in o))throw Error(t(108,Y(r)||"Unknown",G));return I({},C,F)}function Ra(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Ui,Wo=ir.current,Jt(ir,r),Jt(dr,dr.current),!0}function gh(r,o,C){var F=r.stateNode;if(!F)throw Error(t(169));C?(r=Pu(r,o,Wo),F.__reactInternalMemoizedMergedChildContext=r,rn(dr),rn(ir),Jt(ir,r)):rn(dr),Jt(dr,C)}var qi=null,yl=!1,Cu=!1;function ws(r){qi===null?qi=[r]:qi.push(r)}function fo(r){yl=!0,ws(r)}function Yo(){if(!Cu&&qi!==null){Cu=!0;var r=0,o=qt;try{var C=qi;for(qt=1;r<C.length;r++){var F=C[r];do F=F(!0);while(F!==null)}qi=null,yl=!1}catch(G){throw qi!==null&&(qi=qi.slice(r+1)),Ir(Dr,Yo),G}finally{qt=o,Cu=!1}}return null}var xr=[],Ma=0,Ko=null,Xo=0,Pr=[],Cr=0,Zo=null,Xr=1,vn="";function La(r,o){xr[Ma++]=Xo,xr[Ma++]=Ko,Ko=r,Xo=o}function vh(r,o,C){Pr[Cr++]=Xr,Pr[Cr++]=vn,Pr[Cr++]=Zo,Zo=r;var F=Xr;r=vn;var G=32-Mt(F)-1;F&=~(1<<G),C+=1;var J=32-Mt(o)+G;if(30<J){var oe=G-G%5;J=(F&(1<<oe)-1).toString(32),F>>=oe,G-=oe,Xr=1<<32-Mt(o)+G|C<<G|F,vn=J+r}else Xr=1<<J|C<<G|F,vn=r}function bl(r){r.return!==null&&(La(r,1),vh(r,1,0))}function Kn(r){for(;r===Ko;)Ko=xr[--Ma],xr[Ma]=null,Xo=xr[--Ma],xr[Ma]=null;for(;r===Zo;)Zo=Pr[--Cr],Pr[Cr]=null,vn=Pr[--Cr],Pr[Cr]=null,Xr=Pr[--Cr],Pr[Cr]=null}var Zr=null,Ke=null,Kt=!1,Qr=null;function Xc(r,o){var C=Ki(5,null,null,0);C.elementType="DELETED",C.stateNode=o,C.return=r,o=r.deletions,o===null?(r.deletions=[C],r.flags|=16):o.push(C)}function mh(r,o){switch(r.tag){case 5:var C=r.type;return o=o.nodeType!==1||C.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,Zr=r,Ke=zi(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,Zr=r,Ke=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(C=Zo!==null?{id:Xr,overflow:vn}:null,r.memoizedState={dehydrated:o,treeContext:C,retryLane:1073741824},C=Ki(18,null,null,0),C.stateNode=o,C.return=r,r.child=C,Zr=r,Ke=null,!0):!1;default:return!1}}function Na(r){return(r.mode&1)!==0&&(r.flags&128)===0}function _l(r){if(Kt){var o=Ke;if(o){var C=o;if(!mh(r,o)){if(Na(r))throw Error(t(418));o=zi(C.nextSibling);var F=Zr;o&&mh(r,o)?Xc(F,C):(r.flags=r.flags&-4097|2,Kt=!1,Zr=r)}}else{if(Na(r))throw Error(t(418));r.flags=r.flags&-4097|2,Kt=!1,Zr=r}}}function ku(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Zr=r}function Ss(r){if(r!==Zr)return!1;if(!Kt)return ku(r),Kt=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!Wc(r.type,r.memoizedProps)),o&&(o=Ke)){if(Na(r))throw Zc(),Error(t(418));for(;o;)Xc(r,o),o=zi(o.nextSibling)}if(ku(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(t(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var C=r.data;if(C==="/$"){if(o===0){Ke=zi(r.nextSibling);break e}o--}else C!=="$"&&C!=="$!"&&C!=="$?"||o++}r=r.nextSibling}Ke=null}}else Ke=Zr?zi(r.stateNode.nextSibling):null;return!0}function Zc(){for(var r=Ke;r;)r=zi(r.nextSibling)}function Ia(){Ke=Zr=null,Kt=!1}function Es(r){Qr===null?Qr=[r]:Qr.push(r)}var Qc=y.ReactCurrentBatchConfig;function Cn(r,o,C){if(r=C.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(C._owner){if(C=C._owner,C){if(C.tag!==1)throw Error(t(309));var F=C.stateNode}if(!F)throw Error(t(147,r));var G=F,J=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===J?o.ref:(o=function(oe){var ce=G.refs;oe===null?delete ce[J]:ce[J]=oe},o._stringRef=J,o)}if(typeof r!="string")throw Error(t(284));if(!C._owner)throw Error(t(290,r))}return r}function Ur(r,o){throw r=Object.prototype.toString.call(o),Error(t(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function Pi(r){var o=r._init;return o(r._payload)}function Tu(r){function o(Oe,ve){if(r){var Pe=Oe.deletions;Pe===null?(Oe.deletions=[ve],Oe.flags|=16):Pe.push(ve)}}function C(Oe,ve){if(!r)return null;for(;ve!==null;)o(Oe,ve),ve=ve.sibling;return null}function F(Oe,ve){for(Oe=new Map;ve!==null;)ve.key!==null?Oe.set(ve.key,ve):Oe.set(ve.index,ve),ve=ve.sibling;return Oe}function G(Oe,ve){return Oe=Bl(Oe,ve),Oe.index=0,Oe.sibling=null,Oe}function J(Oe,ve,Pe){return Oe.index=Pe,r?(Pe=Oe.alternate,Pe!==null?(Pe=Pe.index,Pe<ve?(Oe.flags|=2,ve):Pe):(Oe.flags|=2,ve)):(Oe.flags|=1048576,ve)}function oe(Oe){return r&&Oe.alternate===null&&(Oe.flags|=2),Oe}function ce(Oe,ve,Pe,$e){return ve===null||ve.tag!==6?(ve=v0(Pe,Oe.mode,$e),ve.return=Oe,ve):(ve=G(ve,Pe),ve.return=Oe,ve)}function pe(Oe,ve,Pe,$e){var ft=Pe.type;return ft===R?qe(Oe,ve,Pe.props.children,$e,Pe.key):ve!==null&&(ve.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===Q&&Pi(ft)===ve.type)?($e=G(ve,Pe.props),$e.ref=Cn(Oe,ve,Pe),$e.return=Oe,$e):($e=Fh(Pe.type,Pe.key,Pe.props,null,Oe.mode,$e),$e.ref=Cn(Oe,ve,Pe),$e.return=Oe,$e)}function Ae(Oe,ve,Pe,$e){return ve===null||ve.tag!==4||ve.stateNode.containerInfo!==Pe.containerInfo||ve.stateNode.implementation!==Pe.implementation?(ve=m0(Pe,Oe.mode,$e),ve.return=Oe,ve):(ve=G(ve,Pe.children||[]),ve.return=Oe,ve)}function qe(Oe,ve,Pe,$e,ft){return ve===null||ve.tag!==7?(ve=Ns(Pe,Oe.mode,$e,ft),ve.return=Oe,ve):(ve=G(ve,Pe),ve.return=Oe,ve)}function He(Oe,ve,Pe){if(typeof ve=="string"&&ve!==""||typeof ve=="number")return ve=v0(""+ve,Oe.mode,Pe),ve.return=Oe,ve;if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case w:return Pe=Fh(ve.type,ve.key,ve.props,null,Oe.mode,Pe),Pe.ref=Cn(Oe,null,ve),Pe.return=Oe,Pe;case L:return ve=m0(ve,Oe.mode,Pe),ve.return=Oe,ve;case Q:var $e=ve._init;return He(Oe,$e(ve._payload),Pe)}if(Te(ve)||j(ve))return ve=Ns(ve,Oe.mode,Pe,null),ve.return=Oe,ve;Ur(Oe,ve)}return null}function Be(Oe,ve,Pe,$e){var ft=ve!==null?ve.key:null;if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number")return ft!==null?null:ce(Oe,ve,""+Pe,$e);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case w:return Pe.key===ft?pe(Oe,ve,Pe,$e):null;case L:return Pe.key===ft?Ae(Oe,ve,Pe,$e):null;case Q:return ft=Pe._init,Be(Oe,ve,ft(Pe._payload),$e)}if(Te(Pe)||j(Pe))return ft!==null?null:qe(Oe,ve,Pe,$e,null);Ur(Oe,Pe)}return null}function nt(Oe,ve,Pe,$e,ft){if(typeof $e=="string"&&$e!==""||typeof $e=="number")return Oe=Oe.get(Pe)||null,ce(ve,Oe,""+$e,ft);if(typeof $e=="object"&&$e!==null){switch($e.$$typeof){case w:return Oe=Oe.get($e.key===null?Pe:$e.key)||null,pe(ve,Oe,$e,ft);case L:return Oe=Oe.get($e.key===null?Pe:$e.key)||null,Ae(ve,Oe,$e,ft);case Q:var mt=$e._init;return nt(Oe,ve,Pe,mt($e._payload),ft)}if(Te($e)||j($e))return Oe=Oe.get(Pe)||null,qe(ve,Oe,$e,ft,null);Ur(ve,$e)}return null}function st(Oe,ve,Pe,$e){for(var ft=null,mt=null,yt=ve,bt=ve=0,br=null;yt!==null&&bt<Pe.length;bt++){yt.index>bt?(br=yt,yt=null):br=yt.sibling;var $t=Be(Oe,yt,Pe[bt],$e);if($t===null){yt===null&&(yt=br);break}r&&yt&&$t.alternate===null&&o(Oe,yt),ve=J($t,ve,bt),mt===null?ft=$t:mt.sibling=$t,mt=$t,yt=br}if(bt===Pe.length)return C(Oe,yt),Kt&&La(Oe,bt),ft;if(yt===null){for(;bt<Pe.length;bt++)yt=He(Oe,Pe[bt],$e),yt!==null&&(ve=J(yt,ve,bt),mt===null?ft=yt:mt.sibling=yt,mt=yt);return Kt&&La(Oe,bt),ft}for(yt=F(Oe,yt);bt<Pe.length;bt++)br=nt(yt,Oe,bt,Pe[bt],$e),br!==null&&(r&&br.alternate!==null&&yt.delete(br.key===null?bt:br.key),ve=J(br,ve,bt),mt===null?ft=br:mt.sibling=br,mt=br);return r&&yt.forEach(function(Ul){return o(Oe,Ul)}),Kt&&La(Oe,bt),ft}function ct(Oe,ve,Pe,$e){var ft=j(Pe);if(typeof ft!="function")throw Error(t(150));if(Pe=ft.call(Pe),Pe==null)throw Error(t(151));for(var mt=ft=null,yt=ve,bt=ve=0,br=null,$t=Pe.next();yt!==null&&!$t.done;bt++,$t=Pe.next()){yt.index>bt?(br=yt,yt=null):br=yt.sibling;var Ul=Be(Oe,yt,$t.value,$e);if(Ul===null){yt===null&&(yt=br);break}r&&yt&&Ul.alternate===null&&o(Oe,yt),ve=J(Ul,ve,bt),mt===null?ft=Ul:mt.sibling=Ul,mt=Ul,yt=br}if($t.done)return C(Oe,yt),Kt&&La(Oe,bt),ft;if(yt===null){for(;!$t.done;bt++,$t=Pe.next())$t=He(Oe,$t.value,$e),$t!==null&&(ve=J($t,ve,bt),mt===null?ft=$t:mt.sibling=$t,mt=$t);return Kt&&La(Oe,bt),ft}for(yt=F(Oe,yt);!$t.done;bt++,$t=Pe.next())$t=nt(yt,Oe,bt,$t.value,$e),$t!==null&&(r&&$t.alternate!==null&&yt.delete($t.key===null?bt:$t.key),ve=J($t,ve,bt),mt===null?ft=$t:mt.sibling=$t,mt=$t);return r&&yt.forEach(function(y_){return o(Oe,y_)}),Kt&&La(Oe,bt),ft}function qn(Oe,ve,Pe,$e){if(typeof Pe=="object"&&Pe!==null&&Pe.type===R&&Pe.key===null&&(Pe=Pe.props.children),typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case w:e:{for(var ft=Pe.key,mt=ve;mt!==null;){if(mt.key===ft){if(ft=Pe.type,ft===R){if(mt.tag===7){C(Oe,mt.sibling),ve=G(mt,Pe.props.children),ve.return=Oe,Oe=ve;break e}}else if(mt.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===Q&&Pi(ft)===mt.type){C(Oe,mt.sibling),ve=G(mt,Pe.props),ve.ref=Cn(Oe,mt,Pe),ve.return=Oe,Oe=ve;break e}C(Oe,mt);break}else o(Oe,mt);mt=mt.sibling}Pe.type===R?(ve=Ns(Pe.props.children,Oe.mode,$e,Pe.key),ve.return=Oe,Oe=ve):($e=Fh(Pe.type,Pe.key,Pe.props,null,Oe.mode,$e),$e.ref=Cn(Oe,ve,Pe),$e.return=Oe,Oe=$e)}return oe(Oe);case L:e:{for(mt=Pe.key;ve!==null;){if(ve.key===mt)if(ve.tag===4&&ve.stateNode.containerInfo===Pe.containerInfo&&ve.stateNode.implementation===Pe.implementation){C(Oe,ve.sibling),ve=G(ve,Pe.children||[]),ve.return=Oe,Oe=ve;break e}else{C(Oe,ve);break}else o(Oe,ve);ve=ve.sibling}ve=m0(Pe,Oe.mode,$e),ve.return=Oe,Oe=ve}return oe(Oe);case Q:return mt=Pe._init,qn(Oe,ve,mt(Pe._payload),$e)}if(Te(Pe))return st(Oe,ve,Pe,$e);if(j(Pe))return ct(Oe,ve,Pe,$e);Ur(Oe,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"?(Pe=""+Pe,ve!==null&&ve.tag===6?(C(Oe,ve.sibling),ve=G(ve,Pe),ve.return=Oe,Oe=ve):(C(Oe,ve),ve=v0(Pe,Oe.mode,$e),ve.return=Oe,Oe=ve),oe(Oe)):C(Oe,ve)}return qn}var Da=Tu(!0),ci=Tu(!1),Os=co(null),Jr=null,wl=null,Au=null;function Ru(){Au=wl=Jr=null}function Mu(r){var o=Os.current;rn(Os),r._currentValue=o}function Lu(r,o,C){for(;r!==null;){var F=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,F!==null&&(F.childLanes|=o)):F!==null&&(F.childLanes&o)!==o&&(F.childLanes|=o),r===C)break;r=r.return}}function ho(r,o){Jr=r,Au=wl=null,r=r.dependencies,r!==null&&r.firstContext!==null&&(r.lanes&o&&(te=!0),r.firstContext=null)}function kr(r){var o=r._currentValue;if(Au!==r)if(r={context:r,memoizedValue:o,next:null},wl===null){if(Jr===null)throw Error(t(308));wl=r,Jr.dependencies={lanes:0,firstContext:r}}else wl=wl.next=r;return o}var Hi=null;function Sl(r){Hi===null?Hi=[r]:Hi.push(r)}function xs(r,o,C,F){var G=o.interleaved;return G===null?(C.next=C,Sl(o)):(C.next=G.next,G.next=C),o.interleaved=C,ei(r,F)}function ei(r,o){r.lanes|=o;var C=r.alternate;for(C!==null&&(C.lanes|=o),C=r,r=r.return;r!==null;)r.childLanes|=o,C=r.alternate,C!==null&&(C.childLanes|=o),C=r,r=r.return;return C.tag===3?C.stateNode:null}var Gi=!1;function Ps(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nu(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Vi(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function $i(r,o,C){var F=r.updateQueue;if(F===null)return null;if(F=F.shared,Vt&2){var G=F.pending;return G===null?o.next=o:(o.next=G.next,G.next=o),F.pending=o,ei(r,C)}return G=F.interleaved,G===null?(o.next=o,Sl(F)):(o.next=G.next,G.next=o),F.interleaved=o,ei(r,C)}function Iu(r,o,C){if(o=o.updateQueue,o!==null&&(o=o.shared,(C&4194240)!==0)){var F=o.lanes;F&=r.pendingLanes,C|=F,o.lanes=C,Oc(r,C)}}function Cs(r,o){var C=r.updateQueue,F=r.alternate;if(F!==null&&(F=F.updateQueue,C===F)){var G=null,J=null;if(C=C.firstBaseUpdate,C!==null){do{var oe={eventTime:C.eventTime,lane:C.lane,tag:C.tag,payload:C.payload,callback:C.callback,next:null};J===null?G=J=oe:J=J.next=oe,C=C.next}while(C!==null);J===null?G=J=o:J=J.next=o}else G=J=o;C={baseState:F.baseState,firstBaseUpdate:G,lastBaseUpdate:J,shared:F.shared,effects:F.effects},r.updateQueue=C;return}r=C.lastBaseUpdate,r===null?C.firstBaseUpdate=o:r.next=o,C.lastBaseUpdate=o}function El(r,o,C,F){var G=r.updateQueue;Gi=!1;var J=G.firstBaseUpdate,oe=G.lastBaseUpdate,ce=G.shared.pending;if(ce!==null){G.shared.pending=null;var pe=ce,Ae=pe.next;pe.next=null,oe===null?J=Ae:oe.next=Ae,oe=pe;var qe=r.alternate;qe!==null&&(qe=qe.updateQueue,ce=qe.lastBaseUpdate,ce!==oe&&(ce===null?qe.firstBaseUpdate=Ae:ce.next=Ae,qe.lastBaseUpdate=pe))}if(J!==null){var He=G.baseState;oe=0,qe=Ae=pe=null,ce=J;do{var Be=ce.lane,nt=ce.eventTime;if((F&Be)===Be){qe!==null&&(qe=qe.next={eventTime:nt,lane:0,tag:ce.tag,payload:ce.payload,callback:ce.callback,next:null});e:{var st=r,ct=ce;switch(Be=o,nt=C,ct.tag){case 1:if(st=ct.payload,typeof st=="function"){He=st.call(nt,He,Be);break e}He=st;break e;case 3:st.flags=st.flags&-65537|128;case 0:if(st=ct.payload,Be=typeof st=="function"?st.call(nt,He,Be):st,Be==null)break e;He=I({},He,Be);break e;case 2:Gi=!0}}ce.callback!==null&&ce.lane!==0&&(r.flags|=64,Be=G.effects,Be===null?G.effects=[ce]:Be.push(ce))}else nt={eventTime:nt,lane:Be,tag:ce.tag,payload:ce.payload,callback:ce.callback,next:null},qe===null?(Ae=qe=nt,pe=He):qe=qe.next=nt,oe|=Be;if(ce=ce.next,ce===null){if(ce=G.shared.pending,ce===null)break;Be=ce,ce=Be.next,Be.next=null,G.lastBaseUpdate=Be,G.shared.pending=null}}while(!0);if(qe===null&&(pe=He),G.baseState=pe,G.firstBaseUpdate=Ae,G.lastBaseUpdate=qe,o=G.shared.interleaved,o!==null){G=o;do oe|=G.lane,G=G.next;while(G!==o)}else J===null&&(G.shared.lanes=0);As|=oe,r.lanes=oe,r.memoizedState=He}}function xn(r,o,C){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var F=r[o],G=F.callback;if(G!==null){if(F.callback=null,F=C,typeof G!="function")throw Error(t(191,G));G.call(F)}}}var xt={},en=co(xt),mn=co(xt),kn=co(xt);function zn(r){if(r===xt)throw Error(t(174));return r}function Qo(r,o){switch(Jt(kn,o),Jt(mn,r),Jt(en,xt),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:lt(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=lt(o,r)}rn(en),Jt(en,o)}function yn(){rn(en),rn(mn),rn(kn)}function Ol(r){zn(kn.current);var o=zn(en.current),C=lt(o,r.type);o!==C&&(Jt(mn,r),Jt(en,C))}function po(r){mn.current===r&&(rn(en),rn(mn))}var on=co(0);function xl(r){for(var o=r;o!==null;){if(o.tag===13){var C=o.memoizedState;if(C!==null&&(C=C.dehydrated,C===null||C.data==="$?"||C.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if(o.flags&128)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var ja=[];function pr(){for(var r=0;r<ja.length;r++)ja[r]._workInProgressVersionPrimary=null;ja.length=0}var Pl=y.ReactCurrentDispatcher,ks=y.ReactCurrentBatchConfig,Tr=0,Zt=null,Pn=null,Rn=null,Ci=!1,Jo=!1,fi=0,Du=0;function Mn(){throw Error(t(321))}function Ts(r,o){if(o===null)return!1;for(var C=0;C<o.length&&C<r.length;C++)if(!Br(r[C],o[C]))return!1;return!0}function Cl(r,o,C,F,G,J){if(Tr=J,Zt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Pl.current=r===null||r.memoizedState===null?Zp:na,r=C(F,G),Jo){J=0;do{if(Jo=!1,fi=0,25<=J)throw Error(t(301));J+=1,Rn=Pn=null,o.updateQueue=null,Pl.current=Uu,r=C(F,G)}while(Jo)}if(Pl.current=Rl,o=Pn!==null&&Pn.next!==null,Tr=0,Rn=Pn=Zt=null,Ci=!1,o)throw Error(t(300));return r}function kl(){var r=fi!==0;return fi=0,r}function cn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rn===null?Zt.memoizedState=Rn=r:Rn=Rn.next=r,Rn}function Bn(){if(Pn===null){var r=Zt.alternate;r=r!==null?r.memoizedState:null}else r=Pn.next;var o=Rn===null?Zt.memoizedState:Rn.next;if(o!==null)Rn=o,Pn=r;else{if(r===null)throw Error(t(310));Pn=r,r={memoizedState:Pn.memoizedState,baseState:Pn.baseState,baseQueue:Pn.baseQueue,queue:Pn.queue,next:null},Rn===null?Zt.memoizedState=Rn=r:Rn=Rn.next=r}return Rn}function gr(r,o){return typeof o=="function"?o(r):o}function vr(r){var o=Bn(),C=o.queue;if(C===null)throw Error(t(311));C.lastRenderedReducer=r;var F=Pn,G=F.baseQueue,J=C.pending;if(J!==null){if(G!==null){var oe=G.next;G.next=J.next,J.next=oe}F.baseQueue=G=J,C.pending=null}if(G!==null){J=G.next,F=F.baseState;var ce=oe=null,pe=null,Ae=J;do{var qe=Ae.lane;if((Tr&qe)===qe)pe!==null&&(pe=pe.next={lane:0,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null}),F=Ae.hasEagerState?Ae.eagerState:r(F,Ae.action);else{var He={lane:qe,action:Ae.action,hasEagerState:Ae.hasEagerState,eagerState:Ae.eagerState,next:null};pe===null?(ce=pe=He,oe=F):pe=pe.next=He,Zt.lanes|=qe,As|=qe}Ae=Ae.next}while(Ae!==null&&Ae!==J);pe===null?oe=F:pe.next=ce,Br(F,o.memoizedState)||(te=!0),o.memoizedState=F,o.baseState=oe,o.baseQueue=pe,C.lastRenderedState=F}if(r=C.interleaved,r!==null){G=r;do J=G.lane,Zt.lanes|=J,As|=J,G=G.next;while(G!==r)}else G===null&&(C.lanes=0);return[o.memoizedState,C.dispatch]}function ju(r){var o=Bn(),C=o.queue;if(C===null)throw Error(t(311));C.lastRenderedReducer=r;var F=C.dispatch,G=C.pending,J=o.memoizedState;if(G!==null){C.pending=null;var oe=G=G.next;do J=r(J,oe.action),oe=oe.next;while(oe!==G);Br(J,o.memoizedState)||(te=!0),o.memoizedState=J,o.baseQueue===null&&(o.baseState=J),C.lastRenderedState=J}return[J,F]}function Fu(){}function zu(r,o){var C=Zt,F=Bn(),G=o(),J=!Br(F.memoizedState,G);if(J&&(F.memoizedState=G,te=!0),F=F.queue,nf(Jc.bind(null,C,F,r),[r]),F.getSnapshot!==o||J||Rn!==null&&Rn.memoizedState.tag&1){if(C.flags|=2048,Tl(9,go.bind(null,C,F,G,o),void 0,null),yr===null)throw Error(t(349));Tr&30||yh(C,o,G)}return G}function yh(r,o,C){r.flags|=16384,r={getSnapshot:o,value:C},o=Zt.updateQueue,o===null?(o={lastEffect:null,stores:null},Zt.updateQueue=o,o.stores=[r]):(C=o.stores,C===null?o.stores=[r]:C.push(r))}function go(r,o,C,F){o.value=C,o.getSnapshot=F,ef(o)&&Bu(r)}function Jc(r,o,C){return C(function(){ef(o)&&Bu(r)})}function ef(r){var o=r.getSnapshot;r=r.value;try{var C=o();return!Br(r,C)}catch{return!0}}function Bu(r){var o=ei(r,1);o!==null&&bo(o,r,1,-1)}function ea(r){var o=cn();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gr,lastRenderedState:r},o.queue=r,r=r.dispatch=Oh.bind(null,Zt,r),[o.memoizedState,r]}function Tl(r,o,C,F){return r={tag:r,create:o,destroy:C,deps:F,next:null},o=Zt.updateQueue,o===null?(o={lastEffect:null,stores:null},Zt.updateQueue=o,o.lastEffect=r.next=r):(C=o.lastEffect,C===null?o.lastEffect=r.next=r:(F=C.next,C.next=r,r.next=F,o.lastEffect=r)),r}function tf(){return Bn().memoizedState}function Al(r,o,C,F){var G=cn();Zt.flags|=r,G.memoizedState=Tl(1|o,C,void 0,F===void 0?null:F)}function Fa(r,o,C,F){var G=Bn();F=F===void 0?null:F;var J=void 0;if(Pn!==null){var oe=Pn.memoizedState;if(J=oe.destroy,F!==null&&Ts(F,oe.deps)){G.memoizedState=Tl(o,C,J,F);return}}Zt.flags|=r,G.memoizedState=Tl(1|o,C,J,F)}function bh(r,o){return Al(8390656,8,r,o)}function nf(r,o){return Fa(2048,8,r,o)}function rf(r,o){return Fa(4,2,r,o)}function of(r,o){return Fa(4,4,r,o)}function ta(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function _h(r,o,C){return C=C!=null?C.concat([r]):null,Fa(4,4,ta.bind(null,o,r),C)}function vo(){}function af(r,o){var C=Bn();o=o===void 0?null:o;var F=C.memoizedState;return F!==null&&o!==null&&Ts(o,F[1])?F[0]:(C.memoizedState=[r,o],r)}function fn(r,o){var C=Bn();o=o===void 0?null:o;var F=C.memoizedState;return F!==null&&o!==null&&Ts(o,F[1])?F[0]:(r=r(),C.memoizedState=[r,o],r)}function wh(r,o,C){return Tr&21?(Br(C,o)||(C=Ec(),Zt.lanes|=C,As|=C,r.baseState=!0),o):(r.baseState&&(r.baseState=!1,te=!0),r.memoizedState=C)}function Sh(r,o){var C=qt;qt=C!==0&&4>C?C:4,r(!0);var F=ks.transition;ks.transition={};try{r(!1),o()}finally{qt=C,ks.transition=F}}function Eh(){return Bn().memoizedState}function Xp(r,o,C){var F=Fl(r);if(C={lane:F,action:C,hasEagerState:!1,eagerState:null,next:null},lf(r))xh(o,C);else if(C=xs(r,o,C,F),C!==null){var G=ni();bo(C,r,F,G),ti(C,o,F)}}function Oh(r,o,C){var F=Fl(r),G={lane:F,action:C,hasEagerState:!1,eagerState:null,next:null};if(lf(r))xh(o,G);else{var J=r.alternate;if(r.lanes===0&&(J===null||J.lanes===0)&&(J=o.lastRenderedReducer,J!==null))try{var oe=o.lastRenderedState,ce=J(oe,C);if(G.hasEagerState=!0,G.eagerState=ce,Br(ce,oe)){var pe=o.interleaved;pe===null?(G.next=G,Sl(o)):(G.next=pe.next,pe.next=G),o.interleaved=G;return}}catch{}finally{}C=xs(r,o,G,F),C!==null&&(G=ni(),bo(C,r,F,G),ti(C,o,F))}}function lf(r){var o=r.alternate;return r===Zt||o!==null&&o===Zt}function xh(r,o){Jo=Ci=!0;var C=r.pending;C===null?o.next=o:(o.next=C.next,C.next=o),r.pending=o}function ti(r,o,C){if(C&4194240){var F=o.lanes;F&=r.pendingLanes,C|=F,o.lanes=C,Oc(r,C)}}var Rl={readContext:kr,useCallback:Mn,useContext:Mn,useEffect:Mn,useImperativeHandle:Mn,useInsertionEffect:Mn,useLayoutEffect:Mn,useMemo:Mn,useReducer:Mn,useRef:Mn,useState:Mn,useDebugValue:Mn,useDeferredValue:Mn,useTransition:Mn,useMutableSource:Mn,useSyncExternalStore:Mn,useId:Mn,unstable_isNewReconciler:!1},Zp={readContext:kr,useCallback:function(r,o){return cn().memoizedState=[r,o===void 0?null:o],r},useContext:kr,useEffect:bh,useImperativeHandle:function(r,o,C){return C=C!=null?C.concat([r]):null,Al(4194308,4,ta.bind(null,o,r),C)},useLayoutEffect:function(r,o){return Al(4194308,4,r,o)},useInsertionEffect:function(r,o){return Al(4,2,r,o)},useMemo:function(r,o){var C=cn();return o=o===void 0?null:o,r=r(),C.memoizedState=[r,o],r},useReducer:function(r,o,C){var F=cn();return o=C!==void 0?C(o):o,F.memoizedState=F.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},F.queue=r,r=r.dispatch=Xp.bind(null,Zt,r),[F.memoizedState,r]},useRef:function(r){var o=cn();return r={current:r},o.memoizedState=r},useState:ea,useDebugValue:vo,useDeferredValue:function(r){return cn().memoizedState=r},useTransition:function(){var r=ea(!1),o=r[0];return r=Sh.bind(null,r[1]),cn().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,C){var F=Zt,G=cn();if(Kt){if(C===void 0)throw Error(t(407));C=C()}else{if(C=o(),yr===null)throw Error(t(349));Tr&30||yh(F,o,C)}G.memoizedState=C;var J={value:C,getSnapshot:o};return G.queue=J,bh(Jc.bind(null,F,J,r),[r]),F.flags|=2048,Tl(9,go.bind(null,F,J,C,o),void 0,null),C},useId:function(){var r=cn(),o=yr.identifierPrefix;if(Kt){var C=vn,F=Xr;C=(F&~(1<<32-Mt(F)-1)).toString(32)+C,o=":"+o+"R"+C,C=fi++,0<C&&(o+="H"+C.toString(32)),o+=":"}else C=Du++,o=":"+o+"r"+C.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},na={readContext:kr,useCallback:af,useContext:kr,useEffect:nf,useImperativeHandle:_h,useInsertionEffect:rf,useLayoutEffect:of,useMemo:fn,useReducer:vr,useRef:tf,useState:function(){return vr(gr)},useDebugValue:vo,useDeferredValue:function(r){var o=Bn();return wh(o,Pn.memoizedState,r)},useTransition:function(){var r=vr(gr)[0],o=Bn().memoizedState;return[r,o]},useMutableSource:Fu,useSyncExternalStore:zu,useId:Eh,unstable_isNewReconciler:!1},Uu={readContext:kr,useCallback:af,useContext:kr,useEffect:nf,useImperativeHandle:_h,useInsertionEffect:rf,useLayoutEffect:of,useMemo:fn,useReducer:ju,useRef:tf,useState:function(){return ju(gr)},useDebugValue:vo,useDeferredValue:function(r){var o=Bn();return Pn===null?o.memoizedState=r:wh(o,Pn.memoizedState,r)},useTransition:function(){var r=ju(gr)[0],o=Bn().memoizedState;return[r,o]},useMutableSource:Fu,useSyncExternalStore:zu,useId:Eh,unstable_isNewReconciler:!1};function or(r,o){if(r&&r.defaultProps){o=I({},o),r=r.defaultProps;for(var C in r)o[C]===void 0&&(o[C]=r[C]);return o}return o}function Ml(r,o,C,F){o=r.memoizedState,C=C(F,o),C=C==null?o:I({},o,C),r.memoizedState=C,r.lanes===0&&(r.updateQueue.baseState=C)}var Ll={isMounted:function(r){return(r=r._reactInternals)?Ht(r)===r:!1},enqueueSetState:function(r,o,C){r=r._reactInternals;var F=ni(),G=Fl(r),J=Vi(F,G);J.payload=o,C!=null&&(J.callback=C),o=$i(r,J,G),o!==null&&(bo(o,r,G,F),Iu(o,r,G))},enqueueReplaceState:function(r,o,C){r=r._reactInternals;var F=ni(),G=Fl(r),J=Vi(F,G);J.tag=1,J.payload=o,C!=null&&(J.callback=C),o=$i(r,J,G),o!==null&&(bo(o,r,G,F),Iu(o,r,G))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var C=ni(),F=Fl(r),G=Vi(C,F);G.tag=2,o!=null&&(G.callback=o),o=$i(r,G,F),o!==null&&(bo(o,r,F,C),Iu(o,r,F))}};function qu(r,o,C,F,G,J,oe){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(F,J,oe):o.prototype&&o.prototype.isPureReactComponent?!wa(C,F)||!wa(G,J):!0}function Ph(r,o,C){var F=!1,G=Ui,J=o.contextType;return typeof J=="object"&&J!==null?J=kr(J):(G=hr(o)?Wo:ir.current,F=o.contextTypes,J=(F=F!=null)?Aa(r,G):Ui),o=new o(C,J),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Ll,r.stateNode=o,o._reactInternals=r,F&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=G,r.__reactInternalMemoizedMaskedChildContext=J),o}function sf(r,o,C,F){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(C,F),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(C,F),o.state!==r&&Ll.enqueueReplaceState(o,o.state,null)}function Hu(r,o,C,F){var G=r.stateNode;G.props=C,G.state=r.memoizedState,G.refs={},Ps(r);var J=o.contextType;typeof J=="object"&&J!==null?G.context=kr(J):(J=hr(o)?Wo:ir.current,G.context=Aa(r,J)),G.state=r.memoizedState,J=o.getDerivedStateFromProps,typeof J=="function"&&(Ml(r,o,J,C),G.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof G.getSnapshotBeforeUpdate=="function"||typeof G.UNSAFE_componentWillMount!="function"&&typeof G.componentWillMount!="function"||(o=G.state,typeof G.componentWillMount=="function"&&G.componentWillMount(),typeof G.UNSAFE_componentWillMount=="function"&&G.UNSAFE_componentWillMount(),o!==G.state&&Ll.enqueueReplaceState(G,G.state,null),El(r,C,G,F),G.state=r.memoizedState),typeof G.componentDidMount=="function"&&(r.flags|=4194308)}function za(r,o){try{var C="",F=o;do C+=V(F),F=F.return;while(F);var G=C}catch(J){G=`
|
|
31
|
-
Error generating stack: `+J.message+`
|
|
32
|
-
`+J.stack}return{value:r,source:o,stack:G,digest:null}}function Gu(r,o,C){return{value:r,source:null,stack:C??null,digest:o??null}}function Nl(r,o){try{console.error(o.value)}catch(C){setTimeout(function(){throw C})}}var Qp=typeof WeakMap=="function"?WeakMap:Map;function Ch(r,o,C){C=Vi(-1,C),C.tag=3,C.payload={element:null};var F=o.value;return C.callback=function(){Mh||(Mh=!0,s0=F),Nl(r,o)},C}function s(r,o,C){C=Vi(-1,C),C.tag=3;var F=r.type.getDerivedStateFromError;if(typeof F=="function"){var G=o.value;C.payload=function(){return F(G)},C.callback=function(){Nl(r,o)}}var J=r.stateNode;return J!==null&&typeof J.componentDidCatch=="function"&&(C.callback=function(){Nl(r,o),typeof F!="function"&&(Dl===null?Dl=new Set([this]):Dl.add(this));var oe=o.stack;this.componentDidCatch(o.value,{componentStack:oe!==null?oe:""})}),C}function f(r,o,C){var F=r.pingCache;if(F===null){F=r.pingCache=new Qp;var G=new Set;F.set(o,G)}else G=F.get(o),G===void 0&&(G=new Set,F.set(o,G));G.has(C)||(G.add(C),r=l_.bind(null,r,o,C),o.then(r,r))}function N(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function q(r,o,C,F,G){return r.mode&1?(r.flags|=65536,r.lanes=G,r):(r===o?r.flags|=65536:(r.flags|=128,C.flags|=131072,C.flags&=-52805,C.tag===1&&(C.alternate===null?C.tag=17:(o=Vi(-1,1),o.tag=2,$i(C,o,1))),C.lanes|=1),r)}var W=y.ReactCurrentOwner,te=!1;function le(r,o,C,F){o.child=r===null?ci(o,null,C,F):Da(o,r.child,C,F)}function ye(r,o,C,F,G){C=C.render;var J=o.ref;return ho(o,G),F=Cl(r,o,C,F,J,G),C=kl(),r!==null&&!te?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~G,mr(r,o,G)):(Kt&&C&&bl(o),o.flags|=1,le(r,o,F,G),o.child)}function Me(r,o,C,F,G){if(r===null){var J=C.type;return typeof J=="function"&&!g0(J)&&J.defaultProps===void 0&&C.compare===null&&C.defaultProps===void 0?(o.tag=15,o.type=J,Ve(r,o,J,F,G)):(r=Fh(C.type,null,F,o,o.mode,G),r.ref=o.ref,r.return=o,o.child=r)}if(J=r.child,!(r.lanes&G)){var oe=J.memoizedProps;if(C=C.compare,C=C!==null?C:wa,C(oe,F)&&r.ref===o.ref)return mr(r,o,G)}return o.flags|=1,r=Bl(J,F),r.ref=o.ref,r.return=o,o.child=r}function Ve(r,o,C,F,G){if(r!==null){var J=r.memoizedProps;if(wa(J,F)&&r.ref===o.ref)if(te=!1,o.pendingProps=F=J,(r.lanes&G)!==0)r.flags&131072&&(te=!0);else return o.lanes=r.lanes,mr(r,o,G)}return Je(r,o,C,F,G)}function it(r,o,C){var F=o.pendingProps,G=F.children,J=r!==null?r.memoizedState:null;if(F.mode==="hidden")if(!(o.mode&1))o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Jt($u,ki),ki|=C;else{if(!(C&1073741824))return r=J!==null?J.baseLanes|C:C,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,Jt($u,ki),ki|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},F=J!==null?J.baseLanes:C,Jt($u,ki),ki|=F}else J!==null?(F=J.baseLanes|C,o.memoizedState=null):F=C,Jt($u,ki),ki|=F;return le(r,o,G,C),o.child}function wt(r,o){var C=o.ref;(r===null&&C!==null||r!==null&&r.ref!==C)&&(o.flags|=512,o.flags|=2097152)}function Je(r,o,C,F,G){var J=hr(C)?Wo:ir.current;return J=Aa(o,J),ho(o,G),C=Cl(r,o,C,F,J,G),F=kl(),r!==null&&!te?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~G,mr(r,o,G)):(Kt&&F&&bl(o),o.flags|=1,le(r,o,C,G),o.child)}function an(r,o,C,F,G){if(hr(C)){var J=!0;Ra(o)}else J=!1;if(ho(o,G),o.stateNode===null)Dt(r,o),Ph(o,C,F),Hu(o,C,F,G),F=!0;else if(r===null){var oe=o.stateNode,ce=o.memoizedProps;oe.props=ce;var pe=oe.context,Ae=C.contextType;typeof Ae=="object"&&Ae!==null?Ae=kr(Ae):(Ae=hr(C)?Wo:ir.current,Ae=Aa(o,Ae));var qe=C.getDerivedStateFromProps,He=typeof qe=="function"||typeof oe.getSnapshotBeforeUpdate=="function";He||typeof oe.UNSAFE_componentWillReceiveProps!="function"&&typeof oe.componentWillReceiveProps!="function"||(ce!==F||pe!==Ae)&&sf(o,oe,F,Ae),Gi=!1;var Be=o.memoizedState;oe.state=Be,El(o,F,oe,G),pe=o.memoizedState,ce!==F||Be!==pe||dr.current||Gi?(typeof qe=="function"&&(Ml(o,C,qe,F),pe=o.memoizedState),(ce=Gi||qu(o,C,ce,F,Be,pe,Ae))?(He||typeof oe.UNSAFE_componentWillMount!="function"&&typeof oe.componentWillMount!="function"||(typeof oe.componentWillMount=="function"&&oe.componentWillMount(),typeof oe.UNSAFE_componentWillMount=="function"&&oe.UNSAFE_componentWillMount()),typeof oe.componentDidMount=="function"&&(o.flags|=4194308)):(typeof oe.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=F,o.memoizedState=pe),oe.props=F,oe.state=pe,oe.context=Ae,F=ce):(typeof oe.componentDidMount=="function"&&(o.flags|=4194308),F=!1)}else{oe=o.stateNode,Nu(r,o),ce=o.memoizedProps,Ae=o.type===o.elementType?ce:or(o.type,ce),oe.props=Ae,He=o.pendingProps,Be=oe.context,pe=C.contextType,typeof pe=="object"&&pe!==null?pe=kr(pe):(pe=hr(C)?Wo:ir.current,pe=Aa(o,pe));var nt=C.getDerivedStateFromProps;(qe=typeof nt=="function"||typeof oe.getSnapshotBeforeUpdate=="function")||typeof oe.UNSAFE_componentWillReceiveProps!="function"&&typeof oe.componentWillReceiveProps!="function"||(ce!==He||Be!==pe)&&sf(o,oe,F,pe),Gi=!1,Be=o.memoizedState,oe.state=Be,El(o,F,oe,G);var st=o.memoizedState;ce!==He||Be!==st||dr.current||Gi?(typeof nt=="function"&&(Ml(o,C,nt,F),st=o.memoizedState),(Ae=Gi||qu(o,C,Ae,F,Be,st,pe)||!1)?(qe||typeof oe.UNSAFE_componentWillUpdate!="function"&&typeof oe.componentWillUpdate!="function"||(typeof oe.componentWillUpdate=="function"&&oe.componentWillUpdate(F,st,pe),typeof oe.UNSAFE_componentWillUpdate=="function"&&oe.UNSAFE_componentWillUpdate(F,st,pe)),typeof oe.componentDidUpdate=="function"&&(o.flags|=4),typeof oe.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof oe.componentDidUpdate!="function"||ce===r.memoizedProps&&Be===r.memoizedState||(o.flags|=4),typeof oe.getSnapshotBeforeUpdate!="function"||ce===r.memoizedProps&&Be===r.memoizedState||(o.flags|=1024),o.memoizedProps=F,o.memoizedState=st),oe.props=F,oe.state=st,oe.context=pe,F=Ae):(typeof oe.componentDidUpdate!="function"||ce===r.memoizedProps&&Be===r.memoizedState||(o.flags|=4),typeof oe.getSnapshotBeforeUpdate!="function"||ce===r.memoizedProps&&Be===r.memoizedState||(o.flags|=1024),F=!1)}return Xt(r,o,C,F,J,G)}function Xt(r,o,C,F,G,J){wt(r,o);var oe=(o.flags&128)!==0;if(!F&&!oe)return G&&gh(o,C,!1),mr(r,o,J);F=o.stateNode,W.current=o;var ce=oe&&typeof C.getDerivedStateFromError!="function"?null:F.render();return o.flags|=1,r!==null&&oe?(o.child=Da(o,r.child,null,J),o.child=Da(o,null,ce,J)):le(r,o,ce,J),o.memoizedState=F.state,G&&gh(o,C,!0),o.child}function Ar(r){var o=r.stateNode;o.pendingContext?Kc(r,o.pendingContext,o.pendingContext!==o.context):o.context&&Kc(r,o.context,!1),Qo(r,o.containerInfo)}function Wi(r,o,C,F,G){return Ia(),Es(G),o.flags|=256,le(r,o,C,F),o.child}var Ce={dehydrated:null,treeContext:null,retryLane:0};function _e(r){return{baseLanes:r,cachePool:null,transitions:null}}function Le(r,o,C){var F=o.pendingProps,G=on.current,J=!1,oe=(o.flags&128)!==0,ce;if((ce=oe)||(ce=r!==null&&r.memoizedState===null?!1:(G&2)!==0),ce?(J=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(G|=1),Jt(on,G&1),r===null)return _l(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?(o.mode&1?r.data==="$!"?o.lanes=8:o.lanes=1073741824:o.lanes=1,null):(oe=F.children,r=F.fallback,J?(F=o.mode,J=o.child,oe={mode:"hidden",children:oe},!(F&1)&&J!==null?(J.childLanes=0,J.pendingProps=oe):J=zh(oe,F,0,null),r=Ns(r,F,C,null),J.return=o,r.return=o,J.sibling=r,o.child=J,o.child.memoizedState=_e(C),o.memoizedState=Ce,r):et(o,oe));if(G=r.memoizedState,G!==null&&(ce=G.dehydrated,ce!==null))return Tt(r,o,oe,F,ce,G,C);if(J){J=F.fallback,oe=o.mode,G=r.child,ce=G.sibling;var pe={mode:"hidden",children:F.children};return!(oe&1)&&o.child!==G?(F=o.child,F.childLanes=0,F.pendingProps=pe,o.deletions=null):(F=Bl(G,pe),F.subtreeFlags=G.subtreeFlags&14680064),ce!==null?J=Bl(ce,J):(J=Ns(J,oe,C,null),J.flags|=2),J.return=o,F.return=o,F.sibling=J,o.child=F,F=J,J=o.child,oe=r.child.memoizedState,oe=oe===null?_e(C):{baseLanes:oe.baseLanes|C,cachePool:null,transitions:oe.transitions},J.memoizedState=oe,J.childLanes=r.childLanes&~C,o.memoizedState=Ce,F}return J=r.child,r=J.sibling,F=Bl(J,{mode:"visible",children:F.children}),!(o.mode&1)&&(F.lanes=C),F.return=o,F.sibling=null,r!==null&&(C=o.deletions,C===null?(o.deletions=[r],o.flags|=16):C.push(r)),o.child=F,o.memoizedState=null,F}function et(r,o){return o=zh({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function gt(r,o,C,F){return F!==null&&Es(F),Da(o,r.child,null,C),r=et(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function Tt(r,o,C,F,G,J,oe){if(C)return o.flags&256?(o.flags&=-257,F=Gu(Error(t(422))),gt(r,o,oe,F)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(J=F.fallback,G=o.mode,F=zh({mode:"visible",children:F.children},G,0,null),J=Ns(J,G,oe,null),J.flags|=2,F.return=o,J.return=o,F.sibling=J,o.child=F,o.mode&1&&Da(o,r.child,null,oe),o.child.memoizedState=_e(oe),o.memoizedState=Ce,J);if(!(o.mode&1))return gt(r,o,oe,null);if(G.data==="$!"){if(F=G.nextSibling&&G.nextSibling.dataset,F)var ce=F.dgst;return F=ce,J=Error(t(419)),F=Gu(J,F,void 0),gt(r,o,oe,F)}if(ce=(oe&r.childLanes)!==0,te||ce){if(F=yr,F!==null){switch(oe&-oe){case 4:G=2;break;case 16:G=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:G=32;break;case 536870912:G=268435456;break;default:G=0}G=G&(F.suspendedLanes|oe)?0:G,G!==0&&G!==J.retryLane&&(J.retryLane=G,ei(r,G),bo(F,r,G,-1))}return p0(),F=Gu(Error(t(421))),gt(r,o,oe,F)}return G.data==="$?"?(o.flags|=128,o.child=r.child,o=s_.bind(null,r),G._reactRetry=o,null):(r=J.treeContext,Ke=zi(G.nextSibling),Zr=o,Kt=!0,Qr=null,r!==null&&(Pr[Cr++]=Xr,Pr[Cr++]=vn,Pr[Cr++]=Zo,Xr=r.id,vn=r.overflow,Zo=o),o=et(o,F.children),o.flags|=4096,o)}function St(r,o,C){r.lanes|=o;var F=r.alternate;F!==null&&(F.lanes|=o),Lu(r.return,o,C)}function Bt(r,o,C,F,G){var J=r.memoizedState;J===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:F,tail:C,tailMode:G}:(J.isBackwards=o,J.rendering=null,J.renderingStartTime=0,J.last=F,J.tail=C,J.tailMode=G)}function Un(r,o,C){var F=o.pendingProps,G=F.revealOrder,J=F.tail;if(le(r,o,F.children,C),F=on.current,F&2)F=F&1|2,o.flags|=128;else{if(r!==null&&r.flags&128)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&St(r,C,o);else if(r.tag===19)St(r,C,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}F&=1}if(Jt(on,F),!(o.mode&1))o.memoizedState=null;else switch(G){case"forwards":for(C=o.child,G=null;C!==null;)r=C.alternate,r!==null&&xl(r)===null&&(G=C),C=C.sibling;C=G,C===null?(G=o.child,o.child=null):(G=C.sibling,C.sibling=null),Bt(o,!1,G,C,J);break;case"backwards":for(C=null,G=o.child,o.child=null;G!==null;){if(r=G.alternate,r!==null&&xl(r)===null){o.child=G;break}r=G.sibling,G.sibling=C,C=G,G=r}Bt(o,!0,C,null,J);break;case"together":Bt(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Dt(r,o){!(o.mode&1)&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function mr(r,o,C){if(r!==null&&(o.dependencies=r.dependencies),As|=o.lanes,!(C&o.childLanes))return null;if(r!==null&&o.child!==r.child)throw Error(t(153));if(o.child!==null){for(r=o.child,C=Bl(r,r.pendingProps),o.child=C,C.return=o;r.sibling!==null;)r=r.sibling,C=C.sibling=Bl(r,r.pendingProps),C.return=o;C.sibling=null}return o.child}function Jp(r,o,C){switch(o.tag){case 3:Ar(o),Ia();break;case 5:Ol(o);break;case 1:hr(o.type)&&Ra(o);break;case 4:Qo(o,o.stateNode.containerInfo);break;case 10:var F=o.type._context,G=o.memoizedProps.value;Jt(Os,F._currentValue),F._currentValue=G;break;case 13:if(F=o.memoizedState,F!==null)return F.dehydrated!==null?(Jt(on,on.current&1),o.flags|=128,null):C&o.child.childLanes?Le(r,o,C):(Jt(on,on.current&1),r=mr(r,o,C),r!==null?r.sibling:null);Jt(on,on.current&1);break;case 19:if(F=(C&o.childLanes)!==0,r.flags&128){if(F)return Un(r,o,C);o.flags|=128}if(G=o.memoizedState,G!==null&&(G.rendering=null,G.tail=null,G.lastEffect=null),Jt(on,on.current),F)break;return null;case 22:case 23:return o.lanes=0,it(r,o,C)}return mr(r,o,C)}var xv,e0,Pv,Cv;xv=function(r,o){for(var C=o.child;C!==null;){if(C.tag===5||C.tag===6)r.appendChild(C.stateNode);else if(C.tag!==4&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===o)break;for(;C.sibling===null;){if(C.return===null||C.return===o)return;C=C.return}C.sibling.return=C.return,C=C.sibling}},e0=function(){},Pv=function(r,o,C,F){var G=r.memoizedProps;if(G!==F){r=o.stateNode,zn(en.current);var J=null;switch(C){case"input":G=he(r,G),F=he(r,F),J=[];break;case"select":G=I({},G,{value:void 0}),F=I({},F,{value:void 0}),J=[];break;case"textarea":G=ue(r,G),F=ue(r,F),J=[];break;default:typeof G.onClick!="function"&&typeof F.onClick=="function"&&(r.onclick=Ca)}we(C,F);var oe;C=null;for(Ae in G)if(!F.hasOwnProperty(Ae)&&G.hasOwnProperty(Ae)&&G[Ae]!=null)if(Ae==="style"){var ce=G[Ae];for(oe in ce)ce.hasOwnProperty(oe)&&(C||(C={}),C[oe]="")}else Ae!=="dangerouslySetInnerHTML"&&Ae!=="children"&&Ae!=="suppressContentEditableWarning"&&Ae!=="suppressHydrationWarning"&&Ae!=="autoFocus"&&(a.hasOwnProperty(Ae)?J||(J=[]):(J=J||[]).push(Ae,null));for(Ae in F){var pe=F[Ae];if(ce=G!=null?G[Ae]:void 0,F.hasOwnProperty(Ae)&&pe!==ce&&(pe!=null||ce!=null))if(Ae==="style")if(ce){for(oe in ce)!ce.hasOwnProperty(oe)||pe&&pe.hasOwnProperty(oe)||(C||(C={}),C[oe]="");for(oe in pe)pe.hasOwnProperty(oe)&&ce[oe]!==pe[oe]&&(C||(C={}),C[oe]=pe[oe])}else C||(J||(J=[]),J.push(Ae,C)),C=pe;else Ae==="dangerouslySetInnerHTML"?(pe=pe?pe.__html:void 0,ce=ce?ce.__html:void 0,pe!=null&&ce!==pe&&(J=J||[]).push(Ae,pe)):Ae==="children"?typeof pe!="string"&&typeof pe!="number"||(J=J||[]).push(Ae,""+pe):Ae!=="suppressContentEditableWarning"&&Ae!=="suppressHydrationWarning"&&(a.hasOwnProperty(Ae)?(pe!=null&&Ae==="onScroll"&&nn("scroll",r),J||ce===pe||(J=[])):(J=J||[]).push(Ae,pe))}C&&(J=J||[]).push("style",C);var Ae=J;(o.updateQueue=Ae)&&(o.flags|=4)}},Cv=function(r,o,C,F){C!==F&&(o.flags|=4)};function uf(r,o){if(!Kt)switch(r.tailMode){case"hidden":o=r.tail;for(var C=null;o!==null;)o.alternate!==null&&(C=o),o=o.sibling;C===null?r.tail=null:C.sibling=null;break;case"collapsed":C=r.tail;for(var F=null;C!==null;)C.alternate!==null&&(F=C),C=C.sibling;F===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:F.sibling=null}}function qr(r){var o=r.alternate!==null&&r.alternate.child===r.child,C=0,F=0;if(o)for(var G=r.child;G!==null;)C|=G.lanes|G.childLanes,F|=G.subtreeFlags&14680064,F|=G.flags&14680064,G.return=r,G=G.sibling;else for(G=r.child;G!==null;)C|=G.lanes|G.childLanes,F|=G.subtreeFlags,F|=G.flags,G.return=r,G=G.sibling;return r.subtreeFlags|=F,r.childLanes=C,o}function Z4(r,o,C){var F=o.pendingProps;switch(Kn(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qr(o),null;case 1:return hr(o.type)&&ml(),qr(o),null;case 3:return F=o.stateNode,yn(),rn(dr),rn(ir),pr(),F.pendingContext&&(F.context=F.pendingContext,F.pendingContext=null),(r===null||r.child===null)&&(Ss(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&!(o.flags&256)||(o.flags|=1024,Qr!==null&&(f0(Qr),Qr=null))),e0(r,o),qr(o),null;case 5:po(o);var G=zn(kn.current);if(C=o.type,r!==null&&o.stateNode!=null)Pv(r,o,C,F,G),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!F){if(o.stateNode===null)throw Error(t(166));return qr(o),null}if(r=zn(en.current),Ss(o)){F=o.stateNode,C=o.type;var J=o.memoizedProps;switch(F[ui]=o,F[bs]=J,r=(o.mode&1)!==0,C){case"dialog":nn("cancel",F),nn("close",F);break;case"iframe":case"object":case"embed":nn("load",F);break;case"video":case"audio":for(G=0;G<Go.length;G++)nn(Go[G],F);break;case"source":nn("error",F);break;case"img":case"image":case"link":nn("error",F),nn("load",F);break;case"details":nn("toggle",F);break;case"input":Se(F,J),nn("invalid",F);break;case"select":F._wrapperState={wasMultiple:!!J.multiple},nn("invalid",F);break;case"textarea":me(F,J),nn("invalid",F)}we(C,J),G=null;for(var oe in J)if(J.hasOwnProperty(oe)){var ce=J[oe];oe==="children"?typeof ce=="string"?F.textContent!==ce&&(J.suppressHydrationWarning!==!0&&ms(F.textContent,ce,r),G=["children",ce]):typeof ce=="number"&&F.textContent!==""+ce&&(J.suppressHydrationWarning!==!0&&ms(F.textContent,ce,r),G=["children",""+ce]):a.hasOwnProperty(oe)&&ce!=null&&oe==="onScroll"&&nn("scroll",F)}switch(C){case"input":ae(F),fe(F,J,!0);break;case"textarea":ae(F),Ie(F);break;case"select":case"option":break;default:typeof J.onClick=="function"&&(F.onclick=Ca)}F=G,o.updateQueue=F,F!==null&&(o.flags|=4)}else{oe=G.nodeType===9?G:G.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=tt(C)),r==="http://www.w3.org/1999/xhtml"?C==="script"?(r=oe.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof F.is=="string"?r=oe.createElement(C,{is:F.is}):(r=oe.createElement(C),C==="select"&&(oe=r,F.multiple?oe.multiple=!0:F.size&&(oe.size=F.size))):r=oe.createElementNS(r,C),r[ui]=o,r[bs]=F,xv(r,o,!1,!1),o.stateNode=r;e:{switch(oe=Ne(C,F),C){case"dialog":nn("cancel",r),nn("close",r),G=F;break;case"iframe":case"object":case"embed":nn("load",r),G=F;break;case"video":case"audio":for(G=0;G<Go.length;G++)nn(Go[G],r);G=F;break;case"source":nn("error",r),G=F;break;case"img":case"image":case"link":nn("error",r),nn("load",r),G=F;break;case"details":nn("toggle",r),G=F;break;case"input":Se(r,F),G=he(r,F),nn("invalid",r);break;case"option":G=F;break;case"select":r._wrapperState={wasMultiple:!!F.multiple},G=I({},F,{value:void 0}),nn("invalid",r);break;case"textarea":me(r,F),G=ue(r,F),nn("invalid",r);break;default:G=F}we(C,G),ce=G;for(J in ce)if(ce.hasOwnProperty(J)){var pe=ce[J];J==="style"?Et(r,pe):J==="dangerouslySetInnerHTML"?(pe=pe?pe.__html:void 0,pe!=null&&ze(r,pe)):J==="children"?typeof pe=="string"?(C!=="textarea"||pe!=="")&&Ue(r,pe):typeof pe=="number"&&Ue(r,""+pe):J!=="suppressContentEditableWarning"&&J!=="suppressHydrationWarning"&&J!=="autoFocus"&&(a.hasOwnProperty(J)?pe!=null&&J==="onScroll"&&nn("scroll",r):pe!=null&&m(r,J,pe,oe))}switch(C){case"input":ae(r),fe(r,F,!1);break;case"textarea":ae(r),Ie(r);break;case"option":F.value!=null&&r.setAttribute("value",""+ne(F.value));break;case"select":r.multiple=!!F.multiple,J=F.value,J!=null?Re(r,!!F.multiple,J,!1):F.defaultValue!=null&&Re(r,!!F.multiple,F.defaultValue,!0);break;default:typeof G.onClick=="function"&&(r.onclick=Ca)}switch(C){case"button":case"input":case"select":case"textarea":F=!!F.autoFocus;break e;case"img":F=!0;break e;default:F=!1}}F&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return qr(o),null;case 6:if(r&&o.stateNode!=null)Cv(r,o,r.memoizedProps,F);else{if(typeof F!="string"&&o.stateNode===null)throw Error(t(166));if(C=zn(kn.current),zn(en.current),Ss(o)){if(F=o.stateNode,C=o.memoizedProps,F[ui]=o,(J=F.nodeValue!==C)&&(r=Zr,r!==null))switch(r.tag){case 3:ms(F.nodeValue,C,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&ms(F.nodeValue,C,(r.mode&1)!==0)}J&&(o.flags|=4)}else F=(C.nodeType===9?C:C.ownerDocument).createTextNode(F),F[ui]=o,o.stateNode=F}return qr(o),null;case 13:if(rn(on),F=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Kt&&Ke!==null&&o.mode&1&&!(o.flags&128))Zc(),Ia(),o.flags|=98560,J=!1;else if(J=Ss(o),F!==null&&F.dehydrated!==null){if(r===null){if(!J)throw Error(t(318));if(J=o.memoizedState,J=J!==null?J.dehydrated:null,!J)throw Error(t(317));J[ui]=o}else Ia(),!(o.flags&128)&&(o.memoizedState=null),o.flags|=4;qr(o),J=!1}else Qr!==null&&(f0(Qr),Qr=null),J=!0;if(!J)return o.flags&65536?o:null}return o.flags&128?(o.lanes=C,o):(F=F!==null,F!==(r!==null&&r.memoizedState!==null)&&F&&(o.child.flags|=8192,o.mode&1&&(r===null||on.current&1?ar===0&&(ar=3):p0())),o.updateQueue!==null&&(o.flags|=4),qr(o),null);case 4:return yn(),e0(r,o),r===null&&xa(o.stateNode.containerInfo),qr(o),null;case 10:return Mu(o.type._context),qr(o),null;case 17:return hr(o.type)&&ml(),qr(o),null;case 19:if(rn(on),J=o.memoizedState,J===null)return qr(o),null;if(F=(o.flags&128)!==0,oe=J.rendering,oe===null)if(F)uf(J,!1);else{if(ar!==0||r!==null&&r.flags&128)for(r=o.child;r!==null;){if(oe=xl(r),oe!==null){for(o.flags|=128,uf(J,!1),F=oe.updateQueue,F!==null&&(o.updateQueue=F,o.flags|=4),o.subtreeFlags=0,F=C,C=o.child;C!==null;)J=C,r=F,J.flags&=14680066,oe=J.alternate,oe===null?(J.childLanes=0,J.lanes=r,J.child=null,J.subtreeFlags=0,J.memoizedProps=null,J.memoizedState=null,J.updateQueue=null,J.dependencies=null,J.stateNode=null):(J.childLanes=oe.childLanes,J.lanes=oe.lanes,J.child=oe.child,J.subtreeFlags=0,J.deletions=null,J.memoizedProps=oe.memoizedProps,J.memoizedState=oe.memoizedState,J.updateQueue=oe.updateQueue,J.type=oe.type,r=oe.dependencies,J.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),C=C.sibling;return Jt(on,on.current&1|2),o.child}r=r.sibling}J.tail!==null&&Qt()>Wu&&(o.flags|=128,F=!0,uf(J,!1),o.lanes=4194304)}else{if(!F)if(r=xl(oe),r!==null){if(o.flags|=128,F=!0,C=r.updateQueue,C!==null&&(o.updateQueue=C,o.flags|=4),uf(J,!0),J.tail===null&&J.tailMode==="hidden"&&!oe.alternate&&!Kt)return qr(o),null}else 2*Qt()-J.renderingStartTime>Wu&&C!==1073741824&&(o.flags|=128,F=!0,uf(J,!1),o.lanes=4194304);J.isBackwards?(oe.sibling=o.child,o.child=oe):(C=J.last,C!==null?C.sibling=oe:o.child=oe,J.last=oe)}return J.tail!==null?(o=J.tail,J.rendering=o,J.tail=o.sibling,J.renderingStartTime=Qt(),o.sibling=null,C=on.current,Jt(on,F?C&1|2:C&1),o):(qr(o),null);case 22:case 23:return h0(),F=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==F&&(o.flags|=8192),F&&o.mode&1?ki&1073741824&&(qr(o),o.subtreeFlags&6&&(o.flags|=8192)):qr(o),null;case 24:return null;case 25:return null}throw Error(t(156,o.tag))}function Q4(r,o){switch(Kn(o),o.tag){case 1:return hr(o.type)&&ml(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return yn(),rn(dr),rn(ir),pr(),r=o.flags,r&65536&&!(r&128)?(o.flags=r&-65537|128,o):null;case 5:return po(o),null;case 13:if(rn(on),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(t(340));Ia()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return rn(on),null;case 4:return yn(),null;case 10:return Mu(o.type._context),null;case 22:case 23:return h0(),null;case 24:return null;default:return null}}var kh=!1,Hr=!1,J4=typeof WeakSet=="function"?WeakSet:Set,at=null;function Vu(r,o){var C=r.ref;if(C!==null)if(typeof C=="function")try{C(null)}catch(F){Ln(r,o,F)}else C.current=null}function t0(r,o,C){try{C()}catch(F){Ln(r,o,F)}}var kv=!1;function e_(r,o){if(Vc=iu,r=jn(),hl(r)){if("selectionStart"in r)var C={start:r.selectionStart,end:r.selectionEnd};else e:{C=(C=r.ownerDocument)&&C.defaultView||window;var F=C.getSelection&&C.getSelection();if(F&&F.rangeCount!==0){C=F.anchorNode;var G=F.anchorOffset,J=F.focusNode;F=F.focusOffset;try{C.nodeType,J.nodeType}catch{C=null;break e}var oe=0,ce=-1,pe=-1,Ae=0,qe=0,He=r,Be=null;t:for(;;){for(var nt;He!==C||G!==0&&He.nodeType!==3||(ce=oe+G),He!==J||F!==0&&He.nodeType!==3||(pe=oe+F),He.nodeType===3&&(oe+=He.nodeValue.length),(nt=He.firstChild)!==null;)Be=He,He=nt;for(;;){if(He===r)break t;if(Be===C&&++Ae===G&&(ce=oe),Be===J&&++qe===F&&(pe=oe),(nt=He.nextSibling)!==null)break;He=Be,Be=He.parentNode}He=nt}C=ce===-1||pe===-1?null:{start:ce,end:pe}}else C=null}C=C||{start:0,end:0}}else C=null;for($c={focusedElem:r,selectionRange:C},iu=!1,at=o;at!==null;)if(o=at,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,at=r;else for(;at!==null;){o=at;try{var st=o.alternate;if(o.flags&1024)switch(o.tag){case 0:case 11:case 15:break;case 1:if(st!==null){var ct=st.memoizedProps,qn=st.memoizedState,Oe=o.stateNode,ve=Oe.getSnapshotBeforeUpdate(o.elementType===o.type?ct:or(o.type,ct),qn);Oe.__reactInternalSnapshotBeforeUpdate=ve}break;case 3:var Pe=o.stateNode.containerInfo;Pe.nodeType===1?Pe.textContent="":Pe.nodeType===9&&Pe.documentElement&&Pe.removeChild(Pe.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch($e){Ln(o,o.return,$e)}if(r=o.sibling,r!==null){r.return=o.return,at=r;break}at=o.return}return st=kv,kv=!1,st}function cf(r,o,C){var F=o.updateQueue;if(F=F!==null?F.lastEffect:null,F!==null){var G=F=F.next;do{if((G.tag&r)===r){var J=G.destroy;G.destroy=void 0,J!==void 0&&t0(o,C,J)}G=G.next}while(G!==F)}}function Th(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var C=o=o.next;do{if((C.tag&r)===r){var F=C.create;C.destroy=F()}C=C.next}while(C!==o)}}function n0(r){var o=r.ref;if(o!==null){var C=r.stateNode;switch(r.tag){case 5:r=C;break;default:r=C}typeof o=="function"?o(r):o.current=r}}function Tv(r){var o=r.alternate;o!==null&&(r.alternate=null,Tv(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[ui],delete o[bs],delete o[Ou],delete o[hh],delete o[ph])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Av(r){return r.tag===5||r.tag===3||r.tag===4}function Rv(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Av(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function r0(r,o,C){var F=r.tag;if(F===5||F===6)r=r.stateNode,o?C.nodeType===8?C.parentNode.insertBefore(r,o):C.insertBefore(r,o):(C.nodeType===8?(o=C.parentNode,o.insertBefore(r,C)):(o=C,o.appendChild(r)),C=C._reactRootContainer,C!=null||o.onclick!==null||(o.onclick=Ca));else if(F!==4&&(r=r.child,r!==null))for(r0(r,o,C),r=r.sibling;r!==null;)r0(r,o,C),r=r.sibling}function i0(r,o,C){var F=r.tag;if(F===5||F===6)r=r.stateNode,o?C.insertBefore(r,o):C.appendChild(r);else if(F!==4&&(r=r.child,r!==null))for(i0(r,o,C),r=r.sibling;r!==null;)i0(r,o,C),r=r.sibling}var Rr=null,mo=!1;function Il(r,o,C){for(C=C.child;C!==null;)Mv(r,o,C),C=C.sibling}function Mv(r,o,C){if(er&&typeof er.onCommitFiberUnmount=="function")try{er.onCommitFiberUnmount(ro,C)}catch{}switch(C.tag){case 5:Hr||Vu(C,o);case 6:var F=Rr,G=mo;Rr=null,Il(r,o,C),Rr=F,mo=G,Rr!==null&&(mo?(r=Rr,C=C.stateNode,r.nodeType===8?r.parentNode.removeChild(C):r.removeChild(C)):Rr.removeChild(C.stateNode));break;case 18:Rr!==null&&(mo?(r=Rr,C=C.stateNode,r.nodeType===8?Eu(r.parentNode,C):r.nodeType===1&&Eu(r,C),Fr(r)):Eu(Rr,C.stateNode));break;case 4:F=Rr,G=mo,Rr=C.stateNode.containerInfo,mo=!0,Il(r,o,C),Rr=F,mo=G;break;case 0:case 11:case 14:case 15:if(!Hr&&(F=C.updateQueue,F!==null&&(F=F.lastEffect,F!==null))){G=F=F.next;do{var J=G,oe=J.destroy;J=J.tag,oe!==void 0&&(J&2||J&4)&&t0(C,o,oe),G=G.next}while(G!==F)}Il(r,o,C);break;case 1:if(!Hr&&(Vu(C,o),F=C.stateNode,typeof F.componentWillUnmount=="function"))try{F.props=C.memoizedProps,F.state=C.memoizedState,F.componentWillUnmount()}catch(ce){Ln(C,o,ce)}Il(r,o,C);break;case 21:Il(r,o,C);break;case 22:C.mode&1?(Hr=(F=Hr)||C.memoizedState!==null,Il(r,o,C),Hr=F):Il(r,o,C);break;default:Il(r,o,C)}}function Lv(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var C=r.stateNode;C===null&&(C=r.stateNode=new J4),o.forEach(function(F){var G=u_.bind(null,r,F);C.has(F)||(C.add(F),F.then(G,G))})}}function yo(r,o){var C=o.deletions;if(C!==null)for(var F=0;F<C.length;F++){var G=C[F];try{var J=r,oe=o,ce=oe;e:for(;ce!==null;){switch(ce.tag){case 5:Rr=ce.stateNode,mo=!1;break e;case 3:Rr=ce.stateNode.containerInfo,mo=!0;break e;case 4:Rr=ce.stateNode.containerInfo,mo=!0;break e}ce=ce.return}if(Rr===null)throw Error(t(160));Mv(J,oe,G),Rr=null,mo=!1;var pe=G.alternate;pe!==null&&(pe.return=null),G.return=null}catch(Ae){Ln(G,o,Ae)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Nv(o,r),o=o.sibling}function Nv(r,o){var C=r.alternate,F=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(yo(o,r),ra(r),F&4){try{cf(3,r,r.return),Th(3,r)}catch(ct){Ln(r,r.return,ct)}try{cf(5,r,r.return)}catch(ct){Ln(r,r.return,ct)}}break;case 1:yo(o,r),ra(r),F&512&&C!==null&&Vu(C,C.return);break;case 5:if(yo(o,r),ra(r),F&512&&C!==null&&Vu(C,C.return),r.flags&32){var G=r.stateNode;try{Ue(G,"")}catch(ct){Ln(r,r.return,ct)}}if(F&4&&(G=r.stateNode,G!=null)){var J=r.memoizedProps,oe=C!==null?C.memoizedProps:J,ce=r.type,pe=r.updateQueue;if(r.updateQueue=null,pe!==null)try{ce==="input"&&J.type==="radio"&&J.name!=null&&Ee(G,J),Ne(ce,oe);var Ae=Ne(ce,J);for(oe=0;oe<pe.length;oe+=2){var qe=pe[oe],He=pe[oe+1];qe==="style"?Et(G,He):qe==="dangerouslySetInnerHTML"?ze(G,He):qe==="children"?Ue(G,He):m(G,qe,He,Ae)}switch(ce){case"input":De(G,J);break;case"textarea":xe(G,J);break;case"select":var Be=G._wrapperState.wasMultiple;G._wrapperState.wasMultiple=!!J.multiple;var nt=J.value;nt!=null?Re(G,!!J.multiple,nt,!1):Be!==!!J.multiple&&(J.defaultValue!=null?Re(G,!!J.multiple,J.defaultValue,!0):Re(G,!!J.multiple,J.multiple?[]:"",!1))}G[bs]=J}catch(ct){Ln(r,r.return,ct)}}break;case 6:if(yo(o,r),ra(r),F&4){if(r.stateNode===null)throw Error(t(162));G=r.stateNode,J=r.memoizedProps;try{G.nodeValue=J}catch(ct){Ln(r,r.return,ct)}}break;case 3:if(yo(o,r),ra(r),F&4&&C!==null&&C.memoizedState.isDehydrated)try{Fr(o.containerInfo)}catch(ct){Ln(r,r.return,ct)}break;case 4:yo(o,r),ra(r);break;case 13:yo(o,r),ra(r),G=r.child,G.flags&8192&&(J=G.memoizedState!==null,G.stateNode.isHidden=J,!J||G.alternate!==null&&G.alternate.memoizedState!==null||(l0=Qt())),F&4&&Lv(r);break;case 22:if(qe=C!==null&&C.memoizedState!==null,r.mode&1?(Hr=(Ae=Hr)||qe,yo(o,r),Hr=Ae):yo(o,r),ra(r),F&8192){if(Ae=r.memoizedState!==null,(r.stateNode.isHidden=Ae)&&!qe&&r.mode&1)for(at=r,qe=r.child;qe!==null;){for(He=at=qe;at!==null;){switch(Be=at,nt=Be.child,Be.tag){case 0:case 11:case 14:case 15:cf(4,Be,Be.return);break;case 1:Vu(Be,Be.return);var st=Be.stateNode;if(typeof st.componentWillUnmount=="function"){F=Be,C=Be.return;try{o=F,st.props=o.memoizedProps,st.state=o.memoizedState,st.componentWillUnmount()}catch(ct){Ln(F,C,ct)}}break;case 5:Vu(Be,Be.return);break;case 22:if(Be.memoizedState!==null){jv(He);continue}}nt!==null?(nt.return=Be,at=nt):jv(He)}qe=qe.sibling}e:for(qe=null,He=r;;){if(He.tag===5){if(qe===null){qe=He;try{G=He.stateNode,Ae?(J=G.style,typeof J.setProperty=="function"?J.setProperty("display","none","important"):J.display="none"):(ce=He.stateNode,pe=He.memoizedProps.style,oe=pe!=null&&pe.hasOwnProperty("display")?pe.display:null,ce.style.display=kt("display",oe))}catch(ct){Ln(r,r.return,ct)}}}else if(He.tag===6){if(qe===null)try{He.stateNode.nodeValue=Ae?"":He.memoizedProps}catch(ct){Ln(r,r.return,ct)}}else if((He.tag!==22&&He.tag!==23||He.memoizedState===null||He===r)&&He.child!==null){He.child.return=He,He=He.child;continue}if(He===r)break e;for(;He.sibling===null;){if(He.return===null||He.return===r)break e;qe===He&&(qe=null),He=He.return}qe===He&&(qe=null),He.sibling.return=He.return,He=He.sibling}}break;case 19:yo(o,r),ra(r),F&4&&Lv(r);break;case 21:break;default:yo(o,r),ra(r)}}function ra(r){var o=r.flags;if(o&2){try{e:{for(var C=r.return;C!==null;){if(Av(C)){var F=C;break e}C=C.return}throw Error(t(160))}switch(F.tag){case 5:var G=F.stateNode;F.flags&32&&(Ue(G,""),F.flags&=-33);var J=Rv(r);i0(r,J,G);break;case 3:case 4:var oe=F.stateNode.containerInfo,ce=Rv(r);r0(r,ce,oe);break;default:throw Error(t(161))}}catch(pe){Ln(r,r.return,pe)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function t_(r,o,C){at=r,Iv(r)}function Iv(r,o,C){for(var F=(r.mode&1)!==0;at!==null;){var G=at,J=G.child;if(G.tag===22&&F){var oe=G.memoizedState!==null||kh;if(!oe){var ce=G.alternate,pe=ce!==null&&ce.memoizedState!==null||Hr;ce=kh;var Ae=Hr;if(kh=oe,(Hr=pe)&&!Ae)for(at=G;at!==null;)oe=at,pe=oe.child,oe.tag===22&&oe.memoizedState!==null?Fv(G):pe!==null?(pe.return=oe,at=pe):Fv(G);for(;J!==null;)at=J,Iv(J),J=J.sibling;at=G,kh=ce,Hr=Ae}Dv(r)}else G.subtreeFlags&8772&&J!==null?(J.return=G,at=J):Dv(r)}}function Dv(r){for(;at!==null;){var o=at;if(o.flags&8772){var C=o.alternate;try{if(o.flags&8772)switch(o.tag){case 0:case 11:case 15:Hr||Th(5,o);break;case 1:var F=o.stateNode;if(o.flags&4&&!Hr)if(C===null)F.componentDidMount();else{var G=o.elementType===o.type?C.memoizedProps:or(o.type,C.memoizedProps);F.componentDidUpdate(G,C.memoizedState,F.__reactInternalSnapshotBeforeUpdate)}var J=o.updateQueue;J!==null&&xn(o,J,F);break;case 3:var oe=o.updateQueue;if(oe!==null){if(C=null,o.child!==null)switch(o.child.tag){case 5:C=o.child.stateNode;break;case 1:C=o.child.stateNode}xn(o,oe,C)}break;case 5:var ce=o.stateNode;if(C===null&&o.flags&4){C=ce;var pe=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":pe.autoFocus&&C.focus();break;case"img":pe.src&&(C.src=pe.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Ae=o.alternate;if(Ae!==null){var qe=Ae.memoizedState;if(qe!==null){var He=qe.dehydrated;He!==null&&Fr(He)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Hr||o.flags&512&&n0(o)}catch(Be){Ln(o,o.return,Be)}}if(o===r){at=null;break}if(C=o.sibling,C!==null){C.return=o.return,at=C;break}at=o.return}}function jv(r){for(;at!==null;){var o=at;if(o===r){at=null;break}var C=o.sibling;if(C!==null){C.return=o.return,at=C;break}at=o.return}}function Fv(r){for(;at!==null;){var o=at;try{switch(o.tag){case 0:case 11:case 15:var C=o.return;try{Th(4,o)}catch(pe){Ln(o,C,pe)}break;case 1:var F=o.stateNode;if(typeof F.componentDidMount=="function"){var G=o.return;try{F.componentDidMount()}catch(pe){Ln(o,G,pe)}}var J=o.return;try{n0(o)}catch(pe){Ln(o,J,pe)}break;case 5:var oe=o.return;try{n0(o)}catch(pe){Ln(o,oe,pe)}}}catch(pe){Ln(o,o.return,pe)}if(o===r){at=null;break}var ce=o.sibling;if(ce!==null){ce.return=o.return,at=ce;break}at=o.return}}var n_=Math.ceil,Ah=y.ReactCurrentDispatcher,o0=y.ReactCurrentOwner,Yi=y.ReactCurrentBatchConfig,Vt=0,yr=null,Xn=null,Mr=0,ki=0,$u=co(0),ar=0,ff=null,As=0,Rh=0,a0=0,df=null,di=null,l0=0,Wu=1/0,Ba=null,Mh=!1,s0=null,Dl=null,Lh=!1,jl=null,Nh=0,hf=0,u0=null,Ih=-1,Dh=0;function ni(){return Vt&6?Qt():Ih!==-1?Ih:Ih=Qt()}function Fl(r){return r.mode&1?Vt&2&&Mr!==0?Mr&-Mr:Qc.transition!==null?(Dh===0&&(Dh=Ec()),Dh):(r=qt,r!==0||(r=window.event,r=r===void 0?16:Xd(r.type)),r):1}function bo(r,o,C,F){if(50<hf)throw hf=0,u0=null,Error(t(185));is(r,C,F),(!(Vt&2)||r!==yr)&&(r===yr&&(!(Vt&2)&&(Rh|=C),ar===4&&zl(r,Mr)),hi(r,F),C===1&&Vt===0&&!(o.mode&1)&&(Wu=Qt()+500,yl&&Yo()))}function hi(r,o){var C=r.callbackNode;Vd(r,o);var F=pa(r,r===yr?Mr:0);if(F===0)C!==null&&Ii(C),r.callbackNode=null,r.callbackPriority=0;else if(o=F&-F,r.callbackPriority!==o){if(C!=null&&Ii(C),o===1)r.tag===0?fo(Bv.bind(null,r)):ws(Bv.bind(null,r)),fh(function(){!(Vt&6)&&Yo()}),C=null;else{switch(os(F)){case 1:C=Dr;break;case 4:C=ha;break;case 16:C=no;break;case 536870912:C=Qs;break;default:C=no}C=Yv(C,zv.bind(null,r))}r.callbackPriority=o,r.callbackNode=C}}function zv(r,o){if(Ih=-1,Dh=0,Vt&6)throw Error(t(327));var C=r.callbackNode;if(Yu()&&r.callbackNode!==C)return null;var F=pa(r,r===yr?Mr:0);if(F===0)return null;if(F&30||F&r.expiredLanes||o)o=jh(r,F);else{o=F;var G=Vt;Vt|=2;var J=qv();(yr!==r||Mr!==o)&&(Ba=null,Wu=Qt()+500,Ms(r,o));do try{o_();break}catch(ce){Uv(r,ce)}while(!0);Ru(),Ah.current=J,Vt=G,Xn!==null?o=0:(yr=null,Mr=0,o=ar)}if(o!==0){if(o===2&&(G=tl(r),G!==0&&(F=G,o=c0(r,G))),o===1)throw C=ff,Ms(r,0),zl(r,F),hi(r,Qt()),C;if(o===6)zl(r,F);else{if(G=r.current.alternate,!(F&30)&&!r_(G)&&(o=jh(r,F),o===2&&(J=tl(r),J!==0&&(F=J,o=c0(r,J))),o===1))throw C=ff,Ms(r,0),zl(r,F),hi(r,Qt()),C;switch(r.finishedWork=G,r.finishedLanes=F,o){case 0:case 1:throw Error(t(345));case 2:Ls(r,di,Ba);break;case 3:if(zl(r,F),(F&130023424)===F&&(o=l0+500-Qt(),10<o)){if(pa(r,0)!==0)break;if(G=r.suspendedLanes,(G&F)!==F){ni(),r.pingedLanes|=r.suspendedLanes&G;break}r.timeoutHandle=Kr(Ls.bind(null,r,di,Ba),o);break}Ls(r,di,Ba);break;case 4:if(zl(r,F),(F&4194240)===F)break;for(o=r.eventTimes,G=-1;0<F;){var oe=31-Mt(F);J=1<<oe,oe=o[oe],oe>G&&(G=oe),F&=~J}if(F=G,F=Qt()-F,F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3e3>F?3e3:4320>F?4320:1960*n_(F/1960))-F,10<F){r.timeoutHandle=Kr(Ls.bind(null,r,di,Ba),F);break}Ls(r,di,Ba);break;case 5:Ls(r,di,Ba);break;default:throw Error(t(329))}}}return hi(r,Qt()),r.callbackNode===C?zv.bind(null,r):null}function c0(r,o){var C=df;return r.current.memoizedState.isDehydrated&&(Ms(r,o).flags|=256),r=jh(r,o),r!==2&&(o=di,di=C,o!==null&&f0(o)),r}function f0(r){di===null?di=r:di.push.apply(di,r)}function r_(r){for(var o=r;;){if(o.flags&16384){var C=o.updateQueue;if(C!==null&&(C=C.stores,C!==null))for(var F=0;F<C.length;F++){var G=C[F],J=G.getSnapshot;G=G.value;try{if(!Br(J(),G))return!1}catch{return!1}}}if(C=o.child,o.subtreeFlags&16384&&C!==null)C.return=o,o=C;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function zl(r,o){for(o&=~a0,o&=~Rh,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var C=31-Mt(o),F=1<<C;r[C]=-1,o&=~F}}function Bv(r){if(Vt&6)throw Error(t(327));Yu();var o=pa(r,0);if(!(o&1))return hi(r,Qt()),null;var C=jh(r,o);if(r.tag!==0&&C===2){var F=tl(r);F!==0&&(o=F,C=c0(r,F))}if(C===1)throw C=ff,Ms(r,0),zl(r,o),hi(r,Qt()),C;if(C===6)throw Error(t(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Ls(r,di,Ba),hi(r,Qt()),null}function d0(r,o){var C=Vt;Vt|=1;try{return r(o)}finally{Vt=C,Vt===0&&(Wu=Qt()+500,yl&&Yo())}}function Rs(r){jl!==null&&jl.tag===0&&!(Vt&6)&&Yu();var o=Vt;Vt|=1;var C=Yi.transition,F=qt;try{if(Yi.transition=null,qt=1,r)return r()}finally{qt=F,Yi.transition=C,Vt=o,!(Vt&6)&&Yo()}}function h0(){ki=$u.current,rn($u)}function Ms(r,o){r.finishedWork=null,r.finishedLanes=0;var C=r.timeoutHandle;if(C!==-1&&(r.timeoutHandle=-1,Yc(C)),Xn!==null)for(C=Xn.return;C!==null;){var F=C;switch(Kn(F),F.tag){case 1:F=F.type.childContextTypes,F!=null&&ml();break;case 3:yn(),rn(dr),rn(ir),pr();break;case 5:po(F);break;case 4:yn();break;case 13:rn(on);break;case 19:rn(on);break;case 10:Mu(F.type._context);break;case 22:case 23:h0()}C=C.return}if(yr=r,Xn=r=Bl(r.current,null),Mr=ki=o,ar=0,ff=null,a0=Rh=As=0,di=df=null,Hi!==null){for(o=0;o<Hi.length;o++)if(C=Hi[o],F=C.interleaved,F!==null){C.interleaved=null;var G=F.next,J=C.pending;if(J!==null){var oe=J.next;J.next=G,F.next=oe}C.pending=F}Hi=null}return r}function Uv(r,o){do{var C=Xn;try{if(Ru(),Pl.current=Rl,Ci){for(var F=Zt.memoizedState;F!==null;){var G=F.queue;G!==null&&(G.pending=null),F=F.next}Ci=!1}if(Tr=0,Rn=Pn=Zt=null,Jo=!1,fi=0,o0.current=null,C===null||C.return===null){ar=1,ff=o,Xn=null;break}e:{var J=r,oe=C.return,ce=C,pe=o;if(o=Mr,ce.flags|=32768,pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var Ae=pe,qe=ce,He=qe.tag;if(!(qe.mode&1)&&(He===0||He===11||He===15)){var Be=qe.alternate;Be?(qe.updateQueue=Be.updateQueue,qe.memoizedState=Be.memoizedState,qe.lanes=Be.lanes):(qe.updateQueue=null,qe.memoizedState=null)}var nt=N(oe);if(nt!==null){nt.flags&=-257,q(nt,oe,ce,J,o),nt.mode&1&&f(J,Ae,o),o=nt,pe=Ae;var st=o.updateQueue;if(st===null){var ct=new Set;ct.add(pe),o.updateQueue=ct}else st.add(pe);break e}else{if(!(o&1)){f(J,Ae,o),p0();break e}pe=Error(t(426))}}else if(Kt&&ce.mode&1){var qn=N(oe);if(qn!==null){!(qn.flags&65536)&&(qn.flags|=256),q(qn,oe,ce,J,o),Es(za(pe,ce));break e}}J=pe=za(pe,ce),ar!==4&&(ar=2),df===null?df=[J]:df.push(J),J=oe;do{switch(J.tag){case 3:J.flags|=65536,o&=-o,J.lanes|=o;var Oe=Ch(J,pe,o);Cs(J,Oe);break e;case 1:ce=pe;var ve=J.type,Pe=J.stateNode;if(!(J.flags&128)&&(typeof ve.getDerivedStateFromError=="function"||Pe!==null&&typeof Pe.componentDidCatch=="function"&&(Dl===null||!Dl.has(Pe)))){J.flags|=65536,o&=-o,J.lanes|=o;var $e=s(J,ce,o);Cs(J,$e);break e}}J=J.return}while(J!==null)}Gv(C)}catch(ft){o=ft,Xn===C&&C!==null&&(Xn=C=C.return);continue}break}while(!0)}function qv(){var r=Ah.current;return Ah.current=Rl,r===null?Rl:r}function p0(){(ar===0||ar===3||ar===2)&&(ar=4),yr===null||!(As&268435455)&&!(Rh&268435455)||zl(yr,Mr)}function jh(r,o){var C=Vt;Vt|=2;var F=qv();(yr!==r||Mr!==o)&&(Ba=null,Ms(r,o));do try{i_();break}catch(G){Uv(r,G)}while(!0);if(Ru(),Vt=C,Ah.current=F,Xn!==null)throw Error(t(261));return yr=null,Mr=0,ar}function i_(){for(;Xn!==null;)Hv(Xn)}function o_(){for(;Xn!==null&&!No();)Hv(Xn)}function Hv(r){var o=Wv(r.alternate,r,ki);r.memoizedProps=r.pendingProps,o===null?Gv(r):Xn=o,o0.current=null}function Gv(r){var o=r;do{var C=o.alternate;if(r=o.return,o.flags&32768){if(C=Q4(C,o),C!==null){C.flags&=32767,Xn=C;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ar=6,Xn=null;return}}else if(C=Z4(C,o,ki),C!==null){Xn=C;return}if(o=o.sibling,o!==null){Xn=o;return}Xn=o=r}while(o!==null);ar===0&&(ar=5)}function Ls(r,o,C){var F=qt,G=Yi.transition;try{Yi.transition=null,qt=1,a_(r,o,C,F)}finally{Yi.transition=G,qt=F}return null}function a_(r,o,C,F){do Yu();while(jl!==null);if(Vt&6)throw Error(t(327));C=r.finishedWork;var G=r.finishedLanes;if(C===null)return null;if(r.finishedWork=null,r.finishedLanes=0,C===r.current)throw Error(t(177));r.callbackNode=null,r.callbackPriority=0;var J=C.lanes|C.childLanes;if(Vp(r,J),r===yr&&(Xn=yr=null,Mr=0),!(C.subtreeFlags&2064)&&!(C.flags&2064)||Lh||(Lh=!0,Yv(no,function(){return Yu(),null})),J=(C.flags&15990)!==0,C.subtreeFlags&15990||J){J=Yi.transition,Yi.transition=null;var oe=qt;qt=1;var ce=Vt;Vt|=4,o0.current=null,e_(r,C),Nv(C,r),hs($c),iu=!!Vc,$c=Vc=null,r.current=C,t_(C),rs(),Vt=ce,qt=oe,Yi.transition=J}else r.current=C;if(Lh&&(Lh=!1,jl=r,Nh=G),J=r.pendingLanes,J===0&&(Dl=null),sn(C.stateNode),hi(r,Qt()),o!==null)for(F=r.onRecoverableError,C=0;C<o.length;C++)G=o[C],F(G.value,{componentStack:G.stack,digest:G.digest});if(Mh)throw Mh=!1,r=s0,s0=null,r;return Nh&1&&r.tag!==0&&Yu(),J=r.pendingLanes,J&1?r===u0?hf++:(hf=0,u0=r):hf=0,Yo(),null}function Yu(){if(jl!==null){var r=os(Nh),o=Yi.transition,C=qt;try{if(Yi.transition=null,qt=16>r?16:r,jl===null)var F=!1;else{if(r=jl,jl=null,Nh=0,Vt&6)throw Error(t(331));var G=Vt;for(Vt|=4,at=r.current;at!==null;){var J=at,oe=J.child;if(at.flags&16){var ce=J.deletions;if(ce!==null){for(var pe=0;pe<ce.length;pe++){var Ae=ce[pe];for(at=Ae;at!==null;){var qe=at;switch(qe.tag){case 0:case 11:case 15:cf(8,qe,J)}var He=qe.child;if(He!==null)He.return=qe,at=He;else for(;at!==null;){qe=at;var Be=qe.sibling,nt=qe.return;if(Tv(qe),qe===Ae){at=null;break}if(Be!==null){Be.return=nt,at=Be;break}at=nt}}}var st=J.alternate;if(st!==null){var ct=st.child;if(ct!==null){st.child=null;do{var qn=ct.sibling;ct.sibling=null,ct=qn}while(ct!==null)}}at=J}}if(J.subtreeFlags&2064&&oe!==null)oe.return=J,at=oe;else e:for(;at!==null;){if(J=at,J.flags&2048)switch(J.tag){case 0:case 11:case 15:cf(9,J,J.return)}var Oe=J.sibling;if(Oe!==null){Oe.return=J.return,at=Oe;break e}at=J.return}}var ve=r.current;for(at=ve;at!==null;){oe=at;var Pe=oe.child;if(oe.subtreeFlags&2064&&Pe!==null)Pe.return=oe,at=Pe;else e:for(oe=ve;at!==null;){if(ce=at,ce.flags&2048)try{switch(ce.tag){case 0:case 11:case 15:Th(9,ce)}}catch(ft){Ln(ce,ce.return,ft)}if(ce===oe){at=null;break e}var $e=ce.sibling;if($e!==null){$e.return=ce.return,at=$e;break e}at=ce.return}}if(Vt=G,Yo(),er&&typeof er.onPostCommitFiberRoot=="function")try{er.onPostCommitFiberRoot(ro,r)}catch{}F=!0}return F}finally{qt=C,Yi.transition=o}}return!1}function Vv(r,o,C){o=za(C,o),o=Ch(r,o,1),r=$i(r,o,1),o=ni(),r!==null&&(is(r,1,o),hi(r,o))}function Ln(r,o,C){if(r.tag===3)Vv(r,r,C);else for(;o!==null;){if(o.tag===3){Vv(o,r,C);break}else if(o.tag===1){var F=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof F.componentDidCatch=="function"&&(Dl===null||!Dl.has(F))){r=za(C,r),r=s(o,r,1),o=$i(o,r,1),r=ni(),o!==null&&(is(o,1,r),hi(o,r));break}}o=o.return}}function l_(r,o,C){var F=r.pingCache;F!==null&&F.delete(o),o=ni(),r.pingedLanes|=r.suspendedLanes&C,yr===r&&(Mr&C)===C&&(ar===4||ar===3&&(Mr&130023424)===Mr&&500>Qt()-l0?Ms(r,0):a0|=C),hi(r,o)}function $v(r,o){o===0&&(r.mode&1?(o=io,io<<=1,!(io&130023424)&&(io=4194304)):o=1);var C=ni();r=ei(r,o),r!==null&&(is(r,o,C),hi(r,C))}function s_(r){var o=r.memoizedState,C=0;o!==null&&(C=o.retryLane),$v(r,C)}function u_(r,o){var C=0;switch(r.tag){case 13:var F=r.stateNode,G=r.memoizedState;G!==null&&(C=G.retryLane);break;case 19:F=r.stateNode;break;default:throw Error(t(314))}F!==null&&F.delete(o),$v(r,C)}var Wv;Wv=function(r,o,C){if(r!==null)if(r.memoizedProps!==o.pendingProps||dr.current)te=!0;else{if(!(r.lanes&C)&&!(o.flags&128))return te=!1,Jp(r,o,C);te=!!(r.flags&131072)}else te=!1,Kt&&o.flags&1048576&&vh(o,Xo,o.index);switch(o.lanes=0,o.tag){case 2:var F=o.type;Dt(r,o),r=o.pendingProps;var G=Aa(o,ir.current);ho(o,C),G=Cl(null,o,F,r,G,C);var J=kl();return o.flags|=1,typeof G=="object"&&G!==null&&typeof G.render=="function"&&G.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,hr(F)?(J=!0,Ra(o)):J=!1,o.memoizedState=G.state!==null&&G.state!==void 0?G.state:null,Ps(o),G.updater=Ll,o.stateNode=G,G._reactInternals=o,Hu(o,F,r,C),o=Xt(null,o,F,!0,J,C)):(o.tag=0,Kt&&J&&bl(o),le(null,o,G,C),o=o.child),o;case 16:F=o.elementType;e:{switch(Dt(r,o),r=o.pendingProps,G=F._init,F=G(F._payload),o.type=F,G=o.tag=f_(F),r=or(F,r),G){case 0:o=Je(null,o,F,r,C);break e;case 1:o=an(null,o,F,r,C);break e;case 11:o=ye(null,o,F,r,C);break e;case 14:o=Me(null,o,F,or(F.type,r),C);break e}throw Error(t(306,F,""))}return o;case 0:return F=o.type,G=o.pendingProps,G=o.elementType===F?G:or(F,G),Je(r,o,F,G,C);case 1:return F=o.type,G=o.pendingProps,G=o.elementType===F?G:or(F,G),an(r,o,F,G,C);case 3:e:{if(Ar(o),r===null)throw Error(t(387));F=o.pendingProps,J=o.memoizedState,G=J.element,Nu(r,o),El(o,F,null,C);var oe=o.memoizedState;if(F=oe.element,J.isDehydrated)if(J={element:F,isDehydrated:!1,cache:oe.cache,pendingSuspenseBoundaries:oe.pendingSuspenseBoundaries,transitions:oe.transitions},o.updateQueue.baseState=J,o.memoizedState=J,o.flags&256){G=za(Error(t(423)),o),o=Wi(r,o,F,C,G);break e}else if(F!==G){G=za(Error(t(424)),o),o=Wi(r,o,F,C,G);break e}else for(Ke=zi(o.stateNode.containerInfo.firstChild),Zr=o,Kt=!0,Qr=null,C=ci(o,null,F,C),o.child=C;C;)C.flags=C.flags&-3|4096,C=C.sibling;else{if(Ia(),F===G){o=mr(r,o,C);break e}le(r,o,F,C)}o=o.child}return o;case 5:return Ol(o),r===null&&_l(o),F=o.type,G=o.pendingProps,J=r!==null?r.memoizedProps:null,oe=G.children,Wc(F,G)?oe=null:J!==null&&Wc(F,J)&&(o.flags|=32),wt(r,o),le(r,o,oe,C),o.child;case 6:return r===null&&_l(o),null;case 13:return Le(r,o,C);case 4:return Qo(o,o.stateNode.containerInfo),F=o.pendingProps,r===null?o.child=Da(o,null,F,C):le(r,o,F,C),o.child;case 11:return F=o.type,G=o.pendingProps,G=o.elementType===F?G:or(F,G),ye(r,o,F,G,C);case 7:return le(r,o,o.pendingProps,C),o.child;case 8:return le(r,o,o.pendingProps.children,C),o.child;case 12:return le(r,o,o.pendingProps.children,C),o.child;case 10:e:{if(F=o.type._context,G=o.pendingProps,J=o.memoizedProps,oe=G.value,Jt(Os,F._currentValue),F._currentValue=oe,J!==null)if(Br(J.value,oe)){if(J.children===G.children&&!dr.current){o=mr(r,o,C);break e}}else for(J=o.child,J!==null&&(J.return=o);J!==null;){var ce=J.dependencies;if(ce!==null){oe=J.child;for(var pe=ce.firstContext;pe!==null;){if(pe.context===F){if(J.tag===1){pe=Vi(-1,C&-C),pe.tag=2;var Ae=J.updateQueue;if(Ae!==null){Ae=Ae.shared;var qe=Ae.pending;qe===null?pe.next=pe:(pe.next=qe.next,qe.next=pe),Ae.pending=pe}}J.lanes|=C,pe=J.alternate,pe!==null&&(pe.lanes|=C),Lu(J.return,C,o),ce.lanes|=C;break}pe=pe.next}}else if(J.tag===10)oe=J.type===o.type?null:J.child;else if(J.tag===18){if(oe=J.return,oe===null)throw Error(t(341));oe.lanes|=C,ce=oe.alternate,ce!==null&&(ce.lanes|=C),Lu(oe,C,o),oe=J.sibling}else oe=J.child;if(oe!==null)oe.return=J;else for(oe=J;oe!==null;){if(oe===o){oe=null;break}if(J=oe.sibling,J!==null){J.return=oe.return,oe=J;break}oe=oe.return}J=oe}le(r,o,G.children,C),o=o.child}return o;case 9:return G=o.type,F=o.pendingProps.children,ho(o,C),G=kr(G),F=F(G),o.flags|=1,le(r,o,F,C),o.child;case 14:return F=o.type,G=or(F,o.pendingProps),G=or(F.type,G),Me(r,o,F,G,C);case 15:return Ve(r,o,o.type,o.pendingProps,C);case 17:return F=o.type,G=o.pendingProps,G=o.elementType===F?G:or(F,G),Dt(r,o),o.tag=1,hr(F)?(r=!0,Ra(o)):r=!1,ho(o,C),Ph(o,F,G),Hu(o,F,G,C),Xt(null,o,F,!0,r,C);case 19:return Un(r,o,C);case 22:return it(r,o,C)}throw Error(t(156,o.tag))};function Yv(r,o){return Ir(r,o)}function c_(r,o,C,F){this.tag=r,this.key=C,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,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 Ki(r,o,C,F){return new c_(r,o,C,F)}function g0(r){return r=r.prototype,!(!r||!r.isReactComponent)}function f_(r){if(typeof r=="function")return g0(r)?1:0;if(r!=null){if(r=r.$$typeof,r===M)return 11;if(r===U)return 14}return 2}function Bl(r,o){var C=r.alternate;return C===null?(C=Ki(r.tag,o,r.key,r.mode),C.elementType=r.elementType,C.type=r.type,C.stateNode=r.stateNode,C.alternate=r,r.alternate=C):(C.pendingProps=o,C.type=r.type,C.flags=0,C.subtreeFlags=0,C.deletions=null),C.flags=r.flags&14680064,C.childLanes=r.childLanes,C.lanes=r.lanes,C.child=r.child,C.memoizedProps=r.memoizedProps,C.memoizedState=r.memoizedState,C.updateQueue=r.updateQueue,o=r.dependencies,C.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},C.sibling=r.sibling,C.index=r.index,C.ref=r.ref,C}function Fh(r,o,C,F,G,J){var oe=2;if(F=r,typeof r=="function")g0(r)&&(oe=1);else if(typeof r=="string")oe=5;else e:switch(r){case R:return Ns(C.children,G,J,o);case D:oe=8,G|=8;break;case E:return r=Ki(12,C,o,G|2),r.elementType=E,r.lanes=J,r;case T:return r=Ki(13,C,o,G),r.elementType=T,r.lanes=J,r;case B:return r=Ki(19,C,o,G),r.elementType=B,r.lanes=J,r;case X:return zh(C,G,J,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case S:oe=10;break e;case A:oe=9;break e;case M:oe=11;break e;case U:oe=14;break e;case Q:oe=16,F=null;break e}throw Error(t(130,r==null?r:typeof r,""))}return o=Ki(oe,C,o,G),o.elementType=r,o.type=F,o.lanes=J,o}function Ns(r,o,C,F){return r=Ki(7,r,F,o),r.lanes=C,r}function zh(r,o,C,F){return r=Ki(22,r,F,o),r.elementType=X,r.lanes=C,r.stateNode={isHidden:!1},r}function v0(r,o,C){return r=Ki(6,r,null,o),r.lanes=C,r}function m0(r,o,C){return o=Ki(4,r.children!==null?r.children:[],r.key,o),o.lanes=C,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function d_(r,o,C,F,G){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gr(0),this.expirationTimes=Gr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gr(0),this.identifierPrefix=F,this.onRecoverableError=G,this.mutableSourceEagerHydrationData=null}function y0(r,o,C,F,G,J,oe,ce,pe){return r=new d_(r,o,C,ce,pe),o===1?(o=1,J===!0&&(o|=8)):o=0,J=Ki(3,null,null,o),r.current=J,J.stateNode=r,J.memoizedState={element:F,isDehydrated:C,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ps(J),r}function h_(r,o,C){var F=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:F==null?null:""+F,children:r,containerInfo:o,implementation:C}}function Kv(r){if(!r)return Ui;r=r._reactInternals;e:{if(Ht(r)!==r||r.tag!==1)throw Error(t(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(hr(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(t(171))}if(r.tag===1){var C=r.type;if(hr(C))return Pu(r,C,o)}return o}function Xv(r,o,C,F,G,J,oe,ce,pe){return r=y0(C,F,!0,r,G,J,oe,ce,pe),r.context=Kv(null),C=r.current,F=ni(),G=Fl(C),J=Vi(F,G),J.callback=o??null,$i(C,J,G),r.current.lanes=G,is(r,G,F),hi(r,F),r}function Bh(r,o,C,F){var G=o.current,J=ni(),oe=Fl(G);return C=Kv(C),o.context===null?o.context=C:o.pendingContext=C,o=Vi(J,oe),o.payload={element:r},F=F===void 0?null:F,F!==null&&(o.callback=F),r=$i(G,o,oe),r!==null&&(bo(r,G,oe,J),Iu(r,G,oe)),oe}function Uh(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function Zv(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var C=r.retryLane;r.retryLane=C!==0&&C<o?C:o}}function b0(r,o){Zv(r,o),(r=r.alternate)&&Zv(r,o)}function p_(){return null}var Qv=typeof reportError=="function"?reportError:function(r){console.error(r)};function _0(r){this._internalRoot=r}qh.prototype.render=_0.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(t(409));Bh(r,o,null,null)},qh.prototype.unmount=_0.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Rs(function(){Bh(null,r,null,null)}),o[Bi]=null}};function qh(r){this._internalRoot=r}qh.prototype.unstable_scheduleHydration=function(r){if(r){var o=Wd();r={blockedOn:null,target:r,priority:o};for(var C=0;C<Fi.length&&o!==0&&o<Fi[C].priority;C++);Fi.splice(C,0,r),C===0&&tu(r)}};function w0(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Hh(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Jv(){}function g_(r,o,C,F,G){if(G){if(typeof F=="function"){var J=F;F=function(){var Ae=Uh(oe);J.call(Ae)}}var oe=Xv(o,F,r,0,null,!1,!1,"",Jv);return r._reactRootContainer=oe,r[Bi]=oe.current,xa(r.nodeType===8?r.parentNode:r),Rs(),oe}for(;G=r.lastChild;)r.removeChild(G);if(typeof F=="function"){var ce=F;F=function(){var Ae=Uh(pe);ce.call(Ae)}}var pe=y0(r,0,!1,null,null,!1,!1,"",Jv);return r._reactRootContainer=pe,r[Bi]=pe.current,xa(r.nodeType===8?r.parentNode:r),Rs(function(){Bh(o,pe,C,F)}),pe}function Gh(r,o,C,F,G){var J=C._reactRootContainer;if(J){var oe=J;if(typeof G=="function"){var ce=G;G=function(){var pe=Uh(oe);ce.call(pe)}}Bh(o,oe,r,G)}else oe=g_(C,o,r,G,F);return Uh(oe)}nl=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var C=Vn(o.pendingLanes);C!==0&&(Oc(o,C|1),hi(o,Qt()),!(Vt&6)&&(Wu=Qt()+500,Yo()))}break;case 13:Rs(function(){var F=ei(r,1);if(F!==null){var G=ni();bo(F,r,1,G)}}),b0(r,1)}},rl=function(r){if(r.tag===13){var o=ei(r,134217728);if(o!==null){var C=ni();bo(o,r,134217728,C)}b0(r,134217728)}},$d=function(r){if(r.tag===13){var o=Fl(r),C=ei(r,o);if(C!==null){var F=ni();bo(C,r,o,F)}b0(r,o)}},Wd=function(){return qt},Js=function(r,o){var C=qt;try{return qt=r,o()}finally{qt=C}},ke=function(r,o,C){switch(o){case"input":if(De(r,C),o=C.name,C.type==="radio"&&o!=null){for(C=r;C.parentNode;)C=C.parentNode;for(C=C.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<C.length;o++){var F=C[o];if(F!==r&&F.form===r.form){var G=Yn(F);if(!G)throw Error(t(90));se(F),De(F,G)}}}break;case"textarea":xe(r,C);break;case"select":o=C.value,o!=null&&Re(r,!!C.multiple,o,!1)}},hn=d0,Ge=Rs;var v_={usingClientEntryPoint:!1,Events:[_s,Fn,Yn,dn,Yt,d0]},pf={findFiberByHostInstance:$o,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},m_={bundleType:pf.bundleType,version:pf.version,rendererPackageName:pf.rendererPackageName,rendererConfig:pf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:y.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Sn(r),r===null?null:r.stateNode},findFiberByHostInstance:pf.findFiberByHostInstance||p_,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 Vh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vh.isDisabled&&Vh.supportsFiber)try{ro=Vh.inject(m_),er=Vh}catch{}}return pi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v_,pi.createPortal=function(r,o){var C=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!w0(o))throw Error(t(200));return h_(r,o,null,C)},pi.createRoot=function(r,o){if(!w0(r))throw Error(t(299));var C=!1,F="",G=Qv;return o!=null&&(o.unstable_strictMode===!0&&(C=!0),o.identifierPrefix!==void 0&&(F=o.identifierPrefix),o.onRecoverableError!==void 0&&(G=o.onRecoverableError)),o=y0(r,1,!1,null,null,C,!1,F,G),r[Bi]=o.current,xa(r.nodeType===8?r.parentNode:r),new _0(o)},pi.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(t(188)):(r=Object.keys(r).join(","),Error(t(268,r)));return r=Sn(o),r=r===null?null:r.stateNode,r},pi.flushSync=function(r){return Rs(r)},pi.hydrate=function(r,o,C){if(!Hh(o))throw Error(t(200));return Gh(null,r,o,!0,C)},pi.hydrateRoot=function(r,o,C){if(!w0(r))throw Error(t(405));var F=C!=null&&C.hydratedSources||null,G=!1,J="",oe=Qv;if(C!=null&&(C.unstable_strictMode===!0&&(G=!0),C.identifierPrefix!==void 0&&(J=C.identifierPrefix),C.onRecoverableError!==void 0&&(oe=C.onRecoverableError)),o=Xv(o,null,r,1,C??null,G,!1,J,oe),r[Bi]=o.current,xa(r),F)for(r=0;r<F.length;r++)C=F[r],G=C._getVersion,G=G(C._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[C,G]:o.mutableSourceEagerHydrationData.push(C,G);return new qh(o)},pi.render=function(r,o,C){if(!Hh(o))throw Error(t(200));return Gh(null,r,o,!1,C)},pi.unmountComponentAtNode=function(r){if(!Hh(r))throw Error(t(40));return r._reactRootContainer?(Rs(function(){Gh(null,null,r,!1,function(){r._reactRootContainer=null,r[Bi]=null})}),!0):!1},pi.unstable_batchedUpdates=d0,pi.unstable_renderSubtreeIntoContainer=function(r,o,C,F){if(!Hh(C))throw Error(t(200));if(r==null||r._reactInternals===void 0)throw Error(t(38));return Gh(r,o,C,!1,F)},pi.version="18.3.1-next-f1338f8080-20240426",pi}var om;function r3(){if(om)return E0.exports;om=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(i){console.error(i)}}return e(),E0.exports=w_(),E0.exports}var am;function S_(){if(am)return $h;am=1;var e=r3();return $h.createRoot=e.createRoot,$h.hydrateRoot=e.hydrateRoot,$h}var E_=S_();const i3=Ad(E_);var gf={};function Pt(e){for(var i=arguments.length,t=new Array(i>1?i-1:0),n=1;n<i;n++)t[n-1]=arguments[n];throw new Error(typeof e=="number"?"[MobX] minified error nr: "+e+(t.length?" "+t.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var O_={};function wp(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:O_}var o3=Object.assign,lp=Object.getOwnPropertyDescriptor,la=Object.defineProperty,Rd=Object.prototype,mg=[];Object.freeze(mg);var Lg={};Object.freeze(Lg);var x_=typeof Proxy<"u",P_=Object.toString();function a3(){x_||Pt("Proxy not available")}function l3(e){var i=!1;return function(){if(!i)return i=!0,e.apply(this,arguments)}}var ec=function(){};function Li(e){return typeof e=="function"}function Us(e){var i=typeof e;switch(i){case"string":case"symbol":case"number":return!0}return!1}function Sp(e){return e!==null&&typeof e=="object"}function Za(e){if(!Sp(e))return!1;var i=Object.getPrototypeOf(e);if(i==null)return!0;var t=Object.hasOwnProperty.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t.toString()===P_}function s3(e){var i=e==null?void 0:e.constructor;return i?i.name==="GeneratorFunction"||i.displayName==="GeneratorFunction":!1}function Md(e,i,t){la(e,i,{enumerable:!1,writable:!0,configurable:!0,value:t})}function u3(e,i,t){la(e,i,{enumerable:!1,writable:!1,configurable:!0,value:t})}function Zl(e,i){var t="isMobX"+e;return i.prototype[t]=!0,function(n){return Sp(n)&&n[t]===!0}}function vc(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function C_(e){var i=Object.getPrototypeOf(e),t=Object.getPrototypeOf(i),n=Object.getPrototypeOf(t);return n===null}function Wa(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}var c3=typeof Object.getOwnPropertySymbols<"u";function k_(e){var i=Object.keys(e);if(!c3)return i;var t=Object.getOwnPropertySymbols(e);return t.length?[].concat(i,t.filter(function(n){return Rd.propertyIsEnumerable.call(e,n)})):i}var oc=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:c3?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function f3(e){return e===null?null:typeof e=="object"?""+e:e}function Ya(e,i){return Rd.hasOwnProperty.call(e,i)}var T_=Object.getOwnPropertyDescriptors||function(i){var t={};return oc(i).forEach(function(n){t[n]=lp(i,n)}),t};function Ri(e,i){return!!(e&i)}function Mi(e,i,t){return t?e|=i:e&=~i,e}function lm(e,i){(i==null||i>e.length)&&(i=e.length);for(var t=0,n=Array(i);t<i;t++)n[t]=e[t];return n}function A_(e,i){for(var t=0;t<i.length;t++){var n=i[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,M_(n.key),n)}}function mc(e,i,t){return i&&A_(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function tc(e,i){var t=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t)return(t=t.call(e)).next.bind(t);if(Array.isArray(e)||(t=L_(e))||i){t&&(e=t);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
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Yl.apply(null,arguments)}function d3(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,yg(e,i)}function yg(e,i){return yg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},yg(e,i)}function R_(e,i){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,i);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function M_(e){var i=R_(e,"string");return typeof i=="symbol"?i:i+""}function L_(e,i){if(e){if(typeof e=="string")return lm(e,i);var t={}.toString.call(e).slice(8,-1);return t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set"?Array.from(e):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?lm(e,i):void 0}}var aa=Symbol("mobx-stored-annotations");function Co(e){function i(t,n){if(Nd(n))return e.decorate_20223_(t,n);Ld(t,n,e)}return Object.assign(i,e)}function Ld(e,i,t){Ya(e,aa)||Md(e,aa,Yl({},e[aa])),q_(t)||(e[aa][i]=t)}function N_(e){return Ya(e,aa)||Md(e,aa,Yl({},e[aa])),e[aa]}function Nd(e){return typeof e=="object"&&typeof e.kind=="string"}var ht=Symbol("mobx administration"),Ql=function(){function e(t){t===void 0&&(t="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Wt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=t}var i=e.prototype;return i.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},i.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},i.reportObserved=function(){return R3(this)},i.reportChanged=function(){vi(),M3(this),mi()},i.toString=function(){return this.name_},mc(e,[{key:"isBeingObserved",get:function(){return Ri(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return Ri(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return Ri(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Mi(this.flags_,e.diffValueMask_,n===1)}}])}();Ql.isBeingObservedMask_=1;Ql.isPendingUnobservationMask_=2;Ql.diffValueMask_=4;var Ng=Zl("Atom",Ql);function Ed(e,i,t){i===void 0&&(i=ec),t===void 0&&(t=ec);var n=new Ql(e);return i!==ec&&U3(n,i),t!==ec&&Bg(n,t),n}function I_(e,i){return e===i}function D_(e,i){return Xg(e,i)}function j_(e,i){return Xg(e,i,1)}function F_(e,i){return Object.is?Object.is(e,i):e===i?e!==0||1/e===1/i:e!==e&&i!==i}var qs={identity:I_,structural:D_,default:F_,shallow:j_};function Hs(e,i,t){return Ap(e)?e:Array.isArray(e)?ln.array(e,{name:t}):Za(e)?ln.object(e,void 0,{name:t}):vc(e)?ln.map(e,{name:t}):Wa(e)?ln.set(e,{name:t}):typeof e=="function"&&!sc(e)&&!uc(e)?s3(e)?Vs(e):ac(t,e):e}function z_(e,i,t){if(e==null||_r(e)||ri(e)||Nr(e)||lr(e))return e;if(Array.isArray(e))return ln.array(e,{name:t,deep:!1});if(Za(e))return ln.object(e,void 0,{name:t,deep:!1});if(vc(e))return ln.map(e,{name:t,deep:!1});if(Wa(e))return ln.set(e,{name:t,deep:!1})}function Ep(e){return e}function B_(e,i){return Xg(e,i)?i:e}var h3="override",U_=Co({annotationType_:h3,make_:H_,extend_:G_,decorate_20223_:V_});function q_(e){return e.annotationType_===h3}function H_(e,i){return 0}function G_(e,i,t,n){Pt("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function V_(e,i){console.warn("'"+this.annotationType_+"' cannot be used with decorators - this is a no-op")}function Id(e,i){return{annotationType_:e,options_:i,make_:$_,extend_:W_,decorate_20223_:Y_}}function $_(e,i,t,n){var a;if((a=this.options_)!=null&&a.bound)return this.extend_(e,i,t,!1)===null?0:1;if(n===e.target_)return this.extend_(e,i,t,!1)===null?0:2;if(sc(t.value))return 1;var l=p3(e,this,i,t,!1);return la(n,i,l),2}function W_(e,i,t,n){var a=p3(e,this,i,t);return e.defineProperty_(i,a,n)}function Y_(e,i){var t=i.kind,n=i.name,a=i.addInitializer,l=this,u=function(b){var _,k,O,v;return Kl((_=(k=l.options_)==null?void 0:k.name)!=null?_:n.toString(),b,(O=(v=l.options_)==null?void 0:v.autoAction)!=null?O:!1)};if(t=="field")return function(h){var b,_=h;return sc(_)||(_=u(_)),(b=l.options_)!=null&&b.bound&&(_=_.bind(this),_.isMobxAction=!0),_};if(t=="method"){var c;return sc(e)||(e=u(e)),(c=this.options_)!=null&&c.bound&&a(function(){var h=this,b=h[n].bind(h);b.isMobxAction=!0,h[n]=b}),e}Pt("Cannot apply '"+l.annotationType_+"' to '"+String(n)+"' (kind: "+t+"):"+(`
|
|
34
|
-
'`+l.annotationType_+"' can only be used on properties with a function value."))}function K_(e,i,t,n){i.annotationType_,n.value}function p3(e,i,t,n,a){var l,u,c,h,b,_,k;a===void 0&&(a=We.safeDescriptors),K_(e,i,t,n);var O=n.value;if((l=i.options_)!=null&&l.bound){var v;O=O.bind((v=e.proxy_)!=null?v:e.target_)}return{value:Kl((u=(c=i.options_)==null?void 0:c.name)!=null?u:t.toString(),O,(h=(b=i.options_)==null?void 0:b.autoAction)!=null?h:!1,(_=i.options_)!=null&&_.bound?(k=e.proxy_)!=null?k:e.target_:void 0),configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function g3(e,i){return{annotationType_:e,options_:i,make_:X_,extend_:Z_,decorate_20223_:Q_}}function X_(e,i,t,n){var a;if(n===e.target_)return this.extend_(e,i,t,!1)===null?0:2;if((a=this.options_)!=null&&a.bound&&(!Ya(e.target_,i)||!uc(e.target_[i]))&&this.extend_(e,i,t,!1)===null)return 0;if(uc(t.value))return 1;var l=v3(e,this,i,t,!1,!1);return la(n,i,l),2}function Z_(e,i,t,n){var a,l=v3(e,this,i,t,(a=this.options_)==null?void 0:a.bound);return e.defineProperty_(i,l,n)}function Q_(e,i){var t,n=i.name,a=i.addInitializer;return uc(e)||(e=Vs(e)),(t=this.options_)!=null&&t.bound&&a(function(){var l=this,u=l[n].bind(l);u.isMobXFlow=!0,l[n]=u}),e}function J_(e,i,t,n){i.annotationType_,n.value}function v3(e,i,t,n,a,l){l===void 0&&(l=We.safeDescriptors),J_(e,i,t,n);var u=n.value;if(uc(u)||(u=Vs(u)),a){var c;u=u.bind((c=e.proxy_)!=null?c:e.target_),u.isMobXFlow=!0}return{value:u,configurable:l?e.isPlainObject_:!0,enumerable:!1,writable:!l}}function Ig(e,i){return{annotationType_:e,options_:i,make_:e6,extend_:t6,decorate_20223_:n6}}function e6(e,i,t){return this.extend_(e,i,t,!1)===null?0:1}function t6(e,i,t,n){return r6(e,this,i,t),e.defineComputedProperty_(i,Yl({},this.options_,{get:t.get,set:t.set}),n)}function n6(e,i){var t=this,n=i.name,a=i.addInitializer;return a(function(){var l=Ys(this)[ht],u=Yl({},t.options_,{get:e,context:this});u.name||(u.name="ObservableObject."+n.toString()),l.values_.set(n,new Ao(u))}),function(){return this[ht].getObservablePropValue_(n)}}function r6(e,i,t,n){i.annotationType_,n.get}function Op(e,i){return{annotationType_:e,options_:i,make_:i6,extend_:o6,decorate_20223_:a6}}function i6(e,i,t){return this.extend_(e,i,t,!1)===null?0:1}function o6(e,i,t,n){var a,l;return l6(e,this),e.defineObservableProperty_(i,t.value,(a=(l=this.options_)==null?void 0:l.enhancer)!=null?a:Hs,n)}function a6(e,i){var t=this,n=i.kind,a=i.name,l=new WeakSet;function u(c,h){var b,_,k=Ys(c)[ht],O=new $l(h,(b=(_=t.options_)==null?void 0:_.enhancer)!=null?b:Hs,"ObservableObject."+a.toString(),!1);k.values_.set(a,O),l.add(c)}if(n=="accessor")return{get:function(){return l.has(this)||u(this,e.get.call(this)),this[ht].getObservablePropValue_(a)},set:function(h){return l.has(this)||u(this,h),this[ht].setObservablePropValue_(a,h)},init:function(h){return l.has(this)||u(this,h),h}}}function l6(e,i,t,n){i.annotationType_}var s6="true",u6=m3();function m3(e){return{annotationType_:s6,options_:e,make_:c6,extend_:f6,decorate_20223_:d6}}function c6(e,i,t,n){var a,l;if(t.get)return $s.make_(e,i,t,n);if(t.set){var u=Kl(i.toString(),t.set);return n===e.target_?e.defineProperty_(i,{configurable:We.safeDescriptors?e.isPlainObject_:!0,set:u})===null?0:2:(la(n,i,{configurable:!0,set:u}),2)}if(n!==e.target_&&typeof t.value=="function"){var c;if(s3(t.value)){var h,b=(h=this.options_)!=null&&h.autoBind?Vs.bound:Vs;return b.make_(e,i,t,n)}var _=(c=this.options_)!=null&&c.autoBind?ac.bound:ac;return _.make_(e,i,t,n)}var k=((a=this.options_)==null?void 0:a.deep)===!1?ln.ref:ln;if(typeof t.value=="function"&&(l=this.options_)!=null&&l.autoBind){var O;t.value=t.value.bind((O=e.proxy_)!=null?O:e.target_)}return k.make_(e,i,t,n)}function f6(e,i,t,n){var a,l;if(t.get)return $s.extend_(e,i,t,n);if(t.set)return e.defineProperty_(i,{configurable:We.safeDescriptors?e.isPlainObject_:!0,set:Kl(i.toString(),t.set)},n);if(typeof t.value=="function"&&(a=this.options_)!=null&&a.autoBind){var u;t.value=t.value.bind((u=e.proxy_)!=null?u:e.target_)}var c=((l=this.options_)==null?void 0:l.deep)===!1?ln.ref:ln;return c.extend_(e,i,t,n)}function d6(e,i){Pt("'"+this.annotationType_+"' cannot be used as a decorator")}var h6="observable",p6="observable.ref",g6="observable.shallow",v6="observable.struct",y3={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(y3);function Wh(e){return e||y3}var bg=Op(h6),m6=Op(p6,{enhancer:Ep}),y6=Op(g6,{enhancer:z_}),b6=Op(v6,{enhancer:B_}),b3=Co(bg);function Yh(e){return e.deep===!0?Hs:e.deep===!1?Ep:w6(e.defaultDecorator)}function _6(e){var i;return e?(i=e.defaultDecorator)!=null?i:m3(e):void 0}function w6(e){var i,t;return e&&(i=(t=e.options_)==null?void 0:t.enhancer)!=null?i:Hs}function _3(e,i,t){if(Nd(i))return bg.decorate_20223_(e,i);if(Us(i)){Ld(e,i,bg);return}return Ap(e)?e:Za(e)?ln.object(e,i,t):Array.isArray(e)?ln.array(e,i):vc(e)?ln.map(e,i):Wa(e)?ln.set(e,i):typeof e=="object"&&e!==null?e:ln.box(e,i)}o3(_3,b3);var S6={box:function(i,t){var n=Wh(t);return new $l(i,Yh(n),n.name,!0,n.equals)},array:function(i,t){var n=Wh(t);return(We.useProxies===!1||n.proxy===!1?kw:yw)(i,Yh(n),n.name)},map:function(i,t){var n=Wh(t);return new Mp(i,Yh(n),n.name)},set:function(i,t){var n=Wh(t);return new Yg(i,Yh(n),n.name)},object:function(i,t,n){return Jl(function(){return Ug(We.useProxies===!1||(n==null?void 0:n.proxy)===!1?Ys({},n):pw({},n),i,t)})},ref:Co(m6),shallow:Co(y6),deep:b3,struct:Co(b6)},ln=o3(_3,S6),w3="computed",E6="computed.struct",_g=Ig(w3),O6=Ig(E6,{equals:qs.structural}),$s=function(i,t){if(Nd(t))return _g.decorate_20223_(i,t);if(Us(t))return Ld(i,t,_g);if(Za(i))return Co(Ig(w3,i));var n=Za(t)?t:{};return n.get=i,n.name||(n.name=i.name||""),new Ao(n)};Object.assign($s,_g);$s.struct=Co(O6);var sm,um,sp=0,x6=1,P6=(sm=(um=lp(function(){},"name"))==null?void 0:um.configurable)!=null?sm:!1,cm={value:"action",configurable:!0,writable:!1,enumerable:!1};function Kl(e,i,t,n){t===void 0&&(t=!1);function a(){return S3(e,t,i,n||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return i.toString()},P6&&(cm.value=e,la(a,"name",cm)),a}function S3(e,i,t,n,a){var l=E3(e,i);try{return t.apply(n,a)}catch(u){throw l.error_=u,u}finally{O3(l)}}function E3(e,i,t,n){var a=!1,l=0,u=We.trackingDerivation,c=!i||!u;vi();var h=We.allowStateChanges;c&&(Ws(),h=xp(!0));var b=Cp(!0),_={runAsAction_:c,prevDerivation_:u,prevAllowStateChanges_:h,prevAllowStateReads_:b,notifySpy_:a,startTime_:l,actionId_:x6++,parentActionId_:sp};return sp=_.actionId_,_}function O3(e){sp!==e.actionId_&&Pt(30),sp=e.parentActionId_,e.error_!==void 0&&(We.suppressReactionErrors=!0),Pp(e.prevAllowStateChanges_),rc(e.prevAllowStateReads_),mi(),e.runAsAction_&&Ka(e.prevDerivation_),We.suppressReactionErrors=!1}function Dg(e,i){var t=xp(e);try{return i()}finally{Pp(t)}}function xp(e){var i=We.allowStateChanges;return We.allowStateChanges=e,i}function Pp(e){We.allowStateChanges=e}var $l=function(e){function i(n,a,l,u,c){var h;return l===void 0&&(l="ObservableValue"),c===void 0&&(c=qs.default),h=e.call(this,l)||this,h.enhancer=void 0,h.name_=void 0,h.equals=void 0,h.hasUnreportedChange_=!1,h.interceptors_=void 0,h.changeListeners_=void 0,h.value_=void 0,h.dehancer=void 0,h.enhancer=a,h.name_=l,h.equals=c,h.value_=a(n,void 0,l),h}d3(i,e);var t=i.prototype;return t.dehanceValue=function(a){return this.dehancer!==void 0?this.dehancer(a):a},t.set=function(a){this.value_,a=this.prepareNewValue_(a),a!==We.UNCHANGED&&this.setNewValue_(a)},t.prepareNewValue_=function(a){if(Xi(this)){var l=Zi(this,{object:this,type:sa,newValue:a});if(!l)return We.UNCHANGED;a=l.newValue}return a=this.enhancer(a,this.value_,this.name_),this.equals(this.value_,a)?We.UNCHANGED:a},t.setNewValue_=function(a){var l=this.value_;this.value_=a,this.reportChanged(),ko(this)&&To(this,{type:sa,object:this,newValue:a,oldValue:l})},t.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},t.intercept_=function(a){return Dd(this,a)},t.observe_=function(a,l){return l&&a({observableKind:"value",debugObjectName:this.name_,object:this,type:sa,newValue:this.value_,oldValue:void 0}),jd(this,a)},t.raw=function(){return this.value_},t.toJSON=function(){return this.get()},t.toString=function(){return this.name_+"["+this.value_+"]"},t.valueOf=function(){return f3(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},i}(Ql),jg=Zl("ObservableValue",$l),Ao=function(){function e(t){this.dependenciesState_=Wt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Wt.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new cp(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=up.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,t.get||Pt(31),this.derivation=t.get,this.name_=t.name||"ComputedValue",t.set&&(this.setter_=Kl("ComputedValue-setter",t.set)),this.equals_=t.equals||(t.compareStructural||t.struct?qs.structural:qs.default),this.scope_=t.context,this.requiresReaction_=t.requiresReaction,this.keepAlive_=!!t.keepAlive}var i=e.prototype;return i.onBecomeStale_=function(){D6(this)},i.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},i.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},i.get=function(){if(this.isComputing&&Pt(32,this.name_,this.derivation),We.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)wg(this)&&(this.warnAboutUntrackedRead_(),vi(),this.value_=this.computeValue_(!1),mi());else if(R3(this),wg(this)){var n=We.trackingContext;this.keepAlive_&&!n&&(We.trackingContext=this),this.trackAndCompute()&&I6(this),We.trackingContext=n}var a=this.value_;if(tp(a))throw a.cause;return a},i.set=function(n){if(this.setter_){this.isRunningSetter&&Pt(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter=!1}}else Pt(34,this.name_)},i.trackAndCompute=function(){var n=this.value_,a=this.dependenciesState_===Wt.NOT_TRACKING_,l=this.computeValue_(!0),u=a||tp(n)||tp(l)||!this.equals_(n,l);return u&&(this.value_=l),u},i.computeValue_=function(n){this.isComputing=!0;var a=xp(!1),l;if(n)l=x3(this,this.derivation,this.scope_);else if(We.disableErrorBoundaries===!0)l=this.derivation.call(this.scope_);else try{l=this.derivation.call(this.scope_)}catch(u){l=new cp(u)}return Pp(a),this.isComputing=!1,l},i.suspend_=function(){this.keepAlive_||(Sg(this),this.value_=void 0)},i.observe_=function(n,a){var l=this,u=!0,c=void 0;return zg(function(){var h=l.get();if(!u||a){var b=Ws();n({observableKind:"computed",debugObjectName:l.name_,type:sa,object:l,newValue:h,oldValue:c}),Ka(b)}u=!1,c=h})},i.warnAboutUntrackedRead_=function(){},i.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},i.valueOf=function(){return f3(this.get())},i[Symbol.toPrimitive]=function(){return this.valueOf()},mc(e,[{key:"isComputing",get:function(){return Ri(this.flags_,e.isComputingMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isComputingMask_,n)}},{key:"isRunningSetter",get:function(){return Ri(this.flags_,e.isRunningSetterMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isRunningSetterMask_,n)}},{key:"isBeingObserved",get:function(){return Ri(this.flags_,e.isBeingObservedMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isBeingObservedMask_,n)}},{key:"isPendingUnobservation",get:function(){return Ri(this.flags_,e.isPendingUnobservationMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isPendingUnobservationMask_,n)}},{key:"diffValue",get:function(){return Ri(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Mi(this.flags_,e.diffValueMask_,n===1)}}])}();Ao.isComputingMask_=1;Ao.isRunningSetterMask_=2;Ao.isBeingObservedMask_=4;Ao.isPendingUnobservationMask_=8;Ao.diffValueMask_=16;var Gs=Zl("ComputedValue",Ao),Wt;(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_"})(Wt||(Wt={}));var up;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(up||(up={}));var cp=function(i){this.cause=void 0,this.cause=i};function tp(e){return e instanceof cp}function wg(e){switch(e.dependenciesState_){case Wt.UP_TO_DATE_:return!1;case Wt.NOT_TRACKING_:case Wt.STALE_:return!0;case Wt.POSSIBLY_STALE_:{for(var i=Cp(!0),t=Ws(),n=e.observing_,a=n.length,l=0;l<a;l++){var u=n[l];if(Gs(u)){if(We.disableErrorBoundaries)u.get();else try{u.get()}catch{return Ka(t),rc(i),!0}if(e.dependenciesState_===Wt.STALE_)return Ka(t),rc(i),!0}}return P3(e),Ka(t),rc(i),!1}}}function C6(){return We.trackingDerivation!==null}function x3(e,i,t){var n=Cp(!0);P3(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++We.runId;var a=We.trackingDerivation;We.trackingDerivation=e,We.inBatch++;var l;if(We.disableErrorBoundaries===!0)l=i.call(t);else try{l=i.call(t)}catch(u){l=new cp(u)}return We.inBatch--,We.trackingDerivation=a,k6(e),rc(n),l}function k6(e){for(var i=e.observing_,t=e.observing_=e.newObserving_,n=Wt.UP_TO_DATE_,a=0,l=e.unboundDepsCount_,u=0;u<l;u++){var c=t[u];c.diffValue===0&&(c.diffValue=1,a!==u&&(t[a]=c),a++),c.dependenciesState_>n&&(n=c.dependenciesState_)}for(t.length=a,e.newObserving_=null,l=i.length;l--;){var h=i[l];h.diffValue===0&&T3(h,e),h.diffValue=0}for(;a--;){var b=t[a];b.diffValue===1&&(b.diffValue=0,N6(b,e))}n!==Wt.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function Sg(e){var i=e.observing_;e.observing_=[];for(var t=i.length;t--;)T3(i[t],e);e.dependenciesState_=Wt.NOT_TRACKING_}function Fg(e){var i=Ws();try{return e()}finally{Ka(i)}}function Ws(){var e=We.trackingDerivation;return We.trackingDerivation=null,e}function Ka(e){We.trackingDerivation=e}function Cp(e){var i=We.allowStateReads;return We.allowStateReads=e,i}function rc(e){We.allowStateReads=e}function P3(e){if(e.dependenciesState_!==Wt.UP_TO_DATE_){e.dependenciesState_=Wt.UP_TO_DATE_;for(var i=e.observing_,t=i.length;t--;)i[t].lowestObserverState_=Wt.UP_TO_DATE_}}var T6=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],bd=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},np=!0,C3=!1,We=function(){var e=wp();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(np=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new bd().version&&(np=!1),np?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new bd):(setTimeout(function(){C3||Pt(35)},1),new bd)}();function A6(){if((We.pendingReactions.length||We.inBatch||We.isRunningReactions)&&Pt(36),C3=!0,np){var e=wp();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),We=new bd}}function k3(){return We}function R6(){var e=new bd;for(var i in e)T6.indexOf(i)===-1&&(We[i]=e[i]);We.allowStateChanges=!We.enforceActions}function M6(e){return e.observers_&&e.observers_.size>0}function L6(e){return e.observers_}function N6(e,i){e.observers_.add(i),e.lowestObserverState_>i.dependenciesState_&&(e.lowestObserverState_=i.dependenciesState_)}function T3(e,i){e.observers_.delete(i),e.observers_.size===0&&A3(e)}function A3(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,We.pendingUnobservations.push(e))}function vi(){We.inBatch++}function mi(){if(--We.inBatch===0){L3();for(var e=We.pendingUnobservations,i=0;i<e.length;i++){var t=e[i];t.isPendingUnobservation=!1,t.observers_.size===0&&(t.isBeingObserved&&(t.isBeingObserved=!1,t.onBUO()),t instanceof Ao&&t.suspend_())}We.pendingUnobservations=[]}}function R3(e){var i=We.trackingDerivation;return i!==null?(i.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=i.runId_,i.newObserving_[i.unboundDepsCount_++]=e,!e.isBeingObserved&&We.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.observers_.size===0&&We.inBatch>0&&A3(e),!1)}function M3(e){e.lowestObserverState_!==Wt.STALE_&&(e.lowestObserverState_=Wt.STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Wt.UP_TO_DATE_&&i.onBecomeStale_(),i.dependenciesState_=Wt.STALE_}))}function I6(e){e.lowestObserverState_!==Wt.STALE_&&(e.lowestObserverState_=Wt.STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Wt.POSSIBLY_STALE_?i.dependenciesState_=Wt.STALE_:i.dependenciesState_===Wt.UP_TO_DATE_&&(e.lowestObserverState_=Wt.UP_TO_DATE_)}))}function D6(e){e.lowestObserverState_===Wt.UP_TO_DATE_&&(e.lowestObserverState_=Wt.POSSIBLY_STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Wt.UP_TO_DATE_&&(i.dependenciesState_=Wt.POSSIBLY_STALE_,i.onBecomeStale_())}))}var Ro=function(){function e(t,n,a,l){t===void 0&&(t="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Wt.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=up.NONE,this.name_=t,this.onInvalidate_=n,this.errorHandler_=a,this.requiresObservable_=l}var i=e.prototype;return i.onBecomeStale_=function(){this.schedule_()},i.schedule_=function(){this.isScheduled||(this.isScheduled=!0,We.pendingReactions.push(this),L3())},i.runReaction_=function(){if(!this.isDisposed){vi(),this.isScheduled=!1;var n=We.trackingContext;if(We.trackingContext=this,wg(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}We.trackingContext=n,mi()}},i.track=function(n){if(!this.isDisposed){vi(),this.isRunning=!0;var a=We.trackingContext;We.trackingContext=this;var l=x3(this,n,void 0);We.trackingContext=a,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Sg(this),tp(l)&&this.reportExceptionInDerivation_(l.cause),mi()}},i.reportExceptionInDerivation_=function(n){var a=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(We.disableErrorBoundaries)throw n;var l="[mobx] uncaught error in '"+this+"'";We.suppressReactionErrors||console.error(l,n),We.globalReactionErrorHandlers.forEach(function(u){return u(n,a)})},i.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(vi(),Sg(this),mi()))},i.getDisposer_=function(n){var a=this,l=function u(){a.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",u)};return n==null||n.addEventListener==null||n.addEventListener("abort",l),l[ht]=this,l},i.toString=function(){return"Reaction["+this.name_+"]"},i.trace=function(n){},mc(e,[{key:"isDisposed",get:function(){return Ri(this.flags_,e.isDisposedMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isDisposedMask_,n)}},{key:"isScheduled",get:function(){return Ri(this.flags_,e.isScheduledMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isScheduledMask_,n)}},{key:"isTrackPending",get:function(){return Ri(this.flags_,e.isTrackPendingMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isTrackPendingMask_,n)}},{key:"isRunning",get:function(){return Ri(this.flags_,e.isRunningMask_)},set:function(n){this.flags_=Mi(this.flags_,e.isRunningMask_,n)}},{key:"diffValue",get:function(){return Ri(this.flags_,e.diffValueMask_)?1:0},set:function(n){this.flags_=Mi(this.flags_,e.diffValueMask_,n===1)}}])}();Ro.isDisposedMask_=1;Ro.isScheduledMask_=2;Ro.isTrackPendingMask_=4;Ro.isRunningMask_=8;Ro.diffValueMask_=16;function j6(e){return We.globalReactionErrorHandlers.push(e),function(){var i=We.globalReactionErrorHandlers.indexOf(e);i>=0&&We.globalReactionErrorHandlers.splice(i,1)}}var F6=100,Eg=function(i){return i()};function L3(){We.inBatch>0||We.isRunningReactions||Eg(z6)}function z6(){We.isRunningReactions=!0;for(var e=We.pendingReactions,i=0;e.length>0;){++i===F6&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var t=e.splice(0),n=0,a=t.length;n<a;n++)t[n].runReaction_()}We.isRunningReactions=!1}var fp=Zl("Reaction",Ro);function B6(e){var i=Eg;Eg=function(n){return e(function(){return i(n)})}}function _d(){return!1}function N3(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var I3="action",U6="action.bound",D3="autoAction",q6="autoAction.bound",j3="<unnamed action>",Og=Id(I3),H6=Id(U6,{bound:!0}),xg=Id(D3,{autoAction:!0}),G6=Id(q6,{autoAction:!0,bound:!0});function F3(e){var i=function(n,a){if(Li(n))return Kl(n.name||j3,n,e);if(Li(a))return Kl(n,a,e);if(Nd(a))return(e?xg:Og).decorate_20223_(n,a);if(Us(a))return Ld(n,a,e?xg:Og);if(Us(n))return Co(Id(e?D3:I3,{name:n,autoAction:e}))};return i}var Zn=F3(!1);Object.assign(Zn,Og);var ac=F3(!0);Object.assign(ac,xg);Zn.bound=Co(H6);ac.bound=Co(G6);function lc(e){return S3(e.name||j3,!1,e,this,void 0)}function sc(e){return Li(e)&&e.isMobxAction===!0}function zg(e,i){var t,n,a,l;i===void 0&&(i=Lg);var u=(t=(n=i)==null?void 0:n.name)!=null?t:"Autorun",c=!i.scheduler&&!i.delay,h;if(c)h=new Ro(u,function(){this.track(k)},i.onError,i.requiresObservable);else{var b=z3(i),_=!1;h=new Ro(u,function(){_||(_=!0,b(function(){_=!1,h.isDisposed||h.track(k)}))},i.onError,i.requiresObservable)}function k(){e(h)}return(a=i)!=null&&(a=a.signal)!=null&&a.aborted||h.schedule_(),h.getDisposer_((l=i)==null?void 0:l.signal)}var V6=function(i){return i()};function z3(e){return e.scheduler?e.scheduler:e.delay?function(i){return setTimeout(i,e.delay)}:V6}function B3(e,i,t){var n,a,l;t===void 0&&(t=Lg);var u=(n=t.name)!=null?n:"Reaction",c=Zn(u,t.onError?$6(t.onError,i):i),h=!t.scheduler&&!t.delay,b=z3(t),_=!0,k=!1,O,v=t.compareStructural?qs.structural:t.equals||qs.default,x=new Ro(u,function(){_||h?g():k||(k=!0,b(g))},t.onError,t.requiresObservable);function g(){if(k=!1,!x.isDisposed){var p=!1,P=O;x.track(function(){var d=Dg(!1,function(){return e(x)});p=_||!v(O,d),O=d}),(_&&t.fireImmediately||!_&&p)&&c(O,P,x),_=!1}}return(a=t)!=null&&(a=a.signal)!=null&&a.aborted||x.schedule_(),x.getDisposer_((l=t)==null?void 0:l.signal)}function $6(e,i){return function(){try{return i.apply(this,arguments)}catch(t){e.call(this,t)}}}var W6="onBO",Y6="onBUO";function U3(e,i,t){return q3(W6,e,i,t)}function Bg(e,i,t){return q3(Y6,e,i,t)}function q3(e,i,t,n){var a=typeof n=="function"?ua(i,t):ua(i),l=Li(n)?n:t,u=e+"L";return a[u]?a[u].add(l):a[u]=new Set([l]),function(){var c=a[u];c&&(c.delete(l),c.size===0&&delete a[u])}}var K6="never",Kh="always",X6="observed";function H3(e){e.isolateGlobalState===!0&&A6();var i=e.useProxies,t=e.enforceActions;if(i!==void 0&&(We.useProxies=i===Kh?!0:i===K6?!1:typeof Proxy<"u"),i==="ifavailable"&&(We.verifyProxies=!0),t!==void 0){var n=t===Kh?Kh:t===X6;We.enforceActions=n,We.allowStateChanges=!(n===!0||n===Kh)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(a){a in e&&(We[a]=!!e[a])}),We.allowStateReads=!We.observableRequiresReaction,e.reactionScheduler&&B6(e.reactionScheduler)}function Ug(e,i,t,n){var a=T_(i);return Jl(function(){var l=Ys(e,n)[ht];oc(a).forEach(function(u){l.extend_(u,a[u],t&&u in t?t[u]:!0)})}),e}function G3(e,i){return V3(ua(e,i))}function V3(e){var i={name:e.name_};return e.observing_&&e.observing_.length>0&&(i.dependencies=Q6(e.observing_).map(V3)),i}function Z6(e,i){return $3(ua(e,i))}function $3(e){var i={name:e.name_};return M6(e)&&(i.observers=Array.from(L6(e)).map($3)),i}function Q6(e){return Array.from(new Set(e))}var J6=0;function kp(){this.message="FLOW_CANCELLED"}kp.prototype=Object.create(Error.prototype);function ew(e){return e instanceof kp}var P0=g3("flow"),tw=g3("flow.bound",{bound:!0}),Vs=Object.assign(function(i,t){if(Nd(t))return P0.decorate_20223_(i,t);if(Us(t))return Ld(i,t,P0);var n=i,a=n.name||"<unnamed flow>",l=function(){var c=this,h=arguments,b=++J6,_=Zn(a+" - runid: "+b+" - init",n).apply(c,h),k,O=void 0,v=new Promise(function(x,g){var p=0;k=g;function P(y){O=void 0;var w;try{w=Zn(a+" - runid: "+b+" - yield "+p++,_.next).call(_,y)}catch(L){return g(L)}m(w)}function d(y){O=void 0;var w;try{w=Zn(a+" - runid: "+b+" - yield "+p++,_.throw).call(_,y)}catch(L){return g(L)}m(w)}function m(y){if(Li(y==null?void 0:y.then)){y.then(m,g);return}return y.done?x(y.value):(O=Promise.resolve(y.value),O.then(P,d))}P(void 0)});return v.cancel=Zn(a+" - runid: "+b+" - cancel",function(){try{O&&fm(O);var x=_.return(void 0),g=Promise.resolve(x.value);g.then(ec,ec),fm(g),k(new kp)}catch(p){k(p)}}),v};return l.isMobXFlow=!0,l},P0);Vs.bound=Co(tw);function fm(e){Li(e.cancel)&&e.cancel()}function nw(e){return e}function uc(e){return(e==null?void 0:e.isMobXFlow)===!0}function qg(e,i,t){var n;return Nr(e)||ri(e)||jg(e)?n=Mo(e):_r(e)&&(n=Mo(e,i)),n.dehancer=typeof i=="function"?i:t,function(){n.dehancer=void 0}}function Tp(e,i,t){return Li(t)?iw(e,i,t):rw(e,i)}function rw(e,i){return Mo(e).intercept_(i)}function iw(e,i,t){return Mo(e,i).intercept_(t)}function W3(e,i){if(i===void 0)return Gs(e);if(_r(e)===!1||!e[ht].values_.has(i))return!1;var t=ua(e,i);return Gs(t)}function ow(e){return W3(e)}function Y3(e,i){return W3(e,i)}function K3(e,i){return e?i!==void 0?_r(e)?e[ht].values_.has(i):!1:_r(e)||!!e[ht]||Ng(e)||fp(e)||Gs(e):!1}function Ap(e){return K3(e)}function X3(e,i){return K3(e,i)}function Od(e){if(_r(e))return e[ht].keys_();if(Nr(e)||lr(e))return Array.from(e.keys());if(ri(e))return e.map(function(i,t){return t});Pt(5)}function Hg(e){if(_r(e))return Od(e).map(function(i){return e[i]});if(Nr(e))return Od(e).map(function(i){return e.get(i)});if(lr(e))return Array.from(e.values());if(ri(e))return e.slice();Pt(6)}function Z3(e){if(_r(e))return Od(e).map(function(i){return[i,e[i]]});if(Nr(e))return Od(e).map(function(i){return[i,e.get(i)]});if(lr(e))return Array.from(e.entries());if(ri(e))return e.map(function(i,t){return[t,i]});Pt(7)}function Gg(e,i,t){if(arguments.length===2&&!lr(e)){vi();var n=i;try{for(var a in n)Gg(e,a,n[a])}finally{mi()}return}_r(e)?e[ht].set_(i,t):Nr(e)?e.set(i,t):lr(e)?e.add(i):ri(e)?(typeof i!="number"&&(i=parseInt(i,10)),i<0&&Pt("Invalid index: '"+i+"'"),vi(),i>=e.length&&(e.length=i+1),e[i]=t,mi()):Pt(8)}function aw(e,i){_r(e)?e[ht].delete_(i):Nr(e)||lr(e)?e.delete(i):ri(e)?(typeof i!="number"&&(i=parseInt(i,10)),e.splice(i,1)):Pt(9)}function Q3(e,i){if(_r(e))return e[ht].has_(i);if(Nr(e))return e.has(i);if(lr(e))return e.has(i);if(ri(e))return i>=0&&i<e.length;Pt(10)}function lw(e,i){if(Q3(e,i)){if(_r(e))return e[ht].get_(i);if(Nr(e))return e.get(i);if(ri(e))return e[i];Pt(11)}}function Vg(e,i,t){if(_r(e))return e[ht].defineProperty_(i,t);Pt(39)}function J3(e){if(_r(e))return e[ht].ownKeys_();Pt(38)}function Rp(e,i,t,n){return Li(t)?uw(e,i,t,n):sw(e,i,t)}function sw(e,i,t){return Mo(e).observe_(i,t)}function uw(e,i,t,n){return Mo(e,i).observe_(t,n)}function Xh(e,i,t){return e.set(i,t),t}function Qu(e,i){if(e==null||typeof e!="object"||e instanceof Date||!Ap(e))return e;if(jg(e)||Gs(e))return Qu(e.get(),i);if(i.has(e))return i.get(e);if(ri(e)){var t=Xh(i,e,new Array(e.length));return e.forEach(function(u,c){t[c]=Qu(u,i)}),t}if(lr(e)){var n=Xh(i,e,new Set);return e.forEach(function(u){n.add(Qu(u,i))}),n}if(Nr(e)){var a=Xh(i,e,new Map);return e.forEach(function(u,c){a.set(c,Qu(u,i))}),a}else{var l=Xh(i,e,{});return J3(e).forEach(function(u){Rd.propertyIsEnumerable.call(e,u)&&(l[u]=Qu(e[u],i))}),l}}function cw(e,i){return Qu(e,new Map)}function fw(){}function oa(e,i){i===void 0&&(i=void 0),vi();try{return e.apply(i)}finally{mi()}}function Pg(e,i,t){return arguments.length===1||i&&typeof i=="object"?dw(e,i):e5(e,i,t||{})}function e5(e,i,t){var n;if(typeof t.timeout=="number"){var a=new Error("WHEN_TIMEOUT");n=setTimeout(function(){if(!u[ht].isDisposed)if(u(),t.onError)t.onError(a);else throw a},t.timeout)}t.name="When";var l=Kl("When-effect",i),u=zg(function(c){var h=Dg(!1,e);h&&(c.dispose(),n&&clearTimeout(n),l())},t);return u}function dw(e,i){var t;if(i!=null&&(t=i.signal)!=null&&t.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var n,a,l=new Promise(function(u,c){var h,b=e5(e,u,Yl({},i,{onError:c}));n=function(){b(),c(new Error("WHEN_CANCELLED"))},a=function(){b(),c(new Error("WHEN_ABORTED"))},i==null||(h=i.signal)==null||h.addEventListener==null||h.addEventListener("abort",a)}).finally(function(){var u;return i==null||(u=i.signal)==null||u.removeEventListener==null?void 0:u.removeEventListener("abort",a)});return l.cancel=n,l}function Ku(e){return e[ht]}var hw={has:function(i,t){return Ku(i).has_(t)},get:function(i,t){return Ku(i).get_(t)},set:function(i,t,n){var a;return Us(t)?(a=Ku(i).set_(t,n,!0))!=null?a:!0:!1},deleteProperty:function(i,t){var n;return Us(t)?(n=Ku(i).delete_(t,!0))!=null?n:!0:!1},defineProperty:function(i,t,n){var a;return(a=Ku(i).defineProperty_(t,n))!=null?a:!0},ownKeys:function(i){return Ku(i).ownKeys_()},preventExtensions:function(i){Pt(13)}};function pw(e,i){var t,n;return a3(),e=Ys(e,i),(n=(t=e[ht]).proxy_)!=null?n:t.proxy_=new Proxy(e,hw)}function Xi(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Dd(e,i){var t=e.interceptors_||(e.interceptors_=[]);return t.push(i),l3(function(){var n=t.indexOf(i);n!==-1&&t.splice(n,1)})}function Zi(e,i){var t=Ws();try{for(var n=[].concat(e.interceptors_||[]),a=0,l=n.length;a<l&&(i=n[a](i),i&&!i.type&&Pt(14),!!i);a++);return i}finally{Ka(t)}}function ko(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function jd(e,i){var t=e.changeListeners_||(e.changeListeners_=[]);return t.push(i),l3(function(){var n=t.indexOf(i);n!==-1&&t.splice(n,1)})}function To(e,i){var t=Ws(),n=e.changeListeners_;if(n){n=n.slice();for(var a=0,l=n.length;a<l;a++)n[a](i);Ka(t)}}function $g(e,i,t){return Jl(function(){var n,a=Ys(e,t)[ht];(n=i)!=null||(i=N_(e)),oc(i).forEach(function(l){return a.make_(l,i[l])})}),e}var C0=Symbol("mobx-keys");function gw(e,i,t){return Za(e)?Ug(e,e,i,t):(Jl(function(){var n=Ys(e,t)[ht];if(!e[C0]){var a=Object.getPrototypeOf(e),l=new Set([].concat(oc(e),oc(a)));l.delete("constructor"),l.delete(ht),Md(a,C0,l)}e[C0].forEach(function(u){return n.make_(u,i&&u in i?i[u]:!0)})}),e)}var dm="splice",sa="update",vw=1e4,mw={get:function(i,t){var n=i[ht];return t===ht?n:t==="length"?n.getArrayLength_():typeof t=="string"&&!isNaN(t)?n.get_(parseInt(t)):Ya(dp,t)?dp[t]:i[t]},set:function(i,t,n){var a=i[ht];return t==="length"&&a.setArrayLength_(n),typeof t=="symbol"||isNaN(t)?i[t]=n:a.set_(parseInt(t),n),!0},preventExtensions:function(){Pt(15)}},Wg=function(){function e(t,n,a,l){t===void 0&&(t="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_=a,this.legacyMode_=l,this.atom_=new Ql(t),this.enhancer_=function(u,c){return n(u,c,"ObservableArray[..]")}}var i=e.prototype;return i.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},i.dehanceValues_=function(n){return this.dehancer!==void 0&&n.length>0?n.map(this.dehancer):n},i.intercept_=function(n){return Dd(this,n)},i.observe_=function(n,a){return a===void 0&&(a=!1),a&&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}),jd(this,n)},i.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},i.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&Pt("Out of range: "+n);var a=this.values_.length;if(n!==a)if(n>a){for(var l=new Array(n-a),u=0;u<n-a;u++)l[u]=void 0;this.spliceWithArray_(a,0,l)}else this.spliceWithArray_(n,a-n)},i.updateArrayLength_=function(n,a){n!==this.lastKnownLength_&&Pt(16),this.lastKnownLength_+=a,this.legacyMode_&&a>0&&o5(n+a+1)},i.spliceWithArray_=function(n,a,l){var u=this;this.atom_;var c=this.values_.length;if(n===void 0?n=0:n>c?n=c:n<0&&(n=Math.max(0,c+n)),arguments.length===1?a=c-n:a==null?a=0:a=Math.max(0,Math.min(a,c-n)),l===void 0&&(l=mg),Xi(this)){var h=Zi(this,{object:this.proxy_,type:dm,index:n,removedCount:a,added:l});if(!h)return mg;a=h.removedCount,l=h.added}if(l=l.length===0?l:l.map(function(k){return u.enhancer_(k,void 0)}),this.legacyMode_){var b=l.length-a;this.updateArrayLength_(c,b)}var _=this.spliceItemsIntoValues_(n,a,l);return(a!==0||l.length!==0)&&this.notifyArraySplice_(n,l,_),this.dehanceValues_(_)},i.spliceItemsIntoValues_=function(n,a,l){if(l.length<vw){var u;return(u=this.values_).splice.apply(u,[n,a].concat(l))}else{var c=this.values_.slice(n,n+a),h=this.values_.slice(n+a);this.values_.length+=l.length-a;for(var b=0;b<l.length;b++)this.values_[n+b]=l[b];for(var _=0;_<h.length;_++)this.values_[n+l.length+_]=h[_];return c}},i.notifyArrayChildUpdate_=function(n,a,l){var u=!this.owned_&&_d(),c=ko(this),h=c||u?{observableKind:"array",object:this.proxy_,type:sa,debugObjectName:this.atom_.name_,index:n,newValue:a,oldValue:l}:null;this.atom_.reportChanged(),c&&To(this,h)},i.notifyArraySplice_=function(n,a,l){var u=!this.owned_&&_d(),c=ko(this),h=c||u?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:dm,index:n,removed:l,added:a,removedCount:l.length,addedCount:a.length}:null;this.atom_.reportChanged(),c&&To(this,h)},i.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])},i.set_=function(n,a){var l=this.values_;if(this.legacyMode_&&n>l.length&&Pt(17,n,l.length),n<l.length){this.atom_;var u=l[n];if(Xi(this)){var c=Zi(this,{type:sa,object:this.proxy_,index:n,newValue:a});if(!c)return;a=c.newValue}a=this.enhancer_(a,u);var h=a!==u;h&&(l[n]=a,this.notifyArrayChildUpdate_(n,a,u))}else{for(var b=new Array(n+1-l.length),_=0;_<b.length-1;_++)b[_]=void 0;b[b.length-1]=a,this.spliceWithArray_(l.length,0,b)}},e}();function yw(e,i,t,n){return t===void 0&&(t="ObservableArray"),n===void 0&&(n=!1),a3(),Jl(function(){var a=new Wg(t,i,n,!1);u3(a.values_,ht,a);var l=new Proxy(a.values_,mw);return a.proxy_=l,e&&e.length&&a.spliceWithArray_(0,0,e),l})}var dp={clear:function(){return this.splice(0)},replace:function(i){var t=this[ht];return t.spliceWithArray_(0,t.values_.length,i)},toJSON:function(){return this.slice()},splice:function(i,t){for(var n=arguments.length,a=new Array(n>2?n-2:0),l=2;l<n;l++)a[l-2]=arguments[l];var u=this[ht];switch(arguments.length){case 0:return[];case 1:return u.spliceWithArray_(i);case 2:return u.spliceWithArray_(i,t)}return u.spliceWithArray_(i,t,a)},spliceWithArray:function(i,t,n){return this[ht].spliceWithArray_(i,t,n)},push:function(){for(var i=this[ht],t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return i.spliceWithArray_(i.values_.length,0,n),i.values_.length},pop:function(){return this.splice(Math.max(this[ht].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var i=this[ht],t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return i.spliceWithArray_(0,0,n),i.values_.length},reverse:function(){return We.trackingDerivation&&Pt(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){We.trackingDerivation&&Pt(37,"sort");var i=this.slice();return i.sort.apply(i,arguments),this.replace(i),this},remove:function(i){var t=this[ht],n=t.dehanceValues_(t.values_).indexOf(i);return n>-1?(this.splice(n,1),!0):!1}};bn("at",Ni);bn("concat",Ni);bn("flat",Ni);bn("includes",Ni);bn("indexOf",Ni);bn("join",Ni);bn("lastIndexOf",Ni);bn("slice",Ni);bn("toString",Ni);bn("toLocaleString",Ni);bn("toSorted",Ni);bn("toSpliced",Ni);bn("with",Ni);bn("every",Lo);bn("filter",Lo);bn("find",Lo);bn("findIndex",Lo);bn("findLast",Lo);bn("findLastIndex",Lo);bn("flatMap",Lo);bn("forEach",Lo);bn("map",Lo);bn("some",Lo);bn("toReversed",Lo);bn("reduce",t5);bn("reduceRight",t5);function bn(e,i){typeof Array.prototype[e]=="function"&&(dp[e]=i(e))}function Ni(e){return function(){var i=this[ht];i.atom_.reportObserved();var t=i.dehanceValues_(i.values_);return t[e].apply(t,arguments)}}function Lo(e){return function(i,t){var n=this,a=this[ht];a.atom_.reportObserved();var l=a.dehanceValues_(a.values_);return l[e](function(u,c){return i.call(t,u,c,n)})}}function t5(e){return function(){var i=this,t=this[ht];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_),a=arguments[0];return arguments[0]=function(l,u,c){return a(l,u,c,i)},n[e].apply(n,arguments)}}var bw=Zl("ObservableArrayAdministration",Wg);function ri(e){return Sp(e)&&bw(e[ht])}var _w={},Vl="add",hp="delete",Mp=function(){function e(t,n,a){var l=this;n===void 0&&(n=Hs),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[ht]=_w,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_=a,Li(Map)||Pt(18),Jl(function(){l.keysAtom_=Ed("ObservableMap.keys()"),l.data_=new Map,l.hasMap_=new Map,t&&l.merge(t)})}var i=e.prototype;return i.has_=function(n){return this.data_.has(n)},i.has=function(n){var a=this;if(!We.trackingDerivation)return this.has_(n);var l=this.hasMap_.get(n);if(!l){var u=l=new $l(this.has_(n),Ep,"ObservableMap.key?",!1);this.hasMap_.set(n,u),Bg(u,function(){return a.hasMap_.delete(n)})}return l.get()},i.set=function(n,a){var l=this.has_(n);if(Xi(this)){var u=Zi(this,{type:l?sa:Vl,object:this,newValue:a,name:n});if(!u)return this;a=u.newValue}return l?this.updateValue_(n,a):this.addValue_(n,a),this},i.delete=function(n){var a=this;if(this.keysAtom_,Xi(this)){var l=Zi(this,{type:hp,object:this,name:n});if(!l)return!1}if(this.has_(n)){var u=_d(),c=ko(this),h=c||u?{observableKind:"map",debugObjectName:this.name_,type:hp,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return oa(function(){var b;a.keysAtom_.reportChanged(),(b=a.hasMap_.get(n))==null||b.setNewValue_(!1);var _=a.data_.get(n);_.setNewValue_(void 0),a.data_.delete(n)}),c&&To(this,h),!0}return!1},i.updateValue_=function(n,a){var l=this.data_.get(n);if(a=l.prepareNewValue_(a),a!==We.UNCHANGED){var u=_d(),c=ko(this),h=c||u?{observableKind:"map",debugObjectName:this.name_,type:sa,object:this,oldValue:l.value_,name:n,newValue:a}:null;l.setNewValue_(a),c&&To(this,h)}},i.addValue_=function(n,a){var l=this;this.keysAtom_,oa(function(){var b,_=new $l(a,l.enhancer_,"ObservableMap.key",!1);l.data_.set(n,_),a=_.value_,(b=l.hasMap_.get(n))==null||b.setNewValue_(!0),l.keysAtom_.reportChanged()});var u=_d(),c=ko(this),h=c||u?{observableKind:"map",debugObjectName:this.name_,type:Vl,object:this,name:n,newValue:a}:null;c&&To(this,h)},i.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},i.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},i.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},i.values=function(){var n=this,a=this.keys();return hm({next:function(){var u=a.next(),c=u.done,h=u.value;return{done:c,value:c?void 0:n.get(h)}}})},i.entries=function(){var n=this,a=this.keys();return hm({next:function(){var u=a.next(),c=u.done,h=u.value;return{done:c,value:c?void 0:[h,n.get(h)]}}})},i[Symbol.iterator]=function(){return this.entries()},i.forEach=function(n,a){for(var l=tc(this),u;!(u=l()).done;){var c=u.value,h=c[0],b=c[1];n.call(a,b,h,this)}},i.merge=function(n){var a=this;return Nr(n)&&(n=new Map(n)),oa(function(){Za(n)?k_(n).forEach(function(l){return a.set(l,n[l])}):Array.isArray(n)?n.forEach(function(l){var u=l[0],c=l[1];return a.set(u,c)}):vc(n)?(C_(n)||Pt(19,n),n.forEach(function(l,u){return a.set(u,l)})):n!=null&&Pt(20,n)}),this},i.clear=function(){var n=this;oa(function(){Fg(function(){for(var a=tc(n.keys()),l;!(l=a()).done;){var u=l.value;n.delete(u)}})})},i.replace=function(n){var a=this;return oa(function(){for(var l=ww(n),u=new Map,c=!1,h=tc(a.data_.keys()),b;!(b=h()).done;){var _=b.value;if(!l.has(_)){var k=a.delete(_);if(k)c=!0;else{var O=a.data_.get(_);u.set(_,O)}}}for(var v=tc(l.entries()),x;!(x=v()).done;){var g=x.value,p=g[0],P=g[1],d=a.data_.has(p);if(a.set(p,P),a.data_.has(p)){var m=a.data_.get(p);u.set(p,m),d||(c=!0)}}if(!c)if(a.data_.size!==u.size)a.keysAtom_.reportChanged();else for(var y=a.data_.keys(),w=u.keys(),L=y.next(),R=w.next();!L.done;){if(L.value!==R.value){a.keysAtom_.reportChanged();break}L=y.next(),R=w.next()}a.data_=u}),this},i.toString=function(){return"[object ObservableMap]"},i.toJSON=function(){return Array.from(this)},i.observe_=function(n,a){return jd(this,n)},i.intercept_=function(n){return Dd(this,n)},mc(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Nr=Zl("ObservableMap",Mp);function hm(e){return e[Symbol.toStringTag]="MapIterator",Zg(e)}function ww(e){if(vc(e)||Nr(e))return e;if(Array.isArray(e))return new Map(e);if(Za(e)){var i=new Map;for(var t in e)i.set(t,e[t]);return i}else return Pt(21,e)}var Sw={},Yg=function(){function e(t,n,a){var l=this;n===void 0&&(n=Hs),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[ht]=Sw,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_=a,Li(Set)||Pt(22),this.enhancer_=function(u,c){return n(u,c,a)},Jl(function(){l.atom_=Ed(l.name_),t&&l.replace(t)})}var i=e.prototype;return i.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},i.clear=function(){var n=this;oa(function(){Fg(function(){for(var a=tc(n.data_.values()),l;!(l=a()).done;){var u=l.value;n.delete(u)}})})},i.forEach=function(n,a){for(var l=tc(this),u;!(u=l()).done;){var c=u.value;n.call(a,c,c,this)}},i.add=function(n){var a=this;if(this.atom_,Xi(this)){var l=Zi(this,{type:Vl,object:this,newValue:n});if(!l)return this}if(!this.has(n)){oa(function(){a.data_.add(a.enhancer_(n,void 0)),a.atom_.reportChanged()});var u=!1,c=ko(this),h=c||u?{observableKind:"set",debugObjectName:this.name_,type:Vl,object:this,newValue:n}:null;c&&To(this,h)}return this},i.delete=function(n){var a=this;if(Xi(this)){var l=Zi(this,{type:hp,object:this,oldValue:n});if(!l)return!1}if(this.has(n)){var u=!1,c=ko(this),h=c||u?{observableKind:"set",debugObjectName:this.name_,type:hp,object:this,oldValue:n}:null;return oa(function(){a.atom_.reportChanged(),a.data_.delete(n)}),c&&To(this,h),!0}return!1},i.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},i.entries=function(){var n=0,a=Array.from(this.keys()),l=Array.from(this.values());return pm({next:function(){var c=n;return n+=1,c<l.length?{value:[a[c],l[c]],done:!1}:{value:void 0,done:!0}}})},i.keys=function(){return this.values()},i.values=function(){this.atom_.reportObserved();var n=this,a=0,l=Array.from(this.data_.values());return pm({next:function(){return a<l.length?{value:n.dehanceValue_(l[a++]),done:!1}:{value:void 0,done:!0}}})},i.intersection=function(n){if(Wa(n)&&!lr(n))return n.intersection(this);var a=new Set(this);return a.intersection(n)},i.union=function(n){if(Wa(n)&&!lr(n))return n.union(this);var a=new Set(this);return a.union(n)},i.difference=function(n){return new Set(this).difference(n)},i.symmetricDifference=function(n){if(Wa(n)&&!lr(n))return n.symmetricDifference(this);var a=new Set(this);return a.symmetricDifference(n)},i.isSubsetOf=function(n){return new Set(this).isSubsetOf(n)},i.isSupersetOf=function(n){return new Set(this).isSupersetOf(n)},i.isDisjointFrom=function(n){if(Wa(n)&&!lr(n))return n.isDisjointFrom(this);var a=new Set(this);return a.isDisjointFrom(n)},i.replace=function(n){var a=this;return lr(n)&&(n=new Set(n)),oa(function(){Array.isArray(n)?(a.clear(),n.forEach(function(l){return a.add(l)})):Wa(n)?(a.clear(),n.forEach(function(l){return a.add(l)})):n!=null&&Pt("Cannot initialize set from "+n)}),this},i.observe_=function(n,a){return jd(this,n)},i.intercept_=function(n){return Dd(this,n)},i.toJSON=function(){return Array.from(this)},i.toString=function(){return"[object ObservableSet]"},i[Symbol.iterator]=function(){return this.values()},mc(e,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),lr=Zl("ObservableSet",Yg);function pm(e){return e[Symbol.toStringTag]="SetIterator",Zg(e)}var gm=Object.create(null),vm="remove",n5=function(){function e(t,n,a,l){n===void 0&&(n=new Map),l===void 0&&(l=u6),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_=t,this.values_=n,this.name_=a,this.defaultAnnotation_=l,this.keysAtom_=new Ql("ObservableObject.keys"),this.isPlainObject_=Za(this.target_)}var i=e.prototype;return i.getObservablePropValue_=function(n){return this.values_.get(n).get()},i.setObservablePropValue_=function(n,a){var l=this.values_.get(n);if(l instanceof Ao)return l.set(a),!0;if(Xi(this)){var u=Zi(this,{type:sa,object:this.proxy_||this.target_,name:n,newValue:a});if(!u)return null;a=u.newValue}if(a=l.prepareNewValue_(a),a!==We.UNCHANGED){var c=ko(this),h=!1,b=c||h?{type:sa,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:l.value_,name:n,newValue:a}:null;l.setNewValue_(a),c&&To(this,b)}return!0},i.get_=function(n){return We.trackingDerivation&&!Ya(this.target_,n)&&this.has_(n),this.target_[n]},i.set_=function(n,a,l){return l===void 0&&(l=!1),Ya(this.target_,n)?this.values_.has(n)?this.setObservablePropValue_(n,a):l?Reflect.set(this.target_,n,a):(this.target_[n]=a,!0):this.extend_(n,{value:a,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,l)},i.has_=function(n){if(!We.trackingDerivation)return n in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var a=this.pendingKeys_.get(n);return a||(a=new $l(n in this.target_,Ep,"ObservableObject.key?",!1),this.pendingKeys_.set(n,a)),a.get()},i.make_=function(n,a){if(a===!0&&(a=this.defaultAnnotation_),a!==!1){if(!(n in this.target_)){var l;if((l=this.target_[aa])!=null&&l[n])return;Pt(1,a.annotationType_,this.name_+"."+n.toString())}for(var u=this.target_;u&&u!==Rd;){var c=lp(u,n);if(c){var h=a.make_(this,n,c,u);if(h===0)return;if(h===1)break}u=Object.getPrototypeOf(u)}ym(this,a,n)}},i.extend_=function(n,a,l,u){if(u===void 0&&(u=!1),l===!0&&(l=this.defaultAnnotation_),l===!1)return this.defineProperty_(n,a,u);var c=l.extend_(this,n,a,u);return c&&ym(this,l,n),c},i.defineProperty_=function(n,a,l){l===void 0&&(l=!1),this.keysAtom_;try{vi();var u=this.delete_(n);if(!u)return u;if(Xi(this)){var c=Zi(this,{object:this.proxy_||this.target_,name:n,type:Vl,newValue:a.value});if(!c)return null;var h=c.newValue;a.value!==h&&(a=Yl({},a,{value:h}))}if(l){if(!Reflect.defineProperty(this.target_,n,a))return!1}else la(this.target_,n,a);this.notifyPropertyAddition_(n,a.value)}finally{mi()}return!0},i.defineObservableProperty_=function(n,a,l,u){u===void 0&&(u=!1),this.keysAtom_;try{vi();var c=this.delete_(n);if(!c)return c;if(Xi(this)){var h=Zi(this,{object:this.proxy_||this.target_,name:n,type:Vl,newValue:a});if(!h)return null;a=h.newValue}var b=mm(n),_={configurable:We.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:b.get,set:b.set};if(u){if(!Reflect.defineProperty(this.target_,n,_))return!1}else la(this.target_,n,_);var k=new $l(a,l,"ObservableObject.key",!1);this.values_.set(n,k),this.notifyPropertyAddition_(n,k.value_)}finally{mi()}return!0},i.defineComputedProperty_=function(n,a,l){l===void 0&&(l=!1),this.keysAtom_;try{vi();var u=this.delete_(n);if(!u)return u;if(Xi(this)){var c=Zi(this,{object:this.proxy_||this.target_,name:n,type:Vl,newValue:void 0});if(!c)return null}a.name||(a.name="ObservableObject.key"),a.context=this.proxy_||this.target_;var h=mm(n),b={configurable:We.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:h.get,set:h.set};if(l){if(!Reflect.defineProperty(this.target_,n,b))return!1}else la(this.target_,n,b);this.values_.set(n,new Ao(a)),this.notifyPropertyAddition_(n,void 0)}finally{mi()}return!0},i.delete_=function(n,a){if(a===void 0&&(a=!1),this.keysAtom_,!Ya(this.target_,n))return!0;if(Xi(this)){var l=Zi(this,{object:this.proxy_||this.target_,name:n,type:vm});if(!l)return null}try{var u;vi();var c=ko(this),h=!1,b=this.values_.get(n),_=void 0;if(!b&&(c||h)){var k;_=(k=lp(this.target_,n))==null?void 0:k.value}if(a){if(!Reflect.deleteProperty(this.target_,n))return!1}else delete this.target_[n];if(b&&(this.values_.delete(n),b instanceof $l&&(_=b.value_),M3(b)),this.keysAtom_.reportChanged(),(u=this.pendingKeys_)==null||(u=u.get(n))==null||u.set(n in this.target_),c||h){var O={type:vm,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:_,name:n};c&&To(this,O)}}finally{mi()}return!0},i.observe_=function(n,a){return jd(this,n)},i.intercept_=function(n){return Dd(this,n)},i.notifyPropertyAddition_=function(n,a){var l,u=ko(this),c=!1;if(u||c){var h=u||c?{type:Vl,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:a}:null;u&&To(this,h)}(l=this.pendingKeys_)==null||(l=l.get(n))==null||l.set(!0),this.keysAtom_.reportChanged()},i.ownKeys_=function(){return this.keysAtom_.reportObserved(),oc(this.target_)},i.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Ys(e,i){var t;if(Ya(e,ht))return e;var n=(t=i==null?void 0:i.name)!=null?t:"ObservableObject",a=new n5(e,new Map,String(n),_6(i));return Md(e,ht,a),e}var Ew=Zl("ObservableObjectAdministration",n5);function mm(e){return gm[e]||(gm[e]={get:function(){return this[ht].getObservablePropValue_(e)},set:function(t){return this[ht].setObservablePropValue_(e,t)}})}function _r(e){return Sp(e)?Ew(e[ht]):!1}function ym(e,i,t){var n;(n=e.target_[aa])==null||delete n[t]}var Ow=i5(0),xw=function(){var e=!1,i={};return Object.defineProperty(i,"0",{set:function(){e=!0}}),Object.create(i)[0]=1,e===!1}(),k0=0,r5=function(){};function Pw(e,i){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,i):e.prototype.__proto__!==void 0?e.prototype.__proto__=i:e.prototype=i}Pw(r5,Array.prototype);var Kg=function(e){function i(n,a,l,u){var c;return l===void 0&&(l="ObservableArray"),u===void 0&&(u=!1),c=e.call(this)||this,Jl(function(){var h=new Wg(l,a,u,!0);h.proxy_=c,u3(c,ht,h),n&&n.length&&c.spliceWithArray(0,0,n),xw&&Object.defineProperty(c,"0",Ow)}),c}d3(i,e);var t=i.prototype;return t.concat=function(){this[ht].atom_.reportObserved();for(var a=arguments.length,l=new Array(a),u=0;u<a;u++)l[u]=arguments[u];return Array.prototype.concat.apply(this.slice(),l.map(function(c){return ri(c)?c.slice():c}))},t[Symbol.iterator]=function(){var n=this,a=0;return Zg({next:function(){return a<n.length?{value:n[a++],done:!1}:{done:!0,value:void 0}}})},mc(i,[{key:"length",get:function(){return this[ht].getArrayLength_()},set:function(a){this[ht].setArrayLength_(a)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(r5);Object.entries(dp).forEach(function(e){var i=e[0],t=e[1];i!=="concat"&&Md(Kg.prototype,i,t)});function i5(e){return{enumerable:!1,configurable:!0,get:function(){return this[ht].get_(e)},set:function(t){this[ht].set_(e,t)}}}function Cw(e){la(Kg.prototype,""+e,i5(e))}function o5(e){if(e>k0){for(var i=k0;i<e+100;i++)Cw(i);k0=e}}o5(1e3);function kw(e,i,t){return new Kg(e,i,t)}function ua(e,i){if(typeof e=="object"&&e!==null){if(ri(e))return i!==void 0&&Pt(23),e[ht].atom_;if(lr(e))return e.atom_;if(Nr(e)){if(i===void 0)return e.keysAtom_;var t=e.data_.get(i)||e.hasMap_.get(i);return t||Pt(25,i,pp(e)),t}if(_r(e)){if(!i)return Pt(26);var n=e[ht].values_.get(i);return n||Pt(27,i,pp(e)),n}if(Ng(e)||Gs(e)||fp(e))return e}else if(Li(e)&&fp(e[ht]))return e[ht];Pt(28)}function Mo(e,i){if(e||Pt(29),i!==void 0)return Mo(ua(e,i));if(Ng(e)||Gs(e)||fp(e)||Nr(e)||lr(e))return e;if(e[ht])return e[ht];Pt(24,e)}function pp(e,i){var t;if(i!==void 0)t=ua(e,i);else{if(sc(e))return e.name;_r(e)||Nr(e)||lr(e)?t=Mo(e):t=ua(e)}return t.name_}function Jl(e){var i=Ws(),t=xp(!0);vi();try{return e()}finally{mi(),Pp(t),Ka(i)}}var bm=Rd.toString;function Xg(e,i,t){return t===void 0&&(t=-1),Cg(e,i,t)}function Cg(e,i,t,n,a){if(e===i)return e!==0||1/e===1/i;if(e==null||i==null)return!1;if(e!==e)return i!==i;var l=typeof e;if(l!=="function"&&l!=="object"&&typeof i!="object")return!1;var u=bm.call(e);if(u!==bm.call(i))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+e==""+i;case"[object Number]":return+e!=+e?+i!=+i:+e==0?1/+e===1/i:+e==+i;case"[object Date]":case"[object Boolean]":return+e==+i;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(i);case"[object Map]":case"[object Set]":t>=0&&t++;break}e=_m(e),i=_m(i);var c=u==="[object Array]";if(!c){if(typeof e!="object"||typeof i!="object")return!1;var h=e.constructor,b=i.constructor;if(h!==b&&!(Li(h)&&h instanceof h&&Li(b)&&b instanceof b)&&"constructor"in e&&"constructor"in i)return!1}if(t===0)return!1;t<0&&(t=-1),n=n||[],a=a||[];for(var _=n.length;_--;)if(n[_]===e)return a[_]===i;if(n.push(e),a.push(i),c){if(_=e.length,_!==i.length)return!1;for(;_--;)if(!Cg(e[_],i[_],t-1,n,a))return!1}else{var k=Object.keys(e),O;if(_=k.length,Object.keys(i).length!==_)return!1;for(;_--;)if(O=k[_],!(Ya(i,O)&&Cg(e[O],i[O],t-1,n,a)))return!1}return n.pop(),a.pop(),!0}function _m(e){return ri(e)?e.slice():vc(e)||Nr(e)||Wa(e)||lr(e)?Array.from(e.entries()):e}var wm,Tw=((wm=wp().Iterator)==null?void 0:wm.prototype)||{};function Zg(e){return e[Symbol.iterator]=Aw,Object.assign(Object.create(Tw),e)}function Aw(){return this}["Symbol","Map","Set"].forEach(function(e){var i=wp();typeof i[e]>"u"&&Pt("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:N3,extras:{getDebugName:pp},$mobx:ht});const Rw=Object.freeze(Object.defineProperty({__proto__:null,$mobx:ht,FlowCancellationError:kp,ObservableMap:Mp,ObservableSet:Yg,Reaction:Ro,_allowStateChanges:Dg,_allowStateChangesInsideComputed:lc,_allowStateReadsEnd:rc,_allowStateReadsStart:Cp,_autoAction:ac,_endAction:O3,_getAdministration:Mo,_getGlobalState:k3,_interceptReads:qg,_isComputingDerivation:C6,_resetGlobalState:R6,_startAction:E3,action:Zn,autorun:zg,comparer:qs,computed:$s,configure:H3,createAtom:Ed,defineProperty:Vg,entries:Z3,extendObservable:Ug,flow:Vs,flowResult:nw,get:lw,getAtom:ua,getDebugName:pp,getDependencyTree:G3,getObserverTree:Z6,has:Q3,intercept:Tp,isAction:sc,isBoxedObservable:jg,isComputed:ow,isComputedProp:Y3,isFlow:uc,isFlowCancellationError:ew,isObservable:Ap,isObservableArray:ri,isObservableMap:Nr,isObservableObject:_r,isObservableProp:X3,isObservableSet:lr,keys:Od,makeAutoObservable:gw,makeObservable:$g,observable:ln,observe:Rp,onBecomeObserved:U3,onBecomeUnobserved:Bg,onReactionError:j6,override:U_,ownKeys:J3,reaction:B3,remove:aw,runInAction:lc,set:Gg,spy:N3,toJS:cw,trace:fw,transaction:oa,untracked:Fg,values:Hg,when:Pg},Symbol.toStringTag,{value:"Module"}));if(!On.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!$g)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var Mw=r3();function Lw(e){e()}function a5(e){e||(e=Lw),H3({reactionScheduler:e})}var Nw=function(){return!0};function Iw(e){return G3(e)}var l5=!1;function s5(e){l5=e}function Qg(){return l5}var Dw=1e4,jw=1e4,Fw=function(){function e(i){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:i}),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=Dw),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var a=Date.now();t.registrations.forEach(function(l,u){a-l.registeredAt>=n&&(t.finalize(l.value),t.registrations.delete(u))}),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this.registrations.delete(i)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,jw))}}),e}(),zw=typeof FinalizationRegistry<"u"?FinalizationRegistry:Fw,gp=new zw(function(e){var i;(i=e.reaction)===null||i===void 0||i.dispose(),e.reaction=null}),T0={exports:{}},A0={};/**
|
|
35
|
-
* @license React
|
|
36
|
-
* use-sync-external-store-shim.production.min.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var Sm;function Bw(){if(Sm)return A0;Sm=1;var e=Tn();function i(k,O){return k===O&&(k!==0||1/k===1/O)||k!==k&&O!==O}var t=typeof Object.is=="function"?Object.is:i,n=e.useState,a=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function c(k,O){var v=O(),x=n({inst:{value:v,getSnapshot:O}}),g=x[0].inst,p=x[1];return l(function(){g.value=v,g.getSnapshot=O,h(g)&&p({inst:g})},[k,v,O]),a(function(){return h(g)&&p({inst:g}),k(function(){h(g)&&p({inst:g})})},[k]),u(v),v}function h(k){var O=k.getSnapshot;k=k.value;try{var v=O();return!t(k,v)}catch{return!0}}function b(k,O){return O()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?b:c;return A0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,A0}var Em;function Uw(){return Em||(Em=1,T0.exports=Bw()),T0.exports}var qw=Uw();function Om(e){e.reaction=new Ro("observer".concat(e.name),function(){var i;e.stateVersion=Symbol(),(i=e.onStoreChange)===null||i===void 0||i.call(e)})}function Jg(e,i){if(i===void 0&&(i="observed"),Qg())return e();var t=jt.useRef(null);if(!t.current){var n={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:i,subscribe:function(c){return gp.unregister(n),n.onStoreChange=c,n.reaction||(Om(n),n.stateVersion=Symbol()),function(){var h;n.onStoreChange=null,(h=n.reaction)===null||h===void 0||h.dispose(),n.reaction=null}},getSnapshot:function(){return n.stateVersion}};t.current=n}var a=t.current;a.reaction||(Om(a),gp.register(t,a,a)),jt.useDebugValue(a.reaction,Iw),qw.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot);var l,u;if(a.reaction.track(function(){try{l=e()}catch(c){u=c}}),u)throw u;return l}var R0,M0,u5=typeof Symbol=="function"&&Symbol.for,Hw=(M0=(R0=Object.getOwnPropertyDescriptor(function(){},"name"))===null||R0===void 0?void 0:R0.configurable)!==null&&M0!==void 0?M0:!1,xm=u5?Symbol.for("react.forward_ref"):typeof On.forwardRef=="function"&&On.forwardRef(function(e){return null}).$$typeof,Pm=u5?Symbol.for("react.memo"):typeof On.memo=="function"&&On.memo(function(e){return null}).$$typeof;function Gw(e,i){var t;if(Pm&&e.$$typeof===Pm)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(Qg())return e;var n=(t=i==null?void 0:i.forwardRef)!==null&&t!==void 0?t:!1,a=e,l=e.displayName||e.name;if(xm&&e.$$typeof===xm&&(n=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var u=function(c,h){return Jg(function(){return a(c,h)},l)};return u.displayName=e.displayName,Hw&&Object.defineProperty(u,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(u.contextTypes=e.contextTypes),n&&(u=On.forwardRef(u)),u=On.memo(u),$w(e,u),u}var Vw={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function $w(e,i){Object.keys(e).forEach(function(t){Vw[t]||Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))})}function c5(e){var i=e.children,t=e.render,n=i||t;return typeof n!="function"?null:Jg(n)}c5.displayName="Observer";function Ww(e,i){return On.useState(function(){return ln(e(),i,{autoBind:!0})})[0]}function f5(e){var i=On.useState(function(){return ln(e,{},{deep:!1})})[0];return lc(function(){Object.assign(i,e)}),i}function Yw(e,i){var t=i&&f5(i);return On.useState(function(){return ln(e(t),void 0,{autoBind:!0})})[0]}var L0;a5(Mw.unstable_batchedUpdates);var Kw=(L0=gp.finalizeAllImmediately)!==null&&L0!==void 0?L0:function(){};function Xw(e,i){return i===void 0&&(i="observed"),Jg(e,i)}function Zw(e){s5(e)}const Qw=Object.freeze(Object.defineProperty({__proto__:null,Observer:c5,_observerFinalizationRegistry:gp,clearTimers:Kw,enableStaticRendering:s5,isObserverBatched:Nw,isUsingStaticRendering:Qg,observer:Gw,observerBatching:a5,useAsObservableSource:f5,useLocalObservable:Ww,useLocalStore:Yw,useObserver:Xw,useStaticRendering:Zw},Symbol.toStringTag,{value:"Module"})),Qi=Xl(Qw);var Is={};const da=Xl(Rw);var rp={exports:{}},vf={},N0={},I0={},Cm;function Rt(){return Cm||(Cm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const i=Math.PI/180;function t(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof ic<"u"?ic:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.3.16",isBrowser:t(),isUnminified:/param/.test((function(a){}).toString()),dblClickWindow:400,getAngle(a){return e.Konva.angleDeg?a*i:a},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isTransforming(){var a;return(a=e.Konva.Transformer)===null||a===void 0?void 0:a.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(a){e.glob.Konva=a}};const n=a=>{e.Konva[a.prototype.getClassName()]=a};e._registerNode=n,e.Konva._injectGlobal(e.Konva)}(I0)),I0}var D0={},km;function Nn(){return km||(km=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const i=Rt();class t{constructor(y=[1,0,0,1,0,0]){this.dirty=!1,this.m=y&&y.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new t(this.m)}copyInto(y){y.m[0]=this.m[0],y.m[1]=this.m[1],y.m[2]=this.m[2],y.m[3]=this.m[3],y.m[4]=this.m[4],y.m[5]=this.m[5]}point(y){const w=this.m;return{x:w[0]*y.x+w[2]*y.y+w[4],y:w[1]*y.x+w[3]*y.y+w[5]}}translate(y,w){return this.m[4]+=this.m[0]*y+this.m[2]*w,this.m[5]+=this.m[1]*y+this.m[3]*w,this}scale(y,w){return this.m[0]*=y,this.m[1]*=y,this.m[2]*=w,this.m[3]*=w,this}rotate(y){const w=Math.cos(y),L=Math.sin(y),R=this.m[0]*w+this.m[2]*L,D=this.m[1]*w+this.m[3]*L,E=this.m[0]*-L+this.m[2]*w,S=this.m[1]*-L+this.m[3]*w;return this.m[0]=R,this.m[1]=D,this.m[2]=E,this.m[3]=S,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(y,w){const L=this.m[0]+this.m[2]*w,R=this.m[1]+this.m[3]*w,D=this.m[2]+this.m[0]*y,E=this.m[3]+this.m[1]*y;return this.m[0]=L,this.m[1]=R,this.m[2]=D,this.m[3]=E,this}multiply(y){const w=this.m[0]*y.m[0]+this.m[2]*y.m[1],L=this.m[1]*y.m[0]+this.m[3]*y.m[1],R=this.m[0]*y.m[2]+this.m[2]*y.m[3],D=this.m[1]*y.m[2]+this.m[3]*y.m[3],E=this.m[0]*y.m[4]+this.m[2]*y.m[5]+this.m[4],S=this.m[1]*y.m[4]+this.m[3]*y.m[5]+this.m[5];return this.m[0]=w,this.m[1]=L,this.m[2]=R,this.m[3]=D,this.m[4]=E,this.m[5]=S,this}invert(){const y=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),w=this.m[3]*y,L=-this.m[1]*y,R=-this.m[2]*y,D=this.m[0]*y,E=y*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),S=y*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=w,this.m[1]=L,this.m[2]=R,this.m[3]=D,this.m[4]=E,this.m[5]=S,this}getMatrix(){return this.m}decompose(){const y=this.m[0],w=this.m[1],L=this.m[2],R=this.m[3],D=this.m[4],E=this.m[5],S=y*R-w*L,A={x:D,y:E,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(y!=0||w!=0){const M=Math.sqrt(y*y+w*w);A.rotation=w>0?Math.acos(y/M):-Math.acos(y/M),A.scaleX=M,A.scaleY=S/M,A.skewX=(y*L+w*R)/S,A.skewY=0}else if(L!=0||R!=0){const M=Math.sqrt(L*L+R*R);A.rotation=Math.PI/2-(R>0?Math.acos(-L/M):-Math.acos(L/M)),A.scaleX=S/M,A.scaleY=M,A.skewX=0,A.skewY=(y*L+w*R)/S}return A.rotation=e.Util._getRotation(A.rotation),A}}e.Transform=t;let n="[object Array]",a="[object Number]",l="[object String]",u="[object Boolean]",c=Math.PI/180,h=180/Math.PI,b="#",_="",k="0",O="Konva warning: ",v="Konva error: ",x="rgb(",g={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},p=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,P=[];const d=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(m){setTimeout(m,60)};e.Util={_isElement(m){return!!(m&&m.nodeType==1)},_isFunction(m){return!!(m&&m.constructor&&m.call&&m.apply)},_isPlainObject(m){return!!m&&m.constructor===Object},_isArray(m){return Object.prototype.toString.call(m)===n},_isNumber(m){return Object.prototype.toString.call(m)===a&&!isNaN(m)&&isFinite(m)},_isString(m){return Object.prototype.toString.call(m)===l},_isBoolean(m){return Object.prototype.toString.call(m)===u},isObject(m){return m instanceof Object},isValidSelector(m){if(typeof m!="string")return!1;const y=m[0];return y==="#"||y==="."||y===y.toUpperCase()},_sign(m){return m===0||m>0?1:-1},requestAnimFrame(m){P.push(m),P.length===1&&d(function(){const y=P;P=[],y.forEach(function(w){w()})})},createCanvasElement(){const m=document.createElement("canvas");try{m.style=m.style||{}}catch{}return m},createImageElement(){return document.createElement("img")},_isInDocument(m){for(;m=m.parentNode;)if(m==document)return!0;return!1},_urlToImage(m,y){const w=e.Util.createImageElement();w.onload=function(){y(w)},w.src=m},_rgbToHex(m,y,w){return((1<<24)+(m<<16)+(y<<8)+w).toString(16).slice(1)},_hexToRgb(m){m=m.replace(b,_);const y=parseInt(m,16);return{r:y>>16&255,g:y>>8&255,b:y&255}},getRandomColor(){let m=(Math.random()*16777215<<0).toString(16);for(;m.length<6;)m=k+m;return b+m},getRGB(m){let y;return m in g?(y=g[m],{r:y[0],g:y[1],b:y[2]}):m[0]===b?this._hexToRgb(m.substring(1)):m.substr(0,4)===x?(y=p.exec(m.replace(/ /g,"")),{r:parseInt(y[1],10),g:parseInt(y[2],10),b:parseInt(y[3],10)}):{r:0,g:0,b:0}},colorToRGBA(m){return m=m||"black",e.Util._namedColorToRBA(m)||e.Util._hex3ColorToRGBA(m)||e.Util._hex4ColorToRGBA(m)||e.Util._hex6ColorToRGBA(m)||e.Util._hex8ColorToRGBA(m)||e.Util._rgbColorToRGBA(m)||e.Util._rgbaColorToRGBA(m)||e.Util._hslColorToRGBA(m)},_namedColorToRBA(m){const y=g[m.toLowerCase()];return y?{r:y[0],g:y[1],b:y[2],a:1}:null},_rgbColorToRGBA(m){if(m.indexOf("rgb(")===0){m=m.match(/rgb\(([^)]+)\)/)[1];const y=m.split(/ *, */).map(Number);return{r:y[0],g:y[1],b:y[2],a:1}}},_rgbaColorToRGBA(m){if(m.indexOf("rgba(")===0){m=m.match(/rgba\(([^)]+)\)/)[1];const y=m.split(/ *, */).map((w,L)=>w.slice(-1)==="%"?L===3?parseInt(w)/100:parseInt(w)/100*255:Number(w));return{r:y[0],g:y[1],b:y[2],a:y[3]}}},_hex8ColorToRGBA(m){if(m[0]==="#"&&m.length===9)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:parseInt(m.slice(7,9),16)/255}},_hex6ColorToRGBA(m){if(m[0]==="#"&&m.length===7)return{r:parseInt(m.slice(1,3),16),g:parseInt(m.slice(3,5),16),b:parseInt(m.slice(5,7),16),a:1}},_hex4ColorToRGBA(m){if(m[0]==="#"&&m.length===5)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:parseInt(m[4]+m[4],16)/255}},_hex3ColorToRGBA(m){if(m[0]==="#"&&m.length===4)return{r:parseInt(m[1]+m[1],16),g:parseInt(m[2]+m[2],16),b:parseInt(m[3]+m[3],16),a:1}},_hslColorToRGBA(m){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(m)){const[y,...w]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(m),L=Number(w[0])/360,R=Number(w[1])/100,D=Number(w[2])/100;let E,S,A;if(R===0)return A=D*255,{r:Math.round(A),g:Math.round(A),b:Math.round(A),a:1};D<.5?E=D*(1+R):E=D+R-D*R;const M=2*D-E,T=[0,0,0];for(let B=0;B<3;B++)S=L+1/3*-(B-1),S<0&&S++,S>1&&S--,6*S<1?A=M+(E-M)*6*S:2*S<1?A=E:3*S<2?A=M+(E-M)*(2/3-S)*6:A=M,T[B]=A*255;return{r:Math.round(T[0]),g:Math.round(T[1]),b:Math.round(T[2]),a:1}}},haveIntersection(m,y){return!(y.x>m.x+m.width||y.x+y.width<m.x||y.y>m.y+m.height||y.y+y.height<m.y)},cloneObject(m){const y={};for(const w in m)this._isPlainObject(m[w])?y[w]=this.cloneObject(m[w]):this._isArray(m[w])?y[w]=this.cloneArray(m[w]):y[w]=m[w];return y},cloneArray(m){return m.slice(0)},degToRad(m){return m*c},radToDeg(m){return m*h},_degToRad(m){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(m)},_radToDeg(m){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(m)},_getRotation(m){return i.Konva.angleDeg?e.Util.radToDeg(m):m},_capitalize(m){return m.charAt(0).toUpperCase()+m.slice(1)},throw(m){throw new Error(v+m)},error(m){console.error(v+m)},warn(m){i.Konva.showWarnings&&console.warn(O+m)},each(m,y){for(const w in m)y(w,m[w])},_inRange(m,y,w){return y<=m&&m<w},_getProjectionToSegment(m,y,w,L,R,D){let E,S,A;const M=(m-w)*(m-w)+(y-L)*(y-L);if(M==0)E=m,S=y,A=(R-w)*(R-w)+(D-L)*(D-L);else{const T=((R-m)*(w-m)+(D-y)*(L-y))/M;T<0?(E=m,S=y,A=(m-R)*(m-R)+(y-D)*(y-D)):T>1?(E=w,S=L,A=(w-R)*(w-R)+(L-D)*(L-D)):(E=m+T*(w-m),S=y+T*(L-y),A=(E-R)*(E-R)+(S-D)*(S-D))}return[E,S,A]},_getProjectionToLine(m,y,w){const L=e.Util.cloneObject(m);let R=Number.MAX_VALUE;return y.forEach(function(D,E){if(!w&&E===y.length-1)return;const S=y[(E+1)%y.length],A=e.Util._getProjectionToSegment(D.x,D.y,S.x,S.y,m.x,m.y),M=A[0],T=A[1],B=A[2];B<R&&(L.x=M,L.y=T,R=B)}),L},_prepareArrayForTween(m,y,w){let L,R=[],D=[];if(m.length>y.length){const S=y;y=m,m=S}for(L=0;L<m.length;L+=2)R.push({x:m[L],y:m[L+1]});for(L=0;L<y.length;L+=2)D.push({x:y[L],y:y[L+1]});const E=[];return D.forEach(function(S){const A=e.Util._getProjectionToLine(S,R,w);E.push(A.x),E.push(A.y)}),E},_prepareToStringify(m){let y;m.visitedByCircularReferenceRemoval=!0;for(const w in m)if(m.hasOwnProperty(w)&&m[w]&&typeof m[w]=="object"){if(y=Object.getOwnPropertyDescriptor(m,w),m[w].visitedByCircularReferenceRemoval||e.Util._isElement(m[w]))if(y.configurable)delete m[w];else return null;else if(e.Util._prepareToStringify(m[w])===null)if(y.configurable)delete m[w];else return null}return delete m.visitedByCircularReferenceRemoval,m},_assign(m,y){for(const w in y)m[w]=y[w];return m},_getFirstPointerId(m){return m.touches?m.changedTouches[0].identifier:m.pointerId||999},releaseCanvas(...m){i.Konva.releaseCanvasOnDestroy&&m.forEach(y=>{y.width=0,y.height=0})},drawRoundedRectPath(m,y,w,L){let R=0,D=0,E=0,S=0;typeof L=="number"?R=D=E=S=Math.min(L,y/2,w/2):(R=Math.min(L[0]||0,y/2,w/2),D=Math.min(L[1]||0,y/2,w/2),S=Math.min(L[2]||0,y/2,w/2),E=Math.min(L[3]||0,y/2,w/2)),m.moveTo(R,0),m.lineTo(y-D,0),m.arc(y-D,D,D,Math.PI*3/2,0,!1),m.lineTo(y,w-S),m.arc(y-S,w-S,S,0,Math.PI/2,!1),m.lineTo(E,w),m.arc(E,w-E,E,Math.PI/2,Math.PI,!1),m.lineTo(0,R),m.arc(R,R,R,Math.PI,Math.PI*3/2,!1)}}}(D0)),D0}var mf={},j0={},gi={},Tm;function Ft(){if(Tm)return gi;Tm=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.RGBComponent=n,gi.alphaComponent=a,gi.getNumberValidator=l,gi.getNumberOrArrayOfNumbersValidator=u,gi.getNumberOrAutoValidator=c,gi.getStringValidator=h,gi.getStringOrGradientValidator=b,gi.getFunctionValidator=_,gi.getNumberArrayValidator=k,gi.getBooleanValidator=O,gi.getComponentValidator=v;const e=Rt(),i=Nn();function t(x){return i.Util._isString(x)?'"'+x+'"':Object.prototype.toString.call(x)==="[object Number]"||i.Util._isBoolean(x)?x:Object.prototype.toString.call(x)}function n(x){return x>255?255:x<0?0:Math.round(x)}function a(x){return x>1?1:x<1e-4?1e-4:x}function l(){if(e.Konva.isUnminified)return function(x,g){return i.Util._isNumber(x)||i.Util.warn(t(x)+' is a not valid value for "'+g+'" attribute. The value should be a number.'),x}}function u(x){if(e.Konva.isUnminified)return function(g,p){const P=i.Util._isNumber(g),d=i.Util._isArray(g)&&g.length==x;return!P&&!d&&i.Util.warn(t(g)+' is a not valid value for "'+p+'" attribute. The value should be a number or Array<number>('+x+")"),g}}function c(){if(e.Konva.isUnminified)return function(x,g){return i.Util._isNumber(x)||x==="auto"||i.Util.warn(t(x)+' is a not valid value for "'+g+'" attribute. The value should be a number or "auto".'),x}}function h(){if(e.Konva.isUnminified)return function(x,g){return i.Util._isString(x)||i.Util.warn(t(x)+' is a not valid value for "'+g+'" attribute. The value should be a string.'),x}}function b(){if(e.Konva.isUnminified)return function(x,g){const p=i.Util._isString(x),P=Object.prototype.toString.call(x)==="[object CanvasGradient]"||x&&x.addColorStop;return p||P||i.Util.warn(t(x)+' is a not valid value for "'+g+'" attribute. The value should be a string or a native gradient.'),x}}function _(){if(e.Konva.isUnminified)return function(x,g){return i.Util._isFunction(x)||i.Util.warn(t(x)+' is a not valid value for "'+g+'" attribute. The value should be a function.'),x}}function k(){if(e.Konva.isUnminified)return function(x,g){const p=Int8Array?Object.getPrototypeOf(Int8Array):null;return p&&x instanceof p||(i.Util._isArray(x)?x.forEach(function(P){i.Util._isNumber(P)||i.Util.warn('"'+g+'" attribute has non numeric element '+P+". Make sure that all elements are numbers.")}):i.Util.warn(t(x)+' is a not valid value for "'+g+'" attribute. The value should be a array of numbers.')),x}}function O(){if(e.Konva.isUnminified)return function(x,g){return x===!0||x===!1||i.Util.warn(t(x)+' is a not valid value for "'+g+'" attribute. The value should be a boolean.'),x}}function v(x){if(e.Konva.isUnminified)return function(g,p){return g==null||i.Util.isObject(g)||i.Util.warn(t(g)+' is a not valid value for "'+p+'" attribute. The value should be an object with properties '+x),g}}return gi}var Am;function It(){return Am||(Am=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const i=Nn(),t=Ft(),n="get",a="set";e.Factory={addGetterSetter(l,u,c,h,b){e.Factory.addGetter(l,u,c),e.Factory.addSetter(l,u,h,b),e.Factory.addOverloadedGetterSetter(l,u)},addGetter(l,u,c){const h=n+i.Util._capitalize(u);l.prototype[h]=l.prototype[h]||function(){const b=this.attrs[u];return b===void 0?c:b}},addSetter(l,u,c,h){const b=a+i.Util._capitalize(u);l.prototype[b]||e.Factory.overWriteSetter(l,u,c,h)},overWriteSetter(l,u,c,h){const b=a+i.Util._capitalize(u);l.prototype[b]=function(_){return c&&_!==void 0&&_!==null&&(_=c.call(this,_,u)),this._setAttr(u,_),h&&h.call(this),this}},addComponentsGetterSetter(l,u,c,h,b){let _=c.length,k=i.Util._capitalize,O=n+k(u),v=a+k(u),x,g;l.prototype[O]=function(){const P={};for(x=0;x<_;x++)g=c[x],P[g]=this.getAttr(u+k(g));return P};const p=(0,t.getComponentValidator)(c);l.prototype[v]=function(P){let d=this.attrs[u],m;h&&(P=h.call(this,P)),p&&p.call(this,P,u);for(m in P)P.hasOwnProperty(m)&&this._setAttr(u+k(m),P[m]);return P||c.forEach(y=>{this._setAttr(u+k(y),void 0)}),this._fireChangeEvent(u,d,P),b&&b.call(this),this},e.Factory.addOverloadedGetterSetter(l,u)},addOverloadedGetterSetter(l,u){const c=i.Util._capitalize(u),h=a+c,b=n+c;l.prototype[u]=function(){return arguments.length?(this[h](arguments[0]),this):this[b]()}},addDeprecatedGetterSetter(l,u,c,h){i.Util.error("Adding deprecated "+u);const b=n+i.Util._capitalize(u),_=u+" property is deprecated and will be removed soon. Look at Konva change log for more information.";l.prototype[b]=function(){i.Util.error(_);const k=this.attrs[u];return k===void 0?c:k},e.Factory.addSetter(l,u,h,function(){i.Util.error(_)}),e.Factory.addOverloadedGetterSetter(l,u)},backCompat(l,u){i.Util.each(u,function(c,h){const b=l.prototype[h],_=n+i.Util._capitalize(c),k=a+i.Util._capitalize(c);function O(){b.apply(this,arguments),i.Util.error('"'+c+'" method is deprecated and will be removed soon. Use ""'+h+'" instead.')}l.prototype[c]=O,l.prototype[_]=O,l.prototype[k]=O})},afterSetFilter(){this._filterUpToDate=!1}}}(j0)),j0}var Ua={},qa={},Rm;function d5(){if(Rm)return qa;Rm=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.HitContext=qa.SceneContext=qa.Context=void 0;const e=Nn(),i=Rt();function t(P){let d=[],m=P.length,y=e.Util,w,L;for(w=0;w<m;w++)L=P[w],y._isNumber(L)?L=Math.round(L*1e3)/1e3:y._isString(L)||(L=L+""),d.push(L);return d}const n=",",a="(",l=")",u="([",c="])",h=";",b="()",_="=",k=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],O=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"],v=100;let x=class{constructor(d){this.canvas=d,i.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(d){d.fillEnabled()&&this._fill(d)}_fill(d){}strokeShape(d){d.hasStroke()&&this._stroke(d)}_stroke(d){}fillStrokeShape(d){d.attrs.fillAfterStrokeEnabled?(this.strokeShape(d),this.fillShape(d)):(this.fillShape(d),this.strokeShape(d))}getTrace(d,m){let y=this.traceArr,w=y.length,L="",R,D,E,S;for(R=0;R<w;R++)D=y[R],E=D.method,E?(S=D.args,L+=E,d?L+=b:e.Util._isArray(S[0])?L+=u+S.join(n)+c:(m&&(S=S.map(A=>typeof A=="number"?Math.floor(A):A)),L+=a+S.join(n)+l)):(L+=D.property,d||(L+=_+D.val)),L+=h;return L}clearTrace(){this.traceArr=[]}_trace(d){let m=this.traceArr,y;m.push(d),y=m.length,y>=v&&m.shift()}reset(){const d=this.getCanvas().getPixelRatio();this.setTransform(1*d,0,0,1*d,0,0)}getCanvas(){return this.canvas}clear(d){const m=this.getCanvas();d?this.clearRect(d.x||0,d.y||0,d.width||0,d.height||0):this.clearRect(0,0,m.getWidth()/m.pixelRatio,m.getHeight()/m.pixelRatio)}_applyLineCap(d){const m=d.attrs.lineCap;m&&this.setAttr("lineCap",m)}_applyOpacity(d){const m=d.getAbsoluteOpacity();m!==1&&this.setAttr("globalAlpha",m)}_applyLineJoin(d){const m=d.attrs.lineJoin;m&&this.setAttr("lineJoin",m)}setAttr(d,m){this._context[d]=m}arc(d,m,y,w,L,R){this._context.arc(d,m,y,w,L,R)}arcTo(d,m,y,w,L){this._context.arcTo(d,m,y,w,L)}beginPath(){this._context.beginPath()}bezierCurveTo(d,m,y,w,L,R){this._context.bezierCurveTo(d,m,y,w,L,R)}clearRect(d,m,y,w){this._context.clearRect(d,m,y,w)}clip(...d){this._context.clip.apply(this._context,d)}closePath(){this._context.closePath()}createImageData(d,m){const y=arguments;if(y.length===2)return this._context.createImageData(d,m);if(y.length===1)return this._context.createImageData(d)}createLinearGradient(d,m,y,w){return this._context.createLinearGradient(d,m,y,w)}createPattern(d,m){return this._context.createPattern(d,m)}createRadialGradient(d,m,y,w,L,R){return this._context.createRadialGradient(d,m,y,w,L,R)}drawImage(d,m,y,w,L,R,D,E,S){const A=arguments,M=this._context;A.length===3?M.drawImage(d,m,y):A.length===5?M.drawImage(d,m,y,w,L):A.length===9&&M.drawImage(d,m,y,w,L,R,D,E,S)}ellipse(d,m,y,w,L,R,D,E){this._context.ellipse(d,m,y,w,L,R,D,E)}isPointInPath(d,m,y,w){return y?this._context.isPointInPath(y,d,m,w):this._context.isPointInPath(d,m,w)}fill(...d){this._context.fill.apply(this._context,d)}fillRect(d,m,y,w){this._context.fillRect(d,m,y,w)}strokeRect(d,m,y,w){this._context.strokeRect(d,m,y,w)}fillText(d,m,y,w){w?this._context.fillText(d,m,y,w):this._context.fillText(d,m,y)}measureText(d){return this._context.measureText(d)}getImageData(d,m,y,w){return this._context.getImageData(d,m,y,w)}lineTo(d,m){this._context.lineTo(d,m)}moveTo(d,m){this._context.moveTo(d,m)}rect(d,m,y,w){this._context.rect(d,m,y,w)}roundRect(d,m,y,w,L){this._context.roundRect(d,m,y,w,L)}putImageData(d,m,y){this._context.putImageData(d,m,y)}quadraticCurveTo(d,m,y,w){this._context.quadraticCurveTo(d,m,y,w)}restore(){this._context.restore()}rotate(d){this._context.rotate(d)}save(){this._context.save()}scale(d,m){this._context.scale(d,m)}setLineDash(d){this._context.setLineDash?this._context.setLineDash(d):"mozDash"in this._context?this._context.mozDash=d:"webkitLineDash"in this._context&&(this._context.webkitLineDash=d)}getLineDash(){return this._context.getLineDash()}setTransform(d,m,y,w,L,R){this._context.setTransform(d,m,y,w,L,R)}stroke(d){d?this._context.stroke(d):this._context.stroke()}strokeText(d,m,y,w){this._context.strokeText(d,m,y,w)}transform(d,m,y,w,L,R){this._context.transform(d,m,y,w,L,R)}translate(d,m){this._context.translate(d,m)}_enableTrace(){let d=this,m=k.length,y=this.setAttr,w,L;const R=function(D){let E=d[D],S;d[D]=function(){return L=t(Array.prototype.slice.call(arguments,0)),S=E.apply(d,arguments),d._trace({method:D,args:L}),S}};for(w=0;w<m;w++)R(k[w]);d.setAttr=function(){y.apply(d,arguments);const D=arguments[0];let E=arguments[1];(D==="shadowOffsetX"||D==="shadowOffsetY"||D==="shadowBlur")&&(E=E/this.canvas.getPixelRatio()),d._trace({property:D,val:E})}}_applyGlobalCompositeOperation(d){const m=d.attrs.globalCompositeOperation;!m||m==="source-over"||this.setAttr("globalCompositeOperation",m)}};qa.Context=x,O.forEach(function(P){Object.defineProperty(x.prototype,P,{get(){return this._context[P]},set(d){this._context[P]=d}})});class g extends x{constructor(d,{willReadFrequently:m=!1}={}){super(d),this._context=d._canvas.getContext("2d",{willReadFrequently:m})}_fillColor(d){const m=d.fill();this.setAttr("fillStyle",m),d._fillFunc(this)}_fillPattern(d){this.setAttr("fillStyle",d._getFillPattern()),d._fillFunc(this)}_fillLinearGradient(d){const m=d._getLinearGradient();m&&(this.setAttr("fillStyle",m),d._fillFunc(this))}_fillRadialGradient(d){const m=d._getRadialGradient();m&&(this.setAttr("fillStyle",m),d._fillFunc(this))}_fill(d){const m=d.fill(),y=d.getFillPriority();if(m&&y==="color"){this._fillColor(d);return}const w=d.getFillPatternImage();if(w&&y==="pattern"){this._fillPattern(d);return}const L=d.getFillLinearGradientColorStops();if(L&&y==="linear-gradient"){this._fillLinearGradient(d);return}const R=d.getFillRadialGradientColorStops();if(R&&y==="radial-gradient"){this._fillRadialGradient(d);return}m?this._fillColor(d):w?this._fillPattern(d):L?this._fillLinearGradient(d):R&&this._fillRadialGradient(d)}_strokeLinearGradient(d){const m=d.getStrokeLinearGradientStartPoint(),y=d.getStrokeLinearGradientEndPoint(),w=d.getStrokeLinearGradientColorStops(),L=this.createLinearGradient(m.x,m.y,y.x,y.y);if(w){for(let R=0;R<w.length;R+=2)L.addColorStop(w[R],w[R+1]);this.setAttr("strokeStyle",L)}}_stroke(d){const m=d.dash(),y=d.getStrokeScaleEnabled();if(d.hasStroke()){if(!y){this.save();const L=this.getCanvas().getPixelRatio();this.setTransform(L,0,0,L,0,0)}this._applyLineCap(d),m&&d.dashEnabled()&&(this.setLineDash(m),this.setAttr("lineDashOffset",d.dashOffset())),this.setAttr("lineWidth",d.strokeWidth()),d.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),d.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(d):this.setAttr("strokeStyle",d.stroke()),d._strokeFunc(this),y||this.restore()}}_applyShadow(d){var m,y,w;const L=(m=d.getShadowRGBA())!==null&&m!==void 0?m:"black",R=(y=d.getShadowBlur())!==null&&y!==void 0?y:5,D=(w=d.getShadowOffset())!==null&&w!==void 0?w:{x:0,y:0},E=d.getAbsoluteScale(),S=this.canvas.getPixelRatio(),A=E.x*S,M=E.y*S;this.setAttr("shadowColor",L),this.setAttr("shadowBlur",R*Math.min(Math.abs(A),Math.abs(M))),this.setAttr("shadowOffsetX",D.x*A),this.setAttr("shadowOffsetY",D.y*M)}}qa.SceneContext=g;class p extends x{constructor(d){super(d),this._context=d._canvas.getContext("2d",{willReadFrequently:!0})}_fill(d){this.save(),this.setAttr("fillStyle",d.colorKey),d._fillFuncHit(this),this.restore()}strokeShape(d){d.hasHitStroke()&&this._stroke(d)}_stroke(d){if(d.hasHitStroke()){const m=d.getStrokeScaleEnabled();if(!m){this.save();const L=this.getCanvas().getPixelRatio();this.setTransform(L,0,0,L,0,0)}this._applyLineCap(d);const y=d.hitStrokeWidth(),w=y==="auto"?d.strokeWidth():y;this.setAttr("lineWidth",w),this.setAttr("strokeStyle",d.colorKey),d._strokeFuncHit(this),m||this.restore()}}}return qa.HitContext=p,qa}var Mm;function Lp(){if(Mm)return Ua;Mm=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.HitCanvas=Ua.SceneCanvas=Ua.Canvas=void 0;const e=Nn(),i=d5(),t=Rt(),n=It(),a=Ft();let l;function u(){if(l)return l;const _=e.Util.createCanvasElement(),k=_.getContext("2d");return l=function(){const O=t.Konva._global.devicePixelRatio||1,v=k.webkitBackingStorePixelRatio||k.mozBackingStorePixelRatio||k.msBackingStorePixelRatio||k.oBackingStorePixelRatio||k.backingStorePixelRatio||1;return O/v}(),e.Util.releaseCanvas(_),l}let c=class{constructor(k){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const v=(k||{}).pixelRatio||t.Konva.pixelRatio||u();this.pixelRatio=v,this._canvas=e.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(k){const O=this.pixelRatio;this.pixelRatio=k,this.setSize(this.getWidth()/O,this.getHeight()/O)}setWidth(k){this.width=this._canvas.width=k*this.pixelRatio,this._canvas.style.width=k+"px";const O=this.pixelRatio;this.getContext()._context.scale(O,O)}setHeight(k){this.height=this._canvas.height=k*this.pixelRatio,this._canvas.style.height=k+"px";const O=this.pixelRatio;this.getContext()._context.scale(O,O)}getWidth(){return this.width}getHeight(){return this.height}setSize(k,O){this.setWidth(k||0),this.setHeight(O||0)}toDataURL(k,O){try{return this._canvas.toDataURL(k,O)}catch{try{return this._canvas.toDataURL()}catch(x){return e.Util.error("Unable to get data URL. "+x.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}};Ua.Canvas=c,n.Factory.addGetterSetter(c,"pixelRatio",void 0,(0,a.getNumberValidator)());class h extends c{constructor(k={width:0,height:0,willReadFrequently:!1}){super(k),this.context=new i.SceneContext(this,{willReadFrequently:k.willReadFrequently}),this.setSize(k.width,k.height)}}Ua.SceneCanvas=h;class b extends c{constructor(k={width:0,height:0}){super(k),this.hitCanvas=!0,this.context=new i.HitContext(this),this.setSize(k.width,k.height)}}return Ua.HitCanvas=b,Ua}var F0={},Lm;function ev(){return Lm||(Lm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const i=Rt(),t=Nn();e.DD={get isDragging(){let n=!1;return e.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return e.DD._dragElements.forEach(a=>{n=a.node}),n},_dragElements:new Map,_drag(n){const a=[];e.DD._dragElements.forEach((l,u)=>{const{node:c}=l,h=c.getStage();h.setPointersPositions(n),l.pointerId===void 0&&(l.pointerId=t.Util._getFirstPointerId(n));const b=h._changedPointerPositions.find(_=>_.id===l.pointerId);if(b){if(l.dragStatus!=="dragging"){const _=c.dragDistance();if(Math.max(Math.abs(b.x-l.startPointerPos.x),Math.abs(b.y-l.startPointerPos.y))<_||(c.startDrag({evt:n}),!c.isDragging()))return}c._setDragPosition(n,l),a.push(c)}}),a.forEach(l=>{l.fire("dragmove",{type:"dragmove",target:l,evt:n},!0)})},_endDragBefore(n){const a=[];e.DD._dragElements.forEach(l=>{const{node:u}=l,c=u.getStage();if(n&&c.setPointersPositions(n),!c._changedPointerPositions.find(_=>_.id===l.pointerId))return;(l.dragStatus==="dragging"||l.dragStatus==="stopped")&&(e.DD.justDragged=!0,i.Konva._mouseListenClick=!1,i.Konva._touchListenClick=!1,i.Konva._pointerListenClick=!1,l.dragStatus="stopped");const b=l.node.getLayer()||l.node instanceof i.Konva.Stage&&l.node;b&&a.indexOf(b)===-1&&a.push(b)}),a.forEach(l=>{l.draw()})},_endDragAfter(n){e.DD._dragElements.forEach((a,l)=>{a.dragStatus==="stopped"&&a.node.fire("dragend",{type:"dragend",target:a.node,evt:n},!0),a.dragStatus!=="dragging"&&e.DD._dragElements.delete(l)})}},i.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("touchcancel",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1),window.addEventListener("touchcancel",e.DD._endDragAfter,!1))}(F0)),F0}var Nm;function Hn(){if(Nm)return mf;Nm=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.Node=void 0;const e=Nn(),i=It(),t=Lp(),n=Rt(),a=ev(),l=Ft(),u="absoluteOpacity",c="allEventListeners",h="absoluteTransform",b="absoluteScale",_="canvas",k="Change",O="children",v="konva",x="listening",g="mouseenter",p="mouseleave",P="set",d="Shape",m=" ",y="stage",w="transform",L="Stage",R="visible",D=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(m);let E=1;class S{constructor(T){this._id=E++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(T),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(T){(T===w||T===h)&&this._cache.get(T)?this._cache.get(T).dirty=!0:T?this._cache.delete(T):this._cache.clear()}_getCache(T,B){let U=this._cache.get(T);return(U===void 0||(T===w||T===h)&&U.dirty===!0)&&(U=B.call(this),this._cache.set(T,U)),U}_calculate(T,B,U){if(!this._attachedDepsListeners.get(T)){const Q=B.map(X=>X+"Change.konva").join(m);this.on(Q,()=>{this._clearCache(T)}),this._attachedDepsListeners.set(T,!0)}return this._getCache(T,U)}_getCanvasCache(){return this._cache.get(_)}_clearSelfAndDescendantCache(T){this._clearCache(T),T===h&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(_)){const{scene:T,filter:B,hit:U}=this._cache.get(_);e.Util.releaseCanvas(T,B,U),this._cache.delete(_)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(T){const B=T||{};let U={};(B.x===void 0||B.y===void 0||B.width===void 0||B.height===void 0)&&(U=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let Q=Math.ceil(B.width||U.width),X=Math.ceil(B.height||U.height),$=B.pixelRatio,j=B.x===void 0?Math.floor(U.x):B.x,I=B.y===void 0?Math.floor(U.y):B.y,z=B.offset||0,H=B.drawBorder||!1,K=B.hitCanvasPixelRatio||1;if(!Q||!X){e.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const ee=Math.abs(Math.round(U.x)-j)>.5?1:0,V=Math.abs(Math.round(U.y)-I)>.5?1:0;Q+=z*2+ee,X+=z*2+V,j-=z,I-=z;const Z=new t.SceneCanvas({pixelRatio:$,width:Q,height:X}),Y=new t.SceneCanvas({pixelRatio:$,width:0,height:0,willReadFrequently:!0}),ne=new t.HitCanvas({pixelRatio:K,width:Q,height:X}),re=Z.getContext(),ie=ne.getContext();return ne.isCache=!0,Z.isCache=!0,this._cache.delete(_),this._filterUpToDate=!1,B.imageSmoothingEnabled===!1&&(Z.getContext()._context.imageSmoothingEnabled=!1,Y.getContext()._context.imageSmoothingEnabled=!1),re.save(),ie.save(),re.translate(-j,-I),ie.translate(-j,-I),this._isUnderCache=!0,this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(b),this.drawScene(Z,this),this.drawHit(ne,this),this._isUnderCache=!1,re.restore(),ie.restore(),H&&(re.save(),re.beginPath(),re.rect(0,0,Q,X),re.closePath(),re.setAttr("strokeStyle","red"),re.setAttr("lineWidth",5),re.stroke(),re.restore()),this._cache.set(_,{scene:Z,filter:Y,hit:ne,x:j,y:I}),this._requestDraw(),this}isCached(){return this._cache.has(_)}getClientRect(T){throw new Error('abstract "getClientRect" method call')}_transformedRect(T,B){const U=[{x:T.x,y:T.y},{x:T.x+T.width,y:T.y},{x:T.x+T.width,y:T.y+T.height},{x:T.x,y:T.y+T.height}];let Q=1/0,X=1/0,$=-1/0,j=-1/0;const I=this.getAbsoluteTransform(B);return U.forEach(function(z){const H=I.point(z);Q===void 0&&(Q=$=H.x,X=j=H.y),Q=Math.min(Q,H.x),X=Math.min(X,H.y),$=Math.max($,H.x),j=Math.max(j,H.y)}),{x:Q,y:X,width:$-Q,height:j-X}}_drawCachedSceneCanvas(T){T.save(),T._applyOpacity(this),T._applyGlobalCompositeOperation(this);const B=this._getCanvasCache();T.translate(B.x,B.y);const U=this._getCachedSceneCanvas(),Q=U.pixelRatio;T.drawImage(U._canvas,0,0,U.width/Q,U.height/Q),T.restore()}_drawCachedHitCanvas(T){const B=this._getCanvasCache(),U=B.hit;T.save(),T.translate(B.x,B.y),T.drawImage(U._canvas,0,0,U.width/U.pixelRatio,U.height/U.pixelRatio),T.restore()}_getCachedSceneCanvas(){let T=this.filters(),B=this._getCanvasCache(),U=B.scene,Q=B.filter,X=Q.getContext(),$,j,I,z;if(T){if(!this._filterUpToDate){const H=U.pixelRatio;Q.setSize(U.width/U.pixelRatio,U.height/U.pixelRatio);try{for($=T.length,X.clear(),X.drawImage(U._canvas,0,0,U.getWidth()/H,U.getHeight()/H),j=X.getImageData(0,0,Q.getWidth(),Q.getHeight()),I=0;I<$;I++){if(z=T[I],typeof z!="function"){e.Util.error("Filter should be type of function, but got "+typeof z+" instead. Please check correct filters");continue}z.call(this,j),X.putImageData(j,0,0)}}catch(K){e.Util.error("Unable to apply filter. "+K.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return Q}return U}on(T,B){if(this._cache&&this._cache.delete(c),arguments.length===3)return this._delegate.apply(this,arguments);let U=T.split(m),Q=U.length,X,$,j,I,z;for(X=0;X<Q;X++)$=U[X],j=$.split("."),I=j[0],z=j[1]||"",this.eventListeners[I]||(this.eventListeners[I]=[]),this.eventListeners[I].push({name:z,handler:B});return this}off(T,B){let U=(T||"").split(m),Q=U.length,X,$,j,I,z,H;if(this._cache&&this._cache.delete(c),!T)for($ in this.eventListeners)this._off($);for(X=0;X<Q;X++)if(j=U[X],I=j.split("."),z=I[0],H=I[1],z)this.eventListeners[z]&&this._off(z,H,B);else for($ in this.eventListeners)this._off($,H,B);return this}dispatchEvent(T){const B={target:this,type:T.type,evt:T};return this.fire(T.type,B),this}addEventListener(T,B){return this.on(T,function(U){B.call(this,U.evt)}),this}removeEventListener(T){return this.off(T),this}_delegate(T,B,U){const Q=this;this.on(T,function(X){const $=X.target.findAncestors(B,!0,Q);for(let j=0;j<$.length;j++)X=e.Util.cloneObject(X),X.currentTarget=$[j],U.call($[j],X)})}remove(){return this.isDragging()&&this.stopDrag(),a.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(h),this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(b),this._clearSelfAndDescendantCache(y),this._clearSelfAndDescendantCache(R),this._clearSelfAndDescendantCache(x)}_remove(){this._clearCaches();const T=this.getParent();T&&T.children&&(T.children.splice(this.index,1),T._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(T){const B="get"+e.Util._capitalize(T);return e.Util._isFunction(this[B])?this[B]():this.attrs[T]}getAncestors(){let T=this.getParent(),B=[];for(;T;)B.push(T),T=T.getParent();return B}getAttrs(){return this.attrs||{}}setAttrs(T){return this._batchTransformChanges(()=>{let B,U;if(!T)return this;for(B in T)B!==O&&(U=P+e.Util._capitalize(B),e.Util._isFunction(this[U])?this[U](T[B]):this._setAttr(B,T[B]))}),this}isListening(){return this._getCache(x,this._isListening)}_isListening(T){if(!this.listening())return!1;const U=this.getParent();return U&&U!==T&&this!==T?U._isListening(T):!0}isVisible(){return this._getCache(R,this._isVisible)}_isVisible(T){if(!this.visible())return!1;const U=this.getParent();return U&&U!==T&&this!==T?U._isVisible(T):!0}shouldDrawHit(T,B=!1){if(T)return this._isVisible(T)&&this._isListening(T);const U=this.getLayer();let Q=!1;a.DD._dragElements.forEach($=>{$.dragStatus==="dragging"&&($.node.nodeType==="Stage"||$.node.getLayer()===U)&&(Q=!0)});const X=!B&&!n.Konva.hitOnDragEnabled&&(Q||n.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!X}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let T=this.getDepth(),B=this,U=0,Q,X,$,j;function I(H){for(Q=[],X=H.length,$=0;$<X;$++)j=H[$],U++,j.nodeType!==d&&(Q=Q.concat(j.getChildren().slice())),j._id===B._id&&($=X);Q.length>0&&Q[0].getDepth()<=T&&I(Q)}const z=this.getStage();return B.nodeType!==L&&z&&I(z.getChildren()),U}getDepth(){let T=0,B=this.parent;for(;B;)T++,B=B.parent;return T}_batchTransformChanges(T){this._batchingTransformChange=!0,T(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(w),this._clearSelfAndDescendantCache(h)),this._needClearTransformCache=!1}setPosition(T){return this._batchTransformChanges(()=>{this.x(T.x),this.y(T.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const T=this.getStage();if(!T)return null;const B=T.getPointerPosition();if(!B)return null;const U=this.getAbsoluteTransform().copy();return U.invert(),U.point(B)}getAbsolutePosition(T){let B=!1,U=this.parent;for(;U;){if(U.isCached()){B=!0;break}U=U.parent}B&&!T&&(T=!0);const Q=this.getAbsoluteTransform(T).getMatrix(),X=new e.Transform,$=this.offset();return X.m=Q.slice(),X.translate($.x,$.y),X.getTranslation()}setAbsolutePosition(T){const{x:B,y:U,...Q}=this._clearTransform();this.attrs.x=B,this.attrs.y=U,this._clearCache(w);const X=this._getAbsoluteTransform().copy();return X.invert(),X.translate(T.x,T.y),T={x:this.attrs.x+X.getTranslation().x,y:this.attrs.y+X.getTranslation().y},this._setTransform(Q),this.setPosition({x:T.x,y:T.y}),this._clearCache(w),this._clearSelfAndDescendantCache(h),this}_setTransform(T){let B;for(B in T)this.attrs[B]=T[B]}_clearTransform(){const T={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,T}move(T){let B=T.x,U=T.y,Q=this.x(),X=this.y();return B!==void 0&&(Q+=B),U!==void 0&&(X+=U),this.setPosition({x:Q,y:X}),this}_eachAncestorReverse(T,B){let U=[],Q=this.getParent(),X,$;if(!(B&&B._id===this._id)){for(U.unshift(this);Q&&(!B||Q._id!==B._id);)U.unshift(Q),Q=Q.parent;for(X=U.length,$=0;$<X;$++)T(U[$])}}rotate(T){return this.rotation(this.rotation()+T),this}moveToTop(){if(!this.parent)return e.Util.warn("Node has no parent. moveToTop function is ignored."),!1;const T=this.index,B=this.parent.getChildren().length;return T<B-1?(this.parent.children.splice(T,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return e.Util.warn("Node has no parent. moveUp function is ignored."),!1;const T=this.index,B=this.parent.getChildren().length;return T<B-1?(this.parent.children.splice(T,1),this.parent.children.splice(T+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return e.Util.warn("Node has no parent. moveDown function is ignored."),!1;const T=this.index;return T>0?(this.parent.children.splice(T,1),this.parent.children.splice(T-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return e.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const T=this.index;return T>0?(this.parent.children.splice(T,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(T){if(!this.parent)return e.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(T<0||T>=this.parent.children.length)&&e.Util.warn("Unexpected value "+T+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const B=this.index;return this.parent.children.splice(B,1),this.parent.children.splice(T,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(u,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let T=this.opacity();const B=this.getParent();return B&&!B._isUnderCache&&(T*=B.getAbsoluteOpacity()),T}moveTo(T){return this.getParent()!==T&&(this._remove(),T.add(this)),this}toObject(){let T=this.getAttrs(),B,U,Q,X,$;const j={attrs:{},className:this.getClassName()};for(B in T)U=T[B],$=e.Util.isObject(U)&&!e.Util._isPlainObject(U)&&!e.Util._isArray(U),!$&&(Q=typeof this[B]=="function"&&this[B],delete T[B],X=Q?Q.call(this):null,T[B]=U,X!==U&&(j.attrs[B]=U));return e.Util._prepareToStringify(j)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(T,B,U){const Q=[];B&&this._isMatch(T)&&Q.push(this);let X=this.parent;for(;X;){if(X===U)return Q;X._isMatch(T)&&Q.push(X),X=X.parent}return Q}isAncestorOf(T){return!1}findAncestor(T,B,U){return this.findAncestors(T,B,U)[0]}_isMatch(T){if(!T)return!1;if(typeof T=="function")return T(this);let B=T.replace(/ /g,"").split(","),U=B.length,Q,X;for(Q=0;Q<U;Q++)if(X=B[Q],e.Util.isValidSelector(X)||(e.Util.warn('Selector "'+X+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),e.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),e.Util.warn("Konva is awesome, right?")),X.charAt(0)==="#"){if(this.id()===X.slice(1))return!0}else if(X.charAt(0)==="."){if(this.hasName(X.slice(1)))return!0}else if(this.className===X||this.nodeType===X)return!0;return!1}getLayer(){const T=this.getParent();return T?T.getLayer():null}getStage(){return this._getCache(y,this._getStage)}_getStage(){const T=this.getParent();return T?T.getStage():null}fire(T,B={},U){return B.target=B.target||this,U?this._fireAndBubble(T,B):this._fire(T,B),this}getAbsoluteTransform(T){return T?this._getAbsoluteTransform(T):this._getCache(h,this._getAbsoluteTransform)}_getAbsoluteTransform(T){let B;if(T)return B=new e.Transform,this._eachAncestorReverse(function(U){const Q=U.transformsEnabled();Q==="all"?B.multiply(U.getTransform()):Q==="position"&&B.translate(U.x()-U.offsetX(),U.y()-U.offsetY())},T),B;{B=this._cache.get(h)||new e.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(B):B.reset();const U=this.transformsEnabled();if(U==="all")B.multiply(this.getTransform());else if(U==="position"){const Q=this.attrs.x||0,X=this.attrs.y||0,$=this.attrs.offsetX||0,j=this.attrs.offsetY||0;B.translate(Q-$,X-j)}return B.dirty=!1,B}}getAbsoluteScale(T){let B=this;for(;B;)B._isUnderCache&&(T=B),B=B.getParent();const Q=this.getAbsoluteTransform(T).decompose();return{x:Q.scaleX,y:Q.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(w,this._getTransform)}_getTransform(){var T,B;const U=this._cache.get(w)||new e.Transform;U.reset();const Q=this.x(),X=this.y(),$=n.Konva.getAngle(this.rotation()),j=(T=this.attrs.scaleX)!==null&&T!==void 0?T:1,I=(B=this.attrs.scaleY)!==null&&B!==void 0?B:1,z=this.attrs.skewX||0,H=this.attrs.skewY||0,K=this.attrs.offsetX||0,ee=this.attrs.offsetY||0;return(Q!==0||X!==0)&&U.translate(Q,X),$!==0&&U.rotate($),(z!==0||H!==0)&&U.skew(z,H),(j!==1||I!==1)&&U.scale(j,I),(K!==0||ee!==0)&&U.translate(-1*K,-1*ee),U.dirty=!1,U}clone(T){let B=e.Util.cloneObject(this.attrs),U,Q,X,$,j;for(U in T)B[U]=T[U];const I=new this.constructor(B);for(U in this.eventListeners)for(Q=this.eventListeners[U],X=Q.length,$=0;$<X;$++)j=Q[$],j.name.indexOf(v)<0&&(I.eventListeners[U]||(I.eventListeners[U]=[]),I.eventListeners[U].push(j));return I}_toKonvaCanvas(T){T=T||{};const B=this.getClientRect(),U=this.getStage(),Q=T.x!==void 0?T.x:Math.floor(B.x),X=T.y!==void 0?T.y:Math.floor(B.y),$=T.pixelRatio||1,j=new t.SceneCanvas({width:T.width||Math.ceil(B.width)||(U?U.width():0),height:T.height||Math.ceil(B.height)||(U?U.height():0),pixelRatio:$}),I=j.getContext(),z=new t.SceneCanvas({width:j.width/j.pixelRatio+Math.abs(Q),height:j.height/j.pixelRatio+Math.abs(X),pixelRatio:j.pixelRatio});return T.imageSmoothingEnabled===!1&&(I._context.imageSmoothingEnabled=!1),I.save(),(Q||X)&&I.translate(-1*Q,-1*X),this.drawScene(j,void 0,z),I.restore(),j}toCanvas(T){return this._toKonvaCanvas(T)._canvas}toDataURL(T){T=T||{};const B=T.mimeType||null,U=T.quality||null,Q=this._toKonvaCanvas(T).toDataURL(B,U);return T.callback&&T.callback(Q),Q}toImage(T){return new Promise((B,U)=>{try{const Q=T==null?void 0:T.callback;Q&&delete T.callback,e.Util._urlToImage(this.toDataURL(T),function(X){B(X),Q==null||Q(X)})}catch(Q){U(Q)}})}toBlob(T){return new Promise((B,U)=>{try{const Q=T==null?void 0:T.callback;Q&&delete T.callback,this.toCanvas(T).toBlob(X=>{B(X),Q==null||Q(X)},T==null?void 0:T.mimeType,T==null?void 0:T.quality)}catch(Q){U(Q)}})}setSize(T){return this.width(T.width),this.height(T.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():n.Konva.dragDistance}_off(T,B,U){let Q=this.eventListeners[T],X,$,j;for(X=0;X<Q.length;X++)if($=Q[X].name,j=Q[X].handler,($!=="konva"||B==="konva")&&(!B||$===B)&&(!U||U===j)){if(Q.splice(X,1),Q.length===0){delete this.eventListeners[T];break}X--}}_fireChangeEvent(T,B,U){this._fire(T+k,{oldVal:B,newVal:U})}addName(T){if(!this.hasName(T)){const B=this.name(),U=B?B+" "+T:T;this.name(U)}return this}hasName(T){if(!T)return!1;const B=this.name();return B?(B||"").split(/\s/g).indexOf(T)!==-1:!1}removeName(T){const B=(this.name()||"").split(/\s/g),U=B.indexOf(T);return U!==-1&&(B.splice(U,1),this.name(B.join(" "))),this}setAttr(T,B){const U=this[P+e.Util._capitalize(T)];return e.Util._isFunction(U)?U.call(this,B):this._setAttr(T,B),this}_requestDraw(){if(n.Konva.autoDrawEnabled){const T=this.getLayer()||this.getStage();T==null||T.batchDraw()}}_setAttr(T,B){const U=this.attrs[T];U===B&&!e.Util.isObject(B)||(B==null?delete this.attrs[T]:this.attrs[T]=B,this._shouldFireChangeEvents&&this._fireChangeEvent(T,U,B),this._requestDraw())}_setComponentAttr(T,B,U){let Q;U!==void 0&&(Q=this.attrs[T],Q||(this.attrs[T]=this.getAttr(T)),this.attrs[T][B]=U,this._fireChangeEvent(T,Q,U))}_fireAndBubble(T,B,U){if(B&&this.nodeType===d&&(B.target=this),!((T===g||T===p)&&(U&&(this===U||this.isAncestorOf&&this.isAncestorOf(U))||this.nodeType==="Stage"&&!U))){this._fire(T,B);const X=(T===g||T===p)&&U&&U.isAncestorOf&&U.isAncestorOf(this)&&!U.isAncestorOf(this.parent);(B&&!B.cancelBubble||!B)&&this.parent&&this.parent.isListening()&&!X&&(U&&U.parent?this._fireAndBubble.call(this.parent,T,B,U):this._fireAndBubble.call(this.parent,T,B))}}_getProtoListeners(T){var B,U,Q;const X=(B=this._cache.get(c))!==null&&B!==void 0?B:{};let $=X==null?void 0:X[T];if($===void 0){$=[];let j=Object.getPrototypeOf(this);for(;j;){const I=(Q=(U=j.eventListeners)===null||U===void 0?void 0:U[T])!==null&&Q!==void 0?Q:[];$.push(...I),j=Object.getPrototypeOf(j)}X[T]=$,this._cache.set(c,X)}return $}_fire(T,B){B=B||{},B.currentTarget=this,B.type=T;const U=this._getProtoListeners(T);if(U)for(var Q=0;Q<U.length;Q++)U[Q].handler.call(this,B);const X=this.eventListeners[T];if(X)for(var Q=0;Q<X.length;Q++)X[Q].handler.call(this,B)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(T){const B=T?T.pointerId:void 0,U=this.getStage(),Q=this.getAbsolutePosition();if(!U)return;const X=U._getPointerById(B)||U._changedPointerPositions[0]||Q;a.DD._dragElements.set(this._id,{node:this,startPointerPos:X,offset:{x:X.x-Q.x,y:X.y-Q.y},dragStatus:"ready",pointerId:B})}startDrag(T,B=!0){a.DD._dragElements.has(this._id)||this._createDragElement(T);const U=a.DD._dragElements.get(this._id);U.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:T&&T.evt},B)}_setDragPosition(T,B){const U=this.getStage()._getPointerById(B.pointerId);if(!U)return;let Q={x:U.x-B.offset.x,y:U.y-B.offset.y};const X=this.dragBoundFunc();if(X!==void 0){const $=X.call(this,Q,T);$?Q=$:e.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}(!this._lastPos||this._lastPos.x!==Q.x||this._lastPos.y!==Q.y)&&(this.setAbsolutePosition(Q),this._requestDraw()),this._lastPos=Q}stopDrag(T){const B=a.DD._dragElements.get(this._id);B&&(B.dragStatus="stopped"),a.DD._endDragBefore(T),a.DD._endDragAfter(T)}setDraggable(T){this._setAttr("draggable",T),this._dragChange()}isDragging(){const T=a.DD._dragElements.get(this._id);return T?T.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(T){if(!(!(T.evt.button!==void 0)||n.Konva.dragButtons.indexOf(T.evt.button)>=0)||this.isDragging())return;let Q=!1;a.DD._dragElements.forEach(X=>{this.isAncestorOf(X.node)&&(Q=!0)}),Q||this._createDragElement(T)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const B=a.DD._dragElements.get(this._id),U=B&&B.dragStatus==="dragging",Q=B&&B.dragStatus==="ready";U?this.stopDrag():Q&&a.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(T={x:0,y:0}){const B=this.getStage();if(!B)return!1;const U={x:-T.x,y:-T.y,width:B.width()+2*T.x,height:B.height()+2*T.y};return e.Util.haveIntersection(U,this.getClientRect())}static create(T,B){return e.Util._isString(T)&&(T=JSON.parse(T)),this._createNode(T,B)}static _createNode(T,B){let U=S.prototype.getClassName.call(T),Q=T.children,X,$,j;B&&(T.attrs.container=B),n.Konva[U]||(e.Util.warn('Can not find a node with class name "'+U+'". Fallback to "Shape".'),U="Shape");const I=n.Konva[U];if(X=new I(T.attrs),Q)for($=Q.length,j=0;j<$;j++)X.add(S._createNode(Q[j]));return X}}mf.Node=S,S.prototype.nodeType="Node",S.prototype._attrsAffectingSize=[],S.prototype.eventListeners={},S.prototype.on.call(S.prototype,D,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(w),this._clearSelfAndDescendantCache(h)}),S.prototype.on.call(S.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(R)}),S.prototype.on.call(S.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(x)}),S.prototype.on.call(S.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(u)});const A=i.Factory.addGetterSetter;return A(S,"zIndex"),A(S,"absolutePosition"),A(S,"position"),A(S,"x",0,(0,l.getNumberValidator)()),A(S,"y",0,(0,l.getNumberValidator)()),A(S,"globalCompositeOperation","source-over",(0,l.getStringValidator)()),A(S,"opacity",1,(0,l.getNumberValidator)()),A(S,"name","",(0,l.getStringValidator)()),A(S,"id","",(0,l.getStringValidator)()),A(S,"rotation",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(S,"scale",["x","y"]),A(S,"scaleX",1,(0,l.getNumberValidator)()),A(S,"scaleY",1,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(S,"skew",["x","y"]),A(S,"skewX",0,(0,l.getNumberValidator)()),A(S,"skewY",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(S,"offset",["x","y"]),A(S,"offsetX",0,(0,l.getNumberValidator)()),A(S,"offsetY",0,(0,l.getNumberValidator)()),A(S,"dragDistance",null,(0,l.getNumberValidator)()),A(S,"width",0,(0,l.getNumberValidator)()),A(S,"height",0,(0,l.getNumberValidator)()),A(S,"listening",!0,(0,l.getBooleanValidator)()),A(S,"preventDefault",!0,(0,l.getBooleanValidator)()),A(S,"filters",null,function(M){return this._filterUpToDate=!1,M}),A(S,"visible",!0,(0,l.getBooleanValidator)()),A(S,"transformsEnabled","all",(0,l.getStringValidator)()),A(S,"size"),A(S,"dragBoundFunc"),A(S,"draggable",!1,(0,l.getBooleanValidator)()),i.Factory.backCompat(S,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"}),mf}var yf={},Im;function Np(){if(Im)return yf;Im=1,Object.defineProperty(yf,"__esModule",{value:!0}),yf.Container=void 0;const e=It(),i=Hn(),t=Ft();let n=class extends i.Node{constructor(){super(...arguments),this.children=[]}getChildren(l){if(!l)return this.children||[];const u=this.children||[],c=[];return u.forEach(function(h){l(h)&&c.push(h)}),c}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(l=>{l.parent=null,l.index=0,l.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(l=>{l.parent=null,l.index=0,l.destroy()}),this.children=[],this._requestDraw(),this}add(...l){if(l.length===0)return this;if(l.length>1){for(let c=0;c<l.length;c++)this.add(l[c]);return this}const u=l[0];return u.getParent()?(u.moveTo(this),this):(this._validateAdd(u),u.index=this.getChildren().length,u.parent=this,u._clearCaches(),this.getChildren().push(u),this._fire("add",{child:u}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(l){return this._generalFind(l,!1)}findOne(l){const u=this._generalFind(l,!0);return u.length>0?u[0]:void 0}_generalFind(l,u){const c=[];return this._descendants(h=>{const b=h._isMatch(l);return b&&c.push(h),!!(b&&u)}),c}_descendants(l){let u=!1;const c=this.getChildren();for(const h of c){if(u=l(h),u)return!0;if(h.hasChildren()&&(u=h._descendants(l),u))return!0}return!1}toObject(){const l=i.Node.prototype.toObject.call(this);return l.children=[],this.getChildren().forEach(u=>{l.children.push(u.toObject())}),l}isAncestorOf(l){let u=l.getParent();for(;u;){if(u._id===this._id)return!0;u=u.getParent()}return!1}clone(l){const u=i.Node.prototype.clone.call(this,l);return this.getChildren().forEach(function(c){u.add(c.clone())}),u}getAllIntersections(l){const u=[];return this.find("Shape").forEach(c=>{c.isVisible()&&c.intersects(l)&&u.push(c)}),u}_clearSelfAndDescendantCache(l){var u;super._clearSelfAndDescendantCache(l),!this.isCached()&&((u=this.children)===null||u===void 0||u.forEach(function(c){c._clearSelfAndDescendantCache(l)}))}_setChildrenIndices(){var l;(l=this.children)===null||l===void 0||l.forEach(function(u,c){u.index=c}),this._requestDraw()}drawScene(l,u,c){const h=this.getLayer(),b=l||h&&h.getCanvas(),_=b&&b.getContext(),k=this._getCanvasCache(),O=k&&k.scene,v=b&&b.isCache;if(!this.isVisible()&&!v)return this;if(O){_.save();const x=this.getAbsoluteTransform(u).getMatrix();_.transform(x[0],x[1],x[2],x[3],x[4],x[5]),this._drawCachedSceneCanvas(_),_.restore()}else this._drawChildren("drawScene",b,u,c);return this}drawHit(l,u){if(!this.shouldDrawHit(u))return this;const c=this.getLayer(),h=l||c&&c.hitCanvas,b=h&&h.getContext(),_=this._getCanvasCache();if(_&&_.hit){b.save();const O=this.getAbsoluteTransform(u).getMatrix();b.transform(O[0],O[1],O[2],O[3],O[4],O[5]),this._drawCachedHitCanvas(b),b.restore()}else this._drawChildren("drawHit",h,u);return this}_drawChildren(l,u,c,h){var b;const _=u&&u.getContext(),k=this.clipWidth(),O=this.clipHeight(),v=this.clipFunc(),x=typeof k=="number"&&typeof O=="number"||v,g=c===this;if(x){_.save();const P=this.getAbsoluteTransform(c);let d=P.getMatrix();_.transform(d[0],d[1],d[2],d[3],d[4],d[5]),_.beginPath();let m;if(v)m=v.call(this,_,this);else{const y=this.clipX(),w=this.clipY();_.rect(y||0,w||0,k,O)}_.clip.apply(_,m),d=P.copy().invert().getMatrix(),_.transform(d[0],d[1],d[2],d[3],d[4],d[5])}const p=!g&&this.globalCompositeOperation()!=="source-over"&&l==="drawScene";p&&(_.save(),_._applyGlobalCompositeOperation(this)),(b=this.children)===null||b===void 0||b.forEach(function(P){P[l](u,c,h)}),p&&_.restore(),x&&_.restore()}getClientRect(l={}){var u;const c=l.skipTransform,h=l.relativeTo;let b,_,k,O,v={x:1/0,y:1/0,width:0,height:0};const x=this;(u=this.children)===null||u===void 0||u.forEach(function(P){if(!P.visible())return;const d=P.getClientRect({relativeTo:x,skipShadow:l.skipShadow,skipStroke:l.skipStroke});d.width===0&&d.height===0||(b===void 0?(b=d.x,_=d.y,k=d.x+d.width,O=d.y+d.height):(b=Math.min(b,d.x),_=Math.min(_,d.y),k=Math.max(k,d.x+d.width),O=Math.max(O,d.y+d.height)))});const g=this.find("Shape");let p=!1;for(let P=0;P<g.length;P++)if(g[P]._isVisible(this)){p=!0;break}return p&&b!==void 0?v={x:b,y:_,width:k-b,height:O-_}:v={x:0,y:0,width:0,height:0},c?v:this._transformedRect(v,h)}};return yf.Container=n,e.Factory.addComponentsGetterSetter(n,"clip",["x","y","width","height"]),e.Factory.addGetterSetter(n,"clipX",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipY",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipWidth",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipHeight",void 0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(n,"clipFunc"),yf}var z0={},ql={},Dm;function h5(){if(Dm)return ql;Dm=1,Object.defineProperty(ql,"__esModule",{value:!0}),ql.getCapturedShape=n,ql.createEvent=a,ql.hasPointerCapture=l,ql.setPointerCapture=u,ql.releaseCapture=c;const e=Rt(),i=new Map,t=e.Konva._global.PointerEvent!==void 0;function n(h){return i.get(h)}function a(h){return{evt:h,pointerId:h.pointerId}}function l(h,b){return i.get(h)===b}function u(h,b){c(h),b.getStage()&&(i.set(h,b),t&&b._fire("gotpointercapture",a(new PointerEvent("gotpointercapture"))))}function c(h,b){const _=i.get(h);if(!_)return;const k=_.getStage();k&&k.content,i.delete(h),t&&_._fire("lostpointercapture",a(new PointerEvent("lostpointercapture")))}return ql}var jm;function Jw(){return jm||(jm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const i=Nn(),t=It(),n=Np(),a=Rt(),l=Lp(),u=ev(),c=Rt(),h=h5(),b="Stage",_="string",k="px",O="mouseout",v="mouseleave",x="mouseover",g="mouseenter",p="mousemove",P="mousedown",d="mouseup",m="pointermove",y="pointerdown",w="pointerup",L="pointercancel",R="lostpointercapture",D="pointerout",E="pointerleave",S="pointerover",A="pointerenter",M="contextmenu",T="touchstart",B="touchend",U="touchmove",Q="touchcancel",X="wheel",$=5,j=[[g,"_pointerenter"],[P,"_pointerdown"],[p,"_pointermove"],[d,"_pointerup"],[v,"_pointerleave"],[T,"_pointerdown"],[U,"_pointermove"],[B,"_pointerup"],[Q,"_pointercancel"],[x,"_pointerover"],[X,"_wheel"],[M,"_contextmenu"],[y,"_pointerdown"],[m,"_pointermove"],[w,"_pointerup"],[L,"_pointercancel"],[R,"_lostpointercapture"]],I={mouse:{[D]:O,[E]:v,[S]:x,[A]:g,[m]:p,[y]:P,[w]:d,[L]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[D]:"touchout",[E]:"touchleave",[S]:"touchover",[A]:"touchenter",[m]:U,[y]:T,[w]:B,[L]:Q,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[D]:D,[E]:E,[S]:S,[A]:A,[m]:m,[y]:y,[w]:w,[L]:L,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},z=Z=>Z.indexOf("pointer")>=0?"pointer":Z.indexOf("touch")>=0?"touch":"mouse",H=Z=>{const Y=z(Z);if(Y==="pointer")return a.Konva.pointerEventsEnabled&&I.pointer;if(Y==="touch")return I.touch;if(Y==="mouse")return I.mouse};function K(Z={}){return(Z.clipFunc||Z.clipWidth||Z.clipHeight)&&i.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),Z}const ee="Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);";e.stages=[];class V extends n.Container{constructor(Y){super(K(Y)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{K(this.attrs)}),this._checkVisibility()}_validateAdd(Y){const ne=Y.getType()==="Layer",re=Y.getType()==="FastLayer";ne||re||i.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const Y=this.visible()?"":"none";this.content.style.display=Y}setContainer(Y){if(typeof Y===_){if(Y.charAt(0)==="."){const re=Y.slice(1);Y=document.getElementsByClassName(re)[0]}else{var ne;Y.charAt(0)!=="#"?ne=Y:ne=Y.slice(1),Y=document.getElementById(ne)}if(!Y)throw"Can not find container in document with id "+ne}return this._setAttr("container",Y),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),Y.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){let Y=this.children,ne=Y.length,re;for(re=0;re<ne;re++)Y[re].clear();return this}clone(Y){return Y||(Y={}),Y.container=typeof document<"u"&&document.createElement("div"),n.Container.prototype.clone.call(this,Y)}destroy(){super.destroy();const Y=this.content;Y&&i.Util._isInDocument(Y)&&this.container().removeChild(Y);const ne=e.stages.indexOf(this);return ne>-1&&e.stages.splice(ne,1),i.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const Y=this._pointerPositions[0]||this._changedPointerPositions[0];return Y?{x:Y.x,y:Y.y}:(i.Util.warn(ee),null)}_getPointerById(Y){return this._pointerPositions.find(ne=>ne.id===Y)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(Y){Y=Y||{},Y.x=Y.x||0,Y.y=Y.y||0,Y.width=Y.width||this.width(),Y.height=Y.height||this.height();const ne=new l.SceneCanvas({width:Y.width,height:Y.height,pixelRatio:Y.pixelRatio||1}),re=ne.getContext()._context,ie=this.children;return(Y.x||Y.y)&&re.translate(-1*Y.x,-1*Y.y),ie.forEach(function(ae){if(!ae.isVisible())return;const se=ae._toKonvaCanvas(Y);re.drawImage(se._canvas,Y.x,Y.y,se.getWidth()/se.getPixelRatio(),se.getHeight()/se.getPixelRatio())}),ne}getIntersection(Y){if(!Y)return null;let ne=this.children,re=ne.length,ie=re-1,ae;for(ae=ie;ae>=0;ae--){const se=ne[ae].getIntersection(Y);if(se)return se}return null}_resizeDOM(){const Y=this.width(),ne=this.height();this.content&&(this.content.style.width=Y+k,this.content.style.height=ne+k),this.bufferCanvas.setSize(Y,ne),this.bufferHitCanvas.setSize(Y,ne),this.children.forEach(re=>{re.setSize({width:Y,height:ne}),re.draw()})}add(Y,...ne){if(arguments.length>1){for(let ie=0;ie<arguments.length;ie++)this.add(arguments[ie]);return this}super.add(Y);const re=this.children.length;return re>$&&i.Util.warn("The stage has "+re+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),Y.setSize({width:this.width(),height:this.height()}),Y.draw(),a.Konva.isBrowser&&this.content.appendChild(Y.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(Y){return h.hasPointerCapture(Y,this)}setPointerCapture(Y){h.setPointerCapture(Y,this)}releaseCapture(Y){h.releaseCapture(Y,this)}getLayers(){return this.children}_bindContentEvents(){a.Konva.isBrowser&&j.forEach(([Y,ne])=>{this.content.addEventListener(Y,re=>{this[ne](re)},{passive:!1})})}_pointerenter(Y){this.setPointersPositions(Y);const ne=H(Y.type);ne&&this._fire(ne.pointerenter,{evt:Y,target:this,currentTarget:this})}_pointerover(Y){this.setPointersPositions(Y);const ne=H(Y.type);ne&&this._fire(ne.pointerover,{evt:Y,target:this,currentTarget:this})}_getTargetShape(Y){let ne=this[Y+"targetShape"];return ne&&!ne.getStage()&&(ne=null),ne}_pointerleave(Y){const ne=H(Y.type),re=z(Y.type);if(!ne)return;this.setPointersPositions(Y);const ie=this._getTargetShape(re),ae=!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled;ie&&ae?(ie._fireAndBubble(ne.pointerout,{evt:Y}),ie._fireAndBubble(ne.pointerleave,{evt:Y}),this._fire(ne.pointerleave,{evt:Y,target:this,currentTarget:this}),this[re+"targetShape"]=null):ae&&(this._fire(ne.pointerleave,{evt:Y,target:this,currentTarget:this}),this._fire(ne.pointerout,{evt:Y,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(Y){const ne=H(Y.type),re=z(Y.type);if(!ne)return;this.setPointersPositions(Y);let ie=!1;this._changedPointerPositions.forEach(ae=>{const se=this.getIntersection(ae);if(u.DD.justDragged=!1,a.Konva["_"+re+"ListenClick"]=!0,!se||!se.isListening()){this[re+"ClickStartShape"]=void 0;return}a.Konva.capturePointerEventsEnabled&&se.setPointerCapture(ae.id),this[re+"ClickStartShape"]=se,se._fireAndBubble(ne.pointerdown,{evt:Y,pointerId:ae.id}),ie=!0;const de=Y.type.indexOf("touch")>=0;se.preventDefault()&&Y.cancelable&&de&&Y.preventDefault()}),ie||this._fire(ne.pointerdown,{evt:Y,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(Y){const ne=H(Y.type),re=z(Y.type);if(!ne||(a.Konva.isDragging()&&u.DD.node.preventDefault()&&Y.cancelable&&Y.preventDefault(),this.setPointersPositions(Y),!(!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled)))return;const ae={};let se=!1;const de=this._getTargetShape(re);this._changedPointerPositions.forEach(he=>{const Se=h.getCapturedShape(he.id)||this.getIntersection(he),Ee=he.id,De={evt:Y,pointerId:Ee},fe=de!==Se;if(fe&&de&&(de._fireAndBubble(ne.pointerout,{...De},Se),de._fireAndBubble(ne.pointerleave,{...De},Se)),Se){if(ae[Se._id])return;ae[Se._id]=!0}Se&&Se.isListening()?(se=!0,fe&&(Se._fireAndBubble(ne.pointerover,{...De},de),Se._fireAndBubble(ne.pointerenter,{...De},de),this[re+"targetShape"]=Se),Se._fireAndBubble(ne.pointermove,{...De})):de&&(this._fire(ne.pointerover,{evt:Y,target:this,currentTarget:this,pointerId:Ee}),this[re+"targetShape"]=null)}),se||this._fire(ne.pointermove,{evt:Y,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(Y){const ne=H(Y.type),re=z(Y.type);if(!ne)return;this.setPointersPositions(Y);const ie=this[re+"ClickStartShape"],ae=this[re+"ClickEndShape"],se={};let de=!1;this._changedPointerPositions.forEach(he=>{const Se=h.getCapturedShape(he.id)||this.getIntersection(he);if(Se){if(Se.releaseCapture(he.id),se[Se._id])return;se[Se._id]=!0}const Ee=he.id,De={evt:Y,pointerId:Ee};let fe=!1;a.Konva["_"+re+"InDblClickWindow"]?(fe=!0,clearTimeout(this[re+"DblTimeout"])):u.DD.justDragged||(a.Konva["_"+re+"InDblClickWindow"]=!0,clearTimeout(this[re+"DblTimeout"])),this[re+"DblTimeout"]=setTimeout(function(){a.Konva["_"+re+"InDblClickWindow"]=!1},a.Konva.dblClickWindow),Se&&Se.isListening()?(de=!0,this[re+"ClickEndShape"]=Se,Se._fireAndBubble(ne.pointerup,{...De}),a.Konva["_"+re+"ListenClick"]&&ie&&ie===Se&&(Se._fireAndBubble(ne.pointerclick,{...De}),fe&&ae&&ae===Se&&Se._fireAndBubble(ne.pointerdblclick,{...De}))):(this[re+"ClickEndShape"]=null,a.Konva["_"+re+"ListenClick"]&&this._fire(ne.pointerclick,{evt:Y,target:this,currentTarget:this,pointerId:Ee}),fe&&this._fire(ne.pointerdblclick,{evt:Y,target:this,currentTarget:this,pointerId:Ee}))}),de||this._fire(ne.pointerup,{evt:Y,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),a.Konva["_"+re+"ListenClick"]=!1,Y.cancelable&&re!=="touch"&&Y.preventDefault()}_contextmenu(Y){this.setPointersPositions(Y);const ne=this.getIntersection(this.getPointerPosition());ne&&ne.isListening()?ne._fireAndBubble(M,{evt:Y}):this._fire(M,{evt:Y,target:this,currentTarget:this})}_wheel(Y){this.setPointersPositions(Y);const ne=this.getIntersection(this.getPointerPosition());ne&&ne.isListening()?ne._fireAndBubble(X,{evt:Y}):this._fire(X,{evt:Y,target:this,currentTarget:this})}_pointercancel(Y){this.setPointersPositions(Y);const ne=h.getCapturedShape(Y.pointerId)||this.getIntersection(this.getPointerPosition());ne&&ne._fireAndBubble(w,h.createEvent(Y)),h.releaseCapture(Y.pointerId)}_lostpointercapture(Y){h.releaseCapture(Y.pointerId)}setPointersPositions(Y){let ne=this._getContentPosition(),re=null,ie=null;Y=Y||window.event,Y.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(Y.touches,ae=>{this._pointerPositions.push({id:ae.identifier,x:(ae.clientX-ne.left)/ne.scaleX,y:(ae.clientY-ne.top)/ne.scaleY})}),Array.prototype.forEach.call(Y.changedTouches||Y.touches,ae=>{this._changedPointerPositions.push({id:ae.identifier,x:(ae.clientX-ne.left)/ne.scaleX,y:(ae.clientY-ne.top)/ne.scaleY})})):(re=(Y.clientX-ne.left)/ne.scaleX,ie=(Y.clientY-ne.top)/ne.scaleY,this.pointerPos={x:re,y:ie},this._pointerPositions=[{x:re,y:ie,id:i.Util._getFirstPointerId(Y)}],this._changedPointerPositions=[{x:re,y:ie,id:i.Util._getFirstPointerId(Y)}])}_setPointerPosition(Y){i.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(Y)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const Y=this.content.getBoundingClientRect();return{top:Y.top,left:Y.left,scaleX:Y.width/this.content.clientWidth||1,scaleY:Y.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new l.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new l.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!a.Konva.isBrowser)return;const Y=this.container();if(!Y)throw"Stage has no container. A container is required.";Y.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),Y.appendChild(this.content),this._resizeDOM()}cache(){return i.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(Y){Y.batchDraw()}),this}}e.Stage=V,V.prototype.nodeType=b,(0,c._registerNode)(V),t.Factory.addGetterSetter(V,"container"),a.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(Z=>{Z.batchDraw()})})}(z0)),z0}var bf={},B0={},Fm;function wr(){return Fm||(Fm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const i=Rt(),t=Nn(),n=It(),a=Hn(),l=Ft(),u=Rt(),c=h5(),h="hasShadow",b="shadowRGBA",_="patternImage",k="linearGradient",O="radialGradient";let v;function x(){return v||(v=t.Util.createCanvasElement().getContext("2d"),v)}e.shapes={};function g(E){const S=this.attrs.fillRule;S?E.fill(S):E.fill()}function p(E){E.stroke()}function P(E){const S=this.attrs.fillRule;S?E.fill(S):E.fill()}function d(E){E.stroke()}function m(){this._clearCache(h)}function y(){this._clearCache(b)}function w(){this._clearCache(_)}function L(){this._clearCache(k)}function R(){this._clearCache(O)}class D extends a.Node{constructor(S){super(S);let A;for(;A=t.Util.getRandomColor(),!(A&&!(A in e.shapes)););this.colorKey=A,e.shapes[A]=this}getContext(){return t.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return t.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(h,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(_,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const A=x().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(A&&A.setTransform){const M=new t.Transform;M.translate(this.fillPatternX(),this.fillPatternY()),M.rotate(i.Konva.getAngle(this.fillPatternRotation())),M.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),M.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const T=M.getMatrix(),B=typeof DOMMatrix>"u"?{a:T[0],b:T[1],c:T[2],d:T[3],e:T[4],f:T[5]}:new DOMMatrix(T);A.setTransform(B)}return A}}_getLinearGradient(){return this._getCache(k,this.__getLinearGradient)}__getLinearGradient(){const S=this.fillLinearGradientColorStops();if(S){const A=x(),M=this.fillLinearGradientStartPoint(),T=this.fillLinearGradientEndPoint(),B=A.createLinearGradient(M.x,M.y,T.x,T.y);for(let U=0;U<S.length;U+=2)B.addColorStop(S[U],S[U+1]);return B}}_getRadialGradient(){return this._getCache(O,this.__getRadialGradient)}__getRadialGradient(){const S=this.fillRadialGradientColorStops();if(S){const A=x(),M=this.fillRadialGradientStartPoint(),T=this.fillRadialGradientEndPoint(),B=A.createRadialGradient(M.x,M.y,this.fillRadialGradientStartRadius(),T.x,T.y,this.fillRadialGradientEndRadius());for(let U=0;U<S.length;U+=2)B.addColorStop(S[U],S[U+1]);return B}}getShadowRGBA(){return this._getCache(b,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const S=t.Util.colorToRGBA(this.shadowColor());if(S)return"rgba("+S.r+","+S.g+","+S.b+","+S.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){const S=this.hitStrokeWidth();return S==="auto"?this.hasStroke():this.strokeEnabled()&&!!S}intersects(S){const A=this.getStage();if(!A)return!1;const M=A.bufferHitCanvas;return M.getContext().clear(),this.drawHit(M,void 0,!0),M.context.getImageData(Math.round(S.x),Math.round(S.y),1,1).data[3]>0}destroy(){return a.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(S){var A;if(!((A=this.attrs.perfectDrawEnabled)!==null&&A!==void 0?A:!0))return!1;const T=S||this.hasFill(),B=this.hasStroke(),U=this.getAbsoluteOpacity()!==1;if(T&&B&&U)return!0;const Q=this.hasShadow(),X=this.shadowForStrokeEnabled();return!!(T&&B&&Q&&X)}setStrokeHitEnabled(S){t.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),S?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const S=this.size();return{x:this._centroid?-S.width/2:0,y:this._centroid?-S.height/2:0,width:S.width,height:S.height}}getClientRect(S={}){let A=!1,M=this.getParent();for(;M;){if(M.isCached()){A=!0;break}M=M.getParent()}const T=S.skipTransform,B=S.relativeTo||A&&this.getStage()||void 0,U=this.getSelfRect(),X=!S.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,$=U.width+X,j=U.height+X,I=!S.skipShadow&&this.hasShadow(),z=I?this.shadowOffsetX():0,H=I?this.shadowOffsetY():0,K=$+Math.abs(z),ee=j+Math.abs(H),V=I&&this.shadowBlur()||0,Z=K+V*2,Y=ee+V*2,ne={width:Z,height:Y,x:-(X/2+V)+Math.min(z,0)+U.x,y:-(X/2+V)+Math.min(H,0)+U.y};return T?ne:this._transformedRect(ne,B)}drawScene(S,A,M){const T=this.getLayer();let B=S||T.getCanvas(),U=B.getContext(),Q=this._getCanvasCache(),X=this.getSceneFunc(),$=this.hasShadow(),j,I;const z=B.isCache,H=A===this;if(!this.isVisible()&&!H)return this;if(Q){U.save();const ee=this.getAbsoluteTransform(A).getMatrix();return U.transform(ee[0],ee[1],ee[2],ee[3],ee[4],ee[5]),this._drawCachedSceneCanvas(U),U.restore(),this}if(!X)return this;if(U.save(),this._useBufferCanvas()&&!z){j=this.getStage();const ee=M||j.bufferCanvas;I=ee.getContext(),I.clear(),I.save(),I._applyLineJoin(this);var K=this.getAbsoluteTransform(A).getMatrix();I.transform(K[0],K[1],K[2],K[3],K[4],K[5]),X.call(this,I,this),I.restore();const V=ee.pixelRatio;$&&U._applyShadow(this),U._applyOpacity(this),U._applyGlobalCompositeOperation(this),U.drawImage(ee._canvas,0,0,ee.width/V,ee.height/V)}else{if(U._applyLineJoin(this),!H){var K=this.getAbsoluteTransform(A).getMatrix();U.transform(K[0],K[1],K[2],K[3],K[4],K[5]),U._applyOpacity(this),U._applyGlobalCompositeOperation(this)}$&&U._applyShadow(this),X.call(this,U,this)}return U.restore(),this}drawHit(S,A,M=!1){if(!this.shouldDrawHit(A,M))return this;const T=this.getLayer(),B=S||T.hitCanvas,U=B&&B.getContext(),Q=this.hitFunc()||this.sceneFunc(),X=this._getCanvasCache(),$=X&&X.hit;if(this.colorKey||t.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),$){U.save();const I=this.getAbsoluteTransform(A).getMatrix();return U.transform(I[0],I[1],I[2],I[3],I[4],I[5]),this._drawCachedHitCanvas(U),U.restore(),this}if(!Q)return this;if(U.save(),U._applyLineJoin(this),!(this===A)){const I=this.getAbsoluteTransform(A).getMatrix();U.transform(I[0],I[1],I[2],I[3],I[4],I[5])}return Q.call(this,U,this),U.restore(),this}drawHitFromCache(S=0){let A=this._getCanvasCache(),M=this._getCachedSceneCanvas(),T=A.hit,B=T.getContext(),U=T.getWidth(),Q=T.getHeight(),X,$,j,I,z,H;B.clear(),B.drawImage(M._canvas,0,0,U,Q);try{for(X=B.getImageData(0,0,U,Q),$=X.data,j=$.length,I=t.Util._hexToRgb(this.colorKey),z=0;z<j;z+=4)H=$[z+3],H>S?($[z]=I.r,$[z+1]=I.g,$[z+2]=I.b,$[z+3]=255):$[z+3]=0;B.putImageData(X,0,0)}catch(K){t.Util.error("Unable to draw hit graph from cached scene canvas. "+K.message)}return this}hasPointerCapture(S){return c.hasPointerCapture(S,this)}setPointerCapture(S){c.setPointerCapture(S,this)}releaseCapture(S){c.releaseCapture(S,this)}}e.Shape=D,D.prototype._fillFunc=g,D.prototype._strokeFunc=p,D.prototype._fillFuncHit=P,D.prototype._strokeFuncHit=d,D.prototype._centroid=!1,D.prototype.nodeType="Shape",(0,u._registerNode)(D),D.prototype.eventListeners={},D.prototype.on.call(D.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",m),D.prototype.on.call(D.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",y),D.prototype.on.call(D.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",w),D.prototype.on.call(D.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",L),D.prototype.on.call(D.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",R),n.Factory.addGetterSetter(D,"stroke",void 0,(0,l.getStringOrGradientValidator)()),n.Factory.addGetterSetter(D,"strokeWidth",2,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillAfterStrokeEnabled",!1),n.Factory.addGetterSetter(D,"hitStrokeWidth","auto",(0,l.getNumberOrAutoValidator)()),n.Factory.addGetterSetter(D,"strokeHitEnabled",!0,(0,l.getBooleanValidator)()),n.Factory.addGetterSetter(D,"perfectDrawEnabled",!0,(0,l.getBooleanValidator)()),n.Factory.addGetterSetter(D,"shadowForStrokeEnabled",!0,(0,l.getBooleanValidator)()),n.Factory.addGetterSetter(D,"lineJoin"),n.Factory.addGetterSetter(D,"lineCap"),n.Factory.addGetterSetter(D,"sceneFunc"),n.Factory.addGetterSetter(D,"hitFunc"),n.Factory.addGetterSetter(D,"dash"),n.Factory.addGetterSetter(D,"dashOffset",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"shadowColor",void 0,(0,l.getStringValidator)()),n.Factory.addGetterSetter(D,"shadowBlur",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"shadowOpacity",1,(0,l.getNumberValidator)()),n.Factory.addComponentsGetterSetter(D,"shadowOffset",["x","y"]),n.Factory.addGetterSetter(D,"shadowOffsetX",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"shadowOffsetY",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillPatternImage"),n.Factory.addGetterSetter(D,"fill",void 0,(0,l.getStringOrGradientValidator)()),n.Factory.addGetterSetter(D,"fillPatternX",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillPatternY",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillLinearGradientColorStops"),n.Factory.addGetterSetter(D,"strokeLinearGradientColorStops"),n.Factory.addGetterSetter(D,"fillRadialGradientStartRadius",0),n.Factory.addGetterSetter(D,"fillRadialGradientEndRadius",0),n.Factory.addGetterSetter(D,"fillRadialGradientColorStops"),n.Factory.addGetterSetter(D,"fillPatternRepeat","repeat"),n.Factory.addGetterSetter(D,"fillEnabled",!0),n.Factory.addGetterSetter(D,"strokeEnabled",!0),n.Factory.addGetterSetter(D,"shadowEnabled",!0),n.Factory.addGetterSetter(D,"dashEnabled",!0),n.Factory.addGetterSetter(D,"strokeScaleEnabled",!0),n.Factory.addGetterSetter(D,"fillPriority","color"),n.Factory.addComponentsGetterSetter(D,"fillPatternOffset",["x","y"]),n.Factory.addGetterSetter(D,"fillPatternOffsetX",0,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillPatternOffsetY",0,(0,l.getNumberValidator)()),n.Factory.addComponentsGetterSetter(D,"fillPatternScale",["x","y"]),n.Factory.addGetterSetter(D,"fillPatternScaleX",1,(0,l.getNumberValidator)()),n.Factory.addGetterSetter(D,"fillPatternScaleY",1,(0,l.getNumberValidator)()),n.Factory.addComponentsGetterSetter(D,"fillLinearGradientStartPoint",["x","y"]),n.Factory.addComponentsGetterSetter(D,"strokeLinearGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(D,"fillLinearGradientStartPointX",0),n.Factory.addGetterSetter(D,"strokeLinearGradientStartPointX",0),n.Factory.addGetterSetter(D,"fillLinearGradientStartPointY",0),n.Factory.addGetterSetter(D,"strokeLinearGradientStartPointY",0),n.Factory.addComponentsGetterSetter(D,"fillLinearGradientEndPoint",["x","y"]),n.Factory.addComponentsGetterSetter(D,"strokeLinearGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(D,"fillLinearGradientEndPointX",0),n.Factory.addGetterSetter(D,"strokeLinearGradientEndPointX",0),n.Factory.addGetterSetter(D,"fillLinearGradientEndPointY",0),n.Factory.addGetterSetter(D,"strokeLinearGradientEndPointY",0),n.Factory.addComponentsGetterSetter(D,"fillRadialGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(D,"fillRadialGradientStartPointX",0),n.Factory.addGetterSetter(D,"fillRadialGradientStartPointY",0),n.Factory.addComponentsGetterSetter(D,"fillRadialGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(D,"fillRadialGradientEndPointX",0),n.Factory.addGetterSetter(D,"fillRadialGradientEndPointY",0),n.Factory.addGetterSetter(D,"fillPatternRotation",0),n.Factory.addGetterSetter(D,"fillRule",void 0,(0,l.getStringValidator)()),n.Factory.backCompat(D,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})}(B0)),B0}var zm;function p5(){if(zm)return bf;zm=1,Object.defineProperty(bf,"__esModule",{value:!0}),bf.Layer=void 0;const e=Nn(),i=Np(),t=Hn(),n=It(),a=Lp(),l=Ft(),u=wr(),c=Rt(),h="#",b="beforeDraw",_="draw",k=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],O=k.length;class v extends i.Container{constructor(g){super(g),this.canvas=new a.SceneCanvas,this.hitCanvas=new a.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(g){return this.getContext().clear(g),this.getHitCanvas().getContext().clear(g),this}setZIndex(g){super.setZIndex(g);const p=this.getStage();return p&&p.content&&(p.content.removeChild(this.getNativeCanvasElement()),g<p.children.length-1?p.content.insertBefore(this.getNativeCanvasElement(),p.children[g+1].getCanvas()._canvas):p.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){t.Node.prototype.moveToTop.call(this);const g=this.getStage();return g&&g.content&&(g.content.removeChild(this.getNativeCanvasElement()),g.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!t.Node.prototype.moveUp.call(this))return!1;const p=this.getStage();return!p||!p.content?!1:(p.content.removeChild(this.getNativeCanvasElement()),this.index<p.children.length-1?p.content.insertBefore(this.getNativeCanvasElement(),p.children[this.index+1].getCanvas()._canvas):p.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(t.Node.prototype.moveDown.call(this)){const g=this.getStage();if(g){const p=g.children;g.content&&(g.content.removeChild(this.getNativeCanvasElement()),g.content.insertBefore(this.getNativeCanvasElement(),p[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(t.Node.prototype.moveToBottom.call(this)){const g=this.getStage();if(g){const p=g.children;g.content&&(g.content.removeChild(this.getNativeCanvasElement()),g.content.insertBefore(this.getNativeCanvasElement(),p[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const g=this.getNativeCanvasElement();return t.Node.prototype.remove.call(this),g&&g.parentNode&&e.Util._isInDocument(g)&&g.parentNode.removeChild(g),this}getStage(){return this.parent}setSize({width:g,height:p}){return this.canvas.setSize(g,p),this.hitCanvas.setSize(g,p),this._setSmoothEnabled(),this}_validateAdd(g){const p=g.getType();p!=="Group"&&p!=="Shape"&&e.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(g){return g=g||{},g.width=g.width||this.getWidth(),g.height=g.height||this.getHeight(),g.x=g.x!==void 0?g.x:this.x(),g.y=g.y!==void 0?g.y:this.y(),t.Node.prototype._toKonvaCanvas.call(this,g)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){e.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){e.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,e.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(g){if(!this.isListening()||!this.isVisible())return null;let p=1,P=!1;for(;;){for(let d=0;d<O;d++){const m=k[d],y=this._getIntersection({x:g.x+m.x*p,y:g.y+m.y*p}),w=y.shape;if(w)return w;if(P=!!y.antialiased,!y.antialiased)break}if(P)p+=1;else return null}}_getIntersection(g){const p=this.hitCanvas.pixelRatio,P=this.hitCanvas.context.getImageData(Math.round(g.x*p),Math.round(g.y*p),1,1).data,d=P[3];if(d===255){const m=e.Util._rgbToHex(P[0],P[1],P[2]),y=u.shapes[h+m];return y?{shape:y}:{antialiased:!0}}else if(d>0)return{antialiased:!0};return{}}drawScene(g,p){const P=this.getLayer(),d=g||P&&P.getCanvas();return this._fire(b,{node:this}),this.clearBeforeDraw()&&d.getContext().clear(),i.Container.prototype.drawScene.call(this,d,p),this._fire(_,{node:this}),this}drawHit(g,p){const P=this.getLayer(),d=g||P&&P.hitCanvas;return P&&P.clearBeforeDraw()&&P.getHitCanvas().getContext().clear(),i.Container.prototype.drawHit.call(this,d,p),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(g){e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(g)}getHitGraphEnabled(g){return e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const g=this.parent;!!this.hitCanvas._canvas.parentNode?g.content.removeChild(this.hitCanvas._canvas):g.content.appendChild(this.hitCanvas._canvas)}destroy(){return e.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}return bf.Layer=v,v.prototype.nodeType="Layer",(0,c._registerNode)(v),n.Factory.addGetterSetter(v,"imageSmoothingEnabled",!0),n.Factory.addGetterSetter(v,"clearBeforeDraw",!0),n.Factory.addGetterSetter(v,"hitGraphEnabled",!0,(0,l.getBooleanValidator)()),bf}var _f={},Bm;function e8(){if(Bm)return _f;Bm=1,Object.defineProperty(_f,"__esModule",{value:!0}),_f.FastLayer=void 0;const e=Nn(),i=p5(),t=Rt();class n extends i.Layer{constructor(l){super(l),this.listening(!1),e.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}return _f.FastLayer=n,n.prototype.nodeType="FastLayer",(0,t._registerNode)(n),_f}var wf={},Um;function tv(){if(Um)return wf;Um=1,Object.defineProperty(wf,"__esModule",{value:!0}),wf.Group=void 0;const e=Nn(),i=Np(),t=Rt();class n extends i.Container{_validateAdd(l){const u=l.getType();u!=="Group"&&u!=="Shape"&&e.Util.throw("You may only add groups and shapes to groups.")}}return wf.Group=n,n.prototype.nodeType="Group",(0,t._registerNode)(n),wf}var Sf={},qm;function nv(){if(qm)return Sf;qm=1,Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.Animation=void 0;const e=Rt(),i=Nn(),t=function(){return e.glob.performance&&e.glob.performance.now?function(){return e.glob.performance.now()}:function(){return new Date().getTime()}}();let n=class Ju{constructor(l,u){this.id=Ju.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:t(),frameRate:0},this.func=l,this.setLayers(u)}setLayers(l){let u=[];return l&&(u=Array.isArray(l)?l:[l]),this.layers=u,this}getLayers(){return this.layers}addLayer(l){const u=this.layers,c=u.length;for(let h=0;h<c;h++)if(u[h]._id===l._id)return!1;return this.layers.push(l),!0}isRunning(){const u=Ju.animations,c=u.length;for(let h=0;h<c;h++)if(u[h].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=t(),Ju._addAnimation(this),this}stop(){return Ju._removeAnimation(this),this}_updateFrameObject(l){this.frame.timeDiff=l-this.frame.lastTime,this.frame.lastTime=l,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(l){this.animations.push(l),this._handleAnimation()}static _removeAnimation(l){const u=l.id,c=this.animations,h=c.length;for(let b=0;b<h;b++)if(c[b].id===u){this.animations.splice(b,1);break}}static _runFrames(){const l={},u=this.animations;for(let c=0;c<u.length;c++){const h=u[c],b=h.layers,_=h.func;h._updateFrameObject(t());const k=b.length;let O;if(_?O=_.call(h,h.frame)!==!1:O=!0,!!O)for(let v=0;v<k;v++){const x=b[v];x._id!==void 0&&(l[x._id]=x)}}for(const c in l)l.hasOwnProperty(c)&&l[c].batchDraw()}static _animationLoop(){const l=Ju;l.animations.length?(l._runFrames(),i.Util.requestAnimFrame(l._animationLoop)):l.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,i.Util.requestAnimFrame(this._animationLoop))}};return Sf.Animation=n,n.animations=[],n.animIdCounter=0,n.animRunning=!1,Sf}var U0={},Hm;function t8(){return Hm||(Hm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const i=Nn(),t=nv(),n=Hn(),a=Rt();let l={node:1,duration:1,easing:1,onFinish:1,yoyo:1},u=1,c=2,h=3,b=0,_=["fill","stroke","shadowColor"];class k{constructor(x,g,p,P,d,m,y){this.prop=x,this.propFunc=g,this.begin=P,this._pos=P,this.duration=m,this._change=0,this.prevPos=0,this.yoyo=y,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=p,this._change=d-this.begin,this.pause()}fire(x){const g=this[x];g&&g()}setTime(x){x>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():x<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=x,this.update())}getTime(){return this._time}setPosition(x){this.prevPos=this._pos,this.propFunc(x),this._pos=x}getPosition(x){return x===void 0&&(x=this._time),this.func(x,this.begin,this._change,this.duration)}play(){this.state=c,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=h,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(x){this.pause(),this._time=x,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const x=this.getTimer()-this._startTime;this.state===c?this.setTime(x):this.state===h&&this.setTime(this.duration-x)}pause(){this.state=u,this.fire("onPause")}getTimer(){return new Date().getTime()}}class O{constructor(x){let g=this,p=x.node,P=p._id,d,m=x.easing||e.Easings.Linear,y=!!x.yoyo,w;typeof x.duration>"u"?d=.3:x.duration===0?d=.001:d=x.duration,this.node=p,this._id=b++;const L=p.getLayer()||(p instanceof a.Konva.Stage?p.getLayers():null);L||i.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new t.Animation(function(){g.tween.onEnterFrame()},L),this.tween=new k(w,function(R){g._tweenFunc(R)},m,0,1,d*1e3,y),this._addListeners(),O.attrs[P]||(O.attrs[P]={}),O.attrs[P][this._id]||(O.attrs[P][this._id]={}),O.tweens[P]||(O.tweens[P]={});for(w in x)l[w]===void 0&&this._addAttr(w,x[w]);this.reset(),this.onFinish=x.onFinish,this.onReset=x.onReset,this.onUpdate=x.onUpdate}_addAttr(x,g){let p=this.node,P=p._id,d,m,y,w,L,R,D,E;if(y=O.tweens[P][x],y&&delete O.attrs[P][y][x],d=p.getAttr(x),i.Util._isArray(g))if(m=[],L=Math.max(g.length,d.length),x==="points"&&g.length!==d.length&&(g.length>d.length?(D=d,d=i.Util._prepareArrayForTween(d,g,p.closed())):(R=g,g=i.Util._prepareArrayForTween(g,d,p.closed()))),x.indexOf("fill")===0)for(w=0;w<L;w++)if(w%2===0)m.push(g[w]-d[w]);else{const S=i.Util.colorToRGBA(d[w]);E=i.Util.colorToRGBA(g[w]),d[w]=S,m.push({r:E.r-S.r,g:E.g-S.g,b:E.b-S.b,a:E.a-S.a})}else for(w=0;w<L;w++)m.push(g[w]-d[w]);else _.indexOf(x)!==-1?(d=i.Util.colorToRGBA(d),E=i.Util.colorToRGBA(g),m={r:E.r-d.r,g:E.g-d.g,b:E.b-d.b,a:E.a-d.a}):m=g-d;O.attrs[P][this._id][x]={start:d,diff:m,end:g,trueEnd:R,trueStart:D},O.tweens[P][x]=this._id}_tweenFunc(x){let g=this.node,p=O.attrs[g._id][this._id],P,d,m,y,w,L,R,D;for(P in p){if(d=p[P],m=d.start,y=d.diff,D=d.end,i.Util._isArray(m))if(w=[],R=Math.max(m.length,D.length),P.indexOf("fill")===0)for(L=0;L<R;L++)L%2===0?w.push((m[L]||0)+y[L]*x):w.push("rgba("+Math.round(m[L].r+y[L].r*x)+","+Math.round(m[L].g+y[L].g*x)+","+Math.round(m[L].b+y[L].b*x)+","+(m[L].a+y[L].a*x)+")");else for(L=0;L<R;L++)w.push((m[L]||0)+y[L]*x);else _.indexOf(P)!==-1?w="rgba("+Math.round(m.r+y.r*x)+","+Math.round(m.g+y.g*x)+","+Math.round(m.b+y.b*x)+","+(m.a+y.a*x)+")":w=m+y*x;g.setAttr(P,w)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const x=this.node,g=O.attrs[x._id][this._id];g.points&&g.points.trueEnd&&x.setAttr("points",g.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const x=this.node,g=O.attrs[x._id][this._id];g.points&&g.points.trueStart&&x.points(g.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(x){return this.tween.seek(x*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){let x=this.node._id,g=this._id,p=O.tweens[x],P;this.pause();for(P in p)delete O.tweens[x][P];delete O.attrs[x][g]}}e.Tween=O,O.attrs={},O.tweens={},n.Node.prototype.to=function(v){const x=v.onFinish;v.node=this,v.onFinish=function(){this.destroy(),x&&x()},new O(v).play()},e.Easings={BackEaseIn(v,x,g,p){return g*(v/=p)*v*((1.70158+1)*v-1.70158)+x},BackEaseOut(v,x,g,p){return g*((v=v/p-1)*v*((1.70158+1)*v+1.70158)+1)+x},BackEaseInOut(v,x,g,p){let P=1.70158;return(v/=p/2)<1?g/2*(v*v*(((P*=1.525)+1)*v-P))+x:g/2*((v-=2)*v*(((P*=1.525)+1)*v+P)+2)+x},ElasticEaseIn(v,x,g,p,P,d){let m=0;return v===0?x:(v/=p)===1?x+g:(d||(d=p*.3),!P||P<Math.abs(g)?(P=g,m=d/4):m=d/(2*Math.PI)*Math.asin(g/P),-(P*Math.pow(2,10*(v-=1))*Math.sin((v*p-m)*(2*Math.PI)/d))+x)},ElasticEaseOut(v,x,g,p,P,d){let m=0;return v===0?x:(v/=p)===1?x+g:(d||(d=p*.3),!P||P<Math.abs(g)?(P=g,m=d/4):m=d/(2*Math.PI)*Math.asin(g/P),P*Math.pow(2,-10*v)*Math.sin((v*p-m)*(2*Math.PI)/d)+g+x)},ElasticEaseInOut(v,x,g,p,P,d){let m=0;return v===0?x:(v/=p/2)===2?x+g:(d||(d=p*(.3*1.5)),!P||P<Math.abs(g)?(P=g,m=d/4):m=d/(2*Math.PI)*Math.asin(g/P),v<1?-.5*(P*Math.pow(2,10*(v-=1))*Math.sin((v*p-m)*(2*Math.PI)/d))+x:P*Math.pow(2,-10*(v-=1))*Math.sin((v*p-m)*(2*Math.PI)/d)*.5+g+x)},BounceEaseOut(v,x,g,p){return(v/=p)<1/2.75?g*(7.5625*v*v)+x:v<2/2.75?g*(7.5625*(v-=1.5/2.75)*v+.75)+x:v<2.5/2.75?g*(7.5625*(v-=2.25/2.75)*v+.9375)+x:g*(7.5625*(v-=2.625/2.75)*v+.984375)+x},BounceEaseIn(v,x,g,p){return g-e.Easings.BounceEaseOut(p-v,0,g,p)+x},BounceEaseInOut(v,x,g,p){return v<p/2?e.Easings.BounceEaseIn(v*2,0,g,p)*.5+x:e.Easings.BounceEaseOut(v*2-p,0,g,p)*.5+g*.5+x},EaseIn(v,x,g,p){return g*(v/=p)*v+x},EaseOut(v,x,g,p){return-g*(v/=p)*(v-2)+x},EaseInOut(v,x,g,p){return(v/=p/2)<1?g/2*v*v+x:-g/2*(--v*(v-2)-1)+x},StrongEaseIn(v,x,g,p){return g*(v/=p)*v*v*v*v+x},StrongEaseOut(v,x,g,p){return g*((v=v/p-1)*v*v*v*v+1)+x},StrongEaseInOut(v,x,g,p){return(v/=p/2)<1?g/2*v*v*v*v*v+x:g/2*((v-=2)*v*v*v*v+2)+x},Linear(v,x,g,p){return g*v/p+x}}}(U0)),U0}var Gm;function kg(){return Gm||(Gm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const i=Rt(),t=Nn(),n=Hn(),a=Np(),l=Jw(),u=p5(),c=e8(),h=tv(),b=ev(),_=wr(),k=nv(),O=t8(),v=d5(),x=Lp();e.Konva=t.Util._assign(i.Konva,{Util:t.Util,Transform:t.Transform,Node:n.Node,Container:a.Container,Stage:l.Stage,stages:l.stages,Layer:u.Layer,FastLayer:c.FastLayer,Group:h.Group,DD:b.DD,Shape:_.Shape,shapes:_.shapes,Animation:k.Animation,Tween:O.Tween,Easings:O.Easings,Context:v.Context,Canvas:x.Canvas}),e.default=e.Konva}(N0)),N0}var Ef={},Vm;function n8(){if(Vm)return Ef;Vm=1,Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.Arc=void 0;const e=It(),i=wr(),t=Rt(),n=Ft(),a=Rt();class l extends i.Shape{_sceneFunc(c){const h=t.Konva.getAngle(this.angle()),b=this.clockwise();c.beginPath(),c.arc(0,0,this.outerRadius(),0,h,b),c.arc(0,0,this.innerRadius(),h,0,!b),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(c){this.outerRadius(c/2)}setHeight(c){this.outerRadius(c/2)}getSelfRect(){const c=this.innerRadius(),h=this.outerRadius(),b=this.clockwise(),_=t.Konva.getAngle(b?360-this.angle():this.angle()),k=Math.cos(Math.min(_,Math.PI)),O=1,v=Math.sin(Math.min(Math.max(Math.PI,_),3*Math.PI/2)),x=Math.sin(Math.min(_,Math.PI/2)),g=k*(k>0?c:h),p=O*h,P=v*(v>0?c:h),d=x*(x>0?h:c);return{x:g,y:b?-1*d:P,width:p-g,height:d-P}}}return Ef.Arc=l,l.prototype._centroid=!0,l.prototype.className="Arc",l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,a._registerNode)(l),e.Factory.addGetterSetter(l,"innerRadius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"outerRadius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"angle",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"clockwise",!1,(0,n.getBooleanValidator)()),Ef}var Of={},xf={},$m;function g5(){if($m)return xf;$m=1,Object.defineProperty(xf,"__esModule",{value:!0}),xf.Line=void 0;const e=It(),i=Rt(),t=wr(),n=Ft();function a(c,h,b,_,k,O,v){const x=Math.sqrt(Math.pow(b-c,2)+Math.pow(_-h,2)),g=Math.sqrt(Math.pow(k-b,2)+Math.pow(O-_,2)),p=v*x/(x+g),P=v*g/(x+g),d=b-p*(k-c),m=_-p*(O-h),y=b+P*(k-c),w=_+P*(O-h);return[d,m,y,w]}function l(c,h){const b=c.length,_=[];for(let k=2;k<b-2;k+=2){const O=a(c[k-2],c[k-1],c[k],c[k+1],c[k+2],c[k+3],h);isNaN(O[0])||(_.push(O[0]),_.push(O[1]),_.push(c[k]),_.push(c[k+1]),_.push(O[2]),_.push(O[3]))}return _}class u extends t.Shape{constructor(h){super(h),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(h){let b=this.points(),_=b.length,k=this.tension(),O=this.closed(),v=this.bezier(),x,g,p;if(_){if(h.beginPath(),h.moveTo(b[0],b[1]),k!==0&&_>4){for(x=this.getTensionPoints(),g=x.length,p=O?0:4,O||h.quadraticCurveTo(x[0],x[1],x[2],x[3]);p<g-2;)h.bezierCurveTo(x[p++],x[p++],x[p++],x[p++],x[p++],x[p++]);O||h.quadraticCurveTo(x[g-2],x[g-1],b[_-2],b[_-1])}else if(v)for(p=2;p<_;)h.bezierCurveTo(b[p++],b[p++],b[p++],b[p++],b[p++],b[p++]);else for(p=2;p<_;p+=2)h.lineTo(b[p],b[p+1]);O?(h.closePath(),h.fillStrokeShape(this)):h.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():l(this.points(),this.tension())}_getTensionPointsClosed(){const h=this.points(),b=h.length,_=this.tension(),k=a(h[b-2],h[b-1],h[0],h[1],h[2],h[3],_),O=a(h[b-4],h[b-3],h[b-2],h[b-1],h[0],h[1],_),v=l(h,_);return[k[2],k[3]].concat(v).concat([O[0],O[1],h[b-2],h[b-1],O[2],O[3],k[0],k[1],h[0],h[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let h=this.points();if(h.length<4)return{x:h[0]||0,y:h[1]||0,width:0,height:0};this.tension()!==0?h=[h[0],h[1],...this._getTensionPoints(),h[h.length-2],h[h.length-1]]:h=this.points();let b=h[0],_=h[0],k=h[1],O=h[1],v,x;for(let g=0;g<h.length/2;g++)v=h[g*2],x=h[g*2+1],b=Math.min(b,v),_=Math.max(_,v),k=Math.min(k,x),O=Math.max(O,x);return{x:b,y:k,width:_-b,height:O-k}}}return xf.Line=u,u.prototype.className="Line",u.prototype._attrsAffectingSize=["points","bezier","tension"],(0,i._registerNode)(u),e.Factory.addGetterSetter(u,"closed",!1),e.Factory.addGetterSetter(u,"bezier",!1),e.Factory.addGetterSetter(u,"tension",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(u,"points",[],(0,n.getNumberArrayValidator)()),xf}var Pf={},q0={},Wm;function r8(){return Wm||(Wm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const i=(u,c,h)=>{let b,_;const O=h/2;b=0;for(let v=0;v<20;v++)_=O*e.tValues[20][v]+O,b+=e.cValues[20][v]*n(u,c,_);return O*b};e.getCubicArcLength=i;const t=(u,c,h)=>{h===void 0&&(h=1);const b=u[0]-2*u[1]+u[2],_=c[0]-2*c[1]+c[2],k=2*u[1]-2*u[0],O=2*c[1]-2*c[0],v=4*(b*b+_*_),x=4*(b*k+_*O),g=k*k+O*O;if(v===0)return h*Math.sqrt(Math.pow(u[2]-u[0],2)+Math.pow(c[2]-c[0],2));const p=x/(2*v),P=g/v,d=h+p,m=P-p*p,y=d*d+m>0?Math.sqrt(d*d+m):0,w=p*p+m>0?Math.sqrt(p*p+m):0,L=p+Math.sqrt(p*p+m)!==0?m*Math.log(Math.abs((d+y)/(p+w))):0;return Math.sqrt(v)/2*(d*y-p*w+L)};e.getQuadraticArcLength=t;function n(u,c,h){const b=a(1,h,u),_=a(1,h,c),k=b*b+_*_;return Math.sqrt(k)}const a=(u,c,h)=>{const b=h.length-1;let _,k;if(b===0)return 0;if(u===0){k=0;for(let O=0;O<=b;O++)k+=e.binomialCoefficients[b][O]*Math.pow(1-c,b-O)*Math.pow(c,O)*h[O];return k}else{_=new Array(b);for(let O=0;O<b;O++)_[O]=b*(h[O+1]-h[O]);return a(u-1,c,_)}},l=(u,c,h)=>{let b=1,_=u/c,k=(u-h(_))/c,O=0;for(;b>.001;){const v=h(_+k),x=Math.abs(u-v)/c;if(x<b)b=x,_+=k;else{const g=h(_-k),p=Math.abs(u-g)/c;p<b?(b=p,_-=k):k/=2}if(O++,O>500)break}return _};e.t2length=l}(q0)),q0}var Ym;function rv(){if(Ym)return Pf;Ym=1,Object.defineProperty(Pf,"__esModule",{value:!0}),Pf.Path=void 0;const e=It(),i=wr(),t=Rt(),n=r8();class a extends i.Shape{constructor(u){super(u),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=a.parsePathData(this.data()),this.pathLength=a.getPathLength(this.dataArray)}_sceneFunc(u){const c=this.dataArray;u.beginPath();let h=!1;for(let y=0;y<c.length;y++){const w=c[y].command,L=c[y].points;switch(w){case"L":u.lineTo(L[0],L[1]);break;case"M":u.moveTo(L[0],L[1]);break;case"C":u.bezierCurveTo(L[0],L[1],L[2],L[3],L[4],L[5]);break;case"Q":u.quadraticCurveTo(L[0],L[1],L[2],L[3]);break;case"A":var b=L[0],_=L[1],k=L[2],O=L[3],v=L[4],x=L[5],g=L[6],p=L[7],P=k>O?k:O,d=k>O?1:k/O,m=k>O?O/k:1;u.translate(b,_),u.rotate(g),u.scale(d,m),u.arc(0,0,P,v,v+x,1-p),u.scale(1/d,1/m),u.rotate(-g),u.translate(-b,-_);break;case"z":h=!0,u.closePath();break}}!h&&!this.hasFill()?u.strokeShape(this):u.fillStrokeShape(this)}getSelfRect(){let u=[];this.dataArray.forEach(function(v){if(v.command==="A"){const x=v.points[4],g=v.points[5],p=v.points[4]+g;let P=Math.PI/180;if(Math.abs(x-p)<P&&(P=Math.abs(x-p)),g<0)for(let d=x-P;d>p;d-=P){const m=a.getPointOnEllipticalArc(v.points[0],v.points[1],v.points[2],v.points[3],d,0);u.push(m.x,m.y)}else for(let d=x+P;d<p;d+=P){const m=a.getPointOnEllipticalArc(v.points[0],v.points[1],v.points[2],v.points[3],d,0);u.push(m.x,m.y)}}else if(v.command==="C")for(let x=0;x<=1;x+=.01){const g=a.getPointOnCubicBezier(x,v.start.x,v.start.y,v.points[0],v.points[1],v.points[2],v.points[3],v.points[4],v.points[5]);u.push(g.x,g.y)}else u=u.concat(v.points)});let c=u[0],h=u[0],b=u[1],_=u[1],k,O;for(let v=0;v<u.length/2;v++)k=u[v*2],O=u[v*2+1],isNaN(k)||(c=Math.min(c,k),h=Math.max(h,k)),isNaN(O)||(b=Math.min(b,O),_=Math.max(_,O));return{x:c,y:b,width:h-c,height:_-b}}getLength(){return this.pathLength}getPointAtLength(u){return a.getPointAtLengthOfDataArray(u,this.dataArray)}static getLineLength(u,c,h,b){return Math.sqrt((h-u)*(h-u)+(b-c)*(b-c))}static getPathLength(u){let c=0;for(let h=0;h<u.length;++h)c+=u[h].pathLength;return c}static getPointAtLengthOfDataArray(u,c){let h,b=0,_=c.length;if(!_)return null;for(;b<_&&u>c[b].pathLength;)u-=c[b].pathLength,++b;if(b===_)return h=c[b-1].points.slice(-2),{x:h[0],y:h[1]};if(u<.01)return h=c[b].points.slice(0,2),{x:h[0],y:h[1]};const k=c[b],O=k.points;switch(k.command){case"L":return a.getPointOnLine(u,k.start.x,k.start.y,O[0],O[1]);case"C":return a.getPointOnCubicBezier((0,n.t2length)(u,a.getPathLength(c),y=>(0,n.getCubicArcLength)([k.start.x,O[0],O[2],O[4]],[k.start.y,O[1],O[3],O[5]],y)),k.start.x,k.start.y,O[0],O[1],O[2],O[3],O[4],O[5]);case"Q":return a.getPointOnQuadraticBezier((0,n.t2length)(u,a.getPathLength(c),y=>(0,n.getQuadraticArcLength)([k.start.x,O[0],O[2]],[k.start.y,O[1],O[3]],y)),k.start.x,k.start.y,O[0],O[1],O[2],O[3]);case"A":var v=O[0],x=O[1],g=O[2],p=O[3],P=O[4],d=O[5],m=O[6];return P+=d*u/k.pathLength,a.getPointOnEllipticalArc(v,x,g,p,P,m)}return null}static getPointOnLine(u,c,h,b,_,k,O){k=k??c,O=O??h;const v=this.getLineLength(c,h,b,_);if(v<1e-10)return{x:c,y:h};if(b===c)return{x:k,y:O+(_>h?u:-u)};const x=(_-h)/(b-c),g=Math.sqrt(u*u/(1+x*x))*(b<c?-1:1),p=x*g;if(Math.abs(O-h-x*(k-c))<1e-10)return{x:k+g,y:O+p};const P=((k-c)*(b-c)+(O-h)*(_-h))/(v*v),d=c+P*(b-c),m=h+P*(_-h),y=this.getLineLength(k,O,d,m),w=Math.sqrt(u*u-y*y),L=Math.sqrt(w*w/(1+x*x))*(b<c?-1:1),R=x*L;return{x:d+L,y:m+R}}static getPointOnCubicBezier(u,c,h,b,_,k,O,v,x){function g(w){return w*w*w}function p(w){return 3*w*w*(1-w)}function P(w){return 3*w*(1-w)*(1-w)}function d(w){return(1-w)*(1-w)*(1-w)}const m=v*g(u)+k*p(u)+b*P(u)+c*d(u),y=x*g(u)+O*p(u)+_*P(u)+h*d(u);return{x:m,y}}static getPointOnQuadraticBezier(u,c,h,b,_,k,O){function v(d){return d*d}function x(d){return 2*d*(1-d)}function g(d){return(1-d)*(1-d)}const p=k*v(u)+b*x(u)+c*g(u),P=O*v(u)+_*x(u)+h*g(u);return{x:p,y:P}}static getPointOnEllipticalArc(u,c,h,b,_,k){const O=Math.cos(k),v=Math.sin(k),x={x:h*Math.cos(_),y:b*Math.sin(_)};return{x:u+(x.x*O-x.y*v),y:c+(x.x*v+x.y*O)}}static parsePathData(u){if(!u)return[];let c=u;const h=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];c=c.replace(new RegExp(" ","g"),",");for(var b=0;b<h.length;b++)c=c.replace(new RegExp(h[b],"g"),"|"+h[b]);const _=c.split("|"),k=[],O=[];let v=0,x=0;const g=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let p;for(b=1;b<_.length;b++){let T=_[b],B=T.charAt(0);for(T=T.slice(1),O.length=0;p=g.exec(T);)O.push(p[0]);const U=[];for(let Q=0,X=O.length;Q<X;Q++){if(O[Q]==="00"){U.push(0,0);continue}const $=parseFloat(O[Q]);isNaN($)?U.push(0):U.push($)}for(;U.length>0&&!isNaN(U[0]);){let Q="",X=[];const $=v,j=x;var P,d,m,y,w,L,R,D,E,S;switch(B){case"l":v+=U.shift(),x+=U.shift(),Q="L",X.push(v,x);break;case"L":v=U.shift(),x=U.shift(),X.push(v,x);break;case"m":var A=U.shift(),M=U.shift();if(v+=A,x+=M,Q="M",k.length>2&&k[k.length-1].command==="z"){for(let I=k.length-2;I>=0;I--)if(k[I].command==="M"){v=k[I].points[0]+A,x=k[I].points[1]+M;break}}X.push(v,x),B="l";break;case"M":v=U.shift(),x=U.shift(),Q="M",X.push(v,x),B="L";break;case"h":v+=U.shift(),Q="L",X.push(v,x);break;case"H":v=U.shift(),Q="L",X.push(v,x);break;case"v":x+=U.shift(),Q="L",X.push(v,x);break;case"V":x=U.shift(),Q="L",X.push(v,x);break;case"C":X.push(U.shift(),U.shift(),U.shift(),U.shift()),v=U.shift(),x=U.shift(),X.push(v,x);break;case"c":X.push(v+U.shift(),x+U.shift(),v+U.shift(),x+U.shift()),v+=U.shift(),x+=U.shift(),Q="C",X.push(v,x);break;case"S":d=v,m=x,P=k[k.length-1],P.command==="C"&&(d=v+(v-P.points[2]),m=x+(x-P.points[3])),X.push(d,m,U.shift(),U.shift()),v=U.shift(),x=U.shift(),Q="C",X.push(v,x);break;case"s":d=v,m=x,P=k[k.length-1],P.command==="C"&&(d=v+(v-P.points[2]),m=x+(x-P.points[3])),X.push(d,m,v+U.shift(),x+U.shift()),v+=U.shift(),x+=U.shift(),Q="C",X.push(v,x);break;case"Q":X.push(U.shift(),U.shift()),v=U.shift(),x=U.shift(),X.push(v,x);break;case"q":X.push(v+U.shift(),x+U.shift()),v+=U.shift(),x+=U.shift(),Q="Q",X.push(v,x);break;case"T":d=v,m=x,P=k[k.length-1],P.command==="Q"&&(d=v+(v-P.points[0]),m=x+(x-P.points[1])),v=U.shift(),x=U.shift(),Q="Q",X.push(d,m,v,x);break;case"t":d=v,m=x,P=k[k.length-1],P.command==="Q"&&(d=v+(v-P.points[0]),m=x+(x-P.points[1])),v+=U.shift(),x+=U.shift(),Q="Q",X.push(d,m,v,x);break;case"A":y=U.shift(),w=U.shift(),L=U.shift(),R=U.shift(),D=U.shift(),E=v,S=x,v=U.shift(),x=U.shift(),Q="A",X=this.convertEndpointToCenterParameterization(E,S,v,x,R,D,y,w,L);break;case"a":y=U.shift(),w=U.shift(),L=U.shift(),R=U.shift(),D=U.shift(),E=v,S=x,v+=U.shift(),x+=U.shift(),Q="A",X=this.convertEndpointToCenterParameterization(E,S,v,x,R,D,y,w,L);break}k.push({command:Q||B,points:X,start:{x:$,y:j},pathLength:this.calcLength($,j,Q||B,X)})}(B==="z"||B==="Z")&&k.push({command:"z",points:[],start:void 0,pathLength:0})}return k}static calcLength(u,c,h,b){let _,k,O,v;const x=a;switch(h){case"L":return x.getLineLength(u,c,b[0],b[1]);case"C":return(0,n.getCubicArcLength)([u,b[0],b[2],b[4]],[c,b[1],b[3],b[5]],1);case"Q":return(0,n.getQuadraticArcLength)([u,b[0],b[2]],[c,b[1],b[3]],1);case"A":_=0;var g=b[4],p=b[5],P=b[4]+p,d=Math.PI/180;if(Math.abs(g-P)<d&&(d=Math.abs(g-P)),k=x.getPointOnEllipticalArc(b[0],b[1],b[2],b[3],g,0),p<0)for(v=g-d;v>P;v-=d)O=x.getPointOnEllipticalArc(b[0],b[1],b[2],b[3],v,0),_+=x.getLineLength(k.x,k.y,O.x,O.y),k=O;else for(v=g+d;v<P;v+=d)O=x.getPointOnEllipticalArc(b[0],b[1],b[2],b[3],v,0),_+=x.getLineLength(k.x,k.y,O.x,O.y),k=O;return O=x.getPointOnEllipticalArc(b[0],b[1],b[2],b[3],P,0),_+=x.getLineLength(k.x,k.y,O.x,O.y),_}return 0}static convertEndpointToCenterParameterization(u,c,h,b,_,k,O,v,x){const g=x*(Math.PI/180),p=Math.cos(g)*(u-h)/2+Math.sin(g)*(c-b)/2,P=-1*Math.sin(g)*(u-h)/2+Math.cos(g)*(c-b)/2,d=p*p/(O*O)+P*P/(v*v);d>1&&(O*=Math.sqrt(d),v*=Math.sqrt(d));let m=Math.sqrt((O*O*(v*v)-O*O*(P*P)-v*v*(p*p))/(O*O*(P*P)+v*v*(p*p)));_===k&&(m*=-1),isNaN(m)&&(m=0);const y=m*O*P/v,w=m*-v*p/O,L=(u+h)/2+Math.cos(g)*y-Math.sin(g)*w,R=(c+b)/2+Math.sin(g)*y+Math.cos(g)*w,D=function(U){return Math.sqrt(U[0]*U[0]+U[1]*U[1])},E=function(U,Q){return(U[0]*Q[0]+U[1]*Q[1])/(D(U)*D(Q))},S=function(U,Q){return(U[0]*Q[1]<U[1]*Q[0]?-1:1)*Math.acos(E(U,Q))},A=S([1,0],[(p-y)/O,(P-w)/v]),M=[(p-y)/O,(P-w)/v],T=[(-1*p-y)/O,(-1*P-w)/v];let B=S(M,T);return E(M,T)<=-1&&(B=Math.PI),E(M,T)>=1&&(B=0),k===0&&B>0&&(B=B-2*Math.PI),k===1&&B<0&&(B=B+2*Math.PI),[L,R,O,v,A,B,g,k]}}return Pf.Path=a,a.prototype.className="Path",a.prototype._attrsAffectingSize=["data"],(0,t._registerNode)(a),e.Factory.addGetterSetter(a,"data"),Pf}var Km;function i8(){if(Km)return Of;Km=1,Object.defineProperty(Of,"__esModule",{value:!0}),Of.Arrow=void 0;const e=It(),i=g5(),t=Ft(),n=Rt(),a=rv();class l extends i.Line{_sceneFunc(c){super._sceneFunc(c);const h=Math.PI*2,b=this.points();let _=b;const k=this.tension()!==0&&b.length>4;k&&(_=this.getTensionPoints());const O=this.pointerLength(),v=b.length;let x,g;if(k){const d=[_[_.length-4],_[_.length-3],_[_.length-2],_[_.length-1],b[v-2],b[v-1]],m=a.Path.calcLength(_[_.length-4],_[_.length-3],"C",d),y=a.Path.getPointOnQuadraticBezier(Math.min(1,1-O/m),d[0],d[1],d[2],d[3],d[4],d[5]);x=b[v-2]-y.x,g=b[v-1]-y.y}else x=b[v-2]-b[v-4],g=b[v-1]-b[v-3];const p=(Math.atan2(g,x)+h)%h,P=this.pointerWidth();this.pointerAtEnding()&&(c.save(),c.beginPath(),c.translate(b[v-2],b[v-1]),c.rotate(p),c.moveTo(0,0),c.lineTo(-O,P/2),c.lineTo(-O,-P/2),c.closePath(),c.restore(),this.__fillStroke(c)),this.pointerAtBeginning()&&(c.save(),c.beginPath(),c.translate(b[0],b[1]),k?(x=(_[0]+_[2])/2-b[0],g=(_[1]+_[3])/2-b[1]):(x=b[2]-b[0],g=b[3]-b[1]),c.rotate((Math.atan2(-g,-x)+h)%h),c.moveTo(0,0),c.lineTo(-O,P/2),c.lineTo(-O,-P/2),c.closePath(),c.restore(),this.__fillStroke(c))}__fillStroke(c){const h=this.dashEnabled();h&&(this.attrs.dashEnabled=!1,c.setLineDash([])),c.fillStrokeShape(this),h&&(this.attrs.dashEnabled=!0)}getSelfRect(){const c=super.getSelfRect(),h=this.pointerWidth()/2;return{x:c.x-h,y:c.y-h,width:c.width+h*2,height:c.height+h*2}}}return Of.Arrow=l,l.prototype.className="Arrow",(0,n._registerNode)(l),e.Factory.addGetterSetter(l,"pointerLength",10,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(l,"pointerWidth",10,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(l,"pointerAtBeginning",!1),e.Factory.addGetterSetter(l,"pointerAtEnding",!0),Of}var Cf={},Xm;function o8(){if(Xm)return Cf;Xm=1,Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.Circle=void 0;const e=It(),i=wr(),t=Ft(),n=Rt();class a extends i.Shape{_sceneFunc(u){u.beginPath(),u.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),u.closePath(),u.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(u){this.radius()!==u/2&&this.radius(u/2)}setHeight(u){this.radius()!==u/2&&this.radius(u/2)}}return Cf.Circle=a,a.prototype._centroid=!0,a.prototype.className="Circle",a.prototype._attrsAffectingSize=["radius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"radius",0,(0,t.getNumberValidator)()),Cf}var kf={},Zm;function a8(){if(Zm)return kf;Zm=1,Object.defineProperty(kf,"__esModule",{value:!0}),kf.Ellipse=void 0;const e=It(),i=wr(),t=Ft(),n=Rt();class a extends i.Shape{_sceneFunc(u){const c=this.radiusX(),h=this.radiusY();u.beginPath(),u.save(),c!==h&&u.scale(1,h/c),u.arc(0,0,c,0,Math.PI*2,!1),u.restore(),u.closePath(),u.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(u){this.radiusX(u/2)}setHeight(u){this.radiusY(u/2)}}return kf.Ellipse=a,a.prototype.className="Ellipse",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,n._registerNode)(a),e.Factory.addComponentsGetterSetter(a,"radius",["x","y"]),e.Factory.addGetterSetter(a,"radiusX",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"radiusY",0,(0,t.getNumberValidator)()),kf}var Tf={},Qm;function l8(){if(Qm)return Tf;Qm=1,Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.Image=void 0;const e=Nn(),i=It(),t=wr(),n=Rt(),a=Ft();class l extends t.Shape{constructor(c){super(c),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const c=this.image();c&&c.complete||c&&c.readyState===4||c&&c.addEventListener&&c.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){const c=!!this.cornerRadius(),h=this.hasShadow();return c&&h?!0:super._useBufferCanvas(!0)}_sceneFunc(c){const h=this.getWidth(),b=this.getHeight(),_=this.cornerRadius(),k=this.attrs.image;let O;if(k){const v=this.attrs.cropWidth,x=this.attrs.cropHeight;v&&x?O=[k,this.cropX(),this.cropY(),v,x,0,0,h,b]:O=[k,0,0,h,b]}(this.hasFill()||this.hasStroke()||_)&&(c.beginPath(),_?e.Util.drawRoundedRectPath(c,h,b,_):c.rect(0,0,h,b),c.closePath(),c.fillStrokeShape(this)),k&&(_&&c.clip(),c.drawImage.apply(c,O))}_hitFunc(c){const h=this.width(),b=this.height(),_=this.cornerRadius();c.beginPath(),_?e.Util.drawRoundedRectPath(c,h,b,_):c.rect(0,0,h,b),c.closePath(),c.fillStrokeShape(this)}getWidth(){var c,h;return(c=this.attrs.width)!==null&&c!==void 0?c:(h=this.image())===null||h===void 0?void 0:h.width}getHeight(){var c,h;return(c=this.attrs.height)!==null&&c!==void 0?c:(h=this.image())===null||h===void 0?void 0:h.height}static fromURL(c,h,b=null){const _=e.Util.createImageElement();_.onload=function(){const k=new l({image:_});h(k)},_.onerror=b,_.crossOrigin="Anonymous",_.src=c}}return Tf.Image=l,l.prototype.className="Image",(0,n._registerNode)(l),i.Factory.addGetterSetter(l,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),i.Factory.addGetterSetter(l,"image"),i.Factory.addComponentsGetterSetter(l,"crop",["x","y","width","height"]),i.Factory.addGetterSetter(l,"cropX",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropY",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropWidth",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropHeight",0,(0,a.getNumberValidator)()),Tf}var Ds={},Jm;function s8(){if(Jm)return Ds;Jm=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.Tag=Ds.Label=void 0;const e=It(),i=wr(),t=tv(),n=Ft(),a=Rt(),l=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],u="Change.konva",c="none",h="up",b="right",_="down",k="left",O=l.length;class v extends t.Group{constructor(p){super(p),this.on("add.konva",function(P){this._addListeners(P.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(p){let P=this,d;const m=function(){P._sync()};for(d=0;d<O;d++)p.on(l[d]+u,m)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let p=this.getText(),P=this.getTag(),d,m,y,w,L,R,D;if(p&&P){switch(d=p.width(),m=p.height(),y=P.pointerDirection(),w=P.pointerWidth(),D=P.pointerHeight(),L=0,R=0,y){case h:L=d/2,R=-1*D;break;case b:L=d+w,R=m/2;break;case _:L=d/2,R=m+D;break;case k:L=-1*w,R=m/2;break}P.setAttrs({x:-1*L,y:-1*R,width:d,height:m}),p.setAttrs({x:-1*L,y:-1*R})}}}Ds.Label=v,v.prototype.className="Label",(0,a._registerNode)(v);class x extends i.Shape{_sceneFunc(p){const P=this.width(),d=this.height(),m=this.pointerDirection(),y=this.pointerWidth(),w=this.pointerHeight(),L=this.cornerRadius();let R=0,D=0,E=0,S=0;typeof L=="number"?R=D=E=S=Math.min(L,P/2,d/2):(R=Math.min(L[0]||0,P/2,d/2),D=Math.min(L[1]||0,P/2,d/2),S=Math.min(L[2]||0,P/2,d/2),E=Math.min(L[3]||0,P/2,d/2)),p.beginPath(),p.moveTo(R,0),m===h&&(p.lineTo((P-y)/2,0),p.lineTo(P/2,-1*w),p.lineTo((P+y)/2,0)),p.lineTo(P-D,0),p.arc(P-D,D,D,Math.PI*3/2,0,!1),m===b&&(p.lineTo(P,(d-w)/2),p.lineTo(P+y,d/2),p.lineTo(P,(d+w)/2)),p.lineTo(P,d-S),p.arc(P-S,d-S,S,0,Math.PI/2,!1),m===_&&(p.lineTo((P+y)/2,d),p.lineTo(P/2,d+w),p.lineTo((P-y)/2,d)),p.lineTo(E,d),p.arc(E,d-E,E,Math.PI/2,Math.PI,!1),m===k&&(p.lineTo(0,(d+w)/2),p.lineTo(-1*y,d/2),p.lineTo(0,(d-w)/2)),p.lineTo(0,R),p.arc(R,R,R,Math.PI,Math.PI*3/2,!1),p.closePath(),p.fillStrokeShape(this)}getSelfRect(){let p=0,P=0,d=this.pointerWidth(),m=this.pointerHeight(),y=this.pointerDirection(),w=this.width(),L=this.height();return y===h?(P-=m,L+=m):y===_?L+=m:y===k?(p-=d*1.5,w+=d):y===b&&(w+=d*1.5),{x:p,y:P,width:w,height:L}}}return Ds.Tag=x,x.prototype.className="Tag",(0,a._registerNode)(x),e.Factory.addGetterSetter(x,"pointerDirection",c),e.Factory.addGetterSetter(x,"pointerWidth",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(x,"pointerHeight",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(x,"cornerRadius",0,(0,n.getNumberOrArrayOfNumbersValidator)(4)),Ds}var Af={},ey;function v5(){if(ey)return Af;ey=1,Object.defineProperty(Af,"__esModule",{value:!0}),Af.Rect=void 0;const e=It(),i=wr(),t=Rt(),n=Nn(),a=Ft();class l extends i.Shape{_sceneFunc(c){const h=this.cornerRadius(),b=this.width(),_=this.height();c.beginPath(),h?n.Util.drawRoundedRectPath(c,b,_,h):c.rect(0,0,b,_),c.closePath(),c.fillStrokeShape(this)}}return Af.Rect=l,l.prototype.className="Rect",(0,t._registerNode)(l),e.Factory.addGetterSetter(l,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),Af}var Rf={},ty;function u8(){if(ty)return Rf;ty=1,Object.defineProperty(Rf,"__esModule",{value:!0}),Rf.RegularPolygon=void 0;const e=It(),i=wr(),t=Ft(),n=Rt();class a extends i.Shape{_sceneFunc(u){const c=this._getPoints();u.beginPath(),u.moveTo(c[0].x,c[0].y);for(let h=1;h<c.length;h++)u.lineTo(c[h].x,c[h].y);u.closePath(),u.fillStrokeShape(this)}_getPoints(){const u=this.attrs.sides,c=this.attrs.radius||0,h=[];for(let b=0;b<u;b++)h.push({x:c*Math.sin(b*2*Math.PI/u),y:-1*c*Math.cos(b*2*Math.PI/u)});return h}getSelfRect(){const u=this._getPoints();let c=u[0].x,h=u[0].y,b=u[0].x,_=u[0].y;return u.forEach(k=>{c=Math.min(c,k.x),h=Math.max(h,k.x),b=Math.min(b,k.y),_=Math.max(_,k.y)}),{x:c,y:b,width:h-c,height:_-b}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(u){this.radius(u/2)}setHeight(u){this.radius(u/2)}}return Rf.RegularPolygon=a,a.prototype.className="RegularPolygon",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"radius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"sides",0,(0,t.getNumberValidator)()),Rf}var Mf={},ny;function c8(){if(ny)return Mf;ny=1,Object.defineProperty(Mf,"__esModule",{value:!0}),Mf.Ring=void 0;const e=It(),i=wr(),t=Ft(),n=Rt(),a=Math.PI*2;class l extends i.Shape{_sceneFunc(c){c.beginPath(),c.arc(0,0,this.innerRadius(),0,a,!1),c.moveTo(this.outerRadius(),0),c.arc(0,0,this.outerRadius(),a,0,!0),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(c){this.outerRadius(c/2)}setHeight(c){this.outerRadius(c/2)}}return Mf.Ring=l,l.prototype.className="Ring",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,n._registerNode)(l),e.Factory.addGetterSetter(l,"innerRadius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(l,"outerRadius",0,(0,t.getNumberValidator)()),Mf}var Lf={},ry;function f8(){if(ry)return Lf;ry=1,Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.Sprite=void 0;const e=It(),i=wr(),t=nv(),n=Ft(),a=Rt();class l extends i.Shape{constructor(c){super(c),this._updated=!0,this.anim=new t.Animation(()=>{const h=this._updated;return this._updated=!1,h}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(c){const h=this.animation(),b=this.frameIndex(),_=b*4,k=this.animations()[h],O=this.frameOffsets(),v=k[_+0],x=k[_+1],g=k[_+2],p=k[_+3],P=this.image();if((this.hasFill()||this.hasStroke())&&(c.beginPath(),c.rect(0,0,g,p),c.closePath(),c.fillStrokeShape(this)),P)if(O){const d=O[h],m=b*2;c.drawImage(P,v,x,g,p,d[m+0],d[m+1],g,p)}else c.drawImage(P,v,x,g,p,0,0,g,p)}_hitFunc(c){const h=this.animation(),b=this.frameIndex(),_=b*4,k=this.animations()[h],O=this.frameOffsets(),v=k[_+2],x=k[_+3];if(c.beginPath(),O){const g=O[h],p=b*2;c.rect(g[p+0],g[p+1],v,x)}else c.rect(0,0,v,x);c.closePath(),c.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const c=this;this.interval=setInterval(function(){c._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const c=this.getLayer();this.anim.setLayers(c),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const c=this.frameIndex(),h=this.animation(),b=this.animations(),_=b[h],k=_.length/4;c<k-1?this.frameIndex(c+1):this.frameIndex(0)}}return Lf.Sprite=l,l.prototype.className="Sprite",(0,a._registerNode)(l),e.Factory.addGetterSetter(l,"animation"),e.Factory.addGetterSetter(l,"animations"),e.Factory.addGetterSetter(l,"frameOffsets"),e.Factory.addGetterSetter(l,"image"),e.Factory.addGetterSetter(l,"frameIndex",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"frameRate",17,(0,n.getNumberValidator)()),e.Factory.backCompat(l,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"}),Lf}var Nf={},iy;function d8(){if(iy)return Nf;iy=1,Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.Star=void 0;const e=It(),i=wr(),t=Ft(),n=Rt();class a extends i.Shape{_sceneFunc(u){const c=this.innerRadius(),h=this.outerRadius(),b=this.numPoints();u.beginPath(),u.moveTo(0,0-h);for(let _=1;_<b*2;_++){const k=_%2===0?h:c,O=k*Math.sin(_*Math.PI/b),v=-1*k*Math.cos(_*Math.PI/b);u.lineTo(O,v)}u.closePath(),u.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(u){this.outerRadius(u/2)}setHeight(u){this.outerRadius(u/2)}}return Nf.Star=a,a.prototype.className="Star",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,n._registerNode)(a),e.Factory.addGetterSetter(a,"numPoints",5,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"innerRadius",0,(0,t.getNumberValidator)()),e.Factory.addGetterSetter(a,"outerRadius",0,(0,t.getNumberValidator)()),Nf}var Xu={},oy;function m5(){if(oy)return Xu;oy=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.Text=void 0,Xu.stringToArray=u;const e=Nn(),i=It(),t=wr(),n=Rt(),a=Ft(),l=Rt();function u(H){return[...H].reduce((K,ee,V,Z)=>(new RegExp("\\p{Emoji_Modifier_Base}\\p{Emoji_Modifier}?(?:\\u200D\\p{Emoji_Presentation})+","u").test(ee)?K.push(ee):new RegExp("\\p{Regional_Indicator}{2}","u").test(ee+(Z[V+1]||""))?K.push(ee+Z[V+1]):V>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(ee)?K[K.length-1]+=ee:K.push(ee),K),[])}const c="auto",h="center",b="inherit",_="justify",k="Change.konva",O="2d",v="-",x="left",g="text",p="Text",P="top",d="bottom",m="middle",y="normal",w="px ",L=" ",R="right",D="rtl",E="word",S="char",A="none",M="…",T=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],B=T.length;function U(H){return H.split(",").map(K=>{K=K.trim();const ee=K.indexOf(" ")>=0,V=K.indexOf('"')>=0||K.indexOf("'")>=0;return ee&&!V&&(K=`"${K}"`),K}).join(", ")}let Q;function X(){return Q||(Q=e.Util.createCanvasElement().getContext(O),Q)}function $(H){H.fillText(this._partialText,this._partialTextX,this._partialTextY)}function j(H){H.setAttr("miterLimit",2),H.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function I(H){return H=H||{},!H.fillLinearGradientColorStops&&!H.fillRadialGradientColorStops&&!H.fillPatternImage&&(H.fill=H.fill||"black"),H}class z extends t.Shape{constructor(K){super(I(K)),this._partialTextX=0,this._partialTextY=0;for(let ee=0;ee<B;ee++)this.on(T[ee]+k,this._setTextData);this._setTextData()}_sceneFunc(K){const ee=this.textArr,V=ee.length;if(!this.text())return;let Z=this.padding(),Y=this.fontSize(),ne=this.lineHeight()*Y,re=this.verticalAlign(),ie=this.direction(),ae=0,se=this.align(),de=this.getWidth(),he=this.letterSpacing(),Se=this.fill(),Ee=this.textDecoration(),De=Ee.indexOf("underline")!==-1,fe=Ee.indexOf("line-through")!==-1,ge;ie=ie===b?K.direction:ie;let Te=ne/2,Re=m;if(n.Konva._fixTextRendering){const Xe=this.measureSize("M");Re="alphabetic",Te=(Xe.fontBoundingBoxAscent-Xe.fontBoundingBoxDescent)/2+ne/2}var ue=0,me=0;for(ie===D&&K.setAttr("direction",ie),K.setAttr("font",this._getContextFont()),K.setAttr("textBaseline",Re),K.setAttr("textAlign",x),re===m?ae=(this.getHeight()-V*ne-Z*2)/2:re===d&&(ae=this.getHeight()-V*ne-Z*2),K.translate(Z,ae+Z),ge=0;ge<V;ge++){var ue=0,me=0,xe=ee[ge],Ie=xe.text,tt=xe.width,lt=xe.lastInParagraph,Fe,ze,Ue;if(K.save(),se===R?ue+=de-tt-Z*2:se===h&&(ue+=(de-tt-Z*2)/2),De){K.save(),K.beginPath();const kt=n.Konva._fixTextRendering?Math.round(Y/4):Math.round(Y/2),Et=ue,be=Te+me+kt;K.moveTo(Et,be),Fe=Ie.split(" ").length-1,ze=Fe===0,Ue=se===_&&!lt?de-Z*2:tt,K.lineTo(Et+Math.round(Ue),be),K.lineWidth=Y/15;const we=this._getLinearGradient();K.strokeStyle=we||Se,K.stroke(),K.restore()}if(fe){K.save(),K.beginPath();const kt=n.Konva._fixTextRendering?-Math.round(Y/4):0;K.moveTo(ue,Te+me+kt),Fe=Ie.split(" ").length-1,ze=Fe===0,Ue=se===_&<&&!ze?de-Z*2:tt,K.lineTo(ue+Math.round(Ue),Te+me+kt),K.lineWidth=Y/15;const Et=this._getLinearGradient();K.strokeStyle=Et||Se,K.stroke(),K.restore()}if(ie!==D&&(he!==0||se===_)){Fe=Ie.split(" ").length-1;const kt=u(Ie);for(let Et=0;Et<kt.length;Et++){const be=kt[Et];be===" "&&!lt&&se===_&&(ue+=(de-Z*2-tt)/Fe),this._partialTextX=ue,this._partialTextY=Te+me,this._partialText=be,K.fillStrokeShape(this),ue+=this.measureSize(be).width+he}}else he!==0&&K.setAttr("letterSpacing",`${he}px`),this._partialTextX=ue,this._partialTextY=Te+me,this._partialText=Ie,K.fillStrokeShape(this);K.restore(),V>1&&(Te+=ne)}}_hitFunc(K){const ee=this.getWidth(),V=this.getHeight();K.beginPath(),K.rect(0,0,ee,V),K.closePath(),K.fillStrokeShape(this)}setText(K){const ee=e.Util._isString(K)?K:K==null?"":K+"";return this._setAttr(g,ee),this}getWidth(){return this.attrs.width===c||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===c||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(K){var ee,V,Z,Y,ne,re,ie,ae,se,de,he;let Se=X(),Ee=this.fontSize(),De;Se.save(),Se.font=this._getContextFont(),De=Se.measureText(K),Se.restore();const fe=Ee/100;return{actualBoundingBoxAscent:(ee=De.actualBoundingBoxAscent)!==null&&ee!==void 0?ee:71.58203125*fe,actualBoundingBoxDescent:(V=De.actualBoundingBoxDescent)!==null&&V!==void 0?V:0,actualBoundingBoxLeft:(Z=De.actualBoundingBoxLeft)!==null&&Z!==void 0?Z:-7.421875*fe,actualBoundingBoxRight:(Y=De.actualBoundingBoxRight)!==null&&Y!==void 0?Y:75.732421875*fe,alphabeticBaseline:(ne=De.alphabeticBaseline)!==null&&ne!==void 0?ne:0,emHeightAscent:(re=De.emHeightAscent)!==null&&re!==void 0?re:100*fe,emHeightDescent:(ie=De.emHeightDescent)!==null&&ie!==void 0?ie:-20*fe,fontBoundingBoxAscent:(ae=De.fontBoundingBoxAscent)!==null&&ae!==void 0?ae:91*fe,fontBoundingBoxDescent:(se=De.fontBoundingBoxDescent)!==null&&se!==void 0?se:21*fe,hangingBaseline:(de=De.hangingBaseline)!==null&&de!==void 0?de:72.80000305175781*fe,ideographicBaseline:(he=De.ideographicBaseline)!==null&&he!==void 0?he:-21*fe,width:De.width,height:Ee}}_getContextFont(){return this.fontStyle()+L+this.fontVariant()+L+(this.fontSize()+w)+U(this.fontFamily())}_addTextLine(K){this.align()===_&&(K=K.trim());const V=this._getTextWidth(K);return this.textArr.push({text:K,width:V,lastInParagraph:!1})}_getTextWidth(K){const ee=this.letterSpacing(),V=K.length;return X().measureText(K).width+(V?ee*(V-1):0)}_setTextData(){let K=this.text().split(`
|
|
43
|
-
`),ee=+this.fontSize(),V=0,Z=this.lineHeight()*ee,Y=this.attrs.width,ne=this.attrs.height,re=Y!==c&&Y!==void 0,ie=ne!==c&&ne!==void 0,ae=this.padding(),se=Y-ae*2,de=ne-ae*2,he=0,Se=this.wrap(),Ee=Se!==A,De=Se!==S&&Ee,fe=this.ellipsis();this.textArr=[],X().font=this._getContextFont();const ge=fe?this._getTextWidth(M):0;for(let Re=0,ue=K.length;Re<ue;++Re){let me=K[Re],xe=this._getTextWidth(me);if(re&&xe>se)for(;me.length>0;){let Ie=0,tt=me.length,lt="",Fe=0;for(;Ie<tt;){const ze=Ie+tt>>>1,Ue=me.slice(0,ze+1),Xe=this._getTextWidth(Ue)+ge;Xe<=se?(Ie=ze+1,lt=Ue,Fe=Xe):tt=ze}if(lt){if(De){var Te;const Ue=me[lt.length];(Ue===L||Ue===v)&&Fe<=se?Te=lt.length:Te=Math.max(lt.lastIndexOf(L),lt.lastIndexOf(v))+1,Te>0&&(Ie=Te,lt=lt.slice(0,Ie),Fe=this._getTextWidth(lt))}if(lt=lt.trimRight(),this._addTextLine(lt),V=Math.max(V,Fe),he+=Z,this._shouldHandleEllipsis(he)){this._tryToAddEllipsisToLastLine();break}if(me=me.slice(Ie),me=me.trimLeft(),me.length>0&&(xe=this._getTextWidth(me),xe<=se)){this._addTextLine(me),he+=Z,V=Math.max(V,xe);break}}else break}else this._addTextLine(me),he+=Z,V=Math.max(V,xe),this._shouldHandleEllipsis(he)&&Re<ue-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),ie&&he+Z>de)break}this.textHeight=ee,this.textWidth=V}_shouldHandleEllipsis(K){const ee=+this.fontSize(),V=this.lineHeight()*ee,Z=this.attrs.height,Y=Z!==c&&Z!==void 0,ne=this.padding(),re=Z-ne*2;return!(this.wrap()!==A)||Y&&K+V>re}_tryToAddEllipsisToLastLine(){const K=this.attrs.width,ee=K!==c&&K!==void 0,V=this.padding(),Z=K-V*2,Y=this.ellipsis(),ne=this.textArr[this.textArr.length-1];!ne||!Y||(ee&&(this._getTextWidth(ne.text+M)<Z||(ne.text=ne.text.slice(0,ne.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(ne.text+M))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const K=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,ee=this.hasShadow();return K&&ee?!0:super._useBufferCanvas()}}return Xu.Text=z,z.prototype._fillFunc=$,z.prototype._strokeFunc=j,z.prototype.className=p,z.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,l._registerNode)(z),i.Factory.overWriteSetter(z,"width",(0,a.getNumberOrAutoValidator)()),i.Factory.overWriteSetter(z,"height",(0,a.getNumberOrAutoValidator)()),i.Factory.addGetterSetter(z,"direction",b),i.Factory.addGetterSetter(z,"fontFamily","Arial"),i.Factory.addGetterSetter(z,"fontSize",12,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(z,"fontStyle",y),i.Factory.addGetterSetter(z,"fontVariant",y),i.Factory.addGetterSetter(z,"padding",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(z,"align",x),i.Factory.addGetterSetter(z,"verticalAlign",P),i.Factory.addGetterSetter(z,"lineHeight",1,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(z,"wrap",E),i.Factory.addGetterSetter(z,"ellipsis",!1,(0,a.getBooleanValidator)()),i.Factory.addGetterSetter(z,"letterSpacing",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(z,"text","",(0,a.getStringValidator)()),i.Factory.addGetterSetter(z,"textDecoration",""),Xu}var If={},ay;function h8(){if(ay)return If;ay=1,Object.defineProperty(If,"__esModule",{value:!0}),If.TextPath=void 0;const e=Nn(),i=It(),t=wr(),n=rv(),a=m5(),l=Ft(),u=Rt(),c="",h="normal";function b(O){O.fillText(this.partialText,0,0)}function _(O){O.strokeText(this.partialText,0,0)}class k extends t.Shape{constructor(v){super(v),this.dummyCanvas=e.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return n.Path.getPathLength(this.dataArray)}_getPointAtLength(v){if(!this.attrs.data)return null;const x=this.pathLength;return v-1>x?null:n.Path.getPointAtLengthOfDataArray(v,this.dataArray)}_readDataAttribute(){this.dataArray=n.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(v){v.setAttr("font",this._getContextFont()),v.setAttr("textBaseline",this.textBaseline()),v.setAttr("textAlign","left"),v.save();const x=this.textDecoration(),g=this.fill(),p=this.fontSize(),P=this.glyphInfo;x==="underline"&&v.beginPath();for(let d=0;d<P.length;d++){v.save();const m=P[d].p0;v.translate(m.x,m.y),v.rotate(P[d].rotation),this.partialText=P[d].text,v.fillStrokeShape(this),x==="underline"&&(d===0&&v.moveTo(0,p/2+1),v.lineTo(p,p/2+1)),v.restore()}x==="underline"&&(v.strokeStyle=g,v.lineWidth=p/20,v.stroke()),v.restore()}_hitFunc(v){v.beginPath();const x=this.glyphInfo;if(x.length>=1){const g=x[0].p0;v.moveTo(g.x,g.y)}for(let g=0;g<x.length;g++){const p=x[g].p1;v.lineTo(p.x,p.y)}v.setAttr("lineWidth",this.fontSize()),v.setAttr("strokeStyle",this.colorKey),v.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(v){return a.Text.prototype.setText.call(this,v)}_getContextFont(){return a.Text.prototype._getContextFont.call(this)}_getTextSize(v){const g=this.dummyCanvas.getContext("2d");g.save(),g.font=this._getContextFont();const p=g.measureText(v);return g.restore(),{width:p.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:v,height:x}=this._getTextSize(this.attrs.text);if(this.textWidth=v,this.textHeight=x,this.glyphInfo=[],!this.attrs.data)return null;const g=this.letterSpacing(),p=this.align(),P=this.kerningFunc(),d=Math.max(this.textWidth+((this.attrs.text||"").length-1)*g,0);let m=0;p==="center"&&(m=Math.max(0,this.pathLength/2-d/2)),p==="right"&&(m=Math.max(0,this.pathLength-d));const y=(0,a.stringToArray)(this.text());let w=m;for(let L=0;L<y.length;L++){const R=this._getPointAtLength(w);if(!R)return;let D=this._getTextSize(y[L]).width+g;if(y[L]===" "&&p==="justify"){const B=this.text().split(" ").length-1;D+=(this.pathLength-d)/B}const E=this._getPointAtLength(w+D);if(!E)return;const S=n.Path.getLineLength(R.x,R.y,E.x,E.y);let A=0;if(P)try{A=P(y[L-1],y[L])*this.fontSize()}catch{A=0}R.x+=A,E.x+=A,this.textWidth+=A;const M=n.Path.getPointOnLine(A+S/2,R.x,R.y,E.x,E.y),T=Math.atan2(E.y-R.y,E.x-R.x);this.glyphInfo.push({transposeX:M.x,transposeY:M.y,text:y[L],rotation:T,p0:R,p1:E}),w+=D}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const v=[];this.glyphInfo.forEach(function(w){v.push(w.p0.x),v.push(w.p0.y),v.push(w.p1.x),v.push(w.p1.y)});let x=v[0]||0,g=v[0]||0,p=v[1]||0,P=v[1]||0,d,m;for(let w=0;w<v.length/2;w++)d=v[w*2],m=v[w*2+1],x=Math.min(x,d),g=Math.max(g,d),p=Math.min(p,m),P=Math.max(P,m);const y=this.fontSize();return{x:x-y/2,y:p-y/2,width:g-x+y,height:P-p+y}}destroy(){return e.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}return If.TextPath=k,k.prototype._fillFunc=b,k.prototype._strokeFunc=_,k.prototype._fillFuncHit=b,k.prototype._strokeFuncHit=_,k.prototype.className="TextPath",k.prototype._attrsAffectingSize=["text","fontSize","data"],(0,u._registerNode)(k),i.Factory.addGetterSetter(k,"data"),i.Factory.addGetterSetter(k,"fontFamily","Arial"),i.Factory.addGetterSetter(k,"fontSize",12,(0,l.getNumberValidator)()),i.Factory.addGetterSetter(k,"fontStyle",h),i.Factory.addGetterSetter(k,"align","left"),i.Factory.addGetterSetter(k,"letterSpacing",0,(0,l.getNumberValidator)()),i.Factory.addGetterSetter(k,"textBaseline","middle"),i.Factory.addGetterSetter(k,"fontVariant",h),i.Factory.addGetterSetter(k,"text",c),i.Factory.addGetterSetter(k,"textDecoration",null),i.Factory.addGetterSetter(k,"kerningFunc",null),If}var Df={},ly;function p8(){if(ly)return Df;ly=1,Object.defineProperty(Df,"__esModule",{value:!0}),Df.Transformer=void 0;const e=Nn(),i=It(),t=Hn(),n=wr(),a=v5(),l=tv(),u=Rt(),c=Ft(),h=Rt(),b="tr-konva",_=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(E=>E+`.${b}`).join(" "),k="nodesRect",O=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],v={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},x="ontouchstart"in u.Konva._global;function g(E,S,A){if(E==="rotater")return A;S+=e.Util.degToRad(v[E]||0);const M=(e.Util.radToDeg(S)%360+360)%360;return e.Util._inRange(M,315+22.5,360)||e.Util._inRange(M,0,22.5)?"ns-resize":e.Util._inRange(M,45-22.5,45+22.5)?"nesw-resize":e.Util._inRange(M,90-22.5,90+22.5)?"ew-resize":e.Util._inRange(M,135-22.5,135+22.5)?"nwse-resize":e.Util._inRange(M,180-22.5,180+22.5)?"ns-resize":e.Util._inRange(M,225-22.5,225+22.5)?"nesw-resize":e.Util._inRange(M,270-22.5,270+22.5)?"ew-resize":e.Util._inRange(M,315-22.5,315+22.5)?"nwse-resize":(e.Util.error("Transformer has unknown angle for cursor detection: "+M),"pointer")}const p=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],P=1e8;function d(E){return{x:E.x+E.width/2*Math.cos(E.rotation)+E.height/2*Math.sin(-E.rotation),y:E.y+E.height/2*Math.cos(E.rotation)+E.width/2*Math.sin(E.rotation)}}function m(E,S,A){const M=A.x+(E.x-A.x)*Math.cos(S)-(E.y-A.y)*Math.sin(S),T=A.y+(E.x-A.x)*Math.sin(S)+(E.y-A.y)*Math.cos(S);return{...E,rotation:E.rotation+S,x:M,y:T}}function y(E,S){const A=d(E);return m(E,S,A)}function w(E,S,A){let M=S;for(let T=0;T<E.length;T++){const B=u.Konva.getAngle(E[T]),U=Math.abs(B-S)%(Math.PI*2);Math.min(U,Math.PI*2-U)<A&&(M=B)}return M}let L=0;class R extends l.Group{constructor(S){super(S),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(_,this.update),this.getNode()&&this.update()}attachTo(S){return this.setNode(S),this}setNode(S){return e.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([S])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return b+this._id}setNodes(S=[]){this._nodes&&this._nodes.length&&this.detach();const A=S.filter(T=>T.isAncestorOf(this)?(e.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=S=A,S.length===1&&this.useSingleNodeRotation()?this.rotation(S[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(T=>{const B=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},U=T._attrsAffectingSize.map(Q=>Q+"Change."+this._getEventNamespace()).join(" ");T.on(U,B),T.on(O.map(Q=>Q+`.${this._getEventNamespace()}`).join(" "),B),T.on(`absoluteTransformChange.${this._getEventNamespace()}`,B),this._proxyDrag(T)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(S){let A;S.on(`dragstart.${this._getEventNamespace()}`,M=>{A=S.getAbsolutePosition(),!this.isDragging()&&S!==this.findOne(".back")&&this.startDrag(M,!1)}),S.on(`dragmove.${this._getEventNamespace()}`,M=>{if(!A)return;const T=S.getAbsolutePosition(),B=T.x-A.x,U=T.y-A.y;this.nodes().forEach(Q=>{if(Q===S||Q.isDragging())return;const X=Q.getAbsolutePosition();Q.setAbsolutePosition({x:X.x+B,y:X.y+U}),Q.startDrag(M)}),A=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(S=>{S.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(k),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(k,this.__getNodeRect)}__getNodeShape(S,A=this.rotation(),M){const T=S.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),B=S.getAbsoluteScale(M),U=S.getAbsolutePosition(M),Q=T.x*B.x-S.offsetX()*B.x,X=T.y*B.y-S.offsetY()*B.y,$=(u.Konva.getAngle(S.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),j={x:U.x+Q*Math.cos($)+X*Math.sin(-$),y:U.y+X*Math.cos($)+Q*Math.sin($),width:T.width*B.x,height:T.height*B.y,rotation:$};return m(j,-u.Konva.getAngle(A),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-P,y:-P,width:0,height:0,rotation:0};const A=[];this.nodes().map($=>{const j=$.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),I=[{x:j.x,y:j.y},{x:j.x+j.width,y:j.y},{x:j.x+j.width,y:j.y+j.height},{x:j.x,y:j.y+j.height}],z=$.getAbsoluteTransform();I.forEach(function(H){const K=z.point(H);A.push(K)})});const M=new e.Transform;M.rotate(-u.Konva.getAngle(this.rotation()));let T=1/0,B=1/0,U=-1/0,Q=-1/0;A.forEach(function($){const j=M.point($);T===void 0&&(T=U=j.x,B=Q=j.y),T=Math.min(T,j.x),B=Math.min(B,j.y),U=Math.max(U,j.x),Q=Math.max(Q,j.y)}),M.invert();const X=M.point({x:T,y:B});return{x:X.x,y:X.y,width:U-T,height:Q-B,rotation:u.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),p.forEach(S=>{this._createAnchor(S)}),this._createAnchor("rotater")}_createAnchor(S){const A=new a.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:S+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:x?10:"auto"}),M=this;A.on("mousedown touchstart",function(T){M._handleMouseDown(T)}),A.on("dragstart",T=>{A.stopDrag(),T.cancelBubble=!0}),A.on("dragend",T=>{T.cancelBubble=!0}),A.on("mouseenter",()=>{const T=u.Konva.getAngle(this.rotation()),B=this.rotateAnchorCursor(),U=g(S,T,B);A.getStage().content&&(A.getStage().content.style.cursor=U),this._cursorChange=!0}),A.on("mouseout",()=>{A.getStage().content&&(A.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(A)}_createBack(){const S=new n.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(A,M){const T=M.getParent(),B=T.padding();A.beginPath(),A.rect(-B,-B,M.width()+B*2,M.height()+B*2),A.moveTo(M.width()/2,-B),T.rotateEnabled()&&T.rotateLineVisible()&&A.lineTo(M.width()/2,-T.rotateAnchorOffset()*e.Util._sign(M.height())-B),A.fillStrokeShape(M)},hitFunc:(A,M)=>{if(!this.shouldOverdrawWholeArea())return;const T=this.padding();A.beginPath(),A.rect(-T,-T,M.width()+T*2,M.height()+T*2),A.fillStrokeShape(M)}});this.add(S),this._proxyDrag(S),S.on("dragstart",A=>{A.cancelBubble=!0}),S.on("dragmove",A=>{A.cancelBubble=!0}),S.on("dragend",A=>{A.cancelBubble=!0}),this.on("dragmove",A=>{this.update()})}_handleMouseDown(S){if(this._transforming)return;this._movingAnchorName=S.target.name().split(" ")[0];const A=this._getNodeRect(),M=A.width,T=A.height,B=Math.sqrt(Math.pow(M,2)+Math.pow(T,2));this.sin=Math.abs(T/B),this.cos=Math.abs(M/B),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const U=S.target.getAbsolutePosition(),Q=S.target.getStage().getPointerPosition();this._anchorDragOffset={x:Q.x-U.x,y:Q.y-U.y},L++,this._fire("transformstart",{evt:S.evt,target:this.getNode()}),this._nodes.forEach(X=>{X._fire("transformstart",{evt:S.evt,target:X})})}_handleMouseMove(S){let A,M,T;const B=this.findOne("."+this._movingAnchorName),U=B.getStage();U.setPointersPositions(S);const Q=U.getPointerPosition();let X={x:Q.x-this._anchorDragOffset.x,y:Q.y-this._anchorDragOffset.y};const $=B.getAbsolutePosition();this.anchorDragBoundFunc()&&(X=this.anchorDragBoundFunc()($,X,S)),B.setAbsolutePosition(X);const j=B.getAbsolutePosition();if($.x===j.x&&$.y===j.y)return;if(this._movingAnchorName==="rotater"){const ie=this._getNodeRect();A=B.x()-ie.width/2,M=-B.y()+ie.height/2;let ae=Math.atan2(-M,A)+Math.PI/2;ie.height<0&&(ae-=Math.PI);const de=u.Konva.getAngle(this.rotation())+ae,he=u.Konva.getAngle(this.rotationSnapTolerance()),Ee=w(this.rotationSnaps(),de,he)-ie.rotation,De=y(ie,Ee);this._fitNodesInto(De,S);return}const I=this.shiftBehavior();let z;I==="inverted"?z=this.keepRatio()&&!S.shiftKey:I==="none"?z=this.keepRatio():z=this.keepRatio()||S.shiftKey;var Z=this.centeredScaling()||S.altKey;if(this._movingAnchorName==="top-left"){if(z){var H=Z?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};T=Math.sqrt(Math.pow(H.x-B.x(),2)+Math.pow(H.y-B.y(),2));var K=this.findOne(".top-left").x()>H.x?-1:1,ee=this.findOne(".top-left").y()>H.y?-1:1;A=T*this.cos*K,M=T*this.sin*ee,this.findOne(".top-left").x(H.x-A),this.findOne(".top-left").y(H.y-M)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(B.y());else if(this._movingAnchorName==="top-right"){if(z){var H=Z?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};T=Math.sqrt(Math.pow(B.x()-H.x,2)+Math.pow(H.y-B.y(),2));var K=this.findOne(".top-right").x()<H.x?-1:1,ee=this.findOne(".top-right").y()>H.y?-1:1;A=T*this.cos*K,M=T*this.sin*ee,this.findOne(".top-right").x(H.x+A),this.findOne(".top-right").y(H.y-M)}var V=B.position();this.findOne(".top-left").y(V.y),this.findOne(".bottom-right").x(V.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(B.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(B.x());else if(this._movingAnchorName==="bottom-left"){if(z){var H=Z?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};T=Math.sqrt(Math.pow(H.x-B.x(),2)+Math.pow(B.y()-H.y,2));var K=H.x<B.x()?-1:1,ee=B.y()<H.y?-1:1;A=T*this.cos*K,M=T*this.sin*ee,B.x(H.x-A),B.y(H.y+M)}V=B.position(),this.findOne(".top-left").x(V.x),this.findOne(".bottom-right").y(V.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(B.y());else if(this._movingAnchorName==="bottom-right"){if(z){var H=Z?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};T=Math.sqrt(Math.pow(B.x()-H.x,2)+Math.pow(B.y()-H.y,2));var K=this.findOne(".bottom-right").x()<H.x?-1:1,ee=this.findOne(".bottom-right").y()<H.y?-1:1;A=T*this.cos*K,M=T*this.sin*ee,this.findOne(".bottom-right").x(H.x+A),this.findOne(".bottom-right").y(H.y+M)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var Z=this.centeredScaling()||S.altKey;if(Z){const ie=this.findOne(".top-left"),ae=this.findOne(".bottom-right"),se=ie.x(),de=ie.y(),he=this.getWidth()-ae.x(),Se=this.getHeight()-ae.y();ae.move({x:-se,y:-de}),ie.move({x:he,y:Se})}const Y=this.findOne(".top-left").getAbsolutePosition();A=Y.x,M=Y.y;const ne=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),re=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:A,y:M,width:ne,height:re,rotation:u.Konva.getAngle(this.rotation())},S)}_handleMouseUp(S){this._removeEvents(S)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(S){var A;if(this._transforming){this._transforming=!1,typeof window<"u"&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const M=this.getNode();L--,this._fire("transformend",{evt:S,target:M}),(A=this.getLayer())===null||A===void 0||A.batchDraw(),M&&this._nodes.forEach(T=>{var B;T._fire("transformend",{evt:S,target:T}),(B=T.getLayer())===null||B===void 0||B.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(S,A){const M=this._getNodeRect(),T=1;if(e.Util._inRange(S.width,-this.padding()*2-T,T)){this.update();return}if(e.Util._inRange(S.height,-this.padding()*2-T,T)){this.update();return}const B=new e.Transform;if(B.rotate(u.Konva.getAngle(this.rotation())),this._movingAnchorName&&S.width<0&&this._movingAnchorName.indexOf("left")>=0){const z=B.point({x:-this.padding()*2,y:0});S.x+=z.x,S.y+=z.y,S.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=z.x,this._anchorDragOffset.y-=z.y}else if(this._movingAnchorName&&S.width<0&&this._movingAnchorName.indexOf("right")>=0){const z=B.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=z.x,this._anchorDragOffset.y-=z.y,S.width+=this.padding()*2}if(this._movingAnchorName&&S.height<0&&this._movingAnchorName.indexOf("top")>=0){const z=B.point({x:0,y:-this.padding()*2});S.x+=z.x,S.y+=z.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=z.x,this._anchorDragOffset.y-=z.y,S.height+=this.padding()*2}else if(this._movingAnchorName&&S.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const z=B.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=z.x,this._anchorDragOffset.y-=z.y,S.height+=this.padding()*2}if(this.boundBoxFunc()){const z=this.boundBoxFunc()(M,S);z?S=z:e.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const U=1e7,Q=new e.Transform;Q.translate(M.x,M.y),Q.rotate(M.rotation),Q.scale(M.width/U,M.height/U);const X=new e.Transform,$=S.width/U,j=S.height/U;this.flipEnabled()===!1?(X.translate(S.x,S.y),X.rotate(S.rotation),X.translate(S.width<0?S.width:0,S.height<0?S.height:0),X.scale(Math.abs($),Math.abs(j))):(X.translate(S.x,S.y),X.rotate(S.rotation),X.scale($,j));const I=X.multiply(Q.invert());this._nodes.forEach(z=>{var H;const K=z.getParent().getAbsoluteTransform(),ee=z.getTransform().copy();ee.translate(z.offsetX(),z.offsetY());const V=new e.Transform;V.multiply(K.copy().invert()).multiply(I).multiply(K).multiply(ee);const Z=V.decompose();z.setAttrs(Z),(H=z.getLayer())===null||H===void 0||H.batchDraw()}),this.rotation(e.Util._getRotation(S.rotation)),this._nodes.forEach(z=>{this._fire("transform",{evt:A,target:z}),z._fire("transform",{evt:A,target:z})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(S,A){this.findOne(S).setAttrs(A)}update(){var S;const A=this._getNodeRect();this.rotation(e.Util._getRotation(A.rotation));const M=A.width,T=A.height,B=this.enabledAnchors(),U=this.resizeEnabled(),Q=this.padding(),X=this.anchorSize(),$=this.find("._anchor");$.forEach(I=>{I.setAttrs({width:X,height:X,offsetX:X/2,offsetY:X/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:X/2+Q,offsetY:X/2+Q,visible:U&&B.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:M/2,y:0,offsetY:X/2+Q,visible:U&&B.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:M,y:0,offsetX:X/2-Q,offsetY:X/2+Q,visible:U&&B.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:T/2,offsetX:X/2+Q,visible:U&&B.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:M,y:T/2,offsetX:X/2-Q,visible:U&&B.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:T,offsetX:X/2+Q,offsetY:X/2-Q,visible:U&&B.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:M/2,y:T,offsetY:X/2-Q,visible:U&&B.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:M,y:T,offsetX:X/2-Q,offsetY:X/2-Q,visible:U&&B.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:M/2,y:-this.rotateAnchorOffset()*e.Util._sign(T)-Q,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:M,height:T,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const j=this.anchorStyleFunc();j&&$.forEach(I=>{j(I)}),(S=this.getLayer())===null||S===void 0||S.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const S=this.findOne("."+this._movingAnchorName);S&&S.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),l.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return t.Node.prototype.toObject.call(this)}clone(S){return t.Node.prototype.clone.call(this,S)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}Df.Transformer=R,R.isTransforming=()=>L>0;function D(E){return E instanceof Array||e.Util.warn("enabledAnchors value should be an array"),E instanceof Array&&E.forEach(function(S){p.indexOf(S)===-1&&e.Util.warn("Unknown anchor name: "+S+". Available names are: "+p.join(", "))}),E||[]}return R.prototype.className="Transformer",(0,h._registerNode)(R),i.Factory.addGetterSetter(R,"enabledAnchors",p,D),i.Factory.addGetterSetter(R,"flipEnabled",!0,(0,c.getBooleanValidator)()),i.Factory.addGetterSetter(R,"resizeEnabled",!0),i.Factory.addGetterSetter(R,"anchorSize",10,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"rotateEnabled",!0),i.Factory.addGetterSetter(R,"rotateLineVisible",!0),i.Factory.addGetterSetter(R,"rotationSnaps",[]),i.Factory.addGetterSetter(R,"rotateAnchorOffset",50,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"rotateAnchorCursor","crosshair"),i.Factory.addGetterSetter(R,"rotationSnapTolerance",5,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"borderEnabled",!0),i.Factory.addGetterSetter(R,"anchorStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(R,"anchorStrokeWidth",1,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"anchorFill","white"),i.Factory.addGetterSetter(R,"anchorCornerRadius",0,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"borderStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(R,"borderStrokeWidth",1,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"borderDash"),i.Factory.addGetterSetter(R,"keepRatio",!0),i.Factory.addGetterSetter(R,"shiftBehavior","default"),i.Factory.addGetterSetter(R,"centeredScaling",!1),i.Factory.addGetterSetter(R,"ignoreStroke",!1),i.Factory.addGetterSetter(R,"padding",0,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(R,"node"),i.Factory.addGetterSetter(R,"nodes"),i.Factory.addGetterSetter(R,"boundBoxFunc"),i.Factory.addGetterSetter(R,"anchorDragBoundFunc"),i.Factory.addGetterSetter(R,"anchorStyleFunc"),i.Factory.addGetterSetter(R,"shouldOverdrawWholeArea",!1),i.Factory.addGetterSetter(R,"useSingleNodeRotation",!0),i.Factory.backCompat(R,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),Df}var jf={},sy;function g8(){if(sy)return jf;sy=1,Object.defineProperty(jf,"__esModule",{value:!0}),jf.Wedge=void 0;const e=It(),i=wr(),t=Rt(),n=Ft(),a=Rt();class l extends i.Shape{_sceneFunc(c){c.beginPath(),c.arc(0,0,this.radius(),0,t.Konva.getAngle(this.angle()),this.clockwise()),c.lineTo(0,0),c.closePath(),c.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(c){this.radius(c/2)}setHeight(c){this.radius(c/2)}}return jf.Wedge=l,l.prototype.className="Wedge",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["radius"],(0,a._registerNode)(l),e.Factory.addGetterSetter(l,"radius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"angle",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(l,"clockwise",!1),e.Factory.backCompat(l,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),jf}var Ff={},uy;function v8(){if(uy)return Ff;uy=1,Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.Blur=void 0;const e=It(),i=Hn(),t=Ft();function n(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const a=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],l=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function u(h,b){const _=h.data,k=h.width,O=h.height;let v,x,g,p,P,d,m,y,w,L,R,D,E,S,A,M,T,B,U,Q,X,$,j,I,z=b+b+1,H=k-1,K=O-1,ee=b+1,V=ee*(ee+1)/2,Z=new n,Y=null,ne=Z,re=null,ie=null,ae=a[b],se=l[b];for(g=1;g<z;g++)ne=ne.next=new n,g===ee&&(Y=ne);for(ne.next=Z,m=d=0,x=0;x<O;x++){for(M=T=B=U=y=w=L=R=0,D=ee*(Q=_[d]),E=ee*(X=_[d+1]),S=ee*($=_[d+2]),A=ee*(j=_[d+3]),y+=V*Q,w+=V*X,L+=V*$,R+=V*j,ne=Z,g=0;g<ee;g++)ne.r=Q,ne.g=X,ne.b=$,ne.a=j,ne=ne.next;for(g=1;g<ee;g++)p=d+((H<g?H:g)<<2),y+=(ne.r=Q=_[p])*(I=ee-g),w+=(ne.g=X=_[p+1])*I,L+=(ne.b=$=_[p+2])*I,R+=(ne.a=j=_[p+3])*I,M+=Q,T+=X,B+=$,U+=j,ne=ne.next;for(re=Z,ie=Y,v=0;v<k;v++)_[d+3]=j=R*ae>>se,j!==0?(j=255/j,_[d]=(y*ae>>se)*j,_[d+1]=(w*ae>>se)*j,_[d+2]=(L*ae>>se)*j):_[d]=_[d+1]=_[d+2]=0,y-=D,w-=E,L-=S,R-=A,D-=re.r,E-=re.g,S-=re.b,A-=re.a,p=m+((p=v+b+1)<H?p:H)<<2,M+=re.r=_[p],T+=re.g=_[p+1],B+=re.b=_[p+2],U+=re.a=_[p+3],y+=M,w+=T,L+=B,R+=U,re=re.next,D+=Q=ie.r,E+=X=ie.g,S+=$=ie.b,A+=j=ie.a,M-=Q,T-=X,B-=$,U-=j,ie=ie.next,d+=4;m+=k}for(v=0;v<k;v++){for(T=B=U=M=w=L=R=y=0,d=v<<2,D=ee*(Q=_[d]),E=ee*(X=_[d+1]),S=ee*($=_[d+2]),A=ee*(j=_[d+3]),y+=V*Q,w+=V*X,L+=V*$,R+=V*j,ne=Z,g=0;g<ee;g++)ne.r=Q,ne.g=X,ne.b=$,ne.a=j,ne=ne.next;for(P=k,g=1;g<=b;g++)d=P+v<<2,y+=(ne.r=Q=_[d])*(I=ee-g),w+=(ne.g=X=_[d+1])*I,L+=(ne.b=$=_[d+2])*I,R+=(ne.a=j=_[d+3])*I,M+=Q,T+=X,B+=$,U+=j,ne=ne.next,g<K&&(P+=k);for(d=v,re=Z,ie=Y,x=0;x<O;x++)p=d<<2,_[p+3]=j=R*ae>>se,j>0?(j=255/j,_[p]=(y*ae>>se)*j,_[p+1]=(w*ae>>se)*j,_[p+2]=(L*ae>>se)*j):_[p]=_[p+1]=_[p+2]=0,y-=D,w-=E,L-=S,R-=A,D-=re.r,E-=re.g,S-=re.b,A-=re.a,p=v+((p=x+ee)<K?p:K)*k<<2,y+=M+=re.r=_[p],w+=T+=re.g=_[p+1],L+=B+=re.b=_[p+2],R+=U+=re.a=_[p+3],re=re.next,D+=Q=ie.r,E+=X=ie.g,S+=$=ie.b,A+=j=ie.a,M-=Q,T-=X,B-=$,U-=j,ie=ie.next,d+=k}}const c=function(b){const _=Math.round(this.blurRadius());_>0&&u(b,_)};return Ff.Blur=c,e.Factory.addGetterSetter(i.Node,"blurRadius",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Ff}var zf={},cy;function m8(){if(cy)return zf;cy=1,Object.defineProperty(zf,"__esModule",{value:!0}),zf.Brighten=void 0;const e=It(),i=Hn(),t=Ft(),n=function(a){let l=this.brightness()*255,u=a.data,c=u.length,h;for(h=0;h<c;h+=4)u[h]+=l,u[h+1]+=l,u[h+2]+=l};return zf.Brighten=n,e.Factory.addGetterSetter(i.Node,"brightness",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),zf}var Bf={},fy;function y8(){if(fy)return Bf;fy=1,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.Contrast=void 0;const e=It(),i=Hn(),t=Ft(),n=function(a){const l=Math.pow((this.contrast()+100)/100,2);let u=a.data,c=u.length,h=150,b=150,_=150,k;for(k=0;k<c;k+=4)h=u[k],b=u[k+1],_=u[k+2],h/=255,h-=.5,h*=l,h+=.5,h*=255,b/=255,b-=.5,b*=l,b+=.5,b*=255,_/=255,_-=.5,_*=l,_+=.5,_*=255,h=h<0?0:h>255?255:h,b=b<0?0:b>255?255:b,_=_<0?0:_>255?255:_,u[k]=h,u[k+1]=b,u[k+2]=_};return Bf.Contrast=n,e.Factory.addGetterSetter(i.Node,"contrast",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Bf}var Uf={},dy;function b8(){if(dy)return Uf;dy=1,Object.defineProperty(Uf,"__esModule",{value:!0}),Uf.Emboss=void 0;const e=It(),i=Hn(),t=Nn(),n=Ft(),a=function(l){let u=this.embossStrength()*10,c=this.embossWhiteLevel()*255,h=this.embossDirection(),b=this.embossBlend(),_=0,k=0,O=l.data,v=l.width,x=l.height,g=v*4,p=x;switch(h){case"top-left":_=-1,k=-1;break;case"top":_=-1,k=0;break;case"top-right":_=-1,k=1;break;case"right":_=0,k=1;break;case"bottom-right":_=1,k=1;break;case"bottom":_=1,k=0;break;case"bottom-left":_=1,k=-1;break;case"left":_=0,k=-1;break;default:t.Util.error("Unknown emboss direction: "+h)}do{const P=(p-1)*g;let d=_;p+d<1&&(d=0),p+d>x&&(d=0);const m=(p-1+d)*v*4;let y=v;do{const w=P+(y-1)*4;let L=k;y+L<1&&(L=0),y+L>v&&(L=0);const R=m+(y-1+L)*4,D=O[w]-O[R],E=O[w+1]-O[R+1],S=O[w+2]-O[R+2];let A=D;const M=A>0?A:-A,T=E>0?E:-E,B=S>0?S:-S;if(T>M&&(A=E),B>M&&(A=S),A*=u,b){const U=O[w]+A,Q=O[w+1]+A,X=O[w+2]+A;O[w]=U>255?255:U<0?0:U,O[w+1]=Q>255?255:Q<0?0:Q,O[w+2]=X>255?255:X<0?0:X}else{let U=c-A;U<0?U=0:U>255&&(U=255),O[w]=O[w+1]=O[w+2]=U}}while(--y)}while(--p)};return Uf.Emboss=a,e.Factory.addGetterSetter(i.Node,"embossStrength",.5,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"embossWhiteLevel",.5,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"embossDirection","top-left",null,e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"embossBlend",!1,null,e.Factory.afterSetFilter),Uf}var qf={},hy;function _8(){if(hy)return qf;hy=1,Object.defineProperty(qf,"__esModule",{value:!0}),qf.Enhance=void 0;const e=It(),i=Hn(),t=Ft();function n(l,u,c,h,b){let _=c-u,k=b-h,O;return _===0?h+k/2:k===0?h:(O=(l-u)/_,O=k*O+h,O)}const a=function(l){let u=l.data,c=u.length,h=u[0],b=h,_,k=u[1],O=k,v,x=u[2],g=x,p,P;const d=this.enhance();if(d===0)return;for(P=0;P<c;P+=4)_=u[P+0],_<h?h=_:_>b&&(b=_),v=u[P+1],v<k?k=v:v>O&&(O=v),p=u[P+2],p<x?x=p:p>g&&(g=p);b===h&&(b=255,h=0),O===k&&(O=255,k=0),g===x&&(g=255,x=0);let m,y,w,L,R,D,E,S,A;for(d>0?(y=b+d*(255-b),w=h-d*(h-0),R=O+d*(255-O),D=k-d*(k-0),S=g+d*(255-g),A=x-d*(x-0)):(m=(b+h)*.5,y=b+d*(b-m),w=h+d*(h-m),L=(O+k)*.5,R=O+d*(O-L),D=k+d*(k-L),E=(g+x)*.5,S=g+d*(g-E),A=x+d*(x-E)),P=0;P<c;P+=4)u[P+0]=n(u[P+0],h,b,w,y),u[P+1]=n(u[P+1],k,O,D,R),u[P+2]=n(u[P+2],x,g,A,S)};return qf.Enhance=a,e.Factory.addGetterSetter(i.Node,"enhance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),qf}var Hf={},py;function w8(){if(py)return Hf;py=1,Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.Grayscale=void 0;const e=function(i){let t=i.data,n=t.length,a,l;for(a=0;a<n;a+=4)l=.34*t[a]+.5*t[a+1]+.16*t[a+2],t[a]=l,t[a+1]=l,t[a+2]=l};return Hf.Grayscale=e,Hf}var Gf={},gy;function S8(){if(gy)return Gf;gy=1,Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.HSL=void 0;const e=It(),i=Hn(),t=Ft();e.Factory.addGetterSetter(i.Node,"hue",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"saturation",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"luminance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter);const n=function(a){let l=a.data,u=l.length,c=1,h=Math.pow(2,this.saturation()),b=Math.abs(this.hue()+360)%360,_=this.luminance()*127,k;const O=c*h*Math.cos(b*Math.PI/180),v=c*h*Math.sin(b*Math.PI/180),x=.299*c+.701*O+.167*v,g=.587*c-.587*O+.33*v,p=.114*c-.114*O-.497*v,P=.299*c-.299*O-.328*v,d=.587*c+.413*O+.035*v,m=.114*c-.114*O+.293*v,y=.299*c-.3*O+1.25*v,w=.587*c-.586*O-1.05*v,L=.114*c+.886*O-.2*v;let R,D,E,S;for(k=0;k<u;k+=4)R=l[k+0],D=l[k+1],E=l[k+2],S=l[k+3],l[k+0]=x*R+g*D+p*E+_,l[k+1]=P*R+d*D+m*E+_,l[k+2]=y*R+w*D+L*E+_,l[k+3]=S};return Gf.HSL=n,Gf}var Vf={},vy;function E8(){if(vy)return Vf;vy=1,Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.HSV=void 0;const e=It(),i=Hn(),t=Ft(),n=function(a){const l=a.data,u=l.length,c=Math.pow(2,this.value()),h=Math.pow(2,this.saturation()),b=Math.abs(this.hue()+360)%360,_=c*h*Math.cos(b*Math.PI/180),k=c*h*Math.sin(b*Math.PI/180),O=.299*c+.701*_+.167*k,v=.587*c-.587*_+.33*k,x=.114*c-.114*_-.497*k,g=.299*c-.299*_-.328*k,p=.587*c+.413*_+.035*k,P=.114*c-.114*_+.293*k,d=.299*c-.3*_+1.25*k,m=.587*c-.586*_-1.05*k,y=.114*c+.886*_-.2*k;let w,L,R,D;for(let E=0;E<u;E+=4)w=l[E+0],L=l[E+1],R=l[E+2],D=l[E+3],l[E+0]=O*w+v*L+x*R,l[E+1]=g*w+p*L+P*R,l[E+2]=d*w+m*L+y*R,l[E+3]=D};return Vf.HSV=n,e.Factory.addGetterSetter(i.Node,"hue",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"saturation",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"value",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Vf}var $f={},my;function O8(){if(my)return $f;my=1,Object.defineProperty($f,"__esModule",{value:!0}),$f.Invert=void 0;const e=function(i){let t=i.data,n=t.length,a;for(a=0;a<n;a+=4)t[a]=255-t[a],t[a+1]=255-t[a+1],t[a+2]=255-t[a+2]};return $f.Invert=e,$f}var Wf={},yy;function x8(){if(yy)return Wf;yy=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.Kaleidoscope=void 0;const e=It(),i=Hn(),t=Nn(),n=Ft(),a=function(c,h,b){let _=c.data,k=h.data,O=c.width,v=c.height,x=b.polarCenterX||O/2,g=b.polarCenterY||v/2,p,P,d,m=0,y=0,w=0,L=0,R,D=Math.sqrt(x*x+g*g);P=O-x,d=v-g,R=Math.sqrt(P*P+d*d),D=R>D?R:D;let E=v,S=O,A,M,T=360/S*Math.PI/180,B,U;for(M=0;M<S;M+=1)for(B=Math.sin(M*T),U=Math.cos(M*T),A=0;A<E;A+=1)P=Math.floor(x+D*A/E*U),d=Math.floor(g+D*A/E*B),p=(d*O+P)*4,m=_[p+0],y=_[p+1],w=_[p+2],L=_[p+3],p=(M+A*O)*4,k[p+0]=m,k[p+1]=y,k[p+2]=w,k[p+3]=L},l=function(c,h,b){let _=c.data,k=h.data,O=c.width,v=c.height,x=b.polarCenterX||O/2,g=b.polarCenterY||v/2,p,P,d,m,y,w=0,L=0,R=0,D=0,E,S=Math.sqrt(x*x+g*g);P=O-x,d=v-g,E=Math.sqrt(P*P+d*d),S=E>S?E:S;let A=v,M=O,T,B,U=0,Q,X;for(P=0;P<O;P+=1)for(d=0;d<v;d+=1)m=P-x,y=d-g,T=Math.sqrt(m*m+y*y)*A/S,B=(Math.atan2(y,m)*180/Math.PI+360+U)%360,B=B*M/360,Q=Math.floor(B),X=Math.floor(T),p=(X*O+Q)*4,w=_[p+0],L=_[p+1],R=_[p+2],D=_[p+3],p=(d*O+P)*4,k[p+0]=w,k[p+1]=L,k[p+2]=R,k[p+3]=D},u=function(c){const h=c.width,b=c.height;let _,k,O,v,x,g,p,P,d,m,y=Math.round(this.kaleidoscopePower());const w=Math.round(this.kaleidoscopeAngle()),L=Math.floor(h*(w%360)/360);if(y<1)return;const R=t.Util.createCanvasElement();R.width=h,R.height=b;const D=R.getContext("2d").getImageData(0,0,h,b);t.Util.releaseCanvas(R),a(c,D,{polarCenterX:h/2,polarCenterY:b/2});let E=h/Math.pow(2,y);for(;E<=8;)E=E*2,y-=1;E=Math.ceil(E);let S=E,A=0,M=S,T=1;for(L+E>h&&(A=S,M=0,T=-1),k=0;k<b;k+=1)for(_=A;_!==M;_+=T)O=Math.round(_+L)%h,d=(h*k+O)*4,x=D.data[d+0],g=D.data[d+1],p=D.data[d+2],P=D.data[d+3],m=(h*k+_)*4,D.data[m+0]=x,D.data[m+1]=g,D.data[m+2]=p,D.data[m+3]=P;for(k=0;k<b;k+=1)for(S=Math.floor(E),v=0;v<y;v+=1){for(_=0;_<S+1;_+=1)d=(h*k+_)*4,x=D.data[d+0],g=D.data[d+1],p=D.data[d+2],P=D.data[d+3],m=(h*k+S*2-_-1)*4,D.data[m+0]=x,D.data[m+1]=g,D.data[m+2]=p,D.data[m+3]=P;S*=2}l(D,c,{polarRotation:0})};return Wf.Kaleidoscope=u,e.Factory.addGetterSetter(i.Node,"kaleidoscopePower",2,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"kaleidoscopeAngle",0,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),Wf}var Yf={},by;function P8(){if(by)return Yf;by=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.Mask=void 0;const e=It(),i=Hn(),t=Ft();function n(O,v,x){let g=(x*O.width+v)*4;const p=[];return p.push(O.data[g++],O.data[g++],O.data[g++],O.data[g++]),p}function a(O,v){return Math.sqrt(Math.pow(O[0]-v[0],2)+Math.pow(O[1]-v[1],2)+Math.pow(O[2]-v[2],2))}function l(O){const v=[0,0,0];for(let x=0;x<O.length;x++)v[0]+=O[x][0],v[1]+=O[x][1],v[2]+=O[x][2];return v[0]/=O.length,v[1]/=O.length,v[2]/=O.length,v}function u(O,v){const x=n(O,0,0),g=n(O,O.width-1,0),p=n(O,0,O.height-1),P=n(O,O.width-1,O.height-1),d=v||10;if(a(x,g)<d&&a(g,P)<d&&a(P,p)<d&&a(p,x)<d){const m=l([g,x,P,p]),y=[];for(let w=0;w<O.width*O.height;w++){const L=a(m,[O.data[w*4],O.data[w*4+1],O.data[w*4+2]]);y[w]=L<d?0:255}return y}}function c(O,v){for(let x=0;x<O.width*O.height;x++)O.data[4*x+3]=v[x]}function h(O,v,x){const g=[1,1,1,1,0,1,1,1,1],p=Math.round(Math.sqrt(g.length)),P=Math.floor(p/2),d=[];for(let m=0;m<x;m++)for(let y=0;y<v;y++){const w=m*v+y;let L=0;for(let R=0;R<p;R++)for(let D=0;D<p;D++){const E=m+R-P,S=y+D-P;if(E>=0&&E<x&&S>=0&&S<v){const A=E*v+S,M=g[R*p+D];L+=O[A]*M}}d[w]=L===255*8?255:0}return d}function b(O,v,x){const g=[1,1,1,1,1,1,1,1,1],p=Math.round(Math.sqrt(g.length)),P=Math.floor(p/2),d=[];for(let m=0;m<x;m++)for(let y=0;y<v;y++){const w=m*v+y;let L=0;for(let R=0;R<p;R++)for(let D=0;D<p;D++){const E=m+R-P,S=y+D-P;if(E>=0&&E<x&&S>=0&&S<v){const A=E*v+S,M=g[R*p+D];L+=O[A]*M}}d[w]=L>=255*4?255:0}return d}function _(O,v,x){const g=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],p=Math.round(Math.sqrt(g.length)),P=Math.floor(p/2),d=[];for(let m=0;m<x;m++)for(let y=0;y<v;y++){const w=m*v+y;let L=0;for(let R=0;R<p;R++)for(let D=0;D<p;D++){const E=m+R-P,S=y+D-P;if(E>=0&&E<x&&S>=0&&S<v){const A=E*v+S,M=g[R*p+D];L+=O[A]*M}}d[w]=L}return d}const k=function(O){let v=this.threshold(),x=u(O,v);return x&&(x=h(x,O.width,O.height),x=b(x,O.width,O.height),x=_(x,O.width,O.height),c(O,x)),O};return Yf.Mask=k,e.Factory.addGetterSetter(i.Node,"threshold",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Yf}var Kf={},_y;function C8(){if(_y)return Kf;_y=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.Noise=void 0;const e=It(),i=Hn(),t=Ft(),n=function(a){const l=this.noise()*255,u=a.data,c=u.length,h=l/2;for(let b=0;b<c;b+=4)u[b+0]+=h-2*h*Math.random(),u[b+1]+=h-2*h*Math.random(),u[b+2]+=h-2*h*Math.random()};return Kf.Noise=n,e.Factory.addGetterSetter(i.Node,"noise",.2,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Kf}var Xf={},wy;function k8(){if(wy)return Xf;wy=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.Pixelate=void 0;const e=It(),i=Nn(),t=Hn(),n=Ft(),a=function(l){let u=Math.ceil(this.pixelSize()),c=l.width,h=l.height,b,_,k,O,v,x,g,p=Math.ceil(c/u),P=Math.ceil(h/u),d,m,y,w,L,R,D,E=l.data;if(u<=0){i.Util.error("pixelSize value can not be <= 0");return}for(L=0;L<p;L+=1)for(R=0;R<P;R+=1){for(O=0,v=0,x=0,g=0,d=L*u,m=d+u,y=R*u,w=y+u,D=0,b=d;b<m;b+=1)if(!(b>=c))for(_=y;_<w;_+=1)_>=h||(k=(c*_+b)*4,O+=E[k+0],v+=E[k+1],x+=E[k+2],g+=E[k+3],D+=1);for(O=O/D,v=v/D,x=x/D,g=g/D,b=d;b<m;b+=1)if(!(b>=c))for(_=y;_<w;_+=1)_>=h||(k=(c*_+b)*4,E[k+0]=O,E[k+1]=v,E[k+2]=x,E[k+3]=g)}};return Xf.Pixelate=a,e.Factory.addGetterSetter(t.Node,"pixelSize",8,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),Xf}var Zf={},Sy;function T8(){if(Sy)return Zf;Sy=1,Object.defineProperty(Zf,"__esModule",{value:!0}),Zf.Posterize=void 0;const e=It(),i=Hn(),t=Ft(),n=function(a){let l=Math.round(this.levels()*254)+1,u=a.data,c=u.length,h=255/l,b;for(b=0;b<c;b+=1)u[b]=Math.floor(u[b]/h)*h};return Zf.Posterize=n,e.Factory.addGetterSetter(i.Node,"levels",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Zf}var Qf={},Ey;function A8(){if(Ey)return Qf;Ey=1,Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.RGB=void 0;const e=It(),i=Hn(),t=Ft(),n=function(a){let l=a.data,u=l.length,c=this.red(),h=this.green(),b=this.blue(),_,k;for(_=0;_<u;_+=4)k=(.34*l[_]+.5*l[_+1]+.16*l[_+2])/255,l[_]=k*c,l[_+1]=k*h,l[_+2]=k*b,l[_+3]=l[_+3]};return Qf.RGB=n,e.Factory.addGetterSetter(i.Node,"red",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"green",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"blue",0,t.RGBComponent,e.Factory.afterSetFilter),Qf}var Jf={},Oy;function R8(){if(Oy)return Jf;Oy=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.RGBA=void 0;const e=It(),i=Hn(),t=Ft(),n=function(a){const l=a.data,u=l.length,c=this.red(),h=this.green(),b=this.blue(),_=this.alpha();for(let k=0;k<u;k+=4){const O=1-_;l[k]=c*_+l[k]*O,l[k+1]=h*_+l[k+1]*O,l[k+2]=b*_+l[k+2]*O}};return Jf.RGBA=n,e.Factory.addGetterSetter(i.Node,"red",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"green",0,function(a){return this._filterUpToDate=!1,a>255?255:a<0?0:Math.round(a)}),e.Factory.addGetterSetter(i.Node,"blue",0,t.RGBComponent,e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"alpha",1,function(a){return this._filterUpToDate=!1,a>1?1:a<0?0:a}),Jf}var ed={},xy;function M8(){if(xy)return ed;xy=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.Sepia=void 0;const e=function(i){let t=i.data,n=t.length,a,l,u,c;for(a=0;a<n;a+=4)l=t[a+0],u=t[a+1],c=t[a+2],t[a+0]=Math.min(255,l*.393+u*.769+c*.189),t[a+1]=Math.min(255,l*.349+u*.686+c*.168),t[a+2]=Math.min(255,l*.272+u*.534+c*.131)};return ed.Sepia=e,ed}var td={},Py;function L8(){if(Py)return td;Py=1,Object.defineProperty(td,"__esModule",{value:!0}),td.Solarize=void 0;const e=function(i){const t=i.data,n=i.width,a=i.height,l=n*4;let u=a;do{const c=(u-1)*l;let h=n;do{const b=c+(h-1)*4;let _=t[b],k=t[b+1],O=t[b+2];_>127&&(_=255-_),k>127&&(k=255-k),O>127&&(O=255-O),t[b]=_,t[b+1]=k,t[b+2]=O}while(--h)}while(--u)};return td.Solarize=e,td}var nd={},Cy;function N8(){if(Cy)return nd;Cy=1,Object.defineProperty(nd,"__esModule",{value:!0}),nd.Threshold=void 0;const e=It(),i=Hn(),t=Ft(),n=function(a){const l=this.threshold()*255,u=a.data,c=u.length;for(let h=0;h<c;h+=1)u[h]=u[h]<l?0:255};return nd.Threshold=n,e.Factory.addGetterSetter(i.Node,"threshold",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),nd}var ky;function I8(){if(ky)return vf;ky=1,Object.defineProperty(vf,"__esModule",{value:!0}),vf.Konva=void 0;const e=kg(),i=n8(),t=i8(),n=o8(),a=a8(),l=l8(),u=s8(),c=g5(),h=rv(),b=v5(),_=u8(),k=c8(),O=f8(),v=d8(),x=m5(),g=h8(),p=p8(),P=g8(),d=v8(),m=m8(),y=y8(),w=b8(),L=_8(),R=w8(),D=S8(),E=E8(),S=O8(),A=x8(),M=P8(),T=C8(),B=k8(),U=T8(),Q=A8(),X=R8(),$=M8(),j=L8(),I=N8();return vf.Konva=e.Konva.Util._assign(e.Konva,{Arc:i.Arc,Arrow:t.Arrow,Circle:n.Circle,Ellipse:a.Ellipse,Image:l.Image,Label:u.Label,Tag:u.Tag,Line:c.Line,Path:h.Path,Rect:b.Rect,RegularPolygon:_.RegularPolygon,Ring:k.Ring,Sprite:O.Sprite,Star:v.Star,Text:x.Text,TextPath:g.TextPath,Transformer:p.Transformer,Wedge:P.Wedge,Filters:{Blur:d.Blur,Brighten:m.Brighten,Contrast:y.Contrast,Emboss:w.Emboss,Enhance:L.Enhance,Grayscale:R.Grayscale,HSL:D.HSL,HSV:E.HSV,Invert:S.Invert,Kaleidoscope:A.Kaleidoscope,Mask:M.Mask,Noise:T.Noise,Pixelate:B.Pixelate,Posterize:U.Posterize,RGB:Q.RGB,RGBA:X.RGBA,Sepia:$.Sepia,Solarize:j.Solarize,Threshold:I.Threshold}}),vf}var D8=rp.exports,Ty;function Ji(){if(Ty)return rp.exports;Ty=1,Object.defineProperty(D8,"__esModule",{value:!0});const e=I8();return rp.exports=e.Konva,rp.exports}Ji();var Zh={exports:{}},Ay;function j8(){return Ay||(Ay=1,function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Konva=void 0;var t=kg();Object.defineProperty(i,"Konva",{enumerable:!0,get:function(){return t.Konva}});const n=kg();e.exports=n.Konva}(Zh,Zh.exports)),Zh.exports}var F8=j8();const xd=Ad(F8);var H0={exports:{}};/**
|
|
44
|
-
* @license React
|
|
45
|
-
* react-reconciler.production.min.js
|
|
46
|
-
*
|
|
47
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the MIT license found in the
|
|
50
|
-
* LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var G0,Ry;function z8(){return Ry||(Ry=1,G0=function(i){var t={},n=Tn(),a=Mg(),l=Object.assign;function u(s){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+s,N=1;N<arguments.length;N++)f+="&args[]="+encodeURIComponent(arguments[N]);return"Minified React error #"+s+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,h=Symbol.for("react.element"),b=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),x=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),w=Symbol.iterator;function L(s){return s===null||typeof s!="object"?null:(s=w&&s[w]||s["@@iterator"],typeof s=="function"?s:null)}function R(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 _:return"Fragment";case b:return"Portal";case O:return"Profiler";case k:return"StrictMode";case p:return"Suspense";case P:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case x:return(s.displayName||"Context")+".Consumer";case v:return(s._context.displayName||"Context")+".Provider";case g:var f=s.render;return s=s.displayName,s||(s=f.displayName||f.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case d:return f=s.displayName||null,f!==null?f:R(s.type)||"Memo";case m:f=s._payload,s=s._init;try{return R(s(f))}catch{}}return null}function D(s){var f=s.type;switch(s.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=f.render,s=s.displayName||s.name||"",f.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return R(f);case 8:return f===k?"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 f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function E(s){var f=s,N=s;if(s.alternate)for(;f.return;)f=f.return;else{s=f;do f=s,f.flags&4098&&(N=f.return),s=f.return;while(s)}return f.tag===3?N:null}function S(s){if(E(s)!==s)throw Error(u(188))}function A(s){var f=s.alternate;if(!f){if(f=E(s),f===null)throw Error(u(188));return f!==s?null:s}for(var N=s,q=f;;){var W=N.return;if(W===null)break;var te=W.alternate;if(te===null){if(q=W.return,q!==null){N=q;continue}break}if(W.child===te.child){for(te=W.child;te;){if(te===N)return S(W),s;if(te===q)return S(W),f;te=te.sibling}throw Error(u(188))}if(N.return!==q.return)N=W,q=te;else{for(var le=!1,ye=W.child;ye;){if(ye===N){le=!0,N=W,q=te;break}if(ye===q){le=!0,q=W,N=te;break}ye=ye.sibling}if(!le){for(ye=te.child;ye;){if(ye===N){le=!0,N=te,q=W;break}if(ye===q){le=!0,q=te,N=W;break}ye=ye.sibling}if(!le)throw Error(u(189))}}if(N.alternate!==q)throw Error(u(190))}if(N.tag!==3)throw Error(u(188));return N.stateNode.current===N?s:f}function M(s){return s=A(s),s!==null?T(s):null}function T(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var f=T(s);if(f!==null)return f;s=s.sibling}return null}function B(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){if(s.tag!==4){var f=B(s);if(f!==null)return f}s=s.sibling}return null}var U=Array.isArray,Q=i.getPublicInstance,X=i.getRootHostContext,$=i.getChildHostContext,j=i.prepareForCommit,I=i.resetAfterCommit,z=i.createInstance,H=i.appendInitialChild,K=i.finalizeInitialChildren,ee=i.prepareUpdate,V=i.shouldSetTextContent,Z=i.createTextInstance,Y=i.scheduleTimeout,ne=i.cancelTimeout,re=i.noTimeout,ie=i.isPrimaryRenderer,ae=i.supportsMutation,se=i.supportsPersistence,de=i.supportsHydration,he=i.getInstanceFromNode,Se=i.preparePortalMount,Ee=i.getCurrentEventPriority,De=i.detachDeletedInstance,fe=i.supportsMicrotasks,ge=i.scheduleMicrotask,Te=i.supportsTestSelectors,Re=i.findFiberRoot,ue=i.getBoundingRect,me=i.getTextContent,xe=i.isHiddenSubtree,Ie=i.matchAccessibilityRole,tt=i.setFocusIfFocusable,lt=i.setupIntersectionObserver,Fe=i.appendChild,ze=i.appendChildToContainer,Ue=i.commitTextUpdate,Xe=i.commitMount,dt=i.commitUpdate,kt=i.insertBefore,Et=i.insertInContainerBefore,be=i.removeChild,we=i.removeChildFromContainer,Ne=i.resetTextContent,Ye=i.hideInstance,Ze=i.hideTextInstance,ke=i.unhideInstance,vt=i.unhideTextInstance,je=i.clearContainer,ot=i.cloneInstance,dn=i.createContainerChildSet,Yt=i.appendChildToContainerChildSet,hn=i.finalizeContainerChildren,Ge=i.replaceContainerChildren,pt=i.cloneHiddenInstance,Ot=i.cloneHiddenTextInstance,zt=i.canHydrateInstance,Ut=i.canHydrateTextInstance,pn=i.canHydrateSuspenseInstance,In=i.isSuspenseInstancePending,wn=i.isSuspenseInstanceFallback,Qn=i.getSuspenseInstanceFallbackErrorDetails,ii=i.registerSuspenseInstanceRetry,Sr=i.getNextHydratableSibling,Qe=i.getFirstHydratableChild,_t=i.getFirstHydratableChildWithinContainer,At=i.getFirstHydratableChildWithinSuspenseInstance,Ht=i.hydrateInstance,Gt=i.hydrateTextInstance,Jn=i.hydrateSuspenseInstance,Gn=i.getNextHydratableInstanceAfterSuspenseInstance,Sn=i.commitHydratedContainer,oi=i.commitHydratedSuspenseInstance,Ir=i.clearSuspenseBoundary,Ii=i.clearSuspenseBoundaryFromContainer,No=i.shouldDeleteUnhydratedTailInstances,rs=i.didNotMatchHydratedContainerTextInstance,Qt=i.didNotMatchHydratedTextInstance,to;function Dr(s){if(to===void 0)try{throw Error()}catch(N){var f=N.stack.trim().match(/\n( *(at )?)/);to=f&&f[1]||""}return`
|
|
52
|
-
`+to+s}var ha=!1;function no(s,f){if(!s||ha)return"";ha=!0;var N=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(Ve){var q=Ve}Reflect.construct(s,[],f)}else{try{f.call()}catch(Ve){q=Ve}s.call(f.prototype)}else{try{throw Error()}catch(Ve){q=Ve}s()}}catch(Ve){if(Ve&&q&&typeof Ve.stack=="string"){for(var W=Ve.stack.split(`
|
|
53
|
-
`),te=q.stack.split(`
|
|
54
|
-
`),le=W.length-1,ye=te.length-1;1<=le&&0<=ye&&W[le]!==te[ye];)ye--;for(;1<=le&&0<=ye;le--,ye--)if(W[le]!==te[ye]){if(le!==1||ye!==1)do if(le--,ye--,0>ye||W[le]!==te[ye]){var Me=`
|
|
55
|
-
`+W[le].replace(" at new "," at ");return s.displayName&&Me.includes("<anonymous>")&&(Me=Me.replace("<anonymous>",s.displayName)),Me}while(1<=le&&0<=ye);break}}}finally{ha=!1,Error.prepareStackTrace=N}return(s=s?s.displayName||s.name:"")?Dr(s):""}var Gp=Object.prototype.hasOwnProperty,Qs=[],ro=-1;function er(s){return{current:s}}function sn(s){0>ro||(s.current=Qs[ro],Qs[ro]=null,ro--)}function Mt(s,f){ro++,Qs[ro]=s.current,s.current=f}var Io={},fr=er(Io),jr=er(!1),Di=Io;function io(s,f){var N=s.type.contextTypes;if(!N)return Io;var q=s.stateNode;if(q&&q.__reactInternalMemoizedUnmaskedChildContext===f)return q.__reactInternalMemoizedMaskedChildContext;var W={},te;for(te in N)W[te]=f[te];return q&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=f,s.__reactInternalMemoizedMaskedChildContext=W),W}function Vn(s){return s=s.childContextTypes,s!=null}function pa(){sn(jr),sn(fr)}function Gd(s,f,N){if(fr.current!==Io)throw Error(u(168));Mt(fr,f),Mt(jr,N)}function Vd(s,f,N){var q=s.stateNode;if(f=f.childContextTypes,typeof q.getChildContext!="function")return N;q=q.getChildContext();for(var W in q)if(!(W in f))throw Error(u(108,D(s)||"Unknown",W));return l({},N,q)}function tl(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Io,Di=fr.current,Mt(fr,s),Mt(jr,jr.current),!0}function Ec(s,f,N){var q=s.stateNode;if(!q)throw Error(u(169));N?(s=Vd(s,f,Di),q.__reactInternalMemoizedMergedChildContext=s,sn(jr),sn(fr),Mt(fr,s)):sn(jr),Mt(jr,N)}var Gr=Math.clz32?Math.clz32:Oc,is=Math.log,Vp=Math.LN2;function Oc(s){return s>>>=0,s===0?32:31-(is(s)/Vp|0)|0}var qt=64,os=4194304;function nl(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 rl(s,f){var N=s.pendingLanes;if(N===0)return 0;var q=0,W=s.suspendedLanes,te=s.pingedLanes,le=N&268435455;if(le!==0){var ye=le&~W;ye!==0?q=nl(ye):(te&=le,te!==0&&(q=nl(te)))}else le=N&~W,le!==0?q=nl(le):te!==0&&(q=nl(te));if(q===0)return 0;if(f!==0&&f!==q&&!(f&W)&&(W=q&-q,te=f&-f,W>=te||W===16&&(te&4194240)!==0))return f;if(q&4&&(q|=N&16),f=s.entangledLanes,f!==0)for(s=s.entanglements,f&=q;0<f;)N=31-Gr(f),W=1<<N,q|=s[N],f&=~W;return q}function $d(s,f){switch(s){case 1:case 2:case 4:return f+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 f+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 Wd(s,f){for(var N=s.suspendedLanes,q=s.pingedLanes,W=s.expirationTimes,te=s.pendingLanes;0<te;){var le=31-Gr(te),ye=1<<le,Me=W[le];Me===-1?(!(ye&N)||ye&q)&&(W[le]=$d(ye,f)):Me<=f&&(s.expiredLanes|=ye),te&=~ye}}function Js(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function eu(){var s=qt;return qt<<=1,!(qt&4194240)&&(qt=64),s}function il(s){for(var f=[],N=0;31>N;N++)f.push(s);return f}function ai(s,f,N){s.pendingLanes|=f,f!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,f=31-Gr(f),s[f]=N}function Do(s,f){var N=s.pendingLanes&~f;s.pendingLanes=f,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=f,s.mutableReadLanes&=f,s.entangledLanes&=f,f=s.entanglements;var q=s.eventTimes;for(s=s.expirationTimes;0<N;){var W=31-Gr(N),te=1<<W;f[W]=0,q[W]=-1,s[W]=-1,N&=~te}}function ji(s,f){var N=s.entangledLanes|=f;for(s=s.entanglements;N;){var q=31-Gr(N),W=1<<q;W&f|s[q]&f&&(s[q]|=f),N&=~W}}var Lt=0;function ol(s){return s&=-s,1<s?4<s?s&268435455?16:536870912:4:1}var Fi=a.unstable_scheduleCallback,Yd=a.unstable_cancelCallback,Kd=a.unstable_shouldYield,as=a.unstable_requestPaint,$n=a.unstable_now,tu=a.unstable_ImmediatePriority,nu=a.unstable_UserBlockingPriority,ru=a.unstable_NormalPriority,$p=a.unstable_IdlePriority,jo=null,Fr=null;function al(s){if(Fr&&typeof Fr.onCommitFiberRoot=="function")try{Fr.onCommitFiberRoot(jo,s,void 0,(s.current.flags&128)===128)}catch{}}function iu(s,f){return s===f&&(s!==0||1/s===1/f)||s!==s&&f!==f}var wi=typeof Object.is=="function"?Object.is:iu,oo=null,ll=!1,sl=!1;function ou(s){oo===null?oo=[s]:oo.push(s)}function Xd(s){ll=!0,ou(s)}function tr(){if(!sl&&oo!==null){sl=!0;var s=0,f=Lt;try{var N=oo;for(Lt=1;s<N.length;s++){var q=N[s];do q=q(!0);while(q!==null)}oo=null,ll=!1}catch(W){throw oo!==null&&(oo=oo.slice(s+1)),Fi(tu,tr),W}finally{Lt=f,sl=!1}}return null}var Fo=[],ao=0,ls=null,ga=0,Er=[],Vr=0,Dn=null,zr=1,Si="";function Ei(s,f){Fo[ao++]=ga,Fo[ao++]=ls,ls=s,ga=f}function Zd(s,f,N){Er[Vr++]=zr,Er[Vr++]=Si,Er[Vr++]=Dn,Dn=s;var q=zr;s=Si;var W=32-Gr(q)-1;q&=~(1<<W),N+=1;var te=32-Gr(f)+W;if(30<te){var le=W-W%5;te=(q&(1<<le)-1).toString(32),q>>=le,W-=le,zr=1<<32-Gr(f)+W|N<<W|q,Si=te+s}else zr=1<<te|N<<W|q,Si=s}function ss(s){s.return!==null&&(Ei(s,1),Zd(s,1,0))}function us(s){for(;s===ls;)ls=Fo[--ao],Fo[ao]=null,ga=Fo[--ao],Fo[ao]=null;for(;s===Dn;)Dn=Er[--Vr],Er[Vr]=null,Si=Er[--Vr],Er[Vr]=null,zr=Er[--Vr],Er[Vr]=null}var nr=null,Or=null,un=!1,cs=!1,Oi=null;function Qd(s,f){var N=ti(5,null,null,0);N.elementType="DELETED",N.stateNode=f,N.return=s,f=s.deletions,f===null?(s.deletions=[N],s.flags|=16):f.push(N)}function au(s,f){switch(s.tag){case 5:return f=zt(f,s.type,s.pendingProps),f!==null?(s.stateNode=f,nr=s,Or=Qe(f),!0):!1;case 6:return f=Ut(f,s.pendingProps),f!==null?(s.stateNode=f,nr=s,Or=null,!0):!1;case 13:if(f=pn(f),f!==null){var N=Dn!==null?{id:zr,overflow:Si}:null;return s.memoizedState={dehydrated:f,treeContext:N,retryLane:1073741824},N=ti(18,null,null,0),N.stateNode=f,N.return=s,s.child=N,nr=s,Or=null,!0}return!1;default:return!1}}function xc(s){return(s.mode&1)!==0&&(s.flags&128)===0}function Pc(s){if(un){var f=Or;if(f){var N=f;if(!au(s,f)){if(xc(s))throw Error(u(418));f=Sr(N);var q=nr;f&&au(s,f)?Qd(q,N):(s.flags=s.flags&-4097|2,un=!1,nr=s)}}else{if(xc(s))throw Error(u(418));s.flags=s.flags&-4097|2,un=!1,nr=s}}}function Jd(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;nr=s}function lu(s){if(!de||s!==nr)return!1;if(!un)return Jd(s),un=!0,!1;if(s.tag!==3&&(s.tag!==5||No(s.type)&&!V(s.type,s.memoizedProps))){var f=Or;if(f){if(xc(s))throw eh(),Error(u(418));for(;f;)Qd(s,f),f=Sr(f)}}if(Jd(s),s.tag===13){if(!de)throw Error(u(316));if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(u(317));Or=Gn(s)}else Or=nr?Sr(s.stateNode):null;return!0}function eh(){for(var s=Or;s;)s=Sr(s)}function va(){de&&(Or=nr=null,cs=un=!1)}function Cc(s){Oi===null?Oi=[s]:Oi.push(s)}var Wp=c.ReactCurrentBatchConfig;function su(s,f){if(wi(s,f))return!0;if(typeof s!="object"||s===null||typeof f!="object"||f===null)return!1;var N=Object.keys(s),q=Object.keys(f);if(N.length!==q.length)return!1;for(q=0;q<N.length;q++){var W=N[q];if(!Gp.call(f,W)||!wi(s[W],f[W]))return!1}return!0}function Yp(s){switch(s.tag){case 5:return Dr(s.type);case 16:return Dr("Lazy");case 13:return Dr("Suspense");case 19:return Dr("SuspenseList");case 0:case 2:case 15:return s=no(s.type,!1),s;case 11:return s=no(s.type.render,!1),s;case 1:return s=no(s.type,!0),s;default:return""}}function ma(s,f,N){if(s=N.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(N._owner){if(N=N._owner,N){if(N.tag!==1)throw Error(u(309));var q=N.stateNode}if(!q)throw Error(u(147,s));var W=q,te=""+s;return f!==null&&f.ref!==null&&typeof f.ref=="function"&&f.ref._stringRef===te?f.ref:(f=function(le){var ye=W.refs;le===null?delete ye[te]:ye[te]=le},f._stringRef=te,f)}if(typeof s!="string")throw Error(u(284));if(!N._owner)throw Error(u(290,s))}return s}function uu(s,f){throw s=Object.prototype.toString.call(f),Error(u(31,s==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":s))}function th(s){var f=s._init;return f(s._payload)}function nh(s){function f(Ce,_e){if(s){var Le=Ce.deletions;Le===null?(Ce.deletions=[_e],Ce.flags|=16):Le.push(_e)}}function N(Ce,_e){if(!s)return null;for(;_e!==null;)f(Ce,_e),_e=_e.sibling;return null}function q(Ce,_e){for(Ce=new Map;_e!==null;)_e.key!==null?Ce.set(_e.key,_e):Ce.set(_e.index,_e),_e=_e.sibling;return Ce}function W(Ce,_e){return Ce=na(Ce,_e),Ce.index=0,Ce.sibling=null,Ce}function te(Ce,_e,Le){return Ce.index=Le,s?(Le=Ce.alternate,Le!==null?(Le=Le.index,Le<_e?(Ce.flags|=2,_e):Le):(Ce.flags|=2,_e)):(Ce.flags|=1048576,_e)}function le(Ce){return s&&Ce.alternate===null&&(Ce.flags|=2),Ce}function ye(Ce,_e,Le,et){return _e===null||_e.tag!==6?(_e=Ll(Le,Ce.mode,et),_e.return=Ce,_e):(_e=W(_e,Le),_e.return=Ce,_e)}function Me(Ce,_e,Le,et){var gt=Le.type;return gt===_?it(Ce,_e,Le.props.children,et,Le.key):_e!==null&&(_e.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===m&&th(gt)===_e.type)?(et=W(_e,Le.props),et.ref=ma(Ce,_e,Le),et.return=Ce,et):(et=Uu(Le.type,Le.key,Le.props,null,Ce.mode,et),et.ref=ma(Ce,_e,Le),et.return=Ce,et)}function Ve(Ce,_e,Le,et){return _e===null||_e.tag!==4||_e.stateNode.containerInfo!==Le.containerInfo||_e.stateNode.implementation!==Le.implementation?(_e=qu(Le,Ce.mode,et),_e.return=Ce,_e):(_e=W(_e,Le.children||[]),_e.return=Ce,_e)}function it(Ce,_e,Le,et,gt){return _e===null||_e.tag!==7?(_e=or(Le,Ce.mode,et,gt),_e.return=Ce,_e):(_e=W(_e,Le),_e.return=Ce,_e)}function wt(Ce,_e,Le){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return _e=Ll(""+_e,Ce.mode,Le),_e.return=Ce,_e;if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case h:return Le=Uu(_e.type,_e.key,_e.props,null,Ce.mode,Le),Le.ref=ma(Ce,null,_e),Le.return=Ce,Le;case b:return _e=qu(_e,Ce.mode,Le),_e.return=Ce,_e;case m:var et=_e._init;return wt(Ce,et(_e._payload),Le)}if(U(_e)||L(_e))return _e=or(_e,Ce.mode,Le,null),_e.return=Ce,_e;uu(Ce,_e)}return null}function Je(Ce,_e,Le,et){var gt=_e!==null?_e.key:null;if(typeof Le=="string"&&Le!==""||typeof Le=="number")return gt!==null?null:ye(Ce,_e,""+Le,et);if(typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case h:return Le.key===gt?Me(Ce,_e,Le,et):null;case b:return Le.key===gt?Ve(Ce,_e,Le,et):null;case m:return gt=Le._init,Je(Ce,_e,gt(Le._payload),et)}if(U(Le)||L(Le))return gt!==null?null:it(Ce,_e,Le,et,null);uu(Ce,Le)}return null}function an(Ce,_e,Le,et,gt){if(typeof et=="string"&&et!==""||typeof et=="number")return Ce=Ce.get(Le)||null,ye(_e,Ce,""+et,gt);if(typeof et=="object"&&et!==null){switch(et.$$typeof){case h:return Ce=Ce.get(et.key===null?Le:et.key)||null,Me(_e,Ce,et,gt);case b:return Ce=Ce.get(et.key===null?Le:et.key)||null,Ve(_e,Ce,et,gt);case m:var Tt=et._init;return an(Ce,_e,Le,Tt(et._payload),gt)}if(U(et)||L(et))return Ce=Ce.get(Le)||null,it(_e,Ce,et,gt,null);uu(_e,et)}return null}function Xt(Ce,_e,Le,et){for(var gt=null,Tt=null,St=_e,Bt=_e=0,Un=null;St!==null&&Bt<Le.length;Bt++){St.index>Bt?(Un=St,St=null):Un=St.sibling;var Dt=Je(Ce,St,Le[Bt],et);if(Dt===null){St===null&&(St=Un);break}s&&St&&Dt.alternate===null&&f(Ce,St),_e=te(Dt,_e,Bt),Tt===null?gt=Dt:Tt.sibling=Dt,Tt=Dt,St=Un}if(Bt===Le.length)return N(Ce,St),un&&Ei(Ce,Bt),gt;if(St===null){for(;Bt<Le.length;Bt++)St=wt(Ce,Le[Bt],et),St!==null&&(_e=te(St,_e,Bt),Tt===null?gt=St:Tt.sibling=St,Tt=St);return un&&Ei(Ce,Bt),gt}for(St=q(Ce,St);Bt<Le.length;Bt++)Un=an(St,Ce,Bt,Le[Bt],et),Un!==null&&(s&&Un.alternate!==null&&St.delete(Un.key===null?Bt:Un.key),_e=te(Un,_e,Bt),Tt===null?gt=Un:Tt.sibling=Un,Tt=Un);return s&&St.forEach(function(mr){return f(Ce,mr)}),un&&Ei(Ce,Bt),gt}function Ar(Ce,_e,Le,et){var gt=L(Le);if(typeof gt!="function")throw Error(u(150));if(Le=gt.call(Le),Le==null)throw Error(u(151));for(var Tt=gt=null,St=_e,Bt=_e=0,Un=null,Dt=Le.next();St!==null&&!Dt.done;Bt++,Dt=Le.next()){St.index>Bt?(Un=St,St=null):Un=St.sibling;var mr=Je(Ce,St,Dt.value,et);if(mr===null){St===null&&(St=Un);break}s&&St&&mr.alternate===null&&f(Ce,St),_e=te(mr,_e,Bt),Tt===null?gt=mr:Tt.sibling=mr,Tt=mr,St=Un}if(Dt.done)return N(Ce,St),un&&Ei(Ce,Bt),gt;if(St===null){for(;!Dt.done;Bt++,Dt=Le.next())Dt=wt(Ce,Dt.value,et),Dt!==null&&(_e=te(Dt,_e,Bt),Tt===null?gt=Dt:Tt.sibling=Dt,Tt=Dt);return un&&Ei(Ce,Bt),gt}for(St=q(Ce,St);!Dt.done;Bt++,Dt=Le.next())Dt=an(St,Ce,Bt,Dt.value,et),Dt!==null&&(s&&Dt.alternate!==null&&St.delete(Dt.key===null?Bt:Dt.key),_e=te(Dt,_e,Bt),Tt===null?gt=Dt:Tt.sibling=Dt,Tt=Dt);return s&&St.forEach(function(Jp){return f(Ce,Jp)}),un&&Ei(Ce,Bt),gt}function Wi(Ce,_e,Le,et){if(typeof Le=="object"&&Le!==null&&Le.type===_&&Le.key===null&&(Le=Le.props.children),typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case h:e:{for(var gt=Le.key,Tt=_e;Tt!==null;){if(Tt.key===gt){if(gt=Le.type,gt===_){if(Tt.tag===7){N(Ce,Tt.sibling),_e=W(Tt,Le.props.children),_e.return=Ce,Ce=_e;break e}}else if(Tt.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===m&&th(gt)===Tt.type){N(Ce,Tt.sibling),_e=W(Tt,Le.props),_e.ref=ma(Ce,Tt,Le),_e.return=Ce,Ce=_e;break e}N(Ce,Tt);break}else f(Ce,Tt);Tt=Tt.sibling}Le.type===_?(_e=or(Le.props.children,Ce.mode,et,Le.key),_e.return=Ce,Ce=_e):(et=Uu(Le.type,Le.key,Le.props,null,Ce.mode,et),et.ref=ma(Ce,_e,Le),et.return=Ce,Ce=et)}return le(Ce);case b:e:{for(Tt=Le.key;_e!==null;){if(_e.key===Tt)if(_e.tag===4&&_e.stateNode.containerInfo===Le.containerInfo&&_e.stateNode.implementation===Le.implementation){N(Ce,_e.sibling),_e=W(_e,Le.children||[]),_e.return=Ce,Ce=_e;break e}else{N(Ce,_e);break}else f(Ce,_e);_e=_e.sibling}_e=qu(Le,Ce.mode,et),_e.return=Ce,Ce=_e}return le(Ce);case m:return Tt=Le._init,Wi(Ce,_e,Tt(Le._payload),et)}if(U(Le))return Xt(Ce,_e,Le,et);if(L(Le))return Ar(Ce,_e,Le,et);uu(Ce,Le)}return typeof Le=="string"&&Le!==""||typeof Le=="number"?(Le=""+Le,_e!==null&&_e.tag===6?(N(Ce,_e.sibling),_e=W(_e,Le),_e.return=Ce,Ce=_e):(N(Ce,_e),_e=Ll(Le,Ce.mode,et),_e.return=Ce,Ce=_e),le(Ce)):N(Ce,_e)}return Wi}var ya=nh(!0),rh=nh(!1),cu=er(null),fu=null,ul=null,kc=null;function Tc(){kc=ul=fu=null}function ih(s,f,N){ie?(Mt(cu,f._currentValue),f._currentValue=N):(Mt(cu,f._currentValue2),f._currentValue2=N)}function fs(s){var f=cu.current;sn(cu),ie?s._currentValue=f:s._currentValue2=f}function ba(s,f,N){for(;s!==null;){var q=s.alternate;if((s.childLanes&f)!==f?(s.childLanes|=f,q!==null&&(q.childLanes|=f)):q!==null&&(q.childLanes&f)!==f&&(q.childLanes|=f),s===N)break;s=s.return}}function cl(s,f){fu=s,kc=ul=null,s=s.dependencies,s!==null&&s.firstContext!==null&&(s.lanes&f&&(Fn=!0),s.firstContext=null)}function $r(s){var f=ie?s._currentValue:s._currentValue2;if(kc!==s)if(s={context:s,memoizedValue:f,next:null},ul===null){if(fu===null)throw Error(u(308));ul=s,fu.dependencies={lanes:0,firstContext:s}}else ul=ul.next=s;return f}var zo=null;function du(s){zo===null?zo=[s]:zo.push(s)}function Ac(s,f,N,q){var W=f.interleaved;return W===null?(N.next=N,du(f)):(N.next=W.next,W.next=N),f.interleaved=N,xi(s,q)}function xi(s,f){s.lanes|=f;var N=s.alternate;for(N!==null&&(N.lanes|=f),N=s,s=s.return;s!==null;)s.childLanes|=f,N=s.alternate,N!==null&&(N.childLanes|=f),N=s,s=s.return;return N.tag===3?N.stateNode:null}var Wr=!1;function Rc(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oh(s,f){s=s.updateQueue,f.updateQueue===s&&(f.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function lo(s,f){return{eventTime:s,lane:f,tag:0,payload:null,callback:null,next:null}}function so(s,f,N){var q=s.updateQueue;if(q===null)return null;if(q=q.shared,xt&2){var W=q.pending;return W===null?f.next=f:(f.next=W.next,W.next=f),q.pending=f,xi(s,N)}return W=q.interleaved,W===null?(f.next=f,du(q)):(f.next=W.next,W.next=f),q.interleaved=f,xi(s,N)}function ds(s,f,N){if(f=f.updateQueue,f!==null&&(f=f.shared,(N&4194240)!==0)){var q=f.lanes;q&=s.pendingLanes,N|=q,f.lanes=N,ji(s,N)}}function fl(s,f){var N=s.updateQueue,q=s.alternate;if(q!==null&&(q=q.updateQueue,N===q)){var W=null,te=null;if(N=N.firstBaseUpdate,N!==null){do{var le={eventTime:N.eventTime,lane:N.lane,tag:N.tag,payload:N.payload,callback:N.callback,next:null};te===null?W=te=le:te=te.next=le,N=N.next}while(N!==null);te===null?W=te=f:te=te.next=f}else W=te=f;N={baseState:q.baseState,firstBaseUpdate:W,lastBaseUpdate:te,shared:q.shared,effects:q.effects},s.updateQueue=N;return}s=N.lastBaseUpdate,s===null?N.firstBaseUpdate=f:s.next=f,N.lastBaseUpdate=f}function Bo(s,f,N,q){var W=s.updateQueue;Wr=!1;var te=W.firstBaseUpdate,le=W.lastBaseUpdate,ye=W.shared.pending;if(ye!==null){W.shared.pending=null;var Me=ye,Ve=Me.next;Me.next=null,le===null?te=Ve:le.next=Ve,le=Me;var it=s.alternate;it!==null&&(it=it.updateQueue,ye=it.lastBaseUpdate,ye!==le&&(ye===null?it.firstBaseUpdate=Ve:ye.next=Ve,it.lastBaseUpdate=Me))}if(te!==null){var wt=W.baseState;le=0,it=Ve=Me=null,ye=te;do{var Je=ye.lane,an=ye.eventTime;if((q&Je)===Je){it!==null&&(it=it.next={eventTime:an,lane:0,tag:ye.tag,payload:ye.payload,callback:ye.callback,next:null});e:{var Xt=s,Ar=ye;switch(Je=f,an=N,Ar.tag){case 1:if(Xt=Ar.payload,typeof Xt=="function"){wt=Xt.call(an,wt,Je);break e}wt=Xt;break e;case 3:Xt.flags=Xt.flags&-65537|128;case 0:if(Xt=Ar.payload,Je=typeof Xt=="function"?Xt.call(an,wt,Je):Xt,Je==null)break e;wt=l({},wt,Je);break e;case 2:Wr=!0}}ye.callback!==null&&ye.lane!==0&&(s.flags|=64,Je=W.effects,Je===null?W.effects=[ye]:Je.push(ye))}else an={eventTime:an,lane:Je,tag:ye.tag,payload:ye.payload,callback:ye.callback,next:null},it===null?(Ve=it=an,Me=wt):it=it.next=an,le|=Je;if(ye=ye.next,ye===null){if(ye=W.shared.pending,ye===null)break;Je=ye,ye=Je.next,Je.next=null,W.lastBaseUpdate=Je,W.shared.pending=null}}while(!0);if(it===null&&(Me=wt),W.baseState=Me,W.firstBaseUpdate=Ve,W.lastBaseUpdate=it,f=W.shared.interleaved,f!==null){W=f;do le|=W.lane,W=W.next;while(W!==f)}else te===null&&(W.shared.lanes=0);po|=le,s.lanes=le,s.memoizedState=wt}}function ah(s,f,N){if(s=f.effects,f.effects=null,s!==null)for(f=0;f<s.length;f++){var q=s[f],W=q.callback;if(W!==null){if(q.callback=null,q=N,typeof W!="function")throw Error(u(191,W));W.call(q)}}}var Uo={},li=er(Uo),dl=er(Uo),qo=er(Uo);function si(s){if(s===Uo)throw Error(u(174));return s}function hu(s,f){Mt(qo,f),Mt(dl,s),Mt(li,Uo),s=X(f),sn(li),Mt(li,s)}function _a(){sn(li),sn(dl),sn(qo)}function Mc(s){var f=si(qo.current),N=si(li.current);f=$(N,s.type,f),N!==f&&(Mt(dl,s),Mt(li,f))}function Lc(s){dl.current===s&&(sn(li),sn(dl))}var En=er(0);function pu(s){for(var f=s;f!==null;){if(f.tag===13){var N=f.memoizedState;if(N!==null&&(N=N.dehydrated,N===null||In(N)||wn(N)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if(f.flags&128)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===s)break;for(;f.sibling===null;){if(f.return===null||f.return===s)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var Nc=[];function Ic(){for(var s=0;s<Nc.length;s++){var f=Nc[s];ie?f._workInProgressVersionPrimary=null:f._workInProgressVersionSecondary=null}Nc.length=0}var Br=c.ReactCurrentDispatcher,wa=c.ReactCurrentBatchConfig,Ho=0,gn=null,An=null,jn=null,hl=!1,hs=!1,ps=0,pl=0;function Wn(){throw Error(u(321))}function Sa(s,f){if(f===null)return!1;for(var N=0;N<f.length&&N<s.length;N++)if(!wi(s[N],f[N]))return!1;return!0}function gs(s,f,N,q,W,te){if(Ho=te,gn=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,Br.current=s===null||s.memoizedState===null?Vc:$c,s=N(q,W),hs){te=0;do{if(hs=!1,ps=0,25<=te)throw Error(u(301));te+=1,jn=An=null,f.updateQueue=null,Br.current=Wc,s=N(q,W)}while(hs)}if(Br.current=Ca,f=An!==null&&An.next!==null,Ho=0,jn=An=gn=null,hl=!1,f)throw Error(u(300));return s}function gu(){var s=ps!==0;return ps=0,s}function Yr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jn===null?gn.memoizedState=jn=s:jn=jn.next=s,jn}function rr(){if(An===null){var s=gn.alternate;s=s!==null?s.memoizedState:null}else s=An.next;var f=jn===null?gn.memoizedState:jn.next;if(f!==null)jn=f,An=s;else{if(s===null)throw Error(u(310));An=s,s={memoizedState:An.memoizedState,baseState:An.baseState,baseQueue:An.baseQueue,queue:An.queue,next:null},jn===null?gn.memoizedState=jn=s:jn=jn.next=s}return jn}function Ea(s,f){return typeof f=="function"?f(s):f}function vu(s){var f=rr(),N=f.queue;if(N===null)throw Error(u(311));N.lastRenderedReducer=s;var q=An,W=q.baseQueue,te=N.pending;if(te!==null){if(W!==null){var le=W.next;W.next=te.next,te.next=le}q.baseQueue=W=te,N.pending=null}if(W!==null){te=W.next,q=q.baseState;var ye=le=null,Me=null,Ve=te;do{var it=Ve.lane;if((Ho&it)===it)Me!==null&&(Me=Me.next={lane:0,action:Ve.action,hasEagerState:Ve.hasEagerState,eagerState:Ve.eagerState,next:null}),q=Ve.hasEagerState?Ve.eagerState:s(q,Ve.action);else{var wt={lane:it,action:Ve.action,hasEagerState:Ve.hasEagerState,eagerState:Ve.eagerState,next:null};Me===null?(ye=Me=wt,le=q):Me=Me.next=wt,gn.lanes|=it,po|=it}Ve=Ve.next}while(Ve!==null&&Ve!==te);Me===null?le=q:Me.next=ye,wi(q,f.memoizedState)||(Fn=!0),f.memoizedState=q,f.baseState=le,f.baseQueue=Me,N.lastRenderedState=q}if(s=N.interleaved,s!==null){W=s;do te=W.lane,gn.lanes|=te,po|=te,W=W.next;while(W!==s)}else W===null&&(N.lanes=0);return[f.memoizedState,N.dispatch]}function gl(s){var f=rr(),N=f.queue;if(N===null)throw Error(u(311));N.lastRenderedReducer=s;var q=N.dispatch,W=N.pending,te=f.memoizedState;if(W!==null){N.pending=null;var le=W=W.next;do te=s(te,le.action),le=le.next;while(le!==W);wi(te,f.memoizedState)||(Fn=!0),f.memoizedState=te,f.baseQueue===null&&(f.baseState=te),N.lastRenderedState=te}return[te,q]}function Dc(){}function jc(s,f){var N=gn,q=rr(),W=f(),te=!wi(q.memoizedState,W);if(te&&(q.memoizedState=W,Fn=!0),q=q.queue,bu(Bc.bind(null,N,q,s),[s]),q.getSnapshot!==f||te||jn!==null&&jn.memoizedState.tag&1){if(N.flags|=2048,Oa(9,zc.bind(null,N,q,W,f),void 0,null),en===null)throw Error(u(349));Ho&30||Fc(N,f,W)}return W}function Fc(s,f,N){s.flags|=16384,s={getSnapshot:f,value:N},f=gn.updateQueue,f===null?(f={lastEffect:null,stores:null},gn.updateQueue=f,f.stores=[s]):(N=f.stores,N===null?f.stores=[s]:N.push(s))}function zc(s,f,N,q){f.value=N,f.getSnapshot=q,Uc(f)&&uo(s)}function Bc(s,f,N){return N(function(){Uc(f)&&uo(s)})}function Uc(s){var f=s.getSnapshot;s=s.value;try{var N=f();return!wi(s,N)}catch{return!0}}function uo(s){var f=xi(s,1);f!==null&&gr(f,s,1,-1)}function mu(s){var f=Yr();return typeof s=="function"&&(s=s()),f.memoizedState=f.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:s},f.queue=s,s=s.dispatch=Kp.bind(null,gn,s),[f.memoizedState,s]}function Oa(s,f,N,q){return s={tag:s,create:f,destroy:N,deps:q,next:null},f=gn.updateQueue,f===null?(f={lastEffect:null,stores:null},gn.updateQueue=f,f.lastEffect=s.next=s):(N=f.lastEffect,N===null?f.lastEffect=s.next=s:(q=N.next,N.next=s,s.next=q,f.lastEffect=s)),s}function lh(){return rr().memoizedState}function yu(s,f,N,q){var W=Yr();gn.flags|=s,W.memoizedState=Oa(1|f,N,void 0,q===void 0?null:q)}function Go(s,f,N,q){var W=rr();q=q===void 0?null:q;var te=void 0;if(An!==null){var le=An.memoizedState;if(te=le.destroy,q!==null&&Sa(q,le.deps)){W.memoizedState=Oa(f,N,te,q);return}}gn.flags|=s,W.memoizedState=Oa(1|f,N,te,q)}function sh(s,f){return yu(8390656,8,s,f)}function bu(s,f){return Go(2048,8,s,f)}function qc(s,f){return Go(4,2,s,f)}function nn(s,f){return Go(4,4,s,f)}function _u(s,f){if(typeof f=="function")return s=s(),f(s),function(){f(null)};if(f!=null)return s=s(),f.current=s,function(){f.current=null}}function vs(s,f,N){return N=N!=null?N.concat([s]):null,Go(4,4,_u.bind(null,f,s),N)}function xa(){}function Hc(s,f){var N=rr();f=f===void 0?null:f;var q=N.memoizedState;return q!==null&&f!==null&&Sa(f,q[1])?q[0]:(N.memoizedState=[s,f],s)}function wu(s,f){var N=rr();f=f===void 0?null:f;var q=N.memoizedState;return q!==null&&f!==null&&Sa(f,q[1])?q[0]:(s=s(),N.memoizedState=[s,f],s)}function vl(s,f,N){return Ho&21?(wi(N,f)||(N=eu(),gn.lanes|=N,po|=N,s.baseState=!0),f):(s.baseState&&(s.baseState=!1,Fn=!0),s.memoizedState=N)}function Su(s,f){var N=Lt;Lt=N!==0&&4>N?N:4,s(!0);var q=wa.transition;wa.transition={};try{s(!1),f()}finally{Lt=N,wa.transition=q}}function Pa(){return rr().memoizedState}function uh(s,f,N){var q=Bn(s);if(N={lane:q,action:N,hasEagerState:!1,eagerState:null,next:null},ch(s))Gc(f,N);else if(N=Ac(s,f,N,q),N!==null){var W=cn();gr(N,s,q,W),ms(N,f,q)}}function Kp(s,f,N){var q=Bn(s),W={lane:q,action:N,hasEagerState:!1,eagerState:null,next:null};if(ch(s))Gc(f,W);else{var te=s.alternate;if(s.lanes===0&&(te===null||te.lanes===0)&&(te=f.lastRenderedReducer,te!==null))try{var le=f.lastRenderedState,ye=te(le,N);if(W.hasEagerState=!0,W.eagerState=ye,wi(ye,le)){var Me=f.interleaved;Me===null?(W.next=W,du(f)):(W.next=Me.next,Me.next=W),f.interleaved=W;return}}catch{}finally{}N=Ac(s,f,W,q),N!==null&&(W=cn(),gr(N,s,q,W),ms(N,f,q))}}function ch(s){var f=s.alternate;return s===gn||f!==null&&f===gn}function Gc(s,f){hs=hl=!0;var N=s.pending;N===null?f.next=f:(f.next=N.next,N.next=f),s.pending=f}function ms(s,f,N){if(N&4194240){var q=f.lanes;q&=s.pendingLanes,N|=q,f.lanes=N,ji(s,N)}}var Ca={readContext:$r,useCallback:Wn,useContext:Wn,useEffect:Wn,useImperativeHandle:Wn,useInsertionEffect:Wn,useLayoutEffect:Wn,useMemo:Wn,useReducer:Wn,useRef:Wn,useState:Wn,useDebugValue:Wn,useDeferredValue:Wn,useTransition:Wn,useMutableSource:Wn,useSyncExternalStore:Wn,useId:Wn,unstable_isNewReconciler:!1},Vc={readContext:$r,useCallback:function(s,f){return Yr().memoizedState=[s,f===void 0?null:f],s},useContext:$r,useEffect:sh,useImperativeHandle:function(s,f,N){return N=N!=null?N.concat([s]):null,yu(4194308,4,_u.bind(null,f,s),N)},useLayoutEffect:function(s,f){return yu(4194308,4,s,f)},useInsertionEffect:function(s,f){return yu(4,2,s,f)},useMemo:function(s,f){var N=Yr();return f=f===void 0?null:f,s=s(),N.memoizedState=[s,f],s},useReducer:function(s,f,N){var q=Yr();return f=N!==void 0?N(f):f,q.memoizedState=q.baseState=f,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:f},q.queue=s,s=s.dispatch=uh.bind(null,gn,s),[q.memoizedState,s]},useRef:function(s){var f=Yr();return s={current:s},f.memoizedState=s},useState:mu,useDebugValue:xa,useDeferredValue:function(s){return Yr().memoizedState=s},useTransition:function(){var s=mu(!1),f=s[0];return s=Su.bind(null,s[1]),Yr().memoizedState=s,[f,s]},useMutableSource:function(){},useSyncExternalStore:function(s,f,N){var q=gn,W=Yr();if(un){if(N===void 0)throw Error(u(407));N=N()}else{if(N=f(),en===null)throw Error(u(349));Ho&30||Fc(q,f,N)}W.memoizedState=N;var te={value:N,getSnapshot:f};return W.queue=te,sh(Bc.bind(null,q,te,s),[s]),q.flags|=2048,Oa(9,zc.bind(null,q,te,N,f),void 0,null),N},useId:function(){var s=Yr(),f=en.identifierPrefix;if(un){var N=Si,q=zr;N=(q&~(1<<32-Gr(q)-1)).toString(32)+N,f=":"+f+"R"+N,N=ps++,0<N&&(f+="H"+N.toString(32)),f+=":"}else N=pl++,f=":"+f+"r"+N.toString(32)+":";return s.memoizedState=f},unstable_isNewReconciler:!1},$c={readContext:$r,useCallback:Hc,useContext:$r,useEffect:bu,useImperativeHandle:vs,useInsertionEffect:qc,useLayoutEffect:nn,useMemo:wu,useReducer:vu,useRef:lh,useState:function(){return vu(Ea)},useDebugValue:xa,useDeferredValue:function(s){var f=rr();return vl(f,An.memoizedState,s)},useTransition:function(){var s=vu(Ea)[0],f=rr().memoizedState;return[s,f]},useMutableSource:Dc,useSyncExternalStore:jc,useId:Pa,unstable_isNewReconciler:!1},Wc={readContext:$r,useCallback:Hc,useContext:$r,useEffect:bu,useImperativeHandle:vs,useInsertionEffect:qc,useLayoutEffect:nn,useMemo:wu,useReducer:gl,useRef:lh,useState:function(){return gl(Ea)},useDebugValue:xa,useDeferredValue:function(s){var f=rr();return An===null?f.memoizedState=s:vl(f,An.memoizedState,s)},useTransition:function(){var s=gl(Ea)[0],f=rr().memoizedState;return[s,f]},useMutableSource:Dc,useSyncExternalStore:jc,useId:Pa,unstable_isNewReconciler:!1};function Kr(s,f){if(s&&s.defaultProps){f=l({},f),s=s.defaultProps;for(var N in s)f[N]===void 0&&(f[N]=s[N]);return f}return f}function Yc(s,f,N,q){f=s.memoizedState,N=N(q,f),N=N==null?f:l({},f,N),s.memoizedState=N,s.lanes===0&&(s.updateQueue.baseState=N)}var ys={isMounted:function(s){return(s=s._reactInternals)?E(s)===s:!1},enqueueSetState:function(s,f,N){s=s._reactInternals;var q=cn(),W=Bn(s),te=lo(q,W);te.payload=f,N!=null&&(te.callback=N),f=so(s,te,W),f!==null&&(gr(f,s,W,q),ds(f,s,W))},enqueueReplaceState:function(s,f,N){s=s._reactInternals;var q=cn(),W=Bn(s),te=lo(q,W);te.tag=1,te.payload=f,N!=null&&(te.callback=N),f=so(s,te,W),f!==null&&(gr(f,s,W,q),ds(f,s,W))},enqueueForceUpdate:function(s,f){s=s._reactInternals;var N=cn(),q=Bn(s),W=lo(N,q);W.tag=2,f!=null&&(W.callback=f),f=so(s,W,q),f!==null&&(gr(f,s,q,N),ds(f,s,q))}};function fh(s,f,N,q,W,te,le){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(q,te,le):f.prototype&&f.prototype.isPureReactComponent?!su(N,q)||!su(W,te):!0}function dh(s,f,N){var q=!1,W=Io,te=f.contextType;return typeof te=="object"&&te!==null?te=$r(te):(W=Vn(f)?Di:fr.current,q=f.contextTypes,te=(q=q!=null)?io(s,W):Io),f=new f(N,te),s.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=ys,s.stateNode=f,f._reactInternals=s,q&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=W,s.__reactInternalMemoizedMaskedChildContext=te),f}function Eu(s,f,N,q){s=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(N,q),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(N,q),f.state!==s&&ys.enqueueReplaceState(f,f.state,null)}function zi(s,f,N,q){var W=s.stateNode;W.props=N,W.state=s.memoizedState,W.refs={},Rc(s);var te=f.contextType;typeof te=="object"&&te!==null?W.context=$r(te):(te=Vn(f)?Di:fr.current,W.context=io(s,te)),W.state=s.memoizedState,te=f.getDerivedStateFromProps,typeof te=="function"&&(Yc(s,f,te,N),W.state=s.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof W.getSnapshotBeforeUpdate=="function"||typeof W.UNSAFE_componentWillMount!="function"&&typeof W.componentWillMount!="function"||(f=W.state,typeof W.componentWillMount=="function"&&W.componentWillMount(),typeof W.UNSAFE_componentWillMount=="function"&&W.UNSAFE_componentWillMount(),f!==W.state&&ys.enqueueReplaceState(W,W.state,null),Bo(s,N,W,q),W.state=s.memoizedState),typeof W.componentDidMount=="function"&&(s.flags|=4194308)}function ka(s,f){try{var N="",q=f;do N+=Yp(q),q=q.return;while(q);var W=N}catch(te){W=`
|
|
56
|
-
Error generating stack: `+te.message+`
|
|
57
|
-
`+te.stack}return{value:s,source:f,stack:W,digest:null}}function Vo(s,f,N){return{value:s,source:null,stack:N??null,digest:f??null}}function ui(s,f){try{console.error(f.value)}catch(N){setTimeout(function(){throw N})}}var bs=typeof WeakMap=="function"?WeakMap:Map;function Bi(s,f,N){N=lo(-1,N),N.tag=3,N.payload={element:null};var q=f.value;return N.callback=function(){Pn||(Pn=!0,Rn=q),ui(s,f)},N}function Ou(s,f,N){N=lo(-1,N),N.tag=3;var q=s.type.getDerivedStateFromError;if(typeof q=="function"){var W=f.value;N.payload=function(){return q(W)},N.callback=function(){ui(s,f)}}var te=s.stateNode;return te!==null&&typeof te.componentDidCatch=="function"&&(N.callback=function(){ui(s,f),typeof q!="function"&&(Ci===null?Ci=new Set([this]):Ci.add(this));var le=f.stack;this.componentDidCatch(f.value,{componentStack:le!==null?le:""})}),N}function hh(s,f,N){var q=s.pingCache;if(q===null){q=s.pingCache=new bs;var W=new Set;q.set(f,W)}else W=q.get(f),W===void 0&&(W=new Set,q.set(f,W));W.has(N)||(W.add(N),s=wh.bind(null,s,f,N),f.then(s,s))}function ph(s){do{var f;if((f=s.tag===13)&&(f=s.memoizedState,f=f!==null?f.dehydrated!==null:!0),f)return s;s=s.return}while(s!==null);return null}function $o(s,f,N,q,W){return s.mode&1?(s.flags|=65536,s.lanes=W,s):(s===f?s.flags|=65536:(s.flags|=128,N.flags|=131072,N.flags&=-52805,N.tag===1&&(N.alternate===null?N.tag=17:(f=lo(-1,1),f.tag=2,so(N,f,1))),N.lanes|=1),s)}var _s=c.ReactCurrentOwner,Fn=!1;function Yn(s,f,N,q){f.child=s===null?rh(f,null,N,q):ya(f,s.child,N,q)}function xu(s,f,N,q,W){N=N.render;var te=f.ref;return cl(f,W),q=gs(s,f,N,q,te,W),N=gu(),s!==null&&!Fn?(f.updateQueue=s.updateQueue,f.flags&=-2053,s.lanes&=~W,fo(s,f,W)):(un&&N&&ss(f),f.flags|=1,Yn(s,f,q,W),f.child)}function Ta(s,f,N,q,W){if(s===null){var te=N.type;return typeof te=="function"&&!Rl(te)&&te.defaultProps===void 0&&N.compare===null&&N.defaultProps===void 0?(f.tag=15,f.type=te,co(s,f,te,q,W)):(s=Uu(N.type,null,q,f,f.mode,W),s.ref=f.ref,s.return=f,f.child=s)}if(te=s.child,!(s.lanes&W)){var le=te.memoizedProps;if(N=N.compare,N=N!==null?N:su,N(le,q)&&s.ref===f.ref)return fo(s,f,W)}return f.flags|=1,s=na(te,q),s.ref=f.ref,s.return=f,f.child=s}function co(s,f,N,q,W){if(s!==null){var te=s.memoizedProps;if(su(te,q)&&s.ref===f.ref)if(Fn=!1,f.pendingProps=q=te,(s.lanes&W)!==0)s.flags&131072&&(Fn=!0);else return f.lanes=s.lanes,fo(s,f,W)}return Ui(s,f,N,q,W)}function rn(s,f,N){var q=f.pendingProps,W=q.children,te=s!==null?s.memoizedState:null;if(q.mode==="hidden")if(!(f.mode&1))f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mt(Qo,zn),zn|=N;else{if(!(N&1073741824))return s=te!==null?te.baseLanes|N:N,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:s,cachePool:null,transitions:null},f.updateQueue=null,Mt(Qo,zn),zn|=s,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},q=te!==null?te.baseLanes:N,Mt(Qo,zn),zn|=q}else te!==null?(q=te.baseLanes|N,f.memoizedState=null):q=N,Mt(Qo,zn),zn|=q;return Yn(s,f,W,N),f.child}function Jt(s,f){var N=f.ref;(s===null&&N!==null||s!==null&&s.ref!==N)&&(f.flags|=512,f.flags|=2097152)}function Ui(s,f,N,q,W){var te=Vn(N)?Di:fr.current;return te=io(f,te),cl(f,W),N=gs(s,f,N,q,te,W),q=gu(),s!==null&&!Fn?(f.updateQueue=s.updateQueue,f.flags&=-2053,s.lanes&=~W,fo(s,f,W)):(un&&q&&ss(f),f.flags|=1,Yn(s,f,N,W),f.child)}function ir(s,f,N,q,W){if(Vn(N)){var te=!0;tl(f)}else te=!1;if(cl(f,W),f.stateNode===null)ws(s,f),dh(f,N,q),zi(f,N,q,W),q=!0;else if(s===null){var le=f.stateNode,ye=f.memoizedProps;le.props=ye;var Me=le.context,Ve=N.contextType;typeof Ve=="object"&&Ve!==null?Ve=$r(Ve):(Ve=Vn(N)?Di:fr.current,Ve=io(f,Ve));var it=N.getDerivedStateFromProps,wt=typeof it=="function"||typeof le.getSnapshotBeforeUpdate=="function";wt||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(ye!==q||Me!==Ve)&&Eu(f,le,q,Ve),Wr=!1;var Je=f.memoizedState;le.state=Je,Bo(f,q,le,W),Me=f.memoizedState,ye!==q||Je!==Me||jr.current||Wr?(typeof it=="function"&&(Yc(f,N,it,q),Me=f.memoizedState),(ye=Wr||fh(f,N,ye,q,Je,Me,Ve))?(wt||typeof le.UNSAFE_componentWillMount!="function"&&typeof le.componentWillMount!="function"||(typeof le.componentWillMount=="function"&&le.componentWillMount(),typeof le.UNSAFE_componentWillMount=="function"&&le.UNSAFE_componentWillMount()),typeof le.componentDidMount=="function"&&(f.flags|=4194308)):(typeof le.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=q,f.memoizedState=Me),le.props=q,le.state=Me,le.context=Ve,q=ye):(typeof le.componentDidMount=="function"&&(f.flags|=4194308),q=!1)}else{le=f.stateNode,oh(s,f),ye=f.memoizedProps,Ve=f.type===f.elementType?ye:Kr(f.type,ye),le.props=Ve,wt=f.pendingProps,Je=le.context,Me=N.contextType,typeof Me=="object"&&Me!==null?Me=$r(Me):(Me=Vn(N)?Di:fr.current,Me=io(f,Me));var an=N.getDerivedStateFromProps;(it=typeof an=="function"||typeof le.getSnapshotBeforeUpdate=="function")||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(ye!==wt||Je!==Me)&&Eu(f,le,q,Me),Wr=!1,Je=f.memoizedState,le.state=Je,Bo(f,q,le,W);var Xt=f.memoizedState;ye!==wt||Je!==Xt||jr.current||Wr?(typeof an=="function"&&(Yc(f,N,an,q),Xt=f.memoizedState),(Ve=Wr||fh(f,N,Ve,q,Je,Xt,Me)||!1)?(it||typeof le.UNSAFE_componentWillUpdate!="function"&&typeof le.componentWillUpdate!="function"||(typeof le.componentWillUpdate=="function"&&le.componentWillUpdate(q,Xt,Me),typeof le.UNSAFE_componentWillUpdate=="function"&&le.UNSAFE_componentWillUpdate(q,Xt,Me)),typeof le.componentDidUpdate=="function"&&(f.flags|=4),typeof le.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof le.componentDidUpdate!="function"||ye===s.memoizedProps&&Je===s.memoizedState||(f.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||ye===s.memoizedProps&&Je===s.memoizedState||(f.flags|=1024),f.memoizedProps=q,f.memoizedState=Xt),le.props=q,le.state=Xt,le.context=Me,q=Ve):(typeof le.componentDidUpdate!="function"||ye===s.memoizedProps&&Je===s.memoizedState||(f.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||ye===s.memoizedProps&&Je===s.memoizedState||(f.flags|=1024),q=!1)}return dr(s,f,N,q,te,W)}function dr(s,f,N,q,W,te){Jt(s,f);var le=(f.flags&128)!==0;if(!q&&!le)return W&&Ec(f,N,!1),fo(s,f,te);q=f.stateNode,_s.current=f;var ye=le&&typeof N.getDerivedStateFromError!="function"?null:q.render();return f.flags|=1,s!==null&&le?(f.child=ya(f,s.child,null,te),f.child=ya(f,null,ye,te)):Yn(s,f,ye,te),f.memoizedState=q.state,W&&Ec(f,N,!0),f.child}function Wo(s){var f=s.stateNode;f.pendingContext?Gd(s,f.pendingContext,f.pendingContext!==f.context):f.context&&Gd(s,f.context,!1),hu(s,f.containerInfo)}function Aa(s,f,N,q,W){return va(),Cc(W),f.flags|=256,Yn(s,f,N,q),f.child}var hr={dehydrated:null,treeContext:null,retryLane:0};function ml(s){return{baseLanes:s,cachePool:null,transitions:null}}function Kc(s,f,N){var q=f.pendingProps,W=En.current,te=!1,le=(f.flags&128)!==0,ye;if((ye=le)||(ye=s!==null&&s.memoizedState===null?!1:(W&2)!==0),ye?(te=!0,f.flags&=-129):(s===null||s.memoizedState!==null)&&(W|=1),Mt(En,W&1),s===null)return Pc(f),s=f.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?(f.mode&1?wn(s)?f.lanes=8:f.lanes=1073741824:f.lanes=1,null):(le=q.children,s=q.fallback,te?(q=f.mode,te=f.child,le={mode:"hidden",children:le},!(q&1)&&te!==null?(te.childLanes=0,te.pendingProps=le):te=Ml(le,q,0,null),s=or(s,q,N,null),te.return=f,s.return=f,te.sibling=s,f.child=te,f.child.memoizedState=ml(N),f.memoizedState=hr,s):Pu(f,le));if(W=s.memoizedState,W!==null&&(ye=W.dehydrated,ye!==null))return gh(s,f,le,q,ye,W,N);if(te){te=q.fallback,le=f.mode,W=s.child,ye=W.sibling;var Me={mode:"hidden",children:q.children};return!(le&1)&&f.child!==W?(q=f.child,q.childLanes=0,q.pendingProps=Me,f.deletions=null):(q=na(W,Me),q.subtreeFlags=W.subtreeFlags&14680064),ye!==null?te=na(ye,te):(te=or(te,le,N,null),te.flags|=2),te.return=f,q.return=f,q.sibling=te,f.child=q,q=te,te=f.child,le=s.child.memoizedState,le=le===null?ml(N):{baseLanes:le.baseLanes|N,cachePool:null,transitions:le.transitions},te.memoizedState=le,te.childLanes=s.childLanes&~N,f.memoizedState=hr,q}return te=s.child,s=te.sibling,q=na(te,{mode:"visible",children:q.children}),!(f.mode&1)&&(q.lanes=N),q.return=f,q.sibling=null,s!==null&&(N=f.deletions,N===null?(f.deletions=[s],f.flags|=16):N.push(s)),f.child=q,f.memoizedState=null,q}function Pu(s,f){return f=Ml({mode:"visible",children:f},s.mode,0,null),f.return=s,s.child=f}function Ra(s,f,N,q){return q!==null&&Cc(q),ya(f,s.child,null,N),s=Pu(f,f.pendingProps.children),s.flags|=2,f.memoizedState=null,s}function gh(s,f,N,q,W,te,le){if(N)return f.flags&256?(f.flags&=-257,q=Vo(Error(u(422))),Ra(s,f,le,q)):f.memoizedState!==null?(f.child=s.child,f.flags|=128,null):(te=q.fallback,W=f.mode,q=Ml({mode:"visible",children:q.children},W,0,null),te=or(te,W,le,null),te.flags|=2,q.return=f,te.return=f,q.sibling=te,f.child=q,f.mode&1&&ya(f,s.child,null,le),f.child.memoizedState=ml(le),f.memoizedState=hr,te);if(!(f.mode&1))return Ra(s,f,le,null);if(wn(W))return q=Qn(W).digest,te=Error(u(419)),q=Vo(te,q,void 0),Ra(s,f,le,q);if(N=(le&s.childLanes)!==0,Fn||N){if(q=en,q!==null){switch(le&-le){case 4:W=2;break;case 16:W=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:W=32;break;case 536870912:W=268435456;break;default:W=0}W=W&(q.suspendedLanes|le)?0:W,W!==0&&W!==te.retryLane&&(te.retryLane=W,xi(s,W),gr(q,s,W,-1))}return Al(),q=Vo(Error(u(421))),Ra(s,f,le,q)}return In(W)?(f.flags|=128,f.child=s.child,f=Eh.bind(null,s),ii(W,f),null):(s=te.treeContext,de&&(Or=At(W),nr=f,un=!0,Oi=null,cs=!1,s!==null&&(Er[Vr++]=zr,Er[Vr++]=Si,Er[Vr++]=Dn,zr=s.id,Si=s.overflow,Dn=f)),f=Pu(f,q.children),f.flags|=4096,f)}function qi(s,f,N){s.lanes|=f;var q=s.alternate;q!==null&&(q.lanes|=f),ba(s.return,f,N)}function yl(s,f,N,q,W){var te=s.memoizedState;te===null?s.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:q,tail:N,tailMode:W}:(te.isBackwards=f,te.rendering=null,te.renderingStartTime=0,te.last=q,te.tail=N,te.tailMode=W)}function Cu(s,f,N){var q=f.pendingProps,W=q.revealOrder,te=q.tail;if(Yn(s,f,q.children,N),q=En.current,q&2)q=q&1|2,f.flags|=128;else{if(s!==null&&s.flags&128)e:for(s=f.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&qi(s,N,f);else if(s.tag===19)qi(s,N,f);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===f)break e;for(;s.sibling===null;){if(s.return===null||s.return===f)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}q&=1}if(Mt(En,q),!(f.mode&1))f.memoizedState=null;else switch(W){case"forwards":for(N=f.child,W=null;N!==null;)s=N.alternate,s!==null&&pu(s)===null&&(W=N),N=N.sibling;N=W,N===null?(W=f.child,f.child=null):(W=N.sibling,N.sibling=null),yl(f,!1,W,N,te);break;case"backwards":for(N=null,W=f.child,f.child=null;W!==null;){if(s=W.alternate,s!==null&&pu(s)===null){f.child=W;break}s=W.sibling,W.sibling=N,N=W,W=s}yl(f,!0,N,null,te);break;case"together":yl(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function ws(s,f){!(f.mode&1)&&s!==null&&(s.alternate=null,f.alternate=null,f.flags|=2)}function fo(s,f,N){if(s!==null&&(f.dependencies=s.dependencies),po|=f.lanes,!(N&f.childLanes))return null;if(s!==null&&f.child!==s.child)throw Error(u(153));if(f.child!==null){for(s=f.child,N=na(s,s.pendingProps),f.child=N,N.return=f;s.sibling!==null;)s=s.sibling,N=N.sibling=na(s,s.pendingProps),N.return=f;N.sibling=null}return f.child}function Yo(s,f,N){switch(f.tag){case 3:Wo(f),va();break;case 5:Mc(f);break;case 1:Vn(f.type)&&tl(f);break;case 4:hu(f,f.stateNode.containerInfo);break;case 10:ih(f,f.type._context,f.memoizedProps.value);break;case 13:var q=f.memoizedState;if(q!==null)return q.dehydrated!==null?(Mt(En,En.current&1),f.flags|=128,null):N&f.child.childLanes?Kc(s,f,N):(Mt(En,En.current&1),s=fo(s,f,N),s!==null?s.sibling:null);Mt(En,En.current&1);break;case 19:if(q=(N&f.childLanes)!==0,s.flags&128){if(q)return Cu(s,f,N);f.flags|=128}var W=f.memoizedState;if(W!==null&&(W.rendering=null,W.tail=null,W.lastEffect=null),Mt(En,En.current),q)break;return null;case 22:case 23:return f.lanes=0,rn(s,f,N)}return fo(s,f,N)}function xr(s){s.flags|=4}function Ma(s,f){if(s!==null&&s.child===f.child)return!0;if(f.flags&16)return!1;for(s=f.child;s!==null;){if(s.flags&12854||s.subtreeFlags&12854)return!1;s=s.sibling}return!0}var Ko,Xo,Pr,Cr;if(ae)Ko=function(s,f){for(var N=f.child;N!==null;){if(N.tag===5||N.tag===6)H(s,N.stateNode);else if(N.tag!==4&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===f)break;for(;N.sibling===null;){if(N.return===null||N.return===f)return;N=N.return}N.sibling.return=N.return,N=N.sibling}},Xo=function(){},Pr=function(s,f,N,q,W){if(s=s.memoizedProps,s!==q){var te=f.stateNode,le=si(li.current);N=ee(te,N,s,q,W,le),(f.updateQueue=N)&&xr(f)}},Cr=function(s,f,N,q){N!==q&&xr(f)};else if(se){Ko=function(s,f,N,q){for(var W=f.child;W!==null;){if(W.tag===5){var te=W.stateNode;N&&q&&(te=pt(te,W.type,W.memoizedProps,W)),H(s,te)}else if(W.tag===6)te=W.stateNode,N&&q&&(te=Ot(te,W.memoizedProps,W)),H(s,te);else if(W.tag!==4){if(W.tag===22&&W.memoizedState!==null)te=W.child,te!==null&&(te.return=W),Ko(s,W,!0,!0);else if(W.child!==null){W.child.return=W,W=W.child;continue}}if(W===f)break;for(;W.sibling===null;){if(W.return===null||W.return===f)return;W=W.return}W.sibling.return=W.return,W=W.sibling}};var Zo=function(s,f,N,q){for(var W=f.child;W!==null;){if(W.tag===5){var te=W.stateNode;N&&q&&(te=pt(te,W.type,W.memoizedProps,W)),Yt(s,te)}else if(W.tag===6)te=W.stateNode,N&&q&&(te=Ot(te,W.memoizedProps,W)),Yt(s,te);else if(W.tag!==4){if(W.tag===22&&W.memoizedState!==null)te=W.child,te!==null&&(te.return=W),Zo(s,W,!0,!0);else if(W.child!==null){W.child.return=W,W=W.child;continue}}if(W===f)break;for(;W.sibling===null;){if(W.return===null||W.return===f)return;W=W.return}W.sibling.return=W.return,W=W.sibling}};Xo=function(s,f){var N=f.stateNode;if(!Ma(s,f)){s=N.containerInfo;var q=dn(s);Zo(q,f,!1,!1),N.pendingChildren=q,xr(f),hn(s,q)}},Pr=function(s,f,N,q,W){var te=s.stateNode,le=s.memoizedProps;if((s=Ma(s,f))&&le===q)f.stateNode=te;else{var ye=f.stateNode,Me=si(li.current),Ve=null;le!==q&&(Ve=ee(ye,N,le,q,W,Me)),s&&Ve===null?f.stateNode=te:(te=ot(te,Ve,N,le,q,f,s,ye),K(te,N,q,W,Me)&&xr(f),f.stateNode=te,s?xr(f):Ko(te,f,!1,!1))}},Cr=function(s,f,N,q){N!==q?(s=si(qo.current),N=si(li.current),f.stateNode=Z(q,s,N,f),xr(f)):f.stateNode=s.stateNode}}else Xo=function(){},Pr=function(){},Cr=function(){};function Xr(s,f){if(!un)switch(s.tailMode){case"hidden":f=s.tail;for(var N=null;f!==null;)f.alternate!==null&&(N=f),f=f.sibling;N===null?s.tail=null:N.sibling=null;break;case"collapsed":N=s.tail;for(var q=null;N!==null;)N.alternate!==null&&(q=N),N=N.sibling;q===null?f||s.tail===null?s.tail=null:s.tail.sibling=null:q.sibling=null}}function vn(s){var f=s.alternate!==null&&s.alternate.child===s.child,N=0,q=0;if(f)for(var W=s.child;W!==null;)N|=W.lanes|W.childLanes,q|=W.subtreeFlags&14680064,q|=W.flags&14680064,W.return=s,W=W.sibling;else for(W=s.child;W!==null;)N|=W.lanes|W.childLanes,q|=W.subtreeFlags,q|=W.flags,W.return=s,W=W.sibling;return s.subtreeFlags|=q,s.childLanes=N,f}function La(s,f,N){var q=f.pendingProps;switch(us(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vn(f),null;case 1:return Vn(f.type)&&pa(),vn(f),null;case 3:return N=f.stateNode,_a(),sn(jr),sn(fr),Ic(),N.pendingContext&&(N.context=N.pendingContext,N.pendingContext=null),(s===null||s.child===null)&&(lu(f)?xr(f):s===null||s.memoizedState.isDehydrated&&!(f.flags&256)||(f.flags|=1024,Oi!==null&&(zu(Oi),Oi=null))),Xo(s,f),vn(f),null;case 5:Lc(f),N=si(qo.current);var W=f.type;if(s!==null&&f.stateNode!=null)Pr(s,f,W,q,N),s.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!q){if(f.stateNode===null)throw Error(u(166));return vn(f),null}if(s=si(li.current),lu(f)){if(!de)throw Error(u(175));s=Ht(f.stateNode,f.type,f.memoizedProps,N,s,f,!cs),f.updateQueue=s,s!==null&&xr(f)}else{var te=z(W,q,N,s,f);Ko(te,f,!1,!1),f.stateNode=te,K(te,W,q,N,s)&&xr(f)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return vn(f),null;case 6:if(s&&f.stateNode!=null)Cr(s,f,s.memoizedProps,q);else{if(typeof q!="string"&&f.stateNode===null)throw Error(u(166));if(s=si(qo.current),N=si(li.current),lu(f)){if(!de)throw Error(u(176));if(s=f.stateNode,N=f.memoizedProps,(q=Gt(s,N,f,!cs))&&(W=nr,W!==null))switch(W.tag){case 3:rs(W.stateNode.containerInfo,s,N,(W.mode&1)!==0);break;case 5:Qt(W.type,W.memoizedProps,W.stateNode,s,N,(W.mode&1)!==0)}q&&xr(f)}else f.stateNode=Z(q,s,N,f)}return vn(f),null;case 13:if(sn(En),q=f.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(un&&Or!==null&&f.mode&1&&!(f.flags&128))eh(),va(),f.flags|=98560,W=!1;else if(W=lu(f),q!==null&&q.dehydrated!==null){if(s===null){if(!W)throw Error(u(318));if(!de)throw Error(u(344));if(W=f.memoizedState,W=W!==null?W.dehydrated:null,!W)throw Error(u(317));Jn(W,f)}else va(),!(f.flags&128)&&(f.memoizedState=null),f.flags|=4;vn(f),W=!1}else Oi!==null&&(zu(Oi),Oi=null),W=!0;if(!W)return f.flags&65536?f:null}return f.flags&128?(f.lanes=N,f):(N=q!==null,N!==(s!==null&&s.memoizedState!==null)&&N&&(f.child.flags|=8192,f.mode&1&&(s===null||En.current&1?yn===0&&(yn=3):Al())),f.updateQueue!==null&&(f.flags|=4),vn(f),null);case 4:return _a(),Xo(s,f),s===null&&Se(f.stateNode.containerInfo),vn(f),null;case 10:return fs(f.type._context),vn(f),null;case 17:return Vn(f.type)&&pa(),vn(f),null;case 19:if(sn(En),W=f.memoizedState,W===null)return vn(f),null;if(q=(f.flags&128)!==0,te=W.rendering,te===null)if(q)Xr(W,!1);else{if(yn!==0||s!==null&&s.flags&128)for(s=f.child;s!==null;){if(te=pu(s),te!==null){for(f.flags|=128,Xr(W,!1),s=te.updateQueue,s!==null&&(f.updateQueue=s,f.flags|=4),f.subtreeFlags=0,s=N,N=f.child;N!==null;)q=N,W=s,q.flags&=14680066,te=q.alternate,te===null?(q.childLanes=0,q.lanes=W,q.child=null,q.subtreeFlags=0,q.memoizedProps=null,q.memoizedState=null,q.updateQueue=null,q.dependencies=null,q.stateNode=null):(q.childLanes=te.childLanes,q.lanes=te.lanes,q.child=te.child,q.subtreeFlags=0,q.deletions=null,q.memoizedProps=te.memoizedProps,q.memoizedState=te.memoizedState,q.updateQueue=te.updateQueue,q.type=te.type,W=te.dependencies,q.dependencies=W===null?null:{lanes:W.lanes,firstContext:W.firstContext}),N=N.sibling;return Mt(En,En.current&1|2),f.child}s=s.sibling}W.tail!==null&&$n()>ks&&(f.flags|=128,q=!0,Xr(W,!1),f.lanes=4194304)}else{if(!q)if(s=pu(te),s!==null){if(f.flags|=128,q=!0,s=s.updateQueue,s!==null&&(f.updateQueue=s,f.flags|=4),Xr(W,!0),W.tail===null&&W.tailMode==="hidden"&&!te.alternate&&!un)return vn(f),null}else 2*$n()-W.renderingStartTime>ks&&N!==1073741824&&(f.flags|=128,q=!0,Xr(W,!1),f.lanes=4194304);W.isBackwards?(te.sibling=f.child,f.child=te):(s=W.last,s!==null?s.sibling=te:f.child=te,W.last=te)}return W.tail!==null?(f=W.tail,W.rendering=f,W.tail=f.sibling,W.renderingStartTime=$n(),f.sibling=null,s=En.current,Mt(En,q?s&1|2:s&1),f):(vn(f),null);case 22:case 23:return Bu(),N=f.memoizedState!==null,s!==null&&s.memoizedState!==null!==N&&(f.flags|=8192),N&&f.mode&1?zn&1073741824&&(vn(f),ae&&f.subtreeFlags&6&&(f.flags|=8192)):vn(f),null;case 24:return null;case 25:return null}throw Error(u(156,f.tag))}function vh(s,f){switch(us(f),f.tag){case 1:return Vn(f.type)&&pa(),s=f.flags,s&65536?(f.flags=s&-65537|128,f):null;case 3:return _a(),sn(jr),sn(fr),Ic(),s=f.flags,s&65536&&!(s&128)?(f.flags=s&-65537|128,f):null;case 5:return Lc(f),null;case 13:if(sn(En),s=f.memoizedState,s!==null&&s.dehydrated!==null){if(f.alternate===null)throw Error(u(340));va()}return s=f.flags,s&65536?(f.flags=s&-65537|128,f):null;case 19:return sn(En),null;case 4:return _a(),null;case 10:return fs(f.type._context),null;case 22:case 23:return Bu(),null;case 24:return null;default:return null}}var bl=!1,Kn=!1,Zr=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function Kt(s,f){var N=s.ref;if(N!==null)if(typeof N=="function")try{N(null)}catch(q){fn(s,f,q)}else N.current=null}function Qr(s,f,N){try{N()}catch(q){fn(s,f,q)}}var Xc=!1;function mh(s,f){for(j(s.containerInfo),Ke=f;Ke!==null;)if(s=Ke,f=s.child,(s.subtreeFlags&1028)!==0&&f!==null)f.return=s,Ke=f;else for(;Ke!==null;){s=Ke;try{var N=s.alternate;if(s.flags&1024)switch(s.tag){case 0:case 11:case 15:break;case 1:if(N!==null){var q=N.memoizedProps,W=N.memoizedState,te=s.stateNode,le=te.getSnapshotBeforeUpdate(s.elementType===s.type?q:Kr(s.type,q),W);te.__reactInternalSnapshotBeforeUpdate=le}break;case 3:ae&&je(s.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(ye){fn(s,s.return,ye)}if(f=s.sibling,f!==null){f.return=s.return,Ke=f;break}Ke=s.return}return N=Xc,Xc=!1,N}function Na(s,f,N){var q=f.updateQueue;if(q=q!==null?q.lastEffect:null,q!==null){var W=q=q.next;do{if((W.tag&s)===s){var te=W.destroy;W.destroy=void 0,te!==void 0&&Qr(f,N,te)}W=W.next}while(W!==q)}}function _l(s,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var N=f=f.next;do{if((N.tag&s)===s){var q=N.create;N.destroy=q()}N=N.next}while(N!==f)}}function ku(s){var f=s.ref;if(f!==null){var N=s.stateNode;switch(s.tag){case 5:s=Q(N);break;default:s=N}typeof f=="function"?f(s):f.current=s}}function Ss(s){var f=s.alternate;f!==null&&(s.alternate=null,Ss(f)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(f=s.stateNode,f!==null&&De(f)),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 Zc(s){return s.tag===5||s.tag===3||s.tag===4}function Ia(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||Zc(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 Es(s,f,N){var q=s.tag;if(q===5||q===6)s=s.stateNode,f?Et(N,s,f):ze(N,s);else if(q!==4&&(s=s.child,s!==null))for(Es(s,f,N),s=s.sibling;s!==null;)Es(s,f,N),s=s.sibling}function Qc(s,f,N){var q=s.tag;if(q===5||q===6)s=s.stateNode,f?kt(N,s,f):Fe(N,s);else if(q!==4&&(s=s.child,s!==null))for(Qc(s,f,N),s=s.sibling;s!==null;)Qc(s,f,N),s=s.sibling}var Cn=null,Ur=!1;function Pi(s,f,N){for(N=N.child;N!==null;)Tu(s,f,N),N=N.sibling}function Tu(s,f,N){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(jo,N)}catch{}switch(N.tag){case 5:Kn||Kt(N,f);case 6:if(ae){var q=Cn,W=Ur;Cn=null,Pi(s,f,N),Cn=q,Ur=W,Cn!==null&&(Ur?we(Cn,N.stateNode):be(Cn,N.stateNode))}else Pi(s,f,N);break;case 18:ae&&Cn!==null&&(Ur?Ii(Cn,N.stateNode):Ir(Cn,N.stateNode));break;case 4:ae?(q=Cn,W=Ur,Cn=N.stateNode.containerInfo,Ur=!0,Pi(s,f,N),Cn=q,Ur=W):(se&&(q=N.stateNode.containerInfo,W=dn(q),Ge(q,W)),Pi(s,f,N));break;case 0:case 11:case 14:case 15:if(!Kn&&(q=N.updateQueue,q!==null&&(q=q.lastEffect,q!==null))){W=q=q.next;do{var te=W,le=te.destroy;te=te.tag,le!==void 0&&(te&2||te&4)&&Qr(N,f,le),W=W.next}while(W!==q)}Pi(s,f,N);break;case 1:if(!Kn&&(Kt(N,f),q=N.stateNode,typeof q.componentWillUnmount=="function"))try{q.props=N.memoizedProps,q.state=N.memoizedState,q.componentWillUnmount()}catch(ye){fn(N,f,ye)}Pi(s,f,N);break;case 21:Pi(s,f,N);break;case 22:N.mode&1?(Kn=(q=Kn)||N.memoizedState!==null,Pi(s,f,N),Kn=q):Pi(s,f,N);break;default:Pi(s,f,N)}}function Da(s){var f=s.updateQueue;if(f!==null){s.updateQueue=null;var N=s.stateNode;N===null&&(N=s.stateNode=new Zr),f.forEach(function(q){var W=Xp.bind(null,s,q);N.has(q)||(N.add(q),q.then(W,W))})}}function ci(s,f){var N=f.deletions;if(N!==null)for(var q=0;q<N.length;q++){var W=N[q];try{var te=s,le=f;if(ae){var ye=le;e:for(;ye!==null;){switch(ye.tag){case 5:Cn=ye.stateNode,Ur=!1;break e;case 3:Cn=ye.stateNode.containerInfo,Ur=!0;break e;case 4:Cn=ye.stateNode.containerInfo,Ur=!0;break e}ye=ye.return}if(Cn===null)throw Error(u(160));Tu(te,le,W),Cn=null,Ur=!1}else Tu(te,le,W);var Me=W.alternate;Me!==null&&(Me.return=null),W.return=null}catch(Ve){fn(W,f,Ve)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)Os(f,s),f=f.sibling}function Os(s,f){var N=s.alternate,q=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(ci(f,s),Jr(s),q&4){try{Na(3,s,s.return),_l(3,s)}catch(Je){fn(s,s.return,Je)}try{Na(5,s,s.return)}catch(Je){fn(s,s.return,Je)}}break;case 1:ci(f,s),Jr(s),q&512&&N!==null&&Kt(N,N.return);break;case 5:if(ci(f,s),Jr(s),q&512&&N!==null&&Kt(N,N.return),ae){if(s.flags&32){var W=s.stateNode;try{Ne(W)}catch(Je){fn(s,s.return,Je)}}if(q&4&&(W=s.stateNode,W!=null)){var te=s.memoizedProps;if(N=N!==null?N.memoizedProps:te,q=s.type,f=s.updateQueue,s.updateQueue=null,f!==null)try{dt(W,f,q,N,te,s)}catch(Je){fn(s,s.return,Je)}}}break;case 6:if(ci(f,s),Jr(s),q&4&&ae){if(s.stateNode===null)throw Error(u(162));W=s.stateNode,te=s.memoizedProps,N=N!==null?N.memoizedProps:te;try{Ue(W,N,te)}catch(Je){fn(s,s.return,Je)}}break;case 3:if(ci(f,s),Jr(s),q&4){if(ae&&de&&N!==null&&N.memoizedState.isDehydrated)try{Sn(f.containerInfo)}catch(Je){fn(s,s.return,Je)}if(se){W=f.containerInfo,te=f.pendingChildren;try{Ge(W,te)}catch(Je){fn(s,s.return,Je)}}}break;case 4:if(ci(f,s),Jr(s),q&4&&se){te=s.stateNode,W=te.containerInfo,te=te.pendingChildren;try{Ge(W,te)}catch(Je){fn(s,s.return,Je)}}break;case 13:ci(f,s),Jr(s),W=s.child,W.flags&8192&&(te=W.memoizedState!==null,W.stateNode.isHidden=te,!te||W.alternate!==null&&W.alternate.memoizedState!==null||(Pl=$n())),q&4&&Da(s);break;case 22:var le=N!==null&&N.memoizedState!==null;if(s.mode&1?(Kn=(N=Kn)||le,ci(f,s),Kn=N):ci(f,s),Jr(s),q&8192){if(N=s.memoizedState!==null,(s.stateNode.isHidden=N)&&!le&&s.mode&1)for(Ke=s,q=s.child;q!==null;){for(f=Ke=q;Ke!==null;){le=Ke;var ye=le.child;switch(le.tag){case 0:case 11:case 14:case 15:Na(4,le,le.return);break;case 1:Kt(le,le.return);var Me=le.stateNode;if(typeof Me.componentWillUnmount=="function"){var Ve=le,it=le.return;try{var wt=Ve;Me.props=wt.memoizedProps,Me.state=wt.memoizedState,Me.componentWillUnmount()}catch(Je){fn(Ve,it,Je)}}break;case 5:Kt(le,le.return);break;case 22:if(le.memoizedState!==null){Mu(f);continue}}ye!==null?(ye.return=le,Ke=ye):Mu(f)}q=q.sibling}if(ae){e:if(q=null,ae)for(f=s;;){if(f.tag===5){if(q===null){q=f;try{W=f.stateNode,N?Ye(W):ke(f.stateNode,f.memoizedProps)}catch(Je){fn(s,s.return,Je)}}}else if(f.tag===6){if(q===null)try{te=f.stateNode,N?Ze(te):vt(te,f.memoizedProps)}catch(Je){fn(s,s.return,Je)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===s)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===s)break e;for(;f.sibling===null;){if(f.return===null||f.return===s)break e;q===f&&(q=null),f=f.return}q===f&&(q=null),f.sibling.return=f.return,f=f.sibling}}}break;case 19:ci(f,s),Jr(s),q&4&&Da(s);break;case 21:break;default:ci(f,s),Jr(s)}}function Jr(s){var f=s.flags;if(f&2){try{if(ae){e:{for(var N=s.return;N!==null;){if(Zc(N)){var q=N;break e}N=N.return}throw Error(u(160))}switch(q.tag){case 5:var W=q.stateNode;q.flags&32&&(Ne(W),q.flags&=-33);var te=Ia(s);Qc(s,te,W);break;case 3:case 4:var le=q.stateNode.containerInfo,ye=Ia(s);Es(s,ye,le);break;default:throw Error(u(161))}}}catch(Me){fn(s,s.return,Me)}s.flags&=-3}f&4096&&(s.flags&=-4097)}function wl(s,f,N){Ke=s,Au(s)}function Au(s,f,N){for(var q=(s.mode&1)!==0;Ke!==null;){var W=Ke,te=W.child;if(W.tag===22&&q){var le=W.memoizedState!==null||bl;if(!le){var ye=W.alternate,Me=ye!==null&&ye.memoizedState!==null||Kn;ye=bl;var Ve=Kn;if(bl=le,(Kn=Me)&&!Ve)for(Ke=W;Ke!==null;)le=Ke,Me=le.child,le.tag===22&&le.memoizedState!==null?Lu(W):Me!==null?(Me.return=le,Ke=Me):Lu(W);for(;te!==null;)Ke=te,Au(te),te=te.sibling;Ke=W,bl=ye,Kn=Ve}Ru(s)}else W.subtreeFlags&8772&&te!==null?(te.return=W,Ke=te):Ru(s)}}function Ru(s){for(;Ke!==null;){var f=Ke;if(f.flags&8772){var N=f.alternate;try{if(f.flags&8772)switch(f.tag){case 0:case 11:case 15:Kn||_l(5,f);break;case 1:var q=f.stateNode;if(f.flags&4&&!Kn)if(N===null)q.componentDidMount();else{var W=f.elementType===f.type?N.memoizedProps:Kr(f.type,N.memoizedProps);q.componentDidUpdate(W,N.memoizedState,q.__reactInternalSnapshotBeforeUpdate)}var te=f.updateQueue;te!==null&&ah(f,te,q);break;case 3:var le=f.updateQueue;if(le!==null){if(N=null,f.child!==null)switch(f.child.tag){case 5:N=Q(f.child.stateNode);break;case 1:N=f.child.stateNode}ah(f,le,N)}break;case 5:var ye=f.stateNode;N===null&&f.flags&4&&Xe(ye,f.type,f.memoizedProps,f);break;case 6:break;case 4:break;case 12:break;case 13:if(de&&f.memoizedState===null){var Me=f.alternate;if(Me!==null){var Ve=Me.memoizedState;if(Ve!==null){var it=Ve.dehydrated;it!==null&&oi(it)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(u(163))}Kn||f.flags&512&&ku(f)}catch(wt){fn(f,f.return,wt)}}if(f===s){Ke=null;break}if(N=f.sibling,N!==null){N.return=f.return,Ke=N;break}Ke=f.return}}function Mu(s){for(;Ke!==null;){var f=Ke;if(f===s){Ke=null;break}var N=f.sibling;if(N!==null){N.return=f.return,Ke=N;break}Ke=f.return}}function Lu(s){for(;Ke!==null;){var f=Ke;try{switch(f.tag){case 0:case 11:case 15:var N=f.return;try{_l(4,f)}catch(Me){fn(f,N,Me)}break;case 1:var q=f.stateNode;if(typeof q.componentDidMount=="function"){var W=f.return;try{q.componentDidMount()}catch(Me){fn(f,W,Me)}}var te=f.return;try{ku(f)}catch(Me){fn(f,te,Me)}break;case 5:var le=f.return;try{ku(f)}catch(Me){fn(f,le,Me)}}}catch(Me){fn(f,f.return,Me)}if(f===s){Ke=null;break}var ye=f.sibling;if(ye!==null){ye.return=f.return,Ke=ye;break}Ke=f.return}}var ho=0,kr=1,Hi=2,Sl=3,xs=4;if(typeof Symbol=="function"&&Symbol.for){var ei=Symbol.for;ho=ei("selector.component"),kr=ei("selector.has_pseudo_class"),Hi=ei("selector.role"),Sl=ei("selector.test_id"),xs=ei("selector.text")}function Gi(s){var f=he(s);if(f!=null){if(typeof f.memoizedProps["data-testname"]!="string")throw Error(u(364));return f}if(s=Re(s),s===null)throw Error(u(362));return s.stateNode.current}function Ps(s,f){switch(f.$$typeof){case ho:if(s.type===f.value)return!0;break;case kr:e:{f=f.value,s=[s,0];for(var N=0;N<s.length;){var q=s[N++],W=s[N++],te=f[W];if(q.tag!==5||!xe(q)){for(;te!=null&&Ps(q,te);)W++,te=f[W];if(W===f.length){f=!0;break e}else for(q=q.child;q!==null;)s.push(q,W),q=q.sibling}}f=!1}return f;case Hi:if(s.tag===5&&Ie(s.stateNode,f.value))return!0;break;case xs:if((s.tag===5||s.tag===6)&&(s=me(s),s!==null&&0<=s.indexOf(f.value)))return!0;break;case Sl:if(s.tag===5&&(s=s.memoizedProps["data-testname"],typeof s=="string"&&s.toLowerCase()===f.value.toLowerCase()))return!0;break;default:throw Error(u(365))}return!1}function Nu(s){switch(s.$$typeof){case ho:return"<"+(R(s.value)||"Unknown")+">";case kr:return":has("+(Nu(s)||"")+")";case Hi:return'[role="'+s.value+'"]';case xs:return'"'+s.value+'"';case Sl:return'[data-testname="'+s.value+'"]';default:throw Error(u(365))}}function Vi(s,f){var N=[];s=[s,0];for(var q=0;q<s.length;){var W=s[q++],te=s[q++],le=f[te];if(W.tag!==5||!xe(W)){for(;le!=null&&Ps(W,le);)te++,le=f[te];if(te===f.length)N.push(W);else for(W=W.child;W!==null;)s.push(W,te),W=W.sibling}}return N}function $i(s,f){if(!Te)throw Error(u(363));s=Gi(s),s=Vi(s,f),f=[],s=Array.from(s);for(var N=0;N<s.length;){var q=s[N++];if(q.tag===5)xe(q)||f.push(q.stateNode);else for(q=q.child;q!==null;)s.push(q),q=q.sibling}return f}var Iu=Math.ceil,Cs=c.ReactCurrentDispatcher,El=c.ReactCurrentOwner,xn=c.ReactCurrentBatchConfig,xt=0,en=null,mn=null,kn=0,zn=0,Qo=er(0),yn=0,Ol=null,po=0,on=0,xl=0,ja=null,pr=null,Pl=0,ks=1/0,Tr=null;function Zt(){ks=$n()+500}var Pn=!1,Rn=null,Ci=null,Jo=!1,fi=null,Du=0,Mn=0,Ts=null,Cl=-1,kl=0;function cn(){return xt&6?$n():Cl!==-1?Cl:Cl=$n()}function Bn(s){return s.mode&1?xt&2&&kn!==0?kn&-kn:Wp.transition!==null?(kl===0&&(kl=eu()),kl):(s=Lt,s!==0?s:Ee()):1}function gr(s,f,N,q){if(50<Mn)throw Mn=0,Ts=null,Error(u(185));ai(s,N,q),(!(xt&2)||s!==en)&&(s===en&&(!(xt&2)&&(on|=N),yn===4&&go(s,kn)),vr(s,q),N===1&&xt===0&&!(f.mode&1)&&(Zt(),ll&&tr()))}function vr(s,f){var N=s.callbackNode;Wd(s,f);var q=rl(s,s===en?kn:0);if(q===0)N!==null&&Yd(N),s.callbackNode=null,s.callbackPriority=0;else if(f=q&-q,s.callbackPriority!==f){if(N!=null&&Yd(N),f===1)s.tag===0?Xd(Jc.bind(null,s)):ou(Jc.bind(null,s)),fe?ge(function(){!(xt&6)&&tr()}):Fi(tu,tr),N=null;else{switch(ol(q)){case 1:N=tu;break;case 4:N=nu;break;case 16:N=ru;break;case 536870912:N=$p;break;default:N=ru}N=lf(N,ju.bind(null,s))}s.callbackPriority=f,s.callbackNode=N}}function ju(s,f){if(Cl=-1,kl=0,xt&6)throw Error(u(327));var N=s.callbackNode;if(vo()&&s.callbackNode!==N)return null;var q=rl(s,s===en?kn:0);if(q===0)return null;if(q&30||q&s.expiredLanes||f)f=Fa(s,q);else{f=q;var W=xt;xt|=2;var te=tf();(en!==s||kn!==f)&&(Tr=null,Zt(),ea(s,f));do try{nf();break}catch(ye){Tl(s,ye)}while(!0);Tc(),Cs.current=te,xt=W,mn!==null?f=0:(en=null,kn=0,f=yn)}if(f!==0){if(f===2&&(W=Js(s),W!==0&&(q=W,f=Fu(s,W))),f===1)throw N=Ol,ea(s,0),go(s,q),vr(s,$n()),N;if(f===6)go(s,q);else{if(W=s.current.alternate,!(q&30)&&!yh(W)&&(f=Fa(s,q),f===2&&(te=Js(s),te!==0&&(q=te,f=Fu(s,te))),f===1))throw N=Ol,ea(s,0),go(s,q),vr(s,$n()),N;switch(s.finishedWork=W,s.finishedLanes=q,f){case 0:case 1:throw Error(u(345));case 2:ta(s,pr,Tr);break;case 3:if(go(s,q),(q&130023424)===q&&(f=Pl+500-$n(),10<f)){if(rl(s,0)!==0)break;if(W=s.suspendedLanes,(W&q)!==q){cn(),s.pingedLanes|=s.suspendedLanes&W;break}s.timeoutHandle=Y(ta.bind(null,s,pr,Tr),f);break}ta(s,pr,Tr);break;case 4:if(go(s,q),(q&4194240)===q)break;for(f=s.eventTimes,W=-1;0<q;){var le=31-Gr(q);te=1<<le,le=f[le],le>W&&(W=le),q&=~te}if(q=W,q=$n()-q,q=(120>q?120:480>q?480:1080>q?1080:1920>q?1920:3e3>q?3e3:4320>q?4320:1960*Iu(q/1960))-q,10<q){s.timeoutHandle=Y(ta.bind(null,s,pr,Tr),q);break}ta(s,pr,Tr);break;case 5:ta(s,pr,Tr);break;default:throw Error(u(329))}}}return vr(s,$n()),s.callbackNode===N?ju.bind(null,s):null}function Fu(s,f){var N=ja;return s.current.memoizedState.isDehydrated&&(ea(s,f).flags|=256),s=Fa(s,f),s!==2&&(f=pr,pr=N,f!==null&&zu(f)),s}function zu(s){pr===null?pr=s:pr.push.apply(pr,s)}function yh(s){for(var f=s;;){if(f.flags&16384){var N=f.updateQueue;if(N!==null&&(N=N.stores,N!==null))for(var q=0;q<N.length;q++){var W=N[q],te=W.getSnapshot;W=W.value;try{if(!wi(te(),W))return!1}catch{return!1}}}if(N=f.child,f.subtreeFlags&16384&&N!==null)N.return=f,f=N;else{if(f===s)break;for(;f.sibling===null;){if(f.return===null||f.return===s)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function go(s,f){for(f&=~xl,f&=~on,s.suspendedLanes|=f,s.pingedLanes&=~f,s=s.expirationTimes;0<f;){var N=31-Gr(f),q=1<<N;s[N]=-1,f&=~q}}function Jc(s){if(xt&6)throw Error(u(327));vo();var f=rl(s,0);if(!(f&1))return vr(s,$n()),null;var N=Fa(s,f);if(s.tag!==0&&N===2){var q=Js(s);q!==0&&(f=q,N=Fu(s,q))}if(N===1)throw N=Ol,ea(s,0),go(s,f),vr(s,$n()),N;if(N===6)throw Error(u(345));return s.finishedWork=s.current.alternate,s.finishedLanes=f,ta(s,pr,Tr),vr(s,$n()),null}function ef(s){fi!==null&&fi.tag===0&&!(xt&6)&&vo();var f=xt;xt|=1;var N=xn.transition,q=Lt;try{if(xn.transition=null,Lt=1,s)return s()}finally{Lt=q,xn.transition=N,xt=f,!(xt&6)&&tr()}}function Bu(){zn=Qo.current,sn(Qo)}function ea(s,f){s.finishedWork=null,s.finishedLanes=0;var N=s.timeoutHandle;if(N!==re&&(s.timeoutHandle=re,ne(N)),mn!==null)for(N=mn.return;N!==null;){var q=N;switch(us(q),q.tag){case 1:q=q.type.childContextTypes,q!=null&&pa();break;case 3:_a(),sn(jr),sn(fr),Ic();break;case 5:Lc(q);break;case 4:_a();break;case 13:sn(En);break;case 19:sn(En);break;case 10:fs(q.type._context);break;case 22:case 23:Bu()}N=N.return}if(en=s,mn=s=na(s.current,null),kn=zn=f,yn=0,Ol=null,xl=on=po=0,pr=ja=null,zo!==null){for(f=0;f<zo.length;f++)if(N=zo[f],q=N.interleaved,q!==null){N.interleaved=null;var W=q.next,te=N.pending;if(te!==null){var le=te.next;te.next=W,q.next=le}N.pending=q}zo=null}return s}function Tl(s,f){do{var N=mn;try{if(Tc(),Br.current=Ca,hl){for(var q=gn.memoizedState;q!==null;){var W=q.queue;W!==null&&(W.pending=null),q=q.next}hl=!1}if(Ho=0,jn=An=gn=null,hs=!1,ps=0,El.current=null,N===null||N.return===null){yn=1,Ol=f,mn=null;break}e:{var te=s,le=N.return,ye=N,Me=f;if(f=kn,ye.flags|=32768,Me!==null&&typeof Me=="object"&&typeof Me.then=="function"){var Ve=Me,it=ye,wt=it.tag;if(!(it.mode&1)&&(wt===0||wt===11||wt===15)){var Je=it.alternate;Je?(it.updateQueue=Je.updateQueue,it.memoizedState=Je.memoizedState,it.lanes=Je.lanes):(it.updateQueue=null,it.memoizedState=null)}var an=ph(le);if(an!==null){an.flags&=-257,$o(an,le,ye,te,f),an.mode&1&&hh(te,Ve,f),f=an,Me=Ve;var Xt=f.updateQueue;if(Xt===null){var Ar=new Set;Ar.add(Me),f.updateQueue=Ar}else Xt.add(Me);break e}else{if(!(f&1)){hh(te,Ve,f),Al();break e}Me=Error(u(426))}}else if(un&&ye.mode&1){var Wi=ph(le);if(Wi!==null){!(Wi.flags&65536)&&(Wi.flags|=256),$o(Wi,le,ye,te,f),Cc(ka(Me,ye));break e}}te=Me=ka(Me,ye),yn!==4&&(yn=2),ja===null?ja=[te]:ja.push(te),te=le;do{switch(te.tag){case 3:te.flags|=65536,f&=-f,te.lanes|=f;var Ce=Bi(te,Me,f);fl(te,Ce);break e;case 1:ye=Me;var _e=te.type,Le=te.stateNode;if(!(te.flags&128)&&(typeof _e.getDerivedStateFromError=="function"||Le!==null&&typeof Le.componentDidCatch=="function"&&(Ci===null||!Ci.has(Le)))){te.flags|=65536,f&=-f,te.lanes|=f;var et=Ou(te,ye,f);fl(te,et);break e}}te=te.return}while(te!==null)}of(N)}catch(gt){f=gt,mn===N&&N!==null&&(mn=N=N.return);continue}break}while(!0)}function tf(){var s=Cs.current;return Cs.current=Ca,s===null?Ca:s}function Al(){(yn===0||yn===3||yn===2)&&(yn=4),en===null||!(po&268435455)&&!(on&268435455)||go(en,kn)}function Fa(s,f){var N=xt;xt|=2;var q=tf();(en!==s||kn!==f)&&(Tr=null,ea(s,f));do try{bh();break}catch(W){Tl(s,W)}while(!0);if(Tc(),xt=N,Cs.current=q,mn!==null)throw Error(u(261));return en=null,kn=0,yn}function bh(){for(;mn!==null;)rf(mn)}function nf(){for(;mn!==null&&!Kd();)rf(mn)}function rf(s){var f=Oh(s.alternate,s,zn);s.memoizedProps=s.pendingProps,f===null?of(s):mn=f,El.current=null}function of(s){var f=s;do{var N=f.alternate;if(s=f.return,f.flags&32768){if(N=vh(N,f),N!==null){N.flags&=32767,mn=N;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{yn=6,mn=null;return}}else if(N=La(N,f,zn),N!==null){mn=N;return}if(f=f.sibling,f!==null){mn=f;return}mn=f=s}while(f!==null);yn===0&&(yn=5)}function ta(s,f,N){var q=Lt,W=xn.transition;try{xn.transition=null,Lt=1,_h(s,f,N,q)}finally{xn.transition=W,Lt=q}return null}function _h(s,f,N,q){do vo();while(fi!==null);if(xt&6)throw Error(u(327));N=s.finishedWork;var W=s.finishedLanes;if(N===null)return null;if(s.finishedWork=null,s.finishedLanes=0,N===s.current)throw Error(u(177));s.callbackNode=null,s.callbackPriority=0;var te=N.lanes|N.childLanes;if(Do(s,te),s===en&&(mn=en=null,kn=0),!(N.subtreeFlags&2064)&&!(N.flags&2064)||Jo||(Jo=!0,lf(ru,function(){return vo(),null})),te=(N.flags&15990)!==0,N.subtreeFlags&15990||te){te=xn.transition,xn.transition=null;var le=Lt;Lt=1;var ye=xt;xt|=4,El.current=null,mh(s,N),Os(N,s),I(s.containerInfo),s.current=N,wl(N),as(),xt=ye,Lt=le,xn.transition=te}else s.current=N;if(Jo&&(Jo=!1,fi=s,Du=W),te=s.pendingLanes,te===0&&(Ci=null),al(N.stateNode),vr(s,$n()),f!==null)for(q=s.onRecoverableError,N=0;N<f.length;N++)W=f[N],q(W.value,{componentStack:W.stack,digest:W.digest});if(Pn)throw Pn=!1,s=Rn,Rn=null,s;return Du&1&&s.tag!==0&&vo(),te=s.pendingLanes,te&1?s===Ts?Mn++:(Mn=0,Ts=s):Mn=0,tr(),null}function vo(){if(fi!==null){var s=ol(Du),f=xn.transition,N=Lt;try{if(xn.transition=null,Lt=16>s?16:s,fi===null)var q=!1;else{if(s=fi,fi=null,Du=0,xt&6)throw Error(u(331));var W=xt;for(xt|=4,Ke=s.current;Ke!==null;){var te=Ke,le=te.child;if(Ke.flags&16){var ye=te.deletions;if(ye!==null){for(var Me=0;Me<ye.length;Me++){var Ve=ye[Me];for(Ke=Ve;Ke!==null;){var it=Ke;switch(it.tag){case 0:case 11:case 15:Na(8,it,te)}var wt=it.child;if(wt!==null)wt.return=it,Ke=wt;else for(;Ke!==null;){it=Ke;var Je=it.sibling,an=it.return;if(Ss(it),it===Ve){Ke=null;break}if(Je!==null){Je.return=an,Ke=Je;break}Ke=an}}}var Xt=te.alternate;if(Xt!==null){var Ar=Xt.child;if(Ar!==null){Xt.child=null;do{var Wi=Ar.sibling;Ar.sibling=null,Ar=Wi}while(Ar!==null)}}Ke=te}}if(te.subtreeFlags&2064&&le!==null)le.return=te,Ke=le;else e:for(;Ke!==null;){if(te=Ke,te.flags&2048)switch(te.tag){case 0:case 11:case 15:Na(9,te,te.return)}var Ce=te.sibling;if(Ce!==null){Ce.return=te.return,Ke=Ce;break e}Ke=te.return}}var _e=s.current;for(Ke=_e;Ke!==null;){le=Ke;var Le=le.child;if(le.subtreeFlags&2064&&Le!==null)Le.return=le,Ke=Le;else e:for(le=_e;Ke!==null;){if(ye=Ke,ye.flags&2048)try{switch(ye.tag){case 0:case 11:case 15:_l(9,ye)}}catch(gt){fn(ye,ye.return,gt)}if(ye===le){Ke=null;break e}var et=ye.sibling;if(et!==null){et.return=ye.return,Ke=et;break e}Ke=ye.return}}if(xt=W,tr(),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(jo,s)}catch{}q=!0}return q}finally{Lt=N,xn.transition=f}}return!1}function af(s,f,N){f=ka(N,f),f=Bi(s,f,1),s=so(s,f,1),f=cn(),s!==null&&(ai(s,1,f),vr(s,f))}function fn(s,f,N){if(s.tag===3)af(s,s,N);else for(;f!==null;){if(f.tag===3){af(f,s,N);break}else if(f.tag===1){var q=f.stateNode;if(typeof f.type.getDerivedStateFromError=="function"||typeof q.componentDidCatch=="function"&&(Ci===null||!Ci.has(q))){s=ka(N,s),s=Ou(f,s,1),f=so(f,s,1),s=cn(),f!==null&&(ai(f,1,s),vr(f,s));break}}f=f.return}}function wh(s,f,N){var q=s.pingCache;q!==null&&q.delete(f),f=cn(),s.pingedLanes|=s.suspendedLanes&N,en===s&&(kn&N)===N&&(yn===4||yn===3&&(kn&130023424)===kn&&500>$n()-Pl?ea(s,0):xl|=N),vr(s,f)}function Sh(s,f){f===0&&(s.mode&1?(f=os,os<<=1,!(os&130023424)&&(os=4194304)):f=1);var N=cn();s=xi(s,f),s!==null&&(ai(s,f,N),vr(s,N))}function Eh(s){var f=s.memoizedState,N=0;f!==null&&(N=f.retryLane),Sh(s,N)}function Xp(s,f){var N=0;switch(s.tag){case 13:var q=s.stateNode,W=s.memoizedState;W!==null&&(N=W.retryLane);break;case 19:q=s.stateNode;break;default:throw Error(u(314))}q!==null&&q.delete(f),Sh(s,N)}var Oh;Oh=function(s,f,N){if(s!==null)if(s.memoizedProps!==f.pendingProps||jr.current)Fn=!0;else{if(!(s.lanes&N)&&!(f.flags&128))return Fn=!1,Yo(s,f,N);Fn=!!(s.flags&131072)}else Fn=!1,un&&f.flags&1048576&&Zd(f,ga,f.index);switch(f.lanes=0,f.tag){case 2:var q=f.type;ws(s,f),s=f.pendingProps;var W=io(f,fr.current);cl(f,N),W=gs(null,f,q,s,W,N);var te=gu();return f.flags|=1,typeof W=="object"&&W!==null&&typeof W.render=="function"&&W.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Vn(q)?(te=!0,tl(f)):te=!1,f.memoizedState=W.state!==null&&W.state!==void 0?W.state:null,Rc(f),W.updater=ys,f.stateNode=W,W._reactInternals=f,zi(f,q,s,N),f=dr(null,f,q,!0,te,N)):(f.tag=0,un&&te&&ss(f),Yn(null,f,W,N),f=f.child),f;case 16:q=f.elementType;e:{switch(ws(s,f),s=f.pendingProps,W=q._init,q=W(q._payload),f.type=q,W=f.tag=Zp(q),s=Kr(q,s),W){case 0:f=Ui(null,f,q,s,N);break e;case 1:f=ir(null,f,q,s,N);break e;case 11:f=xu(null,f,q,s,N);break e;case 14:f=Ta(null,f,q,Kr(q.type,s),N);break e}throw Error(u(306,q,""))}return f;case 0:return q=f.type,W=f.pendingProps,W=f.elementType===q?W:Kr(q,W),Ui(s,f,q,W,N);case 1:return q=f.type,W=f.pendingProps,W=f.elementType===q?W:Kr(q,W),ir(s,f,q,W,N);case 3:e:{if(Wo(f),s===null)throw Error(u(387));q=f.pendingProps,te=f.memoizedState,W=te.element,oh(s,f),Bo(f,q,null,N);var le=f.memoizedState;if(q=le.element,de&&te.isDehydrated)if(te={element:q,isDehydrated:!1,cache:le.cache,pendingSuspenseBoundaries:le.pendingSuspenseBoundaries,transitions:le.transitions},f.updateQueue.baseState=te,f.memoizedState=te,f.flags&256){W=ka(Error(u(423)),f),f=Aa(s,f,q,N,W);break e}else if(q!==W){W=ka(Error(u(424)),f),f=Aa(s,f,q,N,W);break e}else for(de&&(Or=_t(f.stateNode.containerInfo),nr=f,un=!0,Oi=null,cs=!1),N=rh(f,null,q,N),f.child=N;N;)N.flags=N.flags&-3|4096,N=N.sibling;else{if(va(),q===W){f=fo(s,f,N);break e}Yn(s,f,q,N)}f=f.child}return f;case 5:return Mc(f),s===null&&Pc(f),q=f.type,W=f.pendingProps,te=s!==null?s.memoizedProps:null,le=W.children,V(q,W)?le=null:te!==null&&V(q,te)&&(f.flags|=32),Jt(s,f),Yn(s,f,le,N),f.child;case 6:return s===null&&Pc(f),null;case 13:return Kc(s,f,N);case 4:return hu(f,f.stateNode.containerInfo),q=f.pendingProps,s===null?f.child=ya(f,null,q,N):Yn(s,f,q,N),f.child;case 11:return q=f.type,W=f.pendingProps,W=f.elementType===q?W:Kr(q,W),xu(s,f,q,W,N);case 7:return Yn(s,f,f.pendingProps,N),f.child;case 8:return Yn(s,f,f.pendingProps.children,N),f.child;case 12:return Yn(s,f,f.pendingProps.children,N),f.child;case 10:e:{if(q=f.type._context,W=f.pendingProps,te=f.memoizedProps,le=W.value,ih(f,q,le),te!==null)if(wi(te.value,le)){if(te.children===W.children&&!jr.current){f=fo(s,f,N);break e}}else for(te=f.child,te!==null&&(te.return=f);te!==null;){var ye=te.dependencies;if(ye!==null){le=te.child;for(var Me=ye.firstContext;Me!==null;){if(Me.context===q){if(te.tag===1){Me=lo(-1,N&-N),Me.tag=2;var Ve=te.updateQueue;if(Ve!==null){Ve=Ve.shared;var it=Ve.pending;it===null?Me.next=Me:(Me.next=it.next,it.next=Me),Ve.pending=Me}}te.lanes|=N,Me=te.alternate,Me!==null&&(Me.lanes|=N),ba(te.return,N,f),ye.lanes|=N;break}Me=Me.next}}else if(te.tag===10)le=te.type===f.type?null:te.child;else if(te.tag===18){if(le=te.return,le===null)throw Error(u(341));le.lanes|=N,ye=le.alternate,ye!==null&&(ye.lanes|=N),ba(le,N,f),le=te.sibling}else le=te.child;if(le!==null)le.return=te;else for(le=te;le!==null;){if(le===f){le=null;break}if(te=le.sibling,te!==null){te.return=le.return,le=te;break}le=le.return}te=le}Yn(s,f,W.children,N),f=f.child}return f;case 9:return W=f.type,q=f.pendingProps.children,cl(f,N),W=$r(W),q=q(W),f.flags|=1,Yn(s,f,q,N),f.child;case 14:return q=f.type,W=Kr(q,f.pendingProps),W=Kr(q.type,W),Ta(s,f,q,W,N);case 15:return co(s,f,f.type,f.pendingProps,N);case 17:return q=f.type,W=f.pendingProps,W=f.elementType===q?W:Kr(q,W),ws(s,f),f.tag=1,Vn(q)?(s=!0,tl(f)):s=!1,cl(f,N),dh(f,q,W),zi(f,q,W,N),dr(null,f,q,!0,s,N);case 19:return Cu(s,f,N);case 22:return rn(s,f,N)}throw Error(u(156,f.tag))};function lf(s,f){return Fi(s,f)}function xh(s,f,N,q){this.tag=s,this.key=N,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=q,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ti(s,f,N,q){return new xh(s,f,N,q)}function Rl(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Zp(s){if(typeof s=="function")return Rl(s)?1:0;if(s!=null){if(s=s.$$typeof,s===g)return 11;if(s===d)return 14}return 2}function na(s,f){var N=s.alternate;return N===null?(N=ti(s.tag,f,s.key,s.mode),N.elementType=s.elementType,N.type=s.type,N.stateNode=s.stateNode,N.alternate=s,s.alternate=N):(N.pendingProps=f,N.type=s.type,N.flags=0,N.subtreeFlags=0,N.deletions=null),N.flags=s.flags&14680064,N.childLanes=s.childLanes,N.lanes=s.lanes,N.child=s.child,N.memoizedProps=s.memoizedProps,N.memoizedState=s.memoizedState,N.updateQueue=s.updateQueue,f=s.dependencies,N.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},N.sibling=s.sibling,N.index=s.index,N.ref=s.ref,N}function Uu(s,f,N,q,W,te){var le=2;if(q=s,typeof s=="function")Rl(s)&&(le=1);else if(typeof s=="string")le=5;else e:switch(s){case _:return or(N.children,W,te,f);case k:le=8,W|=8;break;case O:return s=ti(12,N,f,W|2),s.elementType=O,s.lanes=te,s;case p:return s=ti(13,N,f,W),s.elementType=p,s.lanes=te,s;case P:return s=ti(19,N,f,W),s.elementType=P,s.lanes=te,s;case y:return Ml(N,W,te,f);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case v:le=10;break e;case x:le=9;break e;case g:le=11;break e;case d:le=14;break e;case m:le=16,q=null;break e}throw Error(u(130,s==null?s:typeof s,""))}return f=ti(le,N,f,W),f.elementType=s,f.type=q,f.lanes=te,f}function or(s,f,N,q){return s=ti(7,s,q,f),s.lanes=N,s}function Ml(s,f,N,q){return s=ti(22,s,q,f),s.elementType=y,s.lanes=N,s.stateNode={isHidden:!1},s}function Ll(s,f,N){return s=ti(6,s,null,f),s.lanes=N,s}function qu(s,f,N){return f=ti(4,s.children!==null?s.children:[],s.key,f),f.lanes=N,f.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},f}function Ph(s,f,N,q,W){this.tag=f,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=re,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=il(0),this.expirationTimes=il(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=il(0),this.identifierPrefix=q,this.onRecoverableError=W,de&&(this.mutableSourceEagerHydrationData=null)}function sf(s,f,N,q,W,te,le,ye,Me){return s=new Ph(s,f,N,ye,Me),f===1?(f=1,te===!0&&(f|=8)):f=0,te=ti(3,null,null,f),s.current=te,te.stateNode=s,te.memoizedState={element:q,isDehydrated:N,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rc(te),s}function Hu(s){if(!s)return Io;s=s._reactInternals;e:{if(E(s)!==s||s.tag!==1)throw Error(u(170));var f=s;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(Vn(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(u(171))}if(s.tag===1){var N=s.type;if(Vn(N))return Vd(s,N,f)}return f}function za(s){var f=s._reactInternals;if(f===void 0)throw typeof s.render=="function"?Error(u(188)):(s=Object.keys(s).join(","),Error(u(268,s)));return s=M(f),s===null?null:s.stateNode}function Gu(s,f){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var N=s.retryLane;s.retryLane=N!==0&&N<f?N:f}}function Nl(s,f){Gu(s,f),(s=s.alternate)&&Gu(s,f)}function Qp(s){return s=M(s),s===null?null:s.stateNode}function Ch(){return null}return t.attemptContinuousHydration=function(s){if(s.tag===13){var f=xi(s,134217728);if(f!==null){var N=cn();gr(f,s,134217728,N)}Nl(s,134217728)}},t.attemptDiscreteHydration=function(s){if(s.tag===13){var f=xi(s,1);if(f!==null){var N=cn();gr(f,s,1,N)}Nl(s,1)}},t.attemptHydrationAtCurrentPriority=function(s){if(s.tag===13){var f=Bn(s),N=xi(s,f);if(N!==null){var q=cn();gr(N,s,f,q)}Nl(s,f)}},t.attemptSynchronousHydration=function(s){switch(s.tag){case 3:var f=s.stateNode;if(f.current.memoizedState.isDehydrated){var N=nl(f.pendingLanes);N!==0&&(ji(f,N|1),vr(f,$n()),!(xt&6)&&(Zt(),tr()))}break;case 13:ef(function(){var q=xi(s,1);if(q!==null){var W=cn();gr(q,s,1,W)}}),Nl(s,1)}},t.batchedUpdates=function(s,f){var N=xt;xt|=1;try{return s(f)}finally{xt=N,xt===0&&(Zt(),ll&&tr())}},t.createComponentSelector=function(s){return{$$typeof:ho,value:s}},t.createContainer=function(s,f,N,q,W,te,le){return sf(s,f,!1,null,N,q,W,te,le)},t.createHasPseudoClassSelector=function(s){return{$$typeof:kr,value:s}},t.createHydrationContainer=function(s,f,N,q,W,te,le,ye,Me){return s=sf(N,q,!0,s,W,te,le,ye,Me),s.context=Hu(null),N=s.current,q=cn(),W=Bn(N),te=lo(q,W),te.callback=f??null,so(N,te,W),s.current.lanes=W,ai(s,W,q),vr(s,q),s},t.createPortal=function(s,f,N){var q=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:b,key:q==null?null:""+q,children:s,containerInfo:f,implementation:N}},t.createRoleSelector=function(s){return{$$typeof:Hi,value:s}},t.createTestNameSelector=function(s){return{$$typeof:Sl,value:s}},t.createTextSelector=function(s){return{$$typeof:xs,value:s}},t.deferredUpdates=function(s){var f=Lt,N=xn.transition;try{return xn.transition=null,Lt=16,s()}finally{Lt=f,xn.transition=N}},t.discreteUpdates=function(s,f,N,q,W){var te=Lt,le=xn.transition;try{return xn.transition=null,Lt=1,s(f,N,q,W)}finally{Lt=te,xn.transition=le,xt===0&&Zt()}},t.findAllNodes=$i,t.findBoundingRects=function(s,f){if(!Te)throw Error(u(363));f=$i(s,f),s=[];for(var N=0;N<f.length;N++)s.push(ue(f[N]));for(f=s.length-1;0<f;f--){N=s[f];for(var q=N.x,W=q+N.width,te=N.y,le=te+N.height,ye=f-1;0<=ye;ye--)if(f!==ye){var Me=s[ye],Ve=Me.x,it=Ve+Me.width,wt=Me.y,Je=wt+Me.height;if(q>=Ve&&te>=wt&&W<=it&&le<=Je){s.splice(f,1);break}else if(q!==Ve||N.width!==Me.width||Je<te||wt>le){if(!(te!==wt||N.height!==Me.height||it<q||Ve>W)){Ve>q&&(Me.width+=Ve-q,Me.x=q),it<W&&(Me.width=W-Ve),s.splice(f,1);break}}else{wt>te&&(Me.height+=wt-te,Me.y=te),Je<le&&(Me.height=le-wt),s.splice(f,1);break}}}return s},t.findHostInstance=za,t.findHostInstanceWithNoPortals=function(s){return s=A(s),s=s!==null?B(s):null,s===null?null:s.stateNode},t.findHostInstanceWithWarning=function(s){return za(s)},t.flushControlled=function(s){var f=xt;xt|=1;var N=xn.transition,q=Lt;try{xn.transition=null,Lt=1,s()}finally{Lt=q,xn.transition=N,xt=f,xt===0&&(Zt(),tr())}},t.flushPassiveEffects=vo,t.flushSync=ef,t.focusWithin=function(s,f){if(!Te)throw Error(u(363));for(s=Gi(s),f=Vi(s,f),f=Array.from(f),s=0;s<f.length;){var N=f[s++];if(!xe(N)){if(N.tag===5&&tt(N.stateNode))return!0;for(N=N.child;N!==null;)f.push(N),N=N.sibling}}return!1},t.getCurrentUpdatePriority=function(){return Lt},t.getFindAllNodesFailureDescription=function(s,f){if(!Te)throw Error(u(363));var N=0,q=[];s=[Gi(s),0];for(var W=0;W<s.length;){var te=s[W++],le=s[W++],ye=f[le];if((te.tag!==5||!xe(te))&&(Ps(te,ye)&&(q.push(Nu(ye)),le++,le>N&&(N=le)),le<f.length))for(te=te.child;te!==null;)s.push(te,le),te=te.sibling}if(N<f.length){for(s=[];N<f.length;N++)s.push(Nu(f[N]));return`findAllNodes was able to match part of the selector:
|
|
58
|
-
`+(q.join(" > ")+`
|
|
59
|
-
|
|
60
|
-
No matching component was found for:
|
|
61
|
-
`)+s.join(" > ")}return null},t.getPublicRootInstance=function(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return Q(s.child.stateNode);default:return s.child.stateNode}},t.injectIntoDevTools=function(s){if(s={bundleType:s.bundleType,version:s.version,rendererPackageName:s.rendererPackageName,rendererConfig:s.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:Qp,findFiberByHostInstance:s.findFiberByHostInstance||Ch,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")s=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)s=!0;else{try{jo=f.inject(s),Fr=f}catch{}s=!!f.checkDCE}}return s},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(s,f,N,q){if(!Te)throw Error(u(363));s=$i(s,f);var W=lt(s,N,q).disconnect;return{disconnect:function(){W()}}},t.registerMutableSourceForHydration=function(s,f){var N=f._getVersion;N=N(f._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[f,N]:s.mutableSourceEagerHydrationData.push(f,N)},t.runWithPriority=function(s,f){var N=Lt;try{return Lt=s,f()}finally{Lt=N}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(s,f,N,q){var W=f.current,te=cn(),le=Bn(W);return N=Hu(N),f.context===null?f.context=N:f.pendingContext=N,f=lo(te,le),f.payload={element:s},q=q===void 0?null:q,q!==null&&(f.callback=q),s=so(W,f,le),s!==null&&(gr(s,W,le,te),ds(s,W,le)),le},t}),G0}var My;function B8(){return My||(My=1,H0.exports=z8()),H0.exports}var U8=B8();const q8=Ad(U8);var V0={exports:{}},Hl={};/**
|
|
62
|
-
* @license React
|
|
63
|
-
* react-reconciler-constants.production.min.js
|
|
64
|
-
*
|
|
65
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
66
|
-
*
|
|
67
|
-
* This source code is licensed under the MIT license found in the
|
|
68
|
-
* LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/var Ly;function H8(){return Ly||(Ly=1,Hl.ConcurrentRoot=1,Hl.ContinuousEventPriority=4,Hl.DefaultEventPriority=16,Hl.DiscreteEventPriority=1,Hl.IdleEventPriority=536870912,Hl.LegacyRoot=0),Hl}var Ny;function G8(){return Ny||(Ny=1,V0.exports=H8()),V0.exports}var y5=G8(),V8=Rt();const Iy={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let Dy=!1,jy=!1;const iv=".react-konva-event";let b5=!1;function $8(e){b5=e}const W8=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
|
|
70
|
-
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
|
|
71
|
-
Consider to add onDragMove or onDragEnd events.
|
|
72
|
-
For more info see: https://github.com/konvajs/react-konva/issues/256
|
|
73
|
-
`,Y8=`ReactKonva: You are using "zIndex" attribute for a Konva node.
|
|
74
|
-
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
|
|
75
|
-
For more info see: https://github.com/konvajs/react-konva/issues/194
|
|
76
|
-
`,K8={};function Ip(e,i,t=K8){if(!Dy&&"zIndex"in i&&(console.warn(Y8),Dy=!0),!jy&&i.draggable){var n=i.x!==void 0||i.y!==void 0,a=i.onDragEnd||i.onDragMove;n&&!a&&(console.warn(W8),jy=!0)}for(var l in t)if(!Iy[l]){var u=l.slice(0,2)==="on",c=t[l]!==i[l];if(u&&c){var h=l.substr(2).toLowerCase();h.substr(0,7)==="content"&&(h="content"+h.substr(7,1).toUpperCase()+h.substr(8)),e.off(h,t[l])}var b=!i.hasOwnProperty(l);b&&e.setAttr(l,void 0)}var _=b5||i._useStrictMode,k={},O=!1;const v={};for(var l in i)if(!Iy[l]){var u=l.slice(0,2)==="on",x=t[l]!==i[l];if(u&&x){var h=l.substr(2).toLowerCase();h.substr(0,7)==="content"&&(h="content"+h.substr(7,1).toUpperCase()+h.substr(8)),i[l]&&(v[h]=i[l])}!u&&(i[l]!==t[l]||_&&i[l]!==e.getAttr(l))&&(O=!0,k[l]=i[l])}O&&(e.setAttrs(k),es(e));for(var h in v)e.on(h+iv,v[h])}function es(e){if(!V8.Konva.autoDrawEnabled){var i=e.getLayer()||e.getStage();i&&i.batchDraw()}}var $0=Mg();const _5={},X8={};xd.Node.prototype._applyProps=Ip;function Z8(e,i){if(typeof i=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${i}`);return}e.add(i),es(e)}function Q8(e,i,t){let n=xd[e];n||(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),n=xd.Group);const a={},l={};for(var u in i){var c=u.slice(0,2)==="on";c?l[u]=i[u]:a[u]=i[u]}const h=new n(a);return Ip(h,l),h}function J8(e,i,t){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function e9(e,i,t){return!1}function t9(e){return e}function n9(){return null}function r9(){return null}function i9(e,i,t,n){return X8}function o9(){}function a9(e){}function l9(e,i){return!1}function s9(){return _5}function u9(){return _5}const c9=setTimeout,f9=clearTimeout,d9=-1;function h9(e,i){return!1}const p9=!1,g9=!0,v9=!0;function m9(e,i){i.parent===e?i.moveToTop():e.add(i),es(e)}function y9(e,i){i.parent===e?i.moveToTop():e.add(i),es(e)}function w5(e,i,t){i._remove(),e.add(i),i.setZIndex(t.getZIndex()),es(e)}function b9(e,i,t){w5(e,i,t)}function _9(e,i){i.destroy(),i.off(iv),es(e)}function w9(e,i){i.destroy(),i.off(iv),es(e)}function S9(e,i,t){console.error(`Text components are not yet supported in ReactKonva. You text is: "${t}"`)}function E9(e,i,t){}function O9(e,i,t,n,a){Ip(e,a,n)}function x9(e){e.hide(),es(e)}function P9(e){}function C9(e,i){(i.visible==null||i.visible)&&e.show()}function k9(e,i){}function T9(e){}function A9(){}const R9=()=>y5.DefaultEventPriority,M9=Object.freeze(Object.defineProperty({__proto__:null,appendChild:m9,appendChildToContainer:y9,appendInitialChild:Z8,cancelTimeout:f9,clearContainer:T9,commitMount:E9,commitTextUpdate:S9,commitUpdate:O9,createInstance:Q8,createTextInstance:J8,detachDeletedInstance:A9,finalizeInitialChildren:e9,getChildHostContext:u9,getCurrentEventPriority:R9,getPublicInstance:t9,getRootHostContext:s9,hideInstance:x9,hideTextInstance:P9,idlePriority:$0.unstable_IdlePriority,insertBefore:w5,insertInContainerBefore:b9,isPrimaryRenderer:p9,noTimeout:d9,now:$0.unstable_now,prepareForCommit:n9,preparePortalMount:r9,prepareUpdate:i9,removeChild:_9,removeChildFromContainer:w9,resetAfterCommit:o9,resetTextContent:a9,run:$0.unstable_runWithPriority,scheduleTimeout:c9,shouldDeprioritizeSubtree:l9,shouldSetTextContent:h9,supportsMutation:v9,unhideInstance:C9,unhideTextInstance:k9,warnsIfNotActing:g9},Symbol.toStringTag,{value:"Module"}));var L9=Object.defineProperty,N9=Object.defineProperties,I9=Object.getOwnPropertyDescriptors,Fy=Object.getOwnPropertySymbols,D9=Object.prototype.hasOwnProperty,j9=Object.prototype.propertyIsEnumerable,zy=(e,i,t)=>i in e?L9(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,By=(e,i)=>{for(var t in i||(i={}))D9.call(i,t)&&zy(e,t,i[t]);if(Fy)for(var t of Fy(i))j9.call(i,t)&&zy(e,t,i[t]);return e},F9=(e,i)=>N9(e,I9(i)),Uy,qy;typeof window<"u"&&((Uy=window.document)!=null&&Uy.createElement||((qy=window.navigator)==null?void 0:qy.product)==="ReactNative")?On.useLayoutEffect:On.useEffect;function S5(e,i,t){if(!e)return;if(t(e)===!0)return e;let n=e.child;for(;n;){const a=S5(n,i,t);if(a)return a;n=n.sibling}}function E5(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const Hy=console.error;console.error=function(){const e=[...arguments].join("");if(e!=null&&e.startsWith("Warning:")&&e.includes("useContext")){console.error=Hy;return}return Hy.apply(this,arguments)};const ov=E5(On.createContext(null));class O5 extends On.Component{render(){return On.createElement(ov.Provider,{value:this._reactInternals},this.props.children)}}function z9(){const e=On.useContext(ov);if(e===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const i=On.useId();return On.useMemo(()=>{for(const n of[e,e==null?void 0:e.alternate]){if(!n)continue;const a=S5(n,!1,l=>{let u=l.memoizedState;for(;u;){if(u.memoizedState===i)return!0;u=u.next}});if(a)return a}},[e,i])}function B9(){const e=z9(),[i]=On.useState(()=>new Map);i.clear();let t=e;for(;t;){if(t.type&&typeof t.type=="object"){const a=t.type._context===void 0&&t.type.Provider===t.type?t.type:t.type._context;a&&a!==ov&&!i.has(a)&&i.set(a,On.useContext(E5(a)))}t=t.return}return i}function x5(){const e=B9();return On.useMemo(()=>Array.from(e.keys()).reduce((i,t)=>n=>On.createElement(i,null,On.createElement(t.Provider,F9(By({},n),{value:e.get(t)}))),i=>On.createElement(O5,By({},i))),[e])}function U9(e){const i=jt.useRef({});return jt.useLayoutEffect(()=>{i.current=e}),jt.useLayoutEffect(()=>()=>{i.current={}},[]),i.current}const q9=e=>{const i=jt.useRef(),t=jt.useRef(),n=jt.useRef(),a=U9(e),l=x5(),u=c=>{const{forwardedRef:h}=e;h&&(typeof h=="function"?h(c):h.current=c)};return jt.useLayoutEffect(()=>(t.current=new xd.Stage({width:e.width,height:e.height,container:i.current}),u(t.current),n.current=nc.createContainer(t.current,y5.LegacyRoot,!1,null),nc.updateContainer(jt.createElement(l,{},e.children),n.current),()=>{xd.isBrowser&&(u(null),nc.updateContainer(null,n.current,null),t.current.destroy())}),[]),jt.useLayoutEffect(()=>{u(t.current),Ip(t.current,e,a),nc.updateContainer(jt.createElement(l,{},e.children),n.current,null)}),jt.createElement("div",{ref:i,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},H9="Layer",G9="FastLayer",vp="Group",V9="Label",$9="Rect",W9="Circle",Y9="Ellipse",K9="Wedge",X9="Line",Z9="Sprite",Q9="Image",J9="Text",e7="TextPath",t7="Star",n7="Ring",r7="Arc",i7="Tag",o7="Path",a7="RegularPolygon",l7="Arrow",s7="Shape",u7="Transformer",nc=q8(M9);nc.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:jt.version,rendererPackageName:"react-konva"});const c7=jt.forwardRef((e,i)=>jt.createElement(O5,{},jt.createElement(q9,{...e,forwardedRef:i}))),f7=$8,d7=Object.freeze(Object.defineProperty({__proto__:null,Arc:r7,Arrow:l7,Circle:W9,Ellipse:Y9,FastLayer:G9,Group:vp,Image:Q9,KonvaRenderer:nc,Label:V9,Layer:H9,Line:X9,Path:o7,Rect:$9,RegularPolygon:a7,Ring:n7,Shape:s7,Sprite:Z9,Stage:c7,Star:t7,Tag:i7,Text:J9,TextPath:e7,Transformer:u7,Wedge:K9,useStrictMode:f7},Symbol.toStringTag,{value:"Module"})),Ja=Xl(d7);var W0,Gy;function Dp(){if(Gy)return W0;Gy=1;var e=Tn();return W0=function(t,n,a){const l=e.useRef("loading"),u=e.useRef(),[c,h]=e.useState(0),b=e.useRef(),_=e.useRef(),k=e.useRef();return(b.current!==t||_.current!==n||k.current!==a)&&(l.current="loading",u.current=void 0,b.current=t,_.current=n,k.current=a),e.useLayoutEffect(function(){if(!t)return;var O=document.createElement("img");function v(){l.current="loaded",u.current=O,h(Math.random())}function x(){l.current="failed",u.current=void 0,h(Math.random())}return O.addEventListener("load",v),O.addEventListener("error",x),n&&(O.crossOrigin=n),a&&(O.referrerPolicy=a),O.src=t,function(){O.removeEventListener("load",v),O.removeEventListener("error",x)}},[t,n,a]),[u.current,l.current]},W0}var rd={},id={},h7=function(e,i){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&i.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)i.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t};const p7=e=>{const i=window.getComputedStyle(e).position;return!(i==="absolute"||i==="relative")};function P5(e=()=>{}){const i=jt.useRef(e);return i.current=e,jt.useCallback((...t)=>i.current.apply(null,t),[])}const g7=({children:e,groupProps:i,divProps:t,transform:n,transformFunc:a})=>{const l=x5(),u=jt.useRef(null);jt.useRef();const[c]=jt.useState(()=>document.createElement("div")),h=jt.useMemo(()=>i3.createRoot(c),[c]),b=n??!0,_=P5(()=>{if(b&&u.current){let g=u.current.getAbsoluteTransform().decompose();a&&(g=a(g)),c.style.position="absolute",c.style.zIndex="10",c.style.top="0px",c.style.left="0px",c.style.transform=`translate(${g.x}px, ${g.y}px) rotate(${g.rotation}deg) scaleX(${g.scaleX}) scaleY(${g.scaleY})`,c.style.transformOrigin="top left"}else c.style.position="",c.style.zIndex="",c.style.top="",c.style.left="",c.style.transform="",c.style.transformOrigin="";const k=t||{},{style:O}=k,v=h7(k,["style"]);Object.assign(c.style,O),Object.assign(c,v)});return jt.useLayoutEffect(()=>{var k;const O=u.current;if(!O)return;const v=(k=O.getStage())===null||k===void 0?void 0:k.container();if(v)return v.appendChild(c),b&&p7(v)&&(v.style.position="relative"),O.on("absoluteTransformChange",_),_(),()=>{var x;O.off("absoluteTransformChange",_),(x=c.parentNode)===null||x===void 0||x.removeChild(c)}},[b]),jt.useLayoutEffect(()=>{_()},[t,a]),jt.useLayoutEffect(()=>{h.render(jt.createElement(l,null,e))}),jt.useLayoutEffect(()=>()=>{setTimeout(()=>{h.unmount()})},[]),jt.createElement(vp,Object.assign({ref:u},i))},v7=({selector:e,enabled:i,children:t})=>{const n=jt.useRef(null),a=jt.useRef(null),l=jt.useRef(),u=i??!0;return jt.useLayoutEffect(()=>{if(!n.current||!a.current)return;l.current=a.current;const h=n.current.getStage().findOne(e);u&&h?a.current.moveTo(h):a.current.moveTo(n.current);const b=n.current.getLayer();if(b&&(b.batchDraw(),h)){const _=h.getLayer();if(!_)return;_.batchDraw()}},[e,u]),jt.useEffect(()=>()=>{var c;(c=l.current)===null||c===void 0||c.destroy()},[]),jt.createElement(vp,{name:"_outer_portal",ref:n},jt.createElement(vp,{name:"_inner_portal",ref:a},t))};var m7=Dp();const y7=Ad(m7),b7=Object.freeze(Object.defineProperty({__proto__:null,Html:g7,Portal:v7,useEvent:P5,useImage:y7},Symbol.toStringTag,{value:"Module"})),Fd=Xl(b7);function _7(e,i){return Object.keys(e.values).forEach(t=>e.values[t]=e.values[t]&&parseFloat(e.values[t].toFixed(i))),e}function C5(e,i,t){const n=i-1,a=t[T5(n,t.length)];return a.marker!=="Z"?a:C5(e,n,t)}function k5(e,i,t){const n=i+1,a=t[T5(n,t.length)];return a.marker==="Z"?k5(e,n,t):a}function w7(e,i,t){let n=t[i-1]||{values:{x:0,y:0}};if(e.marker===e.marker.toLowerCase())switch(e.marker=e.marker.toUpperCase(),e.marker){case"M":e.values.x+=n.values.x,e.values.y+=n.values.y;break;case"L":case"A":e.values.x+=n.values.x,e.values.y+=n.values.y;break;case"H":e.marker="L",e.values.x+=n.values.x,e.values.y=n.values.y;break;case"V":e.marker="L",e.values.x=n.values.x,e.values.y+=n.values.y;break;case"C":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x1+=n.values.x,e.values.y1+=n.values.y,e.values.x2+=n.values.x,e.values.y2+=n.values.y;break;case"S":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x2+=n.values.x,e.values.y2+=n.values.y;break;case"Q":e.values.x+=n.values.x,e.values.y+=n.values.y,e.values.x1+=n.values.x,e.values.y1+=n.values.y;break;case"T":e.values.x+=n.values.x,e.values.y+=n.values.y;break}else if(e.marker===e.marker.toUpperCase())switch(e.marker){case"H":e.marker="L",e.values.y=n.values.y;break;case"V":e.marker="L",e.values.x=n.values.x;break}if(e.marker==="Z"){let l=function(c,h){return c[h].marker==="M"?c[h]:l(c,h-1)};var a=l;let u=l(t,i);e.values.x=u.values.x,e.values.y=u.values.y}return e}function S7(e,i){const t=[];switch(e.toUpperCase()){case"M":for(let n=0;n<i.length;n+=2){let a;e===e.toUpperCase()?a=n===0?"M":"L":a=n===0?"m":"l",t.push({marker:a,values:{x:i[n],y:i[n+1]}})}break;case"L":for(let n=0;n<i.length;n+=2)t.push({marker:e,values:{x:i[n],y:i[n+1]}});break;case"H":for(let n=0;n<i.length;n++)t.push({marker:e,values:{x:i[n],y:0}});break;case"V":for(let n=0;n<i.length;n++)t.push({marker:e,values:{x:0,y:i[n]}});break;case"C":for(let n=0;n<i.length;n+=6)t.push({marker:e,values:{x1:i[n],y1:i[n+1],x2:i[n+2],y2:i[n+3],x:i[n+4],y:i[n+5]}});break;case"S":for(let n=0;n<i.length;n+=4)t.push({marker:e,values:{x2:i[n],y2:i[n+1],x:i[n+2],y:i[n+3]}});break;case"Q":for(let n=0;n<i.length;n+=4)t.push({marker:e,values:{x1:i[n],y1:i[n+1],x:i[n+2],y:i[n+3]}});break;case"T":for(let n=0;n<i.length;n+=2)t.push({marker:e,values:{x:i[n],y:i[n+1]}});break;case"A":for(let n=0;n<i.length;n+=7)t.push({marker:e,values:{radiusX:i[n],radiusY:i[n+1],rotation:i[n+2],largeArc:i[n+3],sweep:i[n+4],x:i[n+5],y:i[n+6]}});break;case"Z":t.push({marker:e,values:{x:0,y:0}});break}return t}function T5(e,i){return(e%i+i)%i}function E7(e,i,t){if(i!==0&&e.marker==="L"){let n=t[i-1];["x","y"].every(l=>Math.round(Math.abs(n.values[l]-e.values[l]))===0)&&(e.overlap=!0)}return e}function Tg(e,i){const t=["x","y"].every(n=>Math.round(Math.abs(e[i].values[n]-e[0].values[n]))===0);e[i].marker==="L"&&t&&(e[i].overlap=!0,Tg(e,i-1)),e[i].marker==="Z"&&Tg(e,i-1)}function O7(e,i,t){const n=$y(e.values,t.values),a=$y(i.values,e.values);return Math.min(a,n)}function Vy(e,i){return Math.atan2(i.x-e.x,i.y-e.y)}function $y(e,i){const t=e.x-i.x,n=e.y-i.y;return Math.sqrt(Math.pow(t,2)+Math.pow(n,2))}function Wy(e,i){return Math.sin(e)*i}function Yy(e,i){return Math.cos(e)*i}function Ky(e,i){const t=i/Math.tan(e);return t===1/0||t===-1/0||isNaN(t)?i:t}function x7(e,i){return i*Math.tan(e)}function P7(e,i){let t,n=0,a=e*(180/Math.PI);return a<0&&a>=-180||a>180&&a<360?t=Ky(e/2,-i):(t=Ky(e/2,i),n=1,t===1/0&&(t=i)),{offset:t,sweepFlag:n}}function C7(e){const i=["radiusX","radiusY","rotation","largeArc","sweep","x1","y1","x2","y2","x","y"];return e.map(t=>{let n="";if(t.marker!=="Z"){const a=Object.keys(t.values);n=i.filter(l=>a.indexOf(l)!==-1).map(l=>t.values[l]).join()}return`${t.marker}${n}`}).join("").trim()}function A5(e){const i=/[MmLlSsQqLlHhVvCcSsQqTtAaZz]/g,t=/-?[0-9]*\.?\d+/g;return[...e.matchAll(i)].map(n=>({marker:n[0],index:n.index})).reduceRight((n,a)=>{const l=e.substring(a.index,n.length?n[n.length-1].index:e.length);return n.concat([{marker:a.marker,index:a.index,chunk:l.length>0?l.substr(1,l.length-1):l}])},[]).reverse().flatMap(n=>{const a=n.chunk.match(t),l=a?a.map(parseFloat):[];return S7(n.marker,l)}).map(w7)}function R5(e,i,t){let n=[],a=[];return t&&e.forEach(l=>_7(l,t)),e.forEach(l=>{l.marker==="M"&&n.push([]),n[n.length-1].push(l)}),n.forEach(l=>{l.map(E7),Tg(l,l.length-1);const u=l[l.length-1].marker=="Z";l.filter(c=>!c.overlap).map((c,h,b)=>{const k=C5(c,h,b),O=k5(c,h,b),v=Vy(c.values,k.values),x=Vy(c.values,O.values),g=x-v,p=g*(180/Math.PI),P=O7(c,k,O),d=Math.abs(x7(g/2,P/2)),m=Math.min(i,d),y=P7(g,m),w=y.offset,L=y.sweepFlag,R=(h==0||h==b.length-1)&&!u;switch(c.marker){case"M":case"L":const D=[c.values.x+Wy(v,w),c.values.y+Yy(v,w)],E=[c.values.x+Wy(x,w),c.values.y+Yy(x,w)];R?a.push({marker:c.marker,values:c.values}):a.push({marker:c.marker,values:{x:parseFloat(D[0].toFixed(3)),y:parseFloat(D[1].toFixed(3))}}),!R&&(O.marker==="L"||O.marker==="M")&&a.push({marker:"A",radius:m,values:{radiusX:parseFloat(m.toFixed(3)),radiusY:parseFloat(m.toFixed(3)),rotation:p,largeArc:0,sweep:L,x:parseFloat(E[0].toFixed(3)),y:parseFloat(E[1].toFixed(3))}});break;case"C":case"S":case"Q":case"T":case"A":case"Z":a.push({marker:c.marker,values:c.values});break}})}),{path:C7(a),commands:a}}function k7(e,i,t){return R5([...A5(e)],i,t)}const T7=Object.freeze(Object.defineProperty({__proto__:null,parsePath:A5,roundCommands:R5,roundCorners:k7},Symbol.toStringTag,{value:"Module"})),A7=Xl(T7);var _o={},od={},Qh={},Xy;function R7(){if(Xy)return Qh;Xy=1;var e=e||{};e.stringify=function(){var i={"visit_linear-gradient":function(t){return i.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return i.visit_gradient(t)},"visit_radial-gradient":function(t){return i.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return i.visit_gradient(t)},visit_gradient:function(t){var n=i.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+i.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,a=i.visit(t.at),l=i.visit(t.style);return l&&(n+=" "+l),a&&(n+=" at "+a),n},"visit_default-radial":function(t){var n="",a=i.visit(t.at);return a&&(n+=a),n},"visit_extent-keyword":function(t){var n=t.value,a=i.visit(t.at);return a&&(n+=" at "+a),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return i.visit(t.value.x)+" "+i.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return i.visit_color(t.value,t)},visit_hex:function(t){return i.visit_color("#"+t.value,t)},visit_rgb:function(t){return i.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return i.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,n){var a=t,l=i.visit(n.length);return l&&(a+=" "+l),a},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",a=t.length;return t.forEach(function(l,u){n+=i.visit(l),u<a-1&&(n+=", ")}),n},visit:function(t){if(!t)return"";var n="";if(t instanceof Array)return i.visit_array(t,n);if(t.type){var a=i["visit_"+t.type];if(a)return a(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return i.visit(t)}}();var e=e||{};return e.parse=function(){var i={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n($){var j=new Error(t+": "+$);throw j.source=t,j}function a(){var $=l();return t.length>0&&n("Invalid input not EOF"),$}function l(){return y(u)}function u(){return c("linear-gradient",i.linearGradient,b)||c("repeating-linear-gradient",i.repeatingLinearGradient,b)||c("radial-gradient",i.radialGradient,O)||c("repeating-radial-gradient",i.repeatingRadialGradient,O)}function c($,j,I){return h(j,function(z){var H=I();return H&&(Q(i.comma)||n("Missing comma before color stops")),{type:$,orientation:H,colorStops:y(w)}})}function h($,j){var I=Q($);if(I){Q(i.startCall)||n("Missing (");var z=j(I);return Q(i.endCall)||n("Missing )"),z}}function b(){return _()||k()}function _(){return U("directional",i.sideOrCorner,1)}function k(){return U("angular",i.angleValue,1)}function O(){var $,j=v(),I;return j&&($=[],$.push(j),I=t,Q(i.comma)&&(j=v(),j?$.push(j):t=I)),$}function v(){var $=x()||g();if($)$.at=P();else{var j=p();if(j){$=j;var I=P();I&&($.at=I)}else{var z=d();z&&($={type:"default-radial",at:z})}}return $}function x(){var $=U("shape",/^(circle)/i,0);return $&&($.style=B()||p()),$}function g(){var $=U("shape",/^(ellipse)/i,0);return $&&($.style=M()||p()),$}function p(){return U("extent-keyword",i.extentKeywords,1)}function P(){if(U("position",/^at/,0)){var $=d();return $||n("Missing positioning value"),$}}function d(){var $=m();if($.x||$.y)return{type:"position",value:$}}function m(){return{x:M(),y:M()}}function y($){var j=$(),I=[];if(j)for(I.push(j);Q(i.comma);)j=$(),j?I.push(j):n("One extra comma");return I}function w(){var $=L();return $||n("Expected color definition"),$.length=M(),$}function L(){return D()||S()||E()||R()}function R(){return U("literal",i.literalColor,0)}function D(){return U("hex",i.hexColor,1)}function E(){return h(i.rgbColor,function(){return{type:"rgb",value:y(A)}})}function S(){return h(i.rgbaColor,function(){return{type:"rgba",value:y(A)}})}function A(){return Q(i.number)[1]}function M(){return U("%",i.percentageValue,1)||T()||B()}function T(){return U("position-keyword",i.positionKeywords,1)}function B(){return U("px",i.pixelValue,1)||U("em",i.emValue,1)}function U($,j,I){var z=Q(j);if(z)return{type:$,value:z[I]}}function Q($){var j,I;return I=/^[\n\r\t\s]+/.exec(t),I&&X(I[0].length),j=$.exec(t),j&&X(j[0].length),j}function X($){t=t.substr($)}return function($){return t=$.toString(),a()}}(),Qh.parse=e.parse,Qh.stringify=e.stringify,Qh}var Zy;function M5(){return Zy||(Zy=1,function(e){var i=od&&od.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseColor=e.isGradient=void 0;const t=i(R7()),n=u=>u.indexOf("linear-gradient")>=0;e.isGradient=n;const a=u=>u.type==="hex"?"#"+u.value:u.type==="literal"?u.value:`${u.type}(${u.value.join(",")})`,l=u=>{if(!(0,e.isGradient)(u))return{rotation:0,stops:[{offset:0,color:u},{offset:1,color:u}]};const c=t.default.parse(u)[0];return{rotation:parseFloat(c.orientation.value),stops:c.colorStops.map((h,b)=>({color:a(h),offset:h.length?parseFloat(h.length.value)/100:b/(c.colorStops.length-1)}))}};e.parseColor=l}(od)),od}var Qy;function jp(){return Qy||(Qy=1,function(e){var i=_o&&_o.__createBinding||(Object.create?function(b,_,k,O){O===void 0&&(O=k);var v=Object.getOwnPropertyDescriptor(_,k);v&&!("get"in v?!_.__esModule:v.writable||v.configurable)||(v={enumerable:!0,get:function(){return _[k]}}),Object.defineProperty(b,O,v)}:function(b,_,k,O){O===void 0&&(O=k),b[O]=_[k]}),t=_o&&_o.__setModuleDefault||(Object.create?function(b,_){Object.defineProperty(b,"default",{enumerable:!0,value:_})}:function(b,_){b.default=_}),n=_o&&_o.__importStar||function(){var b=function(_){return b=Object.getOwnPropertyNames||function(k){var O=[];for(var v in k)Object.prototype.hasOwnProperty.call(k,v)&&(O[O.length]=v);return O},b(_)};return function(_){if(_&&_.__esModule)return _;var k={};if(_!=null)for(var O=b(_),v=0;v<O.length;v++)O[v]!=="default"&&i(k,_,O[v]);return t(k,_),k}}(),a=_o&&_o.__importDefault||function(b){return b&&b.__esModule?b:{default:b}};Object.defineProperty(e,"__esModule",{value:!0}),e.useColor=void 0;const l=a(Tn()),u=n(M5()),c=a(Ji()),h=(b,_=b.fill,k="fill")=>l.default.useMemo(()=>{if(!u.isGradient(_))return{[k]:_};const{stops:O,rotation:v}=u.parseColor(_),x={x:b.a.width/2,y:b.a.height/2},g=Math.sqrt(Math.pow(x.x,2)+Math.pow(x.y,2)),p=c.default.Util.degToRad(v)-Math.PI/2,P=[];return O.forEach(({offset:d,color:m})=>{P.push(d,m)}),k==="fill"?{fillLinearGradientStartPointX:x.x-g*Math.cos(p),fillLinearGradientStartPointY:x.y-g*Math.sin(p),fillLinearGradientColorStops:P,fillLinearGradientEndPointX:x.x+g*Math.cos(p),fillLinearGradientEndPointY:x.y+g*Math.sin(p),fill:O[1].color,fillPriority:"linear-gradient"}:{strokeLinearGradientStartPointX:x.x-g*Math.cos(p),strokeLinearGradientStartPointY:x.y-g*Math.sin(p),strokeLinearGradientColorStops:P,strokeLinearGradientEndPointX:x.x+g*Math.cos(p),strokeLinearGradientEndPointY:x.y+g*Math.sin(p)}},[_,b.width,b.height]);e.useColor=h}(_o)),_o}var Y0={},ad={},Jy;function yc(){return Jy||(Jy=1,function(e){var i=ad&&ad.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAnimationUsed=e.toggleFadeInAnimation=void 0,e.useFadeIn=c;const t=i(Tn()),n=i(Ji());let a=!1;const l=(h=!a)=>{a=h};e.toggleFadeInAnimation=l;const u=()=>a;function c(h,b){const _=t.default.useRef();t.default.useLayoutEffect(()=>{_.current&&_.current.destroy()},[b]),t.default.useLayoutEffect(()=>{if(!a)return;const k=h.current.opacity();return k?(h.current.opacity(0),_.current=new n.default.Tween({node:h.current,opacity:k,onFinish:()=>{var O;(O=_.current)===null||O===void 0||O.destroy()}}),_.current.play(),()=>{var O;(O=_.current)===null||O===void 0||O.destroy()}):void 0},[])}e.isAnimationUsed=u}(ad)),ad}var e2;function Ks(){return e2||(e2=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getFontLoadTimeout=e.setFontLoadTimeout=e.getAssetLoadTimeout=e.setAssetLoadTimeout=void 0,e.incrementLoader=_,e.decrementLoader=k,e.whenLoaded=v,e.onLoadError=g,e.triggerLoadError=p;const i=yc();let t=0,n=[],a=3e4;const l=P=>{a=P};e.setAssetLoadTimeout=l;const u=()=>a;e.getAssetLoadTimeout=u;let c=6e3;const h=P=>{c=P};e.setFontLoadTimeout=h;const b=()=>c;function _(P){t+=1;let d=!1;const m=setTimeout(()=>{d||(p(`Timeout loading asset ${P}`),console.error("Timeout triggered for loader. Some assets may not have loaded.",P),d=!0,k())},a);return()=>{d||(clearTimeout(m),k())}}function k(){t-=1,t===0&&(n.forEach(P=>P()),n=[])}function O(P){t===0?P():n.push(P)}function v(){return new Promise(P=>O(()=>{(0,i.isAnimationUsed)()?setTimeout(P,300):P(!0)}))}e.getFontLoadTimeout=b;let x=[];function g(P){x.push(P)}function p(P){x.forEach(d=>d(P))}}(Y0)),Y0}var Ha={},t2;function zd(){return t2||(t2=1,function(e){var i=Ha&&Ha.__createBinding||(Object.create?function(A,M,T,B){B===void 0&&(B=T);var U=Object.getOwnPropertyDescriptor(M,T);U&&!("get"in U?!M.__esModule:U.writable||U.configurable)||(U={enumerable:!0,get:function(){return M[T]}}),Object.defineProperty(A,B,U)}:function(A,M,T,B){B===void 0&&(B=T),A[B]=M[T]}),t=Ha&&Ha.__setModuleDefault||(Object.create?function(A,M){Object.defineProperty(A,"default",{enumerable:!0,value:M})}:function(A,M){A.default=M}),n=Ha&&Ha.__importStar||function(){var A=function(M){return A=Object.getOwnPropertyNames||function(T){var B=[];for(var U in T)Object.prototype.hasOwnProperty.call(T,U)&&(B[B.length]=U);return B},A(M)};return function(M){if(M&&M.__esModule)return M;var T={};if(M!=null)for(var B=A(M),U=0;U<B.length;U++)B[U]!=="default"&&i(T,M,B[U]);return t(T,M),T}}();Object.defineProperty(e,"__esModule",{value:!0}),e.isFontLoaded=e.globalFonts=void 0,e.isGoogleFontChanged=h,e.setGoogleFonts=b,e.getFontsList=_,e.addGlobalFont=k,e.removeGlobalFont=O,e.replaceGlobalFonts=v,e.loadFont=m,e.setGoogleFontsVariants=L,e.getGoogleFontsVariants=R,e.injectGoogleFont=D,e.injectCustomFont=S;const a=n(da),l=Ks();let u=a.observable(["Roboto","Amatic SC","Press Start 2P","Marck Script","Rubik Mono One"]),c=a.observable({value:!1});function h(){return c.value}function b(A){A!=="default"?(c.value=!0,u.splice(0,u.length),u.push(...A)):c.value=!1}function _(){return u}function k(A){e.globalFonts.push(A)}function O(A){const M=e.globalFonts.findIndex(T=>T.fontFamily===A);M!==-1&&e.globalFonts.splice(M,1)}function v(A){e.globalFonts.replace(A)}e.globalFonts=a.observable([]);var x="Some test text;?#D-ПРИВЕТ!1230o9u8i7y6t5r4e3w2q1",g=document.createElement("canvas");function p(A,M="Arial",T="normal",B="normal"){var U=g.getContext("2d");return U.font=`${T} ${B} 40px '${A}', ${M}`,U.measureText(x).width}const P={Arial:!0},d=A=>!!P[A];async function m(A,M,T){var B;if(P[A])return;const U=!!(!((B=document.fonts)===null||B===void 0)&&B.load),Q=p("Arial","Arial",M,T);if(U)try{await document.fonts.load(`16px '${A}', ${M} ${T}`);const I=p(A,"Arial",M,T);if(Q!==I)return void(P[A]=!0)}catch{}const X=p("Times","Times",M,T),$=p(A,"Arial",M,T),j=Math.min(6e3,(0,l.getFontLoadTimeout)())/60;for(let I=0;I<j;I++){const z=p(A,"Arial",M,T),H=p(A,"Times",M,T);if(z!==$||z!==Q||H!==X)return void(P[A]=!0);await new Promise(K=>setTimeout(K,60))}console.warn(`Timeout for loading font "${A}". Looks like polotno can't load it. Is it a correct font family?`),(0,l.triggerLoadError)(`Timeout for loading font "${A}"`)}e.isFontLoaded=d;const y={};let w="400,400italic,700,700italic";function L(A){w=A}function R(){return w}function D(A){if(y[A])return;const M=`https://fonts.googleapis.com/css?family=${A.replace(/ /g,"+")}:${w}`,T=document.createElement("link");T.type="text/css",T.href=M,T.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(T),y[A]=!0}const E={};function S(A){const M=A.fontFamily;if(E[M]||!A.url&&!A.styles)return;const T=document.createElement("style");T.type="text/css";const B=A.styles||(A.url?[{src:`url("${A.url}")`}]:[]);let U="";B.forEach(Q=>{U+=`
|
|
77
|
-
@font-face {
|
|
78
|
-
font-family: '${M}';
|
|
79
|
-
src: ${Q.src};
|
|
80
|
-
font-style: ${Q.fontStyle||"normal"};
|
|
81
|
-
font-weight: ${Q.fontWeight||"normal"};
|
|
82
|
-
}
|
|
83
|
-
`}),T.innerHTML=U,document.getElementsByTagName("head")[0].appendChild(T),E[A.fontFamily]=!0}}(Ha)),Ha}var Ga={},n2;function ts(){return n2||(n2=1,function(e){var i=Ga&&Ga.__createBinding||(Object.create?function(l,u,c,h){h===void 0&&(h=c);var b=Object.getOwnPropertyDescriptor(u,c);b&&!("get"in b?!u.__esModule:b.writable||b.configurable)||(b={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(l,h,b)}:function(l,u,c,h){h===void 0&&(h=c),l[h]=u[c]}),t=Ga&&Ga.__setModuleDefault||(Object.create?function(l,u){Object.defineProperty(l,"default",{enumerable:!0,value:u})}:function(l,u){l.default=u}),n=Ga&&Ga.__importStar||function(){var l=function(u){return l=Object.getOwnPropertyNames||function(c){var h=[];for(var b in c)Object.prototype.hasOwnProperty.call(c,b)&&(h[h.length]=b);return h},l(u)};return function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var h=l(u),b=0;b<h.length;b++)h[b]!=="default"&&i(c,u,h[b]);return t(c,u),c}}();Object.defineProperty(e,"__esModule",{value:!0}),e.setAnimationsEnabled=e.setTextSplitAllowed=e.setTextOverflow=e.setForceTextFit=e.useDownScaling=e.setDownScalingEnabled=e.useHtmlTextRender=e.useRemoveBackground=e.setTextVerticalResizeEnabled=e.flags=void 0;const a=n(da);e.flags=a.observable({imageDownScalingEnabled:!0,removeBackgroundEnabled:!0,htmlRenderEnabled:!1,forceTextFitEnabled:!1,textVerticalResizeEnabled:!1,textOverflow:"resize",textSplitAllowed:!1,animationsEnabled:!1}),e.setTextVerticalResizeEnabled=a.action(l=>{e.flags.textVerticalResizeEnabled=l}),e.useRemoveBackground=a.action(l=>{e.flags.removeBackgroundEnabled=l}),e.useHtmlTextRender=a.action(l=>{e.flags.htmlRenderEnabled=l}),e.setDownScalingEnabled=a.action(l=>{e.flags.imageDownScalingEnabled=l}),e.useDownScaling=a.action(l=>{console.warn("useDownScaling is deprecated. Use setDownScalingEnabled instead."),(0,e.setDownScalingEnabled)(l)}),e.setForceTextFit=a.action(l=>{console.warn("setForceTextFit is deprecated. Use setTextOverflow instead."),e.flags.textOverflow="change-font-size"}),e.setTextOverflow=a.action(l=>{e.flags.textOverflow=l}),e.setTextSplitAllowed=a.action(l=>{e.flags.textSplitAllowed=l}),e.setAnimationsEnabled=a.action(l=>{e.flags.animationsEnabled=l})}(Ga)),Ga}var K0={},r2;function L5(){return r2||(r2=1,function(e){function i(t=""){return(t.match(/<\/p>/gi)||[]).length>1&&(t=t.replace(/<\/p>/gi,(n,a,l)=>(l.slice(a+n.length).match(/<\/p>/gi)||[]).length>0?`
|
|
84
|
-
`:n)),t.replace(/(<([^>]+)>)/gi,"")}Object.defineProperty(e,"__esModule",{value:!0}),e.removeTags=i}(K0)),K0}var ld={},i2;function Fp(){return i2||(i2=1,function(e){var i=ld&&ld.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.applyFilter=n;const t=i(Ji());function n(a,l){var u;const c={filters:[]};l.brightnessEnabled&&(c.filters.push(t.default.Filters.Brighten),c.brightness=l.brightness),l.blurEnabled&&(c.filters.push(t.default.Filters.Blur),c.blurRadius=l.blurRadius),l.sepiaEnabled&&c.filters.push(t.default.Filters.Sepia),l.grayscaleEnabled&&c.filters.push(t.default.Filters.Grayscale),a.setAttrs(c),c.filters.length?a.cache({pixelRatio:l.store._elementsPixelRatio}):a.clearCache(),(u=a.getLayer())===null||u===void 0||u.batchDraw()}}(ld)),ld}var sd={},o2;function bc(){return o2||(o2=1,function(e){var i=sd&&sd.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.Highlighter=e.setHighlighterStyle=void 0;const t=i(Tn()),n=Qi,a=Ja,l={stroke:"rgb(0, 161, 255)",strokeWidth:2},u=c=>{Object.assign(l,c)};e.setHighlighterStyle=u,e.Highlighter=(0,n.observer)(({element:c})=>t.default.createElement(a.Rect,Object.assign({name:"highlighter",x:c.a.x,y:c.a.y,rotation:c.a.rotation,width:c.a.width,height:c.a.height,listening:!1,strokeScaleEnabled:!1},l)))}(sd)),sd}var ud={},a2;function Xs(){return a2||(a2=1,function(e){var i=ud&&ud.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.useMobile=e.isTouchDevice=e.mobileStyle=e.isMobile=e.MOBILE_BREAKPOINT=void 0;const t=i(Tn());e.MOBILE_BREAKPOINT=800;const n=()=>window.innerWidth<=e.MOBILE_BREAKPOINT;e.isMobile=n;const a=c=>`
|
|
85
|
-
@media (max-width: ${e.MOBILE_BREAKPOINT}px) {
|
|
86
|
-
${c}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.polotno-mobile & {
|
|
90
|
-
${c}
|
|
91
|
-
}
|
|
92
|
-
`;e.mobileStyle=a;const l=()=>"ontouchstart"in window||navigator.maxTouchPoints>0;e.isTouchDevice=l;const u=()=>{const[c,h]=t.default.useState((0,e.isMobile)());return t.default.useEffect(()=>{const b=()=>{h((0,e.isMobile)())};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)}},[]),c};e.useMobile=u}(ud)),ud}var l2={},N5="warn";function I5(e){N5=e}function D5(){return N5}function M7(e){I5(e)}var sr;(function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"})(sr||(sr={}));var Ag=function(e,i){return Ag=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},Ag(e,i)};function _n(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");Ag(e,i);function t(){this.constructor=e}e.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}var ur=function(){return ur=Object.assign||function(i){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(i[l]=t[l])}return i},ur.apply(this,arguments)};function L7(e,i){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&i.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)i.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(t[n[a]]=e[n[a]]);return t}function j5(e,i){var t={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},n,a,l,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(b){return function(_){return h([b,_])}}function h(b){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,b[0]&&(t=0)),t;)try{if(n=1,a&&(l=b[0]&2?a.return:b[0]?a.throw||((l=a.return)&&l.call(a),0):a.next)&&!(l=l.call(a,b[1])).done)return l;switch(a=0,l&&(b=[b[0]&2,l.value]),b[0]){case 0:case 1:l=b;break;case 4:return t.label++,{value:b[1],done:!1};case 5:t.label++,a=b[1],b=[0];continue;case 7:b=t.ops.pop(),t.trys.pop();continue;default:if(l=t.trys,!(l=l.length>0&&l[l.length-1])&&(b[0]===6||b[0]===2)){t=0;continue}if(b[0]===3&&(!l||b[1]>l[0]&&b[1]<l[3])){t.label=b[1];break}if(b[0]===6&&t.label<l[1]){t.label=l[1],l=b;break}if(l&&t.label<l[2]){t.label=l[2],t.ops.push(b);break}l[2]&&t.ops.pop(),t.trys.pop();continue}b=i.call(e,t)}catch(_){b=[6,_],a=0}finally{n=l=0}if(b[0]&5)throw b[1];return{value:b[0]?b[1]:void 0,done:!0}}}function wd(e){var i=typeof Symbol=="function"&&Symbol.iterator,t=i&&e[i],n=0;if(t)return t.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(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function ca(e,i){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var n=t.call(e),a,l=[],u;try{for(;(i===void 0||i-- >0)&&!(a=n.next()).done;)l.push(a.value)}catch(c){u={error:c}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(u)throw u.error}}return l}function fa(e,i,t){if(arguments.length===2)for(var n=0,a=i.length,l;n<a;n++)(l||!(n in i))&&(l||(l=Array.prototype.slice.call(i,0,n)),l[n]=i[n]);return e.concat(l||Array.prototype.slice.call(i))}function Bd(e){return ut(e).type}function N7(e,i){return ut(e).getChildType(i)}function F5(e,i){return ut(e).onPatch(i)}function I7(e,i){return ut(e).onSnapshot(i)}function cc(e,i){ut(e).applyPatches(hv(i))}function D7(e,i){var t={patches:[],inversePatches:[]},n={},a,l={get recording(){return!!a},get patches(){return n.patches||(n.patches=t.patches.slice()),n.patches},get reversedInversePatches(){return n.reversedInversePatches||(n.reversedInversePatches=t.inversePatches.slice().reverse()),n.reversedInversePatches},get inversePatches(){return n.inversePatches||(n.inversePatches=t.inversePatches.slice()),n.inversePatches},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=F5(e,function(u,c){i&&!i(u,c,uv())||(t.patches.push(u),t.inversePatches.push(c),n.patches=void 0,n.inversePatches=void 0,n.reversedInversePatches=void 0)}))},replay:function(u){cc(u||e,t.patches)},undo:function(u){cc(u||e,t.inversePatches.slice().reverse())}};return l.resume(),l}function j7(e){var i=ut(e);if(!i.isRoot)throw new rt("`protect` can only be invoked on root nodes");i.isProtectionEnabled=!0}function F7(e){var i=ut(e);if(!i.isRoot)throw new rt("`unprotect` can only be invoked on root nodes");i.isProtectionEnabled=!1}function z7(e){return ut(e).isProtected}function z5(e,i){return ut(e).applySnapshot(i)}function av(e,i){i===void 0&&(i=!0);var t=ut(e);return i?t.snapshot:t.type.getSnapshot(t,!1)}function B7(e,i){i===void 0&&(i=1);for(var t=ut(e).parent;t;){if(--i===0)return!0;t=t.parent}return!1}function U7(e,i){i===void 0&&(i=1);for(var t=i,n=ut(e).parent;n;){if(--t===0)return n.storedValue;n=n.parent}throw new rt("Failed to find the parent of ".concat(ut(e)," at depth ").concat(i))}function q7(e,i){for(var t=ut(e).parent;t;){if(i.is(t.storedValue))return!0;t=t.parent}return!1}function H7(e,i){for(var t=ut(e).parent;t;){if(i.is(t.storedValue))return t.storedValue;t=t.parent}throw new rt("Failed to find the parent of ".concat(ut(e)," of a given type"))}function B5(e){return ut(e).root.storedValue}function U5(e){return ut(e).path}function G7(e){return gc(ut(e).path)}function V7(e){return ut(e).isRoot}function $7(e,i){var t=o4(ut(e),i);return t?t.value:void 0}function W7(e,i,t){var n=ut(i).root.identifierCache.resolve(e,_c(t));return n==null?void 0:n.value}function q5(e){return ut(e).identifier}function Y7(e,i){i===void 0&&(i=!0);try{var t=e();if(t==null)return;if(tn(t))return i?lv(t)?t:void 0:t;throw new rt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof pv)return;throw n}}function K7(e,i){i===void 0&&(i=!0);try{var t=e();if(t==null)return!1;if(tn(t))return i?lv(t):!0;throw new rt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof pv)return!1;throw n}}function H5(e,i){var t=o4(ut(e),i,!1);if(t!==void 0)try{return t.value}catch{return}}function X7(e,i){return i4(ut(e),ut(i))}function Z7(e,i){i===void 0&&(i=!0);var t=ut(e);return t.type.create(t.snapshot,i===!0?t.root.environment:i===!1?void 0:i)}function Q7(e){return ut(e).detach(),e}function J7(e){var i=ut(e);i.isRoot?i.die():i.parent.removeChild(i.subpath)}function lv(e){return ut(e).observableIsAlive}function eS(e,i){var t=ut(e);return t.addDisposer(i),i}function tS(e){var i=ut(e),t=i.root.environment;if(!t)throw new rt("Failed to find the environment of ".concat(i," ").concat(i.path));return t}function nS(e){var i=ut(e),t=i.root.environment;return!!t}function G5(e,i){var t=ut(e);t.getChildren().forEach(function(n){tn(n.storedValue)&&G5(n.storedValue,i)}),i(t.storedValue)}function V5(e){var i;return tn(e)?i=Bd(e):i=e,{name:i.name,properties:ur({},i.properties)}}function rS(e){var i=ut(e).type,t=ur(ur({},V5(i)),{actions:[],volatile:[],views:[],flowActions:[]}),n=Object.getOwnPropertyNames(e);return n.forEach(function(a){if(!(a in t.properties)){var l=Object.getOwnPropertyDescriptor(e,a);if(l.get){Y3(e,a)?t.views.push(a):t.volatile.push(a);return}l.value._isFlowAction===!0&&t.flowActions.push(a),l.value._isMSTAction===!0?t.actions.push(a):X3(e,a)?t.volatile.push(a):t.views.push(a)}}),t}function iS(e){return e}function oS(e){return e}function aS(e){return e}function lS(e){return ut(e).nodeId}var $5=function(){function e(i,t,n,a){Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"environment",{enumerable:!0,configurable:!0,writable:!0,value:a}),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:Lr.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=a,this.baseSetParent(t,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(i){var t=this.isAlive;this._state=i;var n=this.isAlive;this.aliveAtom&&t!==n&&this.aliveAtom.reportChanged()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fireInternalHook",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this._hookSubscribers&&this._hookSubscribers.emit(i,this,i)}}),Object.defineProperty(e.prototype,"registerHook",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){return this._hookSubscribers||(this._hookSubscribers=new c4),this._hookSubscribers.register(i,t)}}),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(i,t){this._parent=i,this._subpath=t,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(i){return i&&(this.pathAtom||(this.pathAtom=Ed("path")),this.pathAtom.reportObserved()),this.parent?(this._escapedSubpath===void 0&&(this._escapedSubpath=this._subpath?Wl(this._subpath):""),this.parent.getEscapedPath(i)+"/"+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!==Lr.DEAD},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDetaching",{get:function(){return this.state===Lr.DETACHING},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observableIsAlive",{get:function(){return this.aliveAtom||(this.aliveAtom=Ed("alive")),this.aliveAtom.reportObserved(),this.isAlive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseFinalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(i){if(this.state===Lr.CREATED){if(this.parent){if(this.parent.state!==Lr.FINALIZED)return;this.fireHook(sr.afterAttach)}this.state=Lr.FINALIZED,i&&i()}}}),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=Lr.DEAD}}),Object.defineProperty(e.prototype,"baseAboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.fireHook(sr.beforeDestroy)}}),e}(),Pd=function(e){_n(i,e);function i(t,n,a,l,u){var c=e.call(this,t,n,a,l)||this;try{c.storedValue=t.createNewInstance(u)}catch(h){throw c.state=Lr.DEAD,h}return c.state=Lr.CREATED,c.finalizeCreation(),c}return Object.defineProperty(i.prototype,"root",{get:function(){if(!this.parent)throw new rt("This scalar node is not part of a tree");return this.parent.root},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.parent!==t,l=this.subpath!==n;!a&&!l||(this.environment=void 0,this.baseSetParent(this.parent,n))}}),Object.defineProperty(i.prototype,"snapshot",{get:function(){return this.getSnapshot()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(i.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>";return"".concat(this.type.name,"@").concat(t).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(i.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===Lr.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(i.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeCreation()}}),Object.defineProperty(i.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseAboutToDie()}}),Object.defineProperty(i.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.baseFinalizeDeath()}}),Object.defineProperty(i.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.fireInternalHook(t)}}),i}($5);Pd.prototype.die=Zn(Pd.prototype.die);var sS=1,Po;(function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.CREATING=1]="CREATING",e[e.CREATED=2]="CREATED"})(Po||(Po={}));var Ai;(function(e){e.Dispose="dispose",e.Patch="patch",e.Snapshot="snapshot"})(Ai||(Ai={}));var uS={onError:function(e){throw e}},yi=function(e){_n(i,e);function i(t,n,a,l,u){var c=e.call(this,t,n,a,l)||this;if(Object.defineProperty(c,"nodeId",{enumerable:!0,configurable:!0,writable:!0,value:++sS}),Object.defineProperty(c,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"unnormalizedIdentifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"identifierCache",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"isProtectionEnabled",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(c,"middlewares",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"hasSnapshotPostProcessor",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_applyPatches",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_applySnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_autoUnbox",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(c,"_isRunningAction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_hasSnapshotReaction",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_observableInstanceState",{enumerable:!0,configurable:!0,writable:!0,value:Po.UNINITIALIZED}),Object.defineProperty(c,"_childNodes",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_initialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_cachedInitialSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_cachedInitialSnapshotCreated",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(c,"_snapshotComputed",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_snapshotUponDeath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(c,"_internalEvents",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),c._snapshotComputed=$s(function(){return c.getSnapshot()}),c.unbox=c.unbox.bind(c),c._initialSnapshot=u,c.identifierAttribute=t.identifierAttribute,n||(c.identifierCache=new TS),c._childNodes=t.initializeChildNodes(c,c._initialSnapshot),c.identifier=null,c.unnormalizedIdentifier=null,c.identifierAttribute&&c._initialSnapshot){var h=c._initialSnapshot[c.identifierAttribute];if(h===void 0){var b=c._childNodes[c.identifierAttribute];b&&(h=b.value)}if(typeof h!="string"&&typeof h!="number")throw new rt("Instance identifier '".concat(c.identifierAttribute,"' for type '").concat(c.type.name,"' must be a string or a number"));c.identifier=_c(h),c.unnormalizedIdentifier=h}return n?n.root.identifierCache.addNodeToCache(c):c.identifierCache.addNodeToCache(c),c}return Object.defineProperty(i.prototype,"applyPatches",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.createObservableInstanceIfNeeded(),this._applyPatches(t)}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.createObservableInstanceIfNeeded(),this._applySnapshot(t)}}),Object.defineProperty(i.prototype,"createObservableInstanceIfNeeded",{enumerable:!1,configurable:!0,writable:!0,value:function(t){t===void 0&&(t=!0),this._observableInstanceState===Po.UNINITIALIZED&&this.createObservableInstance(t)}}),Object.defineProperty(i.prototype,"createObservableInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n,a,l,u;t===void 0&&(t=!0),this._observableInstanceState=Po.CREATING;for(var c=[],h=this.parent;h&&h._observableInstanceState===Po.UNINITIALIZED;)c.unshift(h),h=h.parent;try{for(var b=wd(c),_=b.next();!_.done;_=b.next()){var k=_.value;k.createObservableInstanceIfNeeded(!1)}}catch(g){n={error:g}}finally{try{_&&!_.done&&(a=b.return)&&a.call(b)}finally{if(n)throw n.error}}var O=this.type;try{this.storedValue=O.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,O.finalizeNewInstance(this,this.storedValue)}catch(g){throw this.state=Lr.DEAD,g}finally{this._isRunningAction=!1}if(this._observableInstanceState=Po.CREATED,this._snapshotComputed.trackAndCompute(),this.isRoot&&this._addSnapshotReaction(),this._childNodes=hc,this.state=Lr.CREATED,t){this.fireHook(sr.afterCreate),this.finalizeCreation();try{for(var v=wd(c.reverse()),x=v.next();!x.done;x=v.next()){var k=x.value;k.fireHook(sr.afterCreate),k.finalizeCreation()}}catch(g){l={error:g}}finally{try{x&&!x.done&&(u=v.return)&&u.call(v)}finally{if(l)throw l.error}}}}}),Object.defineProperty(i.prototype,"root",{get:function(){var t=this.parent;return t?t.root:this},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"clearParent",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.parent){this.fireHook(sr.beforeDetach);var t=this.state;this.state=Lr.DETACHING;var n=this.root,a=n.environment,l=n.identifierCache.splitCache(this);try{this.parent.removeChild(this.subpath),this.baseSetParent(null,""),this.environment=a,this.identifierCache=l}finally{this.state=t}}}}),Object.defineProperty(i.prototype,"setParent",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=t!==this.parent,l=n!==this.subpath;!a&&!l||(a?(this.environment=void 0,t.root.identifierCache.mergeCache(this),this.baseSetParent(t,n),this.fireHook(sr.afterAttach)):l&&this.baseSetParent(this.parent,n))}}),Object.defineProperty(i.prototype,"fireHook",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;this.fireInternalHook(t);var a=this.storedValue&&typeof this.storedValue=="object"&&this.storedValue[t];typeof a=="function"&&(lc?lc(function(){a.apply(n.storedValue)}):a.apply(this.storedValue))}}),Object.defineProperty(i.prototype,"snapshot",{get:function(){return this.hasSnapshotPostProcessor&&this.createObservableInstanceIfNeeded(),this._snapshotComputed.get()},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.isAlive?this._observableInstanceState===Po.CREATED?this._getActualSnapshot():this._getCachedInitialSnapshot():this._snapshotUponDeath}}),Object.defineProperty(i.prototype,"_getActualSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.type.getSnapshot(this)}}),Object.defineProperty(i.prototype,"_getCachedInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this._cachedInitialSnapshotCreated){var t=this.type,n=this._childNodes,a=this._initialSnapshot;this._cachedInitialSnapshot=t.processInitialSnapshot(n,a),this._cachedInitialSnapshotCreated=!0}return this._cachedInitialSnapshot}}),Object.defineProperty(i.prototype,"isRunningAction",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._isRunningAction?!0:this.isRoot?!1:this.parent.isRunningAction()}}),Object.defineProperty(i.prototype,"assertAlive",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=D5();if(!this.isAlive&&n!=="ignore"){var a=this._getAssertAliveError(t);switch(n){case"error":throw new rt(a);case"warn":qS(a)}}}}),Object.defineProperty(i.prototype,"_getAssertAliveError",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.getEscapedPath(!1)||this.pathUponDeath||"",a=t.subpath&&Wl(t.subpath)||"",l=t.actionContext||sv();l&&l.type!=="action"&&l.parentActionEvent&&(l=l.parentActionEvent);var u="";if(l&&l.name!=null){var c=l&&l.context&&U5(l.context)||n;u="".concat(c,".").concat(l.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(a,"', Action: '").concat(u,"'). Either detach nodes first, or don't use objects after removing / replacing them in the tree.")}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.assertAlive({subpath:t}),this._autoUnbox=!1;try{return this._observableInstanceState===Po.CREATED?this.type.getChildNode(this,t):this._childNodes[t]}finally{this._autoUnbox=!0}}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.assertAlive(hc),this._autoUnbox=!1;try{return this._observableInstanceState===Po.CREATED?this.type.getChildren(this):l4(this._childNodes)}finally{this._autoUnbox=!0}}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.type.getChildType(t)}}),Object.defineProperty(i.prototype,"isProtected",{get:function(){return this.root.isProtectionEnabled},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"assertWritable",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.assertAlive(t),!this.isRunningAction()&&this.isProtected)throw new rt("Cannot modify '".concat(this,"', the object is protected and can only be modified by using an action."))}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.type.removeChild(this,t)}}),Object.defineProperty(i.prototype,"unbox",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t&&(this.assertAlive({subpath:t.subpath||t.subpathUponDeath}),this._autoUnbox?t.value:t)}}),Object.defineProperty(i.prototype,"toString",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=(this.isAlive?this.path:this.pathUponDeath)||"<root>",n=this.identifier?"(id: ".concat(this.identifier,")"):"";return"".concat(this.type.name,"@").concat(t).concat(n).concat(this.isAlive?"":" [dead]")}}),Object.defineProperty(i.prototype,"finalizeCreation",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;this.baseFinalizeCreation(function(){var n,a;try{for(var l=wd(t.getChildren()),u=l.next();!u.done;u=l.next()){var c=u.value;c.finalizeCreation()}}catch(h){n={error:h}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(n)throw n.error}}t.fireInternalHook(sr.afterCreationFinalization)})}}),Object.defineProperty(i.prototype,"detach",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(!this.isAlive)throw new rt("Error while detaching, node is not alive.");this.clearParent()}}),Object.defineProperty(i.prototype,"preboot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;this._applyPatches=Cd(this.storedValue,"@APPLY_PATCHES",function(n){n.forEach(function(a){if(!a.path){t.type.applySnapshot(t,a.value);return}var l=gc(a.path),u=a4(t,l.slice(0,-1));u.applyPatchLocally(l[l.length-1],a)})}),this._applySnapshot=Cd(this.storedValue,"@APPLY_SNAPSHOT",function(n){if(n!==t.snapshot)return t.type.applySnapshot(t,n)}),zs(this.storedValue,"$treenode",this),zs(this.storedValue,"toJSON",RS)}}),Object.defineProperty(i.prototype,"die",{enumerable:!1,configurable:!0,writable:!0,value:function(){!this.isAlive||this.state===Lr.DETACHING||(this.aboutToDie(),this.finalizeDeath())}}),Object.defineProperty(i.prototype,"aboutToDie",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._observableInstanceState!==Po.UNINITIALIZED&&(this.getChildren().forEach(function(t){t.aboutToDie()}),this.baseAboutToDie(),this._internalEventsEmit(Ai.Dispose),this._internalEventsClear(Ai.Dispose))}}),Object.defineProperty(i.prototype,"finalizeDeath",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.getChildren().forEach(function(n){n.finalizeDeath()}),this.root.identifierCache.notifyDied(this);var t=this.snapshot;this._snapshotUponDeath=t,this._internalEventsClearAll(),this.baseFinalizeDeath()}}),Object.defineProperty(i.prototype,"onSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._addSnapshotReaction(),this._internalEventsRegister(Ai.Snapshot,t)}}),Object.defineProperty(i.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEventsEmit(Ai.Snapshot,t)}}),Object.defineProperty(i.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsRegister(Ai.Patch,t)}}),Object.defineProperty(i.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this._internalEventsHasSubscribers(Ai.Patch)){var a=n.path.substr(this.path.length)+(t.path?"/"+t.path:""),l=zS({},t,{path:a}),u=ca(YS(l),2),c=u[0],h=u[1];this._internalEventsEmit(Ai.Patch,c,h)}this.parent&&this.parent.emitPatch(t,n)}}),Object.defineProperty(i.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsHas(Ai.Dispose,t)}}),Object.defineProperty(i.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this.hasDisposer(t)){this._internalEventsRegister(Ai.Dispose,t,!0);return}throw new rt("cannot add a disposer when it is already registered for execution")}}),Object.defineProperty(i.prototype,"removeDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._internalEventsHas(Ai.Dispose,t))throw new rt("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister(Ai.Dispose,t)}}),Object.defineProperty(i.prototype,"removeMiddleware",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(this.middlewares){var n=this.middlewares.indexOf(t);n>=0&&this.middlewares.splice(n,1)}}}),Object.defineProperty(i.prototype,"addMiddleWare",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;n===void 0&&(n=!0);var l={handler:t,includeHooks:n};return this.middlewares?this.middlewares.push(l):this.middlewares=[l],function(){a.removeMiddleware(l)}}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){this.assertWritable({subpath:t}),this.createObservableInstanceIfNeeded(),this.type.applyPatchLocally(this,t,n)}}),Object.defineProperty(i.prototype,"_addSnapshotReaction",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;if(!this._hasSnapshotReaction){var n=B3(function(){return t.snapshot},function(a){return t.emitSnapshot(a)},uS);this.addDisposer(n),this._hasSnapshotReaction=!0}}}),Object.defineProperty(i.prototype,"_internalEventsHasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return!!this._internalEvents&&this._internalEvents.hasSubscribers(t)}}),Object.defineProperty(i.prototype,"_internalEventsRegister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){return a===void 0&&(a=!1),this._internalEvents||(this._internalEvents=new c4),this._internalEvents.register(t,n,a)}}),Object.defineProperty(i.prototype,"_internalEventsHas",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return!!this._internalEvents&&this._internalEvents.has(t,n)}}),Object.defineProperty(i.prototype,"_internalEventsUnregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){this._internalEvents&&this._internalEvents.unregister(t,n)}}),Object.defineProperty(i.prototype,"_internalEventsEmit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){for(var n,a=[],l=1;l<arguments.length;l++)a[l-1]=arguments[l];this._internalEvents&&(n=this._internalEvents).emit.apply(n,fa([t],ca(a),!1))}}),Object.defineProperty(i.prototype,"_internalEventsClear",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEvents&&this._internalEvents.clear(t)}}),Object.defineProperty(i.prototype,"_internalEventsClearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this._internalEvents&&this._internalEvents.clearAll()}}),i}($5);yi.prototype.createObservableInstance=Zn(yi.prototype.createObservableInstance);yi.prototype.detach=Zn(yi.prototype.detach);yi.prototype.die=Zn(yi.prototype.die);var W5,Ct;(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"})(Ct||(Ct={}));var Y5="cannotDetermine",cS=Symbol("$type"),Qa=function(){function e(i){Object.defineProperty(this,W5,{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=i}return Object.defineProperty(e.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){return Xa(this,i),this.instantiate(null,"",t,i).value}}),Object.defineProperty(e.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){throw new rt("unimplemented method")}}),Object.defineProperty(e.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(i){return i===this}}),Object.defineProperty(e.prototype,"validate",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=r4(i);if(n){var a=Bd(i);return this.isAssignableFrom(a)?bi():_i(t,i)}return this.isValidSnapshot(i,t)}}),Object.defineProperty(e.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(i){return this.validate(i,[{path:"",type:this}]).length===0}}),Object.defineProperty(e.prototype,"Type",{get:function(){throw new rt("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 rt("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 rt("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 rt("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}();W5=cS;Qa.prototype.create=Zn(Qa.prototype.create);var fc=function(e){_n(i,e);function i(t){var n=e.call(this,t)||this;return Object.defineProperty(n,"identifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),n}return Object.defineProperty(i.prototype,"create",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return t===void 0&&(t=this.getDefaultSnapshot()),e.prototype.create.call(this,t,n)}}),Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.createObservableInstanceIfNeeded(),t.storedValue}}),Object.defineProperty(i.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return!t.identifierAttribute||t.identifier===_c(n[t.identifierAttribute])}}),Object.defineProperty(i.prototype,"tryToReconcileNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return t.isDetaching?!1:t.snapshot===n||tn(n)&&ut(n)===t?!0:t.type===this&&s4(n)&&!tn(n)&&this.isMatchingSnapshotId(t,n)?(t.applySnapshot(n),!0):!1}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this.tryToReconcileNode(t,n);if(u)return t.setParent(a,l),t;if(t.die(),tn(n)&&this.isAssignableFrom(Bd(n))){var c=ut(n);return c.setParent(a,l),c}return this.instantiate(a,l,void 0,n)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),i}(Qa);fc.prototype.create=Zn(fc.prototype.create);var Zs=function(e){_n(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t}}),Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){if(!t.isDetaching&&t.type===this&&t.storedValue===n)return t;var u=this.instantiate(a,l,void 0,n);return t.die(),u}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return null}}),i}(Qa);function cr(e){return typeof e=="object"&&e&&e.isType===!0}var ia=new Map;function fS(e){return function(t,n,a){switch(t.type){case"action":if(!e.filter||e.filter(t)===!0){var l=e.onStart(t);e.onResume(t,l),ia.set(t.id,{call:t,context:l,async:!1});try{var u=n(t);return e.onSuspend(t,l),ia.get(t.id).async===!1&&(ia.delete(t.id),e.onSuccess(t,l,u)),u}catch(h){throw ia.delete(t.id),e.onFail(t,l,h),h}}else return n(t);case"flow_spawn":{var c=ia.get(t.rootId);return c.async=!0,n(t)}case"flow_resume":case"flow_resume_error":{var c=ia.get(t.rootId);e.onResume(t,c.context);try{return n(t)}finally{e.onSuspend(t,c.context)}}case"flow_throw":{var c=ia.get(t.rootId);return ia.delete(t.rootId),e.onFail(t,c.context,t.args[0]),n(t)}case"flow_return":{var c=ia.get(t.rootId);return ia.delete(t.rootId),e.onSuccess(t,c.context,t.args[0]),n(t)}}}}var dS=function(){function e(i,t){Object.defineProperty(this,"hooks",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"call",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"flowsPending",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"running",{enumerable:!0,configurable:!0,writable:!0,value:!0}),i&&i.onStart(t)}return Object.defineProperty(e.prototype,"finish",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this.running&&(this.running=!1,this.hooks&&this.hooks.onFinish(this.call,i))}}),Object.defineProperty(e.prototype,"incFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending++}}),Object.defineProperty(e.prototype,"decFlowsPending",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.flowsPending--}}),Object.defineProperty(e.prototype,"hasFlowsPending",{get:function(){return this.flowsPending>0},enumerable:!1,configurable:!0}),e}();function hS(e){var i=new Map;return function(n,a){var l=n.parentActionEvent?i.get(n.parentActionEvent.id):void 0;if(n.type==="action"){var u=ur(ur({},n),{env:l&&l.call.env,parentCall:l&&l.call}),c=!e.filter||e.filter(u),h=c?e:void 0,b=new dS(h,u);i.set(n.id,b);var _=void 0;try{_=a(n)}catch(O){throw i.delete(n.id),b.finish(O),O}return b.hasFlowsPending||(i.delete(n.id),b.finish()),_}else{if(!l)return a(n);switch(n.type){case"flow_spawn":return l.incFlowsPending(),a(n);case"flow_resume":case"flow_resume_error":return a(n);case"flow_throw":{var k=n.args[0];try{return a(n)}finally{l.decFlowsPending(),l.hasFlowsPending||(i.delete(n.parentActionEvent.id),l.finish(k))}}case"flow_return":try{return a(n)}finally{l.decFlowsPending(),l.hasFlowsPending||(i.delete(n.parentActionEvent.id),l.finish())}}}}}function pS(e,i,t,n){if(n instanceof Date)return{$MST_DATE:n.getTime()};if(pc(n))return n;if(tn(n))return Jh("[MSTNode: ".concat(Bd(n).name,"]"));if(typeof n=="function")return Jh("[function]");if(typeof n=="object"&&!Fs(n)&&!dv(n))return Jh("[object ".concat(n&&n.constructor&&n.constructor.name||"Complex Object","]"));try{return JSON.stringify(n),n}catch(a){return Jh(""+a)}}function gS(e,i){return i&&typeof i=="object"&&"$MST_DATE"in i?new Date(i.$MST_DATE):i}function Jh(e){return{$MST_UNSERIALIZABLE:!0,type:e}}function K5(e,i){lc(function(){hv(i).forEach(function(t){return vS(e,t)})})}function vS(e,i){var t=H5(e,i.path||"");if(!t)throw new rt("Invalid action path: ".concat(i.path||""));var n=ut(t);if(i.name==="@APPLY_PATCHES")return cc.call(null,t,i.args[0]);if(i.name==="@APPLY_SNAPSHOT")return z5.call(null,t,i.args[0]);if(typeof t[i.name]!="function")throw new rt("Action '".concat(i.name,"' does not exist in '").concat(n.path,"'"));return t[i.name].apply(t,i.args?i.args.map(function(a){return gS(n,a)}):[])}function mS(e,i){var t=[],n=function(u){var c=i?i(u,uv()):!0;c&&t.push(u)},a,l={actions:t,get recording(){return!!a},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=X5(e,n))},replay:function(u){K5(u,t)}};return l.resume(),l}function X5(e,i,t){return t===void 0&&(t=!1),J5(e,function(a,l){if(a.type==="action"&&a.id===a.rootId){var u=ut(a.context),c={name:a.name,path:i4(ut(e),u),args:a.args.map(function(b,_){return pS(u,a.name,_,b)})};if(t){var h=l(a);return i(c),h}else return i(c),l(a)}else return l(a)})}var yS=1,Sd;function sv(){return Sd}function Z5(){return yS++}function Rg(e,i){var t=ut(e.context);e.type==="action"&&t.assertAlive({actionContext:e});var n=t._isRunningAction;t._isRunningAction=!0;var a=Sd;Sd=e;try{return wS(t,e,i)}finally{Sd=a,t._isRunningAction=n}}function Q5(e){if(e)return e.type==="action"?e:e.parentActionEvent}function Cd(e,i,t){var n=function(){var a=Z5(),l=Sd,u=Q5(l);return Rg({type:"action",name:i,id:a,args:f4(arguments),context:e,tree:B5(e),rootId:l?l.rootId:a,parentId:l?l.id:0,allParentIds:l?fa(fa([],ca(l.allParentIds),!1),[l.id],!1):[],parentEvent:l,parentActionEvent:u},t)};return n._isMSTAction=!0,n._isFlowAction=t._isFlowAction,n}function J5(e,i,t){t===void 0&&(t=!0);var n=ut(e);return n.addMiddleWare(i,t)}function bS(e,i,t){t===void 0&&(t=!0);var n={handler:e,includeHooks:t};return i.$mst_middleware=i.$mst_middleware||[],i.$mst_middleware.push(n),i}var _S=function(){function e(i,t){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:[]}),t.$mst_middleware&&this.middlewares.push(t.$mst_middleware);for(var n=i;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 i=this.middlewares[this.arrayIndex];if(i){var t=i[this.inArrayIndex++];return t||(this.arrayIndex++,this.inArrayIndex=0,this.getNextMiddleware())}}}),e}();function wS(e,i,t){var n=new _S(e,t);if(n.isEmpty)return Zn(t).apply(null,i.args);var a=null;function l(u){var c=n.getNextMiddleware(),h=c&&c.handler;if(!h)return Zn(t).apply(null,u.args);if(!c.includeHooks&&sr[u.name])return l(u);function b(k,O){a=l(k),O&&(a=O(a))}function _(k){a=k}return h(u,b,_),a}return l(i)}function uv(){for(var e=sv();e&&e.type!=="action";)e=e.parentActionEvent;return e}function e4(e,i,t){for(var n=typeof i=="number"?i:i.id,a=t?e:e.parentActionEvent;a;){if(a.id===n)return!0;a=a.parentActionEvent}return!1}function SS(e,i){return e4(e,i,!1)}function ES(e,i){return e4(e,i,!0)}function OS(e){try{return JSON.stringify(e)}catch(i){return"<Unserializable: ".concat(i,">")}}function t4(e){return typeof e=="function"?"<function".concat(e.name?" "+e.name:"",">"):tn(e)?"<".concat(e,">"):"`".concat(OS(e),"`")}function xS(e){return e.length<280?e:"".concat(e.substring(0,272),"......").concat(e.substring(e.length-8))}function PS(e){var i=e.value,t=e.context[e.context.length-1].type,n=e.context.map(function(c){var h=c.path;return h}).filter(function(c){return c.length>0}).join("/"),a=n.length>0?'at path "/'.concat(n,'" '):"",l=tn(i)?"value of type ".concat(ut(i).type.name,":"):pc(i)?"value":"snapshot",u=t&&tn(i)&&t.is(ut(i).snapshot);return"".concat(a).concat(l," ").concat(t4(i)," is not assignable ").concat(t?"to type: `".concat(t.name,"`"):"")+(e.message?" (".concat(e.message,")"):"")+(t?O4(t)||pc(i)?".":", expected an instance of `".concat(t.name,"` or a snapshot like `").concat(t.describe(),"` instead.")+(u?" (Note that a snapshot of the provided value is compatible with the targeted type)":""):".")}function cv(e,i,t){return e.concat([{path:i,type:t}])}function bi(){return dc}function _i(e,i,t){return[{context:e,value:i,message:t}]}function zp(e){return e.reduce(function(i,t){return i.concat(t)},[])}function Xa(e,i){HS()&&n4(e,i)}function n4(e,i){var t=e.validate(i,[{path:"",type:e}]);if(t.length>0)throw new rt(CS(e,i,t))}function CS(e,i,t){if(t.length!==0)return"Error while converting ".concat(xS(t4(i))," to `").concat(e.name,`\`:
|
|
93
|
-
|
|
94
|
-
`)+t.map(PS).join(`
|
|
95
|
-
`)}var kS=0,TS=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:kS++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:ln.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:ln.map()})}return Object.defineProperty(e.prototype,"updateLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.lastCacheModificationPerId.get(i);this.lastCacheModificationPerId.set(i,t===void 0?1:t+1)}}),Object.defineProperty(e.prototype,"getLastCacheModificationPerId",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.lastCacheModificationPerId.get(i)||0;return"".concat(this.cacheId,"-").concat(t)}}),Object.defineProperty(e.prototype,"addNodeToCache",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){if(t===void 0&&(t=!0),i.identifierAttribute){var n=i.identifier;this.cache.has(n)||this.cache.set(n,ln.array([],Bp));var a=this.cache.get(n);if(a.indexOf(i)!==-1)throw new rt("Already registered");a.push(i),t&&this.updateLastCacheModificationPerId(n)}}}),Object.defineProperty(e.prototype,"mergeCache",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this;Hg(i.identifierCache.cache).forEach(function(n){return n.forEach(function(a){t.addNodeToCache(a)})})}}),Object.defineProperty(e.prototype,"notifyDied",{enumerable:!1,configurable:!0,writable:!0,value:function(i){if(i.identifierAttribute){var t=i.identifier,n=this.cache.get(t);n&&(n.remove(i),n.length||this.cache.delete(t),this.updateLastCacheModificationPerId(i.identifier))}}}),Object.defineProperty(e.prototype,"splitCache",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this,n=new e,a=i.path+"/";return Z3(this.cache).forEach(function(l){for(var u=ca(l,2),c=u[0],h=u[1],b=!1,_=h.length-1;_>=0;_--){var k=h[_];(k===i||k.path.indexOf(a)===0)&&(n.addNodeToCache(k,!1),h.splice(_,1),h.length||t.cache.delete(c),b=!0)}b&&t.updateLastCacheModificationPerId(c)}),n}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=this.cache.get(t);return n?n.some(function(a){return i.isAssignableFrom(a.type)}):!1}}),Object.defineProperty(e.prototype,"resolve",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=this.cache.get(t);if(!n)return null;var a=n.filter(function(l){return i.isAssignableFrom(l.type)});switch(a.length){case 0:return null;case 1:return a[0];default:throw new rt("Cannot resolve a reference to type '".concat(i.name,"' with id: '").concat(t,"' unambigously, there are multiple candidates: ").concat(a.map(function(l){return l.path}).join(", ")))}}}),e}();function fv(e,i,t,n,a){var l=r4(a);if(l){if(l.parent)throw new rt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '".concat(i?i.path:"","/").concat(t,"', but it lives already at '").concat(l.path,"'"));return i&&l.setParent(i,t),l}return new yi(e,i,t,n,a)}function ns(e,i,t,n,a){return new Pd(e,i,t,n,a)}function AS(e){return e instanceof Pd||e instanceof yi}var Lr;(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.CREATED=1]="CREATED",e[e.FINALIZED=2]="FINALIZED",e[e.DETACHING=3]="DETACHING",e[e.DEAD=4]="DEAD"})(Lr||(Lr={}));function tn(e){return!!(e&&e.$treenode)}function ut(e){if(!tn(e))throw new rt("Value ".concat(e," is no MST Node"));return e.$treenode}function r4(e){return e&&e.$treenode||null}function RS(){return ut(this).snapshot}var MS=function(e){return".."};function i4(e,i){if(e.root!==i.root)throw new rt("Cannot calculate relative path: objects '".concat(e,"' and '").concat(i,"' are not part of the same object tree"));for(var t=gc(e.path),n=gc(i.path),a=0;a<t.length&&t[a]===n[a];a++);return t.slice(a).map(MS).join("/")+mp(n.slice(a))}function o4(e,i,t){return t===void 0&&(t=!0),a4(e,gc(i),t)}function a4(e,i,t){t===void 0&&(t=!0);var n=e;try{for(var a=0;a<i.length;a++){var l=i[a];if(l===".."){if(n=n.parent,n)continue}else{if(l===".")continue;if(n){if(n instanceof Pd){var u=n.value;tn(u)&&(n=ut(u))}if(n instanceof yi){var c=n.getChildType(l);if(c&&(n=n.getChildNode(l),n))continue}}}throw new rt("Could not resolve '".concat(l,"' in path '").concat(mp(i.slice(0,a))||"/","' while resolving '").concat(mp(i),"'"))}}catch(h){if(!t)return;throw h}return n}function l4(e){if(!e)return dc;var i=Object.keys(e);if(!i.length)return dc;var t=new Array(i.length);return i.forEach(function(n,a){t[a]=e[n]}),t}function LS(e){return d4(),h4(e)}var NS=Object.toString(),dc=Object.freeze([]),hc=Object.freeze({}),Bp=k3().useProxies?{deep:!1}:{deep:!1,proxy:!1};Object.freeze(Bp);var rt=function(e){_n(i,e);function i(t){return t===void 0&&(t="Illegal state"),e.call(this,"[mobx-state-tree] ".concat(t))||this}return i}(Error);function IS(e){return e}var DS=Number.isInteger;function jS(e){return Number(e)===e&&e%1!==0}function FS(e){return Number.isFinite(e)}function dv(e){return Array.isArray(e)||ri(e)}function hv(e){return e?dv(e)?e:[e]:dc}function zS(e){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];for(var n=0;n<i.length;n++){var a=i[n];for(var l in a)e[l]=a[l]}return e}function Fs(e){var i;if(e===null||typeof e!="object")return!1;var t=Object.getPrototypeOf(e);return t==null?!0:((i=t.constructor)===null||i===void 0?void 0:i.toString())===NS}function s4(e){return e!==null&&typeof e=="object"&&!(e instanceof Date)&&!(e instanceof RegExp)}function pc(e,i){return i===void 0&&(i=!0),e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"||i&&e instanceof Date}function u4(e){return typeof e!="function"}function BS(e,i,t){_r(e)?Vg(e,i,t):Object.defineProperty(e,i,t)}function zs(e,i,t){BS(e,i,{enumerable:!1,writable:!1,configurable:!0,value:t})}var US=function(){function e(){Object.defineProperty(this,"handlers",{enumerable:!0,configurable:!0,writable:!0,value:[]})}return Object.defineProperty(e.prototype,"hasSubscribers",{get:function(){return this.handlers.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=this;return t===void 0&&(t=!1),t?this.handlers.unshift(i):this.handlers.push(i),function(){n.unregister(i)}}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(i){return this.handlers.indexOf(i)>=0}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.handlers.indexOf(i);t>=0&&this.handlers.splice(t,1)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.handlers.length=0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(){for(var i=[],t=0;t<arguments.length;t++)i[t]=arguments[t];var n=this.handlers.slice();n.forEach(function(a){return a.apply(void 0,fa([],ca(i),!1))})}}),e}(),c4=function(){function e(){Object.defineProperty(this,"eventHandlers",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}return Object.defineProperty(e.prototype,"hasSubscribers",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=this.eventHandlers&&this.eventHandlers[i];return!!t&&t.hasSubscribers}}),Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t,n){n===void 0&&(n=!1),this.eventHandlers||(this.eventHandlers={});var a=this.eventHandlers[i];return a||(a=this.eventHandlers[i]=new US),a.register(t,n)}}),Object.defineProperty(e.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=this.eventHandlers&&this.eventHandlers[i];return!!n&&n.has(t)}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(i,t){var n=this.eventHandlers&&this.eventHandlers[i];n&&n.unregister(t)}}),Object.defineProperty(e.prototype,"clear",{enumerable:!1,configurable:!0,writable:!0,value:function(i){this.eventHandlers&&delete this.eventHandlers[i]}}),Object.defineProperty(e.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.eventHandlers=void 0}}),Object.defineProperty(e.prototype,"emit",{enumerable:!1,configurable:!0,writable:!0,value:function(i){for(var t,n=[],a=1;a<arguments.length;a++)n[a-1]=arguments[a];var l=this.eventHandlers&&this.eventHandlers[i];l&&(t=l).emit.apply(t,fa([],ca(n),!1))}}),e}();function f4(e){for(var i=new Array(e.length),t=0;t<e.length;t++)i[t]=e[t];return i}function X0(e,i){return e.indexOf(i)===0}var d4=function(e,i){};d4.ids={};function qS(e){console.warn(new Error("[mobx-state-tree] ".concat(e)))}function HS(){return typeof process<"u"&&l2&&l2.ENABLE_TYPE_CHECK==="true"}function Z0(e){typeof queueMicrotask=="function"?queueMicrotask(e):typeof setImmediate=="function"?setImmediate(e):setTimeout(e,1)}function h4(e){return WS(e.name,e)}function GS(e){return e}function VS(e){return function(){var i,t=[];for(i=0;i<arguments.length;i++)t[i]=arguments[i];return j5(this,function(n){switch(n.label){case 0:return[4,e.apply(void 0,fa([],ca(t),!1))];case 1:return[2,n.sent()]}})}}function $S(e){return j5(this,function(i){switch(i.label){case 0:return[4,e];case 1:return[2,i.sent()]}})}function WS(e,i){var t=function(){var a=Z5(),l=sv();if(!l)throw new rt("a mst flow must always have a parent context");var u=Q5(l);if(!u)throw new rt("a mst flow must always have a parent action context");var c={name:e,id:a,tree:l.tree,context:l.context,parentId:l.id,allParentIds:fa(fa([],ca(l.allParentIds),!1),[l.id],!1),rootId:l.rootId,parentEvent:l,parentActionEvent:u},h=arguments;function b(_,k,O){return _.$mst_middleware=t.$mst_middleware,Rg(ur(ur({},c),{type:k,args:[O]}),_)}return new Promise(function(_,k){var O,v=function(){O=i.apply(null,arguments),x(void 0)};v.$mst_middleware=t.$mst_middleware,Rg(ur(ur({},c),{type:"flow_spawn",args:f4(h)}),v);function x(P){var d;try{var m=b(function(y){d=O.next(y)},"flow_resume",P);m instanceof Error&&(d=O.throw(m))}catch(y){Z0(function(){b(function(w){k(y)},"flow_throw",y)});return}p(d)}function g(P){var d;try{b(function(m){d=O.throw(m)},"flow_resume_error",P)}catch(m){Z0(function(){b(function(y){k(m)},"flow_throw",m)});return}p(d)}function p(P){if(P.done){Z0(function(){b(function(d){_(d)},"flow_return",P.value)});return}if(!P.value||typeof P.value.then!="function")throw new rt("Only promises can be yielded to `async`, got: "+P);return P.value.then(x,g)}})};return t._isFlowAction=!0,t}function YS(e){if(!("oldValue"in e))throw new rt("Patches without `oldValue` field cannot be inversed");return[KS(e),XS(e)]}function KS(e){switch(e.op){case"add":return{op:"add",path:e.path,value:e.value};case"remove":return{op:"remove",path:e.path};case"replace":return{op:"replace",path:e.path,value:e.value}}}function XS(e){switch(e.op){case"add":return{op:"remove",path:e.path};case"remove":return{op:"add",path:e.path,value:e.oldValue};case"replace":return{op:"replace",path:e.path,value:e.oldValue}}}function ZS(e){return typeof e=="number"}function Wl(e){return ZS(e)===!0?""+e:e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function p4(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function mp(e){if(e.length===0)return"";var i=function(t){return t.map(Wl).join("/")};return e[0]==="."||e[0]===".."?i(e):"/"+i(e)}function gc(e){var i=e.split("/").map(p4),t=e===""||e==="."||e===".."||X0(e,"/")||X0(e,"./")||X0(e,"../");if(!t)throw new rt("a json path must be either rooted, empty or relative, but got '".concat(e,"'"));return i[0]===""&&i.shift(),i}var Q0=Symbol("$preProcessorFailed"),QS=function(e){_n(i,e);function i(t,n,a){var l=e.call(this,a||t.name)||this;return Object.defineProperty(l,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(l,"_processors",{enumerable:!0,configurable:!0,writable:!0,value:n}),l}return Object.defineProperty(i.prototype,"flags",{get:function(){return this._subtype.flags|Ct.SnapshotProcessor},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"snapshotProcessor(".concat(this._subtype.describe(),")")}}),Object.defineProperty(i.prototype,"preProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._processors.preProcessor?this._processors.preProcessor.call(null,t):t}}),Object.defineProperty(i.prototype,"preProcessSnapshotSafe",{enumerable:!1,configurable:!0,writable:!0,value:function(t){try{return this.preProcessSnapshot(t)}catch{return Q0}}}),Object.defineProperty(i.prototype,"postProcessSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this._processors.postProcessor?this._processors.postProcessor.call(null,t,n.storedValue):t}}),Object.defineProperty(i.prototype,"_fixNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;JS(t.type,this,"create"),t instanceof yi&&(t.hasSnapshotPostProcessor=!!this._processors.postProcessor);var a=t.getSnapshot;t.getSnapshot=function(){return n.postProcessSnapshot(a.call(t),t)},P4(this._subtype)||(t.getReconciliationType=function(){return n})}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=tn(l)?l:this.preProcessSnapshot(l),c=this._subtype.instantiate(t,n,a,u);return this._fixNode(c),c}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this._subtype.reconcile(t,tn(n)?n:this.preProcessSnapshot(n),a,l);return u!==t&&this._fixNode(u),u}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n=!0);var a=this._subtype.getSnapshot(t);return n?this.postProcessSnapshot(a,t):a}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.preProcessSnapshotSafe(t);return a===Q0?_i(n,t,"Failed to preprocess value"):this._subtype.validate(a,n)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),Object.defineProperty(i.prototype,"is",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=cr(t)?this._subtype:tn(t)?av(t,!1):this.preProcessSnapshotSafe(t);return n===Q0?!1:this._subtype.validate(n,[{path:"",type:this._subtype}]).length===0}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"isMatchingSnapshotId",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!(this._subtype instanceof fc))return!1;var a=this.preProcessSnapshot(n);return this._subtype.isMatchingSnapshotId(t,a)}}),i}(Qa);function JS(e,i){for(var t,n,a=[],l=2;l<arguments.length;l++)a[l-2]=arguments[l];try{for(var u=wd(a),c=u.next();!c.done;c=u.next()){var h=c.value;e[h]=i[h].bind(i)}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}function eE(e,i,t){return new QS(e,i,t)}var s2="Map.put can only be used to store complex values that have an identifier type attribute";function g4(e,i){var t,n,a=e.getSubTypes();if(a===Y5)return!1;if(a){var l=hv(a);try{for(var u=wd(l),c=u.next();!c.done;c=u.next()){var h=c.value;if(!g4(h,i))return!1}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}return e instanceof kd&&i.push(e),!0}var Gl;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.YES=1]="YES",e[e.NO=2]="NO"})(Gl||(Gl={}));var tE=function(e){_n(i,e);function i(t,n){return e.call(this,t,ln.ref.enhancer,n)||this}return Object.defineProperty(i.prototype,"get",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.get.call(this,""+t)}}),Object.defineProperty(i.prototype,"has",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.has.call(this,""+t)}}),Object.defineProperty(i.prototype,"delete",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return e.prototype.delete.call(this,""+t)}}),Object.defineProperty(i.prototype,"set",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return e.prototype.set.call(this,""+t,n)}}),Object.defineProperty(i.prototype,"put",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!t)throw new rt("Map.put cannot be used to set empty values");if(tn(t)){var n=ut(t);if(n.identifier===null)throw new rt(s2);return this.set(n.identifier,t),t}else if(s4(t)){var a=ut(this),l=a.type;if(l.identifierMode!==Gl.YES)throw new rt(s2);var u=l.mapIdentifierAttribute,c=t[u];if(!gv(c)){var h=this.put(l.getChildType().create(t,a.environment));return this.put(av(h))}var b=_c(c);return this.set(b,t),this.get(b)}else throw new rt("Map.put can only be used to store complex values")}}),i}(Mp),yp=function(e){_n(i,e);function i(t,n,a){a===void 0&&(a=[]);var l=e.call(this,t)||this;return Object.defineProperty(l,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(l,"identifierMode",{enumerable:!0,configurable:!0,writable:!0,value:Gl.UNKNOWN}),Object.defineProperty(l,"mapIdentifierAttribute",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Map}),Object.defineProperty(l,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),l._determineIdentifierMode(),l.hookInitializers=a,l}return Object.defineProperty(i.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new i(this.name,this._subType,n)}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this._determineIdentifierMode(),fv(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"_determineIdentifierMode",{enumerable:!1,configurable:!0,writable:!0,value:function(){if(this.identifierMode===Gl.UNKNOWN){var t=[];if(g4(this._subType,t)){var n=t.reduce(function(a,l){if(!l.identifierAttribute)return a;if(a&&a!==l.identifierAttribute)throw new rt("The objects in a map should all have the same identifier attribute, expected '".concat(a,"', but child of type '").concat(l.name,"' declared attribute '").concat(l.identifierAttribute,"' as identifier"));return l.identifierAttribute},void 0);n?(this.identifierMode=Gl.YES,this.mapIdentifierAttribute=n):this.identifierMode=Gl.NO}}}}),Object.defineProperty(i.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n={});var a=t.type._subType,l={};return Object.keys(n).forEach(function(u){l[u]=a.instantiate(t,u,void 0,n[u])}),l}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return new tE(t,this.name)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){qg(n,t.unbox);var a=t.type;a.hookInitializers.forEach(function(l){var u=l(n);Object.keys(u).forEach(function(c){var h=u[c],b=Cd(n,c,h);zs(n,c,b)})}),Tp(n,this.willChange),Rp(n,this.didChange)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return Hg(t.storedValue)}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=t.storedValue.get(""+n);if(!a)throw new rt("Not a child "+n);return a}}),Object.defineProperty(i.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ut(t.object),a=t.name;n.assertWritable({subpath:a});var l=n.type,u=l._subType;switch(t.type){case"update":{var c=t.newValue,h=t.object.get(a);if(c===h)return null;Xa(u,c),t.newValue=u.reconcile(n.getChildNode(a),t.newValue,n,a),l.processIdentifier(a,t.newValue)}break;case"add":Xa(u,t.newValue),t.newValue=u.instantiate(n,a,void 0,t.newValue),l.processIdentifier(a,t.newValue);break}return t}}),Object.defineProperty(i.prototype,"processIdentifier",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this.identifierMode===Gl.YES&&n instanceof yi){var a=n.identifier;if(a!==t)throw new rt("A map of objects containing an identifier should always store the object under their own identifier. Trying to store key '".concat(a,"', but expected: '").concat(t,"'"))}}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return t.getChildren().forEach(function(a){n[a.subpath]=a.snapshot}),n}}),Object.defineProperty(i.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return Object.keys(t).forEach(function(a){n[a]=t[a].getSnapshot()}),n}}),Object.defineProperty(i.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ut(t.object);switch(t.type){case"update":return void n.emitPatch({op:"replace",path:Wl(t.name),value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},n);case"add":return void n.emitPatch({op:"add",path:Wl(t.name),value:t.newValue.snapshot,oldValue:void 0},n);case"delete":var a=t.oldValue.snapshot;return t.oldValue.die(),void n.emitPatch({op:"remove",path:Wl(t.name),oldValue:a},n)}}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var l=t.storedValue;switch(a.op){case"add":case"replace":l.set(n,a.value);break;case"remove":l.delete(n);break}}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Xa(this,n);var a=t.storedValue,l={};if(Array.from(a.keys()).forEach(function(c){l[c]=!1}),n)for(var u in n)a.set(u,n[u]),l[""+u]=!0;Object.keys(l).forEach(function(c){l[c]===!1&&a.delete(c)})}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;return Fs(t)?zp(Object.keys(t).map(function(l){return a._subType.validate(t[l],cv(n,l,a._subType))})):_i(n,t,"Value is not a plain object")}}),Object.defineProperty(i.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return hc}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue.delete(n)}}),i}(fc);yp.prototype.applySnapshot=Zn(yp.prototype.applySnapshot);function nE(e){return new yp("Map<string, ".concat(e.name,">"),e)}function rE(e){return cr(e)&&(e.flags&Ct.Map)>0}var bp=function(e){_n(i,e);function i(t,n,a){a===void 0&&(a=[]);var l=e.call(this,t)||this;return Object.defineProperty(l,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(l,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Array}),Object.defineProperty(l,"hookInitializers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),l.hookInitializers=a,l}return Object.defineProperty(i.prototype,"hooks",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.hookInitializers.length>0?this.hookInitializers.concat(t):[t];return new i(this.name,this._subType,n)}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return fv(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n=[]);var a=t.type._subType,l={};return n.forEach(function(u,c){var h=""+c;l[h]=a.instantiate(t,h,void 0,u)}),l}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ur(ur({},Bp),{name:this.name});return ln.array(l4(t),n)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Mo(n).dehancer=t.unbox;var a=t.type;a.hookInitializers.forEach(function(l){var u=l(n);Object.keys(u).forEach(function(c){var h=u[c],b=Cd(n,c,h);zs(n,c,b)})}),Tp(n,this.willChange),Rp(n,this.didChange)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue.slice()}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=Number(n);if(a<t.storedValue.length)return t.storedValue[a];throw new rt("Not a child: "+n)}}),Object.defineProperty(i.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ut(t.object);n.assertWritable({subpath:""+t.index});var a=n.type._subType,l=n.getChildren();switch(t.type){case"update":{if(t.newValue===t.object[t.index])return null;var u=u2(n,a,[l[t.index]],[t.newValue],[t.index]);if(!u)return null;t.newValue=u[0]}break;case"splice":{var c=t.index,h=t.removedCount,b=t.added,_=u2(n,a,l.slice(c,c+h),b,b.map(function(O,v){return c+v}));if(!_)return null;t.added=_;for(var k=c+h;k<l.length;k++)l[k].setParent(n,""+(k+b.length-h))}break}return t}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.getChildren().map(function(n){return n.snapshot})}}),Object.defineProperty(i.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=[];return Object.keys(t).forEach(function(a){n.push(t[a].getSnapshot())}),n}}),Object.defineProperty(i.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ut(t.object);switch(t.type){case"update":return void n.emitPatch({op:"replace",path:""+t.index,value:t.newValue.snapshot,oldValue:t.oldValue?t.oldValue.snapshot:void 0},n);case"splice":if(t.removedCount&&t.addedCount===t.object.length)return void n.emitPatch({op:"replace",path:"",value:n.snapshot,oldValue:t.removed.map(function(l){return l.snapshot})},n);for(var a=t.removedCount-1;a>=0;a--)n.emitPatch({op:"remove",path:""+(t.index+a),oldValue:t.removed[a].snapshot},n);for(var a=0;a<t.addedCount;a++)n.emitPatch({op:"add",path:""+(t.index+a),value:t.added[a].snapshot,oldValue:void 0},n);return}}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var l=t.storedValue,u=n==="-"?l.length:Number(n);switch(a.op){case"replace":l[u]=a.value;break;case"add":l.splice(u,0,a.value);break;case"remove":l.splice(u,1);break}}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Xa(this,n);var a=t.storedValue;a.replace(n)}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subType}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;return dv(t)?zp(t.map(function(l,u){return a._subType.validate(l,cv(n,""+u,a._subType))})):_i(n,t,"Value is not an array")}}),Object.defineProperty(i.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return dc}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue.splice(Number(n),1)}}),i}(fc);bp.prototype.applySnapshot=Zn(bp.prototype.applySnapshot);function iE(e){return new bp("".concat(e.name,"[]"),e)}function u2(e,i,t,n,a){for(var l=!0,u=0;;u++){var c=u<=n.length-1,h=t[u],b=c?n[u]:void 0,_=""+a[u];if(AS(b)&&(b=b.storedValue),!h&&!c)break;if(!c)l=!1,t.splice(u,1),h instanceof yi&&h.createObservableInstanceIfNeeded(),h.die(),u--;else if(h)if(c2(h,b))t[u]=J0(i,e,_,b,h);else{for(var O=void 0,v=u;v<t.length;v++)if(c2(t[v],b)){O=t.splice(v,1)[0];break}l=!1;var k=J0(i,e,_,b,O);t.splice(u,0,k)}else{if(tn(b)&&ut(b).parent===e)throw new rt("Cannot add an object to a state tree if it is already part of the same or another state tree. Tried to assign an object to '".concat(e.path,"/").concat(_,"', but it lives already at '").concat(ut(b).path,"'"));l=!1;var k=J0(i,e,_,b);t.splice(u,0,k)}}return l?null:t}function J0(e,i,t,n,a){Xa(e,n);function l(){if(tn(n)){var c=ut(n);if(c.assertAlive(hc),c.parent!==null&&c.parent===i)return c.setParent(i,t),c}return a?e.reconcile(a,n,i,t):e.instantiate(i,t,void 0,n)}var u=l();return a&&a!==u&&(a instanceof yi&&a.createObservableInstanceIfNeeded(),a.die()),u}function c2(e,i){if(!e.isAlive)return!1;if(tn(i)){var t=ut(i);return t.isAlive&&t===e}if(e.snapshot===i)return!0;if(!(e instanceof yi))return!1;var n=e.getReconciliationType();return e.identifier!==null&&e.identifierAttribute&&Fs(i)&&n.is(i)&&n.isMatchingSnapshotId(e,i)}function oE(e){return cr(e)&&(e.flags&Ct.Array)>0}var f2="preProcessSnapshot",d2="postProcessSnapshot";function aE(){return ut(this).toString()}var h2={name:"AnonymousModel",properties:{},initializers:dc};function lE(e){var i=Object.keys(e),t=new Set;return i.forEach(function(n){if(t.has(n))throw new rt("".concat(n," is declared twice in the model. Model should not contain the same keys"));t.add(n)}),i.reduce(function(n,a){if(a in sr)throw new rt("Hook '".concat(a,"' was defined as property. Hooks should be defined as part of the actions"));var l=Object.getOwnPropertyDescriptor(e,a);if("get"in l)throw new rt("Getters are not supported as properties. Please use views instead");var u=l.value;if(u==null)throw new rt("The default value of an attribute cannot be null or undefined as the type cannot be inferred. Did you mean `types.maybe(someType)`?");if(pc(u))n[a]=Bs(hE(u),u);else if(u instanceof yp)n[a]=Bs(u,{});else if(u instanceof bp)n[a]=Bs(u,[]);else if(!cr(u))throw new rt("Invalid type definition for property '".concat(a,"', cannot infer a type from a value like '").concat(u,"' (").concat(typeof u,")"));return n},ur({},e))}var kd=function(e){_n(i,e);function i(t){var n=e.call(this,t.name||h2.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Object}),Object.defineProperty(n,"initializers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"properties",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"preProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"postProcessor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"propertyNames",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"named",{enumerable:!0,configurable:!0,writable:!0,value:function(a){return n.cloneAndEnhance({name:a})}}),Object.defineProperty(n,"props",{enumerable:!0,configurable:!0,writable:!0,value:function(a){return n.cloneAndEnhance({properties:a})}}),Object.defineProperty(n,"preProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(a){var l=n.preProcessor;return l?n.cloneAndEnhance({preProcessor:function(u){return l(a(u))}}):n.cloneAndEnhance({preProcessor:a})}}),Object.defineProperty(n,"postProcessSnapshot",{enumerable:!0,configurable:!0,writable:!0,value:function(a){var l=n.postProcessor;return l?n.cloneAndEnhance({postProcessor:function(u){return a(l(u))}}):n.cloneAndEnhance({postProcessor:a})}}),Object.assign(n,h2,t),n.properties=lE(n.properties),n.properties,n.propertyNames=Object.keys(n.properties),n.identifierAttribute=n._getIdentifierAttribute(),n}return Object.defineProperty(i.prototype,"_getIdentifierAttribute",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=void 0;return this.forAllProps(function(n,a){if(a.flags&Ct.Identifier){if(t)throw new rt("Cannot define property '".concat(n,"' as object identifier, property '").concat(t,"' is already defined as identifier property"));t=n}}),t}}),Object.defineProperty(i.prototype,"cloneAndEnhance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return new i({name:t.name||this.name,properties:Object.assign({},this.properties,t.properties),initializers:this.initializers.concat(t.initializers||[]),preProcessor:t.preProcessor||this.preProcessor,postProcessor:t.postProcessor||this.postProcessor})}}),Object.defineProperty(i.prototype,"actions",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(l){return n.instantiateActions(l,t(l)),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"instantiateActions",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!Fs(n))throw new rt("actions initializer should return a plain object containing actions");Object.keys(n).forEach(function(a){if(a===f2)throw new rt("Cannot define action '".concat(f2,"', it should be defined using 'type.preProcessSnapshot(fn)' instead"));if(a===d2)throw new rt("Cannot define action '".concat(d2,"', it should be defined using 'type.postProcessSnapshot(fn)' instead"));var l=n[a],u=t[a];if(a in sr&&u){var c=l;l=function(){u.apply(null,arguments),c.apply(null,arguments)}}var h=l.$mst_middleware,b=l.bind(n);b._isFlowAction=l._isFlowAction||!1,b.$mst_middleware=h;var _=Cd(t,a,b);n[a]=_,zs(t,a,_)})}}),Object.defineProperty(i.prototype,"volatile",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;if(typeof t!="function")throw new rt("You passed an ".concat(typeof t," to volatile state as an argument, when function is expected"));var a=function(l){return n.instantiateVolatileState(l,t(l)),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"instantiateVolatileState",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!Fs(n))throw new rt("volatile state initializer should return a plain object containing state");Gg(t,n)}}),Object.defineProperty(i.prototype,"extend",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(l){var u=t(l),c=u.actions,h=u.views,b=u.state,_=L7(u,["actions","views","state"]);for(var k in _)throw new rt("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '".concat(k,"'"));return b&&n.instantiateVolatileState(l,b),h&&n.instantiateViews(l,h),c&&n.instantiateActions(l,c),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"views",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=function(l){return n.instantiateViews(l,t(l)),l};return this.cloneAndEnhance({initializers:[a]})}}),Object.defineProperty(i.prototype,"instantiateViews",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(!Fs(n))throw new rt("views initializer should return a plain object containing views");Object.getOwnPropertyNames(n).forEach(function(a){var l,u=Object.getOwnPropertyDescriptor(n,a);if("get"in u)Vg(t,a,u),$g(t,(l={},l[a]=$s,l));else if(typeof u.value=="function")zs(t,a,u.value);else throw new rt("A view member should either be a function or getter based property")})}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=tn(l)?l:this.applySnapshotPreProcessor(l);return fv(this,t,n,a,u)}}),Object.defineProperty(i.prototype,"initializeChildNodes",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){n===void 0&&(n={});var a=t.type,l={};return a.forAllProps(function(u,c){l[u]=c.instantiate(t,u,void 0,n[u])}),l}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ur(ur({},Bp),{name:this.name});return ln.object(t,hc,n)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){zs(n,"toString",aE),this.forAllProps(function(a){qg(n,a,t.unbox)}),this.initializers.reduce(function(a,l){return l(a)},n),Tp(n,this.willChange),Rp(n,this.didChange)}}),Object.defineProperty(i.prototype,"willChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t,a=ut(n.object),l=n.name;a.assertWritable({subpath:l});var u=a.type.properties[l];return u&&(Xa(u,n.newValue),n.newValue=u.reconcile(a.getChildNode(l),n.newValue,a,l)),n}}),Object.defineProperty(i.prototype,"didChange",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t,a=ut(n.object),l=a.type.properties[n.name];if(l){var u=n.oldValue?n.oldValue.snapshot:void 0;a.emitPatch({op:"replace",path:Wl(n.name),value:n.newValue.snapshot,oldValue:u},a)}}}),Object.defineProperty(i.prototype,"getChildren",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,a=[];return this.forAllProps(function(l){a.push(n.getChildNode(t,l))}),a}}),Object.defineProperty(i.prototype,"getChildNode",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a;if(!(n in this.properties))throw new rt("Not a value property: "+n);var l=Mo(t.storedValue,n),u=(a=l.raw)===null||a===void 0?void 0:a.call(l);if(!u)throw new rt("Node not available for property "+n);return u}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this;n===void 0&&(n=!0);var l={};return this.forAllProps(function(u,c){try{var h=ua(t.storedValue,u);h.reportObserved()}catch{throw new rt("".concat(u," property is declared twice"))}l[u]=a.getChildNode(t,u).snapshot}),n?this.applySnapshotPostProcessor(l):l}}),Object.defineProperty(i.prototype,"processInitialSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n={};return Object.keys(t).forEach(function(a){n[a]=t[a].getSnapshot()}),this.applySnapshotPostProcessor(n)}}),Object.defineProperty(i.prototype,"applyPatchLocally",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){if(!(a.op==="replace"||a.op==="add"))throw new rt("object does not support operation ".concat(a.op));t.storedValue[n]=a.value}}),Object.defineProperty(i.prototype,"applySnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){Xa(this,n);var a=this.applySnapshotPreProcessor(n);this.forAllProps(function(l){t.storedValue[l]=a[l]})}}),Object.defineProperty(i.prototype,"applySnapshotPreProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.preProcessor;return n?n.call(null,t):t}}),Object.defineProperty(i.prototype,"applySnapshotPostProcessor",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.postProcessor;return n?n.call(null,t):t}}),Object.defineProperty(i.prototype,"getChildType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.properties[t]}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this,l=this.applySnapshotPreProcessor(t);return Fs(l)?zp(this.propertyNames.map(function(u){return a.properties[u].validate(l[u],cv(n,u,a.properties[u]))})):_i(n,l,"Value is not a plain object")}}),Object.defineProperty(i.prototype,"forAllProps",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this;this.propertyNames.forEach(function(a){return t(a,n.properties[a])})}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this;return"{ "+this.propertyNames.map(function(n){return n+": "+t.properties[n].describe()}).join("; ")+" }"}}),Object.defineProperty(i.prototype,"getDefaultSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){return hc}}),Object.defineProperty(i.prototype,"removeChild",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){t.storedValue[n]=void 0}}),i}(fc);kd.prototype.applySnapshot=Zn(kd.prototype.applySnapshot);function sE(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var t=typeof e[0]=="string"?e.shift():"AnonymousModel",n=e.shift()||{};return new kd({name:t,properties:n})}function uE(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var t=typeof e[0]=="string",n=t?e[0]:"AnonymousModel";return t&&e.shift(),e.reduce(function(a,l){return a.cloneAndEnhance({name:a.name+"_"+l.name,properties:l.properties,initializers:l.initializers,preProcessor:function(u){return l.applySnapshotPreProcessor(a.applySnapshotPreProcessor(u))},postProcessor:function(u){return l.applySnapshotPostProcessor(a.applySnapshotPostProcessor(u))}})}).named(n)}function v4(e){return cr(e)&&(e.flags&Ct.Object)>0}var el=function(e){_n(i,e);function i(t,n,a,l){l===void 0&&(l=IS);var u=e.call(this,t)||this;return Object.defineProperty(u,"flags",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(u,"checker",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(u,"initializer",{enumerable:!0,configurable:!0,writable:!0,value:l}),u.flags=n,u}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return ns(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.initializer(t)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(pc(t)&&this.checker(t))return bi();var a=this.name==="Date"?"Date or a unix milliseconds timestamp":this.name;return _i(n,t,"Value is not a ".concat(a))}}),i}(Zs),m4=new el("string",Ct.String,function(e){return typeof e=="string"}),y4=new el("number",Ct.Number,function(e){return typeof e=="number"}),cE=new el("integer",Ct.Integer,function(e){return DS(e)}),fE=new el("float",Ct.Float,function(e){return jS(e)}),dE=new el("finite",Ct.Finite,function(e){return FS(e)}),b4=new el("boolean",Ct.Boolean,function(e){return typeof e=="boolean"}),_4=new el("null",Ct.Null,function(e){return e===null}),w4=new el("undefined",Ct.Undefined,function(e){return e===void 0}),S4=new el("Date",Ct.Date,function(e){return typeof e=="number"||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});S4.getSnapshot=function(e){return e.storedValue.getTime()};var E4=S4;function hE(e){switch(typeof e){case"string":return m4;case"number":return y4;case"boolean":return b4;case"object":if(e instanceof Date)return E4}throw new rt("Cannot determine primitive type from value "+e)}function O4(e){return cr(e)&&(e.flags&(Ct.String|Ct.Number|Ct.Integer|Ct.Boolean|Ct.Date))>0}var pE=function(e){_n(i,e);function i(t){var n=e.call(this,JSON.stringify(t))||this;return Object.defineProperty(n,"value",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Literal}),n.value=t,n}return Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return ns(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return JSON.stringify(this.value)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return pc(t)&&t===this.value?bi():_i(n,t,"Value is not a literal ".concat(JSON.stringify(this.value)))}}),i}(Zs);function x4(e){return new pE(e)}function gE(e){return cr(e)&&(e.flags&Ct.Literal)>0}var vE=function(e){_n(i,e);function i(t,n,a,l){var u=e.call(this,t)||this;return Object.defineProperty(u,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(u,"_predicate",{enumerable:!0,configurable:!0,writable:!0,value:a}),Object.defineProperty(u,"_message",{enumerable:!0,configurable:!0,writable:!0,value:l}),u}return Object.defineProperty(i.prototype,"flags",{get:function(){return this._subtype.flags|Ct.Refinement},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this._subtype.instantiate(t,n,a,l)}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this._subtype.validate(t,n);if(a.length>0)return a;var l=tn(t)?ut(t).snapshot:t;return this._predicate(l)?bi():_i(n,t,this._message(t))}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this._subtype.reconcile(t,n,a,l)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),i}(Qa);function mE(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var t=typeof e[0]=="string"?e.shift():cr(e[0])?e[0].name:null,n=e[0],a=e[1],l=e[2]?e[2]:function(u){return"Value does not respect the refinement predicate"};return new vE(t,n,a,l)}function yE(e){return cr(e)&&(e.flags&Ct.Refinement)>0}function bE(e,i){var t=typeof e=="string"?i:e,n=Up.apply(void 0,fa([],ca(t.map(function(a){return x4(""+a)})),!1));return typeof e=="string"&&(n.name=e),n}var _E=function(e){_n(i,e);function i(t,n,a){var l=e.call(this,t)||this;return Object.defineProperty(l,"_types",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(l,"_dispatcher",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(l,"_eager",{enumerable:!0,configurable:!0,writable:!0,value:!0}),a=ur({eager:!0,dispatcher:void 0},a),l._dispatcher=a.dispatcher,a.eager||(l._eager=!1),l}return Object.defineProperty(i.prototype,"flags",{get:function(){var t=Ct.Union;return this._types.forEach(function(n){t|=n.flags}),t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._types.some(function(n){return n.isAssignableFrom(t)})}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"("+this._types.map(function(t){return t.describe()}).join(" | ")+")"}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this.determineType(l,void 0);if(!u)throw new rt("No matching type for union "+this.describe());return u.instantiate(t,n,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this.determineType(n,t.getReconciliationType());if(!u)throw new rt("No matching type for union "+this.describe());return u.reconcile(t,n,a,l)}}),Object.defineProperty(i.prototype,"determineType",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this._dispatcher?this._dispatcher(t):n?n.is(t)?n:this._types.filter(function(a){return a!==n}).find(function(a){return a.is(t)}):this._types.find(function(a){return a.is(t)})}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this._dispatcher)return this._dispatcher(t).validate(t,n);for(var a=[],l=0,u=0;u<this._types.length;u++){var c=this._types[u],h=c.validate(t,n);if(h.length===0){if(this._eager)return bi();l++}else a.push(h)}return l===1?bi():_i(n,t,"No type is applicable for the union").concat(zp(a))}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),i}(Qa);function Up(e){for(var i=[],t=1;t<arguments.length;t++)i[t-1]=arguments[t];var n=cr(e)?void 0:e,a=cr(e)?fa([e],ca(i),!1):i,l="("+a.map(function(u){return u.name}).join(" | ")+")";return new _E(l,a,n)}function P4(e){return cr(e)&&(e.flags&Ct.Union)>0}var wE=function(e){_n(i,e);function i(t,n,a){var l=e.call(this,t.name)||this;return Object.defineProperty(l,"_subtype",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(l,"_defaultValue",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(l,"optionalValues",{enumerable:!0,configurable:!0,writable:!0,value:a}),l}return Object.defineProperty(i.prototype,"flags",{get:function(){return this._subtype.flags|Ct.Optional},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype.describe()+"?"}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){if(this.optionalValues.indexOf(l)>=0){var u=this.getDefaultInstanceOrSnapshot();return this._subtype.instantiate(t,n,a,u)}return this._subtype.instantiate(t,n,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this._subtype.reconcile(t,this.optionalValues.indexOf(n)<0&&this._subtype.is(n)?n:this.getDefaultInstanceOrSnapshot(),a,l)}}),Object.defineProperty(i.prototype,"getDefaultInstanceOrSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=typeof this._defaultValue=="function"?this._defaultValue():this._defaultValue;return typeof this._defaultValue=="function"&&Xa(this,t),t}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this.optionalValues.indexOf(t)>=0?bi():this._subtype.validate(t,n)}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._subtype.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._subtype}}),i}(Qa);function SE(e,i){if(typeof i!="function"&&tn(i))throw new rt("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead")}function Bs(e,i,t){return SE(e,i),new wE(e,i,t||EE)}var EE=[void 0];function OE(e){return cr(e)&&(e.flags&Ct.Optional)>0}var xE=Bs(w4,void 0),PE=Bs(_4,null);function C4(e){return Up(e,xE)}function CE(e){return Up(e,PE)}var kE=function(e){_n(i,e);function i(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"_definition",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"_subType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),a}return Object.defineProperty(i.prototype,"flags",{get:function(){return(this._subType?this._subType.flags:0)|Ct.Late},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getSubType",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this._subType){var n=void 0;try{n=this._definition()}catch(a){if(a instanceof ReferenceError)n=void 0;else throw a}if(t&&n===void 0)throw new rt("Late type seems to be used too early, the definition (still) returns undefined");n&&(this._subType=n)}return this._subType}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this.getSubType(!0).instantiate(t,n,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this.getSubType(!0).reconcile(t,n,a,l)}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.getSubType(!1);return t?t.name:"<uknown late type>"}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this.getSubType(!1);return a?a.validate(t,n):bi()}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this.getSubType(!1);return n?n.isAssignableFrom(t):!1}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){var t=this.getSubType(!1);return t||Y5}}),i}(Qa);function TE(e,i){var t=typeof e=="string"?e:"late(".concat(e.toString(),")"),n=typeof e=="string"?i:e;return new kE(t,n)}function AE(e){return cr(e)&&(e.flags&Ct.Late)>0}function RE(e,i){return new ME(e,i)}var ME=function(e){_n(i,e);function i(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Lazy}),Object.defineProperty(a,"loadedType",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(a,"pendingNodeList",{enumerable:!0,configurable:!0,writable:!0,value:ln.array()}),Pg(function(){return a.pendingNodeList.length>0&&a.pendingNodeList.some(function(l){return l.isAlive&&a.options.shouldLoadPredicate(l.parent?l.parent.value:null)})},function(){a.options.loadType().then(Zn(function(l){a.loadedType=l,a.pendingNodeList.forEach(function(u){u.parent&&a.loadedType&&u.parent.applyPatches([{op:"replace",path:"/".concat(u.subpath),value:u.snapshot}])})}))}),a}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<lazy ".concat(this.name,">")}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this;if(this.loadedType)return this.loadedType.instantiate(t,n,a,l);var c=ns(this,t,n,a,l);return this.pendingNodeList.push(c),Pg(function(){return!c.isAlive},function(){return u.pendingNodeList.splice(u.pendingNodeList.indexOf(c),1)}),c}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return this.loadedType?this.loadedType.validate(t,n):u4(t)?bi():_i(n,t,"Value is not serializable and cannot be lazy")}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return this.loadedType?(t.die(),this.loadedType.instantiate(a,l,a.environment,n)):e.prototype.reconcile.call(this,t,n,a,l)}}),i}(Zs),k4=function(e){_n(i,e);function i(t){var n=e.call(this,t?"frozen(".concat(t.name,")"):"frozen")||this;return Object.defineProperty(n,"subType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Frozen}),n}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"<any immutable value>"}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){return ns(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return u4(t)?this.subType?this.subType.validate(t,n):bi():_i(n,t,"Value is not serializable and cannot be frozen")}}),i}(Zs),p2=new k4;function LE(e){return arguments.length===0?p2:cr(e)?new k4(e):Bs(p2,e)}function NE(e){return cr(e)&&(e.flags&Ct.Frozen)>0}function IE(e){switch(e){case sr.beforeDestroy:return"destroy";case sr.beforeDetach:return"detach";default:return}}var DE=function(){function e(i,t){if(Object.defineProperty(this,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"identifier",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"node",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"resolvedReference",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),gv(i))this.identifier=i;else if(tn(i)){var n=ut(i);if(!n.identifierAttribute)throw new rt("Can only store references with a defined identifier attribute.");var a=n.unnormalizedIdentifier;if(a==null)throw new rt("Can only store references to tree nodes with a defined identifier.");this.identifier=a}else throw new rt("Can only store references to tree nodes or identifiers, got: '".concat(i,"'"))}return Object.defineProperty(e.prototype,"updateResolvedReference",{enumerable:!1,configurable:!0,writable:!0,value:function(i){var t=_c(this.identifier),n=i.root,a=n.identifierCache.getLastCacheModificationPerId(t);if(!this.resolvedReference||this.resolvedReference.lastCacheModification!==a){var l=this.targetType,u=n.identifierCache.resolve(l,t);if(!u)throw new pv("[mobx-state-tree] Failed to resolve reference '".concat(this.identifier,"' to type '").concat(this.targetType.name,"' (from node: ").concat(i.path,")"));this.resolvedReference={node:u,lastCacheModification:a}}}}),Object.defineProperty(e.prototype,"resolvedValue",{get:function(){return this.updateResolvedReference(this.node),this.resolvedReference.node.value},enumerable:!1,configurable:!0}),e}(),pv=function(e){_n(i,e);function i(t){var n=e.call(this,t)||this;return Object.setPrototypeOf(n,i.prototype),n}return i}(Error),T4=function(e){_n(i,e);function i(t,n){var a=e.call(this,"reference(".concat(t.name,")"))||this;return Object.defineProperty(a,"targetType",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(a,"onInvalidated",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Reference}),a}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"isAssignableFrom",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.targetType.isAssignableFrom(t)}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return gv(t)?bi():_i(n,t,"Value is not a valid identifier, which is a string or a number")}}),Object.defineProperty(i.prototype,"fireInvalidated",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=n.parent;if(!(!u||!u.isAlive)){var c=u.storedValue;c&&this.onInvalidated({cause:t,parent:c,invalidTarget:l?l.storedValue:void 0,invalidId:a,replaceRef:function(h){cc(n.root.storedValue,{op:"replace",value:h,path:n.path})},removeRef:function(){v4(u.type)?this.replaceRef(void 0):cc(n.root.storedValue,{op:"remove",path:n.path})}})}}}),Object.defineProperty(i.prototype,"addTargetNodeWatcher",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){var a=this,l=this.getValue(t);if(l){var u=ut(l),c=function(_,k){var O=IE(k);O&&a.fireInvalidated(O,t,n,u)},h=u.registerHook(sr.beforeDetach,c),b=u.registerHook(sr.beforeDestroy,c);return function(){h(),b()}}}}),Object.defineProperty(i.prototype,"watchTargetNodeForInvalidations",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a){var l=this;if(this.onInvalidated){var u;t.registerHook(sr.beforeDestroy,function(){u&&u()});var c=function(h){u&&u();var b=t.parent,_=b&&b.storedValue;if(b&&b.isAlive&&_){var k=void 0;a?k=!!a.get(n,_):k=t.root.identifierCache.has(l.targetType,_c(n)),k?u=l.addTargetNodeWatcher(t,n):h||l.fireInvalidated("invalidSnapshotReference",t,n,null)}};t.state===Lr.FINALIZED?c(!0):(t.isRoot||t.root.registerHook(sr.afterCreationFinalization,function(){t.parent&&t.parent.createObservableInstanceIfNeeded()}),t.registerHook(sr.afterAttach,function(){c(!1)}))}}}),i}(Zs),jE=function(e){_n(i,e);function i(t,n){return e.call(this,t,n)||this}return Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.isAlive){var n=t.storedValue;return n.resolvedValue}}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t.storedValue;return n.identifier}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=tn(l)?q5(l):l,c=new DE(l,this.targetType),h=ns(this,t,n,a,c);return c.node=h,this.watchTargetNodeForInvalidations(h,u,void 0),h}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){if(!t.isDetaching&&t.type===this){var u=tn(n),c=t.storedValue;if(!u&&c.identifier===n||u&&c.resolvedValue===n)return t.setParent(a,l),t}var h=this.instantiate(a,l,void 0,n);return t.die(),h}}),i}(T4),FE=function(e){_n(i,e);function i(t,n,a){var l=e.call(this,t,a)||this;return Object.defineProperty(l,"options",{enumerable:!0,configurable:!0,writable:!0,value:n}),l}return Object.defineProperty(i.prototype,"getValue",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(t.isAlive){var n=this.options.get(t.storedValue,t.parent?t.parent.storedValue:null);return n}}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=tn(l)?this.options.set(l,t?t.storedValue:null):l,c=ns(this,t,n,a,u);return this.watchTargetNodeForInvalidations(c,u,this.options),c}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=tn(n)?this.options.set(n,t?t.storedValue:null):n;if(!t.isDetaching&&t.type===this&&t.storedValue===u)return t.setParent(a,l),t;var c=this.instantiate(a,l,void 0,u);return t.die(),c}}),i}(T4);function A4(e,i){var t=i||void 0,n=i?i.onInvalidated:void 0;return t&&(t.get||t.set)?new FE(e,{get:t.get,set:t.set},n):new jE(e,n)}function zE(e){return cr(e)&&(e.flags&Ct.Reference)>0}function BE(e,i){var t=A4(e,ur(ur({},i),{onInvalidated:function(n){i&&i.onInvalidated&&i.onInvalidated(n),n.removeRef()}}));return i&&i.acceptsUndefined===!1?t:C4(t)}var R4=function(e){_n(i,e);function i(t,n){var a=e.call(this,t)||this;return Object.defineProperty(a,"validType",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(a,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Identifier}),a}return Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){if(!t||!(t.type instanceof kd))throw new rt("Identifier types can only be instantiated as direct child of a model type");return ns(this,t,n,a,l)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){if(t.storedValue!==n)throw new rt("Tried to change identifier from '".concat(t.storedValue,"' to '").concat(n,"'. Changing identifiers is not allowed."));return t.setParent(a,l),t}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){return typeof t!==this.validType?_i(n,t,"Value is not a valid ".concat(this.describe(),", expected a ").concat(this.validType)):bi()}}),i}(Zs),UE=function(e){_n(i,e);function i(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Identifier}),t}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),i}(R4),qE=function(e){_n(i,e);function i(){return e.call(this,"identifierNumber","number")||this}return Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return t.storedValue}}),Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifierNumber"}}),i}(R4),HE=new UE,GE=new qE;function VE(e){return cr(e)&&(e.flags&Ct.Identifier)>0}function _c(e){return""+e}function gv(e){return typeof e=="string"||typeof e=="number"}function $E(e){return new WE(e)}var WE=function(e){_n(i,e);function i(t){var n=e.call(this,t.name)||this;return Object.defineProperty(n,"options",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Ct.Custom}),n}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this.name}}),Object.defineProperty(i.prototype,"isValidSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this.options.isTargetType(t))return bi();var a=this.options.getValidationMessage(t);return a?_i(n,t,"Invalid value for type '".concat(this.name,"': ").concat(a)):bi()}}),Object.defineProperty(i.prototype,"getSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this.options.toSnapshot(t.storedValue)}}),Object.defineProperty(i.prototype,"instantiate",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=this.options.isTargetType(l)?l:this.options.fromSnapshot(l,t&&t.root.environment);return ns(this,t,n,a,u)}}),Object.defineProperty(i.prototype,"reconcile",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n,a,l){var u=!this.options.isTargetType(n);if(!t.isDetaching){var c=t.type===this&&(u?n===t.snapshot:n===t.storedValue);if(c)return t.setParent(a,l),t}var h=u?this.options.fromSnapshot(n,a.root.environment):n,b=this.instantiate(a,l,void 0,h);return t.die(),b}}),i}(Zs),g2={enumeration:bE,model:sE,compose:uE,custom:$E,reference:A4,safeReference:BE,union:Up,optional:Bs,literal:x4,maybe:C4,maybeNull:CE,refinement:mE,string:m4,boolean:b4,number:y4,integer:cE,float:fE,finite:dE,Date:E4,map:nE,array:iE,frozen:LE,identifier:HE,identifierNumber:GE,late:TE,lazy:RE,undefined:w4,null:_4,snapshotProcessor:eE};const YE=Object.freeze(Object.defineProperty({__proto__:null,addDisposer:eS,addMiddleware:J5,applyAction:K5,applyPatch:cc,applySnapshot:z5,cast:iS,castFlowReturn:GS,castToReferenceSnapshot:aS,castToSnapshot:oS,clone:Z7,createActionTrackingMiddleware:fS,createActionTrackingMiddleware2:hS,decorate:bS,destroy:J7,detach:Q7,escapeJsonPath:Wl,flow:h4,getChildType:N7,getEnv:tS,getIdentifier:q5,getLivelinessChecking:D5,getMembers:rS,getNodeId:lS,getParent:U7,getParentOfType:H7,getPath:U5,getPathParts:G7,getPropertyMembers:V5,getRelativePath:X7,getRoot:B5,getRunningActionContext:uv,getSnapshot:av,getType:Bd,hasEnv:nS,hasParent:B7,hasParentOfType:q7,isActionContextChildOf:SS,isActionContextThisOrChildOf:ES,isAlive:lv,isArrayType:oE,isFrozenType:NE,isIdentifierType:VE,isLateType:AE,isLiteralType:gE,isMapType:rE,isModelType:v4,isOptionalType:OE,isPrimitiveType:O4,isProtected:z7,isReferenceType:zE,isRefinementType:yE,isRoot:V7,isStateTreeNode:tn,isType:cr,isUnionType:P4,isValidReference:K7,joinJsonPath:mp,onAction:X5,onPatch:F5,onSnapshot:I7,process:LS,protect:j7,recordActions:mS,recordPatches:D7,resolveIdentifier:W7,resolvePath:$7,setLivelinessChecking:I5,setLivelynessChecking:M7,splitJsonPath:gc,t:g2,toGenerator:$S,toGeneratorFunction:VS,tryReference:Y7,tryResolve:H5,typecheck:n4,types:g2,unescapeJsonPath:p4,unprotect:F7,walk:G5},Symbol.toStringTag,{value:"Module"})),eo=Xl(YE);var e1={},v2;function M4(){return v2||(v2=1,function(e){function i({oldText:t,newText:n,element:a}){if(!(n.length/Math.max(20,t.length)>=4))return a.fontSize;const l=a.width*a.page.computedHeight/n.length,u=1.5*Math.sqrt(l),c=a.fontSize;return Math.min(c,Math.max(5,Math.round(u)))}Object.defineProperty(e,"__esModule",{value:!0}),e.getLimitedFontSize=i}(e1)),e1}var m2;function L4(){return m2||(m2=1,function(e){var i=id&&id.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=e.getLineHeight=e.useFontLoader=void 0,e.isRTLText=R,e.getDir=D,e.usePrevious=Q;const t=i(Tn()),n=Qi,a=Ja,l=Fd,u=da,c=i(Ji()),h=A7,b=jp(),_=Ks(),k=zd(),O=ts(),v=L5(),x=Fp(),g=yc(),p=bc(),P=Xs(),d=eo,m=M4();c.default._fixTextRendering=!0;const y=document.createElement("style");y.type="text/css",document.head.appendChild(y);const w={border:"none",padding:"0px",overflow:"hidden",background:"none",outline:"none",resize:"none",overflowWrap:"break-word",whiteSpace:"pre-wrap",userSelect:"text",wordBreak:"normal"};function L(I){var z="֑-߿יִ-﷽ﹰ-ﻼ";return new RegExp("^[^"+z+"]*?["+z+"]").test(I)}function R(I){I=I.replace(/\s/g,"");let z=0;for(var H=0;H<I.length;H++)L(I[H])&&(z+=1);return z>I.length/2}function D(I){return R(I)?"rtl":"ltr"}const E=(0,n.observer)(({textNodeRef:I,element:z,onBlur:H,selectAll:K,cursorPosition:ee})=>{const[V,Z]=t.default.useState(w),Y=I.current;t.default.useLayoutEffect(()=>{const se={};se.width=Y.width()-2*Y.padding()+"px",se.height=Y.height()-2*Y.padding()+Y.fontSize()*Y.lineHeight()+"px",se.fontSize=Y.fontSize()+"px",se.lineHeight=Y.lineHeight()+.01,se.fontFamily=Y.fontFamily(),se.textAlign=Y.align(),se.color=Y.fill(),se.fontWeight=z.fontWeight,se.fontStyle=z.fontStyle,se.letterSpacing=z.letterSpacing+"em";const de=`
|
|
96
|
-
.polotno-input::placeholder {
|
|
97
|
-
color: ${V.color};
|
|
98
|
-
opacity: 0.6;
|
|
99
|
-
}
|
|
100
|
-
`;y.innerHTML="",y.appendChild(document.createTextNode(de)),JSON.stringify(se)!==JSON.stringify(V)&&Z(se)});const ne=t.default.useRef(null);t.default.useLayoutEffect(()=>{var se;const de=ne.current;if(!de)return;(se=ne.current)===null||se===void 0||se.focus();const he=ee||de.value.length;de.selectionStart=de.selectionEnd=he,K&&(de==null||de.select(),document.execCommand("selectAll",!1,null))},[]),t.default.useEffect(()=>{window.addEventListener("blur",H);const se=de=>{var he;!((he=ne.current)===null||he===void 0)&&he.contains(de.target)||H()};return window.addEventListener("touchstart",se),()=>{window.removeEventListener("blur",H),window.removeEventListener("touchstart",se)}},[]);let re=0;const ie=Y.textArr.length*Y.lineHeight()*Y.fontSize();z.verticalAlign==="middle"&&(re=(z.a.height-ie)/2),z.verticalAlign==="bottom"&&(re=z.a.height-ie);const ae=(0,v.removeTags)(z.text);return t.default.createElement("textarea",{className:"polotno-input",ref:ne,dir:D(ae),style:Object.assign(Object.assign(Object.assign({},w),V),{paddingTop:re+"px"}),value:ae,onChange:se=>{const de=(0,m.getLimitedFontSize)({oldText:z.text,newText:se.target.value,element:z});z.set({text:se.target.value,fontSize:de})},placeholder:z.placeholder,onBlur:H})}),S=I=>t.default.createElement(l.Html,null,t.default.createElement(E,Object.assign({},I))),A=I=>{const[z,H]=t.default.useState(!1),K=t.default.useRef(!1);return t.default.useEffect(()=>{var ee=!0;return setTimeout(()=>{ee&&(I._editModeEnabled&&(K.current=!0),H(!0),setTimeout(()=>{K.current=!1},50))},50),()=>{ee=!1}},[]),{editorEnabled:z&&I._editModeEnabled,selectAll:K.current}},M=(I,z)=>{const[H,K]=t.default.useReducer(V=>V+1,0),ee=t.default.useRef((0,k.isFontLoaded)(z));return t.default.useLayoutEffect(()=>{if(ee.current=(0,k.isFontLoaded)(z),ee.current)return;let V=!0;return(async()=>{ee.current=!1,K();const Z=(0,_.incrementLoader)(`text ${z}`);await I.loadFont(z),setTimeout(Z,100),V&&(ee.current=!0,K())})(),()=>{V=!1}},[z]),[ee.current]};e.useFontLoader=M;const T=({fontLoaded:I,fontFamily:z,fontSize:H,lineHeight:K})=>t.default.useMemo(()=>{if(typeof K=="number")return K;const ee=document.createElement("div");ee.style.fontFamily=z,ee.style.fontSize=H+"px",ee.style.lineHeight=K,ee.innerText="Test text",document.body.appendChild(ee);const V=ee.offsetHeight;return document.body.removeChild(ee),V/H},[I,z,H,K]);function B(I){var z=I.getAbsoluteTransform().copy();z.invert();var H=I.getStage().getPointerPosition();return z.point(H)}function U(I){var z;const H=I.target,K=B(H),ee=H.textArr,V=Math.floor(K.y/(H.fontSize()*H.lineHeight())),Z=ee.slice(0,V).reduce((re,ie)=>re+ie.text.length,V),Y=(z=ee[V])!==null&&z!==void 0?z:ee[0];let ne=0;return H.align()==="right"?ne=H.width()-Y.width:H.align()==="center"&&(ne=H.width()/2-Y.width/2),Z+Math.round((K.x-ne)/Y.width*Y.text.length)}function Q(I){const z=t.default.useRef(I),H=t.default.useRef(I);return t.default.useMemo(()=>{H.current=z.current,z.current=I},[I]),H.current}function X(I){return/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\uAC00-\uD7AF]/.test(I)}function $(I,z,H=!1){const K=I.fontSize(),ee=I.height(),V=(0,v.removeTags)(z.text);let Z=z.a.fontSize;I.height(void 0);const Y=Math.round(2*z.a.fontSize)-1;for(let ne=1;ne<Y;ne++){const re=z.a.height&&I.height()>z.a.height;let ie=V.split(`
|
|
101
|
-
`).join(" ").split(/[\s-]+/).reduce((de,he)=>X(he)?de.concat(he.split("")):de.concat(he),[]),ae=I.textArr.map(de=>de.text).join(";");const se=ie.find(de=>!ae.includes(de)||(ae=ae.replace(de,""),!1));if(!(re||se&&!H))break;Z-=.5,I.fontSize(Z)}return I.fontSize(K),I.height(ee),Z}function j({lines:I,lineHeight:z,width:H,align:K="left",padding:ee=0,cornerRadius:V=0}){var Z;I.forEach((ie,ae)=>{ie.cx=H/2,K==="right"?ie.cx=H-ie.width/2:K==="left"&&(ie.cx=ie.width/2),K!=="justify"||ie.lastInParagraph||(ie.width=H),K==="justify"&&(ie.cx=ie.width/2)});let Y=`M ${(Z=I[0])===null||Z===void 0?void 0:Z.cx} ${-ee}`;I.forEach((ie,ae)=>{const{cx:se}=ie,de=I[ae-1];de&&de.width>ie.width?Y+=` L ${se+ie.width/2+ee} ${ae*z+ee}`:Y+=` L ${se+ie.width/2+ee} ${ae*z-ee}`;const he=I[ae+1];he&&he.width>ie.width?Y+=` L ${se+ie.width/2+ee} ${(ae+1)*z-ee}`:Y+=` L ${se+ie.width/2+ee} ${(ae+1)*z+ee}`});for(var ne=I.length-1;ne>=0;ne--){const ie=I[ne],{cx:ae}=ie,se=I[ne+1];se&&se.width>ie.width?Y+=` L ${ae-ie.width/2-ee} ${(ne+1)*z-ee}`:Y+=` L ${ae-ie.width/2-ee} ${(ne+1)*z+ee}`;const de=I[ne-1];de&&de.width>ie.width?Y+=` L ${ae-ie.width/2-ee} ${ne*z+ee}`:Y+=` L ${ae-ie.width/2-ee} ${ne*z-ee}`}Y+=" Z";const re=(0,h.parsePath)(Y);return(0,h.roundCommands)(re,V).path}e.getLineHeight=T,e.TextElement=(0,n.observer)(({element:I,store:z})=>{const H=t.default.useRef(null),K=t.default.useRef(null),{editorEnabled:ee,selectAll:V}=A(I),[Z,Y]=t.default.useState(!1),[ne,re]=t.default.useState(!1),ie=t.default.useRef(I.a.height),ae=z.selectedShapes.indexOf(I)>=0,{textVerticalResizeEnabled:se}=O.flags,de=Q(I.fontFamily),[he,Se]=t.default.useState([]);t.default.useEffect(()=>{var ze,Ue;const Xe=(Ue=(ze=H.current)===null||ze===void 0?void 0:ze.textArr)!==null&&Ue!==void 0?Ue:[];JSON.stringify(Xe)!==JSON.stringify(he)&&Se(Xe)}),t.default.useEffect(()=>{if(I.a.width)return;const ze=H.current;ze.width(600),I.set({width:1.4*ze.getTextWidth()})},[]),t.default.useLayoutEffect(()=>(0,u.autorun)(()=>{const ze=H.current;(0,x.applyFilter)(ze,I)}));const[Ee]=(0,e.useFontLoader)(z,I.fontFamily),De=(0,v.removeTags)(I.text),fe=()=>{const ze=H.current.clone({height:void 0}),Ue=Math.ceil(ze.fontSize()*ze.lineHeight()*ze.textArr.length+1);return ze.destroy(),Ue};t.default.useLayoutEffect(()=>{if(!Ee)return;const{textOverflow:ze,textSplitAllowed:Ue}=O.flags;if(I.a.height){if(!z.isPlaying)if(ze!=="change-font-size"||ne){if(ze==="resize"){const Xe=fe();se&&I.a.height<Xe&&z.history.ignore(()=>{var dt;(0,d.isAlive)(I)&&I.set({height:Xe}),(dt=H.current)===null||dt===void 0||dt.height(Xe)},!1,!0),se||I.a.height===Xe||z.history.ignore(()=>{var dt;(0,d.isAlive)(I)&&I.set({height:Xe}),(dt=H.current)===null||dt===void 0||dt.height(Xe)},!1,!0)}}else{const Xe=$(H.current,I,Ue);if(Xe!==I.a.fontSize)return void z.history.ignore(()=>{I.set({fontSize:Xe})},!1,!0);const dt=fe();I.a.height===dt||se||z.history.ignore(()=>{I.set({height:dt})},!1,!0)}}else{const Xe=fe();z.history.ignore(()=>{I.set({height:Xe})},!1,!0)}}),t.default.useLayoutEffect(()=>{const ze=H.current;ze&&(ze.width(ze.width()+1e-8),ze._setTextData(),(0,x.applyFilter)(ze,I))},[Ee]);const ge=t.default.useRef(null),Te=t.default.useRef(0),Re=ze=>{ze.evt.preventDefault(),z.selectedShapes.find(Xe=>Xe===I)&&I.contentEditable&&(Te.current=U(ze),I.toggleEditMode())},ue=!De&&I.placeholder?.6:I.a.opacity;(0,g.useFadeIn)(H,ue);const me=(0,e.getLineHeight)({fontLoaded:Ee,fontFamily:I.fontFamily,fontSize:I.a.fontSize,lineHeight:I.lineHeight}),xe=I.selectable||z.role==="admin",Ie=(0,b.useColor)(I),tt=t.default.useMemo(()=>I.backgroundEnabled?j({lines:JSON.parse(JSON.stringify(he)),cornerRadius:I.backgroundCornerRadius*(I.a.fontSize*me*.5),lineHeight:me*I.a.fontSize,padding:I.backgroundPadding*(I.a.fontSize*me*.5),width:I.a.width,align:I.align}):"",[I.backgroundEnabled,I.backgroundCornerRadius,I.a.fontSize,me,I.backgroundPadding,I.a.width,I.align,he]),lt=(0,P.isTouchDevice)();let Fe=0;return I.verticalAlign==="middle"?Fe=(I.a.height-he.length*me*I.a.fontSize)/2:I.verticalAlign==="bottom"&&(Fe=I.a.height-he.length*me*I.a.fontSize),t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Path,{ref:K,x:I.a.x,y:I.a.y,rotation:I.a.rotation,hideInExport:!I.showInExport,listening:!1,visible:I.backgroundEnabled,opacity:I.backgroundOpacity*ue,data:tt,fill:I.backgroundColor,offsetY:-Fe}),t.default.createElement(a.Text,Object.assign({ref:H,id:I.id,name:"element",hideInExport:!I.showInExport,editModeEnabled:I._editModeEnabled,x:I.a.x,y:I.a.y,rotation:I.a.rotation,width:I.a.width,height:I.a.height,text:De||I.placeholder,direction:D(De)},Ie,{stroke:I.stroke,lineJoin:"round",strokeWidth:I.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:I.a.fontSize,fontFamily:`"${I.fontFamily}", "${de}"`,fontStyle:I.fontStyle+" "+I.fontWeight,textDecoration:I.textDecoration,align:I.align,verticalAlign:I.verticalAlign,draggable:lt?I.draggable&&ae:I.draggable,preventDefault:!lt||ae,opacity:ue,visible:!I._editModeEnabled,ellipsis:O.flags.textOverflow==="ellipsis",shadowEnabled:I.shadowEnabled,shadowBlur:I.shadowBlur,shadowOffsetX:I.shadowOffsetX,shadowOffsetY:I.shadowOffsetY,shadowColor:I.shadowColor,shadowOpacity:I.shadowOpacity,lineHeight:me,letterSpacing:I.letterSpacing*I.a.fontSize,listening:xe,onDragMove:ze=>{I.set({x:ze.target.x(),y:ze.target.y()})},onDragEnd:ze=>{I.set({x:ze.target.x(),y:ze.target.y()})},onMouseEnter:()=>{Y(!0)},onMouseLeave:()=>{Y(!1)},onClick:Re,onTap:Re,onTransformStart:()=>{re(!0),ie.current=H.current.height()},onTransform:ze=>{var Ue,Xe;const dt=ze.target;(Ue=K.current)===null||Ue===void 0||Ue.setAttrs({x:dt.x(),y:dt.y(),rotation:dt.rotation(),scale:dt.scale()});const kt=((Xe=dt.getStage())===null||Xe===void 0?void 0:Xe.findOne("Transformer")).getActiveAnchor();if(kt==="middle-left"||kt==="middle-right"){const Et=dt.scaleX(),be=dt.width()*Et,we=I.a.fontSize;let Ne=be;be<we&&(Ne=we,ge.current&&dt.position(ge.current)),dt.width(Ne),dt.scaleX(1),dt.scaleY(1);const Ye=fe();if(O.flags.textOverflow!=="ellipsis"){const Ze=Math.max(Ye,ie.current);dt.height(Ze),I.set({height:dt.height()})}I.set({x:dt.x(),y:dt.y(),width:dt.width(),rotation:dt.rotation()}),(0,x.applyFilter)(dt,I)}if(kt==="top-center"||kt==="bottom-center"){let Et=O.flags.textOverflow==="resize"?fe():me*I.a.fontSize;ze.target.height(Math.max(Et,ze.target.height()*ze.target.scaleY())),ze.target.scaleY(1)}ge.current=ze.target.position()},onTransformEnd:ze=>{var Ue;const Xe=ze.target.scaleX();ze.target.scaleX(1),ze.target.scaleY(1),I.set({fontSize:Math.round(I.a.fontSize*Xe),width:Math.ceil(ze.target.width()*Xe),x:ze.target.x(),y:ze.target.y(),rotation:ze.target.rotation(),height:ze.target.height()*Xe,shadowBlur:I.shadowBlur*Xe,shadowOffsetX:I.shadowOffsetX*Xe,shadowOffsetY:I.shadowOffsetY*Xe,strokeWidth:I.strokeWidth*Xe}),(Ue=K.current)===null||Ue===void 0||Ue.setAttrs({scaleX:1,scaleY:1}),re(!1)}})),ee&&t.default.createElement(a.Group,{x:I.a.x,y:I.a.y,rotation:I.a.rotation},t.default.createElement(S,{textNodeRef:H,element:I,selectAll:V,cursorPosition:Te.current,onBlur:()=>{I.toggleEditMode(!1)}})),!ne&&(Z||ae)&&t.default.createElement(p.Highlighter,{element:I}))})}(id)),id}var wo={},cd={},t1={exports:{}},n1={exports:{}},y2;function vv(){return y2||(y2=1,function(e,i){e.exports=t;function t(a){return n.bind(null,a)}function n(a){var l=[].slice.call(arguments,1);l.unshift("["+a+"]"),process.stderr.write(l.join(" ")+`
|
|
102
|
-
`)}}(n1)),n1.exports}var b2;function N4(){return b2||(b2=1,function(e,i){vv()("lex"),e.exports=t;function t(n){var a="",l,u=0,c=-1,h=0,b=1,_="before-selector",k=[_],O={},v=[],x=["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 g(){return D(),n[c]}function p(X){return X?k[k.length-1-X]:_}function P(X){var $=c+1;return X===n.slice($,$+X.length)}function d(X){var $=n.slice(c).indexOf(X);return $>0?$:!1}function m(X){return X===y(1)}function y(X){return n[c+(X||1)]}function w(){var X=k.pop();return _=k[k.length-1],X}function L(X){return _=X,k.push(_),k.length}function R(X){var $=_;return k[k.length-1]=_=X,$}function D(X){if((X||1)==1)n[c]==`
|
|
103
|
-
`?(b++,u=1):u++,c++;else{var $=n.slice(c,c+X).split(`
|
|
104
|
-
`);$.length>1&&(b+=$.length-1,u=1),u+=$[$.length-1].length,c=c+X}}function E(){O.end={line:b,col:u},v.push(O),a="",O={}}function S(X){O={type:X,start:{line:b,col:u}}}for(;l=g();)switch(l){case" ":switch(p()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":a+=l;break}break;case`
|
|
105
|
-
`:case" ":case"\r":case"\f":switch(p()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":a+=l;break;case"at-value":l===`
|
|
106
|
-
`&&(O.value=a.trim(),E(),w());break}break;case":":switch(p()){case"name":O.name=a.trim(),a="",R("before-value");break;case"before-selector":a+=l,S("selector"),L("selector");break;case"before-value":R("value"),a+=l;break;default:a+=l;break}break;case";":switch(p()){case"name":case"before-value":case"value":a.trim().length>0&&(O.value=a.trim(),E()),R("before-name");break;case"value-paren":a+=l;break;case"at-value":O.value=a.trim(),E(),w();break;case"before-name":break;default:a+=l;break}break;case"{":switch(p()){case"selector":if(y(-1)==="\\"){a+=l;break}O.text=a.trim(),E(),R("before-name"),h=h+1;break;case"at-group":switch(O.name=a.trim(),O.type){case"font-face":case"viewport":case"page":L("before-name");break;default:L("before-selector")}E(),h=h+1;break;case"name":case"at-rule":O.name=a.trim(),E(),L("before-name"),h=h+1;break;case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":R("value"),a+=l;break}break;case"}":switch(p()){case"before-name":case"name":case"before-value":case"value":a&&(O.value=a.trim()),O.name&&O.value&&E(),S("end"),E(),w(),p()==="at-group"&&(S("at-group-end"),E(),w()),h>0&&(h=h-1);break;case"at-group":case"before-selector":case"selector":if(y(-1)==="\\"){a+=l;break}h>0&&p(1)==="at-group"&&(S("at-group-end"),E()),h>1&&w(),h>0&&(h=h-1);break;case"double-string":case"single-string":case"comment":a+=l;break}break;case'"':case"'":switch(p()){case"double-string":l==='"'&&y(-1)!=="\\"&&w();break;case"single-string":l==="'"&&y(-1)!=="\\"&&w();break;case"before-at-value":R("at-value"),L(l==='"'?"double-string":"single-string");break;case"before-value":R("value"),L(l==='"'?"double-string":"single-string");break;case"comment":break;default:y(-1)!=="\\"&&L(l==='"'?"double-string":"single-string")}a+=l;break;case"/":switch(p()){case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":case"selector":case"name":case"value":if(m("*")){var A=d("*/");A&&D(A+1)}else p()=="before-value"&&R("value"),a+=l;break;default:m("*")?(S("comment"),L("comment"),D()):a+=l;break}break;case"*":switch(p()){case"comment":m("/")?(O.text=a,D(),E(),w()):a+=l;break;case"before-selector":a+=l,S("selector"),L("selector");break;case"before-value":R("value"),a+=l;break;default:a+=l}break;case"@":switch(p()){case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":R("value"),a+=l;break;default:for(var M=!1,T,B,U=0,Q=x.length;!M&&U<Q;++U)B=x[U],T=B.name||B,P(T)&&(M=!0,S(T),L(B.state||"at-group"),D(T.length),B.prefix&&(O.prefix=B.prefix),B.type&&(O.type=B.type));M||(a+=l);break}break;case"(":switch(p()){case"value":L("value-paren");break;case"before-value":R("value");break}a+=l;break;case")":switch(p()){case"value-paren":w();break;case"before-value":R("value");break}a+=l;break;default:switch(p()){case"before-selector":S("selector"),L("selector");break;case"before-name":S("property"),R("name");break;case"before-value":R("value");break;case"before-at-value":R("at-value");break}a+=l;break}return v}}(t1)),t1.exports}var r1={exports:{}},_2;function KE(){return _2||(_2=1,function(e,i){vv()("parse");var t=N4();e.exports=c;var n,a,l,u;function c(w,L){L||(L={}),n=!!L.comments,l=!!L.position,a=0,u=Array.isArray(w)?w.slice():t(w);for(var R,D=[],E;E=b();)R=P(E),R&&D.push(R);return{type:"stylesheet",stylesheet:{rules:D}}}function h(w,L){L||(L={});for(var R,D=["type","name","value"],E={},S=0;S<D.length;++S)R=D[S],w[R]&&(E[R]=L[R]||w[R]);for(D=Object.keys(L),S=0;S<D.length;++S)R=D[S],E[R]||(E[R]=L[R]);return l&&(E.position={start:w.start,end:w.end}),E}function b(){var w=u.shift();return w}function _(w){a=a+1;var L={};switch(w.type){case"font-face":case"viewport":L.declarations=m();break;case"page":L.prefix=w.prefix,L.declarations=m();break;default:L.prefix=w.prefix,L.rules=y()}return h(w,L)}function k(w){return h(w)}function O(w){return h(w)}function v(w){return h(w,{text:w.text})}function x(w){return h(w)}function g(w){return h(w)}function p(w){function L(R){return R.trim()}return h(w,{type:"rule",selectors:w.text.split(",").map(L),declarations:m()})}function P(w){switch(w.type){case"property":return g(w);case"selector":return p(w);case"at-group-end":a=a-1;return;case"media":case"keyframes":return _(w);case"comment":if(n)return v(w);break;case"charset":return O(w);case"import":return k(w);case"namespace":return x(w);case"font-face":case"supports":case"viewport":case"document":case"page":return _(w)}}function d(w){for(var L,R=[],D;(D=b())&&w&&w(D);)L=P(D),L&&R.push(L);return D&&D.type!=="end"&&u.unshift(D),R}function m(){return d(function(w){return w.type==="property"||w.type==="comment"})}function y(){return d(function(){return a})}}(r1)),r1.exports}var i1={exports:{}},w2;function XE(){return w2||(w2=1,function(e,i){vv()("stringify");var t,n,a,l,u,c;e.exports=h;function h(y,w){w||(w={}),a=w.indentation||"",n=!!w.compress,t=!!w.comments,l=1,n?u=c="":(u=`
|
|
107
|
-
`,c=" ");var L=x(y.stylesheet.rules,d).join(`
|
|
108
|
-
`).trim();return L}function b(y){if(y){l+=y;return}return n?"":Array(l).join(a||"")}function _(y){return"@"+y.type+" "+y.value+";"+u}function k(y){var w="",L=y.prefix||"";y.name&&(w=" "+y.name);var R=y.type!=="page";return"@"+L+y.type+w+c+g(y,R)+u}function O(y){return t?"/*"+(y.text||"")+"*/"+u:""}function v(y){var w;return y.selectors?w=y.selectors.join(","+u):(w="@"+y.type,w+=y.name?" "+y.name:""),b()+w+c+g(y)+u}function x(y,w){return y.reduce(function(L,R){var D=R.type==="comment"?O(R):w(R);return D&&L.push(D),L},[])}function g(y,w){var L=y.declarations,R=P;return y.rules&&(L=y.rules,R=v),L=p(L,R),L&&(L=u+L+(w?"":u)),"{"+L+b()+"}"}function p(y,w){if(!y)return"";b(1);var L=x(y,w);return b(-1),L.length?L.join(u):""}function P(y){if(y.type==="property")return m(y)}function d(y){switch(y.type){case"rule":return v(y);case"media":case"keyframes":return k(y);case"comment":return O(y);case"import":case"charset":case"namespace":return _(y);case"font-face":case"supports":case"viewport":case"document":case"page":return k(y)}}function m(y){var w=y.name?y.name+":"+c:"";return b()+w+y.value+";"}}(i1)),i1.exports}var o1,S2;function ZE(){return S2||(S2=1,o1={lex:N4(),parse:KE(),stringify:XE()}),o1}var E2;function Ud(){return E2||(E2=1,function(e){var i=cd&&cd.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.useSvgColors=e.sameColors=void 0,e.urlToBase64=k,e.urlToString=O,e.getColors=v,e.svgToURL=x,e.getSvgSize=g,e.fixSize=p,e.replaceColors=m;const t=i(Ji()),n=i(Tn()),a=M5(),l=i(ZE());function u(w){for(;w.parentNode;){if(w.nodeName==="defs")return!0;w=w.parentNode}return!1}function c(w){const L={};return w.querySelectorAll("style").forEach(R=>{const D=l.default.parse(R.textContent).stylesheet.rules;for(let E of D)E.selectors&&E.selectors.forEach(S=>{const A=L[S]||{};E.declarations.forEach(M=>{A[M.name]=M.value}),L[S]=A})}),L}function h(w,L){var R;const D={fill:"",stroke:""},E=((R=w.getAttribute("class"))===null||R===void 0?void 0:R.split(" "))||[],S=w.getAttribute("id");let A={};if(S&&L[`#${S}`]?A=L[`#${S}`]:E.forEach(M=>{L[`.${M}`]&&(A=Object.assign(Object.assign({},A),L[`.${M}`]))}),L[w.nodeName]&&(A=Object.assign(Object.assign({},A),L[w.nodeName])),w.getAttribute("fill")&&w.getAttribute("fill")!=="none"?D.fill=w.getAttribute("fill"):A.fill&&A.fill!=="none"&&(D.fill=A.fill),w.getAttribute("stroke")&&w.getAttribute("stroke")!=="none"?D.stroke=w.getAttribute("stroke"):A.stroke&&A.stroke!=="none"&&(D.stroke=A.stroke),!D.fill&&w.style.fill&&w.style.fill!=="none"&&(D.fill=w.style.fill),!D.stroke&&w.style.stroke&&w.style.stroke!=="none"&&(D.stroke=w.style.stroke),!D.stroke&&!D.fill){const M=w.ownerSVGElement,T=M&&M!==w&&h(M,L);(T==null?void 0:T.fill)==="currentColor"||(T==null?void 0:T.stroke)==="currentColor"||(D.fill="black")}return D}const b=["path","rect","circle","line","polygon","polyline","ellipse","text"];function _(w){for(var L=[],R=w.getElementsByTagName("*"),D=0,E=R.length;D<E;D++){const S=R[D];u(S)||(S.getAttribute("fill")!==null&&L.push(S),(S.getAttribute("stroke")!==null||S.style&&S.style.fill||b.indexOf(S.nodeName)>=0)&&L.push(S))}return L}async function k(w){const L=await fetch(w);return x(await L.text())}async function O(w){return await(await fetch(w,{mode:"cors"})).text()}function v(w){var L=new DOMParser().parseFromString(w,"image/svg+xml");const R=c(L),D=_(L),E=[];return D.forEach(S=>{const{fill:A,stroke:M}=h(S,R);[A,M].forEach(T=>{T&&(T==="currentColor"&&(T="black"),t.default.Util.colorToRGBA(T)&&E.indexOf(T)===-1&&E.push(T))})}),E}function x(w){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(w)))}async function g(w){const L=await O(w),R=new DOMParser().parseFromString(L,"image/svg+xml").documentElement.getAttribute("viewBox"),[D,E,S,A]=(R==null?void 0:R.split(" "))||[];return{width:parseFloat(S),height:parseFloat(A)}}function p(w){var L=new DOMParser().parseFromString(w,"image/svg+xml");const R=L.documentElement.getAttribute("viewBox"),[D,E,S,A]=(R==null?void 0:R.split(" "))||[],M=L.documentElement.getAttribute("width");!M&&L.documentElement.setAttribute("width",S+"px");const T=L.documentElement.getAttribute("height");if((!T||T.indexOf("%")>=0)&&L.documentElement.setAttribute("height",A+"px"),M&&M.indexOf("%")>=0&&T&&T.indexOf("%")===-1){const B=parseFloat(T)/parseFloat(A);L.documentElement.setAttribute("width",B*parseFloat(S)+"px")}if(T&&T.indexOf("%")>=0&&M&&M.indexOf("%")===-1){const B=parseFloat(M)/parseFloat(S);L.documentElement.setAttribute("height",B*parseFloat(A)+"px")}return M==="100%"&&T==="100%"&&(L.documentElement.setAttribute("width",S+"px"),L.documentElement.setAttribute("height",A+"px")),new XMLSerializer().serializeToString(L)}const P=(w,L)=>{if(!w||!L)return!1;if(L==="currentColor"&&w==="black")return!0;const R=t.default.Util.colorToRGBA(w),D=t.default.Util.colorToRGBA(L);return R&&D?R.r===D.r&&R.g===D.g&&R.b===D.b&&R.a===D.a:void 0};function d(w,L,R,D){var E=w.namespaceURI,S=document.createElementNS(E,"linearGradient");const A=t.default.Util.degToRad(R+90),M=(Math.cos(A)+1)/2,T=(Math.sin(A)+1)/2,B=(Math.cos(A+Math.PI)+1)/2,U=(Math.sin(A+Math.PI)+1)/2;S.setAttribute("x1",100*M+"%"),S.setAttribute("y1",100*T+"%"),S.setAttribute("x2",100*B+"%"),S.setAttribute("y2",100*U+"%"),S.setAttribute("gradientUnits","userSpaceOnUse"),S.setAttribute("id",L);for(var Q=0;Q<D.length;Q++){var X=D[Q],$=document.createElementNS(E,"stop");for(var j in X)X.hasOwnProperty(j)&&$.setAttribute(j,X[j]);S.appendChild($)}return(w.querySelector("defs")||w.insertBefore(document.createElementNS(E,"defs"),w.firstChild)).appendChild(S)}function m(w,L){var R=new DOMParser().parseFromString(w,"image/svg+xml");const D=_(R),E=Array.from(L.keys()),S=c(R);return D.forEach(A=>{const{fill:M,stroke:T}=h(A,S);[{prop:"fill",color:M},{prop:"stroke",color:T}].forEach(({prop:B,color:U})=>{const Q=E.find(X=>(0,e.sameColors)(X,U));if(Q){const X=L.get(Q);if((0,a.isGradient)(X)){const{rotation:$,stops:j}=(0,a.parseColor)(X),I=j.map(H=>({offset:100*H.offset+"%","stop-color":H.color})),z="color"+Math.round(1e8*Math.random());d(R.children[0],z,$,I),A.style[B]=null,A.setAttribute(B,`url('#${z}')`)}else A.style[B]=L.get(Q)}})}),x(new XMLSerializer().serializeToString(R))}e.sameColors=P;const y=w=>{const[L,R]=n.default.useState([]);return n.default.useEffect(()=>{let D=!1;return(async()=>{R([]);const E=v(await O(w));D||R(E)})(),()=>{D=!0}},[w]),L};e.useSvgColors=y}(cd)),cd}var a1={},O2;function I4(){return O2||(O2=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.trySetCanvasSize=void 0;const i=(t,n,a)=>{let l=n,u=a,c=1;for(;l>0&&u>0;){t.width=l,t.height=u;const h=t.getContext("2d");if(!h)return;if(h.fillStyle="rgba(0,0,0,0.1)",h.fillRect(0,0,1,1),h.getImageData(0,0,1,1).data[3]!==0)return void h.clearRect(0,0,t.width,t.height);if(c*=.9,l=Math.floor(n*c),u=Math.floor(a*c),l=Math.max(l,1),u=Math.max(u,1),l<=1&&u<=1)return t.width=1,void(t.height=1)}};e.trySetCanvasSize=i}(a1)),a1}var x2;function D4(){return x2||(x2=1,function(e){var i=wo&&wo.__createBinding||(Object.create?function(V,Z,Y,ne){ne===void 0&&(ne=Y);var re=Object.getOwnPropertyDescriptor(Z,Y);re&&!("get"in re?!Z.__esModule:re.writable||re.configurable)||(re={enumerable:!0,get:function(){return Z[Y]}}),Object.defineProperty(V,ne,re)}:function(V,Z,Y,ne){ne===void 0&&(ne=Y),V[ne]=Z[Y]}),t=wo&&wo.__setModuleDefault||(Object.create?function(V,Z){Object.defineProperty(V,"default",{enumerable:!0,value:Z})}:function(V,Z){V.default=Z}),n=wo&&wo.__importStar||function(){var V=function(Z){return V=Object.getOwnPropertyNames||function(Y){var ne=[];for(var re in Y)Object.prototype.hasOwnProperty.call(Y,re)&&(ne[ne.length]=re);return ne},V(Z)};return function(Z){if(Z&&Z.__esModule)return Z;var Y={};if(Z!=null)for(var ne=V(Z),re=0;re<ne.length;re++)ne[re]!=="default"&&i(Y,Z,ne[re]);return t(Y,Z),Y}}(),a=wo&&wo.__importDefault||function(V){return V&&V.__esModule?V:{default:V}};Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=e.useImageLoader=e.setImageLoaderHook=void 0;const l=a(Tn()),u=Qi,c=da,h=Ja,b=a(Dp()),_=a(Ji()),k=Fd,O=bc(),v=Ks(),x=n(Ud()),g=ts(),p=I4(),P=Fp(),d=yc(),m=Xs();function y(){return document.createElement("canvas")}async function w(V){if(!(V.indexOf("data:image/svg+xml")>=0||V.indexOf(".svg")>=0))return V;const Z=await x.urlToString(V),Y=x.fixSize(Z);return x.svgToURL(Y)}const L=V=>{const[Z,Y]=l.default.useState(V);return l.default.useEffect(()=>{(async()=>{const ne=await w(V);ne!==Z&&Y(ne)})()},[V]),Z};function R(V,Z){return Math.sqrt(Math.pow(Z.x-V.x,2)+Math.pow(Z.y-V.y,2))}function D(V,Z){return{x:(V.x+Z.x)/2,y:(V.y+Z.y)/2}}const E=(V,Z,Y)=>{const ne=l.default.useMemo(()=>{var re,ie;const{flipX:ae,flipY:se}=V,de=V.type==="svg"||V.src.indexOf("data:image/svg+xml")>=0||V.src.indexOf(".svg")>=0,he=navigator.userAgent.toLowerCase().indexOf("firefox")>-1,Se=(/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||he)&&de||V.maskSrc;if(!ae&&!se&&!Se)return Z;if(!Z||!Z.width||!Z.height)return null;const Ee=y();let De=1;V.type==="svg"&&(De=Math.max(V.a.width/Z.width*Y,V.a.height/Z.height*Y)),(0,p.trySetCanvasSize)(Ee,Math.max(Z.width*De,1),Math.max(Z.height*De,1));let fe=ae?-Ee.width:0,ge=se?-Ee.height:0;return(re=Ee.getContext("2d"))===null||re===void 0||re.scale(ae?-1:1,se?-1:1),(ie=Ee.getContext("2d"))===null||ie===void 0||ie.drawImage(Z,fe,ge,Ee.width,Ee.height),Ee},[V.maskSrc,V.flipX,V.flipY,Z,V.a.width,V.a.height,Y]);return l.default.useEffect(()=>()=>{ne&&ne.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(ne)},[ne]),ne};function S(V,Z){const Y=Z.width/Z.height;let ne,re;return Y>=V.width/V.height?(ne=V.width,re=V.width/Y):(ne=V.height*Y,re=V.height),{x:(V.width-ne)/2,y:(V.height-re)/2,width:ne,height:re}}function A(V,Z,Y,ne,re,ie,ae){for(var se=new ImageData(Z,Y),de=new Int32Array(V.data.buffer),he=V.width,Se=new Int32Array(se.data.buffer),Ee=se.width,De=Z/ie,fe=Y/ae,ge=Math.round(1/De),Te=Math.round(1/fe),Re=ge*Te,ue=0;ue<se.height;ue++)for(var me=0;me<Ee;me++){for(var xe=ne+Math.round(me/De)+(re+Math.round(ue/fe))*he,Ie=0,tt=0,lt=0,Fe=0,ze=0;ze<Te;ze++)for(var Ue=0;Ue<ge;Ue++){var Xe=de[xe+Ue+ze*he];Ie+=Xe<<24>>>24,tt+=Xe<<16>>>24,lt+=Xe<<8>>>24,Fe+=Xe>>>24}Ie=Math.round(Ie/Re),tt=Math.round(tt/Re),lt=Math.round(lt/Re),Fe=Math.round(Fe/Re),Se[me+ue*Ee]=Fe<<24|lt<<16|tt<<8|Ie}return se}function M(V,Z){var Y,ne;const re=y();re.width=V.width,re.height=V.height;const ie=Math.max(1,Math.floor(re.width*Z)),ae=Math.max(1,Math.floor(re.height*Z));(Y=re.getContext("2d"))===null||Y===void 0||Y.drawImage(V,0,0,re.width,re.height);const se=A(re.getContext("2d").getImageData(0,0,re.width,re.height),ie,ae,0,0,re.width,re.height);return re.width=ie,re.height=ae,(ne=re.getContext("2d"))===null||ne===void 0||ne.putImageData(se,0,0),re}const T=(V,Z)=>{const[Y,ne]=I(V.maskSrc,"anonymous"),re=V.maskSrc?ne:"loaded";return(0,e.useImageLoader)(re,V.maskSrc||"",V.id),l.default.useMemo(()=>{if(!Y||!Z||!Z.width||!Z.height)return Z;const ie=y();ie.width=Math.max(Z.width,1),ie.height=Math.max(Z.height,1);const ae=ie.getContext("2d");if(!ae)return Z;ae.drawImage(Z,0,0),ae.globalCompositeOperation="source-in";const se=S(Y,V);return ae.drawImage(Y,se.x,se.y,se.width,se.height,0,0,Z.width,Z.height),ie},[Z,Y,V.a.width,V.a.height])},B=(V,Z,Y)=>Math.max(Z,Math.min(Y,V)),U=(V,Z,Y,ne,re=0,ie=!1,ae=!0)=>{const se=Math.floor(B(V.a.width*ne,1,1e4)),de=Math.floor(B(V.a.height*ne,1,1e4)),he=Math.min(re*ne,se/2,de/2),Se=Math.max(V.a.width/Y.width,V.a.height/Y.height)*ne,Ee=V.page._exportingOrRendering&&g.flags.imageDownScalingEnabled&&Se<1&&!ie,De=Y.x===0&&Y.y===0&&Y.width===(Z==null?void 0:Z.width)&&Y.height===(Z==null?void 0:Z.height),fe=l.default.useMemo(()=>{if(!(!Z||!Z.width||!Z.height))return De&&he===0&&!Ee?void 0:y()},[Z,he,Ee,De]);return l.default.useLayoutEffect(()=>{if(!fe||!Z)return;(0,p.trySetCanvasSize)(fe,se,de);const ge=fe.getContext("2d");if(!ge)return;he&&(ge.beginPath(),ge.moveTo(he,0),ge.lineTo(se-he,0),ge.arc(se-he,he,he,3*Math.PI/2,0,!1),ge.lineTo(se,de-he),ge.arc(se-he,de-he,he,0,Math.PI/2,!1),ge.lineTo(he,de),ge.arc(he,de-he,he,Math.PI/2,Math.PI,!1),ge.lineTo(0,he),ge.arc(he,he,he,Math.PI,3*Math.PI/2,!1),ge.clip());const Te=Ee?M(Z,Se):Z,Re=Ee?{x:Math.floor(Y.x*Se),y:Math.floor(Y.y*Se),width:Math.floor(Y.width*Se),height:Math.floor(Y.height*Se)}:Y;ge.drawImage(Te,Re.x,Re.y,Re.width,Re.height,0,0,fe.width,fe.height)},[fe,V.a.width,V.a.height,Y.x,Y.y,Y.width,Y.height,re,ne,ie,V.page._exportingOrRendering,Ee]),l.default.useEffect(()=>()=>{fe&&fe.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(fe)},[fe]),fe||Z},Q=(V,Z,Y,ne)=>{const re=L(V.clipSrc||""),[ie,ae]=I(re,"anonymous"),se=V.clipSrc?ae:"loaded";(0,e.useImageLoader)(se,V.clipSrc,V.id);const de=l.default.useMemo(()=>{if(Z&&ie)return y()},[Z,ie]);return l.default.useLayoutEffect(()=>{var he;if(!ie||!Z||!Z.width||!Z.height||!ie||!ie.width||!ie.height||!de)return;const Se=y(),Ee=Math.max(V.a.width/ie.width*Y,V.a.height/ie.height*Y);Se.width=ie.width*Ee,Se.height=ie.height*Ee,(he=Se.getContext("2d"))===null||he===void 0||he.drawImage(ie,0,0,Se.width,Se.height),de.width=Math.max(Z.width,1),de.height=Math.max(Z.height,1);const De=de.getContext("2d");De&&(De.save(),De.drawImage(Se,0,0,Z.width,Z.height),_.default.Util.releaseCanvas(Se),De.globalCompositeOperation="source-in",De.drawImage(Z,0,0,de.width,de.height),De.restore())},[de,Z,ie,V.a.width,V.a.height,Y,...ne]),V.clipSrc&&ie?de:Z},X=y(),$=(0,u.observer)(({element:V})=>{const Z=Math.min(30,V.a.width/4,V.a.height/4),Y=l.default.useRef(null);return l.default.useEffect(()=>{const ne=Y.current;if(!ne)return;const re=new _.default.Animation(ie=>{ne.rotate(((ie==null?void 0:ie.timeDiff)||0)/2)},ne.getLayer());return re.start(),()=>{re.stop()}}),l.default.createElement(h.Group,{x:V.x,y:V.y,rotation:V.rotation,listening:!1,opacity:V.a.opacity,hideInExport:!V.showInExport},l.default.createElement(h.Rect,{width:V.a.width,height:V.a.height,fill:"rgba(124, 173, 212, 0.8)"}),l.default.createElement(h.Arc,{ref:Y,x:V.a.width/2,y:V.a.height/2,fill:"white",outerRadius:Math.abs(Z),innerRadius:Math.max(1,Z-5),angle:270}))}),j=(0,u.observer)(({element:V})=>{const Z="Can not load the image...",Y=Math.max(10,Math.min(30,V.a.width/25));return l.default.createElement(h.Group,{x:V.x,y:V.y,rotation:V.rotation,listening:!1,opacity:V.a.opacity,hideInExport:!V.showInExport},l.default.createElement(h.Rect,{width:V.a.width,height:V.a.height,fill:"rgba(223, 102, 102, 0.8)"}),l.default.createElement(h.Text,{text:Z,fontSize:Y,width:V.a.width,height:V.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let I=b.default;const z=V=>{I=V};e.setImageLoaderHook=z;const H=(V,Z="",Y="")=>{const ne=l.default.useRef(),re=()=>{var ie;(ie=ne.current)===null||ie===void 0||ie.call(ne),ne.current=void 0};l.default.useEffect(()=>re,[]),l.default.useLayoutEffect(()=>{const ie=Z.slice(0,200),ae=`image with id ${Y} url: ${ie}`;V!=="loading"||ne.current||(ne.current=(0,v.incrementLoader)(ae)),V!=="loading"&&re(),V==="failed"&&(0,v.triggerLoadError)(ae)},[V])};e.useImageLoader=H;const K=({image:V,status:Z,type:Y})=>{const ne=l.default.useRef();return l.default.useEffect(()=>{ne.current=V||ne.current},[V]),Z!=="failed"||Z!=="failed"&&Y==="svg"?ne.current:void 0},ee=V=>{const[Z,Y]=l.default.useReducer(ae=>ae+1,0),ne=l.default.useRef("loading"),re=l.default.useRef(V.src),ie=l.default.useRef(V.src);return ie.current!==V.src&&(ie.current=V.src,ne.current="loading"),l.default.useEffect(()=>{if(V.type!=="svg"||!V.src)return;let ae=!1;return(async()=>{ne.current="loading",Y();const se=await x.urlToString(V.src),de=x.fixSize(se),he=x.replaceColors(de,V.colorsReplace);ae||(re.current=he,ne.current="loaded",Y())})(),()=>{ae=!0}},[V.src,JSON.stringify(V.colorsReplace)]),V.type!=="svg"?[V.src,"loaded"]:[re.current,ne.current]};e.ImageElement=(0,u.observer)(({element:V,store:Z})=>{var Y;const[ne,re]=l.default.useState(!1),ie=l.default.useRef(null),ae=l.default.useRef(null),[se,de]=l.default.useState(!1),he=Z.selectedShapes.indexOf(V)>=0,[Se,Ee]=ee(V),[De,fe]=I(Se,"anonymous"),ge=V.type!=="svg"||Ee==="loaded"?fe:"loading";(0,e.useImageLoader)(ge,V.src,V.id);const Te=V.page._exportingOrRendering?1:Math.max(1,Z.scale),Re=Z._elementsPixelRatio*Te,ue=K({image:De,status:fe,type:V.type}),me=E(V,De||ue,Re),xe=T(V,me)||X;let{cropX:Ie,cropY:tt,cropWidth:lt,cropHeight:Fe}=V;fe!=="loaded"&&(Ie=tt=0,lt=Fe=1);const ze=xe.width*lt,Ue=xe.height*Fe,Xe=V.a.width/V.a.height;let dt,kt;const Et=ze/Ue,be=V.type==="svg";be?(dt=ze,kt=Ue):Xe>=Et?(dt=ze,kt=ze/Xe):(dt=Ue*Xe,kt=Ue);const we={x:xe.width*Ie,y:xe.height*tt,width:dt,height:kt},Ne=(Y=V.cornerRadius)!==null&&Y!==void 0?Y:0,Ye=V.page._exportingOrRendering?1:Math.min(2,Z.scale),Ze=Z._elementsPixelRatio*Ye;let ke=Q(V,U(V,xe,we,Ze,Ne,ne||V._cropModeEnabled||V.type==="svg",!0),Ze,[we,Ne,Ze]);const vt=Math.max(V.a.width/dt,V.a.height/kt);l.default.useEffect(()=>{var Qe;if(!V._cropModeEnabled)return;const _t=(Qe=ie.current)===null||Qe===void 0?void 0:Qe.getStage();function At(Gt){V._cropModeEnabled&&Gt.target!==ae.current&&V.toggleCropMode(!1)}function Ht(Gt){V._cropModeEnabled&&Gt.target.parentNode!==_t.content&&V.toggleCropMode(!1)}return document.body.addEventListener("click",Ht),_t==null||_t.on("click",At),_t==null||_t.on("tap",At),()=>{document.body.removeEventListener("click",Ht),document.body.removeEventListener("touchstart",Ht),_t==null||_t.off("click",At),_t==null||_t.off("click",At)}},[V._cropModeEnabled]),l.default.useLayoutEffect(()=>{if(!(ne||V._cropModeEnabled))return(0,P.applyFilter)(ie.current,V),(0,c.autorun)(()=>{(0,P.applyFilter)(ie.current,V)},{delay:100})},[ke,V.page._exportingOrRendering,ne,lt,Fe,V._cropModeEnabled]),l.default.useLayoutEffect(()=>{var Qe;ne||V._cropModeEnabled?(Qe=ie.current)===null||Qe===void 0||Qe.clearCache():(0,P.applyFilter)(ie.current,V)},[ne,V.a.width,V.a.height,V._cropModeEnabled]),l.default.useEffect(()=>{(0,P.applyFilter)(ie.current,V)},[V.shadowEnabled,V.shadowBlur,V.cornerRadius,V.shadowColor,V.shadowOffsetX,V.shadowOffsetY,V.shadowOpacity]);const je=l.default.useRef(null),ot=l.default.useRef(null),dn=l.default.useRef(null);l.default.useLayoutEffect(()=>{V._cropModeEnabled&&(ot.current.nodes([je.current]),dn.current.nodes([ae.current]))},[V._cropModeEnabled]);var Yt=l.default.useRef(null),hn=l.default.useRef(0),Ge=l.default.useRef(!1);const pt=Qe=>{var _t;((_t=Qe.evt.touches)===null||_t===void 0?void 0:_t.length)>2&&Qe.target.stopDrag(),Math.round(Qe.target.x())>0&&(Qe.target.x(0),Qe.target.scaleX(1)),Math.round(Qe.target.y())>0&&(Qe.target.y(0),Qe.target.scaleY(1));const At=Qe.target.width()*Qe.target.scaleX(),Ht=Qe.target.height()*Qe.target.scaleY(),Gt=Math.min(1,dt/At),Jn=Math.min(1,kt/Ht),Gn=1-Gt,Sn=Math.min(Gn,Math.max(0,Math.round(-Qe.target.x())/At)),oi=1-Jn,Ir=Math.min(oi,Math.max(0,Math.round(-Qe.target.y())/Ht));Qe.target.setAttrs({x:-Sn*xe.width,y:-Ir*xe.height,scaleX:1,scaleY:1}),V.set({cropX:Sn,cropY:Ir,cropWidth:Gt,cropHeight:Jn})},Ot=()=>{V.type!=="svg"&&V.contentEditable&&setTimeout(()=>{V.toggleCropMode(!0)})},zt=V.type==="svg"&&ue,Ut=fe==="loading"&&!zt,pn=fe==="failed",In=!Ut&&!pn,wn=l.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Qn=In?V.a.opacity:0;(0,d.useFadeIn)(ie,Qn);const ii=V.selectable||Z.role==="admin",Sr=(0,m.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,Ut&&l.default.createElement($,{element:V}),pn&&l.default.createElement(j,{element:V}),l.default.createElement(h.Image,{ref:ie,name:"element",id:V.id,image:ke,x:V.a.x,y:V.a.y,width:V.a.width||1,height:V.a.height||1,rotation:V.a.rotation,opacity:Qn,shadowEnabled:V.shadowEnabled,shadowBlur:V.shadowBlur,shadowOffsetX:V.shadowOffsetX,shadowOffsetY:V.shadowOffsetY,shadowColor:V.shadowColor,shadowOpacity:V.shadowOpacity,customCrop:we,listening:ii,draggable:Sr?V.draggable&&he:V.draggable,preventDefault:!Sr||he,hideInExport:!V.showInExport,onMouseEnter:()=>{de(!0)},onMouseLeave:()=>{de(!1)},onDragMove:Qe=>{V.set({x:Qe.target.x(),y:Qe.target.y()})},onDragEnd:Qe=>{V.set({x:Qe.target.x(),y:Qe.target.y()})},onDblClick:Ot,onDblTap:Ot,onTransformStart:()=>{re(!0),wn.current={cropX:V.cropX,cropY:V.cropY,cropWidth:V.cropWidth,cropHeight:V.cropHeight}},onTransform:Qe=>{var _t;const At=Qe.currentTarget,Ht=Math.abs(At.scaleX()-1)<1e-7?1:At.scaleX(),Gt=Math.abs(At.scaleY()-1)<1e-7?1:At.scaleY();At.scaleX(1),At.scaleY(1);const Jn=(_t=Qe.target.getStage())===null||_t===void 0?void 0:_t.findOne("Transformer"),Gn=1-dt/xe.width,Sn=Math.min(Gn,Math.max(0,V.cropX)),oi=1-kt/xe.height,Ir=Math.min(oi,Math.max(0,V.cropY)),Ii=Jn.getActiveAnchor(),No=!(Ii.indexOf("middle")>=0||Ii.indexOf("center")>=0),rs=!No&&Ht<1&&wn.current.cropHeight>kt/xe.height;let Qt=No?V.cropWidth:V.cropWidth*Ht;rs&&(Qt=V.cropWidth);const to=!No&&Gt<1&&wn.current.cropWidth>dt/xe.width;let Dr=No?V.cropHeight:V.cropHeight*Gt;to&&(Dr=V.cropHeight),be&&(Qt=V.cropWidth,Dr=V.cropHeight),V.set({cropX:Sn,cropY:Ir,x:At.x(),y:At.y(),width:At.width()*Ht,height:At.height()*Gt,rotation:Qe.target.rotation(),cropWidth:Math.min(Qt,1-Sn),cropHeight:Math.min(Dr,1-Ir)})},onTransformEnd:Qe=>{const _t=Qe.currentTarget;V.set({width:_t.width(),height:_t.height(),x:_t.x(),y:_t.y(),rotation:Qe.target.rotation(),cropWidth:dt/xe.width,cropHeight:kt/xe.height}),re(!1)}}),l.default.createElement(h.Rect,{x:V.x,y:V.y,width:Math.max(V.a.width-V.borderSize,0),height:Math.max(V.a.height-V.borderSize,0),opacity:Qn,offsetX:-V.borderSize/2,offsetY:-V.borderSize/2,stroke:V.borderColor,strokeWidth:V.borderSize,listening:!1,visible:!!V.borderSize,rotation:V.rotation,cornerRadius:Math.max(0,Ne-V.borderSize),hideInExport:!V.showInExport}),V._cropModeEnabled&&l.default.createElement(k.Portal,{selector:".page-abs-container",enabled:!0},l.default.createElement(h.Rect,{x:-window.innerWidth/Z.scale,y:-window.innerWidth/Z.scale,width:window.innerWidth/Z.scale*3,height:window.innerWidth/Z.scale*3,fill:"rgba(0,0,0,0.3)"}),l.default.createElement(h.Image,{listening:!1,image:ke,x:V.x,y:V.y,width:V.a.width,height:V.a.height,rotation:V.rotation,shadowEnabled:V.shadowEnabled,shadowBlur:V.shadowBlur}),l.default.createElement(h.Group,{x:V.x,y:V.y,rotation:V.rotation,scaleX:vt,scaleY:vt},l.default.createElement(h.Image,{image:xe,ref:ae,opacity:.4,draggable:!0,x:-V.cropX*xe.width,y:-V.cropY*xe.height,onDragMove:pt,onTransform:pt,onTouchMove:Qe=>{Qe.evt.preventDefault();const _t=Qe.target.getStage().getPointersPositions();var At=_t[0],Ht=_t[1];const Gt=Qe.target;if(At&&!Ht&&!Gt.isDragging()&&Ge.current&&(Gt.startDrag(),Ge.current=!1),At&&Ht){_.default.hitOnDragEnabled=!0,Gt.isDragging()&&(Ge.current=!0,Gt.stopDrag());const to=Qe.target.getAbsoluteTransform().copy();to.invert();var Jn={x:At.x,y:At.y},Gn={x:Ht.x,y:Ht.y};if(!Yt.current)return void(Yt.current=D(Jn,Gn));var Sn=D(Jn,Gn),oi=R(Jn,Gn);hn.current||(hn.current=oi);const Dr=Gt.position();var Ir={x:Sn.x-Dr.x,y:Sn.y-Dr.y},Ii=oi/hn.current;Gt.scaleX(Ii),Gt.scaleY(Ii);const ha=to.point(Sn),no=to.point(Yt.current);var No=ha.x-no.x,rs=ha.y-no.y,Qt={x:Math.min(0,Sn.x-Ir.x*Ii+No),y:Math.min(0,Sn.y-Ir.y*Ii+rs)};Gt.position(Qt),hn.current=oi,Yt.current=Sn,pt(Qe)}},onTouchEnd:Qe=>{hn.current=0,Yt.current=null,_.default.hitOnDragEnabled=!1}}),l.default.createElement(h.Transformer,{ref:dn,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Qe,_t)=>_t.width<5||_t.height<5?Qe:_t,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),l.default.createElement(h.Rect,{width:dt,height:kt,ref:je,listening:!1,onTransform:Qe=>{Qe.target.x()<-V.cropX*xe.width-1e-9&&(Qe.target.x(-V.cropX*xe.width),Qe.target.scaleX(1)),Qe.target.y()<-V.cropY*xe.height-1e-9&&(Qe.target.y(-V.cropY*xe.height),Qe.target.scaleY(1));const _t=Math.min(1,Math.max(0,V.cropX+Qe.target.x()/xe.width)),At=Math.min(1,Math.max(0,Qe.target.y()/xe.height+V.cropY)),Ht=Qe.target.width()*Qe.target.scaleX(),Gt=Qe.target.height()*Qe.target.scaleY(),Jn=Math.min(1-_t,Ht/xe.width),Gn=Math.min(1-At,Gt/xe.height),Sn=Qe.target.getAbsolutePosition(Qe.target.getParent().getParent());Qe.target.scale({x:1,y:1}),Qe.target.position({x:0,y:0}),V.set({x:Sn.x,y:Sn.y,cropX:_t,cropY:At,cropWidth:Jn,cropHeight:Gn,width:Math.min(Ht*vt,xe.width*(1-_t)*vt),height:Math.min(Gt*vt,xe.height*(1-At)*vt)})}}),l.default.createElement(h.Transformer,{ref:ot,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Qe,_t)=>_t.width<5||_t.height<5?Qe:_t,visible:V.resizable,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2}))),(se||he)&&l.default.createElement(O.Highlighter,{element:V}))})}(wo)),wo}var So={},ip={exports:{}};/*!
|
|
109
|
-
* Quill Editor v1.3.7
|
|
110
|
-
* https://quilljs.com/
|
|
111
|
-
* Copyright (c) 2014, Jason Chen
|
|
112
|
-
* Copyright (c) 2013, salesforce.com
|
|
113
|
-
*/var QE=ip.exports,P2;function JE(){return P2||(P2=1,function(e,i){(function(n,a){e.exports=a()})(typeof self<"u"?self:QE,function(){return function(t){var n={};function a(l){if(n[l])return n[l].exports;var u=n[l]={i:l,l:!1,exports:{}};return t[l].call(u.exports,u,u.exports,a),u.l=!0,u.exports}return a.m=t,a.c=n,a.d=function(l,u,c){a.o(l,u)||Object.defineProperty(l,u,{configurable:!1,enumerable:!0,get:c})},a.n=function(l){var u=l&&l.__esModule?function(){return l.default}:function(){return l};return a.d(u,"a",u),u},a.o=function(l,u){return Object.prototype.hasOwnProperty.call(l,u)},a.p="",a(a.s=109)}([function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(17),u=a(18),c=a(19),h=a(45),b=a(46),_=a(47),k=a(48),O=a(49),v=a(12),x=a(32),g=a(33),p=a(31),P=a(1),d={Scope:P.Scope,create:P.create,find:P.find,query:P.query,register:P.register,Container:l.default,Format:u.default,Leaf:c.default,Embed:k.default,Scroll:h.default,Block:_.default,Inline:b.default,Text:O.default,Attributor:{Attribute:v.default,Class:x.default,Style:g.default,Store:p.default}};n.default=d},function(t,n,a){var l=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,d){P.__proto__=d}||function(P,d){for(var m in d)d.hasOwnProperty(m)&&(P[m]=d[m])};return function(P,d){p(P,d);function m(){this.constructor=P}P.prototype=d===null?Object.create(d):(m.prototype=d.prototype,new m)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=function(p){l(P,p);function P(d){var m=this;return d="[Parchment] "+d,m=p.call(this,d)||this,m.message=d,m.name=m.constructor.name,m}return P}(Error);n.ParchmentError=u;var c={},h={},b={},_={};n.DATA_KEY="__blot";var k;(function(p){p[p.TYPE=3]="TYPE",p[p.LEVEL=12]="LEVEL",p[p.ATTRIBUTE=13]="ATTRIBUTE",p[p.BLOT=14]="BLOT",p[p.INLINE=7]="INLINE",p[p.BLOCK=11]="BLOCK",p[p.BLOCK_BLOT=10]="BLOCK_BLOT",p[p.INLINE_BLOT=6]="INLINE_BLOT",p[p.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",p[p.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",p[p.ANY=15]="ANY"})(k=n.Scope||(n.Scope={}));function O(p,P){var d=x(p);if(d==null)throw new u("Unable to create "+p+" blot");var m=d,y=p instanceof Node||p.nodeType===Node.TEXT_NODE?p:m.create(P);return new m(y,P)}n.create=O;function v(p,P){return P===void 0&&(P=!1),p==null?null:p[n.DATA_KEY]!=null?p[n.DATA_KEY].blot:P?v(p.parentNode,P):null}n.find=v;function x(p,P){P===void 0&&(P=k.ANY);var d;if(typeof p=="string")d=_[p]||c[p];else if(p instanceof Text||p.nodeType===Node.TEXT_NODE)d=_.text;else if(typeof p=="number")p&k.LEVEL&k.BLOCK?d=_.block:p&k.LEVEL&k.INLINE&&(d=_.inline);else if(p instanceof HTMLElement){var m=(p.getAttribute("class")||"").split(/\s+/);for(var y in m)if(d=h[m[y]],d)break;d=d||b[p.tagName]}return d==null?null:P&k.LEVEL&d.scope&&P&k.TYPE&d.scope?d:null}n.query=x;function g(){for(var p=[],P=0;P<arguments.length;P++)p[P]=arguments[P];if(p.length>1)return p.map(function(y){return g(y)});var d=p[0];if(typeof d.blotName!="string"&&typeof d.attrName!="string")throw new u("Invalid definition");if(d.blotName==="abstract")throw new u("Cannot register abstract class");if(_[d.blotName||d.attrName]=d,typeof d.keyName=="string")c[d.keyName]=d;else if(d.className!=null&&(h[d.className]=d),d.tagName!=null){Array.isArray(d.tagName)?d.tagName=d.tagName.map(function(y){return y.toUpperCase()}):d.tagName=d.tagName.toUpperCase();var m=Array.isArray(d.tagName)?d.tagName:[d.tagName];m.forEach(function(y){(b[y]==null||d.className==null)&&(b[y]=d)})}return d}n.register=g},function(t,n,a){var l=a(51),u=a(11),c=a(3),h=a(20),b="\0",_=function(k){Array.isArray(k)?this.ops=k:k!=null&&Array.isArray(k.ops)?this.ops=k.ops:this.ops=[]};_.prototype.insert=function(k,O){var v={};return k.length===0?this:(v.insert=k,O!=null&&typeof O=="object"&&Object.keys(O).length>0&&(v.attributes=O),this.push(v))},_.prototype.delete=function(k){return k<=0?this:this.push({delete:k})},_.prototype.retain=function(k,O){if(k<=0)return this;var v={retain:k};return O!=null&&typeof O=="object"&&Object.keys(O).length>0&&(v.attributes=O),this.push(v)},_.prototype.push=function(k){var O=this.ops.length,v=this.ops[O-1];if(k=c(!0,{},k),typeof v=="object"){if(typeof k.delete=="number"&&typeof v.delete=="number")return this.ops[O-1]={delete:v.delete+k.delete},this;if(typeof v.delete=="number"&&k.insert!=null&&(O-=1,v=this.ops[O-1],typeof v!="object"))return this.ops.unshift(k),this;if(u(k.attributes,v.attributes)){if(typeof k.insert=="string"&&typeof v.insert=="string")return this.ops[O-1]={insert:v.insert+k.insert},typeof k.attributes=="object"&&(this.ops[O-1].attributes=k.attributes),this;if(typeof k.retain=="number"&&typeof v.retain=="number")return this.ops[O-1]={retain:v.retain+k.retain},typeof k.attributes=="object"&&(this.ops[O-1].attributes=k.attributes),this}}return O===this.ops.length?this.ops.push(k):this.ops.splice(O,0,k),this},_.prototype.chop=function(){var k=this.ops[this.ops.length-1];return k&&k.retain&&!k.attributes&&this.ops.pop(),this},_.prototype.filter=function(k){return this.ops.filter(k)},_.prototype.forEach=function(k){this.ops.forEach(k)},_.prototype.map=function(k){return this.ops.map(k)},_.prototype.partition=function(k){var O=[],v=[];return this.forEach(function(x){var g=k(x)?O:v;g.push(x)}),[O,v]},_.prototype.reduce=function(k,O){return this.ops.reduce(k,O)},_.prototype.changeLength=function(){return this.reduce(function(k,O){return O.insert?k+h.length(O):O.delete?k-O.delete:k},0)},_.prototype.length=function(){return this.reduce(function(k,O){return k+h.length(O)},0)},_.prototype.slice=function(k,O){k=k||0,typeof O!="number"&&(O=1/0);for(var v=[],x=h.iterator(this.ops),g=0;g<O&&x.hasNext();){var p;g<k?p=x.next(k-g):(p=x.next(O-g),v.push(p)),g+=h.length(p)}return new _(v)},_.prototype.compose=function(k){var O=h.iterator(this.ops),v=h.iterator(k.ops),x=[],g=v.peek();if(g!=null&&typeof g.retain=="number"&&g.attributes==null){for(var p=g.retain;O.peekType()==="insert"&&O.peekLength()<=p;)p-=O.peekLength(),x.push(O.next());g.retain-p>0&&v.next(g.retain-p)}for(var P=new _(x);O.hasNext()||v.hasNext();)if(v.peekType()==="insert")P.push(v.next());else if(O.peekType()==="delete")P.push(O.next());else{var d=Math.min(O.peekLength(),v.peekLength()),m=O.next(d),y=v.next(d);if(typeof y.retain=="number"){var w={};typeof m.retain=="number"?w.retain=d:w.insert=m.insert;var L=h.attributes.compose(m.attributes,y.attributes,typeof m.retain=="number");if(L&&(w.attributes=L),P.push(w),!v.hasNext()&&u(P.ops[P.ops.length-1],w)){var R=new _(O.rest());return P.concat(R).chop()}}else typeof y.delete=="number"&&typeof m.retain=="number"&&P.push(y)}return P.chop()},_.prototype.concat=function(k){var O=new _(this.ops.slice());return k.ops.length>0&&(O.push(k.ops[0]),O.ops=O.ops.concat(k.ops.slice(1))),O},_.prototype.diff=function(k,O){if(this.ops===k.ops)return new _;var v=[this,k].map(function(d){return d.map(function(m){if(m.insert!=null)return typeof m.insert=="string"?m.insert:b;var y=d===k?"on":"with";throw new Error("diff() called "+y+" non-document")}).join("")}),x=new _,g=l(v[0],v[1],O),p=h.iterator(this.ops),P=h.iterator(k.ops);return g.forEach(function(d){for(var m=d[1].length;m>0;){var y=0;switch(d[0]){case l.INSERT:y=Math.min(P.peekLength(),m),x.push(P.next(y));break;case l.DELETE:y=Math.min(m,p.peekLength()),p.next(y),x.delete(y);break;case l.EQUAL:y=Math.min(p.peekLength(),P.peekLength(),m);var w=p.next(y),L=P.next(y);u(w.insert,L.insert)?x.retain(y,h.attributes.diff(w.attributes,L.attributes)):x.push(L).delete(y);break}m-=y}}),x.chop()},_.prototype.eachLine=function(k,O){O=O||`
|
|
114
|
-
`;for(var v=h.iterator(this.ops),x=new _,g=0;v.hasNext();){if(v.peekType()!=="insert")return;var p=v.peek(),P=h.length(p)-v.peekLength(),d=typeof p.insert=="string"?p.insert.indexOf(O,P)-P:-1;if(d<0)x.push(v.next());else if(d>0)x.push(v.next(d));else{if(k(x,v.next(1).attributes||{},g)===!1)return;g+=1,x=new _}}x.length()>0&&k(x,{},g)},_.prototype.transform=function(k,O){if(O=!!O,typeof k=="number")return this.transformPosition(k,O);for(var v=h.iterator(this.ops),x=h.iterator(k.ops),g=new _;v.hasNext()||x.hasNext();)if(v.peekType()==="insert"&&(O||x.peekType()!=="insert"))g.retain(h.length(v.next()));else if(x.peekType()==="insert")g.push(x.next());else{var p=Math.min(v.peekLength(),x.peekLength()),P=v.next(p),d=x.next(p);if(P.delete)continue;d.delete?g.push(d):g.retain(p,h.attributes.transform(P.attributes,d.attributes,O))}return g.chop()},_.prototype.transformPosition=function(k,O){O=!!O;for(var v=h.iterator(this.ops),x=0;v.hasNext()&&x<=k;){var g=v.peekLength(),p=v.peekType();if(v.next(),p==="delete"){k-=Math.min(g,k-x);continue}else p==="insert"&&(x<k||!O)&&(k+=g);x+=g}return k},t.exports=_},function(t,n){var a=Object.prototype.hasOwnProperty,l=Object.prototype.toString,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,h=function(v){return typeof Array.isArray=="function"?Array.isArray(v):l.call(v)==="[object Array]"},b=function(v){if(!v||l.call(v)!=="[object Object]")return!1;var x=a.call(v,"constructor"),g=v.constructor&&v.constructor.prototype&&a.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!x&&!g)return!1;var p;for(p in v);return typeof p>"u"||a.call(v,p)},_=function(v,x){u&&x.name==="__proto__"?u(v,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):v[x.name]=x.newValue},k=function(v,x){if(x==="__proto__")if(a.call(v,x)){if(c)return c(v,x).value}else return;return v[x]};t.exports=function O(){var v,x,g,p,P,d,m=arguments[0],y=1,w=arguments.length,L=!1;for(typeof m=="boolean"&&(L=m,m=arguments[1]||{},y=2),(m==null||typeof m!="object"&&typeof m!="function")&&(m={});y<w;++y)if(v=arguments[y],v!=null)for(x in v)g=k(m,x),p=k(v,x),m!==p&&(L&&p&&(b(p)||(P=h(p)))?(P?(P=!1,d=g&&h(g)?g:[]):d=g&&b(g)?g:{},_(m,{name:x,newValue:O(L,d,p)})):typeof p<"u"&&_(m,{name:x,newValue:p}));return m}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var l=function(){function A(M,T){for(var B=0;B<T.length;B++){var U=T[B];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(M,U.key,U)}}return function(M,T,B){return T&&A(M.prototype,T),B&&A(M,B),M}}(),u=function A(M,T,B){M===null&&(M=Function.prototype);var U=Object.getOwnPropertyDescriptor(M,T);if(U===void 0){var Q=Object.getPrototypeOf(M);return Q===null?void 0:A(Q,T,B)}else{if("value"in U)return U.value;var X=U.get;return X===void 0?void 0:X.call(B)}},c=a(3),h=m(c),b=a(2),_=m(b),k=a(0),O=m(k),v=a(16),x=m(v),g=a(6),p=m(g),P=a(7),d=m(P);function m(A){return A&&A.__esModule?A:{default:A}}function y(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function w(A,M){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:A}function L(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(A,M):A.__proto__=M)}var R=1,D=function(A){L(M,A);function M(){return y(this,M),w(this,(M.__proto__||Object.getPrototypeOf(M)).apply(this,arguments))}return l(M,[{key:"attach",value:function(){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"attach",this).call(this),this.attributes=new O.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new _.default().insert(this.value(),(0,h.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(B,U){var Q=O.default.query(B,O.default.Scope.BLOCK_ATTRIBUTE);Q!=null&&this.attributes.attribute(Q,U)}},{key:"formatAt",value:function(B,U,Q,X){this.format(Q,X)}},{key:"insertAt",value:function(B,U,Q){if(typeof U=="string"&&U.endsWith(`
|
|
115
|
-
`)){var X=O.default.create(E.blotName);this.parent.insertBefore(X,B===0?this:this.next),X.insertAt(0,U.slice(0,-1))}else u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,B,U,Q)}}]),M}(O.default.Embed);D.scope=O.default.Scope.BLOCK_BLOT;var E=function(A){L(M,A);function M(T){y(this,M);var B=w(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,T));return B.cache={},B}return l(M,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(O.default.Leaf).reduce(function(B,U){return U.length()===0?B:B.insert(U.value(),S(U))},new _.default).insert(`
|
|
116
|
-
`,S(this))),this.cache.delta}},{key:"deleteAt",value:function(B,U){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"deleteAt",this).call(this,B,U),this.cache={}}},{key:"formatAt",value:function(B,U,Q,X){U<=0||(O.default.query(Q,O.default.Scope.BLOCK)?B+U===this.length()&&this.format(Q,X):u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"formatAt",this).call(this,B,Math.min(U,this.length()-B-1),Q,X),this.cache={})}},{key:"insertAt",value:function(B,U,Q){if(Q!=null)return u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,B,U,Q);if(U.length!==0){var X=U.split(`
|
|
117
|
-
`),$=X.shift();$.length>0&&(B<this.length()-1||this.children.tail==null?u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,Math.min(B,this.length()-1),$):this.children.tail.insertAt(this.children.tail.length(),$),this.cache={});var j=this;X.reduce(function(I,z){return j=j.split(I,!0),j.insertAt(0,z),z.length},B+$.length)}}},{key:"insertBefore",value:function(B,U){var Q=this.children.head;u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertBefore",this).call(this,B,U),Q instanceof x.default&&Q.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"length",this).call(this)+R),this.cache.length}},{key:"moveChildren",value:function(B,U){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"moveChildren",this).call(this,B,U),this.cache={}}},{key:"optimize",value:function(B){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"optimize",this).call(this,B),this.cache={}}},{key:"path",value:function(B){return u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"path",this).call(this,B,!0)}},{key:"removeChild",value:function(B){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"removeChild",this).call(this,B),this.cache={}}},{key:"split",value:function(B){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(U&&(B===0||B>=this.length()-R)){var Q=this.clone();return B===0?(this.parent.insertBefore(Q,this),this):(this.parent.insertBefore(Q,this.next),Q)}else{var X=u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"split",this).call(this,B,U);return this.cache={},X}}}]),M}(O.default.Block);E.blotName="block",E.tagName="P",E.defaultChild="break",E.allowedChildren=[p.default,O.default.Embed,d.default];function S(A){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A==null||(typeof A.formats=="function"&&(M=(0,h.default)(M,A.formats())),A.parent==null||A.parent.blotName=="scroll"||A.parent.statics.scope!==A.statics.scope)?M:S(A.parent,M)}n.bubbleFormats=S,n.BlockEmbed=D,n.default=E},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},u=function(){function j(I,z){var H=[],K=!0,ee=!1,V=void 0;try{for(var Z=I[Symbol.iterator](),Y;!(K=(Y=Z.next()).done)&&(H.push(Y.value),!(z&&H.length===z));K=!0);}catch(ne){ee=!0,V=ne}finally{try{!K&&Z.return&&Z.return()}finally{if(ee)throw V}}return H}return function(I,z){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return j(I,z);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function j(I,z){for(var H=0;H<z.length;H++){var K=z[H];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(I,K.key,K)}}return function(I,z,H){return z&&j(I.prototype,z),H&&j(I,H),I}}();a(50);var h=a(2),b=S(h),_=a(14),k=S(_),O=a(8),v=S(O),x=a(9),g=S(x),p=a(0),P=S(p),d=a(15),m=S(d),y=a(3),w=S(y),L=a(10),R=S(L),D=a(34),E=S(D);function S(j){return j&&j.__esModule?j:{default:j}}function A(j,I,z){return I in j?Object.defineProperty(j,I,{value:z,enumerable:!0,configurable:!0,writable:!0}):j[I]=z,j}function M(j,I){if(!(j instanceof I))throw new TypeError("Cannot call a class as a function")}var T=(0,R.default)("quill"),B=function(){c(j,null,[{key:"debug",value:function(z){z===!0&&(z="log"),R.default.level(z)}},{key:"find",value:function(z){return z.__quill||P.default.find(z)}},{key:"import",value:function(z){return this.imports[z]==null&&T.error("Cannot import "+z+". Are you sure it was registered?"),this.imports[z]}},{key:"register",value:function(z,H){var K=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof z!="string"){var V=z.attrName||z.blotName;typeof V=="string"?this.register("formats/"+V,z,H):Object.keys(z).forEach(function(Z){K.register(Z,z[Z],H)})}else this.imports[z]!=null&&!ee&&T.warn("Overwriting "+z+" with",H),this.imports[z]=H,(z.startsWith("blots/")||z.startsWith("formats/"))&&H.blotName!=="abstract"?P.default.register(H):z.startsWith("modules")&&typeof H.register=="function"&&H.register()}}]);function j(I){var z=this,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(M(this,j),this.options=U(I,H),this.container=this.options.container,this.container==null)return T.error("Invalid Quill container",I);this.options.debug&&j.debug(this.options.debug);var K=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new v.default,this.scroll=P.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new k.default(this.scroll),this.selection=new m.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(v.default.events.EDITOR_CHANGE,function(V){V===v.default.events.TEXT_CHANGE&&z.root.classList.toggle("ql-blank",z.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(V,Z){var Y=z.selection.lastRange,ne=Y&&Y.length===0?Y.index:void 0;Q.call(z,function(){return z.editor.update(null,Z,ne)},V)});var ee=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+K+"<p><br></p></div>");this.setContents(ee),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return c(j,[{key:"addContainer",value:function(z){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof z=="string"){var K=z;z=document.createElement("div"),z.classList.add(K)}return this.container.insertBefore(z,H),z}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(z,H,K){var ee=this,V=X(z,H,K),Z=u(V,4);return z=Z[0],H=Z[1],K=Z[3],Q.call(this,function(){return ee.editor.deleteText(z,H)},K,z,-1*H)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(z),this.container.classList.toggle("ql-disabled",!z)}},{key:"focus",value:function(){var z=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=z,this.scrollIntoView()}},{key:"format",value:function(z,H){var K=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return Q.call(this,function(){var V=K.getSelection(!0),Z=new b.default;if(V==null)return Z;if(P.default.query(z,P.default.Scope.BLOCK))Z=K.editor.formatLine(V.index,V.length,A({},z,H));else{if(V.length===0)return K.selection.format(z,H),Z;Z=K.editor.formatText(V.index,V.length,A({},z,H))}return K.setSelection(V,v.default.sources.SILENT),Z},ee)}},{key:"formatLine",value:function(z,H,K,ee,V){var Z=this,Y=void 0,ne=X(z,H,K,ee,V),re=u(ne,4);return z=re[0],H=re[1],Y=re[2],V=re[3],Q.call(this,function(){return Z.editor.formatLine(z,H,Y)},V,z,0)}},{key:"formatText",value:function(z,H,K,ee,V){var Z=this,Y=void 0,ne=X(z,H,K,ee,V),re=u(ne,4);return z=re[0],H=re[1],Y=re[2],V=re[3],Q.call(this,function(){return Z.editor.formatText(z,H,Y)},V,z,0)}},{key:"getBounds",value:function(z){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,K=void 0;typeof z=="number"?K=this.selection.getBounds(z,H):K=this.selection.getBounds(z.index,z.length);var ee=this.container.getBoundingClientRect();return{bottom:K.bottom-ee.top,height:K.height,left:K.left-ee.left,right:K.right-ee.left,top:K.top-ee.top,width:K.width}}},{key:"getContents",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-z,K=X(z,H),ee=u(K,2);return z=ee[0],H=ee[1],this.editor.getContents(z,H)}},{key:"getFormat",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof z=="number"?this.editor.getFormat(z,H):this.editor.getFormat(z.index,z.length)}},{key:"getIndex",value:function(z){return z.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(z){return this.scroll.leaf(z)}},{key:"getLine",value:function(z){return this.scroll.line(z)}},{key:"getLines",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof z!="number"?this.scroll.lines(z.index,z.length):this.scroll.lines(z,H)}},{key:"getModule",value:function(z){return this.theme.modules[z]}},{key:"getSelection",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return z&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-z,K=X(z,H),ee=u(K,2);return z=ee[0],H=ee[1],this.editor.getText(z,H)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(z,H,K){var ee=this,V=arguments.length>3&&arguments[3]!==void 0?arguments[3]:j.sources.API;return Q.call(this,function(){return ee.editor.insertEmbed(z,H,K)},V,z)}},{key:"insertText",value:function(z,H,K,ee,V){var Z=this,Y=void 0,ne=X(z,0,K,ee,V),re=u(ne,4);return z=re[0],Y=re[2],V=re[3],Q.call(this,function(){return Z.editor.insertText(z,H,Y)},V,z,H.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(z,H,K){this.clipboard.dangerouslyPasteHTML(z,H,K)}},{key:"removeFormat",value:function(z,H,K){var ee=this,V=X(z,H,K),Z=u(V,4);return z=Z[0],H=Z[1],K=Z[3],Q.call(this,function(){return ee.editor.removeFormat(z,H)},K,z)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(z){var H=this,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Q.call(this,function(){z=new b.default(z);var ee=H.getLength(),V=H.editor.deleteText(0,ee),Z=H.editor.applyDelta(z),Y=Z.ops[Z.ops.length-1];Y!=null&&typeof Y.insert=="string"&&Y.insert[Y.insert.length-1]===`
|
|
118
|
-
`&&(H.editor.deleteText(H.getLength()-1,1),Z.delete(1));var ne=V.compose(Z);return ne},K)}},{key:"setSelection",value:function(z,H,K){if(z==null)this.selection.setRange(null,H||j.sources.API);else{var ee=X(z,H,K),V=u(ee,4);z=V[0],H=V[1],K=V[3],this.selection.setRange(new d.Range(z,H),K),K!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(z){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,K=new b.default().insert(z);return this.setContents(K,H)}},{key:"update",value:function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,H=this.scroll.update(z);return this.selection.update(z),H}},{key:"updateContents",value:function(z){var H=this,K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Q.call(this,function(){return z=new b.default(z),H.editor.applyDelta(z,K)},K,!0)}}]),j}();B.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},B.events=v.default.events,B.sources=v.default.sources,B.version="1.3.7",B.imports={delta:b.default,parchment:P.default,"core/module":g.default,"core/theme":E.default};function U(j,I){if(I=(0,w.default)(!0,{container:j,modules:{clipboard:!0,keyboard:!0,history:!0}},I),!I.theme||I.theme===B.DEFAULTS.theme)I.theme=E.default;else if(I.theme=B.import("themes/"+I.theme),I.theme==null)throw new Error("Invalid theme "+I.theme+". Did you register it?");var z=(0,w.default)(!0,{},I.theme.DEFAULTS);[z,I].forEach(function(ee){ee.modules=ee.modules||{},Object.keys(ee.modules).forEach(function(V){ee.modules[V]===!0&&(ee.modules[V]={})})});var H=Object.keys(z.modules).concat(Object.keys(I.modules)),K=H.reduce(function(ee,V){var Z=B.import("modules/"+V);return Z==null?T.error("Cannot load "+V+" module. Are you sure you registered it?"):ee[V]=Z.DEFAULTS||{},ee},{});return I.modules!=null&&I.modules.toolbar&&I.modules.toolbar.constructor!==Object&&(I.modules.toolbar={container:I.modules.toolbar}),I=(0,w.default)(!0,{},B.DEFAULTS,{modules:K},z,I),["bounds","container","scrollingContainer"].forEach(function(ee){typeof I[ee]=="string"&&(I[ee]=document.querySelector(I[ee]))}),I.modules=Object.keys(I.modules).reduce(function(ee,V){return I.modules[V]&&(ee[V]=I.modules[V]),ee},{}),I}function Q(j,I,z,H){if(this.options.strict&&!this.isEnabled()&&I===v.default.sources.USER)return new b.default;var K=z==null?null:this.getSelection(),ee=this.editor.delta,V=j();if(K!=null&&(z===!0&&(z=K.index),H==null?K=$(K,V,I):H!==0&&(K=$(K,z,H,I)),this.setSelection(K,v.default.sources.SILENT)),V.length()>0){var Z,Y=[v.default.events.TEXT_CHANGE,V,ee,I];if((Z=this.emitter).emit.apply(Z,[v.default.events.EDITOR_CHANGE].concat(Y)),I!==v.default.sources.SILENT){var ne;(ne=this.emitter).emit.apply(ne,Y)}}return V}function X(j,I,z,H,K){var ee={};return typeof j.index=="number"&&typeof j.length=="number"?typeof I!="number"?(K=H,H=z,z=I,I=j.length,j=j.index):(I=j.length,j=j.index):typeof I!="number"&&(K=H,H=z,z=I,I=0),(typeof z>"u"?"undefined":l(z))==="object"?(ee=z,K=H):typeof z=="string"&&(H!=null?ee[z]=H:K=z),K=K||v.default.sources.API,[j,I,ee,K]}function $(j,I,z,H){if(j==null)return null;var K=void 0,ee=void 0;if(I instanceof b.default){var V=[j.index,j.index+j.length].map(function(re){return I.transformPosition(re,H!==v.default.sources.USER)}),Z=u(V,2);K=Z[0],ee=Z[1]}else{var Y=[j.index,j.index+j.length].map(function(re){return re<I||re===I&&H===v.default.sources.USER?re:z>=0?re+z:Math.max(I,re+z)}),ne=u(Y,2);K=ne[0],ee=ne[1]}return new d.Range(K,ee-K)}n.expandConfig=U,n.overload=X,n.default=B},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function p(P,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(P,y.key,y)}}return function(P,d,m){return d&&p(P.prototype,d),m&&p(P,m),P}}(),u=function p(P,d,m){P===null&&(P=Function.prototype);var y=Object.getOwnPropertyDescriptor(P,d);if(y===void 0){var w=Object.getPrototypeOf(P);return w===null?void 0:p(w,d,m)}else{if("value"in y)return y.value;var L=y.get;return L===void 0?void 0:L.call(m)}},c=a(7),h=k(c),b=a(0),_=k(b);function k(p){return p&&p.__esModule?p:{default:p}}function O(p,P){if(!(p instanceof P))throw new TypeError("Cannot call a class as a function")}function v(p,P){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:p}function x(p,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);p.prototype=Object.create(P&&P.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(p,P):p.__proto__=P)}var g=function(p){x(P,p);function P(){return O(this,P),v(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return l(P,[{key:"formatAt",value:function(m,y,w,L){if(P.compare(this.statics.blotName,w)<0&&_.default.query(w,_.default.Scope.BLOT)){var R=this.isolate(m,y);L&&R.wrap(w,L)}else u(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"formatAt",this).call(this,m,y,w,L)}},{key:"optimize",value:function(m){if(u(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,m),this.parent instanceof P&&P.compare(this.statics.blotName,this.parent.statics.blotName)>0){var y=this.parent.isolate(this.offset(),this.length());this.moveChildren(y),y.wrap(this)}}}],[{key:"compare",value:function(m,y){var w=P.order.indexOf(m),L=P.order.indexOf(y);return w>=0||L>=0?w-L:m===y?0:m<y?-1:1}}]),P}(_.default.Inline);g.allowedChildren=[g,_.default.Embed,h.default],g.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(0),u=c(l);function c(O){return O&&O.__esModule?O:{default:O}}function h(O,v){if(!(O instanceof v))throw new TypeError("Cannot call a class as a function")}function b(O,v){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:O}function _(O,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);O.prototype=Object.create(v&&v.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(O,v):O.__proto__=v)}var k=function(O){_(v,O);function v(){return h(this,v),b(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(u.default.Text);n.default=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function d(m,y){for(var w=0;w<y.length;w++){var L=y[w];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(m,L.key,L)}}return function(m,y,w){return y&&d(m.prototype,y),w&&d(m,w),m}}(),u=function d(m,y,w){m===null&&(m=Function.prototype);var L=Object.getOwnPropertyDescriptor(m,y);if(L===void 0){var R=Object.getPrototypeOf(m);return R===null?void 0:d(R,y,w)}else{if("value"in L)return L.value;var D=L.get;return D===void 0?void 0:D.call(w)}},c=a(54),h=k(c),b=a(10),_=k(b);function k(d){return d&&d.__esModule?d:{default:d}}function O(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}function v(d,m){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:d}function x(d,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);d.prototype=Object.create(m&&m.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(d,m):d.__proto__=m)}var g=(0,_.default)("quill:events"),p=["selectionchange","mousedown","mouseup","click"];p.forEach(function(d){document.addEventListener(d,function(){for(var m=arguments.length,y=Array(m),w=0;w<m;w++)y[w]=arguments[w];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(L){if(L.__quill&&L.__quill.emitter){var R;(R=L.__quill.emitter).handleDOM.apply(R,y)}})})});var P=function(d){x(m,d);function m(){O(this,m);var y=v(this,(m.__proto__||Object.getPrototypeOf(m)).call(this));return y.listeners={},y.on("error",g.error),y}return l(m,[{key:"emit",value:function(){g.log.apply(g,arguments),u(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(w){for(var L=arguments.length,R=Array(L>1?L-1:0),D=1;D<L;D++)R[D-1]=arguments[D];(this.listeners[w.type]||[]).forEach(function(E){var S=E.node,A=E.handler;(w.target===S||S.contains(w.target))&&A.apply(void 0,[w].concat(R))})}},{key:"listenDOM",value:function(w,L,R){this.listeners[w]||(this.listeners[w]=[]),this.listeners[w].push({node:L,handler:R})}}]),m}(h.default);P.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},P.sources={API:"api",SILENT:"silent",USER:"user"},n.default=P},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});function l(c,h){if(!(c instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function c(h){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(this,c),this.quill=h,this.options=b};u.DEFAULTS={},n.default=u},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=["error","warn","log","info"],u="warn";function c(b){if(l.indexOf(b)<=l.indexOf(u)){for(var _,k=arguments.length,O=Array(k>1?k-1:0),v=1;v<k;v++)O[v-1]=arguments[v];(_=console)[b].apply(_,O)}}function h(b){return l.reduce(function(_,k){return _[k]=c.bind(console,k,b),_},{})}c.level=h.level=function(b){u=b},n.default=h},function(t,n,a){var l=Array.prototype.slice,u=a(52),c=a(53),h=t.exports=function(O,v,x){return x||(x={}),O===v?!0:O instanceof Date&&v instanceof Date?O.getTime()===v.getTime():!O||!v||typeof O!="object"&&typeof v!="object"?x.strict?O===v:O==v:k(O,v,x)};function b(O){return O==null}function _(O){return!(!O||typeof O!="object"||typeof O.length!="number"||typeof O.copy!="function"||typeof O.slice!="function"||O.length>0&&typeof O[0]!="number")}function k(O,v,x){var g,p;if(b(O)||b(v)||O.prototype!==v.prototype)return!1;if(c(O))return c(v)?(O=l.call(O),v=l.call(v),h(O,v,x)):!1;if(_(O)){if(!_(v)||O.length!==v.length)return!1;for(g=0;g<O.length;g++)if(O[g]!==v[g])return!1;return!0}try{var P=u(O),d=u(v)}catch{return!1}if(P.length!=d.length)return!1;for(P.sort(),d.sort(),g=P.length-1;g>=0;g--)if(P[g]!=d[g])return!1;for(g=P.length-1;g>=0;g--)if(p=P[g],!h(O[p],v[p],x))return!1;return typeof O==typeof v}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(1),u=function(){function c(h,b,_){_===void 0&&(_={}),this.attrName=h,this.keyName=b;var k=l.Scope.TYPE&l.Scope.ATTRIBUTE;_.scope!=null?this.scope=_.scope&l.Scope.LEVEL|k:this.scope=l.Scope.ATTRIBUTE,_.whitelist!=null&&(this.whitelist=_.whitelist)}return c.keys=function(h){return[].map.call(h.attributes,function(b){return b.name})},c.prototype.add=function(h,b){return this.canAdd(h,b)?(h.setAttribute(this.keyName,b),!0):!1},c.prototype.canAdd=function(h,b){var _=l.query(h,l.Scope.BLOT&(this.scope|l.Scope.TYPE));return _==null?!1:this.whitelist==null?!0:typeof b=="string"?this.whitelist.indexOf(b.replace(/["']/g,""))>-1:this.whitelist.indexOf(b)>-1},c.prototype.remove=function(h){h.removeAttribute(this.keyName)},c.prototype.value=function(h){var b=h.getAttribute(this.keyName);return this.canAdd(h,b)&&b?b:""},c}();n.default=u},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var l=function(){function D(E,S){var A=[],M=!0,T=!1,B=void 0;try{for(var U=E[Symbol.iterator](),Q;!(M=(Q=U.next()).done)&&(A.push(Q.value),!(S&&A.length===S));M=!0);}catch(X){T=!0,B=X}finally{try{!M&&U.return&&U.return()}finally{if(T)throw B}}return A}return function(E,S){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return D(E,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function D(E,S){for(var A=0;A<S.length;A++){var M=S[A];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(E,M.key,M)}}return function(E,S,A){return S&&D(E.prototype,S),A&&D(E,A),E}}(),c=function D(E,S,A){E===null&&(E=Function.prototype);var M=Object.getOwnPropertyDescriptor(E,S);if(M===void 0){var T=Object.getPrototypeOf(E);return T===null?void 0:D(T,S,A)}else{if("value"in M)return M.value;var B=M.get;return B===void 0?void 0:B.call(A)}},h=a(2),b=d(h),_=a(0),k=d(_),O=a(4),v=d(O),x=a(6),g=d(x),p=a(7),P=d(p);function d(D){return D&&D.__esModule?D:{default:D}}function m(D,E){if(!(D instanceof E))throw new TypeError("Cannot call a class as a function")}function y(D,E){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:D}function w(D,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);D.prototype=Object.create(E&&E.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(D,E):D.__proto__=E)}var L=function(D){w(E,D);function E(){return m(this,E),y(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return E}(g.default);L.blotName="code",L.tagName="CODE";var R=function(D){w(E,D);function E(){return m(this,E),y(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return u(E,[{key:"delta",value:function(){var A=this,M=this.domNode.textContent;return M.endsWith(`
|
|
119
|
-
`)&&(M=M.slice(0,-1)),M.split(`
|
|
120
|
-
`).reduce(function(T,B){return T.insert(B).insert(`
|
|
121
|
-
`,A.formats())},new b.default)}},{key:"format",value:function(A,M){if(!(A===this.statics.blotName&&M)){var T=this.descendant(P.default,this.length()-1),B=l(T,1),U=B[0];U!=null&&U.deleteAt(U.length()-1,1),c(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,A,M)}}},{key:"formatAt",value:function(A,M,T,B){if(M!==0&&!(k.default.query(T,k.default.Scope.BLOCK)==null||T===this.statics.blotName&&B===this.statics.formats(this.domNode))){var U=this.newlineIndex(A);if(!(U<0||U>=A+M)){var Q=this.newlineIndex(A,!0)+1,X=U-Q+1,$=this.isolate(Q,X),j=$.next;$.format(T,B),j instanceof E&&j.formatAt(0,A-Q+M-X,T,B)}}}},{key:"insertAt",value:function(A,M,T){if(T==null){var B=this.descendant(P.default,A),U=l(B,2),Q=U[0],X=U[1];Q.insertAt(X,M)}}},{key:"length",value:function(){var A=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
122
|
-
`)?A:A+1}},{key:"newlineIndex",value:function(A){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(M)return this.domNode.textContent.slice(0,A).lastIndexOf(`
|
|
123
|
-
`);var T=this.domNode.textContent.slice(A).indexOf(`
|
|
124
|
-
`);return T>-1?A+T:-1}},{key:"optimize",value:function(A){this.domNode.textContent.endsWith(`
|
|
125
|
-
`)||this.appendChild(k.default.create("text",`
|
|
126
|
-
`)),c(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,A);var M=this.next;M!=null&&M.prev===this&&M.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===M.statics.formats(M.domNode)&&(M.optimize(A),M.moveChildren(this),M.remove())}},{key:"replace",value:function(A){c(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replace",this).call(this,A),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(M){var T=k.default.find(M);T==null?M.parentNode.removeChild(M):T instanceof k.default.Embed?T.remove():T.unwrap()})}}],[{key:"create",value:function(A){var M=c(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,A);return M.setAttribute("spellcheck",!1),M}},{key:"formats",value:function(){return!0}}]),E}(v.default);R.blotName="code-block",R.tagName="PRE",R.TAB=" ",n.Code=L,n.default=R},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},u=function(){function j(I,z){var H=[],K=!0,ee=!1,V=void 0;try{for(var Z=I[Symbol.iterator](),Y;!(K=(Y=Z.next()).done)&&(H.push(Y.value),!(z&&H.length===z));K=!0);}catch(ne){ee=!0,V=ne}finally{try{!K&&Z.return&&Z.return()}finally{if(ee)throw V}}return H}return function(I,z){if(Array.isArray(I))return I;if(Symbol.iterator in Object(I))return j(I,z);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function j(I,z){for(var H=0;H<z.length;H++){var K=z[H];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(I,K.key,K)}}return function(I,z,H){return z&&j(I.prototype,z),H&&j(I,H),I}}(),h=a(2),b=M(h),_=a(20),k=M(_),O=a(0),v=M(O),x=a(13),g=M(x),p=a(24),P=M(p),d=a(4),m=M(d),y=a(16),w=M(y),L=a(21),R=M(L),D=a(11),E=M(D),S=a(3),A=M(S);function M(j){return j&&j.__esModule?j:{default:j}}function T(j,I,z){return I in j?Object.defineProperty(j,I,{value:z,enumerable:!0,configurable:!0,writable:!0}):j[I]=z,j}function B(j,I){if(!(j instanceof I))throw new TypeError("Cannot call a class as a function")}var U=/^[ -~]*$/,Q=function(){function j(I){B(this,j),this.scroll=I,this.delta=this.getDelta()}return c(j,[{key:"applyDelta",value:function(z){var H=this,K=!1;this.scroll.update();var ee=this.scroll.length();return this.scroll.batchStart(),z=$(z),z.reduce(function(V,Z){var Y=Z.retain||Z.delete||Z.insert.length||1,ne=Z.attributes||{};if(Z.insert!=null){if(typeof Z.insert=="string"){var re=Z.insert;re.endsWith(`
|
|
127
|
-
`)&&K&&(K=!1,re=re.slice(0,-1)),V>=ee&&!re.endsWith(`
|
|
128
|
-
`)&&(K=!0),H.scroll.insertAt(V,re);var ie=H.scroll.line(V),ae=u(ie,2),se=ae[0],de=ae[1],he=(0,A.default)({},(0,d.bubbleFormats)(se));if(se instanceof m.default){var Se=se.descendant(v.default.Leaf,de),Ee=u(Se,1),De=Ee[0];he=(0,A.default)(he,(0,d.bubbleFormats)(De))}ne=k.default.attributes.diff(he,ne)||{}}else if(l(Z.insert)==="object"){var fe=Object.keys(Z.insert)[0];if(fe==null)return V;H.scroll.insertAt(V,fe,Z.insert[fe])}ee+=Y}return Object.keys(ne).forEach(function(ge){H.scroll.formatAt(V,Y,ge,ne[ge])}),V+Y},0),z.reduce(function(V,Z){return typeof Z.delete=="number"?(H.scroll.deleteAt(V,Z.delete),V):V+(Z.retain||Z.insert.length||1)},0),this.scroll.batchEnd(),this.update(z)}},{key:"deleteText",value:function(z,H){return this.scroll.deleteAt(z,H),this.update(new b.default().retain(z).delete(H))}},{key:"formatLine",value:function(z,H){var K=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(ee).forEach(function(V){if(!(K.scroll.whitelist!=null&&!K.scroll.whitelist[V])){var Z=K.scroll.lines(z,Math.max(H,1)),Y=H;Z.forEach(function(ne){var re=ne.length();if(!(ne instanceof g.default))ne.format(V,ee[V]);else{var ie=z-ne.offset(K.scroll),ae=ne.newlineIndex(ie+Y)-ie+1;ne.formatAt(ie,ae,V,ee[V])}Y-=re})}}),this.scroll.optimize(),this.update(new b.default().retain(z).retain(H,(0,R.default)(ee)))}},{key:"formatText",value:function(z,H){var K=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(ee).forEach(function(V){K.scroll.formatAt(z,H,V,ee[V])}),this.update(new b.default().retain(z).retain(H,(0,R.default)(ee)))}},{key:"getContents",value:function(z,H){return this.delta.slice(z,z+H)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(z,H){return z.concat(H.delta())},new b.default)}},{key:"getFormat",value:function(z){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,K=[],ee=[];H===0?this.scroll.path(z).forEach(function(Z){var Y=u(Z,1),ne=Y[0];ne instanceof m.default?K.push(ne):ne instanceof v.default.Leaf&&ee.push(ne)}):(K=this.scroll.lines(z,H),ee=this.scroll.descendants(v.default.Leaf,z,H));var V=[K,ee].map(function(Z){if(Z.length===0)return{};for(var Y=(0,d.bubbleFormats)(Z.shift());Object.keys(Y).length>0;){var ne=Z.shift();if(ne==null)return Y;Y=X((0,d.bubbleFormats)(ne),Y)}return Y});return A.default.apply(A.default,V)}},{key:"getText",value:function(z,H){return this.getContents(z,H).filter(function(K){return typeof K.insert=="string"}).map(function(K){return K.insert}).join("")}},{key:"insertEmbed",value:function(z,H,K){return this.scroll.insertAt(z,H,K),this.update(new b.default().retain(z).insert(T({},H,K)))}},{key:"insertText",value:function(z,H){var K=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return H=H.replace(/\r\n/g,`
|
|
129
|
-
`).replace(/\r/g,`
|
|
130
|
-
`),this.scroll.insertAt(z,H),Object.keys(ee).forEach(function(V){K.scroll.formatAt(z,H.length,V,ee[V])}),this.update(new b.default().retain(z).insert(H,(0,R.default)(ee)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var z=this.scroll.children.head;return z.statics.blotName!==m.default.blotName||z.children.length>1?!1:z.children.head instanceof w.default}},{key:"removeFormat",value:function(z,H){var K=this.getText(z,H),ee=this.scroll.line(z+H),V=u(ee,2),Z=V[0],Y=V[1],ne=0,re=new b.default;Z!=null&&(Z instanceof g.default?ne=Z.newlineIndex(Y)-Y+1:ne=Z.length()-Y,re=Z.delta().slice(Y,Y+ne-1).insert(`
|
|
131
|
-
`));var ie=this.getContents(z,H+ne),ae=ie.diff(new b.default().insert(K).concat(re)),se=new b.default().retain(z).concat(ae);return this.applyDelta(se)}},{key:"update",value:function(z){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,ee=this.delta;if(H.length===1&&H[0].type==="characterData"&&H[0].target.data.match(U)&&v.default.find(H[0].target)){var V=v.default.find(H[0].target),Z=(0,d.bubbleFormats)(V),Y=V.offset(this.scroll),ne=H[0].oldValue.replace(P.default.CONTENTS,""),re=new b.default().insert(ne),ie=new b.default().insert(V.value()),ae=new b.default().retain(Y).concat(re.diff(ie,K));z=ae.reduce(function(se,de){return de.insert?se.insert(de.insert,Z):se.push(de)},new b.default),this.delta=ee.compose(z)}else this.delta=this.getDelta(),(!z||!(0,E.default)(ee.compose(z),this.delta))&&(z=ee.diff(this.delta,K));return z}}]),j}();function X(j,I){return Object.keys(I).reduce(function(z,H){return j[H]==null||(I[H]===j[H]?z[H]=I[H]:Array.isArray(I[H])?I[H].indexOf(j[H])<0&&(z[H]=I[H].concat([j[H]])):z[H]=[I[H],j[H]]),z},{})}function $(j){return j.reduce(function(I,z){if(z.insert===1){var H=(0,R.default)(z.attributes);return delete H.image,I.insert({image:z.attributes.image},H)}if(z.attributes!=null&&(z.attributes.list===!0||z.attributes.bullet===!0)&&(z=(0,R.default)(z),z.attributes.list?z.attributes.list="ordered":(z.attributes.list="bullet",delete z.attributes.bullet)),typeof z.insert=="string"){var K=z.insert.replace(/\r\n/g,`
|
|
132
|
-
`).replace(/\r/g,`
|
|
133
|
-
`);return I.insert(K,z.attributes)}return I.push(z)},new b.default)}n.default=Q},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var l=function(){function D(E,S){var A=[],M=!0,T=!1,B=void 0;try{for(var U=E[Symbol.iterator](),Q;!(M=(Q=U.next()).done)&&(A.push(Q.value),!(S&&A.length===S));M=!0);}catch(X){T=!0,B=X}finally{try{!M&&U.return&&U.return()}finally{if(T)throw B}}return A}return function(E,S){if(Array.isArray(E))return E;if(Symbol.iterator in Object(E))return D(E,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function D(E,S){for(var A=0;A<S.length;A++){var M=S[A];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(E,M.key,M)}}return function(E,S,A){return S&&D(E.prototype,S),A&&D(E,A),E}}(),c=a(0),h=P(c),b=a(21),_=P(b),k=a(11),O=P(k),v=a(8),x=P(v),g=a(10),p=P(g);function P(D){return D&&D.__esModule?D:{default:D}}function d(D){if(Array.isArray(D)){for(var E=0,S=Array(D.length);E<D.length;E++)S[E]=D[E];return S}else return Array.from(D)}function m(D,E){if(!(D instanceof E))throw new TypeError("Cannot call a class as a function")}var y=(0,p.default)("quill:selection"),w=function D(E){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;m(this,D),this.index=E,this.length=S},L=function(){function D(E,S){var A=this;m(this,D),this.emitter=S,this.scroll=E,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=h.default.create("cursor",this),this.lastRange=this.savedRange=new w(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){A.mouseDown||setTimeout(A.update.bind(A,x.default.sources.USER),1)}),this.emitter.on(x.default.events.EDITOR_CHANGE,function(M,T){M===x.default.events.TEXT_CHANGE&&T.length()>0&&A.update(x.default.sources.SILENT)}),this.emitter.on(x.default.events.SCROLL_BEFORE_UPDATE,function(){if(A.hasFocus()){var M=A.getNativeRange();M!=null&&M.start.node!==A.cursor.textNode&&A.emitter.once(x.default.events.SCROLL_UPDATE,function(){try{A.setNativeRange(M.start.node,M.start.offset,M.end.node,M.end.offset)}catch{}})}}),this.emitter.on(x.default.events.SCROLL_OPTIMIZE,function(M,T){if(T.range){var B=T.range,U=B.startNode,Q=B.startOffset,X=B.endNode,$=B.endOffset;A.setNativeRange(U,Q,X,$)}}),this.update(x.default.sources.SILENT)}return u(D,[{key:"handleComposition",value:function(){var S=this;this.root.addEventListener("compositionstart",function(){S.composing=!0}),this.root.addEventListener("compositionend",function(){if(S.composing=!1,S.cursor.parent){var A=S.cursor.restore();if(!A)return;setTimeout(function(){S.setNativeRange(A.startNode,A.startOffset,A.endNode,A.endOffset)},1)}})}},{key:"handleDragging",value:function(){var S=this;this.emitter.listenDOM("mousedown",document.body,function(){S.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){S.mouseDown=!1,S.update(x.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(S,A){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[S])){this.scroll.update();var M=this.getNativeRange();if(!(M==null||!M.native.collapsed||h.default.query(S,h.default.Scope.BLOCK))){if(M.start.node!==this.cursor.textNode){var T=h.default.find(M.start.node,!1);if(T==null)return;if(T instanceof h.default.Leaf){var B=T.split(M.start.offset);T.parent.insertBefore(this.cursor,B)}else T.insertBefore(this.cursor,M.start.node);this.cursor.attach()}this.cursor.format(S,A),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(S){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=this.scroll.length();S=Math.min(S,M-1),A=Math.min(S+A,M-1)-S;var T=void 0,B=this.scroll.leaf(S),U=l(B,2),Q=U[0],X=U[1];if(Q==null)return null;var $=Q.position(X,!0),j=l($,2);T=j[0],X=j[1];var I=document.createRange();if(A>0){I.setStart(T,X);var z=this.scroll.leaf(S+A),H=l(z,2);if(Q=H[0],X=H[1],Q==null)return null;var K=Q.position(X,!0),ee=l(K,2);return T=ee[0],X=ee[1],I.setEnd(T,X),I.getBoundingClientRect()}else{var V="left",Z=void 0;return T instanceof Text?(X<T.data.length?(I.setStart(T,X),I.setEnd(T,X+1)):(I.setStart(T,X-1),I.setEnd(T,X),V="right"),Z=I.getBoundingClientRect()):(Z=Q.domNode.getBoundingClientRect(),X>0&&(V="right")),{bottom:Z.top+Z.height,height:Z.height,left:Z[V],right:Z[V],top:Z.top,width:0}}}},{key:"getNativeRange",value:function(){var S=document.getSelection();if(S==null||S.rangeCount<=0)return null;var A=S.getRangeAt(0);if(A==null)return null;var M=this.normalizeNative(A);return y.info("getNativeRange",M),M}},{key:"getRange",value:function(){var S=this.getNativeRange();if(S==null)return[null,null];var A=this.normalizedToRange(S);return[A,S]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(S){var A=this,M=[[S.start.node,S.start.offset]];S.native.collapsed||M.push([S.end.node,S.end.offset]);var T=M.map(function(Q){var X=l(Q,2),$=X[0],j=X[1],I=h.default.find($,!0),z=I.offset(A.scroll);return j===0?z:I instanceof h.default.Container?z+I.length():z+I.index($,j)}),B=Math.min(Math.max.apply(Math,d(T)),this.scroll.length()-1),U=Math.min.apply(Math,[B].concat(d(T)));return new w(U,B-U)}},{key:"normalizeNative",value:function(S){if(!R(this.root,S.startContainer)||!S.collapsed&&!R(this.root,S.endContainer))return null;var A={start:{node:S.startContainer,offset:S.startOffset},end:{node:S.endContainer,offset:S.endOffset},native:S};return[A.start,A.end].forEach(function(M){for(var T=M.node,B=M.offset;!(T instanceof Text)&&T.childNodes.length>0;)if(T.childNodes.length>B)T=T.childNodes[B],B=0;else if(T.childNodes.length===B)T=T.lastChild,B=T instanceof Text?T.data.length:T.childNodes.length+1;else break;M.node=T,M.offset=B}),A}},{key:"rangeToNative",value:function(S){var A=this,M=S.collapsed?[S.index]:[S.index,S.index+S.length],T=[],B=this.scroll.length();return M.forEach(function(U,Q){U=Math.min(B-1,U);var X=void 0,$=A.scroll.leaf(U),j=l($,2),I=j[0],z=j[1],H=I.position(z,Q!==0),K=l(H,2);X=K[0],z=K[1],T.push(X,z)}),T.length<2&&(T=T.concat(T)),T}},{key:"scrollIntoView",value:function(S){var A=this.lastRange;if(A!=null){var M=this.getBounds(A.index,A.length);if(M!=null){var T=this.scroll.length()-1,B=this.scroll.line(Math.min(A.index,T)),U=l(B,1),Q=U[0],X=Q;if(A.length>0){var $=this.scroll.line(Math.min(A.index+A.length,T)),j=l($,1);X=j[0]}if(!(Q==null||X==null)){var I=S.getBoundingClientRect();M.top<I.top?S.scrollTop-=I.top-M.top:M.bottom>I.bottom&&(S.scrollTop+=M.bottom-I.bottom)}}}}},{key:"setNativeRange",value:function(S,A){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:S,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:A,B=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(y.info("setNativeRange",S,A,M,T),!(S!=null&&(this.root.parentNode==null||S.parentNode==null||M.parentNode==null))){var U=document.getSelection();if(U!=null)if(S!=null){this.hasFocus()||this.root.focus();var Q=(this.getNativeRange()||{}).native;if(Q==null||B||S!==Q.startContainer||A!==Q.startOffset||M!==Q.endContainer||T!==Q.endOffset){S.tagName=="BR"&&(A=[].indexOf.call(S.parentNode.childNodes,S),S=S.parentNode),M.tagName=="BR"&&(T=[].indexOf.call(M.parentNode.childNodes,M),M=M.parentNode);var X=document.createRange();X.setStart(S,A),X.setEnd(M,T),U.removeAllRanges(),U.addRange(X)}}else U.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(S){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x.default.sources.API;if(typeof A=="string"&&(M=A,A=!1),y.info("setRange",S),S!=null){var T=this.rangeToNative(S);this.setNativeRange.apply(this,d(T).concat([A]))}else this.setNativeRange(null);this.update(M)}},{key:"update",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.default.sources.USER,A=this.lastRange,M=this.getRange(),T=l(M,2),B=T[0],U=T[1];if(this.lastRange=B,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,O.default)(A,this.lastRange)){var Q;!this.composing&&U!=null&&U.native.collapsed&&U.start.node!==this.cursor.textNode&&this.cursor.restore();var X=[x.default.events.SELECTION_CHANGE,(0,_.default)(this.lastRange),(0,_.default)(A),S];if((Q=this.emitter).emit.apply(Q,[x.default.events.EDITOR_CHANGE].concat(X)),S!==x.default.sources.SILENT){var $;($=this.emitter).emit.apply($,X)}}}}]),D}();function R(D,E){try{E.parentNode}catch{return!1}return E instanceof Text&&(E=E.parentNode),D.contains(E)}n.Range=w,n.default=L},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function x(g,p){for(var P=0;P<p.length;P++){var d=p[P];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}return function(g,p,P){return p&&x(g.prototype,p),P&&x(g,P),g}}(),u=function x(g,p,P){g===null&&(g=Function.prototype);var d=Object.getOwnPropertyDescriptor(g,p);if(d===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:x(m,p,P)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(P)}},c=a(0),h=b(c);function b(x){return x&&x.__esModule?x:{default:x}}function _(x,g){if(!(x instanceof g))throw new TypeError("Cannot call a class as a function")}function k(x,g){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:x}function O(x,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);x.prototype=Object.create(g&&g.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(x,g):x.__proto__=g)}var v=function(x){O(g,x);function g(){return _(this,g),k(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return l(g,[{key:"insertInto",value:function(P,d){P.children.length===0?u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"insertInto",this).call(this,P,d):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),g}(h.default.Embed);v.blotName="break",v.tagName="BR",n.default=v},function(t,n,a){var l=this&&this.__extends||function(){var k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,v){O.__proto__=v}||function(O,v){for(var x in v)v.hasOwnProperty(x)&&(O[x]=v[x])};return function(O,v){k(O,v);function x(){this.constructor=O}O.prototype=v===null?Object.create(v):(x.prototype=v.prototype,new x)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(44),c=a(30),h=a(1),b=function(k){l(O,k);function O(v){var x=k.call(this,v)||this;return x.build(),x}return O.prototype.appendChild=function(v){this.insertBefore(v)},O.prototype.attach=function(){k.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},O.prototype.build=function(){var v=this;this.children=new u.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(x){try{var g=_(x);v.insertBefore(g,v.children.head||void 0)}catch(p){if(p instanceof h.ParchmentError)return;throw p}})},O.prototype.deleteAt=function(v,x){if(v===0&&x===this.length())return this.remove();this.children.forEachAt(v,x,function(g,p,P){g.deleteAt(p,P)})},O.prototype.descendant=function(v,x){var g=this.children.find(x),p=g[0],P=g[1];return v.blotName==null&&v(p)||v.blotName!=null&&p instanceof v?[p,P]:p instanceof O?p.descendant(v,P):[null,-1]},O.prototype.descendants=function(v,x,g){x===void 0&&(x=0),g===void 0&&(g=Number.MAX_VALUE);var p=[],P=g;return this.children.forEachAt(x,g,function(d,m,y){(v.blotName==null&&v(d)||v.blotName!=null&&d instanceof v)&&p.push(d),d instanceof O&&(p=p.concat(d.descendants(v,m,P))),P-=y}),p},O.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),k.prototype.detach.call(this)},O.prototype.formatAt=function(v,x,g,p){this.children.forEachAt(v,x,function(P,d,m){P.formatAt(d,m,g,p)})},O.prototype.insertAt=function(v,x,g){var p=this.children.find(v),P=p[0],d=p[1];if(P)P.insertAt(d,x,g);else{var m=g==null?h.create("text",x):h.create(x,g);this.appendChild(m)}},O.prototype.insertBefore=function(v,x){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(g){return v instanceof g}))throw new h.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,x)},O.prototype.length=function(){return this.children.reduce(function(v,x){return v+x.length()},0)},O.prototype.moveChildren=function(v,x){this.children.forEach(function(g){v.insertBefore(g,x)})},O.prototype.optimize=function(v){if(k.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var x=h.create(this.statics.defaultChild);this.appendChild(x),x.optimize(v)}else this.remove()},O.prototype.path=function(v,x){x===void 0&&(x=!1);var g=this.children.find(v,x),p=g[0],P=g[1],d=[[this,v]];return p instanceof O?d.concat(p.path(P,x)):(p!=null&&d.push([p,P]),d)},O.prototype.removeChild=function(v){this.children.remove(v)},O.prototype.replace=function(v){v instanceof O&&v.moveChildren(this),k.prototype.replace.call(this,v)},O.prototype.split=function(v,x){if(x===void 0&&(x=!1),!x){if(v===0)return this;if(v===this.length())return this.next}var g=this.clone();return this.parent.insertBefore(g,this.next),this.children.forEachAt(v,this.length(),function(p,P,d){p=p.split(P,x),g.appendChild(p)}),g},O.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},O.prototype.update=function(v,x){var g=this,p=[],P=[];v.forEach(function(d){d.target===g.domNode&&d.type==="childList"&&(p.push.apply(p,d.addedNodes),P.push.apply(P,d.removedNodes))}),P.forEach(function(d){if(!(d.parentNode!=null&&d.tagName!=="IFRAME"&&document.body.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var m=h.find(d);m!=null&&(m.domNode.parentNode==null||m.domNode.parentNode===g.domNode)&&m.detach()}}),p.filter(function(d){return d.parentNode==g.domNode}).sort(function(d,m){return d===m?0:d.compareDocumentPosition(m)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(d){var m=null;d.nextSibling!=null&&(m=h.find(d.nextSibling));var y=_(d);(y.next!=m||y.next==null)&&(y.parent!=null&&y.parent.removeChild(g),g.insertBefore(y,m||void 0))})},O}(c.default);function _(k){var O=h.find(k);if(O==null)try{O=h.create(k)}catch{O=h.create(h.Scope.INLINE),[].slice.call(k.childNodes).forEach(function(x){O.domNode.appendChild(x)}),k.parentNode&&k.parentNode.replaceChild(O.domNode,k),O.attach()}return O}n.default=b},function(t,n,a){var l=this&&this.__extends||function(){var k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,v){O.__proto__=v}||function(O,v){for(var x in v)v.hasOwnProperty(x)&&(O[x]=v[x])};return function(O,v){k(O,v);function x(){this.constructor=O}O.prototype=v===null?Object.create(v):(x.prototype=v.prototype,new x)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(12),c=a(31),h=a(17),b=a(1),_=function(k){l(O,k);function O(v){var x=k.call(this,v)||this;return x.attributes=new c.default(x.domNode),x}return O.formats=function(v){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return v.tagName.toLowerCase()},O.prototype.format=function(v,x){var g=b.query(v);g instanceof u.default?this.attributes.attribute(g,x):x&&g!=null&&(v!==this.statics.blotName||this.formats()[v]!==x)&&this.replaceWith(v,x)},O.prototype.formats=function(){var v=this.attributes.values(),x=this.statics.formats(this.domNode);return x!=null&&(v[this.statics.blotName]=x),v},O.prototype.replaceWith=function(v,x){var g=k.prototype.replaceWith.call(this,v,x);return this.attributes.copy(g),g},O.prototype.update=function(v,x){var g=this;k.prototype.update.call(this,v,x),v.some(function(p){return p.target===g.domNode&&p.type==="attributes"})&&this.attributes.build()},O.prototype.wrap=function(v,x){var g=k.prototype.wrap.call(this,v,x);return g instanceof O&&g.statics.scope===this.statics.scope&&this.attributes.move(g),g},O}(h.default);n.default=_},function(t,n,a){var l=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var O in k)k.hasOwnProperty(O)&&(_[O]=k[O])};return function(_,k){b(_,k);function O(){this.constructor=_}_.prototype=k===null?Object.create(k):(O.prototype=k.prototype,new O)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(30),c=a(1),h=function(b){l(_,b);function _(){return b!==null&&b.apply(this,arguments)||this}return _.value=function(k){return!0},_.prototype.index=function(k,O){return this.domNode===k||this.domNode.compareDocumentPosition(k)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(O,1):-1},_.prototype.position=function(k,O){var v=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return k>0&&(v+=1),[this.parent.domNode,v]},_.prototype.value=function(){var k;return k={},k[this.statics.blotName]=this.statics.value(this.domNode)||!0,k},_.scope=c.Scope.INLINE_BLOT,_}(u.default);n.default=h},function(t,n,a){var l=a(11),u=a(3),c={attributes:{compose:function(b,_,k){typeof b!="object"&&(b={}),typeof _!="object"&&(_={});var O=u(!0,{},_);k||(O=Object.keys(O).reduce(function(x,g){return O[g]!=null&&(x[g]=O[g]),x},{}));for(var v in b)b[v]!==void 0&&_[v]===void 0&&(O[v]=b[v]);return Object.keys(O).length>0?O:void 0},diff:function(b,_){typeof b!="object"&&(b={}),typeof _!="object"&&(_={});var k=Object.keys(b).concat(Object.keys(_)).reduce(function(O,v){return l(b[v],_[v])||(O[v]=_[v]===void 0?null:_[v]),O},{});return Object.keys(k).length>0?k:void 0},transform:function(b,_,k){if(typeof b!="object")return _;if(typeof _=="object"){if(!k)return _;var O=Object.keys(_).reduce(function(v,x){return b[x]===void 0&&(v[x]=_[x]),v},{});return Object.keys(O).length>0?O:void 0}}},iterator:function(b){return new h(b)},length:function(b){return typeof b.delete=="number"?b.delete:typeof b.retain=="number"?b.retain:typeof b.insert=="string"?b.insert.length:1}};function h(b){this.ops=b,this.index=0,this.offset=0}h.prototype.hasNext=function(){return this.peekLength()<1/0},h.prototype.next=function(b){b||(b=1/0);var _=this.ops[this.index];if(_){var k=this.offset,O=c.length(_);if(b>=O-k?(b=O-k,this.index+=1,this.offset=0):this.offset+=b,typeof _.delete=="number")return{delete:b};var v={};return _.attributes&&(v.attributes=_.attributes),typeof _.retain=="number"?v.retain=b:typeof _.insert=="string"?v.insert=_.insert.substr(k,b):v.insert=_.insert,v}else return{retain:1/0}},h.prototype.peek=function(){return this.ops[this.index]},h.prototype.peekLength=function(){return this.ops[this.index]?c.length(this.ops[this.index])-this.offset:1/0},h.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},h.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var b=this.offset,_=this.index,k=this.next(),O=this.ops.slice(this.index);return this.offset=b,this.index=_,[k].concat(O)}else return[]},t.exports=c},function(t,n){var a=function(){function l(g,p){return p!=null&&g instanceof p}var u;try{u=Map}catch{u=function(){}}var c;try{c=Set}catch{c=function(){}}var h;try{h=Promise}catch{h=function(){}}function b(g,p,P,d,m){typeof p=="object"&&(P=p.depth,d=p.prototype,m=p.includeNonEnumerable,p=p.circular);var y=[],w=[],L=typeof Buffer<"u";typeof p>"u"&&(p=!0),typeof P>"u"&&(P=1/0);function R(D,E){if(D===null)return null;if(E===0)return D;var S,A;if(typeof D!="object")return D;if(l(D,u))S=new u;else if(l(D,c))S=new c;else if(l(D,h))S=new h(function(I,z){D.then(function(H){I(R(H,E-1))},function(H){z(R(H,E-1))})});else if(b.__isArray(D))S=[];else if(b.__isRegExp(D))S=new RegExp(D.source,x(D)),D.lastIndex&&(S.lastIndex=D.lastIndex);else if(b.__isDate(D))S=new Date(D.getTime());else{if(L&&Buffer.isBuffer(D))return Buffer.allocUnsafe?S=Buffer.allocUnsafe(D.length):S=new Buffer(D.length),D.copy(S),S;l(D,Error)?S=Object.create(D):typeof d>"u"?(A=Object.getPrototypeOf(D),S=Object.create(A)):(S=Object.create(d),A=d)}if(p){var M=y.indexOf(D);if(M!=-1)return w[M];y.push(D),w.push(S)}l(D,u)&&D.forEach(function(I,z){var H=R(z,E-1),K=R(I,E-1);S.set(H,K)}),l(D,c)&&D.forEach(function(I){var z=R(I,E-1);S.add(z)});for(var T in D){var B;A&&(B=Object.getOwnPropertyDescriptor(A,T)),!(B&&B.set==null)&&(S[T]=R(D[T],E-1))}if(Object.getOwnPropertySymbols)for(var U=Object.getOwnPropertySymbols(D),T=0;T<U.length;T++){var Q=U[T],X=Object.getOwnPropertyDescriptor(D,Q);X&&!X.enumerable&&!m||(S[Q]=R(D[Q],E-1),X.enumerable||Object.defineProperty(S,Q,{enumerable:!1}))}if(m)for(var $=Object.getOwnPropertyNames(D),T=0;T<$.length;T++){var j=$[T],X=Object.getOwnPropertyDescriptor(D,j);X&&X.enumerable||(S[j]=R(D[j],E-1),Object.defineProperty(S,j,{enumerable:!1}))}return S}return R(g,P)}b.clonePrototype=function(p){if(p===null)return null;var P=function(){};return P.prototype=p,new P};function _(g){return Object.prototype.toString.call(g)}b.__objToStr=_;function k(g){return typeof g=="object"&&_(g)==="[object Date]"}b.__isDate=k;function O(g){return typeof g=="object"&&_(g)==="[object Array]"}b.__isArray=O;function v(g){return typeof g=="object"&&_(g)==="[object RegExp]"}b.__isRegExp=v;function x(g){var p="";return g.global&&(p+="g"),g.ignoreCase&&(p+="i"),g.multiline&&(p+="m"),p}return b.__getRegExpFlags=x,b}();typeof t=="object"&&t.exports&&(t.exports=a)},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function S(A,M){var T=[],B=!0,U=!1,Q=void 0;try{for(var X=A[Symbol.iterator](),$;!(B=($=X.next()).done)&&(T.push($.value),!(M&&T.length===M));B=!0);}catch(j){U=!0,Q=j}finally{try{!B&&X.return&&X.return()}finally{if(U)throw Q}}return T}return function(A,M){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return S(A,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function S(A,M){for(var T=0;T<M.length;T++){var B=M[T];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(A,B.key,B)}}return function(A,M,T){return M&&S(A.prototype,M),T&&S(A,T),A}}(),c=function S(A,M,T){A===null&&(A=Function.prototype);var B=Object.getOwnPropertyDescriptor(A,M);if(B===void 0){var U=Object.getPrototypeOf(A);return U===null?void 0:S(U,M,T)}else{if("value"in B)return B.value;var Q=B.get;return Q===void 0?void 0:Q.call(T)}},h=a(0),b=y(h),_=a(8),k=y(_),O=a(4),v=y(O),x=a(16),g=y(x),p=a(13),P=y(p),d=a(25),m=y(d);function y(S){return S&&S.__esModule?S:{default:S}}function w(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")}function L(S,A){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:S}function R(S,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);S.prototype=Object.create(A&&A.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(S,A):S.__proto__=A)}function D(S){return S instanceof v.default||S instanceof O.BlockEmbed}var E=function(S){R(A,S);function A(M,T){w(this,A);var B=L(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,M));return B.emitter=T.emitter,Array.isArray(T.whitelist)&&(B.whitelist=T.whitelist.reduce(function(U,Q){return U[Q]=!0,U},{})),B.domNode.addEventListener("DOMNodeInserted",function(){}),B.optimize(),B.enable(),B}return u(A,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(T,B){var U=this.line(T),Q=l(U,2),X=Q[0],$=Q[1],j=this.line(T+B),I=l(j,1),z=I[0];if(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"deleteAt",this).call(this,T,B),z!=null&&X!==z&&$>0){if(X instanceof O.BlockEmbed||z instanceof O.BlockEmbed){this.optimize();return}if(X instanceof P.default){var H=X.newlineIndex(X.length(),!0);if(H>-1&&(X=X.split(H+1),X===z)){this.optimize();return}}else if(z instanceof P.default){var K=z.newlineIndex(0);K>-1&&z.split(K+1)}var ee=z.children.head instanceof g.default?null:z.children.head;X.moveChildren(z,ee),X.remove()}this.optimize()}},{key:"enable",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",T)}},{key:"formatAt",value:function(T,B,U,Q){this.whitelist!=null&&!this.whitelist[U]||(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"formatAt",this).call(this,T,B,U,Q),this.optimize())}},{key:"insertAt",value:function(T,B,U){if(!(U!=null&&this.whitelist!=null&&!this.whitelist[B])){if(T>=this.length())if(U==null||b.default.query(B,b.default.Scope.BLOCK)==null){var Q=b.default.create(this.statics.defaultChild);this.appendChild(Q),U==null&&B.endsWith(`
|
|
134
|
-
`)&&(B=B.slice(0,-1)),Q.insertAt(0,B,U)}else{var X=b.default.create(B,U);this.appendChild(X)}else c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertAt",this).call(this,T,B,U);this.optimize()}}},{key:"insertBefore",value:function(T,B){if(T.statics.scope===b.default.Scope.INLINE_BLOT){var U=b.default.create(this.statics.defaultChild);U.appendChild(T),T=U}c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,T,B)}},{key:"leaf",value:function(T){return this.path(T).pop()||[null,-1]}},{key:"line",value:function(T){return T===this.length()?this.line(T-1):this.descendant(D,T)}},{key:"lines",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,U=function Q(X,$,j){var I=[],z=j;return X.children.forEachAt($,j,function(H,K,ee){D(H)?I.push(H):H instanceof b.default.Container&&(I=I.concat(Q(H,K,z))),z-=ee}),I};return U(this,T,B)}},{key:"optimize",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,T,B),T.length>0&&this.emitter.emit(k.default.events.SCROLL_OPTIMIZE,T,B))}},{key:"path",value:function(T){return c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"path",this).call(this,T).slice(1)}},{key:"update",value:function(T){if(this.batch!==!0){var B=k.default.sources.USER;typeof T=="string"&&(B=T),Array.isArray(T)||(T=this.observer.takeRecords()),T.length>0&&this.emitter.emit(k.default.events.SCROLL_BEFORE_UPDATE,B,T),c(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"update",this).call(this,T.concat([])),T.length>0&&this.emitter.emit(k.default.events.SCROLL_UPDATE,B,T)}}}]),A}(b.default.Scroll);E.blotName="scroll",E.className="ql-editor",E.tagName="DIV",E.defaultChild="block",E.allowedChildren=[v.default,O.BlockEmbed,m.default],n.default=E},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},u=function(){function Z(Y,ne){var re=[],ie=!0,ae=!1,se=void 0;try{for(var de=Y[Symbol.iterator](),he;!(ie=(he=de.next()).done)&&(re.push(he.value),!(ne&&re.length===ne));ie=!0);}catch(Se){ae=!0,se=Se}finally{try{!ie&&de.return&&de.return()}finally{if(ae)throw se}}return re}return function(Y,ne){if(Array.isArray(Y))return Y;if(Symbol.iterator in Object(Y))return Z(Y,ne);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function Z(Y,ne){for(var re=0;re<ne.length;re++){var ie=ne[re];ie.enumerable=ie.enumerable||!1,ie.configurable=!0,"value"in ie&&(ie.writable=!0),Object.defineProperty(Y,ie.key,ie)}}return function(Y,ne,re){return ne&&Z(Y.prototype,ne),re&&Z(Y,re),Y}}(),h=a(21),b=S(h),_=a(11),k=S(_),O=a(3),v=S(O),x=a(2),g=S(x),p=a(20),P=S(p),d=a(0),m=S(d),y=a(5),w=S(y),L=a(10),R=S(L),D=a(9),E=S(D);function S(Z){return Z&&Z.__esModule?Z:{default:Z}}function A(Z,Y,ne){return Y in Z?Object.defineProperty(Z,Y,{value:ne,enumerable:!0,configurable:!0,writable:!0}):Z[Y]=ne,Z}function M(Z,Y){if(!(Z instanceof Y))throw new TypeError("Cannot call a class as a function")}function T(Z,Y){if(!Z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Y&&(typeof Y=="object"||typeof Y=="function")?Y:Z}function B(Z,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Y);Z.prototype=Object.create(Y&&Y.prototype,{constructor:{value:Z,enumerable:!1,writable:!0,configurable:!0}}),Y&&(Object.setPrototypeOf?Object.setPrototypeOf(Z,Y):Z.__proto__=Y)}var U=(0,R.default)("quill:keyboard"),Q=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",X=function(Z){B(Y,Z),c(Y,null,[{key:"match",value:function(re,ie){return ie=V(ie),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ae){return!!ie[ae]!==re[ae]&&ie[ae]!==null})?!1:ie.key===(re.which||re.keyCode)}}]);function Y(ne,re){M(this,Y);var ie=T(this,(Y.__proto__||Object.getPrototypeOf(Y)).call(this,ne,re));return ie.bindings={},Object.keys(ie.options.bindings).forEach(function(ae){ae==="list autofill"&&ne.scroll.whitelist!=null&&!ne.scroll.whitelist.list||ie.options.bindings[ae]&&ie.addBinding(ie.options.bindings[ae])}),ie.addBinding({key:Y.keys.ENTER,shiftKey:null},H),ie.addBinding({key:Y.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(ie.addBinding({key:Y.keys.BACKSPACE},{collapsed:!0},j),ie.addBinding({key:Y.keys.DELETE},{collapsed:!0},I)):(ie.addBinding({key:Y.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},j),ie.addBinding({key:Y.keys.DELETE},{collapsed:!0,suffix:/^.?$/},I)),ie.addBinding({key:Y.keys.BACKSPACE},{collapsed:!1},z),ie.addBinding({key:Y.keys.DELETE},{collapsed:!1},z),ie.addBinding({key:Y.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},j),ie.listen(),ie}return c(Y,[{key:"addBinding",value:function(re){var ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},se=V(re);if(se==null||se.key==null)return U.warn("Attempted to add invalid keyboard binding",se);typeof ie=="function"&&(ie={handler:ie}),typeof ae=="function"&&(ae={handler:ae}),se=(0,v.default)(se,ie,ae),this.bindings[se.key]=this.bindings[se.key]||[],this.bindings[se.key].push(se)}},{key:"listen",value:function(){var re=this;this.quill.root.addEventListener("keydown",function(ie){if(!ie.defaultPrevented){var ae=ie.which||ie.keyCode,se=(re.bindings[ae]||[]).filter(function(Ue){return Y.match(ie,Ue)});if(se.length!==0){var de=re.quill.getSelection();if(!(de==null||!re.quill.hasFocus())){var he=re.quill.getLine(de.index),Se=u(he,2),Ee=Se[0],De=Se[1],fe=re.quill.getLeaf(de.index),ge=u(fe,2),Te=ge[0],Re=ge[1],ue=de.length===0?[Te,Re]:re.quill.getLeaf(de.index+de.length),me=u(ue,2),xe=me[0],Ie=me[1],tt=Te instanceof m.default.Text?Te.value().slice(0,Re):"",lt=xe instanceof m.default.Text?xe.value().slice(Ie):"",Fe={collapsed:de.length===0,empty:de.length===0&&Ee.length()<=1,format:re.quill.getFormat(de),offset:De,prefix:tt,suffix:lt},ze=se.some(function(Ue){if(Ue.collapsed!=null&&Ue.collapsed!==Fe.collapsed||Ue.empty!=null&&Ue.empty!==Fe.empty||Ue.offset!=null&&Ue.offset!==Fe.offset)return!1;if(Array.isArray(Ue.format)){if(Ue.format.every(function(Xe){return Fe.format[Xe]==null}))return!1}else if(l(Ue.format)==="object"&&!Object.keys(Ue.format).every(function(Xe){return Ue.format[Xe]===!0?Fe.format[Xe]!=null:Ue.format[Xe]===!1?Fe.format[Xe]==null:(0,k.default)(Ue.format[Xe],Fe.format[Xe])}))return!1;return Ue.prefix!=null&&!Ue.prefix.test(Fe.prefix)||Ue.suffix!=null&&!Ue.suffix.test(Fe.suffix)?!1:Ue.handler.call(re,de,Fe)!==!0});ze&&ie.preventDefault()}}}})}}]),Y}(E.default);X.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},X.DEFAULTS={bindings:{bold:ee("bold"),italic:ee("italic"),underline:ee("underline"),indent:{key:X.keys.TAB,format:["blockquote","indent","list"],handler:function(Y,ne){if(ne.collapsed&&ne.offset!==0)return!0;this.quill.format("indent","+1",w.default.sources.USER)}},outdent:{key:X.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(Y,ne){if(ne.collapsed&&ne.offset!==0)return!0;this.quill.format("indent","-1",w.default.sources.USER)}},"outdent backspace":{key:X.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(Y,ne){ne.format.indent!=null?this.quill.format("indent","-1",w.default.sources.USER):ne.format.list!=null&&this.quill.format("list",!1,w.default.sources.USER)}},"indent code-block":K(!0),"outdent code-block":K(!1),"remove tab":{key:X.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(Y){this.quill.deleteText(Y.index-1,1,w.default.sources.USER)}},tab:{key:X.keys.TAB,handler:function(Y){this.quill.history.cutoff();var ne=new g.default().retain(Y.index).delete(Y.length).insert(" ");this.quill.updateContents(ne,w.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Y.index+1,w.default.sources.SILENT)}},"list empty enter":{key:X.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(Y,ne){this.quill.format("list",!1,w.default.sources.USER),ne.format.indent&&this.quill.format("indent",!1,w.default.sources.USER)}},"checklist enter":{key:X.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(Y){var ne=this.quill.getLine(Y.index),re=u(ne,2),ie=re[0],ae=re[1],se=(0,v.default)({},ie.formats(),{list:"checked"}),de=new g.default().retain(Y.index).insert(`
|
|
135
|
-
`,se).retain(ie.length()-ae-1).retain(1,{list:"unchecked"});this.quill.updateContents(de,w.default.sources.USER),this.quill.setSelection(Y.index+1,w.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:X.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(Y,ne){var re=this.quill.getLine(Y.index),ie=u(re,2),ae=ie[0],se=ie[1],de=new g.default().retain(Y.index).insert(`
|
|
136
|
-
`,ne.format).retain(ae.length()-se-1).retain(1,{header:null});this.quill.updateContents(de,w.default.sources.USER),this.quill.setSelection(Y.index+1,w.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Y,ne){var re=ne.prefix.length,ie=this.quill.getLine(Y.index),ae=u(ie,2),se=ae[0],de=ae[1];if(de>re)return!0;var he=void 0;switch(ne.prefix.trim()){case"[]":case"[ ]":he="unchecked";break;case"[x]":he="checked";break;case"-":case"*":he="bullet";break;default:he="ordered"}this.quill.insertText(Y.index," ",w.default.sources.USER),this.quill.history.cutoff();var Se=new g.default().retain(Y.index-de).delete(re+1).retain(se.length()-2-de).retain(1,{list:he});this.quill.updateContents(Se,w.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Y.index-re,w.default.sources.SILENT)}},"code exit":{key:X.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Y){var ne=this.quill.getLine(Y.index),re=u(ne,2),ie=re[0],ae=re[1],se=new g.default().retain(Y.index+ie.length()-ae-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(se,w.default.sources.USER)}},"embed left":$(X.keys.LEFT,!1),"embed left shift":$(X.keys.LEFT,!0),"embed right":$(X.keys.RIGHT,!1),"embed right shift":$(X.keys.RIGHT,!0)}};function $(Z,Y){var ne,re=Z===X.keys.LEFT?"prefix":"suffix";return ne={key:Z,shiftKey:Y,altKey:null},A(ne,re,/^$/),A(ne,"handler",function(ae){var se=ae.index;Z===X.keys.RIGHT&&(se+=ae.length+1);var de=this.quill.getLeaf(se),he=u(de,1),Se=he[0];return Se instanceof m.default.Embed?(Z===X.keys.LEFT?Y?this.quill.setSelection(ae.index-1,ae.length+1,w.default.sources.USER):this.quill.setSelection(ae.index-1,w.default.sources.USER):Y?this.quill.setSelection(ae.index,ae.length+1,w.default.sources.USER):this.quill.setSelection(ae.index+ae.length+1,w.default.sources.USER),!1):!0}),ne}function j(Z,Y){if(!(Z.index===0||this.quill.getLength()<=1)){var ne=this.quill.getLine(Z.index),re=u(ne,1),ie=re[0],ae={};if(Y.offset===0){var se=this.quill.getLine(Z.index-1),de=u(se,1),he=de[0];if(he!=null&&he.length()>1){var Se=ie.formats(),Ee=this.quill.getFormat(Z.index-1,1);ae=P.default.attributes.diff(Se,Ee)||{}}}var De=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Y.prefix)?2:1;this.quill.deleteText(Z.index-De,De,w.default.sources.USER),Object.keys(ae).length>0&&this.quill.formatLine(Z.index-De,De,ae,w.default.sources.USER),this.quill.focus()}}function I(Z,Y){var ne=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Y.suffix)?2:1;if(!(Z.index>=this.quill.getLength()-ne)){var re={},ie=0,ae=this.quill.getLine(Z.index),se=u(ae,1),de=se[0];if(Y.offset>=de.length()-1){var he=this.quill.getLine(Z.index+1),Se=u(he,1),Ee=Se[0];if(Ee){var De=de.formats(),fe=this.quill.getFormat(Z.index,1);re=P.default.attributes.diff(De,fe)||{},ie=Ee.length()}}this.quill.deleteText(Z.index,ne,w.default.sources.USER),Object.keys(re).length>0&&this.quill.formatLine(Z.index+ie-1,ne,re,w.default.sources.USER)}}function z(Z){var Y=this.quill.getLines(Z),ne={};if(Y.length>1){var re=Y[0].formats(),ie=Y[Y.length-1].formats();ne=P.default.attributes.diff(ie,re)||{}}this.quill.deleteText(Z,w.default.sources.USER),Object.keys(ne).length>0&&this.quill.formatLine(Z.index,1,ne,w.default.sources.USER),this.quill.setSelection(Z.index,w.default.sources.SILENT),this.quill.focus()}function H(Z,Y){var ne=this;Z.length>0&&this.quill.scroll.deleteAt(Z.index,Z.length);var re=Object.keys(Y.format).reduce(function(ie,ae){return m.default.query(ae,m.default.Scope.BLOCK)&&!Array.isArray(Y.format[ae])&&(ie[ae]=Y.format[ae]),ie},{});this.quill.insertText(Z.index,`
|
|
137
|
-
`,re,w.default.sources.USER),this.quill.setSelection(Z.index+1,w.default.sources.SILENT),this.quill.focus(),Object.keys(Y.format).forEach(function(ie){re[ie]==null&&(Array.isArray(Y.format[ie])||ie!=="link"&&ne.quill.format(ie,Y.format[ie],w.default.sources.USER))})}function K(Z){return{key:X.keys.TAB,shiftKey:!Z,format:{"code-block":!0},handler:function(ne){var re=m.default.query("code-block"),ie=ne.index,ae=ne.length,se=this.quill.scroll.descendant(re,ie),de=u(se,2),he=de[0],Se=de[1];if(he!=null){var Ee=this.quill.getIndex(he),De=he.newlineIndex(Se,!0)+1,fe=he.newlineIndex(Ee+Se+ae),ge=he.domNode.textContent.slice(De,fe).split(`
|
|
138
|
-
`);Se=0,ge.forEach(function(Te,Re){Z?(he.insertAt(De+Se,re.TAB),Se+=re.TAB.length,Re===0?ie+=re.TAB.length:ae+=re.TAB.length):Te.startsWith(re.TAB)&&(he.deleteAt(De+Se,re.TAB.length),Se-=re.TAB.length,Re===0?ie-=re.TAB.length:ae-=re.TAB.length),Se+=Te.length+1}),this.quill.update(w.default.sources.USER),this.quill.setSelection(ie,ae,w.default.sources.SILENT)}}}}function ee(Z){return{key:Z[0].toUpperCase(),shortKey:!0,handler:function(ne,re){this.quill.format(Z,!re.format[Z],w.default.sources.USER)}}}function V(Z){if(typeof Z=="string"||typeof Z=="number")return V({key:Z});if((typeof Z>"u"?"undefined":l(Z))==="object"&&(Z=(0,b.default)(Z,!1)),typeof Z.key=="string")if(X.keys[Z.key.toUpperCase()]!=null)Z.key=X.keys[Z.key.toUpperCase()];else if(Z.key.length===1)Z.key=Z.key.toUpperCase().charCodeAt(0);else return null;return Z.shortKey&&(Z[Q]=Z.shortKey,delete Z.shortKey),Z}n.default=X,n.SHORTKEY=Q},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function P(d,m){var y=[],w=!0,L=!1,R=void 0;try{for(var D=d[Symbol.iterator](),E;!(w=(E=D.next()).done)&&(y.push(E.value),!(m&&y.length===m));w=!0);}catch(S){L=!0,R=S}finally{try{!w&&D.return&&D.return()}finally{if(L)throw R}}return y}return function(d,m){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d))return P(d,m);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function P(d,m,y){d===null&&(d=Function.prototype);var w=Object.getOwnPropertyDescriptor(d,m);if(w===void 0){var L=Object.getPrototypeOf(d);return L===null?void 0:P(L,m,y)}else{if("value"in w)return w.value;var R=w.get;return R===void 0?void 0:R.call(y)}},c=function(){function P(d,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(d,w.key,w)}}return function(d,m,y){return m&&P(d.prototype,m),y&&P(d,y),d}}(),h=a(0),b=O(h),_=a(7),k=O(_);function O(P){return P&&P.__esModule?P:{default:P}}function v(P,d){if(!(P instanceof d))throw new TypeError("Cannot call a class as a function")}function x(P,d){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:P}function g(P,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);P.prototype=Object.create(d&&d.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(P,d):P.__proto__=d)}var p=function(P){g(d,P),c(d,null,[{key:"value",value:function(){}}]);function d(m,y){v(this,d);var w=x(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,m));return w.selection=y,w.textNode=document.createTextNode(d.CONTENTS),w.domNode.appendChild(w.textNode),w._length=0,w}return c(d,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(y,w){if(this._length!==0)return u(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"format",this).call(this,y,w);for(var L=this,R=0;L!=null&&L.statics.scope!==b.default.Scope.BLOCK_BLOT;)R+=L.offset(L.parent),L=L.parent;L!=null&&(this._length=d.CONTENTS.length,L.optimize(),L.formatAt(R,d.CONTENTS.length,y,w),this._length=0)}},{key:"index",value:function(y,w){return y===this.textNode?0:u(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"index",this).call(this,y,w)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){u(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var y=this.textNode,w=this.selection.getNativeRange(),L=void 0,R=void 0,D=void 0;if(w!=null&&w.start.node===y&&w.end.node===y){var E=[y,w.start.offset,w.end.offset];L=E[0],R=E[1],D=E[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==d.CONTENTS){var S=this.textNode.data.split(d.CONTENTS).join("");this.next instanceof k.default?(L=this.next.domNode,this.next.insertAt(0,S),this.textNode.data=d.CONTENTS):(this.textNode.data=S,this.parent.insertBefore(b.default.create(this.textNode),this),this.textNode=document.createTextNode(d.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),R!=null){var A=[R,D].map(function(T){return Math.max(0,Math.min(L.data.length,T-1))}),M=l(A,2);return R=M[0],D=M[1],{startNode:L,startOffset:R,endNode:L,endOffset:D}}}}},{key:"update",value:function(y,w){var L=this;if(y.some(function(D){return D.type==="characterData"&&D.target===L.textNode})){var R=this.restore();R&&(w.range=R)}}},{key:"value",value:function(){return""}}]),d}(b.default.Embed);p.blotName="cursor",p.className="ql-cursor",p.tagName="span",p.CONTENTS="\uFEFF",n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(0),u=b(l),c=a(4),h=b(c);function b(x){return x&&x.__esModule?x:{default:x}}function _(x,g){if(!(x instanceof g))throw new TypeError("Cannot call a class as a function")}function k(x,g){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:x}function O(x,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);x.prototype=Object.create(g&&g.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(x,g):x.__proto__=g)}var v=function(x){O(g,x);function g(){return _(this,g),k(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return g}(u.default.Container);v.allowedChildren=[h.default,c.BlockEmbed,v],n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var l=function(){function p(P,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(P,y.key,y)}}return function(P,d,m){return d&&p(P.prototype,d),m&&p(P,m),P}}(),u=function p(P,d,m){P===null&&(P=Function.prototype);var y=Object.getOwnPropertyDescriptor(P,d);if(y===void 0){var w=Object.getPrototypeOf(P);return w===null?void 0:p(w,d,m)}else{if("value"in y)return y.value;var L=y.get;return L===void 0?void 0:L.call(m)}},c=a(0),h=b(c);function b(p){return p&&p.__esModule?p:{default:p}}function _(p,P){if(!(p instanceof P))throw new TypeError("Cannot call a class as a function")}function k(p,P){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:p}function O(p,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);p.prototype=Object.create(P&&P.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(p,P):p.__proto__=P)}var v=function(p){O(P,p);function P(){return _(this,P),k(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return l(P,[{key:"value",value:function(m){var y=u(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"value",this).call(this,m);return y.startsWith("rgb(")?(y=y.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+y.split(",").map(function(w){return("00"+parseInt(w).toString(16)).slice(-2)}).join("")):y}}]),P}(h.default.Attributor.Style),x=new h.default.Attributor.Class("color","ql-color",{scope:h.default.Scope.INLINE}),g=new v("color","color",{scope:h.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=x,n.ColorStyle=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var l=function(){function g(p,P){for(var d=0;d<P.length;d++){var m=P[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,P,d){return P&&g(p.prototype,P),d&&g(p,d),p}}(),u=function g(p,P,d){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,P);if(m===void 0){var y=Object.getPrototypeOf(p);return y===null?void 0:g(y,P,d)}else{if("value"in m)return m.value;var w=m.get;return w===void 0?void 0:w.call(d)}},c=a(6),h=b(c);function b(g){return g&&g.__esModule?g:{default:g}}function _(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function k(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function O(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var v=function(g){O(p,g);function p(){return _(this,p),k(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return l(p,[{key:"format",value:function(d,m){if(d!==this.statics.blotName||!m)return u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"format",this).call(this,d,m);m=this.constructor.sanitize(m),this.domNode.setAttribute("href",m)}}],[{key:"create",value:function(d){var m=u(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this,d);return d=this.sanitize(d),m.setAttribute("href",d),m.setAttribute("rel","noopener noreferrer"),m.setAttribute("target","_blank"),m}},{key:"formats",value:function(d){return d.getAttribute("href")}},{key:"sanitize",value:function(d){return x(d,this.PROTOCOL_WHITELIST)?d:this.SANITIZED_URL}}]),p}(h.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function x(g,p){var P=document.createElement("a");P.href=g;var d=P.href.slice(0,P.href.indexOf(":"));return p.indexOf(d)>-1}n.default=v,n.sanitize=x},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},u=function(){function p(P,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(P,y.key,y)}}return function(P,d,m){return d&&p(P.prototype,d),m&&p(P,m),P}}(),c=a(23),h=k(c),b=a(107),_=k(b);function k(p){return p&&p.__esModule?p:{default:p}}function O(p,P){if(!(p instanceof P))throw new TypeError("Cannot call a class as a function")}var v=0;function x(p,P){p.setAttribute(P,p.getAttribute(P)!=="true")}var g=function(){function p(P){var d=this;O(this,p),this.select=P,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){d.togglePicker()}),this.label.addEventListener("keydown",function(m){switch(m.keyCode){case h.default.keys.ENTER:d.togglePicker();break;case h.default.keys.ESCAPE:d.escape(),m.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return u(p,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),x(this.label,"aria-expanded"),x(this.options,"aria-hidden")}},{key:"buildItem",value:function(d){var m=this,y=document.createElement("span");return y.tabIndex="0",y.setAttribute("role","button"),y.classList.add("ql-picker-item"),d.hasAttribute("value")&&y.setAttribute("data-value",d.getAttribute("value")),d.textContent&&y.setAttribute("data-label",d.textContent),y.addEventListener("click",function(){m.selectItem(y,!0)}),y.addEventListener("keydown",function(w){switch(w.keyCode){case h.default.keys.ENTER:m.selectItem(y,!0),w.preventDefault();break;case h.default.keys.ESCAPE:m.escape(),w.preventDefault();break}}),y}},{key:"buildLabel",value:function(){var d=document.createElement("span");return d.classList.add("ql-picker-label"),d.innerHTML=_.default,d.tabIndex="0",d.setAttribute("role","button"),d.setAttribute("aria-expanded","false"),this.container.appendChild(d),d}},{key:"buildOptions",value:function(){var d=this,m=document.createElement("span");m.classList.add("ql-picker-options"),m.setAttribute("aria-hidden","true"),m.tabIndex="-1",m.id="ql-picker-options-"+v,v+=1,this.label.setAttribute("aria-controls",m.id),this.options=m,[].slice.call(this.select.options).forEach(function(y){var w=d.buildItem(y);m.appendChild(w),y.selected===!0&&d.selectItem(w)}),this.container.appendChild(m)}},{key:"buildPicker",value:function(){var d=this;[].slice.call(this.select.attributes).forEach(function(m){d.container.setAttribute(m.name,m.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var d=this;this.close(),setTimeout(function(){return d.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(d){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=this.container.querySelector(".ql-selected");if(d!==y&&(y!=null&&y.classList.remove("ql-selected"),d!=null&&(d.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(d.parentNode.children,d),d.hasAttribute("data-value")?this.label.setAttribute("data-value",d.getAttribute("data-value")):this.label.removeAttribute("data-value"),d.hasAttribute("data-label")?this.label.setAttribute("data-label",d.getAttribute("data-label")):this.label.removeAttribute("data-label"),m))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":l(Event))==="object"){var w=document.createEvent("Event");w.initEvent("change",!0,!0),this.select.dispatchEvent(w)}this.close()}}},{key:"update",value:function(){var d=void 0;if(this.select.selectedIndex>-1){var m=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];d=this.select.options[this.select.selectedIndex],this.selectItem(m)}else this.selectItem(null);var y=d!=null&&d!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",y)}}]),p}();n.default=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(0),u=U(l),c=a(5),h=U(c),b=a(4),_=U(b),k=a(16),O=U(k),v=a(25),x=U(v),g=a(24),p=U(g),P=a(35),d=U(P),m=a(6),y=U(m),w=a(22),L=U(w),R=a(7),D=U(R),E=a(55),S=U(E),A=a(42),M=U(A),T=a(23),B=U(T);function U(Q){return Q&&Q.__esModule?Q:{default:Q}}h.default.register({"blots/block":_.default,"blots/block/embed":b.BlockEmbed,"blots/break":O.default,"blots/container":x.default,"blots/cursor":p.default,"blots/embed":d.default,"blots/inline":y.default,"blots/scroll":L.default,"blots/text":D.default,"modules/clipboard":S.default,"modules/history":M.default,"modules/keyboard":B.default}),u.default.register(_.default,O.default,p.default,y.default,L.default,D.default),n.default=h.default},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(1),u=function(){function c(h){this.domNode=h,this.domNode[l.DATA_KEY]={blot:this}}return Object.defineProperty(c.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),c.create=function(h){if(this.tagName==null)throw new l.ParchmentError("Blot definition missing tagName");var b;return Array.isArray(this.tagName)?(typeof h=="string"&&(h=h.toUpperCase(),parseInt(h).toString()===h&&(h=parseInt(h))),typeof h=="number"?b=document.createElement(this.tagName[h-1]):this.tagName.indexOf(h)>-1?b=document.createElement(h):b=document.createElement(this.tagName[0])):b=document.createElement(this.tagName),this.className&&b.classList.add(this.className),b},c.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},c.prototype.clone=function(){var h=this.domNode.cloneNode(!1);return l.create(h)},c.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[l.DATA_KEY]},c.prototype.deleteAt=function(h,b){var _=this.isolate(h,b);_.remove()},c.prototype.formatAt=function(h,b,_,k){var O=this.isolate(h,b);if(l.query(_,l.Scope.BLOT)!=null&&k)O.wrap(_,k);else if(l.query(_,l.Scope.ATTRIBUTE)!=null){var v=l.create(this.statics.scope);O.wrap(v),v.format(_,k)}},c.prototype.insertAt=function(h,b,_){var k=_==null?l.create("text",b):l.create(b,_),O=this.split(h);this.parent.insertBefore(k,O)},c.prototype.insertInto=function(h,b){b===void 0&&(b=null),this.parent!=null&&this.parent.children.remove(this);var _=null;h.children.insertBefore(this,b),b!=null&&(_=b.domNode),(this.domNode.parentNode!=h.domNode||this.domNode.nextSibling!=_)&&h.domNode.insertBefore(this.domNode,_),this.parent=h,this.attach()},c.prototype.isolate=function(h,b){var _=this.split(h);return _.split(b),_},c.prototype.length=function(){return 1},c.prototype.offset=function(h){return h===void 0&&(h=this.parent),this.parent==null||this==h?0:this.parent.children.offset(this)+this.parent.offset(h)},c.prototype.optimize=function(h){this.domNode[l.DATA_KEY]!=null&&delete this.domNode[l.DATA_KEY].mutations},c.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},c.prototype.replace=function(h){h.parent!=null&&(h.parent.insertBefore(this,h.next),h.remove())},c.prototype.replaceWith=function(h,b){var _=typeof h=="string"?l.create(h,b):h;return _.replace(this),_},c.prototype.split=function(h,b){return h===0?this:this.next},c.prototype.update=function(h,b){},c.prototype.wrap=function(h,b){var _=typeof h=="string"?l.create(h,b):h;return this.parent!=null&&this.parent.insertBefore(_,this.next),_.appendChild(this),_},c.blotName="abstract",c}();n.default=u},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(12),u=a(32),c=a(33),h=a(1),b=function(){function _(k){this.attributes={},this.domNode=k,this.build()}return _.prototype.attribute=function(k,O){O?k.add(this.domNode,O)&&(k.value(this.domNode)!=null?this.attributes[k.attrName]=k:delete this.attributes[k.attrName]):(k.remove(this.domNode),delete this.attributes[k.attrName])},_.prototype.build=function(){var k=this;this.attributes={};var O=l.default.keys(this.domNode),v=u.default.keys(this.domNode),x=c.default.keys(this.domNode);O.concat(v).concat(x).forEach(function(g){var p=h.query(g,h.Scope.ATTRIBUTE);p instanceof l.default&&(k.attributes[p.attrName]=p)})},_.prototype.copy=function(k){var O=this;Object.keys(this.attributes).forEach(function(v){var x=O.attributes[v].value(O.domNode);k.format(v,x)})},_.prototype.move=function(k){var O=this;this.copy(k),Object.keys(this.attributes).forEach(function(v){O.attributes[v].remove(O.domNode)}),this.attributes={}},_.prototype.values=function(){var k=this;return Object.keys(this.attributes).reduce(function(O,v){return O[v]=k.attributes[v].value(k.domNode),O},{})},_}();n.default=b},function(t,n,a){var l=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var O in k)k.hasOwnProperty(O)&&(_[O]=k[O])};return function(_,k){b(_,k);function O(){this.constructor=_}_.prototype=k===null?Object.create(k):(O.prototype=k.prototype,new O)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(12);function c(b,_){var k=b.getAttribute("class")||"";return k.split(/\s+/).filter(function(O){return O.indexOf(_+"-")===0})}var h=function(b){l(_,b);function _(){return b!==null&&b.apply(this,arguments)||this}return _.keys=function(k){return(k.getAttribute("class")||"").split(/\s+/).map(function(O){return O.split("-").slice(0,-1).join("-")})},_.prototype.add=function(k,O){return this.canAdd(k,O)?(this.remove(k),k.classList.add(this.keyName+"-"+O),!0):!1},_.prototype.remove=function(k){var O=c(k,this.keyName);O.forEach(function(v){k.classList.remove(v)}),k.classList.length===0&&k.removeAttribute("class")},_.prototype.value=function(k){var O=c(k,this.keyName)[0]||"",v=O.slice(this.keyName.length+1);return this.canAdd(k,v)?v:""},_}(u.default);n.default=h},function(t,n,a){var l=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var O in k)k.hasOwnProperty(O)&&(_[O]=k[O])};return function(_,k){b(_,k);function O(){this.constructor=_}_.prototype=k===null?Object.create(k):(O.prototype=k.prototype,new O)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(12);function c(b){var _=b.split("-"),k=_.slice(1).map(function(O){return O[0].toUpperCase()+O.slice(1)}).join("");return _[0]+k}var h=function(b){l(_,b);function _(){return b!==null&&b.apply(this,arguments)||this}return _.keys=function(k){return(k.getAttribute("style")||"").split(";").map(function(O){var v=O.split(":");return v[0].trim()})},_.prototype.add=function(k,O){return this.canAdd(k,O)?(k.style[c(this.keyName)]=O,!0):!1},_.prototype.remove=function(k){k.style[c(this.keyName)]="",k.getAttribute("style")||k.removeAttribute("style")},_.prototype.value=function(k){var O=k.style[c(this.keyName)];return this.canAdd(k,O)?O:""},_}(u.default);n.default=h},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function h(b,_){for(var k=0;k<_.length;k++){var O=_[k];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(b,O.key,O)}}return function(b,_,k){return _&&h(b.prototype,_),k&&h(b,k),b}}();function u(h,b){if(!(h instanceof b))throw new TypeError("Cannot call a class as a function")}var c=function(){function h(b,_){u(this,h),this.quill=b,this.options=_,this.modules={}}return l(h,[{key:"init",value:function(){var _=this;Object.keys(this.options.modules).forEach(function(k){_.modules[k]==null&&_.addModule(k)})}},{key:"addModule",value:function(_){var k=this.quill.constructor.import("modules/"+_);return this.modules[_]=new k(this.quill,this.options.modules[_]||{}),this.modules[_]}}]),h}();c.DEFAULTS={modules:{}},c.themes={default:c},n.default=c},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function P(d,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(d,w.key,w)}}return function(d,m,y){return m&&P(d.prototype,m),y&&P(d,y),d}}(),u=function P(d,m,y){d===null&&(d=Function.prototype);var w=Object.getOwnPropertyDescriptor(d,m);if(w===void 0){var L=Object.getPrototypeOf(d);return L===null?void 0:P(L,m,y)}else{if("value"in w)return w.value;var R=w.get;return R===void 0?void 0:R.call(y)}},c=a(0),h=k(c),b=a(7),_=k(b);function k(P){return P&&P.__esModule?P:{default:P}}function O(P,d){if(!(P instanceof d))throw new TypeError("Cannot call a class as a function")}function v(P,d){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:P}function x(P,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);P.prototype=Object.create(d&&d.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(P,d):P.__proto__=d)}var g="\uFEFF",p=function(P){x(d,P);function d(m){O(this,d);var y=v(this,(d.__proto__||Object.getPrototypeOf(d)).call(this,m));return y.contentNode=document.createElement("span"),y.contentNode.setAttribute("contenteditable",!1),[].slice.call(y.domNode.childNodes).forEach(function(w){y.contentNode.appendChild(w)}),y.leftGuard=document.createTextNode(g),y.rightGuard=document.createTextNode(g),y.domNode.appendChild(y.leftGuard),y.domNode.appendChild(y.contentNode),y.domNode.appendChild(y.rightGuard),y}return l(d,[{key:"index",value:function(y,w){return y===this.leftGuard?0:y===this.rightGuard?1:u(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"index",this).call(this,y,w)}},{key:"restore",value:function(y){var w=void 0,L=void 0,R=y.data.split(g).join("");if(y===this.leftGuard)if(this.prev instanceof _.default){var D=this.prev.length();this.prev.insertAt(D,R),w={startNode:this.prev.domNode,startOffset:D+R.length}}else L=document.createTextNode(R),this.parent.insertBefore(h.default.create(L),this),w={startNode:L,startOffset:R.length};else y===this.rightGuard&&(this.next instanceof _.default?(this.next.insertAt(0,R),w={startNode:this.next.domNode,startOffset:R.length}):(L=document.createTextNode(R),this.parent.insertBefore(h.default.create(L),this.next),w={startNode:L,startOffset:R.length}));return y.data=g,w}},{key:"update",value:function(y,w){var L=this;y.forEach(function(R){if(R.type==="characterData"&&(R.target===L.leftGuard||R.target===L.rightGuard)){var D=L.restore(R.target);D&&(w.range=D)}})}}]),d}(h.default.Embed);n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var l=a(0),u=c(l);function c(O){return O&&O.__esModule?O:{default:O}}var h={scope:u.default.Scope.BLOCK,whitelist:["right","center","justify"]},b=new u.default.Attributor.Attribute("align","align",h),_=new u.default.Attributor.Class("align","ql-align",h),k=new u.default.Attributor.Style("align","text-align",h);n.AlignAttribute=b,n.AlignClass=_,n.AlignStyle=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var l=a(0),u=h(l),c=a(26);function h(k){return k&&k.__esModule?k:{default:k}}var b=new u.default.Attributor.Class("background","ql-bg",{scope:u.default.Scope.INLINE}),_=new c.ColorAttributor("background","background-color",{scope:u.default.Scope.INLINE});n.BackgroundClass=b,n.BackgroundStyle=_},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var l=a(0),u=c(l);function c(O){return O&&O.__esModule?O:{default:O}}var h={scope:u.default.Scope.BLOCK,whitelist:["rtl"]},b=new u.default.Attributor.Attribute("direction","dir",h),_=new u.default.Attributor.Class("direction","ql-direction",h),k=new u.default.Attributor.Style("direction","direction",h);n.DirectionAttribute=b,n.DirectionClass=_,n.DirectionStyle=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var l=function(){function P(d,m){for(var y=0;y<m.length;y++){var w=m[y];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(d,w.key,w)}}return function(d,m,y){return m&&P(d.prototype,m),y&&P(d,y),d}}(),u=function P(d,m,y){d===null&&(d=Function.prototype);var w=Object.getOwnPropertyDescriptor(d,m);if(w===void 0){var L=Object.getPrototypeOf(d);return L===null?void 0:P(L,m,y)}else{if("value"in w)return w.value;var R=w.get;return R===void 0?void 0:R.call(y)}},c=a(0),h=b(c);function b(P){return P&&P.__esModule?P:{default:P}}function _(P,d){if(!(P instanceof d))throw new TypeError("Cannot call a class as a function")}function k(P,d){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d&&(typeof d=="object"||typeof d=="function")?d:P}function O(P,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof d);P.prototype=Object.create(d&&d.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),d&&(Object.setPrototypeOf?Object.setPrototypeOf(P,d):P.__proto__=d)}var v={scope:h.default.Scope.INLINE,whitelist:["serif","monospace"]},x=new h.default.Attributor.Class("font","ql-font",v),g=function(P){O(d,P);function d(){return _(this,d),k(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}return l(d,[{key:"value",value:function(y){return u(d.prototype.__proto__||Object.getPrototypeOf(d.prototype),"value",this).call(this,y).replace(/["']/g,"")}}]),d}(h.default.Attributor.Style),p=new g("font","font-family",v);n.FontStyle=p,n.FontClass=x},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var l=a(0),u=c(l);function c(_){return _&&_.__esModule?_:{default:_}}var h=new u.default.Attributor.Class("size","ql-size",{scope:u.default.Scope.INLINE,whitelist:["small","large","huge"]}),b=new u.default.Attributor.Style("size","font-size",{scope:u.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=h,n.SizeStyle=b},function(t,n,a){t.exports={align:{"":a(76),center:a(77),right:a(78),justify:a(79)},background:a(80),blockquote:a(81),bold:a(82),clean:a(83),code:a(58),"code-block":a(58),color:a(84),direction:{"":a(85),rtl:a(86)},float:{center:a(87),full:a(88),left:a(89),right:a(90)},formula:a(91),header:{1:a(92),2:a(93)},italic:a(94),image:a(95),indent:{"+1":a(96),"-1":a(97)},link:a(98),list:{ordered:a(99),bullet:a(100),check:a(101)},script:{sub:a(102),super:a(103)},strike:a(104),underline:a(105),video:a(106)}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var l=function(){function m(y,w){for(var L=0;L<w.length;L++){var R=w[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(y,R.key,R)}}return function(y,w,L){return w&&m(y.prototype,w),L&&m(y,L),y}}(),u=a(0),c=O(u),h=a(5),b=O(h),_=a(9),k=O(_);function O(m){return m&&m.__esModule?m:{default:m}}function v(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function x(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function g(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var p=function(m){g(y,m);function y(w,L){v(this,y);var R=x(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,w,L));return R.lastRecorded=0,R.ignoreChange=!1,R.clear(),R.quill.on(b.default.events.EDITOR_CHANGE,function(D,E,S,A){D!==b.default.events.TEXT_CHANGE||R.ignoreChange||(!R.options.userOnly||A===b.default.sources.USER?R.record(E,S):R.transform(E))}),R.quill.keyboard.addBinding({key:"Z",shortKey:!0},R.undo.bind(R)),R.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},R.redo.bind(R)),/Win/i.test(navigator.platform)&&R.quill.keyboard.addBinding({key:"Y",shortKey:!0},R.redo.bind(R)),R}return l(y,[{key:"change",value:function(L,R){if(this.stack[L].length!==0){var D=this.stack[L].pop();this.stack[R].push(D),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(D[L],b.default.sources.USER),this.ignoreChange=!1;var E=d(D[L]);this.quill.setSelection(E)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(L,R){if(L.ops.length!==0){this.stack.redo=[];var D=this.quill.getContents().diff(R),E=Date.now();if(this.lastRecorded+this.options.delay>E&&this.stack.undo.length>0){var S=this.stack.undo.pop();D=D.compose(S.undo),L=S.redo.compose(L)}else this.lastRecorded=E;this.stack.undo.push({redo:L,undo:D}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(L){this.stack.undo.forEach(function(R){R.undo=L.transform(R.undo,!0),R.redo=L.transform(R.redo,!0)}),this.stack.redo.forEach(function(R){R.undo=L.transform(R.undo,!0),R.redo=L.transform(R.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),y}(k.default);p.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function P(m){var y=m.ops[m.ops.length-1];return y==null?!1:y.insert!=null?typeof y.insert=="string"&&y.insert.endsWith(`
|
|
139
|
-
`):y.attributes!=null?Object.keys(y.attributes).some(function(w){return c.default.query(w,c.default.Scope.BLOCK)!=null}):!1}function d(m){var y=m.reduce(function(L,R){return L+=R.delete||0,L},0),w=m.length()-y;return P(m)&&(w-=1),w}n.default=p,n.getLastChangeIndex=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var l=function(){function H(K,ee){for(var V=0;V<ee.length;V++){var Z=ee[V];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(K,Z.key,Z)}}return function(K,ee,V){return ee&&H(K.prototype,ee),V&&H(K,V),K}}(),u=function H(K,ee,V){K===null&&(K=Function.prototype);var Z=Object.getOwnPropertyDescriptor(K,ee);if(Z===void 0){var Y=Object.getPrototypeOf(K);return Y===null?void 0:H(Y,ee,V)}else{if("value"in Z)return Z.value;var ne=Z.get;return ne===void 0?void 0:ne.call(V)}},c=a(3),h=E(c),b=a(2),_=E(b),k=a(8),O=E(k),v=a(23),x=E(v),g=a(34),p=E(g),P=a(59),d=E(P),m=a(60),y=E(m),w=a(28),L=E(w),R=a(61),D=E(R);function E(H){return H&&H.__esModule?H:{default:H}}function S(H,K){if(!(H instanceof K))throw new TypeError("Cannot call a class as a function")}function A(H,K){if(!H)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return K&&(typeof K=="object"||typeof K=="function")?K:H}function M(H,K){if(typeof K!="function"&&K!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof K);H.prototype=Object.create(K&&K.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}}),K&&(Object.setPrototypeOf?Object.setPrototypeOf(H,K):H.__proto__=K)}var T=[!1,"center","right","justify"],B=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],U=[!1,"serif","monospace"],Q=["1","2","3",!1],X=["small",!1,"large","huge"],$=function(H){M(K,H);function K(ee,V){S(this,K);var Z=A(this,(K.__proto__||Object.getPrototypeOf(K)).call(this,ee,V)),Y=function ne(re){if(!document.body.contains(ee.root))return document.body.removeEventListener("click",ne);Z.tooltip!=null&&!Z.tooltip.root.contains(re.target)&&document.activeElement!==Z.tooltip.textbox&&!Z.quill.hasFocus()&&Z.tooltip.hide(),Z.pickers!=null&&Z.pickers.forEach(function(ie){ie.container.contains(re.target)||ie.close()})};return ee.emitter.listenDOM("click",document.body,Y),Z}return l(K,[{key:"addModule",value:function(V){var Z=u(K.prototype.__proto__||Object.getPrototypeOf(K.prototype),"addModule",this).call(this,V);return V==="toolbar"&&this.extendToolbar(Z),Z}},{key:"buildButtons",value:function(V,Z){V.forEach(function(Y){var ne=Y.getAttribute("class")||"";ne.split(/\s+/).forEach(function(re){if(re.startsWith("ql-")&&(re=re.slice(3),Z[re]!=null))if(re==="direction")Y.innerHTML=Z[re][""]+Z[re].rtl;else if(typeof Z[re]=="string")Y.innerHTML=Z[re];else{var ie=Y.value||"";ie!=null&&Z[re][ie]&&(Y.innerHTML=Z[re][ie])}})})}},{key:"buildPickers",value:function(V,Z){var Y=this;this.pickers=V.map(function(re){if(re.classList.contains("ql-align"))return re.querySelector("option")==null&&z(re,T),new y.default(re,Z.align);if(re.classList.contains("ql-background")||re.classList.contains("ql-color")){var ie=re.classList.contains("ql-background")?"background":"color";return re.querySelector("option")==null&&z(re,B,ie==="background"?"#ffffff":"#000000"),new d.default(re,Z[ie])}else return re.querySelector("option")==null&&(re.classList.contains("ql-font")?z(re,U):re.classList.contains("ql-header")?z(re,Q):re.classList.contains("ql-size")&&z(re,X)),new L.default(re)});var ne=function(){Y.pickers.forEach(function(ie){ie.update()})};this.quill.on(O.default.events.EDITOR_CHANGE,ne)}}]),K}(p.default);$.DEFAULTS=(0,h.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var K=this,ee=this.container.querySelector("input.ql-image[type=file]");ee==null&&(ee=document.createElement("input"),ee.setAttribute("type","file"),ee.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),ee.classList.add("ql-image"),ee.addEventListener("change",function(){if(ee.files!=null&&ee.files[0]!=null){var V=new FileReader;V.onload=function(Z){var Y=K.quill.getSelection(!0);K.quill.updateContents(new _.default().retain(Y.index).delete(Y.length).insert({image:Z.target.result}),O.default.sources.USER),K.quill.setSelection(Y.index+1,O.default.sources.SILENT),ee.value=""},V.readAsDataURL(ee.files[0])}}),this.container.appendChild(ee)),ee.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var j=function(H){M(K,H);function K(ee,V){S(this,K);var Z=A(this,(K.__proto__||Object.getPrototypeOf(K)).call(this,ee,V));return Z.textbox=Z.root.querySelector('input[type="text"]'),Z.listen(),Z}return l(K,[{key:"listen",value:function(){var V=this;this.textbox.addEventListener("keydown",function(Z){x.default.match(Z,"enter")?(V.save(),Z.preventDefault()):x.default.match(Z,"escape")&&(V.cancel(),Z.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),Z!=null?this.textbox.value=Z:V!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+V)||""),this.root.setAttribute("data-mode",V)}},{key:"restoreFocus",value:function(){var V=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=V}},{key:"save",value:function(){var V=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var Z=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",V,O.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",V,O.default.sources.USER)),this.quill.root.scrollTop=Z;break}case"video":V=I(V);case"formula":{if(!V)break;var Y=this.quill.getSelection(!0);if(Y!=null){var ne=Y.index+Y.length;this.quill.insertEmbed(ne,this.root.getAttribute("data-mode"),V,O.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(ne+1," ",O.default.sources.USER),this.quill.setSelection(ne+2,O.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),K}(D.default);function I(H){var K=H.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||H.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return K?(K[1]||"https")+"://www.youtube.com/embed/"+K[2]+"?showinfo=0":(K=H.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(K[1]||"https")+"://player.vimeo.com/video/"+K[2]+"/":H}function z(H,K){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;K.forEach(function(V){var Z=document.createElement("option");V===ee?Z.setAttribute("selected","selected"):Z.setAttribute("value",V),H.appendChild(Z)})}n.BaseTooltip=j,n.default=$},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function u(){this.head=this.tail=null,this.length=0}return u.prototype.append=function(){for(var c=[],h=0;h<arguments.length;h++)c[h]=arguments[h];this.insertBefore(c[0],null),c.length>1&&this.append.apply(this,c.slice(1))},u.prototype.contains=function(c){for(var h,b=this.iterator();h=b();)if(h===c)return!0;return!1},u.prototype.insertBefore=function(c,h){c&&(c.next=h,h!=null?(c.prev=h.prev,h.prev!=null&&(h.prev.next=c),h.prev=c,h===this.head&&(this.head=c)):this.tail!=null?(this.tail.next=c,c.prev=this.tail,this.tail=c):(c.prev=null,this.head=this.tail=c),this.length+=1)},u.prototype.offset=function(c){for(var h=0,b=this.head;b!=null;){if(b===c)return h;h+=b.length(),b=b.next}return-1},u.prototype.remove=function(c){this.contains(c)&&(c.prev!=null&&(c.prev.next=c.next),c.next!=null&&(c.next.prev=c.prev),c===this.head&&(this.head=c.next),c===this.tail&&(this.tail=c.prev),this.length-=1)},u.prototype.iterator=function(c){return c===void 0&&(c=this.head),function(){var h=c;return c!=null&&(c=c.next),h}},u.prototype.find=function(c,h){h===void 0&&(h=!1);for(var b,_=this.iterator();b=_();){var k=b.length();if(c<k||h&&c===k&&(b.next==null||b.next.length()!==0))return[b,c];c-=k}return[null,0]},u.prototype.forEach=function(c){for(var h,b=this.iterator();h=b();)c(h)},u.prototype.forEachAt=function(c,h,b){if(!(h<=0))for(var _=this.find(c),k=_[0],O=_[1],v,x=c-O,g=this.iterator(k);(v=g())&&x<c+h;){var p=v.length();c>x?b(v,c-x,Math.min(h,x+p-c)):b(v,0,Math.min(p,c+h-x)),x+=p}},u.prototype.map=function(c){return this.reduce(function(h,b){return h.push(c(b)),h},[])},u.prototype.reduce=function(c,h){for(var b,_=this.iterator();b=_();)h=c(h,b);return h},u}();n.default=l},function(t,n,a){var l=this&&this.__extends||function(){var k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,v){O.__proto__=v}||function(O,v){for(var x in v)v.hasOwnProperty(x)&&(O[x]=v[x])};return function(O,v){k(O,v);function x(){this.constructor=O}O.prototype=v===null?Object.create(v):(x.prototype=v.prototype,new x)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(17),c=a(1),h={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},b=100,_=function(k){l(O,k);function O(v){var x=k.call(this,v)||this;return x.scroll=x,x.observer=new MutationObserver(function(g){x.update(g)}),x.observer.observe(x.domNode,h),x.attach(),x}return O.prototype.detach=function(){k.prototype.detach.call(this),this.observer.disconnect()},O.prototype.deleteAt=function(v,x){this.update(),v===0&&x===this.length()?this.children.forEach(function(g){g.remove()}):k.prototype.deleteAt.call(this,v,x)},O.prototype.formatAt=function(v,x,g,p){this.update(),k.prototype.formatAt.call(this,v,x,g,p)},O.prototype.insertAt=function(v,x,g){this.update(),k.prototype.insertAt.call(this,v,x,g)},O.prototype.optimize=function(v,x){var g=this;v===void 0&&(v=[]),x===void 0&&(x={}),k.prototype.optimize.call(this,x);for(var p=[].slice.call(this.observer.takeRecords());p.length>0;)v.push(p.pop());for(var P=function(w,L){L===void 0&&(L=!0),!(w==null||w===g)&&w.domNode.parentNode!=null&&(w.domNode[c.DATA_KEY].mutations==null&&(w.domNode[c.DATA_KEY].mutations=[]),L&&P(w.parent))},d=function(w){w.domNode[c.DATA_KEY]==null||w.domNode[c.DATA_KEY].mutations==null||(w instanceof u.default&&w.children.forEach(d),w.optimize(x))},m=v,y=0;m.length>0;y+=1){if(y>=b)throw new Error("[Parchment] Maximum optimize iterations reached");for(m.forEach(function(w){var L=c.find(w.target,!0);L!=null&&(L.domNode===w.target&&(w.type==="childList"?(P(c.find(w.previousSibling,!1)),[].forEach.call(w.addedNodes,function(R){var D=c.find(R,!1);P(D,!1),D instanceof u.default&&D.children.forEach(function(E){P(E,!1)})})):w.type==="attributes"&&P(L.prev)),P(L))}),this.children.forEach(d),m=[].slice.call(this.observer.takeRecords()),p=m.slice();p.length>0;)v.push(p.pop())}},O.prototype.update=function(v,x){var g=this;x===void 0&&(x={}),v=v||this.observer.takeRecords(),v.map(function(p){var P=c.find(p.target,!0);return P==null?null:P.domNode[c.DATA_KEY].mutations==null?(P.domNode[c.DATA_KEY].mutations=[p],P):(P.domNode[c.DATA_KEY].mutations.push(p),null)}).forEach(function(p){p==null||p===g||p.domNode[c.DATA_KEY]==null||p.update(p.domNode[c.DATA_KEY].mutations||[],x)}),this.domNode[c.DATA_KEY].mutations!=null&&k.prototype.update.call(this,this.domNode[c.DATA_KEY].mutations,x),this.optimize(v,x)},O.blotName="scroll",O.defaultChild="block",O.scope=c.Scope.BLOCK_BLOT,O.tagName="DIV",O}(u.default);n.default=_},function(t,n,a){var l=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,O){k.__proto__=O}||function(k,O){for(var v in O)O.hasOwnProperty(v)&&(k[v]=O[v])};return function(k,O){_(k,O);function v(){this.constructor=k}k.prototype=O===null?Object.create(O):(v.prototype=O.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(18),c=a(1);function h(_,k){if(Object.keys(_).length!==Object.keys(k).length)return!1;for(var O in _)if(_[O]!==k[O])return!1;return!0}var b=function(_){l(k,_);function k(){return _!==null&&_.apply(this,arguments)||this}return k.formats=function(O){if(O.tagName!==k.tagName)return _.formats.call(this,O)},k.prototype.format=function(O,v){var x=this;O===this.statics.blotName&&!v?(this.children.forEach(function(g){g instanceof u.default||(g=g.wrap(k.blotName,!0)),x.attributes.copy(g)}),this.unwrap()):_.prototype.format.call(this,O,v)},k.prototype.formatAt=function(O,v,x,g){if(this.formats()[x]!=null||c.query(x,c.Scope.ATTRIBUTE)){var p=this.isolate(O,v);p.format(x,g)}else _.prototype.formatAt.call(this,O,v,x,g)},k.prototype.optimize=function(O){_.prototype.optimize.call(this,O);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var x=this.next;x instanceof k&&x.prev===this&&h(v,x.formats())&&(x.moveChildren(this),x.remove())},k.blotName="inline",k.scope=c.Scope.INLINE_BLOT,k.tagName="SPAN",k}(u.default);n.default=b},function(t,n,a){var l=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var O in k)k.hasOwnProperty(O)&&(_[O]=k[O])};return function(_,k){b(_,k);function O(){this.constructor=_}_.prototype=k===null?Object.create(k):(O.prototype=k.prototype,new O)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(18),c=a(1),h=function(b){l(_,b);function _(){return b!==null&&b.apply(this,arguments)||this}return _.formats=function(k){var O=c.query(_.blotName).tagName;if(k.tagName!==O)return b.formats.call(this,k)},_.prototype.format=function(k,O){c.query(k,c.Scope.BLOCK)!=null&&(k===this.statics.blotName&&!O?this.replaceWith(_.blotName):b.prototype.format.call(this,k,O))},_.prototype.formatAt=function(k,O,v,x){c.query(v,c.Scope.BLOCK)!=null?this.format(v,x):b.prototype.formatAt.call(this,k,O,v,x)},_.prototype.insertAt=function(k,O,v){if(v==null||c.query(O,c.Scope.INLINE)!=null)b.prototype.insertAt.call(this,k,O,v);else{var x=this.split(k),g=c.create(O,v);x.parent.insertBefore(g,x)}},_.prototype.update=function(k,O){navigator.userAgent.match(/Trident/)?this.build():b.prototype.update.call(this,k,O)},_.blotName="block",_.scope=c.Scope.BLOCK_BLOT,_.tagName="P",_}(u.default);n.default=h},function(t,n,a){var l=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,_){b.__proto__=_}||function(b,_){for(var k in _)_.hasOwnProperty(k)&&(b[k]=_[k])};return function(b,_){h(b,_);function k(){this.constructor=b}b.prototype=_===null?Object.create(_):(k.prototype=_.prototype,new k)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(19),c=function(h){l(b,h);function b(){return h!==null&&h.apply(this,arguments)||this}return b.formats=function(_){},b.prototype.format=function(_,k){h.prototype.formatAt.call(this,0,this.length(),_,k)},b.prototype.formatAt=function(_,k,O,v){_===0&&k===this.length()?this.format(O,v):h.prototype.formatAt.call(this,_,k,O,v)},b.prototype.formats=function(){return this.statics.formats(this.domNode)},b}(u.default);n.default=c},function(t,n,a){var l=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var O in k)k.hasOwnProperty(O)&&(_[O]=k[O])};return function(_,k){b(_,k);function O(){this.constructor=_}_.prototype=k===null?Object.create(k):(O.prototype=k.prototype,new O)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(19),c=a(1),h=function(b){l(_,b);function _(k){var O=b.call(this,k)||this;return O.text=O.statics.value(O.domNode),O}return _.create=function(k){return document.createTextNode(k)},_.value=function(k){var O=k.data;return O.normalize&&(O=O.normalize()),O},_.prototype.deleteAt=function(k,O){this.domNode.data=this.text=this.text.slice(0,k)+this.text.slice(k+O)},_.prototype.index=function(k,O){return this.domNode===k?O:-1},_.prototype.insertAt=function(k,O,v){v==null?(this.text=this.text.slice(0,k)+O+this.text.slice(k),this.domNode.data=this.text):b.prototype.insertAt.call(this,k,O,v)},_.prototype.length=function(){return this.text.length},_.prototype.optimize=function(k){b.prototype.optimize.call(this,k),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof _&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},_.prototype.position=function(k,O){return[this.domNode,k]},_.prototype.split=function(k,O){if(O===void 0&&(O=!1),!O){if(k===0)return this;if(k===this.length())return this.next}var v=c.create(this.domNode.splitText(k));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},_.prototype.update=function(k,O){var v=this;k.some(function(x){return x.type==="characterData"&&x.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},_.prototype.value=function(){return this.text},_.blotName="text",_.scope=c.Scope.INLINE_BLOT,_}(u.default);n.default=h},function(t,n,a){var l=document.createElement("div");if(l.classList.toggle("test-class",!1),l.classList.contains("test-class")){var u=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(c,h){return arguments.length>1&&!this.contains(c)==!h?h:u.call(this,c)}}String.prototype.startsWith||(String.prototype.startsWith=function(c,h){return h=h||0,this.substr(h,c.length)===c}),String.prototype.endsWith||(String.prototype.endsWith=function(c,h){var b=this.toString();(typeof h!="number"||!isFinite(h)||Math.floor(h)!==h||h>b.length)&&(h=b.length),h-=c.length;var _=b.indexOf(c,h);return _!==-1&&_===h}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(h){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof h!="function")throw new TypeError("predicate must be a function");for(var b=Object(this),_=b.length>>>0,k=arguments[1],O,v=0;v<_;v++)if(O=b[v],h.call(k,O,v,b))return O}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(t,n){var a=-1,l=1,u=0;function c(y,w,L){if(y==w)return y?[[u,y]]:[];(L<0||y.length<L)&&(L=null);var R=k(y,w),D=y.substring(0,R);y=y.substring(R),w=w.substring(R),R=O(y,w);var E=y.substring(y.length-R);y=y.substring(0,y.length-R),w=w.substring(0,w.length-R);var S=h(y,w);return D&&S.unshift([u,D]),E&&S.push([u,E]),x(S),L!=null&&(S=P(S,L)),S=d(S),S}function h(y,w){var L;if(!y)return[[l,w]];if(!w)return[[a,y]];var R=y.length>w.length?y:w,D=y.length>w.length?w:y,E=R.indexOf(D);if(E!=-1)return L=[[l,R.substring(0,E)],[u,D],[l,R.substring(E+D.length)]],y.length>w.length&&(L[0][0]=L[2][0]=a),L;if(D.length==1)return[[a,y],[l,w]];var S=v(y,w);if(S){var A=S[0],M=S[1],T=S[2],B=S[3],U=S[4],Q=c(A,T),X=c(M,B);return Q.concat([[u,U]],X)}return b(y,w)}function b(y,w){for(var L=y.length,R=w.length,D=Math.ceil((L+R)/2),E=D,S=2*D,A=new Array(S),M=new Array(S),T=0;T<S;T++)A[T]=-1,M[T]=-1;A[E+1]=0,M[E+1]=0;for(var B=L-R,U=B%2!=0,Q=0,X=0,$=0,j=0,I=0;I<D;I++){for(var z=-I+Q;z<=I-X;z+=2){var H=E+z,K;z==-I||z!=I&&A[H-1]<A[H+1]?K=A[H+1]:K=A[H-1]+1;for(var ee=K-z;K<L&&ee<R&&y.charAt(K)==w.charAt(ee);)K++,ee++;if(A[H]=K,K>L)X+=2;else if(ee>R)Q+=2;else if(U){var V=E+B-z;if(V>=0&&V<S&&M[V]!=-1){var Z=L-M[V];if(K>=Z)return _(y,w,K,ee)}}}for(var Y=-I+$;Y<=I-j;Y+=2){var V=E+Y,Z;Y==-I||Y!=I&&M[V-1]<M[V+1]?Z=M[V+1]:Z=M[V-1]+1;for(var ne=Z-Y;Z<L&&ne<R&&y.charAt(L-Z-1)==w.charAt(R-ne-1);)Z++,ne++;if(M[V]=Z,Z>L)j+=2;else if(ne>R)$+=2;else if(!U){var H=E+B-Y;if(H>=0&&H<S&&A[H]!=-1){var K=A[H],ee=E+K-H;if(Z=L-Z,K>=Z)return _(y,w,K,ee)}}}}return[[a,y],[l,w]]}function _(y,w,L,R){var D=y.substring(0,L),E=w.substring(0,R),S=y.substring(L),A=w.substring(R),M=c(D,E),T=c(S,A);return M.concat(T)}function k(y,w){if(!y||!w||y.charAt(0)!=w.charAt(0))return 0;for(var L=0,R=Math.min(y.length,w.length),D=R,E=0;L<D;)y.substring(E,D)==w.substring(E,D)?(L=D,E=L):R=D,D=Math.floor((R-L)/2+L);return D}function O(y,w){if(!y||!w||y.charAt(y.length-1)!=w.charAt(w.length-1))return 0;for(var L=0,R=Math.min(y.length,w.length),D=R,E=0;L<D;)y.substring(y.length-D,y.length-E)==w.substring(w.length-D,w.length-E)?(L=D,E=L):R=D,D=Math.floor((R-L)/2+L);return D}function v(y,w){var L=y.length>w.length?y:w,R=y.length>w.length?w:y;if(L.length<4||R.length*2<L.length)return null;function D(X,$,j){for(var I=X.substring(j,j+Math.floor(X.length/4)),z=-1,H="",K,ee,V,Z;(z=$.indexOf(I,z+1))!=-1;){var Y=k(X.substring(j),$.substring(z)),ne=O(X.substring(0,j),$.substring(0,z));H.length<ne+Y&&(H=$.substring(z-ne,z)+$.substring(z,z+Y),K=X.substring(0,j-ne),ee=X.substring(j+Y),V=$.substring(0,z-ne),Z=$.substring(z+Y))}return H.length*2>=X.length?[K,ee,V,Z,H]:null}var E=D(L,R,Math.ceil(L.length/4)),S=D(L,R,Math.ceil(L.length/2)),A;if(!E&&!S)return null;S?E?A=E[4].length>S[4].length?E:S:A=S:A=E;var M,T,B,U;y.length>w.length?(M=A[0],T=A[1],B=A[2],U=A[3]):(B=A[0],U=A[1],M=A[2],T=A[3]);var Q=A[4];return[M,T,B,U,Q]}function x(y){y.push([u,""]);for(var w=0,L=0,R=0,D="",E="",S;w<y.length;)switch(y[w][0]){case l:R++,E+=y[w][1],w++;break;case a:L++,D+=y[w][1],w++;break;case u:L+R>1?(L!==0&&R!==0&&(S=k(E,D),S!==0&&(w-L-R>0&&y[w-L-R-1][0]==u?y[w-L-R-1][1]+=E.substring(0,S):(y.splice(0,0,[u,E.substring(0,S)]),w++),E=E.substring(S),D=D.substring(S)),S=O(E,D),S!==0&&(y[w][1]=E.substring(E.length-S)+y[w][1],E=E.substring(0,E.length-S),D=D.substring(0,D.length-S))),L===0?y.splice(w-R,L+R,[l,E]):R===0?y.splice(w-L,L+R,[a,D]):y.splice(w-L-R,L+R,[a,D],[l,E]),w=w-L-R+(L?1:0)+(R?1:0)+1):w!==0&&y[w-1][0]==u?(y[w-1][1]+=y[w][1],y.splice(w,1)):w++,R=0,L=0,D="",E="";break}y[y.length-1][1]===""&&y.pop();var A=!1;for(w=1;w<y.length-1;)y[w-1][0]==u&&y[w+1][0]==u&&(y[w][1].substring(y[w][1].length-y[w-1][1].length)==y[w-1][1]?(y[w][1]=y[w-1][1]+y[w][1].substring(0,y[w][1].length-y[w-1][1].length),y[w+1][1]=y[w-1][1]+y[w+1][1],y.splice(w-1,1),A=!0):y[w][1].substring(0,y[w+1][1].length)==y[w+1][1]&&(y[w-1][1]+=y[w+1][1],y[w][1]=y[w][1].substring(y[w+1][1].length)+y[w+1][1],y.splice(w+1,1),A=!0)),w++;A&&x(y)}var g=c;g.INSERT=l,g.DELETE=a,g.EQUAL=u,t.exports=g;function p(y,w){if(w===0)return[u,y];for(var L=0,R=0;R<y.length;R++){var D=y[R];if(D[0]===a||D[0]===u){var E=L+D[1].length;if(w===E)return[R+1,y];if(w<E){y=y.slice();var S=w-L,A=[D[0],D[1].slice(0,S)],M=[D[0],D[1].slice(S)];return y.splice(R,1,A,M),[R+1,y]}else L=E}}throw new Error("cursor_pos is out of bounds!")}function P(y,w){var L=p(y,w),R=L[1],D=L[0],E=R[D],S=R[D+1];if(E==null)return y;if(E[0]!==u)return y;if(S!=null&&E[1]+S[1]===S[1]+E[1])return R.splice(D,2,S,E),m(R,D,2);if(S!=null&&S[1].indexOf(E[1])===0){R.splice(D,2,[S[0],E[1]],[0,E[1]]);var A=S[1].slice(E[1].length);return A.length>0&&R.splice(D+2,0,[S[0],A]),m(R,D,3)}else return y}function d(y){for(var w=!1,L=function(S){return S.charCodeAt(0)>=56320&&S.charCodeAt(0)<=57343},R=function(S){return S.charCodeAt(S.length-1)>=55296&&S.charCodeAt(S.length-1)<=56319},D=2;D<y.length;D+=1)y[D-2][0]===u&&R(y[D-2][1])&&y[D-1][0]===a&&L(y[D-1][1])&&y[D][0]===l&&L(y[D][1])&&(w=!0,y[D-1][1]=y[D-2][1].slice(-1)+y[D-1][1],y[D][1]=y[D-2][1].slice(-1)+y[D][1],y[D-2][1]=y[D-2][1].slice(0,-1));if(!w)return y;for(var E=[],D=0;D<y.length;D+=1)y[D][1].length>0&&E.push(y[D]);return E}function m(y,w,L){for(var R=w+L-1;R>=0&&R>=w-1;R--)if(R+1<y.length){var D=y[R],E=y[R+1];D[0]===E[1]&&y.splice(R,2,[D[0],D[1]+E[1]])}return y}},function(t,n){n=t.exports=typeof Object.keys=="function"?Object.keys:a,n.shim=a;function a(l){var u=[];for(var c in l)u.push(c);return u}},function(t,n){var a=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=t.exports=a?l:u,n.supported=l;function l(c){return Object.prototype.toString.call(c)=="[object Arguments]"}n.unsupported=u;function u(c){return c&&typeof c=="object"&&typeof c.length=="number"&&Object.prototype.hasOwnProperty.call(c,"callee")&&!Object.prototype.propertyIsEnumerable.call(c,"callee")||!1}},function(t,n){var a=Object.prototype.hasOwnProperty,l="~";function u(){}Object.create&&(u.prototype=Object.create(null),new u().__proto__||(l=!1));function c(b,_,k){this.fn=b,this.context=_,this.once=k||!1}function h(){this._events=new u,this._eventsCount=0}h.prototype.eventNames=function(){var _=[],k,O;if(this._eventsCount===0)return _;for(O in k=this._events)a.call(k,O)&&_.push(l?O.slice(1):O);return Object.getOwnPropertySymbols?_.concat(Object.getOwnPropertySymbols(k)):_},h.prototype.listeners=function(_,k){var O=l?l+_:_,v=this._events[O];if(k)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var x=0,g=v.length,p=new Array(g);x<g;x++)p[x]=v[x].fn;return p},h.prototype.emit=function(_,k,O,v,x,g){var p=l?l+_:_;if(!this._events[p])return!1;var P=this._events[p],d=arguments.length,m,y;if(P.fn){switch(P.once&&this.removeListener(_,P.fn,void 0,!0),d){case 1:return P.fn.call(P.context),!0;case 2:return P.fn.call(P.context,k),!0;case 3:return P.fn.call(P.context,k,O),!0;case 4:return P.fn.call(P.context,k,O,v),!0;case 5:return P.fn.call(P.context,k,O,v,x),!0;case 6:return P.fn.call(P.context,k,O,v,x,g),!0}for(y=1,m=new Array(d-1);y<d;y++)m[y-1]=arguments[y];P.fn.apply(P.context,m)}else{var w=P.length,L;for(y=0;y<w;y++)switch(P[y].once&&this.removeListener(_,P[y].fn,void 0,!0),d){case 1:P[y].fn.call(P[y].context);break;case 2:P[y].fn.call(P[y].context,k);break;case 3:P[y].fn.call(P[y].context,k,O);break;case 4:P[y].fn.call(P[y].context,k,O,v);break;default:if(!m)for(L=1,m=new Array(d-1);L<d;L++)m[L-1]=arguments[L];P[y].fn.apply(P[y].context,m)}}return!0},h.prototype.on=function(_,k,O){var v=new c(k,O||this),x=l?l+_:_;return this._events[x]?this._events[x].fn?this._events[x]=[this._events[x],v]:this._events[x].push(v):(this._events[x]=v,this._eventsCount++),this},h.prototype.once=function(_,k,O){var v=new c(k,O||this,!0),x=l?l+_:_;return this._events[x]?this._events[x].fn?this._events[x]=[this._events[x],v]:this._events[x].push(v):(this._events[x]=v,this._eventsCount++),this},h.prototype.removeListener=function(_,k,O,v){var x=l?l+_:_;if(!this._events[x])return this;if(!k)return--this._eventsCount===0?this._events=new u:delete this._events[x],this;var g=this._events[x];if(g.fn)g.fn===k&&(!v||g.once)&&(!O||g.context===O)&&(--this._eventsCount===0?this._events=new u:delete this._events[x]);else{for(var p=0,P=[],d=g.length;p<d;p++)(g[p].fn!==k||v&&!g[p].once||O&&g[p].context!==O)&&P.push(g[p]);P.length?this._events[x]=P.length===1?P[0]:P:--this._eventsCount===0?this._events=new u:delete this._events[x]}return this},h.prototype.removeAllListeners=function(_){var k;return _?(k=l?l+_:_,this._events[k]&&(--this._eventsCount===0?this._events=new u:delete this._events[k])):(this._events=new u,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prototype.setMaxListeners=function(){return this},h.prefixed=l,h.EventEmitter=h,typeof t<"u"&&(t.exports=h)},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(fe){return typeof fe}:function(fe){return fe&&typeof Symbol=="function"&&fe.constructor===Symbol&&fe!==Symbol.prototype?"symbol":typeof fe},u=function(){function fe(ge,Te){var Re=[],ue=!0,me=!1,xe=void 0;try{for(var Ie=ge[Symbol.iterator](),tt;!(ue=(tt=Ie.next()).done)&&(Re.push(tt.value),!(Te&&Re.length===Te));ue=!0);}catch(lt){me=!0,xe=lt}finally{try{!ue&&Ie.return&&Ie.return()}finally{if(me)throw xe}}return Re}return function(ge,Te){if(Array.isArray(ge))return ge;if(Symbol.iterator in Object(ge))return fe(ge,Te);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function fe(ge,Te){for(var Re=0;Re<Te.length;Re++){var ue=Te[Re];ue.enumerable=ue.enumerable||!1,ue.configurable=!0,"value"in ue&&(ue.writable=!0),Object.defineProperty(ge,ue.key,ue)}}return function(ge,Te,Re){return Te&&fe(ge.prototype,Te),Re&&fe(ge,Re),ge}}(),h=a(3),b=M(h),_=a(2),k=M(_),O=a(0),v=M(O),x=a(5),g=M(x),p=a(10),P=M(p),d=a(9),m=M(d),y=a(36),w=a(37),L=a(13),R=M(L),D=a(26),E=a(38),S=a(39),A=a(40);function M(fe){return fe&&fe.__esModule?fe:{default:fe}}function T(fe,ge,Te){return ge in fe?Object.defineProperty(fe,ge,{value:Te,enumerable:!0,configurable:!0,writable:!0}):fe[ge]=Te,fe}function B(fe,ge){if(!(fe instanceof ge))throw new TypeError("Cannot call a class as a function")}function U(fe,ge){if(!fe)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ge&&(typeof ge=="object"||typeof ge=="function")?ge:fe}function Q(fe,ge){if(typeof ge!="function"&&ge!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ge);fe.prototype=Object.create(ge&&ge.prototype,{constructor:{value:fe,enumerable:!1,writable:!0,configurable:!0}}),ge&&(Object.setPrototypeOf?Object.setPrototypeOf(fe,ge):fe.__proto__=ge)}var X=(0,P.default)("quill:clipboard"),$="__ql-matcher",j=[[Node.TEXT_NODE,De],[Node.TEXT_NODE,he],["br",ae],[Node.ELEMENT_NODE,he],[Node.ELEMENT_NODE,ie],[Node.ELEMENT_NODE,Se],[Node.ELEMENT_NODE,re],[Node.ELEMENT_NODE,Ee],["li",de],["b",ne.bind(ne,"bold")],["i",ne.bind(ne,"italic")],["style",se]],I=[y.AlignAttribute,E.DirectionAttribute].reduce(function(fe,ge){return fe[ge.keyName]=ge,fe},{}),z=[y.AlignStyle,w.BackgroundStyle,D.ColorStyle,E.DirectionStyle,S.FontStyle,A.SizeStyle].reduce(function(fe,ge){return fe[ge.keyName]=ge,fe},{}),H=function(fe){Q(ge,fe);function ge(Te,Re){B(this,ge);var ue=U(this,(ge.__proto__||Object.getPrototypeOf(ge)).call(this,Te,Re));return ue.quill.root.addEventListener("paste",ue.onPaste.bind(ue)),ue.container=ue.quill.addContainer("ql-clipboard"),ue.container.setAttribute("contenteditable",!0),ue.container.setAttribute("tabindex",-1),ue.matchers=[],j.concat(ue.options.matchers).forEach(function(me){var xe=u(me,2),Ie=xe[0],tt=xe[1];!Re.matchVisual&&tt===Se||ue.addMatcher(Ie,tt)}),ue}return c(ge,[{key:"addMatcher",value:function(Re,ue){this.matchers.push([Re,ue])}},{key:"convert",value:function(Re){if(typeof Re=="string")return this.container.innerHTML=Re.replace(/\>\r?\n +\</g,"><"),this.convert();var ue=this.quill.getFormat(this.quill.selection.savedRange.index);if(ue[R.default.blotName]){var me=this.container.innerText;return this.container.innerHTML="",new k.default().insert(me,T({},R.default.blotName,ue[R.default.blotName]))}var xe=this.prepareMatching(),Ie=u(xe,2),tt=Ie[0],lt=Ie[1],Fe=Y(this.container,tt,lt);return V(Fe,`
|
|
140
|
-
`)&&Fe.ops[Fe.ops.length-1].attributes==null&&(Fe=Fe.compose(new k.default().retain(Fe.length()-1).delete(1))),X.log("convert",this.container.innerHTML,Fe),this.container.innerHTML="",Fe}},{key:"dangerouslyPasteHTML",value:function(Re,ue){var me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:g.default.sources.API;if(typeof Re=="string")this.quill.setContents(this.convert(Re),ue),this.quill.setSelection(0,g.default.sources.SILENT);else{var xe=this.convert(ue);this.quill.updateContents(new k.default().retain(Re).concat(xe),me),this.quill.setSelection(Re+xe.length(),g.default.sources.SILENT)}}},{key:"onPaste",value:function(Re){var ue=this;if(!(Re.defaultPrevented||!this.quill.isEnabled())){var me=this.quill.getSelection(),xe=new k.default().retain(me.index),Ie=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(g.default.sources.SILENT),setTimeout(function(){xe=xe.concat(ue.convert()).delete(me.length),ue.quill.updateContents(xe,g.default.sources.USER),ue.quill.setSelection(xe.length()-me.length,g.default.sources.SILENT),ue.quill.scrollingContainer.scrollTop=Ie,ue.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Re=this,ue=[],me=[];return this.matchers.forEach(function(xe){var Ie=u(xe,2),tt=Ie[0],lt=Ie[1];switch(tt){case Node.TEXT_NODE:me.push(lt);break;case Node.ELEMENT_NODE:ue.push(lt);break;default:[].forEach.call(Re.container.querySelectorAll(tt),function(Fe){Fe[$]=Fe[$]||[],Fe[$].push(lt)});break}}),[ue,me]}}]),ge}(m.default);H.DEFAULTS={matchers:[],matchVisual:!0};function K(fe,ge,Te){return(typeof ge>"u"?"undefined":l(ge))==="object"?Object.keys(ge).reduce(function(Re,ue){return K(Re,ue,ge[ue])},fe):fe.reduce(function(Re,ue){return ue.attributes&&ue.attributes[ge]?Re.push(ue):Re.insert(ue.insert,(0,b.default)({},T({},ge,Te),ue.attributes))},new k.default)}function ee(fe){if(fe.nodeType!==Node.ELEMENT_NODE)return{};var ge="__ql-computed-style";return fe[ge]||(fe[ge]=window.getComputedStyle(fe))}function V(fe,ge){for(var Te="",Re=fe.ops.length-1;Re>=0&&Te.length<ge.length;--Re){var ue=fe.ops[Re];if(typeof ue.insert!="string")break;Te=ue.insert+Te}return Te.slice(-1*ge.length)===ge}function Z(fe){if(fe.childNodes.length===0)return!1;var ge=ee(fe);return["block","list-item"].indexOf(ge.display)>-1}function Y(fe,ge,Te){return fe.nodeType===fe.TEXT_NODE?Te.reduce(function(Re,ue){return ue(fe,Re)},new k.default):fe.nodeType===fe.ELEMENT_NODE?[].reduce.call(fe.childNodes||[],function(Re,ue){var me=Y(ue,ge,Te);return ue.nodeType===fe.ELEMENT_NODE&&(me=ge.reduce(function(xe,Ie){return Ie(ue,xe)},me),me=(ue[$]||[]).reduce(function(xe,Ie){return Ie(ue,xe)},me)),Re.concat(me)},new k.default):new k.default}function ne(fe,ge,Te){return K(Te,fe,!0)}function re(fe,ge){var Te=v.default.Attributor.Attribute.keys(fe),Re=v.default.Attributor.Class.keys(fe),ue=v.default.Attributor.Style.keys(fe),me={};return Te.concat(Re).concat(ue).forEach(function(xe){var Ie=v.default.query(xe,v.default.Scope.ATTRIBUTE);Ie!=null&&(me[Ie.attrName]=Ie.value(fe),me[Ie.attrName])||(Ie=I[xe],Ie!=null&&(Ie.attrName===xe||Ie.keyName===xe)&&(me[Ie.attrName]=Ie.value(fe)||void 0),Ie=z[xe],Ie!=null&&(Ie.attrName===xe||Ie.keyName===xe)&&(Ie=z[xe],me[Ie.attrName]=Ie.value(fe)||void 0))}),Object.keys(me).length>0&&(ge=K(ge,me)),ge}function ie(fe,ge){var Te=v.default.query(fe);if(Te==null)return ge;if(Te.prototype instanceof v.default.Embed){var Re={},ue=Te.value(fe);ue!=null&&(Re[Te.blotName]=ue,ge=new k.default().insert(Re,Te.formats(fe)))}else typeof Te.formats=="function"&&(ge=K(ge,Te.blotName,Te.formats(fe)));return ge}function ae(fe,ge){return V(ge,`
|
|
141
|
-
`)||ge.insert(`
|
|
142
|
-
`),ge}function se(){return new k.default}function de(fe,ge){var Te=v.default.query(fe);if(Te==null||Te.blotName!=="list-item"||!V(ge,`
|
|
143
|
-
`))return ge;for(var Re=-1,ue=fe.parentNode;!ue.classList.contains("ql-clipboard");)(v.default.query(ue)||{}).blotName==="list"&&(Re+=1),ue=ue.parentNode;return Re<=0?ge:ge.compose(new k.default().retain(ge.length()-1).retain(1,{indent:Re}))}function he(fe,ge){return V(ge,`
|
|
144
|
-
`)||(Z(fe)||ge.length()>0&&fe.nextSibling&&Z(fe.nextSibling))&&ge.insert(`
|
|
145
|
-
`),ge}function Se(fe,ge){if(Z(fe)&&fe.nextElementSibling!=null&&!V(ge,`
|
|
146
|
-
|
|
147
|
-
`)){var Te=fe.offsetHeight+parseFloat(ee(fe).marginTop)+parseFloat(ee(fe).marginBottom);fe.nextElementSibling.offsetTop>fe.offsetTop+Te*1.5&&ge.insert(`
|
|
148
|
-
`)}return ge}function Ee(fe,ge){var Te={},Re=fe.style||{};return Re.fontStyle&&ee(fe).fontStyle==="italic"&&(Te.italic=!0),Re.fontWeight&&(ee(fe).fontWeight.startsWith("bold")||parseInt(ee(fe).fontWeight)>=700)&&(Te.bold=!0),Object.keys(Te).length>0&&(ge=K(ge,Te)),parseFloat(Re.textIndent||0)>0&&(ge=new k.default().insert(" ").concat(ge)),ge}function De(fe,ge){var Te=fe.data;if(fe.parentNode.tagName==="O:P")return ge.insert(Te.trim());if(Te.trim().length===0&&fe.parentNode.classList.contains("ql-clipboard"))return ge;if(!ee(fe.parentNode).whiteSpace.startsWith("pre")){var Re=function(me,xe){return xe=xe.replace(/[^\u00a0]/g,""),xe.length<1&&me?" ":xe};Te=Te.replace(/\r\n/g," ").replace(/\n/g," "),Te=Te.replace(/\s\s+/g,Re.bind(Re,!0)),(fe.previousSibling==null&&Z(fe.parentNode)||fe.previousSibling!=null&&Z(fe.previousSibling))&&(Te=Te.replace(/^\s+/,Re.bind(Re,!1))),(fe.nextSibling==null&&Z(fe.parentNode)||fe.nextSibling!=null&&Z(fe.nextSibling))&&(Te=Te.replace(/\s+$/,Re.bind(Re,!1)))}return ge.insert(Te)}n.default=H,n.matchAttributor=re,n.matchBlot=ie,n.matchNewline=he,n.matchSpacing=Se,n.matchText=De},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function x(g,p){for(var P=0;P<p.length;P++){var d=p[P];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}return function(g,p,P){return p&&x(g.prototype,p),P&&x(g,P),g}}(),u=function x(g,p,P){g===null&&(g=Function.prototype);var d=Object.getOwnPropertyDescriptor(g,p);if(d===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:x(m,p,P)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(P)}},c=a(6),h=b(c);function b(x){return x&&x.__esModule?x:{default:x}}function _(x,g){if(!(x instanceof g))throw new TypeError("Cannot call a class as a function")}function k(x,g){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:x}function O(x,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);x.prototype=Object.create(g&&g.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(x,g):x.__proto__=g)}var v=function(x){O(g,x);function g(){return _(this,g),k(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return l(g,[{key:"optimize",value:function(P){u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"optimize",this).call(this,P),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return u(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),g}(h.default);v.blotName="bold",v.tagName=["STRONG","B"],n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var l=function(){function A(M,T){var B=[],U=!0,Q=!1,X=void 0;try{for(var $=M[Symbol.iterator](),j;!(U=(j=$.next()).done)&&(B.push(j.value),!(T&&B.length===T));U=!0);}catch(I){Q=!0,X=I}finally{try{!U&&$.return&&$.return()}finally{if(Q)throw X}}return B}return function(M,T){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return A(M,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function A(M,T){for(var B=0;B<T.length;B++){var U=T[B];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(M,U.key,U)}}return function(M,T,B){return T&&A(M.prototype,T),B&&A(M,B),M}}(),c=a(2),h=P(c),b=a(0),_=P(b),k=a(5),O=P(k),v=a(10),x=P(v),g=a(9),p=P(g);function P(A){return A&&A.__esModule?A:{default:A}}function d(A,M,T){return M in A?Object.defineProperty(A,M,{value:T,enumerable:!0,configurable:!0,writable:!0}):A[M]=T,A}function m(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function y(A,M){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:A}function w(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(A,M):A.__proto__=M)}var L=(0,x.default)("quill:toolbar"),R=function(A){w(M,A);function M(T,B){m(this,M);var U=y(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,T,B));if(Array.isArray(U.options.container)){var Q=document.createElement("div");E(Q,U.options.container),T.container.parentNode.insertBefore(Q,T.container),U.container=Q}else typeof U.options.container=="string"?U.container=document.querySelector(U.options.container):U.container=U.options.container;if(!(U.container instanceof HTMLElement)){var X;return X=L.error("Container required for toolbar",U.options),y(U,X)}return U.container.classList.add("ql-toolbar"),U.controls=[],U.handlers={},Object.keys(U.options.handlers).forEach(function($){U.addHandler($,U.options.handlers[$])}),[].forEach.call(U.container.querySelectorAll("button, select"),function($){U.attach($)}),U.quill.on(O.default.events.EDITOR_CHANGE,function($,j){$===O.default.events.SELECTION_CHANGE&&U.update(j)}),U.quill.on(O.default.events.SCROLL_OPTIMIZE,function(){var $=U.quill.selection.getRange(),j=l($,1),I=j[0];U.update(I)}),U}return u(M,[{key:"addHandler",value:function(B,U){this.handlers[B]=U}},{key:"attach",value:function(B){var U=this,Q=[].find.call(B.classList,function($){return $.indexOf("ql-")===0});if(Q){if(Q=Q.slice(3),B.tagName==="BUTTON"&&B.setAttribute("type","button"),this.handlers[Q]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Q]==null){L.warn("ignoring attaching to disabled format",Q,B);return}if(_.default.query(Q)==null){L.warn("ignoring attaching to nonexistent format",Q,B);return}}var X=B.tagName==="SELECT"?"change":"click";B.addEventListener(X,function($){var j=void 0;if(B.tagName==="SELECT"){if(B.selectedIndex<0)return;var I=B.options[B.selectedIndex];I.hasAttribute("selected")?j=!1:j=I.value||!1}else B.classList.contains("ql-active")?j=!1:j=B.value||!B.hasAttribute("value"),$.preventDefault();U.quill.focus();var z=U.quill.selection.getRange(),H=l(z,1),K=H[0];if(U.handlers[Q]!=null)U.handlers[Q].call(U,j);else if(_.default.query(Q).prototype instanceof _.default.Embed){if(j=prompt("Enter "+Q),!j)return;U.quill.updateContents(new h.default().retain(K.index).delete(K.length).insert(d({},Q,j)),O.default.sources.USER)}else U.quill.format(Q,j,O.default.sources.USER);U.update(K)}),this.controls.push([Q,B])}}},{key:"update",value:function(B){var U=B==null?{}:this.quill.getFormat(B);this.controls.forEach(function(Q){var X=l(Q,2),$=X[0],j=X[1];if(j.tagName==="SELECT"){var I=void 0;if(B==null)I=null;else if(U[$]==null)I=j.querySelector("option[selected]");else if(!Array.isArray(U[$])){var z=U[$];typeof z=="string"&&(z=z.replace(/\"/g,'\\"')),I=j.querySelector('option[value="'+z+'"]')}I==null?(j.value="",j.selectedIndex=-1):I.selected=!0}else if(B==null)j.classList.remove("ql-active");else if(j.hasAttribute("value")){var H=U[$]===j.getAttribute("value")||U[$]!=null&&U[$].toString()===j.getAttribute("value")||U[$]==null&&!j.getAttribute("value");j.classList.toggle("ql-active",H)}else j.classList.toggle("ql-active",U[$]!=null)})}}]),M}(p.default);R.DEFAULTS={};function D(A,M,T){var B=document.createElement("button");B.setAttribute("type","button"),B.classList.add("ql-"+M),T!=null&&(B.value=T),A.appendChild(B)}function E(A,M){Array.isArray(M[0])||(M=[M]),M.forEach(function(T){var B=document.createElement("span");B.classList.add("ql-formats"),T.forEach(function(U){if(typeof U=="string")D(B,U);else{var Q=Object.keys(U)[0],X=U[Q];Array.isArray(X)?S(B,Q,X):D(B,Q,X)}}),A.appendChild(B)})}function S(A,M,T){var B=document.createElement("select");B.classList.add("ql-"+M),T.forEach(function(U){var Q=document.createElement("option");U!==!1?Q.setAttribute("value",U):Q.setAttribute("selected","selected"),B.appendChild(Q)}),A.appendChild(B)}R.DEFAULTS={container:null,handlers:{clean:function(){var M=this,T=this.quill.getSelection();if(T!=null)if(T.length==0){var B=this.quill.getFormat();Object.keys(B).forEach(function(U){_.default.query(U,_.default.Scope.INLINE)!=null&&M.quill.format(U,!1)})}else this.quill.removeFormat(T,O.default.sources.USER)},direction:function(M){var T=this.quill.getFormat().align;M==="rtl"&&T==null?this.quill.format("align","right",O.default.sources.USER):!M&&T==="right"&&this.quill.format("align",!1,O.default.sources.USER),this.quill.format("direction",M,O.default.sources.USER)},indent:function(M){var T=this.quill.getSelection(),B=this.quill.getFormat(T),U=parseInt(B.indent||0);if(M==="+1"||M==="-1"){var Q=M==="+1"?1:-1;B.direction==="rtl"&&(Q*=-1),this.quill.format("indent",U+Q,O.default.sources.USER)}},link:function(M){M===!0&&(M=prompt("Enter link URL:")),this.quill.format("link",M,O.default.sources.USER)},list:function(M){var T=this.quill.getSelection(),B=this.quill.getFormat(T);M==="check"?B.list==="checked"||B.list==="unchecked"?this.quill.format("list",!1,O.default.sources.USER):this.quill.format("list","unchecked",O.default.sources.USER):this.quill.format("list",M,O.default.sources.USER)}}},n.default=R,n.addControls=E},function(t,n){t.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(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function x(g,p){for(var P=0;P<p.length;P++){var d=p[P];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}return function(g,p,P){return p&&x(g.prototype,p),P&&x(g,P),g}}(),u=function x(g,p,P){g===null&&(g=Function.prototype);var d=Object.getOwnPropertyDescriptor(g,p);if(d===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:x(m,p,P)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(P)}},c=a(28),h=b(c);function b(x){return x&&x.__esModule?x:{default:x}}function _(x,g){if(!(x instanceof g))throw new TypeError("Cannot call a class as a function")}function k(x,g){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:x}function O(x,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);x.prototype=Object.create(g&&g.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(x,g):x.__proto__=g)}var v=function(x){O(g,x);function g(p,P){_(this,g);var d=k(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,p));return d.label.innerHTML=P,d.container.classList.add("ql-color-picker"),[].slice.call(d.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(m){m.classList.add("ql-primary")}),d}return l(g,[{key:"buildItem",value:function(P){var d=u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"buildItem",this).call(this,P);return d.style.backgroundColor=P.getAttribute("value")||"",d}},{key:"selectItem",value:function(P,d){u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,P,d);var m=this.label.querySelector(".ql-color-label"),y=P&&P.getAttribute("data-value")||"";m&&(m.tagName==="line"?m.style.stroke=y:m.style.fill=y)}}]),g}(h.default);n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function x(g,p){for(var P=0;P<p.length;P++){var d=p[P];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}return function(g,p,P){return p&&x(g.prototype,p),P&&x(g,P),g}}(),u=function x(g,p,P){g===null&&(g=Function.prototype);var d=Object.getOwnPropertyDescriptor(g,p);if(d===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:x(m,p,P)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(P)}},c=a(28),h=b(c);function b(x){return x&&x.__esModule?x:{default:x}}function _(x,g){if(!(x instanceof g))throw new TypeError("Cannot call a class as a function")}function k(x,g){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:x}function O(x,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);x.prototype=Object.create(g&&g.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(x,g):x.__proto__=g)}var v=function(x){O(g,x);function g(p,P){_(this,g);var d=k(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,p));return d.container.classList.add("ql-icon-picker"),[].forEach.call(d.container.querySelectorAll(".ql-picker-item"),function(m){m.innerHTML=P[m.getAttribute("data-value")||""]}),d.defaultItem=d.container.querySelector(".ql-selected"),d.selectItem(d.defaultItem),d}return l(g,[{key:"selectItem",value:function(P,d){u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"selectItem",this).call(this,P,d),P=P||this.defaultItem,this.label.innerHTML=P.innerHTML}}]),g}(h.default);n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function h(b,_){for(var k=0;k<_.length;k++){var O=_[k];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(b,O.key,O)}}return function(b,_,k){return _&&h(b.prototype,_),k&&h(b,k),b}}();function u(h,b){if(!(h instanceof b))throw new TypeError("Cannot call a class as a function")}var c=function(){function h(b,_){var k=this;u(this,h),this.quill=b,this.boundsContainer=_||document.body,this.root=b.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){k.root.style.marginTop=-1*k.quill.root.scrollTop+"px"}),this.hide()}return l(h,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(_){var k=_.left+_.width/2-this.root.offsetWidth/2,O=_.bottom+this.quill.root.scrollTop;this.root.style.left=k+"px",this.root.style.top=O+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),x=this.root.getBoundingClientRect(),g=0;if(x.right>v.right&&(g=v.right-x.right,this.root.style.left=k+g+"px"),x.left<v.left&&(g=v.left-x.left,this.root.style.left=k+g+"px"),x.bottom>v.bottom){var p=x.bottom-x.top,P=_.bottom-_.top+p;this.root.style.top=O-P+"px",this.root.classList.add("ql-flip")}return g}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),h}();n.default=c},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function S(A,M){var T=[],B=!0,U=!1,Q=void 0;try{for(var X=A[Symbol.iterator](),$;!(B=($=X.next()).done)&&(T.push($.value),!(M&&T.length===M));B=!0);}catch(j){U=!0,Q=j}finally{try{!B&&X.return&&X.return()}finally{if(U)throw Q}}return T}return function(A,M){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return S(A,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function S(A,M,T){A===null&&(A=Function.prototype);var B=Object.getOwnPropertyDescriptor(A,M);if(B===void 0){var U=Object.getPrototypeOf(A);return U===null?void 0:S(U,M,T)}else{if("value"in B)return B.value;var Q=B.get;return Q===void 0?void 0:Q.call(T)}},c=function(){function S(A,M){for(var T=0;T<M.length;T++){var B=M[T];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(A,B.key,B)}}return function(A,M,T){return M&&S(A.prototype,M),T&&S(A,T),A}}(),h=a(3),b=m(h),_=a(8),k=m(_),O=a(43),v=m(O),x=a(27),g=m(x),p=a(15),P=a(41),d=m(P);function m(S){return S&&S.__esModule?S:{default:S}}function y(S,A){if(!(S instanceof A))throw new TypeError("Cannot call a class as a function")}function w(S,A){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:S}function L(S,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);S.prototype=Object.create(A&&A.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(S,A):S.__proto__=A)}var R=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],D=function(S){L(A,S);function A(M,T){y(this,A),T.modules.toolbar!=null&&T.modules.toolbar.container==null&&(T.modules.toolbar.container=R);var B=w(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,M,T));return B.quill.container.classList.add("ql-snow"),B}return c(A,[{key:"extendToolbar",value:function(T){T.container.classList.add("ql-snow"),this.buildButtons([].slice.call(T.container.querySelectorAll("button")),d.default),this.buildPickers([].slice.call(T.container.querySelectorAll("select")),d.default),this.tooltip=new E(this.quill,this.options.bounds),T.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(B,U){T.handlers.link.call(T,!U.format.link)})}}]),A}(v.default);D.DEFAULTS=(0,b.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(A){if(A){var M=this.quill.getSelection();if(M==null||M.length==0)return;var T=this.quill.getText(M);/^\S+@\S+\.\S+$/.test(T)&&T.indexOf("mailto:")!==0&&(T="mailto:"+T);var B=this.quill.theme.tooltip;B.edit("link",T)}else this.quill.format("link",!1)}}}}});var E=function(S){L(A,S);function A(M,T){y(this,A);var B=w(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,M,T));return B.preview=B.root.querySelector("a.ql-preview"),B}return c(A,[{key:"listen",value:function(){var T=this;u(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(B){T.root.classList.contains("ql-editing")?T.save():T.edit("link",T.preview.textContent),B.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(B){if(T.linkRange!=null){var U=T.linkRange;T.restoreFocus(),T.quill.formatText(U,"link",!1,k.default.sources.USER),delete T.linkRange}B.preventDefault(),T.hide()}),this.quill.on(k.default.events.SELECTION_CHANGE,function(B,U,Q){if(B!=null){if(B.length===0&&Q===k.default.sources.USER){var X=T.quill.scroll.descendant(g.default,B.index),$=l(X,2),j=$[0],I=$[1];if(j!=null){T.linkRange=new p.Range(B.index-I,j.length());var z=g.default.formats(j.domNode);T.preview.textContent=z,T.preview.setAttribute("href",z),T.show(),T.position(T.quill.getBounds(T.linkRange));return}}else delete T.linkRange;T.hide()}})}},{key:"show",value:function(){u(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),A}(O.BaseTooltip);E.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=D},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(29),u=ue(l),c=a(36),h=a(38),b=a(64),_=a(65),k=ue(_),O=a(66),v=ue(O),x=a(67),g=ue(x),p=a(37),P=a(26),d=a(39),m=a(40),y=a(56),w=ue(y),L=a(68),R=ue(L),D=a(27),E=ue(D),S=a(69),A=ue(S),M=a(70),T=ue(M),B=a(71),U=ue(B),Q=a(72),X=ue(Q),$=a(73),j=ue($),I=a(13),z=ue(I),H=a(74),K=ue(H),ee=a(75),V=ue(ee),Z=a(57),Y=ue(Z),ne=a(41),re=ue(ne),ie=a(28),ae=ue(ie),se=a(59),de=ue(se),he=a(60),Se=ue(he),Ee=a(61),De=ue(Ee),fe=a(108),ge=ue(fe),Te=a(62),Re=ue(Te);function ue(me){return me&&me.__esModule?me:{default:me}}u.default.register({"attributors/attribute/direction":h.DirectionAttribute,"attributors/class/align":c.AlignClass,"attributors/class/background":p.BackgroundClass,"attributors/class/color":P.ColorClass,"attributors/class/direction":h.DirectionClass,"attributors/class/font":d.FontClass,"attributors/class/size":m.SizeClass,"attributors/style/align":c.AlignStyle,"attributors/style/background":p.BackgroundStyle,"attributors/style/color":P.ColorStyle,"attributors/style/direction":h.DirectionStyle,"attributors/style/font":d.FontStyle,"attributors/style/size":m.SizeStyle},!0),u.default.register({"formats/align":c.AlignClass,"formats/direction":h.DirectionClass,"formats/indent":b.IndentClass,"formats/background":p.BackgroundStyle,"formats/color":P.ColorStyle,"formats/font":d.FontClass,"formats/size":m.SizeClass,"formats/blockquote":k.default,"formats/code-block":z.default,"formats/header":v.default,"formats/list":g.default,"formats/bold":w.default,"formats/code":I.Code,"formats/italic":R.default,"formats/link":E.default,"formats/script":A.default,"formats/strike":T.default,"formats/underline":U.default,"formats/image":X.default,"formats/video":j.default,"formats/list/item":x.ListItem,"modules/formula":K.default,"modules/syntax":V.default,"modules/toolbar":Y.default,"themes/bubble":ge.default,"themes/snow":Re.default,"ui/icons":re.default,"ui/picker":ae.default,"ui/icon-picker":Se.default,"ui/color-picker":de.default,"ui/tooltip":De.default},!0),n.default=u.default},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var l=function(){function g(p,P){for(var d=0;d<P.length;d++){var m=P[d];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(p,m.key,m)}}return function(p,P,d){return P&&g(p.prototype,P),d&&g(p,d),p}}(),u=function g(p,P,d){p===null&&(p=Function.prototype);var m=Object.getOwnPropertyDescriptor(p,P);if(m===void 0){var y=Object.getPrototypeOf(p);return y===null?void 0:g(y,P,d)}else{if("value"in m)return m.value;var w=m.get;return w===void 0?void 0:w.call(d)}},c=a(0),h=b(c);function b(g){return g&&g.__esModule?g:{default:g}}function _(g,p){if(!(g instanceof p))throw new TypeError("Cannot call a class as a function")}function k(g,p){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:g}function O(g,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);g.prototype=Object.create(p&&p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(g,p):g.__proto__=p)}var v=function(g){O(p,g);function p(){return _(this,p),k(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return l(p,[{key:"add",value:function(d,m){if(m==="+1"||m==="-1"){var y=this.value(d)||0;m=m==="+1"?y+1:y-1}return m===0?(this.remove(d),!0):u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"add",this).call(this,d,m)}},{key:"canAdd",value:function(d,m){return u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"canAdd",this).call(this,d,m)||u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"canAdd",this).call(this,d,parseInt(m))}},{key:"value",value:function(d){return parseInt(u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"value",this).call(this,d))||void 0}}]),p}(h.default.Attributor.Class),x=new v("indent","ql-indent",{scope:h.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=x},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(4),u=c(l);function c(O){return O&&O.__esModule?O:{default:O}}function h(O,v){if(!(O instanceof v))throw new TypeError("Cannot call a class as a function")}function b(O,v){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:O}function _(O,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);O.prototype=Object.create(v&&v.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(O,v):O.__proto__=v)}var k=function(O){_(v,O);function v(){return h(this,v),b(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(u.default);k.blotName="blockquote",k.tagName="blockquote",n.default=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function v(x,g){for(var p=0;p<g.length;p++){var P=g[p];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(x,P.key,P)}}return function(x,g,p){return g&&v(x.prototype,g),p&&v(x,p),x}}(),u=a(4),c=h(u);function h(v){return v&&v.__esModule?v:{default:v}}function b(v,x){if(!(v instanceof x))throw new TypeError("Cannot call a class as a function")}function _(v,x){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:v}function k(v,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);v.prototype=Object.create(x&&x.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(v,x):v.__proto__=x)}var O=function(v){k(x,v);function x(){return b(this,x),_(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return l(x,null,[{key:"formats",value:function(p){return this.tagName.indexOf(p.tagName)+1}}]),x}(c.default);O.blotName="header",O.tagName=["H1","H2","H3","H4","H5","H6"],n.default=O},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var l=function(){function y(w,L){for(var R=0;R<L.length;R++){var D=L[R];D.enumerable=D.enumerable||!1,D.configurable=!0,"value"in D&&(D.writable=!0),Object.defineProperty(w,D.key,D)}}return function(w,L,R){return L&&y(w.prototype,L),R&&y(w,R),w}}(),u=function y(w,L,R){w===null&&(w=Function.prototype);var D=Object.getOwnPropertyDescriptor(w,L);if(D===void 0){var E=Object.getPrototypeOf(w);return E===null?void 0:y(E,L,R)}else{if("value"in D)return D.value;var S=D.get;return S===void 0?void 0:S.call(R)}},c=a(0),h=v(c),b=a(4),_=v(b),k=a(25),O=v(k);function v(y){return y&&y.__esModule?y:{default:y}}function x(y,w,L){return w in y?Object.defineProperty(y,w,{value:L,enumerable:!0,configurable:!0,writable:!0}):y[w]=L,y}function g(y,w){if(!(y instanceof w))throw new TypeError("Cannot call a class as a function")}function p(y,w){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:y}function P(y,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);y.prototype=Object.create(w&&w.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(y,w):y.__proto__=w)}var d=function(y){P(w,y);function w(){return g(this,w),p(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return l(w,[{key:"format",value:function(R,D){R===m.blotName&&!D?this.replaceWith(h.default.create(this.statics.scope)):u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,R,D)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(R,D){return this.parent.isolate(this.offset(this.parent),this.length()),R===this.parent.statics.blotName?(this.parent.replaceWith(R,D),this):(this.parent.unwrap(),u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"replaceWith",this).call(this,R,D))}}],[{key:"formats",value:function(R){return R.tagName===this.tagName?void 0:u(w.__proto__||Object.getPrototypeOf(w),"formats",this).call(this,R)}}]),w}(_.default);d.blotName="list-item",d.tagName="LI";var m=function(y){P(w,y),l(w,null,[{key:"create",value:function(R){var D=R==="ordered"?"OL":"UL",E=u(w.__proto__||Object.getPrototypeOf(w),"create",this).call(this,D);return(R==="checked"||R==="unchecked")&&E.setAttribute("data-checked",R==="checked"),E}},{key:"formats",value:function(R){if(R.tagName==="OL")return"ordered";if(R.tagName==="UL")return R.hasAttribute("data-checked")?R.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function w(L){g(this,w);var R=p(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,L)),D=function(S){if(S.target.parentNode===L){var A=R.statics.formats(L),M=h.default.find(S.target);A==="checked"?M.format("list","unchecked"):A==="unchecked"&&M.format("list","checked")}};return L.addEventListener("touchstart",D),L.addEventListener("mousedown",D),R}return l(w,[{key:"format",value:function(R,D){this.children.length>0&&this.children.tail.format(R,D)}},{key:"formats",value:function(){return x({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(R,D){if(R instanceof d)u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"insertBefore",this).call(this,R,D);else{var E=D==null?this.length():D.offset(this),S=this.split(E);S.parent.insertBefore(R,S)}}},{key:"optimize",value:function(R){u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"optimize",this).call(this,R);var D=this.next;D!=null&&D.prev===this&&D.statics.blotName===this.statics.blotName&&D.domNode.tagName===this.domNode.tagName&&D.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(D.moveChildren(this),D.remove())}},{key:"replace",value:function(R){if(R.statics.blotName!==this.statics.blotName){var D=h.default.create(this.statics.defaultChild);R.moveChildren(D),this.appendChild(D)}u(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"replace",this).call(this,R)}}]),w}(O.default);m.blotName="list",m.scope=h.default.Scope.BLOCK_BLOT,m.tagName=["OL","UL"],m.defaultChild="list-item",m.allowedChildren=[d],n.ListItem=d,n.default=m},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(56),u=c(l);function c(O){return O&&O.__esModule?O:{default:O}}function h(O,v){if(!(O instanceof v))throw new TypeError("Cannot call a class as a function")}function b(O,v){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:O}function _(O,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);O.prototype=Object.create(v&&v.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(O,v):O.__proto__=v)}var k=function(O){_(v,O);function v(){return h(this,v),b(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(u.default);k.blotName="italic",k.tagName=["EM","I"],n.default=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function x(g,p){for(var P=0;P<p.length;P++){var d=p[P];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(g,d.key,d)}}return function(g,p,P){return p&&x(g.prototype,p),P&&x(g,P),g}}(),u=function x(g,p,P){g===null&&(g=Function.prototype);var d=Object.getOwnPropertyDescriptor(g,p);if(d===void 0){var m=Object.getPrototypeOf(g);return m===null?void 0:x(m,p,P)}else{if("value"in d)return d.value;var y=d.get;return y===void 0?void 0:y.call(P)}},c=a(6),h=b(c);function b(x){return x&&x.__esModule?x:{default:x}}function _(x,g){if(!(x instanceof g))throw new TypeError("Cannot call a class as a function")}function k(x,g){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:x}function O(x,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);x.prototype=Object.create(g&&g.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(x,g):x.__proto__=g)}var v=function(x){O(g,x);function g(){return _(this,g),k(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return l(g,null,[{key:"create",value:function(P){return P==="super"?document.createElement("sup"):P==="sub"?document.createElement("sub"):u(g.__proto__||Object.getPrototypeOf(g),"create",this).call(this,P)}},{key:"formats",value:function(P){if(P.tagName==="SUB")return"sub";if(P.tagName==="SUP")return"super"}}]),g}(h.default);v.blotName="script",v.tagName=["SUB","SUP"],n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(6),u=c(l);function c(O){return O&&O.__esModule?O:{default:O}}function h(O,v){if(!(O instanceof v))throw new TypeError("Cannot call a class as a function")}function b(O,v){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:O}function _(O,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);O.prototype=Object.create(v&&v.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(O,v):O.__proto__=v)}var k=function(O){_(v,O);function v(){return h(this,v),b(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(u.default);k.blotName="strike",k.tagName="S",n.default=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(6),u=c(l);function c(O){return O&&O.__esModule?O:{default:O}}function h(O,v){if(!(O instanceof v))throw new TypeError("Cannot call a class as a function")}function b(O,v){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:O}function _(O,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);O.prototype=Object.create(v&&v.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(O,v):O.__proto__=v)}var k=function(O){_(v,O);function v(){return h(this,v),b(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(u.default);k.blotName="underline",k.tagName="U",n.default=k},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function p(P,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(P,y.key,y)}}return function(P,d,m){return d&&p(P.prototype,d),m&&p(P,m),P}}(),u=function p(P,d,m){P===null&&(P=Function.prototype);var y=Object.getOwnPropertyDescriptor(P,d);if(y===void 0){var w=Object.getPrototypeOf(P);return w===null?void 0:p(w,d,m)}else{if("value"in y)return y.value;var L=y.get;return L===void 0?void 0:L.call(m)}},c=a(0),h=_(c),b=a(27);function _(p){return p&&p.__esModule?p:{default:p}}function k(p,P){if(!(p instanceof P))throw new TypeError("Cannot call a class as a function")}function O(p,P){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:p}function v(p,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);p.prototype=Object.create(P&&P.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(p,P):p.__proto__=P)}var x=["alt","height","width"],g=function(p){v(P,p);function P(){return k(this,P),O(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return l(P,[{key:"format",value:function(m,y){x.indexOf(m)>-1?y?this.domNode.setAttribute(m,y):this.domNode.removeAttribute(m):u(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"format",this).call(this,m,y)}}],[{key:"create",value:function(m){var y=u(P.__proto__||Object.getPrototypeOf(P),"create",this).call(this,m);return typeof m=="string"&&y.setAttribute("src",this.sanitize(m)),y}},{key:"formats",value:function(m){return x.reduce(function(y,w){return m.hasAttribute(w)&&(y[w]=m.getAttribute(w)),y},{})}},{key:"match",value:function(m){return/\.(jpe?g|gif|png)$/.test(m)||/^data:image\/.+;base64/.test(m)}},{key:"sanitize",value:function(m){return(0,b.sanitize)(m,["http","https","data"])?m:"//:0"}},{key:"value",value:function(m){return m.getAttribute("src")}}]),P}(h.default.Embed);g.blotName="image",g.tagName="IMG",n.default=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function p(P,d){for(var m=0;m<d.length;m++){var y=d[m];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(P,y.key,y)}}return function(P,d,m){return d&&p(P.prototype,d),m&&p(P,m),P}}(),u=function p(P,d,m){P===null&&(P=Function.prototype);var y=Object.getOwnPropertyDescriptor(P,d);if(y===void 0){var w=Object.getPrototypeOf(P);return w===null?void 0:p(w,d,m)}else{if("value"in y)return y.value;var L=y.get;return L===void 0?void 0:L.call(m)}},c=a(4),h=a(27),b=_(h);function _(p){return p&&p.__esModule?p:{default:p}}function k(p,P){if(!(p instanceof P))throw new TypeError("Cannot call a class as a function")}function O(p,P){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:p}function v(p,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);p.prototype=Object.create(P&&P.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(p,P):p.__proto__=P)}var x=["height","width"],g=function(p){v(P,p);function P(){return k(this,P),O(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return l(P,[{key:"format",value:function(m,y){x.indexOf(m)>-1?y?this.domNode.setAttribute(m,y):this.domNode.removeAttribute(m):u(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"format",this).call(this,m,y)}}],[{key:"create",value:function(m){var y=u(P.__proto__||Object.getPrototypeOf(P),"create",this).call(this,m);return y.setAttribute("frameborder","0"),y.setAttribute("allowfullscreen",!0),y.setAttribute("src",this.sanitize(m)),y}},{key:"formats",value:function(m){return x.reduce(function(y,w){return m.hasAttribute(w)&&(y[w]=m.getAttribute(w)),y},{})}},{key:"sanitize",value:function(m){return b.default.sanitize(m)}},{key:"value",value:function(m){return m.getAttribute("src")}}]),P}(c.BlockEmbed);g.blotName="video",g.className="ql-video",g.tagName="IFRAME",n.default=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var l=function(){function m(y,w){for(var L=0;L<w.length;L++){var R=w[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(y,R.key,R)}}return function(y,w,L){return w&&m(y.prototype,w),L&&m(y,L),y}}(),u=function m(y,w,L){y===null&&(y=Function.prototype);var R=Object.getOwnPropertyDescriptor(y,w);if(R===void 0){var D=Object.getPrototypeOf(y);return D===null?void 0:m(D,w,L)}else{if("value"in R)return R.value;var E=R.get;return E===void 0?void 0:E.call(L)}},c=a(35),h=v(c),b=a(5),_=v(b),k=a(9),O=v(k);function v(m){return m&&m.__esModule?m:{default:m}}function x(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function g(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function p(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var P=function(m){p(y,m);function y(){return x(this,y),g(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return l(y,null,[{key:"create",value:function(L){var R=u(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,L);return typeof L=="string"&&(window.katex.render(L,R,{throwOnError:!1,errorColor:"#f00"}),R.setAttribute("data-value",L)),R}},{key:"value",value:function(L){return L.getAttribute("data-value")}}]),y}(h.default);P.blotName="formula",P.className="ql-formula",P.tagName="SPAN";var d=function(m){p(y,m),l(y,null,[{key:"register",value:function(){_.default.register(P,!0)}}]);function y(){x(this,y);var w=g(this,(y.__proto__||Object.getPrototypeOf(y)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return w}return y}(O.default);n.FormulaBlot=P,n.default=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var l=function(){function L(R,D){for(var E=0;E<D.length;E++){var S=D[E];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(R,S.key,S)}}return function(R,D,E){return D&&L(R.prototype,D),E&&L(R,E),R}}(),u=function L(R,D,E){R===null&&(R=Function.prototype);var S=Object.getOwnPropertyDescriptor(R,D);if(S===void 0){var A=Object.getPrototypeOf(R);return A===null?void 0:L(A,D,E)}else{if("value"in S)return S.value;var M=S.get;return M===void 0?void 0:M.call(E)}},c=a(0),h=g(c),b=a(5),_=g(b),k=a(9),O=g(k),v=a(13),x=g(v);function g(L){return L&&L.__esModule?L:{default:L}}function p(L,R){if(!(L instanceof R))throw new TypeError("Cannot call a class as a function")}function P(L,R){if(!L)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:L}function d(L,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);L.prototype=Object.create(R&&R.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(L,R):L.__proto__=R)}var m=function(L){d(R,L);function R(){return p(this,R),P(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return l(R,[{key:"replaceWith",value:function(E){this.domNode.textContent=this.domNode.textContent,this.attach(),u(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"replaceWith",this).call(this,E)}},{key:"highlight",value:function(E){var S=this.domNode.textContent;this.cachedText!==S&&((S.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=E(S),this.domNode.normalize(),this.attach()),this.cachedText=S)}}]),R}(x.default);m.className="ql-syntax";var y=new h.default.Attributor.Class("token","hljs",{scope:h.default.Scope.INLINE}),w=function(L){d(R,L),l(R,null,[{key:"register",value:function(){_.default.register(y,!0),_.default.register(m,!0)}}]);function R(D,E){p(this,R);var S=P(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,D,E));if(typeof S.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var A=null;return S.quill.on(_.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(A),A=setTimeout(function(){S.highlight(),A=null},S.options.interval)}),S.highlight(),S}return l(R,[{key:"highlight",value:function(){var E=this;if(!this.quill.selection.composing){this.quill.update(_.default.sources.USER);var S=this.quill.getSelection();this.quill.scroll.descendants(m).forEach(function(A){A.highlight(E.options.highlight)}),this.quill.update(_.default.sources.SILENT),S!=null&&this.quill.setSelection(S,_.default.sources.SILENT)}}}]),R}(O.default);w.DEFAULTS={highlight:function(){return window.hljs==null?null:function(L){var R=window.hljs.highlightAuto(L);return R.value}}(),interval:1e3},n.CodeBlock=m,n.CodeToken=y,n.default=w},function(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n){t.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(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var l=function R(D,E,S){D===null&&(D=Function.prototype);var A=Object.getOwnPropertyDescriptor(D,E);if(A===void 0){var M=Object.getPrototypeOf(D);return M===null?void 0:R(M,E,S)}else{if("value"in A)return A.value;var T=A.get;return T===void 0?void 0:T.call(S)}},u=function(){function R(D,E){for(var S=0;S<E.length;S++){var A=E[S];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(D,A.key,A)}}return function(D,E,S){return E&&R(D.prototype,E),S&&R(D,S),D}}(),c=a(3),h=p(c),b=a(8),_=p(b),k=a(43),O=p(k),v=a(15),x=a(41),g=p(x);function p(R){return R&&R.__esModule?R:{default:R}}function P(R,D){if(!(R instanceof D))throw new TypeError("Cannot call a class as a function")}function d(R,D){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D&&(typeof D=="object"||typeof D=="function")?D:R}function m(R,D){if(typeof D!="function"&&D!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof D);R.prototype=Object.create(D&&D.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),D&&(Object.setPrototypeOf?Object.setPrototypeOf(R,D):R.__proto__=D)}var y=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],w=function(R){m(D,R);function D(E,S){P(this,D),S.modules.toolbar!=null&&S.modules.toolbar.container==null&&(S.modules.toolbar.container=y);var A=d(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,E,S));return A.quill.container.classList.add("ql-bubble"),A}return u(D,[{key:"extendToolbar",value:function(S){this.tooltip=new L(this.quill,this.options.bounds),this.tooltip.root.appendChild(S.container),this.buildButtons([].slice.call(S.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(S.container.querySelectorAll("select")),g.default)}}]),D}(O.default);w.DEFAULTS=(0,h.default)(!0,{},O.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(D){D?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var L=function(R){m(D,R);function D(E,S){P(this,D);var A=d(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,E,S));return A.quill.on(_.default.events.EDITOR_CHANGE,function(M,T,B,U){if(M===_.default.events.SELECTION_CHANGE)if(T!=null&&T.length>0&&U===_.default.sources.USER){A.show(),A.root.style.left="0px",A.root.style.width="",A.root.style.width=A.root.offsetWidth+"px";var Q=A.quill.getLines(T.index,T.length);if(Q.length===1)A.position(A.quill.getBounds(T));else{var X=Q[Q.length-1],$=A.quill.getIndex(X),j=Math.min(X.length()-1,T.index+T.length-$),I=A.quill.getBounds(new v.Range($,j));A.position(I)}}else document.activeElement!==A.textbox&&A.quill.hasFocus()&&A.hide()}),A}return u(D,[{key:"listen",value:function(){var S=this;l(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){S.root.classList.remove("ql-editing")}),this.quill.on(_.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!S.root.classList.contains("ql-hidden")){var A=S.quill.getSelection();A!=null&&S.position(S.quill.getBounds(A))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(S){var A=l(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"position",this).call(this,S),M=this.root.querySelector(".ql-tooltip-arrow");if(M.style.marginLeft="",A===0)return A;M.style.marginLeft=-1*A-M.offsetWidth/2+"px"}}]),D}(k.BaseTooltip);L.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=L,n.default=w},function(t,n,a){t.exports=a(63)}]).default})}(ip)),ip.exports}var Va={},op={exports:{}},js={},md={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */var eO=md.exports,C2;function tO(){return C2||(C2=1,function(e,i){(function(t){var n=i&&!i.nodeType&&i,a=e&&!e.nodeType&&e,l=typeof ic=="object"&⁣(l.global===l||l.window===l||l.self===l)&&(t=l);var u,c=2147483647,h=36,b=1,_=26,k=38,O=700,v=72,x=128,g="-",p=/^xn--/,P=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=h-b,w=Math.floor,L=String.fromCharCode,R;function D(I){throw new RangeError(m[I])}function E(I,z){for(var H=I.length,K=[];H--;)K[H]=z(I[H]);return K}function S(I,z){var H=I.split("@"),K="";H.length>1&&(K=H[0]+"@",I=H[1]),I=I.replace(d,".");var ee=I.split("."),V=E(ee,z).join(".");return K+V}function A(I){for(var z=[],H=0,K=I.length,ee,V;H<K;)ee=I.charCodeAt(H++),ee>=55296&&ee<=56319&&H<K?(V=I.charCodeAt(H++),(V&64512)==56320?z.push(((ee&1023)<<10)+(V&1023)+65536):(z.push(ee),H--)):z.push(ee);return z}function M(I){return E(I,function(z){var H="";return z>65535&&(z-=65536,H+=L(z>>>10&1023|55296),z=56320|z&1023),H+=L(z),H}).join("")}function T(I){return I-48<10?I-22:I-65<26?I-65:I-97<26?I-97:h}function B(I,z){return I+22+75*(I<26)-((z!=0)<<5)}function U(I,z,H){var K=0;for(I=H?w(I/O):I>>1,I+=w(I/z);I>y*_>>1;K+=h)I=w(I/y);return w(K+(y+1)*I/(I+k))}function Q(I){var z=[],H=I.length,K,ee=0,V=x,Z=v,Y,ne,re,ie,ae,se,de,he,Se;for(Y=I.lastIndexOf(g),Y<0&&(Y=0),ne=0;ne<Y;++ne)I.charCodeAt(ne)>=128&&D("not-basic"),z.push(I.charCodeAt(ne));for(re=Y>0?Y+1:0;re<H;){for(ie=ee,ae=1,se=h;re>=H&&D("invalid-input"),de=T(I.charCodeAt(re++)),(de>=h||de>w((c-ee)/ae))&&D("overflow"),ee+=de*ae,he=se<=Z?b:se>=Z+_?_:se-Z,!(de<he);se+=h)Se=h-he,ae>w(c/Se)&&D("overflow"),ae*=Se;K=z.length+1,Z=U(ee-ie,K,ie==0),w(ee/K)>c-V&&D("overflow"),V+=w(ee/K),ee%=K,z.splice(ee++,0,V)}return M(z)}function X(I){var z,H,K,ee,V,Z,Y,ne,re,ie,ae,se=[],de,he,Se,Ee;for(I=A(I),de=I.length,z=x,H=0,V=v,Z=0;Z<de;++Z)ae=I[Z],ae<128&&se.push(L(ae));for(K=ee=se.length,ee&&se.push(g);K<de;){for(Y=c,Z=0;Z<de;++Z)ae=I[Z],ae>=z&&ae<Y&&(Y=ae);for(he=K+1,Y-z>w((c-H)/he)&&D("overflow"),H+=(Y-z)*he,z=Y,Z=0;Z<de;++Z)if(ae=I[Z],ae<z&&++H>c&&D("overflow"),ae==z){for(ne=H,re=h;ie=re<=V?b:re>=V+_?_:re-V,!(ne<ie);re+=h)Ee=ne-ie,Se=h-ie,se.push(L(B(ie+Ee%Se,0))),ne=w(Ee/Se);se.push(L(B(ne,0))),V=U(H,he,K==ee),H=0,++K}++H,++z}return se.join("")}function $(I){return S(I,function(z){return p.test(z)?Q(z.slice(4).toLowerCase()):z})}function j(I){return S(I,function(z){return P.test(z)?"xn--"+X(z):z})}if(u={version:"1.4.1",ucs2:{decode:A,encode:M},decode:Q,encode:X,toASCII:j,toUnicode:$},n&&a)if(e.exports==n)a.exports=u;else for(R in u)u.hasOwnProperty(R)&&(n[R]=u[R]);else t.punycode=u})(eO)}(md,md.exports)),md.exports}var l1,k2;function nO(){return k2||(k2=1,l1=Error),l1}var s1,T2;function rO(){return T2||(T2=1,s1=EvalError),s1}var u1,A2;function iO(){return A2||(A2=1,u1=RangeError),u1}var c1,R2;function oO(){return R2||(R2=1,c1=ReferenceError),c1}var f1,M2;function j4(){return M2||(M2=1,f1=SyntaxError),f1}var d1,L2;function qd(){return L2||(L2=1,d1=TypeError),d1}var h1,N2;function aO(){return N2||(N2=1,h1=URIError),h1}var p1,I2;function lO(){return I2||(I2=1,p1=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var i={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;i[t]=a;for(t in i)return!1;if(typeof Object.keys=="function"&&Object.keys(i).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(i).length!==0)return!1;var l=Object.getOwnPropertySymbols(i);if(l.length!==1||l[0]!==t||!Object.prototype.propertyIsEnumerable.call(i,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(i,t);if(u.value!==a||u.enumerable!==!0)return!1}return!0}),p1}var g1,D2;function sO(){if(D2)return g1;D2=1;var e=typeof Symbol<"u"&&Symbol,i=lO();return g1=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},g1}var v1,j2;function uO(){if(j2)return v1;j2=1;var e={__proto__:null,foo:{}},i=Object;return v1=function(){return{__proto__:e}.foo===e.foo&&!(e instanceof i)},v1}var m1,F2;function cO(){if(F2)return m1;F2=1;var e="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,t=Math.max,n="[object Function]",a=function(h,b){for(var _=[],k=0;k<h.length;k+=1)_[k]=h[k];for(var O=0;O<b.length;O+=1)_[O+h.length]=b[O];return _},l=function(h,b){for(var _=[],k=b,O=0;k<h.length;k+=1,O+=1)_[O]=h[k];return _},u=function(c,h){for(var b="",_=0;_<c.length;_+=1)b+=c[_],_+1<c.length&&(b+=h);return b};return m1=function(h){var b=this;if(typeof b!="function"||i.apply(b)!==n)throw new TypeError(e+b);for(var _=l(arguments,1),k,O=function(){if(this instanceof k){var P=b.apply(this,a(_,arguments));return Object(P)===P?P:this}return b.apply(h,a(_,arguments))},v=t(0,b.length-_.length),x=[],g=0;g<v;g++)x[g]="$"+g;if(k=Function("binder","return function ("+u(x,",")+"){ return binder.apply(this,arguments); }")(O),b.prototype){var p=function(){};p.prototype=b.prototype,k.prototype=new p,p.prototype=null}return k},m1}var y1,z2;function mv(){if(z2)return y1;z2=1;var e=cO();return y1=Function.prototype.bind||e,y1}var b1,B2;function fO(){if(B2)return b1;B2=1;var e=Function.prototype.call,i=Object.prototype.hasOwnProperty,t=mv();return b1=t.call(e,i),b1}var _1,U2;function wc(){if(U2)return _1;U2=1;var e,i=nO(),t=rO(),n=iO(),a=oO(),l=j4(),u=qd(),c=aO(),h=Function,b=function(X){try{return h('"use strict"; return ('+X+").constructor;")()}catch{}},_=Object.getOwnPropertyDescriptor;if(_)try{_({},"")}catch{_=null}var k=function(){throw new u},O=_?function(){try{return arguments.callee,k}catch{try{return _(arguments,"callee").get}catch{return k}}}():k,v=sO()(),x=uO()(),g=Object.getPrototypeOf||(x?function(X){return X.__proto__}:null),p={},P=typeof Uint8Array>"u"||!g?e:g(Uint8Array),d={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":v&&g?g([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%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%":i,"%eval%":eval,"%EvalError%":t,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":h,"%GeneratorFunction%":p,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":v&&g?g(g([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!v||!g?e:g(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":n,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!v||!g?e:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":v&&g?g(""[Symbol.iterator]()):e,"%Symbol%":v?Symbol:e,"%SyntaxError%":l,"%ThrowTypeError%":O,"%TypedArray%":P,"%TypeError%":u,"%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%":c,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet};if(g)try{null.error}catch(X){var m=g(g(X));d["%Error.prototype%"]=m}var y=function X($){var j;if($==="%AsyncFunction%")j=b("async function () {}");else if($==="%GeneratorFunction%")j=b("function* () {}");else if($==="%AsyncGeneratorFunction%")j=b("async function* () {}");else if($==="%AsyncGenerator%"){var I=X("%AsyncGeneratorFunction%");I&&(j=I.prototype)}else if($==="%AsyncIteratorPrototype%"){var z=X("%AsyncGenerator%");z&&g&&(j=g(z.prototype))}return d[$]=j,j},w={__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"]},L=mv(),R=fO(),D=L.call(Function.call,Array.prototype.concat),E=L.call(Function.apply,Array.prototype.splice),S=L.call(Function.call,String.prototype.replace),A=L.call(Function.call,String.prototype.slice),M=L.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,B=/\\(\\)?/g,U=function($){var j=A($,0,1),I=A($,-1);if(j==="%"&&I!=="%")throw new l("invalid intrinsic syntax, expected closing `%`");if(I==="%"&&j!=="%")throw new l("invalid intrinsic syntax, expected opening `%`");var z=[];return S($,T,function(H,K,ee,V){z[z.length]=ee?S(V,B,"$1"):K||H}),z},Q=function($,j){var I=$,z;if(R(w,I)&&(z=w[I],I="%"+z[0]+"%"),R(d,I)){var H=d[I];if(H===p&&(H=y(I)),typeof H>"u"&&!j)throw new u("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:z,name:I,value:H}}throw new l("intrinsic "+$+" does not exist!")};return _1=function($,j){if(typeof $!="string"||$.length===0)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof j!="boolean")throw new u('"allowMissing" argument must be a boolean');if(M(/^%?[^%]*%?$/,$)===null)throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var I=U($),z=I.length>0?I[0]:"",H=Q("%"+z+"%",j),K=H.name,ee=H.value,V=!1,Z=H.alias;Z&&(z=Z[0],E(I,D([0,1],Z)));for(var Y=1,ne=!0;Y<I.length;Y+=1){var re=I[Y],ie=A(re,0,1),ae=A(re,-1);if((ie==='"'||ie==="'"||ie==="`"||ae==='"'||ae==="'"||ae==="`")&&ie!==ae)throw new l("property names with quotes must have matching quotes");if((re==="constructor"||!ne)&&(V=!0),z+="."+re,K="%"+z+"%",R(d,K))ee=d[K];else if(ee!=null){if(!(re in ee)){if(!j)throw new u("base intrinsic for "+$+" exists, but the property is not available.");return}if(_&&Y+1>=I.length){var se=_(ee,re);ne=!!se,ne&&"get"in se&&!("originalValue"in se.get)?ee=se.get:ee=ee[re]}else ne=R(ee,re),ee=ee[re];ne&&!V&&(d[K]=ee)}}return ee},_1}var w1={exports:{}},S1,q2;function yv(){if(q2)return S1;q2=1;var e=wc(),i=e("%Object.defineProperty%",!0)||!1;if(i)try{i({},"a",{value:1})}catch{i=!1}return S1=i,S1}var E1,H2;function F4(){if(H2)return E1;H2=1;var e=wc(),i=e("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch{i=null}return E1=i,E1}var O1,G2;function dO(){if(G2)return O1;G2=1;var e=yv(),i=j4(),t=qd(),n=F4();return O1=function(l,u,c){if(!l||typeof l!="object"&&typeof l!="function")throw new t("`obj` must be an object or a function`");if(typeof u!="string"&&typeof u!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var h=arguments.length>3?arguments[3]:null,b=arguments.length>4?arguments[4]:null,_=arguments.length>5?arguments[5]:null,k=arguments.length>6?arguments[6]:!1,O=!!n&&n(l,u);if(e)e(l,u,{configurable:_===null&&O?O.configurable:!_,enumerable:h===null&&O?O.enumerable:!h,value:c,writable:b===null&&O?O.writable:!b});else if(k||!h&&!b&&!_)l[u]=c;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},O1}var x1,V2;function hO(){if(V2)return x1;V2=1;var e=yv(),i=function(){return!!e};return i.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch{return!0}},x1=i,x1}var P1,$2;function pO(){if($2)return P1;$2=1;var e=wc(),i=dO(),t=hO()(),n=F4(),a=qd(),l=e("%Math.floor%");return P1=function(c,h){if(typeof c!="function")throw new a("`fn` is not a function");if(typeof h!="number"||h<0||h>4294967295||l(h)!==h)throw new a("`length` must be a positive 32-bit integer");var b=arguments.length>2&&!!arguments[2],_=!0,k=!0;if("length"in c&&n){var O=n(c,"length");O&&!O.configurable&&(_=!1),O&&!O.writable&&(k=!1)}return(_||k||!b)&&(t?i(c,"length",h,!0,!0):i(c,"length",h)),c},P1}var W2;function gO(){return W2||(W2=1,function(e){var i=mv(),t=wc(),n=pO(),a=qd(),l=t("%Function.prototype.apply%"),u=t("%Function.prototype.call%"),c=t("%Reflect.apply%",!0)||i.call(u,l),h=yv(),b=t("%Math.max%");e.exports=function(O){if(typeof O!="function")throw new a("a function is required");var v=c(i,u,arguments);return n(v,1+b(0,O.length-(arguments.length-1)),!0)};var _=function(){return c(i,l,arguments)};h?h(e.exports,"apply",{value:_}):e.exports.apply=_}(w1)),w1.exports}var C1,Y2;function vO(){if(Y2)return C1;Y2=1;var e=wc(),i=gO(),t=i(e("String.prototype.indexOf"));return C1=function(a,l){var u=e(a,!!l);return typeof u=="function"&&t(a,".prototype.")>-1?i(u):u},C1}const mO={},yO=Object.freeze(Object.defineProperty({__proto__:null,default:mO},Symbol.toStringTag,{value:"Module"})),bO=Xl(yO);var k1,K2;function _O(){if(K2)return k1;K2=1;var e=typeof Map=="function"&&Map.prototype,i=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=e&&i&&typeof i.get=="function"?i.get:null,n=e&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=a&&l&&typeof l.get=="function"?l.get:null,c=a&&Set.prototype.forEach,h=typeof WeakMap=="function"&&WeakMap.prototype,b=h?WeakMap.prototype.has:null,_=typeof WeakSet=="function"&&WeakSet.prototype,k=_?WeakSet.prototype.has:null,O=typeof WeakRef=="function"&&WeakRef.prototype,v=O?WeakRef.prototype.deref:null,x=Boolean.prototype.valueOf,g=Object.prototype.toString,p=Function.prototype.toString,P=String.prototype.match,d=String.prototype.slice,m=String.prototype.replace,y=String.prototype.toUpperCase,w=String.prototype.toLowerCase,L=RegExp.prototype.test,R=Array.prototype.concat,D=Array.prototype.join,E=Array.prototype.slice,S=Math.floor,A=typeof BigInt=="function"?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,B=typeof Symbol=="function"&&typeof Symbol.iterator=="object",U=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===B||!0)?Symbol.toStringTag:null,Q=Object.prototype.propertyIsEnumerable,X=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(be){return be.__proto__}:null);function $(be,we){if(be===1/0||be===-1/0||be!==be||be&&be>-1e3&&be<1e3||L.call(/e/,we))return we;var Ne=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof be=="number"){var Ye=be<0?-S(-be):S(be);if(Ye!==be){var Ze=String(Ye),ke=d.call(we,Ze.length+1);return m.call(Ze,Ne,"$&_")+"."+m.call(m.call(ke,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(we,Ne,"$&_")}var j=bO,I=j.custom,z=de(I)?I:null,H={__proto__:null,double:'"',single:"'"},K={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};k1=function be(we,Ne,Ye,Ze){var ke=Ne||{};if(Ee(ke,"quoteStyle")&&!Ee(H,ke.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ee(ke,"maxStringLength")&&(typeof ke.maxStringLength=="number"?ke.maxStringLength<0&&ke.maxStringLength!==1/0:ke.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var vt=Ee(ke,"customInspect")?ke.customInspect:!0;if(typeof vt!="boolean"&&vt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ee(ke,"indent")&&ke.indent!==null&&ke.indent!==" "&&!(parseInt(ke.indent,10)===ke.indent&&ke.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ee(ke,"numericSeparator")&&typeof ke.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var je=ke.numericSeparator;if(typeof we>"u")return"undefined";if(we===null)return"null";if(typeof we=="boolean")return we?"true":"false";if(typeof we=="string")return tt(we,ke);if(typeof we=="number"){if(we===0)return 1/0/we>0?"0":"-0";var ot=String(we);return je?$(we,ot):ot}if(typeof we=="bigint"){var dn=String(we)+"n";return je?$(we,dn):dn}var Yt=typeof ke.depth>"u"?5:ke.depth;if(typeof Ye>"u"&&(Ye=0),Ye>=Yt&&Yt>0&&typeof we=="object")return Z(we)?"[Array]":"[Object]";var hn=dt(ke,Ye);if(typeof Ze>"u")Ze=[];else if(ge(Ze,we)>=0)return"[Circular]";function Ge(Gn,Sn,oi){if(Sn&&(Ze=E.call(Ze),Ze.push(Sn)),oi){var Ir={depth:ke.depth};return Ee(ke,"quoteStyle")&&(Ir.quoteStyle=ke.quoteStyle),be(Gn,Ir,Ye+1,Ze)}return be(Gn,ke,Ye+1,Ze)}if(typeof we=="function"&&!ne(we)){var pt=fe(we),Ot=Et(we,Ge);return"[Function"+(pt?": "+pt:" (anonymous)")+"]"+(Ot.length>0?" { "+D.call(Ot,", ")+" }":"")}if(de(we)){var zt=B?m.call(String(we),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(we);return typeof we=="object"&&!B?Fe(zt):zt}if(Ie(we)){for(var Ut="<"+w.call(String(we.nodeName)),pn=we.attributes||[],In=0;In<pn.length;In++)Ut+=" "+pn[In].name+"="+ee(V(pn[In].value),"double",ke);return Ut+=">",we.childNodes&&we.childNodes.length&&(Ut+="..."),Ut+="</"+w.call(String(we.nodeName))+">",Ut}if(Z(we)){if(we.length===0)return"[]";var wn=Et(we,Ge);return hn&&!Xe(wn)?"["+kt(wn,hn)+"]":"[ "+D.call(wn,", ")+" ]"}if(re(we)){var Qn=Et(we,Ge);return!("cause"in Error.prototype)&&"cause"in we&&!Q.call(we,"cause")?"{ ["+String(we)+"] "+D.call(R.call("[cause]: "+Ge(we.cause),Qn),", ")+" }":Qn.length===0?"["+String(we)+"]":"{ ["+String(we)+"] "+D.call(Qn,", ")+" }"}if(typeof we=="object"&&vt){if(z&&typeof we[z]=="function"&&j)return j(we,{depth:Yt-Ye});if(vt!=="symbol"&&typeof we.inspect=="function")return we.inspect()}if(Te(we)){var ii=[];return n&&n.call(we,function(Gn,Sn){ii.push(Ge(Sn,we,!0)+" => "+Ge(Gn,we))}),Ue("Map",t.call(we),ii,hn)}if(me(we)){var Sr=[];return c&&c.call(we,function(Gn){Sr.push(Ge(Gn,we))}),Ue("Set",u.call(we),Sr,hn)}if(Re(we))return ze("WeakMap");if(xe(we))return ze("WeakSet");if(ue(we))return ze("WeakRef");if(ae(we))return Fe(Ge(Number(we)));if(he(we))return Fe(Ge(A.call(we)));if(se(we))return Fe(x.call(we));if(ie(we))return Fe(Ge(String(we)));if(typeof window<"u"&&we===window)return"{ [object Window] }";if(typeof globalThis<"u"&&we===globalThis||typeof ic<"u"&&we===ic)return"{ [object globalThis] }";if(!Y(we)&&!ne(we)){var Qe=Et(we,Ge),_t=X?X(we)===Object.prototype:we instanceof Object||we.constructor===Object,At=we instanceof Object?"":"null prototype",Ht=!_t&&U&&Object(we)===we&&U in we?d.call(De(we),8,-1):At?"Object":"",Gt=_t||typeof we.constructor!="function"?"":we.constructor.name?we.constructor.name+" ":"",Jn=Gt+(Ht||At?"["+D.call(R.call([],Ht||[],At||[]),": ")+"] ":"");return Qe.length===0?Jn+"{}":hn?Jn+"{"+kt(Qe,hn)+"}":Jn+"{ "+D.call(Qe,", ")+" }"}return String(we)};function ee(be,we,Ne){var Ye=Ne.quoteStyle||we,Ze=H[Ye];return Ze+be+Ze}function V(be){return m.call(String(be),/"/g,""")}function Z(be){return De(be)==="[object Array]"&&(!U||!(typeof be=="object"&&U in be))}function Y(be){return De(be)==="[object Date]"&&(!U||!(typeof be=="object"&&U in be))}function ne(be){return De(be)==="[object RegExp]"&&(!U||!(typeof be=="object"&&U in be))}function re(be){return De(be)==="[object Error]"&&(!U||!(typeof be=="object"&&U in be))}function ie(be){return De(be)==="[object String]"&&(!U||!(typeof be=="object"&&U in be))}function ae(be){return De(be)==="[object Number]"&&(!U||!(typeof be=="object"&&U in be))}function se(be){return De(be)==="[object Boolean]"&&(!U||!(typeof be=="object"&&U in be))}function de(be){if(B)return be&&typeof be=="object"&&be instanceof Symbol;if(typeof be=="symbol")return!0;if(!be||typeof be!="object"||!T)return!1;try{return T.call(be),!0}catch{}return!1}function he(be){if(!be||typeof be!="object"||!A)return!1;try{return A.call(be),!0}catch{}return!1}var Se=Object.prototype.hasOwnProperty||function(be){return be in this};function Ee(be,we){return Se.call(be,we)}function De(be){return g.call(be)}function fe(be){if(be.name)return be.name;var we=P.call(p.call(be),/^function\s*([\w$]+)/);return we?we[1]:null}function ge(be,we){if(be.indexOf)return be.indexOf(we);for(var Ne=0,Ye=be.length;Ne<Ye;Ne++)if(be[Ne]===we)return Ne;return-1}function Te(be){if(!t||!be||typeof be!="object")return!1;try{t.call(be);try{u.call(be)}catch{return!0}return be instanceof Map}catch{}return!1}function Re(be){if(!b||!be||typeof be!="object")return!1;try{b.call(be,b);try{k.call(be,k)}catch{return!0}return be instanceof WeakMap}catch{}return!1}function ue(be){if(!v||!be||typeof be!="object")return!1;try{return v.call(be),!0}catch{}return!1}function me(be){if(!u||!be||typeof be!="object")return!1;try{u.call(be);try{t.call(be)}catch{return!0}return be instanceof Set}catch{}return!1}function xe(be){if(!k||!be||typeof be!="object")return!1;try{k.call(be,k);try{b.call(be,b)}catch{return!0}return be instanceof WeakSet}catch{}return!1}function Ie(be){return!be||typeof be!="object"?!1:typeof HTMLElement<"u"&&be instanceof HTMLElement?!0:typeof be.nodeName=="string"&&typeof be.getAttribute=="function"}function tt(be,we){if(be.length>we.maxStringLength){var Ne=be.length-we.maxStringLength,Ye="... "+Ne+" more character"+(Ne>1?"s":"");return tt(d.call(be,0,we.maxStringLength),we)+Ye}var Ze=K[we.quoteStyle||"single"];Ze.lastIndex=0;var ke=m.call(m.call(be,Ze,"\\$1"),/[\x00-\x1f]/g,lt);return ee(ke,"single",we)}function lt(be){var we=be.charCodeAt(0),Ne={8:"b",9:"t",10:"n",12:"f",13:"r"}[we];return Ne?"\\"+Ne:"\\x"+(we<16?"0":"")+y.call(we.toString(16))}function Fe(be){return"Object("+be+")"}function ze(be){return be+" { ? }"}function Ue(be,we,Ne,Ye){var Ze=Ye?kt(Ne,Ye):D.call(Ne,", ");return be+" ("+we+") {"+Ze+"}"}function Xe(be){for(var we=0;we<be.length;we++)if(ge(be[we],`
|
|
149
|
-
`)>=0)return!1;return!0}function dt(be,we){var Ne;if(be.indent===" ")Ne=" ";else if(typeof be.indent=="number"&&be.indent>0)Ne=D.call(Array(be.indent+1)," ");else return null;return{base:Ne,prev:D.call(Array(we+1),Ne)}}function kt(be,we){if(be.length===0)return"";var Ne=`
|
|
150
|
-
`+we.prev+we.base;return Ne+D.call(be,","+Ne)+`
|
|
151
|
-
`+we.prev}function Et(be,we){var Ne=Z(be),Ye=[];if(Ne){Ye.length=be.length;for(var Ze=0;Ze<be.length;Ze++)Ye[Ze]=Ee(be,Ze)?we(be[Ze],be):""}var ke=typeof M=="function"?M(be):[],vt;if(B){vt={};for(var je=0;je<ke.length;je++)vt["$"+ke[je]]=ke[je]}for(var ot in be)Ee(be,ot)&&(Ne&&String(Number(ot))===ot&&ot<be.length||B&&vt["$"+ot]instanceof Symbol||(L.call(/[^\w$]/,ot)?Ye.push(we(ot,be)+": "+we(be[ot],be)):Ye.push(ot+": "+we(be[ot],be))));if(typeof M=="function")for(var dn=0;dn<ke.length;dn++)Q.call(be,ke[dn])&&Ye.push("["+we(ke[dn])+"]: "+we(be[ke[dn]],be));return Ye}return k1}var T1,X2;function wO(){if(X2)return T1;X2=1;var e=wc(),i=vO(),t=_O(),n=qd(),a=e("%WeakMap%",!0),l=e("%Map%",!0),u=i("WeakMap.prototype.get",!0),c=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),b=i("Map.prototype.get",!0),_=i("Map.prototype.set",!0),k=i("Map.prototype.has",!0),O=function(p,P){for(var d=p,m;(m=d.next)!==null;d=m)if(m.key===P)return d.next=m.next,m.next=p.next,p.next=m,m},v=function(p,P){var d=O(p,P);return d&&d.value},x=function(p,P,d){var m=O(p,P);m?m.value=d:p.next={key:P,next:p.next,value:d}},g=function(p,P){return!!O(p,P)};return T1=function(){var P,d,m,y={assert:function(w){if(!y.has(w))throw new n("Side channel does not contain "+t(w))},get:function(w){if(a&&w&&(typeof w=="object"||typeof w=="function")){if(P)return u(P,w)}else if(l){if(d)return b(d,w)}else if(m)return v(m,w)},has:function(w){if(a&&w&&(typeof w=="object"||typeof w=="function")){if(P)return h(P,w)}else if(l){if(d)return k(d,w)}else if(m)return g(m,w);return!1},set:function(w,L){a&&w&&(typeof w=="object"||typeof w=="function")?(P||(P=new a),c(P,w,L)):l?(d||(d=new l),_(d,w,L)):(m||(m={key:{},next:null}),x(m,w,L))}};return y},T1}var A1,Z2;function bv(){if(Z2)return A1;Z2=1;var e=String.prototype.replace,i=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return A1={default:t.RFC3986,formatters:{RFC1738:function(n){return e.call(n,i,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},A1}var R1,Q2;function z4(){if(Q2)return R1;Q2=1;var e=bv(),i=Object.prototype.hasOwnProperty,t=Array.isArray,n=function(){for(var p=[],P=0;P<256;++P)p.push("%"+((P<16?"0":"")+P.toString(16)).toUpperCase());return p}(),a=function(P){for(;P.length>1;){var d=P.pop(),m=d.obj[d.prop];if(t(m)){for(var y=[],w=0;w<m.length;++w)typeof m[w]<"u"&&y.push(m[w]);d.obj[d.prop]=y}}},l=function(P,d){for(var m=d&&d.plainObjects?Object.create(null):{},y=0;y<P.length;++y)typeof P[y]<"u"&&(m[y]=P[y]);return m},u=function p(P,d,m){if(!d)return P;if(typeof d!="object"){if(t(P))P.push(d);else if(P&&typeof P=="object")(m&&(m.plainObjects||m.allowPrototypes)||!i.call(Object.prototype,d))&&(P[d]=!0);else return[P,d];return P}if(!P||typeof P!="object")return[P].concat(d);var y=P;return t(P)&&!t(d)&&(y=l(P,m)),t(P)&&t(d)?(d.forEach(function(w,L){if(i.call(P,L)){var R=P[L];R&&typeof R=="object"&&w&&typeof w=="object"?P[L]=p(R,w,m):P.push(w)}else P[L]=w}),P):Object.keys(d).reduce(function(w,L){var R=d[L];return i.call(w,L)?w[L]=p(w[L],R,m):w[L]=R,w},y)},c=function(P,d){return Object.keys(d).reduce(function(m,y){return m[y]=d[y],m},P)},h=function(p,P,d){var m=p.replace(/\+/g," ");if(d==="iso-8859-1")return m.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(m)}catch{return m}},b=1024,_=function(P,d,m,y,w){if(P.length===0)return P;var L=P;if(typeof P=="symbol"?L=Symbol.prototype.toString.call(P):typeof P!="string"&&(L=String(P)),m==="iso-8859-1")return escape(L).replace(/%u[0-9a-f]{4}/gi,function(T){return"%26%23"+parseInt(T.slice(2),16)+"%3B"});for(var R="",D=0;D<L.length;D+=b){for(var E=L.length>=b?L.slice(D,D+b):L,S=[],A=0;A<E.length;++A){var M=E.charCodeAt(A);if(M===45||M===46||M===95||M===126||M>=48&&M<=57||M>=65&&M<=90||M>=97&&M<=122||w===e.RFC1738&&(M===40||M===41)){S[S.length]=E.charAt(A);continue}if(M<128){S[S.length]=n[M];continue}if(M<2048){S[S.length]=n[192|M>>6]+n[128|M&63];continue}if(M<55296||M>=57344){S[S.length]=n[224|M>>12]+n[128|M>>6&63]+n[128|M&63];continue}A+=1,M=65536+((M&1023)<<10|E.charCodeAt(A)&1023),S[S.length]=n[240|M>>18]+n[128|M>>12&63]+n[128|M>>6&63]+n[128|M&63]}R+=S.join("")}return R},k=function(P){for(var d=[{obj:{o:P},prop:"o"}],m=[],y=0;y<d.length;++y)for(var w=d[y],L=w.obj[w.prop],R=Object.keys(L),D=0;D<R.length;++D){var E=R[D],S=L[E];typeof S=="object"&&S!==null&&m.indexOf(S)===-1&&(d.push({obj:L,prop:E}),m.push(S))}return a(d),P},O=function(P){return Object.prototype.toString.call(P)==="[object RegExp]"},v=function(P){return!P||typeof P!="object"?!1:!!(P.constructor&&P.constructor.isBuffer&&P.constructor.isBuffer(P))},x=function(P,d){return[].concat(P,d)},g=function(P,d){if(t(P)){for(var m=[],y=0;y<P.length;y+=1)m.push(d(P[y]));return m}return d(P)};return R1={arrayToObject:l,assign:c,combine:x,compact:k,decode:h,encode:_,isBuffer:v,isRegExp:O,maybeMap:g,merge:u},R1}var M1,J2;function SO(){if(J2)return M1;J2=1;var e=wO(),i=z4(),t=bv(),n=Object.prototype.hasOwnProperty,a={brackets:function(p){return p+"[]"},comma:"comma",indices:function(p,P){return p+"["+P+"]"},repeat:function(p){return p}},l=Array.isArray,u=Array.prototype.push,c=function(g,p){u.apply(g,l(p)?p:[p])},h=Date.prototype.toISOString,b=t.default,_={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,format:b,formatter:t.formatters[b],indices:!1,serializeDate:function(p){return h.call(p)},skipNulls:!1,strictNullHandling:!1},k=function(p){return typeof p=="string"||typeof p=="number"||typeof p=="boolean"||typeof p=="symbol"||typeof p=="bigint"},O={},v=function g(p,P,d,m,y,w,L,R,D,E,S,A,M,T,B,U,Q,X){for(var $=p,j=X,I=0,z=!1;(j=j.get(O))!==void 0&&!z;){var H=j.get(p);if(I+=1,typeof H<"u"){if(H===I)throw new RangeError("Cyclic object value");z=!0}typeof j.get(O)>"u"&&(I=0)}if(typeof E=="function"?$=E(P,$):$ instanceof Date?$=M($):d==="comma"&&l($)&&($=i.maybeMap($,function(Se){return Se instanceof Date?M(Se):Se})),$===null){if(w)return D&&!U?D(P,_.encoder,Q,"key",T):P;$=""}if(k($)||i.isBuffer($)){if(D){var K=U?P:D(P,_.encoder,Q,"key",T);return[B(K)+"="+B(D($,_.encoder,Q,"value",T))]}return[B(P)+"="+B(String($))]}var ee=[];if(typeof $>"u")return ee;var V;if(d==="comma"&&l($))U&&D&&($=i.maybeMap($,D)),V=[{value:$.length>0?$.join(",")||null:void 0}];else if(l(E))V=E;else{var Z=Object.keys($);V=S?Z.sort(S):Z}var Y=R?P.replace(/\./g,"%2E"):P,ne=m&&l($)&&$.length===1?Y+"[]":Y;if(y&&l($)&&$.length===0)return ne+"[]";for(var re=0;re<V.length;++re){var ie=V[re],ae=typeof ie=="object"&&typeof ie.value<"u"?ie.value:$[ie];if(!(L&&ae===null)){var se=A&&R?ie.replace(/\./g,"%2E"):ie,de=l($)?typeof d=="function"?d(ne,se):ne:ne+(A?"."+se:"["+se+"]");X.set(p,I);var he=e();he.set(O,X),c(ee,g(ae,de,d,m,y,w,L,R,d==="comma"&&U&&l($)?null:D,E,S,A,M,T,B,U,Q,he))}}return ee},x=function(p){if(!p)return _;if(typeof p.allowEmptyArrays<"u"&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof p.encodeDotInKeys<"u"&&typeof p.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(p.encoder!==null&&typeof p.encoder<"u"&&typeof p.encoder!="function")throw new TypeError("Encoder has to be a function.");var P=p.charset||_.charset;if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var d=t.default;if(typeof p.format<"u"){if(!n.call(t.formatters,p.format))throw new TypeError("Unknown format option provided.");d=p.format}var m=t.formatters[d],y=_.filter;(typeof p.filter=="function"||l(p.filter))&&(y=p.filter);var w;if(p.arrayFormat in a?w=p.arrayFormat:"indices"in p?w=p.indices?"indices":"repeat":w=_.arrayFormat,"commaRoundTrip"in p&&typeof p.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var L=typeof p.allowDots>"u"?p.encodeDotInKeys===!0?!0:_.allowDots:!!p.allowDots;return{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:_.addQueryPrefix,allowDots:L,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:_.allowEmptyArrays,arrayFormat:w,charset:P,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:_.charsetSentinel,commaRoundTrip:p.commaRoundTrip,delimiter:typeof p.delimiter>"u"?_.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:_.encode,encodeDotInKeys:typeof p.encodeDotInKeys=="boolean"?p.encodeDotInKeys:_.encodeDotInKeys,encoder:typeof p.encoder=="function"?p.encoder:_.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:_.encodeValuesOnly,filter:y,format:d,formatter:m,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:_.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:_.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:_.strictNullHandling}};return M1=function(g,p){var P=g,d=x(p),m,y;typeof d.filter=="function"?(y=d.filter,P=y("",P)):l(d.filter)&&(y=d.filter,m=y);var w=[];if(typeof P!="object"||P===null)return"";var L=a[d.arrayFormat],R=L==="comma"&&d.commaRoundTrip;m||(m=Object.keys(P)),d.sort&&m.sort(d.sort);for(var D=e(),E=0;E<m.length;++E){var S=m[E];d.skipNulls&&P[S]===null||c(w,v(P[S],S,L,R,d.allowEmptyArrays,d.strictNullHandling,d.skipNulls,d.encodeDotInKeys,d.encode?d.encoder:null,d.filter,d.sort,d.allowDots,d.serializeDate,d.format,d.formatter,d.encodeValuesOnly,d.charset,D))}var A=w.join(d.delimiter),M=d.addQueryPrefix===!0?"?":"";return d.charsetSentinel&&(d.charset==="iso-8859-1"?M+="utf8=%26%2310003%3B&":M+="utf8=%E2%9C%93&"),A.length>0?M+A:""},M1}var L1,eb;function EO(){if(eb)return L1;eb=1;var e=z4(),i=Object.prototype.hasOwnProperty,t=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},a=function(O){return O.replace(/&#(\d+);/g,function(v,x){return String.fromCharCode(parseInt(x,10))})},l=function(O,v){return O&&typeof O=="string"&&v.comma&&O.indexOf(",")>-1?O.split(","):O},u="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",h=function(v,x){var g={__proto__:null},p=x.ignoreQueryPrefix?v.replace(/^\?/,""):v;p=p.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var P=x.parameterLimit===1/0?void 0:x.parameterLimit,d=p.split(x.delimiter,P),m=-1,y,w=x.charset;if(x.charsetSentinel)for(y=0;y<d.length;++y)d[y].indexOf("utf8=")===0&&(d[y]===c?w="utf-8":d[y]===u&&(w="iso-8859-1"),m=y,y=d.length);for(y=0;y<d.length;++y)if(y!==m){var L=d[y],R=L.indexOf("]="),D=R===-1?L.indexOf("="):R+1,E,S;D===-1?(E=x.decoder(L,n.decoder,w,"key"),S=x.strictNullHandling?null:""):(E=x.decoder(L.slice(0,D),n.decoder,w,"key"),S=e.maybeMap(l(L.slice(D+1),x),function(M){return x.decoder(M,n.decoder,w,"value")})),S&&x.interpretNumericEntities&&w==="iso-8859-1"&&(S=a(S)),L.indexOf("[]=")>-1&&(S=t(S)?[S]:S);var A=i.call(g,E);A&&x.duplicates==="combine"?g[E]=e.combine(g[E],S):(!A||x.duplicates==="last")&&(g[E]=S)}return g},b=function(O,v,x,g){for(var p=g?v:l(v,x),P=O.length-1;P>=0;--P){var d,m=O[P];if(m==="[]"&&x.parseArrays)d=x.allowEmptyArrays&&(p===""||x.strictNullHandling&&p===null)?[]:[].concat(p);else{d=x.plainObjects?Object.create(null):{};var y=m.charAt(0)==="["&&m.charAt(m.length-1)==="]"?m.slice(1,-1):m,w=x.decodeDotInKeys?y.replace(/%2E/g,"."):y,L=parseInt(w,10);!x.parseArrays&&w===""?d={0:p}:!isNaN(L)&&m!==w&&String(L)===w&&L>=0&&x.parseArrays&&L<=x.arrayLimit?(d=[],d[L]=p):w!=="__proto__"&&(d[w]=p)}p=d}return p},_=function(v,x,g,p){if(v){var P=g.allowDots?v.replace(/\.([^.[]+)/g,"[$1]"):v,d=/(\[[^[\]]*])/,m=/(\[[^[\]]*])/g,y=g.depth>0&&d.exec(P),w=y?P.slice(0,y.index):P,L=[];if(w){if(!g.plainObjects&&i.call(Object.prototype,w)&&!g.allowPrototypes)return;L.push(w)}for(var R=0;g.depth>0&&(y=m.exec(P))!==null&&R<g.depth;){if(R+=1,!g.plainObjects&&i.call(Object.prototype,y[1].slice(1,-1))&&!g.allowPrototypes)return;L.push(y[1])}if(y){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");L.push("["+P.slice(y.index)+"]")}return b(L,x,g,p)}},k=function(v){if(!v)return n;if(typeof v.allowEmptyArrays<"u"&&typeof v.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof v.decodeDotInKeys<"u"&&typeof v.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(v.decoder!==null&&typeof v.decoder<"u"&&typeof v.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=typeof v.charset>"u"?n.charset:v.charset,g=typeof v.duplicates>"u"?n.duplicates:v.duplicates;if(g!=="combine"&&g!=="first"&&g!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var p=typeof v.allowDots>"u"?v.decodeDotInKeys===!0?!0:n.allowDots:!!v.allowDots;return{allowDots:p,allowEmptyArrays:typeof v.allowEmptyArrays=="boolean"?!!v.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof v.allowPrototypes=="boolean"?v.allowPrototypes:n.allowPrototypes,allowSparse:typeof v.allowSparse=="boolean"?v.allowSparse:n.allowSparse,arrayLimit:typeof v.arrayLimit=="number"?v.arrayLimit:n.arrayLimit,charset:x,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:n.charsetSentinel,comma:typeof v.comma=="boolean"?v.comma:n.comma,decodeDotInKeys:typeof v.decodeDotInKeys=="boolean"?v.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof v.decoder=="function"?v.decoder:n.decoder,delimiter:typeof v.delimiter=="string"||e.isRegExp(v.delimiter)?v.delimiter:n.delimiter,depth:typeof v.depth=="number"||v.depth===!1?+v.depth:n.depth,duplicates:g,ignoreQueryPrefix:v.ignoreQueryPrefix===!0,interpretNumericEntities:typeof v.interpretNumericEntities=="boolean"?v.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof v.parameterLimit=="number"?v.parameterLimit:n.parameterLimit,parseArrays:v.parseArrays!==!1,plainObjects:typeof v.plainObjects=="boolean"?v.plainObjects:n.plainObjects,strictDepth:typeof v.strictDepth=="boolean"?!!v.strictDepth:n.strictDepth,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:n.strictNullHandling}};return L1=function(O,v){var x=k(v);if(O===""||O===null||typeof O>"u")return x.plainObjects?Object.create(null):{};for(var g=typeof O=="string"?h(O,x):O,p=x.plainObjects?Object.create(null):{},P=Object.keys(g),d=0;d<P.length;++d){var m=P[d],y=_(m,g[m],x,typeof O=="string");p=e.merge(p,y,x)}return x.allowSparse===!0?p:e.compact(p)},L1}var N1,tb;function OO(){if(tb)return N1;tb=1;var e=SO(),i=EO(),t=bv();return N1={formats:t,parse:i,stringify:e},N1}var nb;function B4(){if(nb)return js;nb=1;var e=tO();function i(){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 t=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["<",">",'"',"`"," ","\r",`
|
|
152
|
-
`," "],u=["{","}","|","\\","^","`"].concat(l),c=["'"].concat(u),h=["%","/","?",";","#"].concat(c),b=["/","?","#"],_=255,k=/^[+a-z0-9A-Z_-]{0,63}$/,O=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},x={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},p=OO();function P(w,L,R){if(w&&typeof w=="object"&&w instanceof i)return w;var D=new i;return D.parse(w,L,R),D}i.prototype.parse=function(w,L,R){if(typeof w!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof w);var D=w.indexOf("?"),E=D!==-1&&D<w.indexOf("#")?"?":"#",S=w.split(E),A=/\\/g;S[0]=S[0].replace(A,"/"),w=S.join(E);var M=w;if(M=M.trim(),!R&&w.split("#").length===1){var T=a.exec(M);if(T)return this.path=M,this.href=M,this.pathname=T[1],T[2]?(this.search=T[2],L?this.query=p.parse(this.search.substr(1)):this.query=this.search.substr(1)):L&&(this.search="",this.query={}),this}var B=t.exec(M);if(B){B=B[0];var U=B.toLowerCase();this.protocol=U,M=M.substr(B.length)}if(R||B||M.match(/^\/\/[^@/]+@[^@/]+/)){var Q=M.substr(0,2)==="//";Q&&!(B&&x[B])&&(M=M.substr(2),this.slashes=!0)}if(!x[B]&&(Q||B&&!g[B])){for(var X=-1,$=0;$<b.length;$++){var j=M.indexOf(b[$]);j!==-1&&(X===-1||j<X)&&(X=j)}var I,z;X===-1?z=M.lastIndexOf("@"):z=M.lastIndexOf("@",X),z!==-1&&(I=M.slice(0,z),M=M.slice(z+1),this.auth=decodeURIComponent(I)),X=-1;for(var $=0;$<h.length;$++){var j=M.indexOf(h[$]);j!==-1&&(X===-1||j<X)&&(X=j)}X===-1&&(X=M.length),this.host=M.slice(0,X),M=M.slice(X),this.parseHost(),this.hostname=this.hostname||"";var H=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!H)for(var K=this.hostname.split(/\./),$=0,ee=K.length;$<ee;$++){var V=K[$];if(V&&!V.match(k)){for(var Z="",Y=0,ne=V.length;Y<ne;Y++)V.charCodeAt(Y)>127?Z+="x":Z+=V[Y];if(!Z.match(k)){var re=K.slice(0,$),ie=K.slice($+1),ae=V.match(O);ae&&(re.push(ae[1]),ie.unshift(ae[2])),ie.length&&(M="/"+ie.join(".")+M),this.hostname=re.join(".");break}}}this.hostname.length>_?this.hostname="":this.hostname=this.hostname.toLowerCase(),H||(this.hostname=e.toASCII(this.hostname));var se=this.port?":"+this.port:"",de=this.hostname||"";this.host=de+se,this.href+=this.host,H&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!v[U])for(var $=0,ee=c.length;$<ee;$++){var he=c[$];if(M.indexOf(he)!==-1){var Se=encodeURIComponent(he);Se===he&&(Se=escape(he)),M=M.split(he).join(Se)}}var Ee=M.indexOf("#");Ee!==-1&&(this.hash=M.substr(Ee),M=M.slice(0,Ee));var De=M.indexOf("?");if(De!==-1?(this.search=M.substr(De),this.query=M.substr(De+1),L&&(this.query=p.parse(this.query)),M=M.slice(0,De)):L&&(this.search="",this.query={}),M&&(this.pathname=M),g[U]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var se=this.pathname||"",fe=this.search||"";this.path=se+fe}return this.href=this.format(),this};function d(w){return typeof w=="string"&&(w=P(w)),w instanceof i?w.format():i.prototype.format.call(w)}i.prototype.format=function(){var w=this.auth||"";w&&(w=encodeURIComponent(w),w=w.replace(/%3A/i,":"),w+="@");var L=this.protocol||"",R=this.pathname||"",D=this.hash||"",E=!1,S="";this.host?E=w+this.host:this.hostname&&(E=w+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(E+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(S=p.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var A=this.search||S&&"?"+S||"";return L&&L.substr(-1)!==":"&&(L+=":"),this.slashes||(!L||g[L])&&E!==!1?(E="//"+(E||""),R&&R.charAt(0)!=="/"&&(R="/"+R)):E||(E=""),D&&D.charAt(0)!=="#"&&(D="#"+D),A&&A.charAt(0)!=="?"&&(A="?"+A),R=R.replace(/[?#]/g,function(M){return encodeURIComponent(M)}),A=A.replace("#","%23"),L+E+R+A+D};function m(w,L){return P(w,!1,!0).resolve(L)}i.prototype.resolve=function(w){return this.resolveObject(P(w,!1,!0)).format()};function y(w,L){return w?P(w,!1,!0).resolveObject(L):L}return i.prototype.resolveObject=function(w){if(typeof w=="string"){var L=new i;L.parse(w,!1,!0),w=L}for(var R=new i,D=Object.keys(this),E=0;E<D.length;E++){var S=D[E];R[S]=this[S]}if(R.hash=w.hash,w.href==="")return R.href=R.format(),R;if(w.slashes&&!w.protocol){for(var A=Object.keys(w),M=0;M<A.length;M++){var T=A[M];T!=="protocol"&&(R[T]=w[T])}return g[R.protocol]&&R.hostname&&!R.pathname&&(R.pathname="/",R.path=R.pathname),R.href=R.format(),R}if(w.protocol&&w.protocol!==R.protocol){if(!g[w.protocol]){for(var B=Object.keys(w),U=0;U<B.length;U++){var Q=B[U];R[Q]=w[Q]}return R.href=R.format(),R}if(R.protocol=w.protocol,!w.host&&!x[w.protocol]){for(var ee=(w.pathname||"").split("/");ee.length&&!(w.host=ee.shift()););w.host||(w.host=""),w.hostname||(w.hostname=""),ee[0]!==""&&ee.unshift(""),ee.length<2&&ee.unshift(""),R.pathname=ee.join("/")}else R.pathname=w.pathname;if(R.search=w.search,R.query=w.query,R.host=w.host||"",R.auth=w.auth,R.hostname=w.hostname||w.host,R.port=w.port,R.pathname||R.search){var X=R.pathname||"",$=R.search||"";R.path=X+$}return R.slashes=R.slashes||w.slashes,R.href=R.format(),R}var j=R.pathname&&R.pathname.charAt(0)==="/",I=w.host||w.pathname&&w.pathname.charAt(0)==="/",z=I||j||R.host&&w.pathname,H=z,K=R.pathname&&R.pathname.split("/")||[],ee=w.pathname&&w.pathname.split("/")||[],V=R.protocol&&!g[R.protocol];if(V&&(R.hostname="",R.port=null,R.host&&(K[0]===""?K[0]=R.host:K.unshift(R.host)),R.host="",w.protocol&&(w.hostname=null,w.port=null,w.host&&(ee[0]===""?ee[0]=w.host:ee.unshift(w.host)),w.host=null),z=z&&(ee[0]===""||K[0]==="")),I)R.host=w.host||w.host===""?w.host:R.host,R.hostname=w.hostname||w.hostname===""?w.hostname:R.hostname,R.search=w.search,R.query=w.query,K=ee;else if(ee.length)K||(K=[]),K.pop(),K=K.concat(ee),R.search=w.search,R.query=w.query;else if(w.search!=null){if(V){R.host=K.shift(),R.hostname=R.host;var Z=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;Z&&(R.auth=Z.shift(),R.hostname=Z.shift(),R.host=R.hostname)}return R.search=w.search,R.query=w.query,(R.pathname!==null||R.search!==null)&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R}if(!K.length)return R.pathname=null,R.search?R.path="/"+R.search:R.path=null,R.href=R.format(),R;for(var Y=K.slice(-1)[0],ne=(R.host||w.host||K.length>1)&&(Y==="."||Y==="..")||Y==="",re=0,ie=K.length;ie>=0;ie--)Y=K[ie],Y==="."?K.splice(ie,1):Y===".."?(K.splice(ie,1),re++):re&&(K.splice(ie,1),re--);if(!z&&!H)for(;re--;re)K.unshift("..");z&&K[0]!==""&&(!K[0]||K[0].charAt(0)!=="/")&&K.unshift(""),ne&&K.join("/").substr(-1)!=="/"&&K.push("");var ae=K[0]===""||K[0]&&K[0].charAt(0)==="/";if(V){R.hostname=ae?"":K.length?K.shift():"",R.host=R.hostname;var Z=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;Z&&(R.auth=Z.shift(),R.hostname=Z.shift(),R.host=R.hostname)}return z=z||R.host&&K.length,z&&!ae&&K.unshift(""),K.length>0?R.pathname=K.join("/"):(R.pathname=null,R.path=null),(R.pathname!==null||R.search!==null)&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.auth=w.auth||R.auth,R.slashes=R.slashes||w.slashes,R.href=R.format(),R},i.prototype.parseHost=function(){var w=this.host,L=n.exec(w);L&&(L=L[0],L!==":"&&(this.port=L.substr(1)),w=w.substr(0,w.length-L.length)),w&&(this.hostname=w)},js.parse=P,js.resolve=m,js.resolveObject=y,js.format=d,js.Url=i,js}var ap={exports:{}},xO=ap.exports,rb;function PO(){return rb||(rb=1,function(e){(function(i,t){e.exports?e.exports=t():i.xmlserializer=t()})(xO,function(){var i=function(v){return v.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,"")},t=function(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},n=function(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},a=function(v){var x=v.value;return" "+v.name+'="'+t(x)+'"'},l=function(v){var x=v.tagName;return v.namespaceURI==="http://www.w3.org/1999/xhtml"&&(x=x.toLowerCase()),x},u=function(v,x){var g=Array.prototype.map.call(v.attributes||v.attrs,function(p){return p.name}).indexOf("xmlns")>=0;return!g&&(x||v.namespaceURI!==v.parentNode.namespaceURI)?' xmlns="'+v.namespaceURI+'"':""},c=function(v){return Array.prototype.map.call(v.childNodes,function(x){return O(x)}).join("")},h=function(v,x){var g="<"+l(v);return g+=u(v,x),Array.prototype.forEach.call(v.attributes||v.attrs,function(p){g+=a(p)}),v.childNodes.length>0?(g+=">",g+=c(v),g+="</"+l(v)+">"):g+="/>",g},b=function(v){var x=v.nodeValue||v.value||"";return n(x)},_=function(v){return"<!--"+v.data.replace(/-/g,"-")+"-->"},k=function(v){return"<![CDATA["+v.nodeValue+"]]>"},O=function(v,x){var g=x&&x.rootNode;if(v.nodeName==="#document"||v.nodeName==="#document-fragment")return c(v);if(v.tagName)return h(v,g);if(v.nodeName==="#text")return b(v);if(v.nodeName==="#comment")return _(v);if(v.nodeName==="#cdata-section")return k(v)};return{serializeToString:function(v){return i(O(v,{rootNode:!0}))}}})}(ap)),ap.exports}var I1={},ib;function CO(){if(ib)return I1;ib=1;var e=function(l){var u=new XMLSerializer;return Array.prototype.map.call(l.childNodes,function(c){return u.serializeToString(c)}).join("")},i=function(l){if(l.documentElement.tagName==="parsererror"&&l.documentElement.namespaceURI==="http://www.mozilla.org/newlayout/xml/parsererror.xml")return l.documentElement;if((l.documentElement.tagName==="xml"||l.documentElement.tagName==="html")&&l.documentElement.childNodes&&l.documentElement.childNodes.length>0&&l.documentElement.childNodes[0].nodeName==="parsererror")return l.documentElement.childNodes[0];if(l.documentElement.tagName==="html"&&l.documentElement.childNodes&&l.documentElement.childNodes.length>0&&l.documentElement.childNodes[0].nodeName==="body"&&l.documentElement.childNodes[0].childNodes&&l.documentElement.childNodes[0].childNodes.length&&l.documentElement.childNodes[0].childNodes[0].nodeName==="parsererror")return l.documentElement.childNodes[0].childNodes[0]},t=[new RegExp(`^<h3[^>]*>This page contains the following errors:</h3><div[^>]*>(.+?)
|
|
153
|
-
?</div>`),new RegExp(`^(.+)
|
|
154
|
-
`)],n=function(l){var u=e(l),c,h;for(c=0;c<t.length;c++)if(h=t[c].exec(u),h)return h[1]},a=function(l){var u;if(l===null)throw new Error("Parse error");var c=i(l);if(c!==void 0)throw u=n(c)||"Parse error",new Error(u)};return I1.failOnParseError=function(l){return a(l),l},I1}var D1={},j1={},ob;function qp(){return ob||(ob=1,function(e){var i=B4();e.getDocumentBaseUrl=function(c){return c.baseURI!=="about:blank"?c.baseURI:null},e.clone=function(c){var h={},b;for(b in c)c.hasOwnProperty(b)&&(h[b]=c[b]);return h},e.cloneArray=function(c){return Array.prototype.slice.apply(c,[0])},e.joinUrl=function(c,h){return c?i.resolve(c,h):h},e.isDataUri=function(c){return/^data:/.test(c)},e.collectAndReportErrors=function(c){var h=[];return Promise.all(c.map(function(b){return b.catch(function(_){h.push(_)})})).then(function(){return h})};var t=null,n=function(c,h){return h===!1||h==="none"||h==="repeated"?((t===null||h!=="repeated")&&(t=Date.now()),c+"?_="+t):c};e.ajax=function(c,h){return new Promise(function(b,_){var k=new window.XMLHttpRequest,O=e.joinUrl(h.baseUrl,c),v,x=function(){_({msg:"Unable to load url",url:O})};v=n(O,h.cache),k.addEventListener("load",function(){k.status===200||k.status===0?b(k.response):x()},!1),k.addEventListener("error",x,!1);try{k.open("GET",v,!0),k.overrideMimeType(h.mimeType),k.send(null)}catch{x()}})},e.binaryAjax=function(c,h){var b=e.clone(h);return b.mimeType="text/plain; charset=x-user-defined",e.ajax(c,b).then(function(_){for(var k="",O=0;O<_.length;O++)k+=String.fromCharCode(_.charCodeAt(O)&255);return k})};var a=function(c){var h=function(b,_){return b.substring(0,_.length)===_};return h(c,"<?xml")||h(c,"<svg")?"image/svg+xml":"image/png"};e.getDataURIForImageURL=function(c,h){return e.binaryAjax(c,h).then(function(b){var _=btoa(b),k=a(b);return"data:"+k+";base64,"+_})};var l=[],u=function(c){return l.indexOf(c)<0&&l.push(c),l.indexOf(c)};e.memoize=function(c,h,b){if(typeof b!="object")throw new Error("cacheBucket is not an object");return function(){var _=Array.prototype.slice.call(arguments),k=h(_),O=u(c),v;return b[O]&&b[O][k]?b[O][k]:(v=c.apply(null,_),b[O]=b[O]||{},b[O][k]=v,v)}}}(j1)),j1}var F1={},ab;function kO(){if(ab)return F1;ab=1;var e=qp(),i=function(l,u){var c=null;l.hasAttribute("src")?c=l.getAttribute("src"):l.hasAttributeNS("http://www.w3.org/1999/xlink","href")?c=l.getAttributeNS("http://www.w3.org/1999/xlink","href"):l.hasAttribute("href")&&(c=l.getAttribute("href"));var h=e.getDocumentBaseUrl(l.ownerDocument),b=e.clone(u);return!b.baseUrl&&h&&(b.baseUrl=h),e.getDataURIForImageURL(c,b).then(function(_){return _},function(_){throw{resourceType:"image",url:_.url,msg:"Unable to load image "+_.url}})},t=function(l){return l.filter(function(u){var c=null;return u.hasAttribute("src")?c=u.getAttribute("src"):u.hasAttributeNS("http://www.w3.org/1999/xlink","href")?c=u.getAttributeNS("http://www.w3.org/1999/xlink","href"):u.hasAttribute("href")&&(c=u.getAttribute("href")),c!==null&&!e.isDataUri(c)})},n=function(l){return Array.prototype.filter.call(l,function(u){return u.type==="image"})},a=function(l){return Array.prototype.slice.call(l)};return F1.inline=function(l,u){var c=a(l.getElementsByTagName("img")),h=a(l.getElementsByTagName("image")),b=n(l.getElementsByTagName("input"));c=c.concat(h),c=c.concat(b);var _=t(c);return e.collectAndReportErrors(_.map(function(k){return i(k,u).then(function(O){k.attributes.src?k.attributes.src.value=O:k.attributes["xlink:href"]?k.attributes["xlink:href"].value=O:k.attributes.href&&(k.attributes.href.value=O)})}))},F1}var z1={},lb;function TO(){if(lb)return z1;lb=1;var e=qp(),i=function(l,u){var c=l.attributes.src.value,h=e.getDocumentBaseUrl(l.ownerDocument),b=e.clone(u);return!b.baseUrl&&h&&(b.baseUrl=h),e.ajax(c,b).catch(function(_){throw{resourceType:"script",url:_.url,msg:"Unable to load script "+_.url}})},t=function(l){return l.replace(/<\//g,"<\\/")},n=function(l,u){l.attributes.removeNamedItem("src"),l.textContent=t(u)},a=function(l){var u=l.getElementsByTagName("script");return Array.prototype.filter.call(u,function(c){return!!c.attributes.src})};return z1.inline=function(l,u){var c=a(l);return e.collectAndReportErrors(c.map(function(h){return i(h,u).then(function(b){n(h,b)})}))},z1}var B1={},U1={},sb;function _v(){return sb||(sb=1,function(e){e.unquoteString=function(i){var t=/^"(.*)"$/,n=/^'(.*)'$/;return t.test(i)?i.replace(t,"$1"):n.test(i)?i.replace(n,"$1"):i},e.rulesForCssText=function(i){var t=document.implementation.createHTMLDocument(""),n=document.createElement("style"),a;return n.textContent=i,t.body.appendChild(n),a=n.sheet.cssRules,Array.prototype.slice.call(a)},e.cssRulesToText=function(i){return i.reduce(function(t,n){return t+n.cssText},"")},e.exchangeRule=function(i,t,n){var a=i.indexOf(t);i[a]=e.rulesForCssText(n)[0]},e.changeFontFaceRuleSrc=function(i,t,n){var a="@font-face { font-family: "+t.style.getPropertyValue("font-family")+"; ";t.style.getPropertyValue("font-style")&&(a+="font-style: "+t.style.getPropertyValue("font-style")+"; "),t.style.getPropertyValue("font-weight")&&(a+="font-weight: "+t.style.getPropertyValue("font-weight")+"; "),t.style.getPropertyValue("unicode-range")&&(a+="unicode-range: "+t.style.getPropertyValue("unicode-range")+"; "),a+="src: "+n+"}",e.exchangeRule(i,t,a)}}(U1)),U1}var q1={},ub;function AO(){return ub||(ub=1,function(e){var i=_v(),t=function(l){var u=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return l.replace(u,"$1")};e.extractCssUrl=function(l){var u=/^url\(("[^"]+"|'[^']+'|[^\)]+)\)/,c;if(!u.test(l))throw new Error("Invalid url");return c=u.exec(l)[1],i.unquoteString(t(c))};var n=function(l){var u=`\\s*(?:"[^"]*"|'[^']*'|[^\\(]+)\\s*`,c="(url\\("+u+"\\)|[^,\\s]+)",h="(?:\\s*"+c+")+",b="^\\s*("+h+")(?:\\s*,\\s*("+h+"))*\\s*$",_=new RegExp(h,"g"),k,O=[],v=function(x){var g=new RegExp(c,"g"),p=[],P;for(P=g.exec(x);P;)p.push(P[1]),P=g.exec(x);return p};if(l.match(new RegExp(b))){for(k=_.exec(l);k;)O.push(v(k[0])),k=_.exec(l);return O}return[]},a=function(l){var u,c;for(u=0;u<l.length;u++)try{return c=e.extractCssUrl(l[u]),{url:c,idx:u}}catch{}};e.parse=function(l){var u=n(l);return u.map(function(c){var h=a(c);return h?{preUrl:c.slice(0,h.idx),url:h.url,postUrl:c.slice(h.idx+1)}:{preUrl:c}})},e.serialize=function(l){var u=l.map(function(c){var h=[].concat(c.preUrl);return c.url&&h.push('url("'+c.url+'")'),c.postUrl&&(h=h.concat(c.postUrl)),h.join(" ")});return u.join(", ")}}(q1)),q1}function ep(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var H1={exports:{}},cb;function RO(){return cb||(cb=1,function(e,i){(function(t){e.exports=t()})(function(){return function t(n,a,l){function u(b,_){if(!a[b]){if(!n[b]){var k=typeof ep=="function"&&ep;if(!_&&k)return k(b,!0);if(c)return c(b,!0);var O=new Error("Cannot find module '"+b+"'");throw O.code="MODULE_NOT_FOUND",O}var v=a[b]={exports:{}};n[b][0].call(v.exports,function(x){var g=n[b][1][x];return u(g||x)},v,v.exports,t,n,a,l)}return a[b].exports}for(var c=typeof ep=="function"&&ep,h=0;h<l.length;h++)u(l[h]);return u}({1:[function(t,n,a){function l(h,b){function _(){this.constructor=h}_.prototype=b.prototype,h.prototype=new _}function u(h,b,_,k){this.message=h,this.expected=b,this.found=_,this.location=k,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,u)}l(u,Error),u.buildMessage=function(h,b){var _={literal:function(P){return'"'+O(P.text)+'"'},class:function(P){var d="",m;for(m=0;m<P.parts.length;m++)d+=P.parts[m]instanceof Array?v(P.parts[m][0])+"-"+v(P.parts[m][1]):v(P.parts[m]);return"["+(P.inverted?"^":"")+d+"]"},any:function(P){return"any character"},end:function(P){return"end of input"},other:function(P){return P.description}};function k(P){return P.charCodeAt(0).toString(16).toUpperCase()}function O(P){return P.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(d){return"\\x0"+k(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+k(d)})}function v(P){return P.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(d){return"\\x0"+k(d)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(d){return"\\x"+k(d)})}function x(P){return _[P.type](P)}function g(P){var d=new Array(P.length),m,y;for(m=0;m<P.length;m++)d[m]=x(P[m]);if(d.sort(),d.length>0){for(m=1,y=1;m<d.length;m++)d[m-1]!==d[m]&&(d[y]=d[m],y++);d.length=y}switch(d.length){case 1:return d[0];case 2:return d[0]+" or "+d[1];default:return d.slice(0,-1).join(", ")+", or "+d[d.length-1]}}function p(P){return P?'"'+O(P)+'"':"end of input"}return"Expected "+g(h)+" but "+p(b)+" found."};function c(h,b){b=b!==void 0?b:{};var _={},k={start:se},O=se,v="",x=function(){return[]},g=",",p=V(",",!1),P=function(ue,me){return[ue].concat(me)},d=function(ue){return[ue]},m=function(ue,me){return{url:ue,format:me}},y=function(ue){return{url:ue}},w="url(",L=V("url(",!1),R=")",D=V(")",!1),E=function(ue){return ue},S="format(",A=V("format(",!1),M="local(",T=V("local(",!1),B=function(ue){return{local:ue}},U=/^[^)]/,Q=Z([")"],!0,!1),X=function(ue){return Re.extractValue(ue.join(""))},$=/^[ \t\r\n\f]/,j=Z([" "," ","\r",`
|
|
155
|
-
`,"\f"],!1,!1),I=0,z=[{line:1,column:1}],H=0,K=[],ee;if("startRule"in b){if(!(b.startRule in k))throw new Error(`Can't start parsing from rule "`+b.startRule+'".');O=k[b.startRule]}function V(ue,me){return{type:"literal",text:ue,ignoreCase:me}}function Z(ue,me,xe){return{type:"class",parts:ue,inverted:me,ignoreCase:xe}}function Y(){return{type:"end"}}function ne(ue){var me=z[ue],xe;if(me)return me;for(xe=ue-1;!z[xe];)xe--;for(me=z[xe],me={line:me.line,column:me.column};xe<ue;)h.charCodeAt(xe)===10?(me.line++,me.column=1):me.column++,xe++;return z[ue]=me,me}function re(ue,me){var xe=ne(ue),Ie=ne(me);return{start:{offset:ue,line:xe.line,column:xe.column},end:{offset:me,line:Ie.line,column:Ie.column}}}function ie(ue){I<H||(I>H&&(H=I,K=[]),K.push(ue))}function ae(ue,me,xe){return new u(u.buildMessage(ue,me),ue,me,xe)}function se(){var ue,me;return ue=de(),ue===_&&(ue=I,me=v,me!==_&&(me=x()),ue=me),ue}function de(){var ue,me,xe,Ie,tt,lt;if(ue=I,me=he(),me!==_){for(xe=[],Ie=Te();Ie!==_;)xe.push(Ie),Ie=Te();if(xe!==_)if(h.charCodeAt(I)===44?(Ie=g,I++):(Ie=_,ie(p)),Ie!==_){for(tt=[],lt=Te();lt!==_;)tt.push(lt),lt=Te();tt!==_?(lt=de(),lt!==_?(me=P(me,lt),ue=me):(I=ue,ue=_)):(I=ue,ue=_)}else I=ue,ue=_;else I=ue,ue=_}else I=ue,ue=_;return ue===_&&(ue=I,me=he(),me!==_&&(me=d(me)),ue=me),ue}function he(){var ue;return ue=Se(),ue===_&&(ue=fe()),ue}function Se(){var ue,me,xe,Ie;if(ue=I,me=Ee(),me!==_){if(xe=[],Ie=Te(),Ie!==_)for(;Ie!==_;)xe.push(Ie),Ie=Te();else xe=_;xe!==_?(Ie=De(),Ie!==_?(me=m(me,Ie),ue=me):(I=ue,ue=_)):(I=ue,ue=_)}else I=ue,ue=_;return ue===_&&(ue=I,me=Ee(),me!==_&&(me=y(me)),ue=me),ue}function Ee(){var ue,me,xe,Ie;return ue=I,h.substr(I,4)===w?(me=w,I+=4):(me=_,ie(L)),me!==_?(xe=ge(),xe!==_?(h.charCodeAt(I)===41?(Ie=R,I++):(Ie=_,ie(D)),Ie!==_?(me=E(xe),ue=me):(I=ue,ue=_)):(I=ue,ue=_)):(I=ue,ue=_),ue}function De(){var ue,me,xe,Ie;return ue=I,h.substr(I,7)===S?(me=S,I+=7):(me=_,ie(A)),me!==_?(xe=ge(),xe!==_?(h.charCodeAt(I)===41?(Ie=R,I++):(Ie=_,ie(D)),Ie!==_?(me=E(xe),ue=me):(I=ue,ue=_)):(I=ue,ue=_)):(I=ue,ue=_),ue}function fe(){var ue,me,xe,Ie;return ue=I,h.substr(I,6)===M?(me=M,I+=6):(me=_,ie(T)),me!==_?(xe=ge(),xe!==_?(h.charCodeAt(I)===41?(Ie=R,I++):(Ie=_,ie(D)),Ie!==_?(me=B(xe),ue=me):(I=ue,ue=_)):(I=ue,ue=_)):(I=ue,ue=_),ue}function ge(){var ue,me,xe;if(ue=I,me=[],U.test(h.charAt(I))?(xe=h.charAt(I),I++):(xe=_,ie(Q)),xe!==_)for(;xe!==_;)me.push(xe),U.test(h.charAt(I))?(xe=h.charAt(I),I++):(xe=_,ie(Q));else me=_;return me!==_&&(me=X(me)),ue=me,ue}function Te(){var ue;return $.test(h.charAt(I))?(ue=h.charAt(I),I++):(ue=_,ie(j)),ue}var Re=t("../util");if(ee=O(),ee!==_&&I===h.length)return ee;throw ee!==_&&I<h.length&&ie(Y()),ae(K,H<h.length?h.charAt(H):null,H<h.length?re(H,H+1):re(H,H))}n.exports={SyntaxError:u,parse:c}},{"../util":3}],2:[function(t,n,a){var l=t("./grammar");a.SyntaxError=function(u,c){this.message=u,this.offset=c},a.parse=function(u){try{return l.parse(u)}catch(c){throw new a.SyntaxError(c.message,c.offset)}},a.serialize=function(u){return u.map(function(c){var h;return c.url?(h='url("'+c.url+'")',c.format&&(h+=' format("'+c.format+'")')):h='local("'+c.local+'")',h}).join(", ")}},{"./grammar":1}],3:[function(t,n,a){var l=function(c){var h=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return c.replace(h,"$1")},u=function(c){var h=/^"(.*)"$/,b=/^'(.*)'$/;return h.test(c)?c.replace(h,"$1"):b.test(c)?c.replace(b,"$1"):c};a.extractValue=function(c){return u(l(c))}},{}]},{},[2])(2)})}(H1)),H1.exports}var fb;function MO(){return fb||(fb=1,function(e){var i=qp(),t=_v(),n=AO(),a=RO(),l=function(d,m,y){d.style.setProperty(m,y,d.style.getPropertyPriority(m))},u=function(d){return d.filter(function(m){return m.type===window.CSSRule.STYLE_RULE&&(m.style.getPropertyValue("background-image")||m.style.getPropertyValue("background"))})},c=function(d){var m=[];return d.forEach(function(y){y.style.getPropertyValue("background-image")?m.push({property:"background-image",value:y.style.getPropertyValue("background-image"),rule:y}):y.style.getPropertyValue("background")&&m.push({property:"background",value:y.style.getPropertyValue("background"),rule:y})}),m},h=function(d){return d.filter(function(m){return m.type===window.CSSRule.FONT_FACE_RULE&&m.style.getPropertyValue("src")})},b=function(d){return d.filter(function(m){return m.type===window.CSSRule.IMPORT_RULE&&m.href})},_=function(d){var m=[];return d.forEach(function(y,w){y.url&&!i.isDataUri(y.url)&&m.push(w)}),m},k=function(d){var m=[];return d.forEach(function(y,w){y.url&&!i.isDataUri(y.url)&&m.push(w)}),m};e.adjustPathsOfCssResources=function(d,m){var y=u(m),w=c(y),L=!1;return w.forEach(function(R){var D=n.parse(R.value),E=_(D),S;E.length>0&&(E.forEach(function(A){var M=D[A].url,T=i.joinUrl(d,M);D[A].url=T}),S=n.serialize(D),l(R.rule,R.property,S),L=!0)}),h(m).forEach(function(R){var D=R.style.getPropertyValue("src"),E,S;try{E=a.parse(D)}catch{return}S=k(E),S.length>0&&(S.forEach(function(A){var M=E[A].url,T=i.joinUrl(d,M);E[A].url=T}),t.changeFontFaceRuleSrc(m,R,a.serialize(E)),L=!0)}),b(m).forEach(function(R){var D=R.href,E=i.joinUrl(d,D);t.exchangeRule(m,R,"@import url("+E+");"),L=!0}),L};var O=function(d,m,y){var w=d.indexOf(m);d.splice(w,1),y.forEach(function(L,R){d.splice(w+R,0,L)})},v=function(d,m,y,w){var L=m.href,R;return L=t.unquoteString(L),R=i.joinUrl(w.baseUrl,L),y.indexOf(R)>=0?(O(d,m,[]),Promise.resolve([])):(y.push(R),i.ajax(L,w).then(function(D){var E=t.rulesForCssText(D);return e.loadCSSImportsForRules(E,y,w).then(function(S){return e.adjustPathsOfCssResources(L,E),O(d,m,E),S.errors})},function(D){throw{resourceType:"stylesheet",url:D.url,msg:"Unable to load stylesheet "+D.url}}))};e.loadCSSImportsForRules=function(d,m,y){var w=b(d),L=[],R=!1;return Promise.all(w.map(function(D){return v(d,D,m,y).then(function(E){L=L.concat(E),R=!0},function(E){L.push(E)})})).then(function(){return{hasChanges:R,errors:L}})};var x=function(d,m){var y=n.parse(d),w=_(y),L=!1;return i.collectAndReportErrors(w.map(function(R){var D=y[R].url;return i.getDataURIForImageURL(D,m).then(function(E){y[R].url=E,L=!0},function(E){throw{resourceType:"backgroundImage",url:E.url,msg:"Unable to load background-image "+E.url}})})).then(function(R){return{backgroundValue:n.serialize(y),hasChanges:L,errors:R}})},g=function(d,m){var y=u(d),w=c(y),L=[],R=!1;return Promise.all(w.map(function(D){return x(D.value,m).then(function(E){E.hasChanges&&(l(D.rule,D.property,E.backgroundValue),R=!0),L=L.concat(E.errors)})})).then(function(){return{hasChanges:R,errors:L}})},p=function(d,m){var y=!1,w,L;try{w=a.parse(d)}catch{w=[]}return L=k(w),i.collectAndReportErrors(L.map(function(R){var D=w[R],E=D.format||"woff";return i.binaryAjax(D.url,m).then(function(S){var A=btoa(S);D.url="data:font/"+E+";base64,"+A,y=!0},function(S){throw{resourceType:"fontFace",url:S.url,msg:"Unable to load font-face "+S.url}})})).then(function(R){return{srcDeclarationValue:a.serialize(w),hasChanges:y,errors:R}})},P=function(d,m){var y=h(d),w=[],L=!1;return Promise.all(y.map(function(R){var D=R.style.getPropertyValue("src");return p(D,m).then(function(E){E.hasChanges&&(t.changeFontFaceRuleSrc(d,R,E.srcDeclarationValue),L=!0),w=w.concat(E.errors)})})).then(function(){return{hasChanges:L,errors:w}})};e.loadAndInlineCSSResourcesForRules=function(d,m){var y=!1,w=[];return Promise.all([g,P].map(function(L){return L(d,m).then(function(R){y=y||R.hasChanges,w=w.concat(R.errors)})})).then(function(){return{hasChanges:y,errors:w}})}}(B1)),B1}var db;function LO(){return db||(db=1,function(e){var i=qp(),t=kO(),n=TO(),a=MO(),l=_v(),u=function(p){return i.joinUrl(p,".")},c=function(p){var P=p.map(function(d,m){return m===p.length-1&&(d={baseUrl:u(d.baseUrl)}),JSON.stringify(d)});return P},h=function(p,P){return P.cache!==!1&&P.cache!=="none"&&P.cacheBucket?i.memoize(p,c,P.cacheBucket):p},b=function(p,P,d){var m=l.rulesForCssText(p);return a.loadCSSImportsForRules(m,P,d).then(function(y){return a.loadAndInlineCSSResourcesForRules(m,d).then(function(w){var L=y.errors.concat(w.errors),R=y.hasChanges||w.hasChanges;return R&&(p=l.cssRulesToText(m)),{hasChanges:R,content:p,errors:L}})})},_=function(p,P,d){var m=p.textContent,y=h(b,P);return y(m,d,P).then(function(w){return w.hasChanges&&(p.childNodes[0].nodeValue=w.content),i.cloneArray(w.errors)})},k=function(p){var P=p.getElementsByTagName("style");return Array.prototype.filter.call(P,function(d){return!d.attributes.type||d.attributes.type.value==="text/css"})};e.loadAndInlineStyles=function(p,P){var d=k(p),m=[],y=[],w;return w=i.clone(P),w.baseUrl=w.baseUrl||i.getDocumentBaseUrl(p),Promise.all(d.map(function(L){return _(L,w,y).then(function(R){m=m.concat(R)})})).then(function(){return m})};var O=function(p,P){var d=p.parentNode,m;P=P.trim(),P&&(m=p.ownerDocument.createElement("style"),m.type="text/css",m.appendChild(p.ownerDocument.createTextNode(P)),d.insertBefore(m,p)),d.removeChild(p)},v=function(p,P){return i.ajax(p,P).then(function(d){var m=l.rulesForCssText(d);return{content:d,cssRules:m}}).then(function(d){var m=a.adjustPathsOfCssResources(p,d.cssRules);return{content:d.content,cssRules:d.cssRules,hasChanges:m}}).then(function(d){return a.loadCSSImportsForRules(d.cssRules,[],P).then(function(m){return{content:d.content,cssRules:d.cssRules,hasChanges:d.hasChanges||m.hasChanges,errors:m.errors}})}).then(function(d){return a.loadAndInlineCSSResourcesForRules(d.cssRules,P).then(function(m){return{content:d.content,cssRules:d.cssRules,hasChanges:d.hasChanges||m.hasChanges,errors:d.errors.concat(m.errors)}})}).then(function(d){var m=d.content;return d.hasChanges&&(m=l.cssRulesToText(d.cssRules)),{content:m,errors:d.errors}})},x=function(p,P){var d=p.attributes.href.value,m=i.getDocumentBaseUrl(p.ownerDocument),y=i.clone(P);!y.baseUrl&&m&&(y.baseUrl=m);var w=h(v,P);return w(d,y).then(function(L){return{content:L.content,errors:i.cloneArray(L.errors)}})},g=function(p){var P=p.getElementsByTagName("link");return Array.prototype.filter.call(P,function(d){return d.attributes.rel&&d.attributes.rel.value==="stylesheet"&&(!d.attributes.type||d.attributes.type.value==="text/css")})};e.loadAndInlineCssLinks=function(p,P){var d=g(p),m=[];return Promise.all(d.map(function(y){return x(y,P).then(function(w){O(y,w.content+`
|
|
156
|
-
`),m=m.concat(w.errors)},function(w){m.push({resourceType:"stylesheet",url:w.url,msg:"Unable to load stylesheet "+w.url})})})).then(function(){return m})},e.loadAndInlineImages=t.inline,e.loadAndInlineScript=n.inline,e.inlineReferences=function(p,P){var d=[],m=[e.loadAndInlineImages,e.loadAndInlineStyles,e.loadAndInlineCssLinks];return P.inlineScripts!==!1&&m.push(e.loadAndInlineScript),Promise.all(m.map(function(y){return y(p,P).then(function(w){d=d.concat(w)})})).then(function(){return d})}}(D1)),D1}/*! rasterizeHTML.js - v1.3.1 - 2022-01-16
|
|
157
|
-
* http://www.github.com/cburgmer/rasterizeHTML.js
|
|
158
|
-
* Copyright (c) 2022 Christoph Burgmer; Licensed MIT */var NO=op.exports,hb;function IO(){return hb||(hb=1,function(e){(function(i,t){i===void 0&&window!==void 0&&(i=window),e.exports?e.exports=t(B4(),PO(),CO(),LO()):i.rasterizeHTML=t(i.url,i.xmlserializer,i.sanedomparsererror,i.inlineresources)})(NO,function(i,t,n,a){var l=function(x){var g={},p=[];g.joinUrl=function(m,y){return m?x.resolve(m,y):y},g.getConstantUniqueIdFor=function(m){return p.indexOf(m)<0&&p.push(m),p.indexOf(m)},g.clone=function(m){var y={},w;for(w in m)m.hasOwnProperty(w)&&(y[w]=m[w]);return y};var P=function(m){return typeof m=="object"&&m!==null},d=function(m){return P(m)&&Object.prototype.toString.apply(m).match(/\[object (Canvas|HTMLCanvasElement)\]/i)};return g.parseOptionalParameters=function(m){var y={canvas:null,options:{}};return m[0]==null||d(m[0])?(y.canvas=m[0]||null,y.options=g.clone(m[1])):y.options=g.clone(m[0]),y},g}(i),u=function(x){var g={},p=function(P,d,m){var y=P[d];return P[d]=function(){var w=Array.prototype.slice.call(arguments);return m.apply(this,[w,y])},y};return g.baseUrlRespectingXhr=function(P,d){var m=function(){var y=new P;return p(y,"open",function(w,L){var R=w.shift(),D=w.shift(),E=x.joinUrl(d,D);return L.apply(this,[R,E].concat(w))}),y};return m},g.finishNotifyingXhr=function(P){var d=0,m=0,y=!1,w,L=new Promise(function(D){w=function(){var E=d-m;E<=0&&y&&D({totalCount:d})}}),R=function(){var D=new P;return p(D,"send",function(E,S){return d+=1,S.apply(this,arguments)}),D.addEventListener("load",function(){m+=1,w()}),D};return R.waitForRequestsToFinish=function(){return y=!0,w(),L},R},g}(l),c=function(){var x={},g=function(R){return Array.prototype.slice.call(R)};x.addClassName=function(R,D){R.className+=" "+D},x.addClassNameRecursively=function(R,D){x.addClassName(R,D),R.parentNode!==R.ownerDocument&&x.addClassNameRecursively(R.parentNode,D)};var p=function(R,D){var E=R.parentStyleSheet,S=g(E.cssRules).indexOf(R);E.insertRule(D,S+1),E.deleteRule(S)},P=function(R,D){var E=R.cssText.replace(/^[^\{]+/,""),S=D+" "+E;p(R,S)},d=function(R){return g(R).reduce(function(D,E){return D+E.cssText},"")},m=function(R){R.textContent=d(R.sheet.cssRules)},y=function(R){var D=document.implementation.createHTMLDocument(""),E=document.createElement("style");E.textContent=R.textContent,D.body.appendChild(E),R.sheet=E.sheet},w=function(R){return"((?:^|[^.#:\\w])|(?=\\W))("+R.join("|")+")(?=\\W|$)"},L=function(R,D,E){var S=w(D);g(R.querySelectorAll("style")).forEach(function(A){typeof A.sheet>"u"&&y(A);var M=g(A.sheet.cssRules).filter(function(T){return T.selectorText&&new RegExp(S,"i").test(T.selectorText)});M.length&&(M.forEach(function(T){var B=T.selectorText.replace(new RegExp(S,"gi"),function(U,Q,X){return Q+E(X)});B!==T.selectorText&&P(T,B)}),m(A))})};return x.rewriteCssSelectorWith=function(R,D,E){L(R,[D],function(){return E})},x.lowercaseCssTypeSelectors=function(R,D){L(R,D,function(E){return E.toLowerCase()})},x.findHtmlOnlyNodeNames=function(R){var D=R.ownerDocument.createTreeWalker(R,NodeFilter.SHOW_ELEMENT),E={},S={},A;do A=D.currentNode.tagName.toLowerCase(),D.currentNode.namespaceURI==="http://www.w3.org/1999/xhtml"?E[A]=!0:S[A]=!0;while(D.nextNode());return Object.keys(E).filter(function(M){return!S[M]})},x}(),h=function(x){var g={},p=function(d){return Array.prototype.slice.call(d)},P={active:!0,hover:!0,focus:!1,target:!1};return g.fakeUserAction=function(d,m,y){var w=d.querySelector(m),L=":"+y,R="rasterizehtml"+y;w&&(P[y]?x.addClassNameRecursively(w,R):x.addClassName(w,R),x.rewriteCssSelectorWith(d,L,"."+R))},g.persistInputValues=function(d){var m=d.querySelectorAll("input"),y=d.querySelectorAll("textarea"),w=function(L){return L.type==="checkbox"||L.type==="radio"};p(m).filter(w).forEach(function(L){L.checked?L.setAttribute("checked",""):L.removeAttribute("checked")}),p(m).filter(function(L){return!w(L)}).forEach(function(L){L.setAttribute("value",L.value)}),p(y).forEach(function(L){L.textContent=L.value})},g.rewriteTagNameSelectorsToLowerCase=function(d){x.lowercaseCssTypeSelectors(d,x.findHtmlOnlyNodeNames(d))},g}(c),b=function(x,g,p,P){var d={},m=function(X,$,j,I){var z=X.createElement($);return z.style.visibility="hidden",z.style.width=j+"px",z.style.height=I+"px",z.style.position="absolute",z.style.top=-1e4-I+"px",z.style.left=-1e4-j+"px",X.getElementsByTagName("body")[0].appendChild(z),z},y=function(X){return X>0?new Promise(function($){setTimeout($,X)}):Promise.resolve()};d.executeJavascript=function(X,$){return new Promise(function(j){var I=m(P.document,"iframe",$.width,$.height),z=X.outerHTML,H=[],K=$.executeJsTimeout||0,ee=function(){P.document.getElementsByTagName("body")[0].removeChild(I)},V=function(){var re=I.contentDocument;j({document:re,errors:H,cleanUp:ee})},Z=I.contentWindow.XMLHttpRequest,Y=g.finishNotifyingXhr(Z),ne=g.baseUrlRespectingXhr(Y,$.baseUrl);I.onload=function(){y(K).then(Y.waitForRequestsToFinish).then(V)},I.contentDocument.open(),I.contentWindow.XMLHttpRequest=ne,I.contentWindow.onerror=function(re){H.push({resourceType:"scriptExecution",msg:re})},I.contentDocument.write("<!DOCTYPE html>"),I.contentDocument.write(z),I.contentDocument.close()})};var w=function(X,$,j){var I=X.createElement("iframe");return I.style.width=$+"px",I.style.height=j+"px",I.style.visibility="hidden",I.style.position="absolute",I.style.top=-1e4-j+"px",I.style.left=-1e4-$+"px",I.style.borderWidth=0,I.sandbox="allow-same-origin",I.scrolling="no",I},L=function(X,$,j){var I=Math.floor(X/j),z=Math.floor($/j);return w(P.document,I,z)},R=function(X,$,j,I){return{width:Math.max(X.width*I,$),height:Math.max(X.height*I,j)}},D=function(X,$){var j=X.querySelector($);if(j)return j;if(X.ownerDocument.querySelector($)===X)return X;throw{message:"Clipping selector not found"}},E=function(X,$,j,I,z){var H=Math.max(X.scrollWidth,X.clientWidth),K=Math.max(X.scrollHeight,X.clientHeight),ee,V,Z,Y,ne,re,ie,ae;return $?(re=D(X,$),ie=re.getBoundingClientRect(),ee=ie.top,V=ie.left,Z=ie.width,Y=ie.height):(ee=0,V=0,Z=H,Y=K),ae=R({width:Z,height:Y},j,I,z),ne=P.getComputedStyle(X.ownerDocument.documentElement).fontSize,{left:V,top:ee,width:ae.width,height:ae.height,viewportWidth:H,viewportHeight:K,rootFontSize:ne}},S=function(X,$){var j=X.tagName;return $.querySelector(j)},A=function(X){var $=X.tagName.toLowerCase();return $==="html"||$==="body"?X.outerHTML:'<body style="margin: 0;">'+X.outerHTML+"</body>"};d.calculateDocumentContentSize=function(X,$){return new Promise(function(j,I){var z=$.zoom||1,H;H=L($.width,$.height,z),P.document.getElementsByTagName("body")[0].appendChild(H),H.onload=function(){var K=H.contentDocument,ee;try{ee=E(S(X,K),$.clip,$.width,$.height,z),j(ee)}catch(V){I(V)}finally{P.document.getElementsByTagName("body")[0].removeChild(H)}},H.contentDocument.open(),H.contentDocument.write("<!DOCTYPE html>"),H.contentDocument.write(A(X)),H.contentDocument.close()})},d.parseHtmlFragment=function(X){var $=P.document.implementation.createHTMLDocument("");$.documentElement.innerHTML=X;var j=$.querySelector("body").firstChild;if(!j)throw"Invalid source";return j};var M=function(X,$){var j=/<html((?:\s+[^>]*)?)>/im.exec($),I=P.document.implementation.createHTMLDocument(""),z,H,K,ee;if(j)for(z="<div"+j[1]+"></div>",I.documentElement.innerHTML=z,K=I.querySelector("div"),H=0;H<K.attributes.length;H++)ee=K.attributes[H],X.documentElement.setAttribute(ee.name,ee.value)};d.parseHTML=function(X){var $=P.document.implementation.createHTMLDocument("");return $.documentElement.innerHTML=X,M($,X),$};var T=function(X){try{return p.failOnParseError(X)}catch($){throw{message:"Invalid source",originalError:$}}};d.validateXHTML=function(X){var $=new DOMParser,j=$.parseFromString(X,"application/xml");T(j)};var B=null,U=function(X,$){return $==="none"||$==="repeated"?((B===null||$!=="repeated")&&(B=Date.now()),X+"?_="+B):X},Q=function(X,$){return new Promise(function(j,I){var z=new window.XMLHttpRequest,H=x.joinUrl($.baseUrl,X),K=U(H,$.cache),ee=function(V){I({message:"Unable to load page",originalError:V})};z.addEventListener("load",function(){z.status===200||z.status===0?j(z.responseXML):ee(z.statusText)},!1),z.addEventListener("error",function(V){ee(V)},!1);try{z.open("GET",K,!0),z.responseType="document",z.send(null)}catch(V){ee(V)}})};return d.loadDocument=function(X,$){return Q(X,$).then(function(j){return T(j)})},d}(l,u,n,window),_=function(x){var g={},p=function(S,A){return A?URL.createObjectURL(new Blob([S],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(S)},P=function(S){S instanceof Blob&&URL.revokeObjectURL(S)},d='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',m=function(S){return new Promise(function(A,M){var T=document.createElement("canvas"),B=new Image;B.onload=function(){var U=T.getContext("2d");try{U.drawImage(B,0,0),T.toDataURL("image/png"),A(!0)}catch{A(!1)}},B.onerror=M,B.src=S})},y=function(){var S=p(d,!0);return m(S).then(function(A){return P(S),A?!1:m(p(d,!1)).then(function(M){return M})},function(){return!1})},w=function(){if(x.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch{}return!1},L=function(){return new Promise(function(S,A){w()&&x.URL?y().then(function(M){S(!M)},function(){A()}):S(!1)})},R,D=function(){return R===void 0&&(R=L()),R},E=function(S){return D().then(function(A){return p(S,A)})};return g.renderSvg=function(S){return new Promise(function(A,M){var T,B,U=function(){B.onload=null,B.onerror=null},Q=function(){T&&P(T)};B=new Image,B.onload=function(){U(),Q(),A(B)},B.onerror=function(){Q(),M()},E(S).then(function(X){T=X,B.src=T},M)})},g}(window),k=function(x,g,p,P){var d={},m=function(S,A){var M=A||1,T={width:S.width,height:S.height,"font-size":S.rootFontSize};return M!==1&&(T.style="transform:scale("+M+"); transform-origin: 0 0;"),T},y=function(S){var A,M,T,B;A=Math.round(S.viewportWidth),M=Math.round(S.viewportHeight),T=-S.left,B=-S.top;var U={x:T,y:B,width:A,height:M};return U},w=function(S){var A=S.style||"";S.style=A+"float: left;"},L=function(S){S.externalResourcesRequired=!0},R=function(){return'<style scoped="">html::-webkit-scrollbar { display: none; }</style>'},D=function(S){var A=Object.keys(S);return A.length?" "+A.map(function(M){return M+'="'+S[M]+'"'}).join(" "):""},E=function(S,A,M){var T=P.serializeToString(S);g.validateXHTML(T);var B=y(A);return w(B),L(B),'<svg xmlns="http://www.w3.org/2000/svg"'+D(m(A,M))+">"+R()+"<foreignObject"+D(B)+">"+T+"</foreignObject></svg>"};return d.getSvgForDocument=function(S,A,M){return p.rewriteTagNameSelectorsToLowerCase(S),E(S,A,M)},d.drawDocumentAsSvg=function(S,A){return["hover","active","focus","target"].forEach(function(M){A[M]&&p.fakeUserAction(S,A[M],M)}),g.calculateDocumentContentSize(S,A).then(function(M){return d.getSvgForDocument(S,M,A.zoom)})},d}(l,b,h,t),O=function(x,g,p,P,d,m){var y={},w=function(S){return{message:"Error rendering page",originalError:S}},L=function(S){return d.renderSvg(S).then(function(A){return{image:A,svg:S}},function(A){throw w(A)})},R=function(S,A){try{A.getContext("2d").drawImage(S,0,0)}catch(M){throw w(M)}},D=function(S,A,M){return P.drawDocumentAsSvg(S,M).then(L).then(function(T){return A&&R(T.image,A),T})},E=function(S,A){return g.executeJavascript(S,A).then(function(M){var T=M.document;return p.persistInputValues(T),{document:T,errors:M.errors,cleanUp:M.cleanUp}})};return y.rasterize=function(S,A,M){var T;return T=x.clone(M),T.inlineScripts=M.executeJs===!0,m.inlineReferences(S,T).then(function(B){return M.executeJs?E(S,M).then(function(U){return{element:U.document.documentElement,errors:B.concat(U.errors),cleanUp:U.cleanUp}}):{element:S,errors:B,cleanUp:function(){}}}).then(function(B){return D(B.element,A,M).then(function(U){return B.cleanUp(),{image:U.image,svg:U.svg,errors:B.errors}})})},y}(l,b,h,k,_,a),v=function(x,g,p){var P={},d=function(R,D){var E=300,S=200,A=R?R.width:E,M=R?R.height:S,T=D.width!==void 0?D.width:A,B=D.height!==void 0?D.height:M;return{width:T,height:B}},m=function(R){var D=d(R.canvas,R.options),E;return E=x.clone(R.options),E.width=D.width,E.height=D.height,E};P.drawDocument=function(){var R=arguments[0],D=Array.prototype.slice.call(arguments,1),E=x.parseOptionalParameters(D),S=R.documentElement?R.documentElement:R;return p.rasterize(S,E.canvas,m(E))};var y=function(R,D,E){var S=g.parseHTML(R);return P.drawDocument(S,D,E)};P.drawHTML=function(){var R=arguments[0],D=Array.prototype.slice.call(arguments,1),E=x.parseOptionalParameters(D);return y(R,E.canvas,E.options)};var w=function(R,D,E){var S=document.implementation.createHTMLDocument("");S.replaceChild(R.documentElement,S.documentElement);var A=E?x.clone(E):{};return E.baseUrl||(A.baseUrl=D),{document:S,options:A}},L=function(R,D,E){return g.loadDocument(R,E).then(function(S){var A=w(S,R,E);return P.drawDocument(A.document,D,A.options)})};return P.drawURL=function(){var R=arguments[0],D=Array.prototype.slice.call(arguments,1),E=x.parseOptionalParameters(D);return L(R,E.canvas,E.options)},P}(l,b,O);return v})}(op)),op.exports}var pb;function U4(){return pb||(pb=1,function(e){var i=Va&&Va.__createBinding||(Object.create?function(y,w,L,R){R===void 0&&(R=L);var D=Object.getOwnPropertyDescriptor(w,L);D&&!("get"in D?!w.__esModule:D.writable||D.configurable)||(D={enumerable:!0,get:function(){return w[L]}}),Object.defineProperty(y,R,D)}:function(y,w,L,R){R===void 0&&(R=L),y[R]=w[L]}),t=Va&&Va.__setModuleDefault||(Object.create?function(y,w){Object.defineProperty(y,"default",{enumerable:!0,value:w})}:function(y,w){y.default=w}),n=Va&&Va.__importStar||function(){var y=function(w){return y=Object.getOwnPropertyNames||function(L){var R=[];for(var D in L)Object.prototype.hasOwnProperty.call(L,D)&&(R[R.length]=D);return R},y(w)};return function(w){if(w&&w.__esModule)return w;var L={};if(w!=null)for(var R=y(w),D=0;D<R.length;D++)R[D]!=="default"&&i(L,w,R[D]);return t(L,w),L}}();Object.defineProperty(e,"__esModule",{value:!0}),e.prerenderFont=e.resetStyleContent=void 0,e.isContentWrapping=v,e.detectSize=x,e.htmlToCanvas=m;const a=n(IO()),l=zd(),u=I4();e.resetStyleContent=`
|
|
159
|
-
p {
|
|
160
|
-
margin: 0;
|
|
161
|
-
padding: 0;
|
|
162
|
-
word-wrap: break-word; /* Required for Firefox */
|
|
163
|
-
/* a text may have several spaces, we need to preserve them */
|
|
164
|
-
white-space: pre-wrap;
|
|
165
|
-
}
|
|
166
|
-
ul, ol {
|
|
167
|
-
list-style-position: outside;
|
|
168
|
-
margin: 0;
|
|
169
|
-
padding: 0;
|
|
170
|
-
display: inline-block;
|
|
171
|
-
text-align: left;
|
|
172
|
-
width: 100%;
|
|
173
|
-
/*
|
|
174
|
-
* somehow display: inline-block is removing text-decoration
|
|
175
|
-
* let's try to restore it that way
|
|
176
|
-
*/
|
|
177
|
-
text-decoration: inherit;
|
|
178
|
-
}
|
|
179
|
-
li {
|
|
180
|
-
margin-left: 1.7em;
|
|
181
|
-
padding-left: 0.5em; /* This should match the margin-left value */
|
|
182
|
-
}
|
|
183
|
-
/* Add resets */
|
|
184
|
-
ul {
|
|
185
|
-
list-style-type: disc;
|
|
186
|
-
}
|
|
187
|
-
ol {
|
|
188
|
-
list-style-type: decimal;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
`;const c=`
|
|
192
|
-
<style>
|
|
193
|
-
html, body {
|
|
194
|
-
padding: 0;
|
|
195
|
-
margin: 0;
|
|
196
|
-
}
|
|
197
|
-
${e.resetStyleContent}
|
|
198
|
-
</style>
|
|
199
|
-
`;let h;const b=()=>(h||(h=document.createElement("div"),h.id="polotno-hidden-do-not-touch",h.style.overflow="hidden",h.style.position="relative",document.body.appendChild(h),h.innerHTML=`<style>#polotno-hidden-do-not-touch {${e.resetStyleContent}}</style>`),h),_=new Map,k=navigator.userAgent.includes("Firefox"),O=async y=>{if(_.has(y))return _.get(y);const w=(async()=>{const L=`<div style="font-family: ${y}; font-size: 100px;">${y}<strong>${y}</strong></div>`,R=document.createElement("div");R.innerHTML=L,R.style.visibility="hidden",R.style.position="absolute";const D=b();D.appendChild(R);const E=k?180:50;await new Promise(S=>setTimeout(S,E)),D.removeChild(R)})();return _.set(y,w),w};function v({html:y}){const w=document.createElement("div");w.innerHTML=y,w.style.display="inline-block",w.style.position="fixed",w.style.top="0px",w.style.left="0px",w.style.zIndex="1000",w.style.whiteSpace="nowrap",w.style.visibility="hidden";const L=b();L.appendChild(w);const R=w.textContent,D=w.childNodes[0],E=R.split(/\s+/);let S=!1;for(let A=0;A<E.length;A++){const M=E[A];if(D.textContent=M,S=D.scrollWidth>w.clientWidth,S)break}return L.removeChild(w),S}function x(y){y.indexOf("Avellino");const w=document.createElement("div");w.innerHTML=y,w.style.display="inline-block",w.style.position="fixed",w.style.top="0px",w.style.left="0px",w.style.zIndex="1000";const L=b();L.appendChild(w);const R=w.getBoundingClientRect();return L.removeChild(w),{width:R.width,height:R.height}}e.prerenderFont=O;const g={};function p(y){const w=[];for(const L of document.styleSheets)try{for(const R of L.cssRules)R instanceof CSSFontFaceRule&&R.style.fontFamily.replace(/['"]/g,"")===y&&w.push(R)}catch(R){console.warn(`Could not access stylesheet: ${L.href}`,R)}return w}const P={},d=y=>{if(P[y])return P[y];const w=p(y).filter(L=>L.style.fontFamily.replace(/['"]/g,"")===y).map(L=>({src:L.style.src,fontStyle:L.style.fontStyle||"normal",fontWeight:L.style.fontWeight||"normal"}));return P[y]=w,w};async function m({html:y,width:w,height:L,fontFamily:R,padding:D,font:E,pixelRatio:S}){if(R!=="Arial"&&!E){const B=(0,l.getGoogleFontsVariants)();y+=`<link type="text/css" href="https://fonts.googleapis.com/css?family=${R}:${B}" rel="stylesheet">`}if(E){const B=E.styles||(E.url?[{src:`url("${E.url}")`}]:d(R));y+="<style>",B.forEach(U=>{y+=`
|
|
200
|
-
@font-face {
|
|
201
|
-
font-family: '${R}';
|
|
202
|
-
src: ${U.src};
|
|
203
|
-
font-style: ${U.fontStyle||"normal"};
|
|
204
|
-
font-weight: ${U.fontWeight||"normal"};
|
|
205
|
-
}
|
|
206
|
-
`}),y+="</style>"}y+=c;const A=document.createElement("canvas"),M=await a.drawHTML(`<div style="padding: ${D}px;">${y}</div>`,A,{width:w+2*D,height:L+2*D,cacheBucket:g});(0,u.trySetCanvasSize)(A,(w+2*D)*S,(L+2*D)*S);const T=A.getContext("2d");return T==null||T.drawImage(M.image,0,0,A.width,A.height),A}}(Va)),Va}var Zu={},G1={},gb;function q4(){return gb||(gb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.keyframes=e.glob=e.extractCss=void 0,e.css=k,e.setup=P,e.styled=d;let i={data:""},t=m=>typeof window=="object"?((m?m.querySelector("#_goober"):window._goober)||Object.assign((m||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:m||i,n=m=>{let y=t(m),w=y.data;return y.data="",w},a=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l=/\/\*[^]*?\*\/|\s\s+|\n/g,u=(m,y)=>{let w="",L="",R="";for(let D in m){let E=m[D];D[0]=="@"?D[1]=="i"?w=D+" "+E+";":L+=D[1]=="f"?u(E,D):D+"{"+u(E,D[1]=="k"?"":y)+"}":typeof E=="object"?L+=u(E,y?y.replace(/([^,])+/g,S=>D.replace(/(^:.*)|([^,])+/g,A=>/&/.test(A)?A.replace(/&/g,S):S?S+" "+A:A)):D):E!=null&&(D=D.replace(/[A-Z]/g,"-$&").toLowerCase(),R+=u.p?u.p(D,E):D+":"+E+";")}return w+(y&&R?y+"{"+R+"}":R)+L},c={},h=m=>{if(typeof m=="object"){let y="";for(let w in m)y+=w+h(m[w]);return y}return m},b=(m,y,w,L,R)=>{let D=h(m),E=c[D]||(c[D]=(S=>{let A=0,M=11;for(;A<S.length;)M=101*M+S.charCodeAt(A++)>>>0;return"go"+M})(D));if(!c[E]){let S=D!==m?m:(A=>{let M,T=[{}];for(;M=a.exec(A.replace(l,""));)M[4]?T.shift():M[3]?T.unshift(T[0][M[3]]=T[0][M[3]]||{}):T[0][M[1]]=M[2];return T[0]})(m);c[E]=u(R?{["@keyframes "+E]:S}:S,w?"":"."+E)}return((S,A,M)=>{A.data.indexOf(S)==-1&&(A.data=M?S+A.data:A.data+S)})(c[E],y,L),E},_=(m,y,w)=>m.reduce((L,R,D)=>{let E=y[D];if(E&&E.call){let S=E(w),A=S&&S.props&&S.props.className||/^go/.test(S)&&S;E=A?"."+A:S&&typeof S=="object"?S.props?"":u(S,""):S===!1?"":S}return L+R+(E??"")},"");function k(m){let y=this||{},w=m.call?m(y.p):m;return b(w.unshift?w.raw?_(w,[].slice.call(arguments,1),y.p):w.reduce((L,R)=>Object.assign(L,R&&R.call?R(y.p):R),{}):w,t(y.target),y.g,y.o,y.k)}e.extractCss=n;let O,v,x,g=k.bind({g:1}),p=k.bind({k:1});function P(m,y,w,L){u.p=y,O=m,v=w,x=L}function d(m,y){let w=this||{};return function(){let L=arguments;function R(D,E){let S=Object.assign({},D),A=S.className||R.className;w.p=Object.assign({theme:v&&v()},S),w.o=/ *go\d+/.test(A),S.className=k.apply(w,L)+(A?" "+A:""),y&&(S.ref=E);let M=m;return m[0]&&(M=S.as||m,delete S.as),x&&M[0]&&x(S),O(M,S)}return y?y(R):R}}e.glob=g,e.keyframes=p}(G1)),G1}var vb;function DO(){if(vb)return Zu;vb=1;var e=Zu&&Zu.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Zu,"__esModule",{value:!0});const i=e(Tn()),t=q4();return(0,t.setup)(i.default.createElement),Zu.default=t.styled,Zu}var mb;function jO(){return mb||(mb=1,function(e){var i=So&&So.__createBinding||(Object.create?function(j,I,z,H){H===void 0&&(H=z);var K=Object.getOwnPropertyDescriptor(I,z);K&&!("get"in K?!I.__esModule:K.writable||K.configurable)||(K={enumerable:!0,get:function(){return I[z]}}),Object.defineProperty(j,H,K)}:function(j,I,z,H){H===void 0&&(H=z),j[H]=I[z]}),t=So&&So.__setModuleDefault||(Object.create?function(j,I){Object.defineProperty(j,"default",{enumerable:!0,value:I})}:function(j,I){j.default=I}),n=So&&So.__importStar||function(){var j=function(I){return j=Object.getOwnPropertyNames||function(z){var H=[];for(var K in z)Object.prototype.hasOwnProperty.call(z,K)&&(H[H.length]=K);return H},j(I)};return function(I){if(I&&I.__esModule)return I;var z={};if(I!=null)for(var H=j(I),K=0;K<H.length;K++)H[K]!=="default"&&i(z,I,H[K]);return t(z,I),z}}(),a=So&&So.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLElement=e.setQuillContent=e.createQuill=e.quillRef=void 0;const l=a(Tn()),u=Qi,c=Ja,h=a(JE()),b=a(Ji()),_=n(da),k=ts(),O=Fp(),v=L4(),x=jp(),g=U4(),p=yc(),P=bc(),d=Fd,m=a(DO()),y=Ks(),w=L5(),L=n(zd()),R=Xs(),D=M4();e.quillRef=_.observable({enabled:!1,currentFormat:{},editor:_.observable.object({instance:null},{},{deep:!1})});const E=(0,m.default)("div",l.default.forwardRef)`
|
|
207
|
-
.ql-editor {
|
|
208
|
-
outline: none;
|
|
209
|
-
}
|
|
210
|
-
${g.resetStyleContent}
|
|
211
|
-
strong {
|
|
212
|
-
font-weight: 700;
|
|
213
|
-
}
|
|
214
|
-
.ql-direction-rtl {
|
|
215
|
-
direction: rtl;
|
|
216
|
-
}
|
|
217
|
-
`,S=j=>new h.default(j,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1},formats:["bold","color","font","italic","size","strike","underline","indent","list","direction"]});e.createQuill=S;const A=(j,I)=>{var z=j.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+I+"<p><br></p></div>");j.setContents(z),j.history.clear()};e.setQuillContent=A;const M=({html:j,onBlur:I,onChange:z,element:H})=>{const K=l.default.useRef(null);l.default.useEffect(()=>{if(!K.current)return;const V=(0,e.createQuill)(K.current);return _.runInAction(()=>{e.quillRef.editor.instance=V}),window.__polotnoQuill=V,V.on("text-change",()=>{V.getSelection()&&_.runInAction(()=>{e.quillRef.currentFormat=V.getFormat()}),setTimeout(()=>{var Z;const Y=(Z=K.current)===null||Z===void 0?void 0:Z.childNodes[0];z(Y.innerHTML)},10)}),V.setSelection(0,0,"api"),V.on("selection-change",Z=>{Z||I(),Z&&_.runInAction(()=>{e.quillRef.currentFormat=V.getFormat()})}),K.current.childNodes[0].addEventListener("blur",Z=>{var Y;!((Y=Z.relatedTarget)===null||Y===void 0)&&Y.classList.contains("ql-clipboard")||I()}),()=>{_.runInAction(()=>{e.quillRef.editor.instance=null,e.quillRef.currentFormat={}}),delete window.__polotnoQuill}},[]),l.default.useEffect(()=>{var V;const Z=e.quillRef.editor.instance;if(!Z)return;const Y=Z.getSelection();((V=K.current)===null||V===void 0?void 0:V.childNodes[0].innerHTML)===H.text||((0,e.setQuillContent)(Z,j),Y&&(Z.setSelection(Y.index,Y.length),_.runInAction(()=>{e.quillRef.currentFormat=Z.getFormat()})))},[H.text]);const ee={color:H.fill};return H.fill.indexOf("gradient")>=0&&(ee.backgroundColor=H.fill,ee.backgroundImage=H.fill,ee.backgroundSize="100% 100%",ee.backgroundRepeat="repeat",ee.webkitBackgroundClip="text",ee.MozBackgroundClip="text",ee.WebkitTextFillColor="transparent",ee.MozTextFillColor="transparent"),l.default.createElement(E,{ref:K,style:Object.assign(Object.assign({},ee),{fontSize:H.fontSize,width:H.a.width,fontFamily:H.fontFamily,lineHeight:H.lineHeight,letterSpacing:H.letterSpacing+"rem",textAlign:H.align}),dir:(0,v.getDir)((0,w.removeTags)(H.text))})};function T(j,I,z){return l.default.useMemo(()=>(0,g.detectSize)(j),[j,I.width,z])}function B(j){const I=j.getContext("2d").getImageData(0,0,j.width,j.height).data;for(let z=0;z<I.length;z+=4)if(I[z+3]!==0)return!0;return!1}function U(j){return!B(j)}function Q(j,{fontFamily:I="",color:z="black"}={}){let H=`color: ${z||j.fill}`;return j.fill.indexOf("gradient")>=0&&(H=`
|
|
218
|
-
background-color: ${z};
|
|
219
|
-
background-image: ${j.fill};
|
|
220
|
-
background-size: 100% 100%;
|
|
221
|
-
background-repeat: repeat;
|
|
222
|
-
-webkit-background-clip: text;
|
|
223
|
-
-moz-background-clip: text;
|
|
224
|
-
-webkit-text-fill-color: transparent;
|
|
225
|
-
-moz-text-fill-color: transparent;
|
|
226
|
-
`),`<div style="${["white-space: pre-wrap",`width: ${Math.round(j.width||100)}px`,H,`font-size: ${j.fontSize}px`,`font-family: '${I}'`,`text-align: ${j.align}`,j.textDecoration?`text-decoration: ${j.textDecoration}`:"",j.lineHeight?`line-height: ${j.lineHeight}`:"",j.letterSpacing?`letter-spacing: ${j.letterSpacing}rem`:"",j.fontStyle?`font-style: ${j.fontStyle}`:"",j.fontWeight?`font-weight: ${j.fontWeight}`:"",j.strokeWidth?`-webkit-text-stroke: ${j.strokeWidth}px ${j.stroke}`:"",j.strokeWidth?"paint-order: stroke fill":""].filter(Boolean).join("; ")}" contentEditable dir="${(0,v.getDir)((0,w.removeTags)(j.text))}">${j.text.replaceAll(`
|
|
227
|
-
`,"</br>")}</div>`}const X=j=>{let I=j.fontSize;for(let z=1;z<50;z++){const H=Q(Object.assign(Object.assign({},j.toJSON()),{fontSize:I}),{fontFamily:j.fontFamily}),{height:K}=(0,g.detectSize)(H),ee=j.height&&K>j.height,V=(0,g.isContentWrapping)({html:H});if(!(ee||V))break;I-=.5}return I},$=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);e.HTMLElement=(0,u.observer)(({element:j,store:I})=>{const z=l.default.useRef(null),[H,K]=l.default.useState(),[ee,V]=l.default.useState(!1),[Z,Y]=l.default.useState(!0),[ne,re]=l.default.useState(!1),ie=l.default.useRef(j.height),ae=I.selectedShapes.indexOf(j)>=0,se=j.fontSize/3,{textVerticalResizeEnabled:de}=k.flags,he=(0,v.usePrevious)(j.fontFamily),[Se]=(0,v.useFontLoader)(I,j.fontFamily),Ee=j._editModeEnabled;(0,p.useFadeIn)(z);const De=Se?j.fontFamily:he!==j.fontFamily?he:"Arial",fe=(0,x.useColor)(j).fill,ge=Q(j,{fontFamily:De,color:fe}),{width:Te,height:Re}=T(ge,j,Se);l.default.useEffect(()=>{if(!Se)return;if(!j.height)return void j.set({height:Re});const{textOverflow:Fe}=k.flags;if(Fe!=="change-font-size"||ee)Fe==="resize"&&(de&&j.height<Re&&I.history.ignore(()=>{j.set({height:Re})}),de||j.height===Re||I.history.ignore(()=>{j.set({height:Re})}));else{const ze=X(j);ze!==j.fontSize?I.history.ignore(()=>{j.set({fontSize:ze})}):j.height!==Re&&(de&&j.height<Re?I.history.ignore(()=>{j.set({height:Re})}):de||I.history.ignore(()=>{j.set({height:Re})}))}});const ue=l.default.useRef(0),me=l.default.useMemo(()=>{const Fe={lastArgs:null,lastResult:null};return async function(ze){return Fe.lastArgs&&Fe.lastResult&&(Ue=Fe.lastArgs,Xe=ze,JSON.stringify(Ue)===JSON.stringify(Xe))||(Fe.lastResult=await(0,g.htmlToCanvas)(ze),Fe.lastArgs=Object.assign({},ze)),Fe.lastResult;var Ue,Xe}},[]);l.default.useEffect(()=>{ee||Ee||(async()=>{ue.current++;const Fe=ue.current,ze=(0,y.incrementLoader)(`text ${j.id}`);Y(!0);let Ue=null;const Xe=$?5:1;for(let dt=0;dt<Xe;dt++){if(Ue=await(dt>0?me:g.htmlToCanvas)({skipCache:dt>0,html:ge,width:j.width||1,height:j.height||Re||1,fontFamily:De,padding:se,pixelRatio:I._elementsPixelRatio,font:I.fonts.find(Et=>Et.fontFamily===De)||L.globalFonts.find(Et=>Et.fontFamily===De)}),Fe!==ue.current)return void ze();U(Ue)&&$&&await new Promise(Et=>setTimeout(Et,50*(dt+1)))}Ue?(K(Ue),Y(!1),b.default.Util.requestAnimFrame(ze)):ze()})()},[ge,ee,Re,Ee,De,j.height,I._elementsPixelRatio,Se]);const xe=ee||Z;l.default.useEffect(()=>_.autorun(()=>{const Fe=z.current;(0,O.applyFilter)(Fe,j)}),[H,xe,j.shadowColor,j.shadowOffsetX,j.shadowOffsetY,j.shadowOpacity]);let Ie=0;j.verticalAlign==="middle"&&(Ie=(j.height-Re)/2),j.verticalAlign==="bottom"&&(Ie=j.height-Re);const tt=(0,v.getLineHeight)({fontLoaded:Se,fontFamily:j.fontFamily,fontSize:j.fontSize,lineHeight:j.lineHeight}),lt=(0,R.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,l.default.createElement(c.Rect,{x:j.a.x,y:j.a.y,offsetX:j.backgroundPadding*(j.fontSize*tt*.5),offsetY:j.backgroundPadding*(j.fontSize*tt*.5),rotation:j.a.rotation,hideInExport:!j.showInExport,listening:!1,visible:j.backgroundEnabled,opacity:j.backgroundOpacity*j.a.opacity,fill:j.backgroundColor,width:j.a.width+j.backgroundPadding*(j.fontSize*tt),height:j.a.height+j.backgroundPadding*(j.fontSize*tt),cornerRadius:j.backgroundCornerRadius*(j.fontSize*tt*.5)}),l.default.createElement(c.Rect,{ref:z,name:"element",x:j.a.x,y:j.a.y,listening:j.selectable,rotation:j.a.rotation,width:j.a.width,height:j.a.height,visible:!xe,draggable:lt?j.draggable&&ae:j.draggable,preventDefault:!lt||ae,opacity:Ee?0:j.a.opacity,hideInExport:!j.showInExport,onMouseEnter:()=>{re(!0)},onMouseLeave:()=>{re(!1)},onDragMove:Fe=>{j.set({x:Fe.target.x(),y:Fe.target.y()})},onDragEnd:Fe=>{j.set({x:Fe.target.x(),y:Fe.target.y()})},id:j.id,onDblClick:()=>{j.contentEditable&&j.toggleEditMode(!0)},onDblTap:()=>{j.contentEditable&&j.toggleEditMode(!0)},onTransformStart:Fe=>{V(!0),ie.current=j.height},onTransform:Fe=>{var ze;const Ue=Fe.target,Xe=((ze=Ue.getStage())===null||ze===void 0?void 0:ze.findOne("Transformer")).getActiveAnchor(),dt=Xe==="middle-left"||Xe==="middle-right",kt=Xe==="top-center"||Xe==="bottom-center",Et=Ue.scaleX();if(dt){const be=Ue.scaleX(),we=Math.max(Ue.width()*be,j.fontSize);if(Ue.width(we),Ue.scaleX(1),k.flags.textVerticalResizeEnabled){const Ne=Math.max(Re,ie.current);j.set({height:Ne})}j.set({width:we,x:Ue.x(),y:Ue.y()})}else if(kt){let be=k.flags.textOverflow==="resize"?Re:j.lineHeight*j.fontSize;const we=Math.max(be,Fe.target.height()*Fe.target.scaleY());Ue.scaleY(1),j.set({x:Ue.x(),y:Ue.y(),height:we,rotation:Ue.rotation()})}else Ue.scaleX(1),Ue.scaleY(1),j.set({fontSize:j.fontSize*Et,width:Ue.width()*Et,x:Ue.x(),y:Ue.y(),rotation:Ue.rotation(),height:Ue.height()*Et})},onTransformEnd:Fe=>{V(!1),Y(!0);const ze=Fe.target.scaleX();Fe.target.scaleX(1),Fe.target.scaleY(1),j.set({fontSize:j.fontSize*ze,width:Fe.target.width()*ze,x:Fe.target.x(),y:Fe.target.y(),rotation:Fe.target.rotation(),shadowBlur:j.shadowBlur*ze,shadowOffsetX:j.shadowOffsetX*ze,shadowOffsetY:j.shadowOffsetY*ze,strokeWidth:j.strokeWidth*ze})}}),l.default.createElement(c.Image,{ref:z,image:H,x:j.a.x,y:j.a.y,offsetX:se,offsetY:se-Ie,listening:!1,rotation:j.rotation,width:j.a.width+2*se,height:j.a.height+2*se,visible:!xe,opacity:Ee?0:j.a.opacity,shadowEnabled:j.shadowEnabled,shadowBlur:j.shadowBlur,shadowOffsetX:j.shadowOffsetX,shadowOffsetY:j.shadowOffsetY,shadowColor:j.shadowColor,shadowOpacity:j.shadowOpacity,hideInExport:!j.showInExport}),xe&&l.default.createElement(c.Group,{x:j.a.x,y:j.a.y,rotation:j.rotation,offsetY:-Ie},l.default.createElement(d.Html,{divProps:{style:{pointerEvents:"none"}}},l.default.createElement(E,{dangerouslySetInnerHTML:{__html:ge},style:{pointerEvents:"none",display:"inline-block"}}))),Ee&&l.default.createElement(c.Group,{x:j.a.x,y:j.a.y,rotation:j.rotation,offsetY:-Ie},l.default.createElement(d.Html,null,l.default.createElement(M,{html:ge,element:j,onChange:Fe=>{const ze=(0,D.getLimitedFontSize)({oldText:(0,w.removeTags)(j.text),newText:(0,w.removeTags)(Fe),element:j});j.set({text:Fe,fontSize:ze})},onBlur:Fe=>{j.toggleEditMode(!1)}}))),(ae||ne)&&l.default.createElement(P.Highlighter,{element:j}))})}(So)),So}var fd={},dd={},V1={},yb;function Hd(){return yb||(yb=1,function(e){function i(h){return h/180*Math.PI}function t(h,b,_,k,O){const v=Math.sqrt(_*_+k*k);return O+=Math.atan2(k,_),{x:h+v*Math.cos(O),y:b+v*Math.sin(O)}}function n(h){const{x:b,y:_,width:k,height:O}=h,v=i(h.rotation),x=t(b,_,0,0,v),g=t(b,_,k,0,v),p=t(b,_,k,O,v),P=t(b,_,0,O,v),d=Math.min(x.x,g.x,p.x,P.x),m=Math.min(x.y,g.y,p.y,P.y),y=Math.max(x.x,g.x,p.x,P.x),w=Math.max(x.y,g.y,p.y,P.y);return{x:d,y:m,width:y-d,height:w-m,minX:d,minY:m,maxX:y,maxY:w}}function a(h){const b=h.map(x=>n(x)),_=Math.min(...b.map(x=>x.minX)),k=Math.min(...b.map(x=>x.minY)),O=Math.max(...b.map(x=>x.maxX)),v=Math.max(...b.map(x=>x.maxY));return{x:_,y:k,width:O-_,height:v-k,minX:_,minY:k,maxX:O,maxY:v}}function l(h){const b=i(h.rotation||0);return{x:h.x+h.width/2*Math.cos(b)+h.height/2*Math.sin(-b),y:h.y+h.height/2*Math.cos(b)+h.width/2*Math.sin(b)}}function u(h,b,_){const k=i(b),O=_.x+(h.x-_.x)*Math.cos(k)-(h.y-_.y)*Math.sin(k),v=_.y+(h.x-_.x)*Math.sin(k)+(h.y-_.y)*Math.cos(k);return Object.assign(Object.assign({},h),{rotation:h.rotation+b,x:O,y:v})}function c(h,b){return u(h,b,l(h))}Object.defineProperty(e,"__esModule",{value:!0}),e.degToRad=i,e.getClientRect=n,e.getTotalClientRect=a,e.getCenter=l,e.rotateAroundPoint=u,e.rotateAroundCenter=c}(V1)),V1}var bb;function H4(){return bb||(bb=1,function(e){var i=dd&&dd.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0}),e.setSnapFilterFunc=void 0,e.useSnap=_,e.useAnchorSnap=O;const t=i(Tn()),n=i(Ji()),a=Hd();var l=5;let u=({targetKonvaNodes:v,guideKonvaNode:x,distance:g,snapDirection:p})=>g<l;const c=v=>{u=v};function h(v){const x=v.__getNodeRect(),g=(0,a.getClientRect)(Object.assign(Object.assign({},x),{rotation:n.default.Util.radToDeg(x.rotation)})),p=v.getAbsolutePosition();return{vertical:[{guide:g.x,offset:p.x-g.x,snap:"start",nodes:v.nodes()},{guide:g.x+g.width/2,offset:p.x-g.x-g.width/2,snap:"center",nodes:v.nodes()},{guide:g.x+g.width,offset:p.x-g.x-g.width,snap:"end",nodes:v.nodes()}],horizontal:[{guide:g.y,offset:p.y-g.y,snap:"start",nodes:v.nodes()},{guide:g.y+g.height/2,offset:p.y-g.y-g.height/2,snap:"center",nodes:v.nodes()},{guide:g.y+g.height,offset:p.y-g.y-g.height,snap:"end",nodes:v.nodes()}]}}function b(v,x){var g=[],p=[];v.vertical.forEach(L=>{x.vertical.forEach(R=>{var D=Math.abs(L.offset-R.guide);u({targetKonvaNodes:R.nodes,guideKonvaNode:L.node,distance:D,snapDirection:L.snap})&&g.push({lineGuide:L.offset,diff:D,snap:R.snap,offset:R.offset})})}),v.horizontal.forEach(L=>{x.horizontal.forEach(R=>{var D=Math.abs(L.offset-R.guide);u({targetKonvaNodes:R.nodes,guideKonvaNode:L.node,distance:D,snapDirection:L.snap})&&p.push({lineGuide:L.offset,diff:D,snap:R.snap,offset:R.offset})})});var P=[];const d=g.sort((L,R)=>L.diff-R.diff),m=p.sort((L,R)=>L.diff-R.diff);var y=d[0],w=m[0];return y&&d.filter(L=>Math.abs(L.diff-y.diff)<.1).forEach(L=>{P.push(Object.assign({orientation:"V"},L))}),w&&m.filter(L=>Math.abs(L.diff-w.diff)<.1).forEach(L=>{P.push(Object.assign({orientation:"H"},L))}),P}function _(v,x){const g=t.default.useRef(),p=L=>L.hasName("element")||L.hasName("page-background")||!g.current&&L.hasName("elements-area");function P(L){var R;const D=(R=v.current)===null||R===void 0?void 0:R.getStage(),E=[],S=[];return D.find(p).forEach(A=>{if(!(L.indexOf(A)>=0)){var M=A.getClientRect({skipShadow:!0,skipStroke:!0});E.push({offset:M.x,node:A,snap:"start"},{offset:M.x+M.width,node:A,snap:"end"},{offset:M.x+M.width/2,node:A,snap:"center"}),S.push({offset:M.y,node:A,snap:"start"},{offset:M.y+M.height,node:A,snap:"end"},{offset:M.y+M.height/2,node:A,snap:"center"})}}),{vertical:E,horizontal:S}}function d(L){var R;const D=(R=v.current)===null||R===void 0?void 0:R.getLayer(),E=D==null?void 0:D.children.find(S=>S.name()==="line-guides");L.forEach(S=>{if(S.orientation==="H"){var A=new n.default.Line({points:[-6e3,S.lineGuide,6e3,S.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});E==null||E.add(A),D.batchDraw()}else S.orientation==="V"&&(A=new n.default.Line({points:[S.lineGuide,-6e3,S.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),E==null||E.add(A))})}const m=L=>{const R=L.target.getLayer().children.find(T=>T.name()==="line-guides");R==null||R.destroyChildren();var D=b(P(L.target.nodes()),h(L.target));if(!D.length)return;d(D);const E=L.target.getAbsolutePosition(),S=(L.target.nodes().map(T=>T.getAbsolutePosition()),Object.assign({},E));D.forEach(T=>{switch(T.snap){case"start":case"center":case"end":switch(T.orientation){case"V":S.x=T.lineGuide+T.offset;break;case"H":S.y=T.lineGuide+T.offset}}});const A=S.x-E.x,M=S.y-E.y;L.evt.ctrlKey||L.evt.metaKey||L.target.nodes().forEach(T=>{const B=T.getAbsolutePosition();T.setAbsolutePosition({x:B.x+A,y:B.y+M})})},y=(L,R,D)=>{const E=v.current,S=E.getLayer(),A=S.children.find(X=>X.name()==="line-guides");if(A==null||A.destroyChildren(),E.getActiveAnchor()==="rotater"||Math.sqrt(Math.pow(R.x-L.x,2)+Math.pow(R.y-L.y,2))>50||!S)return R;var M=b(P(E.nodes()),{vertical:[{guide:R.x,offset:0,snap:"start",nodes:E.nodes()}],horizontal:[{guide:R.y,offset:0,snap:"start",nodes:E.nodes()}]});if(!M.length||(d(M),D.ctrlKey||D.metaKey))return R;let T=R.x,B=R.x;M.forEach(X=>{switch(X.orientation){case"V":T=X.lineGuide;break;case"H":B=X.lineGuide}});const U=Math.abs(R.x-T)<10,Q=Math.abs(R.y-B)<10;return U&&!Q?{x:T,y:L.y}:Q&&!U?{x:L.x,y:B}:U&&Q?{x:T,y:B}:R},w=L=>{if(!L.target)return;const R=L.target.getLayer(),D=R.children.find(E=>E.name()==="line-guides");D==null||D.destroyChildren(),R.batchDraw()};t.default.useEffect(()=>{v.current&&(v.current.anchorDragBoundFunc(y),v.current.on("dragstart",L=>{setTimeout(()=>{if(n.default.DD._dragElements.size===0)return;const R=[...n.default.DD._dragElements.entries()],D=R.find(([E,S])=>S.node instanceof n.default.Transformer);D&&(R.splice(R.indexOf(D),1),R.unshift(D),n.default.DD._dragElements.clear(),R.forEach(([E,S])=>{n.default.DD._dragElements.set(E,S)}))})}),v.current.on("dragmove",m),v.current.on("dragend",w),v.current.on("transformend",w),v.current.on("transform",L=>{var R,D;L.evt.ctrlKey||L.evt.metaKey?(R=v.current)===null||R===void 0||R.rotationSnapTolerance(0):(D=v.current)===null||D===void 0||D.rotationSnapTolerance(5)}))},[])}function k(v){return{vertical:[{guide:v.absolutePosition().x,offset:0,snap:"center",nodes:[v]}],horizontal:[{guide:v.absolutePosition().y,offset:0,snap:"center",nodes:[v]}]}}function O(v,x,g){const p=m=>m.hasName("element")||m.hasName("line-anchor")||m.hasName("page-background")||m.hasName("elements-area"),P=m=>{const y=m.target.getLayer().children.find(S=>S.name()==="line-guides");y==null||y.destroyChildren();var w=b(function(S){var A;const M=(A=v.current)===null||A===void 0?void 0:A.getStage();var T=[],B=[];return M.find(p).forEach(U=>{if(!(S.indexOf(U)>=0)){var Q=U.getClientRect({skipShadow:!0,skipStroke:!0});U.hasName("line-anchor")&&(Q={x:U.absolutePosition().x,y:U.absolutePosition().y,width:0,height:0}),T.push({offset:Q.x,node:U,snap:"start"},{offset:Q.x+Q.width,node:U,snap:"end"},{offset:Q.x+Q.width/2,node:U,snap:"center"}),B.push({offset:Q.y,node:U,snap:"start"},{offset:Q.y+Q.height,node:U,snap:"end"},{offset:Q.y+Q.height/2,node:U,snap:"center"})}}),{vertical:T,horizontal:B}}([m.target,...x.map(S=>S.current)]),k(m.target));if(!w.length)return;(function(S){var A;const M=(A=v.current)===null||A===void 0?void 0:A.getLayer(),T=M==null?void 0:M.children.find(B=>B.name()==="line-guides");S.forEach(B=>{if(B.orientation==="H"){var U=new n.default.Line({points:[-6e3,B.lineGuide,6e3,B.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});T==null||T.add(U),M.batchDraw()}else B.orientation==="V"&&(U=new n.default.Line({points:[B.lineGuide,-6e3,B.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),T==null||T.add(U))})})(w);const L=m.target.getAbsolutePosition(),R=Object.assign({},L);w.forEach(S=>{switch(S.snap){case"start":case"center":case"end":switch(S.orientation){case"V":R.x=S.lineGuide+S.offset;break;case"H":R.y=S.lineGuide+S.offset}}});const D=R.x-L.x,E=R.y-L.y;if(!(m.evt.ctrlKey||m.evt.metaKey)){const S=m.target.getAbsolutePosition();m.target.absolutePosition({x:S.x+D,y:S.y+E})}},d=m=>{if(!m.target)return;const y=m.target.getLayer(),w=y.children.find(L=>L.name()==="line-guides");w==null||w.destroyChildren(),y.batchDraw()};t.default.useEffect(()=>{v.current&&(v.current.on("dragmove",P),v.current.on("dragend",d))},g)}e.setSnapFilterFunc=c}(dd)),dd}var _b;function FO(){return _b||(_b=1,function(e){var i=fd&&fd.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0,e.getMiddlePoints=_,e.getLinePositionFromMiddlePoints=k;const t=i(Tn()),n=Qi,a=Ja,l=jp(),u=Fd,c=bc(),h=H4(),b=Xs();function _(x){const{x:g,y:p,width:P,height:d,rotation:m}=x.a,y=m*Math.PI/180,w={x:g+d/2*Math.cos(y+Math.PI/2),y:p+d/2*Math.sin(y+Math.PI/2)};return{middleLeft:w,middleRight:{x:w.x+P*Math.cos(y),y:w.y+P*Math.sin(y)}}}function k(x,g,p){const P=Math.sqrt(Math.pow(g.x-x.x,2)+Math.pow(g.y-x.y,2)),d=Math.atan2(g.y-x.y,g.x-x.x),m=180*d/Math.PI;return{x:x.x+Math.cos(d-Math.PI/2)*p/2,y:x.y+Math.sin(d-Math.PI/2)*p/2,width:P,height:p,rotation:m}}const O=(x,g)=>({offsetX:5/x,offsetY:5/x,width:10/x,height:10/x,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:p=>{p.target.getStage().container().style.cursor="crosshair"},onMouseLeave:p=>{p.target.getStage().container().style.cursor=""},onDragStart:p=>{g.history.startTransaction()},onDragEnd:p=>{g.history.endTransaction()}}),v=(0,n.observer)(({element:x,type:g})=>{const p=(0,l.useColor)(x,x.a.color,"fill"),P=(0,l.useColor)(x,x.a.color,"stroke"),d=Object.assign(Object.assign(Object.assign({strokeWidth:x.height,lineCap:"round",lineJoin:"round"},P),p),{opacity:x.a.opacity,hideInExport:!x.showInExport});return t.default.createElement(t.default.Fragment,null,g==="arrow"&&t.default.createElement(a.Line,Object.assign({points:[3*x.height,2*-x.height,0,0,3*x.height,2*x.height]},d)),g==="triangle"&&t.default.createElement(a.Line,Object.assign({points:[3*x.height,2*-x.height,0,0,3*x.height,2*x.height],closed:!0},d)),g==="bar"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-x.height,0,2*x.height],closed:!0},d)),g==="square"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-x.height,4*x.height,2*-x.height,4*x.height,2*x.height,0,2*x.height],closed:!0},d)),g==="circle"&&t.default.createElement(a.Circle,Object.assign({x:2*x.height,y:0,radius:2*x.height},d)))});e.LineElement=(0,n.observer)(({element:x,store:g})=>{const p=t.default.useRef(null),P=t.default.useRef(null),d=t.default.useRef(null),m=x.selectable||g.role==="admin",y=(0,b.isTouchDevice)(),[w,L]=t.default.useState(!1),R=g.selectedElements.indexOf(x)>=0&&g.selectedElements.length===1,D=g.selectedShapes.indexOf(x)>=0,{middleLeft:E,middleRight:S}=_(x);(0,h.useAnchorSnap)(P,[p],[R]),(0,h.useAnchorSnap)(d,[p],[R]);const A=(0,l.useColor)(x,x.a.color,"stroke");return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Line,Object.assign({ref:p,name:"element",id:x.id,x:x.a.x,y:x.a.y,points:[0,0,x.a.width,0],offsetY:-x.a.height/2,strokeWidth:x.a.height,hitStrokeWidth:Math.max(x.a.height,20),dash:x.dash.map(M=>M*x.a.height)},A,{rotation:x.a.rotation,opacity:x.animated("opacity"),shadowEnabled:x.shadowEnabled,shadowBlur:x.shadowBlur,shadowOffsetX:x.shadowOffsetX,shadowOffsetY:x.shadowOffsetY,shadowColor:x.shadowColor,shadowOpacity:x.shadowOpacity,listening:m,draggable:y?x.draggable&&D:x.draggable,preventDefault:!y||D,hideInExport:!x.showInExport,onMouseEnter:()=>{L(!0)},onMouseLeave:()=>{L(!1)},onDragMove:M=>{x.set({x:M.target.x(),y:M.target.y()})},onDragEnd:M=>{x.set({x:M.target.x(),y:M.target.y()})},onTransform:M=>{const T=M.target.scaleX();M.target.scaleX(1),M.target.scaleY(1),x.set({height:x.height*T,width:x.width*T,x:M.target.x(),y:M.target.y(),rotation:M.target.rotation()})}})),t.default.createElement(a.Group,{x:E.x,y:E.y,rotation:x.rotation,hideInExport:!x.showInExport},t.default.createElement(v,{element:x,type:x.startHead})),t.default.createElement(a.Group,{x:S.x,y:S.y,rotation:x.rotation+180},t.default.createElement(v,{element:x,type:x.endHead})),(w||D&&!R)&&t.default.createElement(c.Highlighter,{element:x}),R&&x.resizable&&t.default.createElement(u.Portal,{selector:".page-abs-container",enabled:!0},t.default.createElement(a.Group,{visible:R},t.default.createElement(a.Rect,Object.assign({x:E.x,y:E.y,ref:P,name:"line-anchor"},O(g.scale,g),{onDragMove:M=>{const T=k(M.target.position(),S,x.height);x.set({x:T.x,y:T.y,width:T.width,rotation:T.rotation})}})),t.default.createElement(a.Rect,Object.assign({x:S.x,y:S.y,ref:d,name:"line-anchor"},O(g.scale,g),{onDragMove:M=>{const T=k(E,M.target.position(),x.height);x.set({x:T.x,y:T.y,width:T.width,rotation:T.rotation})}})))))})}(fd)),fd}var Eo={},wb;function zO(){return wb||(wb=1,function(e){var i=Eo&&Eo.__createBinding||(Object.create?function(j,I,z,H){H===void 0&&(H=z);var K=Object.getOwnPropertyDescriptor(I,z);K&&!("get"in K?!I.__esModule:K.writable||K.configurable)||(K={enumerable:!0,get:function(){return I[z]}}),Object.defineProperty(j,H,K)}:function(j,I,z,H){H===void 0&&(H=z),j[H]=I[z]}),t=Eo&&Eo.__setModuleDefault||(Object.create?function(j,I){Object.defineProperty(j,"default",{enumerable:!0,value:I})}:function(j,I){j.default=I}),n=Eo&&Eo.__importStar||function(){var j=function(I){return j=Object.getOwnPropertyNames||function(z){var H=[];for(var K in z)Object.prototype.hasOwnProperty.call(z,K)&&(H[H.length]=K);return H},j(I)};return function(I){if(I&&I.__esModule)return I;var z={};if(I!=null)for(var H=j(I),K=0;K<H.length;K++)H[K]!=="default"&&i(z,I,H[K]);return t(z,I),z}}(),a=Eo&&Eo.__importDefault||function(j){return j&&j.__esModule?j:{default:j}};Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=e.useImageLoader=e.setImageLoaderHook=void 0;const l=a(Tn()),u=Qi,c=da,h=Ja,b=a(Dp()),_=a(Ji()),k=Fd,O=bc(),v=Ks(),x=n(Ud()),g=ts(),p=Fp(),P=yc(),d=Xs();function m(){return document.createElement("canvas")}async function y(j){if(!(j.indexOf("data:image/svg+xml")>=0||j.indexOf(".svg")>=0))return j;const I=await x.urlToString(j),z=x.fixSize(I);return x.svgToURL(z)}const w=j=>{const[I,z]=l.default.useState(j);return l.default.useEffect(()=>{(async()=>{const H=await y(j);H!==I&&z(H)})()},[j]),I},L=new window.Image;L.src=x.svgToURL(`
|
|
228
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
229
|
-
<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"/>
|
|
230
|
-
<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"/>
|
|
231
|
-
</svg>
|
|
232
|
-
`);const R=new window.Image;R.src=x.svgToURL(`
|
|
233
|
-
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
234
|
-
<path opacity="0.6" 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" fill="white"/>
|
|
235
|
-
<path opacity="0.6" 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" fill="white"/>
|
|
236
|
-
<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"/>
|
|
237
|
-
<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"/>
|
|
238
|
-
</svg>
|
|
239
|
-
`);function D(j,I,z,H,K,ee,V){for(var Z=new ImageData(I,z),Y=new Int32Array(j.data.buffer),ne=j.width,re=new Int32Array(Z.data.buffer),ie=Z.width,ae=I/ee,se=z/V,de=Math.round(1/ae),he=Math.round(1/se),Se=de*he,Ee=0;Ee<Z.height;Ee++)for(var De=0;De<ie;De++){for(var fe=H+Math.round(De/ae)+(K+Math.round(Ee/se))*ne,ge=0,Te=0,Re=0,ue=0,me=0;me<he;me++)for(var xe=0;xe<de;xe++){var Ie=Y[fe+xe+me*ne];ge+=Ie<<24>>>24,Te+=Ie<<16>>>24,Re+=Ie<<8>>>24,ue+=Ie>>>24}ge=Math.round(ge/Se),Te=Math.round(Te/Se),Re=Math.round(Re/Se),ue=Math.round(ue/Se),re[De+Ee*ie]=ue<<24|Re<<16|Te<<8|ge}return Z}function E(j,I){var z,H;const K=m();K.width=j.width,K.height=j.height,(z=K.getContext("2d"))===null||z===void 0||z.drawImage(j,0,0,K.width,K.height);const ee=D(K.getContext("2d").getImageData(0,0,K.width,K.height),Math.floor(K.width*I),Math.floor(K.height*I),0,0,K.width,K.height);return K.width=Math.floor(K.width*I),K.height=Math.floor(K.height*I),(H=K.getContext("2d"))===null||H===void 0||H.putImageData(ee,0,0),K}const S=(j,I,z,H,K=0,ee=!1)=>{const V=Math.floor(Math.max(j.width*H,1)),Z=Math.floor(Math.max(j.height*H,1)),Y=Math.min(K*H,V/2,Z/2),ne=Math.max(j.width/z.width,j.height/z.height)*H,re=j.page._exportingOrRendering&&g.flags.imageDownScalingEnabled&&ne<1&&!ee,ie=z.x===0&&z.y===0&&z.width===(I==null?void 0:I.width)&&z.height===(I==null?void 0:I.height),ae=l.default.useMemo(()=>{if(!(!I||!I.width||!I.height))return ie&&Y===0&&!re?void 0:m()},[I,Y,re,ie]),se=()=>{if(!ae||!I)return;ae.width=V,ae.height=Z;const de=ae.getContext("2d");if(!de)return;Y&&(de.beginPath(),de.moveTo(Y,0),de.lineTo(V-Y,0),de.arc(V-Y,Y,Y,3*Math.PI/2,0,!1),de.lineTo(V,Z-Y),de.arc(V-Y,Z-Y,Y,0,Math.PI/2,!1),de.lineTo(Y,Z),de.arc(Y,Z-Y,Y,Math.PI/2,Math.PI,!1),de.lineTo(0,Y),de.arc(Y,Y,Y,Math.PI,3*Math.PI/2,!1),de.clip());const he=re?E(I,ne):I,Se=re?{x:Math.floor(z.x*ne),y:Math.floor(z.y*ne),width:Math.floor(z.width*ne),height:Math.floor(z.height*ne)}:z;de.drawImage(he,Se.x,Se.y,Se.width,Se.height,0,0,ae.width,ae.height)};return l.default.useLayoutEffect(()=>{se()},[ae,j.width,j.height,z.x,z.y,z.width,z.height,K,H,ee,j.page._exportingOrRendering,re]),l.default.useEffect(()=>()=>{ae&&ae.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(ae)},[ae]),[ae||I,se]},A=(j,I,z,H)=>{const K=w(j.clipSrc||""),[ee,V]=U(K,"anonymous"),Z=j.clipSrc?V:"loaded";(0,e.useImageLoader)(Z,j.clipSrc,j.id);const Y=l.default.useMemo(()=>{if(I&&ee)return m()},[I,ee]);function ne(){var re;if(!ee||!I||!I.width||!I.height||!ee||!ee.width||!ee.height||!Y)return;const ie=m(),ae=Math.max(j.width/ee.width*z,j.height/ee.height*z);ie.width=ee.width*ae,ie.height=ee.height*ae,(re=ie.getContext("2d"))===null||re===void 0||re.drawImage(ee,0,0,ie.width,ie.height),Y.width=Math.max(I.width,1),Y.height=Math.max(I.height,1);const se=Y.getContext("2d");se&&(se.save(),se.drawImage(ie,0,0,I.width,I.height),_.default.Util.releaseCanvas(ie),se.globalCompositeOperation="source-in",se.drawImage(I,0,0,Y.width,Y.height),se.restore())}return l.default.useLayoutEffect(()=>{ne()},[Y,I,ee,j.width,j.height,z,...H]),[j.clipSrc&&ee?Y:I,ne]},M=m(),T=(0,u.observer)(({element:j})=>{const I=Math.min(30,j.width/4,j.height/4),z=l.default.useRef(null);return l.default.useEffect(()=>{const H=z.current;if(!H)return;const K=new _.default.Animation(ee=>{H.rotate(((ee==null?void 0:ee.timeDiff)||0)/2)},H.getLayer());return K.start(),()=>{K.stop()}}),l.default.createElement(h.Group,{x:j.a.x,y:j.a.y,rotation:j.a.rotation,listening:!1,opacity:j.a.opacity,hideInExport:!j.showInExport},l.default.createElement(h.Rect,{width:j.width,height:j.height,fill:"rgba(124, 173, 212, 0.8)"}),l.default.createElement(h.Arc,{ref:z,x:j.width/2,y:j.height/2,fill:"white",outerRadius:Math.abs(I),innerRadius:Math.max(1,I-5),angle:270}))}),B=(0,u.observer)(({element:j})=>{const I="Can not load the video...",z=Math.max(10,Math.min(30,j.width/25));return l.default.createElement(h.Group,{x:j.a.x,y:j.a.y,rotation:j.a.rotation,listening:!1,opacity:j.a.opacity,hideInExport:!j.showInExport},l.default.createElement(h.Rect,{width:j.width,height:j.height,fill:"rgba(223, 102, 102, 0.8)"}),l.default.createElement(h.Text,{text:I,fontSize:z,width:j.width,height:j.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let U=b.default;const Q=j=>{U=j};e.setImageLoaderHook=Q;const X=(j,I,z)=>{const H=l.default.useRef(),K=()=>{var ee;(ee=H.current)===null||ee===void 0||ee.call(H),H.current=void 0};l.default.useEffect(()=>K,[]),l.default.useLayoutEffect(()=>{const ee=I.slice(0,200),V=`video with id ${z} url: ${ee}`;j!=="loading"||H.current||(H.current=(0,v.incrementLoader)(V)),j!=="loading"&&K(),j==="failed"&&(0,v.triggerLoadError)(V)},[j])};e.useImageLoader=X;function $(j,I,z){const H=l.default.useRef("loading"),K=l.default.useRef(null),[ee,V]=l.default.useState(0),Z=l.default.useRef(),Y=l.default.useRef(),ne=l.default.useRef();return Z.current===j&&Y.current===I&&ne.current===z||(H.current="loading",K.current=void 0,Z.current=j,Y.current=I,ne.current=z),l.default.useLayoutEffect(function(){if(j){var re=document.createElement("video");return re.addEventListener("canplay",ie),re.addEventListener("error",ae),re.crossOrigin=I,re.src=j,re.load(),function(){re.removeEventListener("canplay",ie),re.removeEventListener("error",ae)}}function ie(){H.current="loaded",K.current=re,K.current.currentTime=0,V(Math.random()),K.current.removeEventListener("canplay",ie)}function ae(se){H.current="failed",K.current=void 0,V(Math.random())}},[j,I,z]),[K.current,H.current]}e.VideoElement=(0,u.observer)(({element:j,store:I})=>{var z;const[H,K]=l.default.useState(!1),ee=l.default.useRef(null),V=l.default.useRef(null),[Z,Y]=l.default.useState(!1),ne=I.selectedShapes.indexOf(j)>=0,[re,ie]=l.default.useState(!1),[ae,se]=$(j.src,"anonymous"),de=I.activePage===j.page;(0,e.useImageLoader)(se,j.src,j.id),ae&&(ae.width=ae.videoWidth,ae.height=ae.videoHeight,ae.playsInline=!0);const he=ae||M;l.default.useEffect(()=>{ae&&I.history.ignore(()=>{j.set({duration:1e3*ae.duration})})},[ae]),l.default.useEffect(()=>{var Ge;if(!ae)return;const pt=I.animatedElementsIds,Ot=(!pt.length||pt.includes(j.id))&&I.isPlaying,zt=de&&(Ot||re);if(!zt)return void ae.pause();zt&&(ae.currentTime=j.startTime*ae.duration,ae.play());const Ut=new _.default.Animation(()=>{kt()},(Ge=ee.current)===null||Ge===void 0?void 0:Ge.getLayer());Ut.start();const pn=()=>{ie(!1),ae.currentTime=j.startTime*ae.duration},In=()=>{ae.currentTime>=j.endTime*ae.duration&&(ae.pause(),ae.currentTime=j.startTime*ae.duration,ie(!1))};return ae.addEventListener("ended",pn),ae.addEventListener("timeupdate",In),()=>{ae.pause(),Ut.stop(),ae.removeEventListener("ended",pn),ae.removeEventListener("timeupdate",In)}},[ae,re,I.isPlaying,de]),l.default.useEffect(()=>{ae&&(ae.volume=j.volume)},[ae,j.volume]);const Se=l.default.useRef();l.default.useEffect(()=>{const Ge=(0,c.autorun)(()=>{var pt,Ot;if(ae){const zt=I.animatedElementsIds;if(zt.length&&!zt.includes(j.id))return;const Ut=(I.currentTime-j.page.startTime)%j.duration;if(Math.abs(1e3*ae.currentTime-Ut)>500||!I.isPlaying){const pn=Ut/1e3;pn!==ae.currentTime&&(ae.currentTime=pn),ae.readyState!==4&&!I.isPlaying&&!Se.current&&(Se.current=(0,v.incrementLoader)(`video ${j.id}`))}kt(),(Ot=(pt=ee.current)===null||pt===void 0?void 0:pt.getLayer())===null||Ot===void 0||Ot.batchDraw()}});return()=>{Ge(),Se.current&&(Se.current(),Se.current=null)}},[I,ae]),l.default.useEffect(()=>{if(!ae)return;const Ge=()=>{var Ot,zt;ae.readyState!==4&&j.page._exportingOrRendering||Se.current&&(kt(),(zt=(Ot=ee.current)===null||Ot===void 0?void 0:Ot.getLayer())===null||zt===void 0||zt.batchDraw(),Se.current(),Se.current=null)};let pt;return j.page._exportingOrRendering&&(pt=setInterval(Ge,50)),ae.addEventListener("timeupdate",Ge),ae.addEventListener("canplay",Ge),()=>{clearInterval(pt),ae.removeEventListener("timeupdate",Ge),ae.removeEventListener("canplay",Ge)}},[j.page._exportingOrRendering,ae,j.id,v.incrementLoader]);let{cropX:Ee,cropY:De,cropWidth:fe,cropHeight:ge}=j;se!=="loaded"&&(Ee=De=0,fe=ge=1);const Te=he.width*fe,Re=he.height*ge,ue=j.width/j.height;let me,xe;const Ie=Te/Re,tt=j.type==="svg";tt?(me=Te,xe=Re):ue>=Ie?(me=Te,xe=Te/ue):(me=Re*ue,xe=Re);const lt={x:he.width*Ee,y:he.height*De,width:me,height:xe},Fe=(z=j.cornerRadius)!==null&&z!==void 0?z:0,[ze,Ue]=S(j,he,lt,I._elementsPixelRatio,Fe,H||j._cropModeEnabled||j.type==="svg");let[Xe,dt]=A(j,ze,I._elementsPixelRatio,[lt,Fe,I._elementsPixelRatio]);function kt(){Ue(),dt()}const Et=Math.max(j.width/me,j.height/xe);l.default.useEffect(()=>{var Ge;if(!j._cropModeEnabled)return;const pt=(Ge=ee.current)===null||Ge===void 0?void 0:Ge.getStage();function Ot(Ut){j._cropModeEnabled&&Ut.target!==V.current&&j.toggleCropMode(!1)}function zt(Ut){j._cropModeEnabled&&Ut.target.parentNode!==pt.content&&j.toggleCropMode(!1)}return document.body.addEventListener("click",zt),pt==null||pt.on("click",Ot),pt==null||pt.on("tap",Ot),()=>{document.body.removeEventListener("click",zt),document.body.removeEventListener("touchstart",zt),pt==null||pt.off("click",Ot),pt==null||pt.off("click",Ot)}},[j._cropModeEnabled]),l.default.useLayoutEffect(()=>{if(!(H||j._cropModeEnabled))return(0,p.applyFilter)(ee.current,j),(0,c.autorun)(()=>{(0,p.applyFilter)(ee.current,j)},{delay:100})},[he,H,fe,ge,j._cropModeEnabled]),l.default.useLayoutEffect(()=>{var Ge;H||j._cropModeEnabled?(Ge=ee.current)===null||Ge===void 0||Ge.clearCache():(0,p.applyFilter)(ee.current,j)},[H,j.width,j.height,j._cropModeEnabled]),l.default.useEffect(()=>{(0,p.applyFilter)(ee.current,j)},[j.shadowEnabled,j.shadowBlur,j.cornerRadius,j.shadowColor,j.shadowOffsetX,j.shadowOffsetY,j.shadowOpacity]);const be=l.default.useRef(null),we=l.default.useRef(null),Ne=l.default.useRef(null);l.default.useLayoutEffect(()=>{j._cropModeEnabled&&(we.current.nodes([be.current]),Ne.current.nodes([V.current]))},[j._cropModeEnabled]);const Ye=Ge=>{Math.round(Ge.target.x())>0&&(Ge.target.x(0),Ge.target.scaleX(1)),Math.round(Ge.target.y())>0&&(Ge.target.y(0),Ge.target.scaleY(1));const pt=Ge.target.width()*Ge.target.scaleX(),Ot=Ge.target.height()*Ge.target.scaleY(),zt=Math.min(1,me/pt),Ut=Math.min(1,xe/Ot),pn=1-zt,In=Math.min(pn,Math.max(0,Math.round(-Ge.target.x())/pt)),wn=1-Ut,Qn=Math.min(wn,Math.max(0,Math.round(-Ge.target.y())/Ot));Ge.target.setAttrs({x:-In*he.width,y:-Qn*he.height,scaleX:1,scaleY:1}),j.set({cropX:In,cropY:Qn,cropWidth:zt,cropHeight:Ut})},Ze=()=>{j.type!=="svg"&&j.contentEditable&&setTimeout(()=>{j.toggleCropMode(!0)})},ke=se==="loading",vt=se==="failed",je=!ke&&!vt,ot=l.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),dn=je?j.a.opacity:0;(0,P.useFadeIn)(ee,dn);const Yt=j.selectable||I.role==="admin",hn=(0,d.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,ke&&l.default.createElement(T,{element:j}),vt&&l.default.createElement(B,{element:j}),l.default.createElement(h.Image,{ref:ee,name:"element",id:j.id,image:Xe,x:j.a.x,y:j.a.y,width:j.a.width||1,height:j.a.height||1,rotation:j.a.rotation,opacity:dn,shadowEnabled:j.shadowEnabled,shadowBlur:j.shadowBlur,shadowOffsetX:j.shadowOffsetX,shadowOffsetY:j.shadowOffsetY,shadowColor:j.shadowColor,shadowOpacity:j.shadowOpacity,customCrop:lt,listening:Yt,draggable:hn?j.draggable&&ne:j.draggable,preventDefault:!hn||ne,hideInExport:!j.showInExport,onMouseEnter:()=>{Y(!0)},onMouseLeave:()=>{Y(!1)},onDragMove:Ge=>{j.set({x:Ge.target.x(),y:Ge.target.y()})},onDragEnd:Ge=>{j.set({x:Ge.target.x(),y:Ge.target.y()})},onDblClick:Ze,onDblTap:Ze,onTransformStart:()=>{K(!0),ot.current={cropX:j.cropX,cropY:j.cropY,cropWidth:j.cropWidth,cropHeight:j.cropHeight}},onTransform:Ge=>{var pt;const Ot=Ge.currentTarget,zt=Math.abs(Ot.scaleX()-1)<1e-7?1:Ot.scaleX(),Ut=Math.abs(Ot.scaleY()-1)<1e-7?1:Ot.scaleY();Ot.scaleX(1),Ot.scaleY(1);const pn=(pt=Ge.target.getStage())===null||pt===void 0?void 0:pt.findOne("Transformer"),In=1-me/he.width,wn=Math.min(In,Math.max(0,j.cropX)),Qn=1-xe/he.height,ii=Math.min(Qn,Math.max(0,j.cropY)),Sr=pn.getActiveAnchor(),Qe=!(Sr.indexOf("middle")>=0||Sr.indexOf("center")>=0),_t=!Qe&&zt<1&&ot.current.cropHeight>xe/he.height;let At=Qe?j.cropWidth:j.cropWidth*zt;_t&&(At=j.cropWidth);const Ht=!Qe&&Ut<1&&ot.current.cropWidth>me/he.width;let Gt=Qe?j.cropHeight:j.cropHeight*Ut;Ht&&(Gt=j.cropHeight),tt&&(At=j.cropWidth,Gt=j.cropHeight),j.set({cropX:wn,cropY:ii,x:Ot.x(),y:Ot.y(),width:Ot.width()*zt,height:Ot.height()*Ut,rotation:Ge.target.rotation(),cropWidth:Math.min(At,1-wn),cropHeight:Math.min(Gt,1-ii)})},onTransformEnd:Ge=>{const pt=Ge.currentTarget;j.set({width:pt.width(),height:pt.height(),x:pt.x(),y:pt.y(),rotation:Ge.target.rotation(),cropWidth:me/he.width,cropHeight:xe/he.height}),K(!1)}}),l.default.createElement(h.Rect,{x:j.a.x,y:j.a.y,width:Math.max(j.a.width-j.borderSize,0),height:Math.max(j.a.height-j.borderSize,0),opacity:dn,offsetX:-j.borderSize/2,offsetY:-j.borderSize/2,stroke:j.borderColor,strokeWidth:j.borderSize,listening:!1,visible:!!j.borderSize,rotation:j.rotation,cornerRadius:Math.max(0,Fe-j.borderSize),hideInExport:!j.showInExport}),!I.isPlaying&&l.default.createElement(h.Image,{image:re?R:L,x:j.a.x,y:j.a.y,offsetX:-j.a.width/2+15/I.scale,offsetY:-j.a.height/2+15/I.scale,rotation:j.a.rotation,width:30/I.scale,height:30/I.scale,hideInExport:!0,onClick:()=>ie(!re),onTap:()=>ie(!re)}),j._cropModeEnabled&&l.default.createElement(k.Portal,{selector:".page-abs-container",enabled:!0},l.default.createElement(h.Rect,{x:-window.innerWidth/I.scale,y:-window.innerWidth/I.scale,width:window.innerWidth/I.scale*3,height:window.innerWidth/I.scale*3,fill:"rgba(0,0,0,0.3)"}),l.default.createElement(h.Image,{listening:!1,image:Xe,x:j.a.x,y:j.a.y,width:j.a.width,height:j.a.height,rotation:j.a.rotation,shadowEnabled:j.shadowEnabled,shadowBlur:j.shadowBlur}),l.default.createElement(h.Group,{x:j.a.x,y:j.a.y,rotation:j.a.rotation,scaleX:Et,scaleY:Et},l.default.createElement(h.Image,{image:he,ref:V,opacity:.4,draggable:!0,x:-j.cropX*he.width,y:-j.cropY*he.height,onDragMove:Ye,onTransform:Ye}),l.default.createElement(h.Transformer,{ref:Ne,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Ge,pt)=>pt.width<5||pt.height<5?Ge:pt,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),l.default.createElement(h.Rect,{width:me,height:xe,ref:be,listening:!1,onTransform:Ge=>{Ge.target.x()<-j.cropX*he.width-1e-9&&(Ge.target.x(-j.cropX*he.width),Ge.target.scaleX(1)),Ge.target.y()<-j.cropY*he.height-1e-9&&(Ge.target.y(-j.cropY*he.height),Ge.target.scaleY(1));const pt=Math.min(1,Math.max(0,j.cropX+Ge.target.x()/he.width)),Ot=Math.min(1,Math.max(0,Ge.target.y()/he.height+j.cropY)),zt=Ge.target.width()*Ge.target.scaleX(),Ut=Ge.target.height()*Ge.target.scaleY(),pn=Math.min(1-pt,zt/he.width),In=Math.min(1-Ot,Ut/he.height),wn=Ge.target.getAbsolutePosition(Ge.target.getParent().getParent());Ge.target.scale({x:1,y:1}),Ge.target.position({x:0,y:0}),j.set({x:wn.x,y:wn.y,cropX:pt,cropY:Ot,cropWidth:pn,cropHeight:In,width:Math.min(zt*Et,he.width*(1-pt)*Et),height:Math.min(Ut*Et,he.height*(1-Ot)*Et)})}}),l.default.createElement(h.Transformer,{ref:we,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Ge,pt)=>pt.width<5||pt.height<5?Ge:pt,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2}))),(Z||ne)&&l.default.createElement(O.Highlighter,{element:j}))})}(Eo)),Eo}var hd={},$1={},Sb;function wv(){return Sb||(Sb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES=e.circleData=e.rightTriangleData=e.triangleData=e.rectData=void 0,e.starPath=l,e.diamondPath=u,e.pentagonPath=c,e.hexagonPath=h,e.speechBubblePath=_,e.crossPath=k,e.subTypeToPathDataFunc=O,e.figureToSvg=x;const i=({width:g,height:p,cornerRadius:P})=>{if(P>0){const d=Math.min(P,g/2,p/2);return`M 0 ${d} A ${d} ${d} 0 0 1 ${d} 0 L ${g-d} 0 A ${d} ${d} 0 0 1 ${g} ${d} L ${g} ${p-d} A ${d} ${d} 0 0 1 ${g-d} ${p} L ${d} ${p} A ${d} ${d} 0 0 1 0 ${p-d} Z`}return`M 0 0 L ${g} 0 L ${g} ${p} L 0 ${p} Z`};e.rectData=i;const t=({width:g,height:p})=>`M ${g/2} 0 L ${g} ${p} L 0 ${p} Z`;e.triangleData=t;const n=({width:g,height:p})=>`M 0 0 L ${g} 0 L 0 ${p} Z`;e.rightTriangleData=n;const a=({width:g,height:p})=>`M ${g/2} ${p/2} m -${g/2}, 0 a ${g/2},${p/2} 0 1,0 ${g},0 a ${g/2},${p/2} 0 1,0 -${g},0`;function l({width:g,height:p}){const P=g/2,d=p/2,m=g/2,y=p/2,w=m/2,L=y/2;let R="",D=Math.PI/5;for(let E=0;E<10;E++){const S=E%2==0?y:L,A=P+(E%2==0?m:w)*Math.sin(E*D),M=d-S*Math.cos(E*D);E===0?R=`M ${A} ${M}`:R+=` L ${A} ${M}`}return R+" Z"}function u({width:g,height:p}){const P=g/2,d=p/2;return`M ${P} 0 L ${g} ${d} L ${P} ${p} L 0 ${d} Z`}function c({width:g,height:p}){const P=g/2,d=p/2,m=g/2,y=p/2;let w="",L=2*Math.PI/5;for(let R=0;R<5;R++){const D=y,E=P+m*Math.sin(R*L),S=d-D*Math.cos(R*L);R===0?w=`M ${E} ${S}`:w+=` L ${E} ${S}`}return w+" Z"}function h({width:g,height:p}){const P=g/2,d=p/2,m=g/2,y=p/2;let w="",L=2*Math.PI/6;for(let R=0;R<6;R++){const D=y,E=P+m*Math.sin(R*L),S=d-D*Math.cos(R*L);R===0?w=`M ${E} ${S}`:w+=` L ${E} ${S}`}return w+" Z"}function b({path:g,aspectRatio:p,width:P,height:d}){return{path:g,scaleX:P/p.width,scaleY:d/p.height}}function _({width:g,height:p}){const P=.1*Math.min(g,p),d=.2*g,m=.2*p,y=.5*g;let w=`M ${P},0`;return w+=" H "+(g-P),w+=` A ${P},${P} 0 0 1 ${g},${P}`,w+=" V "+(p-P-m),w+=` A ${P},${P} 0 0 1 ${g-P},${p-m}`,w+=` H ${y+d/2}`,w+=` L ${y},${p}`,w+=` L ${y-d/2},${p-m}`,w+=` H ${P}`,w+=` A ${P},${P} 0 0 1 0,${p-P-m}`,w+=` V ${P}`,w+=` A ${P},${P} 0 0 1 ${P},0`,w+=" Z",w}function k({width:g,height:p}){const P=.3*g,d=.3*p,m=g/2,y=p/2,w=m-P/2,L=m+P/2,R=y-d/2,D=y+d/2;let E=`M ${w},0 `;return E+=`H ${L} `,E+=`V ${R} `,E+=`H ${g} `,E+=`V ${D} `,E+=`H ${L} `,E+=`V ${p} `,E+=`H ${w} `,E+=`V ${D} `,E+="H 0 ",E+=`V ${R} `,E+=`H ${w} `,E+="V 0 ",E+="Z",E}function O(g){return e.TYPES[g]||e.rectData}function v(g,p){const{width:P,height:d,fill:m,stroke:y,strokeWidth:w,dash:L}=g,R=(L||[]).map(M=>M*w);let D=p(g),E=1,S=1;typeof D!="string"&&(E=D.scaleX,S=D.scaleY,D=D.path);const A=`clip-${g.id||Math.random()}`;return`
|
|
240
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${P}" height="${d}">
|
|
241
|
-
<defs>
|
|
242
|
-
<clipPath id="${A}">
|
|
243
|
-
<path d="${D}" />
|
|
244
|
-
</clipPath>
|
|
245
|
-
</defs>
|
|
246
|
-
|
|
247
|
-
<!-- Path for the fill -->
|
|
248
|
-
<path d="${D}" fill="${m}" transform="scale(${E}, ${S})"/>
|
|
249
|
-
|
|
250
|
-
<!-- Path for the stroke, clipped by the star path -->
|
|
251
|
-
<path d="${D}" fill="none" stroke="${y}" stroke-width="${2*w}" clip-path="url(#${A})" transform="scale(${E}, ${S})" stroke-dasharray="${R.join(" ")}"/>
|
|
252
|
-
</svg>
|
|
253
|
-
`}function x(g){const{subType:p}=g,P=O(p);return P?v(g,P):(console.error(`Polotno error: Can not convert ${g.subType} figure to svg.`),(0,e.rectData)(g))}e.circleData=a,e.TYPES={rect:e.rectData,circle:e.circleData,star:l,triangle:e.triangleData,rightTriangle:e.rightTriangleData,diamond:u,pentagon:c,hexagon:h,speechBubble:_,cross:k,arc:({width:g,height:p})=>b({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:g,height:p}),cloud:({width:g,height:p})=>b({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:g,height:p}),rightArrow:({width:g,height:p})=>{const P=.6*g;return`M 0 ${p/4} L ${P} ${p/4} L ${P} 0 L ${g} ${p/2} L ${P} ${p} L ${P} ${.75*p} L 0 ${.75*p} Z`},leftArrow:({width:g,height:p})=>{const P=.4*g;return`M ${g} ${p/4} L ${P} ${p/4} L ${P} 0 L 0 ${p/2} L ${P} ${p} L ${P} ${.75*p} L ${g} ${.75*p} Z`},downArrow:({width:g,height:p})=>{const P=.6*p;return`M ${g/4} 0 L ${g/4} ${P} L 0 ${P} L ${g/2} ${p} L ${g} ${P} L ${.75*g} ${P} L ${.75*g} 0 Z`},upArrow:({width:g,height:p})=>{const P=.4*p;return`M ${g/4} ${p} L ${g/4} ${P} L 0 ${P} L ${g/2} 0 L ${g} ${P} L ${.75*g} ${P} L ${.75*g} ${p} Z`},asterisk1:({width:g,height:p})=>b({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:g,height:p}),asterisk2:({width:g,height:p})=>b({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:g,height:p}),bookmark:({width:g,height:p})=>b({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:g,height:p}),butterfly:({width:g,height:p})=>b({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:g,height:p}),cylinder:({width:g,height:p})=>b({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:g,height:p}),diamond2:({width:g,height:p})=>b({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:g,height:p}),door:({width:g,height:p})=>b({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:g,height:p}),drop1:({width:g,height:p})=>b({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:g,height:p}),drop2:({width:g,height:p})=>b({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:g,height:p}),explosion:({width:g,height:p})=>b({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:g,height:p}),flag:({width:g,height:p})=>b({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:g,height:p}),flower:({width:g,height:p})=>b({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:g,height:p}),frame:({width:g,height:p})=>b({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:g,height:p}),heart1:({width:g,height:p})=>b({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:g,height:p}),home:({width:g,height:p})=>b({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:g,height:p}),home2:({width:g,height:p})=>b({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:g,height:p}),hourglass:({width:g,height:p})=>b({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:g,height:p}),house:({width:g,height:p})=>b({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:g,height:p}),keyhole:({width:g,height:p})=>b({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:g,height:p}),kiss:({width:g,height:p})=>b({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:g,height:p}),leaf:({width:g,height:p})=>b({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:g,height:p}),lightning1:({width:g,height:p})=>b({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:g,height:p}),lightning2:({width:g,height:p})=>b({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:g,height:p}),magnet:({width:g,height:p})=>b({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:g,height:p}),mithosis:({width:g,height:p})=>b({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:g,height:p}),orangeRicky:({width:g,height:p})=>b({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:g,height:p}),party:({width:g,height:p})=>b({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:g,height:p}),pillow:({width:g,height:p})=>b({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:g,height:p}),polygon:({width:g,height:p})=>b({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:g,height:p}),rainbow:({width:g,height:p})=>b({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:g,height:p}),rhodeIsland:({width:g,height:p})=>b({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:g,height:p}),shell:({width:g,height:p})=>b({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:g,height:p}),shield1:({width:g,height:p})=>b({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:g,height:p}),shield2:({width:g,height:p})=>b({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:g,height:p}),skewedRectangle:({width:g,height:p})=>b({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:g,height:p}),softFlower:({width:g,height:p})=>b({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:g,height:p}),softStar:({width:g,height:p})=>b({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:g,height:p}),stairs1:({width:g,height:p})=>b({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:g,height:p}),stairs2:({width:g,height:p})=>b({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:g,height:p}),teewee:({width:g,height:p})=>b({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:g,height:p}),blob1:({width:g,height:p})=>b({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:g,height:p}),blob10:({width:g,height:p})=>b({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:g,height:p}),blob11:({width:g,height:p})=>b({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:g,height:p}),blob12:({width:g,height:p})=>b({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:g,height:p}),blob13:({width:g,height:p})=>b({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:g,height:p}),blob14:({width:g,height:p})=>b({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:g,height:p}),blob15:({width:g,height:p})=>b({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:g,height:p}),blob16:({width:g,height:p})=>b({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:g,height:p}),blob17:({width:g,height:p})=>b({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:g,height:p}),blob18:({width:g,height:p})=>b({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:g,height:p}),blob19:({width:g,height:p})=>b({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:g,height:p}),blob2:({width:g,height:p})=>b({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:g,height:p}),blob20:({width:g,height:p})=>b({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:g,height:p}),blob21:({width:g,height:p})=>b({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:g,height:p}),blob22:({width:g,height:p})=>b({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:g,height:p}),blob23:({width:g,height:p})=>b({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:g,height:p}),blob24:({width:g,height:p})=>b({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:g,height:p}),blob25:({width:g,height:p})=>b({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:g,height:p}),blob26:({width:g,height:p})=>b({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:g,height:p}),blob27:({width:g,height:p})=>b({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:g,height:p}),blob28:({width:g,height:p})=>b({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:g,height:p}),blob29:({width:g,height:p})=>b({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:g,height:p}),blob3:({width:g,height:p})=>b({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:g,height:p}),blob30:({width:g,height:p})=>b({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:g,height:p}),blob31:({width:g,height:p})=>b({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:g,height:p}),blob32:({width:g,height:p})=>b({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:g,height:p}),blob4:({width:g,height:p})=>b({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:g,height:p}),blob5:({width:g,height:p})=>b({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:g,height:p}),blob6:({width:g,height:p})=>b({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:g,height:p}),blob7:({width:g,height:p})=>b({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:g,height:p}),blob8:({width:g,height:p})=>b({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:g,height:p}),blob9:({width:g,height:p})=>b({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:g,height:p})}}($1)),$1}var Eb;function BO(){return Eb||(Eb=1,function(e){var i=hd&&hd.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const t=i(Tn()),n=Qi,a=Ja,l=wv(),u=bc(),c=Xs(),h=jp(),b={};e.FigureElement=(0,n.observer)(({element:_,store:k})=>{const O=_.selectable||k.role==="admin",v=(0,c.isTouchDevice)(),[x,g]=t.default.useState(!1),p=k.selectedShapes.indexOf(_)>=0,P=Math.min(_.strokeWidth,_.width/2,_.height/2),d=Math.max(0,Math.min(_.width/2,_.height/2,_.cornerRadius)),m=(0,h.useColor)(_,_.a.fill,"fill"),y=Object.assign(Object.assign({width:_.a.width,height:_.a.height},m),{cornerRadius:d,opacity:_.animated("opacity"),shadowEnabled:_.shadowEnabled,shadowBlur:_.shadowBlur,shadowOffsetX:_.shadowOffsetX,shadowOffsetY:_.shadowOffsetY,shadowColor:_.shadowColor,shadowOpacity:_.shadowOpacity,preventDefault:!v||p,hideInExport:!_.showInExport}),w=(0,h.useColor)(_,_.stroke,"stroke"),L=Object.assign(Object.assign({visible:P>0,x:P/2,y:P/2,width:_.a.width-P,height:_.a.height-P},w),{strokeWidth:P,cornerRadius:Math.max(0,d-P),dash:_.dash.map(S=>S*P),opacity:_.animated("opacity"),hideInExport:!_.showInExport,listening:!1}),R=(D=_.subType,b[D]||(b[D]=(E=(0,l.subTypeToPathDataFunc)(D),(0,n.observer)(({element:S,fillProps:A,strokeProps:M})=>{let T=E({width:S.a.width,height:S.a.height,cornerRadius:S.cornerRadius}),B=1,U=1;typeof T!="string"&&(B=T.scaleX,U=T.scaleY,T=T.path);const Q=t.default.useRef(null);return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Rect,{width:S.width,height:S.height,fill:"transparent"}),t.default.createElement(a.Path,Object.assign({},A,{ref:Q,data:T,scaleX:B,scaleY:U})),t.default.createElement(a.Group,{clipFunc:X=>{const $=Q.current;if($){var j=$.dataArray;X.beginPath();for(var I=0;I<j.length;I++){var z=j[I].command,H=j[I].points;switch(z){case"L":X.lineTo(H[0],H[1]);break;case"M":X.moveTo(H[0],H[1]);break;case"C":X.bezierCurveTo(H[0],H[1],H[2],H[3],H[4],H[5]);break;case"Q":X.quadraticCurveTo(H[0],H[1],H[2],H[3]);break;case"A":var K=H[0],ee=H[1],V=H[2],Z=H[3],Y=H[4],ne=H[5],re=H[6],ie=H[7],ae=V>Z?V:Z,se=V>Z?1:V/Z,de=V>Z?Z/V:1;X.translate(K,ee),X.rotate(re),X.scale(se,de),X.arc(0,0,ae,Y,Y+ne,1-ie),X.scale(1/se,1/de),X.rotate(-re),X.translate(-K,-ee);break;case"z":X.closePath()}}}},scaleX:B,scaleY:U},t.default.createElement(a.Path,Object.assign({},M,{x:0,y:0,data:T,strokeWidth:2*M.strokeWidth,dash:M.dash.map(X=>X)}))))}))),b[D]||a.Group);var D,E;return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Group,{id:_.id,x:_.a.x,y:_.a.y,rotation:_.a.rotation,opacity:_.a.opacity,listening:O,draggable:v?_.draggable&&p:_.draggable,name:"element",onMouseEnter:()=>{g(!0)},onMouseLeave:()=>{g(!1)},onDragMove:S=>{_.set({x:S.target.x(),y:S.target.y()})},onDragEnd:S=>{_.set({x:S.target.x(),y:S.target.y()})},onTransform:S=>{const A=S.target.scale();S.target.scaleX(1),S.target.scaleY(1),_.set({width:_.width*A.x,height:_.height*A.y,x:S.target.x(),y:S.target.y(),rotation:S.target.rotation()})}},t.default.createElement(R,{element:_,fillProps:y,strokeProps:L})),(x||p)&&t.default.createElement(u.Highlighter,{element:_}))})}(hd)),hd}var Ob;function UO(){return Ob||(Ob=1,function(e){var i=rd&&rd.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerShapeComponent=x;const t=i(Tn()),n=Qi,a=L4(),l=D4(),u=jO(),c=FO(),h=zO(),b=BO(),_=Ja,k=ts(),O=(0,n.observer)(p=>{const{element:P,store:d}=p,{children:m}=P,y=P.selectable||d.role==="admin";return t.default.createElement(_.Group,{opacity:P.opacity,listening:y,hideInExport:!P.showInExport},m.map(w=>t.default.createElement(g,Object.assign({},p,{key:w.id,store:d,element:w}))))}),v={text:a.TextElement,image:l.ImageElement,svg:l.ImageElement,line:c.LineElement,video:h.VideoElement,figure:b.FigureElement,group:O};function x(p,P){v[p]=P}const g=(0,n.observer)(p=>{let P=v[p.element.type];return p.element.type==="text"&&k.flags.htmlRenderEnabled&&(P=u.HTMLElement),p.element.visible?P?t.default.createElement(P,Object.assign({},p)):(console.error("Can not find component for "+p.element.type),null):null});e.default=g}(rd)),rd}var W1={},xb;function qO(){return xb||(xb=1,function(e){function i(t,n,a="scale"){const l=n.width/n.height;let u,c;l>=t.width/t.height?(u=t.width,c=t.width/l):(u=t.height*l,c=t.height);let h=0,b=0;return a==="left-top"?(h=0,b=0):a==="left-middle"?(h=0,b=(t.height-c)/2):a==="left-bottom"?(h=0,b=t.height-c):a==="center-top"?(h=(t.width-u)/2,b=0):a==="center-middle"?(h=(t.width-u)/2,b=(t.height-c)/2):a==="center-bottom"?(h=(t.width-u)/2,b=t.height-c):a==="right-top"?(h=t.width-u,b=0):a==="right-middle"?(h=t.width-u,b=(t.height-c)/2):a==="right-bottom"?(h=t.width-u,b=t.height-c):a==="scale"?(h=0,b=0,u=t.width,c=t.height):console.error(new Error("Unknown clip position property - "+a)),{cropX:h,cropY:b,cropWidth:u,cropHeight:c}}Object.defineProperty(e,"__esModule",{value:!0}),e.getCrop=i}(W1)),W1}var $a={},Y1={},Pb;function HO(){return Pb||(Pb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.setAPI=e.iconscoutDownload=e.iconscoutList=e.svgapiDownload=e.svgapiList=e.unsplashDownload=e.unsplashList=e.textTemplateList=e.templateList=e.removeBackground=e.polotnoShapesList=e.getGoogleFontImage=e.getGoogleFontsListAPI=e.URLS=e.getAPI=e.API=e.URL=void 0;const i=Sv();e.URL="https://api.polotno.com",e.API="https://api.polotno.com/api";const t=()=>e.URL+"/api";e.getAPI=t;const n={},a=(m,y)=>{n[m]||(n[m]=!0,console.error(y))},l=`API for iconscout is provided as a demonstration.
|
|
254
|
-
For production usage you have to use your own API endpoint.
|
|
255
|
-
https://iconscout.com/developers, https://iconscout.com/legal/api-license-development-agreement
|
|
256
|
-
https://polotno.com/docs/server-api`;e.URLS={unsplashList:({query:m,page:y=1})=>`${(0,e.getAPI)()}/get-unsplash?query=${m}&per_page=20&page=${y}&KEY=${(0,i.getKey)()}`,unsplashDownload:m=>`${(0,e.getAPI)()}/download-unsplash?id=${m}&KEY=${(0,i.getKey)()}`,svgapiList:({query:m,page:y=0})=>`${(0,e.getAPI)()}/get-svgapi?query=${m}&page=${y}&per_page=20&KEY=${(0,i.getKey)()}`,svgapiDownload:m=>`${(0,e.getAPI)()}/download-svgapi?path=${m}&KEY=${(0,i.getKey)()}`,iconscoutList:({query:m,page:y=1})=>(a("iconscout",l),`${(0,e.getAPI)()}/get-iconscout?query=${m}&page=${y}&KEY=${(0,i.getKey)()}`),iconscoutDownload:m=>(a("iconscout",l),`${(0,e.getAPI)()}/download-iconscout?uuid=${m}&KEY=${(0,i.getKey)()}`),nounProjectList:({query:m,page:y=1})=>`${(0,e.getAPI)()}/get-nounproject?query=${m}&page=${y}&KEY=${(0,i.getKey)()}`,nounProjectDownload:m=>`${(0,e.getAPI)()}/download-nounproject?id=${m}&KEY=${(0,i.getKey)()}`,templateList:({query:m,page:y=1,sizeQuery:w})=>`${(0,e.getAPI)()}/get-templates?${w}&query=${m}&per_page=30&page=${y}&KEY=${(0,i.getKey)()}`};const u=()=>`${(0,e.getAPI)()}/get-google-fonts?KEY=${(0,i.getKey)()}`;e.getGoogleFontsListAPI=u;const c=m=>{return`${e.URL}/google-fonts-previews/black/${y=m,w=" ",L="-",y.replace(new RegExp(w,"g"),L)}.png`;var y,w,L};e.getGoogleFontImage=c;const h=()=>`${(0,e.getAPI)()}/get-basic-shapes?KEY=${(0,i.getKey)()}`;e.polotnoShapesList=h;const b=()=>`${(0,e.getAPI)()}/remove-image-background?KEY=${(0,i.getKey)()}`;e.removeBackground=b;const _=m=>e.URLS.templateList(m);e.templateList=_;const k=()=>`${(0,e.getAPI)()}/get-text-templates?KEY=${(0,i.getKey)()}`;e.textTemplateList=k;const O=m=>e.URLS.unsplashList(m);e.unsplashList=O;const v=m=>e.URLS.unsplashDownload(m);e.unsplashDownload=v;const x=m=>e.URLS.svgapiList(m);e.svgapiList=x;const g=m=>e.URLS.svgapiDownload(m);e.svgapiDownload=g;const p=m=>e.URLS.iconscoutList(m);e.iconscoutList=p;const P=m=>e.URLS.iconscoutDownload(m);e.iconscoutDownload=P;const d=(m,y)=>{e.URLS[m]=y};e.setAPI=d}(Y1)),Y1}var Cb;function Sv(){return Cb||(Cb=1,function(e){var i=$a&&$a.__createBinding||(Object.create?function(D,E,S,A){A===void 0&&(A=S);var M=Object.getOwnPropertyDescriptor(E,S);M&&!("get"in M?!E.__esModule:M.writable||M.configurable)||(M={enumerable:!0,get:function(){return E[S]}}),Object.defineProperty(D,A,M)}:function(D,E,S,A){A===void 0&&(A=S),D[A]=E[S]}),t=$a&&$a.__setModuleDefault||(Object.create?function(D,E){Object.defineProperty(D,"default",{enumerable:!0,value:E})}:function(D,E){D.default=E}),n=$a&&$a.__importStar||function(){var D=function(E){return D=Object.getOwnPropertyNames||function(S){var A=[];for(var M in S)Object.prototype.hasOwnProperty.call(S,M)&&(A[A.length]=M);return A},D(E)};return function(E){if(E&&E.__esModule)return E;var S={};if(E!=null)for(var A=D(E),M=0;M<A.length;M++)A[M]!=="default"&&i(S,E,A[M]);return t(S,E),S}}();Object.defineProperty(e,"__esModule",{value:!0}),e.getKey=e.isCreditVisible=void 0,e.isKeyPaid=L,e.validateKey=R;const a=n(da),l=HO(),u=ts(),c=a.observable({value:!1}),h=()=>c.value;e.isCreditVisible=h;const b=a.action(()=>{c.value=!0});let _="";const k=()=>_||"";e.getKey=k;const O=5,v=3e3,x="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",g="Polotno API key is not valid. Please get new API key here: https://polotno.com/cabinet",p="Can not validate Polotno API key. Please report to anton@polotno.com immediately.",P="%cPolotno Free Version. Development or non-commercial usage only. https://polotno.com/";let d=window.location.origin;const m=navigator.userAgent.indexOf("Headless")>-1,y=navigator.userAgent.indexOf("Electron")>-1;d==="file://"&&m&&(d="headless"),d==="file://"&&y&&(d="electron");const w=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${d}" here: https://polotno.com/cabinet`;async function L(D){for(let E=0;E<O;E++)try{const S=await fetch((0,l.getAPI)()+"/validate-key",{method:"POST",body:JSON.stringify({key:D,site:location.host})});if(!D)return console.warn(x),!1;if(S.status!==200){await new Promise(M=>setTimeout(M,v));continue}const A=await S.json();return A.is_valid||console.warn(g),A.is_paid||console.log(P,"background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),A.is_domain_valid||console.log(w,"background: rgba(247, 101, 68, 1); color: white; padding: 5px; margin: 5px;"),(0,u.useRemoveBackground)(A.remove_background_enabled),A.is_paid||!1}catch{await new Promise(A=>setTimeout(A,v))}return console.error(p),!0}async function R(D,E){_=D,await L(D)&&!E||b()}}($a)),$a}var K1={},kb;function Ev(){return kb||(kb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.pxToUnitString=e.unitToPx=e.pxToUnitRounded=e.pxToUnit=void 0;const i=({px:l,unit:u="px",dpi:c})=>{switch(u){case"pt":default:return l;case"mm":return l/(c/25.4);case"cm":return l/(c/2.54);case"in":return l/c}};e.pxToUnit=i;const t=({px:l,precious:u=2,dpi:c=72,unit:h="px"})=>parseFloat((0,e.pxToUnit)({px:l,dpi:c,unit:h}).toFixed(u));e.pxToUnitRounded=t;const n=({unitVal:l,dpi:u,unit:c})=>l/(0,e.pxToUnit)({px:1,unit:c,dpi:u});e.unitToPx=n;const a=l=>{const u=parseFloat((0,e.pxToUnit)(l).toFixed(1));switch(l.unit){case"pt":return`${Math.round(u)}pt`;case"mm":return`${u}mm`;case"cm":return`${u}cm`;case"in":return`${u}in`;default:return`${Math.round(u)}px`}};e.pxToUnitString=a}(K1)),K1}var Tb;function GO(){return Tb||(Tb=1,function(e){var i=Is&&Is.__rest||function($,j){var I={};for(var z in $)Object.prototype.hasOwnProperty.call($,z)&&j.indexOf(z)<0&&(I[z]=$[z]);if($!=null&&typeof Object.getOwnPropertySymbols=="function"){var H=0;for(z=Object.getOwnPropertySymbols($);H<z.length;H++)j.indexOf(z[H])<0&&Object.prototype.propertyIsEnumerable.call($,z[H])&&(I[z[H]]=$[z[H]])}return I},t=Is&&Is.__importDefault||function($){return $&&$.__esModule?$:{default:$}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerNextDomDrop=e.setTransformerStyle=void 0,e.registerTransformerAttrs=D;const n=t(Tn()),a=Qi,l=da,u=Ja,c=t(Dp()),h=t(Ji()),b=t(UO()),_=H4(),k=D4(),O=qO(),v=Sv(),x=Hd(),g=Ev(),p=ts(),P=Xs(),d=h.default.DD._drag;window.removeEventListener("mousemove",d),h.default.DD._drag=function($){(0,l.runInAction)(()=>{d.call(this,$)})},window.addEventListener("mousemove",h.default.DD._drag);const m=new h.default.Group;m.add(new h.default.Rect({width:20,height:20,fill:"white"})),m.add(new h.default.Path({scaleX:20/24,scaleY:20/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 y=m.toCanvas({pixelRatio:2,width:20,height:20}),w={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:$=>{$.hasName("rotater")&&$.setAttrs({width:20,height:20,cornerRadius:20/2,offsetX:20/2,offsetY:20/2,fillPatternImage:y,fillPatternScaleX:20/20/2,fillPatternScaleY:20/20/2,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}},L=$=>{Object.assign(w,$)};e.setTransformerStyle=L;const R={text:{enabledAnchors:["top-left","top-right","middle-left","bottom-left","bottom-right","middle-right"]},svg:{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"]}};function D($,j){R[$]=R[$]||j,Object.assign(R[$],j)}const E=$=>n.default.createElement(u.Rect,Object.assign({},$,{preventDefault:!1})),S=$=>{var{url:j}=$,I=i($,["url"]);const[z,H]=(0,c.default)(j,"anonymous"),K=z?(0,O.getCrop)(z,{width:I.width,height:I.height},"center-middle"):{};return(0,k.useImageLoader)(H,"background"),n.default.createElement(u.Image,Object.assign({image:z},I,K))},A=$=>n.default.createElement(u.Rect,Object.assign({},$)),M=$=>{const{background:j,scale:I,borderColor:z}=$,H=i($,["background","scale","borderColor"]),K=n.default.useMemo(()=>!!h.default.Util.colorToRGBA(j),[j]),ee=n.default.useMemo(()=>{const V=document.createElement("canvas"),Z=30;V.width=60,V.height=60;const Y=V.getContext("2d");return Y&&(Y.fillStyle="black",Y.fillRect(Z,0,Z,Z),Y.fillRect(0,Z,Z,Z)),V},[]);return n.default.createElement(n.default.Fragment,null,n.default.createElement(u.Rect,Object.assign({fillPatternImage:ee},H,{opacity:.1,hideInExport:!0})),K?n.default.createElement(A,Object.assign({fill:j},H)):n.default.createElement(S,Object.assign({url:j},H)))},T=(0,a.observer)(({selection:$})=>$.visible?n.default.createElement(u.Rect,{name:"selection",x:Math.min($.x1,$.x2),y:Math.min($.y1,$.y2),width:Math.abs($.x1-$.x2),height:Math.abs($.y1-$.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),B=(0,a.observer)(({x:$,y:j,width:I,height:z,rotation:H,anchor:K,store:ee})=>{const V=(0,x.getClientRect)({x:$,y:j,width:I,height:z,rotation:h.default.Util.radToDeg(H)});if(K===void 0)return null;const Z=(z/2+70)*Math.cos(H-Math.PI/2),Y=(z/2+70)*Math.sin(H-Math.PI/2),ne=(0,g.pxToUnitRounded)({unit:ee.unit,dpi:ee.dpi,px:I/ee.scale,precious:ee.unit==="px"?0:1})+" x "+(0,g.pxToUnitRounded)({unit:ee.unit,dpi:ee.dpi,px:z/ee.scale,precious:ee.unit==="px"?0:1})+(ee.unit==="px"?"":" "+ee.unit);return n.default.createElement(n.default.Fragment,null,n.default.createElement(u.Label,{x:(V.minX+V.maxX)/2+Z,y:(V.minY+V.maxY)/2+Y,offsetX:14,offsetY:14,visible:K==="rotater"},n.default.createElement(u.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)"}),n.default.createElement(u.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:Math.round(h.default.Util.radToDeg(H)).toString()+"°"})),n.default.createElement(u.Label,{x:(V.minX+V.maxX)/2,y:V.maxY+20,visible:K!=="rotater"},n.default.createElement(u.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"up",pointerHeight:0,pointerWidth:0}),n.default.createElement(u.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:8,text:ne})))}),U=(0,a.observer)(({elements:$,store:j})=>{const I=$.filter(H=>H.alwaysOnTop),z=$.filter(H=>!H.alwaysOnTop).concat(I);return n.default.createElement(n.default.Fragment,null,z.map(H=>n.default.createElement(b.default,{key:H.id,store:j,element:H,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}})))});let Q=null;const X=$=>{Q=$};e.registerNextDomDrop=X,e.default=(0,a.observer)(({store:$,page:j,width:I,height:z,pageControlsEnabled:H,backColor:K,pageBorderColor:ee,activePageBorderColor:V,components:Z,bleedColor:Y,altCloneEnabled:ne})=>{const re=$.bleedVisible?j.bleed:0,ie=j.computedWidth+2*re,ae=j.computedHeight+2*re,se=(I-ie*$.scale)/2,de=(z-ae*$.scale)/2,he=n.default.useRef(null),Se=n.default.useRef(null),Ee=n.default.useRef(null),De=H==null||H,[fe,ge]=n.default.useState(null),[Te,Re]=n.default.useState({}),ue=$.selectedElements.find(Ne=>Ne._cropModeEnabled),me=$.selectedShapes.filter(Ne=>!Ne.resizable).length>0,xe=$.selectedShapes.filter(Ne=>!Ne.draggable).length>0,Ie=$.selectedElements.filter(Ne=>!Ne.visible).length>0;n.default.useLayoutEffect(()=>{var Ne,Ye,Ze;if(!he.current)return;const ke=he.current.getStage(),vt=$.selectedShapes.map(ot=>ot._cropModeEnabled?null:ke.findOne("#"+ot.id)).filter(ot=>ot),je=$.selectedElements.length===1&&((Ne=$.selectedElements[0])===null||Ne===void 0?void 0:Ne.type)||"many";R[je]?(he.current.setAttrs(Object.assign(Object.assign({},w),R[je])),je!=="svg"&&je!=="image"||$.selectedElements[0].keepRatio||he.current.setAttrs({enabledAnchors:w.enabledAnchors}),je==="text"&&p.flags.textVerticalResizeEnabled&&he.current.setAttrs({enabledAnchors:(Ye=R.text.enabledAnchors)===null||Ye===void 0?void 0:Ye.concat(["bottom-center"])})):he.current.setAttrs(w),me&&he.current.enabledAnchors([]),xe&&he.current.rotateEnabled(!1),vt.find(ot=>ot==null?void 0:ot.isDragging())&&vt.forEach(ot=>{ot.isDragging()||ot==null||ot.startDrag()}),he.current.nodes(vt),(Ze=he.current.getLayer())===null||Ze===void 0||Ze.batchDraw()},[$.selectedElements,ue,me,Ie,xe]);const tt=(0,a.useLocalObservable)(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),lt=n.default.useRef(!1),Fe=(0,P.isTouchDevice)(),ze=(0,l.action)(Ne=>{var Ye,Ze;if(Fe)return;lt.current=!1;const ke=Ne.target.findAncestor(".elements-container"),vt=Ne.target.findAncestor("Transformer"),je=Ne.target.findAncestor(".page-abs-container");if(ke||vt||je)return;const ot=(Ye=Ne.target.getStage())===null||Ye===void 0?void 0:Ye.getPointerPosition();ot&&(tt.visible=!0,tt.x1=ot.x,tt.y1=ot.y,tt.x2=ot.x,tt.y2=ot.y,((Ze=Ne.target.getStage())===null||Ze===void 0?void 0:Ze.getPointersPositions().length)>=2&&(tt.visible=!1))});n.default.useEffect(()=>{const Ne=(0,l.action)(Ze=>{var ke,vt;if(!tt.visible)return;(ke=Se.current)===null||ke===void 0||ke.setPointersPositions(Ze);let je=((vt=Se.current)===null||vt===void 0?void 0:vt.getPointerPosition())||{x:tt.x2,y:tt.y2};tt.x2=je.x,tt.y2=je.y}),Ye=(0,l.action)(()=>{if(!tt.visible||!Se.current)return;const Ze=Se.current.findOne(".selection"),ke=Ze?Ze.getClientRect():{width:0,height:0,x:0,y:0};if(ke.width&&ke.height){const vt=[];Se.current.find(".element").forEach(ot=>{const dn=ot.getClientRect(),Yt=$.getElementById(ot.id()),hn=Yt==null?void 0:Yt.draggable,Ge=Yt==null?void 0:Yt.selectable;h.default.Util.haveIntersection(ke,dn)&&hn&&Ge&&vt.push(Yt.top.id)});const je=[...new Set(vt)];$.selectElements(je)}tt.visible=!1,lt.current=!0});return window.addEventListener("mousemove",Ne),window.addEventListener("touchmove",Ne),window.addEventListener("mouseup",Ye),window.addEventListener("touchend",Ye),()=>{window.removeEventListener("mousemove",Ne),window.removeEventListener("touchmove",Ne),window.removeEventListener("mouseup",Ye),window.removeEventListener("touchend",Ye)}},[]);const Ue=n.default.useRef(!1);n.default.useEffect(()=>{var Ne;let Ye;const Ze=(Ne=Ee.current)===null||Ne===void 0?void 0:Ne.closest(".polotno-workspace-inner"),ke=()=>{Ue.current=!0,clearTimeout(Ye),Ye=setTimeout(()=>{Ue.current=!1},300)};return Ze.addEventListener("scroll",ke),()=>{clearTimeout(Ye),Ze.removeEventListener("scroll",ke)}},[]);const Xe=Ne=>{if($.activePage!==j&&j.select(),Ue.current||lt.current)return;const Ye=Ne.evt.ctrlKey||Ne.evt.metaKey||Ne.evt.shiftKey,Ze=Ne.target.findAncestor(".elements-container"),ke=Ne.target.findAncestor(".page-abs-container"),vt=Ne.target.findAncestor("Transformer");if(!(Ye||Ze||vt||ke))return void $.selectElements([]);const je=Ne.target.findAncestor(".element",!0),ot=$.getElementById(je==null?void 0:je.id()),dn=ot==null?void 0:ot.top,Yt=dn==null?void 0:dn.id,hn=$.selectedElementsIds.indexOf(Yt)>=0;Yt&&Ye&&!hn?$.selectElements($.selectedElementsIds.concat([Yt])):Yt&&Ye&&hn?$.selectElements($.selectedElementsIds.filter(Ge=>Ge!==Yt)):!Yt||Ye||hn||$.selectElements([Yt])};(0,_.useSnap)(he,$);const dt=$.activePage===j,kt=Z==null?void 0:Z.PageControls,Et=Z==null?void 0:Z.Tooltip,be=1/$.scale,we=0/$.scale;return n.default.createElement("div",{ref:Ee,onDragOver:Ne=>Ne.preventDefault(),onDrop:Ne=>{if(Ne.preventDefault(),!Se.current)return;Se.current.setPointersPositions(Ne);const Ye=Se.current.findOne(".elements-container").getRelativePointerPosition(),Ze=Se.current.getPointerPosition(),ke=Se.current.getAllIntersections(Ze).map(ot=>ot.findAncestor(".element",!0)).filter(Boolean),vt=[...new Set(ke.reverse())].map(ot=>$.getElementById(ot.id())),je=vt[0];Q&&(Q(Ye,je,{elements:vt,page:j}),Q=null)},style:{position:"relative",width:I+"px"},className:"polotno-page-container"+(dt?" active-page":"")},n.default.createElement(u.Stage,{ref:Se,width:Math.min(I,10*window.innerWidth),height:Math.min(z,10*window.innerHeight),onClick:Xe,onTap:Xe,onMouseDown:ze,onMouseMove:Ne=>{if(!Ne.evt.altKey&&fe)return void ge(null);if(!Ne.evt.altKey)return;const Ye=Ne.target.findAncestor(".element",!0),Ze=Ye==null?void 0:Ye.id();if(!$.selectedElements[0]||$.selectedElementsIds.includes(Ze))return;const ke=(0,x.getTotalClientRect)($.selectedShapes),vt=Ze?$.getElementById(Ze):{x:0,y:0,width:j.computedWidth,height:j.computedHeight,rotation:0},je=(0,x.getClientRect)(vt),ot=[];ke.minX>je.maxX&&ot.push({distance:ke.minX-je.maxX,box1:ke,box2:je,points:[{x:ke.minX,y:ke.minY+ke.height/2},{x:je.maxX,y:ke.minY+ke.height/2},{x:je.maxX,y:je.minY+je.height/2}]}),ke.maxX<je.minX&&ot.push({distance:je.minX-ke.maxX,box1:ke,box2:je,points:[{x:ke.maxX,y:ke.minY+ke.height/2},{x:je.minX,y:ke.minY+ke.height/2},{x:je.minX,y:je.minY+je.height/2}]}),ke.minY>je.maxY&&ot.push({box1:ke,box2:je,distance:ke.minY-je.maxY,points:[{x:ke.minX+ke.width/2,y:ke.minY},{x:ke.minX+ke.width/2,y:je.maxY},{x:je.minX+je.width/2,y:je.maxY}]}),ke.maxY<je.minY&&ot.push({box1:ke,box2:je,distance:je.minY-ke.maxY,points:[{x:ke.minX+ke.width/2,y:ke.maxY},{x:ke.minX+ke.width/2,y:je.minY},{x:je.minX+je.width/2,y:je.minY}]}),ke.minX>=je.minX&&ke.maxX<=je.maxX&&ke.minY>=je.minY&&ke.maxY<=je.maxY&&(ot.push({distance:ke.minX-je.minX,box1:ke,box2:je,points:[{x:ke.minX,y:ke.minY+ke.height/2},{x:je.minX,y:ke.minY+ke.height/2},{x:je.minX,y:je.minY+je.height/2}]}),ot.push({distance:je.maxX-ke.maxX,box1:ke,box2:je,points:[{x:ke.maxX,y:ke.minY+ke.height/2},{x:je.maxX,y:ke.minY+ke.height/2},{x:je.maxX,y:je.minY+je.height/2}]}),ot.push({box1:ke,box2:je,distance:ke.minY-je.minY,points:[{x:ke.minX+ke.width/2,y:ke.minY},{x:ke.minX+ke.width/2,y:je.minY},{x:je.minX+je.width/2,y:je.minY}]}),ot.push({box1:ke,box2:je,distance:je.maxY-ke.maxY,points:[{x:ke.minX+ke.width/2,y:ke.maxY},{x:ke.minX+ke.width/2,y:je.maxY},{x:je.minX+je.width/2,y:je.maxY}]})),JSON.stringify(fe)!==JSON.stringify(ot)&&ge(ot)},onDragStart:Ne=>{var Ye;const Ze=Ne.target.findAncestor(".element",!0);if(Ze){const ke=$.getElementById(Ze==null?void 0:Ze.id()),vt=ke==null?void 0:ke.top,je=vt==null?void 0:vt.id;!($.selectedElementsIds.indexOf(je)>=0)&&je&&($.selectElements([je]),Ne.target.stopDrag(),Ne.target.startDrag(Ne),(Ye=he.current)===null||Ye===void 0||Ye.startDrag(Ne))}fe&&ge(null)},pageId:j.id,style:{position:"relative"}},n.default.createElement(u.Layer,null,n.default.createElement(E,{width:I,height:z,fill:K}),n.default.createElement(u.Group,{x:se,y:de,scaleX:$.scale,scaleY:$.scale,name:"page-container"},n.default.createElement(u.Group,{name:"page-container-2"},n.default.createElement(u.Group,{name:"page-background-group",x:re,y:re},n.default.createElement(M,{x:-j.bleed,y:-j.bleed,width:j.computedWidth+2*j.bleed,height:j.computedHeight+2*j.bleed,background:j.background,name:"page-background",preventDefault:!1,scale:$.scale})),n.default.createElement(u.Group,{x:re,y:re,name:"elements-container",listening:!$.isPlaying},n.default.createElement(u.Rect,{name:"elements-area",width:j.computedWidth,height:j.computedHeight,listening:!1}),n.default.createElement(U,{elements:j.children,store:$})),n.default.createElement(u.Rect,{stroke:Y,name:"bleed",strokeWidth:j.bleed,x:j.bleed/2,y:j.bleed/2,width:j.computedWidth+j.bleed,height:j.computedHeight+j.bleed,listening:!1,visible:j.bleed>0&&$.bleedVisible,hideInExport:!0}))),n.default.createElement(u.Line,{name:"workspace-background",points:[0,0,I,0,I,z,0,z,0,0,se,de,se,z-de,I-se,z-de,I-se,de,se,de],listening:!1,closed:!0,fill:K}),n.default.createElement(u.Group,{x:se,y:de,scaleX:$.scale,scaleY:$.scale},n.default.createElement(u.Rect,{name:"page-highlight",hideInExport:!0,x:-be/2-we,y:-be/2-we,width:ie+be+2*we,height:ae+be+2*we,stroke:dt&&$.pages.length>1?V:ee,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})),n.default.createElement(u.Group,{x:se+re*$.scale,y:de+re*$.scale,scaleX:$.scale,scaleY:$.scale,name:"page-abs-container"},n.default.createElement(u.Transformer,{ref:he,onDragStart:Ne=>{var Ye;!((Ye=Ne.evt)===null||Ye===void 0)&&Ye.altKey&&ne&&$.selectedElements.forEach(Ze=>{const ke=Ze.clone({},{skipSelect:!0}),vt=j.children.indexOf(Ze);j.setElementZIndex(ke.id,vt)}),$.history.startTransaction()},onDragEnd:()=>{$.history.endTransaction()},onTransformStart:()=>{$.history.startTransaction()},boundBoxFunc:(Ne,Ye)=>{const Ze=Math.abs(Ye.width)<1||Math.abs(Ye.height)<1,ke=Math.abs(Ne.width)<1||Math.abs(Ne.height)<1;return Ze&&!ke?Ne:Ye},onTransform:Ne=>{var Ye,Ze;const ke=he.current.nodes(),vt=ke[ke.length-1];if(Ne.target!==vt)return;const je=(Ye=he.current)===null||Ye===void 0?void 0:Ye.__getNodeRect(),ot=(Ze=he.current)===null||Ze===void 0?void 0:Ze.getActiveAnchor();Re({anchor:ot,x:je.x,y:je.y,rotation:je.rotation,width:je.width,height:je.height})},onTransformEnd:Ne=>{Re({}),$.history.endTransaction()},visible:!$.isPlaying}),fe&&fe.map(({points:Ne,distance:Ye,box1:Ze,box2:ke},vt)=>n.default.createElement(u.Group,{name:"distances-container",hideInExport:!0,key:vt,listening:!1},n.default.createElement(u.Rect,Object.assign({},Ze,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(u.Rect,Object.assign({},ke,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(u.Line,{points:[Ne[0].x,Ne[0].y,Ne[1].x,Ne[1].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(u.Line,{points:[Ne[1].x,Ne[1].y,Ne[2].x,Ne[2].y],stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1}),n.default.createElement(u.Label,{x:(Ne[0].x+Ne[1].x)/2,y:(Ne[0].y+Ne[1].y)/2,offsetY:-10,scaleX:1/$.scale,scaleY:1/$.scale},n.default.createElement(u.Tag,{cornerRadius:5,fill:"rgb(0, 161, 255)",pointerDirection:"down"}),n.default.createElement(u.Text,{align:"center",verticalAlign:"middle",fill:"white",padding:5,text:(0,g.pxToUnitString)({unit:$.unit,dpi:$.dpi,px:Ye})})))),j._rendering&&n.default.createElement(u.Group,null,n.default.createElement(u.Rect,{width:ie,height:ae,fill:"rgba(255,255,255,0.9)"}),n.default.createElement(u.Text,{text:"Rendering...",fontSize:60,width:ie,height:ae,align:"center",verticalAlign:"middle"})),Et&&n.default.createElement(Et,{components:Z,store:$,page:j,stageRef:Se})),n.default.createElement(B,Object.assign({},Te,{store:$})),n.default.createElement(T,{selection:tt}),(0,v.isCreditVisible)()&&n.default.createElement(u.Text,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:I-170,y:z-18,onMouseEnter:Ne=>{Ne.target.getStage().container().style.cursor="pointer"},onMouseLeave:Ne=>{Ne.target.getStage().container().style.cursor=""},onTouchStart:Ne=>{Ne.cancelBubble=!0},onMouseDown:Ne=>{Ne.cancelBubble=!0},onClick:()=>{window.open("https://polotno.com")},onTap:()=>{window.open("https://polotno.com")}}),n.default.createElement(u.Group,{name:"line-guides"}))),De&&kt&&n.default.createElement(kt,{store:$,page:j,xPadding:se,yPadding:de}))})}(Is)),Is}var pd={},Ab;function VO(){return Ab||(Ab=1,function(e){var i=pd&&pd.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(e,"__esModule",{value:!0}),e.TopRules=void 0,e.LeftRules=v;const t=i(Tn()),n=Hd(),a=Ev(),l=Qi,u=q4(),c=(0,u.styled)("div",t.default.forwardRef)`
|
|
257
|
-
position: absolute;
|
|
258
|
-
top: 0;
|
|
259
|
-
left: 0;
|
|
260
|
-
pointer-events: none;
|
|
261
|
-
`,h=(0,u.styled)("div",t.default.forwardRef)`
|
|
262
|
-
height: 14px;
|
|
263
|
-
position: sticky;
|
|
264
|
-
font-size: 8px;
|
|
265
|
-
line-height: 14px;
|
|
266
|
-
top: 0;
|
|
267
|
-
left: 0;
|
|
268
|
-
color: grey;
|
|
269
|
-
border-bottom: 1px solid grey;
|
|
270
|
-
background-color: #e8e8e8;
|
|
271
|
-
overflow: hidden;
|
|
272
|
-
`,b=(0,u.styled)("div",t.default.forwardRef)`
|
|
273
|
-
left: 0;
|
|
274
|
-
width: 14px;
|
|
275
|
-
position: sticky;
|
|
276
|
-
font-size: 8px;
|
|
277
|
-
line-height: 14px;
|
|
278
|
-
color: grey;
|
|
279
|
-
border-right: 1px solid grey;
|
|
280
|
-
background-color: #e8e8e8;
|
|
281
|
-
overflow: hidden;
|
|
282
|
-
`,_=(0,u.styled)("div",t.default.forwardRef)`
|
|
283
|
-
position: absolute;
|
|
284
|
-
border-left: 1px solid grey;
|
|
285
|
-
padding-left: 2px;
|
|
286
|
-
`,k=(0,u.styled)("div",t.default.forwardRef)`
|
|
287
|
-
position: absolute;
|
|
288
|
-
left: 14px;
|
|
289
|
-
border-left: 1px solid grey;
|
|
290
|
-
padding-left: 2px;
|
|
291
|
-
transform: rotate(90deg);
|
|
292
|
-
transform-origin: left top;
|
|
293
|
-
overflow: hidden;
|
|
294
|
-
`,O=[.1,.2,.5,1,2,5,10,20,25,50,100,200,500,1e3,2e3,5e3,1e4];function v(){return t.default.createElement("div",null,t.default.createElement("h1",null,"Top rules"))}e.TopRules=(0,l.observer)(({store:x,width:g,height:p})=>{const P=t.default.useRef(null);if(!x.activePage)return null;const d=x.activePage,m=(x.bleedVisible&&d.bleed,d.computedWidth*x.scale),y=d.computedHeight*x.scale,w=(g-m)/2,L=(R=M=>(0,a.unitToPx)({unitVal:M,dpi:x.dpi,unit:x.unit})*x.scale,O.find(M=>R(M)>30)||1e4);var R;const D=(0,a.unitToPx)({unitVal:L,dpi:x.dpi,unit:x.unit})*x.scale,E=Math.round(m/D)+1,S=Math.round(y/D)+1,A=(0,n.getTotalClientRect)(x.selectedShapes);return t.default.createElement(c,{ref:P,className:"polotno-rulers"},t.default.createElement(h,{style:{width:g+"px"},className:"polotno-x-ruler"},[...Array(E)].map((M,T)=>t.default.createElement(_,{key:T,style:{left:w+T*D+"px",width:D+"px"}},x.unit==="px"||L>=1?Math.round(L*T):(L*T).toFixed(1))),!!x.selectedShapes.length&&t.default.createElement("div",{style:{position:"absolute",left:w+A.x*x.scale+"px",height:"14px",width:A.width*x.scale,backgroundColor:"rgba(0,0,0,0.15)"}})),x.pages.map((M,T)=>{var B;const U=M.computedHeight*x.scale,Q=(p-U)/2;return t.default.createElement(b,{key:M.id,style:{height:p+"px"},className:"polotno-y-ruler"},[...Array(S)].map((X,$)=>t.default.createElement(k,{key:$,style:{top:Q+$*D-14+"px",width:D+"px"}},x.unit==="px"||L>=1?Math.round(L*$):(L*$).toFixed(1))),((B=x.selectedShapes[0])===null||B===void 0?void 0:B.page)===M&&t.default.createElement("div",{style:{position:"absolute",top:Q+A.y*x.scale-14+"px",width:"14px",height:A.height*x.scale,backgroundColor:"rgba(0,0,0,0.15)"}}))}))})}(pd)),pd}var gd={},Rb;function $O(){return Rb||(Rb=1,function(e){var i=gd&&gd.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.AudioElement=void 0;const t=i(Tn()),n=Qi;function a(l){const[u,c]=t.default.useState(null),[h,b]=t.default.useState("loading");return t.default.useEffect(()=>{const _=new Audio(l),k=()=>{b("loaded"),c(_)},O=()=>{b("failed"),c(null)};return _.addEventListener("canplay",k),_.addEventListener("error",O),()=>{_.removeEventListener("canplay",k),_.removeEventListener("error",O)}},[l]),[u,h]}e.AudioElement=(0,n.observer)(({audio:l,store:u})=>{const[c,h]=a(l.src);return t.default.useEffect(()=>{c&&u.history.ignore(()=>{l.set({duration:1e3*c.duration})})},[c,l,u.history]),t.default.useEffect(()=>{if(!c)return;u.isPlaying&&u.animatedElementsIds.length===0?(c.currentTime=l.startTime*l.duration,c.volume=l.volume,c.play()):c.pause();const b=()=>{c.currentTime=l.startTime*l.duration},_=()=>{c.currentTime>=l.endTime*l.duration&&(c.pause(),c.currentTime=l.startTime*l.duration)};return c.addEventListener("ended",b),c.addEventListener("timeupdate",_),()=>{c.removeEventListener("ended",b),c.removeEventListener("timeupdate",_)}},[u.isPlaying,l.startTime,l.endTime,l.volume,c]),null})}(gd)),gd}var X1={},vd={};let WO="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",G4=e=>crypto.getRandomValues(new Uint8Array(e)),V4=(e,i,t)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,a=-~(1.6*n*i/e.length);return(l=i)=>{let u="";for(;;){let c=t(a),h=a;for(;h--;)if(u+=e[c[h]&n]||"",u.length===l)return u}}},YO=(e,i=21)=>V4(e,i,G4),KO=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((i,t)=>(t&=63,t<36?i+=t.toString(36):t<62?i+=(t-26).toString(36).toUpperCase():t>62?i+="-":i+="_",i),"");const XO=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:YO,customRandom:V4,nanoid:KO,random:G4,urlAlphabet:WO},Symbol.toStringTag,{value:"Module"})),Hp=Xl(XO);var Z1={},Ti={},Q1={},J1={},Mb;function $4(){return Mb||(Mb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.deepEqual=void 0;const i=function(t,n){if(t===n)return!0;if(typeof t=="object"&&t!=null&&typeof n=="object"&&n!=null){if(Object.keys(t).length!=Object.keys(n).length)return!1;for(var a in t)if(!n.hasOwnProperty(a)||!(0,e.deepEqual)(t[a],n[a]))return!1;return!0}return!1};e.deepEqual=i}(J1)),J1}var Lb;function ZO(){return Lb||(Lb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UndoManager=void 0;const i=eo,t=$4();Object.assign(i.types),e.UndoManager=i.types.model("UndoManager",{history:i.types.array(i.types.frozen()),undoIdx:-1,targetPath:""}).views(n=>({get canUndo(){return n.undoIdx>0},get canRedo(){return n.undoIdx<n.history.length-1}})).actions(n=>{let a,l,u=!1,c=null,h=0,b=0;const _=()=>b>0;function k(){const v=(0,i.getSnapshot)(a);return{pages:v.pages,width:v.width,height:v.height,custom:v.custom}}function O(v){const x=a.pages.map(d=>d.id),g=v.pages.map(d=>d.id),p=!(0,t.deepEqual)(x,g),P=!(0,t.deepEqual)(a.custom,v.custom);p?(0,i.applySnapshot)(a.pages,v.pages):a.pages.forEach((d,m)=>{(0,i.applySnapshot)(d,v.pages[m])}),P&&a.set({custom:v.custom}),a.setSize(v.width,v.height)}return{startTransaction(){b++},endTransaction(v){b--,v||this.requestAddState(k())},async ignore(v,x=!1,g=!1){g&&await new Promise(y=>setTimeout(y,10)),h&&n.addUndoState();let p=_();n.startTransaction();let P=b;try{await v()}catch(y){setTimeout(()=>{throw y})}const d=P!==b,m=!d;n.endTransaction(m),x||p||n.replaceState(),d||(clearTimeout(h),h=0)},async transaction(v){await n.ignore(v,!0),this.addUndoState()},requestAddState(v){c=v,h||_()||(u?u=!1:h=setTimeout(()=>{h=0,clearTimeout(h),_()||this.addUndoState()},100))},addUndoState(){if(u)return void(u=!1);const v=n.history[n.undoIdx];!(0,t.deepEqual)(c,v)&&(clearTimeout(h),h=0,n.history.splice(n.undoIdx+1),n.history.push(c),n.undoIdx=n.history.length-1)},afterCreate(){if(a=(0,i.resolvePath)(n,".."),!a)throw new Error("Failed to find target store for UndoManager. Please provide `targetPath` property, or a `targetStore` in the environment");l=(0,i.onSnapshot)(a,()=>{this.requestAddState(k())}),n.history.length===0&&this.requestAddState(k())},clear(){clearTimeout(h),h=0,n.history.splice(0,n.history.length),n.undoIdx=-1,n.addUndoState(k())},beforeDestroy(){l()},undo(){h&&this.addUndoState(),n.canUndo?(n.undoIdx--,u=!0,O(n.history[n.undoIdx])):console.warn("No undo history. Please check `store.history.canUndo` before calling undo action.")},redo(){h&&this.addUndoState(),n.canRedo?(n.undoIdx++,u=!0,O(n.history[n.undoIdx])):console.warn("No redo history. Please check `store.history.canRedo` before calling redo action.")},replaceState(){n.history[n.undoIdx]=k()}}}),e.default=e.UndoManager}(Q1)),Q1}var eg={},Nb;function QO(){return Nb||(Nb=1,function(e){async function i(t,n){const a=await(await fetch(t)).blob(),l=document.createElement("a"),u=URL.createObjectURL(a);l.href=u,l.download=n,document.body.appendChild(l),l.click(),setTimeout(function(){document.body.removeChild(l),window.URL.revokeObjectURL(u)},0)}Object.defineProperty(e,"__esModule",{value:!0}),e.downloadFile=i}(eg)),eg}var tg={},Ib;function JO(){return Ib||(Ib=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsPDF=n;const i="https://unpkg.com/jspdf@2.2.0/dist/jspdf.umd.min.js";let t;function n(){return t?Promise.resolve(t):new Promise(a=>{var l=document.createElement("script");l.onload=function(){t=window.jspdf.jsPDF,a(t)},l.src=i,document.head.appendChild(l)})}}(tg)),tg}var ng={},Db;function ex(){return Db||(Db=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getGIF=t,e.createGIF=n;const i="https://cdnjs.cloudflare.com/ajax/libs/gif.js/0.2.0/gif.js";function t(){return window.GIF?Promise.resolve(window.GIF):new Promise(a=>{var l=document.createElement("script");l.onload=function(){a(window.GIF)},l.src=i,document.head.appendChild(l)})}async function n({width:a,height:l}){return new(await t())({workers:4,width:a,height:l,workerScript:URL.createObjectURL(new Blob([`// gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js
|
|
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"}))})}}(ng)),ng}var rg={},jb;function tx(){return jb||(jb=1,function(e){async function i(t){for(let n=0;n<30;n++){const a=await t();if(a)return a;await new Promise(l=>setTimeout(l,50))}}Object.defineProperty(e,"__esModule",{value:!0}),e.waitTillAvailable=i}(rg)),rg}var Oo={},ig={},Fb;function _p(){return Fb||(Fb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getImageSize=t,e.loadImage=n,e.cropImage=a,e.getCrop=l;const i=Ud();function t(u){return new Promise(c=>{const h=document.createElement("img");h.onload=async()=>{h.width===0||h.height===0?c(await(0,i.getSvgSize)(u)):c({width:h.width,height:h.height})},h.crossOrigin="anonymous",h.src=u})}function n(u){return new Promise((c,h)=>{const b=document.createElement("img");b.onload=()=>{c(b)},b.onerror=_=>{h(_)},b.crossOrigin="anonymous",b.src=u})}async function a(u,c){const h=await n(u),b=document.createElement("canvas");b.width=2*h.width,b.height=2*h.height,b.getContext("2d").drawImage(h,0,0,b.width,b.height);const _=document.createElement("canvas");_.width=c.width,_.height=c.height;const k=_.getContext("2d");let{cropX:O,cropY:v}=c;const x=b.width*c.cropWidth,g=b.height*c.cropHeight,p=c.width/c.height;let P,d;const m=x/g;return c.type==="svg"?(P=x,d=g):p>=m?(P=x,d=x/p):(P=g*p,d=g),k.drawImage(b,O*b.width,v*b.height,P,d,0,0,_.width,_.height),_.toDataURL("image/png")}function l(u,c){const{width:h,height:b}=u,_=h/b;let k,O;_>=c.width/c.height?(k=c.width,O=c.width/_):(k=c.height*_,O=c.height);const v=(c.width-k)/2,x=(c.height-O)/2;return{cropX:v/c.width,cropY:x/c.height,cropWidth:k/c.width,cropHeight:O/c.height}}}(ig)),ig}var zb;function nx(){return zb||(zb=1,function(e){var i=Oo&&Oo.__createBinding||(Object.create?function(E,S,A,M){M===void 0&&(M=A);var T=Object.getOwnPropertyDescriptor(S,A);T&&!("get"in T?!S.__esModule:T.writable||T.configurable)||(T={enumerable:!0,get:function(){return S[A]}}),Object.defineProperty(E,M,T)}:function(E,S,A,M){M===void 0&&(M=A),E[M]=S[A]}),t=Oo&&Oo.__setModuleDefault||(Object.create?function(E,S){Object.defineProperty(E,"default",{enumerable:!0,value:S})}:function(E,S){E.default=S}),n=Oo&&Oo.__importStar||function(){var E=function(S){return E=Object.getOwnPropertyNames||function(A){var M=[];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(M[M.length]=T);return M},E(S)};return function(S){if(S&&S.__esModule)return S;var A={};if(S!=null)for(var M=E(S),T=0;T<M.length;T++)M[T]!=="default"&&i(A,S,M[T]);return t(A,S),A}}(),a=Oo&&Oo.__rest||function(E,S){var A={};for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&S.indexOf(M)<0&&(A[M]=E[M]);if(E!=null&&typeof Object.getOwnPropertySymbols=="function"){var T=0;for(M=Object.getOwnPropertySymbols(E);T<M.length;T++)S.indexOf(M[T])<0&&Object.prototype.propertyIsEnumerable.call(E,M[T])&&(A[M[T]]=E[M[T]])}return A};Object.defineProperty(e,"__esModule",{value:!0}),e.fixRatio=k,e.jsonToDOM=w,e.jsonToHTML=D;const l=_p(),u=n(Ud()),c=_p(),h=wv(),b=U4(),_=(E,S,...A)=>({type:E,props:S,children:A||[]});function k(E){var S=new DOMParser().parseFromString(E,"image/svg+xml");return S.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(S)}const O=async({element:E,page:S,store:A})=>{let{src:M}=E;if(E.type==="svg"&&Object.keys(E.colorsReplace).length){const re=await u.urlToString(M);M=u.replaceColors(re,new Map(Object.entries(E.colorsReplace)))}let T="";E.flipX&&(T+="scaleX(-1)"),E.flipY&&(T+="scaleY(-1)"),T||(T="none");const B={};if(E.clipSrc){const re=await u.urlToBase64(E.clipSrc);B["clip-path"]=`url(${re})`}const U=await(0,c.loadImage)(M),Q=U.width*E.cropWidth,X=U.height*E.cropHeight,$=E.width/E.height;let j,I;const z=Q/X;E.type==="svg"?(j=Q,I=X):$>=z?(j=Q,I=Q/$):(j=X*$,I=X);const H=j/U.width,K=I/U.height,ee=j/I>E.width/E.height?E.height/I:E.width/j,V=j*ee/H,Z=I*ee/K,Y=E.cropX*ee*U.width,ne=E.cropY*ee*U.height;return _("div",{style:Object.assign(Object.assign({},B),{width:"100%",height:"100%","border-radius":E.cornerRadius+"px",border:E.borderSize?`${E.borderSize}px solid ${E.borderColor}`:"none",background:`url(${M})`,transform:T,"background-size":`${Math.round(V)}px ${Math.round(Z)}px`,"background-position-x":-Math.round(Y)+"px","background-position-y":-Math.round(ne)+"px"})})},v=async({element:E,page:S,store:A})=>{let M={top:0,left:0};E.fill.indexOf("gradient")>=0&&(M=Object.assign(Object.assign({},M),{"background-color":E.fill,"background-image":E.fill,"background-clip":"text","text-fill-color":"transparent","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}));const T=E.backgroundPadding*(E.fontSize*E.lineHeight),B=_("div",{style:{position:"absolute",top:-T/2+"px",left:-T/2+"px",display:E.backgroundEnabled?"block":"none",width:E.width+T+"px",height:E.height+T+"px","background-color":E.backgroundColor,"border-radius":E.backgroundCornerRadius*(E.fontSize*E.lineHeight*.5)+"px"}});E.verticalAlign==="middle"?(M.top="50%",M.transform="translateY(-50%)"):E.verticalAlign==="bottom"&&(M.bottom=0);const U=/<[a-z][\s\S]*>/i.test(E.text),Q=Object.assign(Object.assign({},M),{position:"absolute",width:E.width+"px",color:E.fill,"white-space":"pre-wrap","font-size":E.fontSize+"px","text-align":E.align,"font-family":E.fontFamily,"text-decoration":E.textDecoration||"none","line-height":E.lineHeight,"letter-spacing":E.letterSpacing+"em","font-style":E.fontStyle,"font-weight":E.fontWeight,"-webkit-text-stroke":`${E.strokeWidth}px ${E.stroke}`,"text-stroke":`${E.strokeWidth}px ${E.stroke}`}),X="el-"+E.id,$=U?{id:X}:{},j=`<style>#${X} {${b.resetStyleContent}}</style>`,I=_("div",Object.assign(Object.assign({style:Q},$),{innerHTML:U?`${j}${E.text}`:E.text.split(`
|
|
297
|
-
`).join("<br />")}));return _("div",{style:{position:"relative",width:"100%",height:"100%"}},B,I)},x=({element:E,type:S})=>{const A={"stroke-width":E.height,stroke:E.color,"line-cap":"round","stroke-linejoin":"round",opacity:E.opacity};return S==="arrow"||S==="triangle"?_("polyline",Object.assign({points:`${3*E.height},${2*-E.height} 0,0 ${3*E.height},${2*E.height}`},A)):S==="bar"?_("polyline",Object.assign({points:`0,${2*-E.height} 0,${2*E.height}`},A)):S==="circle"?_("circle",Object.assign({r:E.height},A)):S==="square"?_("polyline",Object.assign({points:`${-E.height},${-E.height} ${-E.height},${E.height} ${E.height},${E.height} ${E.height},${-E.height}`},A)):null},g=async({element:E,page:S,store:A})=>_("svg",{style:{width:"100%",height:"100%",contain:"layout style size",overflow:"visible"}},_("rect",{x:0,y:0,width:E.width,height:E.height,fill:E.color}),_("g",{transform:`translate(0 ${E.height/2})`},x({element:E,type:E.startHead})),_("g",{transform:`translate(${E.width} ${E.height/2}) rotate(180)`},x({element:E,type:E.endHead}))),p=async({element:E,page:S,store:A,elementHook:M})=>{const T=await Promise.all(E.children.map(U=>m({element:U,page:S,store:A,elementHook:M}))),B=_("div",{style:{"transform-origin":"top left",opacity:E.opacity}},...T);return M&&M({dom:B,element:E})||B},P=async({element:E,page:S,store:A,elementHook:M})=>{const T=(0,h.figureToSvg)(E),B=_("div",{innerHTML:T});return M&&M({dom:B,element:E})||B},d={image:O,svg:O,text:v,line:g,figure:P,group:p};async function m({element:E,page:S,store:A,elementHook:M}){let T=await d[E.type];T||(T=()=>_("div",{}),console.error(`HTML export does not support ${E.type} type...`));const B=await T({element:E,page:S,store:A}),U=[];E.blurEnabled&&U.push(`blur(${E.blurRadius/2}px)`),E.brightnessEnabled&&U.push(`brightness(${100*E.brightness+100}%)`),E.sepiaEnabled&&U.push("sepia()"),E.grayscaleEnabled&&U.push("grayscale()"),E.shadowEnabled&&U.push(`drop-shadow(${E.shadowOffsetX}px ${E.shadowOffsetY}px ${E.shadowBlur}px ${E.shadowColor})`);const Q=_("div",{id:E.id,style:{position:"absolute",left:E.x+"px",top:E.y+"px",width:E.width+"px",height:E.height+"px",transform:`rotate(${E.rotation}deg)`,"transform-origin":"top left",opacity:E.opacity,display:E.visible&&E.showInExport?"block":"none",filter:U.join(" ")||"none"}},B);return M&&M({dom:Q,element:E})||Q}async function y({page:E,store:S,elementHook:A}){const M=await Promise.all(E.children.map(Q=>m({element:Q,page:E,store:S,elementHook:A}))),T=E.width==="auto"?S.width:E.width,B=E.height==="auto"?S.height:E.height;let U={};if(E.background.indexOf("url")>=0||E.background.indexOf("http")>=0||E.background.indexOf(".jpg")>=0||E.background.indexOf(".png")>=0||E.background.indexOf(".jpeg")>=0){const{width:Q,height:X}=await(0,c.loadImage)(E.background),$=await O({element:Object.assign({x:0,y:0,width:Q,height:X,src:E.background,cornerRadius:0},(0,l.getCrop)({width:Q,height:X},{width:Q,height:X})),page:E,store:S});M.unshift($)}else U=Object.assign(Object.assign({},U),{"background-color":E.background});return _("div",{className:"page",id:E.id,style:Object.assign(Object.assign({},U),{width:T+"px",height:B+"px",border:"1px solid grey",overflow:"hidden",position:"relative"})},...M)}async function w({json:E,elementHook:S}){const A=await Promise.all(E.pages.map(B=>y({page:B,store:E,elementHook:S}))),M=[];E.pages.forEach(B=>{B.children.forEach(U=>{U.type==="text"&&M.indexOf(U.fontFamily)===-1&&M.push(U.fontFamily)})});const T=M.map(B=>E.fonts.find(U=>U.fontFamily===B)?_("style",{},""):_("link",{href:`https://fonts.googleapis.com/css?family=${B}`,rel:"stylesheet"}));return _("div",{className:"design"},...T,...A)}const L=(E,S)=>typeof S=="object"?`${E}="${Object.keys(S).map(A=>`${A}:${S[A]};`).join(" ")}"`:`${E}="${S}"`,R=({dom:E})=>{if(typeof E=="string")return E;if(!E)return"";const S=E.props,{innerHTML:A}=S,M=a(S,["innerHTML"]);return`<${E.type} ${Object.keys(M).map(T=>L(T,E.props[T])).join(" ")}>${A||E.children.map(T=>R({dom:T})).join("")}</${E.type}>`};async function D({json:E,elementHook:S}){const A=await w({json:E,elementHook:S});return R({dom:A})}}(Oo)),Oo}var xo={},Bb;function rx(){return Bb||(Bb=1,function(e){var i=xo&&xo.__createBinding||(Object.create?function(E,S,A,M){M===void 0&&(M=A);var T=Object.getOwnPropertyDescriptor(S,A);T&&!("get"in T?!S.__esModule:T.writable||T.configurable)||(T={enumerable:!0,get:function(){return S[A]}}),Object.defineProperty(E,M,T)}:function(E,S,A,M){M===void 0&&(M=A),E[M]=S[A]}),t=xo&&xo.__setModuleDefault||(Object.create?function(E,S){Object.defineProperty(E,"default",{enumerable:!0,value:S})}:function(E,S){E.default=S}),n=xo&&xo.__importStar||function(){var E=function(S){return E=Object.getOwnPropertyNames||function(A){var M=[];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(M[M.length]=T);return M},E(S)};return function(S){if(S&&S.__esModule)return S;var A={};if(S!=null)for(var M=E(S),T=0;T<M.length;T++)M[T]!=="default"&&i(A,S,M[T]);return t(A,S),A}}(),a=xo&&xo.__rest||function(E,S){var A={};for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&S.indexOf(M)<0&&(A[M]=E[M]);if(E!=null&&typeof Object.getOwnPropertySymbols=="function"){var T=0;for(M=Object.getOwnPropertySymbols(E);T<M.length;T++)S.indexOf(M[T])<0&&Object.prototype.propertyIsEnumerable.call(E,M[T])&&(A[M[T]]=E[M[T]])}return A};Object.defineProperty(e,"__esModule",{value:!0}),e.fixRatio=_,e.jsonToDOM=w,e.jsonToSVG=D;const l=_p(),u=n(Ud()),c=_p(),h=wv(),b=(E,S,...A)=>({type:E,props:S,children:A||[]});function _(E){var S=new DOMParser().parseFromString(E,"image/svg+xml");return S.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(S)}const k=async({element:E,page:S,store:A})=>{let{src:M}=E;if(E.type==="svg"){const ie=await u.urlToString(M);M=u.replaceColors(ie,new Map(Object.entries(E.colorsReplace)))}let T="";E.flipX&&(T+="scaleX(-1)"),E.flipY&&(T+="scaleY(-1)"),E.clipSrc&&await u.urlToBase64(E.clipSrc);const B=await(0,c.loadImage)(M),U=B.width*E.cropWidth,Q=B.height*E.cropHeight,X=E.width/E.height;let $,j;const I=U/Q;E.type==="svg"?($=U,j=Q):X>=I?($=U,j=U/X):($=Q*X,j=Q);const z=$/B.width,H=j/B.height,K=$/j>E.width/E.height?E.height/j:E.width/$,ee=$*K/z,V=j*K/H,Z=E.cropX*B.width*K,Y=E.cropY*B.height*K,ne=`clip-${E.id}`,re=M.replace(/&/g,"&");return b("g",{style:{transform:T}},b("defs",{},b("clipPath",{id:ne},b("rect",{x:0,y:0,width:E.width,height:E.height}))),b("image",{"xlink:href":re,x:-Z,y:-Y,width:ee,height:V,preserveAspectRatio:"none","clip-path":`url(#${ne})`}))},O=async({element:E,page:S,store:A})=>{const M=(X,$,j,I,z)=>{const H=document.createElement("canvas").getContext("2d");return H.font=`${z} ${I} ${$}px ${j}`,H.measureText(X).width},T=((X,$,j,I,z,H)=>{const K=[];return X.split(`
|
|
298
|
-
`).forEach(ee=>{const V=ee.split(" ");let Z="";for(let Y=0;Y<V.length;Y++){const ne=Z+V[Y]+" ";M(ne,j,I,z,H)>$+.5&&Y>0?(K.push(Z.trim()),Z=V[Y]+" "):Z=ne}K.push(Z.trim())}),K})(E.text,E.width,E.fontSize,E.fontFamily,E.fontWeight,E.fontStyle),B=E.fontSize*E.lineHeight,U=E.align==="center"?"middle":E.align==="right"?"end":"start",Q=T.map((X,$)=>b("tspan",{x:E.align==="center"?E.width/2:E.align==="right"?E.width:0,dy:$===0?0:B,innerHTML:X}));return b("g",{},b("text",{fill:E.fill,y:E.fontSize,"font-size":E.fontSize+"px","text-anchor":U,"font-family":E.fontFamily,"font-style":E.fontStyle,"font-weight":E.fontWeight,"text-decoration":E.textDecoration,"line-height":E.lineHeight,"letter-spacing":E.letterSpacing+"em","stroke-width":E.strokeWidth,stroke:E.stroke},...Q))},v=({element:E,type:S})=>{const A={"stroke-width":E.height,stroke:E.color,"line-cap":"round","stroke-linejoin":"round",opacity:E.opacity};return S==="arrow"||S==="triangle"?b("polyline",Object.assign({points:`${3*E.height},${2*-E.height} 0,0 ${3*E.height},${2*E.height}`},A)):S==="bar"?b("polyline",Object.assign({points:`0,${2*-E.height} 0,${2*E.height}`},A)):S==="circle"?b("circle",Object.assign({r:E.height},A)):S==="square"?b("polyline",Object.assign({points:`${-E.height},${-E.height} ${-E.height},${E.height} ${E.height},${E.height} ${E.height},${-E.height}`},A)):null},x=async({element:E,page:S,store:A})=>b("g",{},b("line",{x1:0,y1:E.height/2,x2:E.width,y2:E.height/2,stroke:E.color,"stroke-width":E.height}),b("g",{transform:`translate(0 ${E.height/2})`},v({element:E,type:E.startHead})),b("g",{transform:`translate(${E.width} ${E.height/2}) rotate(180)`},v({element:E,type:E.endHead}))),g=async({element:E,page:S,store:A,elementHook:M})=>{const T=await Promise.all(E.children.map(U=>m({element:U,page:S,store:A,elementHook:M}))),B=b("g",{opacity:E.opacity,transform:`translate(${E.x}, ${E.y}) rotate(${E.rotation})`,style:{"transform-origin":"top left"}},...T);return M&&M({dom:B,element:E})||B};function p(E){let S=E.replace(/<svg[^>]*>/,"");return S=S.replace(/<\/svg>/,""),S}const P=async({element:E,page:S,store:A,elementHook:M})=>{const T=p((0,h.figureToSvg)(E)),B=b("g",{innerHTML:T});return M&&M({dom:B,element:E})||B},d={image:k,svg:k,text:O,line:x,figure:P,group:g};async function m({element:E,page:S,store:A,elementHook:M}){let T=await d[E.type];T||(T=()=>b("g",{}),console.error(`SVG export does not support ${E.type} type...`));const B=await T({element:E,page:S,store:A}),U=[];E.blurEnabled&&U.push(`blur(${E.blurRadius/2}px)`),E.brightnessEnabled&&U.push(`brightness(${100*E.brightness+100}%)`),E.sepiaEnabled&&U.push("sepia()"),E.grayscaleEnabled&&U.push("grayscale()"),E.shadowEnabled&&U.push(`drop-shadow(${E.shadowOffsetX}px ${E.shadowOffsetY}px ${E.shadowBlur}px ${E.shadowColor})`);const Q=b("g",{className:"element",id:E.id,transform:`translate(${E.x}, ${E.y}) rotate(${E.rotation})`,display:E.visible?void 0:"none",style:{"transform-origin":"top left",filter:U.join(" ")}},B);return M&&M({dom:Q,element:E})||Q}async function y({page:E,store:S,elementHook:A}){const M=await Promise.all(E.children.map(U=>m({element:U,page:E,store:S,elementHook:A}))),T=E.background.indexOf("url")>=0||E.background.indexOf("http")>=0||E.background.indexOf(".jpg")>=0||E.background.indexOf(".png")>=0||E.background.indexOf(".jpeg")>=0;let B;if(T){const U=await(0,c.loadImage)(E.background);B=await(0,c.cropImage)(E.background,Object.assign({width:S.width,height:S.height,x:0,y:0},(0,l.getCrop)({width:S.width,height:S.height},{width:U.width,height:U.height})))}return b("g",{className:"page",style:{}},T?b("image",{"xlink:href":B,x:0,y:0,width:S.width,height:S.height,preserveAspectRatio:"none"}):b("rect",{x:0,y:0,width:S.width,height:S.height,fill:T?void 0:E.background}),...M)}async function w({json:E,elementHook:S}){const A=await Promise.all(E.pages.map(B=>y({page:B,store:E,elementHook:S}))),M=[];E.pages.forEach(B=>{B.children.forEach(U=>{U.type==="text"&&M.indexOf(U.fontFamily)===-1&&M.push(U.fontFamily)})});const T=M.map(B=>E.fonts.find(U=>U.fontFamily===B)?b("style",{},""):b("defs",{},b("style",{type:"text/css",innerHTML:`@import url('https://fonts.googleapis.com/css?family=${B}:bi,normal,i,b');`.replace(/&/g,"&")})));return b("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},...T,...A)}const L=(E,S)=>typeof S=="object"?`${E}="${Object.keys(S).map(A=>`${A}:${S[A]};`).join(" ")}"`:S==null||S===""?"":`${E}="${S}"`,R=({dom:E,nestLevel:S=0})=>{if(typeof E=="string")return E;if(!E)return"";const A=E.props,{innerHTML:M}=A,T=a(A,["innerHTML"]),B=" ".repeat(S);return`${B}<${E.type} ${Object.keys(T).map(U=>L(U,T[U])).join(" ")}>${M||`
|
|
299
|
-
`+E.children.map(U=>R({dom:U,nestLevel:S+1})).join("")}${B}</${E.type}>
|
|
300
|
-
`};async function D({json:E,elementHook:S}){const A=await w({json:E,elementHook:S});return R({dom:A})}}(xo)),xo}var og={},Ub;function W4(){return Ub||(Ub=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Page=void 0;const i=eo,t=Hp,n=Td(),a=Ov(),l=Td(),u=Hd();e.Page=i.types.model("Page",{id:i.types.identifier,children:i.types.array(i.types.late(()=>n.ElementTypes)),width:i.types.optional(i.types.union(i.types.number,i.types.literal("auto")),"auto"),height:i.types.optional(i.types.union(i.types.number,i.types.literal("auto")),"auto"),background:"white",bleed:0,custom:i.types.frozen(),duration:5e3,_exporting:!1,_rendering:!1,_forceMount:!1}).postProcessSnapshot(c=>{const h=Object.assign({},c),b={};for(var _ in h)_[0]!=="_"&&(b[_]=c[_]);return b}).views(c=>({get store(){return(0,i.getParentOfType)(c,a.Store)}})).views(c=>({get startTime(){let h=0;for(const b of c.store.pages){if(b.id===c.id)return h;h+=b.duration}return h},get _exportingOrRendering(){return c._exporting||c._rendering}})).views(c=>({get computedWidth(){return c.width==="auto"?c.store.width:c.width},get computedHeight(){return c.height==="auto"?c.store.height:c.height}})).actions(c=>({toJSON:()=>JSON.parse(JSON.stringify((0,i.getSnapshot)(c))),_forEachElementUp(h,b){const _=h.map(k=>({id:k,index:c.children.findIndex(O=>O.id===k)}));_.sort((k,O)=>O.index-k.index);for(const{index:k}of _){if(k==-1)continue;const O=k<c.children.length-1&&c.children[k+1],v=h.indexOf(O==null?void 0:O.id)>=0;k===c.children.length-1||v||b(k)}},_forEachElementDown(h,b){const _=h.map(k=>({id:k,index:c.children.findIndex(O=>O.id===k)}));_.sort((k,O)=>k.index-O.index);for(const{index:k}of _){if(k==-1)continue;const O=k>0&&c.children[k-1],v=h.indexOf(O==null?void 0:O.id)>=0;k===0||v||b(k)}return!1}})).actions(c=>({clone(h={}){const b=c.toJSON();b.children.forEach(v=>{v.id=(0,t.nanoid)(10),(0,l.forEveryChild)(v,x=>{x.id=(0,t.nanoid)(10)})});const _=Object.assign(Object.assign(Object.assign({},b),{id:(0,t.nanoid)(10)}),h),k=c.store.addPage(_),O=c.store.pages.indexOf(c);k.setZIndex(O+1),k.select()},setZIndex(h){c.store.setPageZIndex(c.id,h)},set(h){Object.assign(c,h)},select(){c.store.selectPage(c.id)},addElement(h,{skipSelect:b=!1}={}){const _=l.TYPES_MAP[h.type];if(!_)return void console.error("Can not find model with type "+h.type);"children"in h&&Array.isArray(h.children)&&h.children.forEach(O=>{O.id=(0,t.nanoid)(10)});const k=_.create(Object.assign({id:(0,t.nanoid)(10)},h));return c.children.push(k),k.selectable&&!b&&c.store.selectElements([k.id]),k},canMoveElementsUp(h){let b=!1;return c._forEachElementUp(h,()=>{b=b||!0}),b},moveElementsUp(h){c._forEachElementUp(h,b=>{const _=c.children[b];(0,i.detach)(_),c.children.splice(b+1,0,_)})},canMoveElementsTop(h){return this.canMoveElementsUp(h)},moveElementsTop(h){const b=[],_=[];c.children.forEach(k=>{h.indexOf(k.id)>=0?b.push(k):_.push(k)}),c.children.replace(_.concat(b))},canMoveElementsDown(h){let b=!1;return c._forEachElementDown(h,()=>{b=b||!0}),b},moveElementsDown(h){c._forEachElementDown(h,b=>{const _=c.children[b];(0,i.detach)(_),c.children.splice(b-1,0,_)})},canMoveElementsBottom(h){return this.canMoveElementsDown(h)},moveElementsBottom(h){const b=[],_=[];c.children.forEach(k=>{h.indexOf(k.id)>=0?b.push(k):_.push(k)}),c.children.replace(b.concat(_))},setElementZIndex(h,b){const _=c.children.find(k=>k.id===h);_&&((0,i.detach)(_),c.children.remove(_),c.children.splice(b,0,_))},setSize({width:h,height:b,useMagic:_,softChange:k}){if(_){const O=[],v=T=>T.type==="image"&&T.x<1&&T.y<1&&T.width>=c.computedWidth-2&&T.height>=c.computedHeight-2;(0,l.forEveryChild)(c,T=>{T.type!=="group"&&(v(T)||O.push(T))});const x=O.length?(0,u.getTotalClientRect)(O):{x:0,y:0,width:c.computedWidth,height:c.computedHeight},g=1/4,p=Math.max(0,Math.min(x.x,c.computedWidth-x.x-x.width)),P=c.computedWidth*g,d=Math.max(0,p-P),m=Math.max(0,Math.min(x.y,c.computedHeight-x.y-x.height)),y=c.computedHeight*g,w=Math.max(0,m-y),L=c.computedWidth-2*d,R=c.computedHeight-2*w,D=h/L,E=b/R,S=Math.min(D,E),A=(h-L*S)/2-d*S,M=(b-R*S)/2-w*S;(0,l.forEveryChild)(c,T=>{T.type!=="group"&&(v(T)?T.set({x:T.x*S,y:T.y*S,width:T.width*D,height:T.height*E,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(T.set({x:A+T.x*S,y:M+T.y*S,width:T.width*S,height:T.height*S}),T.type==="text"?T.set({fontSize:T.fontSize*S}):T.type==="figure"&&T.set({strokeWidth:T.strokeWidth*S})))})}k||(c.width=h),k||(c.height=b)}})).actions(c=>({moveElementUp(h){console.warn("page.moveElementUp(id) is deprecated. Please use page.moveElementsUp([id1, id2]) instead."),c.moveElementsUp([h])},moveElementDown(h){console.warn("page.moveElementDown(id) is deprecated. Please use page.moveElementsDown([id1, id2]) instead."),c.moveElementsDown([h])},moveElementTop(h){console.warn("page.moveElementTop(id) is deprecated. Please use page.moveElementsTop([id1, id2]) instead."),c.moveElementsTop([h])},moveElementBottom(h){console.warn("page.moveElementBottom(id) is deprecated. Please use page.moveElementsBottom([id1, id2]) instead."),c.moveElementsBottom([h])},play(){c.store.play({startTime:c.startTime,endTime:c.startTime+c.duration})}}))}(og)),og}var ag={},qb;function ix(){return qb||(qb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Audio=void 0;const i=eo;e.Audio=i.types.model("Audio",{id:i.types.identifier,src:"",duration:0,startTime:0,endTime:1,volume:1,delay:0}).actions(t=>({toJSON:()=>Object.assign({},(0,i.getSnapshot)(t))})).actions(t=>({set(n){Object.assign(t,n)}}))}(ag)),ag}var Hb;function Ov(){return Hb||(Hb=1,function(e){var i=Ti&&Ti.__createBinding||(Object.create?function(E,S,A,M){M===void 0&&(M=A);var T=Object.getOwnPropertyDescriptor(S,A);T&&!("get"in T?!S.__esModule:T.writable||T.configurable)||(T={enumerable:!0,get:function(){return S[A]}}),Object.defineProperty(E,M,T)}:function(E,S,A,M){M===void 0&&(M=A),E[M]=S[A]}),t=Ti&&Ti.__setModuleDefault||(Object.create?function(E,S){Object.defineProperty(E,"default",{enumerable:!0,value:S})}:function(E,S){E.default=S}),n=Ti&&Ti.__importStar||function(){var E=function(S){return E=Object.getOwnPropertyNames||function(A){var M=[];for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(M[M.length]=T);return M},E(S)};return function(S){if(S&&S.__esModule)return S;var A={};if(S!=null)for(var M=E(S),T=0;T<M.length;T++)M[T]!=="default"&&i(A,S,M[T]);return t(A,S),A}}(),a=Ti&&Ti.__rest||function(E,S){var A={};for(var M in E)Object.prototype.hasOwnProperty.call(E,M)&&S.indexOf(M)<0&&(A[M]=E[M]);if(E!=null&&typeof Object.getOwnPropertySymbols=="function"){var T=0;for(M=Object.getOwnPropertySymbols(E);T<M.length;T++)S.indexOf(M[T])<0&&Object.prototype.propertyIsEnumerable.call(E,M[T])&&(A[M[T]]=E[M[T]])}return A},l=Ti&&Ti.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.Font=void 0,e.createStore=D;const u=eo,c=ZO(),h=Hp,b=l(Ji()),_=QO(),k=JO(),O=ex(),v=Sv(),x=n(zd()),g=Ks(),p=Ev(),P=$4(),d=tx(),m=nx(),y=rx(),w=W4(),L=Td(),R=ix();function D({key:E,showCredit:S}={key:"",showCredit:!1}){return e.Store.create({_forceShowCredit:S,_key:E})}(0,u.setLivelinessChecking)("ignore"),e.Font=u.types.model("Font",{fontFamily:u.types.string,url:u.types.optional(u.types.string,""),styles:u.types.frozen()}).preProcessSnapshot(E=>Object.assign(Object.assign({},E),{fontFamily:E.fontFamily||E.name})),e.Store=u.types.model("Store",{role:"",pages:u.types.array(w.Page),fonts:u.types.array(e.Font),audios:u.types.array(R.Audio),width:1080,height:1080,currentTime:0,isPlaying:!1,scale:1,scaleToFit:1,unit:"px",dpi:72,bleedVisible:!1,rulesVisible:!1,openedSidePanel:"",previousOpenedSidePanel:"",custom:u.types.frozen(),selectedElementsIds:u.types.array(u.types.string),animatedElementsIds:u.types.array(u.types.string),history:u.types.optional(c.UndoManager,{targetPath:"../pages"}),_elementsPixelRatio:Math.min(2,window.devicePixelRatio||1),_activePageId:"",_forceShowCredit:!1,_key:"",_validated:!1}).views(E=>({get _bleedVisible(){return console.warn("store._bleedVisible is deprecated. Please use store.bleedVisible instead."),E.bleedVisible},get selectedElements(){return E.selectedElementsIds.map(S=>{for(const A of E.pages)for(const M of A.children)if(M.id===S)return M}).filter(S=>!!S)},get children(){return E.pages},get selectedShapes(){const S=[];return(0,L.forEveryChild)({children:E.selectedElements},A=>{A.type!=="group"&&S.push(A)}),S},get activePage(){return E.pages.slice().find(S=>S.id===E._activePageId)||(E.pages.length?E.pages[0]:null)},get duration(){let S=0;return E.pages.forEach(A=>{S+=A.duration}),S},get _hasCroppedImages(){return E.find(S=>S.type==="image"&&S._cropModeEnabled)},find(S){let A;return(0,L.forEveryChild)({children:E.pages},M=>{if(!A&&S(M))return A=M,!0}),A},getElementById:S=>E.find(A=>A.id===S)})).actions(E=>{let S=0,A=null,M=!1;return{afterCreate(){E.history.canUndo},setCurrentTime(T){E.currentTime=T},_togglePlaying(T=!E.isPlaying){E.isPlaying=T},play({animatedElementsIds:T=[],startTime:B=0,currentTime:U=0,endTime:Q=E.duration,repeat:X=!1}={}){U&&(console.warn("currentTime property of store.play() is deprecated. Please use startTime instead."),B=U),E.animatedElementsIds=(0,u.cast)(T),E.currentTime=B,E.isPlaying=!0,S=Date.now(),A=Q,M=X,requestAnimationFrame(E.seek)},checkActivePage(){let T=0;for(const B of E.pages){if(E.currentTime>=B.startTime&&E.currentTime<B.startTime+B.duration){E.selectPage(B.id);break}T+=B.duration}},seek(){if(!E.isPlaying)return;const T=Date.now(),B=T-S;S=T,E.currentTime+=B,E.checkActivePage();const U=A||E.duration;E.isPlaying&&E.currentTime<U?requestAnimationFrame(E.seek):E.isPlaying&&M?(E.currentTime=0,requestAnimationFrame(E.seek)):E.stop()},stop(){E.isPlaying=!1,E.currentTime=0,E.animatedElementsIds=(0,u.cast)([]),E.checkActivePage()}}}).actions(E=>({__(){E._validated||((0,v.validateKey)(E._key,E._forceShowCredit),E._validated=!0)},set(S){Object.assign(E,S)},setUnit({unit:S,dpi:A}){E.unit=S||E.unit,E.dpi=A||E.dpi},setRole(S){E.role=S},addPage(S){const A=w.Page.create(Object.assign({id:(0,h.nanoid)(10)},S));return E.pages.push(A),E._activePageId=A.id,A},selectPage(S){E._activePageId=S},selectElements(S){const A=S.map(M=>E.getElementById(M)).sort((M,T)=>M.page.children.indexOf(M)-M.page.children.indexOf(T)).filter(M=>!!M).map(M=>M.id);E.selectedElementsIds=(0,u.cast)(A)},toggleBleed(S){E.bleedVisible=S??!E.bleedVisible},toggleRulers(S){E.rulesVisible=S??!E.rulesVisible},openSidePanel(S){E.openedSidePanel!==S&&(E.previousOpenedSidePanel=E.openedSidePanel,E.openedSidePanel=S)},setScale(S){E.scale=S},_setScaleToFit(S){E.scaleToFit=S},setElementsPixelRatio(S){E._elementsPixelRatio=S},setSize(S,A,M){E.pages.forEach(T=>{T.setSize({width:S,height:A,useMagic:M,softChange:!0})}),E.width=S,E.height=A},setPageZIndex(S,A){const M=E.pages.find(T=>T.id===S);M&&((0,u.detach)(M),E.pages.remove(M),E.pages.splice(A,0,M))},deletePages(S){const A=E.pages.indexOf(E.activePage);S.forEach(B=>{const U=E.pages.find(Q=>Q.id===B);(0,u.destroy)(U)});const M=Math.min(E.pages.length-1,A),T=E.pages[M];T&&(E._activePageId=T.id),E.selectedElementsIds=(0,u.cast)(E.selectedElementsIds.filter(B=>E.getElementById(B)))},groupElements(S){const A=S.map(B=>E.getElementById(B));A.forEach(B=>{B&&(0,u.detach)(B)});const M=E.activePage,T={id:(0,h.nanoid)(10),children:A,type:"group"};return M.children.push(T),E.selectedElementsIds=(0,u.cast)([T.id]),M.children.find(B=>B.id===T.id)},ungroupElements(S){const A=S.map(T=>E.getElementById(T)),M=[];A.forEach(T=>{if(T&&T.type==="group"){const B=T.page,U=B.children.indexOf(T);T.children.forEach(Q=>{M.push(Q.id)}),T.children.forEach(Q=>{(0,u.detach)(Q),B.children.push(Q)}),B.children.splice(U,1)}}),E.selectedElementsIds=(0,u.cast)(M)},deleteElements(S){const A=[];E.find(M=>(S.includes(M.id)&&A.push(M),!1)),A.forEach(M=>{(0,u.destroy)(M)}),E.selectedElementsIds=(0,u.cast)(E.selectedElementsIds.filter(M=>E.getElementById(M)))},on(S,A){if(S==="change"){let M=E.toJSON();return(0,u.onSnapshot)(E,T=>{const B=E.toJSON();!(0,P.deepEqual)(M,B)&&(M=B,A(B))})}},async _toCanvas({pixelRatio:S,ignoreBackground:A,pageId:M,mimeType:T,includeBleed:B,_skipTimeout:U,quickMode:Q=!1}={}){var X;const $=S||1;M=M||((X=E.pages[0])===null||X===void 0?void 0:X.id);const j=E.pages.find(Ee=>Ee.id===M);if(!j)throw new Error(`No page for export with id ${M}`);Q?j==null||j.set({_forceMount:!0}):j==null||j.set({_exporting:!0});const I=await(0,d.waitTillAvailable)(()=>b.default.stages.find(Ee=>Ee.getAttr("pageId")===M));if(!I)throw j==null||j.set({_forceMount:!1,_exporting:!1}),new Error(`Export is failed. Can not find stage for page ${M}. Looks like <Workspace /> component is not mounted, but it is required in order to process the export.`);const z=!!I.findOne(".page-container"),H=E._elementsPixelRatio;$>E._elementsPixelRatio&&E.setElementsPixelRatio($),await E.waitLoading({_skipTimeout:U});const K=I.findOne(".page-container");if(!K)throw E.setElementsPixelRatio(H),j==null||j.set({_forceMount:!1,_exporting:!1}),new Error(`Export is failed. Can't find page container. ${z}`);I.find("Transformer").forEach(Ee=>Ee.visible(!1)),K.find(".page-background").forEach(Ee=>Ee.shadowEnabled(!1)),K.find(".page-background").forEach(Ee=>Ee.strokeEnabled(!1)),K.find(".highlighter").forEach(Ee=>Ee.visible(!1));const ee=K.findOne(".page-background-group"),V=ee.clip();ee.clip({x:null,y:null,width:null,height:null});const Z=K.findOne(".elements-container"),Y=Z.clip();Z.clip({x:null,y:null,width:null,height:null});const ne=K.find(Ee=>Ee.getAttr("hideInExport"));ne.forEach(Ee=>{Ee.setAttr("oldVisible",Ee.visible()),Ee.hide()});const re=K.find(Ee=>!Ee.visible()&&Ee.getAttr("editModeEnabled"));re.forEach(Ee=>{Ee.setAttr("oldVisible",Ee.visible()),Ee.show()}),A&&K.find(".page-background").forEach(Ee=>Ee.hide());const ie=B?j.bleed:0;let ae=ie;!E.bleedVisible&&B||(E.bleedVisible||B?E.bleedVisible&&B?ae=0:E.bleedVisible&&!B&&(ae=-j.bleed):ae=0);const se=document.createElement("canvas");se.width=Math.round((j.computedWidth+2*ie)*$),se.height=Math.round((j.computedHeight+2*ie)*$);const de=se.getContext("2d");T==="image/jpeg"&&(de.fillStyle="white",de.fillRect(0,0,se.width,se.height));const he=K.scale();K.scale({x:1,y:1});const Se=K.toCanvas({x:K.x()-ae,y:K.y()-ae,width:j.computedWidth+2*ie,height:j.computedHeight+2*ie,pixelRatio:$});return K.scale(he),de.drawImage(Se,0,0,se.width,se.height),b.default.Util.releaseCanvas(Se),A&&K.find(".page-background").forEach(Ee=>Ee.show()),ne.forEach(Ee=>{Ee.visible(Ee.getAttr("oldVisible"))}),re.forEach(Ee=>{Ee.visible(Ee.getAttr("oldVisible"))}),K.find(".page-background").forEach(Ee=>Ee.shadowEnabled(!0)),K.find(".page-background").forEach(Ee=>Ee.strokeEnabled(!0)),I.find("Transformer").forEach(Ee=>Ee.visible(!0)),K.find(".highlighter").forEach(Ee=>Ee.visible(!0)),ee.clip(V),Z.clip(Y),E.setElementsPixelRatio(H),j==null||j.set({_exporting:!1,_forceMount:!1}),se},async toDataURL(S={}){var{mimeType:A,quality:M}=S,T=a(S,["mimeType","quality"]);const B=await E._toCanvas(Object.assign({mimeType:A},T)),U=B.toDataURL(A,M);return b.default.Util.releaseCanvas(B),U},async toBlob(S={}){var{mimeType:A,quality:M}=S,T=a(S,["mimeType","quality"]);const B=await E._toCanvas(Object.assign({mimeType:A},T)),U=await new Promise(Q=>{B.toBlob(Q,A,M)});return b.default.Util.releaseCanvas(B),U},async saveAsImage(S={}){var{fileName:A}=S,M=a(S,["fileName"]);const T=M.mimeType||"image/png",B=T.split("/")[1];(0,_.downloadFile)(await E.toDataURL(M),A||"polotno."+B,T)},async _toPDF(S){const A=S.dpi||E.dpi,M=S.parallel||1,T=S.unit||(E.unit==="px"?"mm":E.unit),B=S.pixelRatio||1,U=S.pageIds||E.pages.map(ne=>ne.id),Q=E.pages.filter(ne=>U.includes(ne.id)),X=await(0,k.getJsPDF)(),$=ne=>(0,p.pxToUnit)({px:ne,unit:T,dpi:A}),j=S.cropMarkSize||0,I=$(j),z=Q[0]||{},H=S.includeBleed?z.bleed:0,K=$(z.computedWidth+2*H+2*I),ee=$(z.computedHeight+2*H+2*I);var V=new X({unit:T,orientation:K>ee?"landscape":"portrait",format:[K,ee],compress:!0,putOnlyUsedFonts:!0});V.deletePage(1);const Z=((ne,re)=>{for(var ie=[],ae=0;ae<ne.length;ae+=re)ie.push(ne.slice(ae,ae+re));return ie})(Q,M);let Y=0;for(const ne of Z){const re=ne.map(async ie=>{const ae=S.includeBleed?ie.bleed:0,se=ie.computedWidth+2*ae+2*j,de=ie.computedHeight+2*ae+2*j,he=$(se),Se=$(de);let Ee=0,De=B;for(;Ee<10;){Ee+=1,Ee===2&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");const fe=await E.toDataURL(Object.assign(Object.assign({},S),{pageId:ie.id,pixelRatio:De}));if(fe.length>20)return S.onProgress&&S.onProgress(++Y/U.length*.9),{url:fe,width:he,height:Se,widthPx:se,heightPx:de};De*=.8}});(await Promise.all(re)).forEach(({url:ie,width:ae,height:se,widthPx:de,heightPx:he})=>{V.addPage([ae,se],ae>se?"landscape":"portrait");const Se=V.getCurrentPageInfo();var Ee;switch(T){case"pt":Ee=1;break;case"mm":Ee=72/25.4;break;case"cm":Ee=72/2.54;break;case"in":Ee=72;break;case"px":Ee=.75;break;case"pc":case"em":Ee=12;break;case"ex":Ee=6;break;default:throw"Invalid unit: "+T}Se.pageContext.cropBox={bottomLeftX:0,bottomLeftY:0,topRightX:ae*Ee,topRightY:se*Ee},Se.pageContext.bleedBox={bottomLeftX:$(j+H)*Ee,bottomLeftY:$(j+H)*Ee,topRightX:$(de-j-H)*Ee,topRightY:$(he-j-H)*Ee},I&&(V.setLineWidth($(1)),V.line(2*I,0,2*I,I),V.line(0,2*I,I,2*I),V.line(ae-2*I,0,ae-2*I,I),V.line(ae,2*I,ae-I,2*I),V.line(0,se-2*I,I,se-2*I),V.line(2*I,se,2*I,se-I),V.line(ae,se-2*I,ae-I,se-2*I),V.line(ae-2*I,se,ae-2*I,se-I)),V.addImage(ie,I,I,ae-2*I,se-2*I,void 0,"FAST")})}return V},toPDFDataURL:async S=>(await E._toPDF(Object.assign({mimeType:"image/jpeg"},S))).output("datauristring"),async toGIFDataURL(S={}){const A=S.pixelRatio||1,M=await(0,O.createGIF)({width:E.width*A,height:E.height*A}),T=1e3/(S.fps||10),B=E.duration/T;for(let U=0;U<B-1;U++){const Q=U*T||1;E.setCurrentTime(Q);let X=0,$="";for(const I of E.pages)if(X+=I.duration,I.set({_rendering:X>Q}),X>Q){$=I.id;break}const j=await E._toCanvas({pixelRatio:A,pageId:$,_skipTimeout:!0});M.addFrame(j.getContext("2d"),{delay:T,copy:!0})}for(const U of E.pages)U.set({_rendering:!1});return E.stop(),M.render(),new Promise(U=>{M.on("finished",function(Q){(function(X,$){var j=new FileReader;j.onload=function(I){$(I.target.result)},j.readAsDataURL(X)})(Q,U)})})},async saveAsGIF(S={}){var{fileName:A}=S,M=a(S,["fileName"]);const T=await E.toGIFDataURL(M);(0,_.downloadFile)(T,A||"polotno.gif")},async toHTML({elementHook:S}={elementHook:void 0}){const A=E.toJSON();return(0,m.jsonToHTML)({json:A,elementHook:S})},async saveAsHTML({fileName:S}={}){const A=await E.toHTML(),M="data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(A)));(0,_.downloadFile)(M,S||"polotno.html")},async toSVG({elementHook:S,pageId:A}={elementHook:void 0,pageId:void 0}){var M;const T=E.toJSON();A=A||((M=T.pages[0])===null||M===void 0?void 0:M.id);const B=T.pages.find(U=>U.id===A);return(0,y.jsonToSVG)({json:Object.assign(Object.assign({},T),{pages:B?[B]:[]}),elementHook:S})},async saveAsSVG({fileName:S,elementHook:A,pageId:M}={}){const T=await E.toSVG({elementHook:A,pageId:M}),B="data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(T)));(0,_.downloadFile)(B,S||"polotno.svg")},async saveAsPDF(S={}){var{fileName:A}=S,M=a(S,["fileName"]);(await E._toPDF(Object.assign({mimeType:"image/jpeg"},M))).save(A||"polotno.pdf")},async waitLoading({_skipTimeout:S=!1}={}){S||await new Promise(A=>setTimeout(A,50)),await(0,g.whenLoaded)()},toJSON:()=>({width:E.width,height:E.height,fonts:(0,u.getSnapshot)(E.fonts),pages:(0,u.getSnapshot)(E.pages),audios:(0,u.getSnapshot)(E.audios),unit:E.unit,dpi:E.dpi,custom:E.custom}),loadJSON(S,A=!1){var M;const T=Object.assign({},S),B=E.pages.indexOf(E.activePage);let U=(M=T.pages[B]||T.pages[0])===null||M===void 0?void 0:M.id;T._activePageId=U;const Q=Object.assign({},(0,u.getSnapshot)(E));Object.assign(Q,T),Q.history=A?E.history.toJSON():{history:[],undoIdx:-1},(0,u.applySnapshot)(E,Q)},clear({keepHistory:S=!1}={}){const A=E.pages.map(M=>M.id);E.deletePages(A),S||E.history.clear()},addFont(S){E.removeFont(S.fontFamily),E.fonts.push(S),E.loadFont(S.fontFamily)},removeFont(S){E.fonts.filter(A=>A.fontFamily===S).forEach(A=>(0,u.destroy)(A))},addAudio(S){const A=R.Audio.create(Object.assign({id:(0,h.nanoid)(10)},S));E.audios.push(A)},removeAudio(S){const A=E.audios.find(M=>M.id===S);A&&E.audios.remove(A)},async loadFont(S){const A=E.fonts.find(T=>T.fontFamily===S)||x.globalFonts.find(T=>T.fontFamily===S);let M=[{fontStyle:"normal",fontWeight:"normal"}];return A?(A.styles&&(M=A.styles.map(T=>({fontStyle:T.fontStyle||"normal",fontWeight:T.fontWeight||"normal"}))),x.injectCustomFont(A)):x.injectGoogleFont(S),Promise.all(M.map(T=>x.loadFont(S,T.fontStyle,T.fontWeight)))},validate:S=>e.Store.validate(S,[{path:"",type:e.Store}]).map(A=>({path:"store"+A.context.map(M=>M.path).join("."),message:A.message}))})),e.default=D}(Ti)),Ti}var Gb;function Y4(){return Gb||(Gb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;const i=eo,t=Hp,n=Ov(),a=W4(),l=Td();e.Node=i.types.model("Node",{id:i.types.identifier,type:"none",name:"",opacity:1,custom:i.types.frozen(),visible:!0,selectable:!0,removable:!0,alwaysOnTop:!1,showInExport:!0}).preProcessSnapshot(u=>{for(var c in u)u[c]===null&&(u[c]=void 0);return u}).postProcessSnapshot(u=>{const c=Object.assign({},u),h={};for(var b in c)b[0]!=="_"&&(h[b]=u[b]);return h}).views(u=>({get locked(){return!(u.draggable||u.contentEditable||u.styleEditable||u.resizable)},get page(){return(0,i.getParentOfType)(u,a.Page)},get store(){return(0,i.getParentOfType)(u,n.Store)},get top(){let c=u;for(;;){if(!(0,i.hasParentOfType)(c,l.GroupElement))return c;c=(0,i.getParentOfType)(c,l.GroupElement)}},get parent(){return(0,i.hasParentOfType)(u,l.GroupElement)?(0,i.getParentOfType)(u,l.GroupElement):(0,i.hasParentOfType)(u,a.Page)?(0,i.getParentOfType)(u,a.Page):(0,i.hasParentOfType)(u,n.Store)?(0,i.getParentOfType)(u,n.Store):null},get zIndex(){return u.parent.children.indexOf(u)}})).actions(u=>({toJSON:()=>Object.assign({},(0,i.getSnapshot)(u))})).actions(u=>({clone(c={},{skipSelect:h=!1}={}){const b=JSON.parse(JSON.stringify(u.toJSON()));return c.id=c.id||(0,t.nanoid)(10),(0,l.forEveryChild)(b,_=>{_.id=(0,t.nanoid)(10)}),Object.assign(b,c),u.page.addElement(b,{skipSelect:h})},set(c){Object.assign(u,c)},moveUp(){u.page.moveElementsUp([u.id])},moveTop(){u.page.moveElementsTop([u.id])},moveDown(){u.page.moveElementsDown([u.id])},moveBottom(){u.page.moveElementsBottom([u.id])},setZIndex(c){u.parent.setElementZIndex(u.id,c)},beforeDestroy(){}}))}(Z1)),Z1}var lg={},sg={},Vb;function ox(){return Vb||(Vb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.registerAnimation=e.animate=e.animations=void 0;const i=Hd(),t={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}}};e.animations={fade:({dTime:l,element:u,animation:c})=>{const h=l/c.duration;return c.type==="enter"?{opacity:h*u.opacity}:{opacity:(1-h)*u.opacity}},rotate:({dTime:l,element:u,animation:c})=>{const h=l/c.duration*360;return(0,i.rotateAroundCenter)({x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation},h)},blink:({dTime:l,element:u,animation:c})=>{const h=c.duration,b=l%h/(h/2),_=b<=1?b:2-b;return{opacity:u.opacity*_}},bounce:({dTime:l,element:u,animation:c})=>{const h=c.duration,b=h/2,_={},k={x:u.x+u.width/3,y:u.y+u.height/3,width:u.width/3,height:u.height/3,fontSize:u.fontSize/3},O={x:u.x,y:u.y,width:u.width,height:u.height,fontSize:u.fontSize},v=l%h/b,x=v<=1?v:2-v;for(let g in k){const p=k[g],P=O[g]-p;_[g]=p+x*P}return _},move:({dTime:l,element:u,animation:c})=>{const h=t[c.data.direction]||t.right,b={};for(var _ in h.from){let k=h.from[_],O=h.to[_];c.type==="exit"&&(k=h.to[_],O=-h.from[_]);const v=u[_]+k,x=u[_]+O-v;b[_]=v+l/c.duration*x}return b},zoom:({dTime:l,element:u,animation:c})=>{const h={},b={x:u.x+u.width/3,y:u.y+u.height/3,width:u.width/3,height:u.height/3,fontSize:u.fontSize/3},_={x:u.x,y:u.y,width:u.width,height:u.height,fontSize:u.fontSize};for(var k in b){let O=b[k],v=_[k];if(c.type==="exit"){const g=O;O=v,v=g}const x=v-O;h[k]=O+l/c.duration*x}return h}};const n=({element:l,dTime:u,animation:c})=>{const h=e.animations[c.name];return h?h({element:l,dTime:u,animation:c}):(console.error("Can not find animation type: "+c.name),{})};e.animate=n;const a=(l,u)=>{};e.registerAnimation=a}(sg)),sg}var $b;function Sc(){return $b||($b=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.getDiff=e.Animation=void 0;const i=eo,t=ox(),n=da,a=Y4();e.Animation=i.types.model("Animation",{delay:0,duration:500,enabled:!0,type:i.types.enumeration("Type",["enter","exit","loop"]),name:"none",data:i.types.frozen({})});const l=(u,c)=>{const h={};for(const b in c)if(typeof u[b]=="number"&&typeof c[b]=="number"){const _=c[b]-u[b];_!==0&&(h[b]=_)}return h};e.getDiff=l,e.Shape=a.Node.named("Shape").props({x:0,y:0,width:100,height:100,rotation:0,opacity:1,animations:i.types.array(e.Animation),blurEnabled:!1,blurRadius:10,brightnessEnabled:!1,brightness:0,sepiaEnabled:!1,grayscaleEnabled:!1,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(u=>{const c=Object.assign(Object.assign({},u),{x:u.x||0,y:u.y||0});return"width"in u&&(c.width=c.width||1),"height"in u&&(c.height=c.height||1),u.locked&&(c.draggable=!1,c.contentEditable=!1,c.styleEditable=!1,c.resizable=!1,c.removable=!1),c}).views(u=>{const c=(0,n.observable)({x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation,opacity:u.opacity,color:u.color,fontSize:u.fontSize}),h=(0,n.action)(_=>{Object.assign(c,_)}),b=(0,n.action)(_=>{for(const k in _)typeof c[k]=="number"&&(c[k]=c[k]+_[k])});return{get a(){const{currentTime:_}=u.store;if(h({x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation,opacity:u.opacity,color:u.color,fontSize:u.fontSize}),_===0)return c;const k=_-u.page.startTime;if(k>u.page.duration||k<0)return c;const O=u.store.animatedElementsIds;if(O.length&&!O.includes(u.id))return c;const v=u.animations.find(d=>d.type==="enter"),x=(v==null?void 0:v.enabled)&&k<v.delay;x&&h({opacity:0});const g=(v==null?void 0:v.enabled)&&k>=v.delay&&k<=v.delay+v.duration;if(g){const d=k-v.delay,m=(0,t.animate)({element:u,animation:v,dTime:d}),y=(0,e.getDiff)(u,m);b(y)}const p=u.animations.find(d=>d.type==="exit");if(!x&&!g&&(p!=null&&p.enabled)&&k>=u.page.duration-p.duration-p.delay&&k<=u.page.duration-p.delay){const d=k-(u.page.duration-p.duration-p.delay),m=(0,t.animate)({element:u,animation:p,dTime:d}),y=(0,e.getDiff)(u,m);b(y)}p!=null&&p.enabled&&k>=u.page.duration-p.delay&&h({opacity:0});const P=u.animations.find(d=>d.type==="loop");if(P!=null&&P.enabled){const d=k,m=(0,t.animate)({element:u,animation:P,dTime:d}),y=(0,e.getDiff)(u,m);b(y)}return c},animated:_=>u.a[_]}}).actions(u=>({setAnimation(c,h){const b=u.animations.find(_=>_.type===c);b?Object.assign(b,h):u.animations.push(Object.assign({type:c},h))}}))}(lg)),lg}var ug={},Wb;function ax(){return Wb||(Wb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=void 0;const i=eo,t=Sc();e.TextElement=t.Shape.named("Text").props({type:"text",text:"",placeholder:"",fontSize:14,fontFamily:"Roboto",fontStyle:"normal",fontWeight:"normal",textDecoration:"",fill:"black",align:"center",width:100,height:0,verticalAlign:"top",strokeWidth:0,stroke:"black",lineHeight:i.types.optional(i.types.union(i.types.number,i.types.string),1.2),letterSpacing:0,_editModeEnabled:!1,backgroundEnabled:!1,backgroundColor:"#7ED321",backgroundOpacity:1,backgroundCornerRadius:.5,backgroundPadding:.5}).preProcessSnapshot(n=>Object.assign({},n)).actions(n=>({toggleEditMode(a){n._editModeEnabled=a??!n._editModeEnabled,n._editModeEnabled?n.store.history.startTransaction():n.store.history.endTransaction()}}))}(ug)),ug}var cg={},Yb;function K4(){return Yb||(Yb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImageElement=void 0;const i=Sc();e.ImageElement=i.Shape.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,_cropModeEnabled:!1}).actions(t=>({toggleCropMode(n){t._cropModeEnabled=n??!t._cropModeEnabled,t._cropModeEnabled?t.store.history.startTransaction():t.store.history.endTransaction()},beforeDestroy(){t._cropModeEnabled&&t.store.history.endTransaction()}}))}(cg)),cg}var fg={},Kb;function lx(){return Kb||(Kb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=void 0;const i=K4();e.VideoElement=i.ImageElement.named("Video").props({type:"video",duration:0,startTime:0,endTime:1,volume:1})}(fg)),fg}var dg={},Xb;function sx(){return Xb||(Xb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0;const i=eo,t=Sc();e.LineElement=t.Shape.named("Line").props({type:"line",width:400,height:10,color:"black",dash:i.types.array(i.types.number),startHead:"",endHead:""}).actions(n=>({}))}(dg)),dg}var hg={},Zb;function ux(){return Zb||(Zb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SVGElement=void 0;const i=eo,t=Sc();e.SVGElement=t.Shape.named("SVG").props({type:"svg",src:"",maskSrc:"",cropX:0,cropY:0,cropWidth:1,cropHeight:1,keepRatio:!0,flipX:!1,flipY:!1,width:100,height:100,borderColor:"black",borderSize:0,cornerRadius:0,colorsReplace:i.types.map(i.types.string)}).preProcessSnapshot(n=>Object.assign(Object.assign({},n),{src:n.src||n.svgSource})).actions(n=>({replaceColor(a,l){n.colorsReplace.set(a,l)}}))}(hg)),hg}var pg={},Qb;function cx(){return Qb||(Qb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FigureElement=void 0;const i=eo,t=Sc();e.FigureElement=t.Shape.named("Figure").props({type:"figure",subType:"rect",fill:"rgb(0, 161, 255)",dash:i.types.array(i.types.number),strokeWidth:0,stroke:"rgba(98, 197, 255, 1)",cornerRadius:0})}(pg)),pg}var Jb;function Td(){return Jb||(Jb=1,function(e){var i=vd&&vd.__rest||function(p,P){var d={};for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&P.indexOf(m)<0&&(d[m]=p[m]);if(p!=null&&typeof Object.getOwnPropertySymbols=="function"){var y=0;for(m=Object.getOwnPropertySymbols(p);y<m.length;y++)P.indexOf(m[y])<0&&Object.prototype.propertyIsEnumerable.call(p,m[y])&&(d[m[y]]=p[m[y]])}return d};Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES_MAP=e.GroupElement=e.ElementTypes=e.forEveryChild=void 0,e.registerShapeModel=g;const t=eo,n=Hp,a=Y4(),l=Sc(),u=ax(),c=K4(),h=lx(),b=sx(),_=ux(),k=cx(),O=(p,P)=>{if(p.children)for(const d of p.children){if(P(d)===!0)break;(0,e.forEveryChild)(d,P)}};e.forEveryChild=O;const v=[...new Array(20)].map((p,P)=>t.types.late(()=>x[P]));e.ElementTypes=t.types.union({dispatcher:p=>{const P=e.TYPES_MAP[p.type];if(!P)throw new Error(`Unknown element type: "${p.type}"`);return P}},_.SVGElement,u.TextElement,c.ImageElement,b.LineElement,h.VideoElement,k.FigureElement,t.types.late(()=>e.GroupElement),...v),e.GroupElement=a.Node.named("Group").props({type:"group",children:t.types.array(e.ElementTypes)}).views(p=>({get draggable(){let P=!0;return(0,e.forEveryChild)(p,d=>{d.draggable||(P=!1)}),P},get resizable(){let P=!0;return(0,e.forEveryChild)(p,d=>{d.resizable||(P=!1)}),P},get contentEditable(){let P=!0;return(0,e.forEveryChild)(p,d=>{d.contentEditable||(P=!1)}),P},get styleEditable(){let P=!0;return(0,e.forEveryChild)(p,d=>{d.styleEditable||(P=!1)}),P},get locked(){let P=!0;return(0,e.forEveryChild)(p,d=>{d.locked||(P=!1)}),P}})).actions(p=>({set(P){var{draggable:d,contentEditable:m,styleEditable:y,resizable:w}=P,L=i(P,["draggable","contentEditable","styleEditable","resizable"]);d!==void 0&&(0,e.forEveryChild)(p,R=>{R.set({draggable:d})}),m!==void 0&&(0,e.forEveryChild)(p,R=>{R.set({contentEditable:m})}),y!==void 0&&(0,e.forEveryChild)(p,R=>{R.set({styleEditable:y})}),w!==void 0&&(0,e.forEveryChild)(p,R=>{R.set({resizable:w})}),Object.assign(p,L)},addElement(P,{skipSelect:d=!1}={}){const m=e.TYPES_MAP[P.type];if(!m)return void console.error("Can not find model with type "+P.type);P.children&&P.children.forEach(w=>{w.id=(0,n.nanoid)(10)});const y=m.create(Object.assign({id:(0,n.nanoid)(10)},P));return p.children.push(y),y.selectable&&!d&&p.store.selectElements([y.id]),y},setElementZIndex(P,d){const m=p.children.find(y=>y.id===P);m&&((0,t.detach)(m),p.children.remove(m),p.children.splice(d,0,m))}}));const x=[];function g(p,P){const d=p.type;if(!d)throw new Error('You must pass "type" attribute to custom model.');let m=l.Shape.named(d).props(p);P&&(m=P(m)),e.TYPES_MAP[d]=m,x.push(m)}e.TYPES_MAP={svg:_.SVGElement,text:u.TextElement,image:c.ImageElement,group:e.GroupElement,line:b.LineElement,video:h.VideoElement,figure:k.FigureElement}}(vd)),vd}var e3;function fx(){return e3||(e3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.handleHotkey=c;const i=Td();let t=[],n="";const a="polotno_clipboard",l=h=>{t=JSON.parse(JSON.stringify(h));try{localStorage.setItem(a,JSON.stringify(h))}catch{}},u=()=>{try{const h=localStorage.getItem(a);if(h)return JSON.parse(h)}catch{}return t};function c(h,b){var _,k,O,v,x,g,p,P;if(((_=document.activeElement)===null||_===void 0?void 0:_.tagName)==="INPUT"||((k=document.activeElement)===null||k===void 0?void 0:k.tagName)==="TEXTAREA"||((O=document.activeElement)===null||O===void 0?void 0:O.contentEditable)==="true")return;const d=b.selectedElements.filter(L=>L.removable),m=d.map(L=>L.id);h.keyCode!==46&&h.keyCode!==8||b.deleteElements(m);const y=h.ctrlKey||h.metaKey,w=h.shiftKey;if(y&&!w&&h.code==="KeyZ"&&(h.preventDefault(),b.history.undo()),y&&w&&h.code==="KeyZ"&&(h.preventDefault(),b.history.redo()),y&&h.code==="KeyA"){h.preventDefault();const L=(v=b.activePage)===null||v===void 0?void 0:v.children.filter(D=>D.selectable),R=(L==null?void 0:L.map(D=>D.id))||[];b.selectElements(R)}if(y&&h.code==="KeyC"&&(h.preventDefault(),n=(x=b.activePage)===null||x===void 0?void 0:x.id,l(b.selectedElements.map(L=>L.toJSON()))),y&&h.code==="KeyX"&&(h.preventDefault(),n=(g=b.activePage)===null||g===void 0?void 0:g.id,l(b.selectedElements.map(L=>L.toJSON())),b.deleteElements(d)),y&&h.code==="KeyV"){h.preventDefault();let L=0;n===((p=b.activePage)===null||p===void 0?void 0:p.id)&&(L=b.width/20),n=(P=b.activePage)===null||P===void 0?void 0:P.id,b.history.transaction(()=>{const R=[],D=u();(0,i.forEveryChild)({children:D},E=>{delete E.id,E.type!=="group"&&(E.x+=L,E.y+=L)}),D.forEach(E=>{var S;const A=(S=b.activePage)===null||S===void 0?void 0:S.addElement(E);A&&R.push(A.id)}),l(D),b.selectElements(R)})}h.code==="ArrowDown"&&(h.preventDefault(),b.selectedElements.forEach(L=>{L.draggable&&L.set({y:L.y+1})})),h.code==="ArrowUp"&&(h.preventDefault(),b.selectedElements.forEach(L=>{L.draggable&&L.set({y:L.y-1})})),h.code==="ArrowLeft"&&(h.preventDefault(),b.selectedElements.forEach(L=>{L.draggable&&L.set({x:L.x-1})})),h.code==="ArrowRight"&&(h.preventDefault(),b.selectedElements.forEach(L=>{L.draggable&&L.set({x:L.x+1})}))}}(X1)),X1}var gg={},t3;function dx(){return t3||(t3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t=e.getTranslations=e.setTranslations=void 0;const i=da,t=(0,i.observable)({toolbar:{duration:"Duration",opacity:"Opacity",effects:"Effects",blur:"Blur",textBackground:"Background",backgroundCornerRadius:"Corner radius",backgroundOpacity:"Opacity",backgroundPadding:"Padding",brightness:"Brightness",sepia:"Sepia",grayscale:"Grayscale",textStroke:"Text Stroke",shadow:"Shadow",border:"Border",cornerRadius:"Corner Radius",copyStyle:"Copy style",position:"Position",layering:"Layering",toForward:"To forward",up:"Up",down:"Down",toBottom:"To bottom",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",spaceEvenly:"Space evenly",horizontalDistribution:"Horizontally",verticalDistribution:"Vertically",strokeWidth:"Stroke Width",colorPicker:{solid:"Solid",linear:"Linear"},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",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:"Upload Image",uploadTip:"Do you want to upload your own images?",background:"Background",resize:"Resize",layers:"Layers",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"}});function n(_,k){var O,v=k.split("."),x=_;for(O=0;O<v.length;++O){if(x[v[O]]==null)return;x=x[v[O]]}return x}const a=_=>_&&typeof _=="object";function l(_,k){Object.keys(k).forEach(O=>{const v=_[O],x=k[O];a(x)&&a(v)?l(v,x):_[O]=x})}function u(_,k,O=""){Object.keys(k).forEach(v=>{const x=k[v],g=O?`${O}.${v}`:v;a(x)?a(_[v])?u(_[v],x,g):console.warn(`Missing nested translation object at '${g}'`):_[v]===void 0&&console.warn(`Missing translation '${g}'`)})}e.setTranslations=(0,i.action)((_,{validate:k=!1}={})=>{k&&u(_,t),l(t,_)});const c=()=>(0,i.toJS)(t);e.getTranslations=c;const h={},b=_=>{const k=n(t,_);if(k!==void 0)return k;h[_]||(h[_]=!0,console.warn(`Missing translation '${_}'`));const O=_.split("."),v=O[O.length-1]||" ";return v.charAt(0).toUpperCase()+v.slice(1)};e.t=b}(gg)),gg}var n3;function hx(){return n3||(n3=1,function(e){var i=gf&&gf.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceCanvas=void 0;const t=i(Tn()),n=Qi,a=i(GO()),l=VO(),u=$O(),c=fx(),h=dx(),b=`Polotno warning: <Workspace /> component can not automatically detect its size.
|
|
301
|
-
Width or height of parent elements is equal 0.
|
|
302
|
-
Please make sure it has non-zero size. You may need to adjust it with your styles. <Workspace /> will automatically fit into parent container.
|
|
303
|
-
For simpler debugging here is the log of the parent element:`,_=(g,p,P,d,m,y)=>{const w=t.default.useRef({width:p,height:P}),L=t.default.useRef({top:0,left:0}),R=t.default.useRef(!1),D=t.default.useRef(m.pages.length);R.current=D.current!==m.pages.length,D.current=m.pages.length,t.default.useEffect(()=>{const E=g.current,S=A=>{L.current={top:E.scrollTop,left:E.scrollLeft}};return E.addEventListener("scroll",S),()=>{E.removeEventListener("scroll",S)}},[]),t.default.useLayoutEffect(()=>{if(!g.current||R.current)return;const E=g.current,S=(L.current.left+E.offsetWidth/2)/w.current.width,A=(L.current.top+E.offsetHeight/2)/w.current.height;y.current=!0,E.scrollLeft=S*p-E.offsetWidth/2,E.scrollTop=A*P-E.offsetHeight/2,w.current={width:p,height:P}},[d,p,P])},k=({element:g,scrollTop:p=0,duration:P=300,onFinish:d=()=>{}})=>{const m=g.scrollTop,y=p-m;let w=0,L=!1;if(P===0)return g.scrollTop=p,()=>{};const R=()=>{if(L)return;w+=20;const E=D(w,m,y,P);g.scrollTop=E,w<P?setTimeout(R,20):d()},D=(E,S,A,M)=>(E/=M/2)<1?A/2*E*E+S:-A/2*(--E*(E-2)-1)+S;return R(),()=>{L=!0}},O=(g,p,P,d,m,y)=>{const w=t.default.useRef(!1),L=t.default.useRef(null),R=t.default.useRef(!1);t.default.useEffect(()=>{const E=g.current,S=()=>{m.current};return E.addEventListener("scroll",S),()=>{E.removeEventListener("scroll",S)}},[]);const D=P.pages.indexOf(P.activePage);return t.default.useLayoutEffect(()=>{if(!P.activePage||!g.current||w.current)return;const E=g.current,S=P.pages.indexOf(P.activePage)*p;let A=()=>{};return(Math.abs(S-E.scrollTop)>.5*p||R.current)&&(R.current=!0,A=k({element:E,scrollTop:S,onFinish:()=>{R.current=!1},duration:P.isPlaying?0:300})),A},[P.activePage,D,P.isPlaying]),{handleScroll:E=>{if(y||R.current)return;w.current=!0,clearTimeout(L.current),L.current=setTimeout(()=>{w.current=!1},300);const S=E.currentTarget.childNodes[0].offsetHeight,A=E.currentTarget.scrollTop,M=Math.floor((A+d.height/3)/S),T=P.pages[M];T&&P.activePage!==T&&T.select()}}},v=({store:g})=>t.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}},t.default.createElement("p",null,(0,h.t)("workspace.noPages")),t.default.createElement("button",{onClick:()=>{g.addPage()}},(0,h.t)("workspace.addPage"))),x=({width:g,height:p,xPadding:P,yPadding:d,backgroundColor:m})=>t.default.createElement("div",{style:{width:g+"px",height:p+"px",backgroundColor:m,paddingLeft:P+"px",paddingRight:P+"px",paddingTop:d+"px",paddingBottom:d+"px"}},t.default.createElement("div",{style:{width:" 100%",height:"100%",backgroundColor:"white"}}));e.WorkspaceCanvas=(0,n.observer)(({store:g,pageControlsEnabled:p,backgroundColor:P,pageBorderColor:d,activePageBorderColor:m,bleedColor:y,components:w,onKeyDown:L,paddingX:R,paddingY:D,altCloneEnabled:E=!0,visiblePagesOffset:S,renderOnlyActivePage:A})=>{var M;const T=R??20,B=D??55,[U,Q]=t.default.useState({width:100,height:100}),X=t.default.useRef(U),$=t.default.useRef(null),j=t.default.useRef(null),I=g.bleedVisible?Math.max(0,...g.pages.map(fe=>fe.bleed)):0,z=Math.max(...g.pages.map(fe=>fe.computedWidth)),H=Math.max(...g.pages.map(fe=>fe.computedHeight)),K=((M=g.activePage)===null||M===void 0?void 0:M.computedHeight)||0,ee=z+2*I,V=(A?K:H)+2*I,Z=async({skipTimeout:fe}={skipTimeout:!1})=>{if(fe||await new Promise(tt=>setTimeout(tt,50)),$.current===null)return;const ge=$.current.getBoundingClientRect();ge.width!==0&&ge.height!==0||(console.warn(b),console.log($.current));const Te=j.current.clientWidth||ge.width,Re={width:Te,height:ge.height};(X.current.width!==Re.width||X.current.height!==Re.height)&&(Q(Re),X.current=Re);const ue=(Te-2*T)/ee,me=g.pages.length>1?3.1:2,xe=(ge.height-B*me)/V,Ie=Math.max(Math.min(ue,xe),.01);g.scaleToFit!==Ie&&(g.setScale(Ie),g._setScaleToFit(Ie))};t.default.useLayoutEffect(()=>{Z({skipTimeout:!0})},[]),t.default.useEffect(()=>{Z()},[ee,V]),t.default.useEffect(()=>{g.__()},[]),t.default.useEffect(()=>{const fe=$.current;if(window.ResizeObserver){const ge=new ResizeObserver(()=>{Z({skipTimeout:!0})});return ge.observe(fe),()=>ge.unobserve(fe)}{const ge=setInterval(()=>{Z({skipTimeout:!0})},100);return()=>clearInterval(ge)}},[ee,V]);const Y=Math.max(T,(U.width-ee*g.scale)/2),ne=A?1:g.pages.length,re=V*g.scale*ne,ie=Math.max(B,(U.height-re)/ne/2);t.default.useEffect(()=>{const fe=ge=>{(L||c.handleHotkey)(ge,g)};return window.addEventListener("keydown",fe),()=>window.removeEventListener("keydown",fe)},[]),t.default.useEffect(()=>{var fe;const ge=Te=>{if(Te.ctrlKey||Te.metaKey){Te.preventDefault();const xe=Math.max(3,g.scaleToFit),Ie=Math.min(.1,g.scaleToFit),tt=(Re=Te.deltaY<0?1.05*g.scale:g.scale/1.05,ue=Ie,me=xe,Math.max(ue,Math.min(me,Re)));g.setScale(tt)}else var Re,ue,me};return(fe=j.current)===null||fe===void 0||fe.addEventListener("wheel",ge),()=>{var Te;return(Te=j.current)===null||Te===void 0?void 0:Te.removeEventListener("wheel",ge)}},[]);const ae=t.default.useRef(!1);_(j,ee*g.scale+2*Y,V*g.scale+2*ie,g.scale,g,ae);const{handleScroll:se}=O(j,V*g.scale+2*ie,g,U,ae,A),de=U.width>=ee*g.scale+2*Y,he=P||"rgba(232, 232, 232, 0.9)",Se=g.pages.indexOf(g.activePage),Ee=(w==null?void 0:w.NoPages)||v,De=S??Math.min(3,Math.max(1,Math.ceil(U.height/2/(V*g.scale))));return t.default.createElement("div",{ref:$,style:{width:"100%",height:"100%",position:"relative",outline:"none",flex:1,backgroundColor:he},tabIndex:0,className:"polotno-workspace-container"},t.default.createElement("div",{ref:j,onScroll:se,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"auto",overflowX:de?"hidden":"auto"},className:"polotno-workspace-inner"},g.pages.map((fe,ge)=>{const Te=fe===g.activePage;if(A&&!Te&&!fe._exportingOrRendering&&!fe._forceMount)return null;if(!(Math.abs(ge-Se)<=De||fe._exportingOrRendering||fe._forceMount))return t.default.createElement(x,{key:fe.id,width:ee*g.scale+2*Y,height:V*g.scale+2*ie,backgroundColor:he,xPadding:Y,yPadding:ie});const Re=t.default.createElement(a.default,{key:fe.id,page:fe,xPadding:Y,yPadding:ie,width:ee*g.scale+2*Y,height:V*g.scale+2*ie,store:g,pageControlsEnabled:p,backColor:he,pageBorderColor:d||"lightgrey",activePageBorderColor:m||"rgb(0, 161, 255)",altCloneEnabled:E,bleedColor:y||"rgba(255, 0, 0, 0.1)",components:w});return(fe._exportingOrRendering||fe._forceMount)&&!Te&&A?t.default.createElement("div",{style:{display:"none"},key:fe.id},Re):Re}),g.rulesVisible&&t.default.createElement(l.TopRules,{store:g,xPadding:Y,yPadding:ie,width:ee*g.scale+2*Y,height:V*g.scale+2*ie}),g.pages.length===0&&t.default.createElement(Ee,{store:g}),g.audios.map(fe=>t.default.createElement(u.AudioElement,{key:fe.id,audio:fe,store:g}))))}),e.default=e.WorkspaceCanvas}(gf)),gf}var px=hx(),gx=Ov(),vx=yc(),yd=ts(),vg=Ks(),mx=zd();vx.toggleFadeInAnimation(!1);yd.setTextOverflow("change-font-size");const yx=new URLSearchParams(location.search).get("key"),X4=gx.createStore({key:yx});window.store=X4;window.config={addGlobalFont:mx.addGlobalFont,unstable_useHtmlTextRender:yd.useHtmlTextRender,unstable_setTextVerticalResizeEnabled:yd.setTextVerticalResizeEnabled,unstable_setTextOverflow:yd.setTextOverflow,onLoadError:vg.onLoadError,setAssetLoadTimeout:vg.setAssetLoadTimeout,setFontLoadTimeout:vg.setFontLoadTimeout,unstable_setTextSplitAllowed:yd.setTextSplitAllowed};const bx=i3.createRoot(document.getElementById("root"));bx.render(jt.createElement(px.WorkspaceCanvas,{visiblePagesOffset:0,store:X4,components:{PageControls:()=>null,Tooltip:()=>null}}));
|