polotno-node 2.11.2 → 2.11.4
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-BCBlQANC.js +321 -0
- package/dist/index.html +1 -1
- package/package.json +6 -6
- package/dist/assets/index-DVNrzy9Q.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 Td(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 E0={exports:{}},Dt={};/**
|
|
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 hm;function V_(){if(hm)return Dt;hm=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"),d=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),k=Symbol.iterator;function x(F){return F===null||typeof F!="object"?null:(F=k&&F[k]||F["@@iterator"],typeof F=="function"?F:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,p={};function h(F,H,Y){this.props=F,this.context=H,this.refs=p,this.updater=Y||v}h.prototype.isReactComponent={},h.prototype.setState=function(F,H){if(typeof F!="object"&&typeof F!="function"&&F!=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,F,H,"setState")},h.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function C(){}C.prototype=h.prototype;function g(F,H,Y){this.props=F,this.context=H,this.refs=p,this.updater=Y||v}var b=g.prototype=new C;b.constructor=g,w(b,h.prototype),b.isPureReactComponent=!0;var y=Array.isArray,E=Object.prototype.hasOwnProperty,L={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function D(F,H,Y){var ee,V={},K=null,$=null;if(H!=null)for(ee in H.ref!==void 0&&($=H.ref),H.key!==void 0&&(K=""+H.key),H)E.call(H,ee)&&!R.hasOwnProperty(ee)&&(V[ee]=H[ee]);var ne=arguments.length-2;if(ne===1)V.children=Y;else if(1<ne){for(var re=Array(ne),ie=0;ie<ne;ie++)re[ie]=arguments[ie+2];V.children=re}if(F&&F.defaultProps)for(ee in ne=F.defaultProps,ne)V[ee]===void 0&&(V[ee]=ne[ee]);return{$$typeof:e,type:F,key:K,ref:$,props:V,_owner:L.current}}function O(F,H){return{$$typeof:e,type:F.type,key:H,ref:F.ref,props:F.props,_owner:F._owner}}function S(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function T(F){var H={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(Y){return H[Y]})}var M=/\/+/g;function A(F,H){return typeof F=="object"&&F!==null&&F.key!=null?T(""+F.key):H.toString(36)}function z(F,H,Y,ee,V){var K=typeof F;(K==="undefined"||K==="boolean")&&(F=null);var $=!1;if(F===null)$=!0;else switch(K){case"string":case"number":$=!0;break;case"object":switch(F.$$typeof){case e:case i:$=!0}}if($)return $=F,V=V($),F=ee===""?"."+A($,0):ee,y(V)?(Y="",F!=null&&(Y=F.replace(M,"$&/")+"/"),z(V,H,Y,"",function(ie){return ie})):V!=null&&(S(V)&&(V=O(V,Y+(!V.key||$&&$.key===V.key?"":(""+V.key).replace(M,"$&/")+"/")+F)),H.push(V)),1;if($=0,ee=ee===""?".":ee+":",y(F))for(var ne=0;ne<F.length;ne++){K=F[ne];var re=ee+A(K,ne);$+=z(K,H,Y,re,V)}else if(re=x(F),typeof re=="function")for(F=re.call(F),ne=0;!(K=F.next()).done;)K=K.value,re=ee+A(K,ne++),$+=z(K,H,Y,re,V);else if(K==="object")throw H=String(F),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.");return $}function U(F,H,Y){if(F==null)return F;var ee=[],V=0;return z(F,ee,"","",function(K){return H.call(Y,K,V++)}),ee}function Z(F){if(F._status===-1){var H=F._result;H=H(),H.then(function(Y){(F._status===0||F._status===-1)&&(F._status=1,F._result=Y)},function(Y){(F._status===0||F._status===-1)&&(F._status=2,F._result=Y)}),F._status===-1&&(F._status=0,F._result=H)}if(F._status===1)return F._result.default;throw F._result}var X={current:null},J={transition:null},B={ReactCurrentDispatcher:X,ReactCurrentBatchConfig:J,ReactCurrentOwner:L};function N(){throw Error("act(...) is not supported in production builds of React.")}return Dt.Children={map:U,forEach:function(F,H,Y){U(F,function(){H.apply(this,arguments)},Y)},count:function(F){var H=0;return U(F,function(){H++}),H},toArray:function(F){return U(F,function(H){return H})||[]},only:function(F){if(!S(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},Dt.Component=h,Dt.Fragment=t,Dt.Profiler=a,Dt.PureComponent=g,Dt.StrictMode=n,Dt.Suspense=d,Dt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,Dt.act=N,Dt.cloneElement=function(F,H,Y){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var ee=w({},F.props),V=F.key,K=F.ref,$=F._owner;if(H!=null){if(H.ref!==void 0&&(K=H.ref,$=L.current),H.key!==void 0&&(V=""+H.key),F.type&&F.type.defaultProps)var ne=F.type.defaultProps;for(re in H)E.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=Y;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:F.type,key:V,ref:K,props:ee,_owner:$}},Dt.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:l,_context:F},F.Consumer=F},Dt.createElement=D,Dt.createFactory=function(F){var H=D.bind(null,F);return H.type=F,H},Dt.createRef=function(){return{current:null}},Dt.forwardRef=function(F){return{$$typeof:c,render:F}},Dt.isValidElement=S,Dt.lazy=function(F){return{$$typeof:_,_payload:{_status:-1,_result:F},_init:Z}},Dt.memo=function(F,H){return{$$typeof:m,type:F,compare:H===void 0?null:H}},Dt.startTransition=function(F){var H=J.transition;J.transition={};try{F()}finally{J.transition=H}},Dt.unstable_act=N,Dt.useCallback=function(F,H){return X.current.useCallback(F,H)},Dt.useContext=function(F){return X.current.useContext(F)},Dt.useDebugValue=function(){},Dt.useDeferredValue=function(F){return X.current.useDeferredValue(F)},Dt.useEffect=function(F,H){return X.current.useEffect(F,H)},Dt.useId=function(){return X.current.useId()},Dt.useImperativeHandle=function(F,H,Y){return X.current.useImperativeHandle(F,H,Y)},Dt.useInsertionEffect=function(F,H){return X.current.useInsertionEffect(F,H)},Dt.useLayoutEffect=function(F,H){return X.current.useLayoutEffect(F,H)},Dt.useMemo=function(F,H){return X.current.useMemo(F,H)},Dt.useReducer=function(F,H,Y){return X.current.useReducer(F,H,Y)},Dt.useRef=function(F){return X.current.useRef(F)},Dt.useState=function(F){return X.current.useState(F)},Dt.useSyncExternalStore=function(F,H,Y){return X.current.useSyncExternalStore(F,H,Y)},Dt.useTransition=function(){return X.current.useTransition()},Dt.version="18.3.1",Dt}var pm;function An(){return pm||(pm=1,E0.exports=V_()),E0.exports}var On=An();const qt=Td(On);var $h={},O0={exports:{}},pi={},x0={exports:{}},P0={};/**
|
|
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 gm;function $_(){return gm||(gm=1,function(e){function i(J,B){var N=J.length;J.push(B);e:for(;0<N;){var F=N-1>>>1,H=J[F];if(0<a(H,B))J[F]=B,J[N]=H,N=F;else break e}}function t(J){return J.length===0?null:J[0]}function n(J){if(J.length===0)return null;var B=J[0],N=J.pop();if(N!==B){J[0]=N;e:for(var F=0,H=J.length,Y=H>>>1;F<Y;){var ee=2*(F+1)-1,V=J[ee],K=ee+1,$=J[K];if(0>a(V,N))K<H&&0>a($,V)?(J[F]=$,J[K]=N,F=K):(J[F]=V,J[ee]=N,F=ee);else if(K<H&&0>a($,N))J[F]=$,J[K]=N,F=K;else break e}}return B}function a(J,B){var N=J.sortIndex-B.sortIndex;return N!==0?N:J.id-B.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 d=[],m=[],_=1,k=null,x=3,v=!1,w=!1,p=!1,h=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(J){for(var B=t(m);B!==null;){if(B.callback===null)n(m);else if(B.startTime<=J)n(m),B.sortIndex=B.expirationTime,i(d,B);else break;B=t(m)}}function y(J){if(p=!1,b(J),!w)if(t(d)!==null)w=!0,Z(E);else{var B=t(m);B!==null&&X(y,B.startTime-J)}}function E(J,B){w=!1,p&&(p=!1,C(D),D=-1),v=!0;var N=x;try{for(b(B),k=t(d);k!==null&&(!(k.expirationTime>B)||J&&!T());){var F=k.callback;if(typeof F=="function"){k.callback=null,x=k.priorityLevel;var H=F(k.expirationTime<=B);B=e.unstable_now(),typeof H=="function"?k.callback=H:k===t(d)&&n(d),b(B)}else n(d);k=t(d)}if(k!==null)var Y=!0;else{var ee=t(m);ee!==null&&X(y,ee.startTime-B),Y=!1}return Y}finally{k=null,x=N,v=!1}}var L=!1,R=null,D=-1,O=5,S=-1;function T(){return!(e.unstable_now()-S<O)}function M(){if(R!==null){var J=e.unstable_now();S=J;var B=!0;try{B=R(!0,J)}finally{B?A():(L=!1,R=null)}}else L=!1}var A;if(typeof g=="function")A=function(){g(M)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,U=z.port2;z.port1.onmessage=M,A=function(){U.postMessage(null)}}else A=function(){h(M,0)};function Z(J){R=J,L||(L=!0,A())}function X(J,B){D=h(function(){J(e.unstable_now())},B)}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(J){J.callback=null},e.unstable_continueExecution=function(){w||v||(w=!0,Z(E))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return t(d)},e.unstable_next=function(J){switch(x){case 1:case 2:case 3:var B=3;break;default:B=x}var N=x;x=B;try{return J()}finally{x=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,B){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var N=x;x=J;try{return B()}finally{x=N}},e.unstable_scheduleCallback=function(J,B,N){var F=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?F+N:F):N=F,J){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=N+H,J={id:_++,callback:B,priorityLevel:J,startTime:N,expirationTime:H,sortIndex:-1},N>F?(J.sortIndex=N,i(m,J),t(d)===null&&J===t(m)&&(p?(C(D),D=-1):p=!0,X(y,N-F))):(J.sortIndex=H,i(d,J),w||v||(w=!0,Z(E))),J},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(J){var B=x;return function(){var N=x;x=B;try{return J.apply(this,arguments)}finally{x=N}}}}(P0)),P0}var vm;function Gg(){return vm||(vm=1,x0.exports=$_()),x0.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 mm;function W_(){if(mm)return pi;mm=1;var e=An(),i=Gg();function t(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,P=1;P<arguments.length;P++)o+="&args[]="+encodeURIComponent(arguments[P]);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"),d=Object.prototype.hasOwnProperty,m=/^[: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 x(r){return d.call(k,r)?!0:d.call(_,r)?!1:m.test(r)?k[r]=!0:(_[r]=!0,!1)}function v(r,o,P,j){if(P!==null&&P.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return j?!1:P!==null?!P.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function w(r,o,P,j){if(o===null||typeof o>"u"||v(r,o,P,j))return!0;if(j)return!1;if(P!==null)switch(P.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 p(r,o,P,j,G,Q,oe){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=j,this.attributeNamespace=G,this.mustUseProperty=P,this.propertyName=r,this.type=o,this.sanitizeURL=Q,this.removeEmptyString=oe}var h={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){h[r]=new p(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];h[o]=new p(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){h[r]=new p(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){h[r]=new p(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){h[r]=new p(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){h[r]=new p(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){h[r]=new p(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){h[r]=new p(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){h[r]=new p(r,5,!1,r.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function g(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(C,g);h[o]=new p(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(C,g);h[o]=new p(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(C,g);h[o]=new p(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){h[r]=new p(r,1,!1,r.toLowerCase(),null,!1,!1)}),h.xlinkHref=new p("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){h[r]=new p(r,1,!1,r.toLowerCase(),null,!0,!0)});function b(r,o,P,j){var G=h.hasOwnProperty(o)?h[o]:null;(G!==null?G.type!==0:j||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(w(o,P,G,j)&&(P=null),j||G===null?x(o)&&(P===null?r.removeAttribute(o):r.setAttribute(o,""+P)):G.mustUseProperty?r[G.propertyName]=P===null?G.type===3?!1:"":P:(o=G.attributeName,j=G.attributeNamespace,P===null?r.removeAttribute(o):(G=G.type,P=G===3||G===4&&P===!0?"":""+P,j?r.setAttributeNS(j,o,P):r.setAttribute(o,P))))}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,E=Symbol.for("react.element"),L=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),T=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),X=Symbol.for("react.offscreen"),J=Symbol.iterator;function B(r){return r===null||typeof r!="object"?null:(r=J&&r[J]||r["@@iterator"],typeof r=="function"?r:null)}var N=Object.assign,F;function H(r){if(F===void 0)try{throw Error()}catch(P){var o=P.stack.trim().match(/\n( *(at )?)/);F=o&&o[1]||""}return`
|
|
26
|
-
`+F+r}var Y=!1;function ee(r,o){if(!r||Y)return"";Y=!0;var P=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(Re){var j=Re}Reflect.construct(r,[],o)}else{try{o.call()}catch(Re){j=Re}r.call(o.prototype)}else{try{throw Error()}catch(Re){j=Re}r()}}catch(Re){if(Re&&j&&typeof Re.stack=="string"){for(var G=Re.stack.split(`
|
|
27
|
-
`),Q=j.stack.split(`
|
|
28
|
-
`),oe=G.length-1,ce=Q.length-1;1<=oe&&0<=ce&&G[oe]!==Q[ce];)ce--;for(;1<=oe&&0<=ce;oe--,ce--)if(G[oe]!==Q[ce]){if(oe!==1||ce!==1)do if(oe--,ce--,0>ce||G[oe]!==Q[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{Y=!1,Error.prepareStackTrace=P}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 K(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 O:return"Profiler";case D:return"StrictMode";case A:return"Suspense";case z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case T: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:K(r.type)||"Memo";case Z:o=r._payload,r=r._init;try{return K(r(o))}catch{}}return null}function $(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 K(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",P=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),j=""+r[o];if(!r.hasOwnProperty(o)&&typeof P<"u"&&typeof P.get=="function"&&typeof P.set=="function"){var G=P.get,Q=P.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return G.call(this)},set:function(oe){j=""+oe,Q.call(this,oe)}}),Object.defineProperty(r,o,{enumerable:P.enumerable}),{getValue:function(){return j},setValue:function(oe){j=""+oe},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function ae(r){r._valueTracker||(r._valueTracker=ie(r))}function ue(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var P=o.getValue(),j="";return r&&(j=re(r)?r.checked?"true":"false":r.value),r=j,r!==P?(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 P=o.checked;return N({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:P??r._wrapperState.initialChecked})}function Se(r,o){var P=o.defaultValue==null?"":o.defaultValue,j=o.checked!=null?o.checked:o.defaultChecked;P=ne(o.value!=null?o.value:P),r._wrapperState={initialChecked:j,initialValue:P,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function me(r,o){o=o.checked,o!=null&&b(r,"checked",o,!1)}function ke(r,o){me(r,o);var P=ne(o.value),j=o.type;if(P!=null)j==="number"?(P===0&&r.value===""||r.value!=P)&&(r.value=""+P):r.value!==""+P&&(r.value=""+P);else if(j==="submit"||j==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?ge(r,o.type,P):o.hasOwnProperty("defaultValue")&&ge(r,o.type,ne(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function fe(r,o,P){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var j=o.type;if(!(j!=="submit"&&j!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,P||o===r.value||(r.value=o),r.defaultValue=o}P=r.name,P!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,P!==""&&(r.name=P)}function ge(r,o,P){(o!=="number"||de(r.ownerDocument)!==r)&&(P==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+P&&(r.defaultValue=""+P))}var Ce=Array.isArray;function Te(r,o,P,j){if(r=r.options,o){o={};for(var G=0;G<P.length;G++)o["$"+P[G]]=!0;for(P=0;P<r.length;P++)G=o.hasOwnProperty("$"+r[P].value),r[P].selected!==G&&(r[P].selected=G),G&&j&&(r[P].defaultSelected=!0)}else{for(P=""+ne(P),o=null,G=0;G<r.length;G++){if(r[G].value===P){r[G].selected=!0,j&&(r[G].defaultSelected=!0);return}o!==null||r[G].disabled||(o=r[G])}o!==null&&(o.selected=!0)}}function se(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(t(91));return N({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function be(r,o){var P=o.value;if(P==null){if(P=o.children,o=o.defaultValue,P!=null){if(o!=null)throw Error(t(92));if(Ce(P)){if(1<P.length)throw Error(t(93));P=P[0]}o=P}o==null&&(o=""),P=o}r._wrapperState={initialValue:ne(P)}}function xe(r,o){var P=ne(o.value),j=ne(o.defaultValue);P!=null&&(P=""+P,P!==r.value&&(r.value=P),o.defaultValue==null&&r.defaultValue!==P&&(r.defaultValue=P)),j!=null&&(r.defaultValue=""+j)}function Ie(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function at(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 gt(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?at(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var je,ze=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,P,j,G){MSApp.execUnsafeLocalFunction(function(){return r(o,P,j,G)})}:r}(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(je=je||document.createElement("div"),je.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=je.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function He(r,o){if(o){var P=r.firstChild;if(P&&P===r.lastChild&&P.nodeType===3){P.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},et=["Webkit","ms","Moz","O"];Object.keys(Xe).forEach(function(r){et.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),Xe[o]=Xe[r]})});function Pt(r,o,P){return o==null||typeof o=="boolean"||o===""?"":P||typeof o!="number"||o===0||Xe.hasOwnProperty(r)&&Xe[r]?(""+o).trim():o+"px"}function wt(r,o){r=r.style;for(var P in o)if(o.hasOwnProperty(P)){var j=P.indexOf("--")===0,G=Pt(P,o[P],j);P==="float"&&(P="cssFloat"),j?r.setProperty(P,G):r[P]=G}}var we=N({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 Ee(r,o){if(o){if(we[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 vt(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 Ct=null;function Ne(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ge=null,it=null,De=null;function mt(r){if(r=_s(r)){if(typeof Ge!="function")throw Error(t(280));var o=r.stateNode;o&&(o=Yn(o),Ge(r.stateNode,r.type,o))}}function Fe(r){it?De?De.push(r):De=[r]:it=r}function ht(){if(it){var r=it,o=De;if(De=it=null,mt(r),o)for(r=0;r<o.length;r++)mt(o[r])}}function _n(r,o){return r(o)}function Be(){}var st=!1;function _t(r,o,P){if(st)return r(o,P);st=!0;try{return _n(r,o,P)}finally{st=!1,(it!==null||De!==null)&&(Be(),ht())}}function Bt(r,o){var P=r.stateNode;if(P===null)return null;var j=Yn(P);if(j===null)return null;P=j[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":(j=!j.disabled)||(r=r.type,j=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!j;break e;default:r=!1}if(r)return null;if(P&&typeof P!="function")throw Error(t(231,o,typeof P));return P}var Ht=!1;if(c)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){Ht=!0}}),window.addEventListener("test",hn,hn),window.removeEventListener("test",hn,hn)}catch{Ht=!1}function In(r,o,P,j,G,Q,oe,ce,pe){var Re=Array.prototype.slice.call(arguments,3);try{o.apply(P,Re)}catch(qe){this.onError(qe)}}var wn=!1,Qn=null,ii=!1,Sr=null,Ze={onError:function(r){wn=!0,Qn=r}};function Et(r,o,P,j,G,Q,oe,ce,pe){wn=!1,Qn=null,In.apply(Ze,arguments)}function Mt(r,o,P,j,G,Q,oe,ce,pe){if(Et.apply(this,arguments),wn){if(wn){var Re=Qn;wn=!1,Qn=null}else throw Error(t(198));ii||(ii=!0,Sr=Re)}}function Vt(r){var o=r,P=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,o.flags&4098&&(P=o.return),r=o.return;while(r)}return o.tag===3?P:null}function $t(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(Vt(r)!==r)throw Error(t(188))}function Gn(r){var o=r.alternate;if(!o){if(o=Vt(r),o===null)throw Error(t(188));return o!==r?null:r}for(var P=r,j=o;;){var G=P.return;if(G===null)break;var Q=G.alternate;if(Q===null){if(j=G.return,j!==null){P=j;continue}break}if(G.child===Q.child){for(Q=G.child;Q;){if(Q===P)return Jn(G),r;if(Q===j)return Jn(G),o;Q=Q.sibling}throw Error(t(188))}if(P.return!==j.return)P=G,j=Q;else{for(var oe=!1,ce=G.child;ce;){if(ce===P){oe=!0,P=G,j=Q;break}if(ce===j){oe=!0,j=G,P=Q;break}ce=ce.sibling}if(!oe){for(ce=Q.child;ce;){if(ce===P){oe=!0,P=Q,j=G;break}if(ce===j){oe=!0,j=Q,P=G;break}ce=ce.sibling}if(!oe)throw Error(t(189))}}if(P.alternate!==j)throw Error(t(190))}if(P.tag!==3)throw Error(t(188));return P.stateNode.current===P?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,Jt=i.unstable_now,to=i.unstable_getCurrentPriorityLevel,Dr=i.unstable_ImmediatePriority,ha=i.unstable_UserBlockingPriority,no=i.unstable_NormalPriority,Vp=i.unstable_LowPriority,Qs=i.unstable_IdlePriority,ro=null,er=null;function un(r){if(er&&typeof er.onCommitFiberRoot=="function")try{er.onCommitFiberRoot(ro,r,void 0,(r.current.flags&128)===128)}catch{}}var Nt=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 P=r.pendingLanes;if(P===0)return 0;var j=0,G=r.suspendedLanes,Q=r.pingedLanes,oe=P&268435455;if(oe!==0){var ce=oe&~G;ce!==0?j=Vn(ce):(Q&=oe,Q!==0&&(j=Vn(Q)))}else oe=P&~G,oe!==0?j=Vn(oe):Q!==0&&(j=Vn(Q));if(j===0)return 0;if(o!==0&&o!==j&&!(o&G)&&(G=j&-j,Q=o&-o,G>=Q||G===16&&(Q&4194240)!==0))return o;if(j&4&&(j|=P&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=j;0<o;)P=31-Nt(o),G=1<<P,j|=r[P],o&=~G;return j}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 P=r.suspendedLanes,j=r.pingedLanes,G=r.expirationTimes,Q=r.pendingLanes;0<Q;){var oe=31-Nt(Q),ce=1<<oe,pe=G[oe];pe===-1?(!(ce&P)||ce&j)&&(G[oe]=Gd(ce,o)):pe<=o&&(r.expiredLanes|=ce),Q&=~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=[],P=0;31>P;P++)o.push(r);return o}function is(r,o,P){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-Nt(o),r[o]=P}function $p(r,o){var P=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 j=r.eventTimes;for(r=r.expirationTimes;0<P;){var G=31-Nt(P),Q=1<<G;o[G]=0,j[G]=-1,r[G]=-1,P&=~Q}}function Oc(r,o){var P=r.entangledLanes|=o;for(r=r.entanglements;P;){var j=31-Nt(P),G=1<<j;G&o|r[j]&o&&(r[j]|=o),P&=~G}}var Gt=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,It=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":It.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ol.delete(o.pointerId)}}function as(r,o,P,j,G,Q){return r===null||r.nativeEvent!==Q?(r={blockedOn:o,domEventName:P,eventSystemFlags:j,nativeEvent:Q,targetContainers:[G]},o!==null&&(o=_s(o),o!==null&&rl(o)),r):(r.eventSystemFlags|=j,o=r.targetContainers,G!==null&&o.indexOf(G)===-1&&o.push(G),r)}function $n(r,o,P,j,G){switch(o){case"focusin":return ai=as(ai,r,o,P,j,G),!0;case"dragenter":return Do=as(Do,r,o,P,j,G),!0;case"mouseover":return ji=as(ji,r,o,P,j,G),!0;case"pointerover":var Q=G.pointerId;return It.set(Q,as(It.get(Q)||null,r,o,P,j,G)),!0;case"gotpointercapture":return Q=G.pointerId,ol.set(Q,as(ol.get(Q)||null,r,o,P,j,G)),!0}return!1}function tu(r){var o=$o(r.target);if(o!==null){var P=Vt(o);if(P!==null){if(o=P.tag,o===13){if(o=$t(P),o!==null){r.blockedOn=o,Js(r.priority,function(){$d(P)});return}}else if(o===3&&P.stateNode.current.memoizedState.isDehydrated){r.blockedOn=P.tag===3?P.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 P=ou(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(P===null){P=r.nativeEvent;var j=new P.constructor(P.type,P);Ct=j,P.target.dispatchEvent(j),Ct=null}else return o=_s(P),o!==null&&rl(o),r.blockedOn=P,!1;o.shift()}return!0}function ru(r,o,P){nu(r)&&P.delete(o)}function Wp(){eu=!1,ai!==null&&nu(ai)&&(ai=null),Do!==null&&nu(Do)&&(Do=null),ji!==null&&nu(ji)&&(ji=null),It.forEach(ru),ol.forEach(ru)}function jo(r,o){r.blockedOn===o&&(r.blockedOn=null,eu||(eu=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Wp)))}function Fr(r){function o(G){return jo(G,r)}if(0<il.length){jo(il[0],r);for(var P=1;P<il.length;P++){var j=il[P];j.blockedOn===r&&(j.blockedOn=null)}}for(ai!==null&&jo(ai,r),Do!==null&&jo(Do,r),ji!==null&&jo(ji,r),It.forEach(o),ol.forEach(o),P=0;P<Fi.length;P++)j=Fi[P],j.blockedOn===r&&(j.blockedOn=null);for(;0<Fi.length&&(P=Fi[0],P.blockedOn===null);)tu(P),P.blockedOn===null&&Fi.shift()}var al=y.ReactCurrentBatchConfig,iu=!0;function wi(r,o,P,j){var G=Gt,Q=al.transition;al.transition=null;try{Gt=1,ll(r,o,P,j)}finally{Gt=G,al.transition=Q}}function oo(r,o,P,j){var G=Gt,Q=al.transition;al.transition=null;try{Gt=4,ll(r,o,P,j)}finally{Gt=G,al.transition=Q}}function ll(r,o,P,j){if(iu){var G=ou(r,o,P,j);if(G===null)wu(r,o,j,sl,P),Kd(r,j);else if($n(G,r,o,P,j))j.stopPropagation();else if(Kd(r,j),o&4&&-1<Yd.indexOf(r)){for(;G!==null;){var Q=_s(G);if(Q!==null&&nl(Q),Q=ou(r,o,P,j),Q===null&&wu(r,o,j,sl,P),Q===G)break;G=Q}G!==null&&j.stopPropagation()}else wu(r,o,j,null,P)}}var sl=null;function ou(r,o,P,j){if(sl=null,r=Ne(j),r=$o(r),r!==null)if(o=Vt(r),o===null)r=null;else if(P=o.tag,P===13){if(r=$t(o),r!==null)return r;r=null}else if(P===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 Vp: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,P=o.length,j,G="value"in tr?tr.value:tr.textContent,Q=G.length;for(r=0;r<P&&o[r]===G[r];r++);var oe=P-r;for(j=1;j<=oe&&o[P-j]===G[Q-j];j++);return ao=G.slice(r,1<j?1-j: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(P,j,G,Q,oe){this._reactName=P,this._targetInst=G,this.type=j,this.nativeEvent=Q,this.target=oe,this.currentTarget=null;for(var ce in r)r.hasOwnProperty(ce)&&(P=r[ce],this[ce]=P?P(Q):Q[ce]);return this.isDefaultPrevented=(Q.defaultPrevented!=null?Q.defaultPrevented:Q.returnValue===!1)?Er:Vr,this.isPropagationStopped=Vr,this}return N(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var P=this.nativeEvent;P&&(P.preventDefault?P.preventDefault():typeof P.returnValue!="unknown"&&(P.returnValue=!1),this.isDefaultPrevented=Er)},stopPropagation:function(){var P=this.nativeEvent;P&&(P.stopPropagation?P.stopPropagation():typeof P.cancelBubble!="unknown"&&(P.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=N({},zr,{view:0,detail:0}),Zd=Dn(Ei),ss,us,nr,Or=N({},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}}),cn=Dn(Or),cs=N({},Or,{dataTransfer:0}),Oi=Dn(cs),Qd=N({},Ei,{relatedTarget:0}),au=Dn(Qd),xc=N({},zr,{animationName:0,elapsedTime:0,pseudoElement:0}),Pc=Dn(xc),Jd=N({},zr,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),lu=Dn(Jd),eh=N({},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"},Yp={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 Kp(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=su[r])?!!o[r]:!1}function ma(){return Kp}var uu=N({},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"?Yp[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=N({},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=N({},Ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ma}),cu=Dn(rh),fu=N({},zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),ul=Dn(fu),kc=N({},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}),Ac=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 Tc(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&&Tc(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,P,j){Fe(j),o=Su(o,"onChange"),0<o.length&&(P=new Si("onChange","change",null,P,j),r.push({event:P,listeners:o}))}var fl=null,Bo=null;function ah(r){qc(r,0)}function Uo(r){var o=Fn(r);if(ue(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,Ne(r)),_t(ah,o)}}function Lc(r,o,P){r==="focusin"?(_a(),fl=o,Bo=P,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 P=Object.keys(r),j=Object.keys(o);if(P.length!==j.length)return!1;for(j=0;j<P.length;j++){var G=P[j];if(!d.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 pn(r,o){var P=Ho(r);r=0;for(var j;P;){if(P.nodeType===3){if(j=r+P.textContent.length,r<=o&&j>=o)return{node:P,offset:o-r};r=j}e:{for(;P;){if(P.nextSibling){P=P.nextSibling;break e}P=P.parentNode}P=void 0}P=Ho(P)}}function Tn(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Tn(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 P=typeof o.contentWindow.location.href=="string"}catch{P=!1}if(P)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(),P=r.focusedElem,j=r.selectionRange;if(o!==P&&P&&P.ownerDocument&&Tn(P.ownerDocument.documentElement,P)){if(j!==null&&hl(P)){if(o=j.start,r=j.end,r===void 0&&(r=o),"selectionStart"in P)P.selectionStart=o,P.selectionEnd=Math.min(r,P.value.length);else if(r=(o=P.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var G=P.textContent.length,Q=Math.min(j.start,G);j=j.end===void 0?Q:Math.min(j.end,G),!r.extend&&Q>j&&(G=j,j=Q,Q=G),G=pn(P,Q);var oe=pn(P,j);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(),Q>j?(r.addRange(o),r.extend(oe.node,oe.offset)):(o.setEnd(oe.node,oe.offset),r.addRange(o)))}}for(o=[],r=P;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<o.length;P++)r=o[P],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,P){var j=P.window===P?P.document:P.nodeType===9?P:P.ownerDocument;gs||pl==null||pl!==de(j)||(j=pl,"selectionStart"in j&&hl(j)?j={start:j.selectionStart,end:j.selectionEnd}:(j=(j.ownerDocument&&j.ownerDocument.defaultView||window).getSelection(),j={anchorNode:j.anchorNode,anchorOffset:j.anchorOffset,focusNode:j.focusNode,focusOffset:j.focusOffset}),Sa&&wa(Sa,j)||(Sa=j,j=Su(Wn,"onSelect"),0<j.length&&(o=new Si("onSelect","select",null,o,P),r.push({event:o,listeners:j}),o.target=pl)))}function Yr(r,o){var P={};return P[r.toLowerCase()]=o.toLowerCase(),P["Webkit"+r]="webkit"+o,P["Moz"+r]="moz"+o,P}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],P;for(P in o)if(o.hasOwnProperty(P)&&P in vu)return Ea[r]=o[P];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,P){var j=r.type||"unknown-event";r.currentTarget=P,Mt(j,o,void 0,r),r.currentTarget=null}function qc(r,o){o=(o&4)!==0;for(var P=0;P<r.length;P++){var j=r[P],G=j.event;j=j.listeners;e:{var Q=void 0;if(o)for(var oe=j.length-1;0<=oe;oe--){var ce=j[oe],pe=ce.instance,Re=ce.currentTarget;if(ce=ce.listener,pe!==Q&&G.isPropagationStopped())break e;bu(G,ce,Re),Q=pe}else for(oe=0;oe<j.length;oe++){if(ce=j[oe],pe=ce.instance,Re=ce.currentTarget,ce=ce.listener,pe!==Q&&G.isPropagationStopped())break e;bu(G,ce,Re),Q=pe}}}if(ii)throw r=Sr,ii=!1,Sr=null,r}function rn(r,o){var P=o[Ou];P===void 0&&(P=o[Ou]=new Set);var j=r+"__bubble";P.has(j)||(Hc(o,r,2,!1),P.add(j))}function _u(r,o,P){var j=0;o&&(j|=4),Hc(P,r,j,o)}var vs="_reactListening"+Math.random().toString(36).slice(2);function xa(r){if(!r[vs]){r[vs]=!0,n.forEach(function(P){P!=="selectionchange"&&(sh.has(P)||_u(P,!1,r),_u(P,!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,P,j){switch(Xd(o)){case 1:var G=wi;break;case 4:G=oo;break;default:G=ll}P=G.bind(null,o,P,r),G=void 0,!Ht||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(G=!0),j?G!==void 0?r.addEventListener(o,P,{capture:!0,passive:G}):r.addEventListener(o,P,!0):G!==void 0?r.addEventListener(o,P,{passive:G}):r.addEventListener(o,P,!1)}function wu(r,o,P,j,G){var Q=j;if(!(o&1)&&!(o&2)&&j!==null)e:for(;;){if(j===null)return;var oe=j.tag;if(oe===3||oe===4){var ce=j.stateNode.containerInfo;if(ce===G||ce.nodeType===8&&ce.parentNode===G)break;if(oe===4)for(oe=j.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){j=Q=oe;continue e}ce=ce.parentNode}}j=j.return}_t(function(){var Re=Q,qe=Ne(P),Ve=[];e:{var Ue=Bc.get(r);if(Ue!==void 0){var tt=Si,lt=r;switch(r){case"keypress":if(ga(P)===0)break e;case"keydown":case"keyup":tt=th;break;case"focusin":lt="focus",tt=au;break;case"focusout":lt="blur",tt=au;break;case"beforeblur":case"afterblur":tt=au;break;case"click":if(P.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":tt=cn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":tt=Oi;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":tt=cu;break;case Dc:case jc:case Fc:tt=Pc;break;case zc:tt=ul;break;case"scroll":tt=Zd;break;case"wheel":tt=Ac;break;case"copy":case"cut":case"paste":tt=lu;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":tt=ya}var ct=(o&4)!==0,qn=!ct&&r==="scroll",Oe=ct?Ue!==null?Ue+"Capture":null:Ue;ct=[];for(var ve=Re,Pe;ve!==null;){Pe=ve;var We=Pe.stateNode;if(Pe.tag===5&&We!==null&&(Pe=We,Oe!==null&&(We=Bt(ve,Oe),We!=null&&ct.push(vl(ve,We,Pe)))),qn)break;ve=ve.return}0<ct.length&&(Ue=new tt(Ue,lt,null,P,qe),Ve.push({event:Ue,listeners:ct}))}}if(!(o&7)){e:{if(Ue=r==="mouseover"||r==="pointerover",tt=r==="mouseout"||r==="pointerout",Ue&&P!==Ct&&(lt=P.relatedTarget||P.fromElement)&&($o(lt)||lt[Bi]))break e;if((tt||Ue)&&(Ue=qe.window===qe?qe:(Ue=qe.ownerDocument)?Ue.defaultView||Ue.parentWindow:window,tt?(lt=P.relatedTarget||P.toElement,tt=Re,lt=lt?$o(lt):null,lt!==null&&(qn=Vt(lt),lt!==qn||lt.tag!==5&<.tag!==6)&&(lt=null)):(tt=null,lt=Re),tt!==lt)){if(ct=cn,We="onMouseLeave",Oe="onMouseEnter",ve="mouse",(r==="pointerout"||r==="pointerover")&&(ct=ya,We="onPointerLeave",Oe="onPointerEnter",ve="pointer"),qn=tt==null?Ue:Fn(tt),Pe=lt==null?Ue:Fn(lt),Ue=new ct(We,ve+"leave",tt,P,qe),Ue.target=qn,Ue.relatedTarget=Pe,We=null,$o(qe)===Re&&(ct=new ct(Oe,ve+"enter",lt,P,qe),ct.target=Pe,ct.relatedTarget=qn,We=ct),qn=We,tt&<)t:{for(ct=tt,Oe=lt,ve=0,Pe=ct;Pe;Pe=Pa(Pe))ve++;for(Pe=0,We=Oe;We;We=Pa(We))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;tt!==null&&uh(Ve,Ue,tt,ct,!1),lt!==null&&qn!==null&&uh(Ve,qn,lt,ct,!0)}}e:{if(Ue=Re?Fn(Re):window,tt=Ue.nodeName&&Ue.nodeName.toLowerCase(),tt==="select"||tt==="input"&&Ue.type==="file")var ft=li;else if(so(Ue))if(dl)ft=Nc;else{ft=En;var yt=Lc}else(tt=Ue.nodeName)&&tt.toLowerCase()==="input"&&(Ue.type==="checkbox"||Ue.type==="radio")&&(ft=pu);if(ft&&(ft=ft(r,Re))){ds(Ve,ft,P,qe);break e}yt&&yt(r,Ue,Re),r==="focusout"&&(yt=Ue._wrapperState)&&yt.controlled&&Ue.type==="number"&&ge(Ue,"number",Ue.value)}switch(yt=Re?Fn(Re):window,r){case"focusin":(so(yt)||yt.contentEditable==="true")&&(pl=yt,Wn=Re,Sa=null);break;case"focusout":Sa=Wn=pl=null;break;case"mousedown":gs=!0;break;case"contextmenu":case"mouseup":case"dragend":gs=!1,gu(Ve,P,qe);break;case"selectionchange":if(ps)break;case"keydown":case"keyup":gu(Ve,P,qe)}var bt;if(fs)e:{switch(r){case"compositionstart":var St="onCompositionStart";break e;case"compositionend":St="onCompositionEnd";break e;case"compositionupdate":St="onCompositionUpdate";break e}St=void 0}else Wr?Tc(r,P)&&(St="onCompositionEnd"):r==="keydown"&&P.keyCode===229&&(St="onCompositionStart");St&&($r&&P.locale!=="ko"&&(Wr||St!=="onCompositionStart"?St==="onCompositionEnd"&&Wr&&(bt=ls()):(tr=qe,Fo="value"in tr?tr.value:tr.textContent,Wr=!0)),yt=Su(Re,St),0<yt.length&&(St=new va(St,r,null,P,qe),Ve.push({event:St,listeners:yt}),bt?St.data=bt:(bt=xi(P),bt!==null&&(St.data=bt)))),(bt=cl?Rc(r,P):oh(r,P))&&(Re=Su(Re,"onBeforeInput"),0<Re.length&&(qe=new va("onBeforeInput","beforeinput",null,P,qe),Ve.push({event:qe,listeners:Re}),qe.data=bt))}qc(Ve,o)})}function vl(r,o,P){return{instance:r,listener:o,currentTarget:P}}function Su(r,o){for(var P=o+"Capture",j=[];r!==null;){var G=r,Q=G.stateNode;G.tag===5&&Q!==null&&(G=Q,Q=Bt(r,P),Q!=null&&j.unshift(vl(r,Q,G)),Q=Bt(r,o),Q!=null&&j.push(vl(r,Q,G))),r=r.return}return j}function Pa(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function uh(r,o,P,j,G){for(var Q=o._reactName,oe=[];P!==null&&P!==j;){var ce=P,pe=ce.alternate,Re=ce.stateNode;if(pe!==null&&pe===j)break;ce.tag===5&&Re!==null&&(ce=Re,G?(pe=Bt(P,Q),pe!=null&&oe.unshift(vl(P,pe,ce))):G||(pe=Bt(P,Q),pe!=null&&oe.push(vl(P,pe,ce)))),P=P.return}oe.length!==0&&r.push({event:o,listeners:oe})}var Xp=/\r\n?/g,ch=/\u0000|\uFFFD/g;function Gc(r){return(typeof r=="string"?r:""+r).replace(Xp,`
|
|
30
|
-
`).replace(ch,"")}function ms(r,o,P){if(o=Gc(o),Gc(r)!==o&&P)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 P=o,j=0;do{var G=P.nextSibling;if(r.removeChild(P),G&&G.nodeType===8)if(P=G.data,P==="/$"){if(j===0){r.removeChild(G),Fr(o);return}j--}else P!=="$"&&P!=="$?"&&P!=="$!"||j++;P=G}while(P);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 P=r.data;if(P==="$"||P==="$!"||P==="$?"){if(o===0)return r;o--}else P==="/$"&&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 P=r.parentNode;P;){if(o=P[Bi]||P[ui]){if(P=o.alternate,o.child!==null||P!==null&&P.child!==null)for(r=ka(r);r!==null;){if(P=r[ui])return P;r=ka(r)}return o}r=P,P=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=[],Aa=-1;function co(r){return{current:r}}function on(r){0>Aa||(r.current=xu[Aa],xu[Aa]=null,Aa--)}function en(r,o){Aa++,xu[Aa]=r.current,r.current=o}var Ui={},ir=co(Ui),dr=co(!1),Wo=Ui;function Ta(r,o){var P=r.type.contextTypes;if(!P)return Ui;var j=r.stateNode;if(j&&j.__reactInternalMemoizedUnmaskedChildContext===o)return j.__reactInternalMemoizedMaskedChildContext;var G={},Q;for(Q in P)G[Q]=o[Q];return j&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=G),G}function hr(r){return r=r.childContextTypes,r!=null}function ml(){on(dr),on(ir)}function Kc(r,o,P){if(ir.current!==Ui)throw Error(t(168));en(ir,o),en(dr,P)}function Pu(r,o,P){var j=r.stateNode;if(o=o.childContextTypes,typeof j.getChildContext!="function")return P;j=j.getChildContext();for(var G in j)if(!(G in o))throw Error(t(108,$(r)||"Unknown",G));return N({},P,j)}function Ra(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||Ui,Wo=ir.current,en(ir,r),en(dr,dr.current),!0}function gh(r,o,P){var j=r.stateNode;if(!j)throw Error(t(169));P?(r=Pu(r,o,Wo),j.__reactInternalMemoizedMergedChildContext=r,on(dr),on(ir),en(ir,r)):on(dr),en(dr,P)}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=Gt;try{var P=qi;for(Gt=1;r<P.length;r++){var j=P[r];do j=j(!0);while(j!==null)}qi=null,yl=!1}catch(G){throw qi!==null&&(qi=qi.slice(r+1)),Ir(Dr,Yo),G}finally{Gt=o,Cu=!1}}return null}var xr=[],Ma=0,Ko=null,Xo=0,Pr=[],Cr=0,Zo=null,Xr=1,gn="";function La(r,o){xr[Ma++]=Xo,xr[Ma++]=Ko,Ko=r,Xo=o}function vh(r,o,P){Pr[Cr++]=Xr,Pr[Cr++]=gn,Pr[Cr++]=Zo,Zo=r;var j=Xr;r=gn;var G=32-Nt(j)-1;j&=~(1<<G),P+=1;var Q=32-Nt(o)+G;if(30<Q){var oe=G-G%5;Q=(j&(1<<oe)-1).toString(32),j>>=oe,G-=oe,Xr=1<<32-Nt(o)+G|P<<G|j,gn=Q+r}else Xr=1<<Q|P<<G|j,gn=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,gn=Pr[--Cr],Pr[Cr]=null,Xr=Pr[--Cr],Pr[Cr]=null}var Zr=null,Ke=null,Xt=!1,Qr=null;function Xc(r,o){var P=Ki(5,null,null,0);P.elementType="DELETED",P.stateNode=o,P.return=r,o=r.deletions,o===null?(r.deletions=[P],r.flags|=16):o.push(P)}function mh(r,o){switch(r.tag){case 5:var P=r.type;return o=o.nodeType!==1||P.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?(P=Zo!==null?{id:Xr,overflow:gn}:null,r.memoizedState={dehydrated:o,treeContext:P,retryLane:1073741824},P=Ki(18,null,null,0),P.stateNode=o,P.return=r,r.child=P,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(Xt){var o=Ke;if(o){var P=o;if(!mh(r,o)){if(Na(r))throw Error(t(418));o=zi(P.nextSibling);var j=Zr;o&&mh(r,o)?Xc(j,P):(r.flags=r.flags&-4097|2,Xt=!1,Zr=r)}}else{if(Na(r))throw Error(t(418));r.flags=r.flags&-4097|2,Xt=!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(!Xt)return ku(r),Xt=!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 P=r.data;if(P==="/$"){if(o===0){Ke=zi(r.nextSibling);break e}o--}else P!=="$"&&P!=="$!"&&P!=="$?"||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,Xt=!1}function Es(r){Qr===null?Qr=[r]:Qr.push(r)}var Qc=y.ReactCurrentBatchConfig;function Cn(r,o,P){if(r=P.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(P._owner){if(P=P._owner,P){if(P.tag!==1)throw Error(t(309));var j=P.stateNode}if(!j)throw Error(t(147,r));var G=j,Q=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===Q?o.ref:(o=function(oe){var ce=G.refs;oe===null?delete ce[Q]:ce[Q]=oe},o._stringRef=Q,o)}if(typeof r!="string")throw Error(t(284));if(!P._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 Au(r){function o(Oe,ve){if(r){var Pe=Oe.deletions;Pe===null?(Oe.deletions=[ve],Oe.flags|=16):Pe.push(ve)}}function P(Oe,ve){if(!r)return null;for(;ve!==null;)o(Oe,ve),ve=ve.sibling;return null}function j(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 Q(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,We){return ve===null||ve.tag!==6?(ve=m0(Pe,Oe.mode,We),ve.return=Oe,ve):(ve=G(ve,Pe),ve.return=Oe,ve)}function pe(Oe,ve,Pe,We){var ft=Pe.type;return ft===R?qe(Oe,ve,Pe.props.children,We,Pe.key):ve!==null&&(ve.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===Z&&Pi(ft)===ve.type)?(We=G(ve,Pe.props),We.ref=Cn(Oe,ve,Pe),We.return=Oe,We):(We=Fh(Pe.type,Pe.key,Pe.props,null,Oe.mode,We),We.ref=Cn(Oe,ve,Pe),We.return=Oe,We)}function Re(Oe,ve,Pe,We){return ve===null||ve.tag!==4||ve.stateNode.containerInfo!==Pe.containerInfo||ve.stateNode.implementation!==Pe.implementation?(ve=y0(Pe,Oe.mode,We),ve.return=Oe,ve):(ve=G(ve,Pe.children||[]),ve.return=Oe,ve)}function qe(Oe,ve,Pe,We,ft){return ve===null||ve.tag!==7?(ve=Ns(Pe,Oe.mode,We,ft),ve.return=Oe,ve):(ve=G(ve,Pe),ve.return=Oe,ve)}function Ve(Oe,ve,Pe){if(typeof ve=="string"&&ve!==""||typeof ve=="number")return ve=m0(""+ve,Oe.mode,Pe),ve.return=Oe,ve;if(typeof ve=="object"&&ve!==null){switch(ve.$$typeof){case E: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=y0(ve,Oe.mode,Pe),ve.return=Oe,ve;case Z:var We=ve._init;return Ve(Oe,We(ve._payload),Pe)}if(Ce(ve)||B(ve))return ve=Ns(ve,Oe.mode,Pe,null),ve.return=Oe,ve;Ur(Oe,ve)}return null}function Ue(Oe,ve,Pe,We){var ft=ve!==null?ve.key:null;if(typeof Pe=="string"&&Pe!==""||typeof Pe=="number")return ft!==null?null:ce(Oe,ve,""+Pe,We);if(typeof Pe=="object"&&Pe!==null){switch(Pe.$$typeof){case E:return Pe.key===ft?pe(Oe,ve,Pe,We):null;case L:return Pe.key===ft?Re(Oe,ve,Pe,We):null;case Z:return ft=Pe._init,Ue(Oe,ve,ft(Pe._payload),We)}if(Ce(Pe)||B(Pe))return ft!==null?null:qe(Oe,ve,Pe,We,null);Ur(Oe,Pe)}return null}function tt(Oe,ve,Pe,We,ft){if(typeof We=="string"&&We!==""||typeof We=="number")return Oe=Oe.get(Pe)||null,ce(ve,Oe,""+We,ft);if(typeof We=="object"&&We!==null){switch(We.$$typeof){case E:return Oe=Oe.get(We.key===null?Pe:We.key)||null,pe(ve,Oe,We,ft);case L:return Oe=Oe.get(We.key===null?Pe:We.key)||null,Re(ve,Oe,We,ft);case Z:var yt=We._init;return tt(Oe,ve,Pe,yt(We._payload),ft)}if(Ce(We)||B(We))return Oe=Oe.get(Pe)||null,qe(ve,Oe,We,ft,null);Ur(ve,We)}return null}function lt(Oe,ve,Pe,We){for(var ft=null,yt=null,bt=ve,St=ve=0,br=null;bt!==null&&St<Pe.length;St++){bt.index>St?(br=bt,bt=null):br=bt.sibling;var Yt=Ue(Oe,bt,Pe[St],We);if(Yt===null){bt===null&&(bt=br);break}r&&bt&&Yt.alternate===null&&o(Oe,bt),ve=Q(Yt,ve,St),yt===null?ft=Yt:yt.sibling=Yt,yt=Yt,bt=br}if(St===Pe.length)return P(Oe,bt),Xt&&La(Oe,St),ft;if(bt===null){for(;St<Pe.length;St++)bt=Ve(Oe,Pe[St],We),bt!==null&&(ve=Q(bt,ve,St),yt===null?ft=bt:yt.sibling=bt,yt=bt);return Xt&&La(Oe,St),ft}for(bt=j(Oe,bt);St<Pe.length;St++)br=tt(bt,Oe,St,Pe[St],We),br!==null&&(r&&br.alternate!==null&&bt.delete(br.key===null?St:br.key),ve=Q(br,ve,St),yt===null?ft=br:yt.sibling=br,yt=br);return r&&bt.forEach(function(Ul){return o(Oe,Ul)}),Xt&&La(Oe,St),ft}function ct(Oe,ve,Pe,We){var ft=B(Pe);if(typeof ft!="function")throw Error(t(150));if(Pe=ft.call(Pe),Pe==null)throw Error(t(151));for(var yt=ft=null,bt=ve,St=ve=0,br=null,Yt=Pe.next();bt!==null&&!Yt.done;St++,Yt=Pe.next()){bt.index>St?(br=bt,bt=null):br=bt.sibling;var Ul=Ue(Oe,bt,Yt.value,We);if(Ul===null){bt===null&&(bt=br);break}r&&bt&&Ul.alternate===null&&o(Oe,bt),ve=Q(Ul,ve,St),yt===null?ft=Ul:yt.sibling=Ul,yt=Ul,bt=br}if(Yt.done)return P(Oe,bt),Xt&&La(Oe,St),ft;if(bt===null){for(;!Yt.done;St++,Yt=Pe.next())Yt=Ve(Oe,Yt.value,We),Yt!==null&&(ve=Q(Yt,ve,St),yt===null?ft=Yt:yt.sibling=Yt,yt=Yt);return Xt&&La(Oe,St),ft}for(bt=j(Oe,bt);!Yt.done;St++,Yt=Pe.next())Yt=tt(bt,Oe,St,Yt.value,We),Yt!==null&&(r&&Yt.alternate!==null&&bt.delete(Yt.key===null?St:Yt.key),ve=Q(Yt,ve,St),yt===null?ft=Yt:yt.sibling=Yt,yt=Yt);return r&&bt.forEach(function(G_){return o(Oe,G_)}),Xt&&La(Oe,St),ft}function qn(Oe,ve,Pe,We){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 E:e:{for(var ft=Pe.key,yt=ve;yt!==null;){if(yt.key===ft){if(ft=Pe.type,ft===R){if(yt.tag===7){P(Oe,yt.sibling),ve=G(yt,Pe.props.children),ve.return=Oe,Oe=ve;break e}}else if(yt.elementType===ft||typeof ft=="object"&&ft!==null&&ft.$$typeof===Z&&Pi(ft)===yt.type){P(Oe,yt.sibling),ve=G(yt,Pe.props),ve.ref=Cn(Oe,yt,Pe),ve.return=Oe,Oe=ve;break e}P(Oe,yt);break}else o(Oe,yt);yt=yt.sibling}Pe.type===R?(ve=Ns(Pe.props.children,Oe.mode,We,Pe.key),ve.return=Oe,Oe=ve):(We=Fh(Pe.type,Pe.key,Pe.props,null,Oe.mode,We),We.ref=Cn(Oe,ve,Pe),We.return=Oe,Oe=We)}return oe(Oe);case L:e:{for(yt=Pe.key;ve!==null;){if(ve.key===yt)if(ve.tag===4&&ve.stateNode.containerInfo===Pe.containerInfo&&ve.stateNode.implementation===Pe.implementation){P(Oe,ve.sibling),ve=G(ve,Pe.children||[]),ve.return=Oe,Oe=ve;break e}else{P(Oe,ve);break}else o(Oe,ve);ve=ve.sibling}ve=y0(Pe,Oe.mode,We),ve.return=Oe,Oe=ve}return oe(Oe);case Z:return yt=Pe._init,qn(Oe,ve,yt(Pe._payload),We)}if(Ce(Pe))return lt(Oe,ve,Pe,We);if(B(Pe))return ct(Oe,ve,Pe,We);Ur(Oe,Pe)}return typeof Pe=="string"&&Pe!==""||typeof Pe=="number"?(Pe=""+Pe,ve!==null&&ve.tag===6?(P(Oe,ve.sibling),ve=G(ve,Pe),ve.return=Oe,Oe=ve):(P(Oe,ve),ve=m0(Pe,Oe.mode,We),ve.return=Oe,Oe=ve),oe(Oe)):P(Oe,ve)}return qn}var Da=Au(!0),ci=Au(!1),Os=co(null),Jr=null,wl=null,Tu=null;function Ru(){Tu=wl=Jr=null}function Mu(r){var o=Os.current;on(Os),r._currentValue=o}function Lu(r,o,P){for(;r!==null;){var j=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,j!==null&&(j.childLanes|=o)):j!==null&&(j.childLanes&o)!==o&&(j.childLanes|=o),r===P)break;r=r.return}}function ho(r,o){Jr=r,Tu=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(Tu!==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,P,j){var G=o.interleaved;return G===null?(P.next=P,Sl(o)):(P.next=G.next,G.next=P),o.interleaved=P,ei(r,j)}function ei(r,o){r.lanes|=o;var P=r.alternate;for(P!==null&&(P.lanes|=o),P=r,r=r.return;r!==null;)r.childLanes|=o,P=r.alternate,P!==null&&(P.childLanes|=o),P=r,r=r.return;return P.tag===3?P.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,P){var j=r.updateQueue;if(j===null)return null;if(j=j.shared,Wt&2){var G=j.pending;return G===null?o.next=o:(o.next=G.next,G.next=o),j.pending=o,ei(r,P)}return G=j.interleaved,G===null?(o.next=o,Sl(j)):(o.next=G.next,G.next=o),j.interleaved=o,ei(r,P)}function Iu(r,o,P){if(o=o.updateQueue,o!==null&&(o=o.shared,(P&4194240)!==0)){var j=o.lanes;j&=r.pendingLanes,P|=j,o.lanes=P,Oc(r,P)}}function Cs(r,o){var P=r.updateQueue,j=r.alternate;if(j!==null&&(j=j.updateQueue,P===j)){var G=null,Q=null;if(P=P.firstBaseUpdate,P!==null){do{var oe={eventTime:P.eventTime,lane:P.lane,tag:P.tag,payload:P.payload,callback:P.callback,next:null};Q===null?G=Q=oe:Q=Q.next=oe,P=P.next}while(P!==null);Q===null?G=Q=o:Q=Q.next=o}else G=Q=o;P={baseState:j.baseState,firstBaseUpdate:G,lastBaseUpdate:Q,shared:j.shared,effects:j.effects},r.updateQueue=P;return}r=P.lastBaseUpdate,r===null?P.firstBaseUpdate=o:r.next=o,P.lastBaseUpdate=o}function El(r,o,P,j){var G=r.updateQueue;Gi=!1;var Q=G.firstBaseUpdate,oe=G.lastBaseUpdate,ce=G.shared.pending;if(ce!==null){G.shared.pending=null;var pe=ce,Re=pe.next;pe.next=null,oe===null?Q=Re:oe.next=Re,oe=pe;var qe=r.alternate;qe!==null&&(qe=qe.updateQueue,ce=qe.lastBaseUpdate,ce!==oe&&(ce===null?qe.firstBaseUpdate=Re:ce.next=Re,qe.lastBaseUpdate=pe))}if(Q!==null){var Ve=G.baseState;oe=0,qe=Re=pe=null,ce=Q;do{var Ue=ce.lane,tt=ce.eventTime;if((j&Ue)===Ue){qe!==null&&(qe=qe.next={eventTime:tt,lane:0,tag:ce.tag,payload:ce.payload,callback:ce.callback,next:null});e:{var lt=r,ct=ce;switch(Ue=o,tt=P,ct.tag){case 1:if(lt=ct.payload,typeof lt=="function"){Ve=lt.call(tt,Ve,Ue);break e}Ve=lt;break e;case 3:lt.flags=lt.flags&-65537|128;case 0:if(lt=ct.payload,Ue=typeof lt=="function"?lt.call(tt,Ve,Ue):lt,Ue==null)break e;Ve=N({},Ve,Ue);break e;case 2:Gi=!0}}ce.callback!==null&&ce.lane!==0&&(r.flags|=64,Ue=G.effects,Ue===null?G.effects=[ce]:Ue.push(ce))}else tt={eventTime:tt,lane:Ue,tag:ce.tag,payload:ce.payload,callback:ce.callback,next:null},qe===null?(Re=qe=tt,pe=Ve):qe=qe.next=tt,oe|=Ue;if(ce=ce.next,ce===null){if(ce=G.shared.pending,ce===null)break;Ue=ce,ce=Ue.next,Ue.next=null,G.lastBaseUpdate=Ue,G.shared.pending=null}}while(!0);if(qe===null&&(pe=Ve),G.baseState=pe,G.firstBaseUpdate=Re,G.lastBaseUpdate=qe,o=G.shared.interleaved,o!==null){G=o;do oe|=G.lane,G=G.next;while(G!==o)}else Q===null&&(G.shared.lanes=0);Ts|=oe,r.lanes=oe,r.memoizedState=Ve}}function xn(r,o,P){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var j=r[o],G=j.callback;if(G!==null){if(j.callback=null,j=P,typeof G!="function")throw Error(t(191,G));G.call(j)}}}var kt={},tn=co(kt),vn=co(kt),kn=co(kt);function zn(r){if(r===kt)throw Error(t(174));return r}function Qo(r,o){switch(en(kn,o),en(vn,r),en(tn,kt),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:gt(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=gt(o,r)}on(tn),en(tn,o)}function mn(){on(tn),on(vn),on(kn)}function Ol(r){zn(kn.current);var o=zn(tn.current),P=gt(o,r.type);o!==P&&(en(vn,r),en(tn,P))}function po(r){vn.current===r&&(on(tn),on(vn))}var an=co(0);function xl(r){for(var o=r;o!==null;){if(o.tag===13){var P=o.memoizedState;if(P!==null&&(P=P.dehydrated,P===null||P.data==="$?"||P.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,Ar=0,Qt=null,Pn=null,Rn=null,Ci=!1,Jo=!1,fi=0,Du=0;function Mn(){throw Error(t(321))}function As(r,o){if(o===null)return!1;for(var P=0;P<o.length&&P<r.length;P++)if(!Br(r[P],o[P]))return!1;return!0}function Cl(r,o,P,j,G,Q){if(Ar=Q,Qt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Pl.current=r===null||r.memoizedState===null?Qp:na,r=P(j,G),Jo){Q=0;do{if(Jo=!1,fi=0,25<=Q)throw Error(t(301));Q+=1,Rn=Pn=null,o.updateQueue=null,Pl.current=Uu,r=P(j,G)}while(Jo)}if(Pl.current=Rl,o=Pn!==null&&Pn.next!==null,Ar=0,Rn=Pn=Qt=null,Ci=!1,o)throw Error(t(300));return r}function kl(){var r=fi!==0;return fi=0,r}function fn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Rn===null?Qt.memoizedState=Rn=r:Rn=Rn.next=r,Rn}function Bn(){if(Pn===null){var r=Qt.alternate;r=r!==null?r.memoizedState:null}else r=Pn.next;var o=Rn===null?Qt.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?Qt.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(),P=o.queue;if(P===null)throw Error(t(311));P.lastRenderedReducer=r;var j=Pn,G=j.baseQueue,Q=P.pending;if(Q!==null){if(G!==null){var oe=G.next;G.next=Q.next,Q.next=oe}j.baseQueue=G=Q,P.pending=null}if(G!==null){Q=G.next,j=j.baseState;var ce=oe=null,pe=null,Re=Q;do{var qe=Re.lane;if((Ar&qe)===qe)pe!==null&&(pe=pe.next={lane:0,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null}),j=Re.hasEagerState?Re.eagerState:r(j,Re.action);else{var Ve={lane:qe,action:Re.action,hasEagerState:Re.hasEagerState,eagerState:Re.eagerState,next:null};pe===null?(ce=pe=Ve,oe=j):pe=pe.next=Ve,Qt.lanes|=qe,Ts|=qe}Re=Re.next}while(Re!==null&&Re!==Q);pe===null?oe=j:pe.next=ce,Br(j,o.memoizedState)||(te=!0),o.memoizedState=j,o.baseState=oe,o.baseQueue=pe,P.lastRenderedState=j}if(r=P.interleaved,r!==null){G=r;do Q=G.lane,Qt.lanes|=Q,Ts|=Q,G=G.next;while(G!==r)}else G===null&&(P.lanes=0);return[o.memoizedState,P.dispatch]}function ju(r){var o=Bn(),P=o.queue;if(P===null)throw Error(t(311));P.lastRenderedReducer=r;var j=P.dispatch,G=P.pending,Q=o.memoizedState;if(G!==null){P.pending=null;var oe=G=G.next;do Q=r(Q,oe.action),oe=oe.next;while(oe!==G);Br(Q,o.memoizedState)||(te=!0),o.memoizedState=Q,o.baseQueue===null&&(o.baseState=Q),P.lastRenderedState=Q}return[Q,j]}function Fu(){}function zu(r,o){var P=Qt,j=Bn(),G=o(),Q=!Br(j.memoizedState,G);if(Q&&(j.memoizedState=G,te=!0),j=j.queue,nf(Jc.bind(null,P,j,r),[r]),j.getSnapshot!==o||Q||Rn!==null&&Rn.memoizedState.tag&1){if(P.flags|=2048,Al(9,go.bind(null,P,j,G,o),void 0,null),yr===null)throw Error(t(349));Ar&30||yh(P,o,G)}return G}function yh(r,o,P){r.flags|=16384,r={getSnapshot:o,value:P},o=Qt.updateQueue,o===null?(o={lastEffect:null,stores:null},Qt.updateQueue=o,o.stores=[r]):(P=o.stores,P===null?o.stores=[r]:P.push(r))}function go(r,o,P,j){o.value=P,o.getSnapshot=j,ef(o)&&Bu(r)}function Jc(r,o,P){return P(function(){ef(o)&&Bu(r)})}function ef(r){var o=r.getSnapshot;r=r.value;try{var P=o();return!Br(r,P)}catch{return!0}}function Bu(r){var o=ei(r,1);o!==null&&bo(o,r,1,-1)}function ea(r){var o=fn();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,Qt,r),[o.memoizedState,r]}function Al(r,o,P,j){return r={tag:r,create:o,destroy:P,deps:j,next:null},o=Qt.updateQueue,o===null?(o={lastEffect:null,stores:null},Qt.updateQueue=o,o.lastEffect=r.next=r):(P=o.lastEffect,P===null?o.lastEffect=r.next=r:(j=P.next,P.next=r,r.next=j,o.lastEffect=r)),r}function tf(){return Bn().memoizedState}function Tl(r,o,P,j){var G=fn();Qt.flags|=r,G.memoizedState=Al(1|o,P,void 0,j===void 0?null:j)}function Fa(r,o,P,j){var G=Bn();j=j===void 0?null:j;var Q=void 0;if(Pn!==null){var oe=Pn.memoizedState;if(Q=oe.destroy,j!==null&&As(j,oe.deps)){G.memoizedState=Al(o,P,Q,j);return}}Qt.flags|=r,G.memoizedState=Al(1|o,P,Q,j)}function bh(r,o){return Tl(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,P){return P=P!=null?P.concat([r]):null,Fa(4,4,ta.bind(null,o,r),P)}function vo(){}function af(r,o){var P=Bn();o=o===void 0?null:o;var j=P.memoizedState;return j!==null&&o!==null&&As(o,j[1])?j[0]:(P.memoizedState=[r,o],r)}function dn(r,o){var P=Bn();o=o===void 0?null:o;var j=P.memoizedState;return j!==null&&o!==null&&As(o,j[1])?j[0]:(r=r(),P.memoizedState=[r,o],r)}function wh(r,o,P){return Ar&21?(Br(P,o)||(P=Ec(),Qt.lanes|=P,Ts|=P,r.baseState=!0),o):(r.baseState&&(r.baseState=!1,te=!0),r.memoizedState=P)}function Sh(r,o){var P=Gt;Gt=P!==0&&4>P?P:4,r(!0);var j=ks.transition;ks.transition={};try{r(!1),o()}finally{Gt=P,ks.transition=j}}function Eh(){return Bn().memoizedState}function Zp(r,o,P){var j=Fl(r);if(P={lane:j,action:P,hasEagerState:!1,eagerState:null,next:null},lf(r))xh(o,P);else if(P=xs(r,o,P,j),P!==null){var G=ni();bo(P,r,j,G),ti(P,o,j)}}function Oh(r,o,P){var j=Fl(r),G={lane:j,action:P,hasEagerState:!1,eagerState:null,next:null};if(lf(r))xh(o,G);else{var Q=r.alternate;if(r.lanes===0&&(Q===null||Q.lanes===0)&&(Q=o.lastRenderedReducer,Q!==null))try{var oe=o.lastRenderedState,ce=Q(oe,P);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{}P=xs(r,o,G,j),P!==null&&(G=ni(),bo(P,r,j,G),ti(P,o,j))}}function lf(r){var o=r.alternate;return r===Qt||o!==null&&o===Qt}function xh(r,o){Jo=Ci=!0;var P=r.pending;P===null?o.next=o:(o.next=P.next,P.next=o),r.pending=o}function ti(r,o,P){if(P&4194240){var j=o.lanes;j&=r.pendingLanes,P|=j,o.lanes=P,Oc(r,P)}}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},Qp={readContext:kr,useCallback:function(r,o){return fn().memoizedState=[r,o===void 0?null:o],r},useContext:kr,useEffect:bh,useImperativeHandle:function(r,o,P){return P=P!=null?P.concat([r]):null,Tl(4194308,4,ta.bind(null,o,r),P)},useLayoutEffect:function(r,o){return Tl(4194308,4,r,o)},useInsertionEffect:function(r,o){return Tl(4,2,r,o)},useMemo:function(r,o){var P=fn();return o=o===void 0?null:o,r=r(),P.memoizedState=[r,o],r},useReducer:function(r,o,P){var j=fn();return o=P!==void 0?P(o):o,j.memoizedState=j.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},j.queue=r,r=r.dispatch=Zp.bind(null,Qt,r),[j.memoizedState,r]},useRef:function(r){var o=fn();return r={current:r},o.memoizedState=r},useState:ea,useDebugValue:vo,useDeferredValue:function(r){return fn().memoizedState=r},useTransition:function(){var r=ea(!1),o=r[0];return r=Sh.bind(null,r[1]),fn().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,P){var j=Qt,G=fn();if(Xt){if(P===void 0)throw Error(t(407));P=P()}else{if(P=o(),yr===null)throw Error(t(349));Ar&30||yh(j,o,P)}G.memoizedState=P;var Q={value:P,getSnapshot:o};return G.queue=Q,bh(Jc.bind(null,j,Q,r),[r]),j.flags|=2048,Al(9,go.bind(null,j,Q,P,o),void 0,null),P},useId:function(){var r=fn(),o=yr.identifierPrefix;if(Xt){var P=gn,j=Xr;P=(j&~(1<<32-Nt(j)-1)).toString(32)+P,o=":"+o+"R"+P,P=fi++,0<P&&(o+="H"+P.toString(32)),o+=":"}else P=Du++,o=":"+o+"r"+P.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:dn,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:dn,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=N({},o),r=r.defaultProps;for(var P in r)o[P]===void 0&&(o[P]=r[P]);return o}return o}function Ml(r,o,P,j){o=r.memoizedState,P=P(j,o),P=P==null?o:N({},o,P),r.memoizedState=P,r.lanes===0&&(r.updateQueue.baseState=P)}var Ll={isMounted:function(r){return(r=r._reactInternals)?Vt(r)===r:!1},enqueueSetState:function(r,o,P){r=r._reactInternals;var j=ni(),G=Fl(r),Q=Vi(j,G);Q.payload=o,P!=null&&(Q.callback=P),o=$i(r,Q,G),o!==null&&(bo(o,r,G,j),Iu(o,r,G))},enqueueReplaceState:function(r,o,P){r=r._reactInternals;var j=ni(),G=Fl(r),Q=Vi(j,G);Q.tag=1,Q.payload=o,P!=null&&(Q.callback=P),o=$i(r,Q,G),o!==null&&(bo(o,r,G,j),Iu(o,r,G))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var P=ni(),j=Fl(r),G=Vi(P,j);G.tag=2,o!=null&&(G.callback=o),o=$i(r,G,j),o!==null&&(bo(o,r,j,P),Iu(o,r,j))}};function qu(r,o,P,j,G,Q,oe){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(j,Q,oe):o.prototype&&o.prototype.isPureReactComponent?!wa(P,j)||!wa(G,Q):!0}function Ph(r,o,P){var j=!1,G=Ui,Q=o.contextType;return typeof Q=="object"&&Q!==null?Q=kr(Q):(G=hr(o)?Wo:ir.current,j=o.contextTypes,Q=(j=j!=null)?Ta(r,G):Ui),o=new o(P,Q),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Ll,r.stateNode=o,o._reactInternals=r,j&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=G,r.__reactInternalMemoizedMaskedChildContext=Q),o}function sf(r,o,P,j){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(P,j),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(P,j),o.state!==r&&Ll.enqueueReplaceState(o,o.state,null)}function Hu(r,o,P,j){var G=r.stateNode;G.props=P,G.state=r.memoizedState,G.refs={},Ps(r);var Q=o.contextType;typeof Q=="object"&&Q!==null?G.context=kr(Q):(Q=hr(o)?Wo:ir.current,G.context=Ta(r,Q)),G.state=r.memoizedState,Q=o.getDerivedStateFromProps,typeof Q=="function"&&(Ml(r,o,Q,P),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,P,G,j),G.state=r.memoizedState),typeof G.componentDidMount=="function"&&(r.flags|=4194308)}function za(r,o){try{var P="",j=o;do P+=V(j),j=j.return;while(j);var G=P}catch(Q){G=`
|
|
31
|
-
Error generating stack: `+Q.message+`
|
|
32
|
-
`+Q.stack}return{value:r,source:o,stack:G,digest:null}}function Gu(r,o,P){return{value:r,source:null,stack:P??null,digest:o??null}}function Nl(r,o){try{console.error(o.value)}catch(P){setTimeout(function(){throw P})}}var Jp=typeof WeakMap=="function"?WeakMap:Map;function Ch(r,o,P){P=Vi(-1,P),P.tag=3,P.payload={element:null};var j=o.value;return P.callback=function(){Mh||(Mh=!0,u0=j),Nl(r,o)},P}function s(r,o,P){P=Vi(-1,P),P.tag=3;var j=r.type.getDerivedStateFromError;if(typeof j=="function"){var G=o.value;P.payload=function(){return j(G)},P.callback=function(){Nl(r,o)}}var Q=r.stateNode;return Q!==null&&typeof Q.componentDidCatch=="function"&&(P.callback=function(){Nl(r,o),typeof j!="function"&&(Dl===null?Dl=new Set([this]):Dl.add(this));var oe=o.stack;this.componentDidCatch(o.value,{componentStack:oe!==null?oe:""})}),P}function f(r,o,P){var j=r.pingCache;if(j===null){j=r.pingCache=new Jp;var G=new Set;j.set(o,G)}else G=j.get(o),G===void 0&&(G=new Set,j.set(o,G));G.has(P)||(G.add(P),r=L_.bind(null,r,o,P),o.then(r,r))}function I(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,P,j,G){return r.mode&1?(r.flags|=65536,r.lanes=G,r):(r===o?r.flags|=65536:(r.flags|=128,P.flags|=131072,P.flags&=-52805,P.tag===1&&(P.alternate===null?P.tag=17:(o=Vi(-1,1),o.tag=2,$i(P,o,1))),P.lanes|=1),r)}var W=y.ReactCurrentOwner,te=!1;function le(r,o,P,j){o.child=r===null?ci(o,null,P,j):Da(o,r.child,P,j)}function ye(r,o,P,j,G){P=P.render;var Q=o.ref;return ho(o,G),j=Cl(r,o,P,j,Q,G),P=kl(),r!==null&&!te?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~G,mr(r,o,G)):(Xt&&P&&bl(o),o.flags|=1,le(r,o,j,G),o.child)}function Me(r,o,P,j,G){if(r===null){var Q=P.type;return typeof Q=="function"&&!v0(Q)&&Q.defaultProps===void 0&&P.compare===null&&P.defaultProps===void 0?(o.tag=15,o.type=Q,$e(r,o,Q,j,G)):(r=Fh(P.type,null,j,o,o.mode,G),r.ref=o.ref,r.return=o,o.child=r)}if(Q=r.child,!(r.lanes&G)){var oe=Q.memoizedProps;if(P=P.compare,P=P!==null?P:wa,P(oe,j)&&r.ref===o.ref)return mr(r,o,G)}return o.flags|=1,r=Bl(Q,j),r.ref=o.ref,r.return=o,o.child=r}function $e(r,o,P,j,G){if(r!==null){var Q=r.memoizedProps;if(wa(Q,j)&&r.ref===o.ref)if(te=!1,o.pendingProps=j=Q,(r.lanes&G)!==0)r.flags&131072&&(te=!0);else return o.lanes=r.lanes,mr(r,o,G)}return Qe(r,o,P,j,G)}function rt(r,o,P){var j=o.pendingProps,G=j.children,Q=r!==null?r.memoizedState:null;if(j.mode==="hidden")if(!(o.mode&1))o.memoizedState={baseLanes:0,cachePool:null,transitions:null},en($u,ki),ki|=P;else{if(!(P&1073741824))return r=Q!==null?Q.baseLanes|P:P,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,en($u,ki),ki|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},j=Q!==null?Q.baseLanes:P,en($u,ki),ki|=j}else Q!==null?(j=Q.baseLanes|P,o.memoizedState=null):j=P,en($u,ki),ki|=j;return le(r,o,G,P),o.child}function Ot(r,o){var P=o.ref;(r===null&&P!==null||r!==null&&r.ref!==P)&&(o.flags|=512,o.flags|=2097152)}function Qe(r,o,P,j,G){var Q=hr(P)?Wo:ir.current;return Q=Ta(o,Q),ho(o,G),P=Cl(r,o,P,j,Q,G),j=kl(),r!==null&&!te?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~G,mr(r,o,G)):(Xt&&j&&bl(o),o.flags|=1,le(r,o,P,G),o.child)}function ln(r,o,P,j,G){if(hr(P)){var Q=!0;Ra(o)}else Q=!1;if(ho(o,G),o.stateNode===null)Ft(r,o),Ph(o,P,j),Hu(o,P,j,G),j=!0;else if(r===null){var oe=o.stateNode,ce=o.memoizedProps;oe.props=ce;var pe=oe.context,Re=P.contextType;typeof Re=="object"&&Re!==null?Re=kr(Re):(Re=hr(P)?Wo:ir.current,Re=Ta(o,Re));var qe=P.getDerivedStateFromProps,Ve=typeof qe=="function"||typeof oe.getSnapshotBeforeUpdate=="function";Ve||typeof oe.UNSAFE_componentWillReceiveProps!="function"&&typeof oe.componentWillReceiveProps!="function"||(ce!==j||pe!==Re)&&sf(o,oe,j,Re),Gi=!1;var Ue=o.memoizedState;oe.state=Ue,El(o,j,oe,G),pe=o.memoizedState,ce!==j||Ue!==pe||dr.current||Gi?(typeof qe=="function"&&(Ml(o,P,qe,j),pe=o.memoizedState),(ce=Gi||qu(o,P,ce,j,Ue,pe,Re))?(Ve||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=j,o.memoizedState=pe),oe.props=j,oe.state=pe,oe.context=Re,j=ce):(typeof oe.componentDidMount=="function"&&(o.flags|=4194308),j=!1)}else{oe=o.stateNode,Nu(r,o),ce=o.memoizedProps,Re=o.type===o.elementType?ce:or(o.type,ce),oe.props=Re,Ve=o.pendingProps,Ue=oe.context,pe=P.contextType,typeof pe=="object"&&pe!==null?pe=kr(pe):(pe=hr(P)?Wo:ir.current,pe=Ta(o,pe));var tt=P.getDerivedStateFromProps;(qe=typeof tt=="function"||typeof oe.getSnapshotBeforeUpdate=="function")||typeof oe.UNSAFE_componentWillReceiveProps!="function"&&typeof oe.componentWillReceiveProps!="function"||(ce!==Ve||Ue!==pe)&&sf(o,oe,j,pe),Gi=!1,Ue=o.memoizedState,oe.state=Ue,El(o,j,oe,G);var lt=o.memoizedState;ce!==Ve||Ue!==lt||dr.current||Gi?(typeof tt=="function"&&(Ml(o,P,tt,j),lt=o.memoizedState),(Re=Gi||qu(o,P,Re,j,Ue,lt,pe)||!1)?(qe||typeof oe.UNSAFE_componentWillUpdate!="function"&&typeof oe.componentWillUpdate!="function"||(typeof oe.componentWillUpdate=="function"&&oe.componentWillUpdate(j,lt,pe),typeof oe.UNSAFE_componentWillUpdate=="function"&&oe.UNSAFE_componentWillUpdate(j,lt,pe)),typeof oe.componentDidUpdate=="function"&&(o.flags|=4),typeof oe.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof oe.componentDidUpdate!="function"||ce===r.memoizedProps&&Ue===r.memoizedState||(o.flags|=4),typeof oe.getSnapshotBeforeUpdate!="function"||ce===r.memoizedProps&&Ue===r.memoizedState||(o.flags|=1024),o.memoizedProps=j,o.memoizedState=lt),oe.props=j,oe.state=lt,oe.context=pe,j=Re):(typeof oe.componentDidUpdate!="function"||ce===r.memoizedProps&&Ue===r.memoizedState||(o.flags|=4),typeof oe.getSnapshotBeforeUpdate!="function"||ce===r.memoizedProps&&Ue===r.memoizedState||(o.flags|=1024),j=!1)}return Zt(r,o,P,j,Q,G)}function Zt(r,o,P,j,G,Q){Ot(r,o);var oe=(o.flags&128)!==0;if(!j&&!oe)return G&&gh(o,P,!1),mr(r,o,Q);j=o.stateNode,W.current=o;var ce=oe&&typeof P.getDerivedStateFromError!="function"?null:j.render();return o.flags|=1,r!==null&&oe?(o.child=Da(o,r.child,null,Q),o.child=Da(o,null,ce,Q)):le(r,o,ce,Q),o.memoizedState=j.state,G&&gh(o,P,!0),o.child}function Tr(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,P,j,G){return Ia(),Es(G),o.flags|=256,le(r,o,P,j),o.child}var Ae={dehydrated:null,treeContext:null,retryLane:0};function _e(r){return{baseLanes:r,cachePool:null,transitions:null}}function Le(r,o,P){var j=o.pendingProps,G=an.current,Q=!1,oe=(o.flags&128)!==0,ce;if((ce=oe)||(ce=r!==null&&r.memoizedState===null?!1:(G&2)!==0),ce?(Q=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(G|=1),en(an,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=j.children,r=j.fallback,Q?(j=o.mode,Q=o.child,oe={mode:"hidden",children:oe},!(j&1)&&Q!==null?(Q.childLanes=0,Q.pendingProps=oe):Q=zh(oe,j,0,null),r=Ns(r,j,P,null),Q.return=o,r.return=o,Q.sibling=r,o.child=Q,o.child.memoizedState=_e(P),o.memoizedState=Ae,r):Je(o,oe));if(G=r.memoizedState,G!==null&&(ce=G.dehydrated,ce!==null))return Rt(r,o,oe,j,ce,G,P);if(Q){Q=j.fallback,oe=o.mode,G=r.child,ce=G.sibling;var pe={mode:"hidden",children:j.children};return!(oe&1)&&o.child!==G?(j=o.child,j.childLanes=0,j.pendingProps=pe,o.deletions=null):(j=Bl(G,pe),j.subtreeFlags=G.subtreeFlags&14680064),ce!==null?Q=Bl(ce,Q):(Q=Ns(Q,oe,P,null),Q.flags|=2),Q.return=o,j.return=o,j.sibling=Q,o.child=j,j=Q,Q=o.child,oe=r.child.memoizedState,oe=oe===null?_e(P):{baseLanes:oe.baseLanes|P,cachePool:null,transitions:oe.transitions},Q.memoizedState=oe,Q.childLanes=r.childLanes&~P,o.memoizedState=Ae,j}return Q=r.child,r=Q.sibling,j=Bl(Q,{mode:"visible",children:j.children}),!(o.mode&1)&&(j.lanes=P),j.return=o,j.sibling=null,r!==null&&(P=o.deletions,P===null?(o.deletions=[r],o.flags|=16):P.push(r)),o.child=j,o.memoizedState=null,j}function Je(r,o){return o=zh({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function pt(r,o,P,j){return j!==null&&Es(j),Da(o,r.child,null,P),r=Je(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function Rt(r,o,P,j,G,Q,oe){if(P)return o.flags&256?(o.flags&=-257,j=Gu(Error(t(422))),pt(r,o,oe,j)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(Q=j.fallback,G=o.mode,j=zh({mode:"visible",children:j.children},G,0,null),Q=Ns(Q,G,oe,null),Q.flags|=2,j.return=o,Q.return=o,j.sibling=Q,o.child=j,o.mode&1&&Da(o,r.child,null,oe),o.child.memoizedState=_e(oe),o.memoizedState=Ae,Q);if(!(o.mode&1))return pt(r,o,oe,null);if(G.data==="$!"){if(j=G.nextSibling&&G.nextSibling.dataset,j)var ce=j.dgst;return j=ce,Q=Error(t(419)),j=Gu(Q,j,void 0),pt(r,o,oe,j)}if(ce=(oe&r.childLanes)!==0,te||ce){if(j=yr,j!==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&(j.suspendedLanes|oe)?0:G,G!==0&&G!==Q.retryLane&&(Q.retryLane=G,ei(r,G),bo(j,r,G,-1))}return g0(),j=Gu(Error(t(421))),pt(r,o,oe,j)}return G.data==="$?"?(o.flags|=128,o.child=r.child,o=N_.bind(null,r),G._reactRetry=o,null):(r=Q.treeContext,Ke=zi(G.nextSibling),Zr=o,Xt=!0,Qr=null,r!==null&&(Pr[Cr++]=Xr,Pr[Cr++]=gn,Pr[Cr++]=Zo,Xr=r.id,gn=r.overflow,Zo=o),o=Je(o,j.children),o.flags|=4096,o)}function xt(r,o,P){r.lanes|=o;var j=r.alternate;j!==null&&(j.lanes|=o),Lu(r.return,o,P)}function Ut(r,o,P,j,G){var Q=r.memoizedState;Q===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:j,tail:P,tailMode:G}:(Q.isBackwards=o,Q.rendering=null,Q.renderingStartTime=0,Q.last=j,Q.tail=P,Q.tailMode=G)}function Un(r,o,P){var j=o.pendingProps,G=j.revealOrder,Q=j.tail;if(le(r,o,j.children,P),j=an.current,j&2)j=j&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&&xt(r,P,o);else if(r.tag===19)xt(r,P,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}j&=1}if(en(an,j),!(o.mode&1))o.memoizedState=null;else switch(G){case"forwards":for(P=o.child,G=null;P!==null;)r=P.alternate,r!==null&&xl(r)===null&&(G=P),P=P.sibling;P=G,P===null?(G=o.child,o.child=null):(G=P.sibling,P.sibling=null),Ut(o,!1,G,P,Q);break;case"backwards":for(P=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=P,P=G,G=r}Ut(o,!0,P,null,Q);break;case"together":Ut(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function Ft(r,o){!(o.mode&1)&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function mr(r,o,P){if(r!==null&&(o.dependencies=r.dependencies),Ts|=o.lanes,!(P&o.childLanes))return null;if(r!==null&&o.child!==r.child)throw Error(t(153));if(o.child!==null){for(r=o.child,P=Bl(r,r.pendingProps),o.child=P,P.return=o;r.sibling!==null;)r=r.sibling,P=P.sibling=Bl(r,r.pendingProps),P.return=o;P.sibling=null}return o.child}function e0(r,o,P){switch(o.tag){case 3:Tr(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 j=o.type._context,G=o.memoizedProps.value;en(Os,j._currentValue),j._currentValue=G;break;case 13:if(j=o.memoizedState,j!==null)return j.dehydrated!==null?(en(an,an.current&1),o.flags|=128,null):P&o.child.childLanes?Le(r,o,P):(en(an,an.current&1),r=mr(r,o,P),r!==null?r.sibling:null);en(an,an.current&1);break;case 19:if(j=(P&o.childLanes)!==0,r.flags&128){if(j)return Un(r,o,P);o.flags|=128}if(G=o.memoizedState,G!==null&&(G.rendering=null,G.tail=null,G.lastEffect=null),en(an,an.current),j)break;return null;case 22:case 23:return o.lanes=0,rt(r,o,P)}return mr(r,o,P)}var Fv,t0,zv,Bv;Fv=function(r,o){for(var P=o.child;P!==null;){if(P.tag===5||P.tag===6)r.appendChild(P.stateNode);else if(P.tag!==4&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===o)break;for(;P.sibling===null;){if(P.return===null||P.return===o)return;P=P.return}P.sibling.return=P.return,P=P.sibling}},t0=function(){},zv=function(r,o,P,j){var G=r.memoizedProps;if(G!==j){r=o.stateNode,zn(tn.current);var Q=null;switch(P){case"input":G=he(r,G),j=he(r,j),Q=[];break;case"select":G=N({},G,{value:void 0}),j=N({},j,{value:void 0}),Q=[];break;case"textarea":G=se(r,G),j=se(r,j),Q=[];break;default:typeof G.onClick!="function"&&typeof j.onClick=="function"&&(r.onclick=Ca)}Ee(P,j);var oe;P=null;for(Re in G)if(!j.hasOwnProperty(Re)&&G.hasOwnProperty(Re)&&G[Re]!=null)if(Re==="style"){var ce=G[Re];for(oe in ce)ce.hasOwnProperty(oe)&&(P||(P={}),P[oe]="")}else Re!=="dangerouslySetInnerHTML"&&Re!=="children"&&Re!=="suppressContentEditableWarning"&&Re!=="suppressHydrationWarning"&&Re!=="autoFocus"&&(a.hasOwnProperty(Re)?Q||(Q=[]):(Q=Q||[]).push(Re,null));for(Re in j){var pe=j[Re];if(ce=G!=null?G[Re]:void 0,j.hasOwnProperty(Re)&&pe!==ce&&(pe!=null||ce!=null))if(Re==="style")if(ce){for(oe in ce)!ce.hasOwnProperty(oe)||pe&&pe.hasOwnProperty(oe)||(P||(P={}),P[oe]="");for(oe in pe)pe.hasOwnProperty(oe)&&ce[oe]!==pe[oe]&&(P||(P={}),P[oe]=pe[oe])}else P||(Q||(Q=[]),Q.push(Re,P)),P=pe;else Re==="dangerouslySetInnerHTML"?(pe=pe?pe.__html:void 0,ce=ce?ce.__html:void 0,pe!=null&&ce!==pe&&(Q=Q||[]).push(Re,pe)):Re==="children"?typeof pe!="string"&&typeof pe!="number"||(Q=Q||[]).push(Re,""+pe):Re!=="suppressContentEditableWarning"&&Re!=="suppressHydrationWarning"&&(a.hasOwnProperty(Re)?(pe!=null&&Re==="onScroll"&&rn("scroll",r),Q||ce===pe||(Q=[])):(Q=Q||[]).push(Re,pe))}P&&(Q=Q||[]).push("style",P);var Re=Q;(o.updateQueue=Re)&&(o.flags|=4)}},Bv=function(r,o,P,j){P!==j&&(o.flags|=4)};function uf(r,o){if(!Xt)switch(r.tailMode){case"hidden":o=r.tail;for(var P=null;o!==null;)o.alternate!==null&&(P=o),o=o.sibling;P===null?r.tail=null:P.sibling=null;break;case"collapsed":P=r.tail;for(var j=null;P!==null;)P.alternate!==null&&(j=P),P=P.sibling;j===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:j.sibling=null}}function qr(r){var o=r.alternate!==null&&r.alternate.child===r.child,P=0,j=0;if(o)for(var G=r.child;G!==null;)P|=G.lanes|G.childLanes,j|=G.subtreeFlags&14680064,j|=G.flags&14680064,G.return=r,G=G.sibling;else for(G=r.child;G!==null;)P|=G.lanes|G.childLanes,j|=G.subtreeFlags,j|=G.flags,G.return=r,G=G.sibling;return r.subtreeFlags|=j,r.childLanes=P,o}function E_(r,o,P){var j=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 j=o.stateNode,mn(),on(dr),on(ir),pr(),j.pendingContext&&(j.context=j.pendingContext,j.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&&(d0(Qr),Qr=null))),t0(r,o),qr(o),null;case 5:po(o);var G=zn(kn.current);if(P=o.type,r!==null&&o.stateNode!=null)zv(r,o,P,j,G),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!j){if(o.stateNode===null)throw Error(t(166));return qr(o),null}if(r=zn(tn.current),Ss(o)){j=o.stateNode,P=o.type;var Q=o.memoizedProps;switch(j[ui]=o,j[bs]=Q,r=(o.mode&1)!==0,P){case"dialog":rn("cancel",j),rn("close",j);break;case"iframe":case"object":case"embed":rn("load",j);break;case"video":case"audio":for(G=0;G<Go.length;G++)rn(Go[G],j);break;case"source":rn("error",j);break;case"img":case"image":case"link":rn("error",j),rn("load",j);break;case"details":rn("toggle",j);break;case"input":Se(j,Q),rn("invalid",j);break;case"select":j._wrapperState={wasMultiple:!!Q.multiple},rn("invalid",j);break;case"textarea":be(j,Q),rn("invalid",j)}Ee(P,Q),G=null;for(var oe in Q)if(Q.hasOwnProperty(oe)){var ce=Q[oe];oe==="children"?typeof ce=="string"?j.textContent!==ce&&(Q.suppressHydrationWarning!==!0&&ms(j.textContent,ce,r),G=["children",ce]):typeof ce=="number"&&j.textContent!==""+ce&&(Q.suppressHydrationWarning!==!0&&ms(j.textContent,ce,r),G=["children",""+ce]):a.hasOwnProperty(oe)&&ce!=null&&oe==="onScroll"&&rn("scroll",j)}switch(P){case"input":ae(j),fe(j,Q,!0);break;case"textarea":ae(j),Ie(j);break;case"select":case"option":break;default:typeof Q.onClick=="function"&&(j.onclick=Ca)}j=G,o.updateQueue=j,j!==null&&(o.flags|=4)}else{oe=G.nodeType===9?G:G.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=at(P)),r==="http://www.w3.org/1999/xhtml"?P==="script"?(r=oe.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof j.is=="string"?r=oe.createElement(P,{is:j.is}):(r=oe.createElement(P),P==="select"&&(oe=r,j.multiple?oe.multiple=!0:j.size&&(oe.size=j.size))):r=oe.createElementNS(r,P),r[ui]=o,r[bs]=j,Fv(r,o,!1,!1),o.stateNode=r;e:{switch(oe=vt(P,j),P){case"dialog":rn("cancel",r),rn("close",r),G=j;break;case"iframe":case"object":case"embed":rn("load",r),G=j;break;case"video":case"audio":for(G=0;G<Go.length;G++)rn(Go[G],r);G=j;break;case"source":rn("error",r),G=j;break;case"img":case"image":case"link":rn("error",r),rn("load",r),G=j;break;case"details":rn("toggle",r),G=j;break;case"input":Se(r,j),G=he(r,j),rn("invalid",r);break;case"option":G=j;break;case"select":r._wrapperState={wasMultiple:!!j.multiple},G=N({},j,{value:void 0}),rn("invalid",r);break;case"textarea":be(r,j),G=se(r,j),rn("invalid",r);break;default:G=j}Ee(P,G),ce=G;for(Q in ce)if(ce.hasOwnProperty(Q)){var pe=ce[Q];Q==="style"?wt(r,pe):Q==="dangerouslySetInnerHTML"?(pe=pe?pe.__html:void 0,pe!=null&&ze(r,pe)):Q==="children"?typeof pe=="string"?(P!=="textarea"||pe!=="")&&He(r,pe):typeof pe=="number"&&He(r,""+pe):Q!=="suppressContentEditableWarning"&&Q!=="suppressHydrationWarning"&&Q!=="autoFocus"&&(a.hasOwnProperty(Q)?pe!=null&&Q==="onScroll"&&rn("scroll",r):pe!=null&&b(r,Q,pe,oe))}switch(P){case"input":ae(r),fe(r,j,!1);break;case"textarea":ae(r),Ie(r);break;case"option":j.value!=null&&r.setAttribute("value",""+ne(j.value));break;case"select":r.multiple=!!j.multiple,Q=j.value,Q!=null?Te(r,!!j.multiple,Q,!1):j.defaultValue!=null&&Te(r,!!j.multiple,j.defaultValue,!0);break;default:typeof G.onClick=="function"&&(r.onclick=Ca)}switch(P){case"button":case"input":case"select":case"textarea":j=!!j.autoFocus;break e;case"img":j=!0;break e;default:j=!1}}j&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return qr(o),null;case 6:if(r&&o.stateNode!=null)Bv(r,o,r.memoizedProps,j);else{if(typeof j!="string"&&o.stateNode===null)throw Error(t(166));if(P=zn(kn.current),zn(tn.current),Ss(o)){if(j=o.stateNode,P=o.memoizedProps,j[ui]=o,(Q=j.nodeValue!==P)&&(r=Zr,r!==null))switch(r.tag){case 3:ms(j.nodeValue,P,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&ms(j.nodeValue,P,(r.mode&1)!==0)}Q&&(o.flags|=4)}else j=(P.nodeType===9?P:P.ownerDocument).createTextNode(j),j[ui]=o,o.stateNode=j}return qr(o),null;case 13:if(on(an),j=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Xt&&Ke!==null&&o.mode&1&&!(o.flags&128))Zc(),Ia(),o.flags|=98560,Q=!1;else if(Q=Ss(o),j!==null&&j.dehydrated!==null){if(r===null){if(!Q)throw Error(t(318));if(Q=o.memoizedState,Q=Q!==null?Q.dehydrated:null,!Q)throw Error(t(317));Q[ui]=o}else Ia(),!(o.flags&128)&&(o.memoizedState=null),o.flags|=4;qr(o),Q=!1}else Qr!==null&&(d0(Qr),Qr=null),Q=!0;if(!Q)return o.flags&65536?o:null}return o.flags&128?(o.lanes=P,o):(j=j!==null,j!==(r!==null&&r.memoizedState!==null)&&j&&(o.child.flags|=8192,o.mode&1&&(r===null||an.current&1?ar===0&&(ar=3):g0())),o.updateQueue!==null&&(o.flags|=4),qr(o),null);case 4:return mn(),t0(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(on(an),Q=o.memoizedState,Q===null)return qr(o),null;if(j=(o.flags&128)!==0,oe=Q.rendering,oe===null)if(j)uf(Q,!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(Q,!1),j=oe.updateQueue,j!==null&&(o.updateQueue=j,o.flags|=4),o.subtreeFlags=0,j=P,P=o.child;P!==null;)Q=P,r=j,Q.flags&=14680066,oe=Q.alternate,oe===null?(Q.childLanes=0,Q.lanes=r,Q.child=null,Q.subtreeFlags=0,Q.memoizedProps=null,Q.memoizedState=null,Q.updateQueue=null,Q.dependencies=null,Q.stateNode=null):(Q.childLanes=oe.childLanes,Q.lanes=oe.lanes,Q.child=oe.child,Q.subtreeFlags=0,Q.deletions=null,Q.memoizedProps=oe.memoizedProps,Q.memoizedState=oe.memoizedState,Q.updateQueue=oe.updateQueue,Q.type=oe.type,r=oe.dependencies,Q.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),P=P.sibling;return en(an,an.current&1|2),o.child}r=r.sibling}Q.tail!==null&&Jt()>Wu&&(o.flags|=128,j=!0,uf(Q,!1),o.lanes=4194304)}else{if(!j)if(r=xl(oe),r!==null){if(o.flags|=128,j=!0,P=r.updateQueue,P!==null&&(o.updateQueue=P,o.flags|=4),uf(Q,!0),Q.tail===null&&Q.tailMode==="hidden"&&!oe.alternate&&!Xt)return qr(o),null}else 2*Jt()-Q.renderingStartTime>Wu&&P!==1073741824&&(o.flags|=128,j=!0,uf(Q,!1),o.lanes=4194304);Q.isBackwards?(oe.sibling=o.child,o.child=oe):(P=Q.last,P!==null?P.sibling=oe:o.child=oe,Q.last=oe)}return Q.tail!==null?(o=Q.tail,Q.rendering=o,Q.tail=o.sibling,Q.renderingStartTime=Jt(),o.sibling=null,P=an.current,en(an,j?P&1|2:P&1),o):(qr(o),null);case 22:case 23:return p0(),j=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==j&&(o.flags|=8192),j&&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 O_(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 mn(),on(dr),on(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(on(an),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 on(an),null;case 4:return mn(),null;case 10:return Mu(o.type._context),null;case 22:case 23:return p0(),null;case 24:return null;default:return null}}var kh=!1,Hr=!1,x_=typeof WeakSet=="function"?WeakSet:Set,ot=null;function Vu(r,o){var P=r.ref;if(P!==null)if(typeof P=="function")try{P(null)}catch(j){Ln(r,o,j)}else P.current=null}function n0(r,o,P){try{P()}catch(j){Ln(r,o,j)}}var Uv=!1;function P_(r,o){if(Vc=iu,r=jn(),hl(r)){if("selectionStart"in r)var P={start:r.selectionStart,end:r.selectionEnd};else e:{P=(P=r.ownerDocument)&&P.defaultView||window;var j=P.getSelection&&P.getSelection();if(j&&j.rangeCount!==0){P=j.anchorNode;var G=j.anchorOffset,Q=j.focusNode;j=j.focusOffset;try{P.nodeType,Q.nodeType}catch{P=null;break e}var oe=0,ce=-1,pe=-1,Re=0,qe=0,Ve=r,Ue=null;t:for(;;){for(var tt;Ve!==P||G!==0&&Ve.nodeType!==3||(ce=oe+G),Ve!==Q||j!==0&&Ve.nodeType!==3||(pe=oe+j),Ve.nodeType===3&&(oe+=Ve.nodeValue.length),(tt=Ve.firstChild)!==null;)Ue=Ve,Ve=tt;for(;;){if(Ve===r)break t;if(Ue===P&&++Re===G&&(ce=oe),Ue===Q&&++qe===j&&(pe=oe),(tt=Ve.nextSibling)!==null)break;Ve=Ue,Ue=Ve.parentNode}Ve=tt}P=ce===-1||pe===-1?null:{start:ce,end:pe}}else P=null}P=P||{start:0,end:0}}else P=null;for($c={focusedElem:r,selectionRange:P},iu=!1,ot=o;ot!==null;)if(o=ot,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,ot=r;else for(;ot!==null;){o=ot;try{var lt=o.alternate;if(o.flags&1024)switch(o.tag){case 0:case 11:case 15:break;case 1:if(lt!==null){var ct=lt.memoizedProps,qn=lt.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(We){Ln(o,o.return,We)}if(r=o.sibling,r!==null){r.return=o.return,ot=r;break}ot=o.return}return lt=Uv,Uv=!1,lt}function cf(r,o,P){var j=o.updateQueue;if(j=j!==null?j.lastEffect:null,j!==null){var G=j=j.next;do{if((G.tag&r)===r){var Q=G.destroy;G.destroy=void 0,Q!==void 0&&n0(o,P,Q)}G=G.next}while(G!==j)}}function Ah(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var P=o=o.next;do{if((P.tag&r)===r){var j=P.create;P.destroy=j()}P=P.next}while(P!==o)}}function r0(r){var o=r.ref;if(o!==null){var P=r.stateNode;switch(r.tag){case 5:r=P;break;default:r=P}typeof o=="function"?o(r):o.current=r}}function qv(r){var o=r.alternate;o!==null&&(r.alternate=null,qv(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 Hv(r){return r.tag===5||r.tag===3||r.tag===4}function Gv(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Hv(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 i0(r,o,P){var j=r.tag;if(j===5||j===6)r=r.stateNode,o?P.nodeType===8?P.parentNode.insertBefore(r,o):P.insertBefore(r,o):(P.nodeType===8?(o=P.parentNode,o.insertBefore(r,P)):(o=P,o.appendChild(r)),P=P._reactRootContainer,P!=null||o.onclick!==null||(o.onclick=Ca));else if(j!==4&&(r=r.child,r!==null))for(i0(r,o,P),r=r.sibling;r!==null;)i0(r,o,P),r=r.sibling}function o0(r,o,P){var j=r.tag;if(j===5||j===6)r=r.stateNode,o?P.insertBefore(r,o):P.appendChild(r);else if(j!==4&&(r=r.child,r!==null))for(o0(r,o,P),r=r.sibling;r!==null;)o0(r,o,P),r=r.sibling}var Rr=null,mo=!1;function Il(r,o,P){for(P=P.child;P!==null;)Vv(r,o,P),P=P.sibling}function Vv(r,o,P){if(er&&typeof er.onCommitFiberUnmount=="function")try{er.onCommitFiberUnmount(ro,P)}catch{}switch(P.tag){case 5:Hr||Vu(P,o);case 6:var j=Rr,G=mo;Rr=null,Il(r,o,P),Rr=j,mo=G,Rr!==null&&(mo?(r=Rr,P=P.stateNode,r.nodeType===8?r.parentNode.removeChild(P):r.removeChild(P)):Rr.removeChild(P.stateNode));break;case 18:Rr!==null&&(mo?(r=Rr,P=P.stateNode,r.nodeType===8?Eu(r.parentNode,P):r.nodeType===1&&Eu(r,P),Fr(r)):Eu(Rr,P.stateNode));break;case 4:j=Rr,G=mo,Rr=P.stateNode.containerInfo,mo=!0,Il(r,o,P),Rr=j,mo=G;break;case 0:case 11:case 14:case 15:if(!Hr&&(j=P.updateQueue,j!==null&&(j=j.lastEffect,j!==null))){G=j=j.next;do{var Q=G,oe=Q.destroy;Q=Q.tag,oe!==void 0&&(Q&2||Q&4)&&n0(P,o,oe),G=G.next}while(G!==j)}Il(r,o,P);break;case 1:if(!Hr&&(Vu(P,o),j=P.stateNode,typeof j.componentWillUnmount=="function"))try{j.props=P.memoizedProps,j.state=P.memoizedState,j.componentWillUnmount()}catch(ce){Ln(P,o,ce)}Il(r,o,P);break;case 21:Il(r,o,P);break;case 22:P.mode&1?(Hr=(j=Hr)||P.memoizedState!==null,Il(r,o,P),Hr=j):Il(r,o,P);break;default:Il(r,o,P)}}function $v(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var P=r.stateNode;P===null&&(P=r.stateNode=new x_),o.forEach(function(j){var G=I_.bind(null,r,j);P.has(j)||(P.add(j),j.then(G,G))})}}function yo(r,o){var P=o.deletions;if(P!==null)for(var j=0;j<P.length;j++){var G=P[j];try{var Q=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));Vv(Q,oe,G),Rr=null,mo=!1;var pe=G.alternate;pe!==null&&(pe.return=null),G.return=null}catch(Re){Ln(G,o,Re)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Wv(o,r),o=o.sibling}function Wv(r,o){var P=r.alternate,j=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(yo(o,r),ra(r),j&4){try{cf(3,r,r.return),Ah(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),j&512&&P!==null&&Vu(P,P.return);break;case 5:if(yo(o,r),ra(r),j&512&&P!==null&&Vu(P,P.return),r.flags&32){var G=r.stateNode;try{He(G,"")}catch(ct){Ln(r,r.return,ct)}}if(j&4&&(G=r.stateNode,G!=null)){var Q=r.memoizedProps,oe=P!==null?P.memoizedProps:Q,ce=r.type,pe=r.updateQueue;if(r.updateQueue=null,pe!==null)try{ce==="input"&&Q.type==="radio"&&Q.name!=null&&me(G,Q),vt(ce,oe);var Re=vt(ce,Q);for(oe=0;oe<pe.length;oe+=2){var qe=pe[oe],Ve=pe[oe+1];qe==="style"?wt(G,Ve):qe==="dangerouslySetInnerHTML"?ze(G,Ve):qe==="children"?He(G,Ve):b(G,qe,Ve,Re)}switch(ce){case"input":ke(G,Q);break;case"textarea":xe(G,Q);break;case"select":var Ue=G._wrapperState.wasMultiple;G._wrapperState.wasMultiple=!!Q.multiple;var tt=Q.value;tt!=null?Te(G,!!Q.multiple,tt,!1):Ue!==!!Q.multiple&&(Q.defaultValue!=null?Te(G,!!Q.multiple,Q.defaultValue,!0):Te(G,!!Q.multiple,Q.multiple?[]:"",!1))}G[bs]=Q}catch(ct){Ln(r,r.return,ct)}}break;case 6:if(yo(o,r),ra(r),j&4){if(r.stateNode===null)throw Error(t(162));G=r.stateNode,Q=r.memoizedProps;try{G.nodeValue=Q}catch(ct){Ln(r,r.return,ct)}}break;case 3:if(yo(o,r),ra(r),j&4&&P!==null&&P.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&&(Q=G.memoizedState!==null,G.stateNode.isHidden=Q,!Q||G.alternate!==null&&G.alternate.memoizedState!==null||(s0=Jt())),j&4&&$v(r);break;case 22:if(qe=P!==null&&P.memoizedState!==null,r.mode&1?(Hr=(Re=Hr)||qe,yo(o,r),Hr=Re):yo(o,r),ra(r),j&8192){if(Re=r.memoizedState!==null,(r.stateNode.isHidden=Re)&&!qe&&r.mode&1)for(ot=r,qe=r.child;qe!==null;){for(Ve=ot=qe;ot!==null;){switch(Ue=ot,tt=Ue.child,Ue.tag){case 0:case 11:case 14:case 15:cf(4,Ue,Ue.return);break;case 1:Vu(Ue,Ue.return);var lt=Ue.stateNode;if(typeof lt.componentWillUnmount=="function"){j=Ue,P=Ue.return;try{o=j,lt.props=o.memoizedProps,lt.state=o.memoizedState,lt.componentWillUnmount()}catch(ct){Ln(j,P,ct)}}break;case 5:Vu(Ue,Ue.return);break;case 22:if(Ue.memoizedState!==null){Xv(Ve);continue}}tt!==null?(tt.return=Ue,ot=tt):Xv(Ve)}qe=qe.sibling}e:for(qe=null,Ve=r;;){if(Ve.tag===5){if(qe===null){qe=Ve;try{G=Ve.stateNode,Re?(Q=G.style,typeof Q.setProperty=="function"?Q.setProperty("display","none","important"):Q.display="none"):(ce=Ve.stateNode,pe=Ve.memoizedProps.style,oe=pe!=null&&pe.hasOwnProperty("display")?pe.display:null,ce.style.display=Pt("display",oe))}catch(ct){Ln(r,r.return,ct)}}}else if(Ve.tag===6){if(qe===null)try{Ve.stateNode.nodeValue=Re?"":Ve.memoizedProps}catch(ct){Ln(r,r.return,ct)}}else if((Ve.tag!==22&&Ve.tag!==23||Ve.memoizedState===null||Ve===r)&&Ve.child!==null){Ve.child.return=Ve,Ve=Ve.child;continue}if(Ve===r)break e;for(;Ve.sibling===null;){if(Ve.return===null||Ve.return===r)break e;qe===Ve&&(qe=null),Ve=Ve.return}qe===Ve&&(qe=null),Ve.sibling.return=Ve.return,Ve=Ve.sibling}}break;case 19:yo(o,r),ra(r),j&4&&$v(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 P=r.return;P!==null;){if(Hv(P)){var j=P;break e}P=P.return}throw Error(t(160))}switch(j.tag){case 5:var G=j.stateNode;j.flags&32&&(He(G,""),j.flags&=-33);var Q=Gv(r);o0(r,Q,G);break;case 3:case 4:var oe=j.stateNode.containerInfo,ce=Gv(r);i0(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 C_(r,o,P){ot=r,Yv(r)}function Yv(r,o,P){for(var j=(r.mode&1)!==0;ot!==null;){var G=ot,Q=G.child;if(G.tag===22&&j){var oe=G.memoizedState!==null||kh;if(!oe){var ce=G.alternate,pe=ce!==null&&ce.memoizedState!==null||Hr;ce=kh;var Re=Hr;if(kh=oe,(Hr=pe)&&!Re)for(ot=G;ot!==null;)oe=ot,pe=oe.child,oe.tag===22&&oe.memoizedState!==null?Zv(G):pe!==null?(pe.return=oe,ot=pe):Zv(G);for(;Q!==null;)ot=Q,Yv(Q),Q=Q.sibling;ot=G,kh=ce,Hr=Re}Kv(r)}else G.subtreeFlags&8772&&Q!==null?(Q.return=G,ot=Q):Kv(r)}}function Kv(r){for(;ot!==null;){var o=ot;if(o.flags&8772){var P=o.alternate;try{if(o.flags&8772)switch(o.tag){case 0:case 11:case 15:Hr||Ah(5,o);break;case 1:var j=o.stateNode;if(o.flags&4&&!Hr)if(P===null)j.componentDidMount();else{var G=o.elementType===o.type?P.memoizedProps:or(o.type,P.memoizedProps);j.componentDidUpdate(G,P.memoizedState,j.__reactInternalSnapshotBeforeUpdate)}var Q=o.updateQueue;Q!==null&&xn(o,Q,j);break;case 3:var oe=o.updateQueue;if(oe!==null){if(P=null,o.child!==null)switch(o.child.tag){case 5:P=o.child.stateNode;break;case 1:P=o.child.stateNode}xn(o,oe,P)}break;case 5:var ce=o.stateNode;if(P===null&&o.flags&4){P=ce;var pe=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":pe.autoFocus&&P.focus();break;case"img":pe.src&&(P.src=pe.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Re=o.alternate;if(Re!==null){var qe=Re.memoizedState;if(qe!==null){var Ve=qe.dehydrated;Ve!==null&&Fr(Ve)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Hr||o.flags&512&&r0(o)}catch(Ue){Ln(o,o.return,Ue)}}if(o===r){ot=null;break}if(P=o.sibling,P!==null){P.return=o.return,ot=P;break}ot=o.return}}function Xv(r){for(;ot!==null;){var o=ot;if(o===r){ot=null;break}var P=o.sibling;if(P!==null){P.return=o.return,ot=P;break}ot=o.return}}function Zv(r){for(;ot!==null;){var o=ot;try{switch(o.tag){case 0:case 11:case 15:var P=o.return;try{Ah(4,o)}catch(pe){Ln(o,P,pe)}break;case 1:var j=o.stateNode;if(typeof j.componentDidMount=="function"){var G=o.return;try{j.componentDidMount()}catch(pe){Ln(o,G,pe)}}var Q=o.return;try{r0(o)}catch(pe){Ln(o,Q,pe)}break;case 5:var oe=o.return;try{r0(o)}catch(pe){Ln(o,oe,pe)}}}catch(pe){Ln(o,o.return,pe)}if(o===r){ot=null;break}var ce=o.sibling;if(ce!==null){ce.return=o.return,ot=ce;break}ot=o.return}}var k_=Math.ceil,Th=y.ReactCurrentDispatcher,a0=y.ReactCurrentOwner,Yi=y.ReactCurrentBatchConfig,Wt=0,yr=null,Xn=null,Mr=0,ki=0,$u=co(0),ar=0,ff=null,Ts=0,Rh=0,l0=0,df=null,di=null,s0=0,Wu=1/0,Ba=null,Mh=!1,u0=null,Dl=null,Lh=!1,jl=null,Nh=0,hf=0,c0=null,Ih=-1,Dh=0;function ni(){return Wt&6?Jt():Ih!==-1?Ih:Ih=Jt()}function Fl(r){return r.mode&1?Wt&2&&Mr!==0?Mr&-Mr:Qc.transition!==null?(Dh===0&&(Dh=Ec()),Dh):(r=Gt,r!==0||(r=window.event,r=r===void 0?16:Xd(r.type)),r):1}function bo(r,o,P,j){if(50<hf)throw hf=0,c0=null,Error(t(185));is(r,P,j),(!(Wt&2)||r!==yr)&&(r===yr&&(!(Wt&2)&&(Rh|=P),ar===4&&zl(r,Mr)),hi(r,j),P===1&&Wt===0&&!(o.mode&1)&&(Wu=Jt()+500,yl&&Yo()))}function hi(r,o){var P=r.callbackNode;Vd(r,o);var j=pa(r,r===yr?Mr:0);if(j===0)P!==null&&Ii(P),r.callbackNode=null,r.callbackPriority=0;else if(o=j&-j,r.callbackPriority!==o){if(P!=null&&Ii(P),o===1)r.tag===0?fo(Jv.bind(null,r)):ws(Jv.bind(null,r)),fh(function(){!(Wt&6)&&Yo()}),P=null;else{switch(os(j)){case 1:P=Dr;break;case 4:P=ha;break;case 16:P=no;break;case 536870912:P=Qs;break;default:P=no}P=lm(P,Qv.bind(null,r))}r.callbackPriority=o,r.callbackNode=P}}function Qv(r,o){if(Ih=-1,Dh=0,Wt&6)throw Error(t(327));var P=r.callbackNode;if(Yu()&&r.callbackNode!==P)return null;var j=pa(r,r===yr?Mr:0);if(j===0)return null;if(j&30||j&r.expiredLanes||o)o=jh(r,j);else{o=j;var G=Wt;Wt|=2;var Q=tm();(yr!==r||Mr!==o)&&(Ba=null,Wu=Jt()+500,Ms(r,o));do try{R_();break}catch(ce){em(r,ce)}while(!0);Ru(),Th.current=Q,Wt=G,Xn!==null?o=0:(yr=null,Mr=0,o=ar)}if(o!==0){if(o===2&&(G=tl(r),G!==0&&(j=G,o=f0(r,G))),o===1)throw P=ff,Ms(r,0),zl(r,j),hi(r,Jt()),P;if(o===6)zl(r,j);else{if(G=r.current.alternate,!(j&30)&&!A_(G)&&(o=jh(r,j),o===2&&(Q=tl(r),Q!==0&&(j=Q,o=f0(r,Q))),o===1))throw P=ff,Ms(r,0),zl(r,j),hi(r,Jt()),P;switch(r.finishedWork=G,r.finishedLanes=j,o){case 0:case 1:throw Error(t(345));case 2:Ls(r,di,Ba);break;case 3:if(zl(r,j),(j&130023424)===j&&(o=s0+500-Jt(),10<o)){if(pa(r,0)!==0)break;if(G=r.suspendedLanes,(G&j)!==j){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,j),(j&4194240)===j)break;for(o=r.eventTimes,G=-1;0<j;){var oe=31-Nt(j);Q=1<<oe,oe=o[oe],oe>G&&(G=oe),j&=~Q}if(j=G,j=Jt()-j,j=(120>j?120:480>j?480:1080>j?1080:1920>j?1920:3e3>j?3e3:4320>j?4320:1960*k_(j/1960))-j,10<j){r.timeoutHandle=Kr(Ls.bind(null,r,di,Ba),j);break}Ls(r,di,Ba);break;case 5:Ls(r,di,Ba);break;default:throw Error(t(329))}}}return hi(r,Jt()),r.callbackNode===P?Qv.bind(null,r):null}function f0(r,o){var P=df;return r.current.memoizedState.isDehydrated&&(Ms(r,o).flags|=256),r=jh(r,o),r!==2&&(o=di,di=P,o!==null&&d0(o)),r}function d0(r){di===null?di=r:di.push.apply(di,r)}function A_(r){for(var o=r;;){if(o.flags&16384){var P=o.updateQueue;if(P!==null&&(P=P.stores,P!==null))for(var j=0;j<P.length;j++){var G=P[j],Q=G.getSnapshot;G=G.value;try{if(!Br(Q(),G))return!1}catch{return!1}}}if(P=o.child,o.subtreeFlags&16384&&P!==null)P.return=o,o=P;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&=~l0,o&=~Rh,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var P=31-Nt(o),j=1<<P;r[P]=-1,o&=~j}}function Jv(r){if(Wt&6)throw Error(t(327));Yu();var o=pa(r,0);if(!(o&1))return hi(r,Jt()),null;var P=jh(r,o);if(r.tag!==0&&P===2){var j=tl(r);j!==0&&(o=j,P=f0(r,j))}if(P===1)throw P=ff,Ms(r,0),zl(r,o),hi(r,Jt()),P;if(P===6)throw Error(t(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Ls(r,di,Ba),hi(r,Jt()),null}function h0(r,o){var P=Wt;Wt|=1;try{return r(o)}finally{Wt=P,Wt===0&&(Wu=Jt()+500,yl&&Yo())}}function Rs(r){jl!==null&&jl.tag===0&&!(Wt&6)&&Yu();var o=Wt;Wt|=1;var P=Yi.transition,j=Gt;try{if(Yi.transition=null,Gt=1,r)return r()}finally{Gt=j,Yi.transition=P,Wt=o,!(Wt&6)&&Yo()}}function p0(){ki=$u.current,on($u)}function Ms(r,o){r.finishedWork=null,r.finishedLanes=0;var P=r.timeoutHandle;if(P!==-1&&(r.timeoutHandle=-1,Yc(P)),Xn!==null)for(P=Xn.return;P!==null;){var j=P;switch(Kn(j),j.tag){case 1:j=j.type.childContextTypes,j!=null&&ml();break;case 3:mn(),on(dr),on(ir),pr();break;case 5:po(j);break;case 4:mn();break;case 13:on(an);break;case 19:on(an);break;case 10:Mu(j.type._context);break;case 22:case 23:p0()}P=P.return}if(yr=r,Xn=r=Bl(r.current,null),Mr=ki=o,ar=0,ff=null,l0=Rh=Ts=0,di=df=null,Hi!==null){for(o=0;o<Hi.length;o++)if(P=Hi[o],j=P.interleaved,j!==null){P.interleaved=null;var G=j.next,Q=P.pending;if(Q!==null){var oe=Q.next;Q.next=G,j.next=oe}P.pending=j}Hi=null}return r}function em(r,o){do{var P=Xn;try{if(Ru(),Pl.current=Rl,Ci){for(var j=Qt.memoizedState;j!==null;){var G=j.queue;G!==null&&(G.pending=null),j=j.next}Ci=!1}if(Ar=0,Rn=Pn=Qt=null,Jo=!1,fi=0,a0.current=null,P===null||P.return===null){ar=1,ff=o,Xn=null;break}e:{var Q=r,oe=P.return,ce=P,pe=o;if(o=Mr,ce.flags|=32768,pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var Re=pe,qe=ce,Ve=qe.tag;if(!(qe.mode&1)&&(Ve===0||Ve===11||Ve===15)){var Ue=qe.alternate;Ue?(qe.updateQueue=Ue.updateQueue,qe.memoizedState=Ue.memoizedState,qe.lanes=Ue.lanes):(qe.updateQueue=null,qe.memoizedState=null)}var tt=I(oe);if(tt!==null){tt.flags&=-257,q(tt,oe,ce,Q,o),tt.mode&1&&f(Q,Re,o),o=tt,pe=Re;var lt=o.updateQueue;if(lt===null){var ct=new Set;ct.add(pe),o.updateQueue=ct}else lt.add(pe);break e}else{if(!(o&1)){f(Q,Re,o),g0();break e}pe=Error(t(426))}}else if(Xt&&ce.mode&1){var qn=I(oe);if(qn!==null){!(qn.flags&65536)&&(qn.flags|=256),q(qn,oe,ce,Q,o),Es(za(pe,ce));break e}}Q=pe=za(pe,ce),ar!==4&&(ar=2),df===null?df=[Q]:df.push(Q),Q=oe;do{switch(Q.tag){case 3:Q.flags|=65536,o&=-o,Q.lanes|=o;var Oe=Ch(Q,pe,o);Cs(Q,Oe);break e;case 1:ce=pe;var ve=Q.type,Pe=Q.stateNode;if(!(Q.flags&128)&&(typeof ve.getDerivedStateFromError=="function"||Pe!==null&&typeof Pe.componentDidCatch=="function"&&(Dl===null||!Dl.has(Pe)))){Q.flags|=65536,o&=-o,Q.lanes|=o;var We=s(Q,ce,o);Cs(Q,We);break e}}Q=Q.return}while(Q!==null)}rm(P)}catch(ft){o=ft,Xn===P&&P!==null&&(Xn=P=P.return);continue}break}while(!0)}function tm(){var r=Th.current;return Th.current=Rl,r===null?Rl:r}function g0(){(ar===0||ar===3||ar===2)&&(ar=4),yr===null||!(Ts&268435455)&&!(Rh&268435455)||zl(yr,Mr)}function jh(r,o){var P=Wt;Wt|=2;var j=tm();(yr!==r||Mr!==o)&&(Ba=null,Ms(r,o));do try{T_();break}catch(G){em(r,G)}while(!0);if(Ru(),Wt=P,Th.current=j,Xn!==null)throw Error(t(261));return yr=null,Mr=0,ar}function T_(){for(;Xn!==null;)nm(Xn)}function R_(){for(;Xn!==null&&!No();)nm(Xn)}function nm(r){var o=am(r.alternate,r,ki);r.memoizedProps=r.pendingProps,o===null?rm(r):Xn=o,a0.current=null}function rm(r){var o=r;do{var P=o.alternate;if(r=o.return,o.flags&32768){if(P=O_(P,o),P!==null){P.flags&=32767,Xn=P;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ar=6,Xn=null;return}}else if(P=E_(P,o,ki),P!==null){Xn=P;return}if(o=o.sibling,o!==null){Xn=o;return}Xn=o=r}while(o!==null);ar===0&&(ar=5)}function Ls(r,o,P){var j=Gt,G=Yi.transition;try{Yi.transition=null,Gt=1,M_(r,o,P,j)}finally{Yi.transition=G,Gt=j}return null}function M_(r,o,P,j){do Yu();while(jl!==null);if(Wt&6)throw Error(t(327));P=r.finishedWork;var G=r.finishedLanes;if(P===null)return null;if(r.finishedWork=null,r.finishedLanes=0,P===r.current)throw Error(t(177));r.callbackNode=null,r.callbackPriority=0;var Q=P.lanes|P.childLanes;if($p(r,Q),r===yr&&(Xn=yr=null,Mr=0),!(P.subtreeFlags&2064)&&!(P.flags&2064)||Lh||(Lh=!0,lm(no,function(){return Yu(),null})),Q=(P.flags&15990)!==0,P.subtreeFlags&15990||Q){Q=Yi.transition,Yi.transition=null;var oe=Gt;Gt=1;var ce=Wt;Wt|=4,a0.current=null,P_(r,P),Wv(P,r),hs($c),iu=!!Vc,$c=Vc=null,r.current=P,C_(P),rs(),Wt=ce,Gt=oe,Yi.transition=Q}else r.current=P;if(Lh&&(Lh=!1,jl=r,Nh=G),Q=r.pendingLanes,Q===0&&(Dl=null),un(P.stateNode),hi(r,Jt()),o!==null)for(j=r.onRecoverableError,P=0;P<o.length;P++)G=o[P],j(G.value,{componentStack:G.stack,digest:G.digest});if(Mh)throw Mh=!1,r=u0,u0=null,r;return Nh&1&&r.tag!==0&&Yu(),Q=r.pendingLanes,Q&1?r===c0?hf++:(hf=0,c0=r):hf=0,Yo(),null}function Yu(){if(jl!==null){var r=os(Nh),o=Yi.transition,P=Gt;try{if(Yi.transition=null,Gt=16>r?16:r,jl===null)var j=!1;else{if(r=jl,jl=null,Nh=0,Wt&6)throw Error(t(331));var G=Wt;for(Wt|=4,ot=r.current;ot!==null;){var Q=ot,oe=Q.child;if(ot.flags&16){var ce=Q.deletions;if(ce!==null){for(var pe=0;pe<ce.length;pe++){var Re=ce[pe];for(ot=Re;ot!==null;){var qe=ot;switch(qe.tag){case 0:case 11:case 15:cf(8,qe,Q)}var Ve=qe.child;if(Ve!==null)Ve.return=qe,ot=Ve;else for(;ot!==null;){qe=ot;var Ue=qe.sibling,tt=qe.return;if(qv(qe),qe===Re){ot=null;break}if(Ue!==null){Ue.return=tt,ot=Ue;break}ot=tt}}}var lt=Q.alternate;if(lt!==null){var ct=lt.child;if(ct!==null){lt.child=null;do{var qn=ct.sibling;ct.sibling=null,ct=qn}while(ct!==null)}}ot=Q}}if(Q.subtreeFlags&2064&&oe!==null)oe.return=Q,ot=oe;else e:for(;ot!==null;){if(Q=ot,Q.flags&2048)switch(Q.tag){case 0:case 11:case 15:cf(9,Q,Q.return)}var Oe=Q.sibling;if(Oe!==null){Oe.return=Q.return,ot=Oe;break e}ot=Q.return}}var ve=r.current;for(ot=ve;ot!==null;){oe=ot;var Pe=oe.child;if(oe.subtreeFlags&2064&&Pe!==null)Pe.return=oe,ot=Pe;else e:for(oe=ve;ot!==null;){if(ce=ot,ce.flags&2048)try{switch(ce.tag){case 0:case 11:case 15:Ah(9,ce)}}catch(ft){Ln(ce,ce.return,ft)}if(ce===oe){ot=null;break e}var We=ce.sibling;if(We!==null){We.return=ce.return,ot=We;break e}ot=ce.return}}if(Wt=G,Yo(),er&&typeof er.onPostCommitFiberRoot=="function")try{er.onPostCommitFiberRoot(ro,r)}catch{}j=!0}return j}finally{Gt=P,Yi.transition=o}}return!1}function im(r,o,P){o=za(P,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,P){if(r.tag===3)im(r,r,P);else for(;o!==null;){if(o.tag===3){im(o,r,P);break}else if(o.tag===1){var j=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof j.componentDidCatch=="function"&&(Dl===null||!Dl.has(j))){r=za(P,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,P){var j=r.pingCache;j!==null&&j.delete(o),o=ni(),r.pingedLanes|=r.suspendedLanes&P,yr===r&&(Mr&P)===P&&(ar===4||ar===3&&(Mr&130023424)===Mr&&500>Jt()-s0?Ms(r,0):l0|=P),hi(r,o)}function om(r,o){o===0&&(r.mode&1?(o=io,io<<=1,!(io&130023424)&&(io=4194304)):o=1);var P=ni();r=ei(r,o),r!==null&&(is(r,o,P),hi(r,P))}function N_(r){var o=r.memoizedState,P=0;o!==null&&(P=o.retryLane),om(r,P)}function I_(r,o){var P=0;switch(r.tag){case 13:var j=r.stateNode,G=r.memoizedState;G!==null&&(P=G.retryLane);break;case 19:j=r.stateNode;break;default:throw Error(t(314))}j!==null&&j.delete(o),om(r,P)}var am;am=function(r,o,P){if(r!==null)if(r.memoizedProps!==o.pendingProps||dr.current)te=!0;else{if(!(r.lanes&P)&&!(o.flags&128))return te=!1,e0(r,o,P);te=!!(r.flags&131072)}else te=!1,Xt&&o.flags&1048576&&vh(o,Xo,o.index);switch(o.lanes=0,o.tag){case 2:var j=o.type;Ft(r,o),r=o.pendingProps;var G=Ta(o,ir.current);ho(o,P),G=Cl(null,o,j,r,G,P);var Q=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(j)?(Q=!0,Ra(o)):Q=!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,j,r,P),o=Zt(null,o,j,!0,Q,P)):(o.tag=0,Xt&&Q&&bl(o),le(null,o,G,P),o=o.child),o;case 16:j=o.elementType;e:{switch(Ft(r,o),r=o.pendingProps,G=j._init,j=G(j._payload),o.type=j,G=o.tag=j_(j),r=or(j,r),G){case 0:o=Qe(null,o,j,r,P);break e;case 1:o=ln(null,o,j,r,P);break e;case 11:o=ye(null,o,j,r,P);break e;case 14:o=Me(null,o,j,or(j.type,r),P);break e}throw Error(t(306,j,""))}return o;case 0:return j=o.type,G=o.pendingProps,G=o.elementType===j?G:or(j,G),Qe(r,o,j,G,P);case 1:return j=o.type,G=o.pendingProps,G=o.elementType===j?G:or(j,G),ln(r,o,j,G,P);case 3:e:{if(Tr(o),r===null)throw Error(t(387));j=o.pendingProps,Q=o.memoizedState,G=Q.element,Nu(r,o),El(o,j,null,P);var oe=o.memoizedState;if(j=oe.element,Q.isDehydrated)if(Q={element:j,isDehydrated:!1,cache:oe.cache,pendingSuspenseBoundaries:oe.pendingSuspenseBoundaries,transitions:oe.transitions},o.updateQueue.baseState=Q,o.memoizedState=Q,o.flags&256){G=za(Error(t(423)),o),o=Wi(r,o,j,P,G);break e}else if(j!==G){G=za(Error(t(424)),o),o=Wi(r,o,j,P,G);break e}else for(Ke=zi(o.stateNode.containerInfo.firstChild),Zr=o,Xt=!0,Qr=null,P=ci(o,null,j,P),o.child=P;P;)P.flags=P.flags&-3|4096,P=P.sibling;else{if(Ia(),j===G){o=mr(r,o,P);break e}le(r,o,j,P)}o=o.child}return o;case 5:return Ol(o),r===null&&_l(o),j=o.type,G=o.pendingProps,Q=r!==null?r.memoizedProps:null,oe=G.children,Wc(j,G)?oe=null:Q!==null&&Wc(j,Q)&&(o.flags|=32),Ot(r,o),le(r,o,oe,P),o.child;case 6:return r===null&&_l(o),null;case 13:return Le(r,o,P);case 4:return Qo(o,o.stateNode.containerInfo),j=o.pendingProps,r===null?o.child=Da(o,null,j,P):le(r,o,j,P),o.child;case 11:return j=o.type,G=o.pendingProps,G=o.elementType===j?G:or(j,G),ye(r,o,j,G,P);case 7:return le(r,o,o.pendingProps,P),o.child;case 8:return le(r,o,o.pendingProps.children,P),o.child;case 12:return le(r,o,o.pendingProps.children,P),o.child;case 10:e:{if(j=o.type._context,G=o.pendingProps,Q=o.memoizedProps,oe=G.value,en(Os,j._currentValue),j._currentValue=oe,Q!==null)if(Br(Q.value,oe)){if(Q.children===G.children&&!dr.current){o=mr(r,o,P);break e}}else for(Q=o.child,Q!==null&&(Q.return=o);Q!==null;){var ce=Q.dependencies;if(ce!==null){oe=Q.child;for(var pe=ce.firstContext;pe!==null;){if(pe.context===j){if(Q.tag===1){pe=Vi(-1,P&-P),pe.tag=2;var Re=Q.updateQueue;if(Re!==null){Re=Re.shared;var qe=Re.pending;qe===null?pe.next=pe:(pe.next=qe.next,qe.next=pe),Re.pending=pe}}Q.lanes|=P,pe=Q.alternate,pe!==null&&(pe.lanes|=P),Lu(Q.return,P,o),ce.lanes|=P;break}pe=pe.next}}else if(Q.tag===10)oe=Q.type===o.type?null:Q.child;else if(Q.tag===18){if(oe=Q.return,oe===null)throw Error(t(341));oe.lanes|=P,ce=oe.alternate,ce!==null&&(ce.lanes|=P),Lu(oe,P,o),oe=Q.sibling}else oe=Q.child;if(oe!==null)oe.return=Q;else for(oe=Q;oe!==null;){if(oe===o){oe=null;break}if(Q=oe.sibling,Q!==null){Q.return=oe.return,oe=Q;break}oe=oe.return}Q=oe}le(r,o,G.children,P),o=o.child}return o;case 9:return G=o.type,j=o.pendingProps.children,ho(o,P),G=kr(G),j=j(G),o.flags|=1,le(r,o,j,P),o.child;case 14:return j=o.type,G=or(j,o.pendingProps),G=or(j.type,G),Me(r,o,j,G,P);case 15:return $e(r,o,o.type,o.pendingProps,P);case 17:return j=o.type,G=o.pendingProps,G=o.elementType===j?G:or(j,G),Ft(r,o),o.tag=1,hr(j)?(r=!0,Ra(o)):r=!1,ho(o,P),Ph(o,j,G),Hu(o,j,G,P),Zt(null,o,j,!0,r,P);case 19:return Un(r,o,P);case 22:return rt(r,o,P)}throw Error(t(156,o.tag))};function lm(r,o){return Ir(r,o)}function D_(r,o,P,j){this.tag=r,this.key=P,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=j,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ki(r,o,P,j){return new D_(r,o,P,j)}function v0(r){return r=r.prototype,!(!r||!r.isReactComponent)}function j_(r){if(typeof r=="function")return v0(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 P=r.alternate;return P===null?(P=Ki(r.tag,o,r.key,r.mode),P.elementType=r.elementType,P.type=r.type,P.stateNode=r.stateNode,P.alternate=r,r.alternate=P):(P.pendingProps=o,P.type=r.type,P.flags=0,P.subtreeFlags=0,P.deletions=null),P.flags=r.flags&14680064,P.childLanes=r.childLanes,P.lanes=r.lanes,P.child=r.child,P.memoizedProps=r.memoizedProps,P.memoizedState=r.memoizedState,P.updateQueue=r.updateQueue,o=r.dependencies,P.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},P.sibling=r.sibling,P.index=r.index,P.ref=r.ref,P}function Fh(r,o,P,j,G,Q){var oe=2;if(j=r,typeof r=="function")v0(r)&&(oe=1);else if(typeof r=="string")oe=5;else e:switch(r){case R:return Ns(P.children,G,Q,o);case D:oe=8,G|=8;break;case O:return r=Ki(12,P,o,G|2),r.elementType=O,r.lanes=Q,r;case A:return r=Ki(13,P,o,G),r.elementType=A,r.lanes=Q,r;case z:return r=Ki(19,P,o,G),r.elementType=z,r.lanes=Q,r;case X:return zh(P,G,Q,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case S:oe=10;break e;case T:oe=9;break e;case M:oe=11;break e;case U:oe=14;break e;case Z:oe=16,j=null;break e}throw Error(t(130,r==null?r:typeof r,""))}return o=Ki(oe,P,o,G),o.elementType=r,o.type=j,o.lanes=Q,o}function Ns(r,o,P,j){return r=Ki(7,r,j,o),r.lanes=P,r}function zh(r,o,P,j){return r=Ki(22,r,j,o),r.elementType=X,r.lanes=P,r.stateNode={isHidden:!1},r}function m0(r,o,P){return r=Ki(6,r,null,o),r.lanes=P,r}function y0(r,o,P){return o=Ki(4,r.children!==null?r.children:[],r.key,o),o.lanes=P,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function F_(r,o,P,j,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=j,this.onRecoverableError=G,this.mutableSourceEagerHydrationData=null}function b0(r,o,P,j,G,Q,oe,ce,pe){return r=new F_(r,o,P,ce,pe),o===1?(o=1,Q===!0&&(o|=8)):o=0,Q=Ki(3,null,null,o),r.current=Q,Q.stateNode=r,Q.memoizedState={element:j,isDehydrated:P,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ps(Q),r}function z_(r,o,P){var j=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:j==null?null:""+j,children:r,containerInfo:o,implementation:P}}function sm(r){if(!r)return Ui;r=r._reactInternals;e:{if(Vt(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 P=r.type;if(hr(P))return Pu(r,P,o)}return o}function um(r,o,P,j,G,Q,oe,ce,pe){return r=b0(P,j,!0,r,G,Q,oe,ce,pe),r.context=sm(null),P=r.current,j=ni(),G=Fl(P),Q=Vi(j,G),Q.callback=o??null,$i(P,Q,G),r.current.lanes=G,is(r,G,j),hi(r,j),r}function Bh(r,o,P,j){var G=o.current,Q=ni(),oe=Fl(G);return P=sm(P),o.context===null?o.context=P:o.pendingContext=P,o=Vi(Q,oe),o.payload={element:r},j=j===void 0?null:j,j!==null&&(o.callback=j),r=$i(G,o,oe),r!==null&&(bo(r,G,oe,Q),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 cm(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var P=r.retryLane;r.retryLane=P!==0&&P<o?P:o}}function _0(r,o){cm(r,o),(r=r.alternate)&&cm(r,o)}function B_(){return null}var fm=typeof reportError=="function"?reportError:function(r){console.error(r)};function w0(r){this._internalRoot=r}qh.prototype.render=w0.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(t(409));Bh(r,o,null,null)},qh.prototype.unmount=w0.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 P=0;P<Fi.length&&o!==0&&o<Fi[P].priority;P++);Fi.splice(P,0,r),P===0&&tu(r)}};function S0(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 dm(){}function U_(r,o,P,j,G){if(G){if(typeof j=="function"){var Q=j;j=function(){var Re=Uh(oe);Q.call(Re)}}var oe=um(o,j,r,0,null,!1,!1,"",dm);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 j=="function"){var ce=j;j=function(){var Re=Uh(pe);ce.call(Re)}}var pe=b0(r,0,!1,null,null,!1,!1,"",dm);return r._reactRootContainer=pe,r[Bi]=pe.current,xa(r.nodeType===8?r.parentNode:r),Rs(function(){Bh(o,pe,P,j)}),pe}function Gh(r,o,P,j,G){var Q=P._reactRootContainer;if(Q){var oe=Q;if(typeof G=="function"){var ce=G;G=function(){var pe=Uh(oe);ce.call(pe)}}Bh(o,oe,r,G)}else oe=U_(P,o,r,G,j);return Uh(oe)}nl=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var P=Vn(o.pendingLanes);P!==0&&(Oc(o,P|1),hi(o,Jt()),!(Wt&6)&&(Wu=Jt()+500,Yo()))}break;case 13:Rs(function(){var j=ei(r,1);if(j!==null){var G=ni();bo(j,r,1,G)}}),_0(r,1)}},rl=function(r){if(r.tag===13){var o=ei(r,134217728);if(o!==null){var P=ni();bo(o,r,134217728,P)}_0(r,134217728)}},$d=function(r){if(r.tag===13){var o=Fl(r),P=ei(r,o);if(P!==null){var j=ni();bo(P,r,o,j)}_0(r,o)}},Wd=function(){return Gt},Js=function(r,o){var P=Gt;try{return Gt=r,o()}finally{Gt=P}},Ge=function(r,o,P){switch(o){case"input":if(ke(r,P),o=P.name,P.type==="radio"&&o!=null){for(P=r;P.parentNode;)P=P.parentNode;for(P=P.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<P.length;o++){var j=P[o];if(j!==r&&j.form===r.form){var G=Yn(j);if(!G)throw Error(t(90));ue(j),ke(j,G)}}}break;case"textarea":xe(r,P);break;case"select":o=P.value,o!=null&&Te(r,!!P.multiple,o,!1)}},_n=h0,Be=Rs;var q_={usingClientEntryPoint:!1,Events:[_s,Fn,Yn,Fe,ht,h0]},pf={findFiberByHostInstance:$o,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},H_={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||B_,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(H_),er=Vh}catch{}}return pi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=q_,pi.createPortal=function(r,o){var P=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!S0(o))throw Error(t(200));return z_(r,o,null,P)},pi.createRoot=function(r,o){if(!S0(r))throw Error(t(299));var P=!1,j="",G=fm;return o!=null&&(o.unstable_strictMode===!0&&(P=!0),o.identifierPrefix!==void 0&&(j=o.identifierPrefix),o.onRecoverableError!==void 0&&(G=o.onRecoverableError)),o=b0(r,1,!1,null,null,P,!1,j,G),r[Bi]=o.current,xa(r.nodeType===8?r.parentNode:r),new w0(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,P){if(!Hh(o))throw Error(t(200));return Gh(null,r,o,!0,P)},pi.hydrateRoot=function(r,o,P){if(!S0(r))throw Error(t(405));var j=P!=null&&P.hydratedSources||null,G=!1,Q="",oe=fm;if(P!=null&&(P.unstable_strictMode===!0&&(G=!0),P.identifierPrefix!==void 0&&(Q=P.identifierPrefix),P.onRecoverableError!==void 0&&(oe=P.onRecoverableError)),o=um(o,null,r,1,P??null,G,!1,Q,oe),r[Bi]=o.current,xa(r),j)for(r=0;r<j.length;r++)P=j[r],G=P._getVersion,G=G(P._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[P,G]:o.mutableSourceEagerHydrationData.push(P,G);return new qh(o)},pi.render=function(r,o,P){if(!Hh(o))throw Error(t(200));return Gh(null,r,o,!1,P)},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=h0,pi.unstable_renderSubtreeIntoContainer=function(r,o,P,j){if(!Hh(P))throw Error(t(200));if(r==null||r._reactInternals===void 0)throw Error(t(38));return Gh(r,o,P,!1,j)},pi.version="18.3.1-next-f1338f8080-20240426",pi}var ym;function C3(){if(ym)return O0.exports;ym=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(),O0.exports=W_(),O0.exports}var bm;function Y_(){if(bm)return $h;bm=1;var e=C3();return $h.createRoot=e.createRoot,$h.hydrateRoot=e.hydrateRoot,$h}var K_=Y_();const k3=Td(K_);var gf={};function At(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 X_={};function wp(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:X_}var A3=Object.assign,lp=Object.getOwnPropertyDescriptor,la=Object.defineProperty,Rd=Object.prototype,Ag=[];Object.freeze(Ag);var Vg={};Object.freeze(Vg);var Z_=typeof Proxy<"u",Q_=Object.toString();function T3(){Z_||At("Proxy not available")}function R3(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()===Q_}function M3(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 L3(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 J_(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 N3=typeof Object.getOwnPropertySymbols<"u";function e6(e){var i=Object.keys(e);if(!N3)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:N3?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function I3(e){return e===null?null:typeof e=="object"?""+e:e}function Ya(e,i){return Rd.hasOwnProperty.call(e,i)}var t6=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 _m(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 n6(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,i6(n.key),n)}}function mc(e,i,t){return i&&n6(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=o6(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,Tg(e,i)}function Tg(e,i){return Tg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},Tg(e,i)}function r6(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 i6(e){var i=r6(e,"string");return typeof i=="symbol"?i:i+""}function o6(e,i){if(e){if(typeof e=="string")return _m(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)?_m(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])),p6(t)||(e[aa][i]=t)}function a6(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 dt=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_=Kt.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 t5(this)},i.reportChanged=function(){vi(),n5(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 $g=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&&f5(n,i),t!==ec&&Qg(n,t),n}function l6(e,i){return e===i}function s6(e,i){return sv(e,i)}function u6(e,i){return sv(e,i,1)}function c6(e,i){return Object.is?Object.is(e,i):e===i?e!==0||1/e===1/i:e!==e&&i!==i}var qs={identity:l6,structural:s6,default:c6,shallow:u6};function Hs(e,i,t){return Tp(e)?e:Array.isArray(e)?sn.array(e,{name:t}):Za(e)?sn.object(e,void 0,{name:t}):vc(e)?sn.map(e,{name:t}):Wa(e)?sn.set(e,{name:t}):typeof e=="function"&&!sc(e)&&!uc(e)?M3(e)?Vs(e):ac(t,e):e}function f6(e,i,t){if(e==null||_r(e)||ri(e)||Nr(e)||lr(e))return e;if(Array.isArray(e))return sn.array(e,{name:t,deep:!1});if(Za(e))return sn.object(e,void 0,{name:t,deep:!1});if(vc(e))return sn.map(e,{name:t,deep:!1});if(Wa(e))return sn.set(e,{name:t,deep:!1})}function Ep(e){return e}function d6(e,i){return sv(e,i)?i:e}var j3="override",h6=Co({annotationType_:j3,make_:g6,extend_:v6,decorate_20223_:m6});function p6(e){return e.annotationType_===j3}function g6(e,i){return 0}function v6(e,i,t,n){At("'"+this.annotationType_+"' can only be used with 'makeObservable'")}function m6(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_:y6,extend_:b6,decorate_20223_:_6}}function y6(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=F3(e,this,i,t,!1);return la(n,i,l),2}function b6(e,i,t,n){var a=F3(e,this,i,t);return e.defineProperty_(i,a,n)}function _6(e,i){var t=i.kind,n=i.name,a=i.addInitializer,l=this,u=function(m){var _,k,x,v;return Kl((_=(k=l.options_)==null?void 0:k.name)!=null?_:n.toString(),m,(x=(v=l.options_)==null?void 0:v.autoAction)!=null?x:!1)};if(t=="field")return function(d){var m,_=d;return sc(_)||(_=u(_)),(m=l.options_)!=null&&m.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 d=this,m=d[n].bind(d);m.isMobxAction=!0,d[n]=m}),e}At("Cannot apply '"+l.annotationType_+"' to '"+String(n)+"' (kind: "+t+"):"+(`
|
|
34
|
-
'`+l.annotationType_+"' can only be used on properties with a function value."))}function w6(e,i,t,n){i.annotationType_,n.value}function F3(e,i,t,n,a){var l,u,c,d,m,_,k;a===void 0&&(a=Ye.safeDescriptors),w6(e,i,t,n);var x=n.value;if((l=i.options_)!=null&&l.bound){var v;x=x.bind((v=e.proxy_)!=null?v:e.target_)}return{value:Kl((u=(c=i.options_)==null?void 0:c.name)!=null?u:t.toString(),x,(d=(m=i.options_)==null?void 0:m.autoAction)!=null?d:!1,(_=i.options_)!=null&&_.bound?(k=e.proxy_)!=null?k:e.target_:void 0),configurable:a?e.isPlainObject_:!0,enumerable:!1,writable:!a}}function z3(e,i){return{annotationType_:e,options_:i,make_:S6,extend_:E6,decorate_20223_:O6}}function S6(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=B3(e,this,i,t,!1,!1);return la(n,i,l),2}function E6(e,i,t,n){var a,l=B3(e,this,i,t,(a=this.options_)==null?void 0:a.bound);return e.defineProperty_(i,l,n)}function O6(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 x6(e,i,t,n){i.annotationType_,n.value}function B3(e,i,t,n,a,l){l===void 0&&(l=Ye.safeDescriptors),x6(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 Wg(e,i){return{annotationType_:e,options_:i,make_:P6,extend_:C6,decorate_20223_:k6}}function P6(e,i,t){return this.extend_(e,i,t,!1)===null?0:1}function C6(e,i,t,n){return A6(e,this,i,t),e.defineComputedProperty_(i,Yl({},this.options_,{get:t.get,set:t.set}),n)}function k6(e,i){var t=this,n=i.name,a=i.addInitializer;return a(function(){var l=Ys(this)[dt],u=Yl({},t.options_,{get:e,context:this});u.name||(u.name="ObservableObject."+n.toString()),l.values_.set(n,new To(u))}),function(){return this[dt].getObservablePropValue_(n)}}function A6(e,i,t,n){i.annotationType_,n.get}function Op(e,i){return{annotationType_:e,options_:i,make_:T6,extend_:R6,decorate_20223_:M6}}function T6(e,i,t){return this.extend_(e,i,t,!1)===null?0:1}function R6(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 M6(e,i){var t=this,n=i.kind,a=i.name,l=new WeakSet;function u(c,d){var m,_,k=Ys(c)[dt],x=new $l(d,(m=(_=t.options_)==null?void 0:_.enhancer)!=null?m:Hs,"ObservableObject."+a.toString(),!1);k.values_.set(a,x),l.add(c)}if(n=="accessor")return{get:function(){return l.has(this)||u(this,e.get.call(this)),this[dt].getObservablePropValue_(a)},set:function(d){return l.has(this)||u(this,d),this[dt].setObservablePropValue_(a,d)},init:function(d){return l.has(this)||u(this,d),d}}}function L6(e,i,t,n){i.annotationType_}var N6="true",I6=U3();function U3(e){return{annotationType_:N6,options_:e,make_:D6,extend_:j6,decorate_20223_:F6}}function D6(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:Ye.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(M3(t.value)){var d,m=(d=this.options_)!=null&&d.autoBind?Vs.bound:Vs;return m.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?sn.ref:sn;if(typeof t.value=="function"&&(l=this.options_)!=null&&l.autoBind){var x;t.value=t.value.bind((x=e.proxy_)!=null?x:e.target_)}return k.make_(e,i,t,n)}function j6(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:Ye.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?sn.ref:sn;return c.extend_(e,i,t,n)}function F6(e,i){At("'"+this.annotationType_+"' cannot be used as a decorator")}var z6="observable",B6="observable.ref",U6="observable.shallow",q6="observable.struct",q3={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(q3);function Wh(e){return e||q3}var Rg=Op(z6),H6=Op(B6,{enhancer:Ep}),G6=Op(U6,{enhancer:f6}),V6=Op(q6,{enhancer:d6}),H3=Co(Rg);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:U3(e):void 0}function W6(e){var i,t;return e&&(i=(t=e.options_)==null?void 0:t.enhancer)!=null?i:Hs}function G3(e,i,t){if(Nd(i))return Rg.decorate_20223_(e,i);if(Us(i)){Ld(e,i,Rg);return}return Tp(e)?e:Za(e)?sn.object(e,i,t):Array.isArray(e)?sn.array(e,i):vc(e)?sn.map(e,i):Wa(e)?sn.set(e,i):typeof e=="object"&&e!==null?e:sn.box(e,i)}A3(G3,H3);var Y6={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(Ye.useProxies===!1||n.proxy===!1?e8:Gw)(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 av(i,Yh(n),n.name)},object:function(i,t,n){return Jl(function(){return Jg(Ye.useProxies===!1||(n==null?void 0:n.proxy)===!1?Ys({},n):Bw({},n),i,t)})},ref:Co(H6),shallow:Co(G6),deep:H3,struct:Co(V6)},sn=A3(G3,Y6),V3="computed",K6="computed.struct",Mg=Wg(V3),X6=Wg(K6,{equals:qs.structural}),$s=function(i,t){if(Nd(t))return Mg.decorate_20223_(i,t);if(Us(t))return Ld(i,t,Mg);if(Za(i))return Co(Wg(V3,i));var n=Za(t)?t:{};return n.get=i,n.name||(n.name=i.name||""),new To(n)};Object.assign($s,Mg);$s.struct=Co(X6);var wm,Sm,sp=0,Z6=1,Q6=(wm=(Sm=lp(function(){},"name"))==null?void 0:Sm.configurable)!=null?wm:!1,Em={value:"action",configurable:!0,writable:!1,enumerable:!1};function Kl(e,i,t,n){t===void 0&&(t=!1);function a(){return $3(e,t,i,n||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return i.toString()},Q6&&(Em.value=e,la(a,"name",Em)),a}function $3(e,i,t,n,a){var l=W3(e,i);try{return t.apply(n,a)}catch(u){throw l.error_=u,u}finally{Y3(l)}}function W3(e,i,t,n){var a=!1,l=0,u=Ye.trackingDerivation,c=!i||!u;vi();var d=Ye.allowStateChanges;c&&(Ws(),d=xp(!0));var m=Cp(!0),_={runAsAction_:c,prevDerivation_:u,prevAllowStateChanges_:d,prevAllowStateReads_:m,notifySpy_:a,startTime_:l,actionId_:Z6++,parentActionId_:sp};return sp=_.actionId_,_}function Y3(e){sp!==e.actionId_&&At(30),sp=e.parentActionId_,e.error_!==void 0&&(Ye.suppressReactionErrors=!0),Pp(e.prevAllowStateChanges_),rc(e.prevAllowStateReads_),mi(),e.runAsAction_&&Ka(e.prevDerivation_),Ye.suppressReactionErrors=!1}function Yg(e,i){var t=xp(e);try{return i()}finally{Pp(t)}}function xp(e){var i=Ye.allowStateChanges;return Ye.allowStateChanges=e,i}function Pp(e){Ye.allowStateChanges=e}var $l=function(e){function i(n,a,l,u,c){var d;return l===void 0&&(l="ObservableValue"),c===void 0&&(c=qs.default),d=e.call(this,l)||this,d.enhancer=void 0,d.name_=void 0,d.equals=void 0,d.hasUnreportedChange_=!1,d.interceptors_=void 0,d.changeListeners_=void 0,d.value_=void 0,d.dehancer=void 0,d.enhancer=a,d.name_=l,d.equals=c,d.value_=a(n,void 0,l),d}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!==Ye.UNCHANGED&&this.setNewValue_(a)},t.prepareNewValue_=function(a){if(Xi(this)){var l=Zi(this,{object:this,type:sa,newValue:a});if(!l)return Ye.UNCHANGED;a=l.newValue}return a=this.enhancer(a,this.value_,this.name_),this.equals(this.value_,a)?Ye.UNCHANGED:a},t.setNewValue_=function(a){var l=this.value_;this.value_=a,this.reportChanged(),ko(this)&&Ao(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 I3(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},i}(Ql),Kg=Zl("ObservableValue",$l),To=function(){function e(t){this.dependenciesState_=Kt.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Kt.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||At(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(){sw(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&&At(32,this.name_,this.derivation),Ye.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Lg(this)&&(this.warnAboutUntrackedRead_(),vi(),this.value_=this.computeValue_(!1),mi());else if(t5(this),Lg(this)){var n=Ye.trackingContext;this.keepAlive_&&!n&&(Ye.trackingContext=this),this.trackAndCompute()&&lw(this),Ye.trackingContext=n}var a=this.value_;if(tp(a))throw a.cause;return a},i.set=function(n){if(this.setter_){this.isRunningSetter&&At(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,n)}finally{this.isRunningSetter=!1}}else At(34,this.name_)},i.trackAndCompute=function(){var n=this.value_,a=this.dependenciesState_===Kt.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=K3(this,this.derivation,this.scope_);else if(Ye.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_||(Ng(this),this.value_=void 0)},i.observe_=function(n,a){var l=this,u=!0,c=void 0;return Zg(function(){var d=l.get();if(!u||a){var m=Ws();n({observableKind:"computed",debugObjectName:l.name_,type:sa,object:l,newValue:d,oldValue:c}),Ka(m)}u=!1,c=d})},i.warnAboutUntrackedRead_=function(){},i.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},i.valueOf=function(){return I3(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)}}])}();To.isComputingMask_=1;To.isRunningSetterMask_=2;To.isBeingObservedMask_=4;To.isPendingUnobservationMask_=8;To.diffValueMask_=16;var Gs=Zl("ComputedValue",To),Kt;(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_"})(Kt||(Kt={}));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 Lg(e){switch(e.dependenciesState_){case Kt.UP_TO_DATE_:return!1;case Kt.NOT_TRACKING_:case Kt.STALE_:return!0;case Kt.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(Ye.disableErrorBoundaries)u.get();else try{u.get()}catch{return Ka(t),rc(i),!0}if(e.dependenciesState_===Kt.STALE_)return Ka(t),rc(i),!0}}return X3(e),Ka(t),rc(i),!1}}}function J6(){return Ye.trackingDerivation!==null}function K3(e,i,t){var n=Cp(!0);X3(e),e.newObserving_=new Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++Ye.runId;var a=Ye.trackingDerivation;Ye.trackingDerivation=e,Ye.inBatch++;var l;if(Ye.disableErrorBoundaries===!0)l=i.call(t);else try{l=i.call(t)}catch(u){l=new cp(u)}return Ye.inBatch--,Ye.trackingDerivation=a,ew(e),rc(n),l}function ew(e){for(var i=e.observing_,t=e.observing_=e.newObserving_,n=Kt.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 d=i[l];d.diffValue===0&&J3(d,e),d.diffValue=0}for(;a--;){var m=t[a];m.diffValue===1&&(m.diffValue=0,aw(m,e))}n!==Kt.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function Ng(e){var i=e.observing_;e.observing_=[];for(var t=i.length;t--;)J3(i[t],e);e.dependenciesState_=Kt.NOT_TRACKING_}function Xg(e){var i=Ws();try{return e()}finally{Ka(i)}}function Ws(){var e=Ye.trackingDerivation;return Ye.trackingDerivation=null,e}function Ka(e){Ye.trackingDerivation=e}function Cp(e){var i=Ye.allowStateReads;return Ye.allowStateReads=e,i}function rc(e){Ye.allowStateReads=e}function X3(e){if(e.dependenciesState_!==Kt.UP_TO_DATE_){e.dependenciesState_=Kt.UP_TO_DATE_;for(var i=e.observing_,t=i.length;t--;)i[t].lowestObserverState_=Kt.UP_TO_DATE_}}var tw=["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,Z3=!1,Ye=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(){Z3||At(35)},1),new bd)}();function nw(){if((Ye.pendingReactions.length||Ye.inBatch||Ye.isRunningReactions)&&At(36),Z3=!0,np){var e=wp();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),Ye=new bd}}function Q3(){return Ye}function rw(){var e=new bd;for(var i in e)tw.indexOf(i)===-1&&(Ye[i]=e[i]);Ye.allowStateChanges=!Ye.enforceActions}function iw(e){return e.observers_&&e.observers_.size>0}function ow(e){return e.observers_}function aw(e,i){e.observers_.add(i),e.lowestObserverState_>i.dependenciesState_&&(e.lowestObserverState_=i.dependenciesState_)}function J3(e,i){e.observers_.delete(i),e.observers_.size===0&&e5(e)}function e5(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,Ye.pendingUnobservations.push(e))}function vi(){Ye.inBatch++}function mi(){if(--Ye.inBatch===0){r5();for(var e=Ye.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 To&&t.suspend_())}Ye.pendingUnobservations=[]}}function t5(e){var i=Ye.trackingDerivation;return i!==null?(i.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=i.runId_,i.newObserving_[i.unboundDepsCount_++]=e,!e.isBeingObserved&&Ye.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(e.observers_.size===0&&Ye.inBatch>0&&e5(e),!1)}function n5(e){e.lowestObserverState_!==Kt.STALE_&&(e.lowestObserverState_=Kt.STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Kt.UP_TO_DATE_&&i.onBecomeStale_(),i.dependenciesState_=Kt.STALE_}))}function lw(e){e.lowestObserverState_!==Kt.STALE_&&(e.lowestObserverState_=Kt.STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Kt.POSSIBLY_STALE_?i.dependenciesState_=Kt.STALE_:i.dependenciesState_===Kt.UP_TO_DATE_&&(e.lowestObserverState_=Kt.UP_TO_DATE_)}))}function sw(e){e.lowestObserverState_===Kt.UP_TO_DATE_&&(e.lowestObserverState_=Kt.POSSIBLY_STALE_,e.observers_.forEach(function(i){i.dependenciesState_===Kt.UP_TO_DATE_&&(i.dependenciesState_=Kt.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_=Kt.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,Ye.pendingReactions.push(this),r5())},i.runReaction_=function(){if(!this.isDisposed){vi(),this.isScheduled=!1;var n=Ye.trackingContext;if(Ye.trackingContext=this,Lg(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}Ye.trackingContext=n,mi()}},i.track=function(n){if(!this.isDisposed){vi(),this.isRunning=!0;var a=Ye.trackingContext;Ye.trackingContext=this;var l=K3(this,n,void 0);Ye.trackingContext=a,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Ng(this),tp(l)&&this.reportExceptionInDerivation_(l.cause),mi()}},i.reportExceptionInDerivation_=function(n){var a=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(Ye.disableErrorBoundaries)throw n;var l="[mobx] uncaught error in '"+this+"'";Ye.suppressReactionErrors||console.error(l,n),Ye.globalReactionErrorHandlers.forEach(function(u){return u(n,a)})},i.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(vi(),Ng(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[dt]=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 uw(e){return Ye.globalReactionErrorHandlers.push(e),function(){var i=Ye.globalReactionErrorHandlers.indexOf(e);i>=0&&Ye.globalReactionErrorHandlers.splice(i,1)}}var cw=100,Ig=function(i){return i()};function r5(){Ye.inBatch>0||Ye.isRunningReactions||Ig(fw)}function fw(){Ye.isRunningReactions=!0;for(var e=Ye.pendingReactions,i=0;e.length>0;){++i===cw&&(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_()}Ye.isRunningReactions=!1}var fp=Zl("Reaction",Ro);function dw(e){var i=Ig;Ig=function(n){return e(function(){return i(n)})}}function _d(){return!1}function i5(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var o5="action",hw="action.bound",a5="autoAction",pw="autoAction.bound",l5="<unnamed action>",Dg=Id(o5),gw=Id(hw,{bound:!0}),jg=Id(a5,{autoAction:!0}),vw=Id(pw,{autoAction:!0,bound:!0});function s5(e){var i=function(n,a){if(Li(n))return Kl(n.name||l5,n,e);if(Li(a))return Kl(n,a,e);if(Nd(a))return(e?jg:Dg).decorate_20223_(n,a);if(Us(a))return Ld(n,a,e?jg:Dg);if(Us(n))return Co(Id(e?a5:o5,{name:n,autoAction:e}))};return i}var Zn=s5(!1);Object.assign(Zn,Dg);var ac=s5(!0);Object.assign(ac,jg);Zn.bound=Co(gw);ac.bound=Co(vw);function lc(e){return $3(e.name||l5,!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=Vg);var u=(t=(n=i)==null?void 0:n.name)!=null?t:"Autorun",c=!i.scheduler&&!i.delay,d;if(c)d=new Ro(u,function(){this.track(k)},i.onError,i.requiresObservable);else{var m=u5(i),_=!1;d=new Ro(u,function(){_||(_=!0,m(function(){_=!1,d.isDisposed||d.track(k)}))},i.onError,i.requiresObservable)}function k(){e(d)}return(a=i)!=null&&(a=a.signal)!=null&&a.aborted||d.schedule_(),d.getDisposer_((l=i)==null?void 0:l.signal)}var mw=function(i){return i()};function u5(e){return e.scheduler?e.scheduler:e.delay?function(i){return setTimeout(i,e.delay)}:mw}function c5(e,i,t){var n,a,l;t===void 0&&(t=Vg);var u=(n=t.name)!=null?n:"Reaction",c=Zn(u,t.onError?yw(t.onError,i):i),d=!t.scheduler&&!t.delay,m=u5(t),_=!0,k=!1,x,v=t.compareStructural?qs.structural:t.equals||qs.default,w=new Ro(u,function(){_||d?p():k||(k=!0,m(p))},t.onError,t.requiresObservable);function p(){if(k=!1,!w.isDisposed){var h=!1,C=x;w.track(function(){var g=Yg(!1,function(){return e(w)});h=_||!v(x,g),x=g}),(_&&t.fireImmediately||!_&&h)&&c(x,C,w),_=!1}}return(a=t)!=null&&(a=a.signal)!=null&&a.aborted||w.schedule_(),w.getDisposer_((l=t)==null?void 0:l.signal)}function yw(e,i){return function(){try{return i.apply(this,arguments)}catch(t){e.call(this,t)}}}var bw="onBO",_w="onBUO";function f5(e,i,t){return d5(bw,e,i,t)}function Qg(e,i,t){return d5(_w,e,i,t)}function d5(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 ww="never",Kh="always",Sw="observed";function h5(e){e.isolateGlobalState===!0&&nw();var i=e.useProxies,t=e.enforceActions;if(i!==void 0&&(Ye.useProxies=i===Kh?!0:i===ww?!1:typeof Proxy<"u"),i==="ifavailable"&&(Ye.verifyProxies=!0),t!==void 0){var n=t===Kh?Kh:t===Sw;Ye.enforceActions=n,Ye.allowStateChanges=!(n===!0||n===Kh)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(a){a in e&&(Ye[a]=!!e[a])}),Ye.allowStateReads=!Ye.observableRequiresReaction,e.reactionScheduler&&dw(e.reactionScheduler)}function Jg(e,i,t,n){var a=t6(i);return Jl(function(){var l=Ys(e,n)[dt];oc(a).forEach(function(u){l.extend_(u,a[u],t&&u in t?t[u]:!0)})}),e}function p5(e,i){return g5(ua(e,i))}function g5(e){var i={name:e.name_};return e.observing_&&e.observing_.length>0&&(i.dependencies=Ow(e.observing_).map(g5)),i}function Ew(e,i){return v5(ua(e,i))}function v5(e){var i={name:e.name_};return iw(e)&&(i.observers=Array.from(ow(e)).map(v5)),i}function Ow(e){return Array.from(new Set(e))}var xw=0;function kp(){this.message="FLOW_CANCELLED"}kp.prototype=Object.create(Error.prototype);function Pw(e){return e instanceof kp}var C0=z3("flow"),Cw=z3("flow.bound",{bound:!0}),Vs=Object.assign(function(i,t){if(Nd(t))return C0.decorate_20223_(i,t);if(Us(t))return Ld(i,t,C0);var n=i,a=n.name||"<unnamed flow>",l=function(){var c=this,d=arguments,m=++xw,_=Zn(a+" - runid: "+m+" - init",n).apply(c,d),k,x=void 0,v=new Promise(function(w,p){var h=0;k=p;function C(y){x=void 0;var E;try{E=Zn(a+" - runid: "+m+" - yield "+h++,_.next).call(_,y)}catch(L){return p(L)}b(E)}function g(y){x=void 0;var E;try{E=Zn(a+" - runid: "+m+" - yield "+h++,_.throw).call(_,y)}catch(L){return p(L)}b(E)}function b(y){if(Li(y==null?void 0:y.then)){y.then(b,p);return}return y.done?w(y.value):(x=Promise.resolve(y.value),x.then(C,g))}C(void 0)});return v.cancel=Zn(a+" - runid: "+m+" - cancel",function(){try{x&&Om(x);var w=_.return(void 0),p=Promise.resolve(w.value);p.then(ec,ec),Om(p),k(new kp)}catch(h){k(h)}}),v};return l.isMobXFlow=!0,l},C0);Vs.bound=Co(Cw);function Om(e){Li(e.cancel)&&e.cancel()}function kw(e){return e}function uc(e){return(e==null?void 0:e.isMobXFlow)===!0}function ev(e,i,t){var n;return Nr(e)||ri(e)||Kg(e)?n=Mo(e):_r(e)&&(n=Mo(e,i)),n.dehancer=typeof i=="function"?i:t,function(){n.dehancer=void 0}}function Ap(e,i,t){return Li(t)?Tw(e,i,t):Aw(e,i)}function Aw(e,i){return Mo(e).intercept_(i)}function Tw(e,i,t){return Mo(e,i).intercept_(t)}function m5(e,i){if(i===void 0)return Gs(e);if(_r(e)===!1||!e[dt].values_.has(i))return!1;var t=ua(e,i);return Gs(t)}function Rw(e){return m5(e)}function y5(e,i){return m5(e,i)}function b5(e,i){return e?i!==void 0?_r(e)?e[dt].values_.has(i):!1:_r(e)||!!e[dt]||$g(e)||fp(e)||Gs(e):!1}function Tp(e){return b5(e)}function _5(e,i){return b5(e,i)}function Od(e){if(_r(e))return e[dt].keys_();if(Nr(e)||lr(e))return Array.from(e.keys());if(ri(e))return e.map(function(i,t){return t});At(5)}function tv(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();At(6)}function w5(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]});At(7)}function nv(e,i,t){if(arguments.length===2&&!lr(e)){vi();var n=i;try{for(var a in n)nv(e,a,n[a])}finally{mi()}return}_r(e)?e[dt].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&&At("Invalid index: '"+i+"'"),vi(),i>=e.length&&(e.length=i+1),e[i]=t,mi()):At(8)}function Mw(e,i){_r(e)?e[dt].delete_(i):Nr(e)||lr(e)?e.delete(i):ri(e)?(typeof i!="number"&&(i=parseInt(i,10)),e.splice(i,1)):At(9)}function S5(e,i){if(_r(e))return e[dt].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;At(10)}function Lw(e,i){if(S5(e,i)){if(_r(e))return e[dt].get_(i);if(Nr(e))return e.get(i);if(ri(e))return e[i];At(11)}}function rv(e,i,t){if(_r(e))return e[dt].defineProperty_(i,t);At(39)}function E5(e){if(_r(e))return e[dt].ownKeys_();At(38)}function Rp(e,i,t,n){return Li(t)?Iw(e,i,t,n):Nw(e,i,t)}function Nw(e,i,t){return Mo(e).observe_(i,t)}function Iw(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||!Tp(e))return e;if(Kg(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 E5(e).forEach(function(u){Rd.propertyIsEnumerable.call(e,u)&&(l[u]=Qu(e[u],i))}),l}}function Dw(e,i){return Qu(e,new Map)}function jw(){}function oa(e,i){i===void 0&&(i=void 0),vi();try{return e.apply(i)}finally{mi()}}function Fg(e,i,t){return arguments.length===1||i&&typeof i=="object"?Fw(e,i):O5(e,i,t||{})}function O5(e,i,t){var n;if(typeof t.timeout=="number"){var a=new Error("WHEN_TIMEOUT");n=setTimeout(function(){if(!u[dt].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 d=Yg(!1,e);d&&(c.dispose(),n&&clearTimeout(n),l())},t);return u}function Fw(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 d,m=O5(e,u,Yl({},i,{onError:c}));n=function(){m(),c(new Error("WHEN_CANCELLED"))},a=function(){m(),c(new Error("WHEN_ABORTED"))},i==null||(d=i.signal)==null||d.addEventListener==null||d.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[dt]}var zw={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){At(13)}};function Bw(e,i){var t,n;return T3(),e=Ys(e,i),(n=(t=e[dt]).proxy_)!=null?n:t.proxy_=new Proxy(e,zw)}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),R3(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&&At(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),R3(function(){var n=t.indexOf(i);n!==-1&&t.splice(n,1)})}function Ao(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 iv(e,i,t){return Jl(function(){var n,a=Ys(e,t)[dt];(n=i)!=null||(i=a6(e)),oc(i).forEach(function(l){return a.make_(l,i[l])})}),e}var k0=Symbol("mobx-keys");function Uw(e,i,t){return Za(e)?Jg(e,e,i,t):(Jl(function(){var n=Ys(e,t)[dt];if(!e[k0]){var a=Object.getPrototypeOf(e),l=new Set([].concat(oc(e),oc(a)));l.delete("constructor"),l.delete(dt),Md(a,k0,l)}e[k0].forEach(function(u){return n.make_(u,i&&u in i?i[u]:!0)})}),e)}var xm="splice",sa="update",qw=1e4,Hw={get:function(i,t){var n=i[dt];return t===dt?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[dt];return t==="length"&&a.setArrayLength_(n),typeof t=="symbol"||isNaN(t)?i[t]=n:a.set_(parseInt(t),n),!0},preventExtensions:function(){At(15)}},ov=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)&&At("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_&&At(16),this.lastKnownLength_+=a,this.legacyMode_&&a>0&&A5(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=Ag),Xi(this)){var d=Zi(this,{object:this.proxy_,type:xm,index:n,removedCount:a,added:l});if(!d)return Ag;a=d.removedCount,l=d.added}if(l=l.length===0?l:l.map(function(k){return u.enhancer_(k,void 0)}),this.legacyMode_){var m=l.length-a;this.updateArrayLength_(c,m)}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<qw){var u;return(u=this.values_).splice.apply(u,[n,a].concat(l))}else{var c=this.values_.slice(n,n+a),d=this.values_.slice(n+a);this.values_.length+=l.length-a;for(var m=0;m<l.length;m++)this.values_[n+m]=l[m];for(var _=0;_<d.length;_++)this.values_[n+l.length+_]=d[_];return c}},i.notifyArrayChildUpdate_=function(n,a,l){var u=!this.owned_&&_d(),c=ko(this),d=c||u?{observableKind:"array",object:this.proxy_,type:sa,debugObjectName:this.atom_.name_,index:n,newValue:a,oldValue:l}:null;this.atom_.reportChanged(),c&&Ao(this,d)},i.notifyArraySplice_=function(n,a,l){var u=!this.owned_&&_d(),c=ko(this),d=c||u?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:xm,index:n,removed:l,added:a,removedCount:l.length,addedCount:a.length}:null;this.atom_.reportChanged(),c&&Ao(this,d)},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&&At(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 d=a!==u;d&&(l[n]=a,this.notifyArrayChildUpdate_(n,a,u))}else{for(var m=new Array(n+1-l.length),_=0;_<m.length-1;_++)m[_]=void 0;m[m.length-1]=a,this.spliceWithArray_(l.length,0,m)}},e}();function Gw(e,i,t,n){return t===void 0&&(t="ObservableArray"),n===void 0&&(n=!1),T3(),Jl(function(){var a=new ov(t,i,n,!1);L3(a.values_,dt,a);var l=new Proxy(a.values_,Hw);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[dt];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[dt];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[dt].spliceWithArray_(i,t,n)},push:function(){for(var i=this[dt],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[dt].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var i=this[dt],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 Ye.trackingDerivation&&At(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Ye.trackingDerivation&&At(37,"sort");var i=this.slice();return i.sort.apply(i,arguments),this.replace(i),this},remove:function(i){var t=this[dt],n=t.dehanceValues_(t.values_).indexOf(i);return n>-1?(this.splice(n,1),!0):!1}};yn("at",Ni);yn("concat",Ni);yn("flat",Ni);yn("includes",Ni);yn("indexOf",Ni);yn("join",Ni);yn("lastIndexOf",Ni);yn("slice",Ni);yn("toString",Ni);yn("toLocaleString",Ni);yn("toSorted",Ni);yn("toSpliced",Ni);yn("with",Ni);yn("every",Lo);yn("filter",Lo);yn("find",Lo);yn("findIndex",Lo);yn("findLast",Lo);yn("findLastIndex",Lo);yn("flatMap",Lo);yn("forEach",Lo);yn("map",Lo);yn("some",Lo);yn("toReversed",Lo);yn("reduce",x5);yn("reduceRight",x5);function yn(e,i){typeof Array.prototype[e]=="function"&&(dp[e]=i(e))}function Ni(e){return function(){var i=this[dt];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[dt];a.atom_.reportObserved();var l=a.dehanceValues_(a.values_);return l[e](function(u,c){return i.call(t,u,c,n)})}}function x5(e){return function(){var i=this,t=this[dt];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 Vw=Zl("ObservableArrayAdministration",ov);function ri(e){return Sp(e)&&Vw(e[dt])}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[dt]=$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)||At(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(!Ye.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),Qg(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),d=c||u?{observableKind:"map",debugObjectName:this.name_,type:hp,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return oa(function(){var m;a.keysAtom_.reportChanged(),(m=a.hasMap_.get(n))==null||m.setNewValue_(!1);var _=a.data_.get(n);_.setNewValue_(void 0),a.data_.delete(n)}),c&&Ao(this,d),!0}return!1},i.updateValue_=function(n,a){var l=this.data_.get(n);if(a=l.prepareNewValue_(a),a!==Ye.UNCHANGED){var u=_d(),c=ko(this),d=c||u?{observableKind:"map",debugObjectName:this.name_,type:sa,object:this,oldValue:l.value_,name:n,newValue:a}:null;l.setNewValue_(a),c&&Ao(this,d)}},i.addValue_=function(n,a){var l=this;this.keysAtom_,oa(function(){var m,_=new $l(a,l.enhancer_,"ObservableMap.key",!1);l.data_.set(n,_),a=_.value_,(m=l.hasMap_.get(n))==null||m.setNewValue_(!0),l.keysAtom_.reportChanged()});var u=_d(),c=ko(this),d=c||u?{observableKind:"map",debugObjectName:this.name_,type:Vl,object:this,name:n,newValue:a}:null;c&&Ao(this,d)},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 Pm({next:function(){var u=a.next(),c=u.done,d=u.value;return{done:c,value:c?void 0:n.get(d)}}})},i.entries=function(){var n=this,a=this.keys();return Pm({next:function(){var u=a.next(),c=u.done,d=u.value;return{done:c,value:c?void 0:[d,n.get(d)]}}})},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,d=c[0],m=c[1];n.call(a,m,d,this)}},i.merge=function(n){var a=this;return Nr(n)&&(n=new Map(n)),oa(function(){Za(n)?e6(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)?(J_(n)||At(19,n),n.forEach(function(l,u){return a.set(u,l)})):n!=null&&At(20,n)}),this},i.clear=function(){var n=this;oa(function(){Xg(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,d=tc(a.data_.keys()),m;!(m=d()).done;){var _=m.value;if(!l.has(_)){var k=a.delete(_);if(k)c=!0;else{var x=a.data_.get(_);u.set(_,x)}}}for(var v=tc(l.entries()),w;!(w=v()).done;){var p=w.value,h=p[0],C=p[1],g=a.data_.has(h);if(a.set(h,C),a.data_.has(h)){var b=a.data_.get(h);u.set(h,b),g||(c=!0)}}if(!c)if(a.data_.size!==u.size)a.keysAtom_.reportChanged();else for(var y=a.data_.keys(),E=u.keys(),L=y.next(),R=E.next();!L.done;){if(L.value!==R.value){a.keysAtom_.reportChanged();break}L=y.next(),R=E.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 Pm(e){return e[Symbol.toStringTag]="MapIterator",uv(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 At(21,e)}var Yw={},av=function(){function e(t,n,a){var l=this;n===void 0&&(n=Hs),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[dt]=Yw,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)||At(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(){Xg(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),d=c||u?{observableKind:"set",debugObjectName:this.name_,type:Vl,object:this,newValue:n}:null;c&&Ao(this,d)}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),d=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&&Ao(this,d),!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 Cm({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 Cm({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&&At("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",av);function Cm(e){return e[Symbol.toStringTag]="SetIterator",uv(e)}var km=Object.create(null),Am="remove",P5=function(){function e(t,n,a,l){n===void 0&&(n=new Map),l===void 0&&(l=I6),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 To)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!==Ye.UNCHANGED){var c=ko(this),d=!1,m=c||d?{type:sa,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:l.value_,name:n,newValue:a}:null;l.setNewValue_(a),c&&Ao(this,m)}return!0},i.get_=function(n){return Ye.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(!Ye.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;At(1,a.annotationType_,this.name_+"."+n.toString())}for(var u=this.target_;u&&u!==Rd;){var c=lp(u,n);if(c){var d=a.make_(this,n,c,u);if(d===0)return;if(d===1)break}u=Object.getPrototypeOf(u)}Rm(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&&Rm(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 d=c.newValue;a.value!==d&&(a=Yl({},a,{value:d}))}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 d=Zi(this,{object:this.proxy_||this.target_,name:n,type:Vl,newValue:a});if(!d)return null;a=d.newValue}var m=Tm(n),_={configurable:Ye.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:m.get,set:m.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 d=Tm(n),m={configurable:Ye.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:d.get,set:d.set};if(l){if(!Reflect.defineProperty(this.target_,n,m))return!1}else la(this.target_,n,m);this.values_.set(n,new To(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:Am});if(!l)return null}try{var u;vi();var c=ko(this),d=!1,m=this.values_.get(n),_=void 0;if(!m&&(c||d)){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(m&&(this.values_.delete(n),m instanceof $l&&(_=m.value_),n5(m)),this.keysAtom_.reportChanged(),(u=this.pendingKeys_)==null||(u=u.get(n))==null||u.set(n in this.target_),c||d){var x={type:Am,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:_,name:n};c&&Ao(this,x)}}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 d=u||c?{type:Vl,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:n,newValue:a}:null;u&&Ao(this,d)}(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,dt))return e;var n=(t=i==null?void 0:i.name)!=null?t:"ObservableObject",a=new P5(e,new Map,String(n),$6(i));return Md(e,dt,a),e}var Kw=Zl("ObservableObjectAdministration",P5);function Tm(e){return km[e]||(km[e]={get:function(){return this[dt].getObservablePropValue_(e)},set:function(t){return this[dt].setObservablePropValue_(e,t)}})}function _r(e){return Sp(e)?Kw(e[dt]):!1}function Rm(e,i,t){var n;(n=e.target_[aa])==null||delete n[t]}var Xw=k5(0),Zw=function(){var e=!1,i={};return Object.defineProperty(i,"0",{set:function(){e=!0}}),Object.create(i)[0]=1,e===!1}(),A0=0,C5=function(){};function Qw(e,i){Object.setPrototypeOf?Object.setPrototypeOf(e.prototype,i):e.prototype.__proto__!==void 0?e.prototype.__proto__=i:e.prototype=i}Qw(C5,Array.prototype);var lv=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 d=new ov(l,a,u,!0);d.proxy_=c,L3(c,dt,d),n&&n.length&&c.spliceWithArray(0,0,n),Zw&&Object.defineProperty(c,"0",Xw)}),c}D3(i,e);var t=i.prototype;return t.concat=function(){this[dt].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 uv({next:function(){return a<n.length?{value:n[a++],done:!1}:{done:!0,value:void 0}}})},mc(i,[{key:"length",get:function(){return this[dt].getArrayLength_()},set:function(a){this[dt].setArrayLength_(a)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(C5);Object.entries(dp).forEach(function(e){var i=e[0],t=e[1];i!=="concat"&&Md(lv.prototype,i,t)});function k5(e){return{enumerable:!1,configurable:!0,get:function(){return this[dt].get_(e)},set:function(t){this[dt].set_(e,t)}}}function Jw(e){la(lv.prototype,""+e,k5(e))}function A5(e){if(e>A0){for(var i=A0;i<e+100;i++)Jw(i);A0=e}}A5(1e3);function e8(e,i,t){return new lv(e,i,t)}function ua(e,i){if(typeof e=="object"&&e!==null){if(ri(e))return i!==void 0&&At(23),e[dt].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||At(25,i,pp(e)),t}if(_r(e)){if(!i)return At(26);var n=e[dt].values_.get(i);return n||At(27,i,pp(e)),n}if($g(e)||Gs(e)||fp(e))return e}else if(Li(e)&&fp(e[dt]))return e[dt];At(28)}function Mo(e,i){if(e||At(29),i!==void 0)return Mo(ua(e,i));if($g(e)||Gs(e)||fp(e)||Nr(e)||lr(e))return e;if(e[dt])return e[dt];At(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 Mm=Rd.toString;function sv(e,i,t){return t===void 0&&(t=-1),zg(e,i,t)}function zg(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=Mm.call(e);if(u!==Mm.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=Lm(e),i=Lm(i);var c=u==="[object Array]";if(!c){if(typeof e!="object"||typeof i!="object")return!1;var d=e.constructor,m=i.constructor;if(d!==m&&!(Li(d)&&d instanceof d&&Li(m)&&m instanceof m)&&"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(!zg(e[_],i[_],t-1,n,a))return!1}else{var k=Object.keys(e),x;if(_=k.length,Object.keys(i).length!==_)return!1;for(;_--;)if(x=k[_],!(Ya(i,x)&&zg(e[x],i[x],t-1,n,a)))return!1}return n.pop(),a.pop(),!0}function Lm(e){return ri(e)?e.slice():vc(e)||Nr(e)||Wa(e)||lr(e)?Array.from(e.entries()):e}var Nm,t8=((Nm=wp().Iterator)==null?void 0:Nm.prototype)||{};function uv(e){return e[Symbol.iterator]=n8,Object.assign(Object.create(t8),e)}function n8(){return this}["Symbol","Map","Set"].forEach(function(e){var i=wp();typeof i[e]>"u"&&At("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:i5,extras:{getDebugName:pp},$mobx:dt});const r8=Object.freeze(Object.defineProperty({__proto__:null,$mobx:dt,FlowCancellationError:kp,ObservableMap:Mp,ObservableSet:av,Reaction:Ro,_allowStateChanges:Yg,_allowStateChangesInsideComputed:lc,_allowStateReadsEnd:rc,_allowStateReadsStart:Cp,_autoAction:ac,_endAction:Y3,_getAdministration:Mo,_getGlobalState:Q3,_interceptReads:ev,_isComputingDerivation:J6,_resetGlobalState:rw,_startAction:W3,action:Zn,autorun:Zg,comparer:qs,computed:$s,configure:h5,createAtom:Ed,defineProperty:rv,entries:w5,extendObservable:Jg,flow:Vs,flowResult:kw,get:Lw,getAtom:ua,getDebugName:pp,getDependencyTree:p5,getObserverTree:Ew,has:S5,intercept:Ap,isAction:sc,isBoxedObservable:Kg,isComputed:Rw,isComputedProp:y5,isFlow:uc,isFlowCancellationError:Pw,isObservable:Tp,isObservableArray:ri,isObservableMap:Nr,isObservableObject:_r,isObservableProp:_5,isObservableSet:lr,keys:Od,makeAutoObservable:Uw,makeObservable:iv,observable:sn,observe:Rp,onBecomeObserved:f5,onBecomeUnobserved:Qg,onReactionError:uw,override:h6,ownKeys:E5,reaction:c5,remove:Mw,runInAction:lc,set:nv,spy:i5,toJS:Dw,trace:jw,transaction:oa,untracked:Xg,values:tv,when:Fg},Symbol.toStringTag,{value:"Module"}));if(!On.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!iv)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");var i8=C3();function o8(e){e()}function T5(e){e||(e=o8),h5({reactionScheduler:e})}var a8=function(){return!0};function l8(e){return p5(e)}var R5=!1;function M5(e){R5=e}function cv(){return R5}var s8=1e4,u8=1e4,c8=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=s8),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,u8))}}),e}(),f8=typeof FinalizationRegistry<"u"?FinalizationRegistry:c8,gp=new f8(function(e){var i;(i=e.reaction)===null||i===void 0||i.dispose(),e.reaction=null}),T0={exports:{}},R0={};/**
|
|
35
|
-
* @license React
|
|
36
|
-
* use-sync-external-store-shim.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and 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 Im;function d8(){if(Im)return R0;Im=1;var e=An();function i(k,x){return k===x&&(k!==0||1/k===1/x)||k!==k&&x!==x}var t=typeof Object.is=="function"?Object.is:i,n=e.useState,a=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function c(k,x){var v=x(),w=n({inst:{value:v,getSnapshot:x}}),p=w[0].inst,h=w[1];return l(function(){p.value=v,p.getSnapshot=x,d(p)&&h({inst:p})},[k,v,x]),a(function(){return d(p)&&h({inst:p}),k(function(){d(p)&&h({inst:p})})},[k]),u(v),v}function d(k){var x=k.getSnapshot;k=k.value;try{var v=x();return!t(k,v)}catch{return!0}}function m(k,x){return x()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:c;return R0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,R0}var Dm;function h8(){return Dm||(Dm=1,T0.exports=d8()),T0.exports}var p8=h8();function jm(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 fv(e,i){if(i===void 0&&(i="observed"),cv())return e();var t=qt.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||(jm(n),n.stateVersion=Symbol()),function(){var d;n.onStoreChange=null,(d=n.reaction)===null||d===void 0||d.dispose(),n.reaction=null}},getSnapshot:function(){return n.stateVersion}};t.current=n}var a=t.current;a.reaction||(jm(a),gp.register(t,a,a)),qt.useDebugValue(a.reaction,l8),p8.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 M0,L0,L5=typeof Symbol=="function"&&Symbol.for,g8=(L0=(M0=Object.getOwnPropertyDescriptor(function(){},"name"))===null||M0===void 0?void 0:M0.configurable)!==null&&L0!==void 0?L0:!1,Fm=L5?Symbol.for("react.forward_ref"):typeof On.forwardRef=="function"&&On.forwardRef(function(e){return null}).$$typeof,zm=L5?Symbol.for("react.memo"):typeof On.memo=="function"&&On.memo(function(e){return null}).$$typeof;function v8(e,i){var t;if(zm&&e.$$typeof===zm)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(cv())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(Fm&&e.$$typeof===Fm&&(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,d){return fv(function(){return a(c,d)},l)};return u.displayName=e.displayName,g8&&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),y8(e,u),u}var m8={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function y8(e,i){Object.keys(e).forEach(function(t){m8[t]||Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(e,t))})}function N5(e){var i=e.children,t=e.render;i&&t&&console.error("MobX Observer: Do not use children and render in the same time in `Observer`");var n=i||t;return typeof n!="function"?null:fv(n)}N5.displayName="Observer";function b8(e,i){return On.useState(function(){return sn(e(),i,{autoBind:!0})})[0]}function I5(e){var i=On.useState(function(){return sn(e,{},{deep:!1})})[0];return lc(function(){Object.assign(i,e)}),i}function _8(e,i){var t=i&&I5(i);return On.useState(function(){return sn(e(t),void 0,{autoBind:!0})})[0]}var N0;T5(i8.unstable_batchedUpdates);var w8=(N0=gp.finalizeAllImmediately)!==null&&N0!==void 0?N0:function(){};function S8(e,i){return i===void 0&&(i="observed"),fv(e,i)}function E8(e){M5(e)}const O8=Object.freeze(Object.defineProperty({__proto__:null,Observer:N5,_observerFinalizationRegistry:gp,clearTimers:w8,enableStaticRendering:M5,isObserverBatched:a8,isUsingStaticRendering:cv,observer:v8,observerBatching:T5,useAsObservableSource:I5,useLocalObservable:b8,useLocalStore:_8,useObserver:S8,useStaticRendering:E8},Symbol.toStringTag,{value:"Module"})),Qi=Xl(O8);var Is={};const da=Xl(r8);var rp={exports:{}},vf={},I0={},D0={},Bm;function Lt(){return Bm||(Bm=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.18",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)}(D0)),D0}var j0={},Um;function Nn(){return Um||(Um=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const i=Lt();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 E=this.m;return{x:E[0]*y.x+E[2]*y.y+E[4],y:E[1]*y.x+E[3]*y.y+E[5]}}translate(y,E){return this.m[4]+=this.m[0]*y+this.m[2]*E,this.m[5]+=this.m[1]*y+this.m[3]*E,this}scale(y,E){return this.m[0]*=y,this.m[1]*=y,this.m[2]*=E,this.m[3]*=E,this}rotate(y){const E=Math.cos(y),L=Math.sin(y),R=this.m[0]*E+this.m[2]*L,D=this.m[1]*E+this.m[3]*L,O=this.m[0]*-L+this.m[2]*E,S=this.m[1]*-L+this.m[3]*E;return this.m[0]=R,this.m[1]=D,this.m[2]=O,this.m[3]=S,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(y,E){const L=this.m[0]+this.m[2]*E,R=this.m[1]+this.m[3]*E,D=this.m[2]+this.m[0]*y,O=this.m[3]+this.m[1]*y;return this.m[0]=L,this.m[1]=R,this.m[2]=D,this.m[3]=O,this}multiply(y){const E=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],O=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]=E,this.m[1]=L,this.m[2]=R,this.m[3]=D,this.m[4]=O,this.m[5]=S,this}invert(){const y=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),E=this.m[3]*y,L=-this.m[1]*y,R=-this.m[2]*y,D=this.m[0]*y,O=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]=E,this.m[1]=L,this.m[2]=R,this.m[3]=D,this.m[4]=O,this.m[5]=S,this}getMatrix(){return this.m}decompose(){const y=this.m[0],E=this.m[1],L=this.m[2],R=this.m[3],D=this.m[4],O=this.m[5],S=y*R-E*L,T={x:D,y:O,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(y!=0||E!=0){const M=Math.sqrt(y*y+E*E);T.rotation=E>0?Math.acos(y/M):-Math.acos(y/M),T.scaleX=M,T.scaleY=S/M,T.skewX=(y*L+E*R)/S,T.skewY=0}else if(L!=0||R!=0){const M=Math.sqrt(L*L+R*R);T.rotation=Math.PI/2-(R>0?Math.acos(-L/M):-Math.acos(L/M)),T.scaleX=S/M,T.scaleY=M,T.skewX=0,T.skewY=(y*L+E*R)/S}return T.rotation=e.Util._getRotation(T.rotation),T}}e.Transform=t;const n="[object Array]",a="[object Number]",l="[object String]",u="[object Boolean]",c=Math.PI/180,d=180/Math.PI,m="#",_="",k="0",x="Konva warning: ",v="Konva error: ",w="rgb(",p={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]},h=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let C=[];const g=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(b){setTimeout(b,60)};e.Util={_isElement(b){return!!(b&&b.nodeType==1)},_isFunction(b){return!!(b&&b.constructor&&b.call&&b.apply)},_isPlainObject(b){return!!b&&b.constructor===Object},_isArray(b){return Object.prototype.toString.call(b)===n},_isNumber(b){return Object.prototype.toString.call(b)===a&&!isNaN(b)&&isFinite(b)},_isString(b){return Object.prototype.toString.call(b)===l},_isBoolean(b){return Object.prototype.toString.call(b)===u},isObject(b){return b instanceof Object},isValidSelector(b){if(typeof b!="string")return!1;const y=b[0];return y==="#"||y==="."||y===y.toUpperCase()},_sign(b){return b===0||b>0?1:-1},requestAnimFrame(b){C.push(b),C.length===1&&g(function(){const y=C;C=[],y.forEach(function(E){E()})})},createCanvasElement(){const b=document.createElement("canvas");try{b.style=b.style||{}}catch{}return b},createImageElement(){return document.createElement("img")},_isInDocument(b){for(;b=b.parentNode;)if(b==document)return!0;return!1},_urlToImage(b,y){const E=e.Util.createImageElement();E.onload=function(){y(E)},E.src=b},_rgbToHex(b,y,E){return((1<<24)+(b<<16)+(y<<8)+E).toString(16).slice(1)},_hexToRgb(b){b=b.replace(m,_);const y=parseInt(b,16);return{r:y>>16&255,g:y>>8&255,b:y&255}},getRandomColor(){let b=(Math.random()*16777215<<0).toString(16);for(;b.length<6;)b=k+b;return m+b},getRGB(b){let y;return b in p?(y=p[b],{r:y[0],g:y[1],b:y[2]}):b[0]===m?this._hexToRgb(b.substring(1)):b.substr(0,4)===w?(y=h.exec(b.replace(/ /g,"")),{r:parseInt(y[1],10),g:parseInt(y[2],10),b:parseInt(y[3],10)}):{r:0,g:0,b:0}},colorToRGBA(b){return b=b||"black",e.Util._namedColorToRBA(b)||e.Util._hex3ColorToRGBA(b)||e.Util._hex4ColorToRGBA(b)||e.Util._hex6ColorToRGBA(b)||e.Util._hex8ColorToRGBA(b)||e.Util._rgbColorToRGBA(b)||e.Util._rgbaColorToRGBA(b)||e.Util._hslColorToRGBA(b)},_namedColorToRBA(b){const y=p[b.toLowerCase()];return y?{r:y[0],g:y[1],b:y[2],a:1}:null},_rgbColorToRGBA(b){if(b.indexOf("rgb(")===0){b=b.match(/rgb\(([^)]+)\)/)[1];const y=b.split(/ *, */).map(Number);return{r:y[0],g:y[1],b:y[2],a:1}}},_rgbaColorToRGBA(b){if(b.indexOf("rgba(")===0){b=b.match(/rgba\(([^)]+)\)/)[1];const y=b.split(/ *, */).map((E,L)=>E.slice(-1)==="%"?L===3?parseInt(E)/100:parseInt(E)/100*255:Number(E));return{r:y[0],g:y[1],b:y[2],a:y[3]}}},_hex8ColorToRGBA(b){if(b[0]==="#"&&b.length===9)return{r:parseInt(b.slice(1,3),16),g:parseInt(b.slice(3,5),16),b:parseInt(b.slice(5,7),16),a:parseInt(b.slice(7,9),16)/255}},_hex6ColorToRGBA(b){if(b[0]==="#"&&b.length===7)return{r:parseInt(b.slice(1,3),16),g:parseInt(b.slice(3,5),16),b:parseInt(b.slice(5,7),16),a:1}},_hex4ColorToRGBA(b){if(b[0]==="#"&&b.length===5)return{r:parseInt(b[1]+b[1],16),g:parseInt(b[2]+b[2],16),b:parseInt(b[3]+b[3],16),a:parseInt(b[4]+b[4],16)/255}},_hex3ColorToRGBA(b){if(b[0]==="#"&&b.length===4)return{r:parseInt(b[1]+b[1],16),g:parseInt(b[2]+b[2],16),b:parseInt(b[3]+b[3],16),a:1}},_hslColorToRGBA(b){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(b)){const[y,...E]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(b),L=Number(E[0])/360,R=Number(E[1])/100,D=Number(E[2])/100;let O,S,T;if(R===0)return T=D*255,{r:Math.round(T),g:Math.round(T),b:Math.round(T),a:1};D<.5?O=D*(1+R):O=D+R-D*R;const M=2*D-O,A=[0,0,0];for(let z=0;z<3;z++)S=L+1/3*-(z-1),S<0&&S++,S>1&&S--,6*S<1?T=M+(O-M)*6*S:2*S<1?T=O:3*S<2?T=M+(O-M)*(2/3-S)*6:T=M,A[z]=T*255;return{r:Math.round(A[0]),g:Math.round(A[1]),b:Math.round(A[2]),a:1}}},haveIntersection(b,y){return!(y.x>b.x+b.width||y.x+y.width<b.x||y.y>b.y+b.height||y.y+y.height<b.y)},cloneObject(b){const y={};for(const E in b)this._isPlainObject(b[E])?y[E]=this.cloneObject(b[E]):this._isArray(b[E])?y[E]=this.cloneArray(b[E]):y[E]=b[E];return y},cloneArray(b){return b.slice(0)},degToRad(b){return b*c},radToDeg(b){return b*d},_degToRad(b){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(b)},_radToDeg(b){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(b)},_getRotation(b){return i.Konva.angleDeg?e.Util.radToDeg(b):b},_capitalize(b){return b.charAt(0).toUpperCase()+b.slice(1)},throw(b){throw new Error(v+b)},error(b){console.error(v+b)},warn(b){i.Konva.showWarnings&&console.warn(x+b)},each(b,y){for(const E in b)y(E,b[E])},_inRange(b,y,E){return y<=b&&b<E},_getProjectionToSegment(b,y,E,L,R,D){let O,S,T;const M=(b-E)*(b-E)+(y-L)*(y-L);if(M==0)O=b,S=y,T=(R-E)*(R-E)+(D-L)*(D-L);else{const A=((R-b)*(E-b)+(D-y)*(L-y))/M;A<0?(O=b,S=y,T=(b-R)*(b-R)+(y-D)*(y-D)):A>1?(O=E,S=L,T=(E-R)*(E-R)+(L-D)*(L-D)):(O=b+A*(E-b),S=y+A*(L-y),T=(O-R)*(O-R)+(S-D)*(S-D))}return[O,S,T]},_getProjectionToLine(b,y,E){const L=e.Util.cloneObject(b);let R=Number.MAX_VALUE;return y.forEach(function(D,O){if(!E&&O===y.length-1)return;const S=y[(O+1)%y.length],T=e.Util._getProjectionToSegment(D.x,D.y,S.x,S.y,b.x,b.y),M=T[0],A=T[1],z=T[2];z<R&&(L.x=M,L.y=A,R=z)}),L},_prepareArrayForTween(b,y,E){const L=[],R=[];if(b.length>y.length){const O=y;y=b,b=O}for(let O=0;O<b.length;O+=2)L.push({x:b[O],y:b[O+1]});for(let O=0;O<y.length;O+=2)R.push({x:y[O],y:y[O+1]});const D=[];return R.forEach(function(O){const S=e.Util._getProjectionToLine(O,L,E);D.push(S.x),D.push(S.y)}),D},_prepareToStringify(b){let y;b.visitedByCircularReferenceRemoval=!0;for(const E in b)if(b.hasOwnProperty(E)&&b[E]&&typeof b[E]=="object"){if(y=Object.getOwnPropertyDescriptor(b,E),b[E].visitedByCircularReferenceRemoval||e.Util._isElement(b[E]))if(y.configurable)delete b[E];else return null;else if(e.Util._prepareToStringify(b[E])===null)if(y.configurable)delete b[E];else return null}return delete b.visitedByCircularReferenceRemoval,b},_assign(b,y){for(const E in y)b[E]=y[E];return b},_getFirstPointerId(b){return b.touches?b.changedTouches[0].identifier:b.pointerId||999},releaseCanvas(...b){i.Konva.releaseCanvasOnDestroy&&b.forEach(y=>{y.width=0,y.height=0})},drawRoundedRectPath(b,y,E,L){let R=0,D=0,O=0,S=0;typeof L=="number"?R=D=O=S=Math.min(L,y/2,E/2):(R=Math.min(L[0]||0,y/2,E/2),D=Math.min(L[1]||0,y/2,E/2),S=Math.min(L[2]||0,y/2,E/2),O=Math.min(L[3]||0,y/2,E/2)),b.moveTo(R,0),b.lineTo(y-D,0),b.arc(y-D,D,D,Math.PI*3/2,0,!1),b.lineTo(y,E-S),b.arc(y-S,E-S,S,0,Math.PI/2,!1),b.lineTo(O,E),b.arc(O,E-O,O,Math.PI/2,Math.PI,!1),b.lineTo(0,R),b.arc(R,R,R,Math.PI,Math.PI*3/2,!1)}}}(j0)),j0}var mf={},F0={},gi={},qm;function zt(){if(qm)return gi;qm=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.RGBComponent=n,gi.alphaComponent=a,gi.getNumberValidator=l,gi.getNumberOrArrayOfNumbersValidator=u,gi.getNumberOrAutoValidator=c,gi.getStringValidator=d,gi.getStringOrGradientValidator=m,gi.getFunctionValidator=_,gi.getNumberArrayValidator=k,gi.getBooleanValidator=x,gi.getComponentValidator=v;const e=Lt(),i=Nn();function t(w){return i.Util._isString(w)?'"'+w+'"':Object.prototype.toString.call(w)==="[object Number]"||i.Util._isBoolean(w)?w:Object.prototype.toString.call(w)}function n(w){return w>255?255:w<0?0:Math.round(w)}function a(w){return w>1?1:w<1e-4?1e-4:w}function l(){if(e.Konva.isUnminified)return function(w,p){return i.Util._isNumber(w)||i.Util.warn(t(w)+' is a not valid value for "'+p+'" attribute. The value should be a number.'),w}}function u(w){if(e.Konva.isUnminified)return function(p,h){let C=i.Util._isNumber(p),g=i.Util._isArray(p)&&p.length==w;return!C&&!g&&i.Util.warn(t(p)+' is a not valid value for "'+h+'" attribute. The value should be a number or Array<number>('+w+")"),p}}function c(){if(e.Konva.isUnminified)return function(w,p){var h=i.Util._isNumber(w),C=w==="auto";return h||C||i.Util.warn(t(w)+' is a not valid value for "'+p+'" attribute. The value should be a number or "auto".'),w}}function d(){if(e.Konva.isUnminified)return function(w,p){return i.Util._isString(w)||i.Util.warn(t(w)+' is a not valid value for "'+p+'" attribute. The value should be a string.'),w}}function m(){if(e.Konva.isUnminified)return function(w,p){const h=i.Util._isString(w),C=Object.prototype.toString.call(w)==="[object CanvasGradient]"||w&&w.addColorStop;return h||C||i.Util.warn(t(w)+' is a not valid value for "'+p+'" attribute. The value should be a string or a native gradient.'),w}}function _(){if(e.Konva.isUnminified)return function(w,p){return i.Util._isFunction(w)||i.Util.warn(t(w)+' is a not valid value for "'+p+'" attribute. The value should be a function.'),w}}function k(){if(e.Konva.isUnminified)return function(w,p){const h=Int8Array?Object.getPrototypeOf(Int8Array):null;return h&&w instanceof h||(i.Util._isArray(w)?w.forEach(function(C){i.Util._isNumber(C)||i.Util.warn('"'+p+'" attribute has non numeric element '+C+". Make sure that all elements are numbers.")}):i.Util.warn(t(w)+' is a not valid value for "'+p+'" attribute. The value should be a array of numbers.')),w}}function x(){if(e.Konva.isUnminified)return function(w,p){var h=w===!0||w===!1;return h||i.Util.warn(t(w)+' is a not valid value for "'+p+'" attribute. The value should be a boolean.'),w}}function v(w){if(e.Konva.isUnminified)return function(p,h){return p==null||i.Util.isObject(p)||i.Util.warn(t(p)+' is a not valid value for "'+h+'" attribute. The value should be an object with properties '+w),p}}return gi}var Hm;function jt(){return Hm||(Hm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const i=Nn(),t=zt(),n="get",a="set";e.Factory={addGetterSetter(l,u,c,d,m){e.Factory.addGetter(l,u,c),e.Factory.addSetter(l,u,d,m),e.Factory.addOverloadedGetterSetter(l,u)},addGetter(l,u,c){var d=n+i.Util._capitalize(u);l.prototype[d]=l.prototype[d]||function(){const m=this.attrs[u];return m===void 0?c:m}},addSetter(l,u,c,d){var m=a+i.Util._capitalize(u);l.prototype[m]||e.Factory.overWriteSetter(l,u,c,d)},overWriteSetter(l,u,c,d){var m=a+i.Util._capitalize(u);l.prototype[m]=function(_){return c&&_!==void 0&&_!==null&&(_=c.call(this,_,u)),this._setAttr(u,_),d&&d.call(this),this}},addComponentsGetterSetter(l,u,c,d,m){const _=c.length,k=i.Util._capitalize,x=n+k(u),v=a+k(u);l.prototype[x]=function(){const p={};for(let h=0;h<_;h++){const C=c[h];p[C]=this.getAttr(u+k(C))}return p};const w=(0,t.getComponentValidator)(c);l.prototype[v]=function(p){const h=this.attrs[u];d&&(p=d.call(this,p,u)),w&&w.call(this,p,u);for(const C in p)p.hasOwnProperty(C)&&this._setAttr(u+k(C),p[C]);return p||c.forEach(C=>{this._setAttr(u+k(C),void 0)}),this._fireChangeEvent(u,h,p),m&&m.call(this),this},e.Factory.addOverloadedGetterSetter(l,u)},addOverloadedGetterSetter(l,u){var c=i.Util._capitalize(u),d=a+c,m=n+c;l.prototype[u]=function(){return arguments.length?(this[d](arguments[0]),this):this[m]()}},addDeprecatedGetterSetter(l,u,c,d){i.Util.error("Adding deprecated "+u);const m=n+i.Util._capitalize(u),_=u+" property is deprecated and will be removed soon. Look at Konva change log for more information.";l.prototype[m]=function(){i.Util.error(_);const k=this.attrs[u];return k===void 0?c:k},e.Factory.addSetter(l,u,d,function(){i.Util.error(_)}),e.Factory.addOverloadedGetterSetter(l,u)},backCompat(l,u){i.Util.each(u,function(c,d){const m=l.prototype[d],_=n+i.Util._capitalize(c),k=a+i.Util._capitalize(c);function x(){m.apply(this,arguments),i.Util.error('"'+c+'" method is deprecated and will be removed soon. Use ""'+d+'" instead.')}l.prototype[c]=x,l.prototype[_]=x,l.prototype[k]=x})},afterSetFilter(){this._filterUpToDate=!1}}}(F0)),F0}var Ua={},qa={},Gm;function D5(){if(Gm)return qa;Gm=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.HitContext=qa.SceneContext=qa.Context=void 0;const e=Nn(),i=Lt();function t(C){const g=[],b=C.length,y=e.Util;for(let E=0;E<b;E++){let L=C[E];y._isNumber(L)?L=Math.round(L*1e3)/1e3:y._isString(L)||(L=L+""),g.push(L)}return g}const n=",",a="(",l=")",u="([",c="])",d=";",m="()",_="=",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"],x=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"],v=100;let w=class{constructor(g){this.canvas=g,i.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(g){g.fillEnabled()&&this._fill(g)}_fill(g){}strokeShape(g){g.hasStroke()&&this._stroke(g)}_stroke(g){}fillStrokeShape(g){g.attrs.fillAfterStrokeEnabled?(this.strokeShape(g),this.fillShape(g)):(this.fillShape(g),this.strokeShape(g))}getTrace(g,b){let y=this.traceArr,E=y.length,L="",R,D,O,S;for(R=0;R<E;R++)D=y[R],O=D.method,O?(S=D.args,L+=O,g?L+=m:e.Util._isArray(S[0])?L+=u+S.join(n)+c:(b&&(S=S.map(T=>typeof T=="number"?Math.floor(T):T)),L+=a+S.join(n)+l)):(L+=D.property,g||(L+=_+D.val)),L+=d;return L}clearTrace(){this.traceArr=[]}_trace(g){let b=this.traceArr,y;b.push(g),y=b.length,y>=v&&b.shift()}reset(){const g=this.getCanvas().getPixelRatio();this.setTransform(1*g,0,0,1*g,0,0)}getCanvas(){return this.canvas}clear(g){const b=this.getCanvas();g?this.clearRect(g.x||0,g.y||0,g.width||0,g.height||0):this.clearRect(0,0,b.getWidth()/b.pixelRatio,b.getHeight()/b.pixelRatio)}_applyLineCap(g){const b=g.attrs.lineCap;b&&this.setAttr("lineCap",b)}_applyOpacity(g){const b=g.getAbsoluteOpacity();b!==1&&this.setAttr("globalAlpha",b)}_applyLineJoin(g){const b=g.attrs.lineJoin;b&&this.setAttr("lineJoin",b)}setAttr(g,b){this._context[g]=b}arc(g,b,y,E,L,R){this._context.arc(g,b,y,E,L,R)}arcTo(g,b,y,E,L){this._context.arcTo(g,b,y,E,L)}beginPath(){this._context.beginPath()}bezierCurveTo(g,b,y,E,L,R){this._context.bezierCurveTo(g,b,y,E,L,R)}clearRect(g,b,y,E){this._context.clearRect(g,b,y,E)}clip(...g){this._context.clip.apply(this._context,g)}closePath(){this._context.closePath()}createImageData(g,b){const y=arguments;if(y.length===2)return this._context.createImageData(g,b);if(y.length===1)return this._context.createImageData(g)}createLinearGradient(g,b,y,E){return this._context.createLinearGradient(g,b,y,E)}createPattern(g,b){return this._context.createPattern(g,b)}createRadialGradient(g,b,y,E,L,R){return this._context.createRadialGradient(g,b,y,E,L,R)}drawImage(g,b,y,E,L,R,D,O,S){const T=arguments,M=this._context;T.length===3?M.drawImage(g,b,y):T.length===5?M.drawImage(g,b,y,E,L):T.length===9&&M.drawImage(g,b,y,E,L,R,D,O,S)}ellipse(g,b,y,E,L,R,D,O){this._context.ellipse(g,b,y,E,L,R,D,O)}isPointInPath(g,b,y,E){return y?this._context.isPointInPath(y,g,b,E):this._context.isPointInPath(g,b,E)}fill(...g){this._context.fill.apply(this._context,g)}fillRect(g,b,y,E){this._context.fillRect(g,b,y,E)}strokeRect(g,b,y,E){this._context.strokeRect(g,b,y,E)}fillText(g,b,y,E){E?this._context.fillText(g,b,y,E):this._context.fillText(g,b,y)}measureText(g){return this._context.measureText(g)}getImageData(g,b,y,E){return this._context.getImageData(g,b,y,E)}lineTo(g,b){this._context.lineTo(g,b)}moveTo(g,b){this._context.moveTo(g,b)}rect(g,b,y,E){this._context.rect(g,b,y,E)}roundRect(g,b,y,E,L){this._context.roundRect(g,b,y,E,L)}putImageData(g,b,y){this._context.putImageData(g,b,y)}quadraticCurveTo(g,b,y,E){this._context.quadraticCurveTo(g,b,y,E)}restore(){this._context.restore()}rotate(g){this._context.rotate(g)}save(){this._context.save()}scale(g,b){this._context.scale(g,b)}setLineDash(g){this._context.setLineDash?this._context.setLineDash(g):"mozDash"in this._context?this._context.mozDash=g:"webkitLineDash"in this._context&&(this._context.webkitLineDash=g)}getLineDash(){return this._context.getLineDash()}setTransform(g,b,y,E,L,R){this._context.setTransform(g,b,y,E,L,R)}stroke(g){g?this._context.stroke(g):this._context.stroke()}strokeText(g,b,y,E){this._context.strokeText(g,b,y,E)}transform(g,b,y,E,L,R){this._context.transform(g,b,y,E,L,R)}translate(g,b){this._context.translate(g,b)}_enableTrace(){let g=this,b=k.length,y=this.setAttr,E,L;const R=function(D){let O=g[D],S;g[D]=function(){return L=t(Array.prototype.slice.call(arguments,0)),S=O.apply(g,arguments),g._trace({method:D,args:L}),S}};for(E=0;E<b;E++)R(k[E]);g.setAttr=function(){y.apply(g,arguments);const D=arguments[0];let O=arguments[1];(D==="shadowOffsetX"||D==="shadowOffsetY"||D==="shadowBlur")&&(O=O/this.canvas.getPixelRatio()),g._trace({property:D,val:O})}}_applyGlobalCompositeOperation(g){const b=g.attrs.globalCompositeOperation;!b||b==="source-over"||this.setAttr("globalCompositeOperation",b)}};qa.Context=w,x.forEach(function(C){Object.defineProperty(w.prototype,C,{get(){return this._context[C]},set(g){this._context[C]=g}})});class p extends w{constructor(g,{willReadFrequently:b=!1}={}){super(g),this._context=g._canvas.getContext("2d",{willReadFrequently:b})}_fillColor(g){const b=g.fill();this.setAttr("fillStyle",b),g._fillFunc(this)}_fillPattern(g){this.setAttr("fillStyle",g._getFillPattern()),g._fillFunc(this)}_fillLinearGradient(g){const b=g._getLinearGradient();b&&(this.setAttr("fillStyle",b),g._fillFunc(this))}_fillRadialGradient(g){const b=g._getRadialGradient();b&&(this.setAttr("fillStyle",b),g._fillFunc(this))}_fill(g){const b=g.fill(),y=g.getFillPriority();if(b&&y==="color"){this._fillColor(g);return}const E=g.getFillPatternImage();if(E&&y==="pattern"){this._fillPattern(g);return}const L=g.getFillLinearGradientColorStops();if(L&&y==="linear-gradient"){this._fillLinearGradient(g);return}const R=g.getFillRadialGradientColorStops();if(R&&y==="radial-gradient"){this._fillRadialGradient(g);return}b?this._fillColor(g):E?this._fillPattern(g):L?this._fillLinearGradient(g):R&&this._fillRadialGradient(g)}_strokeLinearGradient(g){const b=g.getStrokeLinearGradientStartPoint(),y=g.getStrokeLinearGradientEndPoint(),E=g.getStrokeLinearGradientColorStops(),L=this.createLinearGradient(b.x,b.y,y.x,y.y);if(E){for(let R=0;R<E.length;R+=2)L.addColorStop(E[R],E[R+1]);this.setAttr("strokeStyle",L)}}_stroke(g){const b=g.dash(),y=g.getStrokeScaleEnabled();if(g.hasStroke()){if(!y){this.save();const L=this.getCanvas().getPixelRatio();this.setTransform(L,0,0,L,0,0)}this._applyLineCap(g),b&&g.dashEnabled()&&(this.setLineDash(b),this.setAttr("lineDashOffset",g.dashOffset())),this.setAttr("lineWidth",g.strokeWidth()),g.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),g.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(g):this.setAttr("strokeStyle",g.stroke()),g._strokeFunc(this),y||this.restore()}}_applyShadow(g){var b,y,E;const L=(b=g.getShadowRGBA())!==null&&b!==void 0?b:"black",R=(y=g.getShadowBlur())!==null&&y!==void 0?y:5,D=(E=g.getShadowOffset())!==null&&E!==void 0?E:{x:0,y:0},O=g.getAbsoluteScale(),S=this.canvas.getPixelRatio(),T=O.x*S,M=O.y*S;this.setAttr("shadowColor",L),this.setAttr("shadowBlur",R*Math.min(Math.abs(T),Math.abs(M))),this.setAttr("shadowOffsetX",D.x*T),this.setAttr("shadowOffsetY",D.y*M)}}qa.SceneContext=p;class h extends w{constructor(g){super(g),this._context=g._canvas.getContext("2d",{willReadFrequently:!0})}_fill(g){this.save(),this.setAttr("fillStyle",g.colorKey),g._fillFuncHit(this),this.restore()}strokeShape(g){g.hasHitStroke()&&this._stroke(g)}_stroke(g){if(g.hasHitStroke()){const b=g.getStrokeScaleEnabled();if(!b){this.save();const L=this.getCanvas().getPixelRatio();this.setTransform(L,0,0,L,0,0)}this._applyLineCap(g);const y=g.hitStrokeWidth(),E=y==="auto"?g.strokeWidth():y;this.setAttr("lineWidth",E),this.setAttr("strokeStyle",g.colorKey),g._strokeFuncHit(this),b||this.restore()}}}return qa.HitContext=h,qa}var Vm;function Lp(){if(Vm)return Ua;Vm=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.HitCanvas=Ua.SceneCanvas=Ua.Canvas=void 0;const e=Nn(),i=D5(),t=Lt(),n=jt(),a=zt();let l;function u(){if(l)return l;const _=e.Util.createCanvasElement(),k=_.getContext("2d");return l=function(){const x=t.Konva._global.devicePixelRatio||1,v=k.webkitBackingStorePixelRatio||k.mozBackingStorePixelRatio||k.msBackingStorePixelRatio||k.oBackingStorePixelRatio||k.backingStorePixelRatio||1;return x/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 x=this.pixelRatio;this.pixelRatio=k,this.setSize(this.getWidth()/x,this.getHeight()/x)}setWidth(k){this.width=this._canvas.width=k*this.pixelRatio,this._canvas.style.width=k+"px";const x=this.pixelRatio;this.getContext()._context.scale(x,x)}setHeight(k){this.height=this._canvas.height=k*this.pixelRatio,this._canvas.style.height=k+"px";const x=this.pixelRatio;this.getContext()._context.scale(x,x)}getWidth(){return this.width}getHeight(){return this.height}setSize(k,x){this.setWidth(k||0),this.setHeight(x||0)}toDataURL(k,x){try{return this._canvas.toDataURL(k,x)}catch{try{return this._canvas.toDataURL()}catch(w){return e.Util.error("Unable to get data URL. "+w.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 d 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=d;class m 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=m,Ua}var z0={},$m;function dv(){return $m||($m=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const i=Lt(),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,d=c.getStage();d.setPointersPositions(n),l.pointerId===void 0&&(l.pointerId=t.Util._getFirstPointerId(n));const m=d._changedPointerPositions.find(_=>_.id===l.pointerId);if(m){if(l.dragStatus!=="dragging"){const _=c.dragDistance();if(Math.max(Math.abs(m.x-l.startPointerPos.x),Math.abs(m.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 m=l.node.getLayer()||l.node instanceof i.Konva.Stage&&l.node;m&&a.indexOf(m)===-1&&a.push(m)}),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))}(z0)),z0}var Wm;function Hn(){if(Wm)return mf;Wm=1,Object.defineProperty(mf,"__esModule",{value:!0}),mf.Node=void 0;const e=Nn(),i=jt(),t=Lp(),n=Lt(),a=dv(),l=zt(),u="absoluteOpacity",c="allEventListeners",d="absoluteTransform",m="absoluteScale",_="canvas",k="Change",x="children",v="konva",w="listening",p="mouseenter",h="mouseleave",C="set",g="Shape",b=" ",y="stage",E="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(b);let O=1;class S{constructor(A){this._id=O++,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(A),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(A){(A===E||A===d)&&this._cache.get(A)?this._cache.get(A).dirty=!0:A?this._cache.delete(A):this._cache.clear()}_getCache(A,z){let U=this._cache.get(A);return(U===void 0||(A===E||A===d)&&U.dirty===!0)&&(U=z.call(this),this._cache.set(A,U)),U}_calculate(A,z,U){if(!this._attachedDepsListeners.get(A)){const Z=z.map(X=>X+"Change.konva").join(b);this.on(Z,()=>{this._clearCache(A)}),this._attachedDepsListeners.set(A,!0)}return this._getCache(A,U)}_getCanvasCache(){return this._cache.get(_)}_clearSelfAndDescendantCache(A){this._clearCache(A),A===d&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(_)){const{scene:A,filter:z,hit:U}=this._cache.get(_);e.Util.releaseCanvas(A,z,U),this._cache.delete(_)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(A){const z=A||{};let U={};(z.x===void 0||z.y===void 0||z.width===void 0||z.height===void 0)&&(U=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let Z=Math.ceil(z.width||U.width),X=Math.ceil(z.height||U.height),J=z.pixelRatio,B=z.x===void 0?Math.floor(U.x):z.x,N=z.y===void 0?Math.floor(U.y):z.y,F=z.offset||0,H=z.drawBorder||!1,Y=z.hitCanvasPixelRatio||1;if(!Z||!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)-B)>.5?1:0,V=Math.abs(Math.round(U.y)-N)>.5?1:0;Z+=F*2+ee,X+=F*2+V,B-=F,N-=F;const K=new t.SceneCanvas({pixelRatio:J,width:Z,height:X}),$=new t.SceneCanvas({pixelRatio:J,width:0,height:0,willReadFrequently:!0}),ne=new t.HitCanvas({pixelRatio:Y,width:Z,height:X}),re=K.getContext(),ie=ne.getContext();return ne.isCache=!0,K.isCache=!0,this._cache.delete(_),this._filterUpToDate=!1,z.imageSmoothingEnabled===!1&&(K.getContext()._context.imageSmoothingEnabled=!1,$.getContext()._context.imageSmoothingEnabled=!1),re.save(),ie.save(),re.translate(-B,-N),ie.translate(-B,-N),this._isUnderCache=!0,this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(m),this.drawScene(K,this),this.drawHit(ne,this),this._isUnderCache=!1,re.restore(),ie.restore(),H&&(re.save(),re.beginPath(),re.rect(0,0,Z,X),re.closePath(),re.setAttr("strokeStyle","red"),re.setAttr("lineWidth",5),re.stroke(),re.restore()),this._cache.set(_,{scene:K,filter:$,hit:ne,x:B,y:N}),this._requestDraw(),this}isCached(){return this._cache.has(_)}getClientRect(A){throw new Error('abstract "getClientRect" method call')}_transformedRect(A,z){const U=[{x:A.x,y:A.y},{x:A.x+A.width,y:A.y},{x:A.x+A.width,y:A.y+A.height},{x:A.x,y:A.y+A.height}];let Z=1/0,X=1/0,J=-1/0,B=-1/0;const N=this.getAbsoluteTransform(z);return U.forEach(function(F){const H=N.point(F);Z===void 0&&(Z=J=H.x,X=B=H.y),Z=Math.min(Z,H.x),X=Math.min(X,H.y),J=Math.max(J,H.x),B=Math.max(B,H.y)}),{x:Z,y:X,width:J-Z,height:B-X}}_drawCachedSceneCanvas(A){A.save(),A._applyOpacity(this),A._applyGlobalCompositeOperation(this);const z=this._getCanvasCache();A.translate(z.x,z.y);const U=this._getCachedSceneCanvas(),Z=U.pixelRatio;A.drawImage(U._canvas,0,0,U.width/Z,U.height/Z),A.restore()}_drawCachedHitCanvas(A){const z=this._getCanvasCache(),U=z.hit;A.save(),A.translate(z.x,z.y),A.drawImage(U._canvas,0,0,U.width/U.pixelRatio,U.height/U.pixelRatio),A.restore()}_getCachedSceneCanvas(){let A=this.filters(),z=this._getCanvasCache(),U=z.scene,Z=z.filter,X=Z.getContext(),J,B,N,F;if(A){if(!this._filterUpToDate){const H=U.pixelRatio;Z.setSize(U.width/U.pixelRatio,U.height/U.pixelRatio);try{for(J=A.length,X.clear(),X.drawImage(U._canvas,0,0,U.getWidth()/H,U.getHeight()/H),B=X.getImageData(0,0,Z.getWidth(),Z.getHeight()),N=0;N<J;N++){if(F=A[N],typeof F!="function"){e.Util.error("Filter should be type of function, but got "+typeof F+" instead. Please check correct filters");continue}F.call(this,B),X.putImageData(B,0,0)}}catch(Y){e.Util.error("Unable to apply filter. "+Y.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return Z}return U}on(A,z){if(this._cache&&this._cache.delete(c),arguments.length===3)return this._delegate.apply(this,arguments);let U=A.split(b),Z=U.length,X,J,B,N,F;for(X=0;X<Z;X++)J=U[X],B=J.split("."),N=B[0],F=B[1]||"",this.eventListeners[N]||(this.eventListeners[N]=[]),this.eventListeners[N].push({name:F,handler:z});return this}off(A,z){let U=(A||"").split(b),Z=U.length,X,J,B,N,F,H;if(this._cache&&this._cache.delete(c),!A)for(J in this.eventListeners)this._off(J);for(X=0;X<Z;X++)if(B=U[X],N=B.split("."),F=N[0],H=N[1],F)this.eventListeners[F]&&this._off(F,H,z);else for(J in this.eventListeners)this._off(J,H,z);return this}dispatchEvent(A){const z={target:this,type:A.type,evt:A};return this.fire(A.type,z),this}addEventListener(A,z){return this.on(A,function(U){z.call(this,U.evt)}),this}removeEventListener(A){return this.off(A),this}_delegate(A,z,U){const Z=this;this.on(A,function(X){const J=X.target.findAncestors(z,!0,Z);for(let B=0;B<J.length;B++)X=e.Util.cloneObject(X),X.currentTarget=J[B],U.call(J[B],X)})}remove(){return this.isDragging()&&this.stopDrag(),a.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(d),this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(m),this._clearSelfAndDescendantCache(y),this._clearSelfAndDescendantCache(R),this._clearSelfAndDescendantCache(w)}_remove(){this._clearCaches();const A=this.getParent();A&&A.children&&(A.children.splice(this.index,1),A._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(A){const z="get"+e.Util._capitalize(A);return e.Util._isFunction(this[z])?this[z]():this.attrs[A]}getAncestors(){let A=this.getParent(),z=[];for(;A;)z.push(A),A=A.getParent();return z}getAttrs(){return this.attrs||{}}setAttrs(A){return this._batchTransformChanges(()=>{let z,U;if(!A)return this;for(z in A)z!==x&&(U=C+e.Util._capitalize(z),e.Util._isFunction(this[U])?this[U](A[z]):this._setAttr(z,A[z]))}),this}isListening(){return this._getCache(w,this._isListening)}_isListening(A){if(!this.listening())return!1;const U=this.getParent();return U&&U!==A&&this!==A?U._isListening(A):!0}isVisible(){return this._getCache(R,this._isVisible)}_isVisible(A){if(!this.visible())return!1;const U=this.getParent();return U&&U!==A&&this!==A?U._isVisible(A):!0}shouldDrawHit(A,z=!1){if(A)return this._isVisible(A)&&this._isListening(A);const U=this.getLayer();let Z=!1;a.DD._dragElements.forEach(J=>{J.dragStatus==="dragging"&&(J.node.nodeType==="Stage"||J.node.getLayer()===U)&&(Z=!0)});const X=!z&&!n.Konva.hitOnDragEnabled&&(Z||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 A=this.getDepth(),z=this,U=0,Z,X,J,B;function N(H){for(Z=[],X=H.length,J=0;J<X;J++)B=H[J],U++,B.nodeType!==g&&(Z=Z.concat(B.getChildren().slice())),B._id===z._id&&(J=X);Z.length>0&&Z[0].getDepth()<=A&&N(Z)}const F=this.getStage();return z.nodeType!==L&&F&&N(F.getChildren()),U}getDepth(){let A=0,z=this.parent;for(;z;)A++,z=z.parent;return A}_batchTransformChanges(A){this._batchingTransformChange=!0,A(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(E),this._clearSelfAndDescendantCache(d)),this._needClearTransformCache=!1}setPosition(A){return this._batchTransformChanges(()=>{this.x(A.x),this.y(A.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const A=this.getStage();if(!A)return null;const z=A.getPointerPosition();if(!z)return null;const U=this.getAbsoluteTransform().copy();return U.invert(),U.point(z)}getAbsolutePosition(A){let z=!1,U=this.parent;for(;U;){if(U.isCached()){z=!0;break}U=U.parent}z&&!A&&(A=!0);const Z=this.getAbsoluteTransform(A).getMatrix(),X=new e.Transform,J=this.offset();return X.m=Z.slice(),X.translate(J.x,J.y),X.getTranslation()}setAbsolutePosition(A){const{x:z,y:U,...Z}=this._clearTransform();this.attrs.x=z,this.attrs.y=U,this._clearCache(E);const X=this._getAbsoluteTransform().copy();return X.invert(),X.translate(A.x,A.y),A={x:this.attrs.x+X.getTranslation().x,y:this.attrs.y+X.getTranslation().y},this._setTransform(Z),this.setPosition({x:A.x,y:A.y}),this._clearCache(E),this._clearSelfAndDescendantCache(d),this}_setTransform(A){let z;for(z in A)this.attrs[z]=A[z]}_clearTransform(){const A={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,A}move(A){let z=A.x,U=A.y,Z=this.x(),X=this.y();return z!==void 0&&(Z+=z),U!==void 0&&(X+=U),this.setPosition({x:Z,y:X}),this}_eachAncestorReverse(A,z){let U=[],Z=this.getParent(),X,J;if(!(z&&z._id===this._id)){for(U.unshift(this);Z&&(!z||Z._id!==z._id);)U.unshift(Z),Z=Z.parent;for(X=U.length,J=0;J<X;J++)A(U[J])}}rotate(A){return this.rotation(this.rotation()+A),this}moveToTop(){if(!this.parent)return e.Util.warn("Node has no parent. moveToTop function is ignored."),!1;const A=this.index,z=this.parent.getChildren().length;return A<z-1?(this.parent.children.splice(A,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 A=this.index,z=this.parent.getChildren().length;return A<z-1?(this.parent.children.splice(A,1),this.parent.children.splice(A+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 A=this.index;return A>0?(this.parent.children.splice(A,1),this.parent.children.splice(A-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 A=this.index;return A>0?(this.parent.children.splice(A,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(A){if(!this.parent)return e.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(A<0||A>=this.parent.children.length)&&e.Util.warn("Unexpected value "+A+" 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 z=this.index;return this.parent.children.splice(z,1),this.parent.children.splice(A,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(u,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let A=this.opacity();const z=this.getParent();return z&&!z._isUnderCache&&(A*=z.getAbsoluteOpacity()),A}moveTo(A){return this.getParent()!==A&&(this._remove(),A.add(this)),this}toObject(){let A=this.getAttrs(),z,U,Z,X,J;const B={attrs:{},className:this.getClassName()};for(z in A)U=A[z],J=e.Util.isObject(U)&&!e.Util._isPlainObject(U)&&!e.Util._isArray(U),!J&&(Z=typeof this[z]=="function"&&this[z],delete A[z],X=Z?Z.call(this):null,A[z]=U,X!==U&&(B.attrs[z]=U));return e.Util._prepareToStringify(B)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(A,z,U){const Z=[];z&&this._isMatch(A)&&Z.push(this);let X=this.parent;for(;X;){if(X===U)return Z;X._isMatch(A)&&Z.push(X),X=X.parent}return Z}isAncestorOf(A){return!1}findAncestor(A,z,U){return this.findAncestors(A,z,U)[0]}_isMatch(A){if(!A)return!1;if(typeof A=="function")return A(this);let z=A.replace(/ /g,"").split(","),U=z.length,Z,X;for(Z=0;Z<U;Z++)if(X=z[Z],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 A=this.getParent();return A?A.getLayer():null}getStage(){return this._getCache(y,this._getStage)}_getStage(){const A=this.getParent();return A?A.getStage():null}fire(A,z={},U){return z.target=z.target||this,U?this._fireAndBubble(A,z):this._fire(A,z),this}getAbsoluteTransform(A){return A?this._getAbsoluteTransform(A):this._getCache(d,this._getAbsoluteTransform)}_getAbsoluteTransform(A){let z;if(A)return z=new e.Transform,this._eachAncestorReverse(function(U){const Z=U.transformsEnabled();Z==="all"?z.multiply(U.getTransform()):Z==="position"&&z.translate(U.x()-U.offsetX(),U.y()-U.offsetY())},A),z;{z=this._cache.get(d)||new e.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(z):z.reset();const U=this.transformsEnabled();if(U==="all")z.multiply(this.getTransform());else if(U==="position"){const Z=this.attrs.x||0,X=this.attrs.y||0,J=this.attrs.offsetX||0,B=this.attrs.offsetY||0;z.translate(Z-J,X-B)}return z.dirty=!1,z}}getAbsoluteScale(A){let z=this;for(;z;)z._isUnderCache&&(A=z),z=z.getParent();const Z=this.getAbsoluteTransform(A).decompose();return{x:Z.scaleX,y:Z.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(E,this._getTransform)}_getTransform(){var A,z;const U=this._cache.get(E)||new e.Transform;U.reset();const Z=this.x(),X=this.y(),J=n.Konva.getAngle(this.rotation()),B=(A=this.attrs.scaleX)!==null&&A!==void 0?A:1,N=(z=this.attrs.scaleY)!==null&&z!==void 0?z:1,F=this.attrs.skewX||0,H=this.attrs.skewY||0,Y=this.attrs.offsetX||0,ee=this.attrs.offsetY||0;return(Z!==0||X!==0)&&U.translate(Z,X),J!==0&&U.rotate(J),(F!==0||H!==0)&&U.skew(F,H),(B!==1||N!==1)&&U.scale(B,N),(Y!==0||ee!==0)&&U.translate(-1*Y,-1*ee),U.dirty=!1,U}clone(A){let z=e.Util.cloneObject(this.attrs),U,Z,X,J,B;for(U in A)z[U]=A[U];const N=new this.constructor(z);for(U in this.eventListeners)for(Z=this.eventListeners[U],X=Z.length,J=0;J<X;J++)B=Z[J],B.name.indexOf(v)<0&&(N.eventListeners[U]||(N.eventListeners[U]=[]),N.eventListeners[U].push(B));return N}_toKonvaCanvas(A){A=A||{};const z=this.getClientRect(),U=this.getStage(),Z=A.x!==void 0?A.x:Math.floor(z.x),X=A.y!==void 0?A.y:Math.floor(z.y),J=A.pixelRatio||1,B=new t.SceneCanvas({width:A.width||Math.ceil(z.width)||(U?U.width():0),height:A.height||Math.ceil(z.height)||(U?U.height():0),pixelRatio:J}),N=B.getContext(),F=new t.SceneCanvas({width:B.width/B.pixelRatio+Math.abs(Z),height:B.height/B.pixelRatio+Math.abs(X),pixelRatio:B.pixelRatio});return A.imageSmoothingEnabled===!1&&(N._context.imageSmoothingEnabled=!1),N.save(),(Z||X)&&N.translate(-1*Z,-1*X),this.drawScene(B,void 0,F),N.restore(),B}toCanvas(A){return this._toKonvaCanvas(A)._canvas}toDataURL(A){A=A||{};const z=A.mimeType||null,U=A.quality||null,Z=this._toKonvaCanvas(A).toDataURL(z,U);return A.callback&&A.callback(Z),Z}toImage(A){return new Promise((z,U)=>{try{const Z=A==null?void 0:A.callback;Z&&delete A.callback,e.Util._urlToImage(this.toDataURL(A),function(X){z(X),Z==null||Z(X)})}catch(Z){U(Z)}})}toBlob(A){return new Promise((z,U)=>{try{const Z=A==null?void 0:A.callback;Z&&delete A.callback,this.toCanvas(A).toBlob(X=>{z(X),Z==null||Z(X)},A==null?void 0:A.mimeType,A==null?void 0:A.quality)}catch(Z){U(Z)}})}setSize(A){return this.width(A.width),this.height(A.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(A,z,U){let Z=this.eventListeners[A],X,J,B;for(X=0;X<Z.length;X++)if(J=Z[X].name,B=Z[X].handler,(J!=="konva"||z==="konva")&&(!z||J===z)&&(!U||U===B)){if(Z.splice(X,1),Z.length===0){delete this.eventListeners[A];break}X--}}_fireChangeEvent(A,z,U){this._fire(A+k,{oldVal:z,newVal:U})}addName(A){if(!this.hasName(A)){const z=this.name(),U=z?z+" "+A:A;this.name(U)}return this}hasName(A){if(!A)return!1;const z=this.name();return z?(z||"").split(/\s/g).indexOf(A)!==-1:!1}removeName(A){const z=(this.name()||"").split(/\s/g),U=z.indexOf(A);return U!==-1&&(z.splice(U,1),this.name(z.join(" "))),this}setAttr(A,z){const U=this[C+e.Util._capitalize(A)];return e.Util._isFunction(U)?U.call(this,z):this._setAttr(A,z),this}_requestDraw(){if(n.Konva.autoDrawEnabled){const A=this.getLayer()||this.getStage();A==null||A.batchDraw()}}_setAttr(A,z){const U=this.attrs[A];U===z&&!e.Util.isObject(z)||(z==null?delete this.attrs[A]:this.attrs[A]=z,this._shouldFireChangeEvents&&this._fireChangeEvent(A,U,z),this._requestDraw())}_setComponentAttr(A,z,U){let Z;U!==void 0&&(Z=this.attrs[A],Z||(this.attrs[A]=this.getAttr(A)),this.attrs[A][z]=U,this._fireChangeEvent(A,Z,U))}_fireAndBubble(A,z,U){if(z&&this.nodeType===g&&(z.target=this),!((A===p||A===h)&&(U&&(this===U||this.isAncestorOf&&this.isAncestorOf(U))||this.nodeType==="Stage"&&!U))){this._fire(A,z);const X=(A===p||A===h)&&U&&U.isAncestorOf&&U.isAncestorOf(this)&&!U.isAncestorOf(this.parent);(z&&!z.cancelBubble||!z)&&this.parent&&this.parent.isListening()&&!X&&(U&&U.parent?this._fireAndBubble.call(this.parent,A,z,U):this._fireAndBubble.call(this.parent,A,z))}}_getProtoListeners(A){var z,U,Z;const X=(z=this._cache.get(c))!==null&&z!==void 0?z:{};let J=X==null?void 0:X[A];if(J===void 0){J=[];let B=Object.getPrototypeOf(this);for(;B;){const N=(Z=(U=B.eventListeners)===null||U===void 0?void 0:U[A])!==null&&Z!==void 0?Z:[];J.push(...N),B=Object.getPrototypeOf(B)}X[A]=J,this._cache.set(c,X)}return J}_fire(A,z){z=z||{},z.currentTarget=this,z.type=A;const U=this._getProtoListeners(A);if(U)for(var Z=0;Z<U.length;Z++)U[Z].handler.call(this,z);const X=this.eventListeners[A];if(X)for(var Z=0;Z<X.length;Z++)X[Z].handler.call(this,z)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(A){const z=A?A.pointerId:void 0,U=this.getStage(),Z=this.getAbsolutePosition();if(!U)return;const X=U._getPointerById(z)||U._changedPointerPositions[0]||Z;a.DD._dragElements.set(this._id,{node:this,startPointerPos:X,offset:{x:X.x-Z.x,y:X.y-Z.y},dragStatus:"ready",pointerId:z})}startDrag(A,z=!0){a.DD._dragElements.has(this._id)||this._createDragElement(A);const U=a.DD._dragElements.get(this._id);U.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:A&&A.evt},z)}_setDragPosition(A,z){const U=this.getStage()._getPointerById(z.pointerId);if(!U)return;let Z={x:U.x-z.offset.x,y:U.y-z.offset.y};const X=this.dragBoundFunc();if(X!==void 0){const J=X.call(this,Z,A);J?Z=J: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!==Z.x||this._lastPos.y!==Z.y)&&(this.setAbsolutePosition(Z),this._requestDraw()),this._lastPos=Z}stopDrag(A){const z=a.DD._dragElements.get(this._id);z&&(z.dragStatus="stopped"),a.DD._endDragBefore(A),a.DD._endDragAfter(A)}setDraggable(A){this._setAttr("draggable",A),this._dragChange()}isDragging(){const A=a.DD._dragElements.get(this._id);return A?A.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(A){if(!(!(A.evt.button!==void 0)||n.Konva.dragButtons.indexOf(A.evt.button)>=0)||this.isDragging())return;let Z=!1;a.DD._dragElements.forEach(X=>{this.isAncestorOf(X.node)&&(Z=!0)}),Z||this._createDragElement(A)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const z=a.DD._dragElements.get(this._id),U=z&&z.dragStatus==="dragging",Z=z&&z.dragStatus==="ready";U?this.stopDrag():Z&&a.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(A={x:0,y:0}){const z=this.getStage();if(!z)return!1;const U={x:-A.x,y:-A.y,width:z.width()+2*A.x,height:z.height()+2*A.y};return e.Util.haveIntersection(U,this.getClientRect())}static create(A,z){return e.Util._isString(A)&&(A=JSON.parse(A)),this._createNode(A,z)}static _createNode(A,z){let U=S.prototype.getClassName.call(A),Z=A.children,X,J,B;z&&(A.attrs.container=z),n.Konva[U]||(e.Util.warn('Can not find a node with class name "'+U+'". Fallback to "Shape".'),U="Shape");const N=n.Konva[U];if(X=new N(A.attrs),Z)for(J=Z.length,B=0;B<J;B++)X.add(S._createNode(Z[B]));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(E),this._clearSelfAndDescendantCache(d)}),S.prototype.on.call(S.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(R)}),S.prototype.on.call(S.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(w)}),S.prototype.on.call(S.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(u)});const T=i.Factory.addGetterSetter;return T(S,"zIndex"),T(S,"absolutePosition"),T(S,"position"),T(S,"x",0,(0,l.getNumberValidator)()),T(S,"y",0,(0,l.getNumberValidator)()),T(S,"globalCompositeOperation","source-over",(0,l.getStringValidator)()),T(S,"opacity",1,(0,l.getNumberValidator)()),T(S,"name","",(0,l.getStringValidator)()),T(S,"id","",(0,l.getStringValidator)()),T(S,"rotation",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(S,"scale",["x","y"]),T(S,"scaleX",1,(0,l.getNumberValidator)()),T(S,"scaleY",1,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(S,"skew",["x","y"]),T(S,"skewX",0,(0,l.getNumberValidator)()),T(S,"skewY",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(S,"offset",["x","y"]),T(S,"offsetX",0,(0,l.getNumberValidator)()),T(S,"offsetY",0,(0,l.getNumberValidator)()),T(S,"dragDistance",void 0,(0,l.getNumberValidator)()),T(S,"width",0,(0,l.getNumberValidator)()),T(S,"height",0,(0,l.getNumberValidator)()),T(S,"listening",!0,(0,l.getBooleanValidator)()),T(S,"preventDefault",!0,(0,l.getBooleanValidator)()),T(S,"filters",void 0,function(M){return this._filterUpToDate=!1,M}),T(S,"visible",!0,(0,l.getBooleanValidator)()),T(S,"transformsEnabled","all",(0,l.getStringValidator)()),T(S,"size"),T(S,"dragBoundFunc"),T(S,"draggable",!1,(0,l.getBooleanValidator)()),i.Factory.backCompat(S,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"}),mf}var yf={},Ym;function Np(){if(Ym)return yf;Ym=1,Object.defineProperty(yf,"__esModule",{value:!0}),yf.Container=void 0;const e=jt(),i=Hn(),t=zt();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(d){l(d)&&c.push(d)}),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(d=>{const m=d._isMatch(l);return m&&c.push(d),!!(m&&u)}),c}_descendants(l){let u=!1;const c=this.getChildren();for(const d of c){if(u=l(d),u)return!0;if(d.hasChildren()&&(u=d._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 d=this.getLayer(),m=l||d&&d.getCanvas(),_=m&&m.getContext(),k=this._getCanvasCache(),x=k&&k.scene,v=m&&m.isCache;if(!this.isVisible()&&!v)return this;if(x){_.save();const w=this.getAbsoluteTransform(u).getMatrix();_.transform(w[0],w[1],w[2],w[3],w[4],w[5]),this._drawCachedSceneCanvas(_),_.restore()}else this._drawChildren("drawScene",m,u,c);return this}drawHit(l,u){if(!this.shouldDrawHit(u))return this;const c=this.getLayer(),d=l||c&&c.hitCanvas,m=d&&d.getContext(),_=this._getCanvasCache();if(_&&_.hit){m.save();const x=this.getAbsoluteTransform(u).getMatrix();m.transform(x[0],x[1],x[2],x[3],x[4],x[5]),this._drawCachedHitCanvas(m),m.restore()}else this._drawChildren("drawHit",d,u);return this}_drawChildren(l,u,c,d){var m;const _=u&&u.getContext(),k=this.clipWidth(),x=this.clipHeight(),v=this.clipFunc(),w=typeof k=="number"&&typeof x=="number"||v,p=c===this;if(w){_.save();const C=this.getAbsoluteTransform(c);let g=C.getMatrix();_.transform(g[0],g[1],g[2],g[3],g[4],g[5]),_.beginPath();let b;if(v)b=v.call(this,_,this);else{const y=this.clipX(),E=this.clipY();_.rect(y||0,E||0,k,x)}_.clip.apply(_,b),g=C.copy().invert().getMatrix(),_.transform(g[0],g[1],g[2],g[3],g[4],g[5])}const h=!p&&this.globalCompositeOperation()!=="source-over"&&l==="drawScene";h&&(_.save(),_._applyGlobalCompositeOperation(this)),(m=this.children)===null||m===void 0||m.forEach(function(C){C[l](u,c,d)}),h&&_.restore(),w&&_.restore()}getClientRect(l={}){var u;const c=l.skipTransform,d=l.relativeTo;let m,_,k,x,v={x:1/0,y:1/0,width:0,height:0};const w=this;(u=this.children)===null||u===void 0||u.forEach(function(C){if(!C.visible())return;const g=C.getClientRect({relativeTo:w,skipShadow:l.skipShadow,skipStroke:l.skipStroke});g.width===0&&g.height===0||(m===void 0?(m=g.x,_=g.y,k=g.x+g.width,x=g.y+g.height):(m=Math.min(m,g.x),_=Math.min(_,g.y),k=Math.max(k,g.x+g.width),x=Math.max(x,g.y+g.height)))});const p=this.find("Shape");let h=!1;for(let C=0;C<p.length;C++)if(p[C]._isVisible(this)){h=!0;break}return h&&m!==void 0?v={x:m,y:_,width:k-m,height:x-_}:v={x:0,y:0,width:0,height:0},c?v:this._transformedRect(v,d)}};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 B0={},ql={},Km;function j5(){if(Km)return ql;Km=1,Object.defineProperty(ql,"__esModule",{value:!0}),ql.getCapturedShape=n,ql.createEvent=a,ql.hasPointerCapture=l,ql.setPointerCapture=u,ql.releaseCapture=c;const e=Lt(),i=new Map,t=e.Konva._global.PointerEvent!==void 0;function n(d){return i.get(d)}function a(d){return{evt:d,pointerId:d.pointerId}}function l(d,m){return i.get(d)===m}function u(d,m){c(d),m.getStage()&&(i.set(d,m),t&&m._fire("gotpointercapture",a(new PointerEvent("gotpointercapture"))))}function c(d,m){const _=i.get(d);if(!_)return;const k=_.getStage();k&&k.content,i.delete(d),t&&_._fire("lostpointercapture",a(new PointerEvent("lostpointercapture")))}return ql}var Xm;function x8(){return Xm||(Xm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const i=Nn(),t=jt(),n=Np(),a=Lt(),l=Lp(),u=dv(),c=Lt(),d=j5(),m="Stage",_="string",k="px",x="mouseout",v="mouseleave",w="mouseover",p="mouseenter",h="mousemove",C="mousedown",g="mouseup",b="pointermove",y="pointerdown",E="pointerup",L="pointercancel",R="lostpointercapture",D="pointerout",O="pointerleave",S="pointerover",T="pointerenter",M="contextmenu",A="touchstart",z="touchend",U="touchmove",Z="touchcancel",X="wheel",J=5,B=[[p,"_pointerenter"],[C,"_pointerdown"],[h,"_pointermove"],[g,"_pointerup"],[v,"_pointerleave"],[A,"_pointerdown"],[U,"_pointermove"],[z,"_pointerup"],[Z,"_pointercancel"],[w,"_pointerover"],[X,"_wheel"],[M,"_contextmenu"],[y,"_pointerdown"],[b,"_pointermove"],[E,"_pointerup"],[L,"_pointercancel"],[R,"_lostpointercapture"]],N={mouse:{[D]:x,[O]:v,[S]:w,[T]:p,[b]:h,[y]:C,[E]:g,[L]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[D]:"touchout",[O]:"touchleave",[S]:"touchover",[T]:"touchenter",[b]:U,[y]:A,[E]:z,[L]:Z,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[D]:D,[O]:O,[S]:S,[T]:T,[b]:b,[y]:y,[E]:E,[L]:L,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},F=K=>K.indexOf("pointer")>=0?"pointer":K.indexOf("touch")>=0?"touch":"mouse",H=K=>{const $=F(K);if($==="pointer")return a.Konva.pointerEventsEnabled&&N.pointer;if($==="touch")return N.touch;if($==="mouse")return N.mouse};function Y(K={}){return(K.clipFunc||K.clipWidth||K.clipHeight)&&i.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),K}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($){super(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",()=>{Y(this.attrs)}),this._checkVisibility()}_validateAdd($){const ne=$.getType()==="Layer",re=$.getType()==="FastLayer";ne||re||i.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const $=this.visible()?"":"none";this.content.style.display=$}setContainer($){if(typeof $===_){if($.charAt(0)==="."){const re=$.slice(1);$=document.getElementsByClassName(re)[0]}else{var ne;$.charAt(0)!=="#"?ne=$:ne=$.slice(1),$=document.getElementById(ne)}if(!$)throw"Can not find container in document with id "+ne}return this._setAttr("container",$),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),$.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const $=this.children,ne=$.length;for(let re=0;re<ne;re++)$[re].clear();return this}clone($){return $||($={}),$.container=typeof document<"u"&&document.createElement("div"),n.Container.prototype.clone.call(this,$)}destroy(){super.destroy();const $=this.content;$&&i.Util._isInDocument($)&&this.container().removeChild($);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 $=this._pointerPositions[0]||this._changedPointerPositions[0];return $?{x:$.x,y:$.y}:(i.Util.warn(ee),null)}_getPointerById($){return this._pointerPositions.find(ne=>ne.id===$)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas($){$=$||{},$.x=$.x||0,$.y=$.y||0,$.width=$.width||this.width(),$.height=$.height||this.height();const ne=new l.SceneCanvas({width:$.width,height:$.height,pixelRatio:$.pixelRatio||1}),re=ne.getContext()._context,ie=this.children;return($.x||$.y)&&re.translate(-1*$.x,-1*$.y),ie.forEach(function(ae){if(!ae.isVisible())return;const ue=ae._toKonvaCanvas($);re.drawImage(ue._canvas,$.x,$.y,ue.getWidth()/ue.getPixelRatio(),ue.getHeight()/ue.getPixelRatio())}),ne}getIntersection($){if(!$)return null;const ne=this.children,re=ne.length,ie=re-1;for(let ae=ie;ae>=0;ae--){const ue=ne[ae].getIntersection($);if(ue)return ue}return null}_resizeDOM(){const $=this.width(),ne=this.height();this.content&&(this.content.style.width=$+k,this.content.style.height=ne+k),this.bufferCanvas.setSize($,ne),this.bufferHitCanvas.setSize($,ne),this.children.forEach(re=>{re.setSize({width:$,height:ne}),re.draw()})}add($,...ne){if(arguments.length>1){for(let ie=0;ie<arguments.length;ie++)this.add(arguments[ie]);return this}super.add($);const re=this.children.length;return re>J&&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."),$.setSize({width:this.width(),height:this.height()}),$.draw(),a.Konva.isBrowser&&this.content.appendChild($.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture($){return d.hasPointerCapture($,this)}setPointerCapture($){d.setPointerCapture($,this)}releaseCapture($){d.releaseCapture($,this)}getLayers(){return this.children}_bindContentEvents(){a.Konva.isBrowser&&B.forEach(([$,ne])=>{this.content.addEventListener($,re=>{this[ne](re)},{passive:!1})})}_pointerenter($){this.setPointersPositions($);const ne=H($.type);ne&&this._fire(ne.pointerenter,{evt:$,target:this,currentTarget:this})}_pointerover($){this.setPointersPositions($);const ne=H($.type);ne&&this._fire(ne.pointerover,{evt:$,target:this,currentTarget:this})}_getTargetShape($){let ne=this[$+"targetShape"];return ne&&!ne.getStage()&&(ne=null),ne}_pointerleave($){const ne=H($.type),re=F($.type);if(!ne)return;this.setPointersPositions($);const ie=this._getTargetShape(re),ae=!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled;ie&&ae?(ie._fireAndBubble(ne.pointerout,{evt:$}),ie._fireAndBubble(ne.pointerleave,{evt:$}),this._fire(ne.pointerleave,{evt:$,target:this,currentTarget:this}),this[re+"targetShape"]=null):ae&&(this._fire(ne.pointerleave,{evt:$,target:this,currentTarget:this}),this._fire(ne.pointerout,{evt:$,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown($){const ne=H($.type),re=F($.type);if(!ne)return;this.setPointersPositions($);let ie=!1;this._changedPointerPositions.forEach(ae=>{const ue=this.getIntersection(ae);if(u.DD.justDragged=!1,a.Konva["_"+re+"ListenClick"]=!0,!ue||!ue.isListening()){this[re+"ClickStartShape"]=void 0;return}a.Konva.capturePointerEventsEnabled&&ue.setPointerCapture(ae.id),this[re+"ClickStartShape"]=ue,ue._fireAndBubble(ne.pointerdown,{evt:$,pointerId:ae.id}),ie=!0;const de=$.type.indexOf("touch")>=0;ue.preventDefault()&&$.cancelable&&de&&$.preventDefault()}),ie||this._fire(ne.pointerdown,{evt:$,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove($){const ne=H($.type),re=F($.type);if(!ne||(a.Konva.isDragging()&&u.DD.node.preventDefault()&&$.cancelable&&$.preventDefault(),this.setPointersPositions($),!(!(a.Konva.isDragging()||a.Konva.isTransforming())||a.Konva.hitOnDragEnabled)))return;const ae={};let ue=!1;const de=this._getTargetShape(re);this._changedPointerPositions.forEach(he=>{const Se=d.getCapturedShape(he.id)||this.getIntersection(he),me=he.id,ke={evt:$,pointerId:me},fe=de!==Se;if(fe&&de&&(de._fireAndBubble(ne.pointerout,{...ke},Se),de._fireAndBubble(ne.pointerleave,{...ke},Se)),Se){if(ae[Se._id])return;ae[Se._id]=!0}Se&&Se.isListening()?(ue=!0,fe&&(Se._fireAndBubble(ne.pointerover,{...ke},de),Se._fireAndBubble(ne.pointerenter,{...ke},de),this[re+"targetShape"]=Se),Se._fireAndBubble(ne.pointermove,{...ke})):de&&(this._fire(ne.pointerover,{evt:$,target:this,currentTarget:this,pointerId:me}),this[re+"targetShape"]=null)}),ue||this._fire(ne.pointermove,{evt:$,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup($){const ne=H($.type),re=F($.type);if(!ne)return;this.setPointersPositions($);const ie=this[re+"ClickStartShape"],ae=this[re+"ClickEndShape"],ue={};let de=!1;this._changedPointerPositions.forEach(he=>{const Se=d.getCapturedShape(he.id)||this.getIntersection(he);if(Se){if(Se.releaseCapture(he.id),ue[Se._id])return;ue[Se._id]=!0}const me=he.id,ke={evt:$,pointerId:me};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,{...ke}),a.Konva["_"+re+"ListenClick"]&&ie&&ie===Se&&(Se._fireAndBubble(ne.pointerclick,{...ke}),fe&&ae&&ae===Se&&Se._fireAndBubble(ne.pointerdblclick,{...ke}))):(this[re+"ClickEndShape"]=null,a.Konva["_"+re+"ListenClick"]&&this._fire(ne.pointerclick,{evt:$,target:this,currentTarget:this,pointerId:me}),fe&&this._fire(ne.pointerdblclick,{evt:$,target:this,currentTarget:this,pointerId:me}))}),de||this._fire(ne.pointerup,{evt:$,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),a.Konva["_"+re+"ListenClick"]=!1,$.cancelable&&re!=="touch"&&re!=="pointer"&&$.preventDefault()}_contextmenu($){this.setPointersPositions($);const ne=this.getIntersection(this.getPointerPosition());ne&&ne.isListening()?ne._fireAndBubble(M,{evt:$}):this._fire(M,{evt:$,target:this,currentTarget:this})}_wheel($){this.setPointersPositions($);const ne=this.getIntersection(this.getPointerPosition());ne&&ne.isListening()?ne._fireAndBubble(X,{evt:$}):this._fire(X,{evt:$,target:this,currentTarget:this})}_pointercancel($){this.setPointersPositions($);const ne=d.getCapturedShape($.pointerId)||this.getIntersection(this.getPointerPosition());ne&&ne._fireAndBubble(E,d.createEvent($)),d.releaseCapture($.pointerId)}_lostpointercapture($){d.releaseCapture($.pointerId)}setPointersPositions($){const ne=this._getContentPosition();let re=null,ie=null;$=$||window.event,$.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call($.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($.changedTouches||$.touches,ae=>{this._changedPointerPositions.push({id:ae.identifier,x:(ae.clientX-ne.left)/ne.scaleX,y:(ae.clientY-ne.top)/ne.scaleY})})):(re=($.clientX-ne.left)/ne.scaleX,ie=($.clientY-ne.top)/ne.scaleY,this.pointerPos={x:re,y:ie},this._pointerPositions=[{x:re,y:ie,id:i.Util._getFirstPointerId($)}],this._changedPointerPositions=[{x:re,y:ie,id:i.Util._getFirstPointerId($)}])}_setPointerPosition($){i.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions($)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const $=this.content.getBoundingClientRect();return{top:$.top,left:$.left,scaleX:$.width/this.content.clientWidth||1,scaleY:$.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 $=this.container();if(!$)throw"Stage has no container. A container is required.";$.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"),$.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($){$.batchDraw()}),this}}e.Stage=V,V.prototype.nodeType=m,(0,c._registerNode)(V),t.Factory.addGetterSetter(V,"container"),a.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(K=>{K.batchDraw()})})}(B0)),B0}var bf={},U0={},Zm;function wr(){return Zm||(Zm=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const i=Lt(),t=Nn(),n=jt(),a=Hn(),l=zt(),u=Lt(),c=j5(),d="hasShadow",m="shadowRGBA",_="patternImage",k="linearGradient",x="radialGradient";let v;function w(){return v||(v=t.Util.createCanvasElement().getContext("2d"),v)}e.shapes={};function p(O){const S=this.attrs.fillRule;S?O.fill(S):O.fill()}function h(O){O.stroke()}function C(O){const S=this.attrs.fillRule;S?O.fill(S):O.fill()}function g(O){O.stroke()}function b(){this._clearCache(d)}function y(){this._clearCache(m)}function E(){this._clearCache(_)}function L(){this._clearCache(k)}function R(){this._clearCache(x)}class D extends a.Node{constructor(S){super(S);let T;for(;T=t.Util.getRandomColor(),!(T&&!(T in e.shapes)););this.colorKey=T,e.shapes[T]=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(d,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 T=w().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(T&&T.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 A=M.getMatrix(),z=typeof DOMMatrix>"u"?{a:A[0],b:A[1],c:A[2],d:A[3],e:A[4],f:A[5]}:new DOMMatrix(A);T.setTransform(z)}return T}}_getLinearGradient(){return this._getCache(k,this.__getLinearGradient)}__getLinearGradient(){const S=this.fillLinearGradientColorStops();if(S){const T=w(),M=this.fillLinearGradientStartPoint(),A=this.fillLinearGradientEndPoint(),z=T.createLinearGradient(M.x,M.y,A.x,A.y);for(let U=0;U<S.length;U+=2)z.addColorStop(S[U],S[U+1]);return z}}_getRadialGradient(){return this._getCache(x,this.__getRadialGradient)}__getRadialGradient(){const S=this.fillRadialGradientColorStops();if(S){const T=w(),M=this.fillRadialGradientStartPoint(),A=this.fillRadialGradientEndPoint(),z=T.createRadialGradient(M.x,M.y,this.fillRadialGradientStartRadius(),A.x,A.y,this.fillRadialGradientEndRadius());for(let U=0;U<S.length;U+=2)z.addColorStop(S[U],S[U+1]);return z}}getShadowRGBA(){return this._getCache(m,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 T=this.getStage();if(!T)return!1;const M=T.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 T;if(!((T=this.attrs.perfectDrawEnabled)!==null&&T!==void 0?T:!0))return!1;const A=S||this.hasFill(),z=this.hasStroke(),U=this.getAbsoluteOpacity()!==1;if(A&&z&&U)return!0;const Z=this.hasShadow(),X=this.shadowForStrokeEnabled();return!!(A&&z&&Z&&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 T=!1,M=this.getParent();for(;M;){if(M.isCached()){T=!0;break}M=M.getParent()}const A=S.skipTransform,z=S.relativeTo||T&&this.getStage()||void 0,U=this.getSelfRect(),X=!S.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,J=U.width+X,B=U.height+X,N=!S.skipShadow&&this.hasShadow(),F=N?this.shadowOffsetX():0,H=N?this.shadowOffsetY():0,Y=J+Math.abs(F),ee=B+Math.abs(H),V=N&&this.shadowBlur()||0,K=Y+V*2,$=ee+V*2,ne={width:K,height:$,x:-(X/2+V)+Math.min(F,0)+U.x,y:-(X/2+V)+Math.min(H,0)+U.y};return A?ne:this._transformedRect(ne,z)}drawScene(S,T,M){const A=this.getLayer();let z=S||A.getCanvas(),U=z.getContext(),Z=this._getCanvasCache(),X=this.getSceneFunc(),J=this.hasShadow(),B,N;const F=z.isCache,H=T===this;if(!this.isVisible()&&!H)return this;if(Z){U.save();const ee=this.getAbsoluteTransform(T).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()&&!F){B=this.getStage();const ee=M||B.bufferCanvas;N=ee.getContext(),N.clear(),N.save(),N._applyLineJoin(this);var Y=this.getAbsoluteTransform(T).getMatrix();N.transform(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]),X.call(this,N,this),N.restore();const V=ee.pixelRatio;J&&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 Y=this.getAbsoluteTransform(T).getMatrix();U.transform(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]),U._applyOpacity(this),U._applyGlobalCompositeOperation(this)}J&&U._applyShadow(this),X.call(this,U,this)}return U.restore(),this}drawHit(S,T,M=!1){if(!this.shouldDrawHit(T,M))return this;const A=this.getLayer(),z=S||A.hitCanvas,U=z&&z.getContext(),Z=this.hitFunc()||this.sceneFunc(),X=this._getCanvasCache(),J=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()"),J){U.save();const N=this.getAbsoluteTransform(T).getMatrix();return U.transform(N[0],N[1],N[2],N[3],N[4],N[5]),this._drawCachedHitCanvas(U),U.restore(),this}if(!Z)return this;if(U.save(),U._applyLineJoin(this),!(this===T)){const N=this.getAbsoluteTransform(T).getMatrix();U.transform(N[0],N[1],N[2],N[3],N[4],N[5])}return Z.call(this,U,this),U.restore(),this}drawHitFromCache(S=0){const T=this._getCanvasCache(),M=this._getCachedSceneCanvas(),A=T.hit,z=A.getContext(),U=A.getWidth(),Z=A.getHeight();z.clear(),z.drawImage(M._canvas,0,0,U,Z);try{const X=z.getImageData(0,0,U,Z),J=X.data,B=J.length,N=t.Util._hexToRgb(this.colorKey);for(let F=0;F<B;F+=4)J[F+3]>S?(J[F]=N.r,J[F+1]=N.g,J[F+2]=N.b,J[F+3]=255):J[F+3]=0;z.putImageData(X,0,0)}catch(X){t.Util.error("Unable to draw hit graph from cached scene canvas. "+X.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=p,D.prototype._strokeFunc=h,D.prototype._fillFuncHit=C,D.prototype._strokeFuncHit=g,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",b),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",E),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"})}(U0)),U0}var Qm;function F5(){if(Qm)return bf;Qm=1,Object.defineProperty(bf,"__esModule",{value:!0}),bf.Layer=void 0;const e=Nn(),i=Np(),t=Hn(),n=jt(),a=Lp(),l=zt(),u=wr(),c=Lt(),d="#",m="beforeDraw",_="draw",k=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],x=k.length;class v extends i.Container{constructor(p){super(p),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(p){return this.getContext().clear(p),this.getHitCanvas().getContext().clear(p),this}setZIndex(p){super.setZIndex(p);const h=this.getStage();return h&&h.content&&(h.content.removeChild(this.getNativeCanvasElement()),p<h.children.length-1?h.content.insertBefore(this.getNativeCanvasElement(),h.children[p+1].getCanvas()._canvas):h.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){t.Node.prototype.moveToTop.call(this);const p=this.getStage();return p&&p.content&&(p.content.removeChild(this.getNativeCanvasElement()),p.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!t.Node.prototype.moveUp.call(this))return!1;const h=this.getStage();return!h||!h.content?!1:(h.content.removeChild(this.getNativeCanvasElement()),this.index<h.children.length-1?h.content.insertBefore(this.getNativeCanvasElement(),h.children[this.index+1].getCanvas()._canvas):h.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(t.Node.prototype.moveDown.call(this)){const p=this.getStage();if(p){const h=p.children;p.content&&(p.content.removeChild(this.getNativeCanvasElement()),p.content.insertBefore(this.getNativeCanvasElement(),h[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(t.Node.prototype.moveToBottom.call(this)){const p=this.getStage();if(p){const h=p.children;p.content&&(p.content.removeChild(this.getNativeCanvasElement()),p.content.insertBefore(this.getNativeCanvasElement(),h[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const p=this.getNativeCanvasElement();return t.Node.prototype.remove.call(this),p&&p.parentNode&&e.Util._isInDocument(p)&&p.parentNode.removeChild(p),this}getStage(){return this.parent}setSize({width:p,height:h}){return this.canvas.setSize(p,h),this.hitCanvas.setSize(p,h),this._setSmoothEnabled(),this}_validateAdd(p){const h=p.getType();h!=="Group"&&h!=="Shape"&&e.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(p){return p=p||{},p.width=p.width||this.getWidth(),p.height=p.height||this.getHeight(),p.x=p.x!==void 0?p.x:this.x(),p.y=p.y!==void 0?p.y:this.y(),t.Node.prototype._toKonvaCanvas.call(this,p)}_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(p){if(!this.isListening()||!this.isVisible())return null;let h=1,C=!1;for(;;){for(let g=0;g<x;g++){const b=k[g],y=this._getIntersection({x:p.x+b.x*h,y:p.y+b.y*h}),E=y.shape;if(E)return E;if(C=!!y.antialiased,!y.antialiased)break}if(C)h+=1;else return null}}_getIntersection(p){const h=this.hitCanvas.pixelRatio,C=this.hitCanvas.context.getImageData(Math.round(p.x*h),Math.round(p.y*h),1,1).data,g=C[3];if(g===255){const b=e.Util._rgbToHex(C[0],C[1],C[2]),y=u.shapes[d+b];return y?{shape:y}:{antialiased:!0}}else if(g>0)return{antialiased:!0};return{}}drawScene(p,h){const C=this.getLayer(),g=p||C&&C.getCanvas();return this._fire(m,{node:this}),this.clearBeforeDraw()&&g.getContext().clear(),i.Container.prototype.drawScene.call(this,g,h),this._fire(_,{node:this}),this}drawHit(p,h){const C=this.getLayer(),g=p||C&&C.hitCanvas;return C&&C.clearBeforeDraw()&&C.getHitCanvas().getContext().clear(),i.Container.prototype.drawHit.call(this,g,h),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(p){e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(p)}getHitGraphEnabled(p){return e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const p=this.parent;!!this.hitCanvas._canvas.parentNode?p.content.removeChild(this.hitCanvas._canvas):p.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={},Jm;function P8(){if(Jm)return _f;Jm=1,Object.defineProperty(_f,"__esModule",{value:!0}),_f.FastLayer=void 0;const e=Nn(),i=F5(),t=Lt();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={},ey;function hv(){if(ey)return wf;ey=1,Object.defineProperty(wf,"__esModule",{value:!0}),wf.Group=void 0;const e=Nn(),i=Np(),t=Lt();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={},ty;function pv(){if(ty)return Sf;ty=1,Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.Animation=void 0;const e=Lt(),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 d=0;d<c;d++)if(u[d]._id===l._id)return!1;return this.layers.push(l),!0}isRunning(){const u=Ju.animations,c=u.length;for(let d=0;d<c;d++)if(u[d].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,d=c.length;for(let m=0;m<d;m++)if(c[m].id===u){this.animations.splice(m,1);break}}static _runFrames(){const l={},u=this.animations;for(let c=0;c<u.length;c++){const d=u[c],m=d.layers,_=d.func;d._updateFrameObject(t());const k=m.length;let x;if(_?x=_.call(d,d.frame)!==!1:x=!0,!!x)for(let v=0;v<k;v++){const w=m[v];w._id!==void 0&&(l[w._id]=w)}}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 q0={},ny;function C8(){return ny||(ny=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const i=Nn(),t=pv(),n=Hn(),a=Lt(),l={node:1,duration:1,easing:1,onFinish:1,yoyo:1},u=1,c=2,d=3,m=["fill","stroke","shadowColor"];let _=0;class k{constructor(w,p,h,C,g,b,y){this.prop=w,this.propFunc=p,this.begin=C,this._pos=C,this.duration=b,this._change=0,this.prevPos=0,this.yoyo=y,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=h,this._change=g-this.begin,this.pause()}fire(w){const p=this[w];p&&p()}setTime(w){w>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():w<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=w,this.update())}getTime(){return this._time}setPosition(w){this.prevPos=this._pos,this.propFunc(w),this._pos=w}getPosition(w){return w===void 0&&(w=this._time),this.func(w,this.begin,this._change,this.duration)}play(){this.state=c,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=d,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(w){this.pause(),this._time=w,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 w=this.getTimer()-this._startTime;this.state===c?this.setTime(w):this.state===d&&this.setTime(this.duration-w)}pause(){this.state=u,this.fire("onPause")}getTimer(){return new Date().getTime()}}class x{constructor(w){const p=this,h=w.node,C=h._id,g=w.easing||e.Easings.Linear,b=!!w.yoyo;let y,E;typeof w.duration>"u"?y=.3:w.duration===0?y=.001:y=w.duration,this.node=h,this._id=_++;const L=h.getLayer()||(h instanceof a.Konva.Stage?h.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(){p.tween.onEnterFrame()},L),this.tween=new k(E,function(R){p._tweenFunc(R)},g,0,1,y*1e3,b),this._addListeners(),x.attrs[C]||(x.attrs[C]={}),x.attrs[C][this._id]||(x.attrs[C][this._id]={}),x.tweens[C]||(x.tweens[C]={});for(E in w)l[E]===void 0&&this._addAttr(E,w[E]);this.reset(),this.onFinish=w.onFinish,this.onReset=w.onReset,this.onUpdate=w.onUpdate}_addAttr(w,p){const h=this.node,C=h._id;let g,b,y,E,L;const R=x.tweens[C][w];R&&delete x.attrs[C][R][w];let D=h.getAttr(w);if(i.Util._isArray(p))if(g=[],b=Math.max(p.length,D.length),w==="points"&&p.length!==D.length&&(p.length>D.length?(E=D,D=i.Util._prepareArrayForTween(D,p,h.closed())):(y=p,p=i.Util._prepareArrayForTween(p,D,h.closed()))),w.indexOf("fill")===0)for(let O=0;O<b;O++)if(O%2===0)g.push(p[O]-D[O]);else{const S=i.Util.colorToRGBA(D[O]);L=i.Util.colorToRGBA(p[O]),D[O]=S,g.push({r:L.r-S.r,g:L.g-S.g,b:L.b-S.b,a:L.a-S.a})}else for(let O=0;O<b;O++)g.push(p[O]-D[O]);else m.indexOf(w)!==-1?(D=i.Util.colorToRGBA(D),L=i.Util.colorToRGBA(p),g={r:L.r-D.r,g:L.g-D.g,b:L.b-D.b,a:L.a-D.a}):g=p-D;x.attrs[C][this._id][w]={start:D,diff:g,end:p,trueEnd:y,trueStart:E},x.tweens[C][w]=this._id}_tweenFunc(w){const p=this.node,h=x.attrs[p._id][this._id];let C,g,b,y,E,L,R,D;for(C in h){if(g=h[C],b=g.start,y=g.diff,D=g.end,i.Util._isArray(b))if(E=[],R=Math.max(b.length,D.length),C.indexOf("fill")===0)for(L=0;L<R;L++)L%2===0?E.push((b[L]||0)+y[L]*w):E.push("rgba("+Math.round(b[L].r+y[L].r*w)+","+Math.round(b[L].g+y[L].g*w)+","+Math.round(b[L].b+y[L].b*w)+","+(b[L].a+y[L].a*w)+")");else for(L=0;L<R;L++)E.push((b[L]||0)+y[L]*w);else m.indexOf(C)!==-1?E="rgba("+Math.round(b.r+y.r*w)+","+Math.round(b.g+y.g*w)+","+Math.round(b.b+y.b*w)+","+(b.a+y.a*w)+")":E=b+y*w;p.setAttr(C,E)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const w=this.node,p=x.attrs[w._id][this._id];p.points&&p.points.trueEnd&&w.setAttr("points",p.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const w=this.node,p=x.attrs[w._id][this._id];p.points&&p.points.trueStart&&w.points(p.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(w){return this.tween.seek(w*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const w=this.node._id,p=this._id,h=x.tweens[w];this.pause();for(const C in h)delete x.tweens[w][C];delete x.attrs[w][p]}}e.Tween=x,x.attrs={},x.tweens={},n.Node.prototype.to=function(v){const w=v.onFinish;v.node=this,v.onFinish=function(){this.destroy(),w&&w()},new x(v).play()},e.Easings={BackEaseIn(v,w,p,h){return p*(v/=h)*v*((1.70158+1)*v-1.70158)+w},BackEaseOut(v,w,p,h){return p*((v=v/h-1)*v*((1.70158+1)*v+1.70158)+1)+w},BackEaseInOut(v,w,p,h){let C=1.70158;return(v/=h/2)<1?p/2*(v*v*(((C*=1.525)+1)*v-C))+w:p/2*((v-=2)*v*(((C*=1.525)+1)*v+C)+2)+w},ElasticEaseIn(v,w,p,h,C,g){let b=0;return v===0?w:(v/=h)===1?w+p:(g||(g=h*.3),!C||C<Math.abs(p)?(C=p,b=g/4):b=g/(2*Math.PI)*Math.asin(p/C),-(C*Math.pow(2,10*(v-=1))*Math.sin((v*h-b)*(2*Math.PI)/g))+w)},ElasticEaseOut(v,w,p,h,C,g){let b=0;return v===0?w:(v/=h)===1?w+p:(g||(g=h*.3),!C||C<Math.abs(p)?(C=p,b=g/4):b=g/(2*Math.PI)*Math.asin(p/C),C*Math.pow(2,-10*v)*Math.sin((v*h-b)*(2*Math.PI)/g)+p+w)},ElasticEaseInOut(v,w,p,h,C,g){let b=0;return v===0?w:(v/=h/2)===2?w+p:(g||(g=h*(.3*1.5)),!C||C<Math.abs(p)?(C=p,b=g/4):b=g/(2*Math.PI)*Math.asin(p/C),v<1?-.5*(C*Math.pow(2,10*(v-=1))*Math.sin((v*h-b)*(2*Math.PI)/g))+w:C*Math.pow(2,-10*(v-=1))*Math.sin((v*h-b)*(2*Math.PI)/g)*.5+p+w)},BounceEaseOut(v,w,p,h){return(v/=h)<1/2.75?p*(7.5625*v*v)+w:v<2/2.75?p*(7.5625*(v-=1.5/2.75)*v+.75)+w:v<2.5/2.75?p*(7.5625*(v-=2.25/2.75)*v+.9375)+w:p*(7.5625*(v-=2.625/2.75)*v+.984375)+w},BounceEaseIn(v,w,p,h){return p-e.Easings.BounceEaseOut(h-v,0,p,h)+w},BounceEaseInOut(v,w,p,h){return v<h/2?e.Easings.BounceEaseIn(v*2,0,p,h)*.5+w:e.Easings.BounceEaseOut(v*2-h,0,p,h)*.5+p*.5+w},EaseIn(v,w,p,h){return p*(v/=h)*v+w},EaseOut(v,w,p,h){return-p*(v/=h)*(v-2)+w},EaseInOut(v,w,p,h){return(v/=h/2)<1?p/2*v*v+w:-p/2*(--v*(v-2)-1)+w},StrongEaseIn(v,w,p,h){return p*(v/=h)*v*v*v*v+w},StrongEaseOut(v,w,p,h){return p*((v=v/h-1)*v*v*v*v+1)+w},StrongEaseInOut(v,w,p,h){return(v/=h/2)<1?p/2*v*v*v*v*v+w:p/2*((v-=2)*v*v*v*v+2)+w},Linear(v,w,p,h){return p*v/h+w}}}(q0)),q0}var ry;function Bg(){return ry||(ry=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const i=Lt(),t=Nn(),n=Hn(),a=Np(),l=x8(),u=F5(),c=P8(),d=hv(),m=dv(),_=wr(),k=pv(),x=C8(),v=D5(),w=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:d.Group,DD:m.DD,Shape:_.Shape,shapes:_.shapes,Animation:k.Animation,Tween:x.Tween,Easings:x.Easings,Context:v.Context,Canvas:w.Canvas}),e.default=e.Konva}(I0)),I0}var Ef={},iy;function k8(){if(iy)return Ef;iy=1,Object.defineProperty(Ef,"__esModule",{value:!0}),Ef.Arc=void 0;const e=jt(),i=wr(),t=Lt(),n=zt(),a=Lt();class l extends i.Shape{_sceneFunc(c){const d=t.Konva.getAngle(this.angle()),m=this.clockwise();c.beginPath(),c.arc(0,0,this.outerRadius(),0,d,m),c.arc(0,0,this.innerRadius(),d,0,!m),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(),d=this.outerRadius(),m=this.clockwise(),_=t.Konva.getAngle(m?360-this.angle():this.angle()),k=Math.cos(Math.min(_,Math.PI)),x=1,v=Math.sin(Math.min(Math.max(Math.PI,_),3*Math.PI/2)),w=Math.sin(Math.min(_,Math.PI/2)),p=k*(k>0?c:d),h=x*d,C=v*(v>0?c:d),g=w*(w>0?d:c);return{x:p,y:m?-1*g:C,width:h-p,height:g-C}}}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={},oy;function z5(){if(oy)return xf;oy=1,Object.defineProperty(xf,"__esModule",{value:!0}),xf.Line=void 0;const e=jt(),i=Lt(),t=wr(),n=zt();function a(c,d,m,_,k,x,v){const w=Math.sqrt(Math.pow(m-c,2)+Math.pow(_-d,2)),p=Math.sqrt(Math.pow(k-m,2)+Math.pow(x-_,2)),h=v*w/(w+p),C=v*p/(w+p),g=m-h*(k-c),b=_-h*(x-d),y=m+C*(k-c),E=_+C*(x-d);return[g,b,y,E]}function l(c,d){const m=c.length,_=[];for(let k=2;k<m-2;k+=2){const x=a(c[k-2],c[k-1],c[k],c[k+1],c[k+2],c[k+3],d);isNaN(x[0])||(_.push(x[0]),_.push(x[1]),_.push(c[k]),_.push(c[k+1]),_.push(x[2]),_.push(x[3]))}return _}class u extends t.Shape{constructor(d){super(d),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(d){let m=this.points(),_=m.length,k=this.tension(),x=this.closed(),v=this.bezier(),w,p,h;if(_){if(d.beginPath(),d.moveTo(m[0],m[1]),k!==0&&_>4){for(w=this.getTensionPoints(),p=w.length,h=x?0:4,x||d.quadraticCurveTo(w[0],w[1],w[2],w[3]);h<p-2;)d.bezierCurveTo(w[h++],w[h++],w[h++],w[h++],w[h++],w[h++]);x||d.quadraticCurveTo(w[p-2],w[p-1],m[_-2],m[_-1])}else if(v)for(h=2;h<_;)d.bezierCurveTo(m[h++],m[h++],m[h++],m[h++],m[h++],m[h++]);else for(h=2;h<_;h+=2)d.lineTo(m[h],m[h+1]);x?(d.closePath(),d.fillStrokeShape(this)):d.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():l(this.points(),this.tension())}_getTensionPointsClosed(){const d=this.points(),m=d.length,_=this.tension(),k=a(d[m-2],d[m-1],d[0],d[1],d[2],d[3],_),x=a(d[m-4],d[m-3],d[m-2],d[m-1],d[0],d[1],_),v=l(d,_);return[k[2],k[3]].concat(v).concat([x[0],x[1],d[m-2],d[m-1],x[2],x[3],k[0],k[1],d[0],d[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let d=this.points();if(d.length<4)return{x:d[0]||0,y:d[1]||0,width:0,height:0};this.tension()!==0?d=[d[0],d[1],...this._getTensionPoints(),d[d.length-2],d[d.length-1]]:d=this.points();let m=d[0],_=d[0],k=d[1],x=d[1],v,w;for(let p=0;p<d.length/2;p++)v=d[p*2],w=d[p*2+1],m=Math.min(m,v),_=Math.max(_,v),k=Math.min(k,w),x=Math.max(x,w);return{x:m,y:k,width:_-m,height:x-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={},H0={},ay;function A8(){return ay||(ay=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,d)=>{let m,_;const x=d/2;m=0;for(let v=0;v<20;v++)_=x*e.tValues[20][v]+x,m+=e.cValues[20][v]*n(u,c,_);return x*m};e.getCubicArcLength=i;const t=(u,c,d)=>{d===void 0&&(d=1);const m=u[0]-2*u[1]+u[2],_=c[0]-2*c[1]+c[2],k=2*u[1]-2*u[0],x=2*c[1]-2*c[0],v=4*(m*m+_*_),w=4*(m*k+_*x),p=k*k+x*x;if(v===0)return d*Math.sqrt(Math.pow(u[2]-u[0],2)+Math.pow(c[2]-c[0],2));const h=w/(2*v),C=p/v,g=d+h,b=C-h*h,y=g*g+b>0?Math.sqrt(g*g+b):0,E=h*h+b>0?Math.sqrt(h*h+b):0,L=h+Math.sqrt(h*h+b)!==0?b*Math.log(Math.abs((g+y)/(h+E))):0;return Math.sqrt(v)/2*(g*y-h*E+L)};e.getQuadraticArcLength=t;function n(u,c,d){const m=a(1,d,u),_=a(1,d,c),k=m*m+_*_;return Math.sqrt(k)}const a=(u,c,d)=>{const m=d.length-1;let _,k;if(m===0)return 0;if(u===0){k=0;for(let x=0;x<=m;x++)k+=e.binomialCoefficients[m][x]*Math.pow(1-c,m-x)*Math.pow(c,x)*d[x];return k}else{_=new Array(m);for(let x=0;x<m;x++)_[x]=m*(d[x+1]-d[x]);return a(u-1,c,_)}},l=(u,c,d)=>{let m=1,_=u/c,k=(u-d(_))/c,x=0;for(;m>.001;){const v=d(_+k),w=Math.abs(u-v)/c;if(w<m)m=w,_+=k;else{const p=d(_-k),h=Math.abs(u-p)/c;h<m?(m=h,_-=k):k/=2}if(x++,x>500)break}return _};e.t2length=l}(H0)),H0}var ly;function gv(){if(ly)return Pf;ly=1,Object.defineProperty(Pf,"__esModule",{value:!0}),Pf.Path=void 0;const e=jt(),i=wr(),t=Lt(),n=A8();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 d=!1;for(let y=0;y<c.length;y++){const E=c[y].command,L=c[y].points;switch(E){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 m=L[0],_=L[1],k=L[2],x=L[3],v=L[4],w=L[5],p=L[6],h=L[7],C=k>x?k:x,g=k>x?1:k/x,b=k>x?x/k:1;u.translate(m,_),u.rotate(p),u.scale(g,b),u.arc(0,0,C,v,v+w,1-h),u.scale(1/g,1/b),u.rotate(-p),u.translate(-m,-_);break;case"z":d=!0,u.closePath();break}}!d&&!this.hasFill()?u.strokeShape(this):u.fillStrokeShape(this)}getSelfRect(){let u=[];this.dataArray.forEach(function(v){if(v.command==="A"){const w=v.points[4],p=v.points[5],h=v.points[4]+p;let C=Math.PI/180;if(Math.abs(w-h)<C&&(C=Math.abs(w-h)),p<0)for(let g=w-C;g>h;g-=C){const b=a.getPointOnEllipticalArc(v.points[0],v.points[1],v.points[2],v.points[3],g,0);u.push(b.x,b.y)}else for(let g=w+C;g<h;g+=C){const b=a.getPointOnEllipticalArc(v.points[0],v.points[1],v.points[2],v.points[3],g,0);u.push(b.x,b.y)}}else if(v.command==="C")for(let w=0;w<=1;w+=.01){const p=a.getPointOnCubicBezier(w,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(p.x,p.y)}else u=u.concat(v.points)});let c=u[0],d=u[0],m=u[1],_=u[1],k,x;for(let v=0;v<u.length/2;v++)k=u[v*2],x=u[v*2+1],isNaN(k)||(c=Math.min(c,k),d=Math.max(d,k)),isNaN(x)||(m=Math.min(m,x),_=Math.max(_,x));return{x:c,y:m,width:d-c,height:_-m}}getLength(){return this.pathLength}getPointAtLength(u){return a.getPointAtLengthOfDataArray(u,this.dataArray)}static getLineLength(u,c,d,m){return Math.sqrt((d-u)*(d-u)+(m-c)*(m-c))}static getPathLength(u){let c=0;for(let d=0;d<u.length;++d)c+=u[d].pathLength;return c}static getPointAtLengthOfDataArray(u,c){let d,m=0,_=c.length;if(!_)return null;for(;m<_&&u>c[m].pathLength;)u-=c[m].pathLength,++m;if(m===_)return d=c[m-1].points.slice(-2),{x:d[0],y:d[1]};if(u<.01)return d=c[m].points.slice(0,2),{x:d[0],y:d[1]};const k=c[m],x=k.points;switch(k.command){case"L":return a.getPointOnLine(u,k.start.x,k.start.y,x[0],x[1]);case"C":return a.getPointOnCubicBezier((0,n.t2length)(u,a.getPathLength(c),y=>(0,n.getCubicArcLength)([k.start.x,x[0],x[2],x[4]],[k.start.y,x[1],x[3],x[5]],y)),k.start.x,k.start.y,x[0],x[1],x[2],x[3],x[4],x[5]);case"Q":return a.getPointOnQuadraticBezier((0,n.t2length)(u,a.getPathLength(c),y=>(0,n.getQuadraticArcLength)([k.start.x,x[0],x[2]],[k.start.y,x[1],x[3]],y)),k.start.x,k.start.y,x[0],x[1],x[2],x[3]);case"A":var v=x[0],w=x[1],p=x[2],h=x[3],C=x[4],g=x[5],b=x[6];return C+=g*u/k.pathLength,a.getPointOnEllipticalArc(v,w,p,h,C,b)}return null}static getPointOnLine(u,c,d,m,_,k,x){k=k??c,x=x??d;const v=this.getLineLength(c,d,m,_);if(v<1e-10)return{x:c,y:d};if(m===c)return{x:k,y:x+(_>d?u:-u)};const w=(_-d)/(m-c),p=Math.sqrt(u*u/(1+w*w))*(m<c?-1:1),h=w*p;if(Math.abs(x-d-w*(k-c))<1e-10)return{x:k+p,y:x+h};const C=((k-c)*(m-c)+(x-d)*(_-d))/(v*v),g=c+C*(m-c),b=d+C*(_-d),y=this.getLineLength(k,x,g,b),E=Math.sqrt(u*u-y*y),L=Math.sqrt(E*E/(1+w*w))*(m<c?-1:1),R=w*L;return{x:g+L,y:b+R}}static getPointOnCubicBezier(u,c,d,m,_,k,x,v,w){function p(E){return E*E*E}function h(E){return 3*E*E*(1-E)}function C(E){return 3*E*(1-E)*(1-E)}function g(E){return(1-E)*(1-E)*(1-E)}const b=v*p(u)+k*h(u)+m*C(u)+c*g(u),y=w*p(u)+x*h(u)+_*C(u)+d*g(u);return{x:b,y}}static getPointOnQuadraticBezier(u,c,d,m,_,k,x){function v(g){return g*g}function w(g){return 2*g*(1-g)}function p(g){return(1-g)*(1-g)}const h=k*v(u)+m*w(u)+c*p(u),C=x*v(u)+_*w(u)+d*p(u);return{x:h,y:C}}static getPointOnEllipticalArc(u,c,d,m,_,k){const x=Math.cos(k),v=Math.sin(k),w={x:d*Math.cos(_),y:m*Math.sin(_)};return{x:u+(w.x*x-w.y*v),y:c+(w.x*v+w.y*x)}}static parsePathData(u){if(!u)return[];let c=u;const d=["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 m=0;m<d.length;m++)c=c.replace(new RegExp(d[m],"g"),"|"+d[m]);const _=c.split("|"),k=[],x=[];let v=0,w=0;const p=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let h;for(m=1;m<_.length;m++){let A=_[m],z=A.charAt(0);for(A=A.slice(1),x.length=0;h=p.exec(A);)x.push(h[0]);const U=[];for(let Z=0,X=x.length;Z<X;Z++){if(x[Z]==="00"){U.push(0,0);continue}const J=parseFloat(x[Z]);isNaN(J)?U.push(0):U.push(J)}for(;U.length>0&&!isNaN(U[0]);){let Z="",X=[];const J=v,B=w;var C,g,b,y,E,L,R,D,O,S;switch(z){case"l":v+=U.shift(),w+=U.shift(),Z="L",X.push(v,w);break;case"L":v=U.shift(),w=U.shift(),X.push(v,w);break;case"m":var T=U.shift(),M=U.shift();if(v+=T,w+=M,Z="M",k.length>2&&k[k.length-1].command==="z"){for(let N=k.length-2;N>=0;N--)if(k[N].command==="M"){v=k[N].points[0]+T,w=k[N].points[1]+M;break}}X.push(v,w),z="l";break;case"M":v=U.shift(),w=U.shift(),Z="M",X.push(v,w),z="L";break;case"h":v+=U.shift(),Z="L",X.push(v,w);break;case"H":v=U.shift(),Z="L",X.push(v,w);break;case"v":w+=U.shift(),Z="L",X.push(v,w);break;case"V":w=U.shift(),Z="L",X.push(v,w);break;case"C":X.push(U.shift(),U.shift(),U.shift(),U.shift()),v=U.shift(),w=U.shift(),X.push(v,w);break;case"c":X.push(v+U.shift(),w+U.shift(),v+U.shift(),w+U.shift()),v+=U.shift(),w+=U.shift(),Z="C",X.push(v,w);break;case"S":g=v,b=w,C=k[k.length-1],C.command==="C"&&(g=v+(v-C.points[2]),b=w+(w-C.points[3])),X.push(g,b,U.shift(),U.shift()),v=U.shift(),w=U.shift(),Z="C",X.push(v,w);break;case"s":g=v,b=w,C=k[k.length-1],C.command==="C"&&(g=v+(v-C.points[2]),b=w+(w-C.points[3])),X.push(g,b,v+U.shift(),w+U.shift()),v+=U.shift(),w+=U.shift(),Z="C",X.push(v,w);break;case"Q":X.push(U.shift(),U.shift()),v=U.shift(),w=U.shift(),X.push(v,w);break;case"q":X.push(v+U.shift(),w+U.shift()),v+=U.shift(),w+=U.shift(),Z="Q",X.push(v,w);break;case"T":g=v,b=w,C=k[k.length-1],C.command==="Q"&&(g=v+(v-C.points[0]),b=w+(w-C.points[1])),v=U.shift(),w=U.shift(),Z="Q",X.push(g,b,v,w);break;case"t":g=v,b=w,C=k[k.length-1],C.command==="Q"&&(g=v+(v-C.points[0]),b=w+(w-C.points[1])),v+=U.shift(),w+=U.shift(),Z="Q",X.push(g,b,v,w);break;case"A":y=U.shift(),E=U.shift(),L=U.shift(),R=U.shift(),D=U.shift(),O=v,S=w,v=U.shift(),w=U.shift(),Z="A",X=this.convertEndpointToCenterParameterization(O,S,v,w,R,D,y,E,L);break;case"a":y=U.shift(),E=U.shift(),L=U.shift(),R=U.shift(),D=U.shift(),O=v,S=w,v+=U.shift(),w+=U.shift(),Z="A",X=this.convertEndpointToCenterParameterization(O,S,v,w,R,D,y,E,L);break}k.push({command:Z||z,points:X,start:{x:J,y:B},pathLength:this.calcLength(J,B,Z||z,X)})}(z==="z"||z==="Z")&&k.push({command:"z",points:[],start:void 0,pathLength:0})}return k}static calcLength(u,c,d,m){let _,k,x,v;const w=a;switch(d){case"L":return w.getLineLength(u,c,m[0],m[1]);case"C":return(0,n.getCubicArcLength)([u,m[0],m[2],m[4]],[c,m[1],m[3],m[5]],1);case"Q":return(0,n.getQuadraticArcLength)([u,m[0],m[2]],[c,m[1],m[3]],1);case"A":_=0;var p=m[4],h=m[5],C=m[4]+h,g=Math.PI/180;if(Math.abs(p-C)<g&&(g=Math.abs(p-C)),k=w.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],p,0),h<0)for(v=p-g;v>C;v-=g)x=w.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],v,0),_+=w.getLineLength(k.x,k.y,x.x,x.y),k=x;else for(v=p+g;v<C;v+=g)x=w.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],v,0),_+=w.getLineLength(k.x,k.y,x.x,x.y),k=x;return x=w.getPointOnEllipticalArc(m[0],m[1],m[2],m[3],C,0),_+=w.getLineLength(k.x,k.y,x.x,x.y),_}return 0}static convertEndpointToCenterParameterization(u,c,d,m,_,k,x,v,w){const p=w*(Math.PI/180),h=Math.cos(p)*(u-d)/2+Math.sin(p)*(c-m)/2,C=-1*Math.sin(p)*(u-d)/2+Math.cos(p)*(c-m)/2,g=h*h/(x*x)+C*C/(v*v);g>1&&(x*=Math.sqrt(g),v*=Math.sqrt(g));let b=Math.sqrt((x*x*(v*v)-x*x*(C*C)-v*v*(h*h))/(x*x*(C*C)+v*v*(h*h)));_===k&&(b*=-1),isNaN(b)&&(b=0);const y=b*x*C/v,E=b*-v*h/x,L=(u+d)/2+Math.cos(p)*y-Math.sin(p)*E,R=(c+m)/2+Math.sin(p)*y+Math.cos(p)*E,D=function(U){return Math.sqrt(U[0]*U[0]+U[1]*U[1])},O=function(U,Z){return(U[0]*Z[0]+U[1]*Z[1])/(D(U)*D(Z))},S=function(U,Z){return(U[0]*Z[1]<U[1]*Z[0]?-1:1)*Math.acos(O(U,Z))},T=S([1,0],[(h-y)/x,(C-E)/v]),M=[(h-y)/x,(C-E)/v],A=[(-1*h-y)/x,(-1*C-E)/v];let z=S(M,A);return O(M,A)<=-1&&(z=Math.PI),O(M,A)>=1&&(z=0),k===0&&z>0&&(z=z-2*Math.PI),k===1&&z<0&&(z=z+2*Math.PI),[L,R,x,v,T,z,p,k]}}return Pf.Path=a,a.prototype.className="Path",a.prototype._attrsAffectingSize=["data"],(0,t._registerNode)(a),e.Factory.addGetterSetter(a,"data"),Pf}var sy;function T8(){if(sy)return Of;sy=1,Object.defineProperty(Of,"__esModule",{value:!0}),Of.Arrow=void 0;const e=jt(),i=z5(),t=zt(),n=Lt(),a=gv();class l extends i.Line{_sceneFunc(c){super._sceneFunc(c);const d=Math.PI*2,m=this.points();let _=m;const k=this.tension()!==0&&m.length>4;k&&(_=this.getTensionPoints());const x=this.pointerLength(),v=m.length;let w,p;if(k){const g=[_[_.length-4],_[_.length-3],_[_.length-2],_[_.length-1],m[v-2],m[v-1]],b=a.Path.calcLength(_[_.length-4],_[_.length-3],"C",g),y=a.Path.getPointOnQuadraticBezier(Math.min(1,1-x/b),g[0],g[1],g[2],g[3],g[4],g[5]);w=m[v-2]-y.x,p=m[v-1]-y.y}else w=m[v-2]-m[v-4],p=m[v-1]-m[v-3];const h=(Math.atan2(p,w)+d)%d,C=this.pointerWidth();this.pointerAtEnding()&&(c.save(),c.beginPath(),c.translate(m[v-2],m[v-1]),c.rotate(h),c.moveTo(0,0),c.lineTo(-x,C/2),c.lineTo(-x,-C/2),c.closePath(),c.restore(),this.__fillStroke(c)),this.pointerAtBeginning()&&(c.save(),c.beginPath(),c.translate(m[0],m[1]),k?(w=(_[0]+_[2])/2-m[0],p=(_[1]+_[3])/2-m[1]):(w=m[2]-m[0],p=m[3]-m[1]),c.rotate((Math.atan2(-p,-w)+d)%d),c.moveTo(0,0),c.lineTo(-x,C/2),c.lineTo(-x,-C/2),c.closePath(),c.restore(),this.__fillStroke(c))}__fillStroke(c){const d=this.dashEnabled();d&&(this.attrs.dashEnabled=!1,c.setLineDash([])),c.fillStrokeShape(this),d&&(this.attrs.dashEnabled=!0)}getSelfRect(){const c=super.getSelfRect(),d=this.pointerWidth()/2;return{x:c.x,y:c.y-d,width:c.width,height:c.height+d*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={},uy;function R8(){if(uy)return Cf;uy=1,Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.Circle=void 0;const e=jt(),i=wr(),t=zt(),n=Lt();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={},cy;function M8(){if(cy)return kf;cy=1,Object.defineProperty(kf,"__esModule",{value:!0}),kf.Ellipse=void 0;const e=jt(),i=wr(),t=zt(),n=Lt();class a extends i.Shape{_sceneFunc(u){const c=this.radiusX(),d=this.radiusY();u.beginPath(),u.save(),c!==d&&u.scale(1,d/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 Af={},fy;function L8(){if(fy)return Af;fy=1,Object.defineProperty(Af,"__esModule",{value:!0}),Af.Image=void 0;const e=Nn(),i=jt(),t=wr(),n=Lt(),a=zt();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(),d=this.hasShadow();return c&&d?!0:super._useBufferCanvas(!0)}_sceneFunc(c){const d=this.getWidth(),m=this.getHeight(),_=this.cornerRadius(),k=this.attrs.image;let x;if(k){const v=this.attrs.cropWidth,w=this.attrs.cropHeight;v&&w?x=[k,this.cropX(),this.cropY(),v,w,0,0,d,m]:x=[k,0,0,d,m]}(this.hasFill()||this.hasStroke()||_)&&(c.beginPath(),_?e.Util.drawRoundedRectPath(c,d,m,_):c.rect(0,0,d,m),c.closePath(),c.fillStrokeShape(this)),k&&(_&&c.clip(),c.drawImage.apply(c,x))}_hitFunc(c){const d=this.width(),m=this.height(),_=this.cornerRadius();c.beginPath(),_?e.Util.drawRoundedRectPath(c,d,m,_):c.rect(0,0,d,m),c.closePath(),c.fillStrokeShape(this)}getWidth(){var c,d;return(c=this.attrs.width)!==null&&c!==void 0?c:(d=this.image())===null||d===void 0?void 0:d.width}getHeight(){var c,d;return(c=this.attrs.height)!==null&&c!==void 0?c:(d=this.image())===null||d===void 0?void 0:d.height}static fromURL(c,d,m=null){const _=e.Util.createImageElement();_.onload=function(){const k=new l({image:_});d(k)},_.onerror=m,_.crossOrigin="Anonymous",_.src=c}}return Af.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)()),Af}var Ds={},dy;function N8(){if(dy)return Ds;dy=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.Tag=Ds.Label=void 0;const e=jt(),i=wr(),t=hv(),n=zt(),a=Lt(),l=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],u="Change.konva",c="none",d="up",m="right",_="down",k="left",x=l.length;class v extends t.Group{constructor(h){super(h),this.on("add.konva",function(C){this._addListeners(C.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(h){let C=this,g;const b=function(){C._sync()};for(g=0;g<x;g++)h.on(l[g]+u,b)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let h=this.getText(),C=this.getTag(),g,b,y,E,L,R,D;if(h&&C){switch(g=h.width(),b=h.height(),y=C.pointerDirection(),E=C.pointerWidth(),D=C.pointerHeight(),L=0,R=0,y){case d:L=g/2,R=-1*D;break;case m:L=g+E,R=b/2;break;case _:L=g/2,R=b+D;break;case k:L=-1*E,R=b/2;break}C.setAttrs({x:-1*L,y:-1*R,width:g,height:b}),h.setAttrs({x:-1*L,y:-1*R})}}}Ds.Label=v,v.prototype.className="Label",(0,a._registerNode)(v);class w extends i.Shape{_sceneFunc(h){const C=this.width(),g=this.height(),b=this.pointerDirection(),y=this.pointerWidth(),E=this.pointerHeight(),L=this.cornerRadius();let R=0,D=0,O=0,S=0;typeof L=="number"?R=D=O=S=Math.min(L,C/2,g/2):(R=Math.min(L[0]||0,C/2,g/2),D=Math.min(L[1]||0,C/2,g/2),S=Math.min(L[2]||0,C/2,g/2),O=Math.min(L[3]||0,C/2,g/2)),h.beginPath(),h.moveTo(R,0),b===d&&(h.lineTo((C-y)/2,0),h.lineTo(C/2,-1*E),h.lineTo((C+y)/2,0)),h.lineTo(C-D,0),h.arc(C-D,D,D,Math.PI*3/2,0,!1),b===m&&(h.lineTo(C,(g-E)/2),h.lineTo(C+y,g/2),h.lineTo(C,(g+E)/2)),h.lineTo(C,g-S),h.arc(C-S,g-S,S,0,Math.PI/2,!1),b===_&&(h.lineTo((C+y)/2,g),h.lineTo(C/2,g+E),h.lineTo((C-y)/2,g)),h.lineTo(O,g),h.arc(O,g-O,O,Math.PI/2,Math.PI,!1),b===k&&(h.lineTo(0,(g+E)/2),h.lineTo(-1*y,g/2),h.lineTo(0,(g-E)/2)),h.lineTo(0,R),h.arc(R,R,R,Math.PI,Math.PI*3/2,!1),h.closePath(),h.fillStrokeShape(this)}getSelfRect(){let h=0,C=0,g=this.pointerWidth(),b=this.pointerHeight(),y=this.pointerDirection(),E=this.width(),L=this.height();return y===d?(C-=b,L+=b):y===_?L+=b:y===k?(h-=g*1.5,E+=g):y===m&&(E+=g*1.5),{x:h,y:C,width:E,height:L}}}return Ds.Tag=w,w.prototype.className="Tag",(0,a._registerNode)(w),e.Factory.addGetterSetter(w,"pointerDirection",c),e.Factory.addGetterSetter(w,"pointerWidth",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(w,"pointerHeight",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(w,"cornerRadius",0,(0,n.getNumberOrArrayOfNumbersValidator)(4)),Ds}var Tf={},hy;function B5(){if(hy)return Tf;hy=1,Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.Rect=void 0;const e=jt(),i=wr(),t=Lt(),n=Nn(),a=zt();class l extends i.Shape{_sceneFunc(c){const d=this.cornerRadius(),m=this.width(),_=this.height();c.beginPath(),d?n.Util.drawRoundedRectPath(c,m,_,d):c.rect(0,0,m,_),c.closePath(),c.fillStrokeShape(this)}}return Tf.Rect=l,l.prototype.className="Rect",(0,t._registerNode)(l),e.Factory.addGetterSetter(l,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),Tf}var Rf={},py;function I8(){if(py)return Rf;py=1,Object.defineProperty(Rf,"__esModule",{value:!0}),Rf.RegularPolygon=void 0;const e=jt(),i=wr(),t=zt(),n=Lt();class a extends i.Shape{_sceneFunc(u){const c=this._getPoints();u.beginPath(),u.moveTo(c[0].x,c[0].y);for(let d=1;d<c.length;d++)u.lineTo(c[d].x,c[d].y);u.closePath(),u.fillStrokeShape(this)}_getPoints(){const u=this.attrs.sides,c=this.attrs.radius||0,d=[];for(let m=0;m<u;m++)d.push({x:c*Math.sin(m*2*Math.PI/u),y:-1*c*Math.cos(m*2*Math.PI/u)});return d}getSelfRect(){const u=this._getPoints();let c=u[0].x,d=u[0].y,m=u[0].x,_=u[0].y;return u.forEach(k=>{c=Math.min(c,k.x),d=Math.max(d,k.x),m=Math.min(m,k.y),_=Math.max(_,k.y)}),{x:c,y:m,width:d-c,height:_-m}}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={},gy;function D8(){if(gy)return Mf;gy=1,Object.defineProperty(Mf,"__esModule",{value:!0}),Mf.Ring=void 0;const e=jt(),i=wr(),t=zt(),n=Lt(),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={},vy;function j8(){if(vy)return Lf;vy=1,Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.Sprite=void 0;const e=jt(),i=wr(),t=pv(),n=zt(),a=Lt();class l extends i.Shape{constructor(c){super(c),this._updated=!0,this.anim=new t.Animation(()=>{const d=this._updated;return this._updated=!1,d}),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 d=this.animation(),m=this.frameIndex(),_=m*4,k=this.animations()[d],x=this.frameOffsets(),v=k[_+0],w=k[_+1],p=k[_+2],h=k[_+3],C=this.image();if((this.hasFill()||this.hasStroke())&&(c.beginPath(),c.rect(0,0,p,h),c.closePath(),c.fillStrokeShape(this)),C)if(x){const g=x[d],b=m*2;c.drawImage(C,v,w,p,h,g[b+0],g[b+1],p,h)}else c.drawImage(C,v,w,p,h,0,0,p,h)}_hitFunc(c){const d=this.animation(),m=this.frameIndex(),_=m*4,k=this.animations()[d],x=this.frameOffsets(),v=k[_+2],w=k[_+3];if(c.beginPath(),x){const p=x[d],h=m*2;c.rect(p[h+0],p[h+1],v,w)}else c.rect(0,0,v,w);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(),d=this.animation(),m=this.animations(),_=m[d],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={},my;function F8(){if(my)return Nf;my=1,Object.defineProperty(Nf,"__esModule",{value:!0}),Nf.Star=void 0;const e=jt(),i=wr(),t=zt(),n=Lt();class a extends i.Shape{_sceneFunc(u){const c=this.innerRadius(),d=this.outerRadius(),m=this.numPoints();u.beginPath(),u.moveTo(0,0-d);for(let _=1;_<m*2;_++){const k=_%2===0?d:c,x=k*Math.sin(_*Math.PI/m),v=-1*k*Math.cos(_*Math.PI/m);u.lineTo(x,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={},yy;function U5(){if(yy)return Xu;yy=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.Text=void 0,Xu.stringToArray=u;const e=Nn(),i=jt(),t=wr(),n=Lt(),a=zt(),l=Lt();function u(H){return[...H].reduce((Y,ee,V,K)=>{if(new RegExp("\\p{Emoji}","u").test(ee)){const $=K[V+1];$&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test($)?(Y.push(ee+$),K[V+1]=""):Y.push(ee)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(ee+(K[V+1]||""))?Y.push(ee+K[V+1]):V>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(ee)?Y[Y.length-1]+=ee:ee&&Y.push(ee);return Y},[])}const c="auto",d="center",m="inherit",_="justify",k="Change.konva",x="2d",v="-",w="left",p="text",h="Text",C="top",g="bottom",b="middle",y="normal",E="px ",L=" ",R="right",D="rtl",O="word",S="char",T="none",M="…",A=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],z=A.length;function U(H){return H.split(",").map(Y=>{Y=Y.trim();const ee=Y.indexOf(" ")>=0,V=Y.indexOf('"')>=0||Y.indexOf("'")>=0;return ee&&!V&&(Y=`"${Y}"`),Y}).join(", ")}let Z;function X(){return Z||(Z=e.Util.createCanvasElement().getContext(x),Z)}function J(H){H.fillText(this._partialText,this._partialTextX,this._partialTextY)}function B(H){H.setAttr("miterLimit",2),H.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function N(H){return H=H||{},!H.fillLinearGradientColorStops&&!H.fillRadialGradientColorStops&&!H.fillPatternImage&&(H.fill=H.fill||"black"),H}class F extends t.Shape{constructor(Y){super(N(Y)),this._partialTextX=0,this._partialTextY=0;for(let ee=0;ee<z;ee++)this.on(A[ee]+k,this._setTextData);this._setTextData()}_sceneFunc(Y){const ee=this.textArr,V=ee.length;if(!this.text())return;let K=this.padding(),$=this.fontSize(),ne=this.lineHeight()*$,re=this.verticalAlign(),ie=this.direction(),ae=0,ue=this.align(),de=this.getWidth(),he=this.letterSpacing(),Se=this.fill(),me=this.textDecoration(),ke=me.indexOf("underline")!==-1,fe=me.indexOf("line-through")!==-1,ge;ie=ie===m?Y.direction:ie;let Ce=ne/2,Te=b;if(n.Konva._fixTextRendering){const He=this.measureSize("M");Te="alphabetic",Ce=(He.fontBoundingBoxAscent-He.fontBoundingBoxDescent)/2+ne/2}var se=0,be=0;for(ie===D&&Y.setAttr("direction",ie),Y.setAttr("font",this._getContextFont()),Y.setAttr("textBaseline",Te),Y.setAttr("textAlign",w),re===b?ae=(this.getHeight()-V*ne-K*2)/2:re===g&&(ae=this.getHeight()-V*ne-K*2),Y.translate(K,ae+K),ge=0;ge<V;ge++){var se=0,be=0,xe=ee[ge],Ie=xe.text,at=xe.width,gt=xe.lastInParagraph,je,ze;if(Y.save(),ue===R?se+=de-at-K*2:ue===d&&(se+=(de-at-K*2)/2),ke){Y.save(),Y.beginPath();const et=n.Konva._fixTextRendering?Math.round($/4):Math.round($/2),Pt=se,wt=Ce+be+et;Y.moveTo(Pt,wt),je=Ie.split(" ").length-1,ze=ue===_&&!gt?de-K*2:at,Y.lineTo(Pt+Math.round(ze),wt),Y.lineWidth=$/15;const we=this._getLinearGradient();Y.strokeStyle=we||Se,Y.stroke(),Y.restore()}if(fe){Y.save(),Y.beginPath();const et=n.Konva._fixTextRendering?-Math.round($/4):0;Y.moveTo(se,Ce+be+et),je=Ie.split(" ").length-1,ze=ue===_&&!gt?de-K*2:at,Y.lineTo(se+Math.round(ze),Ce+be+et),Y.lineWidth=$/15;const Pt=this._getLinearGradient();Y.strokeStyle=Pt||Se,Y.stroke(),Y.restore()}if(ie!==D&&(he!==0||ue===_)){je=Ie.split(" ").length-1;const et=u(Ie);for(let Pt=0;Pt<et.length;Pt++){const wt=et[Pt];wt===" "&&!gt&&ue===_&&(se+=(de-K*2-at)/je),this._partialTextX=se,this._partialTextY=Ce+be,this._partialText=wt,Y.fillStrokeShape(this),se+=this.measureSize(wt).width+he}}else he!==0&&Y.setAttr("letterSpacing",`${he}px`),this._partialTextX=se,this._partialTextY=Ce+be,this._partialText=Ie,Y.fillStrokeShape(this);Y.restore(),V>1&&(Ce+=ne)}}_hitFunc(Y){const ee=this.getWidth(),V=this.getHeight();Y.beginPath(),Y.rect(0,0,ee,V),Y.closePath(),Y.fillStrokeShape(this)}setText(Y){const ee=e.Util._isString(Y)?Y:Y==null?"":Y+"";return this._setAttr(p,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(Y){var ee,V,K,$,ne,re,ie,ae,ue,de,he;let Se=X(),me=this.fontSize(),ke;Se.save(),Se.font=this._getContextFont(),ke=Se.measureText(Y),Se.restore();const fe=me/100;return{actualBoundingBoxAscent:(ee=ke.actualBoundingBoxAscent)!==null&&ee!==void 0?ee:71.58203125*fe,actualBoundingBoxDescent:(V=ke.actualBoundingBoxDescent)!==null&&V!==void 0?V:0,actualBoundingBoxLeft:(K=ke.actualBoundingBoxLeft)!==null&&K!==void 0?K:-7.421875*fe,actualBoundingBoxRight:($=ke.actualBoundingBoxRight)!==null&&$!==void 0?$:75.732421875*fe,alphabeticBaseline:(ne=ke.alphabeticBaseline)!==null&&ne!==void 0?ne:0,emHeightAscent:(re=ke.emHeightAscent)!==null&&re!==void 0?re:100*fe,emHeightDescent:(ie=ke.emHeightDescent)!==null&&ie!==void 0?ie:-20*fe,fontBoundingBoxAscent:(ae=ke.fontBoundingBoxAscent)!==null&&ae!==void 0?ae:91*fe,fontBoundingBoxDescent:(ue=ke.fontBoundingBoxDescent)!==null&&ue!==void 0?ue:21*fe,hangingBaseline:(de=ke.hangingBaseline)!==null&&de!==void 0?de:72.80000305175781*fe,ideographicBaseline:(he=ke.ideographicBaseline)!==null&&he!==void 0?he:-21*fe,width:ke.width,height:me}}_getContextFont(){return this.fontStyle()+L+this.fontVariant()+L+(this.fontSize()+E)+U(this.fontFamily())}_addTextLine(Y){this.align()===_&&(Y=Y.trim());const V=this._getTextWidth(Y);return this.textArr.push({text:Y,width:V,lastInParagraph:!1})}_getTextWidth(Y){const ee=this.letterSpacing(),V=Y.length;return X().measureText(Y).width+ee*V}_setTextData(){let Y=this.text().split(`
|
|
43
|
-
`),ee=+this.fontSize(),V=0,K=this.lineHeight()*ee,$=this.attrs.width,ne=this.attrs.height,re=$!==c&&$!==void 0,ie=ne!==c&&ne!==void 0,ae=this.padding(),ue=$-ae*2,de=ne-ae*2,he=0,Se=this.wrap(),me=Se!==T,ke=Se!==S&&me,fe=this.ellipsis();this.textArr=[],X().font=this._getContextFont();const ge=fe?this._getTextWidth(M):0;for(let Ce=0,Te=Y.length;Ce<Te;++Ce){let se=Y[Ce],be=this._getTextWidth(se);if(re&&be>ue)for(;se.length>0;){let xe=0,Ie=u(se).length,at="",gt=0;for(;xe<Ie;){const je=xe+Ie>>>1,ze=u(se),He=ze.slice(0,je+1).join(""),Xe=this._getTextWidth(He)+ge;Xe<=ue?(xe=je+1,at=He,gt=Xe):Ie=je}if(at){if(ke){const He=u(se),Xe=u(at),et=He[Xe.length],Pt=et===L||et===v;let wt;if(Pt&><=ue)wt=Xe.length;else{const we=Xe.lastIndexOf(L),Ee=Xe.lastIndexOf(v);wt=Math.max(we,Ee)+1}wt>0&&(xe=wt,at=He.slice(0,xe).join(""),gt=this._getTextWidth(at))}if(at=at.trimRight(),this._addTextLine(at),V=Math.max(V,gt),he+=K,this._shouldHandleEllipsis(he)){this._tryToAddEllipsisToLastLine();break}if(se=u(se).slice(xe).join("").trimLeft(),se.length>0&&(be=this._getTextWidth(se),be<=ue)){this._addTextLine(se),he+=K,V=Math.max(V,be);break}}else break}else this._addTextLine(se),he+=K,V=Math.max(V,be),this._shouldHandleEllipsis(he)&&Ce<Te-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),ie&&he+K>de)break}this.textHeight=ee,this.textWidth=V}_shouldHandleEllipsis(Y){const ee=+this.fontSize(),V=this.lineHeight()*ee,K=this.attrs.height,$=K!==c&&K!==void 0,ne=this.padding(),re=K-ne*2;return!(this.wrap()!==T)||$&&Y+V>re}_tryToAddEllipsisToLastLine(){const Y=this.attrs.width,ee=Y!==c&&Y!==void 0,V=this.padding(),K=Y-V*2,$=this.ellipsis(),ne=this.textArr[this.textArr.length-1];!ne||!$||(ee&&(this._getTextWidth(ne.text+M)<K||(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 Y=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,ee=this.hasShadow();return Y&&ee?!0:super._useBufferCanvas()}}return Xu.Text=F,F.prototype._fillFunc=J,F.prototype._strokeFunc=B,F.prototype.className=h,F.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,l._registerNode)(F),i.Factory.overWriteSetter(F,"width",(0,a.getNumberOrAutoValidator)()),i.Factory.overWriteSetter(F,"height",(0,a.getNumberOrAutoValidator)()),i.Factory.addGetterSetter(F,"direction",m),i.Factory.addGetterSetter(F,"fontFamily","Arial"),i.Factory.addGetterSetter(F,"fontSize",12,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(F,"fontStyle",y),i.Factory.addGetterSetter(F,"fontVariant",y),i.Factory.addGetterSetter(F,"padding",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(F,"align",w),i.Factory.addGetterSetter(F,"verticalAlign",C),i.Factory.addGetterSetter(F,"lineHeight",1,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(F,"wrap",O),i.Factory.addGetterSetter(F,"ellipsis",!1,(0,a.getBooleanValidator)()),i.Factory.addGetterSetter(F,"letterSpacing",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(F,"text","",(0,a.getStringValidator)()),i.Factory.addGetterSetter(F,"textDecoration",""),Xu}var If={},by;function z8(){if(by)return If;by=1,Object.defineProperty(If,"__esModule",{value:!0}),If.TextPath=void 0;const e=Nn(),i=jt(),t=wr(),n=gv(),a=U5(),l=zt(),u=Lt(),c="",d="normal";function m(x){x.fillText(this.partialText,0,0)}function _(x){x.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 w=this.pathLength;return v-1>w?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 w=this.textDecoration(),p=this.fill(),h=this.fontSize(),C=this.glyphInfo;w==="underline"&&v.beginPath();for(let g=0;g<C.length;g++){v.save();const b=C[g].p0;v.translate(b.x,b.y),v.rotate(C[g].rotation),this.partialText=C[g].text,v.fillStrokeShape(this),w==="underline"&&(g===0&&v.moveTo(0,h/2+1),v.lineTo(h,h/2+1)),v.restore()}w==="underline"&&(v.strokeStyle=p,v.lineWidth=h/20,v.stroke()),v.restore()}_hitFunc(v){v.beginPath();const w=this.glyphInfo;if(w.length>=1){const p=w[0].p0;v.moveTo(p.x,p.y)}for(let p=0;p<w.length;p++){const h=w[p].p1;v.lineTo(h.x,h.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 p=this.dummyCanvas.getContext("2d");p.save(),p.font=this._getContextFont();const h=p.measureText(v);return p.restore(),{width:h.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:v,height:w}=this._getTextSize(this.attrs.text);if(this.textWidth=v,this.textHeight=w,this.glyphInfo=[],!this.attrs.data)return null;const p=this.letterSpacing(),h=this.align(),C=this.kerningFunc(),g=Math.max(this.textWidth+((this.attrs.text||"").length-1)*p,0);let b=0;h==="center"&&(b=Math.max(0,this.pathLength/2-g/2)),h==="right"&&(b=Math.max(0,this.pathLength-g));const y=(0,a.stringToArray)(this.text());let E=b;for(let L=0;L<y.length;L++){const R=this._getPointAtLength(E);if(!R)return;let D=this._getTextSize(y[L]).width+p;if(y[L]===" "&&h==="justify"){const z=this.text().split(" ").length-1;D+=(this.pathLength-g)/z}const O=this._getPointAtLength(E+D);if(!O)return;const S=n.Path.getLineLength(R.x,R.y,O.x,O.y);let T=0;if(C)try{T=C(y[L-1],y[L])*this.fontSize()}catch{T=0}R.x+=T,O.x+=T,this.textWidth+=T;const M=n.Path.getPointOnLine(T+S/2,R.x,R.y,O.x,O.y),A=Math.atan2(O.y-R.y,O.x-R.x);this.glyphInfo.push({transposeX:M.x,transposeY:M.y,text:y[L],rotation:A,p0:R,p1:O}),E+=D}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const v=[];this.glyphInfo.forEach(function(E){v.push(E.p0.x),v.push(E.p0.y),v.push(E.p1.x),v.push(E.p1.y)});let w=v[0]||0,p=v[0]||0,h=v[1]||0,C=v[1]||0,g,b;for(let E=0;E<v.length/2;E++)g=v[E*2],b=v[E*2+1],w=Math.min(w,g),p=Math.max(p,g),h=Math.min(h,b),C=Math.max(C,b);const y=this.fontSize();return{x:w-y/2,y:h-y/2,width:p-w+y,height:C-h+y}}destroy(){return e.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}return If.TextPath=k,k.prototype._fillFunc=m,k.prototype._strokeFunc=_,k.prototype._fillFuncHit=m,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",d),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",d),i.Factory.addGetterSetter(k,"text",c),i.Factory.addGetterSetter(k,"textDecoration",""),i.Factory.addGetterSetter(k,"kerningFunc",void 0),If}var Df={},_y;function B8(){if(_y)return Df;_y=1,Object.defineProperty(Df,"__esModule",{value:!0}),Df.Transformer=void 0;const e=Nn(),i=jt(),t=Hn(),n=wr(),a=B5(),l=hv(),u=Lt(),c=zt(),d=Lt(),m="tr-konva",_=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(O=>O+`.${m}`).join(" "),k="nodesRect",x=["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},w="ontouchstart"in u.Konva._global;function p(O,S,T){if(O==="rotater")return T;S+=e.Util.degToRad(v[O]||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 h=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],C=1e8;function g(O){return{x:O.x+O.width/2*Math.cos(O.rotation)+O.height/2*Math.sin(-O.rotation),y:O.y+O.height/2*Math.cos(O.rotation)+O.width/2*Math.sin(O.rotation)}}function b(O,S,T){const M=T.x+(O.x-T.x)*Math.cos(S)-(O.y-T.y)*Math.sin(S),A=T.y+(O.x-T.x)*Math.sin(S)+(O.y-T.y)*Math.cos(S);return{...O,rotation:O.rotation+S,x:M,y:A}}function y(O,S){const T=g(O);return b(O,S,T)}function E(O,S,T){let M=S;for(let A=0;A<O.length;A++){const z=u.Konva.getAngle(O[A]),U=Math.abs(z-S)%(Math.PI*2);Math.min(U,Math.PI*2-U)<T&&(M=z)}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 m+this._id}setNodes(S=[]){this._nodes&&this._nodes.length&&this.detach();const T=S.filter(A=>A.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=T,S.length===1&&this.useSingleNodeRotation()?this.rotation(S[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(A=>{const z=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},U=A._attrsAffectingSize.map(Z=>Z+"Change."+this._getEventNamespace()).join(" ");A.on(U,z),A.on(x.map(Z=>Z+`.${this._getEventNamespace()}`).join(" "),z),A.on(`absoluteTransformChange.${this._getEventNamespace()}`,z),this._proxyDrag(A)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(S){let T;S.on(`dragstart.${this._getEventNamespace()}`,M=>{T=S.getAbsolutePosition(),!this.isDragging()&&S!==this.findOne(".back")&&this.startDrag(M,!1)}),S.on(`dragmove.${this._getEventNamespace()}`,M=>{if(!T)return;const A=S.getAbsolutePosition(),z=A.x-T.x,U=A.y-T.y;this.nodes().forEach(Z=>{if(Z===S||Z.isDragging())return;const X=Z.getAbsolutePosition();Z.setAbsolutePosition({x:X.x+z,y:X.y+U}),Z.startDrag(M)}),T=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,T=this.rotation(),M){const A=S.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),z=S.getAbsoluteScale(M),U=S.getAbsolutePosition(M),Z=A.x*z.x-S.offsetX()*z.x,X=A.y*z.y-S.offsetY()*z.y,J=(u.Konva.getAngle(S.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),B={x:U.x+Z*Math.cos(J)+X*Math.sin(-J),y:U.y+X*Math.cos(J)+Z*Math.sin(J),width:A.width*z.x,height:A.height*z.y,rotation:J};return b(B,-u.Konva.getAngle(T),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-C,y:-C,width:0,height:0,rotation:0};const T=[];this.nodes().map(J=>{const B=J.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),N=[{x:B.x,y:B.y},{x:B.x+B.width,y:B.y},{x:B.x+B.width,y:B.y+B.height},{x:B.x,y:B.y+B.height}],F=J.getAbsoluteTransform();N.forEach(function(H){const Y=F.point(H);T.push(Y)})});const M=new e.Transform;M.rotate(-u.Konva.getAngle(this.rotation()));let A=1/0,z=1/0,U=-1/0,Z=-1/0;T.forEach(function(J){const B=M.point(J);A===void 0&&(A=U=B.x,z=Z=B.y),A=Math.min(A,B.x),z=Math.min(z,B.y),U=Math.max(U,B.x),Z=Math.max(Z,B.y)}),M.invert();const X=M.point({x:A,y:z});return{x:X.x,y:X.y,width:U-A,height:Z-z,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(),h.forEach(S=>{this._createAnchor(S)}),this._createAnchor("rotater")}_createAnchor(S){const T=new a.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:S+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:w?10:"auto"}),M=this;T.on("mousedown touchstart",function(A){M._handleMouseDown(A)}),T.on("dragstart",A=>{T.stopDrag(),A.cancelBubble=!0}),T.on("dragend",A=>{A.cancelBubble=!0}),T.on("mouseenter",()=>{const A=u.Konva.getAngle(this.rotation()),z=this.rotateAnchorCursor(),U=p(S,A,z);T.getStage().content&&(T.getStage().content.style.cursor=U),this._cursorChange=!0}),T.on("mouseout",()=>{T.getStage().content&&(T.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(T)}_createBack(){const S=new n.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(T,M){const A=M.getParent(),z=A.padding();T.beginPath(),T.rect(-z,-z,M.width()+z*2,M.height()+z*2),T.moveTo(M.width()/2,-z),A.rotateEnabled()&&A.rotateLineVisible()&&T.lineTo(M.width()/2,-A.rotateAnchorOffset()*e.Util._sign(M.height())-z),T.fillStrokeShape(M)},hitFunc:(T,M)=>{if(!this.shouldOverdrawWholeArea())return;const A=this.padding();T.beginPath(),T.rect(-A,-A,M.width()+A*2,M.height()+A*2),T.fillStrokeShape(M)}});this.add(S),this._proxyDrag(S),S.on("dragstart",T=>{T.cancelBubble=!0}),S.on("dragmove",T=>{T.cancelBubble=!0}),S.on("dragend",T=>{T.cancelBubble=!0}),this.on("dragmove",T=>{this.update()})}_handleMouseDown(S){if(this._transforming)return;this._movingAnchorName=S.target.name().split(" ")[0];const T=this._getNodeRect(),M=T.width,A=T.height,z=Math.sqrt(Math.pow(M,2)+Math.pow(A,2));this.sin=Math.abs(A/z),this.cos=Math.abs(M/z),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(),Z=S.target.getStage().getPointerPosition();this._anchorDragOffset={x:Z.x-U.x,y:Z.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 T,M,A;const z=this.findOne("."+this._movingAnchorName),U=z.getStage();U.setPointersPositions(S);const Z=U.getPointerPosition();let X={x:Z.x-this._anchorDragOffset.x,y:Z.y-this._anchorDragOffset.y};const J=z.getAbsolutePosition();this.anchorDragBoundFunc()&&(X=this.anchorDragBoundFunc()(J,X,S)),z.setAbsolutePosition(X);const B=z.getAbsolutePosition();if(J.x===B.x&&J.y===B.y)return;if(this._movingAnchorName==="rotater"){const ie=this._getNodeRect();T=z.x()-ie.width/2,M=-z.y()+ie.height/2;let ae=Math.atan2(-M,T)+Math.PI/2;ie.height<0&&(ae-=Math.PI);const de=u.Konva.getAngle(this.rotation())+ae,he=u.Konva.getAngle(this.rotationSnapTolerance()),me=E(this.rotationSnaps(),de,he)-ie.rotation,ke=y(ie,me);this._fitNodesInto(ke,S);return}const N=this.shiftBehavior();let F;N==="inverted"?F=this.keepRatio()&&!S.shiftKey:N==="none"?F=this.keepRatio():F=this.keepRatio()||S.shiftKey;var K=this.centeredScaling()||S.altKey;if(this._movingAnchorName==="top-left"){if(F){var H=K?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};A=Math.sqrt(Math.pow(H.x-z.x(),2)+Math.pow(H.y-z.y(),2));var Y=this.findOne(".top-left").x()>H.x?-1:1,ee=this.findOne(".top-left").y()>H.y?-1:1;T=A*this.cos*Y,M=A*this.sin*ee,this.findOne(".top-left").x(H.x-T),this.findOne(".top-left").y(H.y-M)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(z.y());else if(this._movingAnchorName==="top-right"){if(F){var H=K?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};A=Math.sqrt(Math.pow(z.x()-H.x,2)+Math.pow(H.y-z.y(),2));var Y=this.findOne(".top-right").x()<H.x?-1:1,ee=this.findOne(".top-right").y()>H.y?-1:1;T=A*this.cos*Y,M=A*this.sin*ee,this.findOne(".top-right").x(H.x+T),this.findOne(".top-right").y(H.y-M)}var V=z.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(z.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(z.x());else if(this._movingAnchorName==="bottom-left"){if(F){var H=K?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};A=Math.sqrt(Math.pow(H.x-z.x(),2)+Math.pow(z.y()-H.y,2));var Y=H.x<z.x()?-1:1,ee=z.y()<H.y?-1:1;T=A*this.cos*Y,M=A*this.sin*ee,z.x(H.x-T),z.y(H.y+M)}V=z.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(z.y());else if(this._movingAnchorName==="bottom-right"){if(F){var H=K?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};A=Math.sqrt(Math.pow(z.x()-H.x,2)+Math.pow(z.y()-H.y,2));var Y=this.findOne(".bottom-right").x()<H.x?-1:1,ee=this.findOne(".bottom-right").y()<H.y?-1:1;T=A*this.cos*Y,M=A*this.sin*ee,this.findOne(".bottom-right").x(H.x+T),this.findOne(".bottom-right").y(H.y+M)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var K=this.centeredScaling()||S.altKey;if(K){const ie=this.findOne(".top-left"),ae=this.findOne(".bottom-right"),ue=ie.x(),de=ie.y(),he=this.getWidth()-ae.x(),Se=this.getHeight()-ae.y();ae.move({x:-ue,y:-de}),ie.move({x:he,y:Se})}const $=this.findOne(".top-left").getAbsolutePosition();T=$.x,M=$.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:T,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 T;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}),(T=this.getLayer())===null||T===void 0||T.batchDraw(),M&&this._nodes.forEach(A=>{var z;A._fire("transformend",{evt:S,target:A}),(z=A.getLayer())===null||z===void 0||z.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(S,T){const M=this._getNodeRect(),A=1;if(e.Util._inRange(S.width,-this.padding()*2-A,A)){this.update();return}if(e.Util._inRange(S.height,-this.padding()*2-A,A)){this.update();return}const z=new e.Transform;if(z.rotate(u.Konva.getAngle(this.rotation())),this._movingAnchorName&&S.width<0&&this._movingAnchorName.indexOf("left")>=0){const F=z.point({x:-this.padding()*2,y:0});S.x+=F.x,S.y+=F.y,S.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=F.x,this._anchorDragOffset.y-=F.y}else if(this._movingAnchorName&&S.width<0&&this._movingAnchorName.indexOf("right")>=0){const F=z.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=F.x,this._anchorDragOffset.y-=F.y,S.width+=this.padding()*2}if(this._movingAnchorName&&S.height<0&&this._movingAnchorName.indexOf("top")>=0){const F=z.point({x:0,y:-this.padding()*2});S.x+=F.x,S.y+=F.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=F.x,this._anchorDragOffset.y-=F.y,S.height+=this.padding()*2}else if(this._movingAnchorName&&S.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const F=z.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=F.x,this._anchorDragOffset.y-=F.y,S.height+=this.padding()*2}if(this.boundBoxFunc()){const F=this.boundBoxFunc()(M,S);F?S=F:e.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const U=1e7,Z=new e.Transform;Z.translate(M.x,M.y),Z.rotate(M.rotation),Z.scale(M.width/U,M.height/U);const X=new e.Transform,J=S.width/U,B=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(J),Math.abs(B))):(X.translate(S.x,S.y),X.rotate(S.rotation),X.scale(J,B));const N=X.multiply(Z.invert());this._nodes.forEach(F=>{var H;const Y=F.getParent().getAbsoluteTransform(),ee=F.getTransform().copy();ee.translate(F.offsetX(),F.offsetY());const V=new e.Transform;V.multiply(Y.copy().invert()).multiply(N).multiply(Y).multiply(ee);const K=V.decompose();F.setAttrs(K),(H=F.getLayer())===null||H===void 0||H.batchDraw()}),this.rotation(e.Util._getRotation(S.rotation)),this._nodes.forEach(F=>{this._fire("transform",{evt:T,target:F}),F._fire("transform",{evt:T,target:F})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(S,T){this.findOne(S).setAttrs(T)}update(){var S;const T=this._getNodeRect();this.rotation(e.Util._getRotation(T.rotation));const M=T.width,A=T.height,z=this.enabledAnchors(),U=this.resizeEnabled(),Z=this.padding(),X=this.anchorSize(),J=this.find("._anchor");J.forEach(N=>{N.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+Z,offsetY:X/2+Z,visible:U&&z.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:M/2,y:0,offsetY:X/2+Z,visible:U&&z.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:M,y:0,offsetX:X/2-Z,offsetY:X/2+Z,visible:U&&z.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:A/2,offsetX:X/2+Z,visible:U&&z.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:M,y:A/2,offsetX:X/2-Z,visible:U&&z.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:A,offsetX:X/2+Z,offsetY:X/2-Z,visible:U&&z.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:M/2,y:A,offsetY:X/2-Z,visible:U&&z.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:M,y:A,offsetX:X/2-Z,offsetY:X/2-Z,visible:U&&z.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:M/2,y:-this.rotateAnchorOffset()*e.Util._sign(A)-Z,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:M,height:A,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const B=this.anchorStyleFunc();B&&J.forEach(N=>{B(N)}),(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(O){return O instanceof Array||e.Util.warn("enabledAnchors value should be an array"),O instanceof Array&&O.forEach(function(S){h.indexOf(S)===-1&&e.Util.warn("Unknown anchor name: "+S+". Available names are: "+h.join(", "))}),O||[]}return R.prototype.className="Transformer",(0,d._registerNode)(R),i.Factory.addGetterSetter(R,"enabledAnchors",h,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,"nodes"),i.Factory.addGetterSetter(R,"node"),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={},wy;function U8(){if(wy)return jf;wy=1,Object.defineProperty(jf,"__esModule",{value:!0}),jf.Wedge=void 0;const e=jt(),i=wr(),t=Lt(),n=zt(),a=Lt();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={},Sy;function q8(){if(Sy)return Ff;Sy=1,Object.defineProperty(Ff,"__esModule",{value:!0}),Ff.Blur=void 0;const e=jt(),i=Hn(),t=zt();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(d,m){const _=d.data,k=d.width,x=d.height;let v,w,p,h,C,g,b,y,E,L,R,D,O,S,T,M,A,z,U,Z,X,J,B,N;const F=m+m+1,H=k-1,Y=x-1,ee=m+1,V=ee*(ee+1)/2,K=new n,$=a[m],ne=l[m];let re=null,ie=K,ae=null,ue=null;for(p=1;p<F;p++)ie=ie.next=new n,p===ee&&(re=ie);for(ie.next=K,b=g=0,w=0;w<x;w++){for(M=A=z=U=y=E=L=R=0,D=ee*(Z=_[g]),O=ee*(X=_[g+1]),S=ee*(J=_[g+2]),T=ee*(B=_[g+3]),y+=V*Z,E+=V*X,L+=V*J,R+=V*B,ie=K,p=0;p<ee;p++)ie.r=Z,ie.g=X,ie.b=J,ie.a=B,ie=ie.next;for(p=1;p<ee;p++)h=g+((H<p?H:p)<<2),y+=(ie.r=Z=_[h])*(N=ee-p),E+=(ie.g=X=_[h+1])*N,L+=(ie.b=J=_[h+2])*N,R+=(ie.a=B=_[h+3])*N,M+=Z,A+=X,z+=J,U+=B,ie=ie.next;for(ae=K,ue=re,v=0;v<k;v++)_[g+3]=B=R*$>>ne,B!==0?(B=255/B,_[g]=(y*$>>ne)*B,_[g+1]=(E*$>>ne)*B,_[g+2]=(L*$>>ne)*B):_[g]=_[g+1]=_[g+2]=0,y-=D,E-=O,L-=S,R-=T,D-=ae.r,O-=ae.g,S-=ae.b,T-=ae.a,h=b+((h=v+m+1)<H?h:H)<<2,M+=ae.r=_[h],A+=ae.g=_[h+1],z+=ae.b=_[h+2],U+=ae.a=_[h+3],y+=M,E+=A,L+=z,R+=U,ae=ae.next,D+=Z=ue.r,O+=X=ue.g,S+=J=ue.b,T+=B=ue.a,M-=Z,A-=X,z-=J,U-=B,ue=ue.next,g+=4;b+=k}for(v=0;v<k;v++){for(A=z=U=M=E=L=R=y=0,g=v<<2,D=ee*(Z=_[g]),O=ee*(X=_[g+1]),S=ee*(J=_[g+2]),T=ee*(B=_[g+3]),y+=V*Z,E+=V*X,L+=V*J,R+=V*B,ie=K,p=0;p<ee;p++)ie.r=Z,ie.g=X,ie.b=J,ie.a=B,ie=ie.next;for(C=k,p=1;p<=m;p++)g=C+v<<2,y+=(ie.r=Z=_[g])*(N=ee-p),E+=(ie.g=X=_[g+1])*N,L+=(ie.b=J=_[g+2])*N,R+=(ie.a=B=_[g+3])*N,M+=Z,A+=X,z+=J,U+=B,ie=ie.next,p<Y&&(C+=k);for(g=v,ae=K,ue=re,w=0;w<x;w++)h=g<<2,_[h+3]=B=R*$>>ne,B>0?(B=255/B,_[h]=(y*$>>ne)*B,_[h+1]=(E*$>>ne)*B,_[h+2]=(L*$>>ne)*B):_[h]=_[h+1]=_[h+2]=0,y-=D,E-=O,L-=S,R-=T,D-=ae.r,O-=ae.g,S-=ae.b,T-=ae.a,h=v+((h=w+ee)<Y?h:Y)*k<<2,y+=M+=ae.r=_[h],E+=A+=ae.g=_[h+1],L+=z+=ae.b=_[h+2],R+=U+=ae.a=_[h+3],ae=ae.next,D+=Z=ue.r,O+=X=ue.g,S+=J=ue.b,T+=B=ue.a,M-=Z,A-=X,z-=J,U-=B,ue=ue.next,g+=k}}const c=function(m){const _=Math.round(this.blurRadius());_>0&&u(m,_)};return Ff.Blur=c,e.Factory.addGetterSetter(i.Node,"blurRadius",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Ff}var zf={},Ey;function H8(){if(Ey)return zf;Ey=1,Object.defineProperty(zf,"__esModule",{value:!0}),zf.Brighten=void 0;const e=jt(),i=Hn(),t=zt(),n=function(a){const l=this.brightness()*255,u=a.data,c=u.length;for(let d=0;d<c;d+=4)u[d]+=l,u[d+1]+=l,u[d+2]+=l};return zf.Brighten=n,e.Factory.addGetterSetter(i.Node,"brightness",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),zf}var Bf={},Oy;function G8(){if(Oy)return Bf;Oy=1,Object.defineProperty(Bf,"__esModule",{value:!0}),Bf.Contrast=void 0;const e=jt(),i=Hn(),t=zt(),n=function(a){const l=Math.pow((this.contrast()+100)/100,2),u=a.data,c=u.length;let d=150,m=150,_=150;for(let k=0;k<c;k+=4)d=u[k],m=u[k+1],_=u[k+2],d/=255,d-=.5,d*=l,d+=.5,d*=255,m/=255,m-=.5,m*=l,m+=.5,m*=255,_/=255,_-=.5,_*=l,_+=.5,_*=255,d=d<0?0:d>255?255:d,m=m<0?0:m>255?255:m,_=_<0?0:_>255?255:_,u[k]=d,u[k+1]=m,u[k+2]=_};return Bf.Contrast=n,e.Factory.addGetterSetter(i.Node,"contrast",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Bf}var Uf={},xy;function V8(){if(xy)return Uf;xy=1,Object.defineProperty(Uf,"__esModule",{value:!0}),Uf.Emboss=void 0;const e=jt(),i=Hn(),t=Nn(),n=zt(),a=function(l){const u=this.embossStrength()*10,c=this.embossWhiteLevel()*255,d=this.embossDirection(),m=this.embossBlend(),_=l.data,k=l.width,x=l.height,v=k*4;let w=0,p=0,h=x;switch(d){case"top-left":w=-1,p=-1;break;case"top":w=-1,p=0;break;case"top-right":w=-1,p=1;break;case"right":w=0,p=1;break;case"bottom-right":w=1,p=1;break;case"bottom":w=1,p=0;break;case"bottom-left":w=1,p=-1;break;case"left":w=0,p=-1;break;default:t.Util.error("Unknown emboss direction: "+d)}do{const C=(h-1)*v;let g=w;h+g<1&&(g=0),h+g>x&&(g=0);const b=(h-1+g)*k*4;let y=k;do{const E=C+(y-1)*4;let L=p;y+L<1&&(L=0),y+L>k&&(L=0);const R=b+(y-1+L)*4,D=_[E]-_[R],O=_[E+1]-_[R+1],S=_[E+2]-_[R+2];let T=D;const M=T>0?T:-T,A=O>0?O:-O,z=S>0?S:-S;if(A>M&&(T=O),z>M&&(T=S),T*=u,m){const U=_[E]+T,Z=_[E+1]+T,X=_[E+2]+T;_[E]=U>255?255:U<0?0:U,_[E+1]=Z>255?255:Z<0?0:Z,_[E+2]=X>255?255:X<0?0:X}else{let U=c-T;U<0?U=0:U>255&&(U=255),_[E]=_[E+1]=_[E+2]=U}}while(--y)}while(--h)};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",void 0,e.Factory.afterSetFilter),e.Factory.addGetterSetter(i.Node,"embossBlend",!1,void 0,e.Factory.afterSetFilter),Uf}var qf={},Py;function $8(){if(Py)return qf;Py=1,Object.defineProperty(qf,"__esModule",{value:!0}),qf.Enhance=void 0;const e=jt(),i=Hn(),t=zt();function n(l,u,c,d,m){const _=c-u,k=m-d;if(_===0)return d+k/2;if(k===0)return d;let x=(l-u)/_;return x=k*x+d,x}const a=function(l){const u=l.data,c=u.length;let d=u[0],m=d,_,k=u[1],x=k,v,w=u[2],p=w,h;const C=this.enhance();if(C===0)return;for(let T=0;T<c;T+=4)_=u[T+0],_<d?d=_:_>m&&(m=_),v=u[T+1],v<k?k=v:v>x&&(x=v),h=u[T+2],h<w?w=h:h>p&&(p=h);m===d&&(m=255,d=0),x===k&&(x=255,k=0),p===w&&(p=255,w=0);let g,b,y,E,L,R,D,O,S;C>0?(b=m+C*(255-m),y=d-C*(d-0),L=x+C*(255-x),R=k-C*(k-0),O=p+C*(255-p),S=w-C*(w-0)):(g=(m+d)*.5,b=m+C*(m-g),y=d+C*(d-g),E=(x+k)*.5,L=x+C*(x-E),R=k+C*(k-E),D=(p+w)*.5,O=p+C*(p-D),S=w+C*(w-D));for(let T=0;T<c;T+=4)u[T+0]=n(u[T+0],d,m,y,b),u[T+1]=n(u[T+1],k,x,R,L),u[T+2]=n(u[T+2],w,p,S,O)};return qf.Enhance=a,e.Factory.addGetterSetter(i.Node,"enhance",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),qf}var Hf={},Cy;function W8(){if(Cy)return Hf;Cy=1,Object.defineProperty(Hf,"__esModule",{value:!0}),Hf.Grayscale=void 0;const e=function(i){const t=i.data,n=t.length;for(let a=0;a<n;a+=4){const 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={},ky;function Y8(){if(ky)return Gf;ky=1,Object.defineProperty(Gf,"__esModule",{value:!0}),Gf.HSL=void 0;const e=jt(),i=Hn(),t=zt();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){const l=a.data,u=l.length,c=1,d=Math.pow(2,this.saturation()),m=Math.abs(this.hue()+360)%360,_=this.luminance()*127,k=c*d*Math.cos(m*Math.PI/180),x=c*d*Math.sin(m*Math.PI/180),v=.299*c+.701*k+.167*x,w=.587*c-.587*k+.33*x,p=.114*c-.114*k-.497*x,h=.299*c-.299*k-.328*x,C=.587*c+.413*k+.035*x,g=.114*c-.114*k+.293*x,b=.299*c-.3*k+1.25*x,y=.587*c-.586*k-1.05*x,E=.114*c+.886*k-.2*x;let L,R,D,O;for(let S=0;S<u;S+=4)L=l[S+0],R=l[S+1],D=l[S+2],O=l[S+3],l[S+0]=v*L+w*R+p*D+_,l[S+1]=h*L+C*R+g*D+_,l[S+2]=b*L+y*R+E*D+_,l[S+3]=O};return Gf.HSL=n,Gf}var Vf={},Ay;function K8(){if(Ay)return Vf;Ay=1,Object.defineProperty(Vf,"__esModule",{value:!0}),Vf.HSV=void 0;const e=jt(),i=Hn(),t=zt(),n=function(a){const l=a.data,u=l.length,c=Math.pow(2,this.value()),d=Math.pow(2,this.saturation()),m=Math.abs(this.hue()+360)%360,_=c*d*Math.cos(m*Math.PI/180),k=c*d*Math.sin(m*Math.PI/180),x=.299*c+.701*_+.167*k,v=.587*c-.587*_+.33*k,w=.114*c-.114*_-.497*k,p=.299*c-.299*_-.328*k,h=.587*c+.413*_+.035*k,C=.114*c-.114*_+.293*k,g=.299*c-.3*_+1.25*k,b=.587*c-.586*_-1.05*k,y=.114*c+.886*_-.2*k;let E,L,R,D;for(let O=0;O<u;O+=4)E=l[O+0],L=l[O+1],R=l[O+2],D=l[O+3],l[O+0]=x*E+v*L+w*R,l[O+1]=p*E+h*L+C*R,l[O+2]=g*E+b*L+y*R,l[O+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={},Ty;function X8(){if(Ty)return $f;Ty=1,Object.defineProperty($f,"__esModule",{value:!0}),$f.Invert=void 0;const e=function(i){const t=i.data,n=t.length;for(let 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={},Ry;function Z8(){if(Ry)return Wf;Ry=1,Object.defineProperty(Wf,"__esModule",{value:!0}),Wf.Kaleidoscope=void 0;const e=jt(),i=Hn(),t=Nn(),n=zt(),a=function(c,d,m){const _=c.data,k=d.data,x=c.width,v=c.height,w=m.polarCenterX||x/2,p=m.polarCenterY||v/2;let h=Math.sqrt(w*w+p*p),C=x-w,g=v-p;const b=Math.sqrt(C*C+g*g);h=b>h?b:h;const y=v,E=x,L=360/E*Math.PI/180;for(let R=0;R<E;R+=1){const D=Math.sin(R*L),O=Math.cos(R*L);for(let S=0;S<y;S+=1){C=Math.floor(w+h*S/y*O),g=Math.floor(p+h*S/y*D);let T=(g*x+C)*4;const M=_[T+0],A=_[T+1],z=_[T+2],U=_[T+3];T=(R+S*x)*4,k[T+0]=M,k[T+1]=A,k[T+2]=z,k[T+3]=U}}},l=function(c,d,m){const _=c.data,k=d.data,x=c.width,v=c.height,w=m.polarCenterX||x/2,p=m.polarCenterY||v/2;let h=Math.sqrt(w*w+p*p),C=x-w,g=v-p;const b=Math.sqrt(C*C+g*g);h=b>h?b:h;const y=v,E=x,L=0;let R,D;for(C=0;C<x;C+=1)for(g=0;g<v;g+=1){const O=C-w,S=g-p,T=Math.sqrt(O*O+S*S)*y/h;let M=(Math.atan2(S,O)*180/Math.PI+360+L)%360;M=M*E/360,R=Math.floor(M),D=Math.floor(T);let A=(D*x+R)*4;const z=_[A+0],U=_[A+1],Z=_[A+2],X=_[A+3];A=(g*x+C)*4,k[A+0]=z,k[A+1]=U,k[A+2]=Z,k[A+3]=X}},u=function(c){const d=c.width,m=c.height;let _,k,x,v,w,p,h,C,g,b,y=Math.round(this.kaleidoscopePower());const E=Math.round(this.kaleidoscopeAngle()),L=Math.floor(d*(E%360)/360);if(y<1)return;const R=t.Util.createCanvasElement();R.width=d,R.height=m;const D=R.getContext("2d").getImageData(0,0,d,m);t.Util.releaseCanvas(R),a(c,D,{polarCenterX:d/2,polarCenterY:m/2});let O=d/Math.pow(2,y);for(;O<=8;)O=O*2,y-=1;O=Math.ceil(O);let S=O,T=0,M=S,A=1;for(L+O>d&&(T=S,M=0,A=-1),k=0;k<m;k+=1)for(_=T;_!==M;_+=A)x=Math.round(_+L)%d,g=(d*k+x)*4,w=D.data[g+0],p=D.data[g+1],h=D.data[g+2],C=D.data[g+3],b=(d*k+_)*4,D.data[b+0]=w,D.data[b+1]=p,D.data[b+2]=h,D.data[b+3]=C;for(k=0;k<m;k+=1)for(S=Math.floor(O),v=0;v<y;v+=1){for(_=0;_<S+1;_+=1)g=(d*k+_)*4,w=D.data[g+0],p=D.data[g+1],h=D.data[g+2],C=D.data[g+3],b=(d*k+S*2-_-1)*4,D.data[b+0]=w,D.data[b+1]=p,D.data[b+2]=h,D.data[b+3]=C;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={},My;function Q8(){if(My)return Yf;My=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.Mask=void 0;const e=jt(),i=Hn(),t=zt();function n(x,v,w){let p=(w*x.width+v)*4;const h=[];return h.push(x.data[p++],x.data[p++],x.data[p++],x.data[p++]),h}function a(x,v){return Math.sqrt(Math.pow(x[0]-v[0],2)+Math.pow(x[1]-v[1],2)+Math.pow(x[2]-v[2],2))}function l(x){const v=[0,0,0];for(let w=0;w<x.length;w++)v[0]+=x[w][0],v[1]+=x[w][1],v[2]+=x[w][2];return v[0]/=x.length,v[1]/=x.length,v[2]/=x.length,v}function u(x,v){const w=n(x,0,0),p=n(x,x.width-1,0),h=n(x,0,x.height-1),C=n(x,x.width-1,x.height-1),g=v||10;if(a(w,p)<g&&a(p,C)<g&&a(C,h)<g&&a(h,w)<g){const b=l([p,w,C,h]),y=[];for(let E=0;E<x.width*x.height;E++){const L=a(b,[x.data[E*4],x.data[E*4+1],x.data[E*4+2]]);y[E]=L<g?0:255}return y}}function c(x,v){for(let w=0;w<x.width*x.height;w++)x.data[4*w+3]=v[w]}function d(x,v,w){const p=[1,1,1,1,0,1,1,1,1],h=Math.round(Math.sqrt(p.length)),C=Math.floor(h/2),g=[];for(let b=0;b<w;b++)for(let y=0;y<v;y++){const E=b*v+y;let L=0;for(let R=0;R<h;R++)for(let D=0;D<h;D++){const O=b+R-C,S=y+D-C;if(O>=0&&O<w&&S>=0&&S<v){const T=O*v+S,M=p[R*h+D];L+=x[T]*M}}g[E]=L===255*8?255:0}return g}function m(x,v,w){const p=[1,1,1,1,1,1,1,1,1],h=Math.round(Math.sqrt(p.length)),C=Math.floor(h/2),g=[];for(let b=0;b<w;b++)for(let y=0;y<v;y++){const E=b*v+y;let L=0;for(let R=0;R<h;R++)for(let D=0;D<h;D++){const O=b+R-C,S=y+D-C;if(O>=0&&O<w&&S>=0&&S<v){const T=O*v+S,M=p[R*h+D];L+=x[T]*M}}g[E]=L>=255*4?255:0}return g}function _(x,v,w){const p=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],h=Math.round(Math.sqrt(p.length)),C=Math.floor(h/2),g=[];for(let b=0;b<w;b++)for(let y=0;y<v;y++){const E=b*v+y;let L=0;for(let R=0;R<h;R++)for(let D=0;D<h;D++){const O=b+R-C,S=y+D-C;if(O>=0&&O<w&&S>=0&&S<v){const T=O*v+S,M=p[R*h+D];L+=x[T]*M}}g[E]=L}return g}const k=function(x){const v=this.threshold();let w=u(x,v);return w&&(w=d(w,x.width,x.height),w=m(w,x.width,x.height),w=_(w,x.width,x.height),c(x,w)),x};return Yf.Mask=k,e.Factory.addGetterSetter(i.Node,"threshold",0,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Yf}var Kf={},Ly;function J8(){if(Ly)return Kf;Ly=1,Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.Noise=void 0;const e=jt(),i=Hn(),t=zt(),n=function(a){const l=this.noise()*255,u=a.data,c=u.length,d=l/2;for(let m=0;m<c;m+=4)u[m+0]+=d-2*d*Math.random(),u[m+1]+=d-2*d*Math.random(),u[m+2]+=d-2*d*Math.random()};return Kf.Noise=n,e.Factory.addGetterSetter(i.Node,"noise",.2,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Kf}var Xf={},Ny;function e9(){if(Ny)return Xf;Ny=1,Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.Pixelate=void 0;const e=jt(),i=Nn(),t=Hn(),n=zt(),a=function(l){let u=Math.ceil(this.pixelSize()),c=l.width,d=l.height,m,_,k,x,v,w,p,h=Math.ceil(c/u),C=Math.ceil(d/u),g,b,y,E,L,R,D,O=l.data;if(u<=0){i.Util.error("pixelSize value can not be <= 0");return}for(L=0;L<h;L+=1)for(R=0;R<C;R+=1){for(x=0,v=0,w=0,p=0,g=L*u,b=g+u,y=R*u,E=y+u,D=0,m=g;m<b;m+=1)if(!(m>=c))for(_=y;_<E;_+=1)_>=d||(k=(c*_+m)*4,x+=O[k+0],v+=O[k+1],w+=O[k+2],p+=O[k+3],D+=1);for(x=x/D,v=v/D,w=w/D,p=p/D,m=g;m<b;m+=1)if(!(m>=c))for(_=y;_<E;_+=1)_>=d||(k=(c*_+m)*4,O[k+0]=x,O[k+1]=v,O[k+2]=w,O[k+3]=p)}};return Xf.Pixelate=a,e.Factory.addGetterSetter(t.Node,"pixelSize",8,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),Xf}var Zf={},Iy;function t9(){if(Iy)return Zf;Iy=1,Object.defineProperty(Zf,"__esModule",{value:!0}),Zf.Posterize=void 0;const e=jt(),i=Hn(),t=zt(),n=function(a){const l=Math.round(this.levels()*254)+1,u=a.data,c=u.length,d=255/l;for(let m=0;m<c;m+=1)u[m]=Math.floor(u[m]/d)*d};return Zf.Posterize=n,e.Factory.addGetterSetter(i.Node,"levels",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),Zf}var Qf={},Dy;function n9(){if(Dy)return Qf;Dy=1,Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.RGB=void 0;const e=jt(),i=Hn(),t=zt(),n=function(a){const l=a.data,u=l.length,c=this.red(),d=this.green(),m=this.blue();for(let _=0;_<u;_+=4){const k=(.34*l[_]+.5*l[_+1]+.16*l[_+2])/255;l[_]=k*c,l[_+1]=k*d,l[_+2]=k*m,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={},jy;function r9(){if(jy)return Jf;jy=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.RGBA=void 0;const e=jt(),i=Hn(),t=zt(),n=function(a){const l=a.data,u=l.length,c=this.red(),d=this.green(),m=this.blue(),_=this.alpha();for(let k=0;k<u;k+=4){const x=1-_;l[k]=c*_+l[k]*x,l[k+1]=d*_+l[k+1]*x,l[k+2]=m*_+l[k+2]*x}};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={},Fy;function i9(){if(Fy)return ed;Fy=1,Object.defineProperty(ed,"__esModule",{value:!0}),ed.Sepia=void 0;const e=function(i){const t=i.data,n=t.length;for(let a=0;a<n;a+=4){const 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={},zy;function o9(){if(zy)return td;zy=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 d=n;do{const m=c+(d-1)*4;let _=t[m],k=t[m+1],x=t[m+2];_>127&&(_=255-_),k>127&&(k=255-k),x>127&&(x=255-x),t[m]=_,t[m+1]=k,t[m+2]=x}while(--d)}while(--u)};return td.Solarize=e,td}var nd={},By;function a9(){if(By)return nd;By=1,Object.defineProperty(nd,"__esModule",{value:!0}),nd.Threshold=void 0;const e=jt(),i=Hn(),t=zt(),n=function(a){const l=this.threshold()*255,u=a.data,c=u.length;for(let d=0;d<c;d+=1)u[d]=u[d]<l?0:255};return nd.Threshold=n,e.Factory.addGetterSetter(i.Node,"threshold",.5,(0,t.getNumberValidator)(),e.Factory.afterSetFilter),nd}var Uy;function l9(){if(Uy)return vf;Uy=1,Object.defineProperty(vf,"__esModule",{value:!0}),vf.Konva=void 0;const e=Bg(),i=k8(),t=T8(),n=R8(),a=M8(),l=L8(),u=N8(),c=z5(),d=gv(),m=B5(),_=I8(),k=D8(),x=j8(),v=F8(),w=U5(),p=z8(),h=B8(),C=U8(),g=q8(),b=H8(),y=G8(),E=V8(),L=$8(),R=W8(),D=Y8(),O=K8(),S=X8(),T=Z8(),M=Q8(),A=J8(),z=e9(),U=t9(),Z=n9(),X=r9(),J=i9(),B=o9(),N=a9();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:d.Path,Rect:m.Rect,RegularPolygon:_.RegularPolygon,Ring:k.Ring,Sprite:x.Sprite,Star:v.Star,Text:w.Text,TextPath:p.TextPath,Transformer:h.Transformer,Wedge:C.Wedge,Filters:{Blur:g.Blur,Brighten:b.Brighten,Contrast:y.Contrast,Emboss:E.Emboss,Enhance:L.Enhance,Grayscale:R.Grayscale,HSL:D.HSL,HSV:O.HSV,Invert:S.Invert,Kaleidoscope:T.Kaleidoscope,Mask:M.Mask,Noise:A.Noise,Pixelate:z.Pixelate,Posterize:U.Posterize,RGB:Z.RGB,RGBA:X.RGBA,Sepia:J.Sepia,Solarize:B.Solarize,Threshold:N.Threshold}}),vf}var s9=rp.exports,qy;function Ji(){if(qy)return rp.exports;qy=1,Object.defineProperty(s9,"__esModule",{value:!0});const e=l9();return rp.exports=e.Konva,rp.exports}Ji();var Zh={exports:{}},Hy;function u9(){return Hy||(Hy=1,function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.Konva=void 0;var t=Bg();Object.defineProperty(i,"Konva",{enumerable:!0,get:function(){return t.Konva}});const n=Bg();e.exports=n.Konva}(Zh,Zh.exports)),Zh.exports}var c9=u9();const xd=Td(c9);var G0={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 V0,Gy;function f9(){return Gy||(Gy=1,V0=function(i){var t={},n=An(),a=Gg(),l=Object.assign;function u(s){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+s,I=1;I<arguments.length;I++)f+="&args[]="+encodeURIComponent(arguments[I]);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,d=Symbol.for("react.element"),m=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),w=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),E=Symbol.iterator;function L(s){return s===null||typeof s!="object"?null:(s=E&&s[E]||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 m:return"Portal";case x:return"Profiler";case k:return"StrictMode";case h:return"Suspense";case C:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case w:return(s.displayName||"Context")+".Consumer";case v:return(s._context.displayName||"Context")+".Provider";case p:var f=s.render;return s=s.displayName,s||(s=f.displayName||f.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case g:return f=s.displayName||null,f!==null?f:R(s.type)||"Memo";case b: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 O(s){var f=s,I=s;if(s.alternate)for(;f.return;)f=f.return;else{s=f;do f=s,f.flags&4098&&(I=f.return),s=f.return;while(s)}return f.tag===3?I:null}function S(s){if(O(s)!==s)throw Error(u(188))}function T(s){var f=s.alternate;if(!f){if(f=O(s),f===null)throw Error(u(188));return f!==s?null:s}for(var I=s,q=f;;){var W=I.return;if(W===null)break;var te=W.alternate;if(te===null){if(q=W.return,q!==null){I=q;continue}break}if(W.child===te.child){for(te=W.child;te;){if(te===I)return S(W),s;if(te===q)return S(W),f;te=te.sibling}throw Error(u(188))}if(I.return!==q.return)I=W,q=te;else{for(var le=!1,ye=W.child;ye;){if(ye===I){le=!0,I=W,q=te;break}if(ye===q){le=!0,q=W,I=te;break}ye=ye.sibling}if(!le){for(ye=te.child;ye;){if(ye===I){le=!0,I=te,q=W;break}if(ye===q){le=!0,q=te,I=W;break}ye=ye.sibling}if(!le)throw Error(u(189))}}if(I.alternate!==q)throw Error(u(190))}if(I.tag!==3)throw Error(u(188));return I.stateNode.current===I?s:f}function M(s){return s=T(s),s!==null?A(s):null}function A(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var f=A(s);if(f!==null)return f;s=s.sibling}return null}function z(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){if(s.tag!==4){var f=z(s);if(f!==null)return f}s=s.sibling}return null}var U=Array.isArray,Z=i.getPublicInstance,X=i.getRootHostContext,J=i.getChildHostContext,B=i.prepareForCommit,N=i.resetAfterCommit,F=i.createInstance,H=i.appendInitialChild,Y=i.finalizeInitialChildren,ee=i.prepareUpdate,V=i.shouldSetTextContent,K=i.createTextInstance,$=i.scheduleTimeout,ne=i.cancelTimeout,re=i.noTimeout,ie=i.isPrimaryRenderer,ae=i.supportsMutation,ue=i.supportsPersistence,de=i.supportsHydration,he=i.getInstanceFromNode,Se=i.preparePortalMount,me=i.getCurrentEventPriority,ke=i.detachDeletedInstance,fe=i.supportsMicrotasks,ge=i.scheduleMicrotask,Ce=i.supportsTestSelectors,Te=i.findFiberRoot,se=i.getBoundingRect,be=i.getTextContent,xe=i.isHiddenSubtree,Ie=i.matchAccessibilityRole,at=i.setFocusIfFocusable,gt=i.setupIntersectionObserver,je=i.appendChild,ze=i.appendChildToContainer,He=i.commitTextUpdate,Xe=i.commitMount,et=i.commitUpdate,Pt=i.insertBefore,wt=i.insertInContainerBefore,we=i.removeChild,Ee=i.removeChildFromContainer,vt=i.resetTextContent,Ct=i.hideInstance,Ne=i.hideTextInstance,Ge=i.unhideInstance,it=i.unhideTextInstance,De=i.clearContainer,mt=i.cloneInstance,Fe=i.createContainerChildSet,ht=i.appendChildToContainerChildSet,_n=i.finalizeContainerChildren,Be=i.replaceContainerChildren,st=i.cloneHiddenInstance,_t=i.cloneHiddenTextInstance,Bt=i.canHydrateInstance,Ht=i.canHydrateTextInstance,hn=i.canHydrateSuspenseInstance,In=i.isSuspenseInstancePending,wn=i.isSuspenseInstanceFallback,Qn=i.getSuspenseInstanceFallbackErrorDetails,ii=i.registerSuspenseInstanceRetry,Sr=i.getNextHydratableSibling,Ze=i.getFirstHydratableChild,Et=i.getFirstHydratableChildWithinContainer,Mt=i.getFirstHydratableChildWithinSuspenseInstance,Vt=i.hydrateInstance,$t=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,Jt=i.didNotMatchHydratedTextInstance,to;function Dr(s){if(to===void 0)try{throw Error()}catch(I){var f=I.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 I=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($e){var q=$e}Reflect.construct(s,[],f)}else{try{f.call()}catch($e){q=$e}s.call(f.prototype)}else{try{throw Error()}catch($e){q=$e}s()}}catch($e){if($e&&q&&typeof $e.stack=="string"){for(var W=$e.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=I}return(s=s?s.displayName||s.name:"")?Dr(s):""}var Vp=Object.prototype.hasOwnProperty,Qs=[],ro=-1;function er(s){return{current:s}}function un(s){0>ro||(s.current=Qs[ro],Qs[ro]=null,ro--)}function Nt(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 I=s.type.contextTypes;if(!I)return Io;var q=s.stateNode;if(q&&q.__reactInternalMemoizedUnmaskedChildContext===f)return q.__reactInternalMemoizedMaskedChildContext;var W={},te;for(te in I)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(){un(jr),un(fr)}function Gd(s,f,I){if(fr.current!==Io)throw Error(u(168));Nt(fr,f),Nt(jr,I)}function Vd(s,f,I){var q=s.stateNode;if(f=f.childContextTypes,typeof q.getChildContext!="function")return I;q=q.getChildContext();for(var W in q)if(!(W in f))throw Error(u(108,D(s)||"Unknown",W));return l({},I,q)}function tl(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Io,Di=fr.current,Nt(fr,s),Nt(jr,jr.current),!0}function Ec(s,f,I){var q=s.stateNode;if(!q)throw Error(u(169));I?(s=Vd(s,f,Di),q.__reactInternalMemoizedMergedChildContext=s,un(jr),un(fr),Nt(fr,s)):un(jr),Nt(jr,I)}var Gr=Math.clz32?Math.clz32:Oc,is=Math.log,$p=Math.LN2;function Oc(s){return s>>>=0,s===0?32:31-(is(s)/$p|0)|0}var Gt=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 I=s.pendingLanes;if(I===0)return 0;var q=0,W=s.suspendedLanes,te=s.pingedLanes,le=I&268435455;if(le!==0){var ye=le&~W;ye!==0?q=nl(ye):(te&=le,te!==0&&(q=nl(te)))}else le=I&~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|=I&16),f=s.entangledLanes,f!==0)for(s=s.entanglements,f&=q;0<f;)I=31-Gr(f),W=1<<I,q|=s[I],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 I=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&I)||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=Gt;return Gt<<=1,!(Gt&4194240)&&(Gt=64),s}function il(s){for(var f=[],I=0;31>I;I++)f.push(s);return f}function ai(s,f,I){s.pendingLanes|=f,f!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,f=31-Gr(f),s[f]=I}function Do(s,f){var I=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<I;){var W=31-Gr(I),te=1<<W;f[W]=0,q[W]=-1,s[W]=-1,I&=~te}}function ji(s,f){var I=s.entangledLanes|=f;for(s=s.entanglements;I;){var q=31-Gr(I),W=1<<q;W&f|s[q]&f&&(s[q]|=f),I&=~W}}var It=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,Wp=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=It;try{var I=oo;for(It=1;s<I.length;s++){var q=I[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{It=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,I){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),I+=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|I<<W|q,Si=te+s}else zr=1<<te|I<<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,cn=!1,cs=!1,Oi=null;function Qd(s,f){var I=ti(5,null,null,0);I.elementType="DELETED",I.stateNode=f,I.return=s,f=s.deletions,f===null?(s.deletions=[I],s.flags|=16):f.push(I)}function au(s,f){switch(s.tag){case 5:return f=Bt(f,s.type,s.pendingProps),f!==null?(s.stateNode=f,nr=s,Or=Ze(f),!0):!1;case 6:return f=Ht(f,s.pendingProps),f!==null?(s.stateNode=f,nr=s,Or=null,!0):!1;case 13:if(f=hn(f),f!==null){var I=Dn!==null?{id:zr,overflow:Si}:null;return s.memoizedState={dehydrated:f,treeContext:I,retryLane:1073741824},I=ti(18,null,null,0),I.stateNode=f,I.return=s,s.child=I,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(cn){var f=Or;if(f){var I=f;if(!au(s,f)){if(xc(s))throw Error(u(418));f=Sr(I);var q=nr;f&&au(s,f)?Qd(q,I):(s.flags=s.flags&-4097|2,cn=!1,nr=s)}}else{if(xc(s))throw Error(u(418));s.flags=s.flags&-4097|2,cn=!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(!cn)return Jd(s),cn=!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=cn=!1)}function Cc(s){Oi===null?Oi=[s]:Oi.push(s)}var Yp=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 I=Object.keys(s),q=Object.keys(f);if(I.length!==q.length)return!1;for(q=0;q<I.length;q++){var W=I[q];if(!Vp.call(f,W)||!wi(s[W],f[W]))return!1}return!0}function Kp(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,I){if(s=I.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(I._owner){if(I=I._owner,I){if(I.tag!==1)throw Error(u(309));var q=I.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(!I._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(Ae,_e){if(s){var Le=Ae.deletions;Le===null?(Ae.deletions=[_e],Ae.flags|=16):Le.push(_e)}}function I(Ae,_e){if(!s)return null;for(;_e!==null;)f(Ae,_e),_e=_e.sibling;return null}function q(Ae,_e){for(Ae=new Map;_e!==null;)_e.key!==null?Ae.set(_e.key,_e):Ae.set(_e.index,_e),_e=_e.sibling;return Ae}function W(Ae,_e){return Ae=na(Ae,_e),Ae.index=0,Ae.sibling=null,Ae}function te(Ae,_e,Le){return Ae.index=Le,s?(Le=Ae.alternate,Le!==null?(Le=Le.index,Le<_e?(Ae.flags|=2,_e):Le):(Ae.flags|=2,_e)):(Ae.flags|=1048576,_e)}function le(Ae){return s&&Ae.alternate===null&&(Ae.flags|=2),Ae}function ye(Ae,_e,Le,Je){return _e===null||_e.tag!==6?(_e=Ll(Le,Ae.mode,Je),_e.return=Ae,_e):(_e=W(_e,Le),_e.return=Ae,_e)}function Me(Ae,_e,Le,Je){var pt=Le.type;return pt===_?rt(Ae,_e,Le.props.children,Je,Le.key):_e!==null&&(_e.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===b&&th(pt)===_e.type)?(Je=W(_e,Le.props),Je.ref=ma(Ae,_e,Le),Je.return=Ae,Je):(Je=Uu(Le.type,Le.key,Le.props,null,Ae.mode,Je),Je.ref=ma(Ae,_e,Le),Je.return=Ae,Je)}function $e(Ae,_e,Le,Je){return _e===null||_e.tag!==4||_e.stateNode.containerInfo!==Le.containerInfo||_e.stateNode.implementation!==Le.implementation?(_e=qu(Le,Ae.mode,Je),_e.return=Ae,_e):(_e=W(_e,Le.children||[]),_e.return=Ae,_e)}function rt(Ae,_e,Le,Je,pt){return _e===null||_e.tag!==7?(_e=or(Le,Ae.mode,Je,pt),_e.return=Ae,_e):(_e=W(_e,Le),_e.return=Ae,_e)}function Ot(Ae,_e,Le){if(typeof _e=="string"&&_e!==""||typeof _e=="number")return _e=Ll(""+_e,Ae.mode,Le),_e.return=Ae,_e;if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case d:return Le=Uu(_e.type,_e.key,_e.props,null,Ae.mode,Le),Le.ref=ma(Ae,null,_e),Le.return=Ae,Le;case m:return _e=qu(_e,Ae.mode,Le),_e.return=Ae,_e;case b:var Je=_e._init;return Ot(Ae,Je(_e._payload),Le)}if(U(_e)||L(_e))return _e=or(_e,Ae.mode,Le,null),_e.return=Ae,_e;uu(Ae,_e)}return null}function Qe(Ae,_e,Le,Je){var pt=_e!==null?_e.key:null;if(typeof Le=="string"&&Le!==""||typeof Le=="number")return pt!==null?null:ye(Ae,_e,""+Le,Je);if(typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case d:return Le.key===pt?Me(Ae,_e,Le,Je):null;case m:return Le.key===pt?$e(Ae,_e,Le,Je):null;case b:return pt=Le._init,Qe(Ae,_e,pt(Le._payload),Je)}if(U(Le)||L(Le))return pt!==null?null:rt(Ae,_e,Le,Je,null);uu(Ae,Le)}return null}function ln(Ae,_e,Le,Je,pt){if(typeof Je=="string"&&Je!==""||typeof Je=="number")return Ae=Ae.get(Le)||null,ye(_e,Ae,""+Je,pt);if(typeof Je=="object"&&Je!==null){switch(Je.$$typeof){case d:return Ae=Ae.get(Je.key===null?Le:Je.key)||null,Me(_e,Ae,Je,pt);case m:return Ae=Ae.get(Je.key===null?Le:Je.key)||null,$e(_e,Ae,Je,pt);case b:var Rt=Je._init;return ln(Ae,_e,Le,Rt(Je._payload),pt)}if(U(Je)||L(Je))return Ae=Ae.get(Le)||null,rt(_e,Ae,Je,pt,null);uu(_e,Je)}return null}function Zt(Ae,_e,Le,Je){for(var pt=null,Rt=null,xt=_e,Ut=_e=0,Un=null;xt!==null&&Ut<Le.length;Ut++){xt.index>Ut?(Un=xt,xt=null):Un=xt.sibling;var Ft=Qe(Ae,xt,Le[Ut],Je);if(Ft===null){xt===null&&(xt=Un);break}s&&xt&&Ft.alternate===null&&f(Ae,xt),_e=te(Ft,_e,Ut),Rt===null?pt=Ft:Rt.sibling=Ft,Rt=Ft,xt=Un}if(Ut===Le.length)return I(Ae,xt),cn&&Ei(Ae,Ut),pt;if(xt===null){for(;Ut<Le.length;Ut++)xt=Ot(Ae,Le[Ut],Je),xt!==null&&(_e=te(xt,_e,Ut),Rt===null?pt=xt:Rt.sibling=xt,Rt=xt);return cn&&Ei(Ae,Ut),pt}for(xt=q(Ae,xt);Ut<Le.length;Ut++)Un=ln(xt,Ae,Ut,Le[Ut],Je),Un!==null&&(s&&Un.alternate!==null&&xt.delete(Un.key===null?Ut:Un.key),_e=te(Un,_e,Ut),Rt===null?pt=Un:Rt.sibling=Un,Rt=Un);return s&&xt.forEach(function(mr){return f(Ae,mr)}),cn&&Ei(Ae,Ut),pt}function Tr(Ae,_e,Le,Je){var pt=L(Le);if(typeof pt!="function")throw Error(u(150));if(Le=pt.call(Le),Le==null)throw Error(u(151));for(var Rt=pt=null,xt=_e,Ut=_e=0,Un=null,Ft=Le.next();xt!==null&&!Ft.done;Ut++,Ft=Le.next()){xt.index>Ut?(Un=xt,xt=null):Un=xt.sibling;var mr=Qe(Ae,xt,Ft.value,Je);if(mr===null){xt===null&&(xt=Un);break}s&&xt&&mr.alternate===null&&f(Ae,xt),_e=te(mr,_e,Ut),Rt===null?pt=mr:Rt.sibling=mr,Rt=mr,xt=Un}if(Ft.done)return I(Ae,xt),cn&&Ei(Ae,Ut),pt;if(xt===null){for(;!Ft.done;Ut++,Ft=Le.next())Ft=Ot(Ae,Ft.value,Je),Ft!==null&&(_e=te(Ft,_e,Ut),Rt===null?pt=Ft:Rt.sibling=Ft,Rt=Ft);return cn&&Ei(Ae,Ut),pt}for(xt=q(Ae,xt);!Ft.done;Ut++,Ft=Le.next())Ft=ln(xt,Ae,Ut,Ft.value,Je),Ft!==null&&(s&&Ft.alternate!==null&&xt.delete(Ft.key===null?Ut:Ft.key),_e=te(Ft,_e,Ut),Rt===null?pt=Ft:Rt.sibling=Ft,Rt=Ft);return s&&xt.forEach(function(e0){return f(Ae,e0)}),cn&&Ei(Ae,Ut),pt}function Wi(Ae,_e,Le,Je){if(typeof Le=="object"&&Le!==null&&Le.type===_&&Le.key===null&&(Le=Le.props.children),typeof Le=="object"&&Le!==null){switch(Le.$$typeof){case d:e:{for(var pt=Le.key,Rt=_e;Rt!==null;){if(Rt.key===pt){if(pt=Le.type,pt===_){if(Rt.tag===7){I(Ae,Rt.sibling),_e=W(Rt,Le.props.children),_e.return=Ae,Ae=_e;break e}}else if(Rt.elementType===pt||typeof pt=="object"&&pt!==null&&pt.$$typeof===b&&th(pt)===Rt.type){I(Ae,Rt.sibling),_e=W(Rt,Le.props),_e.ref=ma(Ae,Rt,Le),_e.return=Ae,Ae=_e;break e}I(Ae,Rt);break}else f(Ae,Rt);Rt=Rt.sibling}Le.type===_?(_e=or(Le.props.children,Ae.mode,Je,Le.key),_e.return=Ae,Ae=_e):(Je=Uu(Le.type,Le.key,Le.props,null,Ae.mode,Je),Je.ref=ma(Ae,_e,Le),Je.return=Ae,Ae=Je)}return le(Ae);case m:e:{for(Rt=Le.key;_e!==null;){if(_e.key===Rt)if(_e.tag===4&&_e.stateNode.containerInfo===Le.containerInfo&&_e.stateNode.implementation===Le.implementation){I(Ae,_e.sibling),_e=W(_e,Le.children||[]),_e.return=Ae,Ae=_e;break e}else{I(Ae,_e);break}else f(Ae,_e);_e=_e.sibling}_e=qu(Le,Ae.mode,Je),_e.return=Ae,Ae=_e}return le(Ae);case b:return Rt=Le._init,Wi(Ae,_e,Rt(Le._payload),Je)}if(U(Le))return Zt(Ae,_e,Le,Je);if(L(Le))return Tr(Ae,_e,Le,Je);uu(Ae,Le)}return typeof Le=="string"&&Le!==""||typeof Le=="number"?(Le=""+Le,_e!==null&&_e.tag===6?(I(Ae,_e.sibling),_e=W(_e,Le),_e.return=Ae,Ae=_e):(I(Ae,_e),_e=Ll(Le,Ae.mode,Je),_e.return=Ae,Ae=_e),le(Ae)):I(Ae,_e)}return Wi}var ya=nh(!0),rh=nh(!1),cu=er(null),fu=null,ul=null,kc=null;function Ac(){kc=ul=fu=null}function ih(s,f,I){ie?(Nt(cu,f._currentValue),f._currentValue=I):(Nt(cu,f._currentValue2),f._currentValue2=I)}function fs(s){var f=cu.current;un(cu),ie?s._currentValue=f:s._currentValue2=f}function ba(s,f,I){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===I)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 Tc(s,f,I,q){var W=f.interleaved;return W===null?(I.next=I,du(f)):(I.next=W.next,W.next=I),f.interleaved=I,xi(s,q)}function xi(s,f){s.lanes|=f;var I=s.alternate;for(I!==null&&(I.lanes|=f),I=s,s=s.return;s!==null;)s.childLanes|=f,I=s.alternate,I!==null&&(I.childLanes|=f),I=s,s=s.return;return I.tag===3?I.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,I){var q=s.updateQueue;if(q===null)return null;if(q=q.shared,kt&2){var W=q.pending;return W===null?f.next=f:(f.next=W.next,W.next=f),q.pending=f,xi(s,I)}return W=q.interleaved,W===null?(f.next=f,du(q)):(f.next=W.next,W.next=f),q.interleaved=f,xi(s,I)}function ds(s,f,I){if(f=f.updateQueue,f!==null&&(f=f.shared,(I&4194240)!==0)){var q=f.lanes;q&=s.pendingLanes,I|=q,f.lanes=I,ji(s,I)}}function fl(s,f){var I=s.updateQueue,q=s.alternate;if(q!==null&&(q=q.updateQueue,I===q)){var W=null,te=null;if(I=I.firstBaseUpdate,I!==null){do{var le={eventTime:I.eventTime,lane:I.lane,tag:I.tag,payload:I.payload,callback:I.callback,next:null};te===null?W=te=le:te=te.next=le,I=I.next}while(I!==null);te===null?W=te=f:te=te.next=f}else W=te=f;I={baseState:q.baseState,firstBaseUpdate:W,lastBaseUpdate:te,shared:q.shared,effects:q.effects},s.updateQueue=I;return}s=I.lastBaseUpdate,s===null?I.firstBaseUpdate=f:s.next=f,I.lastBaseUpdate=f}function Bo(s,f,I,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,$e=Me.next;Me.next=null,le===null?te=$e:le.next=$e,le=Me;var rt=s.alternate;rt!==null&&(rt=rt.updateQueue,ye=rt.lastBaseUpdate,ye!==le&&(ye===null?rt.firstBaseUpdate=$e:ye.next=$e,rt.lastBaseUpdate=Me))}if(te!==null){var Ot=W.baseState;le=0,rt=$e=Me=null,ye=te;do{var Qe=ye.lane,ln=ye.eventTime;if((q&Qe)===Qe){rt!==null&&(rt=rt.next={eventTime:ln,lane:0,tag:ye.tag,payload:ye.payload,callback:ye.callback,next:null});e:{var Zt=s,Tr=ye;switch(Qe=f,ln=I,Tr.tag){case 1:if(Zt=Tr.payload,typeof Zt=="function"){Ot=Zt.call(ln,Ot,Qe);break e}Ot=Zt;break e;case 3:Zt.flags=Zt.flags&-65537|128;case 0:if(Zt=Tr.payload,Qe=typeof Zt=="function"?Zt.call(ln,Ot,Qe):Zt,Qe==null)break e;Ot=l({},Ot,Qe);break e;case 2:Wr=!0}}ye.callback!==null&&ye.lane!==0&&(s.flags|=64,Qe=W.effects,Qe===null?W.effects=[ye]:Qe.push(ye))}else ln={eventTime:ln,lane:Qe,tag:ye.tag,payload:ye.payload,callback:ye.callback,next:null},rt===null?($e=rt=ln,Me=Ot):rt=rt.next=ln,le|=Qe;if(ye=ye.next,ye===null){if(ye=W.shared.pending,ye===null)break;Qe=ye,ye=Qe.next,Qe.next=null,W.lastBaseUpdate=Qe,W.shared.pending=null}}while(!0);if(rt===null&&(Me=Ot),W.baseState=Me,W.firstBaseUpdate=$e,W.lastBaseUpdate=rt,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=Ot}}function ah(s,f,I){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=I,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){Nt(qo,f),Nt(dl,s),Nt(li,Uo),s=X(f),un(li),Nt(li,s)}function _a(){un(li),un(dl),un(qo)}function Mc(s){var f=si(qo.current),I=si(li.current);f=J(I,s.type,f),I!==f&&(Nt(dl,s),Nt(li,f))}function Lc(s){dl.current===s&&(un(li),un(dl))}var En=er(0);function pu(s){for(var f=s;f!==null;){if(f.tag===13){var I=f.memoizedState;if(I!==null&&(I=I.dehydrated,I===null||In(I)||wn(I)))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,pn=null,Tn=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 I=0;I<f.length&&I<s.length;I++)if(!wi(s[I],f[I]))return!1;return!0}function gs(s,f,I,q,W,te){if(Ho=te,pn=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,Br.current=s===null||s.memoizedState===null?Vc:$c,s=I(q,W),hs){te=0;do{if(hs=!1,ps=0,25<=te)throw Error(u(301));te+=1,jn=Tn=null,f.updateQueue=null,Br.current=Wc,s=I(q,W)}while(hs)}if(Br.current=Ca,f=Tn!==null&&Tn.next!==null,Ho=0,jn=Tn=pn=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?pn.memoizedState=jn=s:jn=jn.next=s,jn}function rr(){if(Tn===null){var s=pn.alternate;s=s!==null?s.memoizedState:null}else s=Tn.next;var f=jn===null?pn.memoizedState:jn.next;if(f!==null)jn=f,Tn=s;else{if(s===null)throw Error(u(310));Tn=s,s={memoizedState:Tn.memoizedState,baseState:Tn.baseState,baseQueue:Tn.baseQueue,queue:Tn.queue,next:null},jn===null?pn.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(),I=f.queue;if(I===null)throw Error(u(311));I.lastRenderedReducer=s;var q=Tn,W=q.baseQueue,te=I.pending;if(te!==null){if(W!==null){var le=W.next;W.next=te.next,te.next=le}q.baseQueue=W=te,I.pending=null}if(W!==null){te=W.next,q=q.baseState;var ye=le=null,Me=null,$e=te;do{var rt=$e.lane;if((Ho&rt)===rt)Me!==null&&(Me=Me.next={lane:0,action:$e.action,hasEagerState:$e.hasEagerState,eagerState:$e.eagerState,next:null}),q=$e.hasEagerState?$e.eagerState:s(q,$e.action);else{var Ot={lane:rt,action:$e.action,hasEagerState:$e.hasEagerState,eagerState:$e.eagerState,next:null};Me===null?(ye=Me=Ot,le=q):Me=Me.next=Ot,pn.lanes|=rt,po|=rt}$e=$e.next}while($e!==null&&$e!==te);Me===null?le=q:Me.next=ye,wi(q,f.memoizedState)||(Fn=!0),f.memoizedState=q,f.baseState=le,f.baseQueue=Me,I.lastRenderedState=q}if(s=I.interleaved,s!==null){W=s;do te=W.lane,pn.lanes|=te,po|=te,W=W.next;while(W!==s)}else W===null&&(I.lanes=0);return[f.memoizedState,I.dispatch]}function gl(s){var f=rr(),I=f.queue;if(I===null)throw Error(u(311));I.lastRenderedReducer=s;var q=I.dispatch,W=I.pending,te=f.memoizedState;if(W!==null){I.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),I.lastRenderedState=te}return[te,q]}function Dc(){}function jc(s,f){var I=pn,q=rr(),W=f(),te=!wi(q.memoizedState,W);if(te&&(q.memoizedState=W,Fn=!0),q=q.queue,bu(Bc.bind(null,I,q,s),[s]),q.getSnapshot!==f||te||jn!==null&&jn.memoizedState.tag&1){if(I.flags|=2048,Oa(9,zc.bind(null,I,q,W,f),void 0,null),tn===null)throw Error(u(349));Ho&30||Fc(I,f,W)}return W}function Fc(s,f,I){s.flags|=16384,s={getSnapshot:f,value:I},f=pn.updateQueue,f===null?(f={lastEffect:null,stores:null},pn.updateQueue=f,f.stores=[s]):(I=f.stores,I===null?f.stores=[s]:I.push(s))}function zc(s,f,I,q){f.value=I,f.getSnapshot=q,Uc(f)&&uo(s)}function Bc(s,f,I){return I(function(){Uc(f)&&uo(s)})}function Uc(s){var f=s.getSnapshot;s=s.value;try{var I=f();return!wi(s,I)}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=Xp.bind(null,pn,s),[f.memoizedState,s]}function Oa(s,f,I,q){return s={tag:s,create:f,destroy:I,deps:q,next:null},f=pn.updateQueue,f===null?(f={lastEffect:null,stores:null},pn.updateQueue=f,f.lastEffect=s.next=s):(I=f.lastEffect,I===null?f.lastEffect=s.next=s:(q=I.next,I.next=s,s.next=q,f.lastEffect=s)),s}function lh(){return rr().memoizedState}function yu(s,f,I,q){var W=Yr();pn.flags|=s,W.memoizedState=Oa(1|f,I,void 0,q===void 0?null:q)}function Go(s,f,I,q){var W=rr();q=q===void 0?null:q;var te=void 0;if(Tn!==null){var le=Tn.memoizedState;if(te=le.destroy,q!==null&&Sa(q,le.deps)){W.memoizedState=Oa(f,I,te,q);return}}pn.flags|=s,W.memoizedState=Oa(1|f,I,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 rn(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,I){return I=I!=null?I.concat([s]):null,Go(4,4,_u.bind(null,f,s),I)}function xa(){}function Hc(s,f){var I=rr();f=f===void 0?null:f;var q=I.memoizedState;return q!==null&&f!==null&&Sa(f,q[1])?q[0]:(I.memoizedState=[s,f],s)}function wu(s,f){var I=rr();f=f===void 0?null:f;var q=I.memoizedState;return q!==null&&f!==null&&Sa(f,q[1])?q[0]:(s=s(),I.memoizedState=[s,f],s)}function vl(s,f,I){return Ho&21?(wi(I,f)||(I=eu(),pn.lanes|=I,po|=I,s.baseState=!0),f):(s.baseState&&(s.baseState=!1,Fn=!0),s.memoizedState=I)}function Su(s,f){var I=It;It=I!==0&&4>I?I:4,s(!0);var q=wa.transition;wa.transition={};try{s(!1),f()}finally{It=I,wa.transition=q}}function Pa(){return rr().memoizedState}function uh(s,f,I){var q=Bn(s);if(I={lane:q,action:I,hasEagerState:!1,eagerState:null,next:null},ch(s))Gc(f,I);else if(I=Tc(s,f,I,q),I!==null){var W=fn();gr(I,s,q,W),ms(I,f,q)}}function Xp(s,f,I){var q=Bn(s),W={lane:q,action:I,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,I);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{}I=Tc(s,f,W,q),I!==null&&(W=fn(),gr(I,s,q,W),ms(I,f,q))}}function ch(s){var f=s.alternate;return s===pn||f!==null&&f===pn}function Gc(s,f){hs=hl=!0;var I=s.pending;I===null?f.next=f:(f.next=I.next,I.next=f),s.pending=f}function ms(s,f,I){if(I&4194240){var q=f.lanes;q&=s.pendingLanes,I|=q,f.lanes=I,ji(s,I)}}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,I){return I=I!=null?I.concat([s]):null,yu(4194308,4,_u.bind(null,f,s),I)},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 I=Yr();return f=f===void 0?null:f,s=s(),I.memoizedState=[s,f],s},useReducer:function(s,f,I){var q=Yr();return f=I!==void 0?I(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,pn,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,I){var q=pn,W=Yr();if(cn){if(I===void 0)throw Error(u(407));I=I()}else{if(I=f(),tn===null)throw Error(u(349));Ho&30||Fc(q,f,I)}W.memoizedState=I;var te={value:I,getSnapshot:f};return W.queue=te,sh(Bc.bind(null,q,te,s),[s]),q.flags|=2048,Oa(9,zc.bind(null,q,te,I,f),void 0,null),I},useId:function(){var s=Yr(),f=tn.identifierPrefix;if(cn){var I=Si,q=zr;I=(q&~(1<<32-Gr(q)-1)).toString(32)+I,f=":"+f+"R"+I,I=ps++,0<I&&(f+="H"+I.toString(32)),f+=":"}else I=pl++,f=":"+f+"r"+I.toString(32)+":";return s.memoizedState=f},unstable_isNewReconciler:!1},$c={readContext:$r,useCallback:Hc,useContext:$r,useEffect:bu,useImperativeHandle:vs,useInsertionEffect:qc,useLayoutEffect:rn,useMemo:wu,useReducer:vu,useRef:lh,useState:function(){return vu(Ea)},useDebugValue:xa,useDeferredValue:function(s){var f=rr();return vl(f,Tn.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:rn,useMemo:wu,useReducer:gl,useRef:lh,useState:function(){return gl(Ea)},useDebugValue:xa,useDeferredValue:function(s){var f=rr();return Tn===null?f.memoizedState=s:vl(f,Tn.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 I in s)f[I]===void 0&&(f[I]=s[I]);return f}return f}function Yc(s,f,I,q){f=s.memoizedState,I=I(q,f),I=I==null?f:l({},f,I),s.memoizedState=I,s.lanes===0&&(s.updateQueue.baseState=I)}var ys={isMounted:function(s){return(s=s._reactInternals)?O(s)===s:!1},enqueueSetState:function(s,f,I){s=s._reactInternals;var q=fn(),W=Bn(s),te=lo(q,W);te.payload=f,I!=null&&(te.callback=I),f=so(s,te,W),f!==null&&(gr(f,s,W,q),ds(f,s,W))},enqueueReplaceState:function(s,f,I){s=s._reactInternals;var q=fn(),W=Bn(s),te=lo(q,W);te.tag=1,te.payload=f,I!=null&&(te.callback=I),f=so(s,te,W),f!==null&&(gr(f,s,W,q),ds(f,s,W))},enqueueForceUpdate:function(s,f){s=s._reactInternals;var I=fn(),q=Bn(s),W=lo(I,q);W.tag=2,f!=null&&(W.callback=f),f=so(s,W,q),f!==null&&(gr(f,s,q,I),ds(f,s,q))}};function fh(s,f,I,q,W,te,le){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(q,te,le):f.prototype&&f.prototype.isPureReactComponent?!su(I,q)||!su(W,te):!0}function dh(s,f,I){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(I,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,I,q){s=f.state,typeof f.componentWillReceiveProps=="function"&&f.componentWillReceiveProps(I,q),typeof f.UNSAFE_componentWillReceiveProps=="function"&&f.UNSAFE_componentWillReceiveProps(I,q),f.state!==s&&ys.enqueueReplaceState(f,f.state,null)}function zi(s,f,I,q){var W=s.stateNode;W.props=I,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,I),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,I,W,q),W.state=s.memoizedState),typeof W.componentDidMount=="function"&&(s.flags|=4194308)}function ka(s,f){try{var I="",q=f;do I+=Kp(q),q=q.return;while(q);var W=I}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,I){return{value:s,source:null,stack:I??null,digest:f??null}}function ui(s,f){try{console.error(f.value)}catch(I){setTimeout(function(){throw I})}}var bs=typeof WeakMap=="function"?WeakMap:Map;function Bi(s,f,I){I=lo(-1,I),I.tag=3,I.payload={element:null};var q=f.value;return I.callback=function(){Pn||(Pn=!0,Rn=q),ui(s,f)},I}function Ou(s,f,I){I=lo(-1,I),I.tag=3;var q=s.type.getDerivedStateFromError;if(typeof q=="function"){var W=f.value;I.payload=function(){return q(W)},I.callback=function(){ui(s,f)}}var te=s.stateNode;return te!==null&&typeof te.componentDidCatch=="function"&&(I.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:""})}),I}function hh(s,f,I){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(I)||(W.add(I),s=wh.bind(null,s,f,I),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,I,q,W){return s.mode&1?(s.flags|=65536,s.lanes=W,s):(s===f?s.flags|=65536:(s.flags|=128,I.flags|=131072,I.flags&=-52805,I.tag===1&&(I.alternate===null?I.tag=17:(f=lo(-1,1),f.tag=2,so(I,f,1))),I.lanes|=1),s)}var _s=c.ReactCurrentOwner,Fn=!1;function Yn(s,f,I,q){f.child=s===null?rh(f,null,I,q):ya(f,s.child,I,q)}function xu(s,f,I,q,W){I=I.render;var te=f.ref;return cl(f,W),q=gs(s,f,I,q,te,W),I=gu(),s!==null&&!Fn?(f.updateQueue=s.updateQueue,f.flags&=-2053,s.lanes&=~W,fo(s,f,W)):(cn&&I&&ss(f),f.flags|=1,Yn(s,f,q,W),f.child)}function Aa(s,f,I,q,W){if(s===null){var te=I.type;return typeof te=="function"&&!Rl(te)&&te.defaultProps===void 0&&I.compare===null&&I.defaultProps===void 0?(f.tag=15,f.type=te,co(s,f,te,q,W)):(s=Uu(I.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(I=I.compare,I=I!==null?I:su,I(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,I,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,I,q,W)}function on(s,f,I){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},Nt(Qo,zn),zn|=I;else{if(!(I&1073741824))return s=te!==null?te.baseLanes|I:I,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:s,cachePool:null,transitions:null},f.updateQueue=null,Nt(Qo,zn),zn|=s,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},q=te!==null?te.baseLanes:I,Nt(Qo,zn),zn|=q}else te!==null?(q=te.baseLanes|I,f.memoizedState=null):q=I,Nt(Qo,zn),zn|=q;return Yn(s,f,W,I),f.child}function en(s,f){var I=f.ref;(s===null&&I!==null||s!==null&&s.ref!==I)&&(f.flags|=512,f.flags|=2097152)}function Ui(s,f,I,q,W){var te=Vn(I)?Di:fr.current;return te=io(f,te),cl(f,W),I=gs(s,f,I,q,te,W),q=gu(),s!==null&&!Fn?(f.updateQueue=s.updateQueue,f.flags&=-2053,s.lanes&=~W,fo(s,f,W)):(cn&&q&&ss(f),f.flags|=1,Yn(s,f,I,W),f.child)}function ir(s,f,I,q,W){if(Vn(I)){var te=!0;tl(f)}else te=!1;if(cl(f,W),f.stateNode===null)ws(s,f),dh(f,I,q),zi(f,I,q,W),q=!0;else if(s===null){var le=f.stateNode,ye=f.memoizedProps;le.props=ye;var Me=le.context,$e=I.contextType;typeof $e=="object"&&$e!==null?$e=$r($e):($e=Vn(I)?Di:fr.current,$e=io(f,$e));var rt=I.getDerivedStateFromProps,Ot=typeof rt=="function"||typeof le.getSnapshotBeforeUpdate=="function";Ot||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(ye!==q||Me!==$e)&&Eu(f,le,q,$e),Wr=!1;var Qe=f.memoizedState;le.state=Qe,Bo(f,q,le,W),Me=f.memoizedState,ye!==q||Qe!==Me||jr.current||Wr?(typeof rt=="function"&&(Yc(f,I,rt,q),Me=f.memoizedState),(ye=Wr||fh(f,I,ye,q,Qe,Me,$e))?(Ot||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=$e,q=ye):(typeof le.componentDidMount=="function"&&(f.flags|=4194308),q=!1)}else{le=f.stateNode,oh(s,f),ye=f.memoizedProps,$e=f.type===f.elementType?ye:Kr(f.type,ye),le.props=$e,Ot=f.pendingProps,Qe=le.context,Me=I.contextType,typeof Me=="object"&&Me!==null?Me=$r(Me):(Me=Vn(I)?Di:fr.current,Me=io(f,Me));var ln=I.getDerivedStateFromProps;(rt=typeof ln=="function"||typeof le.getSnapshotBeforeUpdate=="function")||typeof le.UNSAFE_componentWillReceiveProps!="function"&&typeof le.componentWillReceiveProps!="function"||(ye!==Ot||Qe!==Me)&&Eu(f,le,q,Me),Wr=!1,Qe=f.memoizedState,le.state=Qe,Bo(f,q,le,W);var Zt=f.memoizedState;ye!==Ot||Qe!==Zt||jr.current||Wr?(typeof ln=="function"&&(Yc(f,I,ln,q),Zt=f.memoizedState),($e=Wr||fh(f,I,$e,q,Qe,Zt,Me)||!1)?(rt||typeof le.UNSAFE_componentWillUpdate!="function"&&typeof le.componentWillUpdate!="function"||(typeof le.componentWillUpdate=="function"&&le.componentWillUpdate(q,Zt,Me),typeof le.UNSAFE_componentWillUpdate=="function"&&le.UNSAFE_componentWillUpdate(q,Zt,Me)),typeof le.componentDidUpdate=="function"&&(f.flags|=4),typeof le.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof le.componentDidUpdate!="function"||ye===s.memoizedProps&&Qe===s.memoizedState||(f.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||ye===s.memoizedProps&&Qe===s.memoizedState||(f.flags|=1024),f.memoizedProps=q,f.memoizedState=Zt),le.props=q,le.state=Zt,le.context=Me,q=$e):(typeof le.componentDidUpdate!="function"||ye===s.memoizedProps&&Qe===s.memoizedState||(f.flags|=4),typeof le.getSnapshotBeforeUpdate!="function"||ye===s.memoizedProps&&Qe===s.memoizedState||(f.flags|=1024),q=!1)}return dr(s,f,I,q,te,W)}function dr(s,f,I,q,W,te){en(s,f);var le=(f.flags&128)!==0;if(!q&&!le)return W&&Ec(f,I,!1),fo(s,f,te);q=f.stateNode,_s.current=f;var ye=le&&typeof I.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,I,!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 Ta(s,f,I,q,W){return va(),Cc(W),f.flags|=256,Yn(s,f,I,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,I){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),Nt(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,I,null),te.return=f,s.return=f,te.sibling=s,f.child=te,f.child.memoizedState=ml(I),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,I);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,I,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(I):{baseLanes:le.baseLanes|I,cachePool:null,transitions:le.transitions},te.memoizedState=le,te.childLanes=s.childLanes&~I,f.memoizedState=hr,q}return te=s.child,s=te.sibling,q=na(te,{mode:"visible",children:q.children}),!(f.mode&1)&&(q.lanes=I),q.return=f,q.sibling=null,s!==null&&(I=f.deletions,I===null?(f.deletions=[s],f.flags|=16):I.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,I,q){return q!==null&&Cc(q),ya(f,s.child,null,I),s=Pu(f,f.pendingProps.children),s.flags|=2,f.memoizedState=null,s}function gh(s,f,I,q,W,te,le){if(I)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(I=(le&s.childLanes)!==0,Fn||I){if(q=tn,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 Tl(),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=Mt(W),nr=f,cn=!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,I){s.lanes|=f;var q=s.alternate;q!==null&&(q.lanes|=f),ba(s.return,f,I)}function yl(s,f,I,q,W){var te=s.memoizedState;te===null?s.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:q,tail:I,tailMode:W}:(te.isBackwards=f,te.rendering=null,te.renderingStartTime=0,te.last=q,te.tail=I,te.tailMode=W)}function Cu(s,f,I){var q=f.pendingProps,W=q.revealOrder,te=q.tail;if(Yn(s,f,q.children,I),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,I,f);else if(s.tag===19)qi(s,I,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(Nt(En,q),!(f.mode&1))f.memoizedState=null;else switch(W){case"forwards":for(I=f.child,W=null;I!==null;)s=I.alternate,s!==null&&pu(s)===null&&(W=I),I=I.sibling;I=W,I===null?(W=f.child,f.child=null):(W=I.sibling,I.sibling=null),yl(f,!1,W,I,te);break;case"backwards":for(I=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=I,I=W,W=s}yl(f,!0,I,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,I){if(s!==null&&(f.dependencies=s.dependencies),po|=f.lanes,!(I&f.childLanes))return null;if(s!==null&&f.child!==s.child)throw Error(u(153));if(f.child!==null){for(s=f.child,I=na(s,s.pendingProps),f.child=I,I.return=f;s.sibling!==null;)s=s.sibling,I=I.sibling=na(s,s.pendingProps),I.return=f;I.sibling=null}return f.child}function Yo(s,f,I){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?(Nt(En,En.current&1),f.flags|=128,null):I&f.child.childLanes?Kc(s,f,I):(Nt(En,En.current&1),s=fo(s,f,I),s!==null?s.sibling:null);Nt(En,En.current&1);break;case 19:if(q=(I&f.childLanes)!==0,s.flags&128){if(q)return Cu(s,f,I);f.flags|=128}var W=f.memoizedState;if(W!==null&&(W.rendering=null,W.tail=null,W.lastEffect=null),Nt(En,En.current),q)break;return null;case 22:case 23:return f.lanes=0,on(s,f,I)}return fo(s,f,I)}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 I=f.child;I!==null;){if(I.tag===5||I.tag===6)H(s,I.stateNode);else if(I.tag!==4&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===f)break;for(;I.sibling===null;){if(I.return===null||I.return===f)return;I=I.return}I.sibling.return=I.return,I=I.sibling}},Xo=function(){},Pr=function(s,f,I,q,W){if(s=s.memoizedProps,s!==q){var te=f.stateNode,le=si(li.current);I=ee(te,I,s,q,W,le),(f.updateQueue=I)&&xr(f)}},Cr=function(s,f,I,q){I!==q&&xr(f)};else if(ue){Ko=function(s,f,I,q){for(var W=f.child;W!==null;){if(W.tag===5){var te=W.stateNode;I&&q&&(te=st(te,W.type,W.memoizedProps,W)),H(s,te)}else if(W.tag===6)te=W.stateNode,I&&q&&(te=_t(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,I,q){for(var W=f.child;W!==null;){if(W.tag===5){var te=W.stateNode;I&&q&&(te=st(te,W.type,W.memoizedProps,W)),ht(s,te)}else if(W.tag===6)te=W.stateNode,I&&q&&(te=_t(te,W.memoizedProps,W)),ht(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 I=f.stateNode;if(!Ma(s,f)){s=I.containerInfo;var q=Fe(s);Zo(q,f,!1,!1),I.pendingChildren=q,xr(f),_n(s,q)}},Pr=function(s,f,I,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),$e=null;le!==q&&($e=ee(ye,I,le,q,W,Me)),s&&$e===null?f.stateNode=te:(te=mt(te,$e,I,le,q,f,s,ye),Y(te,I,q,W,Me)&&xr(f),f.stateNode=te,s?xr(f):Ko(te,f,!1,!1))}},Cr=function(s,f,I,q){I!==q?(s=si(qo.current),I=si(li.current),f.stateNode=K(q,s,I,f),xr(f)):f.stateNode=s.stateNode}}else Xo=function(){},Pr=function(){},Cr=function(){};function Xr(s,f){if(!cn)switch(s.tailMode){case"hidden":f=s.tail;for(var I=null;f!==null;)f.alternate!==null&&(I=f),f=f.sibling;I===null?s.tail=null:I.sibling=null;break;case"collapsed":I=s.tail;for(var q=null;I!==null;)I.alternate!==null&&(q=I),I=I.sibling;q===null?f||s.tail===null?s.tail=null:s.tail.sibling=null:q.sibling=null}}function gn(s){var f=s.alternate!==null&&s.alternate.child===s.child,I=0,q=0;if(f)for(var W=s.child;W!==null;)I|=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;)I|=W.lanes|W.childLanes,q|=W.subtreeFlags,q|=W.flags,W.return=s,W=W.sibling;return s.subtreeFlags|=q,s.childLanes=I,f}function La(s,f,I){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 gn(f),null;case 1:return Vn(f.type)&&pa(),gn(f),null;case 3:return I=f.stateNode,_a(),un(jr),un(fr),Ic(),I.pendingContext&&(I.context=I.pendingContext,I.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),gn(f),null;case 5:Lc(f),I=si(qo.current);var W=f.type;if(s!==null&&f.stateNode!=null)Pr(s,f,W,q,I),s.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!q){if(f.stateNode===null)throw Error(u(166));return gn(f),null}if(s=si(li.current),lu(f)){if(!de)throw Error(u(175));s=Vt(f.stateNode,f.type,f.memoizedProps,I,s,f,!cs),f.updateQueue=s,s!==null&&xr(f)}else{var te=F(W,q,I,s,f);Ko(te,f,!1,!1),f.stateNode=te,Y(te,W,q,I,s)&&xr(f)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return gn(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),I=si(li.current),lu(f)){if(!de)throw Error(u(176));if(s=f.stateNode,I=f.memoizedProps,(q=$t(s,I,f,!cs))&&(W=nr,W!==null))switch(W.tag){case 3:rs(W.stateNode.containerInfo,s,I,(W.mode&1)!==0);break;case 5:Jt(W.type,W.memoizedProps,W.stateNode,s,I,(W.mode&1)!==0)}q&&xr(f)}else f.stateNode=K(q,s,I,f)}return gn(f),null;case 13:if(un(En),q=f.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(cn&&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;gn(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=I,f):(I=q!==null,I!==(s!==null&&s.memoizedState!==null)&&I&&(f.child.flags|=8192,f.mode&1&&(s===null||En.current&1?mn===0&&(mn=3):Tl())),f.updateQueue!==null&&(f.flags|=4),gn(f),null);case 4:return _a(),Xo(s,f),s===null&&Se(f.stateNode.containerInfo),gn(f),null;case 10:return fs(f.type._context),gn(f),null;case 17:return Vn(f.type)&&pa(),gn(f),null;case 19:if(un(En),W=f.memoizedState,W===null)return gn(f),null;if(q=(f.flags&128)!==0,te=W.rendering,te===null)if(q)Xr(W,!1);else{if(mn!==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=I,I=f.child;I!==null;)q=I,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}),I=I.sibling;return Nt(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&&!cn)return gn(f),null}else 2*$n()-W.renderingStartTime>ks&&I!==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,Nt(En,q?s&1|2:s&1),f):(gn(f),null);case 22:case 23:return Bu(),I=f.memoizedState!==null,s!==null&&s.memoizedState!==null!==I&&(f.flags|=8192),I&&f.mode&1?zn&1073741824&&(gn(f),ae&&f.subtreeFlags&6&&(f.flags|=8192)):gn(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(),un(jr),un(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(un(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 un(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 Xt(s,f){var I=s.ref;if(I!==null)if(typeof I=="function")try{I(null)}catch(q){dn(s,f,q)}else I.current=null}function Qr(s,f,I){try{I()}catch(q){dn(s,f,q)}}var Xc=!1;function mh(s,f){for(B(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 I=s.alternate;if(s.flags&1024)switch(s.tag){case 0:case 11:case 15:break;case 1:if(I!==null){var q=I.memoizedProps,W=I.memoizedState,te=s.stateNode,le=te.getSnapshotBeforeUpdate(s.elementType===s.type?q:Kr(s.type,q),W);te.__reactInternalSnapshotBeforeUpdate=le}break;case 3:ae&&De(s.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(u(163))}}catch(ye){dn(s,s.return,ye)}if(f=s.sibling,f!==null){f.return=s.return,Ke=f;break}Ke=s.return}return I=Xc,Xc=!1,I}function Na(s,f,I){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,I,te)}W=W.next}while(W!==q)}}function _l(s,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var I=f=f.next;do{if((I.tag&s)===s){var q=I.create;I.destroy=q()}I=I.next}while(I!==f)}}function ku(s){var f=s.ref;if(f!==null){var I=s.stateNode;switch(s.tag){case 5:s=Z(I);break;default:s=I}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&&ke(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,I){var q=s.tag;if(q===5||q===6)s=s.stateNode,f?wt(I,s,f):ze(I,s);else if(q!==4&&(s=s.child,s!==null))for(Es(s,f,I),s=s.sibling;s!==null;)Es(s,f,I),s=s.sibling}function Qc(s,f,I){var q=s.tag;if(q===5||q===6)s=s.stateNode,f?Pt(I,s,f):je(I,s);else if(q!==4&&(s=s.child,s!==null))for(Qc(s,f,I),s=s.sibling;s!==null;)Qc(s,f,I),s=s.sibling}var Cn=null,Ur=!1;function Pi(s,f,I){for(I=I.child;I!==null;)Au(s,f,I),I=I.sibling}function Au(s,f,I){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(jo,I)}catch{}switch(I.tag){case 5:Kn||Xt(I,f);case 6:if(ae){var q=Cn,W=Ur;Cn=null,Pi(s,f,I),Cn=q,Ur=W,Cn!==null&&(Ur?Ee(Cn,I.stateNode):we(Cn,I.stateNode))}else Pi(s,f,I);break;case 18:ae&&Cn!==null&&(Ur?Ii(Cn,I.stateNode):Ir(Cn,I.stateNode));break;case 4:ae?(q=Cn,W=Ur,Cn=I.stateNode.containerInfo,Ur=!0,Pi(s,f,I),Cn=q,Ur=W):(ue&&(q=I.stateNode.containerInfo,W=Fe(q),Be(q,W)),Pi(s,f,I));break;case 0:case 11:case 14:case 15:if(!Kn&&(q=I.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(I,f,le),W=W.next}while(W!==q)}Pi(s,f,I);break;case 1:if(!Kn&&(Xt(I,f),q=I.stateNode,typeof q.componentWillUnmount=="function"))try{q.props=I.memoizedProps,q.state=I.memoizedState,q.componentWillUnmount()}catch(ye){dn(I,f,ye)}Pi(s,f,I);break;case 21:Pi(s,f,I);break;case 22:I.mode&1?(Kn=(q=Kn)||I.memoizedState!==null,Pi(s,f,I),Kn=q):Pi(s,f,I);break;default:Pi(s,f,I)}}function Da(s){var f=s.updateQueue;if(f!==null){s.updateQueue=null;var I=s.stateNode;I===null&&(I=s.stateNode=new Zr),f.forEach(function(q){var W=Zp.bind(null,s,q);I.has(q)||(I.add(q),q.then(W,W))})}}function ci(s,f){var I=f.deletions;if(I!==null)for(var q=0;q<I.length;q++){var W=I[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));Au(te,le,W),Cn=null,Ur=!1}else Au(te,le,W);var Me=W.alternate;Me!==null&&(Me.return=null),W.return=null}catch($e){dn(W,f,$e)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)Os(f,s),f=f.sibling}function Os(s,f){var I=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(Qe){dn(s,s.return,Qe)}try{Na(5,s,s.return)}catch(Qe){dn(s,s.return,Qe)}}break;case 1:ci(f,s),Jr(s),q&512&&I!==null&&Xt(I,I.return);break;case 5:if(ci(f,s),Jr(s),q&512&&I!==null&&Xt(I,I.return),ae){if(s.flags&32){var W=s.stateNode;try{vt(W)}catch(Qe){dn(s,s.return,Qe)}}if(q&4&&(W=s.stateNode,W!=null)){var te=s.memoizedProps;if(I=I!==null?I.memoizedProps:te,q=s.type,f=s.updateQueue,s.updateQueue=null,f!==null)try{et(W,f,q,I,te,s)}catch(Qe){dn(s,s.return,Qe)}}}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,I=I!==null?I.memoizedProps:te;try{He(W,I,te)}catch(Qe){dn(s,s.return,Qe)}}break;case 3:if(ci(f,s),Jr(s),q&4){if(ae&&de&&I!==null&&I.memoizedState.isDehydrated)try{Sn(f.containerInfo)}catch(Qe){dn(s,s.return,Qe)}if(ue){W=f.containerInfo,te=f.pendingChildren;try{Be(W,te)}catch(Qe){dn(s,s.return,Qe)}}}break;case 4:if(ci(f,s),Jr(s),q&4&&ue){te=s.stateNode,W=te.containerInfo,te=te.pendingChildren;try{Be(W,te)}catch(Qe){dn(s,s.return,Qe)}}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=I!==null&&I.memoizedState!==null;if(s.mode&1?(Kn=(I=Kn)||le,ci(f,s),Kn=I):ci(f,s),Jr(s),q&8192){if(I=s.memoizedState!==null,(s.stateNode.isHidden=I)&&!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:Xt(le,le.return);var Me=le.stateNode;if(typeof Me.componentWillUnmount=="function"){var $e=le,rt=le.return;try{var Ot=$e;Me.props=Ot.memoizedProps,Me.state=Ot.memoizedState,Me.componentWillUnmount()}catch(Qe){dn($e,rt,Qe)}}break;case 5:Xt(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,I?Ct(W):Ge(f.stateNode,f.memoizedProps)}catch(Qe){dn(s,s.return,Qe)}}}else if(f.tag===6){if(q===null)try{te=f.stateNode,I?Ne(te):it(te,f.memoizedProps)}catch(Qe){dn(s,s.return,Qe)}}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 I=s.return;I!==null;){if(Zc(I)){var q=I;break e}I=I.return}throw Error(u(160))}switch(q.tag){case 5:var W=q.stateNode;q.flags&32&&(vt(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){dn(s,s.return,Me)}s.flags&=-3}f&4096&&(s.flags&=-4097)}function wl(s,f,I){Ke=s,Tu(s)}function Tu(s,f,I){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 $e=Kn;if(bl=le,(Kn=Me)&&!$e)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,Tu(te),te=te.sibling;Ke=W,bl=ye,Kn=$e}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 I=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(I===null)q.componentDidMount();else{var W=f.elementType===f.type?I.memoizedProps:Kr(f.type,I.memoizedProps);q.componentDidUpdate(W,I.memoizedState,q.__reactInternalSnapshotBeforeUpdate)}var te=f.updateQueue;te!==null&&ah(f,te,q);break;case 3:var le=f.updateQueue;if(le!==null){if(I=null,f.child!==null)switch(f.child.tag){case 5:I=Z(f.child.stateNode);break;case 1:I=f.child.stateNode}ah(f,le,I)}break;case 5:var ye=f.stateNode;I===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 $e=Me.memoizedState;if($e!==null){var rt=$e.dehydrated;rt!==null&&oi(rt)}}}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(Ot){dn(f,f.return,Ot)}}if(f===s){Ke=null;break}if(I=f.sibling,I!==null){I.return=f.return,Ke=I;break}Ke=f.return}}function Mu(s){for(;Ke!==null;){var f=Ke;if(f===s){Ke=null;break}var I=f.sibling;if(I!==null){I.return=f.return,Ke=I;break}Ke=f.return}}function Lu(s){for(;Ke!==null;){var f=Ke;try{switch(f.tag){case 0:case 11:case 15:var I=f.return;try{_l(4,f)}catch(Me){dn(f,I,Me)}break;case 1:var q=f.stateNode;if(typeof q.componentDidMount=="function"){var W=f.return;try{q.componentDidMount()}catch(Me){dn(f,W,Me)}}var te=f.return;try{ku(f)}catch(Me){dn(f,te,Me)}break;case 5:var le=f.return;try{ku(f)}catch(Me){dn(f,le,Me)}}}catch(Me){dn(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=Te(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 I=0;I<s.length;){var q=s[I++],W=s[I++],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=be(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 I=[];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)I.push(W);else for(W=W.child;W!==null;)s.push(W,te),W=W.sibling}}return I}function $i(s,f){if(!Ce)throw Error(u(363));s=Gi(s),s=Vi(s,f),f=[],s=Array.from(s);for(var I=0;I<s.length;){var q=s[I++];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,kt=0,tn=null,vn=null,kn=0,zn=0,Qo=er(0),mn=0,Ol=null,po=0,an=0,xl=0,ja=null,pr=null,Pl=0,ks=1/0,Ar=null;function Qt(){ks=$n()+500}var Pn=!1,Rn=null,Ci=null,Jo=!1,fi=null,Du=0,Mn=0,As=null,Cl=-1,kl=0;function fn(){return kt&6?$n():Cl!==-1?Cl:Cl=$n()}function Bn(s){return s.mode&1?kt&2&&kn!==0?kn&-kn:Yp.transition!==null?(kl===0&&(kl=eu()),kl):(s=It,s!==0?s:me()):1}function gr(s,f,I,q){if(50<Mn)throw Mn=0,As=null,Error(u(185));ai(s,I,q),(!(kt&2)||s!==tn)&&(s===tn&&(!(kt&2)&&(an|=I),mn===4&&go(s,kn)),vr(s,q),I===1&&kt===0&&!(f.mode&1)&&(Qt(),ll&&tr()))}function vr(s,f){var I=s.callbackNode;Wd(s,f);var q=rl(s,s===tn?kn:0);if(q===0)I!==null&&Yd(I),s.callbackNode=null,s.callbackPriority=0;else if(f=q&-q,s.callbackPriority!==f){if(I!=null&&Yd(I),f===1)s.tag===0?Xd(Jc.bind(null,s)):ou(Jc.bind(null,s)),fe?ge(function(){!(kt&6)&&tr()}):Fi(tu,tr),I=null;else{switch(ol(q)){case 1:I=tu;break;case 4:I=nu;break;case 16:I=ru;break;case 536870912:I=Wp;break;default:I=ru}I=lf(I,ju.bind(null,s))}s.callbackPriority=f,s.callbackNode=I}}function ju(s,f){if(Cl=-1,kl=0,kt&6)throw Error(u(327));var I=s.callbackNode;if(vo()&&s.callbackNode!==I)return null;var q=rl(s,s===tn?kn:0);if(q===0)return null;if(q&30||q&s.expiredLanes||f)f=Fa(s,q);else{f=q;var W=kt;kt|=2;var te=tf();(tn!==s||kn!==f)&&(Ar=null,Qt(),ea(s,f));do try{nf();break}catch(ye){Al(s,ye)}while(!0);Ac(),Cs.current=te,kt=W,vn!==null?f=0:(tn=null,kn=0,f=mn)}if(f!==0){if(f===2&&(W=Js(s),W!==0&&(q=W,f=Fu(s,W))),f===1)throw I=Ol,ea(s,0),go(s,q),vr(s,$n()),I;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 I=Ol,ea(s,0),go(s,q),vr(s,$n()),I;switch(s.finishedWork=W,s.finishedLanes=q,f){case 0:case 1:throw Error(u(345));case 2:ta(s,pr,Ar);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){fn(),s.pingedLanes|=s.suspendedLanes&W;break}s.timeoutHandle=$(ta.bind(null,s,pr,Ar),f);break}ta(s,pr,Ar);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=$(ta.bind(null,s,pr,Ar),q);break}ta(s,pr,Ar);break;case 5:ta(s,pr,Ar);break;default:throw Error(u(329))}}}return vr(s,$n()),s.callbackNode===I?ju.bind(null,s):null}function Fu(s,f){var I=ja;return s.current.memoizedState.isDehydrated&&(ea(s,f).flags|=256),s=Fa(s,f),s!==2&&(f=pr,pr=I,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 I=f.updateQueue;if(I!==null&&(I=I.stores,I!==null))for(var q=0;q<I.length;q++){var W=I[q],te=W.getSnapshot;W=W.value;try{if(!wi(te(),W))return!1}catch{return!1}}}if(I=f.child,f.subtreeFlags&16384&&I!==null)I.return=f,f=I;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&=~an,s.suspendedLanes|=f,s.pingedLanes&=~f,s=s.expirationTimes;0<f;){var I=31-Gr(f),q=1<<I;s[I]=-1,f&=~q}}function Jc(s){if(kt&6)throw Error(u(327));vo();var f=rl(s,0);if(!(f&1))return vr(s,$n()),null;var I=Fa(s,f);if(s.tag!==0&&I===2){var q=Js(s);q!==0&&(f=q,I=Fu(s,q))}if(I===1)throw I=Ol,ea(s,0),go(s,f),vr(s,$n()),I;if(I===6)throw Error(u(345));return s.finishedWork=s.current.alternate,s.finishedLanes=f,ta(s,pr,Ar),vr(s,$n()),null}function ef(s){fi!==null&&fi.tag===0&&!(kt&6)&&vo();var f=kt;kt|=1;var I=xn.transition,q=It;try{if(xn.transition=null,It=1,s)return s()}finally{It=q,xn.transition=I,kt=f,!(kt&6)&&tr()}}function Bu(){zn=Qo.current,un(Qo)}function ea(s,f){s.finishedWork=null,s.finishedLanes=0;var I=s.timeoutHandle;if(I!==re&&(s.timeoutHandle=re,ne(I)),vn!==null)for(I=vn.return;I!==null;){var q=I;switch(us(q),q.tag){case 1:q=q.type.childContextTypes,q!=null&&pa();break;case 3:_a(),un(jr),un(fr),Ic();break;case 5:Lc(q);break;case 4:_a();break;case 13:un(En);break;case 19:un(En);break;case 10:fs(q.type._context);break;case 22:case 23:Bu()}I=I.return}if(tn=s,vn=s=na(s.current,null),kn=zn=f,mn=0,Ol=null,xl=an=po=0,pr=ja=null,zo!==null){for(f=0;f<zo.length;f++)if(I=zo[f],q=I.interleaved,q!==null){I.interleaved=null;var W=q.next,te=I.pending;if(te!==null){var le=te.next;te.next=W,q.next=le}I.pending=q}zo=null}return s}function Al(s,f){do{var I=vn;try{if(Ac(),Br.current=Ca,hl){for(var q=pn.memoizedState;q!==null;){var W=q.queue;W!==null&&(W.pending=null),q=q.next}hl=!1}if(Ho=0,jn=Tn=pn=null,hs=!1,ps=0,El.current=null,I===null||I.return===null){mn=1,Ol=f,vn=null;break}e:{var te=s,le=I.return,ye=I,Me=f;if(f=kn,ye.flags|=32768,Me!==null&&typeof Me=="object"&&typeof Me.then=="function"){var $e=Me,rt=ye,Ot=rt.tag;if(!(rt.mode&1)&&(Ot===0||Ot===11||Ot===15)){var Qe=rt.alternate;Qe?(rt.updateQueue=Qe.updateQueue,rt.memoizedState=Qe.memoizedState,rt.lanes=Qe.lanes):(rt.updateQueue=null,rt.memoizedState=null)}var ln=ph(le);if(ln!==null){ln.flags&=-257,$o(ln,le,ye,te,f),ln.mode&1&&hh(te,$e,f),f=ln,Me=$e;var Zt=f.updateQueue;if(Zt===null){var Tr=new Set;Tr.add(Me),f.updateQueue=Tr}else Zt.add(Me);break e}else{if(!(f&1)){hh(te,$e,f),Tl();break e}Me=Error(u(426))}}else if(cn&&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),mn!==4&&(mn=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 Ae=Bi(te,Me,f);fl(te,Ae);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 Je=Ou(te,ye,f);fl(te,Je);break e}}te=te.return}while(te!==null)}of(I)}catch(pt){f=pt,vn===I&&I!==null&&(vn=I=I.return);continue}break}while(!0)}function tf(){var s=Cs.current;return Cs.current=Ca,s===null?Ca:s}function Tl(){(mn===0||mn===3||mn===2)&&(mn=4),tn===null||!(po&268435455)&&!(an&268435455)||go(tn,kn)}function Fa(s,f){var I=kt;kt|=2;var q=tf();(tn!==s||kn!==f)&&(Ar=null,ea(s,f));do try{bh();break}catch(W){Al(s,W)}while(!0);if(Ac(),kt=I,Cs.current=q,vn!==null)throw Error(u(261));return tn=null,kn=0,mn}function bh(){for(;vn!==null;)rf(vn)}function nf(){for(;vn!==null&&!Kd();)rf(vn)}function rf(s){var f=Oh(s.alternate,s,zn);s.memoizedProps=s.pendingProps,f===null?of(s):vn=f,El.current=null}function of(s){var f=s;do{var I=f.alternate;if(s=f.return,f.flags&32768){if(I=vh(I,f),I!==null){I.flags&=32767,vn=I;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{mn=6,vn=null;return}}else if(I=La(I,f,zn),I!==null){vn=I;return}if(f=f.sibling,f!==null){vn=f;return}vn=f=s}while(f!==null);mn===0&&(mn=5)}function ta(s,f,I){var q=It,W=xn.transition;try{xn.transition=null,It=1,_h(s,f,I,q)}finally{xn.transition=W,It=q}return null}function _h(s,f,I,q){do vo();while(fi!==null);if(kt&6)throw Error(u(327));I=s.finishedWork;var W=s.finishedLanes;if(I===null)return null;if(s.finishedWork=null,s.finishedLanes=0,I===s.current)throw Error(u(177));s.callbackNode=null,s.callbackPriority=0;var te=I.lanes|I.childLanes;if(Do(s,te),s===tn&&(vn=tn=null,kn=0),!(I.subtreeFlags&2064)&&!(I.flags&2064)||Jo||(Jo=!0,lf(ru,function(){return vo(),null})),te=(I.flags&15990)!==0,I.subtreeFlags&15990||te){te=xn.transition,xn.transition=null;var le=It;It=1;var ye=kt;kt|=4,El.current=null,mh(s,I),Os(I,s),N(s.containerInfo),s.current=I,wl(I),as(),kt=ye,It=le,xn.transition=te}else s.current=I;if(Jo&&(Jo=!1,fi=s,Du=W),te=s.pendingLanes,te===0&&(Ci=null),al(I.stateNode),vr(s,$n()),f!==null)for(q=s.onRecoverableError,I=0;I<f.length;I++)W=f[I],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===As?Mn++:(Mn=0,As=s):Mn=0,tr(),null}function vo(){if(fi!==null){var s=ol(Du),f=xn.transition,I=It;try{if(xn.transition=null,It=16>s?16:s,fi===null)var q=!1;else{if(s=fi,fi=null,Du=0,kt&6)throw Error(u(331));var W=kt;for(kt|=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 $e=ye[Me];for(Ke=$e;Ke!==null;){var rt=Ke;switch(rt.tag){case 0:case 11:case 15:Na(8,rt,te)}var Ot=rt.child;if(Ot!==null)Ot.return=rt,Ke=Ot;else for(;Ke!==null;){rt=Ke;var Qe=rt.sibling,ln=rt.return;if(Ss(rt),rt===$e){Ke=null;break}if(Qe!==null){Qe.return=ln,Ke=Qe;break}Ke=ln}}}var Zt=te.alternate;if(Zt!==null){var Tr=Zt.child;if(Tr!==null){Zt.child=null;do{var Wi=Tr.sibling;Tr.sibling=null,Tr=Wi}while(Tr!==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 Ae=te.sibling;if(Ae!==null){Ae.return=te.return,Ke=Ae;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(pt){dn(ye,ye.return,pt)}if(ye===le){Ke=null;break e}var Je=ye.sibling;if(Je!==null){Je.return=ye.return,Ke=Je;break e}Ke=ye.return}}if(kt=W,tr(),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(jo,s)}catch{}q=!0}return q}finally{It=I,xn.transition=f}}return!1}function af(s,f,I){f=ka(I,f),f=Bi(s,f,1),s=so(s,f,1),f=fn(),s!==null&&(ai(s,1,f),vr(s,f))}function dn(s,f,I){if(s.tag===3)af(s,s,I);else for(;f!==null;){if(f.tag===3){af(f,s,I);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(I,s),s=Ou(f,s,1),f=so(f,s,1),s=fn(),f!==null&&(ai(f,1,s),vr(f,s));break}}f=f.return}}function wh(s,f,I){var q=s.pingCache;q!==null&&q.delete(f),f=fn(),s.pingedLanes|=s.suspendedLanes&I,tn===s&&(kn&I)===I&&(mn===4||mn===3&&(kn&130023424)===kn&&500>$n()-Pl?ea(s,0):xl|=I),vr(s,f)}function Sh(s,f){f===0&&(s.mode&1?(f=os,os<<=1,!(os&130023424)&&(os=4194304)):f=1);var I=fn();s=xi(s,f),s!==null&&(ai(s,f,I),vr(s,I))}function Eh(s){var f=s.memoizedState,I=0;f!==null&&(I=f.retryLane),Sh(s,I)}function Zp(s,f){var I=0;switch(s.tag){case 13:var q=s.stateNode,W=s.memoizedState;W!==null&&(I=W.retryLane);break;case 19:q=s.stateNode;break;default:throw Error(u(314))}q!==null&&q.delete(f),Sh(s,I)}var Oh;Oh=function(s,f,I){if(s!==null)if(s.memoizedProps!==f.pendingProps||jr.current)Fn=!0;else{if(!(s.lanes&I)&&!(f.flags&128))return Fn=!1,Yo(s,f,I);Fn=!!(s.flags&131072)}else Fn=!1,cn&&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,I),W=gs(null,f,q,s,W,I);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,I),f=dr(null,f,q,!0,te,I)):(f.tag=0,cn&&te&&ss(f),Yn(null,f,W,I),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=Qp(q),s=Kr(q,s),W){case 0:f=Ui(null,f,q,s,I);break e;case 1:f=ir(null,f,q,s,I);break e;case 11:f=xu(null,f,q,s,I);break e;case 14:f=Aa(null,f,q,Kr(q.type,s),I);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,I);case 1:return q=f.type,W=f.pendingProps,W=f.elementType===q?W:Kr(q,W),ir(s,f,q,W,I);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,I);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=Ta(s,f,q,I,W);break e}else if(q!==W){W=ka(Error(u(424)),f),f=Ta(s,f,q,I,W);break e}else for(de&&(Or=Et(f.stateNode.containerInfo),nr=f,cn=!0,Oi=null,cs=!1),I=rh(f,null,q,I),f.child=I;I;)I.flags=I.flags&-3|4096,I=I.sibling;else{if(va(),q===W){f=fo(s,f,I);break e}Yn(s,f,q,I)}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),en(s,f),Yn(s,f,le,I),f.child;case 6:return s===null&&Pc(f),null;case 13:return Kc(s,f,I);case 4:return hu(f,f.stateNode.containerInfo),q=f.pendingProps,s===null?f.child=ya(f,null,q,I):Yn(s,f,q,I),f.child;case 11:return q=f.type,W=f.pendingProps,W=f.elementType===q?W:Kr(q,W),xu(s,f,q,W,I);case 7:return Yn(s,f,f.pendingProps,I),f.child;case 8:return Yn(s,f,f.pendingProps.children,I),f.child;case 12:return Yn(s,f,f.pendingProps.children,I),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,I);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,I&-I),Me.tag=2;var $e=te.updateQueue;if($e!==null){$e=$e.shared;var rt=$e.pending;rt===null?Me.next=Me:(Me.next=rt.next,rt.next=Me),$e.pending=Me}}te.lanes|=I,Me=te.alternate,Me!==null&&(Me.lanes|=I),ba(te.return,I,f),ye.lanes|=I;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|=I,ye=le.alternate,ye!==null&&(ye.lanes|=I),ba(le,I,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,I),f=f.child}return f;case 9:return W=f.type,q=f.pendingProps.children,cl(f,I),W=$r(W),q=q(W),f.flags|=1,Yn(s,f,q,I),f.child;case 14:return q=f.type,W=Kr(q,f.pendingProps),W=Kr(q.type,W),Aa(s,f,q,W,I);case 15:return co(s,f,f.type,f.pendingProps,I);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,I),dh(f,q,W),zi(f,q,W,I),dr(null,f,q,!0,s,I);case 19:return Cu(s,f,I);case 22:return on(s,f,I)}throw Error(u(156,f.tag))};function lf(s,f){return Fi(s,f)}function xh(s,f,I,q){this.tag=s,this.key=I,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,I,q){return new xh(s,f,I,q)}function Rl(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Qp(s){if(typeof s=="function")return Rl(s)?1:0;if(s!=null){if(s=s.$$typeof,s===p)return 11;if(s===g)return 14}return 2}function na(s,f){var I=s.alternate;return I===null?(I=ti(s.tag,f,s.key,s.mode),I.elementType=s.elementType,I.type=s.type,I.stateNode=s.stateNode,I.alternate=s,s.alternate=I):(I.pendingProps=f,I.type=s.type,I.flags=0,I.subtreeFlags=0,I.deletions=null),I.flags=s.flags&14680064,I.childLanes=s.childLanes,I.lanes=s.lanes,I.child=s.child,I.memoizedProps=s.memoizedProps,I.memoizedState=s.memoizedState,I.updateQueue=s.updateQueue,f=s.dependencies,I.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},I.sibling=s.sibling,I.index=s.index,I.ref=s.ref,I}function Uu(s,f,I,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(I.children,W,te,f);case k:le=8,W|=8;break;case x:return s=ti(12,I,f,W|2),s.elementType=x,s.lanes=te,s;case h:return s=ti(13,I,f,W),s.elementType=h,s.lanes=te,s;case C:return s=ti(19,I,f,W),s.elementType=C,s.lanes=te,s;case y:return Ml(I,W,te,f);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case v:le=10;break e;case w:le=9;break e;case p:le=11;break e;case g:le=14;break e;case b:le=16,q=null;break e}throw Error(u(130,s==null?s:typeof s,""))}return f=ti(le,I,f,W),f.elementType=s,f.type=q,f.lanes=te,f}function or(s,f,I,q){return s=ti(7,s,q,f),s.lanes=I,s}function Ml(s,f,I,q){return s=ti(22,s,q,f),s.elementType=y,s.lanes=I,s.stateNode={isHidden:!1},s}function Ll(s,f,I){return s=ti(6,s,null,f),s.lanes=I,s}function qu(s,f,I){return f=ti(4,s.children!==null?s.children:[],s.key,f),f.lanes=I,f.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},f}function Ph(s,f,I,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,I,q,W,te,le,ye,Me){return s=new Ph(s,f,I,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:I,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rc(te),s}function Hu(s){if(!s)return Io;s=s._reactInternals;e:{if(O(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 I=s.type;if(Vn(I))return Vd(s,I,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 I=s.retryLane;s.retryLane=I!==0&&I<f?I:f}}function Nl(s,f){Gu(s,f),(s=s.alternate)&&Gu(s,f)}function Jp(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 I=fn();gr(f,s,134217728,I)}Nl(s,134217728)}},t.attemptDiscreteHydration=function(s){if(s.tag===13){var f=xi(s,1);if(f!==null){var I=fn();gr(f,s,1,I)}Nl(s,1)}},t.attemptHydrationAtCurrentPriority=function(s){if(s.tag===13){var f=Bn(s),I=xi(s,f);if(I!==null){var q=fn();gr(I,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 I=nl(f.pendingLanes);I!==0&&(ji(f,I|1),vr(f,$n()),!(kt&6)&&(Qt(),tr()))}break;case 13:ef(function(){var q=xi(s,1);if(q!==null){var W=fn();gr(q,s,1,W)}}),Nl(s,1)}},t.batchedUpdates=function(s,f){var I=kt;kt|=1;try{return s(f)}finally{kt=I,kt===0&&(Qt(),ll&&tr())}},t.createComponentSelector=function(s){return{$$typeof:ho,value:s}},t.createContainer=function(s,f,I,q,W,te,le){return sf(s,f,!1,null,I,q,W,te,le)},t.createHasPseudoClassSelector=function(s){return{$$typeof:kr,value:s}},t.createHydrationContainer=function(s,f,I,q,W,te,le,ye,Me){return s=sf(I,q,!0,s,W,te,le,ye,Me),s.context=Hu(null),I=s.current,q=fn(),W=Bn(I),te=lo(q,W),te.callback=f??null,so(I,te,W),s.current.lanes=W,ai(s,W,q),vr(s,q),s},t.createPortal=function(s,f,I){var q=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:q==null?null:""+q,children:s,containerInfo:f,implementation:I}},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=It,I=xn.transition;try{return xn.transition=null,It=16,s()}finally{It=f,xn.transition=I}},t.discreteUpdates=function(s,f,I,q,W){var te=It,le=xn.transition;try{return xn.transition=null,It=1,s(f,I,q,W)}finally{It=te,xn.transition=le,kt===0&&Qt()}},t.findAllNodes=$i,t.findBoundingRects=function(s,f){if(!Ce)throw Error(u(363));f=$i(s,f),s=[];for(var I=0;I<f.length;I++)s.push(se(f[I]));for(f=s.length-1;0<f;f--){I=s[f];for(var q=I.x,W=q+I.width,te=I.y,le=te+I.height,ye=f-1;0<=ye;ye--)if(f!==ye){var Me=s[ye],$e=Me.x,rt=$e+Me.width,Ot=Me.y,Qe=Ot+Me.height;if(q>=$e&&te>=Ot&&W<=rt&&le<=Qe){s.splice(f,1);break}else if(q!==$e||I.width!==Me.width||Qe<te||Ot>le){if(!(te!==Ot||I.height!==Me.height||rt<q||$e>W)){$e>q&&(Me.width+=$e-q,Me.x=q),rt<W&&(Me.width=W-$e),s.splice(f,1);break}}else{Ot>te&&(Me.height+=Ot-te,Me.y=te),Qe<le&&(Me.height=le-Ot),s.splice(f,1);break}}}return s},t.findHostInstance=za,t.findHostInstanceWithNoPortals=function(s){return s=T(s),s=s!==null?z(s):null,s===null?null:s.stateNode},t.findHostInstanceWithWarning=function(s){return za(s)},t.flushControlled=function(s){var f=kt;kt|=1;var I=xn.transition,q=It;try{xn.transition=null,It=1,s()}finally{It=q,xn.transition=I,kt=f,kt===0&&(Qt(),tr())}},t.flushPassiveEffects=vo,t.flushSync=ef,t.focusWithin=function(s,f){if(!Ce)throw Error(u(363));for(s=Gi(s),f=Vi(s,f),f=Array.from(f),s=0;s<f.length;){var I=f[s++];if(!xe(I)){if(I.tag===5&&at(I.stateNode))return!0;for(I=I.child;I!==null;)f.push(I),I=I.sibling}}return!1},t.getCurrentUpdatePriority=function(){return It},t.getFindAllNodesFailureDescription=function(s,f){if(!Ce)throw Error(u(363));var I=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>I&&(I=le)),le<f.length))for(te=te.child;te!==null;)s.push(te,le),te=te.sibling}if(I<f.length){for(s=[];I<f.length;I++)s.push(Nu(f[I]));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 Z(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:Jp,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,I,q){if(!Ce)throw Error(u(363));s=$i(s,f);var W=gt(s,I,q).disconnect;return{disconnect:function(){W()}}},t.registerMutableSourceForHydration=function(s,f){var I=f._getVersion;I=I(f._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[f,I]:s.mutableSourceEagerHydrationData.push(f,I)},t.runWithPriority=function(s,f){var I=It;try{return It=s,f()}finally{It=I}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(s,f,I,q){var W=f.current,te=fn(),le=Bn(W);return I=Hu(I),f.context===null?f.context=I:f.pendingContext=I,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}),V0}var Vy;function d9(){return Vy||(Vy=1,G0.exports=f9()),G0.exports}var h9=d9();const p9=Td(h9);var $0={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 $y;function g9(){return $y||($y=1,Hl.ConcurrentRoot=1,Hl.ContinuousEventPriority=4,Hl.DefaultEventPriority=16,Hl.DiscreteEventPriority=1,Hl.IdleEventPriority=536870912,Hl.LegacyRoot=0),Hl}var Wy;function v9(){return Wy||(Wy=1,$0.exports=g9()),$0.exports}var q5=v9(),m9=Lt();const Yy={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let Ky=!1,Xy=!1;const vv=".react-konva-event";let H5=!1;function y9(e){H5=e}const b9=`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
|
-
`,_9=`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
|
-
`,w9={};function Ip(e,i,t=w9){if(!Ky&&"zIndex"in i&&(console.warn(_9),Ky=!0),!Xy&&i.draggable){var n=i.x!==void 0||i.y!==void 0,a=i.onDragEnd||i.onDragMove;n&&!a&&(console.warn(b9),Xy=!0)}for(var l in t)if(!Yy[l]){var u=l.slice(0,2)==="on",c=t[l]!==i[l];if(u&&c){var d=l.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),e.off(d,t[l])}var m=!i.hasOwnProperty(l);m&&e.setAttr(l,void 0)}var _=H5||i._useStrictMode,k={},x=!1;const v={};for(var l in i)if(!Yy[l]){var u=l.slice(0,2)==="on",w=t[l]!==i[l];if(u&&w){var d=l.substr(2).toLowerCase();d.substr(0,7)==="content"&&(d="content"+d.substr(7,1).toUpperCase()+d.substr(8)),i[l]&&(v[d]=i[l])}!u&&(i[l]!==t[l]||_&&i[l]!==e.getAttr(l))&&(x=!0,k[l]=i[l])}x&&(e.setAttrs(k),es(e));for(var d in v)e.on(d+vv,v[d])}function es(e){if(!m9.Konva.autoDrawEnabled){var i=e.getLayer()||e.getStage();i&&i.batchDraw()}}var W0=Gg();const G5={},S9={};xd.Node.prototype._applyProps=Ip;function E9(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 O9(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 d=new n(a);return Ip(d,l),d}function x9(e,i,t){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function P9(e,i,t){return!1}function C9(e){return e}function k9(){return null}function A9(){return null}function T9(e,i,t,n){return S9}function R9(){}function M9(e){}function L9(e,i){return!1}function N9(){return G5}function I9(){return G5}const D9=setTimeout,j9=clearTimeout,F9=-1;function z9(e,i){return!1}const B9=!1,U9=!0,q9=!0;function H9(e,i){i.parent===e?i.moveToTop():e.add(i),es(e)}function G9(e,i){i.parent===e?i.moveToTop():e.add(i),es(e)}function V5(e,i,t){i._remove(),e.add(i),i.setZIndex(t.getZIndex()),es(e)}function V9(e,i,t){V5(e,i,t)}function $9(e,i){i.destroy(),i.off(vv),es(e)}function W9(e,i){i.destroy(),i.off(vv),es(e)}function Y9(e,i,t){console.error(`Text components are not yet supported in ReactKonva. You text is: "${t}"`)}function K9(e,i,t){}function X9(e,i,t,n,a){Ip(e,a,n)}function Z9(e){e.hide(),es(e)}function Q9(e){}function J9(e,i){(i.visible==null||i.visible)&&e.show()}function e7(e,i){}function t7(e){}function n7(){}const r7=()=>q5.DefaultEventPriority,i7=Object.freeze(Object.defineProperty({__proto__:null,appendChild:H9,appendChildToContainer:G9,appendInitialChild:E9,cancelTimeout:j9,clearContainer:t7,commitMount:K9,commitTextUpdate:Y9,commitUpdate:X9,createInstance:O9,createTextInstance:x9,detachDeletedInstance:n7,finalizeInitialChildren:P9,getChildHostContext:I9,getCurrentEventPriority:r7,getPublicInstance:C9,getRootHostContext:N9,hideInstance:Z9,hideTextInstance:Q9,idlePriority:W0.unstable_IdlePriority,insertBefore:V5,insertInContainerBefore:V9,isPrimaryRenderer:B9,noTimeout:F9,now:W0.unstable_now,prepareForCommit:k9,preparePortalMount:A9,prepareUpdate:T9,removeChild:$9,removeChildFromContainer:W9,resetAfterCommit:R9,resetTextContent:M9,run:W0.unstable_runWithPriority,scheduleTimeout:D9,shouldDeprioritizeSubtree:L9,shouldSetTextContent:z9,supportsMutation:q9,unhideInstance:J9,unhideTextInstance:e7,warnsIfNotActing:U9},Symbol.toStringTag,{value:"Module"}));var o7=Object.defineProperty,a7=Object.defineProperties,l7=Object.getOwnPropertyDescriptors,Zy=Object.getOwnPropertySymbols,s7=Object.prototype.hasOwnProperty,u7=Object.prototype.propertyIsEnumerable,Qy=(e,i,t)=>i in e?o7(e,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[i]=t,Jy=(e,i)=>{for(var t in i||(i={}))s7.call(i,t)&&Qy(e,t,i[t]);if(Zy)for(var t of Zy(i))u7.call(i,t)&&Qy(e,t,i[t]);return e},c7=(e,i)=>a7(e,l7(i)),e2,t2;typeof window<"u"&&((e2=window.document)!=null&&e2.createElement||((t2=window.navigator)==null?void 0:t2.product)==="ReactNative")?On.useLayoutEffect:On.useEffect;function $5(e,i,t){if(!e)return;if(t(e)===!0)return e;let n=e.child;for(;n;){const a=$5(n,i,t);if(a)return a;n=n.sibling}}function W5(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}const n2=console.error;console.error=function(){const e=[...arguments].join("");if(e!=null&&e.startsWith("Warning:")&&e.includes("useContext")){console.error=n2;return}return n2.apply(this,arguments)};const mv=W5(On.createContext(null));class Y5 extends On.Component{render(){return On.createElement(mv.Provider,{value:this._reactInternals},this.props.children)}}function f7(){const e=On.useContext(mv);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=$5(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 d7(){const e=f7(),[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!==mv&&!i.has(a)&&i.set(a,On.useContext(W5(a)))}t=t.return}return i}function K5(){const e=d7();return On.useMemo(()=>Array.from(e.keys()).reduce((i,t)=>n=>On.createElement(i,null,On.createElement(t.Provider,c7(Jy({},n),{value:e.get(t)}))),i=>On.createElement(Y5,Jy({},i))),[e])}function h7(e){const i=qt.useRef({});return qt.useLayoutEffect(()=>{i.current=e}),qt.useLayoutEffect(()=>()=>{i.current={}},[]),i.current}const p7=e=>{const i=qt.useRef(),t=qt.useRef(),n=qt.useRef(),a=h7(e),l=K5(),u=c=>{const{forwardedRef:d}=e;d&&(typeof d=="function"?d(c):d.current=c)};return qt.useLayoutEffect(()=>(t.current=new xd.Stage({width:e.width,height:e.height,container:i.current}),u(t.current),n.current=nc.createContainer(t.current,q5.LegacyRoot,!1,null),nc.updateContainer(qt.createElement(l,{},e.children),n.current),()=>{xd.isBrowser&&(u(null),nc.updateContainer(null,n.current,null),t.current.destroy())}),[]),qt.useLayoutEffect(()=>{u(t.current),Ip(t.current,e,a),nc.updateContainer(qt.createElement(l,{},e.children),n.current,null)}),qt.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})},g7="Layer",v7="FastLayer",vp="Group",m7="Label",y7="Rect",b7="Circle",_7="Ellipse",w7="Wedge",S7="Line",E7="Sprite",O7="Image",x7="Text",P7="TextPath",C7="Star",k7="Ring",A7="Arc",T7="Tag",R7="Path",M7="RegularPolygon",L7="Arrow",N7="Shape",I7="Transformer",nc=p9(i7);nc.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:qt.version,rendererPackageName:"react-konva"});const D7=qt.forwardRef((e,i)=>qt.createElement(Y5,{},qt.createElement(p7,{...e,forwardedRef:i}))),j7=y9,F7=Object.freeze(Object.defineProperty({__proto__:null,Arc:A7,Arrow:L7,Circle:b7,Ellipse:_7,FastLayer:v7,Group:vp,Image:O7,KonvaRenderer:nc,Label:m7,Layer:g7,Line:S7,Path:R7,Rect:y7,RegularPolygon:M7,Ring:k7,Shape:N7,Sprite:E7,Stage:D7,Star:C7,Tag:T7,Text:x7,TextPath:P7,Transformer:I7,Wedge:w7,useStrictMode:j7},Symbol.toStringTag,{value:"Module"})),Ja=Xl(F7);var Y0,r2;function Dp(){if(r2)return Y0;r2=1;var e=An();return Y0=function(t,n,a){const l=e.useRef("loading"),u=e.useRef(),[c,d]=e.useState(0),m=e.useRef(),_=e.useRef(),k=e.useRef();return(m.current!==t||_.current!==n||k.current!==a)&&(l.current="loading",u.current=void 0,m.current=t,_.current=n,k.current=a),e.useLayoutEffect(function(){if(!t)return;var x=document.createElement("img");function v(){l.current="loaded",u.current=x,d(Math.random())}function w(){l.current="failed",u.current=void 0,d(Math.random())}return x.addEventListener("load",v),x.addEventListener("error",w),n&&(x.crossOrigin=n),a&&(x.referrerPolicy=a),x.src=t,function(){x.removeEventListener("load",v),x.removeEventListener("error",w)}},[t,n,a]),[u.current,l.current]},Y0}var rd={},id={},z7=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 B7=e=>{const i=window.getComputedStyle(e).position;return!(i==="absolute"||i==="relative")};function X5(e=()=>{}){const i=qt.useRef(e);return i.current=e,qt.useCallback((...t)=>i.current.apply(null,t),[])}const U7=({children:e,groupProps:i,divProps:t,transform:n,transformFunc:a})=>{const l=K5(),u=qt.useRef(null),[c]=qt.useState(()=>document.createElement("div")),d=qt.useMemo(()=>k3.createRoot(c),[c]),m=n??!0,_=X5(()=>{if(m&&u.current){let p=u.current.getAbsoluteTransform().decompose();a&&(p=a(p)),c.style.position="absolute",c.style.zIndex="10",c.style.top="0px",c.style.left="0px",c.style.transform=`translate(${p.x}px, ${p.y}px) rotate(${p.rotation}deg) scaleX(${p.scaleX}) scaleY(${p.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:x}=k,v=z7(k,["style"]);Object.assign(c.style,x),Object.assign(c,v)});return qt.useLayoutEffect(()=>{var k;const x=u.current;if(!x)return;const v=(k=x.getStage())===null||k===void 0?void 0:k.container();if(v)return v.appendChild(c),m&&B7(v)&&(v.style.position="relative"),x.on("absoluteTransformChange",_),_(),()=>{var w;x.off("absoluteTransformChange",_),(w=c.parentNode)===null||w===void 0||w.removeChild(c)}},[m]),qt.useLayoutEffect(()=>{_()},[t,a]),qt.useLayoutEffect(()=>{d.render(qt.createElement(l,null,e))}),qt.useLayoutEffect(()=>()=>{setTimeout(()=>{d.unmount()})},[]),qt.createElement(vp,Object.assign({ref:u},i))},q7=({selector:e,enabled:i,children:t})=>{const n=qt.useRef(null),a=qt.useRef(null),l=qt.useRef(null),u=i??!0;return qt.useLayoutEffect(()=>{if(!n.current||!a.current)return;l.current=a.current;const d=n.current.getStage().findOne(e);u&&d?a.current.moveTo(d):a.current.moveTo(n.current);const m=n.current.getLayer();if(m&&(m.batchDraw(),d)){const _=d.getLayer();if(!_)return;_.batchDraw()}},[e,u]),qt.useEffect(()=>()=>{var c;(c=l.current)===null||c===void 0||c.destroy()},[]),qt.createElement(vp,{name:"_outer_portal",ref:n},qt.createElement(vp,{name:"_inner_portal",ref:a},t))};var H7=Dp();const G7=Td(H7),V7=Object.freeze(Object.defineProperty({__proto__:null,Html:U7,Portal:q7,useEvent:X5,useImage:G7},Symbol.toStringTag,{value:"Module"})),Fd=Xl(V7);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 Z5(e,i,t){const n=i-1,a=t[J5(n,t.length)];return a.marker!=="Z"?a:Z5(e,n,t)}function Q5(e,i,t){const n=i+1,a=t[J5(n,t.length)];return a.marker==="Z"?Q5(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,d){return c[d].marker==="M"?c[d]:l(c,d-1)};var a=l;let u=l(t,i);e.values.x=u.values.x,e.values.y=u.values.y}return e}function Y7(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 J5(e,i){return(e%i+i)%i}function K7(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 Ug(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,Ug(e,i-1)),e[i].marker==="Z"&&Ug(e,i-1)}function X7(e,i,t){const n=o2(e.values,t.values),a=o2(i.values,e.values);return Math.min(a,n)}function i2(e,i){return Math.atan2(i.x-e.x,i.y-e.y)}function o2(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 a2(e,i){return Math.sin(e)*i}function l2(e,i){return Math.cos(e)*i}function s2(e,i){const t=i/Math.tan(e);return t===1/0||t===-1/0||isNaN(t)?i:t}function Z7(e,i){return i*Math.tan(e)}function Q7(e,i){let t,n=0,a=e*(180/Math.PI);return a<0&&a>=-180||a>180&&a<360?t=s2(e/2,-i):(t=s2(e/2,i),n=1,t===1/0&&(t=i)),{offset:t,sweepFlag:n}}function J7(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 e4(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 Y7(n.marker,l)}).map(W7)}function t4(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(K7),Ug(l,l.length-1);const u=l[l.length-1].marker=="Z";l.filter(c=>!c.overlap).map((c,d,m)=>{const k=Z5(c,d,m),x=Q5(c,d,m),v=i2(c.values,k.values),w=i2(c.values,x.values),p=w-v,h=p*(180/Math.PI),C=X7(c,k,x),g=Math.abs(Z7(p/2,C/2)),b=Math.min(i,g),y=Q7(p,b),E=y.offset,L=y.sweepFlag,R=(d==0||d==m.length-1)&&!u;switch(c.marker){case"M":case"L":const D=[c.values.x+a2(v,E),c.values.y+l2(v,E)],O=[c.values.x+a2(w,E),c.values.y+l2(w,E)];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&&(x.marker==="L"||x.marker==="M")&&a.push({marker:"A",radius:b,values:{radiusX:parseFloat(b.toFixed(3)),radiusY:parseFloat(b.toFixed(3)),rotation:h,largeArc:0,sweep:L,x:parseFloat(O[0].toFixed(3)),y:parseFloat(O[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:J7(a),commands:a}}function eS(e,i,t){return t4([...e4(e)],i,t)}const tS=Object.freeze(Object.defineProperty({__proto__:null,parsePath:e4,roundCommands:t4,roundCorners:eS},Symbol.toStringTag,{value:"Module"})),nS=Xl(tS);var _o={},od={},Qh={},u2;function rS(){if(u2)return Qh;u2=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(J){var B=new Error(t+": "+J);throw B.source=t,B}function a(){var J=l();return t.length>0&&n("Invalid input not EOF"),J}function l(){return y(u)}function u(){return c("linear-gradient",i.linearGradient,m)||c("repeating-linear-gradient",i.repeatingLinearGradient,m)||c("radial-gradient",i.radialGradient,x)||c("repeating-radial-gradient",i.repeatingRadialGradient,x)}function c(J,B,N){return d(B,function(F){var H=N();return H&&(Z(i.comma)||n("Missing comma before color stops")),{type:J,orientation:H,colorStops:y(E)}})}function d(J,B){var N=Z(J);if(N){Z(i.startCall)||n("Missing (");var F=B(N);return Z(i.endCall)||n("Missing )"),F}}function m(){return _()||k()}function _(){return U("directional",i.sideOrCorner,1)}function k(){return U("angular",i.angleValue,1)}function x(){var J,B=v(),N;return B&&(J=[],J.push(B),N=t,Z(i.comma)&&(B=v(),B?J.push(B):t=N)),J}function v(){var J=w()||p();if(J)J.at=C();else{var B=h();if(B){J=B;var N=C();N&&(J.at=N)}else{var F=g();F&&(J={type:"default-radial",at:F})}}return J}function w(){var J=U("shape",/^(circle)/i,0);return J&&(J.style=z()||h()),J}function p(){var J=U("shape",/^(ellipse)/i,0);return J&&(J.style=M()||h()),J}function h(){return U("extent-keyword",i.extentKeywords,1)}function C(){if(U("position",/^at/,0)){var J=g();return J||n("Missing positioning value"),J}}function g(){var J=b();if(J.x||J.y)return{type:"position",value:J}}function b(){return{x:M(),y:M()}}function y(J){var B=J(),N=[];if(B)for(N.push(B);Z(i.comma);)B=J(),B?N.push(B):n("One extra comma");return N}function E(){var J=L();return J||n("Expected color definition"),J.length=M(),J}function L(){return D()||S()||O()||R()}function R(){return U("literal",i.literalColor,0)}function D(){return U("hex",i.hexColor,1)}function O(){return d(i.rgbColor,function(){return{type:"rgb",value:y(T)}})}function S(){return d(i.rgbaColor,function(){return{type:"rgba",value:y(T)}})}function T(){return Z(i.number)[1]}function M(){return U("%",i.percentageValue,1)||A()||z()}function A(){return U("position-keyword",i.positionKeywords,1)}function z(){return U("px",i.pixelValue,1)||U("em",i.emValue,1)}function U(J,B,N){var F=Z(B);if(F)return{type:J,value:F[N]}}function Z(J){var B,N;return N=/^[\n\r\t\s]+/.exec(t),N&&X(N[0].length),B=J.exec(t),B&&X(B[0].length),B}function X(J){t=t.substr(J)}return function(J){return t=J.toString(),a()}}(),Qh.parse=e.parse,Qh.stringify=e.stringify,Qh}var c2;function yv(){return c2||(c2=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(rS()),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((d,m)=>({color:a(d),offset:d.length?parseFloat(d.length.value)/100:m/(c.colorStops.length-1)}))}};e.parseColor=l}(od)),od}var f2;function zd(){return f2||(f2=1,function(e){var i=_o&&_o.__createBinding||(Object.create?function(m,_,k,x){x===void 0&&(x=k);var v=Object.getOwnPropertyDescriptor(_,k);v&&!("get"in v?!_.__esModule:v.writable||v.configurable)||(v={enumerable:!0,get:function(){return _[k]}}),Object.defineProperty(m,x,v)}:function(m,_,k,x){x===void 0&&(x=k),m[x]=_[k]}),t=_o&&_o.__setModuleDefault||(Object.create?function(m,_){Object.defineProperty(m,"default",{enumerable:!0,value:_})}:function(m,_){m.default=_}),n=_o&&_o.__importStar||function(){var m=function(_){return m=Object.getOwnPropertyNames||function(k){var x=[];for(var v in k)Object.prototype.hasOwnProperty.call(k,v)&&(x[x.length]=v);return x},m(_)};return function(_){if(_&&_.__esModule)return _;var k={};if(_!=null)for(var x=m(_),v=0;v<x.length;v++)x[v]!=="default"&&i(k,_,x[v]);return t(k,_),k}}(),a=_o&&_o.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.useColor=void 0;const l=a(An()),u=n(yv()),c=a(Ji()),d=(m,_=m.fill,k="fill")=>l.default.useMemo(()=>{if(!u.isGradient(_))return{[k]:_};const{stops:x,rotation:v}=u.parseColor(_),w={x:m.a.width/2,y:m.a.height/2},p=Math.sqrt(Math.pow(w.x,2)+Math.pow(w.y,2)),h=c.default.Util.degToRad(v)-Math.PI/2,C=[];return x.forEach(({offset:g,color:b})=>{C.push(g,b)}),k==="fill"?{fillLinearGradientStartPointX:w.x-p*Math.cos(h),fillLinearGradientStartPointY:w.y-p*Math.sin(h),fillLinearGradientColorStops:C,fillLinearGradientEndPointX:w.x+p*Math.cos(h),fillLinearGradientEndPointY:w.y+p*Math.sin(h),fill:x[1].color,fillPriority:"linear-gradient"}:{strokeLinearGradientStartPointX:w.x-p*Math.cos(h),strokeLinearGradientStartPointY:w.y-p*Math.sin(h),strokeLinearGradientColorStops:C,strokeLinearGradientEndPointX:w.x+p*Math.cos(h),strokeLinearGradientEndPointY:w.y+p*Math.sin(h)}},[_,m.width,m.height]);e.useColor=d}(_o)),_o}var K0={},ad={},d2;function yc(){return d2||(d2=1,function(e){var i=ad&&ad.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.isAnimationUsed=e.toggleFadeInAnimation=void 0,e.useFadeIn=c;const t=i(An()),n=i(Ji());let a=!1;const l=(d=!a)=>{a=d};e.toggleFadeInAnimation=l;const u=()=>a;function c(d,m){const _=t.default.useRef();t.default.useLayoutEffect(()=>{_.current&&_.current.destroy()},[m]),t.default.useLayoutEffect(()=>{if(!a)return;const k=d.current.opacity();return k?(d.current.opacity(0),_.current=new n.default.Tween({node:d.current,opacity:k,onFinish:()=>{var x;(x=_.current)===null||x===void 0||x.destroy()}}),_.current.play(),()=>{var x;(x=_.current)===null||x===void 0||x.destroy()}):void 0},[])}e.isAnimationUsed=u}(ad)),ad}var h2;function Ks(){return h2||(h2=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=p,e.triggerLoadError=h;const i=yc();let t=0,n=[],a=3e4;const l=C=>{a=C};e.setAssetLoadTimeout=l;const u=()=>a;e.getAssetLoadTimeout=u;let c=6e3;const d=C=>{c=C};e.setFontLoadTimeout=d;const m=()=>c;function _(C){t+=1;let g=!1;const b=setTimeout(()=>{g||(h(`Timeout loading asset ${C}`),console.error("Timeout triggered for loader. Some assets may not have loaded.",C),g=!0,k())},a);return()=>{g||(clearTimeout(b),k())}}function k(){t-=1,t===0&&(n.forEach(C=>C()),n=[])}function x(C){t===0?C():n.push(C)}function v(){return new Promise(C=>x(()=>{(0,i.isAnimationUsed)()?setTimeout(C,300):C(!0)}))}e.getFontLoadTimeout=m;let w=[];function p(C){w.push(C)}function h(C){w.forEach(g=>g(C))}}(K0)),K0}var Ha={},p2;function Bd(){return p2||(p2=1,function(e){var i=Ha&&Ha.__createBinding||(Object.create?function(T,M,A,z){z===void 0&&(z=A);var U=Object.getOwnPropertyDescriptor(M,A);U&&!("get"in U?!M.__esModule:U.writable||U.configurable)||(U={enumerable:!0,get:function(){return M[A]}}),Object.defineProperty(T,z,U)}:function(T,M,A,z){z===void 0&&(z=A),T[z]=M[A]}),t=Ha&&Ha.__setModuleDefault||(Object.create?function(T,M){Object.defineProperty(T,"default",{enumerable:!0,value:M})}:function(T,M){T.default=M}),n=Ha&&Ha.__importStar||function(){var T=function(M){return T=Object.getOwnPropertyNames||function(A){var z=[];for(var U in A)Object.prototype.hasOwnProperty.call(A,U)&&(z[z.length]=U);return z},T(M)};return function(M){if(M&&M.__esModule)return M;var A={};if(M!=null)for(var z=T(M),U=0;U<z.length;U++)z[U]!=="default"&&i(A,M,z[U]);return t(A,M),A}}();Object.defineProperty(e,"__esModule",{value:!0}),e.isFontLoaded=e.globalFonts=void 0,e.isGoogleFontChanged=d,e.setGoogleFonts=m,e.getFontsList=_,e.addGlobalFont=k,e.removeGlobalFont=x,e.replaceGlobalFonts=v,e.loadFont=b,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 d(){return c.value}function m(T){T!=="default"?(c.value=!0,u.splice(0,u.length),u.push(...T)):c.value=!1}function _(){return u}function k(T){e.globalFonts.push(T)}function x(T){const M=e.globalFonts.findIndex(A=>A.fontFamily===T);M!==-1&&e.globalFonts.splice(M,1)}function v(T){e.globalFonts.replace(T)}e.globalFonts=a.observable([]);var w="Some test text;?#D-ПРИВЕТ!1230o9u8i7y6t5r4e3w2q1",p=document.createElement("canvas");function h(T,M="Arial",A="normal",z="normal"){var U=p.getContext("2d");return U.font=`${A} ${z} 40px '${T}', ${M}`,U.measureText(w).width}const C={Arial:!0},g=T=>!!C[T];async function b(T,M,A){var z;if(C[T])return;const U=!!(!((z=document.fonts)===null||z===void 0)&&z.load),Z=h("Arial","Arial",M,A);if(U)try{await document.fonts.load(`16px '${T}', ${M} ${A}`);const N=h(T,"Arial",M,A);if(Z!==N)return void(C[T]=!0)}catch{}const X=h("Times","Times",M,A),J=h(T,"Arial",M,A),B=Math.min(6e3,(0,l.getFontLoadTimeout)())/60;for(let N=0;N<B;N++){const F=h(T,"Arial",M,A),H=h(T,"Times",M,A);if(F!==J||F!==Z||H!==X)return void(C[T]=!0);await new Promise(Y=>setTimeout(Y,60))}console.warn(`Timeout for loading font "${T}". Looks like polotno can't load it. Is it a correct font family?`),(0,l.triggerLoadError)(`Timeout for loading font "${T}"`)}e.isFontLoaded=g;const y={};let E="400,400italic,700,700italic";function L(T){E=T}function R(){return E}function D(T){if(y[T])return;const M=`https://fonts.googleapis.com/css?family=${T.replace(/ /g,"+")}:${E}`,A=document.createElement("link");A.type="text/css",A.href=M,A.rel="stylesheet",document.getElementsByTagName("head")[0].appendChild(A),y[T]=!0}const O={};function S(T){const M=T.fontFamily;if(O[M]||!T.url&&!T.styles)return;const A=document.createElement("style");A.type="text/css";const z=T.styles||(T.url?[{src:`url("${T.url}")`}]:[]);let U="";z.forEach(Z=>{U+=`
|
|
77
|
-
@font-face {
|
|
78
|
-
font-family: '${M}';
|
|
79
|
-
src: ${Z.src};
|
|
80
|
-
font-style: ${Z.fontStyle||"normal"};
|
|
81
|
-
font-weight: ${Z.fontWeight||"normal"};
|
|
82
|
-
}
|
|
83
|
-
`}),A.innerHTML=U,document.getElementsByTagName("head")[0].appendChild(A),O[T.fontFamily]=!0}}(Ha)),Ha}var Ga={},g2;function ts(){return g2||(g2=1,function(e){var i=Ga&&Ga.__createBinding||(Object.create?function(l,u,c,d){d===void 0&&(d=c);var m=Object.getOwnPropertyDescriptor(u,c);m&&!("get"in m?!u.__esModule:m.writable||m.configurable)||(m={enumerable:!0,get:function(){return u[c]}}),Object.defineProperty(l,d,m)}:function(l,u,c,d){d===void 0&&(d=c),l[d]=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 d=[];for(var m in c)Object.prototype.hasOwnProperty.call(c,m)&&(d[d.length]=m);return d},l(u)};return function(u){if(u&&u.__esModule)return u;var c={};if(u!=null)for(var d=l(u),m=0;m<d.length;m++)d[m]!=="default"&&i(c,u,d[m]);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 X0={},v2;function n4(){return v2||(v2=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}(X0)),X0}var ld={},m2;function jp(){return m2||(m2=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:[]},d={};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.type==="text"&&l.lineHeight<1&&(d.offset=l.fontSize)),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(Object.assign(Object.assign({},d),{pixelRatio:l.store._elementsPixelRatio})):a.clearCache(),(u=a.getLayer())===null||u===void 0||u.batchDraw()}}(ld)),ld}var sd={},y2;function bc(){return y2||(y2=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(An()),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={},b2;function Xs(){return b2||(b2=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(An());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,d]=t.default.useState((0,e.isMobile)());return t.default.useEffect(()=>{const m=()=>{d((0,e.isMobile)())};return window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[]),c};e.useMobile=u}(ud)),ud}var _2={},r4="warn";function i4(e){r4=e}function o4(){return r4}function iS(e){i4(e)}var sr;(function(e){e.afterCreate="afterCreate",e.afterAttach="afterAttach",e.afterCreationFinalization="afterCreationFinalization",e.beforeDetach="beforeDetach",e.beforeDestroy="beforeDestroy"})(sr||(sr={}));var qg=function(e,i){return qg=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])},qg(e,i)};function bn(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");qg(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 oS(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 a4(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(m){return function(_){return d([m,_])}}function d(m){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,m[0]&&(t=0)),t;)try{if(n=1,a&&(l=m[0]&2?a.return:m[0]?a.throw||((l=a.return)&&l.call(a),0):a.next)&&!(l=l.call(a,m[1])).done)return l;switch(a=0,l&&(m=[m[0]&2,l.value]),m[0]){case 0:case 1:l=m;break;case 4:return t.label++,{value:m[1],done:!1};case 5:t.label++,a=m[1],m=[0];continue;case 7:m=t.ops.pop(),t.trys.pop();continue;default:if(l=t.trys,!(l=l.length>0&&l[l.length-1])&&(m[0]===6||m[0]===2)){t=0;continue}if(m[0]===3&&(!l||m[1]>l[0]&&m[1]<l[3])){t.label=m[1];break}if(m[0]===6&&t.label<l[1]){t.label=l[1],l=m;break}if(l&&t.label<l[2]){t.label=l[2],t.ops.push(m);break}l[2]&&t.ops.pop(),t.trys.pop();continue}m=i.call(e,t)}catch(_){m=[6,_],a=0}finally{n=l=0}if(m[0]&5)throw m[1];return{value:m[0]?m[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 Ud(e){return ut(e).type}function aS(e,i){return ut(e).getChildType(i)}function l4(e,i){return ut(e).onPatch(i)}function lS(e,i){return ut(e).onSnapshot(i)}function cc(e,i){ut(e).applyPatches(Pv(i))}function sS(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=l4(e,function(u,c){i&&!i(u,c,Sv())||(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 uS(e){var i=ut(e);if(!i.isRoot)throw new nt("`protect` can only be invoked on root nodes");i.isProtectionEnabled=!0}function cS(e){var i=ut(e);if(!i.isRoot)throw new nt("`unprotect` can only be invoked on root nodes");i.isProtectionEnabled=!1}function fS(e){return ut(e).isProtected}function s4(e,i){return ut(e).applySnapshot(i)}function bv(e,i){i===void 0&&(i=!0);var t=ut(e);return i?t.snapshot:t.type.getSnapshot(t,!1)}function dS(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 hS(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 nt("Failed to find the parent of ".concat(ut(e)," at depth ").concat(i))}function pS(e,i){for(var t=ut(e).parent;t;){if(i.is(t.storedValue))return!0;t=t.parent}return!1}function gS(e,i){for(var t=ut(e).parent;t;){if(i.is(t.storedValue))return t.storedValue;t=t.parent}throw new nt("Failed to find the parent of ".concat(ut(e)," of a given type"))}function u4(e){return ut(e).root.storedValue}function c4(e){return ut(e).path}function vS(e){return gc(ut(e).path)}function mS(e){return ut(e).isRoot}function yS(e,i){var t=k4(ut(e),i);return t?t.value:void 0}function bS(e,i,t){var n=ut(i).root.identifierCache.resolve(e,_c(t));return n==null?void 0:n.value}function f4(e){return ut(e).identifier}function _S(e,i){i===void 0&&(i=!0);try{var t=e();if(t==null)return;if(nn(t))return i?_v(t)?t:void 0:t;throw new nt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof Cv)return;throw n}}function wS(e,i){i===void 0&&(i=!0);try{var t=e();if(t==null)return!1;if(nn(t))return i?_v(t):!0;throw new nt("The reference to be checked is not one of node, null or undefined")}catch(n){if(n instanceof Cv)return!1;throw n}}function d4(e,i){var t=k4(ut(e),i,!1);if(t!==void 0)try{return t.value}catch{return}}function SS(e,i){return C4(ut(e),ut(i))}function ES(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 OS(e){return ut(e).detach(),e}function xS(e){var i=ut(e);i.isRoot?i.die():i.parent.removeChild(i.subpath)}function _v(e){return ut(e).observableIsAlive}function PS(e,i){var t=ut(e);return t.addDisposer(i),i}function CS(e){var i=ut(e),t=i.root.environment;if(!t)throw new nt("Failed to find the environment of ".concat(i," ").concat(i.path));return t}function kS(e){var i=ut(e),t=i.root.environment;return!!t}function h4(e,i){var t=ut(e);t.getChildren().forEach(function(n){nn(n.storedValue)&&h4(n.storedValue,i)}),i(t.storedValue)}function p4(e){var i;return nn(e)?i=Ud(e):i=e,{name:i.name,properties:ur({},i.properties)}}function AS(e){var i=ut(e).type,t=ur(ur({},p4(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){y5(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):_5(e,a)?t.volatile.push(a):t.views.push(a)}}),t}function TS(e){return e}function RS(e){return e}function MS(e){return e}function LS(e){return ut(e).nodeId}var g4=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 L4),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){bn(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(d){throw c.state=Lr.DEAD,d}return c.state=Lr.CREATED,c.finalizeCreation(),c}return Object.defineProperty(i.prototype,"root",{get:function(){if(!this.parent)throw new nt("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}(g4);Pd.prototype.die=Zn(Pd.prototype.die);var NS=1,Po;(function(e){e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.CREATING=1]="CREATING",e[e.CREATED=2]="CREATED"})(Po||(Po={}));var Ti;(function(e){e.Dispose="dispose",e.Patch="patch",e.Snapshot="snapshot"})(Ti||(Ti={}));var IS={onError:function(e){throw e}},yi=function(e){bn(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:++NS}),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 tE),c._childNodes=t.initializeChildNodes(c,c._initialSnapshot),c.identifier=null,c.unnormalizedIdentifier=null,c.identifierAttribute&&c._initialSnapshot){var d=c._initialSnapshot[c.identifierAttribute];if(d===void 0){var m=c._childNodes[c.identifierAttribute];m&&(d=m.value)}if(typeof d!="string"&&typeof d!="number")throw new nt("Instance identifier '".concat(c.identifierAttribute,"' for type '").concat(c.type.name,"' must be a string or a number"));c.identifier=_c(d),c.unnormalizedIdentifier=d}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=[],d=this.parent;d&&d._observableInstanceState===Po.UNINITIALIZED;)c.unshift(d),d=d.parent;try{for(var m=wd(c),_=m.next();!_.done;_=m.next()){var k=_.value;k.createObservableInstanceIfNeeded(!1)}}catch(p){n={error:p}}finally{try{_&&!_.done&&(a=m.return)&&a.call(m)}finally{if(n)throw n.error}}var x=this.type;try{this.storedValue=x.createNewInstance(this._childNodes),this.preboot(),this._isRunningAction=!0,x.finalizeNewInstance(this,this.storedValue)}catch(p){throw this.state=Lr.DEAD,p}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()),w=v.next();!w.done;w=v.next()){var k=w.value;k.fireHook(sr.afterCreate),k.finalizeCreation()}}catch(p){l={error:p}}finally{try{w&&!w.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=o4();if(!this.isAlive&&n!=="ignore"){var a=this._getAssertAliveError(t);switch(n){case"error":throw new nt(a);case"warn":pE(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||wv();l&&l.type!=="action"&&l.parentActionEvent&&(l=l.parentActionEvent);var u="";if(l&&l.name!=null){var c=l&&l.context&&c4(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):T4(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 nt("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(d){n={error:d}}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 nt("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",rE)}}),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(Ti.Dispose),this._internalEventsClear(Ti.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(Ti.Snapshot,t)}}),Object.defineProperty(i.prototype,"emitSnapshot",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this._internalEventsEmit(Ti.Snapshot,t)}}),Object.defineProperty(i.prototype,"onPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsRegister(Ti.Patch,t)}}),Object.defineProperty(i.prototype,"emitPatch",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){if(this._internalEventsHasSubscribers(Ti.Patch)){var a=n.path.substr(this.path.length)+(t.path?"/"+t.path:""),l=fE({},t,{path:a}),u=ca(_E(l),2),c=u[0],d=u[1];this._internalEventsEmit(Ti.Patch,c,d)}this.parent&&this.parent.emitPatch(t,n)}}),Object.defineProperty(i.prototype,"hasDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){return this._internalEventsHas(Ti.Dispose,t)}}),Object.defineProperty(i.prototype,"addDisposer",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(!this.hasDisposer(t)){this._internalEventsRegister(Ti.Dispose,t,!0);return}throw new nt("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(Ti.Dispose,t))throw new nt("cannot remove a disposer which was never registered for execution");this._internalEventsUnregister(Ti.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=c5(function(){return t.snapshot},function(a){return t.emitSnapshot(a)},IS);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 L4),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}(g4);yi.prototype.createObservableInstance=Zn(yi.prototype.createObservableInstance);yi.prototype.detach=Zn(yi.prototype.detach);yi.prototype.die=Zn(yi.prototype.die);var v4,Tt;(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"})(Tt||(Tt={}));var m4="cannotDetermine",DS=Symbol("$type"),Qa=function(){function e(i){Object.defineProperty(this,v4,{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 nt("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=P4(i);if(n){var a=Ud(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 nt("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 nt("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 nt("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 nt("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}();v4=DS;Qa.prototype.create=Zn(Qa.prototype.create);var fc=function(e){bn(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||nn(n)&&ut(n)===t?!0:t.type===this&&R4(n)&&!nn(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(),nn(n)&&this.isAssignableFrom(Ud(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){bn(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 jS(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(d){throw ia.delete(t.id),e.onFail(t,l,d),d}}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 FS=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 zS(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),d=c?e:void 0,m=new FS(d,u);i.set(n.id,m);var _=void 0;try{_=a(n)}catch(x){throw i.delete(n.id),m.finish(x),x}return m.hasFlowsPending||(i.delete(n.id),m.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 BS(e,i,t,n){if(n instanceof Date)return{$MST_DATE:n.getTime()};if(pc(n))return n;if(nn(n))return Jh("[MSTNode: ".concat(Ud(n).name,"]"));if(typeof n=="function")return Jh("[function]");if(typeof n=="object"&&!Fs(n)&&!xv(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 US(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 y4(e,i){lc(function(){Pv(i).forEach(function(t){return qS(e,t)})})}function qS(e,i){var t=d4(e,i.path||"");if(!t)throw new nt("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 s4.call(null,t,i.args[0]);if(typeof t[i.name]!="function")throw new nt("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 US(n,a)}):[])}function HS(e,i){var t=[],n=function(u){var c=i?i(u,Sv()):!0;c&&t.push(u)},a,l={actions:t,get recording(){return!!a},stop:function(){a&&(a(),a=void 0)},resume:function(){a||(a=b4(e,n))},replay:function(u){y4(u,t)}};return l.resume(),l}function b4(e,i,t){return t===void 0&&(t=!1),S4(e,function(a,l){if(a.type==="action"&&a.id===a.rootId){var u=ut(a.context),c={name:a.name,path:C4(ut(e),u),args:a.args.map(function(m,_){return BS(u,a.name,_,m)})};if(t){var d=l(a);return i(c),d}else return i(c),l(a)}else return l(a)})}var GS=1,Sd;function wv(){return Sd}function _4(){return GS++}function Hg(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 w4(e){if(e)return e.type==="action"?e:e.parentActionEvent}function Cd(e,i,t){var n=function(){var a=_4(),l=Sd,u=w4(l);return Hg({type:"action",name:i,id:a,args:N4(arguments),context:e,tree:u4(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 S4(e,i,t){t===void 0&&(t=!0);var n=ut(e);return n.addMiddleWare(i,t)}function VS(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(),d=c&&c.handler;if(!d)return Zn(t).apply(null,u.args);if(!c.includeHooks&&sr[u.name])return l(u);function m(k,x){a=l(k),x&&(a=x(a))}function _(k){a=k}return d(u,m,_),a}return l(i)}function Sv(){for(var e=wv();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 YS(e,i){return E4(e,i,!1)}function KS(e,i){return E4(e,i,!0)}function XS(e){try{return JSON.stringify(e)}catch(i){return"<Unserializable: ".concat(i,">")}}function O4(e){return typeof e=="function"?"<function".concat(e.name?" "+e.name:"",">"):nn(e)?"<".concat(e,">"):"`".concat(XS(e),"`")}function ZS(e){return e.length<280?e:"".concat(e.substring(0,272),"......").concat(e.substring(e.length-8))}function QS(e){var i=e.value,t=e.context[e.context.length-1].type,n=e.context.map(function(c){var d=c.path;return d}).filter(function(c){return c.length>0}).join("/"),a=n.length>0?'at path "/'.concat(n,'" '):"",l=nn(i)?"value of type ".concat(ut(i).type.name,":"):pc(i)?"value":"snapshot",u=t&&nn(i)&&t.is(ut(i).snapshot);return"".concat(a).concat(l," ").concat(O4(i)," is not assignable ").concat(t?"to type: `".concat(t.name,"`"):"")+(e.message?" (".concat(e.message,")"):"")+(t?W4(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 Ev(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 Fp(e){return e.reduce(function(i,t){return i.concat(t)},[])}function Xa(e,i){gE()&&x4(e,i)}function x4(e,i){var t=e.validate(i,[{path:"",type:e}]);if(t.length>0)throw new nt(JS(e,i,t))}function JS(e,i,t){if(t.length!==0)return"Error while converting ".concat(ZS(O4(i))," to `").concat(e.name,`\`:
|
|
93
|
-
|
|
94
|
-
`)+t.map(QS).join(`
|
|
95
|
-
`)}var eE=0,tE=function(){function e(){Object.defineProperty(this,"cacheId",{enumerable:!0,configurable:!0,writable:!0,value:eE++}),Object.defineProperty(this,"cache",{enumerable:!0,configurable:!0,writable:!0,value:sn.map()}),Object.defineProperty(this,"lastCacheModificationPerId",{enumerable:!0,configurable:!0,writable:!0,value:sn.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,sn.array([],zp));var a=this.cache.get(n);if(a.indexOf(i)!==-1)throw new nt("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;tv(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 w5(this.cache).forEach(function(l){for(var u=ca(l,2),c=u[0],d=u[1],m=!1,_=d.length-1;_>=0;_--){var k=d[_];(k===i||k.path.indexOf(a)===0)&&(n.addNodeToCache(k,!1),d.splice(_,1),d.length||t.cache.delete(c),m=!0)}m&&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 nt("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 Ov(e,i,t,n,a){var l=P4(a);if(l){if(l.parent)throw new nt("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 nE(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 nn(e){return!!(e&&e.$treenode)}function ut(e){if(!nn(e))throw new nt("Value ".concat(e," is no MST Node"));return e.$treenode}function P4(e){return e&&e.$treenode||null}function rE(){return ut(this).snapshot}var iE=function(e){return".."};function C4(e,i){if(e.root!==i.root)throw new nt("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(iE).join("/")+mp(n.slice(a))}function k4(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;nn(u)&&(n=ut(u))}if(n instanceof yi){var c=n.getChildType(l);if(c&&(n=n.getChildNode(l),n))continue}}}throw new nt("Could not resolve '".concat(l,"' in path '").concat(mp(i.slice(0,a))||"/","' while resolving '").concat(mp(i),"'"))}}catch(d){if(!t)return;throw d}return n}function T4(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 oE(e){return I4(),D4(e)}var aE=Object.toString(),dc=Object.freeze([]),hc=Object.freeze({}),zp=Q3().useProxies?{deep:!1}:{deep:!1,proxy:!1};Object.freeze(zp);var nt=function(e){bn(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 lE(e){return e}var sE=Number.isInteger;function uE(e){return Number(e)===e&&e%1!==0}function cE(e){return Number.isFinite(e)}function xv(e){return Array.isArray(e)||ri(e)}function Pv(e){return e?xv(e)?e:[e]:dc}function fE(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())===aE}function R4(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 M4(e){return typeof e!="function"}function dE(e,i,t){_r(e)?rv(e,i,t):Object.defineProperty(e,i,t)}function zs(e,i,t){dE(e,i,{enumerable:!1,writable:!1,configurable:!0,value:t})}var hE=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}(),L4=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 hE),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 N4(e){for(var i=new Array(e.length),t=0;t<e.length;t++)i[t]=e[t];return i}function Z0(e,i){return e.indexOf(i)===0}var I4=function(e,i){};I4.ids={};function pE(e){console.warn(new Error("[mobx-state-tree] ".concat(e)))}function gE(){return typeof process<"u"&&_2&&_2.ENABLE_TYPE_CHECK==="true"}function Q0(e){typeof queueMicrotask=="function"?queueMicrotask(e):typeof setImmediate=="function"?setImmediate(e):setTimeout(e,1)}function D4(e){return bE(e.name,e)}function vE(e){return e}function mE(e){return function(){var i,t=[];for(i=0;i<arguments.length;i++)t[i]=arguments[i];return a4(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 yE(e){return a4(this,function(i){switch(i.label){case 0:return[4,e];case 1:return[2,i.sent()]}})}function bE(e,i){var t=function(){var a=_4(),l=wv();if(!l)throw new nt("a mst flow must always have a parent context");var u=w4(l);if(!u)throw new nt("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},d=arguments;function m(_,k,x){return _.$mst_middleware=t.$mst_middleware,Hg(ur(ur({},c),{type:k,args:[x]}),_)}return new Promise(function(_,k){var x,v=function(){x=i.apply(null,arguments),w(void 0)};v.$mst_middleware=t.$mst_middleware,Hg(ur(ur({},c),{type:"flow_spawn",args:N4(d)}),v);function w(C){var g;try{var b=m(function(y){g=x.next(y)},"flow_resume",C);b instanceof Error&&(g=x.throw(b))}catch(y){Q0(function(){m(function(E){k(y)},"flow_throw",y)});return}h(g)}function p(C){var g;try{m(function(b){g=x.throw(b)},"flow_resume_error",C)}catch(b){Q0(function(){m(function(y){k(b)},"flow_throw",b)});return}h(g)}function h(C){if(C.done){Q0(function(){m(function(g){_(g)},"flow_return",C.value)});return}if(!C.value||typeof C.value.then!="function")throw new nt("Only promises can be yielded to `async`, got: "+C);return C.value.then(w,p)}})};return t._isFlowAction=!0,t}function _E(e){if(!("oldValue"in e))throw new nt("Patches without `oldValue` field cannot be inversed");return[wE(e),SE(e)]}function wE(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 SE(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 EE(e){return typeof e=="number"}function Wl(e){return EE(e)===!0?""+e:e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function j4(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(j4),t=e===""||e==="."||e===".."||Z0(e,"/")||Z0(e,"./")||Z0(e,"../");if(!t)throw new nt("a json path must be either rooted, empty or relative, but got '".concat(e,"'"));return i[0]===""&&i.shift(),i}var J0=Symbol("$preProcessorFailed"),OE=function(e){bn(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|Tt.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 J0}}}),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;xE(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)},K4(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=nn(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,nn(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===J0?_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:nn(t)?bv(t,!1):this.preProcessSnapshotSafe(t);return n===J0?!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 xE(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 d=c.value;e[d]=i[d].bind(i)}}catch(m){t={error:m}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}function PE(e,i,t){return new OE(e,i,t)}var w2="Map.put can only be used to store complex values that have an identifier type attribute";function F4(e,i){var t,n,a=e.getSubTypes();if(a===m4)return!1;if(a){var l=Pv(a);try{for(var u=wd(l),c=u.next();!c.done;c=u.next()){var d=c.value;if(!F4(d,i))return!1}}catch(m){t={error:m}}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 CE=function(e){bn(i,e);function i(t,n){return e.call(this,t,sn.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 nt("Map.put cannot be used to set empty values");if(nn(t)){var n=ut(t);if(n.identifier===null)throw new nt(w2);return this.set(n.identifier,t),t}else if(R4(t)){var a=ut(this),l=a.type;if(l.identifierMode!==Gl.YES)throw new nt(w2);var u=l.mapIdentifierAttribute,c=t[u];if(!kv(c)){var d=this.put(l.getChildType().create(t,a.environment));return this.put(bv(d))}var m=_c(c);return this.set(m,t),this.get(m)}else throw new nt("Map.put can only be used to store complex values")}}),i}(Mp),yp=function(e){bn(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:Tt.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(),Ov(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(F4(this._subType,t)){var n=t.reduce(function(a,l){if(!l.identifierAttribute)return a;if(a&&a!==l.identifierAttribute)throw new nt("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 CE(t,this.name)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){ev(n,t.unbox);var a=t.type;a.hookInitializers.forEach(function(l){var u=l(n);Object.keys(u).forEach(function(c){var d=u[c],m=Cd(n,c,d);zs(n,c,m)})}),Ap(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 tv(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 nt("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,d=t.object.get(a);if(c===d)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 nt("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)?Fp(Object.keys(t).map(function(l){return a._subType.validate(t[l],Ev(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 kE(e){return new yp("Map<string, ".concat(e.name,">"),e)}function AE(e){return cr(e)&&(e.flags&Tt.Map)>0}var bp=function(e){bn(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:Tt.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 Ov(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 d=""+c;l[d]=a.instantiate(t,d,void 0,u)}),l}}),Object.defineProperty(i.prototype,"createNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=ur(ur({},zp),{name:this.name});return sn.array(T4(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 d=u[c],m=Cd(n,c,d);zs(n,c,m)})}),Ap(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 nt("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=S2(n,a,[l[t.index]],[t.newValue],[t.index]);if(!u)return null;t.newValue=u[0]}break;case"splice":{var c=t.index,d=t.removedCount,m=t.added,_=S2(n,a,l.slice(c,c+d),m,m.map(function(x,v){return c+v}));if(!_)return null;t.added=_;for(var k=c+d;k<l.length;k++)l[k].setParent(n,""+(k+m.length-d))}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 xv(t)?Fp(t.map(function(l,u){return a._subType.validate(l,Ev(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 TE(e){return new bp("".concat(e.name,"[]"),e)}function S2(e,i,t,n,a){for(var l=!0,u=0;;u++){var c=u<=n.length-1,d=t[u],m=c?n[u]:void 0,_=""+a[u];if(nE(m)&&(m=m.storedValue),!d&&!c)break;if(!c)l=!1,t.splice(u,1),d instanceof yi&&d.createObservableInstanceIfNeeded(),d.die(),u--;else if(d)if(E2(d,m))t[u]=e1(i,e,_,m,d);else{for(var x=void 0,v=u;v<t.length;v++)if(E2(t[v],m)){x=t.splice(v,1)[0];break}l=!1;var k=e1(i,e,_,m,x);t.splice(u,0,k)}else{if(nn(m)&&ut(m).parent===e)throw new nt("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(m).path,"'"));l=!1;var k=e1(i,e,_,m);t.splice(u,0,k)}}return l?null:t}function e1(e,i,t,n,a){Xa(e,n);function l(){if(nn(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 E2(e,i){if(!e.isAlive)return!1;if(nn(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 RE(e){return cr(e)&&(e.flags&Tt.Array)>0}var O2="preProcessSnapshot",x2="postProcessSnapshot";function ME(){return ut(this).toString()}var P2={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 nt("".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 nt("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 nt("Getters are not supported as properties. Please use views instead");var u=l.value;if(u==null)throw new nt("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(zE(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 nt("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){bn(i,e);function i(t){var n=e.call(this,t.name||P2.name)||this;return Object.defineProperty(n,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.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,P2,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&Tt.Identifier){if(t)throw new nt("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 nt("actions initializer should return a plain object containing actions");Object.keys(n).forEach(function(a){if(a===O2)throw new nt("Cannot define action '".concat(O2,"', it should be defined using 'type.preProcessSnapshot(fn)' instead"));if(a===x2)throw new nt("Cannot define action '".concat(x2,"', 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 d=l.$mst_middleware,m=l.bind(n);m._isFlowAction=l._isFlowAction||!1,m.$mst_middleware=d;var _=Cd(t,a,m);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 nt("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 nt("volatile state initializer should return a plain object containing state");nv(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,d=u.views,m=u.state,_=oS(u,["actions","views","state"]);for(var k in _)throw new nt("The `extend` function should return an object with a subset of the fields 'actions', 'views' and 'state'. Found invalid key '".concat(k,"'"));return m&&n.instantiateVolatileState(l,m),d&&n.instantiateViews(l,d),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 nt("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)rv(t,a,u),iv(t,(l={},l[a]=$s,l));else if(typeof u.value=="function")zs(t,a,u.value);else throw new nt("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=nn(l)?l:this.applySnapshotPreProcessor(l);return Ov(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({},zp),{name:this.name});return sn.object(t,hc,n)}}),Object.defineProperty(i.prototype,"finalizeNewInstance",{enumerable:!1,configurable:!0,writable:!0,value:function(t,n){zs(n,"toString",ME),this.forAllProps(function(a){ev(n,a,t.unbox)}),this.initializers.reduce(function(a,l){return l(a)},n),Ap(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 nt("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 nt("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 d=ua(t.storedValue,u);d.reportObserved()}catch{throw new nt("".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 nt("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)?Fp(this.propertyNames.map(function(u){return a.properties[u].validate(l[u],Ev(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 NE(){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 IE(){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 z4(e){return cr(e)&&(e.flags&Tt.Object)>0}var el=function(e){bn(i,e);function i(t,n,a,l){l===void 0&&(l=lE);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),B4=new el("string",Tt.String,function(e){return typeof e=="string"}),U4=new el("number",Tt.Number,function(e){return typeof e=="number"}),DE=new el("integer",Tt.Integer,function(e){return sE(e)}),jE=new el("float",Tt.Float,function(e){return uE(e)}),FE=new el("finite",Tt.Finite,function(e){return cE(e)}),q4=new el("boolean",Tt.Boolean,function(e){return typeof e=="boolean"}),H4=new el("null",Tt.Null,function(e){return e===null}),G4=new el("undefined",Tt.Undefined,function(e){return e===void 0}),V4=new el("Date",Tt.Date,function(e){return typeof e=="number"||e instanceof Date},function(e){return e instanceof Date?e:new Date(e)});V4.getSnapshot=function(e){return e.storedValue.getTime()};var $4=V4;function zE(e){switch(typeof e){case"string":return B4;case"number":return U4;case"boolean":return q4;case"object":if(e instanceof Date)return $4}throw new nt("Cannot determine primitive type from value "+e)}function W4(e){return cr(e)&&(e.flags&(Tt.String|Tt.Number|Tt.Integer|Tt.Boolean|Tt.Date))>0}var BE=function(e){bn(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:Tt.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 Y4(e){return new BE(e)}function UE(e){return cr(e)&&(e.flags&Tt.Literal)>0}var qE=function(e){bn(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|Tt.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=nn(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 HE(){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 qE(t,n,a,l)}function GE(e){return cr(e)&&(e.flags&Tt.Refinement)>0}function VE(e,i){var t=typeof e=="string"?i:e,n=Bp.apply(void 0,fa([],ca(t.map(function(a){return Y4(""+a)})),!1));return typeof e=="string"&&(n.name=e),n}var $E=function(e){bn(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=Tt.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 nt("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 nt("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],d=c.validate(t,n);if(d.length===0){if(this._eager)return bi();l++}else a.push(d)}return l===1?bi():_i(n,t,"No type is applicable for the union").concat(Fp(a))}}),Object.defineProperty(i.prototype,"getSubTypes",{enumerable:!1,configurable:!0,writable:!0,value:function(){return this._types}}),i}(Qa);function Bp(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 K4(e){return cr(e)&&(e.flags&Tt.Union)>0}var WE=function(e){bn(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|Tt.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 YE(e,i){if(typeof i!="function"&&nn(i))throw new nt("default value cannot be an instance, pass a snapshot or a function that creates an instance/snapshot instead")}function Bs(e,i,t){return YE(e,i),new WE(e,i,t||KE)}var KE=[void 0];function XE(e){return cr(e)&&(e.flags&Tt.Optional)>0}var ZE=Bs(G4,void 0),QE=Bs(H4,null);function X4(e){return Bp(e,ZE)}function JE(e){return Bp(e,QE)}var eO=function(e){bn(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)|Tt.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 nt("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||m4}}),i}(Qa);function tO(e,i){var t=typeof e=="string"?e:"late(".concat(e.toString(),")"),n=typeof e=="string"?i:e;return new eO(t,n)}function nO(e){return cr(e)&&(e.flags&Tt.Late)>0}function rO(e,i){return new iO(e,i)}var iO=function(e){bn(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:Tt.Lazy}),Object.defineProperty(a,"loadedType",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(a,"pendingNodeList",{enumerable:!0,configurable:!0,writable:!0,value:sn.array()}),Fg(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),Fg(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):M4(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),Z4=function(e){bn(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:Tt.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 M4(t)?this.subType?this.subType.validate(t,n):bi():_i(n,t,"Value is not serializable and cannot be frozen")}}),i}(Zs),C2=new Z4;function oO(e){return arguments.length===0?C2:cr(e)?new Z4(e):Bs(C2,e)}function aO(e){return cr(e)&&(e.flags&Tt.Frozen)>0}function lO(e){switch(e){case sr.beforeDestroy:return"destroy";case sr.beforeDetach:return"detach";default:return}}var sO=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}),kv(i))this.identifier=i;else if(nn(i)){var n=ut(i);if(!n.identifierAttribute)throw new nt("Can only store references with a defined identifier attribute.");var a=n.unnormalizedIdentifier;if(a==null)throw new nt("Can only store references to tree nodes with a defined identifier.");this.identifier=a}else throw new nt("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 Cv("[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}(),Cv=function(e){bn(i,e);function i(t){var n=e.call(this,t)||this;return Object.setPrototypeOf(n,i.prototype),n}return i}(Error),Q4=function(e){bn(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:Tt.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 kv(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(d){cc(n.root.storedValue,{op:"replace",value:d,path:n.path})},removeRef:function(){z4(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 x=lO(k);x&&a.fireInvalidated(x,t,n,u)},d=u.registerHook(sr.beforeDetach,c),m=u.registerHook(sr.beforeDestroy,c);return function(){d(),m()}}}}),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(d){u&&u();var m=t.parent,_=m&&m.storedValue;if(m&&m.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):d||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),uO=function(e){bn(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=nn(l)?f4(l):l,c=new sO(l,this.targetType),d=ns(this,t,n,a,c);return c.node=d,this.watchTargetNodeForInvalidations(d,u,void 0),d}}),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=nn(n),c=t.storedValue;if(!u&&c.identifier===n||u&&c.resolvedValue===n)return t.setParent(a,l),t}var d=this.instantiate(a,l,void 0,n);return t.die(),d}}),i}(Q4),cO=function(e){bn(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=nn(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=nn(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}(Q4);function J4(e,i){var t=i||void 0,n=i?i.onInvalidated:void 0;return t&&(t.get||t.set)?new cO(e,{get:t.get,set:t.set},n):new uO(e,n)}function fO(e){return cr(e)&&(e.flags&Tt.Reference)>0}function dO(e,i){var t=J4(e,ur(ur({},i),{onInvalidated:function(n){i&&i.onInvalidated&&i.onInvalidated(n),n.removeRef()}}));return i&&i.acceptsUndefined===!1?t:X4(t)}var e_=function(e){bn(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:Tt.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 nt("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 nt("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),hO=function(e){bn(i,e);function i(){var t=e.call(this,"identifier","string")||this;return Object.defineProperty(t,"flags",{enumerable:!0,configurable:!0,writable:!0,value:Tt.Identifier}),t}return Object.defineProperty(i.prototype,"describe",{enumerable:!1,configurable:!0,writable:!0,value:function(){return"identifier"}}),i}(e_),pO=function(e){bn(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}(e_),gO=new hO,vO=new pO;function mO(e){return cr(e)&&(e.flags&Tt.Identifier)>0}function _c(e){return""+e}function kv(e){return typeof e=="string"||typeof e=="number"}function yO(e){return new bO(e)}var bO=function(e){bn(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:Tt.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 d=u?this.options.fromSnapshot(n,a.root.environment):n,m=this.instantiate(a,l,void 0,d);return t.die(),m}}),i}(Zs),k2={enumeration:VE,model:NE,compose:IE,custom:yO,reference:J4,safeReference:dO,union:Bp,optional:Bs,literal:Y4,maybe:X4,maybeNull:JE,refinement:HE,string:B4,boolean:q4,number:U4,integer:DE,float:jE,finite:FE,Date:$4,map:kE,array:TE,frozen:oO,identifier:gO,identifierNumber:vO,late:tO,lazy:rO,undefined:G4,null:H4,snapshotProcessor:PE};const _O=Object.freeze(Object.defineProperty({__proto__:null,addDisposer:PS,addMiddleware:S4,applyAction:y4,applyPatch:cc,applySnapshot:s4,cast:TS,castFlowReturn:vE,castToReferenceSnapshot:MS,castToSnapshot:RS,clone:ES,createActionTrackingMiddleware:jS,createActionTrackingMiddleware2:zS,decorate:VS,destroy:xS,detach:OS,escapeJsonPath:Wl,flow:D4,getChildType:aS,getEnv:CS,getIdentifier:f4,getLivelinessChecking:o4,getMembers:AS,getNodeId:LS,getParent:hS,getParentOfType:gS,getPath:c4,getPathParts:vS,getPropertyMembers:p4,getRelativePath:SS,getRoot:u4,getRunningActionContext:Sv,getSnapshot:bv,getType:Ud,hasEnv:kS,hasParent:dS,hasParentOfType:pS,isActionContextChildOf:YS,isActionContextThisOrChildOf:KS,isAlive:_v,isArrayType:RE,isFrozenType:aO,isIdentifierType:mO,isLateType:nO,isLiteralType:UE,isMapType:AE,isModelType:z4,isOptionalType:XE,isPrimitiveType:W4,isProtected:fS,isReferenceType:fO,isRefinementType:GE,isRoot:mS,isStateTreeNode:nn,isType:cr,isUnionType:K4,isValidReference:wS,joinJsonPath:mp,onAction:b4,onPatch:l4,onSnapshot:lS,process:oE,protect:uS,recordActions:HS,recordPatches:sS,resolveIdentifier:bS,resolvePath:yS,setLivelinessChecking:i4,setLivelynessChecking:iS,splitJsonPath:gc,t:k2,toGenerator:yE,toGeneratorFunction:mE,tryReference:_S,tryResolve:d4,typecheck:x4,types:k2,unescapeJsonPath:j4,unprotect:cS,walk:h4},Symbol.toStringTag,{value:"Module"})),eo=Xl(_O);var t1={},A2;function t_(){return A2||(A2=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}(t1)),t1}var T2;function n_(){return T2||(T2=1,function(e){var i=id&&id.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(e,"__esModule",{value:!0}),e.TextElement=e.getLineHeight=e.useFontLoader=void 0,e.isRTLText=R,e.getDir=D,e.usePrevious=Z;const t=i(An()),n=Qi,a=Ja,l=Fd,u=da,c=i(Ji()),d=nS,m=zd(),_=Ks(),k=Bd(),x=ts(),v=n4(),w=jp(),p=yc(),h=bc(),C=Xs(),g=eo,b=t_();c.default._fixTextRendering=!0;const y=document.createElement("style");y.type="text/css",document.head.appendChild(y);const E={border:"none",padding:"0px",overflow:"hidden",background:"none",outline:"none",resize:"none",overflowWrap:"break-word",whiteSpace:"pre-wrap",userSelect:"text",wordBreak:"normal"};function L(N){var F="֑-߿יִ-﷽ﹰ-ﻼ";return new RegExp("^[^"+F+"]*?["+F+"]").test(N)}function R(N){N=N.replace(/\s/g,"");let F=0;for(var H=0;H<N.length;H++)L(N[H])&&(F+=1);return F>N.length/2}function D(N){return R(N)?"rtl":"ltr"}const O=(0,n.observer)(({textNodeRef:N,element:F,onBlur:H,selectAll:Y,cursorPosition:ee})=>{const[V,K]=t.default.useState(E),$=N.current;t.default.useLayoutEffect(()=>{const ue={};ue.width=$.width()-2*$.padding()+"px",ue.height=$.height()-2*$.padding()+$.fontSize()*$.lineHeight()+"px",ue.fontSize=$.fontSize()+"px",ue.lineHeight=$.lineHeight()+.01,ue.fontFamily=$.fontFamily(),ue.textAlign=$.align(),ue.color=$.fill(),ue.fontWeight=F.fontWeight,ue.fontStyle=F.fontStyle,ue.letterSpacing=F.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(ue)!==JSON.stringify(V)&&K(ue)});const ne=t.default.useRef(null);t.default.useLayoutEffect(()=>{var ue;const de=ne.current;if(!de)return;(ue=ne.current)===null||ue===void 0||ue.focus();const he=ee||de.value.length;de.selectionStart=de.selectionEnd=he,Y&&(de==null||de.select(),document.execCommand("selectAll",!1,null))},[]),t.default.useEffect(()=>{window.addEventListener("blur",H);const ue=de=>{var he;!((he=ne.current)===null||he===void 0)&&he.contains(de.target)||H()};return window.addEventListener("touchstart",ue),()=>{window.removeEventListener("blur",H),window.removeEventListener("touchstart",ue)}},[]);let re=0;const ie=$.textArr.length*$.lineHeight()*$.fontSize();F.verticalAlign==="middle"&&(re=(F.a.height-ie)/2),F.verticalAlign==="bottom"&&(re=F.a.height-ie);const ae=(0,v.removeTags)(F.text);return t.default.createElement("textarea",{className:"polotno-input",ref:ne,dir:D(ae),style:Object.assign(Object.assign(Object.assign({},E),V),{paddingTop:re+"px"}),value:ae,onChange:ue=>{const de=(0,b.getLimitedFontSize)({oldText:F.text,newText:ue.target.value,element:F});F.set({text:ue.target.value,fontSize:de})},placeholder:F.placeholder,onBlur:H})}),S=N=>t.default.createElement(l.Html,null,t.default.createElement(O,Object.assign({},N))),T=N=>{const[F,H]=t.default.useState(!1),Y=t.default.useRef(!1);return t.default.useEffect(()=>{var ee=!0;return setTimeout(()=>{ee&&(N._editModeEnabled&&(Y.current=!0),H(!0),setTimeout(()=>{Y.current=!1},50))},50),()=>{ee=!1}},[]),{editorEnabled:F&&N._editModeEnabled,selectAll:Y.current}},M=(N,F)=>{const[H,Y]=t.default.useReducer(V=>V+1,0),ee=t.default.useRef((0,k.isFontLoaded)(F));return t.default.useLayoutEffect(()=>{if(ee.current=(0,k.isFontLoaded)(F),ee.current)return;let V=!0;return(async()=>{ee.current=!1,Y();const K=(0,_.incrementLoader)(`text ${F}`);await N.loadFont(F),setTimeout(K,100),V&&(ee.current=!0,Y())})(),()=>{V=!1}},[F]),[ee.current]};e.useFontLoader=M;const A=({fontLoaded:N,fontFamily:F,fontSize:H,lineHeight:Y})=>t.default.useMemo(()=>{if(typeof Y=="number")return Y;const ee=document.createElement("div");ee.style.fontFamily=F,ee.style.fontSize=H+"px",ee.style.lineHeight=Y,ee.innerText="Test text",document.body.appendChild(ee);const V=ee.offsetHeight;return document.body.removeChild(ee),V/H},[N,F,H,Y]);function z(N){var F=N.getAbsoluteTransform().copy();F.invert();var H=N.getStage().getPointerPosition();return F.point(H)}function U(N){var F;const H=N.target,Y=z(H),ee=H.textArr,V=Math.floor(Y.y/(H.fontSize()*H.lineHeight())),K=ee.slice(0,V).reduce((re,ie)=>re+ie.text.length,V),$=(F=ee[V])!==null&&F!==void 0?F:ee[0];let ne=0;return H.align()==="right"?ne=H.width()-$.width:H.align()==="center"&&(ne=H.width()/2-$.width/2),K+Math.round((Y.x-ne)/$.width*$.text.length)}function Z(N){const F=t.default.useRef(N),H=t.default.useRef(N);return t.default.useMemo(()=>{H.current=F.current,F.current=N},[N]),H.current}function X(N){return/[\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\uFF00-\uFFEF\u4E00-\u9FAF\uAC00-\uD7AF]/.test(N)}function J(N,F,H=!1){const Y=N.fontSize(),ee=N.height(),V=(0,v.removeTags)(F.text);let K=F.a.fontSize;N.height(void 0);const $=Math.round(2*F.a.fontSize)-1;for(let ne=1;ne<$;ne++){const re=F.a.height&&N.height()>F.a.height;let ie=V.split(`
|
|
101
|
-
`).join(" ").split(/[\s-]+/).reduce((de,he)=>X(he)?de.concat(he.split("")):de.concat(he),[]),ae=N.textArr.map(de=>de.text).join(";");const ue=ie.find(de=>!ae.includes(de)||(ae=ae.replace(de,""),!1));if(!(re||ue&&!H))break;K-=.5,N.fontSize(K)}return N.fontSize(Y),N.height(ee),K}function B({lines:N,lineHeight:F,width:H,align:Y="left",padding:ee=0,cornerRadius:V=0}){var K;N.forEach((ie,ae)=>{ie.cx=H/2,Y==="right"?ie.cx=H-ie.width/2:Y==="left"&&(ie.cx=ie.width/2),Y!=="justify"||ie.lastInParagraph||(ie.width=H),Y==="justify"&&(ie.cx=ie.width/2)});let $=`M ${(K=N[0])===null||K===void 0?void 0:K.cx} ${-ee}`;N.forEach((ie,ae)=>{const{cx:ue}=ie,de=N[ae-1];de&&de.width>ie.width?$+=` L ${ue+ie.width/2+ee} ${ae*F+ee}`:$+=` L ${ue+ie.width/2+ee} ${ae*F-ee}`;const he=N[ae+1];he&&he.width>ie.width?$+=` L ${ue+ie.width/2+ee} ${(ae+1)*F-ee}`:$+=` L ${ue+ie.width/2+ee} ${(ae+1)*F+ee}`});for(var ne=N.length-1;ne>=0;ne--){const ie=N[ne],{cx:ae}=ie,ue=N[ne+1];ue&&ue.width>ie.width?$+=` L ${ae-ie.width/2-ee} ${(ne+1)*F-ee}`:$+=` L ${ae-ie.width/2-ee} ${(ne+1)*F+ee}`;const de=N[ne-1];de&&de.width>ie.width?$+=` L ${ae-ie.width/2-ee} ${ne*F+ee}`:$+=` L ${ae-ie.width/2-ee} ${ne*F-ee}`}$+=" Z";const re=(0,d.parsePath)($);return(0,d.roundCommands)(re,V).path}e.getLineHeight=A,e.TextElement=(0,n.observer)(({element:N,store:F})=>{const H=t.default.useRef(null),Y=t.default.useRef(null),{editorEnabled:ee,selectAll:V}=T(N),[K,$]=t.default.useState(!1),[ne,re]=t.default.useState(!1),ie=t.default.useRef(N.a.height),ae=F.selectedShapes.indexOf(N)>=0,{textVerticalResizeEnabled:ue}=x.flags,de=Z(N.fontFamily),[he,Se]=t.default.useState([]);t.default.useEffect(()=>{var ze,He;const Xe=(He=(ze=H.current)===null||ze===void 0?void 0:ze.textArr)!==null&&He!==void 0?He:[];JSON.stringify(Xe)!==JSON.stringify(he)&&Se(Xe)}),t.default.useEffect(()=>{if(N.a.width)return;const ze=H.current;ze.width(600),N.set({width:1.4*ze.getTextWidth()})},[]),t.default.useLayoutEffect(()=>(0,u.autorun)(()=>{const ze=H.current;(0,w.applyFilter)(ze,N)}));const[me]=(0,e.useFontLoader)(F,N.fontFamily),ke=(0,v.removeTags)(N.text),fe=()=>{const ze=H.current.clone({height:void 0}),He=Math.ceil(ze.fontSize()*ze.lineHeight()*ze.textArr.length+1);return ze.destroy(),He};t.default.useLayoutEffect(()=>{if(!me)return;const{textOverflow:ze,textSplitAllowed:He}=x.flags;if(N.a.height){if(!F.isPlaying)if(ze!=="change-font-size"||ne){if(ze==="resize"){const Xe=fe();ue&&N.a.height<Xe&&F.history.ignore(()=>{var et;(0,g.isAlive)(N)&&N.set({height:Xe}),(et=H.current)===null||et===void 0||et.height(Xe)},!1,!0),ue||N.a.height===Xe||F.history.ignore(()=>{var et;(0,g.isAlive)(N)&&N.set({height:Xe}),(et=H.current)===null||et===void 0||et.height(Xe)},!1,!0)}}else{const Xe=J(H.current,N,He);if(Xe!==N.a.fontSize)return void F.history.ignore(()=>{N.set({fontSize:Xe})},!1,!0);const et=fe();N.a.height===et||ue||F.history.ignore(()=>{N.set({height:et})},!1,!0)}}else{const Xe=fe();F.history.ignore(()=>{N.set({height:Xe})},!1,!0)}}),t.default.useLayoutEffect(()=>{const ze=H.current;ze&&(ze.width(ze.width()+1e-8),ze._setTextData(),(0,w.applyFilter)(ze,N))},[me]);const ge=t.default.useRef(null),Ce=t.default.useRef(0),Te=ze=>{ze.evt.preventDefault(),F.selectedShapes.find(Xe=>Xe===N)&&N.contentEditable&&(Ce.current=U(ze),N.toggleEditMode())},se=!ke&&N.placeholder?.6:N.a.opacity;(0,p.useFadeIn)(H,se);const be=(0,e.getLineHeight)({fontLoaded:me,fontFamily:N.fontFamily,fontSize:N.a.fontSize,lineHeight:N.lineHeight}),xe=N.selectable||F.role==="admin",Ie=(0,m.useColor)(N),at=t.default.useMemo(()=>N.backgroundEnabled?B({lines:JSON.parse(JSON.stringify(he)),cornerRadius:N.backgroundCornerRadius*(N.a.fontSize*be*.5),lineHeight:be*N.a.fontSize,padding:N.backgroundPadding*(N.a.fontSize*be*.5),width:N.a.width,align:N.align}):"",[N.backgroundEnabled,N.backgroundCornerRadius,N.a.fontSize,be,N.backgroundPadding,N.a.width,N.align,he]),gt=(0,C.isTouchDevice)();let je=0;return N.verticalAlign==="middle"?je=(N.a.height-he.length*be*N.a.fontSize)/2:N.verticalAlign==="bottom"&&(je=N.a.height-he.length*be*N.a.fontSize),t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Path,{ref:Y,x:N.a.x,y:N.a.y,rotation:N.a.rotation,hideInExport:!N.showInExport,listening:!1,visible:N.backgroundEnabled,opacity:N.backgroundOpacity*se,data:at,fill:N.backgroundColor,offsetY:-je}),t.default.createElement(a.Text,Object.assign({ref:H,id:N.id,name:"element",hideInExport:!N.showInExport,editModeEnabled:N._editModeEnabled,x:N.a.x,y:N.a.y,rotation:N.a.rotation,width:N.a.width,height:N.a.height,text:ke||N.placeholder,direction:D(ke)},Ie,{stroke:N.stroke,lineJoin:"round",strokeWidth:N.strokeWidth,fillAfterStrokeEnabled:!0,fontSize:N.a.fontSize,fontFamily:`"${N.fontFamily}", "${de}"`,fontStyle:N.fontStyle+" "+N.fontWeight,textDecoration:N.textDecoration,align:N.align,verticalAlign:N.verticalAlign,draggable:gt?N.draggable&&ae:N.draggable,preventDefault:!gt||ae,opacity:se,visible:!N._editModeEnabled,ellipsis:x.flags.textOverflow==="ellipsis",shadowEnabled:N.shadowEnabled,shadowBlur:N.shadowBlur,shadowOffsetX:N.shadowOffsetX,shadowOffsetY:N.shadowOffsetY,shadowColor:N.shadowColor,shadowOpacity:N.shadowOpacity,lineHeight:be,letterSpacing:N.letterSpacing*N.a.fontSize,listening:xe,onDragMove:ze=>{N.set({x:ze.target.x(),y:ze.target.y()})},onDragEnd:ze=>{N.set({x:ze.target.x(),y:ze.target.y()})},onMouseEnter:()=>{$(!0)},onMouseLeave:()=>{$(!1)},onClick:Te,onTap:Te,onTransformStart:()=>{re(!0),ie.current=H.current.height()},onTransform:ze=>{var He,Xe;const et=ze.target;(He=Y.current)===null||He===void 0||He.setAttrs({x:et.x(),y:et.y(),rotation:et.rotation(),scale:et.scale()});const Pt=((Xe=et.getStage())===null||Xe===void 0?void 0:Xe.findOne("Transformer")).getActiveAnchor();if(Pt==="middle-left"||Pt==="middle-right"){const wt=et.scaleX(),we=et.width()*wt,Ee=N.a.fontSize;let vt=we;we<Ee&&(vt=Ee,ge.current&&et.position(ge.current)),et.width(vt),et.scaleX(1),et.scaleY(1);const Ct=fe();if(x.flags.textOverflow!=="ellipsis"){const Ne=Math.max(Ct,ie.current);et.height(Ne),N.set({height:et.height()})}N.set({x:et.x(),y:et.y(),width:et.width(),rotation:et.rotation()}),(0,w.applyFilter)(et,N)}if(Pt==="top-center"||Pt==="bottom-center"){let wt=x.flags.textOverflow==="resize"?fe():be*N.a.fontSize;ze.target.height(Math.max(wt,ze.target.height()*ze.target.scaleY())),ze.target.scaleY(1)}ge.current=ze.target.position()},onTransformEnd:ze=>{var He;const Xe=ze.target.scaleX();ze.target.scaleX(1),ze.target.scaleY(1),N.set({fontSize:Math.round(N.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:N.shadowBlur*Xe,shadowOffsetX:N.shadowOffsetX*Xe,shadowOffsetY:N.shadowOffsetY*Xe,strokeWidth:N.strokeWidth*Xe}),(He=Y.current)===null||He===void 0||He.setAttrs({scaleX:1,scaleY:1}),re(!1)}})),ee&&t.default.createElement(a.Group,{x:N.a.x,y:N.a.y,rotation:N.a.rotation},t.default.createElement(S,{textNodeRef:H,element:N,selectAll:V,cursorPosition:Ce.current,onBlur:()=>{N.toggleEditMode(!1)}})),!ne&&(K||ae)&&t.default.createElement(h.Highlighter,{element:N}))})}(id)),id}var wo={},cd={},n1={exports:{}},r1={exports:{}},R2;function Av(){return R2||(R2=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
|
-
`)}}(r1)),r1.exports}var M2;function r_(){return M2||(M2=1,function(e,i){Av()("lex"),e.exports=t;function t(n){var a="",l,u=0,c=-1,d=0,m=1,_="before-selector",k=[_],x={},v=[],w=["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 p(){return D(),n[c]}function h(X){return X?k[k.length-1-X]:_}function C(X){var J=c+1;return X===n.slice(J,J+X.length)}function g(X){var J=n.slice(c).indexOf(X);return J>0?J:!1}function b(X){return X===y(1)}function y(X){return n[c+(X||1)]}function E(){var X=k.pop();return _=k[k.length-1],X}function L(X){return _=X,k.push(_),k.length}function R(X){var J=_;return k[k.length-1]=_=X,J}function D(X){if((X||1)==1)n[c]==`
|
|
103
|
-
`?(m++,u=1):u++,c++;else{var J=n.slice(c,c+X).split(`
|
|
104
|
-
`);J.length>1&&(m+=J.length-1,u=1),u+=J[J.length-1].length,c=c+X}}function O(){x.end={line:m,col:u},v.push(x),a="",x={}}function S(X){x={type:X,start:{line:m,col:u}}}for(;l=p();)switch(l){case" ":switch(h()){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(h()){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
|
-
`&&(x.value=a.trim(),O(),E());break}break;case":":switch(h()){case"name":x.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(h()){case"name":case"before-value":case"value":a.trim().length>0&&(x.value=a.trim(),O()),R("before-name");break;case"value-paren":a+=l;break;case"at-value":x.value=a.trim(),O(),E();break;case"before-name":break;default:a+=l;break}break;case"{":switch(h()){case"selector":if(y(-1)==="\\"){a+=l;break}x.text=a.trim(),O(),R("before-name"),d=d+1;break;case"at-group":switch(x.name=a.trim(),x.type){case"font-face":case"viewport":case"page":L("before-name");break;default:L("before-selector")}O(),d=d+1;break;case"name":case"at-rule":x.name=a.trim(),O(),L("before-name"),d=d+1;break;case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":R("value"),a+=l;break}break;case"}":switch(h()){case"before-name":case"name":case"before-value":case"value":a&&(x.value=a.trim()),x.name&&x.value&&O(),S("end"),O(),E(),h()==="at-group"&&(S("at-group-end"),O(),E()),d>0&&(d=d-1);break;case"at-group":case"before-selector":case"selector":if(y(-1)==="\\"){a+=l;break}d>0&&h(1)==="at-group"&&(S("at-group-end"),O()),d>1&&E(),d>0&&(d=d-1);break;case"double-string":case"single-string":case"comment":a+=l;break}break;case'"':case"'":switch(h()){case"double-string":l==='"'&&y(-1)!=="\\"&&E();break;case"single-string":l==="'"&&y(-1)!=="\\"&&E();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(h()){case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":case"selector":case"name":case"value":if(b("*")){var T=g("*/");T&&D(T+1)}else h()=="before-value"&&R("value"),a+=l;break;default:b("*")?(S("comment"),L("comment"),D()):a+=l;break}break;case"*":switch(h()){case"comment":b("/")?(x.text=a,D(),O(),E()):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(h()){case"comment":case"double-string":case"single-string":a+=l;break;case"before-value":R("value"),a+=l;break;default:for(var M=!1,A,z,U=0,Z=w.length;!M&&U<Z;++U)z=w[U],A=z.name||z,C(A)&&(M=!0,S(A),L(z.state||"at-group"),D(A.length),z.prefix&&(x.prefix=z.prefix),z.type&&(x.type=z.type));M||(a+=l);break}break;case"(":switch(h()){case"value":L("value-paren");break;case"before-value":R("value");break}a+=l;break;case")":switch(h()){case"value-paren":E();break;case"before-value":R("value");break}a+=l;break;default:switch(h()){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}}(n1)),n1.exports}var i1={exports:{}},L2;function wO(){return L2||(L2=1,function(e,i){Av()("parse");var t=r_();e.exports=c;var n,a,l,u;function c(E,L){L||(L={}),n=!!L.comments,l=!!L.position,a=0,u=Array.isArray(E)?E.slice():t(E);for(var R,D=[],O;O=m();)R=C(O),R&&D.push(R);return{type:"stylesheet",stylesheet:{rules:D}}}function d(E,L){L||(L={});for(var R,D=["type","name","value"],O={},S=0;S<D.length;++S)R=D[S],E[R]&&(O[R]=L[R]||E[R]);for(D=Object.keys(L),S=0;S<D.length;++S)R=D[S],O[R]||(O[R]=L[R]);return l&&(O.position={start:E.start,end:E.end}),O}function m(){var E=u.shift();return E}function _(E){a=a+1;var L={};switch(E.type){case"font-face":case"viewport":L.declarations=b();break;case"page":L.prefix=E.prefix,L.declarations=b();break;default:L.prefix=E.prefix,L.rules=y()}return d(E,L)}function k(E){return d(E)}function x(E){return d(E)}function v(E){return d(E,{text:E.text})}function w(E){return d(E)}function p(E){return d(E)}function h(E){function L(R){return R.trim()}return d(E,{type:"rule",selectors:E.text.split(",").map(L),declarations:b()})}function C(E){switch(E.type){case"property":return p(E);case"selector":return h(E);case"at-group-end":a=a-1;return;case"media":case"keyframes":return _(E);case"comment":if(n)return v(E);break;case"charset":return x(E);case"import":return k(E);case"namespace":return w(E);case"font-face":case"supports":case"viewport":case"document":case"page":return _(E)}}function g(E){for(var L,R=[],D;(D=m())&&E&&E(D);)L=C(D),L&&R.push(L);return D&&D.type!=="end"&&u.unshift(D),R}function b(){return g(function(E){return E.type==="property"||E.type==="comment"})}function y(){return g(function(){return a})}}(i1)),i1.exports}var o1={exports:{}},N2;function SO(){return N2||(N2=1,function(e,i){Av()("stringify");var t,n,a,l,u,c;e.exports=d;function d(y,E){E||(E={}),a=E.indentation||"",n=!!E.compress,t=!!E.comments,l=1,n?u=c="":(u=`
|
|
107
|
-
`,c=" ");var L=w(y.stylesheet.rules,g).join(`
|
|
108
|
-
`).trim();return L}function m(y){if(y){l+=y;return}return n?"":Array(l).join(a||"")}function _(y){return"@"+y.type+" "+y.value+";"+u}function k(y){var E="",L=y.prefix||"";y.name&&(E=" "+y.name);var R=y.type!=="page";return"@"+L+y.type+E+c+p(y,R)+u}function x(y){return t?"/*"+(y.text||"")+"*/"+u:""}function v(y){var E;return y.selectors?E=y.selectors.join(","+u):(E="@"+y.type,E+=y.name?" "+y.name:""),m()+E+c+p(y)+u}function w(y,E){return y.reduce(function(L,R){var D=R.type==="comment"?x(R):E(R);return D&&L.push(D),L},[])}function p(y,E){var L=y.declarations,R=C;return y.rules&&(L=y.rules,R=v),L=h(L,R),L&&(L=u+L+(E?"":u)),"{"+L+m()+"}"}function h(y,E){if(!y)return"";m(1);var L=w(y,E);return m(-1),L.length?L.join(u):""}function C(y){if(y.type==="property")return b(y)}function g(y){switch(y.type){case"rule":return v(y);case"media":case"keyframes":return k(y);case"comment":return x(y);case"import":case"charset":case"namespace":return _(y);case"font-face":case"supports":case"viewport":case"document":case"page":return k(y)}}function b(y){var E=y.name?y.name+":"+c:"";return m()+E+y.value+";"}}(o1)),o1.exports}var a1,I2;function EO(){return I2||(I2=1,a1={lex:r_(),parse:wO(),stringify:SO()}),a1}var D2;function qd(){return D2||(D2=1,function(e){var i=cd&&cd.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(e,"__esModule",{value:!0}),e.useSvgColors=e.sameColors=void 0,e.urlToBase64=k,e.urlToString=x,e.getColors=v,e.svgToURL=w,e.getSvgSize=p,e.fixSize=h,e.replaceColors=b;const t=i(Ji()),n=i(An()),a=yv(),l=i(EO());function u(E){for(;E.parentNode;){if(E.nodeName==="defs")return!0;E=E.parentNode}return!1}function c(E){const L={};return E.querySelectorAll("style").forEach(R=>{const D=l.default.parse(R.textContent).stylesheet.rules;for(let O of D)O.selectors&&O.selectors.forEach(S=>{const T=L[S]||{};O.declarations.forEach(M=>{T[M.name]=M.value}),L[S]=T})}),L}function d(E,L){var R;const D={fill:"",stroke:""},O=((R=E.getAttribute("class"))===null||R===void 0?void 0:R.split(" "))||[],S=E.getAttribute("id");let T={};if(S&&L[`#${S}`]?T=L[`#${S}`]:O.forEach(M=>{L[`.${M}`]&&(T=Object.assign(Object.assign({},T),L[`.${M}`]))}),L[E.nodeName]&&(T=Object.assign(Object.assign({},T),L[E.nodeName])),E.getAttribute("fill")&&E.getAttribute("fill")!=="none"?D.fill=E.getAttribute("fill"):T.fill&&T.fill!=="none"&&(D.fill=T.fill),E.getAttribute("stroke")&&E.getAttribute("stroke")!=="none"?D.stroke=E.getAttribute("stroke"):T.stroke&&T.stroke!=="none"&&(D.stroke=T.stroke),!D.fill&&E.style.fill&&E.style.fill!=="none"&&(D.fill=E.style.fill),!D.stroke&&E.style.stroke&&E.style.stroke!=="none"&&(D.stroke=E.style.stroke),!D.stroke&&!D.fill){const M=E.ownerSVGElement,A=M&&M!==E&&d(M,L);(A==null?void 0:A.fill)==="currentColor"||(A==null?void 0:A.stroke)==="currentColor"||(D.fill="black")}return D}const m=["path","rect","circle","line","polygon","polyline","ellipse","text"];function _(E){for(var L=[],R=E.getElementsByTagName("*"),D=0,O=R.length;D<O;D++){const S=R[D];u(S)||(S.getAttribute("fill")!==null&&L.push(S),(S.getAttribute("stroke")!==null||S.style&&S.style.fill||m.indexOf(S.nodeName)>=0)&&L.push(S))}return L}async function k(E){const L=await fetch(E);return w(await L.text())}async function x(E){return await(await fetch(E,{mode:"cors"})).text()}function v(E){var L=new DOMParser().parseFromString(E,"image/svg+xml");const R=c(L),D=_(L),O=[];return D.forEach(S=>{const{fill:T,stroke:M}=d(S,R);[T,M].forEach(A=>{A&&(A==="currentColor"&&(A="black"),t.default.Util.colorToRGBA(A)&&O.indexOf(A)===-1&&O.push(A))})}),O}function w(E){return"data:image/svg+xml;base64,"+window.btoa(unescape(encodeURIComponent(E)))}async function p(E){const L=await x(E),R=new DOMParser().parseFromString(L,"image/svg+xml").documentElement.getAttribute("viewBox"),[D,O,S,T]=(R==null?void 0:R.split(" "))||[];return{width:parseFloat(S),height:parseFloat(T)}}function h(E){var L=new DOMParser().parseFromString(E,"image/svg+xml");const R=L.documentElement.getAttribute("viewBox"),[D,O,S,T]=(R==null?void 0:R.split(" "))||[],M=L.documentElement.getAttribute("width");!M&&L.documentElement.setAttribute("width",S+"px");const A=L.documentElement.getAttribute("height");if((!A||A.indexOf("%")>=0)&&L.documentElement.setAttribute("height",T+"px"),M&&M.indexOf("%")>=0&&A&&A.indexOf("%")===-1){const z=parseFloat(A)/parseFloat(T);L.documentElement.setAttribute("width",z*parseFloat(S)+"px")}if(A&&A.indexOf("%")>=0&&M&&M.indexOf("%")===-1){const z=parseFloat(M)/parseFloat(S);L.documentElement.setAttribute("height",z*parseFloat(T)+"px")}return M==="100%"&&A==="100%"&&(L.documentElement.setAttribute("width",S+"px"),L.documentElement.setAttribute("height",T+"px")),new XMLSerializer().serializeToString(L)}const C=(E,L)=>{if(!E||!L)return!1;if(L==="currentColor"&&E==="black")return!0;const R=t.default.Util.colorToRGBA(E),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 g(E,L,R,D){var O=E.namespaceURI,S=document.createElementNS(O,"linearGradient");const T=t.default.Util.degToRad(R+90),M=(Math.cos(T)+1)/2,A=(Math.sin(T)+1)/2,z=(Math.cos(T+Math.PI)+1)/2,U=(Math.sin(T+Math.PI)+1)/2;S.setAttribute("x1",100*M+"%"),S.setAttribute("y1",100*A+"%"),S.setAttribute("x2",100*z+"%"),S.setAttribute("y2",100*U+"%"),S.setAttribute("gradientUnits","userSpaceOnUse"),S.setAttribute("id",L);for(var Z=0;Z<D.length;Z++){var X=D[Z],J=document.createElementNS(O,"stop");for(var B in X)X.hasOwnProperty(B)&&J.setAttribute(B,X[B]);S.appendChild(J)}return(E.querySelector("defs")||E.insertBefore(document.createElementNS(O,"defs"),E.firstChild)).appendChild(S)}function b(E,L){var R=new DOMParser().parseFromString(E,"image/svg+xml");const D=_(R),O=Array.from(L.keys()),S=c(R);return D.forEach(T=>{const{fill:M,stroke:A}=d(T,S);[{prop:"fill",color:M},{prop:"stroke",color:A}].forEach(({prop:z,color:U})=>{const Z=O.find(X=>(0,e.sameColors)(X,U));if(Z){const X=L.get(Z);if((0,a.isGradient)(X)){const{rotation:J,stops:B}=(0,a.parseColor)(X),N=B.map(H=>({offset:100*H.offset+"%","stop-color":H.color})),F="color"+Math.round(1e8*Math.random());g(R.children[0],F,J,N),T.style[z]=null,T.setAttribute(z,`url('#${F}')`)}else T.style[z]=L.get(Z)}})}),w(new XMLSerializer().serializeToString(R))}e.sameColors=C;const y=E=>{const[L,R]=n.default.useState([]);return n.default.useEffect(()=>{let D=!1;return(async()=>{R([]);const O=v(await x(E));D||R(O)})(),()=>{D=!0}},[E]),L};e.useSvgColors=y}(cd)),cd}var l1={},j2;function i_(){return j2||(j2=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 d=t.getContext("2d");if(!d)return;if(d.fillStyle="rgba(0,0,0,0.1)",d.fillRect(0,0,1,1),d.getImageData(0,0,1,1).data[3]!==0)return void d.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}(l1)),l1}var F2;function o_(){return F2||(F2=1,function(e){var i=wo&&wo.__createBinding||(Object.create?function(V,K,$,ne){ne===void 0&&(ne=$);var re=Object.getOwnPropertyDescriptor(K,$);re&&!("get"in re?!K.__esModule:re.writable||re.configurable)||(re={enumerable:!0,get:function(){return K[$]}}),Object.defineProperty(V,ne,re)}:function(V,K,$,ne){ne===void 0&&(ne=$),V[ne]=K[$]}),t=wo&&wo.__setModuleDefault||(Object.create?function(V,K){Object.defineProperty(V,"default",{enumerable:!0,value:K})}:function(V,K){V.default=K}),n=wo&&wo.__importStar||function(){var V=function(K){return V=Object.getOwnPropertyNames||function($){var ne=[];for(var re in $)Object.prototype.hasOwnProperty.call($,re)&&(ne[ne.length]=re);return ne},V(K)};return function(K){if(K&&K.__esModule)return K;var $={};if(K!=null)for(var ne=V(K),re=0;re<ne.length;re++)ne[re]!=="default"&&i($,K,ne[re]);return t($,K),$}}(),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=e.useSizeFixer=void 0;const l=a(An()),u=Qi,c=da,d=Ja,m=a(Dp()),_=a(Ji()),k=Fd,x=bc(),v=Ks(),w=n(qd()),p=ts(),h=i_(),C=jp(),g=yc(),b=Xs();function y(){return document.createElement("canvas")}async function E(V){if(!(V.indexOf("data:image/svg+xml")>=0||V.indexOf(".svg")>=0))return V;const K=await w.urlToString(V),$=w.fixSize(K);return w.svgToURL($)}const L=V=>{const[K,$]=l.default.useState(V);return l.default.useEffect(()=>{(async()=>{const ne=await E(V);ne!==K&&$(ne)})()},[V]),K};function R(V,K){return Math.sqrt(Math.pow(K.x-V.x,2)+Math.pow(K.y-V.y,2))}function D(V,K){return{x:(V.x+K.x)/2,y:(V.y+K.y)/2}}e.useSizeFixer=L;const O=(V,K,$)=>{const ne=l.default.useMemo(()=>{var re,ie;const{flipX:ae,flipY:ue}=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&&!ue&&!Se)return K;if(!K||!K.width||!K.height)return null;const me=y();let ke=1;V.type==="svg"&&(ke=Math.max(V.a.width/K.width*$,V.a.height/K.height*$)),(0,h.trySetCanvasSize)(me,Math.max(K.width*ke,1),Math.max(K.height*ke,1));let fe=ae?-me.width:0,ge=ue?-me.height:0;return(re=me.getContext("2d"))===null||re===void 0||re.scale(ae?-1:1,ue?-1:1),(ie=me.getContext("2d"))===null||ie===void 0||ie.drawImage(K,fe,ge,me.width,me.height),me},[V.maskSrc,V.flipX,V.flipY,K,V.a.width,V.a.height,$]);return l.default.useEffect(()=>()=>{ne&&ne.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(ne)},[ne]),ne};function S(V,K){const $=K.width/K.height;let ne,re;return $>=V.width/V.height?(ne=V.width,re=V.width/$):(ne=V.height*$,re=V.height),{x:(V.width-ne)/2,y:(V.height-re)/2,width:ne,height:re}}function T(V,K,$,ne,re,ie,ae){for(var ue=new ImageData(K,$),de=new Int32Array(V.data.buffer),he=V.width,Se=new Int32Array(ue.data.buffer),me=ue.width,ke=K/ie,fe=$/ae,ge=Math.round(1/ke),Ce=Math.round(1/fe),Te=ge*Ce,se=0;se<ue.height;se++)for(var be=0;be<me;be++){for(var xe=ne+Math.round(be/ke)+(re+Math.round(se/fe))*he,Ie=0,at=0,gt=0,je=0,ze=0;ze<Ce;ze++)for(var He=0;He<ge;He++){var Xe=de[xe+He+ze*he];Ie+=Xe<<24>>>24,at+=Xe<<16>>>24,gt+=Xe<<8>>>24,je+=Xe>>>24}Ie=Math.round(Ie/Te),at=Math.round(at/Te),gt=Math.round(gt/Te),je=Math.round(je/Te),Se[be+se*me]=je<<24|gt<<16|at<<8|Ie}return ue}function M(V,K){var $,ne;const re=y();re.width=V.width,re.height=V.height;const ie=Math.max(1,Math.floor(re.width*K)),ae=Math.max(1,Math.floor(re.height*K));($=re.getContext("2d"))===null||$===void 0||$.drawImage(V,0,0,re.width,re.height);const ue=T(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(ue,0,0),re}const A=(V,K)=>{const[$,ne]=N(V.maskSrc,"anonymous"),re=V.maskSrc?ne:"loaded";return(0,e.useImageLoader)(re,V.maskSrc||"",V.id),l.default.useMemo(()=>{if(!$||!K||!K.width||!K.height)return K;const ie=y();ie.width=Math.max(K.width,1),ie.height=Math.max(K.height,1);const ae=ie.getContext("2d");if(!ae)return K;ae.drawImage(K,0,0),ae.globalCompositeOperation="source-in";const ue=S($,V);return ae.drawImage($,ue.x,ue.y,ue.width,ue.height,0,0,K.width,K.height),ie},[K,$,V.a.width,V.a.height])},z=(V,K,$)=>Math.max(K,Math.min($,V)),U=(V,K,$,ne,re=0,ie=!1,ae=!0)=>{const ue=Math.floor(z(V.a.width*ne,1,1e4)),de=Math.floor(z(V.a.height*ne,1,1e4)),he=Math.min(re*ne,ue/2,de/2),Se=Math.max(V.a.width/$.width,V.a.height/$.height)*ne,me=V.page._exportingOrRendering&&p.flags.imageDownScalingEnabled&&Se<1&&!ie,ke=$.x===0&&$.y===0&&$.width===(K==null?void 0:K.width)&&$.height===(K==null?void 0:K.height),fe=l.default.useMemo(()=>{if(!(!K||!K.width||!K.height))return ke&&he===0&&!me?void 0:y()},[K,he,me,ke]);return l.default.useLayoutEffect(()=>{if(!fe||!K)return;(0,h.trySetCanvasSize)(fe,ue,de);const ge=fe.getContext("2d");if(!ge)return;he&&(ge.beginPath(),ge.moveTo(he,0),ge.lineTo(ue-he,0),ge.arc(ue-he,he,he,3*Math.PI/2,0,!1),ge.lineTo(ue,de-he),ge.arc(ue-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 Ce=me?M(K,Se):K,Te=me?{x:Math.floor($.x*Se),y:Math.floor($.y*Se),width:Math.floor($.width*Se),height:Math.floor($.height*Se)}:$;ge.drawImage(Ce,Te.x,Te.y,Te.width,Te.height,0,0,fe.width,fe.height)},[fe,V.a.width,V.a.height,$.x,$.y,$.width,$.height,re,ne,ie,V.page._exportingOrRendering,me]),l.default.useEffect(()=>()=>{fe&&fe.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(fe)},[fe]),fe||K},Z=(V,K,$,ne)=>{const re=(0,e.useSizeFixer)(V.clipSrc||""),[ie,ae]=N(re,"anonymous"),ue=V.clipSrc?ae:"loaded";(0,e.useImageLoader)(ue,V.clipSrc,V.id);const de=l.default.useMemo(()=>{if(K&&ie)return y()},[K,ie]);return l.default.useLayoutEffect(()=>{var he;if(!ie||!K||!K.width||!K.height||!ie||!ie.width||!ie.height||!de)return;const Se=y(),me=Math.max(V.a.width/ie.width*$,V.a.height/ie.height*$);Se.width=ie.width*me,Se.height=ie.height*me,(he=Se.getContext("2d"))===null||he===void 0||he.drawImage(ie,0,0,Se.width,Se.height),de.width=Math.max(K.width,1),de.height=Math.max(K.height,1);const ke=de.getContext("2d");ke&&(ke.save(),ke.drawImage(Se,0,0,K.width,K.height),_.default.Util.releaseCanvas(Se),ke.globalCompositeOperation="source-in",ke.drawImage(K,0,0,de.width,de.height),ke.restore())},[de,K,ie,V.a.width,V.a.height,$,...ne]),V.clipSrc&&ie?de:K},X=y(),J=(0,u.observer)(({element:V})=>{const K=Math.min(30,V.a.width/4,V.a.height/4),$=l.default.useRef(null);return l.default.useEffect(()=>{const ne=$.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(d.Group,{x:V.x,y:V.y,rotation:V.rotation,listening:!1,opacity:V.a.opacity,hideInExport:!V.showInExport},l.default.createElement(d.Rect,{width:V.a.width,height:V.a.height,fill:"rgba(124, 173, 212, 0.8)"}),l.default.createElement(d.Arc,{ref:$,x:V.a.width/2,y:V.a.height/2,fill:"white",outerRadius:Math.abs(K),innerRadius:Math.max(1,K-5),angle:270}))}),B=(0,u.observer)(({element:V})=>{const K="Can not load the image...",$=Math.max(10,Math.min(30,V.a.width/25));return l.default.createElement(d.Group,{x:V.x,y:V.y,rotation:V.rotation,listening:!1,opacity:V.a.opacity,hideInExport:!V.showInExport},l.default.createElement(d.Rect,{width:V.a.width,height:V.a.height,fill:"rgba(223, 102, 102, 0.8)"}),l.default.createElement(d.Text,{text:K,fontSize:$,width:V.a.width,height:V.a.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});let N=m.default;const F=V=>{N=V};e.setImageLoaderHook=F;const H=(V,K="",$="")=>{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=K.slice(0,200),ae=`image with id ${$} 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 Y=({image:V,status:K,type:$})=>{const ne=l.default.useRef();return l.default.useEffect(()=>{ne.current=V||ne.current},[V]),K!=="failed"||K!=="failed"&&$==="svg"?ne.current:void 0},ee=V=>{const[K,$]=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",$();const ue=await w.urlToString(V.src),de=w.fixSize(ue),he=w.replaceColors(de,V.colorsReplace);ae||(re.current=he,ne.current="loaded",$())})(),()=>{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:K})=>{var $;const[ne,re]=l.default.useState(!1),ie=l.default.useRef(null),ae=l.default.useRef(null),[ue,de]=l.default.useState(!1),he=K.selectedShapes.indexOf(V)>=0,[Se,me]=ee(V),[ke,fe]=N(Se,"anonymous"),ge=V.type!=="svg"||me==="loaded"?fe:"loading";(0,e.useImageLoader)(ge,V.src,V.id);const Ce=V.page._exportingOrRendering?1:Math.max(1,K.scale),Te=K._elementsPixelRatio*Ce,se=Y({image:ke,status:fe,type:V.type}),be=O(V,ke||se,Te),xe=A(V,be)||X;let{cropX:Ie,cropY:at,cropWidth:gt,cropHeight:je}=V;fe!=="loaded"&&(Ie=at=0,gt=je=1);const ze=xe.width*gt,He=xe.height*je,Xe=V.a.width/V.a.height;let et,Pt;const wt=ze/He,we=V.type==="svg";we?(et=ze,Pt=He):Xe>=wt?(et=ze,Pt=ze/Xe):(et=He*Xe,Pt=He);const Ee={x:xe.width*Ie,y:xe.height*at,width:et,height:Pt},vt=($=V.cornerRadius)!==null&&$!==void 0?$:0,Ct=V.page._exportingOrRendering?1:Math.min(2,K.scale),Ne=K._elementsPixelRatio*Ct;let Ge=Z(V,U(V,xe,Ee,Ne,vt,ne||V._cropModeEnabled||V.type==="svg",!0),Ne,[Ee,vt,Ne]);const it=Math.max(V.a.width/et,V.a.height/Pt);l.default.useEffect(()=>{var Ze;if(!V._cropModeEnabled)return;const Et=(Ze=ie.current)===null||Ze===void 0?void 0:Ze.getStage();function Mt($t){V._cropModeEnabled&&$t.target!==ae.current&&V.toggleCropMode(!1)}function Vt($t){V._cropModeEnabled&&$t.target.parentNode!==Et.content&&V.toggleCropMode(!1)}return document.body.addEventListener("click",Vt),Et==null||Et.on("click",Mt),Et==null||Et.on("tap",Mt),()=>{document.body.removeEventListener("click",Vt),document.body.removeEventListener("touchstart",Vt),Et==null||Et.off("click",Mt),Et==null||Et.off("click",Mt)}},[V._cropModeEnabled]),l.default.useLayoutEffect(()=>{if(!(ne||V._cropModeEnabled))return(0,C.applyFilter)(ie.current,V),(0,c.autorun)(()=>{(0,C.applyFilter)(ie.current,V)},{delay:100})},[Ge,V.page._exportingOrRendering,ne,gt,je,V._cropModeEnabled]),l.default.useLayoutEffect(()=>{var Ze;ne||V._cropModeEnabled?(Ze=ie.current)===null||Ze===void 0||Ze.clearCache():(0,C.applyFilter)(ie.current,V)},[ne,V.a.width,V.a.height,V._cropModeEnabled]),l.default.useEffect(()=>{(0,C.applyFilter)(ie.current,V)},[V.shadowEnabled,V.shadowBlur,V.cornerRadius,V.shadowColor,V.shadowOffsetX,V.shadowOffsetY,V.shadowOpacity]);const De=l.default.useRef(null),mt=l.default.useRef(null),Fe=l.default.useRef(null);l.default.useLayoutEffect(()=>{V._cropModeEnabled&&(mt.current.nodes([De.current]),Fe.current.nodes([ae.current]))},[V._cropModeEnabled]);var ht=l.default.useRef(null),_n=l.default.useRef(0),Be=l.default.useRef(!1);const st=Ze=>{var Et;((Et=Ze.evt.touches)===null||Et===void 0?void 0:Et.length)>2&&Ze.target.stopDrag(),Math.round(Ze.target.x())>0&&(Ze.target.x(0),Ze.target.scaleX(1)),Math.round(Ze.target.y())>0&&(Ze.target.y(0),Ze.target.scaleY(1));const Mt=Ze.target.width()*Ze.target.scaleX(),Vt=Ze.target.height()*Ze.target.scaleY(),$t=Math.min(1,et/Mt),Jn=Math.min(1,Pt/Vt),Gn=1-$t,Sn=Math.min(Gn,Math.max(0,Math.round(-Ze.target.x())/Mt)),oi=1-Jn,Ir=Math.min(oi,Math.max(0,Math.round(-Ze.target.y())/Vt));Ze.target.setAttrs({x:-Sn*xe.width,y:-Ir*xe.height,scaleX:1,scaleY:1}),V.set({cropX:Sn,cropY:Ir,cropWidth:$t,cropHeight:Jn})},_t=()=>{V.type!=="svg"&&V.contentEditable&&setTimeout(()=>{V.toggleCropMode(!0)})},Bt=V.type==="svg"&&se,Ht=fe==="loading"&&!Bt,hn=fe==="failed",In=!Ht&&!hn,wn=l.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Qn=In?V.a.opacity:0;(0,g.useFadeIn)(ie,Qn);const ii=V.selectable||K.role==="admin",Sr=(0,b.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,Ht&&l.default.createElement(J,{element:V}),hn&&l.default.createElement(B,{element:V}),l.default.createElement(d.Image,{ref:ie,name:"element",id:V.id,image:Ge,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:Ee,listening:ii,draggable:Sr?V.draggable&&he:V.draggable,preventDefault:!Sr||he,hideInExport:!V.showInExport,onMouseEnter:()=>{de(!0)},onMouseLeave:()=>{de(!1)},onDragMove:Ze=>{V.set({x:Ze.target.x(),y:Ze.target.y()})},onDragEnd:Ze=>{V.set({x:Ze.target.x(),y:Ze.target.y()})},onDblClick:_t,onDblTap:_t,onTransformStart:()=>{re(!0),wn.current={cropX:V.cropX,cropY:V.cropY,cropWidth:V.cropWidth,cropHeight:V.cropHeight}},onTransform:Ze=>{var Et;const Mt=Ze.currentTarget,Vt=Math.abs(Mt.scaleX()-1)<1e-7?1:Mt.scaleX(),$t=Math.abs(Mt.scaleY()-1)<1e-7?1:Mt.scaleY();Mt.scaleX(1),Mt.scaleY(1);const Jn=(Et=Ze.target.getStage())===null||Et===void 0?void 0:Et.findOne("Transformer"),Gn=1-et/xe.width,Sn=Math.min(Gn,Math.max(0,V.cropX)),oi=1-Pt/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&&Vt<1&&wn.current.cropHeight>Pt/xe.height;let Jt=No?V.cropWidth:V.cropWidth*Vt;rs&&(Jt=V.cropWidth);const to=!No&&$t<1&&wn.current.cropWidth>et/xe.width;let Dr=No?V.cropHeight:V.cropHeight*$t;to&&(Dr=V.cropHeight),we&&(Jt=V.cropWidth,Dr=V.cropHeight),V.set({cropX:Sn,cropY:Ir,x:Mt.x(),y:Mt.y(),width:Mt.width()*Vt,height:Mt.height()*$t,rotation:Ze.target.rotation(),cropWidth:Math.min(Jt,1-Sn),cropHeight:Math.min(Dr,1-Ir)})},onTransformEnd:Ze=>{const Et=Ze.currentTarget;V.set({width:Et.width(),height:Et.height(),x:Et.x(),y:Et.y(),rotation:Ze.target.rotation(),cropWidth:et/xe.width,cropHeight:Pt/xe.height}),re(!1)}}),l.default.createElement(d.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,vt-V.borderSize),hideInExport:!V.showInExport}),V._cropModeEnabled&&l.default.createElement(k.Portal,{selector:".page-abs-container",enabled:!0},l.default.createElement(d.Rect,{x:-window.innerWidth/K.scale,y:-window.innerWidth/K.scale,width:window.innerWidth/K.scale*3,height:window.innerWidth/K.scale*3,fill:"rgba(0,0,0,0.3)"}),l.default.createElement(d.Image,{listening:!1,image:Ge,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(d.Group,{x:V.x,y:V.y,rotation:V.rotation,scaleX:it,scaleY:it},l.default.createElement(d.Image,{image:xe,ref:ae,opacity:.4,draggable:!0,x:-V.cropX*xe.width,y:-V.cropY*xe.height,onDragMove:st,onTransform:st,onTouchMove:Ze=>{Ze.evt.preventDefault();const Et=Ze.target.getStage().getPointersPositions();var Mt=Et[0],Vt=Et[1];const $t=Ze.target;if(Mt&&!Vt&&!$t.isDragging()&&Be.current&&($t.startDrag(),Be.current=!1),Mt&&Vt){_.default.hitOnDragEnabled=!0,$t.isDragging()&&(Be.current=!0,$t.stopDrag());const to=Ze.target.getAbsoluteTransform().copy();to.invert();var Jn={x:Mt.x,y:Mt.y},Gn={x:Vt.x,y:Vt.y};if(!ht.current)return void(ht.current=D(Jn,Gn));var Sn=D(Jn,Gn),oi=R(Jn,Gn);_n.current||(_n.current=oi);const Dr=$t.position();var Ir={x:Sn.x-Dr.x,y:Sn.y-Dr.y},Ii=oi/_n.current;$t.scaleX(Ii),$t.scaleY(Ii);const ha=to.point(Sn),no=to.point(ht.current);var No=ha.x-no.x,rs=ha.y-no.y,Jt={x:Math.min(0,Sn.x-Ir.x*Ii+No),y:Math.min(0,Sn.y-Ir.y*Ii+rs)};$t.position(Jt),_n.current=oi,ht.current=Sn,st(Ze)}},onTouchEnd:Ze=>{_n.current=0,ht.current=null,_.default.hitOnDragEnabled=!1}}),l.default.createElement(d.Transformer,{ref:Fe,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Ze,Et)=>Et.width<5||Et.height<5?Ze:Et,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),l.default.createElement(d.Rect,{width:et,height:Pt,ref:De,listening:!1,onTransform:Ze=>{Ze.target.x()<-V.cropX*xe.width-1e-9&&(Ze.target.x(-V.cropX*xe.width),Ze.target.scaleX(1)),Ze.target.y()<-V.cropY*xe.height-1e-9&&(Ze.target.y(-V.cropY*xe.height),Ze.target.scaleY(1));const Et=Math.min(1,Math.max(0,V.cropX+Ze.target.x()/xe.width)),Mt=Math.min(1,Math.max(0,Ze.target.y()/xe.height+V.cropY)),Vt=Ze.target.width()*Ze.target.scaleX(),$t=Ze.target.height()*Ze.target.scaleY(),Jn=Math.min(1-Et,Vt/xe.width),Gn=Math.min(1-Mt,$t/xe.height),Sn=Ze.target.getAbsolutePosition(Ze.target.getParent().getParent());Ze.target.scale({x:1,y:1}),Ze.target.position({x:0,y:0}),V.set({x:Sn.x,y:Sn.y,cropX:Et,cropY:Mt,cropWidth:Jn,cropHeight:Gn,width:Math.min(Vt*it,xe.width*(1-Et)*it),height:Math.min($t*it,xe.height*(1-Mt)*it)})}}),l.default.createElement(d.Transformer,{ref:mt,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Ze,Et)=>Et.width<5||Et.height<5?Ze:Et,visible:V.resizable,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2}))),(ue||he)&&l.default.createElement(x.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 OO=ip.exports,z2;function xO(){return z2||(z2=1,function(e,i){(function(n,a){e.exports=a()})(typeof self<"u"?self:OO,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),d=a(45),m=a(46),_=a(47),k=a(48),x=a(49),v=a(12),w=a(32),p=a(33),h=a(31),C=a(1),g={Scope:C.Scope,create:C.create,find:C.find,query:C.query,register:C.register,Container:l.default,Format:u.default,Leaf:c.default,Embed:k.default,Scroll:d.default,Block:_.default,Inline:m.default,Text:x.default,Attributor:{Attribute:v.default,Class:w.default,Style:p.default,Store:h.default}};n.default=g},function(t,n,a){var l=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,g){C.__proto__=g}||function(C,g){for(var b in g)g.hasOwnProperty(b)&&(C[b]=g[b])};return function(C,g){h(C,g);function b(){this.constructor=C}C.prototype=g===null?Object.create(g):(b.prototype=g.prototype,new b)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=function(h){l(C,h);function C(g){var b=this;return g="[Parchment] "+g,b=h.call(this,g)||this,b.message=g,b.name=b.constructor.name,b}return C}(Error);n.ParchmentError=u;var c={},d={},m={},_={};n.DATA_KEY="__blot";var k;(function(h){h[h.TYPE=3]="TYPE",h[h.LEVEL=12]="LEVEL",h[h.ATTRIBUTE=13]="ATTRIBUTE",h[h.BLOT=14]="BLOT",h[h.INLINE=7]="INLINE",h[h.BLOCK=11]="BLOCK",h[h.BLOCK_BLOT=10]="BLOCK_BLOT",h[h.INLINE_BLOT=6]="INLINE_BLOT",h[h.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",h[h.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",h[h.ANY=15]="ANY"})(k=n.Scope||(n.Scope={}));function x(h,C){var g=w(h);if(g==null)throw new u("Unable to create "+h+" blot");var b=g,y=h instanceof Node||h.nodeType===Node.TEXT_NODE?h:b.create(C);return new b(y,C)}n.create=x;function v(h,C){return C===void 0&&(C=!1),h==null?null:h[n.DATA_KEY]!=null?h[n.DATA_KEY].blot:C?v(h.parentNode,C):null}n.find=v;function w(h,C){C===void 0&&(C=k.ANY);var g;if(typeof h=="string")g=_[h]||c[h];else if(h instanceof Text||h.nodeType===Node.TEXT_NODE)g=_.text;else if(typeof h=="number")h&k.LEVEL&k.BLOCK?g=_.block:h&k.LEVEL&k.INLINE&&(g=_.inline);else if(h instanceof HTMLElement){var b=(h.getAttribute("class")||"").split(/\s+/);for(var y in b)if(g=d[b[y]],g)break;g=g||m[h.tagName]}return g==null?null:C&k.LEVEL&g.scope&&C&k.TYPE&g.scope?g:null}n.query=w;function p(){for(var h=[],C=0;C<arguments.length;C++)h[C]=arguments[C];if(h.length>1)return h.map(function(y){return p(y)});var g=h[0];if(typeof g.blotName!="string"&&typeof g.attrName!="string")throw new u("Invalid definition");if(g.blotName==="abstract")throw new u("Cannot register abstract class");if(_[g.blotName||g.attrName]=g,typeof g.keyName=="string")c[g.keyName]=g;else if(g.className!=null&&(d[g.className]=g),g.tagName!=null){Array.isArray(g.tagName)?g.tagName=g.tagName.map(function(y){return y.toUpperCase()}):g.tagName=g.tagName.toUpperCase();var b=Array.isArray(g.tagName)?g.tagName:[g.tagName];b.forEach(function(y){(m[y]==null||g.className==null)&&(m[y]=g)})}return g}n.register=p},function(t,n,a){var l=a(51),u=a(11),c=a(3),d=a(20),m="\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,x){var v={};return k.length===0?this:(v.insert=k,x!=null&&typeof x=="object"&&Object.keys(x).length>0&&(v.attributes=x),this.push(v))},_.prototype.delete=function(k){return k<=0?this:this.push({delete:k})},_.prototype.retain=function(k,x){if(k<=0)return this;var v={retain:k};return x!=null&&typeof x=="object"&&Object.keys(x).length>0&&(v.attributes=x),this.push(v)},_.prototype.push=function(k){var x=this.ops.length,v=this.ops[x-1];if(k=c(!0,{},k),typeof v=="object"){if(typeof k.delete=="number"&&typeof v.delete=="number")return this.ops[x-1]={delete:v.delete+k.delete},this;if(typeof v.delete=="number"&&k.insert!=null&&(x-=1,v=this.ops[x-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[x-1]={insert:v.insert+k.insert},typeof k.attributes=="object"&&(this.ops[x-1].attributes=k.attributes),this;if(typeof k.retain=="number"&&typeof v.retain=="number")return this.ops[x-1]={retain:v.retain+k.retain},typeof k.attributes=="object"&&(this.ops[x-1].attributes=k.attributes),this}}return x===this.ops.length?this.ops.push(k):this.ops.splice(x,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 x=[],v=[];return this.forEach(function(w){var p=k(w)?x:v;p.push(w)}),[x,v]},_.prototype.reduce=function(k,x){return this.ops.reduce(k,x)},_.prototype.changeLength=function(){return this.reduce(function(k,x){return x.insert?k+d.length(x):x.delete?k-x.delete:k},0)},_.prototype.length=function(){return this.reduce(function(k,x){return k+d.length(x)},0)},_.prototype.slice=function(k,x){k=k||0,typeof x!="number"&&(x=1/0);for(var v=[],w=d.iterator(this.ops),p=0;p<x&&w.hasNext();){var h;p<k?h=w.next(k-p):(h=w.next(x-p),v.push(h)),p+=d.length(h)}return new _(v)},_.prototype.compose=function(k){var x=d.iterator(this.ops),v=d.iterator(k.ops),w=[],p=v.peek();if(p!=null&&typeof p.retain=="number"&&p.attributes==null){for(var h=p.retain;x.peekType()==="insert"&&x.peekLength()<=h;)h-=x.peekLength(),w.push(x.next());p.retain-h>0&&v.next(p.retain-h)}for(var C=new _(w);x.hasNext()||v.hasNext();)if(v.peekType()==="insert")C.push(v.next());else if(x.peekType()==="delete")C.push(x.next());else{var g=Math.min(x.peekLength(),v.peekLength()),b=x.next(g),y=v.next(g);if(typeof y.retain=="number"){var E={};typeof b.retain=="number"?E.retain=g:E.insert=b.insert;var L=d.attributes.compose(b.attributes,y.attributes,typeof b.retain=="number");if(L&&(E.attributes=L),C.push(E),!v.hasNext()&&u(C.ops[C.ops.length-1],E)){var R=new _(x.rest());return C.concat(R).chop()}}else typeof y.delete=="number"&&typeof b.retain=="number"&&C.push(y)}return C.chop()},_.prototype.concat=function(k){var x=new _(this.ops.slice());return k.ops.length>0&&(x.push(k.ops[0]),x.ops=x.ops.concat(k.ops.slice(1))),x},_.prototype.diff=function(k,x){if(this.ops===k.ops)return new _;var v=[this,k].map(function(g){return g.map(function(b){if(b.insert!=null)return typeof b.insert=="string"?b.insert:m;var y=g===k?"on":"with";throw new Error("diff() called "+y+" non-document")}).join("")}),w=new _,p=l(v[0],v[1],x),h=d.iterator(this.ops),C=d.iterator(k.ops);return p.forEach(function(g){for(var b=g[1].length;b>0;){var y=0;switch(g[0]){case l.INSERT:y=Math.min(C.peekLength(),b),w.push(C.next(y));break;case l.DELETE:y=Math.min(b,h.peekLength()),h.next(y),w.delete(y);break;case l.EQUAL:y=Math.min(h.peekLength(),C.peekLength(),b);var E=h.next(y),L=C.next(y);u(E.insert,L.insert)?w.retain(y,d.attributes.diff(E.attributes,L.attributes)):w.push(L).delete(y);break}b-=y}}),w.chop()},_.prototype.eachLine=function(k,x){x=x||`
|
|
114
|
-
`;for(var v=d.iterator(this.ops),w=new _,p=0;v.hasNext();){if(v.peekType()!=="insert")return;var h=v.peek(),C=d.length(h)-v.peekLength(),g=typeof h.insert=="string"?h.insert.indexOf(x,C)-C:-1;if(g<0)w.push(v.next());else if(g>0)w.push(v.next(g));else{if(k(w,v.next(1).attributes||{},p)===!1)return;p+=1,w=new _}}w.length()>0&&k(w,{},p)},_.prototype.transform=function(k,x){if(x=!!x,typeof k=="number")return this.transformPosition(k,x);for(var v=d.iterator(this.ops),w=d.iterator(k.ops),p=new _;v.hasNext()||w.hasNext();)if(v.peekType()==="insert"&&(x||w.peekType()!=="insert"))p.retain(d.length(v.next()));else if(w.peekType()==="insert")p.push(w.next());else{var h=Math.min(v.peekLength(),w.peekLength()),C=v.next(h),g=w.next(h);if(C.delete)continue;g.delete?p.push(g):p.retain(h,d.attributes.transform(C.attributes,g.attributes,x))}return p.chop()},_.prototype.transformPosition=function(k,x){x=!!x;for(var v=d.iterator(this.ops),w=0;v.hasNext()&&w<=k;){var p=v.peekLength(),h=v.peekType();if(v.next(),h==="delete"){k-=Math.min(p,k-w);continue}else h==="insert"&&(w<k||!x)&&(k+=p);w+=p}return k},t.exports=_},function(t,n){var a=Object.prototype.hasOwnProperty,l=Object.prototype.toString,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=function(v){return typeof Array.isArray=="function"?Array.isArray(v):l.call(v)==="[object Array]"},m=function(v){if(!v||l.call(v)!=="[object Object]")return!1;var w=a.call(v,"constructor"),p=v.constructor&&v.constructor.prototype&&a.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!w&&!p)return!1;var h;for(h in v);return typeof h>"u"||a.call(v,h)},_=function(v,w){u&&w.name==="__proto__"?u(v,w.name,{enumerable:!0,configurable:!0,value:w.newValue,writable:!0}):v[w.name]=w.newValue},k=function(v,w){if(w==="__proto__")if(a.call(v,w)){if(c)return c(v,w).value}else return;return v[w]};t.exports=function x(){var v,w,p,h,C,g,b=arguments[0],y=1,E=arguments.length,L=!1;for(typeof b=="boolean"&&(L=b,b=arguments[1]||{},y=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});y<E;++y)if(v=arguments[y],v!=null)for(w in v)p=k(b,w),h=k(v,w),b!==h&&(L&&h&&(m(h)||(C=d(h)))?(C?(C=!1,g=p&&d(p)?p:[]):g=p&&m(p)?p:{},_(b,{name:w,newValue:x(L,g,h)})):typeof h<"u"&&_(b,{name:w,newValue:h}));return b}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var l=function(){function T(M,A){for(var z=0;z<A.length;z++){var U=A[z];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(M,U.key,U)}}return function(M,A,z){return A&&T(M.prototype,A),z&&T(M,z),M}}(),u=function T(M,A,z){M===null&&(M=Function.prototype);var U=Object.getOwnPropertyDescriptor(M,A);if(U===void 0){var Z=Object.getPrototypeOf(M);return Z===null?void 0:T(Z,A,z)}else{if("value"in U)return U.value;var X=U.get;return X===void 0?void 0:X.call(z)}},c=a(3),d=b(c),m=a(2),_=b(m),k=a(0),x=b(k),v=a(16),w=b(v),p=a(6),h=b(p),C=a(7),g=b(C);function b(T){return T&&T.__esModule?T:{default:T}}function y(T,M){if(!(T instanceof M))throw new TypeError("Cannot call a class as a function")}function E(T,M){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:T}function L(T,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);T.prototype=Object.create(M&&M.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(T,M):T.__proto__=M)}var R=1,D=function(T){L(M,T);function M(){return y(this,M),E(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 x.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new _.default().insert(this.value(),(0,d.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(z,U){var Z=x.default.query(z,x.default.Scope.BLOCK_ATTRIBUTE);Z!=null&&this.attributes.attribute(Z,U)}},{key:"formatAt",value:function(z,U,Z,X){this.format(Z,X)}},{key:"insertAt",value:function(z,U,Z){if(typeof U=="string"&&U.endsWith(`
|
|
115
|
-
`)){var X=x.default.create(O.blotName);this.parent.insertBefore(X,z===0?this:this.next),X.insertAt(0,U.slice(0,-1))}else u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,z,U,Z)}}]),M}(x.default.Embed);D.scope=x.default.Scope.BLOCK_BLOT;var O=function(T){L(M,T);function M(A){y(this,M);var z=E(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,A));return z.cache={},z}return l(M,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(x.default.Leaf).reduce(function(z,U){return U.length()===0?z:z.insert(U.value(),S(U))},new _.default).insert(`
|
|
116
|
-
`,S(this))),this.cache.delta}},{key:"deleteAt",value:function(z,U){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"deleteAt",this).call(this,z,U),this.cache={}}},{key:"formatAt",value:function(z,U,Z,X){U<=0||(x.default.query(Z,x.default.Scope.BLOCK)?z+U===this.length()&&this.format(Z,X):u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"formatAt",this).call(this,z,Math.min(U,this.length()-z-1),Z,X),this.cache={})}},{key:"insertAt",value:function(z,U,Z){if(Z!=null)return u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,z,U,Z);if(U.length!==0){var X=U.split(`
|
|
117
|
-
`),J=X.shift();J.length>0&&(z<this.length()-1||this.children.tail==null?u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertAt",this).call(this,Math.min(z,this.length()-1),J):this.children.tail.insertAt(this.children.tail.length(),J),this.cache={});var B=this;X.reduce(function(N,F){return B=B.split(N,!0),B.insertAt(0,F),F.length},z+J.length)}}},{key:"insertBefore",value:function(z,U){var Z=this.children.head;u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"insertBefore",this).call(this,z,U),Z instanceof w.default&&Z.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(z,U){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"moveChildren",this).call(this,z,U),this.cache={}}},{key:"optimize",value:function(z){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"optimize",this).call(this,z),this.cache={}}},{key:"path",value:function(z){return u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"path",this).call(this,z,!0)}},{key:"removeChild",value:function(z){u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"removeChild",this).call(this,z),this.cache={}}},{key:"split",value:function(z){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(U&&(z===0||z>=this.length()-R)){var Z=this.clone();return z===0?(this.parent.insertBefore(Z,this),this):(this.parent.insertBefore(Z,this.next),Z)}else{var X=u(M.prototype.__proto__||Object.getPrototypeOf(M.prototype),"split",this).call(this,z,U);return this.cache={},X}}}]),M}(x.default.Block);O.blotName="block",O.tagName="P",O.defaultChild="break",O.allowedChildren=[h.default,x.default.Embed,g.default];function S(T){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return T==null||(typeof T.formats=="function"&&(M=(0,d.default)(M,T.formats())),T.parent==null||T.parent.blotName=="scroll"||T.parent.statics.scope!==T.statics.scope)?M:S(T.parent,M)}n.bubbleFormats=S,n.BlockEmbed=D,n.default=O},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(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},u=function(){function B(N,F){var H=[],Y=!0,ee=!1,V=void 0;try{for(var K=N[Symbol.iterator](),$;!(Y=($=K.next()).done)&&(H.push($.value),!(F&&H.length===F));Y=!0);}catch(ne){ee=!0,V=ne}finally{try{!Y&&K.return&&K.return()}finally{if(ee)throw V}}return H}return function(N,F){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return B(N,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function B(N,F){for(var H=0;H<F.length;H++){var Y=F[H];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(N,Y.key,Y)}}return function(N,F,H){return F&&B(N.prototype,F),H&&B(N,H),N}}();a(50);var d=a(2),m=S(d),_=a(14),k=S(_),x=a(8),v=S(x),w=a(9),p=S(w),h=a(0),C=S(h),g=a(15),b=S(g),y=a(3),E=S(y),L=a(10),R=S(L),D=a(34),O=S(D);function S(B){return B&&B.__esModule?B:{default:B}}function T(B,N,F){return N in B?Object.defineProperty(B,N,{value:F,enumerable:!0,configurable:!0,writable:!0}):B[N]=F,B}function M(B,N){if(!(B instanceof N))throw new TypeError("Cannot call a class as a function")}var A=(0,R.default)("quill"),z=function(){c(B,null,[{key:"debug",value:function(F){F===!0&&(F="log"),R.default.level(F)}},{key:"find",value:function(F){return F.__quill||C.default.find(F)}},{key:"import",value:function(F){return this.imports[F]==null&&A.error("Cannot import "+F+". Are you sure it was registered?"),this.imports[F]}},{key:"register",value:function(F,H){var Y=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof F!="string"){var V=F.attrName||F.blotName;typeof V=="string"?this.register("formats/"+V,F,H):Object.keys(F).forEach(function(K){Y.register(K,F[K],H)})}else this.imports[F]!=null&&!ee&&A.warn("Overwriting "+F+" with",H),this.imports[F]=H,(F.startsWith("blots/")||F.startsWith("formats/"))&&H.blotName!=="abstract"?C.default.register(H):F.startsWith("modules")&&typeof H.register=="function"&&H.register()}}]);function B(N){var F=this,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(M(this,B),this.options=U(N,H),this.container=this.options.container,this.container==null)return A.error("Invalid Quill container",N);this.options.debug&&B.debug(this.options.debug);var Y=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=C.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new k.default(this.scroll),this.selection=new b.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&&F.root.classList.toggle("ql-blank",F.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(V,K){var $=F.selection.lastRange,ne=$&&$.length===0?$.index:void 0;Z.call(F,function(){return F.editor.update(null,K,ne)},V)});var ee=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+Y+"<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(B,[{key:"addContainer",value:function(F){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof F=="string"){var Y=F;F=document.createElement("div"),F.classList.add(Y)}return this.container.insertBefore(F,H),F}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(F,H,Y){var ee=this,V=X(F,H,Y),K=u(V,4);return F=K[0],H=K[1],Y=K[3],Z.call(this,function(){return ee.editor.deleteText(F,H)},Y,F,-1*H)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(F),this.container.classList.toggle("ql-disabled",!F)}},{key:"focus",value:function(){var F=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=F,this.scrollIntoView()}},{key:"format",value:function(F,H){var Y=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return Z.call(this,function(){var V=Y.getSelection(!0),K=new m.default;if(V==null)return K;if(C.default.query(F,C.default.Scope.BLOCK))K=Y.editor.formatLine(V.index,V.length,T({},F,H));else{if(V.length===0)return Y.selection.format(F,H),K;K=Y.editor.formatText(V.index,V.length,T({},F,H))}return Y.setSelection(V,v.default.sources.SILENT),K},ee)}},{key:"formatLine",value:function(F,H,Y,ee,V){var K=this,$=void 0,ne=X(F,H,Y,ee,V),re=u(ne,4);return F=re[0],H=re[1],$=re[2],V=re[3],Z.call(this,function(){return K.editor.formatLine(F,H,$)},V,F,0)}},{key:"formatText",value:function(F,H,Y,ee,V){var K=this,$=void 0,ne=X(F,H,Y,ee,V),re=u(ne,4);return F=re[0],H=re[1],$=re[2],V=re[3],Z.call(this,function(){return K.editor.formatText(F,H,$)},V,F,0)}},{key:"getBounds",value:function(F){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Y=void 0;typeof F=="number"?Y=this.selection.getBounds(F,H):Y=this.selection.getBounds(F.index,F.length);var ee=this.container.getBoundingClientRect();return{bottom:Y.bottom-ee.top,height:Y.height,left:Y.left-ee.left,right:Y.right-ee.left,top:Y.top-ee.top,width:Y.width}}},{key:"getContents",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-F,Y=X(F,H),ee=u(Y,2);return F=ee[0],H=ee[1],this.editor.getContents(F,H)}},{key:"getFormat",value:function(){var F=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 F=="number"?this.editor.getFormat(F,H):this.editor.getFormat(F.index,F.length)}},{key:"getIndex",value:function(F){return F.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(F){return this.scroll.leaf(F)}},{key:"getLine",value:function(F){return this.scroll.line(F)}},{key:"getLines",value:function(){var F=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 F!="number"?this.scroll.lines(F.index,F.length):this.scroll.lines(F,H)}},{key:"getModule",value:function(F){return this.theme.modules[F]}},{key:"getSelection",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return F&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-F,Y=X(F,H),ee=u(Y,2);return F=ee[0],H=ee[1],this.editor.getText(F,H)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(F,H,Y){var ee=this,V=arguments.length>3&&arguments[3]!==void 0?arguments[3]:B.sources.API;return Z.call(this,function(){return ee.editor.insertEmbed(F,H,Y)},V,F)}},{key:"insertText",value:function(F,H,Y,ee,V){var K=this,$=void 0,ne=X(F,0,Y,ee,V),re=u(ne,4);return F=re[0],$=re[2],V=re[3],Z.call(this,function(){return K.editor.insertText(F,H,$)},V,F,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(F,H,Y){this.clipboard.dangerouslyPasteHTML(F,H,Y)}},{key:"removeFormat",value:function(F,H,Y){var ee=this,V=X(F,H,Y),K=u(V,4);return F=K[0],H=K[1],Y=K[3],Z.call(this,function(){return ee.editor.removeFormat(F,H)},Y,F)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(F){var H=this,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){F=new m.default(F);var ee=H.getLength(),V=H.editor.deleteText(0,ee),K=H.editor.applyDelta(F),$=K.ops[K.ops.length-1];$!=null&&typeof $.insert=="string"&&$.insert[$.insert.length-1]===`
|
|
118
|
-
`&&(H.editor.deleteText(H.getLength()-1,1),K.delete(1));var ne=V.compose(K);return ne},Y)}},{key:"setSelection",value:function(F,H,Y){if(F==null)this.selection.setRange(null,H||B.sources.API);else{var ee=X(F,H,Y),V=u(ee,4);F=V[0],H=V[1],Y=V[3],this.selection.setRange(new g.Range(F,H),Y),Y!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(F){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,Y=new m.default().insert(F);return this.setContents(Y,H)}},{key:"update",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,H=this.scroll.update(F);return this.selection.update(F),H}},{key:"updateContents",value:function(F){var H=this,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){return F=new m.default(F),H.editor.applyDelta(F,Y)},Y,!0)}}]),B}();z.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},z.events=v.default.events,z.sources=v.default.sources,z.version="1.3.7",z.imports={delta:m.default,parchment:C.default,"core/module":p.default,"core/theme":O.default};function U(B,N){if(N=(0,E.default)(!0,{container:B,modules:{clipboard:!0,keyboard:!0,history:!0}},N),!N.theme||N.theme===z.DEFAULTS.theme)N.theme=O.default;else if(N.theme=z.import("themes/"+N.theme),N.theme==null)throw new Error("Invalid theme "+N.theme+". Did you register it?");var F=(0,E.default)(!0,{},N.theme.DEFAULTS);[F,N].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(F.modules).concat(Object.keys(N.modules)),Y=H.reduce(function(ee,V){var K=z.import("modules/"+V);return K==null?A.error("Cannot load "+V+" module. Are you sure you registered it?"):ee[V]=K.DEFAULTS||{},ee},{});return N.modules!=null&&N.modules.toolbar&&N.modules.toolbar.constructor!==Object&&(N.modules.toolbar={container:N.modules.toolbar}),N=(0,E.default)(!0,{},z.DEFAULTS,{modules:Y},F,N),["bounds","container","scrollingContainer"].forEach(function(ee){typeof N[ee]=="string"&&(N[ee]=document.querySelector(N[ee]))}),N.modules=Object.keys(N.modules).reduce(function(ee,V){return N.modules[V]&&(ee[V]=N.modules[V]),ee},{}),N}function Z(B,N,F,H){if(this.options.strict&&!this.isEnabled()&&N===v.default.sources.USER)return new m.default;var Y=F==null?null:this.getSelection(),ee=this.editor.delta,V=B();if(Y!=null&&(F===!0&&(F=Y.index),H==null?Y=J(Y,V,N):H!==0&&(Y=J(Y,F,H,N)),this.setSelection(Y,v.default.sources.SILENT)),V.length()>0){var K,$=[v.default.events.TEXT_CHANGE,V,ee,N];if((K=this.emitter).emit.apply(K,[v.default.events.EDITOR_CHANGE].concat($)),N!==v.default.sources.SILENT){var ne;(ne=this.emitter).emit.apply(ne,$)}}return V}function X(B,N,F,H,Y){var ee={};return typeof B.index=="number"&&typeof B.length=="number"?typeof N!="number"?(Y=H,H=F,F=N,N=B.length,B=B.index):(N=B.length,B=B.index):typeof N!="number"&&(Y=H,H=F,F=N,N=0),(typeof F>"u"?"undefined":l(F))==="object"?(ee=F,Y=H):typeof F=="string"&&(H!=null?ee[F]=H:Y=F),Y=Y||v.default.sources.API,[B,N,ee,Y]}function J(B,N,F,H){if(B==null)return null;var Y=void 0,ee=void 0;if(N instanceof m.default){var V=[B.index,B.index+B.length].map(function(re){return N.transformPosition(re,H!==v.default.sources.USER)}),K=u(V,2);Y=K[0],ee=K[1]}else{var $=[B.index,B.index+B.length].map(function(re){return re<N||re===N&&H===v.default.sources.USER?re:F>=0?re+F:Math.max(N,re+F)}),ne=u($,2);Y=ne[0],ee=ne[1]}return new g.Range(Y,ee-Y)}n.expandConfig=U,n.overload=X,n.default=z},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function h(C,g){for(var b=0;b<g.length;b++){var y=g[b];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(C,y.key,y)}}return function(C,g,b){return g&&h(C.prototype,g),b&&h(C,b),C}}(),u=function h(C,g,b){C===null&&(C=Function.prototype);var y=Object.getOwnPropertyDescriptor(C,g);if(y===void 0){var E=Object.getPrototypeOf(C);return E===null?void 0:h(E,g,b)}else{if("value"in y)return y.value;var L=y.get;return L===void 0?void 0:L.call(b)}},c=a(7),d=k(c),m=a(0),_=k(m);function k(h){return h&&h.__esModule?h:{default:h}}function x(h,C){if(!(h instanceof C))throw new TypeError("Cannot call a class as a function")}function v(h,C){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:h}function w(h,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);h.prototype=Object.create(C&&C.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(h,C):h.__proto__=C)}var p=function(h){w(C,h);function C(){return x(this,C),v(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return l(C,[{key:"formatAt",value:function(b,y,E,L){if(C.compare(this.statics.blotName,E)<0&&_.default.query(E,_.default.Scope.BLOT)){var R=this.isolate(b,y);L&&R.wrap(E,L)}else u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"formatAt",this).call(this,b,y,E,L)}},{key:"optimize",value:function(b){if(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,b),this.parent instanceof C&&C.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(b,y){var E=C.order.indexOf(b),L=C.order.indexOf(y);return E>=0||L>=0?E-L:b===y?0:b<y?-1:1}}]),C}(_.default.Inline);p.allowedChildren=[p,_.default.Embed,d.default],p.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(0),u=c(l);function c(x){return x&&x.__esModule?x:{default:x}}function d(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function m(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function _(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var k=function(x){_(v,x);function v(){return d(this,v),m(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 g(b,y){for(var E=0;E<y.length;E++){var L=y[E];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(b,L.key,L)}}return function(b,y,E){return y&&g(b.prototype,y),E&&g(b,E),b}}(),u=function g(b,y,E){b===null&&(b=Function.prototype);var L=Object.getOwnPropertyDescriptor(b,y);if(L===void 0){var R=Object.getPrototypeOf(b);return R===null?void 0:g(R,y,E)}else{if("value"in L)return L.value;var D=L.get;return D===void 0?void 0:D.call(E)}},c=a(54),d=k(c),m=a(10),_=k(m);function k(g){return g&&g.__esModule?g:{default:g}}function x(g,b){if(!(g instanceof b))throw new TypeError("Cannot call a class as a function")}function v(g,b){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:g}function w(g,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);g.prototype=Object.create(b&&b.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(g,b):g.__proto__=b)}var p=(0,_.default)("quill:events"),h=["selectionchange","mousedown","mouseup","click"];h.forEach(function(g){document.addEventListener(g,function(){for(var b=arguments.length,y=Array(b),E=0;E<b;E++)y[E]=arguments[E];[].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 C=function(g){w(b,g);function b(){x(this,b);var y=v(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return y.listeners={},y.on("error",p.error),y}return l(b,[{key:"emit",value:function(){p.log.apply(p,arguments),u(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(E){for(var L=arguments.length,R=Array(L>1?L-1:0),D=1;D<L;D++)R[D-1]=arguments[D];(this.listeners[E.type]||[]).forEach(function(O){var S=O.node,T=O.handler;(E.target===S||S.contains(E.target))&&T.apply(void 0,[E].concat(R))})}},{key:"listenDOM",value:function(E,L,R){this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push({node:L,handler:R})}}]),b}(d.default);C.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"},C.sources={API:"api",SILENT:"silent",USER:"user"},n.default=C},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});function l(c,d){if(!(c instanceof d))throw new TypeError("Cannot call a class as a function")}var u=function c(d){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};l(this,c),this.quill=d,this.options=m};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(m){if(l.indexOf(m)<=l.indexOf(u)){for(var _,k=arguments.length,x=Array(k>1?k-1:0),v=1;v<k;v++)x[v-1]=arguments[v];(_=console)[m].apply(_,x)}}function d(m){return l.reduce(function(_,k){return _[k]=c.bind(console,k,m),_},{})}c.level=d.level=function(m){u=m},n.default=d},function(t,n,a){var l=Array.prototype.slice,u=a(52),c=a(53),d=t.exports=function(x,v,w){return w||(w={}),x===v?!0:x instanceof Date&&v instanceof Date?x.getTime()===v.getTime():!x||!v||typeof x!="object"&&typeof v!="object"?w.strict?x===v:x==v:k(x,v,w)};function m(x){return x==null}function _(x){return!(!x||typeof x!="object"||typeof x.length!="number"||typeof x.copy!="function"||typeof x.slice!="function"||x.length>0&&typeof x[0]!="number")}function k(x,v,w){var p,h;if(m(x)||m(v)||x.prototype!==v.prototype)return!1;if(c(x))return c(v)?(x=l.call(x),v=l.call(v),d(x,v,w)):!1;if(_(x)){if(!_(v)||x.length!==v.length)return!1;for(p=0;p<x.length;p++)if(x[p]!==v[p])return!1;return!0}try{var C=u(x),g=u(v)}catch{return!1}if(C.length!=g.length)return!1;for(C.sort(),g.sort(),p=C.length-1;p>=0;p--)if(C[p]!=g[p])return!1;for(p=C.length-1;p>=0;p--)if(h=C[p],!d(x[h],v[h],w))return!1;return typeof x==typeof v}},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(1),u=function(){function c(d,m,_){_===void 0&&(_={}),this.attrName=d,this.keyName=m;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(d){return[].map.call(d.attributes,function(m){return m.name})},c.prototype.add=function(d,m){return this.canAdd(d,m)?(d.setAttribute(this.keyName,m),!0):!1},c.prototype.canAdd=function(d,m){var _=l.query(d,l.Scope.BLOT&(this.scope|l.Scope.TYPE));return _==null?!1:this.whitelist==null?!0:typeof m=="string"?this.whitelist.indexOf(m.replace(/["']/g,""))>-1:this.whitelist.indexOf(m)>-1},c.prototype.remove=function(d){d.removeAttribute(this.keyName)},c.prototype.value=function(d){var m=d.getAttribute(this.keyName);return this.canAdd(d,m)&&m?m:""},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(O,S){var T=[],M=!0,A=!1,z=void 0;try{for(var U=O[Symbol.iterator](),Z;!(M=(Z=U.next()).done)&&(T.push(Z.value),!(S&&T.length===S));M=!0);}catch(X){A=!0,z=X}finally{try{!M&&U.return&&U.return()}finally{if(A)throw z}}return T}return function(O,S){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return D(O,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function D(O,S){for(var T=0;T<S.length;T++){var M=S[T];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,M.key,M)}}return function(O,S,T){return S&&D(O.prototype,S),T&&D(O,T),O}}(),c=function D(O,S,T){O===null&&(O=Function.prototype);var M=Object.getOwnPropertyDescriptor(O,S);if(M===void 0){var A=Object.getPrototypeOf(O);return A===null?void 0:D(A,S,T)}else{if("value"in M)return M.value;var z=M.get;return z===void 0?void 0:z.call(T)}},d=a(2),m=g(d),_=a(0),k=g(_),x=a(4),v=g(x),w=a(6),p=g(w),h=a(7),C=g(h);function g(D){return D&&D.__esModule?D:{default:D}}function b(D,O){if(!(D instanceof O))throw new TypeError("Cannot call a class as a function")}function y(D,O){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:D}function E(D,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);D.prototype=Object.create(O&&O.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(D,O):D.__proto__=O)}var L=function(D){E(O,D);function O(){return b(this,O),y(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return O}(p.default);L.blotName="code",L.tagName="CODE";var R=function(D){E(O,D);function O(){return b(this,O),y(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return u(O,[{key:"delta",value:function(){var T=this,M=this.domNode.textContent;return M.endsWith(`
|
|
119
|
-
`)&&(M=M.slice(0,-1)),M.split(`
|
|
120
|
-
`).reduce(function(A,z){return A.insert(z).insert(`
|
|
121
|
-
`,T.formats())},new m.default)}},{key:"format",value:function(T,M){if(!(T===this.statics.blotName&&M)){var A=this.descendant(C.default,this.length()-1),z=l(A,1),U=z[0];U!=null&&U.deleteAt(U.length()-1,1),c(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"format",this).call(this,T,M)}}},{key:"formatAt",value:function(T,M,A,z){if(M!==0&&!(k.default.query(A,k.default.Scope.BLOCK)==null||A===this.statics.blotName&&z===this.statics.formats(this.domNode))){var U=this.newlineIndex(T);if(!(U<0||U>=T+M)){var Z=this.newlineIndex(T,!0)+1,X=U-Z+1,J=this.isolate(Z,X),B=J.next;J.format(A,z),B instanceof O&&B.formatAt(0,T-Z+M-X,A,z)}}}},{key:"insertAt",value:function(T,M,A){if(A==null){var z=this.descendant(C.default,T),U=l(z,2),Z=U[0],X=U[1];Z.insertAt(X,M)}}},{key:"length",value:function(){var T=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
|
|
122
|
-
`)?T:T+1}},{key:"newlineIndex",value:function(T){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(M)return this.domNode.textContent.slice(0,T).lastIndexOf(`
|
|
123
|
-
`);var A=this.domNode.textContent.slice(T).indexOf(`
|
|
124
|
-
`);return A>-1?T+A:-1}},{key:"optimize",value:function(T){this.domNode.textContent.endsWith(`
|
|
125
|
-
`)||this.appendChild(k.default.create("text",`
|
|
126
|
-
`)),c(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"optimize",this).call(this,T);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(T),M.moveChildren(this),M.remove())}},{key:"replace",value:function(T){c(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replace",this).call(this,T),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(M){var A=k.default.find(M);A==null?M.parentNode.removeChild(M):A instanceof k.default.Embed?A.remove():A.unwrap()})}}],[{key:"create",value:function(T){var M=c(O.__proto__||Object.getPrototypeOf(O),"create",this).call(this,T);return M.setAttribute("spellcheck",!1),M}},{key:"formats",value:function(){return!0}}]),O}(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(B){return typeof B}:function(B){return B&&typeof Symbol=="function"&&B.constructor===Symbol&&B!==Symbol.prototype?"symbol":typeof B},u=function(){function B(N,F){var H=[],Y=!0,ee=!1,V=void 0;try{for(var K=N[Symbol.iterator](),$;!(Y=($=K.next()).done)&&(H.push($.value),!(F&&H.length===F));Y=!0);}catch(ne){ee=!0,V=ne}finally{try{!Y&&K.return&&K.return()}finally{if(ee)throw V}}return H}return function(N,F){if(Array.isArray(N))return N;if(Symbol.iterator in Object(N))return B(N,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function B(N,F){for(var H=0;H<F.length;H++){var Y=F[H];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(N,Y.key,Y)}}return function(N,F,H){return F&&B(N.prototype,F),H&&B(N,H),N}}(),d=a(2),m=M(d),_=a(20),k=M(_),x=a(0),v=M(x),w=a(13),p=M(w),h=a(24),C=M(h),g=a(4),b=M(g),y=a(16),E=M(y),L=a(21),R=M(L),D=a(11),O=M(D),S=a(3),T=M(S);function M(B){return B&&B.__esModule?B:{default:B}}function A(B,N,F){return N in B?Object.defineProperty(B,N,{value:F,enumerable:!0,configurable:!0,writable:!0}):B[N]=F,B}function z(B,N){if(!(B instanceof N))throw new TypeError("Cannot call a class as a function")}var U=/^[ -~]*$/,Z=function(){function B(N){z(this,B),this.scroll=N,this.delta=this.getDelta()}return c(B,[{key:"applyDelta",value:function(F){var H=this,Y=!1;this.scroll.update();var ee=this.scroll.length();return this.scroll.batchStart(),F=J(F),F.reduce(function(V,K){var $=K.retain||K.delete||K.insert.length||1,ne=K.attributes||{};if(K.insert!=null){if(typeof K.insert=="string"){var re=K.insert;re.endsWith(`
|
|
127
|
-
`)&&Y&&(Y=!1,re=re.slice(0,-1)),V>=ee&&!re.endsWith(`
|
|
128
|
-
`)&&(Y=!0),H.scroll.insertAt(V,re);var ie=H.scroll.line(V),ae=u(ie,2),ue=ae[0],de=ae[1],he=(0,T.default)({},(0,g.bubbleFormats)(ue));if(ue instanceof b.default){var Se=ue.descendant(v.default.Leaf,de),me=u(Se,1),ke=me[0];he=(0,T.default)(he,(0,g.bubbleFormats)(ke))}ne=k.default.attributes.diff(he,ne)||{}}else if(l(K.insert)==="object"){var fe=Object.keys(K.insert)[0];if(fe==null)return V;H.scroll.insertAt(V,fe,K.insert[fe])}ee+=$}return Object.keys(ne).forEach(function(ge){H.scroll.formatAt(V,$,ge,ne[ge])}),V+$},0),F.reduce(function(V,K){return typeof K.delete=="number"?(H.scroll.deleteAt(V,K.delete),V):V+(K.retain||K.insert.length||1)},0),this.scroll.batchEnd(),this.update(F)}},{key:"deleteText",value:function(F,H){return this.scroll.deleteAt(F,H),this.update(new m.default().retain(F).delete(H))}},{key:"formatLine",value:function(F,H){var Y=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(ee).forEach(function(V){if(!(Y.scroll.whitelist!=null&&!Y.scroll.whitelist[V])){var K=Y.scroll.lines(F,Math.max(H,1)),$=H;K.forEach(function(ne){var re=ne.length();if(!(ne instanceof p.default))ne.format(V,ee[V]);else{var ie=F-ne.offset(Y.scroll),ae=ne.newlineIndex(ie+$)-ie+1;ne.formatAt(ie,ae,V,ee[V])}$-=re})}}),this.scroll.optimize(),this.update(new m.default().retain(F).retain(H,(0,R.default)(ee)))}},{key:"formatText",value:function(F,H){var Y=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(ee).forEach(function(V){Y.scroll.formatAt(F,H,V,ee[V])}),this.update(new m.default().retain(F).retain(H,(0,R.default)(ee)))}},{key:"getContents",value:function(F,H){return this.delta.slice(F,F+H)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(F,H){return F.concat(H.delta())},new m.default)}},{key:"getFormat",value:function(F){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Y=[],ee=[];H===0?this.scroll.path(F).forEach(function(K){var $=u(K,1),ne=$[0];ne instanceof b.default?Y.push(ne):ne instanceof v.default.Leaf&&ee.push(ne)}):(Y=this.scroll.lines(F,H),ee=this.scroll.descendants(v.default.Leaf,F,H));var V=[Y,ee].map(function(K){if(K.length===0)return{};for(var $=(0,g.bubbleFormats)(K.shift());Object.keys($).length>0;){var ne=K.shift();if(ne==null)return $;$=X((0,g.bubbleFormats)(ne),$)}return $});return T.default.apply(T.default,V)}},{key:"getText",value:function(F,H){return this.getContents(F,H).filter(function(Y){return typeof Y.insert=="string"}).map(function(Y){return Y.insert}).join("")}},{key:"insertEmbed",value:function(F,H,Y){return this.scroll.insertAt(F,H,Y),this.update(new m.default().retain(F).insert(A({},H,Y)))}},{key:"insertText",value:function(F,H){var Y=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(F,H),Object.keys(ee).forEach(function(V){Y.scroll.formatAt(F,H.length,V,ee[V])}),this.update(new m.default().retain(F).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 F=this.scroll.children.head;return F.statics.blotName!==b.default.blotName||F.children.length>1?!1:F.children.head instanceof E.default}},{key:"removeFormat",value:function(F,H){var Y=this.getText(F,H),ee=this.scroll.line(F+H),V=u(ee,2),K=V[0],$=V[1],ne=0,re=new m.default;K!=null&&(K instanceof p.default?ne=K.newlineIndex($)-$+1:ne=K.length()-$,re=K.delta().slice($,$+ne-1).insert(`
|
|
131
|
-
`));var ie=this.getContents(F,H+ne),ae=ie.diff(new m.default().insert(Y).concat(re)),ue=new m.default().retain(F).concat(ae);return this.applyDelta(ue)}},{key:"update",value:function(F){var H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Y=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),K=(0,g.bubbleFormats)(V),$=V.offset(this.scroll),ne=H[0].oldValue.replace(C.default.CONTENTS,""),re=new m.default().insert(ne),ie=new m.default().insert(V.value()),ae=new m.default().retain($).concat(re.diff(ie,Y));F=ae.reduce(function(ue,de){return de.insert?ue.insert(de.insert,K):ue.push(de)},new m.default),this.delta=ee.compose(F)}else this.delta=this.getDelta(),(!F||!(0,O.default)(ee.compose(F),this.delta))&&(F=ee.diff(this.delta,Y));return F}}]),B}();function X(B,N){return Object.keys(N).reduce(function(F,H){return B[H]==null||(N[H]===B[H]?F[H]=N[H]:Array.isArray(N[H])?N[H].indexOf(B[H])<0&&(F[H]=N[H].concat([B[H]])):F[H]=[N[H],B[H]]),F},{})}function J(B){return B.reduce(function(N,F){if(F.insert===1){var H=(0,R.default)(F.attributes);return delete H.image,N.insert({image:F.attributes.image},H)}if(F.attributes!=null&&(F.attributes.list===!0||F.attributes.bullet===!0)&&(F=(0,R.default)(F),F.attributes.list?F.attributes.list="ordered":(F.attributes.list="bullet",delete F.attributes.bullet)),typeof F.insert=="string"){var Y=F.insert.replace(/\r\n/g,`
|
|
132
|
-
`).replace(/\r/g,`
|
|
133
|
-
`);return N.insert(Y,F.attributes)}return N.push(F)},new m.default)}n.default=Z},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var l=function(){function D(O,S){var T=[],M=!0,A=!1,z=void 0;try{for(var U=O[Symbol.iterator](),Z;!(M=(Z=U.next()).done)&&(T.push(Z.value),!(S&&T.length===S));M=!0);}catch(X){A=!0,z=X}finally{try{!M&&U.return&&U.return()}finally{if(A)throw z}}return T}return function(O,S){if(Array.isArray(O))return O;if(Symbol.iterator in Object(O))return D(O,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function D(O,S){for(var T=0;T<S.length;T++){var M=S[T];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(O,M.key,M)}}return function(O,S,T){return S&&D(O.prototype,S),T&&D(O,T),O}}(),c=a(0),d=C(c),m=a(21),_=C(m),k=a(11),x=C(k),v=a(8),w=C(v),p=a(10),h=C(p);function C(D){return D&&D.__esModule?D:{default:D}}function g(D){if(Array.isArray(D)){for(var O=0,S=Array(D.length);O<D.length;O++)S[O]=D[O];return S}else return Array.from(D)}function b(D,O){if(!(D instanceof O))throw new TypeError("Cannot call a class as a function")}var y=(0,h.default)("quill:selection"),E=function D(O){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;b(this,D),this.index=O,this.length=S},L=function(){function D(O,S){var T=this;b(this,D),this.emitter=S,this.scroll=O,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=d.default.create("cursor",this),this.lastRange=this.savedRange=new E(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){T.mouseDown||setTimeout(T.update.bind(T,w.default.sources.USER),1)}),this.emitter.on(w.default.events.EDITOR_CHANGE,function(M,A){M===w.default.events.TEXT_CHANGE&&A.length()>0&&T.update(w.default.sources.SILENT)}),this.emitter.on(w.default.events.SCROLL_BEFORE_UPDATE,function(){if(T.hasFocus()){var M=T.getNativeRange();M!=null&&M.start.node!==T.cursor.textNode&&T.emitter.once(w.default.events.SCROLL_UPDATE,function(){try{T.setNativeRange(M.start.node,M.start.offset,M.end.node,M.end.offset)}catch{}})}}),this.emitter.on(w.default.events.SCROLL_OPTIMIZE,function(M,A){if(A.range){var z=A.range,U=z.startNode,Z=z.startOffset,X=z.endNode,J=z.endOffset;T.setNativeRange(U,Z,X,J)}}),this.update(w.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 T=S.cursor.restore();if(!T)return;setTimeout(function(){S.setNativeRange(T.startNode,T.startOffset,T.endNode,T.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(w.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(S,T){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[S])){this.scroll.update();var M=this.getNativeRange();if(!(M==null||!M.native.collapsed||d.default.query(S,d.default.Scope.BLOCK))){if(M.start.node!==this.cursor.textNode){var A=d.default.find(M.start.node,!1);if(A==null)return;if(A instanceof d.default.Leaf){var z=A.split(M.start.offset);A.parent.insertBefore(this.cursor,z)}else A.insertBefore(this.cursor,M.start.node);this.cursor.attach()}this.cursor.format(S,T),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(S){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=this.scroll.length();S=Math.min(S,M-1),T=Math.min(S+T,M-1)-S;var A=void 0,z=this.scroll.leaf(S),U=l(z,2),Z=U[0],X=U[1];if(Z==null)return null;var J=Z.position(X,!0),B=l(J,2);A=B[0],X=B[1];var N=document.createRange();if(T>0){N.setStart(A,X);var F=this.scroll.leaf(S+T),H=l(F,2);if(Z=H[0],X=H[1],Z==null)return null;var Y=Z.position(X,!0),ee=l(Y,2);return A=ee[0],X=ee[1],N.setEnd(A,X),N.getBoundingClientRect()}else{var V="left",K=void 0;return A instanceof Text?(X<A.data.length?(N.setStart(A,X),N.setEnd(A,X+1)):(N.setStart(A,X-1),N.setEnd(A,X),V="right"),K=N.getBoundingClientRect()):(K=Z.domNode.getBoundingClientRect(),X>0&&(V="right")),{bottom:K.top+K.height,height:K.height,left:K[V],right:K[V],top:K.top,width:0}}}},{key:"getNativeRange",value:function(){var S=document.getSelection();if(S==null||S.rangeCount<=0)return null;var T=S.getRangeAt(0);if(T==null)return null;var M=this.normalizeNative(T);return y.info("getNativeRange",M),M}},{key:"getRange",value:function(){var S=this.getNativeRange();if(S==null)return[null,null];var T=this.normalizedToRange(S);return[T,S]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(S){var T=this,M=[[S.start.node,S.start.offset]];S.native.collapsed||M.push([S.end.node,S.end.offset]);var A=M.map(function(Z){var X=l(Z,2),J=X[0],B=X[1],N=d.default.find(J,!0),F=N.offset(T.scroll);return B===0?F:N instanceof d.default.Container?F+N.length():F+N.index(J,B)}),z=Math.min(Math.max.apply(Math,g(A)),this.scroll.length()-1),U=Math.min.apply(Math,[z].concat(g(A)));return new E(U,z-U)}},{key:"normalizeNative",value:function(S){if(!R(this.root,S.startContainer)||!S.collapsed&&!R(this.root,S.endContainer))return null;var T={start:{node:S.startContainer,offset:S.startOffset},end:{node:S.endContainer,offset:S.endOffset},native:S};return[T.start,T.end].forEach(function(M){for(var A=M.node,z=M.offset;!(A instanceof Text)&&A.childNodes.length>0;)if(A.childNodes.length>z)A=A.childNodes[z],z=0;else if(A.childNodes.length===z)A=A.lastChild,z=A instanceof Text?A.data.length:A.childNodes.length+1;else break;M.node=A,M.offset=z}),T}},{key:"rangeToNative",value:function(S){var T=this,M=S.collapsed?[S.index]:[S.index,S.index+S.length],A=[],z=this.scroll.length();return M.forEach(function(U,Z){U=Math.min(z-1,U);var X=void 0,J=T.scroll.leaf(U),B=l(J,2),N=B[0],F=B[1],H=N.position(F,Z!==0),Y=l(H,2);X=Y[0],F=Y[1],A.push(X,F)}),A.length<2&&(A=A.concat(A)),A}},{key:"scrollIntoView",value:function(S){var T=this.lastRange;if(T!=null){var M=this.getBounds(T.index,T.length);if(M!=null){var A=this.scroll.length()-1,z=this.scroll.line(Math.min(T.index,A)),U=l(z,1),Z=U[0],X=Z;if(T.length>0){var J=this.scroll.line(Math.min(T.index+T.length,A)),B=l(J,1);X=B[0]}if(!(Z==null||X==null)){var N=S.getBoundingClientRect();M.top<N.top?S.scrollTop-=N.top-M.top:M.bottom>N.bottom&&(S.scrollTop+=M.bottom-N.bottom)}}}}},{key:"setNativeRange",value:function(S,T){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:S,A=arguments.length>3&&arguments[3]!==void 0?arguments[3]:T,z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(y.info("setNativeRange",S,T,M,A),!(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 Z=(this.getNativeRange()||{}).native;if(Z==null||z||S!==Z.startContainer||T!==Z.startOffset||M!==Z.endContainer||A!==Z.endOffset){S.tagName=="BR"&&(T=[].indexOf.call(S.parentNode.childNodes,S),S=S.parentNode),M.tagName=="BR"&&(A=[].indexOf.call(M.parentNode.childNodes,M),M=M.parentNode);var X=document.createRange();X.setStart(S,T),X.setEnd(M,A),U.removeAllRanges(),U.addRange(X)}}else U.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(S){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.default.sources.API;if(typeof T=="string"&&(M=T,T=!1),y.info("setRange",S),S!=null){var A=this.rangeToNative(S);this.setNativeRange.apply(this,g(A).concat([T]))}else this.setNativeRange(null);this.update(M)}},{key:"update",value:function(){var S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:w.default.sources.USER,T=this.lastRange,M=this.getRange(),A=l(M,2),z=A[0],U=A[1];if(this.lastRange=z,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,x.default)(T,this.lastRange)){var Z;!this.composing&&U!=null&&U.native.collapsed&&U.start.node!==this.cursor.textNode&&this.cursor.restore();var X=[w.default.events.SELECTION_CHANGE,(0,_.default)(this.lastRange),(0,_.default)(T),S];if((Z=this.emitter).emit.apply(Z,[w.default.events.EDITOR_CHANGE].concat(X)),S!==w.default.sources.SILENT){var J;(J=this.emitter).emit.apply(J,X)}}}}]),D}();function R(D,O){try{O.parentNode}catch{return!1}return O instanceof Text&&(O=O.parentNode),D.contains(O)}n.Range=E,n.default=L},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function w(p,h){for(var C=0;C<h.length;C++){var g=h[C];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}return function(p,h,C){return h&&w(p.prototype,h),C&&w(p,C),p}}(),u=function w(p,h,C){p===null&&(p=Function.prototype);var g=Object.getOwnPropertyDescriptor(p,h);if(g===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:w(b,h,C)}else{if("value"in g)return g.value;var y=g.get;return y===void 0?void 0:y.call(C)}},c=a(0),d=m(c);function m(w){return w&&w.__esModule?w:{default:w}}function _(w,p){if(!(w instanceof p))throw new TypeError("Cannot call a class as a function")}function k(w,p){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:w}function x(w,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);w.prototype=Object.create(p&&p.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(w,p):w.__proto__=p)}var v=function(w){x(p,w);function p(){return _(this,p),k(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return l(p,[{key:"insertInto",value:function(C,g){C.children.length===0?u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"insertInto",this).call(this,C,g):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),p}(d.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(x,v){x.__proto__=v}||function(x,v){for(var w in v)v.hasOwnProperty(w)&&(x[w]=v[w])};return function(x,v){k(x,v);function w(){this.constructor=x}x.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(44),c=a(30),d=a(1),m=function(k){l(x,k);function x(v){var w=k.call(this,v)||this;return w.build(),w}return x.prototype.appendChild=function(v){this.insertBefore(v)},x.prototype.attach=function(){k.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},x.prototype.build=function(){var v=this;this.children=new u.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(w){try{var p=_(w);v.insertBefore(p,v.children.head||void 0)}catch(h){if(h instanceof d.ParchmentError)return;throw h}})},x.prototype.deleteAt=function(v,w){if(v===0&&w===this.length())return this.remove();this.children.forEachAt(v,w,function(p,h,C){p.deleteAt(h,C)})},x.prototype.descendant=function(v,w){var p=this.children.find(w),h=p[0],C=p[1];return v.blotName==null&&v(h)||v.blotName!=null&&h instanceof v?[h,C]:h instanceof x?h.descendant(v,C):[null,-1]},x.prototype.descendants=function(v,w,p){w===void 0&&(w=0),p===void 0&&(p=Number.MAX_VALUE);var h=[],C=p;return this.children.forEachAt(w,p,function(g,b,y){(v.blotName==null&&v(g)||v.blotName!=null&&g instanceof v)&&h.push(g),g instanceof x&&(h=h.concat(g.descendants(v,b,C))),C-=y}),h},x.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),k.prototype.detach.call(this)},x.prototype.formatAt=function(v,w,p,h){this.children.forEachAt(v,w,function(C,g,b){C.formatAt(g,b,p,h)})},x.prototype.insertAt=function(v,w,p){var h=this.children.find(v),C=h[0],g=h[1];if(C)C.insertAt(g,w,p);else{var b=p==null?d.create("text",w):d.create(w,p);this.appendChild(b)}},x.prototype.insertBefore=function(v,w){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(p){return v instanceof p}))throw new d.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,w)},x.prototype.length=function(){return this.children.reduce(function(v,w){return v+w.length()},0)},x.prototype.moveChildren=function(v,w){this.children.forEach(function(p){v.insertBefore(p,w)})},x.prototype.optimize=function(v){if(k.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var w=d.create(this.statics.defaultChild);this.appendChild(w),w.optimize(v)}else this.remove()},x.prototype.path=function(v,w){w===void 0&&(w=!1);var p=this.children.find(v,w),h=p[0],C=p[1],g=[[this,v]];return h instanceof x?g.concat(h.path(C,w)):(h!=null&&g.push([h,C]),g)},x.prototype.removeChild=function(v){this.children.remove(v)},x.prototype.replace=function(v){v instanceof x&&v.moveChildren(this),k.prototype.replace.call(this,v)},x.prototype.split=function(v,w){if(w===void 0&&(w=!1),!w){if(v===0)return this;if(v===this.length())return this.next}var p=this.clone();return this.parent.insertBefore(p,this.next),this.children.forEachAt(v,this.length(),function(h,C,g){h=h.split(C,w),p.appendChild(h)}),p},x.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},x.prototype.update=function(v,w){var p=this,h=[],C=[];v.forEach(function(g){g.target===p.domNode&&g.type==="childList"&&(h.push.apply(h,g.addedNodes),C.push.apply(C,g.removedNodes))}),C.forEach(function(g){if(!(g.parentNode!=null&&g.tagName!=="IFRAME"&&document.body.compareDocumentPosition(g)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var b=d.find(g);b!=null&&(b.domNode.parentNode==null||b.domNode.parentNode===p.domNode)&&b.detach()}}),h.filter(function(g){return g.parentNode==p.domNode}).sort(function(g,b){return g===b?0:g.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(g){var b=null;g.nextSibling!=null&&(b=d.find(g.nextSibling));var y=_(g);(y.next!=b||y.next==null)&&(y.parent!=null&&y.parent.removeChild(p),p.insertBefore(y,b||void 0))})},x}(c.default);function _(k){var x=d.find(k);if(x==null)try{x=d.create(k)}catch{x=d.create(d.Scope.INLINE),[].slice.call(k.childNodes).forEach(function(w){x.domNode.appendChild(w)}),k.parentNode&&k.parentNode.replaceChild(x.domNode,k),x.attach()}return x}n.default=m},function(t,n,a){var l=this&&this.__extends||function(){var k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,v){x.__proto__=v}||function(x,v){for(var w in v)v.hasOwnProperty(w)&&(x[w]=v[w])};return function(x,v){k(x,v);function w(){this.constructor=x}x.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(12),c=a(31),d=a(17),m=a(1),_=function(k){l(x,k);function x(v){var w=k.call(this,v)||this;return w.attributes=new c.default(w.domNode),w}return x.formats=function(v){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return v.tagName.toLowerCase()},x.prototype.format=function(v,w){var p=m.query(v);p instanceof u.default?this.attributes.attribute(p,w):w&&p!=null&&(v!==this.statics.blotName||this.formats()[v]!==w)&&this.replaceWith(v,w)},x.prototype.formats=function(){var v=this.attributes.values(),w=this.statics.formats(this.domNode);return w!=null&&(v[this.statics.blotName]=w),v},x.prototype.replaceWith=function(v,w){var p=k.prototype.replaceWith.call(this,v,w);return this.attributes.copy(p),p},x.prototype.update=function(v,w){var p=this;k.prototype.update.call(this,v,w),v.some(function(h){return h.target===p.domNode&&h.type==="attributes"})&&this.attributes.build()},x.prototype.wrap=function(v,w){var p=k.prototype.wrap.call(this,v,w);return p instanceof x&&p.statics.scope===this.statics.scope&&this.attributes.move(p),p},x}(d.default);n.default=_},function(t,n,a){var l=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var x in k)k.hasOwnProperty(x)&&(_[x]=k[x])};return function(_,k){m(_,k);function x(){this.constructor=_}_.prototype=k===null?Object.create(k):(x.prototype=k.prototype,new x)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(30),c=a(1),d=function(m){l(_,m);function _(){return m!==null&&m.apply(this,arguments)||this}return _.value=function(k){return!0},_.prototype.index=function(k,x){return this.domNode===k||this.domNode.compareDocumentPosition(k)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(x,1):-1},_.prototype.position=function(k,x){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=d},function(t,n,a){var l=a(11),u=a(3),c={attributes:{compose:function(m,_,k){typeof m!="object"&&(m={}),typeof _!="object"&&(_={});var x=u(!0,{},_);k||(x=Object.keys(x).reduce(function(w,p){return x[p]!=null&&(w[p]=x[p]),w},{}));for(var v in m)m[v]!==void 0&&_[v]===void 0&&(x[v]=m[v]);return Object.keys(x).length>0?x:void 0},diff:function(m,_){typeof m!="object"&&(m={}),typeof _!="object"&&(_={});var k=Object.keys(m).concat(Object.keys(_)).reduce(function(x,v){return l(m[v],_[v])||(x[v]=_[v]===void 0?null:_[v]),x},{});return Object.keys(k).length>0?k:void 0},transform:function(m,_,k){if(typeof m!="object")return _;if(typeof _=="object"){if(!k)return _;var x=Object.keys(_).reduce(function(v,w){return m[w]===void 0&&(v[w]=_[w]),v},{});return Object.keys(x).length>0?x:void 0}}},iterator:function(m){return new d(m)},length:function(m){return typeof m.delete=="number"?m.delete:typeof m.retain=="number"?m.retain:typeof m.insert=="string"?m.insert.length:1}};function d(m){this.ops=m,this.index=0,this.offset=0}d.prototype.hasNext=function(){return this.peekLength()<1/0},d.prototype.next=function(m){m||(m=1/0);var _=this.ops[this.index];if(_){var k=this.offset,x=c.length(_);if(m>=x-k?(m=x-k,this.index+=1,this.offset=0):this.offset+=m,typeof _.delete=="number")return{delete:m};var v={};return _.attributes&&(v.attributes=_.attributes),typeof _.retain=="number"?v.retain=m:typeof _.insert=="string"?v.insert=_.insert.substr(k,m):v.insert=_.insert,v}else return{retain:1/0}},d.prototype.peek=function(){return this.ops[this.index]},d.prototype.peekLength=function(){return this.ops[this.index]?c.length(this.ops[this.index])-this.offset:1/0},d.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"},d.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var m=this.offset,_=this.index,k=this.next(),x=this.ops.slice(this.index);return this.offset=m,this.index=_,[k].concat(x)}else return[]},t.exports=c},function(t,n){var a=function(){function l(p,h){return h!=null&&p instanceof h}var u;try{u=Map}catch{u=function(){}}var c;try{c=Set}catch{c=function(){}}var d;try{d=Promise}catch{d=function(){}}function m(p,h,C,g,b){typeof h=="object"&&(C=h.depth,g=h.prototype,b=h.includeNonEnumerable,h=h.circular);var y=[],E=[],L=typeof Buffer<"u";typeof h>"u"&&(h=!0),typeof C>"u"&&(C=1/0);function R(D,O){if(D===null)return null;if(O===0)return D;var S,T;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,d))S=new d(function(N,F){D.then(function(H){N(R(H,O-1))},function(H){F(R(H,O-1))})});else if(m.__isArray(D))S=[];else if(m.__isRegExp(D))S=new RegExp(D.source,w(D)),D.lastIndex&&(S.lastIndex=D.lastIndex);else if(m.__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 g>"u"?(T=Object.getPrototypeOf(D),S=Object.create(T)):(S=Object.create(g),T=g)}if(h){var M=y.indexOf(D);if(M!=-1)return E[M];y.push(D),E.push(S)}l(D,u)&&D.forEach(function(N,F){var H=R(F,O-1),Y=R(N,O-1);S.set(H,Y)}),l(D,c)&&D.forEach(function(N){var F=R(N,O-1);S.add(F)});for(var A in D){var z;T&&(z=Object.getOwnPropertyDescriptor(T,A)),!(z&&z.set==null)&&(S[A]=R(D[A],O-1))}if(Object.getOwnPropertySymbols)for(var U=Object.getOwnPropertySymbols(D),A=0;A<U.length;A++){var Z=U[A],X=Object.getOwnPropertyDescriptor(D,Z);X&&!X.enumerable&&!b||(S[Z]=R(D[Z],O-1),X.enumerable||Object.defineProperty(S,Z,{enumerable:!1}))}if(b)for(var J=Object.getOwnPropertyNames(D),A=0;A<J.length;A++){var B=J[A],X=Object.getOwnPropertyDescriptor(D,B);X&&X.enumerable||(S[B]=R(D[B],O-1),Object.defineProperty(S,B,{enumerable:!1}))}return S}return R(p,C)}m.clonePrototype=function(h){if(h===null)return null;var C=function(){};return C.prototype=h,new C};function _(p){return Object.prototype.toString.call(p)}m.__objToStr=_;function k(p){return typeof p=="object"&&_(p)==="[object Date]"}m.__isDate=k;function x(p){return typeof p=="object"&&_(p)==="[object Array]"}m.__isArray=x;function v(p){return typeof p=="object"&&_(p)==="[object RegExp]"}m.__isRegExp=v;function w(p){var h="";return p.global&&(h+="g"),p.ignoreCase&&(h+="i"),p.multiline&&(h+="m"),h}return m.__getRegExpFlags=w,m}();typeof t=="object"&&t.exports&&(t.exports=a)},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function S(T,M){var A=[],z=!0,U=!1,Z=void 0;try{for(var X=T[Symbol.iterator](),J;!(z=(J=X.next()).done)&&(A.push(J.value),!(M&&A.length===M));z=!0);}catch(B){U=!0,Z=B}finally{try{!z&&X.return&&X.return()}finally{if(U)throw Z}}return A}return function(T,M){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return S(T,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function S(T,M){for(var A=0;A<M.length;A++){var z=M[A];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,z.key,z)}}return function(T,M,A){return M&&S(T.prototype,M),A&&S(T,A),T}}(),c=function S(T,M,A){T===null&&(T=Function.prototype);var z=Object.getOwnPropertyDescriptor(T,M);if(z===void 0){var U=Object.getPrototypeOf(T);return U===null?void 0:S(U,M,A)}else{if("value"in z)return z.value;var Z=z.get;return Z===void 0?void 0:Z.call(A)}},d=a(0),m=y(d),_=a(8),k=y(_),x=a(4),v=y(x),w=a(16),p=y(w),h=a(13),C=y(h),g=a(25),b=y(g);function y(S){return S&&S.__esModule?S:{default:S}}function E(S,T){if(!(S instanceof T))throw new TypeError("Cannot call a class as a function")}function L(S,T){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:S}function R(S,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(S,T):S.__proto__=T)}function D(S){return S instanceof v.default||S instanceof x.BlockEmbed}var O=function(S){R(T,S);function T(M,A){E(this,T);var z=L(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,M));return z.emitter=A.emitter,Array.isArray(A.whitelist)&&(z.whitelist=A.whitelist.reduce(function(U,Z){return U[Z]=!0,U},{})),z.domNode.addEventListener("DOMNodeInserted",function(){}),z.optimize(),z.enable(),z}return u(T,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(A,z){var U=this.line(A),Z=l(U,2),X=Z[0],J=Z[1],B=this.line(A+z),N=l(B,1),F=N[0];if(c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"deleteAt",this).call(this,A,z),F!=null&&X!==F&&J>0){if(X instanceof x.BlockEmbed||F instanceof x.BlockEmbed){this.optimize();return}if(X instanceof C.default){var H=X.newlineIndex(X.length(),!0);if(H>-1&&(X=X.split(H+1),X===F)){this.optimize();return}}else if(F instanceof C.default){var Y=F.newlineIndex(0);Y>-1&&F.split(Y+1)}var ee=F.children.head instanceof p.default?null:F.children.head;X.moveChildren(F,ee),X.remove()}this.optimize()}},{key:"enable",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",A)}},{key:"formatAt",value:function(A,z,U,Z){this.whitelist!=null&&!this.whitelist[U]||(c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"formatAt",this).call(this,A,z,U,Z),this.optimize())}},{key:"insertAt",value:function(A,z,U){if(!(U!=null&&this.whitelist!=null&&!this.whitelist[z])){if(A>=this.length())if(U==null||m.default.query(z,m.default.Scope.BLOCK)==null){var Z=m.default.create(this.statics.defaultChild);this.appendChild(Z),U==null&&z.endsWith(`
|
|
134
|
-
`)&&(z=z.slice(0,-1)),Z.insertAt(0,z,U)}else{var X=m.default.create(z,U);this.appendChild(X)}else c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"insertAt",this).call(this,A,z,U);this.optimize()}}},{key:"insertBefore",value:function(A,z){if(A.statics.scope===m.default.Scope.INLINE_BLOT){var U=m.default.create(this.statics.defaultChild);U.appendChild(A),A=U}c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"insertBefore",this).call(this,A,z)}},{key:"leaf",value:function(A){return this.path(A).pop()||[null,-1]}},{key:"line",value:function(A){return A===this.length()?this.line(A-1):this.descendant(D,A)}},{key:"lines",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,U=function Z(X,J,B){var N=[],F=B;return X.children.forEachAt(J,B,function(H,Y,ee){D(H)?N.push(H):H instanceof m.default.Container&&(N=N.concat(Z(H,Y,F))),F-=ee}),N};return U(this,A,z)}},{key:"optimize",value:function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"optimize",this).call(this,A,z),A.length>0&&this.emitter.emit(k.default.events.SCROLL_OPTIMIZE,A,z))}},{key:"path",value:function(A){return c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"path",this).call(this,A).slice(1)}},{key:"update",value:function(A){if(this.batch!==!0){var z=k.default.sources.USER;typeof A=="string"&&(z=A),Array.isArray(A)||(A=this.observer.takeRecords()),A.length>0&&this.emitter.emit(k.default.events.SCROLL_BEFORE_UPDATE,z,A),c(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"update",this).call(this,A.concat([])),A.length>0&&this.emitter.emit(k.default.events.SCROLL_UPDATE,z,A)}}}]),T}(m.default.Scroll);O.blotName="scroll",O.className="ql-editor",O.tagName="DIV",O.defaultChild="block",O.allowedChildren=[v.default,x.BlockEmbed,b.default],n.default=O},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(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},u=function(){function K($,ne){var re=[],ie=!0,ae=!1,ue=void 0;try{for(var de=$[Symbol.iterator](),he;!(ie=(he=de.next()).done)&&(re.push(he.value),!(ne&&re.length===ne));ie=!0);}catch(Se){ae=!0,ue=Se}finally{try{!ie&&de.return&&de.return()}finally{if(ae)throw ue}}return re}return function($,ne){if(Array.isArray($))return $;if(Symbol.iterator in Object($))return K($,ne);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function K($,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($,ie.key,ie)}}return function($,ne,re){return ne&&K($.prototype,ne),re&&K($,re),$}}(),d=a(21),m=S(d),_=a(11),k=S(_),x=a(3),v=S(x),w=a(2),p=S(w),h=a(20),C=S(h),g=a(0),b=S(g),y=a(5),E=S(y),L=a(10),R=S(L),D=a(9),O=S(D);function S(K){return K&&K.__esModule?K:{default:K}}function T(K,$,ne){return $ in K?Object.defineProperty(K,$,{value:ne,enumerable:!0,configurable:!0,writable:!0}):K[$]=ne,K}function M(K,$){if(!(K instanceof $))throw new TypeError("Cannot call a class as a function")}function A(K,$){if(!K)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return $&&(typeof $=="object"||typeof $=="function")?$:K}function z(K,$){if(typeof $!="function"&&$!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof $);K.prototype=Object.create($&&$.prototype,{constructor:{value:K,enumerable:!1,writable:!0,configurable:!0}}),$&&(Object.setPrototypeOf?Object.setPrototypeOf(K,$):K.__proto__=$)}var U=(0,R.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",X=function(K){z($,K),c($,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 $(ne,re){M(this,$);var ie=A(this,($.__proto__||Object.getPrototypeOf($)).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:$.keys.ENTER,shiftKey:null},H),ie.addBinding({key:$.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(ie.addBinding({key:$.keys.BACKSPACE},{collapsed:!0},B),ie.addBinding({key:$.keys.DELETE},{collapsed:!0},N)):(ie.addBinding({key:$.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},B),ie.addBinding({key:$.keys.DELETE},{collapsed:!0,suffix:/^.?$/},N)),ie.addBinding({key:$.keys.BACKSPACE},{collapsed:!1},F),ie.addBinding({key:$.keys.DELETE},{collapsed:!1},F),ie.addBinding({key:$.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},B),ie.listen(),ie}return c($,[{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]:{},ue=V(re);if(ue==null||ue.key==null)return U.warn("Attempted to add invalid keyboard binding",ue);typeof ie=="function"&&(ie={handler:ie}),typeof ae=="function"&&(ae={handler:ae}),ue=(0,v.default)(ue,ie,ae),this.bindings[ue.key]=this.bindings[ue.key]||[],this.bindings[ue.key].push(ue)}},{key:"listen",value:function(){var re=this;this.quill.root.addEventListener("keydown",function(ie){if(!ie.defaultPrevented){var ae=ie.which||ie.keyCode,ue=(re.bindings[ae]||[]).filter(function(He){return $.match(ie,He)});if(ue.length!==0){var de=re.quill.getSelection();if(!(de==null||!re.quill.hasFocus())){var he=re.quill.getLine(de.index),Se=u(he,2),me=Se[0],ke=Se[1],fe=re.quill.getLeaf(de.index),ge=u(fe,2),Ce=ge[0],Te=ge[1],se=de.length===0?[Ce,Te]:re.quill.getLeaf(de.index+de.length),be=u(se,2),xe=be[0],Ie=be[1],at=Ce instanceof b.default.Text?Ce.value().slice(0,Te):"",gt=xe instanceof b.default.Text?xe.value().slice(Ie):"",je={collapsed:de.length===0,empty:de.length===0&&me.length()<=1,format:re.quill.getFormat(de),offset:ke,prefix:at,suffix:gt},ze=ue.some(function(He){if(He.collapsed!=null&&He.collapsed!==je.collapsed||He.empty!=null&&He.empty!==je.empty||He.offset!=null&&He.offset!==je.offset)return!1;if(Array.isArray(He.format)){if(He.format.every(function(Xe){return je.format[Xe]==null}))return!1}else if(l(He.format)==="object"&&!Object.keys(He.format).every(function(Xe){return He.format[Xe]===!0?je.format[Xe]!=null:He.format[Xe]===!1?je.format[Xe]==null:(0,k.default)(He.format[Xe],je.format[Xe])}))return!1;return He.prefix!=null&&!He.prefix.test(je.prefix)||He.suffix!=null&&!He.suffix.test(je.suffix)?!1:He.handler.call(re,de,je)!==!0});ze&&ie.preventDefault()}}}})}}]),$}(O.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($,ne){if(ne.collapsed&&ne.offset!==0)return!0;this.quill.format("indent","+1",E.default.sources.USER)}},outdent:{key:X.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function($,ne){if(ne.collapsed&&ne.offset!==0)return!0;this.quill.format("indent","-1",E.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($,ne){ne.format.indent!=null?this.quill.format("indent","-1",E.default.sources.USER):ne.format.list!=null&&this.quill.format("list",!1,E.default.sources.USER)}},"indent code-block":Y(!0),"outdent code-block":Y(!1),"remove tab":{key:X.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function($){this.quill.deleteText($.index-1,1,E.default.sources.USER)}},tab:{key:X.keys.TAB,handler:function($){this.quill.history.cutoff();var ne=new p.default().retain($.index).delete($.length).insert(" ");this.quill.updateContents(ne,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection($.index+1,E.default.sources.SILENT)}},"list empty enter":{key:X.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function($,ne){this.quill.format("list",!1,E.default.sources.USER),ne.format.indent&&this.quill.format("indent",!1,E.default.sources.USER)}},"checklist enter":{key:X.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function($){var ne=this.quill.getLine($.index),re=u(ne,2),ie=re[0],ae=re[1],ue=(0,v.default)({},ie.formats(),{list:"checked"}),de=new p.default().retain($.index).insert(`
|
|
135
|
-
`,ue).retain(ie.length()-ae-1).retain(1,{list:"unchecked"});this.quill.updateContents(de,E.default.sources.USER),this.quill.setSelection($.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:X.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function($,ne){var re=this.quill.getLine($.index),ie=u(re,2),ae=ie[0],ue=ie[1],de=new p.default().retain($.index).insert(`
|
|
136
|
-
`,ne.format).retain(ae.length()-ue-1).retain(1,{header:null});this.quill.updateContents(de,E.default.sources.USER),this.quill.setSelection($.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function($,ne){var re=ne.prefix.length,ie=this.quill.getLine($.index),ae=u(ie,2),ue=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($.index," ",E.default.sources.USER),this.quill.history.cutoff();var Se=new p.default().retain($.index-de).delete(re+1).retain(ue.length()-2-de).retain(1,{list:he});this.quill.updateContents(Se,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection($.index-re,E.default.sources.SILENT)}},"code exit":{key:X.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function($){var ne=this.quill.getLine($.index),re=u(ne,2),ie=re[0],ae=re[1],ue=new p.default().retain($.index+ie.length()-ae-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ue,E.default.sources.USER)}},"embed left":J(X.keys.LEFT,!1),"embed left shift":J(X.keys.LEFT,!0),"embed right":J(X.keys.RIGHT,!1),"embed right shift":J(X.keys.RIGHT,!0)}};function J(K,$){var ne,re=K===X.keys.LEFT?"prefix":"suffix";return ne={key:K,shiftKey:$,altKey:null},T(ne,re,/^$/),T(ne,"handler",function(ae){var ue=ae.index;K===X.keys.RIGHT&&(ue+=ae.length+1);var de=this.quill.getLeaf(ue),he=u(de,1),Se=he[0];return Se instanceof b.default.Embed?(K===X.keys.LEFT?$?this.quill.setSelection(ae.index-1,ae.length+1,E.default.sources.USER):this.quill.setSelection(ae.index-1,E.default.sources.USER):$?this.quill.setSelection(ae.index,ae.length+1,E.default.sources.USER):this.quill.setSelection(ae.index+ae.length+1,E.default.sources.USER),!1):!0}),ne}function B(K,$){if(!(K.index===0||this.quill.getLength()<=1)){var ne=this.quill.getLine(K.index),re=u(ne,1),ie=re[0],ae={};if($.offset===0){var ue=this.quill.getLine(K.index-1),de=u(ue,1),he=de[0];if(he!=null&&he.length()>1){var Se=ie.formats(),me=this.quill.getFormat(K.index-1,1);ae=C.default.attributes.diff(Se,me)||{}}}var ke=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test($.prefix)?2:1;this.quill.deleteText(K.index-ke,ke,E.default.sources.USER),Object.keys(ae).length>0&&this.quill.formatLine(K.index-ke,ke,ae,E.default.sources.USER),this.quill.focus()}}function N(K,$){var ne=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test($.suffix)?2:1;if(!(K.index>=this.quill.getLength()-ne)){var re={},ie=0,ae=this.quill.getLine(K.index),ue=u(ae,1),de=ue[0];if($.offset>=de.length()-1){var he=this.quill.getLine(K.index+1),Se=u(he,1),me=Se[0];if(me){var ke=de.formats(),fe=this.quill.getFormat(K.index,1);re=C.default.attributes.diff(ke,fe)||{},ie=me.length()}}this.quill.deleteText(K.index,ne,E.default.sources.USER),Object.keys(re).length>0&&this.quill.formatLine(K.index+ie-1,ne,re,E.default.sources.USER)}}function F(K){var $=this.quill.getLines(K),ne={};if($.length>1){var re=$[0].formats(),ie=$[$.length-1].formats();ne=C.default.attributes.diff(ie,re)||{}}this.quill.deleteText(K,E.default.sources.USER),Object.keys(ne).length>0&&this.quill.formatLine(K.index,1,ne,E.default.sources.USER),this.quill.setSelection(K.index,E.default.sources.SILENT),this.quill.focus()}function H(K,$){var ne=this;K.length>0&&this.quill.scroll.deleteAt(K.index,K.length);var re=Object.keys($.format).reduce(function(ie,ae){return b.default.query(ae,b.default.Scope.BLOCK)&&!Array.isArray($.format[ae])&&(ie[ae]=$.format[ae]),ie},{});this.quill.insertText(K.index,`
|
|
137
|
-
`,re,E.default.sources.USER),this.quill.setSelection(K.index+1,E.default.sources.SILENT),this.quill.focus(),Object.keys($.format).forEach(function(ie){re[ie]==null&&(Array.isArray($.format[ie])||ie!=="link"&&ne.quill.format(ie,$.format[ie],E.default.sources.USER))})}function Y(K){return{key:X.keys.TAB,shiftKey:!K,format:{"code-block":!0},handler:function(ne){var re=b.default.query("code-block"),ie=ne.index,ae=ne.length,ue=this.quill.scroll.descendant(re,ie),de=u(ue,2),he=de[0],Se=de[1];if(he!=null){var me=this.quill.getIndex(he),ke=he.newlineIndex(Se,!0)+1,fe=he.newlineIndex(me+Se+ae),ge=he.domNode.textContent.slice(ke,fe).split(`
|
|
138
|
-
`);Se=0,ge.forEach(function(Ce,Te){K?(he.insertAt(ke+Se,re.TAB),Se+=re.TAB.length,Te===0?ie+=re.TAB.length:ae+=re.TAB.length):Ce.startsWith(re.TAB)&&(he.deleteAt(ke+Se,re.TAB.length),Se-=re.TAB.length,Te===0?ie-=re.TAB.length:ae-=re.TAB.length),Se+=Ce.length+1}),this.quill.update(E.default.sources.USER),this.quill.setSelection(ie,ae,E.default.sources.SILENT)}}}}function ee(K){return{key:K[0].toUpperCase(),shortKey:!0,handler:function(ne,re){this.quill.format(K,!re.format[K],E.default.sources.USER)}}}function V(K){if(typeof K=="string"||typeof K=="number")return V({key:K});if((typeof K>"u"?"undefined":l(K))==="object"&&(K=(0,m.default)(K,!1)),typeof K.key=="string")if(X.keys[K.key.toUpperCase()]!=null)K.key=X.keys[K.key.toUpperCase()];else if(K.key.length===1)K.key=K.key.toUpperCase().charCodeAt(0);else return null;return K.shortKey&&(K[Z]=K.shortKey,delete K.shortKey),K}n.default=X,n.SHORTKEY=Z},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function C(g,b){var y=[],E=!0,L=!1,R=void 0;try{for(var D=g[Symbol.iterator](),O;!(E=(O=D.next()).done)&&(y.push(O.value),!(b&&y.length===b));E=!0);}catch(S){L=!0,R=S}finally{try{!E&&D.return&&D.return()}finally{if(L)throw R}}return y}return function(g,b){if(Array.isArray(g))return g;if(Symbol.iterator in Object(g))return C(g,b);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function C(g,b,y){g===null&&(g=Function.prototype);var E=Object.getOwnPropertyDescriptor(g,b);if(E===void 0){var L=Object.getPrototypeOf(g);return L===null?void 0:C(L,b,y)}else{if("value"in E)return E.value;var R=E.get;return R===void 0?void 0:R.call(y)}},c=function(){function C(g,b){for(var y=0;y<b.length;y++){var E=b[y];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(g,E.key,E)}}return function(g,b,y){return b&&C(g.prototype,b),y&&C(g,y),g}}(),d=a(0),m=x(d),_=a(7),k=x(_);function x(C){return C&&C.__esModule?C:{default:C}}function v(C,g){if(!(C instanceof g))throw new TypeError("Cannot call a class as a function")}function w(C,g){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:C}function p(C,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);C.prototype=Object.create(g&&g.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(C,g):C.__proto__=g)}var h=function(C){p(g,C),c(g,null,[{key:"value",value:function(){}}]);function g(b,y){v(this,g);var E=w(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,b));return E.selection=y,E.textNode=document.createTextNode(g.CONTENTS),E.domNode.appendChild(E.textNode),E._length=0,E}return c(g,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(y,E){if(this._length!==0)return u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"format",this).call(this,y,E);for(var L=this,R=0;L!=null&&L.statics.scope!==m.default.Scope.BLOCK_BLOT;)R+=L.offset(L.parent),L=L.parent;L!=null&&(this._length=g.CONTENTS.length,L.optimize(),L.formatAt(R,g.CONTENTS.length,y,E),this._length=0)}},{key:"index",value:function(y,E){return y===this.textNode?0:u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"index",this).call(this,y,E)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var y=this.textNode,E=this.selection.getNativeRange(),L=void 0,R=void 0,D=void 0;if(E!=null&&E.start.node===y&&E.end.node===y){var O=[y,E.start.offset,E.end.offset];L=O[0],R=O[1],D=O[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==g.CONTENTS){var S=this.textNode.data.split(g.CONTENTS).join("");this.next instanceof k.default?(L=this.next.domNode,this.next.insertAt(0,S),this.textNode.data=g.CONTENTS):(this.textNode.data=S,this.parent.insertBefore(m.default.create(this.textNode),this),this.textNode=document.createTextNode(g.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),R!=null){var T=[R,D].map(function(A){return Math.max(0,Math.min(L.data.length,A-1))}),M=l(T,2);return R=M[0],D=M[1],{startNode:L,startOffset:R,endNode:L,endOffset:D}}}}},{key:"update",value:function(y,E){var L=this;if(y.some(function(D){return D.type==="characterData"&&D.target===L.textNode})){var R=this.restore();R&&(E.range=R)}}},{key:"value",value:function(){return""}}]),g}(m.default.Embed);h.blotName="cursor",h.className="ql-cursor",h.tagName="span",h.CONTENTS="\uFEFF",n.default=h},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(0),u=m(l),c=a(4),d=m(c);function m(w){return w&&w.__esModule?w:{default:w}}function _(w,p){if(!(w instanceof p))throw new TypeError("Cannot call a class as a function")}function k(w,p){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:w}function x(w,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);w.prototype=Object.create(p&&p.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(w,p):w.__proto__=p)}var v=function(w){x(p,w);function p(){return _(this,p),k(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return p}(u.default.Container);v.allowedChildren=[d.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 h(C,g){for(var b=0;b<g.length;b++){var y=g[b];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(C,y.key,y)}}return function(C,g,b){return g&&h(C.prototype,g),b&&h(C,b),C}}(),u=function h(C,g,b){C===null&&(C=Function.prototype);var y=Object.getOwnPropertyDescriptor(C,g);if(y===void 0){var E=Object.getPrototypeOf(C);return E===null?void 0:h(E,g,b)}else{if("value"in y)return y.value;var L=y.get;return L===void 0?void 0:L.call(b)}},c=a(0),d=m(c);function m(h){return h&&h.__esModule?h:{default:h}}function _(h,C){if(!(h instanceof C))throw new TypeError("Cannot call a class as a function")}function k(h,C){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:h}function x(h,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);h.prototype=Object.create(C&&C.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(h,C):h.__proto__=C)}var v=function(h){x(C,h);function C(){return _(this,C),k(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return l(C,[{key:"value",value:function(b){var y=u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"value",this).call(this,b);return y.startsWith("rgb(")?(y=y.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+y.split(",").map(function(E){return("00"+parseInt(E).toString(16)).slice(-2)}).join("")):y}}]),C}(d.default.Attributor.Style),w=new d.default.Attributor.Class("color","ql-color",{scope:d.default.Scope.INLINE}),p=new v("color","color",{scope:d.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=w,n.ColorStyle=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var l=function(){function p(h,C){for(var g=0;g<C.length;g++){var b=C[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(h,b.key,b)}}return function(h,C,g){return C&&p(h.prototype,C),g&&p(h,g),h}}(),u=function p(h,C,g){h===null&&(h=Function.prototype);var b=Object.getOwnPropertyDescriptor(h,C);if(b===void 0){var y=Object.getPrototypeOf(h);return y===null?void 0:p(y,C,g)}else{if("value"in b)return b.value;var E=b.get;return E===void 0?void 0:E.call(g)}},c=a(6),d=m(c);function m(p){return p&&p.__esModule?p:{default:p}}function _(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function k(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function x(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var v=function(p){x(h,p);function h(){return _(this,h),k(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return l(h,[{key:"format",value:function(g,b){if(g!==this.statics.blotName||!b)return u(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"format",this).call(this,g,b);b=this.constructor.sanitize(b),this.domNode.setAttribute("href",b)}}],[{key:"create",value:function(g){var b=u(h.__proto__||Object.getPrototypeOf(h),"create",this).call(this,g);return g=this.sanitize(g),b.setAttribute("href",g),b.setAttribute("rel","noopener noreferrer"),b.setAttribute("target","_blank"),b}},{key:"formats",value:function(g){return g.getAttribute("href")}},{key:"sanitize",value:function(g){return w(g,this.PROTOCOL_WHITELIST)?g:this.SANITIZED_URL}}]),h}(d.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function w(p,h){var C=document.createElement("a");C.href=p;var g=C.href.slice(0,C.href.indexOf(":"));return h.indexOf(g)>-1}n.default=v,n.sanitize=w},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},u=function(){function h(C,g){for(var b=0;b<g.length;b++){var y=g[b];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(C,y.key,y)}}return function(C,g,b){return g&&h(C.prototype,g),b&&h(C,b),C}}(),c=a(23),d=k(c),m=a(107),_=k(m);function k(h){return h&&h.__esModule?h:{default:h}}function x(h,C){if(!(h instanceof C))throw new TypeError("Cannot call a class as a function")}var v=0;function w(h,C){h.setAttribute(C,h.getAttribute(C)!=="true")}var p=function(){function h(C){var g=this;x(this,h),this.select=C,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(){g.togglePicker()}),this.label.addEventListener("keydown",function(b){switch(b.keyCode){case d.default.keys.ENTER:g.togglePicker();break;case d.default.keys.ESCAPE:g.escape(),b.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return u(h,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),w(this.label,"aria-expanded"),w(this.options,"aria-hidden")}},{key:"buildItem",value:function(g){var b=this,y=document.createElement("span");return y.tabIndex="0",y.setAttribute("role","button"),y.classList.add("ql-picker-item"),g.hasAttribute("value")&&y.setAttribute("data-value",g.getAttribute("value")),g.textContent&&y.setAttribute("data-label",g.textContent),y.addEventListener("click",function(){b.selectItem(y,!0)}),y.addEventListener("keydown",function(E){switch(E.keyCode){case d.default.keys.ENTER:b.selectItem(y,!0),E.preventDefault();break;case d.default.keys.ESCAPE:b.escape(),E.preventDefault();break}}),y}},{key:"buildLabel",value:function(){var g=document.createElement("span");return g.classList.add("ql-picker-label"),g.innerHTML=_.default,g.tabIndex="0",g.setAttribute("role","button"),g.setAttribute("aria-expanded","false"),this.container.appendChild(g),g}},{key:"buildOptions",value:function(){var g=this,b=document.createElement("span");b.classList.add("ql-picker-options"),b.setAttribute("aria-hidden","true"),b.tabIndex="-1",b.id="ql-picker-options-"+v,v+=1,this.label.setAttribute("aria-controls",b.id),this.options=b,[].slice.call(this.select.options).forEach(function(y){var E=g.buildItem(y);b.appendChild(E),y.selected===!0&&g.selectItem(E)}),this.container.appendChild(b)}},{key:"buildPicker",value:function(){var g=this;[].slice.call(this.select.attributes).forEach(function(b){g.container.setAttribute(b.name,b.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var g=this;this.close(),setTimeout(function(){return g.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(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=this.container.querySelector(".ql-selected");if(g!==y&&(y!=null&&y.classList.remove("ql-selected"),g!=null&&(g.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(g.parentNode.children,g),g.hasAttribute("data-value")?this.label.setAttribute("data-value",g.getAttribute("data-value")):this.label.removeAttribute("data-value"),g.hasAttribute("data-label")?this.label.setAttribute("data-label",g.getAttribute("data-label")):this.label.removeAttribute("data-label"),b))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":l(Event))==="object"){var E=document.createEvent("Event");E.initEvent("change",!0,!0),this.select.dispatchEvent(E)}this.close()}}},{key:"update",value:function(){var g=void 0;if(this.select.selectedIndex>-1){var b=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];g=this.select.options[this.select.selectedIndex],this.selectItem(b)}else this.selectItem(null);var y=g!=null&&g!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",y)}}]),h}();n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(0),u=U(l),c=a(5),d=U(c),m=a(4),_=U(m),k=a(16),x=U(k),v=a(25),w=U(v),p=a(24),h=U(p),C=a(35),g=U(C),b=a(6),y=U(b),E=a(22),L=U(E),R=a(7),D=U(R),O=a(55),S=U(O),T=a(42),M=U(T),A=a(23),z=U(A);function U(Z){return Z&&Z.__esModule?Z:{default:Z}}d.default.register({"blots/block":_.default,"blots/block/embed":m.BlockEmbed,"blots/break":x.default,"blots/container":w.default,"blots/cursor":h.default,"blots/embed":g.default,"blots/inline":y.default,"blots/scroll":L.default,"blots/text":D.default,"modules/clipboard":S.default,"modules/history":M.default,"modules/keyboard":z.default}),u.default.register(_.default,x.default,h.default,y.default,L.default,D.default),n.default=d.default},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(1),u=function(){function c(d){this.domNode=d,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(d){if(this.tagName==null)throw new l.ParchmentError("Blot definition missing tagName");var m;return Array.isArray(this.tagName)?(typeof d=="string"&&(d=d.toUpperCase(),parseInt(d).toString()===d&&(d=parseInt(d))),typeof d=="number"?m=document.createElement(this.tagName[d-1]):this.tagName.indexOf(d)>-1?m=document.createElement(d):m=document.createElement(this.tagName[0])):m=document.createElement(this.tagName),this.className&&m.classList.add(this.className),m},c.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},c.prototype.clone=function(){var d=this.domNode.cloneNode(!1);return l.create(d)},c.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[l.DATA_KEY]},c.prototype.deleteAt=function(d,m){var _=this.isolate(d,m);_.remove()},c.prototype.formatAt=function(d,m,_,k){var x=this.isolate(d,m);if(l.query(_,l.Scope.BLOT)!=null&&k)x.wrap(_,k);else if(l.query(_,l.Scope.ATTRIBUTE)!=null){var v=l.create(this.statics.scope);x.wrap(v),v.format(_,k)}},c.prototype.insertAt=function(d,m,_){var k=_==null?l.create("text",m):l.create(m,_),x=this.split(d);this.parent.insertBefore(k,x)},c.prototype.insertInto=function(d,m){m===void 0&&(m=null),this.parent!=null&&this.parent.children.remove(this);var _=null;d.children.insertBefore(this,m),m!=null&&(_=m.domNode),(this.domNode.parentNode!=d.domNode||this.domNode.nextSibling!=_)&&d.domNode.insertBefore(this.domNode,_),this.parent=d,this.attach()},c.prototype.isolate=function(d,m){var _=this.split(d);return _.split(m),_},c.prototype.length=function(){return 1},c.prototype.offset=function(d){return d===void 0&&(d=this.parent),this.parent==null||this==d?0:this.parent.children.offset(this)+this.parent.offset(d)},c.prototype.optimize=function(d){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(d){d.parent!=null&&(d.parent.insertBefore(this,d.next),d.remove())},c.prototype.replaceWith=function(d,m){var _=typeof d=="string"?l.create(d,m):d;return _.replace(this),_},c.prototype.split=function(d,m){return d===0?this:this.next},c.prototype.update=function(d,m){},c.prototype.wrap=function(d,m){var _=typeof d=="string"?l.create(d,m):d;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),d=a(1),m=function(){function _(k){this.attributes={},this.domNode=k,this.build()}return _.prototype.attribute=function(k,x){x?k.add(this.domNode,x)&&(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 x=l.default.keys(this.domNode),v=u.default.keys(this.domNode),w=c.default.keys(this.domNode);x.concat(v).concat(w).forEach(function(p){var h=d.query(p,d.Scope.ATTRIBUTE);h instanceof l.default&&(k.attributes[h.attrName]=h)})},_.prototype.copy=function(k){var x=this;Object.keys(this.attributes).forEach(function(v){var w=x.attributes[v].value(x.domNode);k.format(v,w)})},_.prototype.move=function(k){var x=this;this.copy(k),Object.keys(this.attributes).forEach(function(v){x.attributes[v].remove(x.domNode)}),this.attributes={}},_.prototype.values=function(){var k=this;return Object.keys(this.attributes).reduce(function(x,v){return x[v]=k.attributes[v].value(k.domNode),x},{})},_}();n.default=m},function(t,n,a){var l=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var x in k)k.hasOwnProperty(x)&&(_[x]=k[x])};return function(_,k){m(_,k);function x(){this.constructor=_}_.prototype=k===null?Object.create(k):(x.prototype=k.prototype,new x)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(12);function c(m,_){var k=m.getAttribute("class")||"";return k.split(/\s+/).filter(function(x){return x.indexOf(_+"-")===0})}var d=function(m){l(_,m);function _(){return m!==null&&m.apply(this,arguments)||this}return _.keys=function(k){return(k.getAttribute("class")||"").split(/\s+/).map(function(x){return x.split("-").slice(0,-1).join("-")})},_.prototype.add=function(k,x){return this.canAdd(k,x)?(this.remove(k),k.classList.add(this.keyName+"-"+x),!0):!1},_.prototype.remove=function(k){var x=c(k,this.keyName);x.forEach(function(v){k.classList.remove(v)}),k.classList.length===0&&k.removeAttribute("class")},_.prototype.value=function(k){var x=c(k,this.keyName)[0]||"",v=x.slice(this.keyName.length+1);return this.canAdd(k,v)?v:""},_}(u.default);n.default=d},function(t,n,a){var l=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var x in k)k.hasOwnProperty(x)&&(_[x]=k[x])};return function(_,k){m(_,k);function x(){this.constructor=_}_.prototype=k===null?Object.create(k):(x.prototype=k.prototype,new x)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(12);function c(m){var _=m.split("-"),k=_.slice(1).map(function(x){return x[0].toUpperCase()+x.slice(1)}).join("");return _[0]+k}var d=function(m){l(_,m);function _(){return m!==null&&m.apply(this,arguments)||this}return _.keys=function(k){return(k.getAttribute("style")||"").split(";").map(function(x){var v=x.split(":");return v[0].trim()})},_.prototype.add=function(k,x){return this.canAdd(k,x)?(k.style[c(this.keyName)]=x,!0):!1},_.prototype.remove=function(k){k.style[c(this.keyName)]="",k.getAttribute("style")||k.removeAttribute("style")},_.prototype.value=function(k){var x=k.style[c(this.keyName)];return this.canAdd(k,x)?x:""},_}(u.default);n.default=d},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function d(m,_){for(var k=0;k<_.length;k++){var x=_[k];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,_,k){return _&&d(m.prototype,_),k&&d(m,k),m}}();function u(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}var c=function(){function d(m,_){u(this,d),this.quill=m,this.options=_,this.modules={}}return l(d,[{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[_]}}]),d}();c.DEFAULTS={modules:{}},c.themes={default:c},n.default=c},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function C(g,b){for(var y=0;y<b.length;y++){var E=b[y];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(g,E.key,E)}}return function(g,b,y){return b&&C(g.prototype,b),y&&C(g,y),g}}(),u=function C(g,b,y){g===null&&(g=Function.prototype);var E=Object.getOwnPropertyDescriptor(g,b);if(E===void 0){var L=Object.getPrototypeOf(g);return L===null?void 0:C(L,b,y)}else{if("value"in E)return E.value;var R=E.get;return R===void 0?void 0:R.call(y)}},c=a(0),d=k(c),m=a(7),_=k(m);function k(C){return C&&C.__esModule?C:{default:C}}function x(C,g){if(!(C instanceof g))throw new TypeError("Cannot call a class as a function")}function v(C,g){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:C}function w(C,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);C.prototype=Object.create(g&&g.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(C,g):C.__proto__=g)}var p="\uFEFF",h=function(C){w(g,C);function g(b){x(this,g);var y=v(this,(g.__proto__||Object.getPrototypeOf(g)).call(this,b));return y.contentNode=document.createElement("span"),y.contentNode.setAttribute("contenteditable",!1),[].slice.call(y.domNode.childNodes).forEach(function(E){y.contentNode.appendChild(E)}),y.leftGuard=document.createTextNode(p),y.rightGuard=document.createTextNode(p),y.domNode.appendChild(y.leftGuard),y.domNode.appendChild(y.contentNode),y.domNode.appendChild(y.rightGuard),y}return l(g,[{key:"index",value:function(y,E){return y===this.leftGuard?0:y===this.rightGuard?1:u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"index",this).call(this,y,E)}},{key:"restore",value:function(y){var E=void 0,L=void 0,R=y.data.split(p).join("");if(y===this.leftGuard)if(this.prev instanceof _.default){var D=this.prev.length();this.prev.insertAt(D,R),E={startNode:this.prev.domNode,startOffset:D+R.length}}else L=document.createTextNode(R),this.parent.insertBefore(d.default.create(L),this),E={startNode:L,startOffset:R.length};else y===this.rightGuard&&(this.next instanceof _.default?(this.next.insertAt(0,R),E={startNode:this.next.domNode,startOffset:R.length}):(L=document.createTextNode(R),this.parent.insertBefore(d.default.create(L),this.next),E={startNode:L,startOffset:R.length}));return y.data=p,E}},{key:"update",value:function(y,E){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&&(E.range=D)}})}}]),g}(d.default.Embed);n.default=h},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(x){return x&&x.__esModule?x:{default:x}}var d={scope:u.default.Scope.BLOCK,whitelist:["right","center","justify"]},m=new u.default.Attributor.Attribute("align","align",d),_=new u.default.Attributor.Class("align","ql-align",d),k=new u.default.Attributor.Style("align","text-align",d);n.AlignAttribute=m,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=d(l),c=a(26);function d(k){return k&&k.__esModule?k:{default:k}}var m=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=m,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(x){return x&&x.__esModule?x:{default:x}}var d={scope:u.default.Scope.BLOCK,whitelist:["rtl"]},m=new u.default.Attributor.Attribute("direction","dir",d),_=new u.default.Attributor.Class("direction","ql-direction",d),k=new u.default.Attributor.Style("direction","direction",d);n.DirectionAttribute=m,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 C(g,b){for(var y=0;y<b.length;y++){var E=b[y];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(g,E.key,E)}}return function(g,b,y){return b&&C(g.prototype,b),y&&C(g,y),g}}(),u=function C(g,b,y){g===null&&(g=Function.prototype);var E=Object.getOwnPropertyDescriptor(g,b);if(E===void 0){var L=Object.getPrototypeOf(g);return L===null?void 0:C(L,b,y)}else{if("value"in E)return E.value;var R=E.get;return R===void 0?void 0:R.call(y)}},c=a(0),d=m(c);function m(C){return C&&C.__esModule?C:{default:C}}function _(C,g){if(!(C instanceof g))throw new TypeError("Cannot call a class as a function")}function k(C,g){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:C}function x(C,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);C.prototype=Object.create(g&&g.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(C,g):C.__proto__=g)}var v={scope:d.default.Scope.INLINE,whitelist:["serif","monospace"]},w=new d.default.Attributor.Class("font","ql-font",v),p=function(C){x(g,C);function g(){return _(this,g),k(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}return l(g,[{key:"value",value:function(y){return u(g.prototype.__proto__||Object.getPrototypeOf(g.prototype),"value",this).call(this,y).replace(/["']/g,"")}}]),g}(d.default.Attributor.Style),h=new p("font","font-family",v);n.FontStyle=h,n.FontClass=w},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 d=new u.default.Attributor.Class("size","ql-size",{scope:u.default.Scope.INLINE,whitelist:["small","large","huge"]}),m=new u.default.Attributor.Style("size","font-size",{scope:u.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=d,n.SizeStyle=m},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 b(y,E){for(var L=0;L<E.length;L++){var R=E[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(y,R.key,R)}}return function(y,E,L){return E&&b(y.prototype,E),L&&b(y,L),y}}(),u=a(0),c=x(u),d=a(5),m=x(d),_=a(9),k=x(_);function x(b){return b&&b.__esModule?b:{default:b}}function v(b,y){if(!(b instanceof y))throw new TypeError("Cannot call a class as a function")}function w(b,y){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:b}function p(b,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);b.prototype=Object.create(y&&y.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(b,y):b.__proto__=y)}var h=function(b){p(y,b);function y(E,L){v(this,y);var R=w(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,E,L));return R.lastRecorded=0,R.ignoreChange=!1,R.clear(),R.quill.on(m.default.events.EDITOR_CHANGE,function(D,O,S,T){D!==m.default.events.TEXT_CHANGE||R.ignoreChange||(!R.options.userOnly||T===m.default.sources.USER?R.record(O,S):R.transform(O))}),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],m.default.sources.USER),this.ignoreChange=!1;var O=g(D[L]);this.quill.setSelection(O)}}},{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),O=Date.now();if(this.lastRecorded+this.options.delay>O&&this.stack.undo.length>0){var S=this.stack.undo.pop();D=D.compose(S.undo),L=S.redo.compose(L)}else this.lastRecorded=O;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);h.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function C(b){var y=b.ops[b.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(E){return c.default.query(E,c.default.Scope.BLOCK)!=null}):!1}function g(b){var y=b.reduce(function(L,R){return L+=R.delete||0,L},0),E=b.length()-y;return C(b)&&(E-=1),E}n.default=h,n.getLastChangeIndex=g},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var l=function(){function H(Y,ee){for(var V=0;V<ee.length;V++){var K=ee[V];K.enumerable=K.enumerable||!1,K.configurable=!0,"value"in K&&(K.writable=!0),Object.defineProperty(Y,K.key,K)}}return function(Y,ee,V){return ee&&H(Y.prototype,ee),V&&H(Y,V),Y}}(),u=function H(Y,ee,V){Y===null&&(Y=Function.prototype);var K=Object.getOwnPropertyDescriptor(Y,ee);if(K===void 0){var $=Object.getPrototypeOf(Y);return $===null?void 0:H($,ee,V)}else{if("value"in K)return K.value;var ne=K.get;return ne===void 0?void 0:ne.call(V)}},c=a(3),d=O(c),m=a(2),_=O(m),k=a(8),x=O(k),v=a(23),w=O(v),p=a(34),h=O(p),C=a(59),g=O(C),b=a(60),y=O(b),E=a(28),L=O(E),R=a(61),D=O(R);function O(H){return H&&H.__esModule?H:{default:H}}function S(H,Y){if(!(H instanceof Y))throw new TypeError("Cannot call a class as a function")}function T(H,Y){if(!H)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Y&&(typeof Y=="object"||typeof Y=="function")?Y:H}function M(H,Y){if(typeof Y!="function"&&Y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Y);H.prototype=Object.create(Y&&Y.prototype,{constructor:{value:H,enumerable:!1,writable:!0,configurable:!0}}),Y&&(Object.setPrototypeOf?Object.setPrototypeOf(H,Y):H.__proto__=Y)}var A=[!1,"center","right","justify"],z=["#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"],Z=["1","2","3",!1],X=["small",!1,"large","huge"],J=function(H){M(Y,H);function Y(ee,V){S(this,Y);var K=T(this,(Y.__proto__||Object.getPrototypeOf(Y)).call(this,ee,V)),$=function ne(re){if(!document.body.contains(ee.root))return document.body.removeEventListener("click",ne);K.tooltip!=null&&!K.tooltip.root.contains(re.target)&&document.activeElement!==K.tooltip.textbox&&!K.quill.hasFocus()&&K.tooltip.hide(),K.pickers!=null&&K.pickers.forEach(function(ie){ie.container.contains(re.target)||ie.close()})};return ee.emitter.listenDOM("click",document.body,$),K}return l(Y,[{key:"addModule",value:function(V){var K=u(Y.prototype.__proto__||Object.getPrototypeOf(Y.prototype),"addModule",this).call(this,V);return V==="toolbar"&&this.extendToolbar(K),K}},{key:"buildButtons",value:function(V,K){V.forEach(function($){var ne=$.getAttribute("class")||"";ne.split(/\s+/).forEach(function(re){if(re.startsWith("ql-")&&(re=re.slice(3),K[re]!=null))if(re==="direction")$.innerHTML=K[re][""]+K[re].rtl;else if(typeof K[re]=="string")$.innerHTML=K[re];else{var ie=$.value||"";ie!=null&&K[re][ie]&&($.innerHTML=K[re][ie])}})})}},{key:"buildPickers",value:function(V,K){var $=this;this.pickers=V.map(function(re){if(re.classList.contains("ql-align"))return re.querySelector("option")==null&&F(re,A),new y.default(re,K.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&&F(re,z,ie==="background"?"#ffffff":"#000000"),new g.default(re,K[ie])}else return re.querySelector("option")==null&&(re.classList.contains("ql-font")?F(re,U):re.classList.contains("ql-header")?F(re,Z):re.classList.contains("ql-size")&&F(re,X)),new L.default(re)});var ne=function(){$.pickers.forEach(function(ie){ie.update()})};this.quill.on(x.default.events.EDITOR_CHANGE,ne)}}]),Y}(h.default);J.DEFAULTS=(0,d.default)(!0,{},h.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var Y=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(K){var $=Y.quill.getSelection(!0);Y.quill.updateContents(new _.default().retain($.index).delete($.length).insert({image:K.target.result}),x.default.sources.USER),Y.quill.setSelection($.index+1,x.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 B=function(H){M(Y,H);function Y(ee,V){S(this,Y);var K=T(this,(Y.__proto__||Object.getPrototypeOf(Y)).call(this,ee,V));return K.textbox=K.root.querySelector('input[type="text"]'),K.listen(),K}return l(Y,[{key:"listen",value:function(){var V=this;this.textbox.addEventListener("keydown",function(K){w.default.match(K,"enter")?(V.save(),K.preventDefault()):w.default.match(K,"escape")&&(V.cancel(),K.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),K!=null?this.textbox.value=K: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 K=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",V,x.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",V,x.default.sources.USER)),this.quill.root.scrollTop=K;break}case"video":V=N(V);case"formula":{if(!V)break;var $=this.quill.getSelection(!0);if($!=null){var ne=$.index+$.length;this.quill.insertEmbed(ne,this.root.getAttribute("data-mode"),V,x.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(ne+1," ",x.default.sources.USER),this.quill.setSelection(ne+2,x.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),Y}(D.default);function N(H){var Y=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 Y?(Y[1]||"https")+"://www.youtube.com/embed/"+Y[2]+"?showinfo=0":(Y=H.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(Y[1]||"https")+"://player.vimeo.com/video/"+Y[2]+"/":H}function F(H,Y){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Y.forEach(function(V){var K=document.createElement("option");V===ee?K.setAttribute("selected","selected"):K.setAttribute("value",V),H.appendChild(K)})}n.BaseTooltip=B,n.default=J},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=[],d=0;d<arguments.length;d++)c[d]=arguments[d];this.insertBefore(c[0],null),c.length>1&&this.append.apply(this,c.slice(1))},u.prototype.contains=function(c){for(var d,m=this.iterator();d=m();)if(d===c)return!0;return!1},u.prototype.insertBefore=function(c,d){c&&(c.next=d,d!=null?(c.prev=d.prev,d.prev!=null&&(d.prev.next=c),d.prev=c,d===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 d=0,m=this.head;m!=null;){if(m===c)return d;d+=m.length(),m=m.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 d=c;return c!=null&&(c=c.next),d}},u.prototype.find=function(c,d){d===void 0&&(d=!1);for(var m,_=this.iterator();m=_();){var k=m.length();if(c<k||d&&c===k&&(m.next==null||m.next.length()!==0))return[m,c];c-=k}return[null,0]},u.prototype.forEach=function(c){for(var d,m=this.iterator();d=m();)c(d)},u.prototype.forEachAt=function(c,d,m){if(!(d<=0))for(var _=this.find(c),k=_[0],x=_[1],v,w=c-x,p=this.iterator(k);(v=p())&&w<c+d;){var h=v.length();c>w?m(v,c-w,Math.min(d,w+h-c)):m(v,0,Math.min(h,c+d-w)),w+=h}},u.prototype.map=function(c){return this.reduce(function(d,m){return d.push(c(m)),d},[])},u.prototype.reduce=function(c,d){for(var m,_=this.iterator();m=_();)d=c(d,m);return d},u}();n.default=l},function(t,n,a){var l=this&&this.__extends||function(){var k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,v){x.__proto__=v}||function(x,v){for(var w in v)v.hasOwnProperty(w)&&(x[w]=v[w])};return function(x,v){k(x,v);function w(){this.constructor=x}x.prototype=v===null?Object.create(v):(w.prototype=v.prototype,new w)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(17),c=a(1),d={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},m=100,_=function(k){l(x,k);function x(v){var w=k.call(this,v)||this;return w.scroll=w,w.observer=new MutationObserver(function(p){w.update(p)}),w.observer.observe(w.domNode,d),w.attach(),w}return x.prototype.detach=function(){k.prototype.detach.call(this),this.observer.disconnect()},x.prototype.deleteAt=function(v,w){this.update(),v===0&&w===this.length()?this.children.forEach(function(p){p.remove()}):k.prototype.deleteAt.call(this,v,w)},x.prototype.formatAt=function(v,w,p,h){this.update(),k.prototype.formatAt.call(this,v,w,p,h)},x.prototype.insertAt=function(v,w,p){this.update(),k.prototype.insertAt.call(this,v,w,p)},x.prototype.optimize=function(v,w){var p=this;v===void 0&&(v=[]),w===void 0&&(w={}),k.prototype.optimize.call(this,w);for(var h=[].slice.call(this.observer.takeRecords());h.length>0;)v.push(h.pop());for(var C=function(E,L){L===void 0&&(L=!0),!(E==null||E===p)&&E.domNode.parentNode!=null&&(E.domNode[c.DATA_KEY].mutations==null&&(E.domNode[c.DATA_KEY].mutations=[]),L&&C(E.parent))},g=function(E){E.domNode[c.DATA_KEY]==null||E.domNode[c.DATA_KEY].mutations==null||(E instanceof u.default&&E.children.forEach(g),E.optimize(w))},b=v,y=0;b.length>0;y+=1){if(y>=m)throw new Error("[Parchment] Maximum optimize iterations reached");for(b.forEach(function(E){var L=c.find(E.target,!0);L!=null&&(L.domNode===E.target&&(E.type==="childList"?(C(c.find(E.previousSibling,!1)),[].forEach.call(E.addedNodes,function(R){var D=c.find(R,!1);C(D,!1),D instanceof u.default&&D.children.forEach(function(O){C(O,!1)})})):E.type==="attributes"&&C(L.prev)),C(L))}),this.children.forEach(g),b=[].slice.call(this.observer.takeRecords()),h=b.slice();h.length>0;)v.push(h.pop())}},x.prototype.update=function(v,w){var p=this;w===void 0&&(w={}),v=v||this.observer.takeRecords(),v.map(function(h){var C=c.find(h.target,!0);return C==null?null:C.domNode[c.DATA_KEY].mutations==null?(C.domNode[c.DATA_KEY].mutations=[h],C):(C.domNode[c.DATA_KEY].mutations.push(h),null)}).forEach(function(h){h==null||h===p||h.domNode[c.DATA_KEY]==null||h.update(h.domNode[c.DATA_KEY].mutations||[],w)}),this.domNode[c.DATA_KEY].mutations!=null&&k.prototype.update.call(this,this.domNode[c.DATA_KEY].mutations,w),this.optimize(v,w)},x.blotName="scroll",x.defaultChild="block",x.scope=c.Scope.BLOCK_BLOT,x.tagName="DIV",x}(u.default);n.default=_},function(t,n,a){var l=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,x){k.__proto__=x}||function(k,x){for(var v in x)x.hasOwnProperty(v)&&(k[v]=x[v])};return function(k,x){_(k,x);function v(){this.constructor=k}k.prototype=x===null?Object.create(x):(v.prototype=x.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(18),c=a(1);function d(_,k){if(Object.keys(_).length!==Object.keys(k).length)return!1;for(var x in _)if(_[x]!==k[x])return!1;return!0}var m=function(_){l(k,_);function k(){return _!==null&&_.apply(this,arguments)||this}return k.formats=function(x){if(x.tagName!==k.tagName)return _.formats.call(this,x)},k.prototype.format=function(x,v){var w=this;x===this.statics.blotName&&!v?(this.children.forEach(function(p){p instanceof u.default||(p=p.wrap(k.blotName,!0)),w.attributes.copy(p)}),this.unwrap()):_.prototype.format.call(this,x,v)},k.prototype.formatAt=function(x,v,w,p){if(this.formats()[w]!=null||c.query(w,c.Scope.ATTRIBUTE)){var h=this.isolate(x,v);h.format(w,p)}else _.prototype.formatAt.call(this,x,v,w,p)},k.prototype.optimize=function(x){_.prototype.optimize.call(this,x);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var w=this.next;w instanceof k&&w.prev===this&&d(v,w.formats())&&(w.moveChildren(this),w.remove())},k.blotName="inline",k.scope=c.Scope.INLINE_BLOT,k.tagName="SPAN",k}(u.default);n.default=m},function(t,n,a){var l=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var x in k)k.hasOwnProperty(x)&&(_[x]=k[x])};return function(_,k){m(_,k);function x(){this.constructor=_}_.prototype=k===null?Object.create(k):(x.prototype=k.prototype,new x)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(18),c=a(1),d=function(m){l(_,m);function _(){return m!==null&&m.apply(this,arguments)||this}return _.formats=function(k){var x=c.query(_.blotName).tagName;if(k.tagName!==x)return m.formats.call(this,k)},_.prototype.format=function(k,x){c.query(k,c.Scope.BLOCK)!=null&&(k===this.statics.blotName&&!x?this.replaceWith(_.blotName):m.prototype.format.call(this,k,x))},_.prototype.formatAt=function(k,x,v,w){c.query(v,c.Scope.BLOCK)!=null?this.format(v,w):m.prototype.formatAt.call(this,k,x,v,w)},_.prototype.insertAt=function(k,x,v){if(v==null||c.query(x,c.Scope.INLINE)!=null)m.prototype.insertAt.call(this,k,x,v);else{var w=this.split(k),p=c.create(x,v);w.parent.insertBefore(p,w)}},_.prototype.update=function(k,x){navigator.userAgent.match(/Trident/)?this.build():m.prototype.update.call(this,k,x)},_.blotName="block",_.scope=c.Scope.BLOCK_BLOT,_.tagName="P",_}(u.default);n.default=d},function(t,n,a){var l=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,_){m.__proto__=_}||function(m,_){for(var k in _)_.hasOwnProperty(k)&&(m[k]=_[k])};return function(m,_){d(m,_);function k(){this.constructor=m}m.prototype=_===null?Object.create(_):(k.prototype=_.prototype,new k)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(19),c=function(d){l(m,d);function m(){return d!==null&&d.apply(this,arguments)||this}return m.formats=function(_){},m.prototype.format=function(_,k){d.prototype.formatAt.call(this,0,this.length(),_,k)},m.prototype.formatAt=function(_,k,x,v){_===0&&k===this.length()?this.format(x,v):d.prototype.formatAt.call(this,_,k,x,v)},m.prototype.formats=function(){return this.statics.formats(this.domNode)},m}(u.default);n.default=c},function(t,n,a){var l=this&&this.__extends||function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,k){_.__proto__=k}||function(_,k){for(var x in k)k.hasOwnProperty(x)&&(_[x]=k[x])};return function(_,k){m(_,k);function x(){this.constructor=_}_.prototype=k===null?Object.create(k):(x.prototype=k.prototype,new x)}}();Object.defineProperty(n,"__esModule",{value:!0});var u=a(19),c=a(1),d=function(m){l(_,m);function _(k){var x=m.call(this,k)||this;return x.text=x.statics.value(x.domNode),x}return _.create=function(k){return document.createTextNode(k)},_.value=function(k){var x=k.data;return x.normalize&&(x=x.normalize()),x},_.prototype.deleteAt=function(k,x){this.domNode.data=this.text=this.text.slice(0,k)+this.text.slice(k+x)},_.prototype.index=function(k,x){return this.domNode===k?x:-1},_.prototype.insertAt=function(k,x,v){v==null?(this.text=this.text.slice(0,k)+x+this.text.slice(k),this.domNode.data=this.text):m.prototype.insertAt.call(this,k,x,v)},_.prototype.length=function(){return this.text.length},_.prototype.optimize=function(k){m.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,x){return[this.domNode,k]},_.prototype.split=function(k,x){if(x===void 0&&(x=!1),!x){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,x){var v=this;k.some(function(w){return w.type==="characterData"&&w.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=d},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,d){return arguments.length>1&&!this.contains(c)==!d?d:u.call(this,c)}}String.prototype.startsWith||(String.prototype.startsWith=function(c,d){return d=d||0,this.substr(d,c.length)===c}),String.prototype.endsWith||(String.prototype.endsWith=function(c,d){var m=this.toString();(typeof d!="number"||!isFinite(d)||Math.floor(d)!==d||d>m.length)&&(d=m.length),d-=c.length;var _=m.indexOf(c,d);return _!==-1&&_===d}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(d){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof d!="function")throw new TypeError("predicate must be a function");for(var m=Object(this),_=m.length>>>0,k=arguments[1],x,v=0;v<_;v++)if(x=m[v],d.call(k,x,v,m))return x}}),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,E,L){if(y==E)return y?[[u,y]]:[];(L<0||y.length<L)&&(L=null);var R=k(y,E),D=y.substring(0,R);y=y.substring(R),E=E.substring(R),R=x(y,E);var O=y.substring(y.length-R);y=y.substring(0,y.length-R),E=E.substring(0,E.length-R);var S=d(y,E);return D&&S.unshift([u,D]),O&&S.push([u,O]),w(S),L!=null&&(S=C(S,L)),S=g(S),S}function d(y,E){var L;if(!y)return[[l,E]];if(!E)return[[a,y]];var R=y.length>E.length?y:E,D=y.length>E.length?E:y,O=R.indexOf(D);if(O!=-1)return L=[[l,R.substring(0,O)],[u,D],[l,R.substring(O+D.length)]],y.length>E.length&&(L[0][0]=L[2][0]=a),L;if(D.length==1)return[[a,y],[l,E]];var S=v(y,E);if(S){var T=S[0],M=S[1],A=S[2],z=S[3],U=S[4],Z=c(T,A),X=c(M,z);return Z.concat([[u,U]],X)}return m(y,E)}function m(y,E){for(var L=y.length,R=E.length,D=Math.ceil((L+R)/2),O=D,S=2*D,T=new Array(S),M=new Array(S),A=0;A<S;A++)T[A]=-1,M[A]=-1;T[O+1]=0,M[O+1]=0;for(var z=L-R,U=z%2!=0,Z=0,X=0,J=0,B=0,N=0;N<D;N++){for(var F=-N+Z;F<=N-X;F+=2){var H=O+F,Y;F==-N||F!=N&&T[H-1]<T[H+1]?Y=T[H+1]:Y=T[H-1]+1;for(var ee=Y-F;Y<L&&ee<R&&y.charAt(Y)==E.charAt(ee);)Y++,ee++;if(T[H]=Y,Y>L)X+=2;else if(ee>R)Z+=2;else if(U){var V=O+z-F;if(V>=0&&V<S&&M[V]!=-1){var K=L-M[V];if(Y>=K)return _(y,E,Y,ee)}}}for(var $=-N+J;$<=N-B;$+=2){var V=O+$,K;$==-N||$!=N&&M[V-1]<M[V+1]?K=M[V+1]:K=M[V-1]+1;for(var ne=K-$;K<L&&ne<R&&y.charAt(L-K-1)==E.charAt(R-ne-1);)K++,ne++;if(M[V]=K,K>L)B+=2;else if(ne>R)J+=2;else if(!U){var H=O+z-$;if(H>=0&&H<S&&T[H]!=-1){var Y=T[H],ee=O+Y-H;if(K=L-K,Y>=K)return _(y,E,Y,ee)}}}}return[[a,y],[l,E]]}function _(y,E,L,R){var D=y.substring(0,L),O=E.substring(0,R),S=y.substring(L),T=E.substring(R),M=c(D,O),A=c(S,T);return M.concat(A)}function k(y,E){if(!y||!E||y.charAt(0)!=E.charAt(0))return 0;for(var L=0,R=Math.min(y.length,E.length),D=R,O=0;L<D;)y.substring(O,D)==E.substring(O,D)?(L=D,O=L):R=D,D=Math.floor((R-L)/2+L);return D}function x(y,E){if(!y||!E||y.charAt(y.length-1)!=E.charAt(E.length-1))return 0;for(var L=0,R=Math.min(y.length,E.length),D=R,O=0;L<D;)y.substring(y.length-D,y.length-O)==E.substring(E.length-D,E.length-O)?(L=D,O=L):R=D,D=Math.floor((R-L)/2+L);return D}function v(y,E){var L=y.length>E.length?y:E,R=y.length>E.length?E:y;if(L.length<4||R.length*2<L.length)return null;function D(X,J,B){for(var N=X.substring(B,B+Math.floor(X.length/4)),F=-1,H="",Y,ee,V,K;(F=J.indexOf(N,F+1))!=-1;){var $=k(X.substring(B),J.substring(F)),ne=x(X.substring(0,B),J.substring(0,F));H.length<ne+$&&(H=J.substring(F-ne,F)+J.substring(F,F+$),Y=X.substring(0,B-ne),ee=X.substring(B+$),V=J.substring(0,F-ne),K=J.substring(F+$))}return H.length*2>=X.length?[Y,ee,V,K,H]:null}var O=D(L,R,Math.ceil(L.length/4)),S=D(L,R,Math.ceil(L.length/2)),T;if(!O&&!S)return null;S?O?T=O[4].length>S[4].length?O:S:T=S:T=O;var M,A,z,U;y.length>E.length?(M=T[0],A=T[1],z=T[2],U=T[3]):(z=T[0],U=T[1],M=T[2],A=T[3]);var Z=T[4];return[M,A,z,U,Z]}function w(y){y.push([u,""]);for(var E=0,L=0,R=0,D="",O="",S;E<y.length;)switch(y[E][0]){case l:R++,O+=y[E][1],E++;break;case a:L++,D+=y[E][1],E++;break;case u:L+R>1?(L!==0&&R!==0&&(S=k(O,D),S!==0&&(E-L-R>0&&y[E-L-R-1][0]==u?y[E-L-R-1][1]+=O.substring(0,S):(y.splice(0,0,[u,O.substring(0,S)]),E++),O=O.substring(S),D=D.substring(S)),S=x(O,D),S!==0&&(y[E][1]=O.substring(O.length-S)+y[E][1],O=O.substring(0,O.length-S),D=D.substring(0,D.length-S))),L===0?y.splice(E-R,L+R,[l,O]):R===0?y.splice(E-L,L+R,[a,D]):y.splice(E-L-R,L+R,[a,D],[l,O]),E=E-L-R+(L?1:0)+(R?1:0)+1):E!==0&&y[E-1][0]==u?(y[E-1][1]+=y[E][1],y.splice(E,1)):E++,R=0,L=0,D="",O="";break}y[y.length-1][1]===""&&y.pop();var T=!1;for(E=1;E<y.length-1;)y[E-1][0]==u&&y[E+1][0]==u&&(y[E][1].substring(y[E][1].length-y[E-1][1].length)==y[E-1][1]?(y[E][1]=y[E-1][1]+y[E][1].substring(0,y[E][1].length-y[E-1][1].length),y[E+1][1]=y[E-1][1]+y[E+1][1],y.splice(E-1,1),T=!0):y[E][1].substring(0,y[E+1][1].length)==y[E+1][1]&&(y[E-1][1]+=y[E+1][1],y[E][1]=y[E][1].substring(y[E+1][1].length)+y[E+1][1],y.splice(E+1,1),T=!0)),E++;T&&w(y)}var p=c;p.INSERT=l,p.DELETE=a,p.EQUAL=u,t.exports=p;function h(y,E){if(E===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 O=L+D[1].length;if(E===O)return[R+1,y];if(E<O){y=y.slice();var S=E-L,T=[D[0],D[1].slice(0,S)],M=[D[0],D[1].slice(S)];return y.splice(R,1,T,M),[R+1,y]}else L=O}}throw new Error("cursor_pos is out of bounds!")}function C(y,E){var L=h(y,E),R=L[1],D=L[0],O=R[D],S=R[D+1];if(O==null)return y;if(O[0]!==u)return y;if(S!=null&&O[1]+S[1]===S[1]+O[1])return R.splice(D,2,S,O),b(R,D,2);if(S!=null&&S[1].indexOf(O[1])===0){R.splice(D,2,[S[0],O[1]],[0,O[1]]);var T=S[1].slice(O[1].length);return T.length>0&&R.splice(D+2,0,[S[0],T]),b(R,D,3)}else return y}function g(y){for(var E=!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])&&(E=!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(!E)return y;for(var O=[],D=0;D<y.length;D+=1)y[D][1].length>0&&O.push(y[D]);return O}function b(y,E,L){for(var R=E+L-1;R>=0&&R>=E-1;R--)if(R+1<y.length){var D=y[R],O=y[R+1];D[0]===O[1]&&y.splice(R,2,[D[0],D[1]+O[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(m,_,k){this.fn=m,this.context=_,this.once=k||!1}function d(){this._events=new u,this._eventsCount=0}d.prototype.eventNames=function(){var _=[],k,x;if(this._eventsCount===0)return _;for(x in k=this._events)a.call(k,x)&&_.push(l?x.slice(1):x);return Object.getOwnPropertySymbols?_.concat(Object.getOwnPropertySymbols(k)):_},d.prototype.listeners=function(_,k){var x=l?l+_:_,v=this._events[x];if(k)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var w=0,p=v.length,h=new Array(p);w<p;w++)h[w]=v[w].fn;return h},d.prototype.emit=function(_,k,x,v,w,p){var h=l?l+_:_;if(!this._events[h])return!1;var C=this._events[h],g=arguments.length,b,y;if(C.fn){switch(C.once&&this.removeListener(_,C.fn,void 0,!0),g){case 1:return C.fn.call(C.context),!0;case 2:return C.fn.call(C.context,k),!0;case 3:return C.fn.call(C.context,k,x),!0;case 4:return C.fn.call(C.context,k,x,v),!0;case 5:return C.fn.call(C.context,k,x,v,w),!0;case 6:return C.fn.call(C.context,k,x,v,w,p),!0}for(y=1,b=new Array(g-1);y<g;y++)b[y-1]=arguments[y];C.fn.apply(C.context,b)}else{var E=C.length,L;for(y=0;y<E;y++)switch(C[y].once&&this.removeListener(_,C[y].fn,void 0,!0),g){case 1:C[y].fn.call(C[y].context);break;case 2:C[y].fn.call(C[y].context,k);break;case 3:C[y].fn.call(C[y].context,k,x);break;case 4:C[y].fn.call(C[y].context,k,x,v);break;default:if(!b)for(L=1,b=new Array(g-1);L<g;L++)b[L-1]=arguments[L];C[y].fn.apply(C[y].context,b)}}return!0},d.prototype.on=function(_,k,x){var v=new c(k,x||this),w=l?l+_:_;return this._events[w]?this._events[w].fn?this._events[w]=[this._events[w],v]:this._events[w].push(v):(this._events[w]=v,this._eventsCount++),this},d.prototype.once=function(_,k,x){var v=new c(k,x||this,!0),w=l?l+_:_;return this._events[w]?this._events[w].fn?this._events[w]=[this._events[w],v]:this._events[w].push(v):(this._events[w]=v,this._eventsCount++),this},d.prototype.removeListener=function(_,k,x,v){var w=l?l+_:_;if(!this._events[w])return this;if(!k)return--this._eventsCount===0?this._events=new u:delete this._events[w],this;var p=this._events[w];if(p.fn)p.fn===k&&(!v||p.once)&&(!x||p.context===x)&&(--this._eventsCount===0?this._events=new u:delete this._events[w]);else{for(var h=0,C=[],g=p.length;h<g;h++)(p[h].fn!==k||v&&!p[h].once||x&&p[h].context!==x)&&C.push(p[h]);C.length?this._events[w]=C.length===1?C[0]:C:--this._eventsCount===0?this._events=new u:delete this._events[w]}return this},d.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},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prototype.setMaxListeners=function(){return this},d.prefixed=l,d.EventEmitter=d,typeof t<"u"&&(t.exports=d)},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,Ce){var Te=[],se=!0,be=!1,xe=void 0;try{for(var Ie=ge[Symbol.iterator](),at;!(se=(at=Ie.next()).done)&&(Te.push(at.value),!(Ce&&Te.length===Ce));se=!0);}catch(gt){be=!0,xe=gt}finally{try{!se&&Ie.return&&Ie.return()}finally{if(be)throw xe}}return Te}return function(ge,Ce){if(Array.isArray(ge))return ge;if(Symbol.iterator in Object(ge))return fe(ge,Ce);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(){function fe(ge,Ce){for(var Te=0;Te<Ce.length;Te++){var se=Ce[Te];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(ge,se.key,se)}}return function(ge,Ce,Te){return Ce&&fe(ge.prototype,Ce),Te&&fe(ge,Te),ge}}(),d=a(3),m=M(d),_=a(2),k=M(_),x=a(0),v=M(x),w=a(5),p=M(w),h=a(10),C=M(h),g=a(9),b=M(g),y=a(36),E=a(37),L=a(13),R=M(L),D=a(26),O=a(38),S=a(39),T=a(40);function M(fe){return fe&&fe.__esModule?fe:{default:fe}}function A(fe,ge,Ce){return ge in fe?Object.defineProperty(fe,ge,{value:Ce,enumerable:!0,configurable:!0,writable:!0}):fe[ge]=Ce,fe}function z(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 Z(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,C.default)("quill:clipboard"),J="__ql-matcher",B=[[Node.TEXT_NODE,ke],[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,me],["li",de],["b",ne.bind(ne,"bold")],["i",ne.bind(ne,"italic")],["style",ue]],N=[y.AlignAttribute,O.DirectionAttribute].reduce(function(fe,ge){return fe[ge.keyName]=ge,fe},{}),F=[y.AlignStyle,E.BackgroundStyle,D.ColorStyle,O.DirectionStyle,S.FontStyle,T.SizeStyle].reduce(function(fe,ge){return fe[ge.keyName]=ge,fe},{}),H=function(fe){Z(ge,fe);function ge(Ce,Te){z(this,ge);var se=U(this,(ge.__proto__||Object.getPrototypeOf(ge)).call(this,Ce,Te));return se.quill.root.addEventListener("paste",se.onPaste.bind(se)),se.container=se.quill.addContainer("ql-clipboard"),se.container.setAttribute("contenteditable",!0),se.container.setAttribute("tabindex",-1),se.matchers=[],B.concat(se.options.matchers).forEach(function(be){var xe=u(be,2),Ie=xe[0],at=xe[1];!Te.matchVisual&&at===Se||se.addMatcher(Ie,at)}),se}return c(ge,[{key:"addMatcher",value:function(Te,se){this.matchers.push([Te,se])}},{key:"convert",value:function(Te){if(typeof Te=="string")return this.container.innerHTML=Te.replace(/\>\r?\n +\</g,"><"),this.convert();var se=this.quill.getFormat(this.quill.selection.savedRange.index);if(se[R.default.blotName]){var be=this.container.innerText;return this.container.innerHTML="",new k.default().insert(be,A({},R.default.blotName,se[R.default.blotName]))}var xe=this.prepareMatching(),Ie=u(xe,2),at=Ie[0],gt=Ie[1],je=$(this.container,at,gt);return V(je,`
|
|
140
|
-
`)&&je.ops[je.ops.length-1].attributes==null&&(je=je.compose(new k.default().retain(je.length()-1).delete(1))),X.log("convert",this.container.innerHTML,je),this.container.innerHTML="",je}},{key:"dangerouslyPasteHTML",value:function(Te,se){var be=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.default.sources.API;if(typeof Te=="string")this.quill.setContents(this.convert(Te),se),this.quill.setSelection(0,p.default.sources.SILENT);else{var xe=this.convert(se);this.quill.updateContents(new k.default().retain(Te).concat(xe),be),this.quill.setSelection(Te+xe.length(),p.default.sources.SILENT)}}},{key:"onPaste",value:function(Te){var se=this;if(!(Te.defaultPrevented||!this.quill.isEnabled())){var be=this.quill.getSelection(),xe=new k.default().retain(be.index),Ie=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(p.default.sources.SILENT),setTimeout(function(){xe=xe.concat(se.convert()).delete(be.length),se.quill.updateContents(xe,p.default.sources.USER),se.quill.setSelection(xe.length()-be.length,p.default.sources.SILENT),se.quill.scrollingContainer.scrollTop=Ie,se.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Te=this,se=[],be=[];return this.matchers.forEach(function(xe){var Ie=u(xe,2),at=Ie[0],gt=Ie[1];switch(at){case Node.TEXT_NODE:be.push(gt);break;case Node.ELEMENT_NODE:se.push(gt);break;default:[].forEach.call(Te.container.querySelectorAll(at),function(je){je[J]=je[J]||[],je[J].push(gt)});break}}),[se,be]}}]),ge}(b.default);H.DEFAULTS={matchers:[],matchVisual:!0};function Y(fe,ge,Ce){return(typeof ge>"u"?"undefined":l(ge))==="object"?Object.keys(ge).reduce(function(Te,se){return Y(Te,se,ge[se])},fe):fe.reduce(function(Te,se){return se.attributes&&se.attributes[ge]?Te.push(se):Te.insert(se.insert,(0,m.default)({},A({},ge,Ce),se.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 Ce="",Te=fe.ops.length-1;Te>=0&&Ce.length<ge.length;--Te){var se=fe.ops[Te];if(typeof se.insert!="string")break;Ce=se.insert+Ce}return Ce.slice(-1*ge.length)===ge}function K(fe){if(fe.childNodes.length===0)return!1;var ge=ee(fe);return["block","list-item"].indexOf(ge.display)>-1}function $(fe,ge,Ce){return fe.nodeType===fe.TEXT_NODE?Ce.reduce(function(Te,se){return se(fe,Te)},new k.default):fe.nodeType===fe.ELEMENT_NODE?[].reduce.call(fe.childNodes||[],function(Te,se){var be=$(se,ge,Ce);return se.nodeType===fe.ELEMENT_NODE&&(be=ge.reduce(function(xe,Ie){return Ie(se,xe)},be),be=(se[J]||[]).reduce(function(xe,Ie){return Ie(se,xe)},be)),Te.concat(be)},new k.default):new k.default}function ne(fe,ge,Ce){return Y(Ce,fe,!0)}function re(fe,ge){var Ce=v.default.Attributor.Attribute.keys(fe),Te=v.default.Attributor.Class.keys(fe),se=v.default.Attributor.Style.keys(fe),be={};return Ce.concat(Te).concat(se).forEach(function(xe){var Ie=v.default.query(xe,v.default.Scope.ATTRIBUTE);Ie!=null&&(be[Ie.attrName]=Ie.value(fe),be[Ie.attrName])||(Ie=N[xe],Ie!=null&&(Ie.attrName===xe||Ie.keyName===xe)&&(be[Ie.attrName]=Ie.value(fe)||void 0),Ie=F[xe],Ie!=null&&(Ie.attrName===xe||Ie.keyName===xe)&&(Ie=F[xe],be[Ie.attrName]=Ie.value(fe)||void 0))}),Object.keys(be).length>0&&(ge=Y(ge,be)),ge}function ie(fe,ge){var Ce=v.default.query(fe);if(Ce==null)return ge;if(Ce.prototype instanceof v.default.Embed){var Te={},se=Ce.value(fe);se!=null&&(Te[Ce.blotName]=se,ge=new k.default().insert(Te,Ce.formats(fe)))}else typeof Ce.formats=="function"&&(ge=Y(ge,Ce.blotName,Ce.formats(fe)));return ge}function ae(fe,ge){return V(ge,`
|
|
141
|
-
`)||ge.insert(`
|
|
142
|
-
`),ge}function ue(){return new k.default}function de(fe,ge){var Ce=v.default.query(fe);if(Ce==null||Ce.blotName!=="list-item"||!V(ge,`
|
|
143
|
-
`))return ge;for(var Te=-1,se=fe.parentNode;!se.classList.contains("ql-clipboard");)(v.default.query(se)||{}).blotName==="list"&&(Te+=1),se=se.parentNode;return Te<=0?ge:ge.compose(new k.default().retain(ge.length()-1).retain(1,{indent:Te}))}function he(fe,ge){return V(ge,`
|
|
144
|
-
`)||(K(fe)||ge.length()>0&&fe.nextSibling&&K(fe.nextSibling))&&ge.insert(`
|
|
145
|
-
`),ge}function Se(fe,ge){if(K(fe)&&fe.nextElementSibling!=null&&!V(ge,`
|
|
146
|
-
|
|
147
|
-
`)){var Ce=fe.offsetHeight+parseFloat(ee(fe).marginTop)+parseFloat(ee(fe).marginBottom);fe.nextElementSibling.offsetTop>fe.offsetTop+Ce*1.5&&ge.insert(`
|
|
148
|
-
`)}return ge}function me(fe,ge){var Ce={},Te=fe.style||{};return Te.fontStyle&&ee(fe).fontStyle==="italic"&&(Ce.italic=!0),Te.fontWeight&&(ee(fe).fontWeight.startsWith("bold")||parseInt(ee(fe).fontWeight)>=700)&&(Ce.bold=!0),Object.keys(Ce).length>0&&(ge=Y(ge,Ce)),parseFloat(Te.textIndent||0)>0&&(ge=new k.default().insert(" ").concat(ge)),ge}function ke(fe,ge){var Ce=fe.data;if(fe.parentNode.tagName==="O:P")return ge.insert(Ce.trim());if(Ce.trim().length===0&&fe.parentNode.classList.contains("ql-clipboard"))return ge;if(!ee(fe.parentNode).whiteSpace.startsWith("pre")){var Te=function(be,xe){return xe=xe.replace(/[^\u00a0]/g,""),xe.length<1&&be?" ":xe};Ce=Ce.replace(/\r\n/g," ").replace(/\n/g," "),Ce=Ce.replace(/\s\s+/g,Te.bind(Te,!0)),(fe.previousSibling==null&&K(fe.parentNode)||fe.previousSibling!=null&&K(fe.previousSibling))&&(Ce=Ce.replace(/^\s+/,Te.bind(Te,!1))),(fe.nextSibling==null&&K(fe.parentNode)||fe.nextSibling!=null&&K(fe.nextSibling))&&(Ce=Ce.replace(/\s+$/,Te.bind(Te,!1)))}return ge.insert(Ce)}n.default=H,n.matchAttributor=re,n.matchBlot=ie,n.matchNewline=he,n.matchSpacing=Se,n.matchText=ke},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function w(p,h){for(var C=0;C<h.length;C++){var g=h[C];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}return function(p,h,C){return h&&w(p.prototype,h),C&&w(p,C),p}}(),u=function w(p,h,C){p===null&&(p=Function.prototype);var g=Object.getOwnPropertyDescriptor(p,h);if(g===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:w(b,h,C)}else{if("value"in g)return g.value;var y=g.get;return y===void 0?void 0:y.call(C)}},c=a(6),d=m(c);function m(w){return w&&w.__esModule?w:{default:w}}function _(w,p){if(!(w instanceof p))throw new TypeError("Cannot call a class as a function")}function k(w,p){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:w}function x(w,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);w.prototype=Object.create(p&&p.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(w,p):w.__proto__=p)}var v=function(w){x(p,w);function p(){return _(this,p),k(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return l(p,[{key:"optimize",value:function(C){u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"optimize",this).call(this,C),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return u(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),p}(d.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 T(M,A){var z=[],U=!0,Z=!1,X=void 0;try{for(var J=M[Symbol.iterator](),B;!(U=(B=J.next()).done)&&(z.push(B.value),!(A&&z.length===A));U=!0);}catch(N){Z=!0,X=N}finally{try{!U&&J.return&&J.return()}finally{if(Z)throw X}}return z}return function(M,A){if(Array.isArray(M))return M;if(Symbol.iterator in Object(M))return T(M,A);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function T(M,A){for(var z=0;z<A.length;z++){var U=A[z];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(M,U.key,U)}}return function(M,A,z){return A&&T(M.prototype,A),z&&T(M,z),M}}(),c=a(2),d=C(c),m=a(0),_=C(m),k=a(5),x=C(k),v=a(10),w=C(v),p=a(9),h=C(p);function C(T){return T&&T.__esModule?T:{default:T}}function g(T,M,A){return M in T?Object.defineProperty(T,M,{value:A,enumerable:!0,configurable:!0,writable:!0}):T[M]=A,T}function b(T,M){if(!(T instanceof M))throw new TypeError("Cannot call a class as a function")}function y(T,M){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:T}function E(T,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);T.prototype=Object.create(M&&M.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(T,M):T.__proto__=M)}var L=(0,w.default)("quill:toolbar"),R=function(T){E(M,T);function M(A,z){b(this,M);var U=y(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,A,z));if(Array.isArray(U.options.container)){var Z=document.createElement("div");O(Z,U.options.container),A.container.parentNode.insertBefore(Z,A.container),U.container=Z}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(J){U.addHandler(J,U.options.handlers[J])}),[].forEach.call(U.container.querySelectorAll("button, select"),function(J){U.attach(J)}),U.quill.on(x.default.events.EDITOR_CHANGE,function(J,B){J===x.default.events.SELECTION_CHANGE&&U.update(B)}),U.quill.on(x.default.events.SCROLL_OPTIMIZE,function(){var J=U.quill.selection.getRange(),B=l(J,1),N=B[0];U.update(N)}),U}return u(M,[{key:"addHandler",value:function(z,U){this.handlers[z]=U}},{key:"attach",value:function(z){var U=this,Z=[].find.call(z.classList,function(J){return J.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),z.tagName==="BUTTON"&&z.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){L.warn("ignoring attaching to disabled format",Z,z);return}if(_.default.query(Z)==null){L.warn("ignoring attaching to nonexistent format",Z,z);return}}var X=z.tagName==="SELECT"?"change":"click";z.addEventListener(X,function(J){var B=void 0;if(z.tagName==="SELECT"){if(z.selectedIndex<0)return;var N=z.options[z.selectedIndex];N.hasAttribute("selected")?B=!1:B=N.value||!1}else z.classList.contains("ql-active")?B=!1:B=z.value||!z.hasAttribute("value"),J.preventDefault();U.quill.focus();var F=U.quill.selection.getRange(),H=l(F,1),Y=H[0];if(U.handlers[Z]!=null)U.handlers[Z].call(U,B);else if(_.default.query(Z).prototype instanceof _.default.Embed){if(B=prompt("Enter "+Z),!B)return;U.quill.updateContents(new d.default().retain(Y.index).delete(Y.length).insert(g({},Z,B)),x.default.sources.USER)}else U.quill.format(Z,B,x.default.sources.USER);U.update(Y)}),this.controls.push([Z,z])}}},{key:"update",value:function(z){var U=z==null?{}:this.quill.getFormat(z);this.controls.forEach(function(Z){var X=l(Z,2),J=X[0],B=X[1];if(B.tagName==="SELECT"){var N=void 0;if(z==null)N=null;else if(U[J]==null)N=B.querySelector("option[selected]");else if(!Array.isArray(U[J])){var F=U[J];typeof F=="string"&&(F=F.replace(/\"/g,'\\"')),N=B.querySelector('option[value="'+F+'"]')}N==null?(B.value="",B.selectedIndex=-1):N.selected=!0}else if(z==null)B.classList.remove("ql-active");else if(B.hasAttribute("value")){var H=U[J]===B.getAttribute("value")||U[J]!=null&&U[J].toString()===B.getAttribute("value")||U[J]==null&&!B.getAttribute("value");B.classList.toggle("ql-active",H)}else B.classList.toggle("ql-active",U[J]!=null)})}}]),M}(h.default);R.DEFAULTS={};function D(T,M,A){var z=document.createElement("button");z.setAttribute("type","button"),z.classList.add("ql-"+M),A!=null&&(z.value=A),T.appendChild(z)}function O(T,M){Array.isArray(M[0])||(M=[M]),M.forEach(function(A){var z=document.createElement("span");z.classList.add("ql-formats"),A.forEach(function(U){if(typeof U=="string")D(z,U);else{var Z=Object.keys(U)[0],X=U[Z];Array.isArray(X)?S(z,Z,X):D(z,Z,X)}}),T.appendChild(z)})}function S(T,M,A){var z=document.createElement("select");z.classList.add("ql-"+M),A.forEach(function(U){var Z=document.createElement("option");U!==!1?Z.setAttribute("value",U):Z.setAttribute("selected","selected"),z.appendChild(Z)}),T.appendChild(z)}R.DEFAULTS={container:null,handlers:{clean:function(){var M=this,A=this.quill.getSelection();if(A!=null)if(A.length==0){var z=this.quill.getFormat();Object.keys(z).forEach(function(U){_.default.query(U,_.default.Scope.INLINE)!=null&&M.quill.format(U,!1)})}else this.quill.removeFormat(A,x.default.sources.USER)},direction:function(M){var A=this.quill.getFormat().align;M==="rtl"&&A==null?this.quill.format("align","right",x.default.sources.USER):!M&&A==="right"&&this.quill.format("align",!1,x.default.sources.USER),this.quill.format("direction",M,x.default.sources.USER)},indent:function(M){var A=this.quill.getSelection(),z=this.quill.getFormat(A),U=parseInt(z.indent||0);if(M==="+1"||M==="-1"){var Z=M==="+1"?1:-1;z.direction==="rtl"&&(Z*=-1),this.quill.format("indent",U+Z,x.default.sources.USER)}},link:function(M){M===!0&&(M=prompt("Enter link URL:")),this.quill.format("link",M,x.default.sources.USER)},list:function(M){var A=this.quill.getSelection(),z=this.quill.getFormat(A);M==="check"?z.list==="checked"||z.list==="unchecked"?this.quill.format("list",!1,x.default.sources.USER):this.quill.format("list","unchecked",x.default.sources.USER):this.quill.format("list",M,x.default.sources.USER)}}},n.default=R,n.addControls=O},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 w(p,h){for(var C=0;C<h.length;C++){var g=h[C];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}return function(p,h,C){return h&&w(p.prototype,h),C&&w(p,C),p}}(),u=function w(p,h,C){p===null&&(p=Function.prototype);var g=Object.getOwnPropertyDescriptor(p,h);if(g===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:w(b,h,C)}else{if("value"in g)return g.value;var y=g.get;return y===void 0?void 0:y.call(C)}},c=a(28),d=m(c);function m(w){return w&&w.__esModule?w:{default:w}}function _(w,p){if(!(w instanceof p))throw new TypeError("Cannot call a class as a function")}function k(w,p){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:w}function x(w,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);w.prototype=Object.create(p&&p.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(w,p):w.__proto__=p)}var v=function(w){x(p,w);function p(h,C){_(this,p);var g=k(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,h));return g.label.innerHTML=C,g.container.classList.add("ql-color-picker"),[].slice.call(g.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(b){b.classList.add("ql-primary")}),g}return l(p,[{key:"buildItem",value:function(C){var g=u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"buildItem",this).call(this,C);return g.style.backgroundColor=C.getAttribute("value")||"",g}},{key:"selectItem",value:function(C,g){u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"selectItem",this).call(this,C,g);var b=this.label.querySelector(".ql-color-label"),y=C&&C.getAttribute("data-value")||"";b&&(b.tagName==="line"?b.style.stroke=y:b.style.fill=y)}}]),p}(d.default);n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function w(p,h){for(var C=0;C<h.length;C++){var g=h[C];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}return function(p,h,C){return h&&w(p.prototype,h),C&&w(p,C),p}}(),u=function w(p,h,C){p===null&&(p=Function.prototype);var g=Object.getOwnPropertyDescriptor(p,h);if(g===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:w(b,h,C)}else{if("value"in g)return g.value;var y=g.get;return y===void 0?void 0:y.call(C)}},c=a(28),d=m(c);function m(w){return w&&w.__esModule?w:{default:w}}function _(w,p){if(!(w instanceof p))throw new TypeError("Cannot call a class as a function")}function k(w,p){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:w}function x(w,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);w.prototype=Object.create(p&&p.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(w,p):w.__proto__=p)}var v=function(w){x(p,w);function p(h,C){_(this,p);var g=k(this,(p.__proto__||Object.getPrototypeOf(p)).call(this,h));return g.container.classList.add("ql-icon-picker"),[].forEach.call(g.container.querySelectorAll(".ql-picker-item"),function(b){b.innerHTML=C[b.getAttribute("data-value")||""]}),g.defaultItem=g.container.querySelector(".ql-selected"),g.selectItem(g.defaultItem),g}return l(p,[{key:"selectItem",value:function(C,g){u(p.prototype.__proto__||Object.getPrototypeOf(p.prototype),"selectItem",this).call(this,C,g),C=C||this.defaultItem,this.label.innerHTML=C.innerHTML}}]),p}(d.default);n.default=v},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function d(m,_){for(var k=0;k<_.length;k++){var x=_[k];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,_,k){return _&&d(m.prototype,_),k&&d(m,k),m}}();function u(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}var c=function(){function d(m,_){var k=this;u(this,d),this.quill=m,this.boundsContainer=_||document.body,this.root=m.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(d,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(_){var k=_.left+_.width/2-this.root.offsetWidth/2,x=_.bottom+this.quill.root.scrollTop;this.root.style.left=k+"px",this.root.style.top=x+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),w=this.root.getBoundingClientRect(),p=0;if(w.right>v.right&&(p=v.right-w.right,this.root.style.left=k+p+"px"),w.left<v.left&&(p=v.left-w.left,this.root.style.left=k+p+"px"),w.bottom>v.bottom){var h=w.bottom-w.top,C=_.bottom-_.top+h;this.root.style.top=x-C+"px",this.root.classList.add("ql-flip")}return p}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),d}();n.default=c},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function S(T,M){var A=[],z=!0,U=!1,Z=void 0;try{for(var X=T[Symbol.iterator](),J;!(z=(J=X.next()).done)&&(A.push(J.value),!(M&&A.length===M));z=!0);}catch(B){U=!0,Z=B}finally{try{!z&&X.return&&X.return()}finally{if(U)throw Z}}return A}return function(T,M){if(Array.isArray(T))return T;if(Symbol.iterator in Object(T))return S(T,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function S(T,M,A){T===null&&(T=Function.prototype);var z=Object.getOwnPropertyDescriptor(T,M);if(z===void 0){var U=Object.getPrototypeOf(T);return U===null?void 0:S(U,M,A)}else{if("value"in z)return z.value;var Z=z.get;return Z===void 0?void 0:Z.call(A)}},c=function(){function S(T,M){for(var A=0;A<M.length;A++){var z=M[A];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,z.key,z)}}return function(T,M,A){return M&&S(T.prototype,M),A&&S(T,A),T}}(),d=a(3),m=b(d),_=a(8),k=b(_),x=a(43),v=b(x),w=a(27),p=b(w),h=a(15),C=a(41),g=b(C);function b(S){return S&&S.__esModule?S:{default:S}}function y(S,T){if(!(S instanceof T))throw new TypeError("Cannot call a class as a function")}function E(S,T){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:S}function L(S,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);S.prototype=Object.create(T&&T.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(S,T):S.__proto__=T)}var R=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],D=function(S){L(T,S);function T(M,A){y(this,T),A.modules.toolbar!=null&&A.modules.toolbar.container==null&&(A.modules.toolbar.container=R);var z=E(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,M,A));return z.quill.container.classList.add("ql-snow"),z}return c(T,[{key:"extendToolbar",value:function(A){A.container.classList.add("ql-snow"),this.buildButtons([].slice.call(A.container.querySelectorAll("button")),g.default),this.buildPickers([].slice.call(A.container.querySelectorAll("select")),g.default),this.tooltip=new O(this.quill,this.options.bounds),A.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(z,U){A.handlers.link.call(A,!U.format.link)})}}]),T}(v.default);D.DEFAULTS=(0,m.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(T){if(T){var M=this.quill.getSelection();if(M==null||M.length==0)return;var A=this.quill.getText(M);/^\S+@\S+\.\S+$/.test(A)&&A.indexOf("mailto:")!==0&&(A="mailto:"+A);var z=this.quill.theme.tooltip;z.edit("link",A)}else this.quill.format("link",!1)}}}}});var O=function(S){L(T,S);function T(M,A){y(this,T);var z=E(this,(T.__proto__||Object.getPrototypeOf(T)).call(this,M,A));return z.preview=z.root.querySelector("a.ql-preview"),z}return c(T,[{key:"listen",value:function(){var A=this;u(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(z){A.root.classList.contains("ql-editing")?A.save():A.edit("link",A.preview.textContent),z.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(z){if(A.linkRange!=null){var U=A.linkRange;A.restoreFocus(),A.quill.formatText(U,"link",!1,k.default.sources.USER),delete A.linkRange}z.preventDefault(),A.hide()}),this.quill.on(k.default.events.SELECTION_CHANGE,function(z,U,Z){if(z!=null){if(z.length===0&&Z===k.default.sources.USER){var X=A.quill.scroll.descendant(p.default,z.index),J=l(X,2),B=J[0],N=J[1];if(B!=null){A.linkRange=new h.Range(z.index-N,B.length());var F=p.default.formats(B.domNode);A.preview.textContent=F,A.preview.setAttribute("href",F),A.show(),A.position(A.quill.getBounds(A.linkRange));return}}else delete A.linkRange;A.hide()}})}},{key:"show",value:function(){u(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),T}(x.BaseTooltip);O.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=se(l),c=a(36),d=a(38),m=a(64),_=a(65),k=se(_),x=a(66),v=se(x),w=a(67),p=se(w),h=a(37),C=a(26),g=a(39),b=a(40),y=a(56),E=se(y),L=a(68),R=se(L),D=a(27),O=se(D),S=a(69),T=se(S),M=a(70),A=se(M),z=a(71),U=se(z),Z=a(72),X=se(Z),J=a(73),B=se(J),N=a(13),F=se(N),H=a(74),Y=se(H),ee=a(75),V=se(ee),K=a(57),$=se(K),ne=a(41),re=se(ne),ie=a(28),ae=se(ie),ue=a(59),de=se(ue),he=a(60),Se=se(he),me=a(61),ke=se(me),fe=a(108),ge=se(fe),Ce=a(62),Te=se(Ce);function se(be){return be&&be.__esModule?be:{default:be}}u.default.register({"attributors/attribute/direction":d.DirectionAttribute,"attributors/class/align":c.AlignClass,"attributors/class/background":h.BackgroundClass,"attributors/class/color":C.ColorClass,"attributors/class/direction":d.DirectionClass,"attributors/class/font":g.FontClass,"attributors/class/size":b.SizeClass,"attributors/style/align":c.AlignStyle,"attributors/style/background":h.BackgroundStyle,"attributors/style/color":C.ColorStyle,"attributors/style/direction":d.DirectionStyle,"attributors/style/font":g.FontStyle,"attributors/style/size":b.SizeStyle},!0),u.default.register({"formats/align":c.AlignClass,"formats/direction":d.DirectionClass,"formats/indent":m.IndentClass,"formats/background":h.BackgroundStyle,"formats/color":C.ColorStyle,"formats/font":g.FontClass,"formats/size":b.SizeClass,"formats/blockquote":k.default,"formats/code-block":F.default,"formats/header":v.default,"formats/list":p.default,"formats/bold":E.default,"formats/code":N.Code,"formats/italic":R.default,"formats/link":O.default,"formats/script":T.default,"formats/strike":A.default,"formats/underline":U.default,"formats/image":X.default,"formats/video":B.default,"formats/list/item":w.ListItem,"modules/formula":Y.default,"modules/syntax":V.default,"modules/toolbar":$.default,"themes/bubble":ge.default,"themes/snow":Te.default,"ui/icons":re.default,"ui/picker":ae.default,"ui/icon-picker":Se.default,"ui/color-picker":de.default,"ui/tooltip":ke.default},!0),n.default=u.default},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var l=function(){function p(h,C){for(var g=0;g<C.length;g++){var b=C[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(h,b.key,b)}}return function(h,C,g){return C&&p(h.prototype,C),g&&p(h,g),h}}(),u=function p(h,C,g){h===null&&(h=Function.prototype);var b=Object.getOwnPropertyDescriptor(h,C);if(b===void 0){var y=Object.getPrototypeOf(h);return y===null?void 0:p(y,C,g)}else{if("value"in b)return b.value;var E=b.get;return E===void 0?void 0:E.call(g)}},c=a(0),d=m(c);function m(p){return p&&p.__esModule?p:{default:p}}function _(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function k(p,h){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:p}function x(p,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);p.prototype=Object.create(h&&h.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(p,h):p.__proto__=h)}var v=function(p){x(h,p);function h(){return _(this,h),k(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}return l(h,[{key:"add",value:function(g,b){if(b==="+1"||b==="-1"){var y=this.value(g)||0;b=b==="+1"?y+1:y-1}return b===0?(this.remove(g),!0):u(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"add",this).call(this,g,b)}},{key:"canAdd",value:function(g,b){return u(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"canAdd",this).call(this,g,b)||u(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"canAdd",this).call(this,g,parseInt(b))}},{key:"value",value:function(g){return parseInt(u(h.prototype.__proto__||Object.getPrototypeOf(h.prototype),"value",this).call(this,g))||void 0}}]),h}(d.default.Attributor.Class),w=new v("indent","ql-indent",{scope:d.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=w},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(4),u=c(l);function c(x){return x&&x.__esModule?x:{default:x}}function d(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function m(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function _(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var k=function(x){_(v,x);function v(){return d(this,v),m(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(w,p){for(var h=0;h<p.length;h++){var C=p[h];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(w,C.key,C)}}return function(w,p,h){return p&&v(w.prototype,p),h&&v(w,h),w}}(),u=a(4),c=d(u);function d(v){return v&&v.__esModule?v:{default:v}}function m(v,w){if(!(v instanceof w))throw new TypeError("Cannot call a class as a function")}function _(v,w){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:v}function k(v,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);v.prototype=Object.create(w&&w.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(v,w):v.__proto__=w)}var x=function(v){k(w,v);function w(){return m(this,w),_(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return l(w,null,[{key:"formats",value:function(h){return this.tagName.indexOf(h.tagName)+1}}]),w}(c.default);x.blotName="header",x.tagName=["H1","H2","H3","H4","H5","H6"],n.default=x},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var l=function(){function y(E,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(E,D.key,D)}}return function(E,L,R){return L&&y(E.prototype,L),R&&y(E,R),E}}(),u=function y(E,L,R){E===null&&(E=Function.prototype);var D=Object.getOwnPropertyDescriptor(E,L);if(D===void 0){var O=Object.getPrototypeOf(E);return O===null?void 0:y(O,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),d=v(c),m=a(4),_=v(m),k=a(25),x=v(k);function v(y){return y&&y.__esModule?y:{default:y}}function w(y,E,L){return E in y?Object.defineProperty(y,E,{value:L,enumerable:!0,configurable:!0,writable:!0}):y[E]=L,y}function p(y,E){if(!(y instanceof E))throw new TypeError("Cannot call a class as a function")}function h(y,E){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:y}function C(y,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);y.prototype=Object.create(E&&E.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(y,E):y.__proto__=E)}var g=function(y){C(E,y);function E(){return p(this,E),h(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return l(E,[{key:"format",value:function(R,D){R===b.blotName&&!D?this.replaceWith(d.default.create(this.statics.scope)):u(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,R,D)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():u(E.prototype.__proto__||Object.getPrototypeOf(E.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(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replaceWith",this).call(this,R,D))}}],[{key:"formats",value:function(R){return R.tagName===this.tagName?void 0:u(E.__proto__||Object.getPrototypeOf(E),"formats",this).call(this,R)}}]),E}(_.default);g.blotName="list-item",g.tagName="LI";var b=function(y){C(E,y),l(E,null,[{key:"create",value:function(R){var D=R==="ordered"?"OL":"UL",O=u(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,D);return(R==="checked"||R==="unchecked")&&O.setAttribute("data-checked",R==="checked"),O}},{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 E(L){p(this,E);var R=h(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,L)),D=function(S){if(S.target.parentNode===L){var T=R.statics.formats(L),M=d.default.find(S.target);T==="checked"?M.format("list","unchecked"):T==="unchecked"&&M.format("list","checked")}};return L.addEventListener("touchstart",D),L.addEventListener("mousedown",D),R}return l(E,[{key:"format",value:function(R,D){this.children.length>0&&this.children.tail.format(R,D)}},{key:"formats",value:function(){return w({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(R,D){if(R instanceof g)u(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,R,D);else{var O=D==null?this.length():D.offset(this),S=this.split(O);S.parent.insertBefore(R,S)}}},{key:"optimize",value:function(R){u(E.prototype.__proto__||Object.getPrototypeOf(E.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=d.default.create(this.statics.defaultChild);R.moveChildren(D),this.appendChild(D)}u(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replace",this).call(this,R)}}]),E}(x.default);b.blotName="list",b.scope=d.default.Scope.BLOCK_BLOT,b.tagName=["OL","UL"],b.defaultChild="list-item",b.allowedChildren=[g],n.ListItem=g,n.default=b},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=a(56),u=c(l);function c(x){return x&&x.__esModule?x:{default:x}}function d(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function m(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function _(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var k=function(x){_(v,x);function v(){return d(this,v),m(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 w(p,h){for(var C=0;C<h.length;C++){var g=h[C];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}return function(p,h,C){return h&&w(p.prototype,h),C&&w(p,C),p}}(),u=function w(p,h,C){p===null&&(p=Function.prototype);var g=Object.getOwnPropertyDescriptor(p,h);if(g===void 0){var b=Object.getPrototypeOf(p);return b===null?void 0:w(b,h,C)}else{if("value"in g)return g.value;var y=g.get;return y===void 0?void 0:y.call(C)}},c=a(6),d=m(c);function m(w){return w&&w.__esModule?w:{default:w}}function _(w,p){if(!(w instanceof p))throw new TypeError("Cannot call a class as a function")}function k(w,p){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return p&&(typeof p=="object"||typeof p=="function")?p:w}function x(w,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof p);w.prototype=Object.create(p&&p.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),p&&(Object.setPrototypeOf?Object.setPrototypeOf(w,p):w.__proto__=p)}var v=function(w){x(p,w);function p(){return _(this,p),k(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}return l(p,null,[{key:"create",value:function(C){return C==="super"?document.createElement("sup"):C==="sub"?document.createElement("sub"):u(p.__proto__||Object.getPrototypeOf(p),"create",this).call(this,C)}},{key:"formats",value:function(C){if(C.tagName==="SUB")return"sub";if(C.tagName==="SUP")return"super"}}]),p}(d.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(x){return x&&x.__esModule?x:{default:x}}function d(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function m(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function _(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var k=function(x){_(v,x);function v(){return d(this,v),m(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(x){return x&&x.__esModule?x:{default:x}}function d(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function m(x,v){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:x}function _(x,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);x.prototype=Object.create(v&&v.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(x,v):x.__proto__=v)}var k=function(x){_(v,x);function v(){return d(this,v),m(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 h(C,g){for(var b=0;b<g.length;b++){var y=g[b];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(C,y.key,y)}}return function(C,g,b){return g&&h(C.prototype,g),b&&h(C,b),C}}(),u=function h(C,g,b){C===null&&(C=Function.prototype);var y=Object.getOwnPropertyDescriptor(C,g);if(y===void 0){var E=Object.getPrototypeOf(C);return E===null?void 0:h(E,g,b)}else{if("value"in y)return y.value;var L=y.get;return L===void 0?void 0:L.call(b)}},c=a(0),d=_(c),m=a(27);function _(h){return h&&h.__esModule?h:{default:h}}function k(h,C){if(!(h instanceof C))throw new TypeError("Cannot call a class as a function")}function x(h,C){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:h}function v(h,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);h.prototype=Object.create(C&&C.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(h,C):h.__proto__=C)}var w=["alt","height","width"],p=function(h){v(C,h);function C(){return k(this,C),x(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return l(C,[{key:"format",value:function(b,y){w.indexOf(b)>-1?y?this.domNode.setAttribute(b,y):this.domNode.removeAttribute(b):u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"format",this).call(this,b,y)}}],[{key:"create",value:function(b){var y=u(C.__proto__||Object.getPrototypeOf(C),"create",this).call(this,b);return typeof b=="string"&&y.setAttribute("src",this.sanitize(b)),y}},{key:"formats",value:function(b){return w.reduce(function(y,E){return b.hasAttribute(E)&&(y[E]=b.getAttribute(E)),y},{})}},{key:"match",value:function(b){return/\.(jpe?g|gif|png)$/.test(b)||/^data:image\/.+;base64/.test(b)}},{key:"sanitize",value:function(b){return(0,m.sanitize)(b,["http","https","data"])?b:"//:0"}},{key:"value",value:function(b){return b.getAttribute("src")}}]),C}(d.default.Embed);p.blotName="image",p.tagName="IMG",n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0});var l=function(){function h(C,g){for(var b=0;b<g.length;b++){var y=g[b];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(C,y.key,y)}}return function(C,g,b){return g&&h(C.prototype,g),b&&h(C,b),C}}(),u=function h(C,g,b){C===null&&(C=Function.prototype);var y=Object.getOwnPropertyDescriptor(C,g);if(y===void 0){var E=Object.getPrototypeOf(C);return E===null?void 0:h(E,g,b)}else{if("value"in y)return y.value;var L=y.get;return L===void 0?void 0:L.call(b)}},c=a(4),d=a(27),m=_(d);function _(h){return h&&h.__esModule?h:{default:h}}function k(h,C){if(!(h instanceof C))throw new TypeError("Cannot call a class as a function")}function x(h,C){if(!h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:h}function v(h,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);h.prototype=Object.create(C&&C.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(h,C):h.__proto__=C)}var w=["height","width"],p=function(h){v(C,h);function C(){return k(this,C),x(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return l(C,[{key:"format",value:function(b,y){w.indexOf(b)>-1?y?this.domNode.setAttribute(b,y):this.domNode.removeAttribute(b):u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"format",this).call(this,b,y)}}],[{key:"create",value:function(b){var y=u(C.__proto__||Object.getPrototypeOf(C),"create",this).call(this,b);return y.setAttribute("frameborder","0"),y.setAttribute("allowfullscreen",!0),y.setAttribute("src",this.sanitize(b)),y}},{key:"formats",value:function(b){return w.reduce(function(y,E){return b.hasAttribute(E)&&(y[E]=b.getAttribute(E)),y},{})}},{key:"sanitize",value:function(b){return m.default.sanitize(b)}},{key:"value",value:function(b){return b.getAttribute("src")}}]),C}(c.BlockEmbed);p.blotName="video",p.className="ql-video",p.tagName="IFRAME",n.default=p},function(t,n,a){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var l=function(){function b(y,E){for(var L=0;L<E.length;L++){var R=E[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(y,R.key,R)}}return function(y,E,L){return E&&b(y.prototype,E),L&&b(y,L),y}}(),u=function b(y,E,L){y===null&&(y=Function.prototype);var R=Object.getOwnPropertyDescriptor(y,E);if(R===void 0){var D=Object.getPrototypeOf(y);return D===null?void 0:b(D,E,L)}else{if("value"in R)return R.value;var O=R.get;return O===void 0?void 0:O.call(L)}},c=a(35),d=v(c),m=a(5),_=v(m),k=a(9),x=v(k);function v(b){return b&&b.__esModule?b:{default:b}}function w(b,y){if(!(b instanceof y))throw new TypeError("Cannot call a class as a function")}function p(b,y){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:b}function h(b,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);b.prototype=Object.create(y&&y.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(b,y):b.__proto__=y)}var C=function(b){h(y,b);function y(){return w(this,y),p(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}(d.default);C.blotName="formula",C.className="ql-formula",C.tagName="SPAN";var g=function(b){h(y,b),l(y,null,[{key:"register",value:function(){_.default.register(C,!0)}}]);function y(){w(this,y);var E=p(this,(y.__proto__||Object.getPrototypeOf(y)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return E}return y}(x.default);n.FormulaBlot=C,n.default=g},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 O=0;O<D.length;O++){var S=D[O];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(R,S.key,S)}}return function(R,D,O){return D&&L(R.prototype,D),O&&L(R,O),R}}(),u=function L(R,D,O){R===null&&(R=Function.prototype);var S=Object.getOwnPropertyDescriptor(R,D);if(S===void 0){var T=Object.getPrototypeOf(R);return T===null?void 0:L(T,D,O)}else{if("value"in S)return S.value;var M=S.get;return M===void 0?void 0:M.call(O)}},c=a(0),d=p(c),m=a(5),_=p(m),k=a(9),x=p(k),v=a(13),w=p(v);function p(L){return L&&L.__esModule?L:{default:L}}function h(L,R){if(!(L instanceof R))throw new TypeError("Cannot call a class as a function")}function C(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 g(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 b=function(L){g(R,L);function R(){return h(this,R),C(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return l(R,[{key:"replaceWith",value:function(O){this.domNode.textContent=this.domNode.textContent,this.attach(),u(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"replaceWith",this).call(this,O)}},{key:"highlight",value:function(O){var S=this.domNode.textContent;this.cachedText!==S&&((S.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=O(S),this.domNode.normalize(),this.attach()),this.cachedText=S)}}]),R}(w.default);b.className="ql-syntax";var y=new d.default.Attributor.Class("token","hljs",{scope:d.default.Scope.INLINE}),E=function(L){g(R,L),l(R,null,[{key:"register",value:function(){_.default.register(y,!0),_.default.register(b,!0)}}]);function R(D,O){h(this,R);var S=C(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,D,O));if(typeof S.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var T=null;return S.quill.on(_.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(T),T=setTimeout(function(){S.highlight(),T=null},S.options.interval)}),S.highlight(),S}return l(R,[{key:"highlight",value:function(){var O=this;if(!this.quill.selection.composing){this.quill.update(_.default.sources.USER);var S=this.quill.getSelection();this.quill.scroll.descendants(b).forEach(function(T){T.highlight(O.options.highlight)}),this.quill.update(_.default.sources.SILENT),S!=null&&this.quill.setSelection(S,_.default.sources.SILENT)}}}]),R}(x.default);E.DEFAULTS={highlight:function(){return window.hljs==null?null:function(L){var R=window.hljs.highlightAuto(L);return R.value}}(),interval:1e3},n.CodeBlock=b,n.CodeToken=y,n.default=E},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,O,S){D===null&&(D=Function.prototype);var T=Object.getOwnPropertyDescriptor(D,O);if(T===void 0){var M=Object.getPrototypeOf(D);return M===null?void 0:R(M,O,S)}else{if("value"in T)return T.value;var A=T.get;return A===void 0?void 0:A.call(S)}},u=function(){function R(D,O){for(var S=0;S<O.length;S++){var T=O[S];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(D,T.key,T)}}return function(D,O,S){return O&&R(D.prototype,O),S&&R(D,S),D}}(),c=a(3),d=h(c),m=a(8),_=h(m),k=a(43),x=h(k),v=a(15),w=a(41),p=h(w);function h(R){return R&&R.__esModule?R:{default:R}}function C(R,D){if(!(R instanceof D))throw new TypeError("Cannot call a class as a function")}function g(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 b(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"]],E=function(R){b(D,R);function D(O,S){C(this,D),S.modules.toolbar!=null&&S.modules.toolbar.container==null&&(S.modules.toolbar.container=y);var T=g(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,O,S));return T.quill.container.classList.add("ql-bubble"),T}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")),p.default),this.buildPickers([].slice.call(S.container.querySelectorAll("select")),p.default)}}]),D}(x.default);E.DEFAULTS=(0,d.default)(!0,{},x.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(D){D?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var L=function(R){b(D,R);function D(O,S){C(this,D);var T=g(this,(D.__proto__||Object.getPrototypeOf(D)).call(this,O,S));return T.quill.on(_.default.events.EDITOR_CHANGE,function(M,A,z,U){if(M===_.default.events.SELECTION_CHANGE)if(A!=null&&A.length>0&&U===_.default.sources.USER){T.show(),T.root.style.left="0px",T.root.style.width="",T.root.style.width=T.root.offsetWidth+"px";var Z=T.quill.getLines(A.index,A.length);if(Z.length===1)T.position(T.quill.getBounds(A));else{var X=Z[Z.length-1],J=T.quill.getIndex(X),B=Math.min(X.length()-1,A.index+A.length-J),N=T.quill.getBounds(new v.Range(J,B));T.position(N)}}else document.activeElement!==T.textbox&&T.quill.hasFocus()&&T.hide()}),T}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 T=S.quill.getSelection();T!=null&&S.position(S.quill.getBounds(T))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(S){var T=l(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"position",this).call(this,S),M=this.root.querySelector(".ql-tooltip-arrow");if(M.style.marginLeft="",T===0)return T;M.style.marginLeft=-1*T-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=E},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 PO=md.exports,B2;function CO(){return B2||(B2=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,d=36,m=1,_=26,k=38,x=700,v=72,w=128,p="-",h=/^xn--/,C=/[^\x20-\x7E]/,g=/[\x2E\u3002\uFF0E\uFF61]/g,b={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=d-m,E=Math.floor,L=String.fromCharCode,R;function D(N){throw new RangeError(b[N])}function O(N,F){for(var H=N.length,Y=[];H--;)Y[H]=F(N[H]);return Y}function S(N,F){var H=N.split("@"),Y="";H.length>1&&(Y=H[0]+"@",N=H[1]),N=N.replace(g,".");var ee=N.split("."),V=O(ee,F).join(".");return Y+V}function T(N){for(var F=[],H=0,Y=N.length,ee,V;H<Y;)ee=N.charCodeAt(H++),ee>=55296&&ee<=56319&&H<Y?(V=N.charCodeAt(H++),(V&64512)==56320?F.push(((ee&1023)<<10)+(V&1023)+65536):(F.push(ee),H--)):F.push(ee);return F}function M(N){return O(N,function(F){var H="";return F>65535&&(F-=65536,H+=L(F>>>10&1023|55296),F=56320|F&1023),H+=L(F),H}).join("")}function A(N){return N-48<10?N-22:N-65<26?N-65:N-97<26?N-97:d}function z(N,F){return N+22+75*(N<26)-((F!=0)<<5)}function U(N,F,H){var Y=0;for(N=H?E(N/x):N>>1,N+=E(N/F);N>y*_>>1;Y+=d)N=E(N/y);return E(Y+(y+1)*N/(N+k))}function Z(N){var F=[],H=N.length,Y,ee=0,V=w,K=v,$,ne,re,ie,ae,ue,de,he,Se;for($=N.lastIndexOf(p),$<0&&($=0),ne=0;ne<$;++ne)N.charCodeAt(ne)>=128&&D("not-basic"),F.push(N.charCodeAt(ne));for(re=$>0?$+1:0;re<H;){for(ie=ee,ae=1,ue=d;re>=H&&D("invalid-input"),de=A(N.charCodeAt(re++)),(de>=d||de>E((c-ee)/ae))&&D("overflow"),ee+=de*ae,he=ue<=K?m:ue>=K+_?_:ue-K,!(de<he);ue+=d)Se=d-he,ae>E(c/Se)&&D("overflow"),ae*=Se;Y=F.length+1,K=U(ee-ie,Y,ie==0),E(ee/Y)>c-V&&D("overflow"),V+=E(ee/Y),ee%=Y,F.splice(ee++,0,V)}return M(F)}function X(N){var F,H,Y,ee,V,K,$,ne,re,ie,ae,ue=[],de,he,Se,me;for(N=T(N),de=N.length,F=w,H=0,V=v,K=0;K<de;++K)ae=N[K],ae<128&&ue.push(L(ae));for(Y=ee=ue.length,ee&&ue.push(p);Y<de;){for($=c,K=0;K<de;++K)ae=N[K],ae>=F&&ae<$&&($=ae);for(he=Y+1,$-F>E((c-H)/he)&&D("overflow"),H+=($-F)*he,F=$,K=0;K<de;++K)if(ae=N[K],ae<F&&++H>c&&D("overflow"),ae==F){for(ne=H,re=d;ie=re<=V?m:re>=V+_?_:re-V,!(ne<ie);re+=d)me=ne-ie,Se=d-ie,ue.push(L(z(ie+me%Se,0))),ne=E(me/Se);ue.push(L(z(ne,0))),V=U(H,he,Y==ee),H=0,++Y}++H,++F}return ue.join("")}function J(N){return S(N,function(F){return h.test(F)?Z(F.slice(4).toLowerCase()):F})}function B(N){return S(N,function(F){return C.test(F)?"xn--"+X(F):F})}if(u={version:"1.4.1",ucs2:{decode:T,encode:M},decode:Z,encode:X,toASCII:B,toUnicode:J},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})(PO)}(md,md.exports)),md.exports}var s1,U2;function wc(){return U2||(U2=1,s1=TypeError),s1}const kO={},AO=Object.freeze(Object.defineProperty({__proto__:null,default:kO},Symbol.toStringTag,{value:"Module"})),TO=Xl(AO);var u1,q2;function Up(){if(q2)return u1;q2=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,d=typeof WeakMap=="function"&&WeakMap.prototype,m=d?WeakMap.prototype.has:null,_=typeof WeakSet=="function"&&WeakSet.prototype,k=_?WeakSet.prototype.has:null,x=typeof WeakRef=="function"&&WeakRef.prototype,v=x?WeakRef.prototype.deref:null,w=Boolean.prototype.valueOf,p=Object.prototype.toString,h=Function.prototype.toString,C=String.prototype.match,g=String.prototype.slice,b=String.prototype.replace,y=String.prototype.toUpperCase,E=String.prototype.toLowerCase,L=RegExp.prototype.test,R=Array.prototype.concat,D=Array.prototype.join,O=Array.prototype.slice,S=Math.floor,T=typeof BigInt=="function"?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,z=typeof Symbol=="function"&&typeof Symbol.iterator=="object",U=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===z||!0)?Symbol.toStringTag:null,Z=Object.prototype.propertyIsEnumerable,X=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(we){return we.__proto__}:null);function J(we,Ee){if(we===1/0||we===-1/0||we!==we||we&&we>-1e3&&we<1e3||L.call(/e/,Ee))return Ee;var vt=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof we=="number"){var Ct=we<0?-S(-we):S(we);if(Ct!==we){var Ne=String(Ct),Ge=g.call(Ee,Ne.length+1);return b.call(Ne,vt,"$&_")+"."+b.call(b.call(Ge,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(Ee,vt,"$&_")}var B=TO,N=B.custom,F=de(N)?N:null,H={__proto__:null,double:'"',single:"'"},Y={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};u1=function we(Ee,vt,Ct,Ne){var Ge=vt||{};if(me(Ge,"quoteStyle")&&!me(H,Ge.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(me(Ge,"maxStringLength")&&(typeof Ge.maxStringLength=="number"?Ge.maxStringLength<0&&Ge.maxStringLength!==1/0:Ge.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var it=me(Ge,"customInspect")?Ge.customInspect:!0;if(typeof it!="boolean"&&it!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(me(Ge,"indent")&&Ge.indent!==null&&Ge.indent!==" "&&!(parseInt(Ge.indent,10)===Ge.indent&&Ge.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(me(Ge,"numericSeparator")&&typeof Ge.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var De=Ge.numericSeparator;if(typeof Ee>"u")return"undefined";if(Ee===null)return"null";if(typeof Ee=="boolean")return Ee?"true":"false";if(typeof Ee=="string")return at(Ee,Ge);if(typeof Ee=="number"){if(Ee===0)return 1/0/Ee>0?"0":"-0";var mt=String(Ee);return De?J(Ee,mt):mt}if(typeof Ee=="bigint"){var Fe=String(Ee)+"n";return De?J(Ee,Fe):Fe}var ht=typeof Ge.depth>"u"?5:Ge.depth;if(typeof Ct>"u"&&(Ct=0),Ct>=ht&&ht>0&&typeof Ee=="object")return K(Ee)?"[Array]":"[Object]";var _n=et(Ge,Ct);if(typeof Ne>"u")Ne=[];else if(ge(Ne,Ee)>=0)return"[Circular]";function Be(Gn,Sn,oi){if(Sn&&(Ne=O.call(Ne),Ne.push(Sn)),oi){var Ir={depth:Ge.depth};return me(Ge,"quoteStyle")&&(Ir.quoteStyle=Ge.quoteStyle),we(Gn,Ir,Ct+1,Ne)}return we(Gn,Ge,Ct+1,Ne)}if(typeof Ee=="function"&&!ne(Ee)){var st=fe(Ee),_t=wt(Ee,Be);return"[Function"+(st?": "+st:" (anonymous)")+"]"+(_t.length>0?" { "+D.call(_t,", ")+" }":"")}if(de(Ee)){var Bt=z?b.call(String(Ee),/^(Symbol\(.*\))_[^)]*$/,"$1"):A.call(Ee);return typeof Ee=="object"&&!z?je(Bt):Bt}if(Ie(Ee)){for(var Ht="<"+E.call(String(Ee.nodeName)),hn=Ee.attributes||[],In=0;In<hn.length;In++)Ht+=" "+hn[In].name+"="+ee(V(hn[In].value),"double",Ge);return Ht+=">",Ee.childNodes&&Ee.childNodes.length&&(Ht+="..."),Ht+="</"+E.call(String(Ee.nodeName))+">",Ht}if(K(Ee)){if(Ee.length===0)return"[]";var wn=wt(Ee,Be);return _n&&!Xe(wn)?"["+Pt(wn,_n)+"]":"[ "+D.call(wn,", ")+" ]"}if(re(Ee)){var Qn=wt(Ee,Be);return!("cause"in Error.prototype)&&"cause"in Ee&&!Z.call(Ee,"cause")?"{ ["+String(Ee)+"] "+D.call(R.call("[cause]: "+Be(Ee.cause),Qn),", ")+" }":Qn.length===0?"["+String(Ee)+"]":"{ ["+String(Ee)+"] "+D.call(Qn,", ")+" }"}if(typeof Ee=="object"&&it){if(F&&typeof Ee[F]=="function"&&B)return B(Ee,{depth:ht-Ct});if(it!=="symbol"&&typeof Ee.inspect=="function")return Ee.inspect()}if(Ce(Ee)){var ii=[];return n&&n.call(Ee,function(Gn,Sn){ii.push(Be(Sn,Ee,!0)+" => "+Be(Gn,Ee))}),He("Map",t.call(Ee),ii,_n)}if(be(Ee)){var Sr=[];return c&&c.call(Ee,function(Gn){Sr.push(Be(Gn,Ee))}),He("Set",u.call(Ee),Sr,_n)}if(Te(Ee))return ze("WeakMap");if(xe(Ee))return ze("WeakSet");if(se(Ee))return ze("WeakRef");if(ae(Ee))return je(Be(Number(Ee)));if(he(Ee))return je(Be(T.call(Ee)));if(ue(Ee))return je(w.call(Ee));if(ie(Ee))return je(Be(String(Ee)));if(typeof window<"u"&&Ee===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Ee===globalThis||typeof ic<"u"&&Ee===ic)return"{ [object globalThis] }";if(!$(Ee)&&!ne(Ee)){var Ze=wt(Ee,Be),Et=X?X(Ee)===Object.prototype:Ee instanceof Object||Ee.constructor===Object,Mt=Ee instanceof Object?"":"null prototype",Vt=!Et&&U&&Object(Ee)===Ee&&U in Ee?g.call(ke(Ee),8,-1):Mt?"Object":"",$t=Et||typeof Ee.constructor!="function"?"":Ee.constructor.name?Ee.constructor.name+" ":"",Jn=$t+(Vt||Mt?"["+D.call(R.call([],Vt||[],Mt||[]),": ")+"] ":"");return Ze.length===0?Jn+"{}":_n?Jn+"{"+Pt(Ze,_n)+"}":Jn+"{ "+D.call(Ze,", ")+" }"}return String(Ee)};function ee(we,Ee,vt){var Ct=vt.quoteStyle||Ee,Ne=H[Ct];return Ne+we+Ne}function V(we){return b.call(String(we),/"/g,""")}function K(we){return ke(we)==="[object Array]"&&(!U||!(typeof we=="object"&&U in we))}function $(we){return ke(we)==="[object Date]"&&(!U||!(typeof we=="object"&&U in we))}function ne(we){return ke(we)==="[object RegExp]"&&(!U||!(typeof we=="object"&&U in we))}function re(we){return ke(we)==="[object Error]"&&(!U||!(typeof we=="object"&&U in we))}function ie(we){return ke(we)==="[object String]"&&(!U||!(typeof we=="object"&&U in we))}function ae(we){return ke(we)==="[object Number]"&&(!U||!(typeof we=="object"&&U in we))}function ue(we){return ke(we)==="[object Boolean]"&&(!U||!(typeof we=="object"&&U in we))}function de(we){if(z)return we&&typeof we=="object"&&we instanceof Symbol;if(typeof we=="symbol")return!0;if(!we||typeof we!="object"||!A)return!1;try{return A.call(we),!0}catch{}return!1}function he(we){if(!we||typeof we!="object"||!T)return!1;try{return T.call(we),!0}catch{}return!1}var Se=Object.prototype.hasOwnProperty||function(we){return we in this};function me(we,Ee){return Se.call(we,Ee)}function ke(we){return p.call(we)}function fe(we){if(we.name)return we.name;var Ee=C.call(h.call(we),/^function\s*([\w$]+)/);return Ee?Ee[1]:null}function ge(we,Ee){if(we.indexOf)return we.indexOf(Ee);for(var vt=0,Ct=we.length;vt<Ct;vt++)if(we[vt]===Ee)return vt;return-1}function Ce(we){if(!t||!we||typeof we!="object")return!1;try{t.call(we);try{u.call(we)}catch{return!0}return we instanceof Map}catch{}return!1}function Te(we){if(!m||!we||typeof we!="object")return!1;try{m.call(we,m);try{k.call(we,k)}catch{return!0}return we instanceof WeakMap}catch{}return!1}function se(we){if(!v||!we||typeof we!="object")return!1;try{return v.call(we),!0}catch{}return!1}function be(we){if(!u||!we||typeof we!="object")return!1;try{u.call(we);try{t.call(we)}catch{return!0}return we instanceof Set}catch{}return!1}function xe(we){if(!k||!we||typeof we!="object")return!1;try{k.call(we,k);try{m.call(we,m)}catch{return!0}return we instanceof WeakSet}catch{}return!1}function Ie(we){return!we||typeof we!="object"?!1:typeof HTMLElement<"u"&&we instanceof HTMLElement?!0:typeof we.nodeName=="string"&&typeof we.getAttribute=="function"}function at(we,Ee){if(we.length>Ee.maxStringLength){var vt=we.length-Ee.maxStringLength,Ct="... "+vt+" more character"+(vt>1?"s":"");return at(g.call(we,0,Ee.maxStringLength),Ee)+Ct}var Ne=Y[Ee.quoteStyle||"single"];Ne.lastIndex=0;var Ge=b.call(b.call(we,Ne,"\\$1"),/[\x00-\x1f]/g,gt);return ee(Ge,"single",Ee)}function gt(we){var Ee=we.charCodeAt(0),vt={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ee];return vt?"\\"+vt:"\\x"+(Ee<16?"0":"")+y.call(Ee.toString(16))}function je(we){return"Object("+we+")"}function ze(we){return we+" { ? }"}function He(we,Ee,vt,Ct){var Ne=Ct?Pt(vt,Ct):D.call(vt,", ");return we+" ("+Ee+") {"+Ne+"}"}function Xe(we){for(var Ee=0;Ee<we.length;Ee++)if(ge(we[Ee],`
|
|
149
|
-
`)>=0)return!1;return!0}function et(we,Ee){var vt;if(we.indent===" ")vt=" ";else if(typeof we.indent=="number"&&we.indent>0)vt=D.call(Array(we.indent+1)," ");else return null;return{base:vt,prev:D.call(Array(Ee+1),vt)}}function Pt(we,Ee){if(we.length===0)return"";var vt=`
|
|
150
|
-
`+Ee.prev+Ee.base;return vt+D.call(we,","+vt)+`
|
|
151
|
-
`+Ee.prev}function wt(we,Ee){var vt=K(we),Ct=[];if(vt){Ct.length=we.length;for(var Ne=0;Ne<we.length;Ne++)Ct[Ne]=me(we,Ne)?Ee(we[Ne],we):""}var Ge=typeof M=="function"?M(we):[],it;if(z){it={};for(var De=0;De<Ge.length;De++)it["$"+Ge[De]]=Ge[De]}for(var mt in we)me(we,mt)&&(vt&&String(Number(mt))===mt&&mt<we.length||z&&it["$"+mt]instanceof Symbol||(L.call(/[^\w$]/,mt)?Ct.push(Ee(mt,we)+": "+Ee(we[mt],we)):Ct.push(mt+": "+Ee(we[mt],we))));if(typeof M=="function")for(var Fe=0;Fe<Ge.length;Fe++)Z.call(we,Ge[Fe])&&Ct.push("["+Ee(Ge[Fe])+"]: "+Ee(we[Ge[Fe]],we));return Ct}return u1}var c1,H2;function RO(){if(H2)return c1;H2=1;var e=Up(),i=wc(),t=function(c,d,m){for(var _=c,k;(k=_.next)!=null;_=k)if(k.key===d)return _.next=k.next,m||(k.next=c.next,c.next=k),k},n=function(c,d){if(c){var m=t(c,d);return m&&m.value}},a=function(c,d,m){var _=t(c,d);_?_.value=m:c.next={key:d,next:c.next,value:m}},l=function(c,d){return c?!!t(c,d):!1},u=function(c,d){if(c)return t(c,d,!0)};return c1=function(){var d,m={assert:function(_){if(!m.has(_))throw new i("Side channel does not contain "+e(_))},delete:function(_){var k=d&&d.next,x=u(d,_);return x&&k&&k===x&&(d=void 0),!!x},get:function(_){return n(d,_)},has:function(_){return l(d,_)},set:function(_,k){d||(d={next:void 0}),a(d,_,k)}};return m},c1}var f1,G2;function MO(){return G2||(G2=1,f1=Object),f1}var d1,V2;function LO(){return V2||(V2=1,d1=Error),d1}var h1,$2;function NO(){return $2||($2=1,h1=EvalError),h1}var p1,W2;function IO(){return W2||(W2=1,p1=RangeError),p1}var g1,Y2;function DO(){return Y2||(Y2=1,g1=ReferenceError),g1}var v1,K2;function jO(){return K2||(K2=1,v1=SyntaxError),v1}var m1,X2;function FO(){return X2||(X2=1,m1=URIError),m1}var y1,Z2;function zO(){return Z2||(Z2=1,y1=Math.abs),y1}var b1,Q2;function BO(){return Q2||(Q2=1,b1=Math.floor),b1}var _1,J2;function UO(){return J2||(J2=1,_1=Math.max),_1}var w1,eb;function qO(){return eb||(eb=1,w1=Math.min),w1}var S1,tb;function HO(){return tb||(tb=1,S1=Math.pow),S1}var E1,nb;function GO(){return nb||(nb=1,E1=Object.getOwnPropertyDescriptor),E1}var O1,rb;function a_(){if(rb)return O1;rb=1;var e=GO();if(e)try{e([],"length")}catch{e=null}return O1=e,O1}var x1,ib;function VO(){if(ib)return x1;ib=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return x1=e,x1}var P1,ob;function $O(){return ob||(ob=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(var l 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 u=Object.getOwnPropertySymbols(i);if(u.length!==1||u[0]!==t||!Object.prototype.propertyIsEnumerable.call(i,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(i,t);if(c.value!==a||c.enumerable!==!0)return!1}return!0}),P1}var C1,ab;function WO(){if(ab)return C1;ab=1;var e=typeof Symbol<"u"&&Symbol,i=$O();return C1=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},C1}var k1,lb;function YO(){if(lb)return k1;lb=1;var e="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,t=Math.max,n="[object Function]",a=function(d,m){for(var _=[],k=0;k<d.length;k+=1)_[k]=d[k];for(var x=0;x<m.length;x+=1)_[x+d.length]=m[x];return _},l=function(d,m){for(var _=[],k=m,x=0;k<d.length;k+=1,x+=1)_[x]=d[k];return _},u=function(c,d){for(var m="",_=0;_<c.length;_+=1)m+=c[_],_+1<c.length&&(m+=d);return m};return k1=function(d){var m=this;if(typeof m!="function"||i.apply(m)!==n)throw new TypeError(e+m);for(var _=l(arguments,1),k,x=function(){if(this instanceof k){var C=m.apply(this,a(_,arguments));return Object(C)===C?C:this}return m.apply(d,a(_,arguments))},v=t(0,m.length-_.length),w=[],p=0;p<v;p++)w[p]="$"+p;if(k=Function("binder","return function ("+u(w,",")+"){ return binder.apply(this,arguments); }")(x),m.prototype){var h=function(){};h.prototype=m.prototype,k.prototype=new h,h.prototype=null}return k},k1}var A1,sb;function qp(){if(sb)return A1;sb=1;var e=YO();return A1=Function.prototype.bind||e,A1}var T1,ub;function Tv(){return ub||(ub=1,T1=Function.prototype.call),T1}var R1,cb;function l_(){return cb||(cb=1,R1=Function.prototype.apply),R1}var M1,fb;function KO(){return fb||(fb=1,M1=typeof Reflect<"u"&&Reflect&&Reflect.apply),M1}var L1,db;function XO(){if(db)return L1;db=1;var e=qp(),i=l_(),t=Tv(),n=KO();return L1=n||e.call(t,i),L1}var N1,hb;function s_(){if(hb)return N1;hb=1;var e=qp(),i=wc(),t=Tv(),n=XO();return N1=function(l){if(l.length<1||typeof l[0]!="function")throw new i("a function is required");return n(e,t,l)},N1}var I1,pb;function ZO(){if(pb)return I1;pb=1;var e=s_(),i=a_(),t=[].__proto__===Array.prototype,n=t&&i&&i(Object.prototype,"__proto__"),a=Object,l=a.getPrototypeOf;return I1=n&&typeof n.get=="function"?e([n.get]):typeof l=="function"?function(c){return l(c==null?c:a(c))}:!1,I1}var D1,gb;function QO(){if(gb)return D1;gb=1;var e=Function.prototype.call,i=Object.prototype.hasOwnProperty,t=qp();return D1=t.call(e,i),D1}var j1,vb;function Rv(){if(vb)return j1;vb=1;var e,i=MO(),t=LO(),n=NO(),a=IO(),l=DO(),u=jO(),c=wc(),d=FO(),m=zO(),_=BO(),k=UO(),x=qO(),v=HO(),w=Function,p=function(K){try{return w('"use strict"; return ('+K+").constructor;")()}catch{}},h=a_(),C=VO(),g=function(){throw new c},b=h?function(){try{return arguments.callee,g}catch{try{return h(arguments,"callee").get}catch{return g}}}():g,y=WO()(),E=ZO(),L=typeof Reflect=="function"&&Reflect.getPrototypeOf||i.getPrototypeOf||E,R=l_(),D=Tv(),O={},S=typeof Uint8Array>"u"||!L?e:L(Uint8Array),T={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":y&&L?L([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":O,"%AsyncGenerator%":O,"%AsyncGeneratorFunction%":O,"%AsyncIteratorPrototype%":O,"%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%":t,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":O,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&L?L(L([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!y||!L?e:L(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":h,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!y||!L?e:L(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&L?L(""[Symbol.iterator]()):e,"%Symbol%":y?Symbol:e,"%SyntaxError%":u,"%ThrowTypeError%":b,"%TypedArray%":S,"%TypeError%":c,"%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%":d,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":D,"%Function.prototype.apply%":R,"%Object.defineProperty%":C,"%Math.abs%":m,"%Math.floor%":_,"%Math.max%":k,"%Math.min%":x,"%Math.pow%":v};if(L)try{null.error}catch(K){var M=L(L(K));T["%Error.prototype%"]=M}var A=function K($){var ne;if($==="%AsyncFunction%")ne=p("async function () {}");else if($==="%GeneratorFunction%")ne=p("function* () {}");else if($==="%AsyncGeneratorFunction%")ne=p("async function* () {}");else if($==="%AsyncGenerator%"){var re=K("%AsyncGeneratorFunction%");re&&(ne=re.prototype)}else if($==="%AsyncIteratorPrototype%"){var ie=K("%AsyncGenerator%");ie&&L&&(ne=L(ie.prototype))}return T[$]=ne,ne},z={__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"]},U=qp(),Z=QO(),X=U.call(D,Array.prototype.concat),J=U.call(R,Array.prototype.splice),B=U.call(D,String.prototype.replace),N=U.call(D,String.prototype.slice),F=U.call(D,RegExp.prototype.exec),H=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Y=/\\(\\)?/g,ee=function($){var ne=N($,0,1),re=N($,-1);if(ne==="%"&&re!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(re==="%"&&ne!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var ie=[];return B($,H,function(ae,ue,de,he){ie[ie.length]=de?B(he,Y,"$1"):ue||ae}),ie},V=function($,ne){var re=$,ie;if(Z(z,re)&&(ie=z[re],re="%"+ie[0]+"%"),Z(T,re)){var ae=T[re];if(ae===O&&(ae=A(re)),typeof ae>"u"&&!ne)throw new c("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:ie,name:re,value:ae}}throw new u("intrinsic "+$+" does not exist!")};return j1=function($,ne){if(typeof $!="string"||$.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ne!="boolean")throw new c('"allowMissing" argument must be a boolean');if(F(/^%?[^%]*%?$/,$)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var re=ee($),ie=re.length>0?re[0]:"",ae=V("%"+ie+"%",ne),ue=ae.name,de=ae.value,he=!1,Se=ae.alias;Se&&(ie=Se[0],J(re,X([0,1],Se)));for(var me=1,ke=!0;me<re.length;me+=1){var fe=re[me],ge=N(fe,0,1),Ce=N(fe,-1);if((ge==='"'||ge==="'"||ge==="`"||Ce==='"'||Ce==="'"||Ce==="`")&&ge!==Ce)throw new u("property names with quotes must have matching quotes");if((fe==="constructor"||!ke)&&(he=!0),ie+="."+fe,ue="%"+ie+"%",Z(T,ue))de=T[ue];else if(de!=null){if(!(fe in de)){if(!ne)throw new c("base intrinsic for "+$+" exists, but the property is not available.");return}if(h&&me+1>=re.length){var Te=h(de,fe);ke=!!Te,ke&&"get"in Te&&!("originalValue"in Te.get)?de=Te.get:de=de[fe]}else ke=Z(de,fe),de=de[fe];ke&&!he&&(T[ue]=de)}}return de},j1}var F1,mb;function u_(){if(mb)return F1;mb=1;var e=Rv(),i=s_(),t=i([e("%String.prototype.indexOf%")]);return F1=function(a,l){var u=e(a,!!l);return typeof u=="function"&&t(a,".prototype.")>-1?i([u]):u},F1}var z1,yb;function c_(){if(yb)return z1;yb=1;var e=Rv(),i=u_(),t=Up(),n=wc(),a=e("%Map%",!0),l=i("Map.prototype.get",!0),u=i("Map.prototype.set",!0),c=i("Map.prototype.has",!0),d=i("Map.prototype.delete",!0),m=i("Map.prototype.size",!0);return z1=!!a&&function(){var k,x={assert:function(v){if(!x.has(v))throw new n("Side channel does not contain "+t(v))},delete:function(v){if(k){var w=d(k,v);return m(k)===0&&(k=void 0),w}return!1},get:function(v){if(k)return l(k,v)},has:function(v){return k?c(k,v):!1},set:function(v,w){k||(k=new a),u(k,v,w)}};return x},z1}var B1,bb;function JO(){if(bb)return B1;bb=1;var e=Rv(),i=u_(),t=Up(),n=c_(),a=wc(),l=e("%WeakMap%",!0),u=i("WeakMap.prototype.get",!0),c=i("WeakMap.prototype.set",!0),d=i("WeakMap.prototype.has",!0),m=i("WeakMap.prototype.delete",!0);return B1=l?function(){var k,x,v={assert:function(w){if(!v.has(w))throw new a("Side channel does not contain "+t(w))},delete:function(w){if(l&&w&&(typeof w=="object"||typeof w=="function")){if(k)return m(k,w)}else if(n&&x)return x.delete(w);return!1},get:function(w){return l&&w&&(typeof w=="object"||typeof w=="function")&&k?u(k,w):x&&x.get(w)},has:function(w){return l&&w&&(typeof w=="object"||typeof w=="function")&&k?d(k,w):!!x&&x.has(w)},set:function(w,p){l&&w&&(typeof w=="object"||typeof w=="function")?(k||(k=new l),c(k,w,p)):n&&(x||(x=n()),x.set(w,p))}};return v}:n,B1}var U1,_b;function ex(){if(_b)return U1;_b=1;var e=wc(),i=Up(),t=RO(),n=c_(),a=JO(),l=a||n||t;return U1=function(){var c,d={assert:function(m){if(!d.has(m))throw new e("Side channel does not contain "+i(m))},delete:function(m){return!!c&&c.delete(m)},get:function(m){return c&&c.get(m)},has:function(m){return!!c&&c.has(m)},set:function(m,_){c||(c=l()),c.set(m,_)}};return d},U1}var q1,wb;function Mv(){if(wb)return q1;wb=1;var e=String.prototype.replace,i=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return q1={default:t.RFC3986,formatters:{RFC1738:function(n){return e.call(n,i,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},q1}var H1,Sb;function f_(){if(Sb)return H1;Sb=1;var e=Mv(),i=Object.prototype.hasOwnProperty,t=Array.isArray,n=function(){for(var h=[],C=0;C<256;++C)h.push("%"+((C<16?"0":"")+C.toString(16)).toUpperCase());return h}(),a=function(C){for(;C.length>1;){var g=C.pop(),b=g.obj[g.prop];if(t(b)){for(var y=[],E=0;E<b.length;++E)typeof b[E]<"u"&&y.push(b[E]);g.obj[g.prop]=y}}},l=function(C,g){for(var b=g&&g.plainObjects?{__proto__:null}:{},y=0;y<C.length;++y)typeof C[y]<"u"&&(b[y]=C[y]);return b},u=function h(C,g,b){if(!g)return C;if(typeof g!="object"&&typeof g!="function"){if(t(C))C.push(g);else if(C&&typeof C=="object")(b&&(b.plainObjects||b.allowPrototypes)||!i.call(Object.prototype,g))&&(C[g]=!0);else return[C,g];return C}if(!C||typeof C!="object")return[C].concat(g);var y=C;return t(C)&&!t(g)&&(y=l(C,b)),t(C)&&t(g)?(g.forEach(function(E,L){if(i.call(C,L)){var R=C[L];R&&typeof R=="object"&&E&&typeof E=="object"?C[L]=h(R,E,b):C.push(E)}else C[L]=E}),C):Object.keys(g).reduce(function(E,L){var R=g[L];return i.call(E,L)?E[L]=h(E[L],R,b):E[L]=R,E},y)},c=function(C,g){return Object.keys(g).reduce(function(b,y){return b[y]=g[y],b},C)},d=function(h,C,g){var b=h.replace(/\+/g," ");if(g==="iso-8859-1")return b.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(b)}catch{return b}},m=1024,_=function(C,g,b,y,E){if(C.length===0)return C;var L=C;if(typeof C=="symbol"?L=Symbol.prototype.toString.call(C):typeof C!="string"&&(L=String(C)),b==="iso-8859-1")return escape(L).replace(/%u[0-9a-f]{4}/gi,function(A){return"%26%23"+parseInt(A.slice(2),16)+"%3B"});for(var R="",D=0;D<L.length;D+=m){for(var O=L.length>=m?L.slice(D,D+m):L,S=[],T=0;T<O.length;++T){var M=O.charCodeAt(T);if(M===45||M===46||M===95||M===126||M>=48&&M<=57||M>=65&&M<=90||M>=97&&M<=122||E===e.RFC1738&&(M===40||M===41)){S[S.length]=O.charAt(T);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}T+=1,M=65536+((M&1023)<<10|O.charCodeAt(T)&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(C){for(var g=[{obj:{o:C},prop:"o"}],b=[],y=0;y<g.length;++y)for(var E=g[y],L=E.obj[E.prop],R=Object.keys(L),D=0;D<R.length;++D){var O=R[D],S=L[O];typeof S=="object"&&S!==null&&b.indexOf(S)===-1&&(g.push({obj:L,prop:O}),b.push(S))}return a(g),C},x=function(C){return Object.prototype.toString.call(C)==="[object RegExp]"},v=function(C){return!C||typeof C!="object"?!1:!!(C.constructor&&C.constructor.isBuffer&&C.constructor.isBuffer(C))},w=function(C,g){return[].concat(C,g)},p=function(C,g){if(t(C)){for(var b=[],y=0;y<C.length;y+=1)b.push(g(C[y]));return b}return g(C)};return H1={arrayToObject:l,assign:c,combine:w,compact:k,decode:d,encode:_,isBuffer:v,isRegExp:x,maybeMap:p,merge:u},H1}var G1,Eb;function tx(){if(Eb)return G1;Eb=1;var e=ex(),i=f_(),t=Mv(),n=Object.prototype.hasOwnProperty,a={brackets:function(h){return h+"[]"},comma:"comma",indices:function(h,C){return h+"["+C+"]"},repeat:function(h){return h}},l=Array.isArray,u=Array.prototype.push,c=function(p,h){u.apply(p,l(h)?h:[h])},d=Date.prototype.toISOString,m=t.default,_={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:i.encode,encodeValuesOnly:!1,filter:void 0,format:m,formatter:t.formatters[m],indices:!1,serializeDate:function(h){return d.call(h)},skipNulls:!1,strictNullHandling:!1},k=function(h){return typeof h=="string"||typeof h=="number"||typeof h=="boolean"||typeof h=="symbol"||typeof h=="bigint"},x={},v=function p(h,C,g,b,y,E,L,R,D,O,S,T,M,A,z,U,Z,X){for(var J=h,B=X,N=0,F=!1;(B=B.get(x))!==void 0&&!F;){var H=B.get(h);if(N+=1,typeof H<"u"){if(H===N)throw new RangeError("Cyclic object value");F=!0}typeof B.get(x)>"u"&&(N=0)}if(typeof O=="function"?J=O(C,J):J instanceof Date?J=M(J):g==="comma"&&l(J)&&(J=i.maybeMap(J,function(Se){return Se instanceof Date?M(Se):Se})),J===null){if(E)return D&&!U?D(C,_.encoder,Z,"key",A):C;J=""}if(k(J)||i.isBuffer(J)){if(D){var Y=U?C:D(C,_.encoder,Z,"key",A);return[z(Y)+"="+z(D(J,_.encoder,Z,"value",A))]}return[z(C)+"="+z(String(J))]}var ee=[];if(typeof J>"u")return ee;var V;if(g==="comma"&&l(J))U&&D&&(J=i.maybeMap(J,D)),V=[{value:J.length>0?J.join(",")||null:void 0}];else if(l(O))V=O;else{var K=Object.keys(J);V=S?K.sort(S):K}var $=R?String(C).replace(/\./g,"%2E"):String(C),ne=b&&l(J)&&J.length===1?$+"[]":$;if(y&&l(J)&&J.length===0)return ne+"[]";for(var re=0;re<V.length;++re){var ie=V[re],ae=typeof ie=="object"&&ie&&typeof ie.value<"u"?ie.value:J[ie];if(!(L&&ae===null)){var ue=T&&R?String(ie).replace(/\./g,"%2E"):String(ie),de=l(J)?typeof g=="function"?g(ne,ue):ne:ne+(T?"."+ue:"["+ue+"]");X.set(h,N);var he=e();he.set(x,X),c(ee,p(ae,de,g,b,y,E,L,R,g==="comma"&&U&&l(J)?null:D,O,S,T,M,A,z,U,Z,he))}}return ee},w=function(h){if(!h)return _;if(typeof h.allowEmptyArrays<"u"&&typeof h.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof h.encodeDotInKeys<"u"&&typeof h.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(h.encoder!==null&&typeof h.encoder<"u"&&typeof h.encoder!="function")throw new TypeError("Encoder has to be a function.");var C=h.charset||_.charset;if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var g=t.default;if(typeof h.format<"u"){if(!n.call(t.formatters,h.format))throw new TypeError("Unknown format option provided.");g=h.format}var b=t.formatters[g],y=_.filter;(typeof h.filter=="function"||l(h.filter))&&(y=h.filter);var E;if(h.arrayFormat in a?E=h.arrayFormat:"indices"in h?E=h.indices?"indices":"repeat":E=_.arrayFormat,"commaRoundTrip"in h&&typeof h.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var L=typeof h.allowDots>"u"?h.encodeDotInKeys===!0?!0:_.allowDots:!!h.allowDots;return{addQueryPrefix:typeof h.addQueryPrefix=="boolean"?h.addQueryPrefix:_.addQueryPrefix,allowDots:L,allowEmptyArrays:typeof h.allowEmptyArrays=="boolean"?!!h.allowEmptyArrays:_.allowEmptyArrays,arrayFormat:E,charset:C,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:_.charsetSentinel,commaRoundTrip:!!h.commaRoundTrip,delimiter:typeof h.delimiter>"u"?_.delimiter:h.delimiter,encode:typeof h.encode=="boolean"?h.encode:_.encode,encodeDotInKeys:typeof h.encodeDotInKeys=="boolean"?h.encodeDotInKeys:_.encodeDotInKeys,encoder:typeof h.encoder=="function"?h.encoder:_.encoder,encodeValuesOnly:typeof h.encodeValuesOnly=="boolean"?h.encodeValuesOnly:_.encodeValuesOnly,filter:y,format:g,formatter:b,serializeDate:typeof h.serializeDate=="function"?h.serializeDate:_.serializeDate,skipNulls:typeof h.skipNulls=="boolean"?h.skipNulls:_.skipNulls,sort:typeof h.sort=="function"?h.sort:null,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:_.strictNullHandling}};return G1=function(p,h){var C=p,g=w(h),b,y;typeof g.filter=="function"?(y=g.filter,C=y("",C)):l(g.filter)&&(y=g.filter,b=y);var E=[];if(typeof C!="object"||C===null)return"";var L=a[g.arrayFormat],R=L==="comma"&&g.commaRoundTrip;b||(b=Object.keys(C)),g.sort&&b.sort(g.sort);for(var D=e(),O=0;O<b.length;++O){var S=b[O],T=C[S];g.skipNulls&&T===null||c(E,v(T,S,L,R,g.allowEmptyArrays,g.strictNullHandling,g.skipNulls,g.encodeDotInKeys,g.encode?g.encoder:null,g.filter,g.sort,g.allowDots,g.serializeDate,g.format,g.formatter,g.encodeValuesOnly,g.charset,D))}var M=E.join(g.delimiter),A=g.addQueryPrefix===!0?"?":"";return g.charsetSentinel&&(g.charset==="iso-8859-1"?A+="utf8=%26%2310003%3B&":A+="utf8=%E2%9C%93&"),M.length>0?A+M:""},G1}var V1,Ob;function nx(){if(Ob)return V1;Ob=1;var e=f_(),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(x){return x.replace(/&#(\d+);/g,function(v,w){return String.fromCharCode(parseInt(w,10))})},l=function(x,v){return x&&typeof x=="string"&&v.comma&&x.indexOf(",")>-1?x.split(","):x},u="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",d=function(v,w){var p={__proto__:null},h=w.ignoreQueryPrefix?v.replace(/^\?/,""):v;h=h.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var C=w.parameterLimit===1/0?void 0:w.parameterLimit,g=h.split(w.delimiter,C),b=-1,y,E=w.charset;if(w.charsetSentinel)for(y=0;y<g.length;++y)g[y].indexOf("utf8=")===0&&(g[y]===c?E="utf-8":g[y]===u&&(E="iso-8859-1"),b=y,y=g.length);for(y=0;y<g.length;++y)if(y!==b){var L=g[y],R=L.indexOf("]="),D=R===-1?L.indexOf("="):R+1,O,S;D===-1?(O=w.decoder(L,n.decoder,E,"key"),S=w.strictNullHandling?null:""):(O=w.decoder(L.slice(0,D),n.decoder,E,"key"),S=e.maybeMap(l(L.slice(D+1),w),function(M){return w.decoder(M,n.decoder,E,"value")})),S&&w.interpretNumericEntities&&E==="iso-8859-1"&&(S=a(String(S))),L.indexOf("[]=")>-1&&(S=t(S)?[S]:S);var T=i.call(p,O);T&&w.duplicates==="combine"?p[O]=e.combine(p[O],S):(!T||w.duplicates==="last")&&(p[O]=S)}return p},m=function(x,v,w,p){for(var h=p?v:l(v,w),C=x.length-1;C>=0;--C){var g,b=x[C];if(b==="[]"&&w.parseArrays)g=w.allowEmptyArrays&&(h===""||w.strictNullHandling&&h===null)?[]:[].concat(h);else{g=w.plainObjects?{__proto__:null}:{};var y=b.charAt(0)==="["&&b.charAt(b.length-1)==="]"?b.slice(1,-1):b,E=w.decodeDotInKeys?y.replace(/%2E/g,"."):y,L=parseInt(E,10);!w.parseArrays&&E===""?g={0:h}:!isNaN(L)&&b!==E&&String(L)===E&&L>=0&&w.parseArrays&&L<=w.arrayLimit?(g=[],g[L]=h):E!=="__proto__"&&(g[E]=h)}h=g}return h},_=function(v,w,p,h){if(v){var C=p.allowDots?v.replace(/\.([^.[]+)/g,"[$1]"):v,g=/(\[[^[\]]*])/,b=/(\[[^[\]]*])/g,y=p.depth>0&&g.exec(C),E=y?C.slice(0,y.index):C,L=[];if(E){if(!p.plainObjects&&i.call(Object.prototype,E)&&!p.allowPrototypes)return;L.push(E)}for(var R=0;p.depth>0&&(y=b.exec(C))!==null&&R<p.depth;){if(R+=1,!p.plainObjects&&i.call(Object.prototype,y[1].slice(1,-1))&&!p.allowPrototypes)return;L.push(y[1])}if(y){if(p.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+p.depth+" and strictDepth is true");L.push("["+C.slice(y.index)+"]")}return m(L,w,p,h)}},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 w=typeof v.charset>"u"?n.charset:v.charset,p=typeof v.duplicates>"u"?n.duplicates:v.duplicates;if(p!=="combine"&&p!=="first"&&p!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var h=typeof v.allowDots>"u"?v.decodeDotInKeys===!0?!0:n.allowDots:!!v.allowDots;return{allowDots:h,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:w,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:p,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 V1=function(x,v){var w=k(v);if(x===""||x===null||typeof x>"u")return w.plainObjects?{__proto__:null}:{};for(var p=typeof x=="string"?d(x,w):x,h=w.plainObjects?{__proto__:null}:{},C=Object.keys(p),g=0;g<C.length;++g){var b=C[g],y=_(b,p[b],w,typeof x=="string");h=e.merge(h,y,w)}return w.allowSparse===!0?h:e.compact(h)},V1}var $1,xb;function rx(){if(xb)return $1;xb=1;var e=tx(),i=nx(),t=Mv();return $1={formats:t,parse:i,stringify:e},$1}var Pb;function d_(){if(Pb)return js;Pb=1;var e=CO();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),d=["%","/","?",";","#"].concat(c),m=["/","?","#"],_=255,k=/^[+a-z0-9A-Z_-]{0,63}$/,x=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},p={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},h=rx();function C(E,L,R){if(E&&typeof E=="object"&&E instanceof i)return E;var D=new i;return D.parse(E,L,R),D}i.prototype.parse=function(E,L,R){if(typeof E!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof E);var D=E.indexOf("?"),O=D!==-1&&D<E.indexOf("#")?"?":"#",S=E.split(O),T=/\\/g;S[0]=S[0].replace(T,"/"),E=S.join(O);var M=E;if(M=M.trim(),!R&&E.split("#").length===1){var A=a.exec(M);if(A)return this.path=M,this.href=M,this.pathname=A[1],A[2]?(this.search=A[2],L?this.query=h.parse(this.search.substr(1)):this.query=this.search.substr(1)):L&&(this.search="",this.query={}),this}var z=t.exec(M);if(z){z=z[0];var U=z.toLowerCase();this.protocol=U,M=M.substr(z.length)}if(R||z||M.match(/^\/\/[^@/]+@[^@/]+/)){var Z=M.substr(0,2)==="//";Z&&!(z&&w[z])&&(M=M.substr(2),this.slashes=!0)}if(!w[z]&&(Z||z&&!p[z])){for(var X=-1,J=0;J<m.length;J++){var B=M.indexOf(m[J]);B!==-1&&(X===-1||B<X)&&(X=B)}var N,F;X===-1?F=M.lastIndexOf("@"):F=M.lastIndexOf("@",X),F!==-1&&(N=M.slice(0,F),M=M.slice(F+1),this.auth=decodeURIComponent(N)),X=-1;for(var J=0;J<d.length;J++){var B=M.indexOf(d[J]);B!==-1&&(X===-1||B<X)&&(X=B)}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 Y=this.hostname.split(/\./),J=0,ee=Y.length;J<ee;J++){var V=Y[J];if(V&&!V.match(k)){for(var K="",$=0,ne=V.length;$<ne;$++)V.charCodeAt($)>127?K+="x":K+=V[$];if(!K.match(k)){var re=Y.slice(0,J),ie=Y.slice(J+1),ae=V.match(x);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 ue=this.port?":"+this.port:"",de=this.hostname||"";this.host=de+ue,this.href+=this.host,H&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),M[0]!=="/"&&(M="/"+M))}if(!v[U])for(var J=0,ee=c.length;J<ee;J++){var he=c[J];if(M.indexOf(he)!==-1){var Se=encodeURIComponent(he);Se===he&&(Se=escape(he)),M=M.split(he).join(Se)}}var me=M.indexOf("#");me!==-1&&(this.hash=M.substr(me),M=M.slice(0,me));var ke=M.indexOf("?");if(ke!==-1?(this.search=M.substr(ke),this.query=M.substr(ke+1),L&&(this.query=h.parse(this.query)),M=M.slice(0,ke)):L&&(this.search="",this.query={}),M&&(this.pathname=M),p[U]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var ue=this.pathname||"",fe=this.search||"";this.path=ue+fe}return this.href=this.format(),this};function g(E){return typeof E=="string"&&(E=C(E)),E instanceof i?E.format():i.prototype.format.call(E)}i.prototype.format=function(){var E=this.auth||"";E&&(E=encodeURIComponent(E),E=E.replace(/%3A/i,":"),E+="@");var L=this.protocol||"",R=this.pathname||"",D=this.hash||"",O=!1,S="";this.host?O=E+this.host:this.hostname&&(O=E+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(O+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(S=h.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var T=this.search||S&&"?"+S||"";return L&&L.substr(-1)!==":"&&(L+=":"),this.slashes||(!L||p[L])&&O!==!1?(O="//"+(O||""),R&&R.charAt(0)!=="/"&&(R="/"+R)):O||(O=""),D&&D.charAt(0)!=="#"&&(D="#"+D),T&&T.charAt(0)!=="?"&&(T="?"+T),R=R.replace(/[?#]/g,function(M){return encodeURIComponent(M)}),T=T.replace("#","%23"),L+O+R+T+D};function b(E,L){return C(E,!1,!0).resolve(L)}i.prototype.resolve=function(E){return this.resolveObject(C(E,!1,!0)).format()};function y(E,L){return E?C(E,!1,!0).resolveObject(L):L}return i.prototype.resolveObject=function(E){if(typeof E=="string"){var L=new i;L.parse(E,!1,!0),E=L}for(var R=new i,D=Object.keys(this),O=0;O<D.length;O++){var S=D[O];R[S]=this[S]}if(R.hash=E.hash,E.href==="")return R.href=R.format(),R;if(E.slashes&&!E.protocol){for(var T=Object.keys(E),M=0;M<T.length;M++){var A=T[M];A!=="protocol"&&(R[A]=E[A])}return p[R.protocol]&&R.hostname&&!R.pathname&&(R.pathname="/",R.path=R.pathname),R.href=R.format(),R}if(E.protocol&&E.protocol!==R.protocol){if(!p[E.protocol]){for(var z=Object.keys(E),U=0;U<z.length;U++){var Z=z[U];R[Z]=E[Z]}return R.href=R.format(),R}if(R.protocol=E.protocol,!E.host&&!w[E.protocol]){for(var ee=(E.pathname||"").split("/");ee.length&&!(E.host=ee.shift()););E.host||(E.host=""),E.hostname||(E.hostname=""),ee[0]!==""&&ee.unshift(""),ee.length<2&&ee.unshift(""),R.pathname=ee.join("/")}else R.pathname=E.pathname;if(R.search=E.search,R.query=E.query,R.host=E.host||"",R.auth=E.auth,R.hostname=E.hostname||E.host,R.port=E.port,R.pathname||R.search){var X=R.pathname||"",J=R.search||"";R.path=X+J}return R.slashes=R.slashes||E.slashes,R.href=R.format(),R}var B=R.pathname&&R.pathname.charAt(0)==="/",N=E.host||E.pathname&&E.pathname.charAt(0)==="/",F=N||B||R.host&&E.pathname,H=F,Y=R.pathname&&R.pathname.split("/")||[],ee=E.pathname&&E.pathname.split("/")||[],V=R.protocol&&!p[R.protocol];if(V&&(R.hostname="",R.port=null,R.host&&(Y[0]===""?Y[0]=R.host:Y.unshift(R.host)),R.host="",E.protocol&&(E.hostname=null,E.port=null,E.host&&(ee[0]===""?ee[0]=E.host:ee.unshift(E.host)),E.host=null),F=F&&(ee[0]===""||Y[0]==="")),N)R.host=E.host||E.host===""?E.host:R.host,R.hostname=E.hostname||E.hostname===""?E.hostname:R.hostname,R.search=E.search,R.query=E.query,Y=ee;else if(ee.length)Y||(Y=[]),Y.pop(),Y=Y.concat(ee),R.search=E.search,R.query=E.query;else if(E.search!=null){if(V){R.host=Y.shift(),R.hostname=R.host;var K=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;K&&(R.auth=K.shift(),R.hostname=K.shift(),R.host=R.hostname)}return R.search=E.search,R.query=E.query,(R.pathname!==null||R.search!==null)&&(R.path=(R.pathname?R.pathname:"")+(R.search?R.search:"")),R.href=R.format(),R}if(!Y.length)return R.pathname=null,R.search?R.path="/"+R.search:R.path=null,R.href=R.format(),R;for(var $=Y.slice(-1)[0],ne=(R.host||E.host||Y.length>1)&&($==="."||$==="..")||$==="",re=0,ie=Y.length;ie>=0;ie--)$=Y[ie],$==="."?Y.splice(ie,1):$===".."?(Y.splice(ie,1),re++):re&&(Y.splice(ie,1),re--);if(!F&&!H)for(;re--;re)Y.unshift("..");F&&Y[0]!==""&&(!Y[0]||Y[0].charAt(0)!=="/")&&Y.unshift(""),ne&&Y.join("/").substr(-1)!=="/"&&Y.push("");var ae=Y[0]===""||Y[0]&&Y[0].charAt(0)==="/";if(V){R.hostname=ae?"":Y.length?Y.shift():"",R.host=R.hostname;var K=R.host&&R.host.indexOf("@")>0?R.host.split("@"):!1;K&&(R.auth=K.shift(),R.hostname=K.shift(),R.host=R.hostname)}return F=F||R.host&&Y.length,F&&!ae&&Y.unshift(""),Y.length>0?R.pathname=Y.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=E.auth||R.auth,R.slashes=R.slashes||E.slashes,R.href=R.format(),R},i.prototype.parseHost=function(){var E=this.host,L=n.exec(E);L&&(L=L[0],L!==":"&&(this.port=L.substr(1)),E=E.substr(0,E.length-L.length)),E&&(this.hostname=E)},js.parse=C,js.resolve=b,js.resolveObject=y,js.format=g,js.Url=i,js}var ap={exports:{}},ix=ap.exports,Cb;function ox(){return Cb||(Cb=1,function(e){(function(i,t){e.exports?e.exports=t():i.xmlserializer=t()})(ix,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 w=v.value;return" "+v.name+'="'+t(w)+'"'},l=function(v){var w=v.tagName;return v.namespaceURI==="http://www.w3.org/1999/xhtml"&&(w=w.toLowerCase()),w},u=function(v,w){var p=Array.prototype.map.call(v.attributes||v.attrs,function(h){return h.name}).indexOf("xmlns")>=0;return!p&&(w||v.namespaceURI!==v.parentNode.namespaceURI)?' xmlns="'+v.namespaceURI+'"':""},c=function(v){return Array.prototype.map.call(v.childNodes,function(w){return x(w)}).join("")},d=function(v,w){var p="<"+l(v);return p+=u(v,w),Array.prototype.forEach.call(v.attributes||v.attrs,function(h){p+=a(h)}),v.childNodes.length>0?(p+=">",p+=c(v),p+="</"+l(v)+">"):p+="/>",p},m=function(v){var w=v.nodeValue||v.value||"";return n(w)},_=function(v){return"<!--"+v.data.replace(/-/g,"-")+"-->"},k=function(v){return"<![CDATA["+v.nodeValue+"]]>"},x=function(v,w){var p=w&&w.rootNode;if(v.nodeName==="#document"||v.nodeName==="#document-fragment")return c(v);if(v.tagName)return d(v,p);if(v.nodeName==="#text")return m(v);if(v.nodeName==="#comment")return _(v);if(v.nodeName==="#cdata-section")return k(v)};return{serializeToString:function(v){return i(x(v,{rootNode:!0}))}}})}(ap)),ap.exports}var W1={},kb;function ax(){if(kb)return W1;kb=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,d;for(c=0;c<t.length;c++)if(d=t[c].exec(u),d)return d[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 W1.failOnParseError=function(l){return a(l),l},W1}var Y1={},K1={},Ab;function Hp(){return Ab||(Ab=1,function(e){var i=d_();e.getDocumentBaseUrl=function(c){return c.baseURI!=="about:blank"?c.baseURI:null},e.clone=function(c){var d={},m;for(m in c)c.hasOwnProperty(m)&&(d[m]=c[m]);return d},e.cloneArray=function(c){return Array.prototype.slice.apply(c,[0])},e.joinUrl=function(c,d){return c?i.resolve(c,d):d},e.isDataUri=function(c){return/^data:/.test(c)},e.collectAndReportErrors=function(c){var d=[];return Promise.all(c.map(function(m){return m.catch(function(_){d.push(_)})})).then(function(){return d})};var t=null,n=function(c,d){return d===!1||d==="none"||d==="repeated"?((t===null||d!=="repeated")&&(t=Date.now()),c+"?_="+t):c};e.ajax=function(c,d){return new Promise(function(m,_){var k=new window.XMLHttpRequest,x=e.joinUrl(d.baseUrl,c),v,w=function(){_({msg:"Unable to load url",url:x})};v=n(x,d.cache),k.addEventListener("load",function(){k.status===200||k.status===0?m(k.response):w()},!1),k.addEventListener("error",w,!1);try{k.open("GET",v,!0),k.overrideMimeType(d.mimeType),k.send(null)}catch{w()}})},e.binaryAjax=function(c,d){var m=e.clone(d);return m.mimeType="text/plain; charset=x-user-defined",e.ajax(c,m).then(function(_){for(var k="",x=0;x<_.length;x++)k+=String.fromCharCode(_.charCodeAt(x)&255);return k})};var a=function(c){var d=function(m,_){return m.substring(0,_.length)===_};return d(c,"<?xml")||d(c,"<svg")?"image/svg+xml":"image/png"};e.getDataURIForImageURL=function(c,d){return e.binaryAjax(c,d).then(function(m){var _=btoa(m),k=a(m);return"data:"+k+";base64,"+_})};var l=[],u=function(c){return l.indexOf(c)<0&&l.push(c),l.indexOf(c)};e.memoize=function(c,d,m){if(typeof m!="object")throw new Error("cacheBucket is not an object");return function(){var _=Array.prototype.slice.call(arguments),k=d(_),x=u(c),v;return m[x]&&m[x][k]?m[x][k]:(v=c.apply(null,_),m[x]=m[x]||{},m[x][k]=v,v)}}}(K1)),K1}var X1={},Tb;function lx(){if(Tb)return X1;Tb=1;var e=Hp(),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 d=e.getDocumentBaseUrl(l.ownerDocument),m=e.clone(u);return!m.baseUrl&&d&&(m.baseUrl=d),e.getDataURIForImageURL(c,m).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 X1.inline=function(l,u){var c=a(l.getElementsByTagName("img")),d=a(l.getElementsByTagName("image")),m=n(l.getElementsByTagName("input"));c=c.concat(d),c=c.concat(m);var _=t(c);return e.collectAndReportErrors(_.map(function(k){return i(k,u).then(function(x){k.attributes.src?k.attributes.src.value=x:k.attributes["xlink:href"]?k.attributes["xlink:href"].value=x:k.attributes.href&&(k.attributes.href.value=x)})}))},X1}var Z1={},Rb;function sx(){if(Rb)return Z1;Rb=1;var e=Hp(),i=function(l,u){var c=l.attributes.src.value,d=e.getDocumentBaseUrl(l.ownerDocument),m=e.clone(u);return!m.baseUrl&&d&&(m.baseUrl=d),e.ajax(c,m).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(d){return i(d,u).then(function(m){n(d,m)})}))},Z1}var Q1={},J1={},Mb;function Lv(){return Mb||(Mb=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)}}(J1)),J1}var eg={},Lb;function ux(){return Lb||(Lb=1,function(e){var i=Lv(),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]+)",d="(?:\\s*"+c+")+",m="^\\s*("+d+")(?:\\s*,\\s*("+d+"))*\\s*$",_=new RegExp(d,"g"),k,x=[],v=function(w){var p=new RegExp(c,"g"),h=[],C;for(C=p.exec(w);C;)h.push(C[1]),C=p.exec(w);return h};if(l.match(new RegExp(m))){for(k=_.exec(l);k;)x.push(v(k[0])),k=_.exec(l);return x}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 d=a(c);return d?{preUrl:c.slice(0,d.idx),url:d.url,postUrl:c.slice(d.idx+1)}:{preUrl:c}})},e.serialize=function(l){var u=l.map(function(c){var d=[].concat(c.preUrl);return c.url&&d.push('url("'+c.url+'")'),c.postUrl&&(d=d.concat(c.postUrl)),d.join(" ")});return u.join(", ")}}(eg)),eg}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 tg={exports:{}},Nb;function cx(){return Nb||(Nb=1,function(e,i){(function(t){e.exports=t()})(function(){return function t(n,a,l){function u(m,_){if(!a[m]){if(!n[m]){var k=typeof ep=="function"&&ep;if(!_&&k)return k(m,!0);if(c)return c(m,!0);var x=new Error("Cannot find module '"+m+"'");throw x.code="MODULE_NOT_FOUND",x}var v=a[m]={exports:{}};n[m][0].call(v.exports,function(w){var p=n[m][1][w];return u(p||w)},v,v.exports,t,n,a,l)}return a[m].exports}for(var c=typeof ep=="function"&&ep,d=0;d<l.length;d++)u(l[d]);return u}({1:[function(t,n,a){function l(d,m){function _(){this.constructor=d}_.prototype=m.prototype,d.prototype=new _}function u(d,m,_,k){this.message=d,this.expected=m,this.found=_,this.location=k,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,u)}l(u,Error),u.buildMessage=function(d,m){var _={literal:function(C){return'"'+x(C.text)+'"'},class:function(C){var g="",b;for(b=0;b<C.parts.length;b++)g+=C.parts[b]instanceof Array?v(C.parts[b][0])+"-"+v(C.parts[b][1]):v(C.parts[b]);return"["+(C.inverted?"^":"")+g+"]"},any:function(C){return"any character"},end:function(C){return"end of input"},other:function(C){return C.description}};function k(C){return C.charCodeAt(0).toString(16).toUpperCase()}function x(C){return C.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(g){return"\\x0"+k(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+k(g)})}function v(C){return C.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(g){return"\\x0"+k(g)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(g){return"\\x"+k(g)})}function w(C){return _[C.type](C)}function p(C){var g=new Array(C.length),b,y;for(b=0;b<C.length;b++)g[b]=w(C[b]);if(g.sort(),g.length>0){for(b=1,y=1;b<g.length;b++)g[b-1]!==g[b]&&(g[y]=g[b],y++);g.length=y}switch(g.length){case 1:return g[0];case 2:return g[0]+" or "+g[1];default:return g.slice(0,-1).join(", ")+", or "+g[g.length-1]}}function h(C){return C?'"'+x(C)+'"':"end of input"}return"Expected "+p(d)+" but "+h(m)+" found."};function c(d,m){m=m!==void 0?m:{};var _={},k={start:ue},x=ue,v="",w=function(){return[]},p=",",h=V(",",!1),C=function(se,be){return[se].concat(be)},g=function(se){return[se]},b=function(se,be){return{url:se,format:be}},y=function(se){return{url:se}},E="url(",L=V("url(",!1),R=")",D=V(")",!1),O=function(se){return se},S="format(",T=V("format(",!1),M="local(",A=V("local(",!1),z=function(se){return{local:se}},U=/^[^)]/,Z=K([")"],!0,!1),X=function(se){return Te.extractValue(se.join(""))},J=/^[ \t\r\n\f]/,B=K([" "," ","\r",`
|
|
155
|
-
`,"\f"],!1,!1),N=0,F=[{line:1,column:1}],H=0,Y=[],ee;if("startRule"in m){if(!(m.startRule in k))throw new Error(`Can't start parsing from rule "`+m.startRule+'".');x=k[m.startRule]}function V(se,be){return{type:"literal",text:se,ignoreCase:be}}function K(se,be,xe){return{type:"class",parts:se,inverted:be,ignoreCase:xe}}function $(){return{type:"end"}}function ne(se){var be=F[se],xe;if(be)return be;for(xe=se-1;!F[xe];)xe--;for(be=F[xe],be={line:be.line,column:be.column};xe<se;)d.charCodeAt(xe)===10?(be.line++,be.column=1):be.column++,xe++;return F[se]=be,be}function re(se,be){var xe=ne(se),Ie=ne(be);return{start:{offset:se,line:xe.line,column:xe.column},end:{offset:be,line:Ie.line,column:Ie.column}}}function ie(se){N<H||(N>H&&(H=N,Y=[]),Y.push(se))}function ae(se,be,xe){return new u(u.buildMessage(se,be),se,be,xe)}function ue(){var se,be;return se=de(),se===_&&(se=N,be=v,be!==_&&(be=w()),se=be),se}function de(){var se,be,xe,Ie,at,gt;if(se=N,be=he(),be!==_){for(xe=[],Ie=Ce();Ie!==_;)xe.push(Ie),Ie=Ce();if(xe!==_)if(d.charCodeAt(N)===44?(Ie=p,N++):(Ie=_,ie(h)),Ie!==_){for(at=[],gt=Ce();gt!==_;)at.push(gt),gt=Ce();at!==_?(gt=de(),gt!==_?(be=C(be,gt),se=be):(N=se,se=_)):(N=se,se=_)}else N=se,se=_;else N=se,se=_}else N=se,se=_;return se===_&&(se=N,be=he(),be!==_&&(be=g(be)),se=be),se}function he(){var se;return se=Se(),se===_&&(se=fe()),se}function Se(){var se,be,xe,Ie;if(se=N,be=me(),be!==_){if(xe=[],Ie=Ce(),Ie!==_)for(;Ie!==_;)xe.push(Ie),Ie=Ce();else xe=_;xe!==_?(Ie=ke(),Ie!==_?(be=b(be,Ie),se=be):(N=se,se=_)):(N=se,se=_)}else N=se,se=_;return se===_&&(se=N,be=me(),be!==_&&(be=y(be)),se=be),se}function me(){var se,be,xe,Ie;return se=N,d.substr(N,4)===E?(be=E,N+=4):(be=_,ie(L)),be!==_?(xe=ge(),xe!==_?(d.charCodeAt(N)===41?(Ie=R,N++):(Ie=_,ie(D)),Ie!==_?(be=O(xe),se=be):(N=se,se=_)):(N=se,se=_)):(N=se,se=_),se}function ke(){var se,be,xe,Ie;return se=N,d.substr(N,7)===S?(be=S,N+=7):(be=_,ie(T)),be!==_?(xe=ge(),xe!==_?(d.charCodeAt(N)===41?(Ie=R,N++):(Ie=_,ie(D)),Ie!==_?(be=O(xe),se=be):(N=se,se=_)):(N=se,se=_)):(N=se,se=_),se}function fe(){var se,be,xe,Ie;return se=N,d.substr(N,6)===M?(be=M,N+=6):(be=_,ie(A)),be!==_?(xe=ge(),xe!==_?(d.charCodeAt(N)===41?(Ie=R,N++):(Ie=_,ie(D)),Ie!==_?(be=z(xe),se=be):(N=se,se=_)):(N=se,se=_)):(N=se,se=_),se}function ge(){var se,be,xe;if(se=N,be=[],U.test(d.charAt(N))?(xe=d.charAt(N),N++):(xe=_,ie(Z)),xe!==_)for(;xe!==_;)be.push(xe),U.test(d.charAt(N))?(xe=d.charAt(N),N++):(xe=_,ie(Z));else be=_;return be!==_&&(be=X(be)),se=be,se}function Ce(){var se;return J.test(d.charAt(N))?(se=d.charAt(N),N++):(se=_,ie(B)),se}var Te=t("../util");if(ee=x(),ee!==_&&N===d.length)return ee;throw ee!==_&&N<d.length&&ie($()),ae(Y,H<d.length?d.charAt(H):null,H<d.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 d;return c.url?(d='url("'+c.url+'")',c.format&&(d+=' format("'+c.format+'")')):d='local("'+c.local+'")',d}).join(", ")}},{"./grammar":1}],3:[function(t,n,a){var l=function(c){var d=/^[\t\r\f\n ]*(.+?)[\t\r\f\n ]*$/;return c.replace(d,"$1")},u=function(c){var d=/^"(.*)"$/,m=/^'(.*)'$/;return d.test(c)?c.replace(d,"$1"):m.test(c)?c.replace(m,"$1"):c};a.extractValue=function(c){return u(l(c))}},{}]},{},[2])(2)})}(tg)),tg.exports}var Ib;function fx(){return Ib||(Ib=1,function(e){var i=Hp(),t=Lv(),n=ux(),a=cx(),l=function(g,b,y){g.style.setProperty(b,y,g.style.getPropertyPriority(b))},u=function(g){return g.filter(function(b){return b.type===window.CSSRule.STYLE_RULE&&(b.style.getPropertyValue("background-image")||b.style.getPropertyValue("background"))})},c=function(g){var b=[];return g.forEach(function(y){y.style.getPropertyValue("background-image")?b.push({property:"background-image",value:y.style.getPropertyValue("background-image"),rule:y}):y.style.getPropertyValue("background")&&b.push({property:"background",value:y.style.getPropertyValue("background"),rule:y})}),b},d=function(g){return g.filter(function(b){return b.type===window.CSSRule.FONT_FACE_RULE&&b.style.getPropertyValue("src")})},m=function(g){return g.filter(function(b){return b.type===window.CSSRule.IMPORT_RULE&&b.href})},_=function(g){var b=[];return g.forEach(function(y,E){y.url&&!i.isDataUri(y.url)&&b.push(E)}),b},k=function(g){var b=[];return g.forEach(function(y,E){y.url&&!i.isDataUri(y.url)&&b.push(E)}),b};e.adjustPathsOfCssResources=function(g,b){var y=u(b),E=c(y),L=!1;return E.forEach(function(R){var D=n.parse(R.value),O=_(D),S;O.length>0&&(O.forEach(function(T){var M=D[T].url,A=i.joinUrl(g,M);D[T].url=A}),S=n.serialize(D),l(R.rule,R.property,S),L=!0)}),d(b).forEach(function(R){var D=R.style.getPropertyValue("src"),O,S;try{O=a.parse(D)}catch{return}S=k(O),S.length>0&&(S.forEach(function(T){var M=O[T].url,A=i.joinUrl(g,M);O[T].url=A}),t.changeFontFaceRuleSrc(b,R,a.serialize(O)),L=!0)}),m(b).forEach(function(R){var D=R.href,O=i.joinUrl(g,D);t.exchangeRule(b,R,"@import url("+O+");"),L=!0}),L};var x=function(g,b,y){var E=g.indexOf(b);g.splice(E,1),y.forEach(function(L,R){g.splice(E+R,0,L)})},v=function(g,b,y,E){var L=b.href,R;return L=t.unquoteString(L),R=i.joinUrl(E.baseUrl,L),y.indexOf(R)>=0?(x(g,b,[]),Promise.resolve([])):(y.push(R),i.ajax(L,E).then(function(D){var O=t.rulesForCssText(D);return e.loadCSSImportsForRules(O,y,E).then(function(S){return e.adjustPathsOfCssResources(L,O),x(g,b,O),S.errors})},function(D){throw{resourceType:"stylesheet",url:D.url,msg:"Unable to load stylesheet "+D.url}}))};e.loadCSSImportsForRules=function(g,b,y){var E=m(g),L=[],R=!1;return Promise.all(E.map(function(D){return v(g,D,b,y).then(function(O){L=L.concat(O),R=!0},function(O){L.push(O)})})).then(function(){return{hasChanges:R,errors:L}})};var w=function(g,b){var y=n.parse(g),E=_(y),L=!1;return i.collectAndReportErrors(E.map(function(R){var D=y[R].url;return i.getDataURIForImageURL(D,b).then(function(O){y[R].url=O,L=!0},function(O){throw{resourceType:"backgroundImage",url:O.url,msg:"Unable to load background-image "+O.url}})})).then(function(R){return{backgroundValue:n.serialize(y),hasChanges:L,errors:R}})},p=function(g,b){var y=u(g),E=c(y),L=[],R=!1;return Promise.all(E.map(function(D){return w(D.value,b).then(function(O){O.hasChanges&&(l(D.rule,D.property,O.backgroundValue),R=!0),L=L.concat(O.errors)})})).then(function(){return{hasChanges:R,errors:L}})},h=function(g,b){var y=!1,E,L;try{E=a.parse(g)}catch{E=[]}return L=k(E),i.collectAndReportErrors(L.map(function(R){var D=E[R],O=D.format||"woff";return i.binaryAjax(D.url,b).then(function(S){var T=btoa(S);D.url="data:font/"+O+";base64,"+T,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(E),hasChanges:y,errors:R}})},C=function(g,b){var y=d(g),E=[],L=!1;return Promise.all(y.map(function(R){var D=R.style.getPropertyValue("src");return h(D,b).then(function(O){O.hasChanges&&(t.changeFontFaceRuleSrc(g,R,O.srcDeclarationValue),L=!0),E=E.concat(O.errors)})})).then(function(){return{hasChanges:L,errors:E}})};e.loadAndInlineCSSResourcesForRules=function(g,b){var y=!1,E=[];return Promise.all([p,C].map(function(L){return L(g,b).then(function(R){y=y||R.hasChanges,E=E.concat(R.errors)})})).then(function(){return{hasChanges:y,errors:E}})}}(Q1)),Q1}var Db;function dx(){return Db||(Db=1,function(e){var i=Hp(),t=lx(),n=sx(),a=fx(),l=Lv(),u=function(h){return i.joinUrl(h,".")},c=function(h){var C=h.map(function(g,b){return b===h.length-1&&(g={baseUrl:u(g.baseUrl)}),JSON.stringify(g)});return C},d=function(h,C){return C.cache!==!1&&C.cache!=="none"&&C.cacheBucket?i.memoize(h,c,C.cacheBucket):h},m=function(h,C,g){var b=l.rulesForCssText(h);return a.loadCSSImportsForRules(b,C,g).then(function(y){return a.loadAndInlineCSSResourcesForRules(b,g).then(function(E){var L=y.errors.concat(E.errors),R=y.hasChanges||E.hasChanges;return R&&(h=l.cssRulesToText(b)),{hasChanges:R,content:h,errors:L}})})},_=function(h,C,g){var b=h.textContent,y=d(m,C);return y(b,g,C).then(function(E){return E.hasChanges&&(h.childNodes[0].nodeValue=E.content),i.cloneArray(E.errors)})},k=function(h){var C=h.getElementsByTagName("style");return Array.prototype.filter.call(C,function(g){return!g.attributes.type||g.attributes.type.value==="text/css"})};e.loadAndInlineStyles=function(h,C){var g=k(h),b=[],y=[],E;return E=i.clone(C),E.baseUrl=E.baseUrl||i.getDocumentBaseUrl(h),Promise.all(g.map(function(L){return _(L,E,y).then(function(R){b=b.concat(R)})})).then(function(){return b})};var x=function(h,C){var g=h.parentNode,b;C=C.trim(),C&&(b=h.ownerDocument.createElement("style"),b.type="text/css",b.appendChild(h.ownerDocument.createTextNode(C)),g.insertBefore(b,h)),g.removeChild(h)},v=function(h,C){return i.ajax(h,C).then(function(g){var b=l.rulesForCssText(g);return{content:g,cssRules:b}}).then(function(g){var b=a.adjustPathsOfCssResources(h,g.cssRules);return{content:g.content,cssRules:g.cssRules,hasChanges:b}}).then(function(g){return a.loadCSSImportsForRules(g.cssRules,[],C).then(function(b){return{content:g.content,cssRules:g.cssRules,hasChanges:g.hasChanges||b.hasChanges,errors:b.errors}})}).then(function(g){return a.loadAndInlineCSSResourcesForRules(g.cssRules,C).then(function(b){return{content:g.content,cssRules:g.cssRules,hasChanges:g.hasChanges||b.hasChanges,errors:g.errors.concat(b.errors)}})}).then(function(g){var b=g.content;return g.hasChanges&&(b=l.cssRulesToText(g.cssRules)),{content:b,errors:g.errors}})},w=function(h,C){var g=h.attributes.href.value,b=i.getDocumentBaseUrl(h.ownerDocument),y=i.clone(C);!y.baseUrl&&b&&(y.baseUrl=b);var E=d(v,C);return E(g,y).then(function(L){return{content:L.content,errors:i.cloneArray(L.errors)}})},p=function(h){var C=h.getElementsByTagName("link");return Array.prototype.filter.call(C,function(g){return g.attributes.rel&&g.attributes.rel.value==="stylesheet"&&(!g.attributes.type||g.attributes.type.value==="text/css")})};e.loadAndInlineCssLinks=function(h,C){var g=p(h),b=[];return Promise.all(g.map(function(y){return w(y,C).then(function(E){x(y,E.content+`
|
|
156
|
-
`),b=b.concat(E.errors)},function(E){b.push({resourceType:"stylesheet",url:E.url,msg:"Unable to load stylesheet "+E.url})})})).then(function(){return b})},e.loadAndInlineImages=t.inline,e.loadAndInlineScript=n.inline,e.inlineReferences=function(h,C){var g=[],b=[e.loadAndInlineImages,e.loadAndInlineStyles,e.loadAndInlineCssLinks];return C.inlineScripts!==!1&&b.push(e.loadAndInlineScript),Promise.all(b.map(function(y){return y(h,C).then(function(E){g=g.concat(E)})})).then(function(){return g})}}(Y1)),Y1}/*! 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 hx=op.exports,jb;function px(){return jb||(jb=1,function(e){(function(i,t){i===void 0&&window!==void 0&&(i=window),e.exports?e.exports=t(d_(),ox(),ax(),dx()):i.rasterizeHTML=t(i.url,i.xmlserializer,i.sanedomparsererror,i.inlineresources)})(hx,function(i,t,n,a){var l=function(w){var p={},h=[];p.joinUrl=function(b,y){return b?w.resolve(b,y):y},p.getConstantUniqueIdFor=function(b){return h.indexOf(b)<0&&h.push(b),h.indexOf(b)},p.clone=function(b){var y={},E;for(E in b)b.hasOwnProperty(E)&&(y[E]=b[E]);return y};var C=function(b){return typeof b=="object"&&b!==null},g=function(b){return C(b)&&Object.prototype.toString.apply(b).match(/\[object (Canvas|HTMLCanvasElement)\]/i)};return p.parseOptionalParameters=function(b){var y={canvas:null,options:{}};return b[0]==null||g(b[0])?(y.canvas=b[0]||null,y.options=p.clone(b[1])):y.options=p.clone(b[0]),y},p}(i),u=function(w){var p={},h=function(C,g,b){var y=C[g];return C[g]=function(){var E=Array.prototype.slice.call(arguments);return b.apply(this,[E,y])},y};return p.baseUrlRespectingXhr=function(C,g){var b=function(){var y=new C;return h(y,"open",function(E,L){var R=E.shift(),D=E.shift(),O=w.joinUrl(g,D);return L.apply(this,[R,O].concat(E))}),y};return b},p.finishNotifyingXhr=function(C){var g=0,b=0,y=!1,E,L=new Promise(function(D){E=function(){var O=g-b;O<=0&&y&&D({totalCount:g})}}),R=function(){var D=new C;return h(D,"send",function(O,S){return g+=1,S.apply(this,arguments)}),D.addEventListener("load",function(){b+=1,E()}),D};return R.waitForRequestsToFinish=function(){return y=!0,E(),L},R},p}(l),c=function(){var w={},p=function(R){return Array.prototype.slice.call(R)};w.addClassName=function(R,D){R.className+=" "+D},w.addClassNameRecursively=function(R,D){w.addClassName(R,D),R.parentNode!==R.ownerDocument&&w.addClassNameRecursively(R.parentNode,D)};var h=function(R,D){var O=R.parentStyleSheet,S=p(O.cssRules).indexOf(R);O.insertRule(D,S+1),O.deleteRule(S)},C=function(R,D){var O=R.cssText.replace(/^[^\{]+/,""),S=D+" "+O;h(R,S)},g=function(R){return p(R).reduce(function(D,O){return D+O.cssText},"")},b=function(R){R.textContent=g(R.sheet.cssRules)},y=function(R){var D=document.implementation.createHTMLDocument(""),O=document.createElement("style");O.textContent=R.textContent,D.body.appendChild(O),R.sheet=O.sheet},E=function(R){return"((?:^|[^.#:\\w])|(?=\\W))("+R.join("|")+")(?=\\W|$)"},L=function(R,D,O){var S=E(D);p(R.querySelectorAll("style")).forEach(function(T){typeof T.sheet>"u"&&y(T);var M=p(T.sheet.cssRules).filter(function(A){return A.selectorText&&new RegExp(S,"i").test(A.selectorText)});M.length&&(M.forEach(function(A){var z=A.selectorText.replace(new RegExp(S,"gi"),function(U,Z,X){return Z+O(X)});z!==A.selectorText&&C(A,z)}),b(T))})};return w.rewriteCssSelectorWith=function(R,D,O){L(R,[D],function(){return O})},w.lowercaseCssTypeSelectors=function(R,D){L(R,D,function(O){return O.toLowerCase()})},w.findHtmlOnlyNodeNames=function(R){var D=R.ownerDocument.createTreeWalker(R,NodeFilter.SHOW_ELEMENT),O={},S={},T;do T=D.currentNode.tagName.toLowerCase(),D.currentNode.namespaceURI==="http://www.w3.org/1999/xhtml"?O[T]=!0:S[T]=!0;while(D.nextNode());return Object.keys(O).filter(function(M){return!S[M]})},w}(),d=function(w){var p={},h=function(g){return Array.prototype.slice.call(g)},C={active:!0,hover:!0,focus:!1,target:!1};return p.fakeUserAction=function(g,b,y){var E=g.querySelector(b),L=":"+y,R="rasterizehtml"+y;E&&(C[y]?w.addClassNameRecursively(E,R):w.addClassName(E,R),w.rewriteCssSelectorWith(g,L,"."+R))},p.persistInputValues=function(g){var b=g.querySelectorAll("input"),y=g.querySelectorAll("textarea"),E=function(L){return L.type==="checkbox"||L.type==="radio"};h(b).filter(E).forEach(function(L){L.checked?L.setAttribute("checked",""):L.removeAttribute("checked")}),h(b).filter(function(L){return!E(L)}).forEach(function(L){L.setAttribute("value",L.value)}),h(y).forEach(function(L){L.textContent=L.value})},p.rewriteTagNameSelectorsToLowerCase=function(g){w.lowercaseCssTypeSelectors(g,w.findHtmlOnlyNodeNames(g))},p}(c),m=function(w,p,h,C){var g={},b=function(X,J,B,N){var F=X.createElement(J);return F.style.visibility="hidden",F.style.width=B+"px",F.style.height=N+"px",F.style.position="absolute",F.style.top=-1e4-N+"px",F.style.left=-1e4-B+"px",X.getElementsByTagName("body")[0].appendChild(F),F},y=function(X){return X>0?new Promise(function(J){setTimeout(J,X)}):Promise.resolve()};g.executeJavascript=function(X,J){return new Promise(function(B){var N=b(C.document,"iframe",J.width,J.height),F=X.outerHTML,H=[],Y=J.executeJsTimeout||0,ee=function(){C.document.getElementsByTagName("body")[0].removeChild(N)},V=function(){var re=N.contentDocument;B({document:re,errors:H,cleanUp:ee})},K=N.contentWindow.XMLHttpRequest,$=p.finishNotifyingXhr(K),ne=p.baseUrlRespectingXhr($,J.baseUrl);N.onload=function(){y(Y).then($.waitForRequestsToFinish).then(V)},N.contentDocument.open(),N.contentWindow.XMLHttpRequest=ne,N.contentWindow.onerror=function(re){H.push({resourceType:"scriptExecution",msg:re})},N.contentDocument.write("<!DOCTYPE html>"),N.contentDocument.write(F),N.contentDocument.close()})};var E=function(X,J,B){var N=X.createElement("iframe");return N.style.width=J+"px",N.style.height=B+"px",N.style.visibility="hidden",N.style.position="absolute",N.style.top=-1e4-B+"px",N.style.left=-1e4-J+"px",N.style.borderWidth=0,N.sandbox="allow-same-origin",N.scrolling="no",N},L=function(X,J,B){var N=Math.floor(X/B),F=Math.floor(J/B);return E(C.document,N,F)},R=function(X,J,B,N){return{width:Math.max(X.width*N,J),height:Math.max(X.height*N,B)}},D=function(X,J){var B=X.querySelector(J);if(B)return B;if(X.ownerDocument.querySelector(J)===X)return X;throw{message:"Clipping selector not found"}},O=function(X,J,B,N,F){var H=Math.max(X.scrollWidth,X.clientWidth),Y=Math.max(X.scrollHeight,X.clientHeight),ee,V,K,$,ne,re,ie,ae;return J?(re=D(X,J),ie=re.getBoundingClientRect(),ee=ie.top,V=ie.left,K=ie.width,$=ie.height):(ee=0,V=0,K=H,$=Y),ae=R({width:K,height:$},B,N,F),ne=C.getComputedStyle(X.ownerDocument.documentElement).fontSize,{left:V,top:ee,width:ae.width,height:ae.height,viewportWidth:H,viewportHeight:Y,rootFontSize:ne}},S=function(X,J){var B=X.tagName;return J.querySelector(B)},T=function(X){var J=X.tagName.toLowerCase();return J==="html"||J==="body"?X.outerHTML:'<body style="margin: 0;">'+X.outerHTML+"</body>"};g.calculateDocumentContentSize=function(X,J){return new Promise(function(B,N){var F=J.zoom||1,H;H=L(J.width,J.height,F),C.document.getElementsByTagName("body")[0].appendChild(H),H.onload=function(){var Y=H.contentDocument,ee;try{ee=O(S(X,Y),J.clip,J.width,J.height,F),B(ee)}catch(V){N(V)}finally{C.document.getElementsByTagName("body")[0].removeChild(H)}},H.contentDocument.open(),H.contentDocument.write("<!DOCTYPE html>"),H.contentDocument.write(T(X)),H.contentDocument.close()})},g.parseHtmlFragment=function(X){var J=C.document.implementation.createHTMLDocument("");J.documentElement.innerHTML=X;var B=J.querySelector("body").firstChild;if(!B)throw"Invalid source";return B};var M=function(X,J){var B=/<html((?:\s+[^>]*)?)>/im.exec(J),N=C.document.implementation.createHTMLDocument(""),F,H,Y,ee;if(B)for(F="<div"+B[1]+"></div>",N.documentElement.innerHTML=F,Y=N.querySelector("div"),H=0;H<Y.attributes.length;H++)ee=Y.attributes[H],X.documentElement.setAttribute(ee.name,ee.value)};g.parseHTML=function(X){var J=C.document.implementation.createHTMLDocument("");return J.documentElement.innerHTML=X,M(J,X),J};var A=function(X){try{return h.failOnParseError(X)}catch(J){throw{message:"Invalid source",originalError:J}}};g.validateXHTML=function(X){var J=new DOMParser,B=J.parseFromString(X,"application/xml");A(B)};var z=null,U=function(X,J){return J==="none"||J==="repeated"?((z===null||J!=="repeated")&&(z=Date.now()),X+"?_="+z):X},Z=function(X,J){return new Promise(function(B,N){var F=new window.XMLHttpRequest,H=w.joinUrl(J.baseUrl,X),Y=U(H,J.cache),ee=function(V){N({message:"Unable to load page",originalError:V})};F.addEventListener("load",function(){F.status===200||F.status===0?B(F.responseXML):ee(F.statusText)},!1),F.addEventListener("error",function(V){ee(V)},!1);try{F.open("GET",Y,!0),F.responseType="document",F.send(null)}catch(V){ee(V)}})};return g.loadDocument=function(X,J){return Z(X,J).then(function(B){return A(B)})},g}(l,u,n,window),_=function(w){var p={},h=function(S,T){return T?URL.createObjectURL(new Blob([S],{type:"image/svg+xml"})):"data:image/svg+xml;charset=utf-8,"+encodeURIComponent(S)},C=function(S){S instanceof Blob&&URL.revokeObjectURL(S)},g='<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1"><foreignObject></foreignObject></svg>',b=function(S){return new Promise(function(T,M){var A=document.createElement("canvas"),z=new Image;z.onload=function(){var U=A.getContext("2d");try{U.drawImage(z,0,0),A.toDataURL("image/png"),T(!0)}catch{T(!1)}},z.onerror=M,z.src=S})},y=function(){var S=h(g,!0);return b(S).then(function(T){return C(S),T?!1:b(h(g,!1)).then(function(M){return M})},function(){return!1})},E=function(){if(w.Blob)try{return new Blob(["<b></b>"],{type:"text/xml"}),!0}catch{}return!1},L=function(){return new Promise(function(S,T){E()&&w.URL?y().then(function(M){S(!M)},function(){T()}):S(!1)})},R,D=function(){return R===void 0&&(R=L()),R},O=function(S){return D().then(function(T){return h(S,T)})};return p.renderSvg=function(S){return new Promise(function(T,M){var A,z,U=function(){z.onload=null,z.onerror=null},Z=function(){A&&C(A)};z=new Image,z.onload=function(){U(),Z(),T(z)},z.onerror=function(){Z(),M()},O(S).then(function(X){A=X,z.src=A},M)})},p}(window),k=function(w,p,h,C){var g={},b=function(S,T){var M=T||1,A={width:S.width,height:S.height,"font-size":S.rootFontSize};return M!==1&&(A.style="transform:scale("+M+"); transform-origin: 0 0;"),A},y=function(S){var T,M,A,z;T=Math.round(S.viewportWidth),M=Math.round(S.viewportHeight),A=-S.left,z=-S.top;var U={x:A,y:z,width:T,height:M};return U},E=function(S){var T=S.style||"";S.style=T+"float: left;"},L=function(S){S.externalResourcesRequired=!0},R=function(){return'<style scoped="">html::-webkit-scrollbar { display: none; }</style>'},D=function(S){var T=Object.keys(S);return T.length?" "+T.map(function(M){return M+'="'+S[M]+'"'}).join(" "):""},O=function(S,T,M){var A=C.serializeToString(S);p.validateXHTML(A);var z=y(T);return E(z),L(z),'<svg xmlns="http://www.w3.org/2000/svg"'+D(b(T,M))+">"+R()+"<foreignObject"+D(z)+">"+A+"</foreignObject></svg>"};return g.getSvgForDocument=function(S,T,M){return h.rewriteTagNameSelectorsToLowerCase(S),O(S,T,M)},g.drawDocumentAsSvg=function(S,T){return["hover","active","focus","target"].forEach(function(M){T[M]&&h.fakeUserAction(S,T[M],M)}),p.calculateDocumentContentSize(S,T).then(function(M){return g.getSvgForDocument(S,M,T.zoom)})},g}(l,m,d,t),x=function(w,p,h,C,g,b){var y={},E=function(S){return{message:"Error rendering page",originalError:S}},L=function(S){return g.renderSvg(S).then(function(T){return{image:T,svg:S}},function(T){throw E(T)})},R=function(S,T){try{T.getContext("2d").drawImage(S,0,0)}catch(M){throw E(M)}},D=function(S,T,M){return C.drawDocumentAsSvg(S,M).then(L).then(function(A){return T&&R(A.image,T),A})},O=function(S,T){return p.executeJavascript(S,T).then(function(M){var A=M.document;return h.persistInputValues(A),{document:A,errors:M.errors,cleanUp:M.cleanUp}})};return y.rasterize=function(S,T,M){var A;return A=w.clone(M),A.inlineScripts=M.executeJs===!0,b.inlineReferences(S,A).then(function(z){return M.executeJs?O(S,M).then(function(U){return{element:U.document.documentElement,errors:z.concat(U.errors),cleanUp:U.cleanUp}}):{element:S,errors:z,cleanUp:function(){}}}).then(function(z){return D(z.element,T,M).then(function(U){return z.cleanUp(),{image:U.image,svg:U.svg,errors:z.errors}})})},y}(l,m,d,k,_,a),v=function(w,p,h){var C={},g=function(R,D){var O=300,S=200,T=R?R.width:O,M=R?R.height:S,A=D.width!==void 0?D.width:T,z=D.height!==void 0?D.height:M;return{width:A,height:z}},b=function(R){var D=g(R.canvas,R.options),O;return O=w.clone(R.options),O.width=D.width,O.height=D.height,O};C.drawDocument=function(){var R=arguments[0],D=Array.prototype.slice.call(arguments,1),O=w.parseOptionalParameters(D),S=R.documentElement?R.documentElement:R;return h.rasterize(S,O.canvas,b(O))};var y=function(R,D,O){var S=p.parseHTML(R);return C.drawDocument(S,D,O)};C.drawHTML=function(){var R=arguments[0],D=Array.prototype.slice.call(arguments,1),O=w.parseOptionalParameters(D);return y(R,O.canvas,O.options)};var E=function(R,D,O){var S=document.implementation.createHTMLDocument("");S.replaceChild(R.documentElement,S.documentElement);var T=O?w.clone(O):{};return O.baseUrl||(T.baseUrl=D),{document:S,options:T}},L=function(R,D,O){return p.loadDocument(R,O).then(function(S){var T=E(S,R,O);return C.drawDocument(T.document,D,T.options)})};return C.drawURL=function(){var R=arguments[0],D=Array.prototype.slice.call(arguments,1),O=w.parseOptionalParameters(D);return L(R,O.canvas,O.options)},C}(l,m,x);return v})}(op)),op.exports}var Fb;function h_(){return Fb||(Fb=1,function(e){var i=Va&&Va.__createBinding||(Object.create?function(y,E,L,R){R===void 0&&(R=L);var D=Object.getOwnPropertyDescriptor(E,L);D&&!("get"in D?!E.__esModule:D.writable||D.configurable)||(D={enumerable:!0,get:function(){return E[L]}}),Object.defineProperty(y,R,D)}:function(y,E,L,R){R===void 0&&(R=L),y[R]=E[L]}),t=Va&&Va.__setModuleDefault||(Object.create?function(y,E){Object.defineProperty(y,"default",{enumerable:!0,value:E})}:function(y,E){y.default=E}),n=Va&&Va.__importStar||function(){var y=function(E){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(E)};return function(E){if(E&&E.__esModule)return E;var L={};if(E!=null)for(var R=y(E),D=0;D<R.length;D++)R[D]!=="default"&&i(L,E,R[D]);return t(L,E),L}}();Object.defineProperty(e,"__esModule",{value:!0}),e.prerenderFont=e.resetStyleContent=void 0,e.isContentWrapping=v,e.detectSize=w,e.htmlToCanvas=b;const a=n(px()),l=Bd(),u=i_();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 d;const m=()=>(d||(d=document.createElement("div"),d.id="polotno-hidden-do-not-touch",d.style.overflow="hidden",d.style.position="relative",document.body.appendChild(d),d.innerHTML=`<style>#polotno-hidden-do-not-touch {${e.resetStyleContent}}</style>`),d),_=new Map,k=navigator.userAgent.includes("Firefox"),x=async y=>{if(_.has(y))return _.get(y);const E=(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=m();D.appendChild(R);const O=k?180:50;await new Promise(S=>setTimeout(S,O)),D.removeChild(R)})();return _.set(y,E),E};function v({html:y}){const E=document.createElement("div");E.innerHTML=y,E.style.display="inline-block",E.style.position="fixed",E.style.top="0px",E.style.left="0px",E.style.zIndex="1000",E.style.whiteSpace="nowrap",E.style.visibility="hidden";const L=m();L.appendChild(E);const R=E.textContent,D=E.childNodes[0],O=R.split(/\s+/);let S=!1;for(let T=0;T<O.length;T++){const M=O[T];if(D.textContent=M,S=D.scrollWidth>E.clientWidth,S)break}return L.removeChild(E),S}function w(y){y.indexOf("Avellino");const E=document.createElement("div");E.innerHTML=y,E.style.display="inline-block",E.style.position="fixed",E.style.top="0px",E.style.left="0px",E.style.zIndex="1000";const L=m();L.appendChild(E);const R=E.getBoundingClientRect();return L.removeChild(E),{width:R.width,height:R.height}}e.prerenderFont=x;const p={};function h(y){const E=[];for(const L of document.styleSheets)try{for(const R of L.cssRules)R instanceof CSSFontFaceRule&&R.style.fontFamily.replace(/['"]/g,"")===y&&E.push(R)}catch(R){console.warn(`Could not access stylesheet: ${L.href}`,R)}return E}const C={},g=y=>{if(C[y])return C[y];const E=h(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 C[y]=E,E};async function b({html:y,width:E,height:L,fontFamily:R,padding:D,font:O,pixelRatio:S}){if(R!=="Arial"&&!O){const z=(0,l.getGoogleFontsVariants)();y+=`<link type="text/css" href="https://fonts.googleapis.com/css?family=${R}:${z}" rel="stylesheet">`}if(O){const z=O.styles||(O.url?[{src:`url("${O.url}")`}]:g(R));y+="<style>",z.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 T=document.createElement("canvas"),M=await a.drawHTML(`<div style="padding: ${D}px;">${y}</div>`,T,{width:E+2*D,height:L+2*D,cacheBucket:p});(0,u.trySetCanvasSize)(T,(E+2*D)*S,(L+2*D)*S);const A=T.getContext("2d");return A==null||A.drawImage(M.image,0,0,T.width,T.height),T}}(Va)),Va}var Zu={},ng={},zb;function p_(){return zb||(zb=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.keyframes=e.glob=e.extractCss=void 0,e.css=k,e.setup=C,e.styled=g;let i={data:""},t=b=>typeof window=="object"?((b?b.querySelector("#_goober"):window._goober)||Object.assign((b||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:b||i,n=b=>{let y=t(b),E=y.data;return y.data="",E},a=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,l=/\/\*[^]*?\*\/|\s\s+|\n/g,u=(b,y)=>{let E="",L="",R="";for(let D in b){let O=b[D];D[0]=="@"?D[1]=="i"?E=D+" "+O+";":L+=D[1]=="f"?u(O,D):D+"{"+u(O,D[1]=="k"?"":y)+"}":typeof O=="object"?L+=u(O,y?y.replace(/([^,])+/g,S=>D.replace(/(^:.*)|([^,])+/g,T=>/&/.test(T)?T.replace(/&/g,S):S?S+" "+T:T)):D):O!=null&&(D=D.replace(/[A-Z]/g,"-$&").toLowerCase(),R+=u.p?u.p(D,O):D+":"+O+";")}return E+(y&&R?y+"{"+R+"}":R)+L},c={},d=b=>{if(typeof b=="object"){let y="";for(let E in b)y+=E+d(b[E]);return y}return b},m=(b,y,E,L,R)=>{let D=d(b),O=c[D]||(c[D]=(S=>{let T=0,M=11;for(;T<S.length;)M=101*M+S.charCodeAt(T++)>>>0;return"go"+M})(D));if(!c[O]){let S=D!==b?b:(T=>{let M,A=[{}];for(;M=a.exec(T.replace(l,""));)M[4]?A.shift():M[3]?A.unshift(A[0][M[3]]=A[0][M[3]]||{}):A[0][M[1]]=M[2];return A[0]})(b);c[O]=u(R?{["@keyframes "+O]:S}:S,E?"":"."+O)}return((S,T,M)=>{T.data.indexOf(S)==-1&&(T.data=M?S+T.data:T.data+S)})(c[O],y,L),O},_=(b,y,E)=>b.reduce((L,R,D)=>{let O=y[D];if(O&&O.call){let S=O(E),T=S&&S.props&&S.props.className||/^go/.test(S)&&S;O=T?"."+T:S&&typeof S=="object"?S.props?"":u(S,""):S===!1?"":S}return L+R+(O??"")},"");function k(b){let y=this||{},E=b.call?b(y.p):b;return m(E.unshift?E.raw?_(E,[].slice.call(arguments,1),y.p):E.reduce((L,R)=>Object.assign(L,R&&R.call?R(y.p):R),{}):E,t(y.target),y.g,y.o,y.k)}e.extractCss=n;let x,v,w,p=k.bind({g:1}),h=k.bind({k:1});function C(b,y,E,L){u.p=y,x=b,v=E,w=L}function g(b,y){let E=this||{};return function(){let L=arguments;function R(D,O){let S=Object.assign({},D),T=S.className||R.className;E.p=Object.assign({theme:v&&v()},S),E.o=/ *go\d+/.test(T),S.className=k.apply(E,L)+(T?" "+T:""),y&&(S.ref=O);let M=b;return b[0]&&(M=S.as||b,delete S.as),w&&M[0]&&w(S),x(M,S)}return y?y(R):R}}e.glob=p,e.keyframes=h}(ng)),ng}var Bb;function gx(){if(Bb)return Zu;Bb=1;var e=Zu&&Zu.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Zu,"__esModule",{value:!0});const i=e(An()),t=p_();return(0,t.setup)(i.default.createElement),Zu.default=t.styled,Zu}var Ub;function vx(){return Ub||(Ub=1,function(e){var i=So&&So.__createBinding||(Object.create?function(B,N,F,H){H===void 0&&(H=F);var Y=Object.getOwnPropertyDescriptor(N,F);Y&&!("get"in Y?!N.__esModule:Y.writable||Y.configurable)||(Y={enumerable:!0,get:function(){return N[F]}}),Object.defineProperty(B,H,Y)}:function(B,N,F,H){H===void 0&&(H=F),B[H]=N[F]}),t=So&&So.__setModuleDefault||(Object.create?function(B,N){Object.defineProperty(B,"default",{enumerable:!0,value:N})}:function(B,N){B.default=N}),n=So&&So.__importStar||function(){var B=function(N){return B=Object.getOwnPropertyNames||function(F){var H=[];for(var Y in F)Object.prototype.hasOwnProperty.call(F,Y)&&(H[H.length]=Y);return H},B(N)};return function(N){if(N&&N.__esModule)return N;var F={};if(N!=null)for(var H=B(N),Y=0;Y<H.length;Y++)H[Y]!=="default"&&i(F,N,H[Y]);return t(F,N),F}}(),a=So&&So.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLElement=e.setQuillContent=e.createQuill=e.quillRef=void 0;const l=a(An()),u=Qi,c=Ja,d=a(xO()),m=a(Ji()),_=n(da),k=ts(),x=jp(),v=n_(),w=zd(),p=h_(),h=yc(),C=bc(),g=Fd,b=a(gx()),y=Ks(),E=n4(),L=n(Bd()),R=Xs(),D=t_();e.quillRef=_.observable({enabled:!1,currentFormat:{},editor:_.observable.object({instance:null},{},{deep:!1})});const O=(0,b.default)("div",l.default.forwardRef)`
|
|
207
|
-
.ql-editor {
|
|
208
|
-
outline: none;
|
|
209
|
-
}
|
|
210
|
-
${p.resetStyleContent}
|
|
211
|
-
strong {
|
|
212
|
-
font-weight: 700;
|
|
213
|
-
}
|
|
214
|
-
.ql-direction-rtl {
|
|
215
|
-
direction: rtl;
|
|
216
|
-
}
|
|
217
|
-
`,S=B=>new d.default(B,{toolbar:!1,keyboard:!1,clipboard:{matchVisual:!1},formats:["bold","color","font","italic","size","strike","underline","indent","list","direction"]});e.createQuill=S;const T=(B,N)=>{var F=B.clipboard.convert("<div class='ql-editor' style='outline: none;'>"+N+"<p><br></p></div>");B.setContents(F),B.history.clear()};e.setQuillContent=T;const M=({html:B,onBlur:N,onChange:F,element:H})=>{const Y=l.default.useRef(null);l.default.useEffect(()=>{if(!Y.current)return;const V=(0,e.createQuill)(Y.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 K;const $=(K=Y.current)===null||K===void 0?void 0:K.childNodes[0];F($.innerHTML)},10)}),V.setSelection(0,0,"api"),V.on("selection-change",K=>{K||N(),K&&_.runInAction(()=>{e.quillRef.currentFormat=V.getFormat()})}),Y.current.childNodes[0].addEventListener("blur",K=>{var $;!(($=K.relatedTarget)===null||$===void 0)&&$.classList.contains("ql-clipboard")||N()}),()=>{_.runInAction(()=>{e.quillRef.editor.instance=null,e.quillRef.currentFormat={}}),delete window.__polotnoQuill}},[]),l.default.useEffect(()=>{var V;const K=e.quillRef.editor.instance;if(!K)return;const $=K.getSelection();((V=Y.current)===null||V===void 0?void 0:V.childNodes[0].innerHTML)===H.text||((0,e.setQuillContent)(K,B),$&&(K.setSelection($.index,$.length),_.runInAction(()=>{e.quillRef.currentFormat=K.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(O,{ref:Y,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,E.removeTags)(H.text))})};function A(B,N,F){return l.default.useMemo(()=>(0,p.detectSize)(B),[B,N.width,F])}function z(B){const N=B.getContext("2d").getImageData(0,0,B.width,B.height).data;for(let F=0;F<N.length;F+=4)if(N[F+3]!==0)return!0;return!1}function U(B){return!z(B)}function Z(B,{fontFamily:N="",color:F="black"}={}){let H=`color: ${F||B.fill}`;return B.fill.indexOf("gradient")>=0&&(H=`
|
|
218
|
-
background-color: ${F};
|
|
219
|
-
background-image: ${B.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(B.width||100)}px`,H,`font-size: ${B.fontSize}px`,`font-family: '${N}'`,`text-align: ${B.align}`,B.textDecoration?`text-decoration: ${B.textDecoration}`:"",B.lineHeight?`line-height: ${B.lineHeight}`:"",B.letterSpacing?`letter-spacing: ${B.letterSpacing}rem`:"",B.fontStyle?`font-style: ${B.fontStyle}`:"",B.fontWeight?`font-weight: ${B.fontWeight}`:"",B.strokeWidth?`-webkit-text-stroke: ${B.strokeWidth}px ${B.stroke}`:"",B.strokeWidth?"paint-order: stroke fill":""].filter(Boolean).join("; ")}" contentEditable dir="${(0,v.getDir)((0,E.removeTags)(B.text))}">${B.text.replaceAll(`
|
|
227
|
-
`,"</br>")}</div>`}const X=B=>{let N=B.fontSize;for(let F=1;F<50;F++){const H=Z(Object.assign(Object.assign({},B.toJSON()),{fontSize:N}),{fontFamily:B.fontFamily}),{height:Y}=(0,p.detectSize)(H),ee=B.height&&Y>B.height,V=(0,p.isContentWrapping)({html:H});if(!(ee||V))break;N-=.5}return N},J=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);e.HTMLElement=(0,u.observer)(({element:B,store:N})=>{const F=l.default.useRef(null),[H,Y]=l.default.useState(),[ee,V]=l.default.useState(!1),[K,$]=l.default.useState(!0),[ne,re]=l.default.useState(!1),ie=l.default.useRef(B.height),ae=N.selectedShapes.indexOf(B)>=0,ue=B.fontSize/3,{textVerticalResizeEnabled:de}=k.flags,he=(0,v.usePrevious)(B.fontFamily),[Se]=(0,v.useFontLoader)(N,B.fontFamily),me=B._editModeEnabled;(0,h.useFadeIn)(F);const ke=Se?B.fontFamily:he!==B.fontFamily?he:"Arial",fe=(0,w.useColor)(B).fill,ge=Z(B,{fontFamily:ke,color:fe}),{width:Ce,height:Te}=A(ge,B,Se);l.default.useEffect(()=>{if(!Se)return;if(!B.height)return void B.set({height:Te});const{textOverflow:je}=k.flags;if(je!=="change-font-size"||ee)je==="resize"&&(de&&B.height<Te&&N.history.ignore(()=>{B.set({height:Te})}),de||B.height===Te||N.history.ignore(()=>{B.set({height:Te})}));else{const ze=X(B);ze!==B.fontSize?N.history.ignore(()=>{B.set({fontSize:ze})}):B.height!==Te&&(de&&B.height<Te?N.history.ignore(()=>{B.set({height:Te})}):de||N.history.ignore(()=>{B.set({height:Te})}))}});const se=l.default.useRef(0),be=l.default.useMemo(()=>{const je={lastArgs:null,lastResult:null};return async function(ze){return je.lastArgs&&je.lastResult&&(He=je.lastArgs,Xe=ze,JSON.stringify(He)===JSON.stringify(Xe))||(je.lastResult=await(0,p.htmlToCanvas)(ze),je.lastArgs=Object.assign({},ze)),je.lastResult;var He,Xe}},[]);l.default.useEffect(()=>{ee||me||(async()=>{se.current++;const je=se.current,ze=(0,y.incrementLoader)(`text ${B.id}`);$(!0);let He=null;const Xe=J?5:1;for(let et=0;et<Xe;et++){if(He=await(et>0?be:p.htmlToCanvas)({skipCache:et>0,html:ge,width:B.width||1,height:B.height||Te||1,fontFamily:ke,padding:ue,pixelRatio:N._elementsPixelRatio,font:N.fonts.find(wt=>wt.fontFamily===ke)||L.globalFonts.find(wt=>wt.fontFamily===ke)}),je!==se.current)return void ze();U(He)&&J&&await new Promise(wt=>setTimeout(wt,50*(et+1)))}He?(Y(He),$(!1),m.default.Util.requestAnimFrame(ze)):ze()})()},[ge,ee,Te,me,ke,B.height,N._elementsPixelRatio,Se]);const xe=ee||K;l.default.useEffect(()=>_.autorun(()=>{const je=F.current;(0,x.applyFilter)(je,B)}),[H,xe,B.shadowColor,B.shadowOffsetX,B.shadowOffsetY,B.shadowOpacity]);let Ie=0;B.verticalAlign==="middle"&&(Ie=(B.height-Te)/2),B.verticalAlign==="bottom"&&(Ie=B.height-Te);const at=(0,v.getLineHeight)({fontLoaded:Se,fontFamily:B.fontFamily,fontSize:B.fontSize,lineHeight:B.lineHeight}),gt=(0,R.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,l.default.createElement(c.Rect,{x:B.a.x,y:B.a.y,offsetX:B.backgroundPadding*(B.fontSize*at*.5),offsetY:B.backgroundPadding*(B.fontSize*at*.5),rotation:B.a.rotation,hideInExport:!B.showInExport,listening:!1,visible:B.backgroundEnabled,opacity:B.backgroundOpacity*B.a.opacity,fill:B.backgroundColor,width:B.a.width+B.backgroundPadding*(B.fontSize*at),height:B.a.height+B.backgroundPadding*(B.fontSize*at),cornerRadius:B.backgroundCornerRadius*(B.fontSize*at*.5)}),l.default.createElement(c.Rect,{ref:F,name:"element",x:B.a.x,y:B.a.y,listening:B.selectable,rotation:B.a.rotation,width:B.a.width,height:B.a.height,visible:!xe,draggable:gt?B.draggable&&ae:B.draggable,preventDefault:!gt||ae,opacity:me?0:B.a.opacity,hideInExport:!B.showInExport,onMouseEnter:()=>{re(!0)},onMouseLeave:()=>{re(!1)},onDragMove:je=>{B.set({x:je.target.x(),y:je.target.y()})},onDragEnd:je=>{B.set({x:je.target.x(),y:je.target.y()})},id:B.id,onDblClick:()=>{B.contentEditable&&B.toggleEditMode(!0)},onDblTap:()=>{B.contentEditable&&B.toggleEditMode(!0)},onTransformStart:je=>{V(!0),ie.current=B.height},onTransform:je=>{var ze;const He=je.target,Xe=((ze=He.getStage())===null||ze===void 0?void 0:ze.findOne("Transformer")).getActiveAnchor(),et=Xe==="middle-left"||Xe==="middle-right",Pt=Xe==="top-center"||Xe==="bottom-center",wt=He.scaleX();if(et){const we=He.scaleX(),Ee=Math.max(He.width()*we,B.fontSize);if(He.width(Ee),He.scaleX(1),k.flags.textVerticalResizeEnabled){const vt=Math.max(Te,ie.current);B.set({height:vt})}B.set({width:Ee,x:He.x(),y:He.y()})}else if(Pt){let we=k.flags.textOverflow==="resize"?Te:B.lineHeight*B.fontSize;const Ee=Math.max(we,je.target.height()*je.target.scaleY());He.scaleY(1),B.set({x:He.x(),y:He.y(),height:Ee,rotation:He.rotation()})}else He.scaleX(1),He.scaleY(1),B.set({fontSize:B.fontSize*wt,width:He.width()*wt,x:He.x(),y:He.y(),rotation:He.rotation(),height:He.height()*wt})},onTransformEnd:je=>{V(!1),$(!0);const ze=je.target.scaleX();je.target.scaleX(1),je.target.scaleY(1),B.set({fontSize:B.fontSize*ze,width:je.target.width()*ze,x:je.target.x(),y:je.target.y(),rotation:je.target.rotation(),shadowBlur:B.shadowBlur*ze,shadowOffsetX:B.shadowOffsetX*ze,shadowOffsetY:B.shadowOffsetY*ze,strokeWidth:B.strokeWidth*ze})}}),l.default.createElement(c.Image,{ref:F,image:H,x:B.a.x,y:B.a.y,offsetX:ue,offsetY:ue-Ie,listening:!1,rotation:B.rotation,width:B.a.width+2*ue,height:B.a.height+2*ue,visible:!xe,opacity:me?0:B.a.opacity,shadowEnabled:B.shadowEnabled,shadowBlur:B.shadowBlur,shadowOffsetX:B.shadowOffsetX,shadowOffsetY:B.shadowOffsetY,shadowColor:B.shadowColor,shadowOpacity:B.shadowOpacity,hideInExport:!B.showInExport}),xe&&l.default.createElement(c.Group,{x:B.a.x,y:B.a.y,rotation:B.rotation,offsetY:-Ie},l.default.createElement(g.Html,{divProps:{style:{pointerEvents:"none"}}},l.default.createElement(O,{dangerouslySetInnerHTML:{__html:ge},style:{pointerEvents:"none",display:"inline-block"}}))),me&&l.default.createElement(c.Group,{x:B.a.x,y:B.a.y,rotation:B.rotation,offsetY:-Ie},l.default.createElement(g.Html,null,l.default.createElement(M,{html:ge,element:B,onChange:je=>{const ze=(0,D.getLimitedFontSize)({oldText:(0,E.removeTags)(B.text),newText:(0,E.removeTags)(je),element:B});B.set({text:je,fontSize:ze})},onBlur:je=>{B.toggleEditMode(!1)}}))),(ae||ne)&&l.default.createElement(C.Highlighter,{element:B}))})}(So)),So}var fd={},dd={},rg={},qb;function Hd(){return qb||(qb=1,function(e){function i(d){return d/180*Math.PI}function t(d,m,_,k,x){const v=Math.sqrt(_*_+k*k);return x+=Math.atan2(k,_),{x:d+v*Math.cos(x),y:m+v*Math.sin(x)}}function n(d){const{x:m,y:_,width:k,height:x}=d,v=i(d.rotation),w=t(m,_,0,0,v),p=t(m,_,k,0,v),h=t(m,_,k,x,v),C=t(m,_,0,x,v),g=Math.min(w.x,p.x,h.x,C.x),b=Math.min(w.y,p.y,h.y,C.y),y=Math.max(w.x,p.x,h.x,C.x),E=Math.max(w.y,p.y,h.y,C.y);return{x:g,y:b,width:y-g,height:E-b,minX:g,minY:b,maxX:y,maxY:E}}function a(d){const m=d.map(w=>n(w)),_=Math.min(...m.map(w=>w.minX)),k=Math.min(...m.map(w=>w.minY)),x=Math.max(...m.map(w=>w.maxX)),v=Math.max(...m.map(w=>w.maxY));return{x:_,y:k,width:x-_,height:v-k,minX:_,minY:k,maxX:x,maxY:v}}function l(d){const m=i(d.rotation||0);return{x:d.x+d.width/2*Math.cos(m)+d.height/2*Math.sin(-m),y:d.y+d.height/2*Math.cos(m)+d.width/2*Math.sin(m)}}function u(d,m,_){const k=i(m),x=_.x+(d.x-_.x)*Math.cos(k)-(d.y-_.y)*Math.sin(k),v=_.y+(d.x-_.x)*Math.sin(k)+(d.y-_.y)*Math.cos(k);return Object.assign(Object.assign({},d),{rotation:d.rotation+m,x,y:v})}function c(d,m){return u(d,m,l(d))}Object.defineProperty(e,"__esModule",{value:!0}),e.degToRad=i,e.getClientRect=n,e.getTotalClientRect=a,e.getCenter=l,e.rotateAroundPoint=u,e.rotateAroundCenter=c}(rg)),rg}var Hb;function g_(){return Hb||(Hb=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=x;const t=i(An()),n=i(Ji()),a=Hd();var l=5;let u=({targetKonvaNodes:v,guideKonvaNode:w,distance:p,snapDirection:h})=>p<l;const c=v=>{u=v};function d(v){const w=v.__getNodeRect(),p=(0,a.getClientRect)(Object.assign(Object.assign({},w),{rotation:n.default.Util.radToDeg(w.rotation)})),h=v.getAbsolutePosition();return{vertical:[{guide:p.x,offset:h.x-p.x,snap:"start",nodes:v.nodes()},{guide:p.x+p.width/2,offset:h.x-p.x-p.width/2,snap:"center",nodes:v.nodes()},{guide:p.x+p.width,offset:h.x-p.x-p.width,snap:"end",nodes:v.nodes()}],horizontal:[{guide:p.y,offset:h.y-p.y,snap:"start",nodes:v.nodes()},{guide:p.y+p.height/2,offset:h.y-p.y-p.height/2,snap:"center",nodes:v.nodes()},{guide:p.y+p.height,offset:h.y-p.y-p.height,snap:"end",nodes:v.nodes()}]}}function m(v,w){var p=[],h=[];v.vertical.forEach(L=>{w.vertical.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})})}),v.horizontal.forEach(L=>{w.horizontal.forEach(R=>{var D=Math.abs(L.offset-R.guide);u({targetKonvaNodes:R.nodes,guideKonvaNode:L.node,distance:D,snapDirection:L.snap})&&h.push({lineGuide:L.offset,diff:D,snap:R.snap,offset:R.offset})})});var C=[];const g=p.sort((L,R)=>L.diff-R.diff),b=h.sort((L,R)=>L.diff-R.diff);var y=g[0],E=b[0];return y&&g.filter(L=>Math.abs(L.diff-y.diff)<.1).forEach(L=>{C.push(Object.assign({orientation:"V"},L))}),E&&b.filter(L=>Math.abs(L.diff-E.diff)<.1).forEach(L=>{C.push(Object.assign({orientation:"H"},L))}),C}function _(v,w){const p=t.default.useRef(),h=L=>L.hasName("element")||L.hasName("page-background")||!p.current&&L.hasName("elements-area");function C(L){var R;const D=(R=v.current)===null||R===void 0?void 0:R.getStage(),O=[],S=[];return D.find(h).forEach(T=>{if(!(L.indexOf(T)>=0)){var M=T.getClientRect({skipShadow:!0,skipStroke:!0});O.push({offset:M.x,node:T,snap:"start"},{offset:M.x+M.width,node:T,snap:"end"},{offset:M.x+M.width/2,node:T,snap:"center"}),S.push({offset:M.y,node:T,snap:"start"},{offset:M.y+M.height,node:T,snap:"end"},{offset:M.y+M.height/2,node:T,snap:"center"})}}),{vertical:O,horizontal:S}}function g(L){var R;const D=(R=v.current)===null||R===void 0?void 0:R.getLayer(),O=D==null?void 0:D.children.find(S=>S.name()==="line-guides");L.forEach(S=>{if(S.orientation==="H"){var T=new n.default.Line({points:[-6e3,S.lineGuide,6e3,S.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});O==null||O.add(T),D.batchDraw()}else S.orientation==="V"&&(T=new n.default.Line({points:[S.lineGuide,-6e3,S.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),O==null||O.add(T))})}const b=L=>{const R=L.target.getLayer().children.find(A=>A.name()==="line-guides");R==null||R.destroyChildren();var D=m(C(L.target.nodes()),d(L.target));if(!D.length)return;g(D);const O=L.target.getAbsolutePosition(),S=(L.target.nodes().map(A=>A.getAbsolutePosition()),Object.assign({},O));D.forEach(A=>{switch(A.snap){case"start":case"center":case"end":switch(A.orientation){case"V":S.x=A.lineGuide+A.offset;break;case"H":S.y=A.lineGuide+A.offset}}});const T=S.x-O.x,M=S.y-O.y;L.evt.ctrlKey||L.evt.metaKey||L.target.nodes().forEach(A=>{const z=A.getAbsolutePosition();A.setAbsolutePosition({x:z.x+T,y:z.y+M})})},y=(L,R,D)=>{const O=v.current,S=O.getLayer(),T=S.children.find(X=>X.name()==="line-guides");if(T==null||T.destroyChildren(),O.getActiveAnchor()==="rotater"||Math.sqrt(Math.pow(R.x-L.x,2)+Math.pow(R.y-L.y,2))>50||!S)return R;var M=m(C(O.nodes()),{vertical:[{guide:R.x,offset:0,snap:"start",nodes:O.nodes()}],horizontal:[{guide:R.y,offset:0,snap:"start",nodes:O.nodes()}]});if(!M.length||(g(M),D.ctrlKey||D.metaKey))return R;let A=R.x,z=R.x;M.forEach(X=>{switch(X.orientation){case"V":A=X.lineGuide;break;case"H":z=X.lineGuide}});const U=Math.abs(R.x-A)<10,Z=Math.abs(R.y-z)<10;return U&&!Z?{x:A,y:L.y}:Z&&!U?{x:L.x,y:z}:U&&Z?{x:A,y:z}:R},E=L=>{if(!L.target)return;const R=L.target.getLayer(),D=R.children.find(O=>O.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(([O,S])=>S.node instanceof n.default.Transformer);D&&(R.splice(R.indexOf(D),1),R.unshift(D),n.default.DD._dragElements.clear(),R.forEach(([O,S])=>{n.default.DD._dragElements.set(O,S)}))})}),v.current.on("dragmove",b),v.current.on("dragend",E),v.current.on("transformend",E),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 x(v,w,p){const h=b=>b.hasName("element")||b.hasName("line-anchor")||b.hasName("page-background")||b.hasName("elements-area"),C=b=>{const y=b.target.getLayer().children.find(S=>S.name()==="line-guides");y==null||y.destroyChildren();var E=m(function(S){var T;const M=(T=v.current)===null||T===void 0?void 0:T.getStage();var A=[],z=[];return M.find(h).forEach(U=>{if(!(S.indexOf(U)>=0)){var Z=U.getClientRect({skipShadow:!0,skipStroke:!0});U.hasName("line-anchor")&&(Z={x:U.absolutePosition().x,y:U.absolutePosition().y,width:0,height:0}),A.push({offset:Z.x,node:U,snap:"start"},{offset:Z.x+Z.width,node:U,snap:"end"},{offset:Z.x+Z.width/2,node:U,snap:"center"}),z.push({offset:Z.y,node:U,snap:"start"},{offset:Z.y+Z.height,node:U,snap:"end"},{offset:Z.y+Z.height/2,node:U,snap:"center"})}}),{vertical:A,horizontal:z}}([b.target,...w.map(S=>S.current)]),k(b.target));if(!E.length)return;(function(S){var T;const M=(T=v.current)===null||T===void 0?void 0:T.getLayer(),A=M==null?void 0:M.children.find(z=>z.name()==="line-guides");S.forEach(z=>{if(z.orientation==="H"){var U=new n.default.Line({points:[-6e3,z.lineGuide,6e3,z.lineGuide],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]});A==null||A.add(U),M.batchDraw()}else z.orientation==="V"&&(U=new n.default.Line({points:[z.lineGuide,-6e3,z.lineGuide,6e3],stroke:"rgb(0, 161, 255)",strokeWidth:1,name:"guid-line",dash:[4,6]}),A==null||A.add(U))})})(E);const L=b.target.getAbsolutePosition(),R=Object.assign({},L);E.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,O=R.y-L.y;if(!(b.evt.ctrlKey||b.evt.metaKey)){const S=b.target.getAbsolutePosition();b.target.absolutePosition({x:S.x+D,y:S.y+O})}},g=b=>{if(!b.target)return;const y=b.target.getLayer(),E=y.children.find(L=>L.name()==="line-guides");E==null||E.destroyChildren(),y.batchDraw()};t.default.useEffect(()=>{v.current&&(v.current.on("dragmove",C),v.current.on("dragend",g))},p)}e.setSnapFilterFunc=c}(dd)),dd}var Gb;function mx(){return Gb||(Gb=1,function(e){var i=fd&&fd.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.LineElement=void 0,e.getMiddlePoints=_,e.getLinePositionFromMiddlePoints=k;const t=i(An()),n=Qi,a=Ja,l=zd(),u=Fd,c=bc(),d=g_(),m=Xs();function _(w){const{x:p,y:h,width:C,height:g,rotation:b}=w.a,y=b*Math.PI/180,E={x:p+g/2*Math.cos(y+Math.PI/2),y:h+g/2*Math.sin(y+Math.PI/2)};return{middleLeft:E,middleRight:{x:E.x+C*Math.cos(y),y:E.y+C*Math.sin(y)}}}function k(w,p,h){const C=Math.sqrt(Math.pow(p.x-w.x,2)+Math.pow(p.y-w.y,2)),g=Math.atan2(p.y-w.y,p.x-w.x),b=180*g/Math.PI;return{x:w.x+Math.cos(g-Math.PI/2)*h/2,y:w.y+Math.sin(g-Math.PI/2)*h/2,width:C,height:h,rotation:b}}const x=(w,p)=>({offsetX:5/w,offsetY:5/w,width:10/w,height:10/w,fill:"white",stroke:"rgb(0, 161, 255)",strokeWidth:2,strokeScaleEnabled:!1,draggable:!0,dragDistance:0,onMouseEnter:h=>{h.target.getStage().container().style.cursor="crosshair"},onMouseLeave:h=>{h.target.getStage().container().style.cursor=""},onDragStart:h=>{p.history.startTransaction()},onDragEnd:h=>{p.history.endTransaction()}}),v=(0,n.observer)(({element:w,type:p})=>{const h=(0,l.useColor)(w,w.a.color,"fill"),C=(0,l.useColor)(w,w.a.color,"stroke"),g=Object.assign(Object.assign(Object.assign({strokeWidth:w.height,lineCap:"round",lineJoin:"round"},C),h),{opacity:w.a.opacity,hideInExport:!w.showInExport});return t.default.createElement(t.default.Fragment,null,p==="arrow"&&t.default.createElement(a.Line,Object.assign({points:[3*w.height,2*-w.height,0,0,3*w.height,2*w.height]},g)),p==="triangle"&&t.default.createElement(a.Line,Object.assign({points:[3*w.height,2*-w.height,0,0,3*w.height,2*w.height],closed:!0},g)),p==="bar"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-w.height,0,2*w.height],closed:!0},g)),p==="square"&&t.default.createElement(a.Line,Object.assign({points:[0,2*-w.height,4*w.height,2*-w.height,4*w.height,2*w.height,0,2*w.height],closed:!0},g)),p==="circle"&&t.default.createElement(a.Circle,Object.assign({x:2*w.height,y:0,radius:2*w.height},g)))});e.LineElement=(0,n.observer)(({element:w,store:p})=>{const h=t.default.useRef(null),C=t.default.useRef(null),g=t.default.useRef(null),b=w.selectable||p.role==="admin",y=(0,m.isTouchDevice)(),[E,L]=t.default.useState(!1),R=p.selectedElements.indexOf(w)>=0&&p.selectedElements.length===1,D=p.selectedShapes.indexOf(w)>=0,{middleLeft:O,middleRight:S}=_(w);(0,d.useAnchorSnap)(C,[h],[R]),(0,d.useAnchorSnap)(g,[h],[R]);const T=(0,l.useColor)(w,w.a.color,"stroke");return t.default.createElement(t.default.Fragment,null,t.default.createElement(a.Line,Object.assign({ref:h,name:"element",id:w.id,x:w.a.x,y:w.a.y,points:[0,0,w.a.width,0],offsetY:-w.a.height/2,strokeWidth:w.a.height,hitStrokeWidth:Math.max(w.a.height,20),dash:w.dash.map(M=>M*w.a.height)},T,{rotation:w.a.rotation,opacity:w.animated("opacity"),shadowEnabled:w.shadowEnabled,shadowBlur:w.shadowBlur,shadowOffsetX:w.shadowOffsetX,shadowOffsetY:w.shadowOffsetY,shadowColor:w.shadowColor,shadowOpacity:w.shadowOpacity,listening:b,draggable:y?w.draggable&&D:w.draggable,preventDefault:!y||D,hideInExport:!w.showInExport,onMouseEnter:()=>{L(!0)},onMouseLeave:()=>{L(!1)},onDragMove:M=>{w.set({x:M.target.x(),y:M.target.y()})},onDragEnd:M=>{w.set({x:M.target.x(),y:M.target.y()})},onTransform:M=>{const A=M.target.scaleX();M.target.scaleX(1),M.target.scaleY(1),w.set({height:w.height*A,width:w.width*A,x:M.target.x(),y:M.target.y(),rotation:M.target.rotation()})}})),t.default.createElement(a.Group,{x:O.x,y:O.y,rotation:w.rotation,hideInExport:!w.showInExport},t.default.createElement(v,{element:w,type:w.startHead})),t.default.createElement(a.Group,{x:S.x,y:S.y,rotation:w.rotation+180},t.default.createElement(v,{element:w,type:w.endHead})),(E||D&&!R)&&t.default.createElement(c.Highlighter,{element:w}),R&&w.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:O.x,y:O.y,ref:C,name:"line-anchor"},x(p.scale,p),{onDragMove:M=>{const A=k(M.target.position(),S,w.height);w.set({x:A.x,y:A.y,width:A.width,rotation:A.rotation})}})),t.default.createElement(a.Rect,Object.assign({x:S.x,y:S.y,ref:g,name:"line-anchor"},x(p.scale,p),{onDragMove:M=>{const A=k(O,M.target.position(),w.height);w.set({x:A.x,y:A.y,width:A.width,rotation:A.rotation})}})))))})}(fd)),fd}var Eo={},Vb;function yx(){return Vb||(Vb=1,function(e){var i=Eo&&Eo.__createBinding||(Object.create?function(B,N,F,H){H===void 0&&(H=F);var Y=Object.getOwnPropertyDescriptor(N,F);Y&&!("get"in Y?!N.__esModule:Y.writable||Y.configurable)||(Y={enumerable:!0,get:function(){return N[F]}}),Object.defineProperty(B,H,Y)}:function(B,N,F,H){H===void 0&&(H=F),B[H]=N[F]}),t=Eo&&Eo.__setModuleDefault||(Object.create?function(B,N){Object.defineProperty(B,"default",{enumerable:!0,value:N})}:function(B,N){B.default=N}),n=Eo&&Eo.__importStar||function(){var B=function(N){return B=Object.getOwnPropertyNames||function(F){var H=[];for(var Y in F)Object.prototype.hasOwnProperty.call(F,Y)&&(H[H.length]=Y);return H},B(N)};return function(N){if(N&&N.__esModule)return N;var F={};if(N!=null)for(var H=B(N),Y=0;Y<H.length;Y++)H[Y]!=="default"&&i(F,N,H[Y]);return t(F,N),F}}(),a=Eo&&Eo.__importDefault||function(B){return B&&B.__esModule?B:{default:B}};Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=e.useLoader=e.setVideoLoaderHook=void 0;const l=a(An()),u=Qi,c=da,d=Ja,m=a(Dp()),_=a(Ji()),k=Fd,x=bc(),v=Ks(),w=n(qd()),p=ts(),h=jp(),C=yc(),g=Xs();function b(){return document.createElement("canvas")}async function y(B){if(!(B.indexOf("data:image/svg+xml")>=0||B.indexOf(".svg")>=0))return B;const N=await w.urlToString(B),F=w.fixSize(N);return w.svgToURL(F)}const E=B=>{const[N,F]=l.default.useState(B);return l.default.useEffect(()=>{(async()=>{const H=await y(B);H!==N&&F(H)})()},[B]),N},L=new window.Image;L.src=w.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=w.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(B,N,F,H,Y,ee,V){for(var K=new ImageData(N,F),$=new Int32Array(B.data.buffer),ne=B.width,re=new Int32Array(K.data.buffer),ie=K.width,ae=N/ee,ue=F/V,de=Math.round(1/ae),he=Math.round(1/ue),Se=de*he,me=0;me<K.height;me++)for(var ke=0;ke<ie;ke++){for(var fe=H+Math.round(ke/ae)+(Y+Math.round(me/ue))*ne,ge=0,Ce=0,Te=0,se=0,be=0;be<he;be++)for(var xe=0;xe<de;xe++){var Ie=$[fe+xe+be*ne];ge+=Ie<<24>>>24,Ce+=Ie<<16>>>24,Te+=Ie<<8>>>24,se+=Ie>>>24}ge=Math.round(ge/Se),Ce=Math.round(Ce/Se),Te=Math.round(Te/Se),se=Math.round(se/Se),re[ke+me*ie]=se<<24|Te<<16|Ce<<8|ge}return K}function O(B,N){var F,H;const Y=b();Y.width=B.width,Y.height=B.height,(F=Y.getContext("2d"))===null||F===void 0||F.drawImage(B,0,0,Y.width,Y.height);const ee=D(Y.getContext("2d").getImageData(0,0,Y.width,Y.height),Math.floor(Y.width*N),Math.floor(Y.height*N),0,0,Y.width,Y.height);return Y.width=Math.floor(Y.width*N),Y.height=Math.floor(Y.height*N),(H=Y.getContext("2d"))===null||H===void 0||H.putImageData(ee,0,0),Y}const S=(B,N,F,H,Y=0,ee=!1)=>{const V=Math.floor(Math.max(B.width*H,1)),K=Math.floor(Math.max(B.height*H,1)),$=Math.min(Y*H,V/2,K/2),ne=Math.max(B.width/F.width,B.height/F.height)*H,re=B.page._exportingOrRendering&&p.flags.imageDownScalingEnabled&&ne<1&&!ee,ie=F.x===0&&F.y===0&&F.width===(N==null?void 0:N.width)&&F.height===(N==null?void 0:N.height),ae=l.default.useMemo(()=>{if(!(!N||!N.width||!N.height))return ie&&$===0&&!re?void 0:b()},[N,$,re,ie]),ue=()=>{if(!ae||!N)return;ae.width=V,ae.height=K;const de=ae.getContext("2d");if(!de)return;$&&(de.beginPath(),de.moveTo($,0),de.lineTo(V-$,0),de.arc(V-$,$,$,3*Math.PI/2,0,!1),de.lineTo(V,K-$),de.arc(V-$,K-$,$,0,Math.PI/2,!1),de.lineTo($,K),de.arc($,K-$,$,Math.PI/2,Math.PI,!1),de.lineTo(0,$),de.arc($,$,$,Math.PI,3*Math.PI/2,!1),de.clip());const he=re?O(N,ne):N,Se=re?{x:Math.floor(F.x*ne),y:Math.floor(F.y*ne),width:Math.floor(F.width*ne),height:Math.floor(F.height*ne)}:F;de.drawImage(he,Se.x,Se.y,Se.width,Se.height,0,0,ae.width,ae.height)};return l.default.useLayoutEffect(()=>{ue()},[ae,B.width,B.height,F.x,F.y,F.width,F.height,Y,H,ee,B.page._exportingOrRendering,re]),l.default.useEffect(()=>()=>{ae&&ae.nodeName==="CANVAS"&&_.default.Util.releaseCanvas(ae)},[ae]),[ae||N,ue]},T=(B,N,F,H)=>{const Y=E(B.clipSrc||""),[ee,V]=(0,m.default)(Y,"anonymous"),K=B.clipSrc?V:"loaded";(0,e.useLoader)(K,B.clipSrc,B.id);const $=l.default.useMemo(()=>{if(N&&ee)return b()},[N,ee]);function ne(){var re;if(!ee||!N||!N.width||!N.height||!ee||!ee.width||!ee.height||!$)return;const ie=b(),ae=Math.max(B.width/ee.width*F,B.height/ee.height*F);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),$.width=Math.max(N.width,1),$.height=Math.max(N.height,1);const ue=$.getContext("2d");ue&&(ue.save(),ue.drawImage(ie,0,0,N.width,N.height),_.default.Util.releaseCanvas(ie),ue.globalCompositeOperation="source-in",ue.drawImage(N,0,0,$.width,$.height),ue.restore())}return l.default.useLayoutEffect(()=>{ne()},[$,N,ee,B.width,B.height,F,...H]),[B.clipSrc&&ee?$:N,ne]},M=b(),A=(0,u.observer)(({element:B})=>{const N=Math.min(30,B.width/4,B.height/4),F=l.default.useRef(null);return l.default.useEffect(()=>{const H=F.current;if(!H)return;const Y=new _.default.Animation(ee=>{H.rotate(((ee==null?void 0:ee.timeDiff)||0)/2)},H.getLayer());return Y.start(),()=>{Y.stop()}}),l.default.createElement(d.Group,{x:B.a.x,y:B.a.y,rotation:B.a.rotation,listening:!1,opacity:B.a.opacity,hideInExport:!B.showInExport},l.default.createElement(d.Rect,{width:B.width,height:B.height,fill:"rgba(124, 173, 212, 0.8)"}),l.default.createElement(d.Arc,{ref:F,x:B.width/2,y:B.height/2,fill:"white",outerRadius:Math.abs(N),innerRadius:Math.max(1,N-5),angle:270}))}),z=(0,u.observer)(({element:B})=>{const N="Can not load the video...",F=Math.max(10,Math.min(30,B.width/25));return l.default.createElement(d.Group,{x:B.a.x,y:B.a.y,rotation:B.a.rotation,listening:!1,opacity:B.a.opacity,hideInExport:!B.showInExport},l.default.createElement(d.Rect,{width:B.width,height:B.height,fill:"rgba(223, 102, 102, 0.8)"}),l.default.createElement(d.Text,{text:N,fontSize:F,width:B.width,height:B.height,align:"center",fill:"white",verticalAlign:"middle",padding:5}))});function U(B,N,F){const H=l.default.useRef("loading"),Y=l.default.useRef(null),[ee,V]=l.default.useState(0),K=l.default.useRef(),$=l.default.useRef(),ne=l.default.useRef();return K.current===B&&$.current===N&&ne.current===F||(H.current="loading",Y.current=void 0,K.current=B,$.current=N,ne.current=F),l.default.useLayoutEffect(function(){if(B){var re=document.createElement("video");return re.addEventListener("canplay",ie),re.addEventListener("error",ae),N&&(re.crossOrigin=N),F&&(re.referrerpolicy=F),re.src=B,re.load(),function(){re.removeEventListener("canplay",ie),re.removeEventListener("error",ae)}}function ie(){H.current="loaded",Y.current=re,Y.current.currentTime=0,V(Math.random()),Y.current.removeEventListener("canplay",ie)}function ae(ue){H.current="failed",Y.current=void 0,V(Math.random())}},[B,N,F]),[Y.current,H.current]}let Z=U;const X=B=>{Z=B};e.setVideoLoaderHook=X;const J=(B,N,F)=>{const H=l.default.useRef(),Y=()=>{var ee;(ee=H.current)===null||ee===void 0||ee.call(H),H.current=void 0};l.default.useEffect(()=>Y,[]),l.default.useLayoutEffect(()=>{const ee=N.slice(0,200),V=`video with id ${F} url: ${ee}`;B!=="loading"||H.current||(H.current=(0,v.incrementLoader)(V)),B!=="loading"&&Y(),B==="failed"&&(0,v.triggerLoadError)(V)},[B])};e.useLoader=J,e.VideoElement=(0,u.observer)(({element:B,store:N})=>{var F;const[H,Y]=l.default.useState(!1),ee=l.default.useRef(null),V=l.default.useRef(null),[K,$]=l.default.useState(!1),ne=N.selectedShapes.indexOf(B)>=0,[re,ie]=l.default.useState(!1),[ae,ue]=Z(B.src,"anonymous"),de=N.activePage===B.page;(0,e.useLoader)(ue,B.src,B.id),ae&&(ae.width=ae.videoWidth,ae.height=ae.videoHeight,ae.playsInline=!0);const he=ae||M;l.default.useEffect(()=>{ae&&N.history.ignore(()=>{B.set({duration:1e3*ae.duration})})},[ae]),l.default.useEffect(()=>{var Be;if(!ae)return;const st=N.animatedElementsIds,_t=(!st.length||st.includes(B.id))&&N.isPlaying,Bt=de&&(_t||re);if(!Bt)return void ae.pause();Bt&&(ae.currentTime=B.startTime*ae.duration,ae.play());const Ht=new _.default.Animation(()=>{Pt()},(Be=ee.current)===null||Be===void 0?void 0:Be.getLayer());Ht.start();const hn=()=>{ie(!1),ae.currentTime=B.startTime*ae.duration},In=()=>{ae.currentTime>=B.endTime*ae.duration&&(ae.pause(),ae.currentTime=B.startTime*ae.duration,ie(!1))};return ae.addEventListener("ended",hn),ae.addEventListener("timeupdate",In),()=>{ae.pause(),Ht.stop(),ae.removeEventListener("ended",hn),ae.removeEventListener("timeupdate",In)}},[ae,re,N.isPlaying,de]),l.default.useEffect(()=>{ae&&(ae.volume=B.volume)},[ae,B.volume]);const Se=l.default.useRef();l.default.useEffect(()=>{const Be=(0,c.autorun)(()=>{var st,_t;if(ae){const Bt=N.animatedElementsIds;if(Bt.length&&!Bt.includes(B.id))return;const Ht=(N.currentTime-B.page.startTime)%B.duration;if(Math.abs(1e3*ae.currentTime-Ht)>500||!N.isPlaying){const hn=Ht/1e3;hn!==ae.currentTime&&(ae.currentTime=hn),ae.readyState!==4&&!N.isPlaying&&!Se.current&&(Se.current=(0,v.incrementLoader)(`video ${B.id}`))}Pt(),(_t=(st=ee.current)===null||st===void 0?void 0:st.getLayer())===null||_t===void 0||_t.batchDraw()}});return()=>{Be(),Se.current&&(Se.current(),Se.current=null)}},[N,ae]),l.default.useEffect(()=>{if(!ae)return;const Be=()=>{var _t,Bt;ae.readyState!==4&&B.page._exportingOrRendering||Se.current&&(Pt(),(Bt=(_t=ee.current)===null||_t===void 0?void 0:_t.getLayer())===null||Bt===void 0||Bt.batchDraw(),Se.current(),Se.current=null)};let st;return B.page._exportingOrRendering&&(st=setInterval(Be,50)),ae.addEventListener("timeupdate",Be),ae.addEventListener("canplay",Be),()=>{clearInterval(st),ae.removeEventListener("timeupdate",Be),ae.removeEventListener("canplay",Be)}},[B.page._exportingOrRendering,ae,B.id,v.incrementLoader]);let{cropX:me,cropY:ke,cropWidth:fe,cropHeight:ge}=B;ue!=="loaded"&&(me=ke=0,fe=ge=1);const Ce=he.width*fe,Te=he.height*ge,se=B.width/B.height;let be,xe;const Ie=Ce/Te,at=B.type==="svg";at?(be=Ce,xe=Te):se>=Ie?(be=Ce,xe=Ce/se):(be=Te*se,xe=Te);const gt={x:he.width*me,y:he.height*ke,width:be,height:xe},je=(F=B.cornerRadius)!==null&&F!==void 0?F:0,[ze,He]=S(B,he,gt,N._elementsPixelRatio,je,H||B._cropModeEnabled||B.type==="svg");let[Xe,et]=T(B,ze,N._elementsPixelRatio,[gt,je,N._elementsPixelRatio]);function Pt(){He(),et()}const wt=Math.max(B.width/be,B.height/xe);l.default.useEffect(()=>{var Be;if(!B._cropModeEnabled)return;const st=(Be=ee.current)===null||Be===void 0?void 0:Be.getStage();function _t(Ht){B._cropModeEnabled&&Ht.target!==V.current&&B.toggleCropMode(!1)}function Bt(Ht){B._cropModeEnabled&&Ht.target.parentNode!==st.content&&B.toggleCropMode(!1)}return document.body.addEventListener("click",Bt),st==null||st.on("click",_t),st==null||st.on("tap",_t),()=>{document.body.removeEventListener("click",Bt),document.body.removeEventListener("touchstart",Bt),st==null||st.off("click",_t),st==null||st.off("click",_t)}},[B._cropModeEnabled]),l.default.useLayoutEffect(()=>{if(!(H||B._cropModeEnabled))return(0,h.applyFilter)(ee.current,B),(0,c.autorun)(()=>{(0,h.applyFilter)(ee.current,B)},{delay:100})},[he,H,fe,ge,B._cropModeEnabled]),l.default.useLayoutEffect(()=>{var Be;H||B._cropModeEnabled?(Be=ee.current)===null||Be===void 0||Be.clearCache():(0,h.applyFilter)(ee.current,B)},[H,B.width,B.height,B._cropModeEnabled]),l.default.useEffect(()=>{(0,h.applyFilter)(ee.current,B)},[B.shadowEnabled,B.shadowBlur,B.cornerRadius,B.shadowColor,B.shadowOffsetX,B.shadowOffsetY,B.shadowOpacity]);const we=l.default.useRef(null),Ee=l.default.useRef(null),vt=l.default.useRef(null);l.default.useLayoutEffect(()=>{B._cropModeEnabled&&(Ee.current.nodes([we.current]),vt.current.nodes([V.current]))},[B._cropModeEnabled]);const Ct=Be=>{Math.round(Be.target.x())>0&&(Be.target.x(0),Be.target.scaleX(1)),Math.round(Be.target.y())>0&&(Be.target.y(0),Be.target.scaleY(1));const st=Be.target.width()*Be.target.scaleX(),_t=Be.target.height()*Be.target.scaleY(),Bt=Math.min(1,be/st),Ht=Math.min(1,xe/_t),hn=1-Bt,In=Math.min(hn,Math.max(0,Math.round(-Be.target.x())/st)),wn=1-Ht,Qn=Math.min(wn,Math.max(0,Math.round(-Be.target.y())/_t));Be.target.setAttrs({x:-In*he.width,y:-Qn*he.height,scaleX:1,scaleY:1}),B.set({cropX:In,cropY:Qn,cropWidth:Bt,cropHeight:Ht})},Ne=()=>{B.type!=="svg"&&B.contentEditable&&setTimeout(()=>{B.toggleCropMode(!0)})},Ge=ue==="loading",it=ue==="failed",De=!Ge&&!it,mt=l.default.useRef({cropX:0,cropY:0,cropWidth:0,cropHeight:0}),Fe=De?B.a.opacity:0;(0,C.useFadeIn)(ee,Fe);const ht=B.selectable||N.role==="admin",_n=(0,g.isTouchDevice)();return l.default.createElement(l.default.Fragment,null,Ge&&l.default.createElement(A,{element:B}),it&&l.default.createElement(z,{element:B}),l.default.createElement(d.Image,{ref:ee,name:"element",id:B.id,image:Xe,x:B.a.x,y:B.a.y,width:B.a.width||1,height:B.a.height||1,rotation:B.a.rotation,opacity:Fe,shadowEnabled:B.shadowEnabled,shadowBlur:B.shadowBlur,shadowOffsetX:B.shadowOffsetX,shadowOffsetY:B.shadowOffsetY,shadowColor:B.shadowColor,shadowOpacity:B.shadowOpacity,customCrop:gt,listening:ht,draggable:_n?B.draggable&&ne:B.draggable,preventDefault:!_n||ne,hideInExport:!B.showInExport,onMouseEnter:()=>{$(!0)},onMouseLeave:()=>{$(!1)},onDragMove:Be=>{B.set({x:Be.target.x(),y:Be.target.y()})},onDragEnd:Be=>{B.set({x:Be.target.x(),y:Be.target.y()})},onDblClick:Ne,onDblTap:Ne,onTransformStart:()=>{Y(!0),mt.current={cropX:B.cropX,cropY:B.cropY,cropWidth:B.cropWidth,cropHeight:B.cropHeight}},onTransform:Be=>{var st;const _t=Be.currentTarget,Bt=Math.abs(_t.scaleX()-1)<1e-7?1:_t.scaleX(),Ht=Math.abs(_t.scaleY()-1)<1e-7?1:_t.scaleY();_t.scaleX(1),_t.scaleY(1);const hn=(st=Be.target.getStage())===null||st===void 0?void 0:st.findOne("Transformer"),In=1-be/he.width,wn=Math.min(In,Math.max(0,B.cropX)),Qn=1-xe/he.height,ii=Math.min(Qn,Math.max(0,B.cropY)),Sr=hn.getActiveAnchor(),Ze=!(Sr.indexOf("middle")>=0||Sr.indexOf("center")>=0),Et=!Ze&&Bt<1&&mt.current.cropHeight>xe/he.height;let Mt=Ze?B.cropWidth:B.cropWidth*Bt;Et&&(Mt=B.cropWidth);const Vt=!Ze&&Ht<1&&mt.current.cropWidth>be/he.width;let $t=Ze?B.cropHeight:B.cropHeight*Ht;Vt&&($t=B.cropHeight),at&&(Mt=B.cropWidth,$t=B.cropHeight),B.set({cropX:wn,cropY:ii,x:_t.x(),y:_t.y(),width:_t.width()*Bt,height:_t.height()*Ht,rotation:Be.target.rotation(),cropWidth:Math.min(Mt,1-wn),cropHeight:Math.min($t,1-ii)})},onTransformEnd:Be=>{const st=Be.currentTarget;B.set({width:st.width(),height:st.height(),x:st.x(),y:st.y(),rotation:Be.target.rotation(),cropWidth:be/he.width,cropHeight:xe/he.height}),Y(!1)}}),l.default.createElement(d.Rect,{x:B.a.x,y:B.a.y,width:Math.max(B.a.width-B.borderSize,0),height:Math.max(B.a.height-B.borderSize,0),opacity:Fe,offsetX:-B.borderSize/2,offsetY:-B.borderSize/2,stroke:B.borderColor,strokeWidth:B.borderSize,listening:!1,visible:!!B.borderSize,rotation:B.rotation,cornerRadius:Math.max(0,je-B.borderSize),hideInExport:!B.showInExport}),!N.isPlaying&&l.default.createElement(d.Image,{image:re?R:L,x:B.a.x,y:B.a.y,offsetX:-B.a.width/2+15/N.scale,offsetY:-B.a.height/2+15/N.scale,rotation:B.a.rotation,width:30/N.scale,height:30/N.scale,hideInExport:!0,onClick:()=>ie(!re),onTap:()=>ie(!re)}),B._cropModeEnabled&&l.default.createElement(k.Portal,{selector:".page-abs-container",enabled:!0},l.default.createElement(d.Rect,{x:-window.innerWidth/N.scale,y:-window.innerWidth/N.scale,width:window.innerWidth/N.scale*3,height:window.innerWidth/N.scale*3,fill:"rgba(0,0,0,0.3)"}),l.default.createElement(d.Image,{listening:!1,image:Xe,x:B.a.x,y:B.a.y,width:B.a.width,height:B.a.height,rotation:B.a.rotation,shadowEnabled:B.shadowEnabled,shadowBlur:B.shadowBlur}),l.default.createElement(d.Group,{x:B.a.x,y:B.a.y,rotation:B.a.rotation,scaleX:wt,scaleY:wt},l.default.createElement(d.Image,{image:he,ref:V,opacity:.4,draggable:!0,x:-B.cropX*he.width,y:-B.cropY*he.height,onDragMove:Ct,onTransform:Ct}),l.default.createElement(d.Transformer,{ref:vt,anchorSize:20,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Be,st)=>st.width<5||st.height<5?Be:st,rotateEnabled:!1,borderEnabled:!1,anchorCornerRadius:10,anchorStrokeWidth:2,borderStrokeWidth:2}),l.default.createElement(d.Rect,{width:be,height:xe,ref:we,listening:!1,onTransform:Be=>{Be.target.x()<-B.cropX*he.width-1e-9&&(Be.target.x(-B.cropX*he.width),Be.target.scaleX(1)),Be.target.y()<-B.cropY*he.height-1e-9&&(Be.target.y(-B.cropY*he.height),Be.target.scaleY(1));const st=Math.min(1,Math.max(0,B.cropX+Be.target.x()/he.width)),_t=Math.min(1,Math.max(0,Be.target.y()/he.height+B.cropY)),Bt=Be.target.width()*Be.target.scaleX(),Ht=Be.target.height()*Be.target.scaleY(),hn=Math.min(1-st,Bt/he.width),In=Math.min(1-_t,Ht/he.height),wn=Be.target.getAbsolutePosition(Be.target.getParent().getParent());Be.target.scale({x:1,y:1}),Be.target.position({x:0,y:0}),B.set({x:wn.x,y:wn.y,cropX:st,cropY:_t,cropWidth:hn,cropHeight:In,width:Math.min(Bt*wt,he.width*(1-st)*wt),height:Math.min(Ht*wt,he.height*(1-_t)*wt)})}}),l.default.createElement(d.Transformer,{ref:Ee,enabledAnchors:["top-left","top-right","bottom-left","bottom-right"],boundBoxFunc:(Be,st)=>st.width<5||st.height<5?Be:st,keepRatio:!1,rotateEnabled:!1,anchorFill:"rgb(240, 240, 240)",anchorStrokeWidth:2,borderStrokeWidth:2}))),(K||ne)&&l.default.createElement(x.Highlighter,{element:B}))})}(Eo)),Eo}var hd={},ig={},$b;function Nv(){return $b||($b=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=d,e.speechBubblePath=_,e.crossPath=k,e.subTypeToPathDataFunc=x,e.figureToSvg=w;const i=({width:p,height:h,cornerRadius:C})=>{if(C>0){const g=Math.min(C,p/2,h/2);return`M 0 ${g} A ${g} ${g} 0 0 1 ${g} 0 L ${p-g} 0 A ${g} ${g} 0 0 1 ${p} ${g} L ${p} ${h-g} A ${g} ${g} 0 0 1 ${p-g} ${h} L ${g} ${h} A ${g} ${g} 0 0 1 0 ${h-g} Z`}return`M 0 0 L ${p} 0 L ${p} ${h} L 0 ${h} Z`};e.rectData=i;const t=({width:p,height:h})=>`M ${p/2} 0 L ${p} ${h} L 0 ${h} Z`;e.triangleData=t;const n=({width:p,height:h})=>`M 0 0 L ${p} 0 L 0 ${h} Z`;e.rightTriangleData=n;const a=({width:p,height:h})=>`M ${p/2} ${h/2} m -${p/2}, 0 a ${p/2},${h/2} 0 1,0 ${p},0 a ${p/2},${h/2} 0 1,0 -${p},0`;function l({width:p,height:h}){const C=p/2,g=h/2,b=p/2,y=h/2,E=b/2,L=y/2;let R="",D=Math.PI/5;for(let O=0;O<10;O++){const S=O%2==0?y:L,T=C+(O%2==0?b:E)*Math.sin(O*D),M=g-S*Math.cos(O*D);O===0?R=`M ${T} ${M}`:R+=` L ${T} ${M}`}return R+" Z"}function u({width:p,height:h}){const C=p/2,g=h/2;return`M ${C} 0 L ${p} ${g} L ${C} ${h} L 0 ${g} Z`}function c({width:p,height:h}){const C=p/2,g=h/2,b=p/2,y=h/2;let E="",L=2*Math.PI/5;for(let R=0;R<5;R++){const D=y,O=C+b*Math.sin(R*L),S=g-D*Math.cos(R*L);R===0?E=`M ${O} ${S}`:E+=` L ${O} ${S}`}return E+" Z"}function d({width:p,height:h}){const C=p/2,g=h/2,b=p/2,y=h/2;let E="",L=2*Math.PI/6;for(let R=0;R<6;R++){const D=y,O=C+b*Math.sin(R*L),S=g-D*Math.cos(R*L);R===0?E=`M ${O} ${S}`:E+=` L ${O} ${S}`}return E+" Z"}function m({path:p,aspectRatio:h,width:C,height:g}){return{path:p,scaleX:C/h.width,scaleY:g/h.height}}function _({width:p,height:h}){const C=.1*Math.min(p,h),g=.2*p,b=.2*h,y=.5*p;let E=`M ${C},0`;return E+=" H "+(p-C),E+=` A ${C},${C} 0 0 1 ${p},${C}`,E+=" V "+(h-C-b),E+=` A ${C},${C} 0 0 1 ${p-C},${h-b}`,E+=` H ${y+g/2}`,E+=` L ${y},${h}`,E+=` L ${y-g/2},${h-b}`,E+=` H ${C}`,E+=` A ${C},${C} 0 0 1 0,${h-C-b}`,E+=` V ${C}`,E+=` A ${C},${C} 0 0 1 ${C},0`,E+=" Z",E}function k({width:p,height:h}){const C=.3*p,g=.3*h,b=p/2,y=h/2,E=b-C/2,L=b+C/2,R=y-g/2,D=y+g/2;let O=`M ${E},0 `;return O+=`H ${L} `,O+=`V ${R} `,O+=`H ${p} `,O+=`V ${D} `,O+=`H ${L} `,O+=`V ${h} `,O+=`H ${E} `,O+=`V ${D} `,O+="H 0 ",O+=`V ${R} `,O+=`H ${E} `,O+="V 0 ",O+="Z",O}function x(p){return e.TYPES[p]||e.rectData}function v(p,h){const{width:C,height:g,fill:b,stroke:y,strokeWidth:E,dash:L}=p,R=(L||[]).map(M=>M*E);let D=h(p),O=1,S=1;typeof D!="string"&&(O=D.scaleX,S=D.scaleY,D=D.path);const T=`clip-${p.id||Math.random()}`;return`
|
|
240
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="${C}" height="${g}">
|
|
241
|
-
<defs>
|
|
242
|
-
<clipPath id="${T}">
|
|
243
|
-
<path d="${D}" />
|
|
244
|
-
</clipPath>
|
|
245
|
-
</defs>
|
|
246
|
-
|
|
247
|
-
<!-- Path for the fill -->
|
|
248
|
-
<path d="${D}" fill="${b}" transform="scale(${O}, ${S})"/>
|
|
249
|
-
|
|
250
|
-
<!-- Path for the stroke, clipped by the star path -->
|
|
251
|
-
<path d="${D}" fill="none" stroke="${y}" stroke-width="${2*E}" clip-path="url(#${T})" transform="scale(${O}, ${S})" stroke-dasharray="${R.join(" ")}"/>
|
|
252
|
-
</svg>
|
|
253
|
-
`}function w(p){const{subType:h}=p,C=x(h);return C?v(p,C):(console.error(`Polotno error: Can not convert ${p.subType} figure to svg.`),(0,e.rectData)(p))}e.circleData=a,e.TYPES={rect:e.rectData,circle:e.circleData,star:l,triangle:e.triangleData,rightTriangle:e.rightTriangleData,diamond:u,pentagon:c,hexagon:d,speechBubble:_,cross:k,arc:({width:p,height:h})=>m({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:p,height:h}),cloud:({width:p,height:h})=>m({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:p,height:h}),rightArrow:({width:p,height:h})=>{const C=.6*p;return`M 0 ${h/4} L ${C} ${h/4} L ${C} 0 L ${p} ${h/2} L ${C} ${h} L ${C} ${.75*h} L 0 ${.75*h} Z`},leftArrow:({width:p,height:h})=>{const C=.4*p;return`M ${p} ${h/4} L ${C} ${h/4} L ${C} 0 L 0 ${h/2} L ${C} ${h} L ${C} ${.75*h} L ${p} ${.75*h} Z`},downArrow:({width:p,height:h})=>{const C=.6*h;return`M ${p/4} 0 L ${p/4} ${C} L 0 ${C} L ${p/2} ${h} L ${p} ${C} L ${.75*p} ${C} L ${.75*p} 0 Z`},upArrow:({width:p,height:h})=>{const C=.4*h;return`M ${p/4} ${h} L ${p/4} ${C} L 0 ${C} L ${p/2} 0 L ${p} ${C} L ${.75*p} ${C} L ${.75*p} ${h} Z`},asterisk1:({width:p,height:h})=>m({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:p,height:h}),asterisk2:({width:p,height:h})=>m({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:p,height:h}),bookmark:({width:p,height:h})=>m({path:"M0 0H199V238L99.5 142.8L0 238V0Z",aspectRatio:{width:199,height:238},width:p,height:h}),butterfly:({width:p,height:h})=>m({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:p,height:h}),cylinder:({width:p,height:h})=>m({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:p,height:h}),diamond2:({width:p,height:h})=>m({path:"M0 55.5L124 185L248 55.5L189.307 0H58.6933L0 55.5Z",aspectRatio:{width:248,height:185},width:p,height:h}),door:({width:p,height:h})=>m({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:p,height:h}),drop1:({width:p,height:h})=>m({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:p,height:h}),drop2:({width:p,height:h})=>m({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:p,height:h}),explosion:({width:p,height:h})=>m({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:p,height:h}),flag:({width:p,height:h})=>m({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:p,height:h}),flower:({width:p,height:h})=>m({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:p,height:h}),frame:({width:p,height:h})=>m({path:"M0 0H240L200 88L240 176H0L40 88L0 0Z",aspectRatio:{width:240,height:176},width:p,height:h}),heart1:({width:p,height:h})=>m({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:p,height:h}),home:({width:p,height:h})=>m({path:"M0 62.143L95.5 0L191 62.143V195H0V62.143Z",aspectRatio:{width:191,height:195},width:p,height:h}),home2:({width:p,height:h})=>m({path:"M206 94.076L103 0L0 94.076H31.2377V189H175.607V94.076H206Z",aspectRatio:{width:206,height:189},width:p,height:h}),hourglass:({width:p,height:h})=>m({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:p,height:h}),house:({width:p,height:h})=>m({path:"M0 92.367L95 0L190 92.367V223H0V92.367Z",aspectRatio:{width:190,height:223},width:p,height:h}),keyhole:({width:p,height:h})=>m({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:p,height:h}),kiss:({width:p,height:h})=>m({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:p,height:h}),leaf:({width:p,height:h})=>m({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:p,height:h}),lightning1:({width:p,height:h})=>m({path:"M111.5 0L0 142H51.433L31.5 253L143 111H91.567L111.5 0Z",aspectRatio:{width:143,height:253},width:p,height:h}),lightning2:({width:p,height:h})=>m({path:"M126 0H43L0 120.531H36L6 227L110 80.354H73L126 0Z",aspectRatio:{width:126,height:227},width:p,height:h}),magnet:({width:p,height:h})=>m({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:p,height:h}),mithosis:({width:p,height:h})=>m({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:p,height:h}),orangeRicky:({width:p,height:h})=>m({path:"M69 0H0V69V138V207H69H138V138H69V69V0Z",aspectRatio:{width:138,height:207},width:p,height:h}),party:({width:p,height:h})=>m({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:p,height:h}),pillow:({width:p,height:h})=>m({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:p,height:h}),polygon:({width:p,height:h})=>m({path:"M110 0L219.119 63V189L110 252L0.880798 189V63L110 0Z",aspectRatio:{width:220,height:252},width:p,height:h}),rainbow:({width:p,height:h})=>m({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:p,height:h}),rhodeIsland:({width:p,height:h})=>m({path:"M69 0H0V69V138H69V207H138V138V69H69V0Z",aspectRatio:{width:138,height:207},width:p,height:h}),shell:({width:p,height:h})=>m({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:p,height:h}),shield1:({width:p,height:h})=>m({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:p,height:h}),shield2:({width:p,height:h})=>m({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:p,height:h}),skewedRectangle:({width:p,height:h})=>m({path:"M85.9799 0H290L204.02 141H0L85.9799 0Z",aspectRatio:{width:290,height:141},width:p,height:h}),softFlower:({width:p,height:h})=>m({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:p,height:h}),softStar:({width:p,height:h})=>m({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:p,height:h}),stairs1:({width:p,height:h})=>m({path:"M0 0H67.667V67.667H135.333V135.333H203V203H0V0Z",aspectRatio:{width:203,height:203},width:p,height:h}),stairs2:({width:p,height:h})=>m({path:"M50 0H0V200H200V150H150V100H100V50H50V0Z",aspectRatio:{width:200,height:200},width:p,height:h}),teewee:({width:p,height:h})=>m({path:"M69 0H138V69H207V138H138H69H0V69H69V0Z",aspectRatio:{width:207,height:138},width:p,height:h}),blob1:({width:p,height:h})=>m({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:p,height:h}),blob10:({width:p,height:h})=>m({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:p,height:h}),blob11:({width:p,height:h})=>m({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:p,height:h}),blob12:({width:p,height:h})=>m({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:p,height:h}),blob13:({width:p,height:h})=>m({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:p,height:h}),blob14:({width:p,height:h})=>m({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:p,height:h}),blob15:({width:p,height:h})=>m({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:p,height:h}),blob16:({width:p,height:h})=>m({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:p,height:h}),blob17:({width:p,height:h})=>m({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:p,height:h}),blob18:({width:p,height:h})=>m({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:p,height:h}),blob19:({width:p,height:h})=>m({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:p,height:h}),blob2:({width:p,height:h})=>m({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:p,height:h}),blob20:({width:p,height:h})=>m({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:p,height:h}),blob21:({width:p,height:h})=>m({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:p,height:h}),blob22:({width:p,height:h})=>m({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:p,height:h}),blob23:({width:p,height:h})=>m({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:p,height:h}),blob24:({width:p,height:h})=>m({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:p,height:h}),blob25:({width:p,height:h})=>m({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:p,height:h}),blob26:({width:p,height:h})=>m({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:p,height:h}),blob27:({width:p,height:h})=>m({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:p,height:h}),blob28:({width:p,height:h})=>m({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:p,height:h}),blob29:({width:p,height:h})=>m({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:p,height:h}),blob3:({width:p,height:h})=>m({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:p,height:h}),blob30:({width:p,height:h})=>m({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:p,height:h}),blob31:({width:p,height:h})=>m({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:p,height:h}),blob32:({width:p,height:h})=>m({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:p,height:h}),blob4:({width:p,height:h})=>m({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:p,height:h}),blob5:({width:p,height:h})=>m({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:p,height:h}),blob6:({width:p,height:h})=>m({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:p,height:h}),blob7:({width:p,height:h})=>m({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:p,height:h}),blob8:({width:p,height:h})=>m({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:p,height:h}),blob9:({width:p,height:h})=>m({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:p,height:h})}}(ig)),ig}var Wb;function bx(){return Wb||(Wb=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(An()),n=Qi,a=Ja,l=Nv(),u=bc(),c=Xs(),d=zd(),m={};e.FigureElement=(0,n.observer)(({element:_,store:k})=>{const x=_.selectable||k.role==="admin",v=(0,c.isTouchDevice)(),[w,p]=t.default.useState(!1),h=k.selectedShapes.indexOf(_)>=0,C=Math.min(_.strokeWidth,_.width/2,_.height/2),g=Math.max(0,Math.min(_.width/2,_.height/2,_.cornerRadius)),b=(0,d.useColor)(_,_.a.fill,"fill"),y=Object.assign(Object.assign({width:_.a.width,height:_.a.height},b),{cornerRadius:g,opacity:_.animated("opacity"),shadowEnabled:_.shadowEnabled,shadowBlur:_.shadowBlur,shadowOffsetX:_.shadowOffsetX,shadowOffsetY:_.shadowOffsetY,shadowColor:_.shadowColor,shadowOpacity:_.shadowOpacity,preventDefault:!v||h,hideInExport:!_.showInExport}),E=(0,d.useColor)(_,_.stroke,"stroke"),L=Object.assign(Object.assign({visible:C>0,x:C/2,y:C/2,width:_.a.width-C,height:_.a.height-C},E),{strokeWidth:C,cornerRadius:Math.max(0,g-C),dash:_.dash.map(S=>S*C),opacity:_.animated("opacity"),hideInExport:!_.showInExport,listening:!1}),R=(D=_.subType,m[D]||(m[D]=(O=(0,l.subTypeToPathDataFunc)(D),(0,n.observer)(({element:S,fillProps:T,strokeProps:M})=>{let A=O({width:S.a.width,height:S.a.height,cornerRadius:S.cornerRadius}),z=1,U=1;typeof A!="string"&&(z=A.scaleX,U=A.scaleY,A=A.path);const Z=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({},T,{ref:Z,data:A,scaleX:z,scaleY:U})),t.default.createElement(a.Group,{clipFunc:X=>{const J=Z.current;if(J){var B=J.dataArray;X.beginPath();for(var N=0;N<B.length;N++){var F=B[N].command,H=B[N].points;switch(F){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 Y=H[0],ee=H[1],V=H[2],K=H[3],$=H[4],ne=H[5],re=H[6],ie=H[7],ae=V>K?V:K,ue=V>K?1:V/K,de=V>K?K/V:1;X.translate(Y,ee),X.rotate(re),X.scale(ue,de),X.arc(0,0,ae,$,$+ne,1-ie),X.scale(1/ue,1/de),X.rotate(-re),X.translate(-Y,-ee);break;case"z":X.closePath()}}}},scaleX:z,scaleY:U},t.default.createElement(a.Path,Object.assign({},M,{x:0,y:0,data:A,strokeWidth:2*M.strokeWidth,dash:M.dash.map(X=>X)}))))}))),m[D]||a.Group);var D,O;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:x,draggable:v?_.draggable&&h:_.draggable,name:"element",onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!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 T=S.target.scale();S.target.scaleX(1),S.target.scaleY(1),_.set({width:_.width*T.x,height:_.height*T.y,x:S.target.x(),y:S.target.y(),rotation:S.target.rotation()})}},t.default.createElement(R,{element:_,fillProps:y,strokeProps:L})),(w||h)&&t.default.createElement(u.Highlighter,{element:_}))})}(hd)),hd}var Yb;function _x(){return Yb||(Yb=1,function(e){var i=rd&&rd.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerShapeComponent=w;const t=i(An()),n=Qi,a=n_(),l=o_(),u=vx(),c=mx(),d=yx(),m=bx(),_=Ja,k=ts(),x=(0,n.observer)(h=>{const{element:C,store:g}=h,{children:b}=C,y=C.selectable||g.role==="admin";return t.default.createElement(_.Group,{opacity:C.opacity,listening:y,hideInExport:!C.showInExport},b.map(E=>t.default.createElement(p,Object.assign({},h,{key:E.id,store:g,element:E}))))}),v={text:a.TextElement,image:l.ImageElement,svg:l.ImageElement,line:c.LineElement,video:d.VideoElement,figure:m.FigureElement,group:x};function w(h,C){v[h]=C}const p=(0,n.observer)(h=>{let C=v[h.element.type];return h.element.type==="text"&&k.flags.htmlRenderEnabled&&(C=u.HTMLElement),h.element.visible?C?t.default.createElement(C,Object.assign({},h)):(console.error("Can not find component for "+h.element.type),null):null});e.default=p}(rd)),rd}var og={},Kb;function wx(){return Kb||(Kb=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 d=0,m=0;return a==="left-top"?(d=0,m=0):a==="left-middle"?(d=0,m=(t.height-c)/2):a==="left-bottom"?(d=0,m=t.height-c):a==="center-top"?(d=(t.width-u)/2,m=0):a==="center-middle"?(d=(t.width-u)/2,m=(t.height-c)/2):a==="center-bottom"?(d=(t.width-u)/2,m=t.height-c):a==="right-top"?(d=t.width-u,m=0):a==="right-middle"?(d=t.width-u,m=(t.height-c)/2):a==="right-bottom"?(d=t.width-u,m=t.height-c):a==="scale"?(d=0,m=0,u=t.width,c=t.height):console.error(new Error("Unknown clip position property - "+a)),{cropX:d,cropY:m,cropWidth:u,cropHeight:c}}Object.defineProperty(e,"__esModule",{value:!0}),e.getCrop=i}(og)),og}var $a={},ag={},Xb;function Sx(){return Xb||(Xb=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=Iv();e.URL="https://api.polotno.com",e.API="https://api.polotno.com/api";const t=()=>e.URL+"/api";e.getAPI=t;const n={},a=(b,y)=>{n[b]||(n[b]=!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:b,page:y=1})=>`${(0,e.getAPI)()}/get-unsplash?query=${b}&per_page=20&page=${y}&KEY=${(0,i.getKey)()}`,unsplashDownload:b=>`${(0,e.getAPI)()}/download-unsplash?id=${b}&KEY=${(0,i.getKey)()}`,svgapiList:({query:b,page:y=0})=>`${(0,e.getAPI)()}/get-svgapi?query=${b}&page=${y}&per_page=20&KEY=${(0,i.getKey)()}`,svgapiDownload:b=>`${(0,e.getAPI)()}/download-svgapi?path=${b}&KEY=${(0,i.getKey)()}`,iconscoutList:({query:b,page:y=1})=>(a("iconscout",l),`${(0,e.getAPI)()}/get-iconscout?query=${b}&page=${y}&KEY=${(0,i.getKey)()}`),iconscoutDownload:b=>(a("iconscout",l),`${(0,e.getAPI)()}/download-iconscout?uuid=${b}&KEY=${(0,i.getKey)()}`),nounProjectList:({query:b,page:y=1})=>`${(0,e.getAPI)()}/get-nounproject?query=${b}&page=${y}&KEY=${(0,i.getKey)()}`,nounProjectDownload:b=>`${(0,e.getAPI)()}/download-nounproject?id=${b}&KEY=${(0,i.getKey)()}`,templateList:({query:b,page:y=1,sizeQuery:E})=>`${(0,e.getAPI)()}/get-templates?${E}&query=${b}&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=b=>{return`${e.URL}/google-fonts-previews/black/${y=b,E=" ",L="-",y.replace(new RegExp(E,"g"),L)}.png`;var y,E,L};e.getGoogleFontImage=c;const d=()=>`${(0,e.getAPI)()}/get-basic-shapes?KEY=${(0,i.getKey)()}`;e.polotnoShapesList=d;const m=()=>`${(0,e.getAPI)()}/remove-image-background?KEY=${(0,i.getKey)()}`;e.removeBackground=m;const _=b=>e.URLS.templateList(b);e.templateList=_;const k=()=>`${(0,e.getAPI)()}/get-text-templates?KEY=${(0,i.getKey)()}`;e.textTemplateList=k;const x=b=>e.URLS.unsplashList(b);e.unsplashList=x;const v=b=>e.URLS.unsplashDownload(b);e.unsplashDownload=v;const w=b=>e.URLS.svgapiList(b);e.svgapiList=w;const p=b=>e.URLS.svgapiDownload(b);e.svgapiDownload=p;const h=b=>e.URLS.iconscoutList(b);e.iconscoutList=h;const C=b=>e.URLS.iconscoutDownload(b);e.iconscoutDownload=C;const g=(b,y)=>{e.URLS[b]=y};e.setAPI=g}(ag)),ag}var Zb;function Iv(){return Zb||(Zb=1,function(e){var i=$a&&$a.__createBinding||(Object.create?function(S,T,M,A){A===void 0&&(A=M);var z=Object.getOwnPropertyDescriptor(T,M);z&&!("get"in z?!T.__esModule:z.writable||z.configurable)||(z={enumerable:!0,get:function(){return T[M]}}),Object.defineProperty(S,A,z)}:function(S,T,M,A){A===void 0&&(A=M),S[A]=T[M]}),t=$a&&$a.__setModuleDefault||(Object.create?function(S,T){Object.defineProperty(S,"default",{enumerable:!0,value:T})}:function(S,T){S.default=T}),n=$a&&$a.__importStar||function(){var S=function(T){return S=Object.getOwnPropertyNames||function(M){var A=[];for(var z in M)Object.prototype.hasOwnProperty.call(M,z)&&(A[A.length]=z);return A},S(T)};return function(T){if(T&&T.__esModule)return T;var M={};if(T!=null)for(var A=S(T),z=0;z<A.length;z++)A[z]!=="default"&&i(M,T,A[z]);return t(M,T),M}}();Object.defineProperty(e,"__esModule",{value:!0}),e.__=e.getKey=e.isCreditVisible=void 0,e.isKeyPaid=D,e.validateKey=O;const a=n(da),l=Sx(),u=ts(),c=a.observable({value:!1}),d=()=>c.value;e.isCreditVisible=d;const m=a.action(()=>{c.value=!0});let _="";const k=()=>_||"";e.getKey=k;const x=5,v=3e3,w="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",p="Polotno API key is not valid. Please get new API key here: https://polotno.com/cabinet",h="Can not validate Polotno API key. Please report to anton@polotno.com immediately.",C="%cPolotno Free Version. Development or non-commercial usage only. https://polotno.com/";let g=window.location.origin;const b=navigator.userAgent.indexOf("Headless")>-1,y=navigator.userAgent.indexOf("Electron")>-1;g==="file://"&&b&&(g="headless"),g==="file://"&&y&&(g="electron");const E=`%cPolotno error! Current domain is not allowed. It may lead to unexpected behavior and stop working. Please add "${g}" here: https://polotno.com/cabinet`;let L=fetch;const R=S=>{L=S};async function D(S){for(let T=0;T<x;T++)try{const M=await L((0,l.getAPI)()+"/validate-key",{method:"POST",body:JSON.stringify({key:S,site:location.host})});if(!S)return console.warn(w),!1;if(M.status!==200){await new Promise(z=>setTimeout(z,v));continue}const A=await M.json();return A.is_valid||console.warn(p),A.is_paid||console.log(C,"background: rgb(0, 161, 255); color: white; padding: 5px; margin: 5px;"),A.is_domain_valid||console.log(E,"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(h),!0}async function O(S,T){_=S,await D(S)&&!T||m()}e.__=R}($a)),$a}var lg={},Qb;function Dv(){return Qb||(Qb=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:d="px"})=>parseFloat((0,e.pxToUnit)({px:l,dpi:c,unit:d}).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}(lg)),lg}var Jb;function Ex(){return Jb||(Jb=1,function(e){var i=Is&&Is.__rest||function(N,F){var H={};for(var Y in N)Object.prototype.hasOwnProperty.call(N,Y)&&F.indexOf(Y)<0&&(H[Y]=N[Y]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function"){var ee=0;for(Y=Object.getOwnPropertySymbols(N);ee<Y.length;ee++)F.indexOf(Y[ee])<0&&Object.prototype.propertyIsEnumerable.call(N,Y[ee])&&(H[Y[ee]]=N[Y[ee]])}return H},t=Is&&Is.__importDefault||function(N){return N&&N.__esModule?N:{default:N}};Object.defineProperty(e,"__esModule",{value:!0}),e.registerNextDomDrop=e.setTransformerStyle=void 0,e.registerTransformerAttrs=S;const n=t(An()),a=Qi,l=da,u=Ja,c=t(Dp()),d=t(Ji()),m=t(_x()),_=g_(),k=o_(),x=wx(),v=Iv(),w=Hd(),p=Dv(),h=ts(),C=Xs(),g=zd(),b=yv(),y=d.default.DD._drag;window.removeEventListener("mousemove",y),d.default.DD._drag=function(N){(0,l.runInAction)(()=>{y.call(this,N)})},window.addEventListener("mousemove",d.default.DD._drag);const E=new d.default.Group;E.add(new d.default.Rect({width:20,height:20,fill:"white"})),E.add(new d.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 L=E.toCanvas({pixelRatio:2,width:20,height:20}),R={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:N=>{N.hasName("rotater")&&N.setAttrs({width:20,height:20,cornerRadius:20/2,offsetX:20/2,offsetY:20/2,fillPatternImage:L,fillPatternScaleX:20/20/2,fillPatternScaleY:20/20/2,fillPriority:"pattern",fillPatternRepeat:"no-repeat"})}},D=N=>{Object.assign(R,N)};e.setTransformerStyle=D;const O={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 S(N,F){O[N]=O[N]||F,Object.assign(O[N],F)}const T=N=>n.default.createElement(u.Rect,Object.assign({},N,{preventDefault:!1})),M=N=>{var{url:F}=N,H=i(N,["url"]);const[Y,ee]=(0,c.default)(F,"anonymous"),V=Y?(0,x.getCrop)(Y,{width:H.width,height:H.height},"center-middle"):{};return(0,k.useImageLoader)(ee,F,"page background"),n.default.createElement(u.Image,Object.assign({image:Y},H,V))},A=N=>{const F=(0,g.useColor)({fill:N.fill,a:{width:N.width,height:N.height}});return n.default.createElement(u.Rect,Object.assign({},N,F))},z=N=>{const{background:F,scale:H,borderColor:Y}=N,ee=i(N,["background","scale","borderColor"]),V=n.default.useMemo(()=>!!d.default.Util.colorToRGBA(F)||(0,b.isGradient)(F),[F]),K=n.default.useMemo(()=>{const $=document.createElement("canvas"),ne=30;$.width=60,$.height=60;const re=$.getContext("2d");return re&&(re.fillStyle="black",re.fillRect(ne,0,ne,ne),re.fillRect(0,ne,ne,ne)),$},[]);return n.default.createElement(n.default.Fragment,null,n.default.createElement(u.Rect,Object.assign({fillPatternImage:K},ee,{opacity:.1,hideInExport:!0})),V?n.default.createElement(A,Object.assign({fill:F},ee)):n.default.createElement(M,Object.assign({url:F},ee)))},U=(0,a.observer)(({selection:N})=>N.visible?n.default.createElement(u.Rect,{name:"selection",x:Math.min(N.x1,N.x2),y:Math.min(N.y1,N.y2),width:Math.abs(N.x1-N.x2),height:Math.abs(N.y1-N.y2),fill:"rgba(0, 161, 255, 0.3)"}):null),Z=(0,a.observer)(({x:N,y:F,width:H,height:Y,rotation:ee,anchor:V,store:K})=>{const $=(0,w.getClientRect)({x:N,y:F,width:H,height:Y,rotation:d.default.Util.radToDeg(ee)});if(V===void 0)return null;const ne=(Y/2+70)*Math.cos(ee-Math.PI/2),re=(Y/2+70)*Math.sin(ee-Math.PI/2),ie=(0,p.pxToUnitRounded)({unit:K.unit,dpi:K.dpi,px:H/K.scale,precious:K.unit==="px"?0:1})+" x "+(0,p.pxToUnitRounded)({unit:K.unit,dpi:K.dpi,px:Y/K.scale,precious:K.unit==="px"?0:1})+(K.unit==="px"?"":" "+K.unit);return n.default.createElement(n.default.Fragment,null,n.default.createElement(u.Label,{x:($.minX+$.maxX)/2+ne,y:($.minY+$.maxY)/2+re,offsetX:14,offsetY:14,visible:V==="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(d.default.Util.radToDeg(ee)).toString()+"°"})),n.default.createElement(u.Label,{x:($.minX+$.maxX)/2,y:$.maxY+20,visible:V!=="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:ie})))}),X=(0,a.observer)(({elements:N,store:F})=>{const H=N.filter(ee=>ee.alwaysOnTop),Y=N.filter(ee=>!ee.alwaysOnTop).concat(H);return n.default.createElement(n.default.Fragment,null,Y.map(ee=>n.default.createElement(m.default,{key:ee.id,store:F,element:ee,onClick:()=>{console.warn("Polotno warning: onClick callback is deprecated. Just stop using it. Polotno will do selection automatically.")}})))});let J=null;const B=N=>{J=N};e.registerNextDomDrop=B,e.default=(0,a.observer)(({store:N,page:F,width:H,height:Y,pageControlsEnabled:ee,backColor:V,pageBorderColor:K,activePageBorderColor:$,components:ne,bleedColor:re,altCloneEnabled:ie})=>{const ae=N.bleedVisible?F.bleed:0,ue=F.computedWidth+2*ae,de=F.computedHeight+2*ae,he=(H-ue*N.scale)/2,Se=(Y-de*N.scale)/2,me=n.default.useRef(null),ke=n.default.useRef(null),fe=n.default.useRef(null),ge=ee==null||ee,[Ce,Te]=n.default.useState(null),[se,be]=n.default.useState({}),xe=N.selectedElements.find(Ne=>Ne._cropModeEnabled),Ie=N.selectedShapes.filter(Ne=>!Ne.resizable).length>0,at=N.selectedShapes.filter(Ne=>!Ne.draggable).length>0,gt=N.selectedElements.filter(Ne=>!Ne.visible).length>0;n.default.useLayoutEffect(()=>{var Ne,Ge,it;if(!me.current)return;const De=me.current.getStage(),mt=N.selectedShapes.map(ht=>ht._cropModeEnabled?null:De.findOne("#"+ht.id)).filter(ht=>ht),Fe=N.selectedElements.length===1&&((Ne=N.selectedElements[0])===null||Ne===void 0?void 0:Ne.type)||"many";O[Fe]?(me.current.setAttrs(Object.assign(Object.assign({},R),O[Fe])),Fe!=="svg"&&Fe!=="image"||N.selectedElements[0].keepRatio||me.current.setAttrs({enabledAnchors:R.enabledAnchors}),Fe==="text"&&h.flags.textVerticalResizeEnabled&&me.current.setAttrs({enabledAnchors:(Ge=O.text.enabledAnchors)===null||Ge===void 0?void 0:Ge.concat(["bottom-center"])})):me.current.setAttrs(R),Ie&&me.current.enabledAnchors([]),at&&me.current.rotateEnabled(!1),mt.find(ht=>ht==null?void 0:ht.isDragging())&&mt.forEach(ht=>{ht.isDragging()||ht==null||ht.startDrag()}),me.current.nodes(mt),(it=me.current.getLayer())===null||it===void 0||it.batchDraw()},[N.selectedElements,xe,Ie,gt,at]);const je=(0,a.useLocalObservable)(()=>({visible:!1,x1:0,y1:0,x2:0,y2:0})),ze=n.default.useRef(!1),He=(0,C.isTouchDevice)(),Xe=(0,l.action)(Ne=>{var Ge,it;if(He)return;ze.current=!1;const De=Ne.target.findAncestor(".elements-container"),mt=Ne.target.findAncestor("Transformer"),Fe=Ne.target.findAncestor(".page-abs-container");if(De||mt||Fe)return;const ht=(Ge=Ne.target.getStage())===null||Ge===void 0?void 0:Ge.getPointerPosition();ht&&(je.visible=!0,je.x1=ht.x,je.y1=ht.y,je.x2=ht.x,je.y2=ht.y,((it=Ne.target.getStage())===null||it===void 0?void 0:it.getPointersPositions().length)>=2&&(je.visible=!1))});n.default.useEffect(()=>{const Ne=(0,l.action)(it=>{var De,mt;if(!je.visible)return;(De=ke.current)===null||De===void 0||De.setPointersPositions(it);let Fe=((mt=ke.current)===null||mt===void 0?void 0:mt.getPointerPosition())||{x:je.x2,y:je.y2};je.x2=Fe.x,je.y2=Fe.y}),Ge=(0,l.action)(()=>{if(!je.visible||!ke.current)return;const it=ke.current.findOne(".selection"),De=it?it.getClientRect():{width:0,height:0,x:0,y:0};if(De.width&&De.height){const mt=[];ke.current.find(".element").forEach(ht=>{const _n=ht.getClientRect(),Be=N.getElementById(ht.id()),st=Be==null?void 0:Be.draggable,_t=Be==null?void 0:Be.selectable;d.default.Util.haveIntersection(De,_n)&&st&&_t&&mt.push(Be.top.id)});const Fe=[...new Set(mt)];N.selectElements(Fe)}je.visible=!1,ze.current=!0});return window.addEventListener("mousemove",Ne),window.addEventListener("touchmove",Ne),window.addEventListener("mouseup",Ge),window.addEventListener("touchend",Ge),()=>{window.removeEventListener("mousemove",Ne),window.removeEventListener("touchmove",Ne),window.removeEventListener("mouseup",Ge),window.removeEventListener("touchend",Ge)}},[]);const et=n.default.useRef(!1);n.default.useEffect(()=>{var Ne;let Ge;const it=(Ne=fe.current)===null||Ne===void 0?void 0:Ne.closest(".polotno-workspace-inner"),De=()=>{et.current=!0,clearTimeout(Ge),Ge=setTimeout(()=>{et.current=!1},300)};return it.addEventListener("scroll",De),()=>{clearTimeout(Ge),it.removeEventListener("scroll",De)}},[]);const Pt=Ne=>{if(N.activePage!==F&&F.select(),et.current||ze.current)return;const Ge=Ne.evt.ctrlKey||Ne.evt.metaKey||Ne.evt.shiftKey,it=Ne.target.findAncestor(".elements-container"),De=Ne.target.findAncestor(".page-abs-container"),mt=Ne.target.findAncestor("Transformer");if(!(Ge||it||mt||De))return void N.selectElements([]);const Fe=Ne.target.findAncestor(".element",!0),ht=N.getElementById(Fe==null?void 0:Fe.id()),_n=ht==null?void 0:ht.top,Be=_n==null?void 0:_n.id,st=N.selectedElementsIds.indexOf(Be)>=0;Be&&Ge&&!st?N.selectElements(N.selectedElementsIds.concat([Be])):Be&&Ge&&st?N.selectElements(N.selectedElementsIds.filter(_t=>_t!==Be)):!Be||Ge||st||N.selectElements([Be])};(0,_.useSnap)(me,N);const wt=N.activePage===F,we=ne==null?void 0:ne.PageControls,Ee=ne==null?void 0:ne.Tooltip,vt=1/N.scale,Ct=0/N.scale;return n.default.createElement("div",{ref:fe,onDragOver:Ne=>Ne.preventDefault(),onDrop:Ne=>{if(Ne.preventDefault(),!ke.current)return;ke.current.setPointersPositions(Ne);const Ge=ke.current.findOne(".elements-container").getRelativePointerPosition(),it=ke.current.getPointerPosition(),De=ke.current.getAllIntersections(it).map(ht=>ht.findAncestor(".element",!0)).filter(Boolean),mt=[...new Set(De.reverse())].map(ht=>N.getElementById(ht.id())),Fe=mt[0];J&&(J(Ge,Fe,{elements:mt,page:F}),J=null)},style:{position:"relative",width:H+"px"},className:"polotno-page-container"+(wt?" active-page":"")},n.default.createElement(u.Stage,{ref:ke,width:Math.min(H,10*window.innerWidth),height:Math.min(Y,10*window.innerHeight),onClick:Pt,onTap:Pt,onMouseDown:Xe,onMouseMove:Ne=>{if(!Ne.evt.altKey&&Ce)return void Te(null);if(!Ne.evt.altKey)return;const Ge=Ne.target.findAncestor(".element",!0),it=Ge==null?void 0:Ge.id();if(!N.selectedElements[0]||N.selectedElementsIds.includes(it))return;const De=(0,w.getTotalClientRect)(N.selectedShapes),mt=it?N.getElementById(it):{x:0,y:0,width:F.computedWidth,height:F.computedHeight,rotation:0},Fe=(0,w.getClientRect)(mt),ht=[];De.minX>Fe.maxX&&ht.push({distance:De.minX-Fe.maxX,box1:De,box2:Fe,points:[{x:De.minX,y:De.minY+De.height/2},{x:Fe.maxX,y:De.minY+De.height/2},{x:Fe.maxX,y:Fe.minY+Fe.height/2}]}),De.maxX<Fe.minX&&ht.push({distance:Fe.minX-De.maxX,box1:De,box2:Fe,points:[{x:De.maxX,y:De.minY+De.height/2},{x:Fe.minX,y:De.minY+De.height/2},{x:Fe.minX,y:Fe.minY+Fe.height/2}]}),De.minY>Fe.maxY&&ht.push({box1:De,box2:Fe,distance:De.minY-Fe.maxY,points:[{x:De.minX+De.width/2,y:De.minY},{x:De.minX+De.width/2,y:Fe.maxY},{x:Fe.minX+Fe.width/2,y:Fe.maxY}]}),De.maxY<Fe.minY&&ht.push({box1:De,box2:Fe,distance:Fe.minY-De.maxY,points:[{x:De.minX+De.width/2,y:De.maxY},{x:De.minX+De.width/2,y:Fe.minY},{x:Fe.minX+Fe.width/2,y:Fe.minY}]}),De.minX>=Fe.minX&&De.maxX<=Fe.maxX&&De.minY>=Fe.minY&&De.maxY<=Fe.maxY&&(ht.push({distance:De.minX-Fe.minX,box1:De,box2:Fe,points:[{x:De.minX,y:De.minY+De.height/2},{x:Fe.minX,y:De.minY+De.height/2},{x:Fe.minX,y:Fe.minY+Fe.height/2}]}),ht.push({distance:Fe.maxX-De.maxX,box1:De,box2:Fe,points:[{x:De.maxX,y:De.minY+De.height/2},{x:Fe.maxX,y:De.minY+De.height/2},{x:Fe.maxX,y:Fe.minY+Fe.height/2}]}),ht.push({box1:De,box2:Fe,distance:De.minY-Fe.minY,points:[{x:De.minX+De.width/2,y:De.minY},{x:De.minX+De.width/2,y:Fe.minY},{x:Fe.minX+Fe.width/2,y:Fe.minY}]}),ht.push({box1:De,box2:Fe,distance:Fe.maxY-De.maxY,points:[{x:De.minX+De.width/2,y:De.maxY},{x:De.minX+De.width/2,y:Fe.maxY},{x:Fe.minX+Fe.width/2,y:Fe.maxY}]})),JSON.stringify(Ce)!==JSON.stringify(ht)&&Te(ht)},onDragStart:Ne=>{var Ge;const it=Ne.target.findAncestor(".element",!0);if(it){const De=N.getElementById(it==null?void 0:it.id()),mt=De==null?void 0:De.top,Fe=mt==null?void 0:mt.id;!(N.selectedElementsIds.indexOf(Fe)>=0)&&Fe&&(N.selectElements([Fe]),Ne.target.stopDrag(),Ne.target.startDrag(Ne),(Ge=me.current)===null||Ge===void 0||Ge.startDrag(Ne))}Ce&&Te(null)},pageId:F.id,style:{position:"relative"}},n.default.createElement(u.Layer,null,n.default.createElement(T,{width:H,height:Y,fill:V}),n.default.createElement(u.Group,{x:he,y:Se,scaleX:N.scale,scaleY:N.scale,name:"page-container"},n.default.createElement(u.Group,{name:"page-container-2"},n.default.createElement(u.Group,{name:"page-background-group",x:ae,y:ae},n.default.createElement(z,{x:-F.bleed,y:-F.bleed,width:F.computedWidth+2*F.bleed,height:F.computedHeight+2*F.bleed,background:F.background,name:"page-background",preventDefault:!1,scale:N.scale})),n.default.createElement(u.Group,{x:ae,y:ae,name:"elements-container",listening:!N.isPlaying},n.default.createElement(u.Rect,{name:"elements-area",width:F.computedWidth,height:F.computedHeight,listening:!1}),n.default.createElement(X,{elements:F.children,store:N})),n.default.createElement(u.Rect,{stroke:re,name:"bleed",strokeWidth:F.bleed,x:F.bleed/2,y:F.bleed/2,width:F.computedWidth+F.bleed,height:F.computedHeight+F.bleed,listening:!1,visible:F.bleed>0&&N.bleedVisible,hideInExport:!0}))),n.default.createElement(u.Line,{name:"workspace-background",points:[0,0,H,0,H,Y,0,Y,0,0,he,Se,he,Y-Se,H-he,Y-Se,H-he,Se,he,Se],listening:!1,closed:!0,fill:V}),n.default.createElement(u.Group,{x:he,y:Se,scaleX:N.scale,scaleY:N.scale},n.default.createElement(u.Rect,{name:"page-highlight",hideInExport:!0,x:-vt/2-Ct,y:-vt/2-Ct,width:ue+vt+2*Ct,height:de+vt+2*Ct,stroke:wt&&N.pages.length>1?$:K,strokeWidth:2,listening:!1,strokeScaleEnabled:!1})),n.default.createElement(u.Group,{x:he+ae*N.scale,y:Se+ae*N.scale,scaleX:N.scale,scaleY:N.scale,name:"page-abs-container"},n.default.createElement(u.Transformer,{ref:me,onDragStart:Ne=>{var Ge;!((Ge=Ne.evt)===null||Ge===void 0)&&Ge.altKey&&ie&&N.selectedElements.forEach(it=>{const De=it.clone({},{skipSelect:!0}),mt=F.children.indexOf(it);F.setElementZIndex(De.id,mt)}),N.history.startTransaction()},onDragEnd:()=>{N.history.endTransaction()},onTransformStart:()=>{N.history.startTransaction()},boundBoxFunc:(Ne,Ge)=>{const it=Math.abs(Ge.width)<1||Math.abs(Ge.height)<1,De=Math.abs(Ne.width)<1||Math.abs(Ne.height)<1;return it&&!De?Ne:Ge},onTransform:Ne=>{var Ge,it;const De=me.current.nodes(),mt=De[De.length-1];if(Ne.target!==mt)return;const Fe=(Ge=me.current)===null||Ge===void 0?void 0:Ge.__getNodeRect(),ht=(it=me.current)===null||it===void 0?void 0:it.getActiveAnchor();be({anchor:ht,x:Fe.x,y:Fe.y,rotation:Fe.rotation,width:Fe.width,height:Fe.height})},onTransformEnd:Ne=>{be({}),N.history.endTransaction()},visible:!N.isPlaying}),Ce&&Ce.map(({points:Ne,distance:Ge,box1:it,box2:De},mt)=>n.default.createElement(u.Group,{name:"distances-container",hideInExport:!0,key:mt,listening:!1},n.default.createElement(u.Rect,Object.assign({},it,{stroke:"rgb(0, 161, 255)",strokeWidth:1,strokeScaleEnabled:!1})),n.default.createElement(u.Rect,Object.assign({},De,{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/N.scale,scaleY:1/N.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,p.pxToUnitString)({unit:N.unit,dpi:N.dpi,px:Ge})})))),F._rendering&&n.default.createElement(u.Group,null,n.default.createElement(u.Rect,{width:ue,height:de,fill:"rgba(255,255,255,0.9)"}),n.default.createElement(u.Text,{text:"Rendering...",fontSize:60,width:ue,height:de,align:"center",verticalAlign:"middle"})),Ee&&n.default.createElement(Ee,{components:ne,store:N,page:F,stageRef:ke})),n.default.createElement(Z,Object.assign({},se,{store:N})),n.default.createElement(U,{selection:je}),(0,v.isCreditVisible)()&&n.default.createElement(u.Text,{text:"Powered by polotno.com",fontSize:14,fill:"rgba(0,0,0,0.6)",x:H-170,y:Y-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"}))),ge&&we&&n.default.createElement(we,{store:N,page:F,xPadding:he,yPadding:Se}))})}(Is)),Is}var pd={},e3;function Ox(){return e3||(e3=1,function(e){var i=pd&&pd.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(e,"__esModule",{value:!0}),e.TopRules=void 0,e.LeftRules=v;const t=i(An()),n=Hd(),a=Dv(),l=Qi,u=p_(),c=(0,u.styled)("div",t.default.forwardRef)`
|
|
257
|
-
position: absolute;
|
|
258
|
-
top: 0;
|
|
259
|
-
left: 0;
|
|
260
|
-
pointer-events: none;
|
|
261
|
-
`,d=(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
|
-
`,m=(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
|
-
`,x=[.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:w,width:p,height:h})=>{const C=t.default.useRef(null);if(!w.activePage)return null;const g=w.activePage,b=(w.bleedVisible&&g.bleed,g.computedWidth*w.scale),y=g.computedHeight*w.scale,E=(p-b)/2,L=(R=M=>(0,a.unitToPx)({unitVal:M,dpi:w.dpi,unit:w.unit})*w.scale,x.find(M=>R(M)>30)||1e4);var R;const D=(0,a.unitToPx)({unitVal:L,dpi:w.dpi,unit:w.unit})*w.scale,O=Math.round(b/D)+1,S=Math.round(y/D)+1,T=(0,n.getTotalClientRect)(w.selectedShapes);return t.default.createElement(c,{ref:C,className:"polotno-rulers"},t.default.createElement(d,{style:{width:p+"px"},className:"polotno-x-ruler"},[...Array(O)].map((M,A)=>t.default.createElement(_,{key:A,style:{left:E+A*D+"px",width:D+"px"}},w.unit==="px"||L>=1?Math.round(L*A):(L*A).toFixed(1))),!!w.selectedShapes.length&&t.default.createElement("div",{style:{position:"absolute",left:E+T.x*w.scale+"px",height:"14px",width:T.width*w.scale,backgroundColor:"rgba(0,0,0,0.15)"}})),w.pages.map((M,A)=>{var z;const U=M.computedHeight*w.scale,Z=(h-U)/2;return t.default.createElement(m,{key:M.id,style:{height:h+"px"},className:"polotno-y-ruler"},[...Array(S)].map((X,J)=>t.default.createElement(k,{key:J,style:{top:Z+J*D-14+"px",width:D+"px"}},w.unit==="px"||L>=1?Math.round(L*J):(L*J).toFixed(1))),((z=w.selectedShapes[0])===null||z===void 0?void 0:z.page)===M&&t.default.createElement("div",{style:{position:"absolute",top:Z+T.y*w.scale-14+"px",width:"14px",height:T.height*w.scale,backgroundColor:"rgba(0,0,0,0.15)"}}))}))})}(pd)),pd}var gd={},t3;function xx(){return t3||(t3=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(An()),n=Qi;function a(l){const[u,c]=t.default.useState(null),[d,m]=t.default.useState("loading");return t.default.useEffect(()=>{const _=new Audio(l),k=()=>{m("loaded"),c(_)},x=()=>{m("failed"),c(null)};return _.addEventListener("canplay",k),_.addEventListener("error",x),()=>{_.removeEventListener("canplay",k),_.removeEventListener("error",x)}},[l]),[u,d]}e.AudioElement=(0,n.observer)(({audio:l,store:u})=>{const[c,d]=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 m=()=>{c.currentTime=l.startTime*l.duration},_=()=>{c.currentTime>=l.endTime*l.duration&&(c.pause(),c.currentTime=l.startTime*l.duration)};return c.addEventListener("ended",m),c.addEventListener("timeupdate",_),()=>{c.pause(),c.removeEventListener("ended",m),c.removeEventListener("timeupdate",_)}},[u.isPlaying,l.startTime,l.endTime,l.volume,c]),null})}(gd)),gd}var sg={},vd={};let Px="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",v_=e=>crypto.getRandomValues(new Uint8Array(e)),m_=(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),d=a;for(;d--;)if(u+=e[c[d]&n]||"",u.length===l)return u}}},Cx=(e,i=21)=>m_(e,i,v_),kx=(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 Ax=Object.freeze(Object.defineProperty({__proto__:null,customAlphabet:Cx,customRandom:m_,nanoid:kx,random:v_,urlAlphabet:Px},Symbol.toStringTag,{value:"Module"})),Gp=Xl(Ax);var ug={},Ai={},cg={},fg={},n3;function y_(){return n3||(n3=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}(fg)),fg}var r3;function Tx(){return r3||(r3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UndoManager=void 0;const i=eo,t=y_();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,d=0,m=0;const _=()=>m>0;function k(){const v=(0,i.getSnapshot)(a);return{pages:v.pages,width:v.width,height:v.height,custom:v.custom}}function x(v){const w=a.pages.map(g=>g.id),p=v.pages.map(g=>g.id),h=!(0,t.deepEqual)(w,p),C=!(0,t.deepEqual)(a.custom,v.custom);h?(0,i.applySnapshot)(a.pages,v.pages):a.pages.forEach((g,b)=>{(0,i.applySnapshot)(g,v.pages[b])}),C&&a.set({custom:v.custom}),a.setSize(v.width,v.height)}return{startTransaction(){m++},endTransaction(v){m--,v||this.requestAddState(k())},async ignore(v,w=!1,p=!1){p&&await new Promise(y=>setTimeout(y,10)),d&&n.addUndoState();let h=_();n.startTransaction();let C=m;try{await v()}catch(y){setTimeout(()=>{throw y})}const g=C!==m,b=!g;n.endTransaction(b),w||h||n.replaceState(),g||(clearTimeout(d),d=0)},async transaction(v){await n.ignore(v,!0),this.addUndoState()},requestAddState(v){c=v,d||_()||(u?u=!1:d=setTimeout(()=>{d=0,clearTimeout(d),_()||this.addUndoState()},100))},addUndoState(){if(u)return void(u=!1);const v=n.history[n.undoIdx];!(0,t.deepEqual)(c,v)&&(clearTimeout(d),d=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(d),d=0,n.history.splice(0,n.history.length),n.undoIdx=-1,n.addUndoState(k())},beforeDestroy(){l()},undo(){d&&this.addUndoState(),n.canUndo?(n.undoIdx--,u=!0,x(n.history[n.undoIdx])):console.warn("No undo history. Please check `store.history.canUndo` before calling undo action.")},redo(){d&&this.addUndoState(),n.canRedo?(n.undoIdx++,u=!0,x(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}(cg)),cg}var dg={},i3;function Rx(){return i3||(i3=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}(dg)),dg}var hg={},o3;function Mx(){return o3||(o3=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)})}}(hg)),hg}var pg={},a3;function Lx(){return a3||(a3=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"}))})}}(pg)),pg}var gg={},l3;function Nx(){return l3||(l3=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}(gg)),gg}var Oo={},vg={},s3;function _p(){return s3||(s3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getImageSize=t,e.loadImage=n,e.cropImage=a,e.getCrop=l;const i=qd();function t(u){return new Promise(c=>{const d=document.createElement("img");d.onload=async()=>{d.width===0||d.height===0?c(await(0,i.getSvgSize)(u)):c({width:d.width,height:d.height})},d.crossOrigin="anonymous",d.src=u})}function n(u){return new Promise((c,d)=>{const m=document.createElement("img");m.onload=()=>{c(m)},m.onerror=_=>{d(_)},m.crossOrigin="anonymous",m.src=u})}async function a(u,c){const d=await n(u),m=document.createElement("canvas");m.width=2*d.width,m.height=2*d.height,m.getContext("2d").drawImage(d,0,0,m.width,m.height);const _=document.createElement("canvas");_.width=c.width,_.height=c.height;const k=_.getContext("2d");let{cropX:x,cropY:v}=c;const w=m.width*c.cropWidth,p=m.height*c.cropHeight,h=c.width/c.height;let C,g;const b=w/p;return c.type==="svg"?(C=w,g=p):h>=b?(C=w,g=w/h):(C=p*h,g=p),k.drawImage(m,x*m.width,v*m.height,C,g,0,0,_.width,_.height),_.toDataURL("image/png")}function l(u,c){const{width:d,height:m}=u,_=d/m;let k,x;_>=c.width/c.height?(k=c.width,x=c.width/_):(k=c.height*_,x=c.height);const v=(c.width-k)/2,w=(c.height-x)/2;return{cropX:v/c.width,cropY:w/c.height,cropWidth:k/c.width,cropHeight:x/c.height}}}(vg)),vg}var u3;function Ix(){return u3||(u3=1,function(e){var i=Oo&&Oo.__createBinding||(Object.create?function(O,S,T,M){M===void 0&&(M=T);var A=Object.getOwnPropertyDescriptor(S,T);A&&!("get"in A?!S.__esModule:A.writable||A.configurable)||(A={enumerable:!0,get:function(){return S[T]}}),Object.defineProperty(O,M,A)}:function(O,S,T,M){M===void 0&&(M=T),O[M]=S[T]}),t=Oo&&Oo.__setModuleDefault||(Object.create?function(O,S){Object.defineProperty(O,"default",{enumerable:!0,value:S})}:function(O,S){O.default=S}),n=Oo&&Oo.__importStar||function(){var O=function(S){return O=Object.getOwnPropertyNames||function(T){var M=[];for(var A in T)Object.prototype.hasOwnProperty.call(T,A)&&(M[M.length]=A);return M},O(S)};return function(S){if(S&&S.__esModule)return S;var T={};if(S!=null)for(var M=O(S),A=0;A<M.length;A++)M[A]!=="default"&&i(T,S,M[A]);return t(T,S),T}}(),a=Oo&&Oo.__rest||function(O,S){var T={};for(var M in O)Object.prototype.hasOwnProperty.call(O,M)&&S.indexOf(M)<0&&(T[M]=O[M]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function"){var A=0;for(M=Object.getOwnPropertySymbols(O);A<M.length;A++)S.indexOf(M[A])<0&&Object.prototype.propertyIsEnumerable.call(O,M[A])&&(T[M[A]]=O[M[A]])}return T};Object.defineProperty(e,"__esModule",{value:!0}),e.fixRatio=k,e.jsonToDOM=E,e.jsonToHTML=D;const l=_p(),u=n(qd()),c=_p(),d=Nv(),m=h_(),_=(O,S,...T)=>({type:O,props:S,children:T||[]});function k(O){var S=new DOMParser().parseFromString(O,"image/svg+xml");return S.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(S)}const x=async({element:O,page:S,store:T})=>{let{src:M}=O;if(O.type==="svg"&&Object.keys(O.colorsReplace).length){const re=await u.urlToString(M);M=u.replaceColors(re,new Map(Object.entries(O.colorsReplace)))}let A="";O.flipX&&(A+="scaleX(-1)"),O.flipY&&(A+="scaleY(-1)"),A||(A="none");const z={};if(O.clipSrc){const re=await u.urlToBase64(O.clipSrc);z["clip-path"]=`url(${re})`}const U=await(0,c.loadImage)(M),Z=U.width*O.cropWidth,X=U.height*O.cropHeight,J=O.width/O.height;let B,N;const F=Z/X;O.type==="svg"?(B=Z,N=X):J>=F?(B=Z,N=Z/J):(B=X*J,N=X);const H=B/U.width,Y=N/U.height,ee=B/N>O.width/O.height?O.height/N:O.width/B,V=B*ee/H,K=N*ee/Y,$=O.cropX*ee*U.width,ne=O.cropY*ee*U.height;return _("div",{style:Object.assign(Object.assign({},z),{width:"100%",height:"100%","border-radius":O.cornerRadius+"px",border:O.borderSize?`${O.borderSize}px solid ${O.borderColor}`:"none",background:`url(${M})`,transform:A,"background-size":`${Math.round(V)}px ${Math.round(K)}px`,"background-position-x":-Math.round($)+"px","background-position-y":-Math.round(ne)+"px"})})},v=async({element:O,page:S,store:T})=>{let M={top:0,left:0};O.fill.indexOf("gradient")>=0&&(M=Object.assign(Object.assign({},M),{"background-color":O.fill,"background-image":O.fill,"background-clip":"text","text-fill-color":"transparent","-webkit-background-clip":"text","-webkit-text-fill-color":"transparent"}));const A=O.backgroundPadding*(O.fontSize*O.lineHeight),z=_("div",{style:{position:"absolute",top:-A/2+"px",left:-A/2+"px",display:O.backgroundEnabled?"block":"none",width:O.width+A+"px",height:O.height+A+"px","background-color":O.backgroundColor,"border-radius":O.backgroundCornerRadius*(O.fontSize*O.lineHeight*.5)+"px"}});O.verticalAlign==="middle"?(M.top="50%",M.transform="translateY(-50%)"):O.verticalAlign==="bottom"&&(M.bottom=0);const U=/<[a-z][\s\S]*>/i.test(O.text),Z=Object.assign(Object.assign({},M),{position:"absolute",width:O.width+"px",color:O.fill,"white-space":"pre-wrap","font-size":O.fontSize+"px","text-align":O.align,"font-family":O.fontFamily,"text-decoration":O.textDecoration||"none","line-height":O.lineHeight,"letter-spacing":O.letterSpacing+"em","font-style":O.fontStyle,"font-weight":O.fontWeight,"-webkit-text-stroke":`${O.strokeWidth}px ${O.stroke}`,"text-stroke":`${O.strokeWidth}px ${O.stroke}`}),X="el-"+O.id,J=U?{id:X}:{},B=`<style>#${X} {${m.resetStyleContent}}</style>`,N=_("div",Object.assign(Object.assign({style:Z},J),{innerHTML:U?`${B}${O.text}`:O.text.split(`
|
|
297
|
-
`).join("<br />")}));return _("div",{style:{position:"relative",width:"100%",height:"100%"}},z,N)},w=({element:O,type:S})=>{const T={"stroke-width":O.height,stroke:O.color,"line-cap":"round","stroke-linejoin":"round",opacity:O.opacity};return S==="arrow"||S==="triangle"?_("polyline",Object.assign({points:`${3*O.height},${2*-O.height} 0,0 ${3*O.height},${2*O.height}`},T)):S==="bar"?_("polyline",Object.assign({points:`0,${2*-O.height} 0,${2*O.height}`},T)):S==="circle"?_("circle",Object.assign({r:O.height},T)):S==="square"?_("polyline",Object.assign({points:`${-O.height},${-O.height} ${-O.height},${O.height} ${O.height},${O.height} ${O.height},${-O.height}`},T)):null},p=async({element:O,page:S,store:T})=>_("svg",{style:{width:"100%",height:"100%",contain:"layout style size",overflow:"visible"}},_("rect",{x:0,y:0,width:O.width,height:O.height,fill:O.color}),_("g",{transform:`translate(0 ${O.height/2})`},w({element:O,type:O.startHead})),_("g",{transform:`translate(${O.width} ${O.height/2}) rotate(180)`},w({element:O,type:O.endHead}))),h=async({element:O,page:S,store:T,elementHook:M})=>{const A=await Promise.all(O.children.map(U=>b({element:U,page:S,store:T,elementHook:M}))),z=_("div",{style:{"transform-origin":"top left",opacity:O.opacity}},...A);return M&&M({dom:z,element:O})||z},C=async({element:O,page:S,store:T,elementHook:M})=>{const A=(0,d.figureToSvg)(O),z=_("div",{innerHTML:A});return M&&M({dom:z,element:O})||z},g={image:x,svg:x,text:v,line:p,figure:C,group:h};async function b({element:O,page:S,store:T,elementHook:M}){let A=await g[O.type];A||(A=()=>_("div",{}),console.error(`HTML export does not support ${O.type} type...`));const z=await A({element:O,page:S,store:T}),U=[];O.blurEnabled&&U.push(`blur(${O.blurRadius/2}px)`),O.brightnessEnabled&&U.push(`brightness(${100*O.brightness+100}%)`),O.sepiaEnabled&&U.push("sepia()"),O.grayscaleEnabled&&U.push("grayscale()"),O.shadowEnabled&&U.push(`drop-shadow(${O.shadowOffsetX}px ${O.shadowOffsetY}px ${O.shadowBlur}px ${O.shadowColor})`);const Z=_("div",{id:O.id,style:{position:"absolute",left:O.x+"px",top:O.y+"px",width:O.width+"px",height:O.height+"px",transform:`rotate(${O.rotation}deg)`,"transform-origin":"top left",opacity:O.opacity,display:O.visible&&O.showInExport?"block":"none",filter:U.join(" ")||"none"}},z);return M&&M({dom:Z,element:O})||Z}async function y({page:O,store:S,elementHook:T}){const M=await Promise.all(O.children.map(Z=>b({element:Z,page:O,store:S,elementHook:T}))),A=O.width==="auto"?S.width:O.width,z=O.height==="auto"?S.height:O.height;let U={};if(O.background.indexOf("url")>=0||O.background.indexOf("http")>=0||O.background.indexOf(".jpg")>=0||O.background.indexOf(".png")>=0||O.background.indexOf(".jpeg")>=0){const{width:Z,height:X}=await(0,c.loadImage)(O.background),J=await x({element:Object.assign({x:0,y:0,width:Z,height:X,src:O.background,cornerRadius:0},(0,l.getCrop)({width:Z,height:X},{width:Z,height:X})),page:O,store:S});M.unshift(J)}else U=Object.assign(Object.assign({},U),{"background-color":O.background});return _("div",{className:"page",id:O.id,style:Object.assign(Object.assign({},U),{width:A+"px",height:z+"px",border:"1px solid grey",overflow:"hidden",position:"relative"})},...M)}async function E({json:O,elementHook:S}){const T=await Promise.all(O.pages.map(z=>y({page:z,store:O,elementHook:S}))),M=[];O.pages.forEach(z=>{z.children.forEach(U=>{U.type==="text"&&M.indexOf(U.fontFamily)===-1&&M.push(U.fontFamily)})});const A=M.map(z=>O.fonts.find(U=>U.fontFamily===z)?_("style",{},""):_("link",{href:`https://fonts.googleapis.com/css?family=${z}`,rel:"stylesheet"}));return _("div",{className:"design"},...A,...T)}const L=(O,S)=>typeof S=="object"?`${O}="${Object.keys(S).map(T=>`${T}:${S[T]};`).join(" ")}"`:`${O}="${S}"`,R=({dom:O})=>{if(typeof O=="string")return O;if(!O)return"";const S=O.props,{innerHTML:T}=S,M=a(S,["innerHTML"]);return`<${O.type} ${Object.keys(M).map(A=>L(A,O.props[A])).join(" ")}>${T||O.children.map(A=>R({dom:A})).join("")}</${O.type}>`};async function D({json:O,elementHook:S}){const T=await E({json:O,elementHook:S});return R({dom:T})}}(Oo)),Oo}var xo={},c3;function Dx(){return c3||(c3=1,function(e){var i=xo&&xo.__createBinding||(Object.create?function(O,S,T,M){M===void 0&&(M=T);var A=Object.getOwnPropertyDescriptor(S,T);A&&!("get"in A?!S.__esModule:A.writable||A.configurable)||(A={enumerable:!0,get:function(){return S[T]}}),Object.defineProperty(O,M,A)}:function(O,S,T,M){M===void 0&&(M=T),O[M]=S[T]}),t=xo&&xo.__setModuleDefault||(Object.create?function(O,S){Object.defineProperty(O,"default",{enumerable:!0,value:S})}:function(O,S){O.default=S}),n=xo&&xo.__importStar||function(){var O=function(S){return O=Object.getOwnPropertyNames||function(T){var M=[];for(var A in T)Object.prototype.hasOwnProperty.call(T,A)&&(M[M.length]=A);return M},O(S)};return function(S){if(S&&S.__esModule)return S;var T={};if(S!=null)for(var M=O(S),A=0;A<M.length;A++)M[A]!=="default"&&i(T,S,M[A]);return t(T,S),T}}(),a=xo&&xo.__rest||function(O,S){var T={};for(var M in O)Object.prototype.hasOwnProperty.call(O,M)&&S.indexOf(M)<0&&(T[M]=O[M]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function"){var A=0;for(M=Object.getOwnPropertySymbols(O);A<M.length;A++)S.indexOf(M[A])<0&&Object.prototype.propertyIsEnumerable.call(O,M[A])&&(T[M[A]]=O[M[A]])}return T};Object.defineProperty(e,"__esModule",{value:!0}),e.fixRatio=_,e.jsonToDOM=E,e.jsonToSVG=D;const l=_p(),u=n(qd()),c=_p(),d=Nv(),m=(O,S,...T)=>({type:O,props:S,children:T||[]});function _(O){var S=new DOMParser().parseFromString(O,"image/svg+xml");return S.documentElement.setAttribute("preserveAspectRatio","none"),new XMLSerializer().serializeToString(S)}const k=async({element:O,page:S,store:T})=>{let{src:M}=O;if(O.type==="svg"){const ie=await u.urlToString(M);M=u.replaceColors(ie,new Map(Object.entries(O.colorsReplace)))}let A="";O.flipX&&(A+="scaleX(-1)"),O.flipY&&(A+="scaleY(-1)"),O.clipSrc&&await u.urlToBase64(O.clipSrc);const z=await(0,c.loadImage)(M),U=z.width*O.cropWidth,Z=z.height*O.cropHeight,X=O.width/O.height;let J,B;const N=U/Z;O.type==="svg"?(J=U,B=Z):X>=N?(J=U,B=U/X):(J=Z*X,B=Z);const F=J/z.width,H=B/z.height,Y=J/B>O.width/O.height?O.height/B:O.width/J,ee=J*Y/F,V=B*Y/H,K=O.cropX*z.width*Y,$=O.cropY*z.height*Y,ne=`clip-${O.id}`,re=M.replace(/&/g,"&");return m("g",{style:{transform:A}},m("defs",{},m("clipPath",{id:ne},m("rect",{x:0,y:0,width:O.width,height:O.height}))),m("image",{"xlink:href":re,x:-K,y:-$,width:ee,height:V,preserveAspectRatio:"none","clip-path":`url(#${ne})`}))},x=async({element:O,page:S,store:T})=>{const M=(X,J,B,N,F)=>{const H=document.createElement("canvas").getContext("2d");return H.font=`${F} ${N} ${J}px ${B}`,H.measureText(X).width},A=((X,J,B,N,F,H)=>{const Y=[];return X.split(`
|
|
298
|
-
`).forEach(ee=>{const V=ee.split(" ");let K="";for(let $=0;$<V.length;$++){const ne=K+V[$]+" ";M(ne,B,N,F,H)>J+.5&&$>0?(Y.push(K.trim()),K=V[$]+" "):K=ne}Y.push(K.trim())}),Y})(O.text,O.width,O.fontSize,O.fontFamily,O.fontWeight,O.fontStyle),z=O.fontSize*O.lineHeight,U=O.align==="center"?"middle":O.align==="right"?"end":"start",Z=A.map((X,J)=>m("tspan",{x:O.align==="center"?O.width/2:O.align==="right"?O.width:0,dy:J===0?0:z,innerHTML:X}));return m("g",{},m("text",{fill:O.fill,y:O.fontSize,"font-size":O.fontSize+"px","text-anchor":U,"font-family":O.fontFamily,"font-style":O.fontStyle,"font-weight":O.fontWeight,"text-decoration":O.textDecoration,"line-height":O.lineHeight,"letter-spacing":O.letterSpacing+"em","stroke-width":O.strokeWidth,stroke:O.stroke},...Z))},v=({element:O,type:S})=>{const T={"stroke-width":O.height,stroke:O.color,"line-cap":"round","stroke-linejoin":"round",opacity:O.opacity};return S==="arrow"||S==="triangle"?m("polyline",Object.assign({points:`${3*O.height},${2*-O.height} 0,0 ${3*O.height},${2*O.height}`},T)):S==="bar"?m("polyline",Object.assign({points:`0,${2*-O.height} 0,${2*O.height}`},T)):S==="circle"?m("circle",Object.assign({r:O.height},T)):S==="square"?m("polyline",Object.assign({points:`${-O.height},${-O.height} ${-O.height},${O.height} ${O.height},${O.height} ${O.height},${-O.height}`},T)):null},w=async({element:O,page:S,store:T})=>m("g",{},m("line",{x1:0,y1:O.height/2,x2:O.width,y2:O.height/2,stroke:O.color,"stroke-width":O.height}),m("g",{transform:`translate(0 ${O.height/2})`},v({element:O,type:O.startHead})),m("g",{transform:`translate(${O.width} ${O.height/2}) rotate(180)`},v({element:O,type:O.endHead}))),p=async({element:O,page:S,store:T,elementHook:M})=>{const A=await Promise.all(O.children.map(U=>b({element:U,page:S,store:T,elementHook:M}))),z=m("g",{opacity:O.opacity,transform:`translate(${O.x}, ${O.y}) rotate(${O.rotation})`,style:{"transform-origin":"top left"}},...A);return M&&M({dom:z,element:O})||z};function h(O){let S=O.replace(/<svg[^>]*>/,"");return S=S.replace(/<\/svg>/,""),S}const C=async({element:O,page:S,store:T,elementHook:M})=>{const A=h((0,d.figureToSvg)(O)),z=m("g",{innerHTML:A});return M&&M({dom:z,element:O})||z},g={image:k,svg:k,text:x,line:w,figure:C,group:p};async function b({element:O,page:S,store:T,elementHook:M}){let A=await g[O.type];A||(A=()=>m("g",{}),console.error(`SVG export does not support ${O.type} type...`));const z=await A({element:O,page:S,store:T}),U=[];O.blurEnabled&&U.push(`blur(${O.blurRadius/2}px)`),O.brightnessEnabled&&U.push(`brightness(${100*O.brightness+100}%)`),O.sepiaEnabled&&U.push("sepia()"),O.grayscaleEnabled&&U.push("grayscale()"),O.shadowEnabled&&U.push(`drop-shadow(${O.shadowOffsetX}px ${O.shadowOffsetY}px ${O.shadowBlur}px ${O.shadowColor})`);const Z=m("g",{className:"element",id:O.id,transform:`translate(${O.x}, ${O.y}) rotate(${O.rotation})`,display:O.visible?void 0:"none",style:{"transform-origin":"top left",filter:U.join(" ")}},z);return M&&M({dom:Z,element:O})||Z}async function y({page:O,store:S,elementHook:T}){const M=await Promise.all(O.children.map(U=>b({element:U,page:O,store:S,elementHook:T}))),A=O.background.indexOf("url")>=0||O.background.indexOf("http")>=0||O.background.indexOf(".jpg")>=0||O.background.indexOf(".png")>=0||O.background.indexOf(".jpeg")>=0;let z;if(A){const U=await(0,c.loadImage)(O.background);z=await(0,c.cropImage)(O.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 m("g",{className:"page",style:{}},A?m("image",{"xlink:href":z,x:0,y:0,width:S.width,height:S.height,preserveAspectRatio:"none"}):m("rect",{x:0,y:0,width:S.width,height:S.height,fill:A?void 0:O.background}),...M)}async function E({json:O,elementHook:S}){const T=await Promise.all(O.pages.map(z=>y({page:z,store:O,elementHook:S}))),M=[];O.pages.forEach(z=>{z.children.forEach(U=>{U.type==="text"&&M.indexOf(U.fontFamily)===-1&&M.push(U.fontFamily)})});const A=M.map(z=>O.fonts.find(U=>U.fontFamily===z)?m("style",{},""):m("defs",{},m("style",{type:"text/css",innerHTML:`@import url('https://fonts.googleapis.com/css?family=${z}:bi,normal,i,b');`.replace(/&/g,"&")})));return m("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:`0 0 ${O.width} ${O.height}`,width:O.width,height:O.height},...A,...T)}const L=(O,S)=>typeof S=="object"?`${O}="${Object.keys(S).map(T=>`${T}:${S[T]};`).join(" ")}"`:S==null||S===""?"":`${O}="${S}"`,R=({dom:O,nestLevel:S=0})=>{if(typeof O=="string")return O;if(!O)return"";const T=O.props,{innerHTML:M}=T,A=a(T,["innerHTML"]),z=" ".repeat(S);return`${z}<${O.type} ${Object.keys(A).map(U=>L(U,A[U])).join(" ")}>${M||`
|
|
299
|
-
`+O.children.map(U=>R({dom:U,nestLevel:S+1})).join("")}${z}</${O.type}>
|
|
300
|
-
`};async function D({json:O,elementHook:S}){const T=await E({json:O,elementHook:S});return R({dom:T})}}(xo)),xo}var mg={},f3;function b_(){return f3||(f3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Page=void 0;const i=eo,t=Gp,n=Ad(),a=jv(),l=Ad(),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 d=Object.assign({},c),m={};for(var _ in d)_[0]!=="_"&&(m[_]=c[_]);return m}).views(c=>({get store(){return(0,i.getParentOfType)(c,a.Store)}})).views(c=>({get startTime(){let d=0;for(const m of c.store.pages){if(m.id===c.id)return d;d+=m.duration}return d},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(d,m){const _=d.map(k=>({id:k,index:c.children.findIndex(x=>x.id===k)}));_.sort((k,x)=>x.index-k.index);for(const{index:k}of _){if(k==-1)continue;const x=k<c.children.length-1&&c.children[k+1],v=d.indexOf(x==null?void 0:x.id)>=0;k===c.children.length-1||v||m(k)}},_forEachElementDown(d,m){const _=d.map(k=>({id:k,index:c.children.findIndex(x=>x.id===k)}));_.sort((k,x)=>k.index-x.index);for(const{index:k}of _){if(k==-1)continue;const x=k>0&&c.children[k-1],v=d.indexOf(x==null?void 0:x.id)>=0;k===0||v||m(k)}return!1}})).actions(c=>({clone(d={}){const m=c.toJSON();m.children.forEach(v=>{v.id=(0,t.nanoid)(10),(0,l.forEveryChild)(v,w=>{w.id=(0,t.nanoid)(10)})});const _=Object.assign(Object.assign(Object.assign({},m),{id:(0,t.nanoid)(10)}),d),k=c.store.addPage(_),x=c.store.pages.indexOf(c);k.setZIndex(x+1),k.select()},setZIndex(d){c.store.setPageZIndex(c.id,d)},set(d){Object.assign(c,d)},select(){c.store.selectPage(c.id)},addElement(d,{skipSelect:m=!1}={}){const _=l.TYPES_MAP[d.type];if(!_)return void console.error("Can not find model with type "+d.type);"children"in d&&Array.isArray(d.children)&&d.children.forEach(x=>{x.id=(0,t.nanoid)(10)});const k=_.create(Object.assign({id:(0,t.nanoid)(10)},d));return c.children.push(k),k.selectable&&!m&&c.store.selectElements([k.id]),k},canMoveElementsUp(d){let m=!1;return c._forEachElementUp(d,()=>{m=m||!0}),m},moveElementsUp(d){c._forEachElementUp(d,m=>{const _=c.children[m];(0,i.detach)(_),c.children.splice(m+1,0,_)})},canMoveElementsTop(d){return this.canMoveElementsUp(d)},moveElementsTop(d){const m=[],_=[];c.children.forEach(k=>{d.indexOf(k.id)>=0?m.push(k):_.push(k)}),c.children.replace(_.concat(m))},canMoveElementsDown(d){let m=!1;return c._forEachElementDown(d,()=>{m=m||!0}),m},moveElementsDown(d){c._forEachElementDown(d,m=>{const _=c.children[m];(0,i.detach)(_),c.children.splice(m-1,0,_)})},canMoveElementsBottom(d){return this.canMoveElementsDown(d)},moveElementsBottom(d){const m=[],_=[];c.children.forEach(k=>{d.indexOf(k.id)>=0?m.push(k):_.push(k)}),c.children.replace(m.concat(_))},setElementZIndex(d,m){const _=c.children.find(k=>k.id===d);_&&((0,i.detach)(_),c.children.remove(_),c.children.splice(m,0,_))},setSize({width:d,height:m,useMagic:_,softChange:k}){if(_){const x=[],v=A=>A.type==="image"&&A.x<1&&A.y<1&&A.width>=c.computedWidth-2&&A.height>=c.computedHeight-2;(0,l.forEveryChild)(c,A=>{A.type!=="group"&&(v(A)||x.push(A))});const w=x.length?(0,u.getTotalClientRect)(x):{x:0,y:0,width:c.computedWidth,height:c.computedHeight},p=1/4,h=Math.max(0,Math.min(w.x,c.computedWidth-w.x-w.width)),C=c.computedWidth*p,g=Math.max(0,h-C),b=Math.max(0,Math.min(w.y,c.computedHeight-w.y-w.height)),y=c.computedHeight*p,E=Math.max(0,b-y),L=c.computedWidth-2*g,R=c.computedHeight-2*E,D=d/L,O=m/R,S=Math.min(D,O),T=(d-L*S)/2-g*S,M=(m-R*S)/2-E*S;(0,l.forEveryChild)(c,A=>{A.type!=="group"&&(v(A)?A.set({x:A.x*S,y:A.y*S,width:A.width*D,height:A.height*O,cropX:0,cropY:0,cropWidth:1,cropHeight:1}):(A.set({x:T+A.x*S,y:M+A.y*S,width:A.width*S,height:A.height*S}),A.type==="text"?A.set({fontSize:A.fontSize*S}):A.type==="figure"&&A.set({strokeWidth:A.strokeWidth*S})))})}k||(c.width=d),k||(c.height=m)}})).actions(c=>({moveElementUp(d){console.warn("page.moveElementUp(id) is deprecated. Please use page.moveElementsUp([id1, id2]) instead."),c.moveElementsUp([d])},moveElementDown(d){console.warn("page.moveElementDown(id) is deprecated. Please use page.moveElementsDown([id1, id2]) instead."),c.moveElementsDown([d])},moveElementTop(d){console.warn("page.moveElementTop(id) is deprecated. Please use page.moveElementsTop([id1, id2]) instead."),c.moveElementsTop([d])},moveElementBottom(d){console.warn("page.moveElementBottom(id) is deprecated. Please use page.moveElementsBottom([id1, id2]) instead."),c.moveElementsBottom([d])},play(){c.store.play({startTime:c.startTime,endTime:c.startTime+c.duration})}}))}(mg)),mg}var yg={},d3;function jx(){return d3||(d3=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)}}))}(yg)),yg}var h3;function jv(){return h3||(h3=1,function(e){var i=Ai&&Ai.__createBinding||(Object.create?function(O,S,T,M){M===void 0&&(M=T);var A=Object.getOwnPropertyDescriptor(S,T);A&&!("get"in A?!S.__esModule:A.writable||A.configurable)||(A={enumerable:!0,get:function(){return S[T]}}),Object.defineProperty(O,M,A)}:function(O,S,T,M){M===void 0&&(M=T),O[M]=S[T]}),t=Ai&&Ai.__setModuleDefault||(Object.create?function(O,S){Object.defineProperty(O,"default",{enumerable:!0,value:S})}:function(O,S){O.default=S}),n=Ai&&Ai.__importStar||function(){var O=function(S){return O=Object.getOwnPropertyNames||function(T){var M=[];for(var A in T)Object.prototype.hasOwnProperty.call(T,A)&&(M[M.length]=A);return M},O(S)};return function(S){if(S&&S.__esModule)return S;var T={};if(S!=null)for(var M=O(S),A=0;A<M.length;A++)M[A]!=="default"&&i(T,S,M[A]);return t(T,S),T}}(),a=Ai&&Ai.__rest||function(O,S){var T={};for(var M in O)Object.prototype.hasOwnProperty.call(O,M)&&S.indexOf(M)<0&&(T[M]=O[M]);if(O!=null&&typeof Object.getOwnPropertySymbols=="function"){var A=0;for(M=Object.getOwnPropertySymbols(O);A<M.length;A++)S.indexOf(M[A])<0&&Object.prototype.propertyIsEnumerable.call(O,M[A])&&(T[M[A]]=O[M[A]])}return T},l=Ai&&Ai.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.Store=e.Font=void 0,e.createStore=D;const u=eo,c=Tx(),d=Gp,m=l(Ji()),_=Rx(),k=Mx(),x=Lx(),v=Iv(),w=n(Bd()),p=Ks(),h=Dv(),C=y_(),g=Nx(),b=Ix(),y=Dx(),E=b_(),L=Ad(),R=jx();function D({key:O,showCredit:S}={key:"",showCredit:!1}){return e.Store.create({_forceShowCredit:S,_key:O})}(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(O=>Object.assign(Object.assign({},O),{fontFamily:O.fontFamily||O.name})),e.Store=u.types.model("Store",{role:"",pages:u.types.array(E.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(O=>({get _bleedVisible(){return console.warn("store._bleedVisible is deprecated. Please use store.bleedVisible instead."),O.bleedVisible},get selectedElements(){return O.selectedElementsIds.map(S=>{for(const T of O.pages)for(const M of T.children)if(M.id===S)return M}).filter(S=>!!S)},get children(){return O.pages},get selectedShapes(){const S=[];return(0,L.forEveryChild)({children:O.selectedElements},T=>{T.type!=="group"&&S.push(T)}),S},get activePage(){return O.pages.slice().find(S=>S.id===O._activePageId)||(O.pages.length?O.pages[0]:null)},get duration(){let S=0;return O.pages.forEach(T=>{S+=T.duration}),S},get _hasCroppedImages(){return O.find(S=>S.type==="image"&&S._cropModeEnabled)},find(S){let T;return(0,L.forEveryChild)({children:O.pages},M=>{if(!T&&S(M))return T=M,!0}),T},getElementById:S=>O.find(T=>T.id===S)})).actions(O=>{let S=0,T=null,M=!1;return{afterCreate(){O.history.canUndo},setCurrentTime(A){O.currentTime=A},_togglePlaying(A=!O.isPlaying){O.isPlaying=A},play({animatedElementsIds:A=[],startTime:z=0,currentTime:U=0,endTime:Z=O.duration,repeat:X=!1}={}){U&&(console.warn("currentTime property of store.play() is deprecated. Please use startTime instead."),z=U),O.animatedElementsIds=(0,u.cast)(A),O.currentTime=z,O.isPlaying=!0,S=Date.now(),T=Z,M=X,requestAnimationFrame(O.seek)},checkActivePage(){let A=0;for(const z of O.pages){if(O.currentTime>=z.startTime&&O.currentTime<z.startTime+z.duration){O.selectPage(z.id);break}A+=z.duration}},seek(){if(!O.isPlaying)return;const A=Date.now(),z=A-S;S=A,O.currentTime+=z,O.checkActivePage();const U=T||O.duration;O.isPlaying&&O.currentTime<U?requestAnimationFrame(O.seek):O.isPlaying&&M?(O.currentTime=0,requestAnimationFrame(O.seek)):O.stop()},stop(){O.isPlaying=!1,O.currentTime=0,O.animatedElementsIds=(0,u.cast)([]),O.checkActivePage()}}}).actions(O=>({__(){O._validated||((0,v.validateKey)(O._key,O._forceShowCredit),O._validated=!0)},set(S){Object.assign(O,S)},setUnit({unit:S,dpi:T}){O.unit=S||O.unit,O.dpi=T||O.dpi},setRole(S){O.role=S},addPage(S){const T=E.Page.create(Object.assign({id:(0,d.nanoid)(10)},S));return O.pages.push(T),O._activePageId=T.id,T},selectPage(S){O._activePageId=S},selectElements(S){const T=S.map(M=>O.getElementById(M)).sort((M,A)=>M.page.children.indexOf(M)-M.page.children.indexOf(A)).filter(M=>!!M).map(M=>M.id);O.selectedElementsIds=(0,u.cast)(T)},toggleBleed(S){O.bleedVisible=S??!O.bleedVisible},toggleRulers(S){O.rulesVisible=S??!O.rulesVisible},openSidePanel(S){O.openedSidePanel!==S&&(O.previousOpenedSidePanel=O.openedSidePanel,O.openedSidePanel=S)},setScale(S){O.scale=S},_setScaleToFit(S){O.scaleToFit=S},setElementsPixelRatio(S){O._elementsPixelRatio=S},setSize(S,T,M){O.pages.forEach(A=>{A.setSize({width:S,height:T,useMagic:M,softChange:!0})}),O.width=S,O.height=T},setPageZIndex(S,T){const M=O.pages.find(A=>A.id===S);M&&((0,u.detach)(M),O.pages.remove(M),O.pages.splice(T,0,M))},deletePages(S){const T=O.pages.indexOf(O.activePage);S.forEach(z=>{const U=O.pages.find(Z=>Z.id===z);(0,u.destroy)(U)});const M=Math.min(O.pages.length-1,T),A=O.pages[M];A&&(O._activePageId=A.id),O.selectedElementsIds=(0,u.cast)(O.selectedElementsIds.filter(z=>O.getElementById(z)))},groupElements(S){const T=S.map(z=>O.getElementById(z));T.forEach(z=>{z&&(0,u.detach)(z)});const M=O.activePage,A={id:(0,d.nanoid)(10),children:T,type:"group"};return M.children.push(A),O.selectedElementsIds=(0,u.cast)([A.id]),M.children.find(z=>z.id===A.id)},ungroupElements(S){const T=S.map(A=>O.getElementById(A)),M=[];T.forEach(A=>{if(A&&A.type==="group"){const z=A.page,U=z.children.indexOf(A);A.children.forEach(Z=>{M.push(Z.id)}),A.children.forEach(Z=>{(0,u.detach)(Z),z.children.push(Z)}),z.children.splice(U,1)}}),O.selectedElementsIds=(0,u.cast)(M)},deleteElements(S){const T=[];O.find(M=>(S.includes(M.id)&&T.push(M),!1)),T.forEach(M=>{(0,u.destroy)(M)}),O.selectedElementsIds=(0,u.cast)(O.selectedElementsIds.filter(M=>O.getElementById(M)))},on(S,T){if(S==="change"){let M=O.toJSON();return(0,u.onSnapshot)(O,A=>{const z=O.toJSON();!(0,C.deepEqual)(M,z)&&(M=z,T(z))})}},async _toCanvas({pixelRatio:S,ignoreBackground:T,pageId:M,mimeType:A,includeBleed:z,_skipTimeout:U,quickMode:Z=!1}={}){var X;const J=S||1;M=M||((X=O.pages[0])===null||X===void 0?void 0:X.id);const B=O.pages.find(me=>me.id===M);if(!B)throw new Error(`No page for export with id ${M}`);Z?B==null||B.set({_forceMount:!0}):B==null||B.set({_exporting:!0});const N=await(0,g.waitTillAvailable)(()=>m.default.stages.find(me=>me.getAttr("pageId")===M));if(!N)throw B==null||B.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 F=!!N.findOne(".page-container"),H=O._elementsPixelRatio;J>O._elementsPixelRatio&&O.setElementsPixelRatio(J),await O.waitLoading({_skipTimeout:U});const Y=N.findOne(".page-container");if(!Y)throw O.setElementsPixelRatio(H),B==null||B.set({_forceMount:!1,_exporting:!1}),new Error(`Export is failed. Can't find page container. ${F}`);N.find("Transformer").forEach(me=>me.visible(!1)),Y.find(".page-background").forEach(me=>me.shadowEnabled(!1)),Y.find(".page-background").forEach(me=>me.strokeEnabled(!1)),Y.find(".highlighter").forEach(me=>me.visible(!1));const ee=Y.findOne(".page-background-group"),V=ee.clip();ee.clip({x:null,y:null,width:null,height:null});const K=Y.findOne(".elements-container"),$=K.clip();K.clip({x:null,y:null,width:null,height:null});const ne=Y.find(me=>me.getAttr("hideInExport"));ne.forEach(me=>{me.setAttr("oldVisible",me.visible()),me.hide()});const re=Y.find(me=>!me.visible()&&me.getAttr("editModeEnabled"));re.forEach(me=>{me.setAttr("oldVisible",me.visible()),me.show()}),T&&Y.find(".page-background").forEach(me=>me.hide());const ie=z?B.bleed:0;let ae=ie;!O.bleedVisible&&z||(O.bleedVisible||z?O.bleedVisible&&z?ae=0:O.bleedVisible&&!z&&(ae=-B.bleed):ae=0);const ue=document.createElement("canvas");ue.width=Math.round((B.computedWidth+2*ie)*J),ue.height=Math.round((B.computedHeight+2*ie)*J);const de=ue.getContext("2d");A==="image/jpeg"&&(de.fillStyle="white",de.fillRect(0,0,ue.width,ue.height));const he=Y.scale();Y.scale({x:1,y:1});const Se=Y.toCanvas({x:Y.x()-ae,y:Y.y()-ae,width:B.computedWidth+2*ie,height:B.computedHeight+2*ie,pixelRatio:J});return Y.scale(he),de.drawImage(Se,0,0,ue.width,ue.height),m.default.Util.releaseCanvas(Se),T&&Y.find(".page-background").forEach(me=>me.show()),ne.forEach(me=>{me.visible(me.getAttr("oldVisible"))}),re.forEach(me=>{me.visible(me.getAttr("oldVisible"))}),Y.find(".page-background").forEach(me=>me.shadowEnabled(!0)),Y.find(".page-background").forEach(me=>me.strokeEnabled(!0)),N.find("Transformer").forEach(me=>me.visible(!0)),Y.find(".highlighter").forEach(me=>me.visible(!0)),ee.clip(V),K.clip($),O.setElementsPixelRatio(H),B==null||B.set({_exporting:!1,_forceMount:!1}),ue},async toDataURL(S={}){var{mimeType:T,quality:M}=S,A=a(S,["mimeType","quality"]);const z=await O._toCanvas(Object.assign({mimeType:T},A)),U=z.toDataURL(T,M);return m.default.Util.releaseCanvas(z),U},async toBlob(S={}){var{mimeType:T,quality:M}=S,A=a(S,["mimeType","quality"]);const z=await O._toCanvas(Object.assign({mimeType:T},A)),U=await new Promise(Z=>{z.toBlob(Z,T,M)});return m.default.Util.releaseCanvas(z),U},async saveAsImage(S={}){var{fileName:T}=S,M=a(S,["fileName"]);const A=M.mimeType||"image/png",z=A.split("/")[1];(0,_.downloadFile)(await O.toDataURL(M),T||"polotno."+z,A)},async _toPDF(S){const T=S.dpi||O.dpi,M=S.parallel||1,A=S.unit||(O.unit==="px"?"mm":O.unit),z=S.pixelRatio||1,U=S.pageIds||O.pages.map(ne=>ne.id),Z=O.pages.filter(ne=>U.includes(ne.id)),X=await(0,k.getJsPDF)(),J=ne=>(0,h.pxToUnit)({px:ne,unit:A,dpi:T}),B=S.cropMarkSize||0,N=J(B),F=Z[0]||{},H=S.includeBleed?F.bleed:0,Y=J(F.computedWidth+2*H+2*N),ee=J(F.computedHeight+2*H+2*N);var V=new X({unit:A,orientation:Y>ee?"landscape":"portrait",format:[Y,ee],compress:!0,putOnlyUsedFonts:!0});V.deletePage(1);const K=((ne,re)=>{for(var ie=[],ae=0;ae<ne.length;ae+=re)ie.push(ne.slice(ae,ae+re));return ie})(Z,M);let $=0;for(const ne of K){const re=ne.map(async ie=>{const ae=S.includeBleed?ie.bleed:0,ue=ie.computedWidth+2*ae+2*B,de=ie.computedHeight+2*ae+2*B,he=J(ue),Se=J(de);let me=0,ke=z;for(;me<10;){me+=1,me===2&&console.error("Polotno can not export PDF with current settings. Quality is automatically reduced.");const fe=await O.toDataURL(Object.assign(Object.assign({},S),{pageId:ie.id,pixelRatio:ke}));if(fe.length>20)return S.onProgress&&S.onProgress(++$/U.length*.9),{url:fe,width:he,height:Se,widthPx:ue,heightPx:de};ke*=.8}});(await Promise.all(re)).forEach(({url:ie,width:ae,height:ue,widthPx:de,heightPx:he})=>{V.addPage([ae,ue],ae>ue?"landscape":"portrait");const Se=V.getCurrentPageInfo();var me;switch(A){case"pt":me=1;break;case"mm":me=72/25.4;break;case"cm":me=72/2.54;break;case"in":me=72;break;case"px":me=.75;break;case"pc":case"em":me=12;break;case"ex":me=6;break;default:throw"Invalid unit: "+A}if(Se.pageContext.cropBox={bottomLeftX:0,bottomLeftY:0,topRightX:ae*me,topRightY:ue*me},Se.pageContext.artBox={bottomLeftX:J(B+H)*me,bottomLeftY:J(B+H)*me,topRightX:J(de-B-H)*me,topRightY:J(he-B-H)*me},Se.pageContext.bleedBox={bottomLeftX:J(B+H)*me,bottomLeftY:J(B+H)*me,topRightX:J(de-B-H)*me,topRightY:J(he-B-H)*me},N){V.setLineWidth(J(1));const ke=N+J(H);V.line(ke,0,ke,N),V.line(0,ke,N,ke),V.line(ae-ke,0,ae-ke,N),V.line(ae,ke,ae-N,ke),V.line(0,ue-ke,N,ue-ke),V.line(ke,ue,ke,ue-N),V.line(ae,ue-ke,ae-N,ue-ke),V.line(ae-ke,ue,ae-ke,ue-N)}V.addImage(ie,N,N,ae-2*N,ue-2*N,void 0,"FAST")})}return V},toPDFDataURL:async S=>(await O._toPDF(Object.assign({mimeType:"image/jpeg"},S))).output("datauristring"),async toGIFDataURL(S={}){const T=S.pixelRatio||1,M=await(0,x.createGIF)({width:O.width*T,height:O.height*T}),A=1e3/(S.fps||10),z=O.duration/A;for(let U=0;U<z-1;U++){const Z=U*A||1;O.setCurrentTime(Z);let X=0,J="";for(const N of O.pages)if(X+=N.duration,N.set({_rendering:X>Z}),X>Z){J=N.id;break}const B=await O._toCanvas({pixelRatio:T,pageId:J,_skipTimeout:!0});M.addFrame(B.getContext("2d"),{delay:A,copy:!0})}for(const U of O.pages)U.set({_rendering:!1});return O.stop(),M.render(),new Promise(U=>{M.on("finished",function(Z){(function(X,J){var B=new FileReader;B.onload=function(N){J(N.target.result)},B.readAsDataURL(X)})(Z,U)})})},async saveAsGIF(S={}){var{fileName:T}=S,M=a(S,["fileName"]);const A=await O.toGIFDataURL(M);(0,_.downloadFile)(A,T||"polotno.gif")},async toHTML({elementHook:S}={elementHook:void 0}){const T=O.toJSON();return(0,b.jsonToHTML)({json:T,elementHook:S})},async saveAsHTML({fileName:S}={}){const T=await O.toHTML(),M="data:text/html;base64,"+window.btoa(unescape(encodeURIComponent(T)));(0,_.downloadFile)(M,S||"polotno.html")},async toSVG({elementHook:S,pageId:T}={elementHook:void 0,pageId:void 0}){var M;const A=O.toJSON();T=T||((M=A.pages[0])===null||M===void 0?void 0:M.id);const z=A.pages.find(U=>U.id===T);return(0,y.jsonToSVG)({json:Object.assign(Object.assign({},A),{pages:z?[z]:[]}),elementHook:S})},async saveAsSVG({fileName:S,elementHook:T,pageId:M}={}){const A=await O.toSVG({elementHook:T,pageId:M}),z="data:text/svg;base64,"+window.btoa(unescape(encodeURIComponent(A)));(0,_.downloadFile)(z,S||"polotno.svg")},async saveAsPDF(S={}){var{fileName:T}=S,M=a(S,["fileName"]);(await O._toPDF(Object.assign({mimeType:"image/jpeg"},M))).save(T||"polotno.pdf")},async waitLoading({_skipTimeout:S=!1}={}){S||await new Promise(T=>setTimeout(T,50)),await(0,p.whenLoaded)()},toJSON:()=>({width:O.width,height:O.height,fonts:(0,u.getSnapshot)(O.fonts),pages:(0,u.getSnapshot)(O.pages),audios:(0,u.getSnapshot)(O.audios),unit:O.unit,dpi:O.dpi,custom:O.custom}),loadJSON(S,T=!1){var M;const A=Object.assign({},S),z=O.pages.indexOf(O.activePage);let U=(M=A.pages[z]||A.pages[0])===null||M===void 0?void 0:M.id;A._activePageId=U;const Z=Object.assign({},(0,u.getSnapshot)(O));Object.assign(Z,A),Z.history=T?O.history.toJSON():{history:[],undoIdx:-1},(0,u.applySnapshot)(O,Z)},clear({keepHistory:S=!1}={}){const T=O.pages.map(M=>M.id);O.deletePages(T),O.custom=null,S||O.history.clear()},addFont(S){O.removeFont(S.fontFamily),O.fonts.push(S),O.loadFont(S.fontFamily)},removeFont(S){O.fonts.filter(T=>T.fontFamily===S).forEach(T=>(0,u.destroy)(T))},addAudio(S){const T=R.Audio.create(Object.assign({id:(0,d.nanoid)(10)},S));O.audios.push(T)},removeAudio(S){const T=O.audios.find(M=>M.id===S);T&&O.audios.remove(T)},async loadFont(S){const T=O.fonts.find(A=>A.fontFamily===S)||w.globalFonts.find(A=>A.fontFamily===S);let M=[{fontStyle:"normal",fontWeight:"normal"}];return T?(T.styles&&(M=T.styles.map(A=>({fontStyle:A.fontStyle||"normal",fontWeight:A.fontWeight||"normal"}))),w.injectCustomFont(T)):w.injectGoogleFont(S),Promise.all(M.map(A=>w.loadFont(S,A.fontStyle,A.fontWeight)))},validate:S=>e.Store.validate(S,[{path:"",type:e.Store}]).map(T=>({path:"store"+T.context.map(M=>M.path).join("."),message:T.message}))})),e.default=D}(Ai)),Ai}var p3;function __(){return p3||(p3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;const i=eo,t=Gp,n=jv(),a=b_(),l=Ad();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),d={};for(var m in c)m[0]!=="_"&&(d[m]=u[m]);return d}).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:d=!1}={}){const m=JSON.parse(JSON.stringify(u.toJSON()));return c.id=c.id||(0,t.nanoid)(10),(0,l.forEveryChild)(m,_=>{_.id=(0,t.nanoid)(10)}),Object.assign(m,c),u.page.addElement(m,{skipSelect:d})},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(){}}))}(ug)),ug}var bg={},_g={},g3;function Fx(){return g3||(g3=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 d=l/c.duration;return c.type==="enter"?{opacity:d*u.opacity}:{opacity:(1-d)*u.opacity}},rotate:({dTime:l,element:u,animation:c})=>{const d=l/c.duration*360;return(0,i.rotateAroundCenter)({x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation},d)},blink:({dTime:l,element:u,animation:c})=>{const d=c.duration,m=l%d/(d/2),_=m<=1?m:2-m;return{opacity:u.opacity*_}},bounce:({dTime:l,element:u,animation:c})=>{const d=c.duration,m=d/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},x={x:u.x,y:u.y,width:u.width,height:u.height,fontSize:u.fontSize},v=l%d/m,w=v<=1?v:2-v;for(let p in k){const h=k[p],C=x[p]-h;_[p]=h+w*C}return _},move:({dTime:l,element:u,animation:c})=>{const d=t[c.data.direction]||t.right,m={};for(var _ in d.from){let k=d.from[_],x=d.to[_];c.type==="exit"&&(k=d.to[_],x=-d.from[_]);const v=u[_]+k,w=u[_]+x-v;m[_]=v+l/c.duration*w}return m},zoom:({dTime:l,element:u,animation:c})=>{const d={},m=((c.data.direction||"in")==="in"?1:-1)>0?.75:1.25,_=u.rotation*Math.PI/180,k=Math.cos(_),x=Math.sin(_),v=u.width*(1-m),w=u.height*(1-m),p=(v*k-w*x)/2,h=(v*x+w*k)/2,C={x:u.x+p,y:u.y+h,width:u.width*m,height:u.height*m,fontSize:u.fontSize*m},g={x:u.x,y:u.y,width:u.width,height:u.height,fontSize:u.fontSize};for(var b in C){let y=C[b],E=g[b];if(c.type==="exit"){const R=y;y=E,E=R}const L=E-y;d[b]=y+l/c.duration*L}return d}};const n=({element:l,dTime:u,animation:c})=>{const d=e.animations[c.name];return d?d({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}(_g)),_g}var v3;function Sc(){return v3||(v3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.getDiff=e.Animation=void 0;const i=eo,t=Fx(),n=da,a=__();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 d={};for(const m in c)if(typeof u[m]=="number"&&typeof c[m]=="number"){const _=c[m]-u[m];_!==0&&(d[m]=_)}return d};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}),d=(0,n.action)(_=>{Object.assign(c,_)}),m=(0,n.action)(_=>{for(const k in _)typeof c[k]=="number"&&(c[k]=c[k]+_[k])});return{get a(){const{currentTime:_}=u.store;if(d({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 x=u.store.animatedElementsIds;if(x.length&&!x.includes(u.id))return c;const v=u.animations.find(g=>g.type==="enter"),w=(v==null?void 0:v.enabled)&&k<v.delay;w&&d({opacity:0});const p=(v==null?void 0:v.enabled)&&k>=v.delay&&k<=v.delay+v.duration;if(p){const g=k-v.delay,b=(0,t.animate)({element:u,animation:v,dTime:g}),y=(0,e.getDiff)(u,b);m(y)}const h=u.animations.find(g=>g.type==="exit");if(!w&&!p&&(h!=null&&h.enabled)&&k>=u.page.duration-h.duration-h.delay&&k<=u.page.duration-h.delay){const g=k-(u.page.duration-h.duration-h.delay),b=(0,t.animate)({element:u,animation:h,dTime:g}),y=(0,e.getDiff)(u,b);m(y)}h!=null&&h.enabled&&k>=u.page.duration-h.delay&&d({opacity:0});const C=u.animations.find(g=>g.type==="loop");if(C!=null&&C.enabled){const g=k,b=(0,t.animate)({element:u,animation:C,dTime:g}),y=(0,e.getDiff)(u,b);m(y)}return c},animated:_=>u.a[_]}}).actions(u=>({setAnimation(c,d){const m=u.animations.find(_=>_.type===c);m?Object.assign(m,d):u.animations.push(Object.assign({type:c},d))}}))}(bg)),bg}var wg={},m3;function zx(){return m3||(m3=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()}}))}(wg)),wg}var Sg={},y3;function w_(){return y3||(y3=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()}}))}(Sg)),Sg}var Eg={},b3;function Bx(){return b3||(b3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.VideoElement=void 0;const i=w_();e.VideoElement=i.ImageElement.named("Video").props({type:"video",duration:0,startTime:0,endTime:1,volume:1})}(Eg)),Eg}var Og={},_3;function Ux(){return _3||(_3=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=>({}))}(Og)),Og}var xg={},w3;function qx(){return w3||(w3=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)}}))}(xg)),xg}var Pg={},S3;function Hx(){return S3||(S3=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 E3;function Ad(){return E3||(E3=1,function(e){var i=vd&&vd.__rest||function(h,C){var g={};for(var b in h)Object.prototype.hasOwnProperty.call(h,b)&&C.indexOf(b)<0&&(g[b]=h[b]);if(h!=null&&typeof Object.getOwnPropertySymbols=="function"){var y=0;for(b=Object.getOwnPropertySymbols(h);y<b.length;y++)C.indexOf(b[y])<0&&Object.prototype.propertyIsEnumerable.call(h,b[y])&&(g[b[y]]=h[b[y]])}return g};Object.defineProperty(e,"__esModule",{value:!0}),e.TYPES_MAP=e.GroupElement=e.ElementTypes=e.forEveryChild=void 0,e.registerShapeModel=p;const t=eo,n=Gp,a=__(),l=Sc(),u=zx(),c=w_(),d=Bx(),m=Ux(),_=qx(),k=Hx(),x=(h,C)=>{if(h.children)for(const g of h.children){if(C(g)===!0)break;(0,e.forEveryChild)(g,C)}};e.forEveryChild=x;const v=[...new Array(20)].map((h,C)=>t.types.late(()=>w[C]));e.ElementTypes=t.types.union({dispatcher:h=>{const C=e.TYPES_MAP[h.type];if(!C)throw new Error(`Unknown element type: "${h.type}"`);return C}},_.SVGElement,u.TextElement,c.ImageElement,m.LineElement,d.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(h=>({get draggable(){let C=!0;return(0,e.forEveryChild)(h,g=>{g.draggable||(C=!1)}),C},get resizable(){let C=!0;return(0,e.forEveryChild)(h,g=>{g.resizable||(C=!1)}),C},get contentEditable(){let C=!0;return(0,e.forEveryChild)(h,g=>{g.contentEditable||(C=!1)}),C},get styleEditable(){let C=!0;return(0,e.forEveryChild)(h,g=>{g.styleEditable||(C=!1)}),C},get locked(){let C=!0;return(0,e.forEveryChild)(h,g=>{g.locked||(C=!1)}),C}})).actions(h=>({set(C){var{draggable:g,contentEditable:b,styleEditable:y,resizable:E}=C,L=i(C,["draggable","contentEditable","styleEditable","resizable"]);g!==void 0&&(0,e.forEveryChild)(h,R=>{R.set({draggable:g})}),b!==void 0&&(0,e.forEveryChild)(h,R=>{R.set({contentEditable:b})}),y!==void 0&&(0,e.forEveryChild)(h,R=>{R.set({styleEditable:y})}),E!==void 0&&(0,e.forEveryChild)(h,R=>{R.set({resizable:E})}),Object.assign(h,L)},addElement(C,{skipSelect:g=!1}={}){const b=e.TYPES_MAP[C.type];if(!b)return void console.error("Can not find model with type "+C.type);C.children&&C.children.forEach(E=>{E.id=(0,n.nanoid)(10)});const y=b.create(Object.assign({id:(0,n.nanoid)(10)},C));return h.children.push(y),y.selectable&&!g&&h.store.selectElements([y.id]),y},setElementZIndex(C,g){const b=h.children.find(y=>y.id===C);b&&((0,t.detach)(b),h.children.remove(b),h.children.splice(g,0,b))}}));const w=[];function p(h,C){const g=h.type;if(!g)throw new Error('You must pass "type" attribute to custom model.');let b=l.Shape.named(g).props(h);C&&(b=C(b)),e.TYPES_MAP[g]=b,w.push(b)}e.TYPES_MAP={svg:_.SVGElement,text:u.TextElement,image:c.ImageElement,group:e.GroupElement,line:m.LineElement,video:d.VideoElement,figure:k.FigureElement}}(vd)),vd}var O3;function Gx(){return O3||(O3=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.handleHotkey=c;const i=Ad();let t=[],n="";const a="polotno_clipboard",l=d=>{t=JSON.parse(JSON.stringify(d));try{localStorage.setItem(a,JSON.stringify(d))}catch{}},u=()=>{try{const d=localStorage.getItem(a);if(d)return JSON.parse(d)}catch{}return t};function c(d,m){var _,k,x,v,w,p,h,C;if(((_=document.activeElement)===null||_===void 0?void 0:_.tagName)==="INPUT"||((k=document.activeElement)===null||k===void 0?void 0:k.tagName)==="TEXTAREA"||((x=document.activeElement)===null||x===void 0?void 0:x.contentEditable)==="true")return;const g=m.selectedElements.filter(L=>L.removable),b=g.map(L=>L.id);d.keyCode!==46&&d.keyCode!==8||m.deleteElements(b);const y=d.ctrlKey||d.metaKey,E=d.shiftKey;if(y&&!E&&d.code==="KeyZ"&&(d.preventDefault(),m.history.undo()),y&&E&&d.code==="KeyZ"&&(d.preventDefault(),m.history.redo()),y&&d.code==="KeyA"){d.preventDefault();const L=(v=m.activePage)===null||v===void 0?void 0:v.children.filter(D=>D.selectable),R=(L==null?void 0:L.map(D=>D.id))||[];m.selectElements(R)}if(y&&d.code==="KeyC"&&(d.preventDefault(),n=(w=m.activePage)===null||w===void 0?void 0:w.id,l(m.selectedElements.map(L=>L.toJSON()))),y&&d.code==="KeyX"&&(d.preventDefault(),n=(p=m.activePage)===null||p===void 0?void 0:p.id,l(m.selectedElements.map(L=>L.toJSON())),m.deleteElements(g)),y&&d.code==="KeyV"){d.preventDefault();let L=0;n===((h=m.activePage)===null||h===void 0?void 0:h.id)&&(L=m.width/20),n=(C=m.activePage)===null||C===void 0?void 0:C.id,m.history.transaction(()=>{const R=[],D=u();(0,i.forEveryChild)({children:D},O=>{delete O.id,O.type!=="group"&&(O.x+=L,O.y+=L)}),D.forEach(O=>{var S;const T=(S=m.activePage)===null||S===void 0?void 0:S.addElement(O);T&&R.push(T.id)}),l(D),m.selectElements(R)})}d.code==="ArrowDown"&&(d.preventDefault(),m.selectedElements.forEach(L=>{L.draggable&&L.set({y:L.y+1})})),d.code==="ArrowUp"&&(d.preventDefault(),m.selectedElements.forEach(L=>{L.draggable&&L.set({y:L.y-1})})),d.code==="ArrowLeft"&&(d.preventDefault(),m.selectedElements.forEach(L=>{L.draggable&&L.set({x:L.x-1})})),d.code==="ArrowRight"&&(d.preventDefault(),m.selectedElements.forEach(L=>{L.draggable&&L.set({x:L.x+1})}))}}(sg)),sg}var Cg={},x3;function Vx(){return x3||(x3=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",generatedResult:"Generated result",cancel:"Cancel",generate:"Generate",back:"Back",tryAgain:"Try Again",insert:"Insert",promptPlaceholder:"Describe what you want to generate"}},workspace:{noPages:"There are no pages yet...",addPage:"Add page",removePage:"Remove page",duplicatePage:"Duplicate page",moveUp:"Move up",moveDown:"Move down"},scale:{reset:"Reset"},error:{removeBackground:"Ops! Something went wrong. Background can not be removed."},sidePanel:{templates:"Templates",searchTemplatesWithSameSize:"Show templates with the same size",searchPlaceholder:"Search...",otherFormats:"Other formats",noResults:"No results",error:"Loading is failed...",text:"Text",uploadFont:"Upload font",myFonts:"My fonts",photos:"Photos",videos:"Videos",animations:"Animations",effects:"Effects",elements:"Elements",shapes:"Shapes",lines:"Lines",upload:"Upload",uploadImage:"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 x,v=k.split("."),w=_;for(x=0;x<v.length;++x){if(w[v[x]]==null)return;w=w[v[x]]}return w}const a=_=>_&&typeof _=="object";function l(_,k){Object.keys(k).forEach(x=>{const v=_[x],w=k[x];a(w)&&a(v)?l(v,w):_[x]=w})}function u(_,k,x=""){Object.keys(k).forEach(v=>{const w=k[v],p=x?`${x}.${v}`:v;a(w)?a(_[v])?u(_[v],w,p):console.warn(`Missing nested translation object at '${p}'`):_[v]===void 0&&console.warn(`Missing translation '${p}'`)})}e.setTranslations=(0,i.action)((_,{validate:k=!1}={})=>{k&&u(_,t),l(t,_)});const c=()=>(0,i.toJS)(t);e.getTranslations=c;const d={},m=_=>{const k=n(t,_);if(k!==void 0)return k;d[_]||(d[_]=!0,console.warn(`Missing translation '${_}'`));const x=_.split("."),v=x[x.length-1]||" ";return v.charAt(0).toUpperCase()+v.slice(1)};e.t=m}(Cg)),Cg}var P3;function $x(){return P3||(P3=1,function(e){var i=gf&&gf.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceCanvas=void 0;const t=i(An()),n=Qi,a=i(Ex()),l=Ox(),u=xx(),c=Gx(),d=Vx(),m=`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:`,_=(p,h,C,g,b,y)=>{const E=t.default.useRef({width:h,height:C}),L=t.default.useRef({top:0,left:0}),R=t.default.useRef(!1),D=t.default.useRef(b.pages.length);R.current=D.current!==b.pages.length,D.current=b.pages.length,t.default.useEffect(()=>{const O=p.current,S=T=>{L.current={top:O.scrollTop,left:O.scrollLeft}};return O.addEventListener("scroll",S),()=>{O.removeEventListener("scroll",S)}},[]),t.default.useLayoutEffect(()=>{if(!p.current||R.current)return;const O=p.current,S=(L.current.left+O.offsetWidth/2)/E.current.width,T=(L.current.top+O.offsetHeight/2)/E.current.height;y.current=!0,O.scrollLeft=S*h-O.offsetWidth/2,O.scrollTop=T*C-O.offsetHeight/2,E.current={width:h,height:C}},[g,h,C])},k=({element:p,scrollTop:h=0,duration:C=300,onFinish:g=()=>{}})=>{const b=p.scrollTop,y=h-b;let E=0,L=!1;if(C===0)return p.scrollTop=h,()=>{};const R=()=>{if(L)return;E+=20;const O=D(E,b,y,C);p.scrollTop=O,E<C?setTimeout(R,20):g()},D=(O,S,T,M)=>(O/=M/2)<1?T/2*O*O+S:-T/2*(--O*(O-2)-1)+S;return R(),()=>{L=!0}},x=(p,h,C,g,b,y)=>{const E=t.default.useRef(!1),L=t.default.useRef(null),R=t.default.useRef(!1);t.default.useEffect(()=>{const O=p.current,S=()=>{b.current};return O.addEventListener("scroll",S),()=>{O.removeEventListener("scroll",S)}},[]);const D=C.pages.indexOf(C.activePage);return t.default.useLayoutEffect(()=>{if(!C.activePage||!p.current||E.current)return;const O=p.current,S=C.pages.indexOf(C.activePage)*h;let T=()=>{};return(Math.abs(S-O.scrollTop)>.5*h||R.current)&&(R.current=!0,T=k({element:O,scrollTop:S,onFinish:()=>{R.current=!1},duration:C.isPlaying?0:300})),T},[C.activePage,D,C.isPlaying]),{handleScroll:O=>{if(y||R.current)return;E.current=!0,clearTimeout(L.current),L.current=setTimeout(()=>{E.current=!1},300);const S=O.currentTarget.childNodes[0].offsetHeight,T=O.currentTarget.scrollTop,M=Math.floor((T+g.height/3)/S),A=C.pages[M];A&&C.activePage!==A&&A.select()}}},v=({store:p})=>t.default.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}},t.default.createElement("p",null,(0,d.t)("workspace.noPages")),t.default.createElement("button",{onClick:()=>{p.addPage()}},(0,d.t)("workspace.addPage"))),w=({width:p,height:h,xPadding:C,yPadding:g,backgroundColor:b})=>t.default.createElement("div",{style:{width:p+"px",height:h+"px",backgroundColor:b,paddingLeft:C+"px",paddingRight:C+"px",paddingTop:g+"px",paddingBottom:g+"px"}},t.default.createElement("div",{style:{width:" 100%",height:"100%",backgroundColor:"white"}}));e.WorkspaceCanvas=(0,n.observer)(({store:p,pageControlsEnabled:h,backgroundColor:C,pageBorderColor:g,activePageBorderColor:b,bleedColor:y,components:E,onKeyDown:L,paddingX:R,paddingY:D,altCloneEnabled:O=!0,visiblePagesOffset:S,renderOnlyActivePage:T})=>{var M;const A=R??20,z=D??55,[U,Z]=t.default.useState({width:100,height:100}),X=t.default.useRef(U),J=t.default.useRef(null),B=t.default.useRef(null),N=p.bleedVisible?Math.max(0,...p.pages.map(fe=>fe.bleed)):0,F=Math.max(...p.pages.map(fe=>fe.computedWidth)),H=Math.max(...p.pages.map(fe=>fe.computedHeight)),Y=((M=p.activePage)===null||M===void 0?void 0:M.computedHeight)||0,ee=F+2*N,V=(T?Y:H)+2*N,K=async({skipTimeout:fe}={skipTimeout:!1})=>{if(fe||await new Promise(at=>setTimeout(at,50)),J.current===null)return;const ge=J.current.getBoundingClientRect();ge.width!==0&&ge.height!==0||(console.warn(m),console.log(J.current));const Ce=B.current.clientWidth||ge.width,Te={width:Ce,height:ge.height};(X.current.width!==Te.width||X.current.height!==Te.height)&&(Z(Te),X.current=Te);const se=(Ce-2*A)/ee,be=p.pages.length>1?3.1:2,xe=(ge.height-z*be)/V,Ie=Math.max(Math.min(se,xe),.01);p.scaleToFit!==Ie&&(p.setScale(Ie),p._setScaleToFit(Ie))};t.default.useLayoutEffect(()=>{K({skipTimeout:!0})},[]),t.default.useEffect(()=>{K()},[ee,V]),t.default.useEffect(()=>{p.__()},[]),t.default.useEffect(()=>{const fe=J.current;if(window.ResizeObserver){const ge=new ResizeObserver(()=>{K({skipTimeout:!0})});return ge.observe(fe),()=>ge.unobserve(fe)}{const ge=setInterval(()=>{K({skipTimeout:!0})},100);return()=>clearInterval(ge)}},[ee,V]);const $=Math.max(A,(U.width-ee*p.scale)/2),ne=T?1:p.pages.length,re=V*p.scale*ne,ie=Math.max(z,(U.height-re)/ne/2);t.default.useEffect(()=>{const fe=ge=>{(L||c.handleHotkey)(ge,p)};return window.addEventListener("keydown",fe),()=>window.removeEventListener("keydown",fe)},[]),t.default.useEffect(()=>{var fe;const ge=Ce=>{if(Ce.ctrlKey||Ce.metaKey){Ce.preventDefault();const xe=Math.max(3,p.scaleToFit),Ie=Math.min(.1,p.scaleToFit),at=(Te=Ce.deltaY<0?1.05*p.scale:p.scale/1.05,se=Ie,be=xe,Math.max(se,Math.min(be,Te)));p.setScale(at)}else var Te,se,be};return(fe=B.current)===null||fe===void 0||fe.addEventListener("wheel",ge),()=>{var Ce;return(Ce=B.current)===null||Ce===void 0?void 0:Ce.removeEventListener("wheel",ge)}},[]);const ae=t.default.useRef(!1);_(B,ee*p.scale+2*$,V*p.scale+2*ie,p.scale,p,ae);const{handleScroll:ue}=x(B,V*p.scale+2*ie,p,U,ae,T),de=U.width>=ee*p.scale+2*$,he=C||"rgba(232, 232, 232, 0.9)",Se=p.pages.indexOf(p.activePage),me=(E==null?void 0:E.NoPages)||v,ke=S??Math.min(3,Math.max(1,Math.ceil(U.height/2/(V*p.scale))));return t.default.createElement("div",{ref:J,style:{width:"100%",height:"100%",position:"relative",outline:"none",flex:1,backgroundColor:he},tabIndex:0,className:"polotno-workspace-container"},t.default.createElement("div",{ref:B,onScroll:ue,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"auto",overflowX:de?"hidden":"auto"},className:"polotno-workspace-inner"},p.pages.map((fe,ge)=>{const Ce=fe===p.activePage;if(T&&!Ce&&!fe._exportingOrRendering&&!fe._forceMount)return null;if(!(Math.abs(ge-Se)<=ke||fe._exportingOrRendering||fe._forceMount))return t.default.createElement(w,{key:fe.id,width:ee*p.scale+2*$,height:V*p.scale+2*ie,backgroundColor:he,xPadding:$,yPadding:ie});const Te=t.default.createElement(a.default,{key:fe.id,page:fe,xPadding:$,yPadding:ie,width:ee*p.scale+2*$,height:V*p.scale+2*ie,store:p,pageControlsEnabled:h,backColor:he,pageBorderColor:g||"lightgrey",activePageBorderColor:b||"rgb(0, 161, 255)",altCloneEnabled:O,bleedColor:y||"rgba(255, 0, 0, 0.1)",components:E});return(fe._exportingOrRendering||fe._forceMount)&&!Ce&&T?t.default.createElement("div",{style:{display:"none"},key:fe.id},Te):Te}),p.rulesVisible&&t.default.createElement(l.TopRules,{store:p,xPadding:$,yPadding:ie,width:ee*p.scale+2*$,height:V*p.scale+2*ie}),p.pages.length===0&&t.default.createElement(me,{store:p}),p.audios.map(fe=>t.default.createElement(u.AudioElement,{key:fe.id,audio:fe,store:p}))))}),e.default=e.WorkspaceCanvas}(gf)),gf}var Wx=$x(),Yx=jv(),Kx=yc(),yd=ts(),kg=Ks(),Xx=Bd();Kx.toggleFadeInAnimation(!1);yd.setTextOverflow("change-font-size");const Zx=new URLSearchParams(location.search).get("key"),S_=Yx.createStore({key:Zx});window.store=S_;window.config={addGlobalFont:Xx.addGlobalFont,unstable_useHtmlTextRender:yd.useHtmlTextRender,unstable_setTextVerticalResizeEnabled:yd.setTextVerticalResizeEnabled,unstable_setTextOverflow:yd.setTextOverflow,onLoadError:kg.onLoadError,setAssetLoadTimeout:kg.setAssetLoadTimeout,setFontLoadTimeout:kg.setFontLoadTimeout,unstable_setTextSplitAllowed:yd.setTextSplitAllowed};const Qx=k3.createRoot(document.getElementById("root"));Qx.render(qt.createElement(Wx.WorkspaceCanvas,{visiblePagesOffset:0,store:S_,components:{PageControls:()=>null,Tooltip:()=>null}}));
|