Files
tbbank-new/public/js/filament-upload/components/image-editor-js.js

320 lines
1.1 MiB

function Un(t){"@babel/helpers - typeof";return Un=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Un(t)}function YL(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ZL(t,e){if(Un(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(Un(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function EE(t){var e=ZL(t,"string");return Un(e)=="symbol"?e:e+""}function qL(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,EE(n.key),n)}}function QL(t,e,r){return e&&qL(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function A(t,e,r){return(e=EE(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var gs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ql(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var OE={exports:{}},_t={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var mh=Symbol.for("react.element"),JL=Symbol.for("react.portal"),eM=Symbol.for("react.fragment"),tM=Symbol.for("react.strict_mode"),rM=Symbol.for("react.profiler"),nM=Symbol.for("react.provider"),iM=Symbol.for("react.context"),oM=Symbol.for("react.forward_ref"),aM=Symbol.for("react.suspense"),sM=Symbol.for("react.memo"),lM=Symbol.for("react.lazy"),pC=Symbol.iterator;function cM(t){return t===null||typeof t!="object"?null:(t=pC&&t[pC]||t["@@iterator"],typeof t=="function"?t:null)}var PE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kE=Object.assign,TE={};function od(t,e,r){this.props=t,this.context=e,this.refs=TE,this.updater=r||PE}od.prototype.isReactComponent={};od.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};od.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function IE(){}IE.prototype=od.prototype;function h6(t,e,r){this.props=t,this.context=e,this.refs=TE,this.updater=r||PE}var f6=h6.prototype=new IE;f6.constructor=h6;kE(f6,od.prototype);f6.isPureReactComponent=!0;var gC=Array.isArray,AE=Object.prototype.hasOwnProperty,p6={current:null},LE={key:!0,ref:!0,__self:!0,__source:!0};function ME(t,e,r){var n,i={},o=null,a=null;if(e!=null)for(n in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(o=""+e.key),e)AE.call(e,n)&&!LE.hasOwnProperty(n)&&(i[n]=e[n]);var s=arguments.length-2;if(s===1)i.children=r;else if(1<s){for(var c=Array(s),d=0;d<s;d++)c[d]=arguments[d+2];i.children=c}if(t&&t.defaultProps)for(n in s=t.defaultProps,s)i[n]===void 0&&(i[n]=s[n]);return{$$typeof:mh,type:t,key:o,ref:a,props:i,_owner:p6.current}}function uM(t,e){return{$$typeof:mh,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function g6(t){return typeof t=="object"&&t!==null&&t.$$typeof===mh}function dM(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var mC=/\/+/g;function n4(t,e){return typeof t=="object"&&t!==null&&t.key!=null?dM(""+t.key):e.toString(36)}function kf(t,e,r,n,i){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case mh:case JL:a=!0}}if(a)return a=t,i=i(a),t=n===""?"."+n4(a,0):n,gC(i)?(r="",t!=null&&(r=t.replace(mC,"$&/")+"/"),kf(i,e,r,"",function(d){return d})):i!=null&&(g6(i)&&(i=uM(i,r+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(mC,"$&/")+"/")+t)),e.push(i)),1;if(a=0,n=n===""?".":n+":",gC(t))for(var s=0;s<t.length;s++){o=t[s];var c=n+n4(o,s);a+=kf(o,e,r,c,i)}else if(c=cM(t),typeof c=="function")for(t=c.call(t),s=0;!(o=t.next()).done;)o=o.value,c=n+n4(o,s++),a+=kf(o,e,r,c,i);else if(o==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function k1(t,e,r){if(t==null)return t;var n=[],i=0;return kf(t,n,"","",function(o){return e.call(r,o,i++)}),n}function hM(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Wn={current:null},Tf={transition:null},fM={ReactCurrentDispatcher:Wn,ReactCurrentBatchConfig:Tf,ReactCurrentOwner:p6};function RE(){throw Error("act(...) is not supported in production builds of React.")}_t.Children={map:k1,forEach:function(t,e,r){k1(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return k1(t,function(){e++}),e},toArray:function(t){return k1(t,function(e){return e})||[]},only:function(t){if(!g6(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};_t.Component=od;_t.Fragment=eM;_t.Profiler=rM;_t.PureComponent=h6;_t.StrictMode=tM;_t.Suspense=aM;_t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fM;_t.act=RE;_t.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=kE({},t.props),i=t.key,o=t.ref,a=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,a=p6.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var s=t.type.defaultProps;for(c in e)AE.call(e,c)&&!LE.hasOwnProperty(c)&&(n[c]=e[c]===void 0&&s!==void 0?s[c]:e[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){s=Array(c);for(var d=0;d<c;d++)s[d]=arguments[d+2];n.children=s}return{$$typeof:mh,type:t.type,key:i,ref:o,props:n,_owner:a}};_t.createContext=function(t){return t={$$typeof:iM,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:nM,_context:t},t.Consumer=t};_t.createElement=ME;_t.createFactory=function(t){var e=ME.bind(null,t);return e.type=t,e};_t.createRef=function(){return{current:null}};_t.forwardRef=function(t){return{$$typeof:oM,render:t}};_t.isValidElement=g6;_t.lazy=function(t){return{$$typeof:lM,_payload:{_status:-1,_result:t},_init:hM}};_t.memo=function(t,e){return{$$typeof:sM,type:t,compare:e===void 0?null:e}};_t.startTransition=function(t){var e=Tf.transition;Tf.transition={};try{t()}finally{Tf.transition=e}};_t.unstable_act=RE;_t.useCallback=function(t,e){return Wn.current.useCallback(t,e)};_t.useContext=function(t){return Wn.current.useContext(t)};_t.useDebugValue=function(){};_t.useDeferredValue=function(t){return Wn.current.useDeferredValue(t)};_t.useEffect=function(t,e){return Wn.current.useEffect(t,e)};_t.useId=function(){return Wn.current.useId()};_t.useImperativeHandle=function(t,e,r){return Wn.current.useImperativeHandle(t,e,r)};_t.useInsertionEffect=function(t,e){return Wn.current.useInsertionEffect(t,e)};_t.useLayoutEffect=function(t,e){return Wn.current.useLayoutEffect(t,e)};_t.useMemo=function(t,e){return Wn.current.useMemo(t,e)};_t.useReducer=function(t,e,r){return Wn.current.useReducer(t,e,r)};_t.useRef=function(t){return Wn.current.useRef(t)};_t.useState=function(t){return Wn.current.useState(t)};_t.useSyncExternalStore=function(t,e,r){return Wn.current.useSyncExternalStore(t,e,r)};_t.useTransition=function(){return Wn.current.useTransition()};_t.version="18.3.1";OE.exports=_t;var G=OE.exports;const y=ql(G);var NE={exports:{}},Oi={},FE={exports:{}},DE={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(t){function e(K,ue){var ne=K.length;K.push(ue);e:for(;0<ne;){var ae=ne-1>>>1,J=K[ae];if(0<i(J,ue))K[ae]=ue,K[ne]=J,ne=ae;else break e}}function r(K){return K.length===0?null:K[0]}function n(K){if(K.length===0)return null;var ue=K[0],ne=K.pop();if(ne!==ue){K[0]=ne;e:for(var ae=0,J=K.length,Q=J>>>1;ae<Q;){var te=2*(ae+1)-1,we=K[te],U=te+1,F=K[U];if(0>i(we,ne))U<J&&0>i(F,we)?(K[ae]=F,K[U]=ne,ae=U):(K[ae]=we,K[te]=ne,ae=te);else if(U<J&&0>i(F,ne))K[ae]=F,K[U]=ne,ae=U;else break e}}return ue}function i(K,ue){var ne=K.sortIndex-ue.sortIndex;return ne!==0?ne:K.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();t.unstable_now=function(){return a.now()-s}}var c=[],d=[],h=1,C=null,v=3,g=!1,m=!1,w=!1,x=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(K){for(var ue=r(d);ue!==null;){if(ue.callback===null)n(d);else if(ue.startTime<=K)n(d),ue.sortIndex=ue.expirationTime,e(c,ue);else break;ue=r(d)}}function S(K){if(w=!1,f(K),!m)if(r(c)!==null)m=!0,q(E);else{var ue=r(d);ue!==null&&ee(S,ue.startTime-K)}}function E(K,ue){m=!1,w&&(w=!1,b(k),k=-1),g=!0;var ne=v;try{for(f(ue),C=r(c);C!==null&&(!(C.expirationTime>ue)||K&&!D());){var ae=C.callback;if(typeof ae=="function"){C.callback=null,v=C.priorityLevel;var J=ae(C.expirationTime<=ue);ue=t.unstable_now(),typeof J=="function"?C.callback=J:C===r(c)&&n(c),f(ue)}else n(c);C=r(c)}if(C!==null)var Q=!0;else{var te=r(d);te!==null&&ee(S,te.startTime-ue),Q=!1}return Q}finally{C=null,v=ne,g=!1}}var I=!1,R=null,k=-1,N=5,T=-1;function D(){return!(t.unstable_now()-T<N)}function z(){if(R!==null){var K=t.unstable_now();T=K;var ue=!0;try{ue=R(!0,K)}finally{ue?B():(I=!1,R=null)}}else I=!1}var B;if(typeof O=="function")B=function(){O(z)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,W=Y.port2;Y.port1.onmessage=z,B=function(){W.postMessage(null)}}else B=function(){x(z,0)};function q(K){R=K,I||(I=!0,B())}function ee(K,ue){k=x(function(){K(t.unstable_now())},ue)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(K){K.callback=null},t.unstable_continueExecution=function(){m||g||(m=!0,q(E))},t.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<K?Math.floor(1e3/K):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(K){switch(v){case 1:case 2:case 3:var ue=3;break;default:ue=v}var ne=v;v=ue;try{return K()}finally{v=ne}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(K,ue){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var ne=v;v=K;try{return ue()}finally{v=ne}},t.unstable_scheduleCallback=function(K,ue,ne){var ae=t.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ae+ne:ae):ne=ae,K){case 1:var J=-1;break;case 2:J=250;break;case 5:J=1073741823;break;case 4:J=1e4;break;default:J=5e3}return J=ne+J,K={id:h++,callback:ue,priorityLevel:K,startTime:ne,expirationTime:J,sortIndex:-1},ne>ae?(K.sortIndex=ne,e(d,K),r(c)===null&&K===r(d)&&(w?(b(k),k=-1):w=!0,ee(S,ne-ae))):(K.sortIndex=J,e(c,K),m||g||(m=!0,q(E))),K},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(K){var ue=v;return function(){var ne=v;v=ue;try{return K.apply(this,arguments)}finally{v=ne}}}})(DE);FE.exports=DE;var T0=FE.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var pM=G,_i=T0;function Oe(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var jE=new Set,V0={};function Ql(t,e){Ru(t,e),Ru(t+"Capture",e)}function Ru(t,e){for(V0[t]=e,t=0;t<e.length;t++)jE.add(e[t])}var ka=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rm=Object.prototype.hasOwnProperty,gM=/^[: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]*$/,vC={},yC={};function mM(t){return Rm.call(yC,t)?!0:Rm.call(vC,t)?!1:gM.test(t)?yC[t]=!0:(vC[t]=!0,!1)}function vM(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function yM(t,e,r,n){if(e===null||typeof e>"u"||vM(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Xn(t,e,r,n,i,o,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=i,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=o,this.removeEmptyString=a}var Cn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Cn[t]=new Xn(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Cn[e]=new Xn(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Cn[t]=new Xn(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Cn[t]=new Xn(t,2,!1,t,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(t){Cn[t]=new Xn(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Cn[t]=new Xn(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Cn[t]=new Xn(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Cn[t]=new Xn(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Cn[t]=new Xn(t,5,!1,t.toLowerCase(),null,!1,!1)});var m6=/[\-:]([a-z])/g;function v6(t){return t[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(t){var e=t.replace(m6,v6);Cn[e]=new Xn(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(m6,v6);Cn[e]=new Xn(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(m6,v6);Cn[e]=new Xn(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Cn[t]=new Xn(t,1,!1,t.toLowerCase(),null,!1,!1)});Cn.xlinkHref=new Xn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Cn[t]=new Xn(t,1,!1,t.toLowerCase(),null,!0,!0)});function y6(t,e,r,n){var i=Cn.hasOwnProperty(e)?Cn[e]:null;(i!==null?i.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(yM(e,r,i,n)&&(r=null),n||i===null?mM(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):i.mustUseProperty?t[i.propertyName]=r===null?i.type===3?!1:"":r:(e=i.attributeName,n=i.attributeNamespace,r===null?t.removeAttribute(e):(i=i.type,r=i===3||i===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var Ma=pM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,T1=Symbol.for("react.element"),lu=Symbol.for("react.portal"),cu=Symbol.for("react.fragment"),C6=Symbol.for("react.strict_mode"),Nm=Symbol.for("react.profiler"),zE=Symbol.for("react.provider"),$E=Symbol.for("react.context"),w6=Symbol.for("react.forward_ref"),Fm=Symbol.for("react.suspense"),Dm=Symbol.for("react.suspense_list"),S6=Symbol.for("react.memo"),us=Symbol.for("react.lazy"),BE=Symbol.for("react.offscreen"),CC=Symbol.iterator;function qd(t){return t===null||typeof t!="object"?null:(t=CC&&t[CC]||t["@@iterator"],typeof t=="function"?t:null)}var Er=Object.assign,i4;function b0(t){if(i4===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);i4=e&&e[1]||""}return`
`+i4+t}var o4=!1;function a4(t,e){if(!t||o4)return"";o4=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(d){var n=d}Reflect.construct(t,[],e)}else{try{e.call()}catch(d){n=d}t.call(e.prototype)}else{try{throw Error()}catch(d){n=d}t()}}catch(d){if(d&&n&&typeof d.stack=="string"){for(var i=d.stack.split(`
`),o=n.stack.split(`
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var c=`
`+i[a].replace(" at new "," at ");return t.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",t.displayName)),c}while(1<=a&&0<=s);break}}}finally{o4=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?b0(t):""}function CM(t){switch(t.tag){case 5:return b0(t.type);case 16:return b0("Lazy");case 13:return b0("Suspense");case 19:return b0("SuspenseList");case 0:case 2:case 15:return t=a4(t.type,!1),t;case 11:return t=a4(t.type.render,!1),t;case 1:return t=a4(t.type,!0),t;default:return""}}function jm(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case cu:return"Fragment";case lu:return"Portal";case Nm:return"Profiler";case C6:return"StrictMode";case Fm:return"Suspense";case Dm:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case $E:return(t.displayName||"Context")+".Consumer";case zE:return(t._context.displayName||"Context")+".Provider";case w6:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case S6:return e=t.displayName||null,e!==null?e:jm(t.type)||"Memo";case us:e=t._payload,t=t._init;try{return jm(t(e))}catch{}}return null}function wM(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return jm(e);case 8:return e===C6?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ks(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function HE(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function SM(t){var e=HE(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function I1(t){t._valueTracker||(t._valueTracker=SM(t))}function GE(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=HE(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function e2(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function zm(t,e){var r=e.checked;return Er({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function wC(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=ks(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function VE(t,e){e=e.checked,e!=null&&y6(t,"checked",e,!1)}function $m(t,e){VE(t,e);var r=ks(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Bm(t,e.type,r):e.hasOwnProperty("defaultValue")&&Bm(t,e.type,ks(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function SC(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Bm(t,e,r){(e!=="number"||e2(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var _0=Array.isArray;function _u(t,e,r,n){if(t=t.options,e){e={};for(var i=0;i<r.length;i++)e["$"+r[i]]=!0;for(r=0;r<t.length;r++)i=e.hasOwnProperty("$"+t[r].value),t[r].selected!==i&&(t[r].selected=i),i&&n&&(t[r].defaultSelected=!0)}else{for(r=""+ks(r),e=null,i=0;i<t.length;i++){if(t[i].value===r){t[i].selected=!0,n&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Hm(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Oe(91));return Er({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function bC(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(Oe(92));if(_0(r)){if(1<r.length)throw Error(Oe(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:ks(r)}}function UE(t,e){var r=ks(e.value),n=ks(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function _C(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function WE(t){switch(t){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 Gm(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?WE(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var A1,XE=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,i){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(A1=A1||document.createElement("div"),A1.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=A1.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function U0(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var I0={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},bM=["Webkit","ms","Moz","O"];Object.keys(I0).forEach(function(t){bM.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),I0[e]=I0[t]})});function KE(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||I0.hasOwnProperty(t)&&I0[t]?(""+e).trim():e+"px"}function YE(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,i=KE(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,i):t[r]=i}}var _M=Er({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 Vm(t,e){if(e){if(_M[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Oe(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Oe(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Oe(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Oe(62))}}function Um(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 Wm=null;function b6(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Xm=null,xu=null,Eu=null;function xC(t){if(t=Ch(t)){if(typeof Xm!="function")throw Error(Oe(280));var e=t.stateNode;e&&(e=q2(e),Xm(t.stateNode,t.type,e))}}function ZE(t){xu?Eu?Eu.push(t):Eu=[t]:xu=t}function qE(){if(xu){var t=xu,e=Eu;if(Eu=xu=null,xC(t),e)for(t=0;t<e.length;t++)xC(e[t])}}function QE(t,e){return t(e)}function JE(){}var s4=!1;function eO(t,e,r){if(s4)return t(e,r);s4=!0;try{return QE(t,e,r)}finally{s4=!1,(xu!==null||Eu!==null)&&(JE(),qE())}}function W0(t,e){var r=t.stateNode;if(r===null)return null;var n=q2(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(Oe(231,e,typeof r));return r}var Km=!1;if(ka)try{var Qd={};Object.defineProperty(Qd,"passive",{get:function(){Km=!0}}),window.addEventListener("test",Qd,Qd),window.removeEventListener("test",Qd,Qd)}catch{Km=!1}function xM(t,e,r,n,i,o,a,s,c){var d=Array.prototype.slice.call(arguments,3);try{e.apply(r,d)}catch(h){this.onError(h)}}var A0=!1,t2=null,r2=!1,Ym=null,EM={onError:function(t){A0=!0,t2=t}};function OM(t,e,r,n,i,o,a,s,c){A0=!1,t2=null,xM.apply(EM,arguments)}function PM(t,e,r,n,i,o,a,s,c){if(OM.apply(this,arguments),A0){if(A0){var d=t2;A0=!1,t2=null}else throw Error(Oe(198));r2||(r2=!0,Ym=d)}}function Jl(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function tO(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function EC(t){if(Jl(t)!==t)throw Error(Oe(188))}function kM(t){var e=t.alternate;if(!e){if(e=Jl(t),e===null)throw Error(Oe(188));return e!==t?null:t}for(var r=t,n=e;;){var i=r.return;if(i===null)break;var o=i.alternate;if(o===null){if(n=i.return,n!==null){r=n;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===r)return EC(i),t;if(o===n)return EC(i),e;o=o.sibling}throw Error(Oe(188))}if(r.return!==n.return)r=i,n=o;else{for(var a=!1,s=i.child;s;){if(s===r){a=!0,r=i,n=o;break}if(s===n){a=!0,n=i,r=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===r){a=!0,r=o,n=i;break}if(s===n){a=!0,n=o,r=i;break}s=s.sibling}if(!a)throw Error(Oe(189))}}if(r.alternate!==n)throw Error(Oe(190))}if(r.tag!==3)throw Error(Oe(188));return r.stateNode.current===r?t:e}function rO(t){return t=kM(t),t!==null?nO(t):null}function nO(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=nO(t);if(e!==null)return e;t=t.sibling}return null}var iO=_i.unstable_scheduleCallback,OC=_i.unstable_cancelCallback,TM=_i.unstable_shouldYield,IM=_i.unstable_requestPaint,Rr=_i.unstable_now,AM=_i.unstable_getCurrentPriorityLevel,_6=_i.unstable_ImmediatePriority,oO=_i.unstable_UserBlockingPriority,n2=_i.unstable_NormalPriority,LM=_i.unstable_LowPriority,aO=_i.unstable_IdlePriority,X2=null,Uo=null;function MM(t){if(Uo&&typeof Uo.onCommitFiberRoot=="function")try{Uo.onCommitFiberRoot(X2,t,void 0,(t.current.flags&128)===128)}catch{}}var fo=Math.clz32?Math.clz32:FM,RM=Math.log,NM=Math.LN2;function FM(t){return t>>>=0,t===0?32:31-(RM(t)/NM|0)|0}var L1=64,M1=4194304;function x0(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function i2(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,i=t.suspendedLanes,o=t.pingedLanes,a=r&268435455;if(a!==0){var s=a&~i;s!==0?n=x0(s):(o&=a,o!==0&&(n=x0(o)))}else a=r&~i,a!==0?n=x0(a):o!==0&&(n=x0(o));if(n===0)return 0;if(e!==0&&e!==n&&!(e&i)&&(i=n&-n,o=e&-e,i>=o||i===16&&(o&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-fo(e),i=1<<r,n|=t[r],e&=~i;return n}function DM(t,e){switch(t){case 1:case 2:case 4:return e+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 e+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 jM(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var a=31-fo(o),s=1<<a,c=i[a];c===-1?(!(s&r)||s&n)&&(i[a]=DM(s,e)):c<=e&&(t.expiredLanes|=s),o&=~s}}function Zm(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function sO(){var t=L1;return L1<<=1,!(L1&4194240)&&(L1=64),t}function l4(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function vh(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-fo(e),t[e]=r}function zM(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var i=31-fo(r),o=1<<i;e[i]=0,n[i]=-1,t[i]=-1,r&=~o}}function x6(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-fo(r),i=1<<n;i&e|t[n]&e&&(t[n]|=e),r&=~i}}var Ht=0;function lO(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var cO,E6,uO,dO,hO,qm=!1,R1=[],ys=null,Cs=null,ws=null,X0=new Map,K0=new Map,hs=[],$M="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function PC(t,e){switch(t){case"focusin":case"focusout":ys=null;break;case"dragenter":case"dragleave":Cs=null;break;case"mouseover":case"mouseout":ws=null;break;case"pointerover":case"pointerout":X0.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":K0.delete(e.pointerId)}}function Jd(t,e,r,n,i,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[i]},e!==null&&(e=Ch(e),e!==null&&E6(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function BM(t,e,r,n,i){switch(e){case"focusin":return ys=Jd(ys,t,e,r,n,i),!0;case"dragenter":return Cs=Jd(Cs,t,e,r,n,i),!0;case"mouseover":return ws=Jd(ws,t,e,r,n,i),!0;case"pointerover":var o=i.pointerId;return X0.set(o,Jd(X0.get(o)||null,t,e,r,n,i)),!0;case"gotpointercapture":return o=i.pointerId,K0.set(o,Jd(K0.get(o)||null,t,e,r,n,i)),!0}return!1}function fO(t){var e=Il(t.target);if(e!==null){var r=Jl(e);if(r!==null){if(e=r.tag,e===13){if(e=tO(r),e!==null){t.blockedOn=e,hO(t.priority,function(){uO(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function If(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=Qm(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);Wm=n,r.target.dispatchEvent(n),Wm=null}else return e=Ch(r),e!==null&&E6(e),t.blockedOn=r,!1;e.shift()}return!0}function kC(t,e,r){If(t)&&r.delete(e)}function HM(){qm=!1,ys!==null&&If(ys)&&(ys=null),Cs!==null&&If(Cs)&&(Cs=null),ws!==null&&If(ws)&&(ws=null),X0.forEach(kC),K0.forEach(kC)}function e0(t,e){t.blockedOn===e&&(t.blockedOn=null,qm||(qm=!0,_i.unstable_scheduleCallback(_i.unstable_NormalPriority,HM)))}function Y0(t){function e(i){return e0(i,t)}if(0<R1.length){e0(R1[0],t);for(var r=1;r<R1.length;r++){var n=R1[r];n.blockedOn===t&&(n.blockedOn=null)}}for(ys!==null&&e0(ys,t),Cs!==null&&e0(Cs,t),ws!==null&&e0(ws,t),X0.forEach(e),K0.forEach(e),r=0;r<hs.length;r++)n=hs[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<hs.length&&(r=hs[0],r.blockedOn===null);)fO(r),r.blockedOn===null&&hs.shift()}var Ou=Ma.ReactCurrentBatchConfig,o2=!0;function GM(t,e,r,n){var i=Ht,o=Ou.transition;Ou.transition=null;try{Ht=1,O6(t,e,r,n)}finally{Ht=i,Ou.transition=o}}function VM(t,e,r,n){var i=Ht,o=Ou.transition;Ou.transition=null;try{Ht=4,O6(t,e,r,n)}finally{Ht=i,Ou.transition=o}}function O6(t,e,r,n){if(o2){var i=Qm(t,e,r,n);if(i===null)y4(t,e,n,a2,r),PC(t,n);else if(BM(i,t,e,r,n))n.stopPropagation();else if(PC(t,n),e&4&&-1<$M.indexOf(t)){for(;i!==null;){var o=Ch(i);if(o!==null&&cO(o),o=Qm(t,e,r,n),o===null&&y4(t,e,n,a2,r),o===i)break;i=o}i!==null&&n.stopPropagation()}else y4(t,e,n,null,r)}}var a2=null;function Qm(t,e,r,n){if(a2=null,t=b6(n),t=Il(t),t!==null)if(e=Jl(t),e===null)t=null;else if(r=e.tag,r===13){if(t=tO(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return a2=t,null}function pO(t){switch(t){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(AM()){case _6:return 1;case oO:return 4;case n2:case LM:return 16;case aO:return 536870912;default:return 16}default:return 16}}var ms=null,P6=null,Af=null;function gO(){if(Af)return Af;var t,e=P6,r=e.length,n,i="value"in ms?ms.value:ms.textContent,o=i.length;for(t=0;t<r&&e[t]===i[t];t++);var a=r-t;for(n=1;n<=a&&e[r-n]===i[o-n];n++);return Af=i.slice(t,1<n?1-n:void 0)}function Lf(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function N1(){return!0}function TC(){return!1}function Pi(t){function e(r,n,i,o,a){this._reactName=r,this._targetInst=i,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in t)t.hasOwnProperty(s)&&(r=t[s],this[s]=r?r(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?N1:TC,this.isPropagationStopped=TC,this}return Er(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=N1)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=N1)},persist:function(){},isPersistent:N1}),e}var ad={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},k6=Pi(ad),yh=Er({},ad,{view:0,detail:0}),UM=Pi(yh),c4,u4,t0,K2=Er({},yh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:T6,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==t0&&(t0&&t.type==="mousemove"?(c4=t.screenX-t0.screenX,u4=t.screenY-t0.screenY):u4=c4=0,t0=t),c4)},movementY:function(t){return"movementY"in t?t.movementY:u4}}),IC=Pi(K2),WM=Er({},K2,{dataTransfer:0}),XM=Pi(WM),KM=Er({},yh,{relatedTarget:0}),d4=Pi(KM),YM=Er({},ad,{animationName:0,elapsedTime:0,pseudoElement:0}),ZM=Pi(YM),qM=Er({},ad,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),QM=Pi(qM),JM=Er({},ad,{data:0}),AC=Pi(JM),eR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tR={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"},rR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nR(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=rR[t])?!!e[t]:!1}function T6(){return nR}var iR=Er({},yh,{key:function(t){if(t.key){var e=eR[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Lf(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?tR[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:T6,charCode:function(t){return t.type==="keypress"?Lf(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Lf(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),oR=Pi(iR),aR=Er({},K2,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),LC=Pi(aR),sR=Er({},yh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:T6}),lR=Pi(sR),cR=Er({},ad,{propertyName:0,elapsedTime:0,pseudoElement:0}),uR=Pi(cR),dR=Er({},K2,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),hR=Pi(dR),fR=[9,13,27,32],I6=ka&&"CompositionEvent"in window,L0=null;ka&&"documentMode"in document&&(L0=document.documentMode);var pR=ka&&"TextEvent"in window&&!L0,mO=ka&&(!I6||L0&&8<L0&&11>=L0),MC=" ",RC=!1;function vO(t,e){switch(t){case"keyup":return fR.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yO(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var uu=!1;function gR(t,e){switch(t){case"compositionend":return yO(e);case"keypress":return e.which!==32?null:(RC=!0,MC);case"textInput":return t=e.data,t===MC&&RC?null:t;default:return null}}function mR(t,e){if(uu)return t==="compositionend"||!I6&&vO(t,e)?(t=gO(),Af=P6=ms=null,uu=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return mO&&e.locale!=="ko"?null:e.data;default:return null}}var vR={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 NC(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!vR[t.type]:e==="textarea"}function CO(t,e,r,n){ZE(n),e=s2(e,"onChange"),0<e.length&&(r=new k6("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var M0=null,Z0=null;function yR(t){IO(t,0)}function Y2(t){var e=fu(t);if(GE(e))return t}function CR(t,e){if(t==="change")return e}var wO=!1;if(ka){var h4;if(ka){var f4="oninput"in document;if(!f4){var FC=document.createElement("div");FC.setAttribute("oninput","return;"),f4=typeof FC.oninput=="function"}h4=f4}else h4=!1;wO=h4&&(!document.documentMode||9<document.documentMode)}function DC(){M0&&(M0.detachEvent("onpropertychange",SO),Z0=M0=null)}function SO(t){if(t.propertyName==="value"&&Y2(Z0)){var e=[];CO(e,Z0,t,b6(t)),eO(yR,e)}}function wR(t,e,r){t==="focusin"?(DC(),M0=e,Z0=r,M0.attachEvent("onpropertychange",SO)):t==="focusout"&&DC()}function SR(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Y2(Z0)}function bR(t,e){if(t==="click")return Y2(e)}function _R(t,e){if(t==="input"||t==="change")return Y2(e)}function xR(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var yo=typeof Object.is=="function"?Object.is:xR;function q0(t,e){if(yo(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var i=r[n];if(!Rm.call(e,i)||!yo(t[i],e[i]))return!1}return!0}function jC(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function zC(t,e){var r=jC(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=jC(r)}}function bO(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?bO(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function _O(){for(var t=window,e=e2();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=e2(t.document)}return e}function A6(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function ER(t){var e=_O(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&bO(r.ownerDocument.documentElement,r)){if(n!==null&&A6(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=r.textContent.length,o=Math.min(n.start,i);n=n.end===void 0?o:Math.min(n.end,i),!t.extend&&o>n&&(i=n,n=o,o=i),i=zC(r,o);var a=zC(r,n);i&&a&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var OR=ka&&"documentMode"in document&&11>=document.documentMode,du=null,Jm=null,R0=null,ev=!1;function $C(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ev||du==null||du!==e2(n)||(n=du,"selectionStart"in n&&A6(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),R0&&q0(R0,n)||(R0=n,n=s2(Jm,"onSelect"),0<n.length&&(e=new k6("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=du)))}function F1(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var hu={animationend:F1("Animation","AnimationEnd"),animationiteration:F1("Animation","AnimationIteration"),animationstart:F1("Animation","AnimationStart"),transitionend:F1("Transition","TransitionEnd")},p4={},xO={};ka&&(xO=document.createElement("div").style,"AnimationEvent"in window||(delete hu.animationend.animation,delete hu.animationiteration.animation,delete hu.animationstart.animation),"TransitionEvent"in window||delete hu.transitionend.transition);function Z2(t){if(p4[t])return p4[t];if(!hu[t])return t;var e=hu[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in xO)return p4[t]=e[r];return t}var EO=Z2("animationend"),OO=Z2("animationiteration"),PO=Z2("animationstart"),kO=Z2("transitionend"),TO=new Map,BC="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 Rs(t,e){TO.set(t,e),Ql(e,[t])}for(var g4=0;g4<BC.length;g4++){var m4=BC[g4],PR=m4.toLowerCase(),kR=m4[0].toUpperCase()+m4.slice(1);Rs(PR,"on"+kR)}Rs(EO,"onAnimationEnd");Rs(OO,"onAnimationIteration");Rs(PO,"onAnimationStart");Rs("dblclick","onDoubleClick");Rs("focusin","onFocus");Rs("focusout","onBlur");Rs(kO,"onTransitionEnd");Ru("onMouseEnter",["mouseout","mouseover"]);Ru("onMouseLeave",["mouseout","mouseover"]);Ru("onPointerEnter",["pointerout","pointerover"]);Ru("onPointerLeave",["pointerout","pointerover"]);Ql("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ql("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ql("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ql("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ql("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ql("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var E0="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(" "),TR=new Set("cancel close invalid load scroll toggle".split(" ").concat(E0));function HC(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,PM(n,e,void 0,t),t.currentTarget=null}function IO(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],i=n.event;n=n.listeners;e:{var o=void 0;if(e)for(var a=n.length-1;0<=a;a--){var s=n[a],c=s.instance,d=s.currentTarget;if(s=s.listener,c!==o&&i.isPropagationStopped())break e;HC(i,s,d),o=c}else for(a=0;a<n.length;a++){if(s=n[a],c=s.instance,d=s.currentTarget,s=s.listener,c!==o&&i.isPropagationStopped())break e;HC(i,s,d),o=c}}}if(r2)throw t=Ym,r2=!1,Ym=null,t}function sr(t,e){var r=e[ov];r===void 0&&(r=e[ov]=new Set);var n=t+"__bubble";r.has(n)||(AO(e,t,2,!1),r.add(n))}function v4(t,e,r){var n=0;e&&(n|=4),AO(r,t,n,e)}var D1="_reactListening"+Math.random().toString(36).slice(2);function Q0(t){if(!t[D1]){t[D1]=!0,jE.forEach(function(r){r!=="selectionchange"&&(TR.has(r)||v4(r,!1,t),v4(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[D1]||(e[D1]=!0,v4("selectionchange",!1,e))}}function AO(t,e,r,n){switch(pO(e)){case 1:var i=GM;break;case 4:i=VM;break;default:i=O6}r=i.bind(null,e,r,t),i=void 0,!Km||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),n?i!==void 0?t.addEventListener(e,r,{capture:!0,passive:i}):t.addEventListener(e,r,!0):i!==void 0?t.addEventListener(e,r,{passive:i}):t.addEventListener(e,r,!1)}function y4(t,e,r,n,i){var o=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var a=n.tag;if(a===3||a===4){var s=n.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=n.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;a=a.return}for(;s!==null;){if(a=Il(s),a===null)return;if(c=a.tag,c===5||c===6){n=o=a;continue e}s=s.parentNode}}n=n.return}eO(function(){var d=o,h=b6(r),C=[];e:{var v=TO.get(t);if(v!==void 0){var g=k6,m=t;switch(t){case"keypress":if(Lf(r)===0)break e;case"keydown":case"keyup":g=oR;break;case"focusin":m="focus",g=d4;break;case"focusout":m="blur",g=d4;break;case"beforeblur":case"afterblur":g=d4;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=IC;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=XM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=lR;break;case EO:case OO:case PO:g=ZM;break;case kO:g=uR;break;case"scroll":g=UM;break;case"wheel":g=hR;break;case"copy":case"cut":case"paste":g=QM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=LC}var w=(e&4)!==0,x=!w&&t==="scroll",b=w?v!==null?v+"Capture":null:v;w=[];for(var O=d,f;O!==null;){f=O;var S=f.stateNode;if(f.tag===5&&S!==null&&(f=S,b!==null&&(S=W0(O,b),S!=null&&w.push(J0(O,S,f)))),x)break;O=O.return}0<w.length&&(v=new g(v,m,null,r,h),C.push({event:v,listeners:w}))}}if(!(e&7)){e:{if(v=t==="mouseover"||t==="pointerover",g=t==="mouseout"||t==="pointerout",v&&r!==Wm&&(m=r.relatedTarget||r.fromElement)&&(Il(m)||m[Ta]))break e;if((g||v)&&(v=h.window===h?h:(v=h.ownerDocument)?v.defaultView||v.parentWindow:window,g?(m=r.relatedTarget||r.toElement,g=d,m=m?Il(m):null,m!==null&&(x=Jl(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(g=null,m=d),g!==m)){if(w=IC,S="onMouseLeave",b="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(w=LC,S="onPointerLeave",b="onPointerEnter",O="pointer"),x=g==null?v:fu(g),f=m==null?v:fu(m),v=new w(S,O+"leave",g,r,h),v.target=x,v.relatedTarget=f,S=null,Il(h)===d&&(w=new w(b,O+"enter",m,r,h),w.target=f,w.relatedTarget=x,S=w),x=S,g&&m)t:{for(w=g,b=m,O=0,f=w;f;f=Bc(f))O++;for(f=0,S=b;S;S=Bc(S))f++;for(;0<O-f;)w=Bc(w),O--;for(;0<f-O;)b=Bc(b),f--;for(;O--;){if(w===b||b!==null&&w===b.alternate)break t;w=Bc(w),b=Bc(b)}w=null}else w=null;g!==null&&GC(C,v,g,w,!1),m!==null&&x!==null&&GC(C,x,m,w,!0)}}e:{if(v=d?fu(d):window,g=v.nodeName&&v.nodeName.toLowerCase(),g==="select"||g==="input"&&v.type==="file")var E=CR;else if(NC(v))if(wO)E=_R;else{E=SR;var I=wR}else(g=v.nodeName)&&g.toLowerCase()==="input"&&(v.type==="checkbox"||v.type==="radio")&&(E=bR);if(E&&(E=E(t,d))){CO(C,E,r,h);break e}I&&I(t,v,d),t==="focusout"&&(I=v._wrapperState)&&I.controlled&&v.type==="number"&&Bm(v,"number",v.value)}switch(I=d?fu(d):window,t){case"focusin":(NC(I)||I.contentEditable==="true")&&(du=I,Jm=d,R0=null);break;case"focusout":R0=Jm=du=null;break;case"mousedown":ev=!0;break;case"contextmenu":case"mouseup":case"dragend":ev=!1,$C(C,r,h);break;case"selectionchange":if(OR)break;case"keydown":case"keyup":$C(C,r,h)}var R;if(I6)e:{switch(t){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else uu?vO(t,r)&&(k="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(k="onCompositionStart");k&&(mO&&r.locale!=="ko"&&(uu||k!=="onCompositionStart"?k==="onCompositionEnd"&&uu&&(R=gO()):(ms=h,P6="value"in ms?ms.value:ms.textContent,uu=!0)),I=s2(d,k),0<I.length&&(k=new AC(k,t,null,r,h),C.push({event:k,listeners:I}),R?k.data=R:(R=yO(r),R!==null&&(k.data=R)))),(R=pR?gR(t,r):mR(t,r))&&(d=s2(d,"onBeforeInput"),0<d.length&&(h=new AC("onBeforeInput","beforeinput",null,r,h),C.push({event:h,listeners:d}),h.data=R))}IO(C,e)})}function J0(t,e,r){return{instance:t,listener:e,currentTarget:r}}function s2(t,e){for(var r=e+"Capture",n=[];t!==null;){var i=t,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=W0(t,r),o!=null&&n.unshift(J0(t,o,i)),o=W0(t,e),o!=null&&n.push(J0(t,o,i))),t=t.return}return n}function Bc(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function GC(t,e,r,n,i){for(var o=e._reactName,a=[];r!==null&&r!==n;){var s=r,c=s.alternate,d=s.stateNode;if(c!==null&&c===n)break;s.tag===5&&d!==null&&(s=d,i?(c=W0(r,o),c!=null&&a.unshift(J0(r,c,s))):i||(c=W0(r,o),c!=null&&a.push(J0(r,c,s)))),r=r.return}a.length!==0&&t.push({event:e,listeners:a})}var IR=/\r\n?/g,AR=/\u0000|\uFFFD/g;function VC(t){return(typeof t=="string"?t:""+t).replace(IR,`
`).replace(AR,"")}function j1(t,e,r){if(e=VC(e),VC(t)!==e&&r)throw Error(Oe(425))}function l2(){}var tv=null,rv=null;function nv(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var iv=typeof setTimeout=="function"?setTimeout:void 0,LR=typeof clearTimeout=="function"?clearTimeout:void 0,UC=typeof Promise=="function"?Promise:void 0,MR=typeof queueMicrotask=="function"?queueMicrotask:typeof UC<"u"?function(t){return UC.resolve(null).then(t).catch(RR)}:iv;function RR(t){setTimeout(function(){throw t})}function C4(t,e){var r=e,n=0;do{var i=r.nextSibling;if(t.removeChild(r),i&&i.nodeType===8)if(r=i.data,r==="/$"){if(n===0){t.removeChild(i),Y0(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=i}while(r);Y0(e)}function Ss(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function WC(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var sd=Math.random().toString(36).slice(2),Bo="__reactFiber$"+sd,eh="__reactProps$"+sd,Ta="__reactContainer$"+sd,ov="__reactEvents$"+sd,NR="__reactListeners$"+sd,FR="__reactHandles$"+sd;function Il(t){var e=t[Bo];if(e)return e;for(var r=t.parentNode;r;){if(e=r[Ta]||r[Bo]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=WC(t);t!==null;){if(r=t[Bo])return r;t=WC(t)}return e}t=r,r=t.parentNode}return null}function Ch(t){return t=t[Bo]||t[Ta],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function fu(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Oe(33))}function q2(t){return t[eh]||null}var av=[],pu=-1;function Ns(t){return{current:t}}function lr(t){0>pu||(t.current=av[pu],av[pu]=null,pu--)}function ir(t,e){pu++,av[pu]=t.current,t.current=e}var Ts={},Dn=Ns(Ts),ci=Ns(!1),Bl=Ts;function Nu(t,e){var r=t.type.contextTypes;if(!r)return Ts;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in r)i[o]=e[o];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function ui(t){return t=t.childContextTypes,t!=null}function c2(){lr(ci),lr(Dn)}function XC(t,e,r){if(Dn.current!==Ts)throw Error(Oe(168));ir(Dn,e),ir(ci,r)}function LO(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var i in n)if(!(i in e))throw Error(Oe(108,wM(t)||"Unknown",i));return Er({},r,n)}function u2(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Ts,Bl=Dn.current,ir(Dn,t),ir(ci,ci.current),!0}function KC(t,e,r){var n=t.stateNode;if(!n)throw Error(Oe(169));r?(t=LO(t,e,Bl),n.__reactInternalMemoizedMergedChildContext=t,lr(ci),lr(Dn),ir(Dn,t)):lr(ci),ir(ci,r)}var Ca=null,Q2=!1,w4=!1;function MO(t){Ca===null?Ca=[t]:Ca.push(t)}function DR(t){Q2=!0,MO(t)}function Fs(){if(!w4&&Ca!==null){w4=!0;var t=0,e=Ht;try{var r=Ca;for(Ht=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Ca=null,Q2=!1}catch(i){throw Ca!==null&&(Ca=Ca.slice(t+1)),iO(_6,Fs),i}finally{Ht=e,w4=!1}}return null}var gu=[],mu=0,d2=null,h2=0,Hi=[],Gi=0,Hl=null,Sa=1,ba="";function Ol(t,e){gu[mu++]=h2,gu[mu++]=d2,d2=t,h2=e}function RO(t,e,r){Hi[Gi++]=Sa,Hi[Gi++]=ba,Hi[Gi++]=Hl,Hl=t;var n=Sa;t=ba;var i=32-fo(n)-1;n&=~(1<<i),r+=1;var o=32-fo(e)+i;if(30<o){var a=i-i%5;o=(n&(1<<a)-1).toString(32),n>>=a,i-=a,Sa=1<<32-fo(e)+i|r<<i|n,ba=o+t}else Sa=1<<o|r<<i|n,ba=t}function L6(t){t.return!==null&&(Ol(t,1),RO(t,1,0))}function M6(t){for(;t===d2;)d2=gu[--mu],gu[mu]=null,h2=gu[--mu],gu[mu]=null;for(;t===Hl;)Hl=Hi[--Gi],Hi[Gi]=null,ba=Hi[--Gi],Hi[Gi]=null,Sa=Hi[--Gi],Hi[Gi]=null}var bi=null,Si=null,hr=!1,co=null;function NO(t,e){var r=Vi(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function YC(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,bi=t,Si=Ss(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,bi=t,Si=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=Hl!==null?{id:Sa,overflow:ba}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=Vi(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,bi=t,Si=null,!0):!1;default:return!1}}function sv(t){return(t.mode&1)!==0&&(t.flags&128)===0}function lv(t){if(hr){var e=Si;if(e){var r=e;if(!YC(t,e)){if(sv(t))throw Error(Oe(418));e=Ss(r.nextSibling);var n=bi;e&&YC(t,e)?NO(n,r):(t.flags=t.flags&-4097|2,hr=!1,bi=t)}}else{if(sv(t))throw Error(Oe(418));t.flags=t.flags&-4097|2,hr=!1,bi=t}}}function ZC(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;bi=t}function z1(t){if(t!==bi)return!1;if(!hr)return ZC(t),hr=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!nv(t.type,t.memoizedProps)),e&&(e=Si)){if(sv(t))throw FO(),Error(Oe(418));for(;e;)NO(t,e),e=Ss(e.nextSibling)}if(ZC(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Oe(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Si=Ss(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Si=null}}else Si=bi?Ss(t.stateNode.nextSibling):null;return!0}function FO(){for(var t=Si;t;)t=Ss(t.nextSibling)}function Fu(){Si=bi=null,hr=!1}function R6(t){co===null?co=[t]:co.push(t)}var jR=Ma.ReactCurrentBatchConfig;function r0(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Oe(309));var n=r.stateNode}if(!n)throw Error(Oe(147,t));var i=n,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(a){var s=i.refs;a===null?delete s[o]:s[o]=a},e._stringRef=o,e)}if(typeof t!="string")throw Error(Oe(284));if(!r._owner)throw Error(Oe(290,t))}return t}function $1(t,e){throw t=Object.prototype.toString.call(e),Error(Oe(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function qC(t){var e=t._init;return e(t._payload)}function DO(t){function e(b,O){if(t){var f=b.deletions;f===null?(b.deletions=[O],b.flags|=16):f.push(O)}}function r(b,O){if(!t)return null;for(;O!==null;)e(b,O),O=O.sibling;return null}function n(b,O){for(b=new Map;O!==null;)O.key!==null?b.set(O.key,O):b.set(O.index,O),O=O.sibling;return b}function i(b,O){return b=Es(b,O),b.index=0,b.sibling=null,b}function o(b,O,f){return b.index=f,t?(f=b.alternate,f!==null?(f=f.index,f<O?(b.flags|=2,O):f):(b.flags|=2,O)):(b.flags|=1048576,O)}function a(b){return t&&b.alternate===null&&(b.flags|=2),b}function s(b,O,f,S){return O===null||O.tag!==6?(O=P4(f,b.mode,S),O.return=b,O):(O=i(O,f),O.return=b,O)}function c(b,O,f,S){var E=f.type;return E===cu?h(b,O,f.props.children,S,f.key):O!==null&&(O.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===us&&qC(E)===O.type)?(S=i(O,f.props),S.ref=r0(b,O,f),S.return=b,S):(S=zf(f.type,f.key,f.props,null,b.mode,S),S.ref=r0(b,O,f),S.return=b,S)}function d(b,O,f,S){return O===null||O.tag!==4||O.stateNode.containerInfo!==f.containerInfo||O.stateNode.implementation!==f.implementation?(O=k4(f,b.mode,S),O.return=b,O):(O=i(O,f.children||[]),O.return=b,O)}function h(b,O,f,S,E){return O===null||O.tag!==7?(O=Rl(f,b.mode,S,E),O.return=b,O):(O=i(O,f),O.return=b,O)}function C(b,O,f){if(typeof O=="string"&&O!==""||typeof O=="number")return O=P4(""+O,b.mode,f),O.return=b,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case T1:return f=zf(O.type,O.key,O.props,null,b.mode,f),f.ref=r0(b,null,O),f.return=b,f;case lu:return O=k4(O,b.mode,f),O.return=b,O;case us:var S=O._init;return C(b,S(O._payload),f)}if(_0(O)||qd(O))return O=Rl(O,b.mode,f,null),O.return=b,O;$1(b,O)}return null}function v(b,O,f,S){var E=O!==null?O.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return E!==null?null:s(b,O,""+f,S);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case T1:return f.key===E?c(b,O,f,S):null;case lu:return f.key===E?d(b,O,f,S):null;case us:return E=f._init,v(b,O,E(f._payload),S)}if(_0(f)||qd(f))return E!==null?null:h(b,O,f,S,null);$1(b,f)}return null}function g(b,O,f,S,E){if(typeof S=="string"&&S!==""||typeof S=="number")return b=b.get(f)||null,s(O,b,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case T1:return b=b.get(S.key===null?f:S.key)||null,c(O,b,S,E);case lu:return b=b.get(S.key===null?f:S.key)||null,d(O,b,S,E);case us:var I=S._init;return g(b,O,f,I(S._payload),E)}if(_0(S)||qd(S))return b=b.get(f)||null,h(O,b,S,E,null);$1(O,S)}return null}function m(b,O,f,S){for(var E=null,I=null,R=O,k=O=0,N=null;R!==null&&k<f.length;k++){R.index>k?(N=R,R=null):N=R.sibling;var T=v(b,R,f[k],S);if(T===null){R===null&&(R=N);break}t&&R&&T.alternate===null&&e(b,R),O=o(T,O,k),I===null?E=T:I.sibling=T,I=T,R=N}if(k===f.length)return r(b,R),hr&&Ol(b,k),E;if(R===null){for(;k<f.length;k++)R=C(b,f[k],S),R!==null&&(O=o(R,O,k),I===null?E=R:I.sibling=R,I=R);return hr&&Ol(b,k),E}for(R=n(b,R);k<f.length;k++)N=g(R,b,k,f[k],S),N!==null&&(t&&N.alternate!==null&&R.delete(N.key===null?k:N.key),O=o(N,O,k),I===null?E=N:I.sibling=N,I=N);return t&&R.forEach(function(D){return e(b,D)}),hr&&Ol(b,k),E}function w(b,O,f,S){var E=qd(f);if(typeof E!="function")throw Error(Oe(150));if(f=E.call(f),f==null)throw Error(Oe(151));for(var I=E=null,R=O,k=O=0,N=null,T=f.next();R!==null&&!T.done;k++,T=f.next()){R.index>k?(N=R,R=null):N=R.sibling;var D=v(b,R,T.value,S);if(D===null){R===null&&(R=N);break}t&&R&&D.alternate===null&&e(b,R),O=o(D,O,k),I===null?E=D:I.sibling=D,I=D,R=N}if(T.done)return r(b,R),hr&&Ol(b,k),E;if(R===null){for(;!T.done;k++,T=f.next())T=C(b,T.value,S),T!==null&&(O=o(T,O,k),I===null?E=T:I.sibling=T,I=T);return hr&&Ol(b,k),E}for(R=n(b,R);!T.done;k++,T=f.next())T=g(R,b,k,T.value,S),T!==null&&(t&&T.alternate!==null&&R.delete(T.key===null?k:T.key),O=o(T,O,k),I===null?E=T:I.sibling=T,I=T);return t&&R.forEach(function(z){return e(b,z)}),hr&&Ol(b,k),E}function x(b,O,f,S){if(typeof f=="object"&&f!==null&&f.type===cu&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case T1:e:{for(var E=f.key,I=O;I!==null;){if(I.key===E){if(E=f.type,E===cu){if(I.tag===7){r(b,I.sibling),O=i(I,f.props.children),O.return=b,b=O;break e}}else if(I.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===us&&qC(E)===I.type){r(b,I.sibling),O=i(I,f.props),O.ref=r0(b,I,f),O.return=b,b=O;break e}r(b,I);break}else e(b,I);I=I.sibling}f.type===cu?(O=Rl(f.props.children,b.mode,S,f.key),O.return=b,b=O):(S=zf(f.type,f.key,f.props,null,b.mode,S),S.ref=r0(b,O,f),S.return=b,b=S)}return a(b);case lu:e:{for(I=f.key;O!==null;){if(O.key===I)if(O.tag===4&&O.stateNode.containerInfo===f.containerInfo&&O.stateNode.implementation===f.implementation){r(b,O.sibling),O=i(O,f.children||[]),O.return=b,b=O;break e}else{r(b,O);break}else e(b,O);O=O.sibling}O=k4(f,b.mode,S),O.return=b,b=O}return a(b);case us:return I=f._init,x(b,O,I(f._payload),S)}if(_0(f))return m(b,O,f,S);if(qd(f))return w(b,O,f,S);$1(b,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,O!==null&&O.tag===6?(r(b,O.sibling),O=i(O,f),O.return=b,b=O):(r(b,O),O=P4(f,b.mode,S),O.return=b,b=O),a(b)):r(b,O)}return x}var Du=DO(!0),jO=DO(!1),f2=Ns(null),p2=null,vu=null,N6=null;function F6(){N6=vu=p2=null}function D6(t){var e=f2.current;lr(f2),t._currentValue=e}function cv(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Pu(t,e){p2=t,N6=vu=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(si=!0),t.firstContext=null)}function Xi(t){var e=t._currentValue;if(N6!==t)if(t={context:t,memoizedValue:e,next:null},vu===null){if(p2===null)throw Error(Oe(308));vu=t,p2.dependencies={lanes:0,firstContext:t}}else vu=vu.next=t;return e}var Al=null;function j6(t){Al===null?Al=[t]:Al.push(t)}function zO(t,e,r,n){var i=e.interleaved;return i===null?(r.next=r,j6(e)):(r.next=i.next,i.next=r),e.interleaved=r,Ia(t,n)}function Ia(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var ds=!1;function z6(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $O(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ea(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function bs(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,At&2){var i=n.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),n.pending=e,Ia(t,r)}return i=n.interleaved,i===null?(e.next=e,j6(n)):(e.next=i.next,i.next=e),n.interleaved=e,Ia(t,r)}function Mf(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,x6(t,r)}}function QC(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var i=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?i=o=a:o=o.next=a,r=r.next}while(r!==null);o===null?i=o=e:o=o.next=e}else i=o=e;r={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function g2(t,e,r,n){var i=t.updateQueue;ds=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,d=c.next;c.next=null,a===null?o=d:a.next=d,a=c;var h=t.alternate;h!==null&&(h=h.updateQueue,s=h.lastBaseUpdate,s!==a&&(s===null?h.firstBaseUpdate=d:s.next=d,h.lastBaseUpdate=c))}if(o!==null){var C=i.baseState;a=0,h=d=c=null,s=o;do{var v=s.lane,g=s.eventTime;if((n&v)===v){h!==null&&(h=h.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=t,w=s;switch(v=e,g=r,w.tag){case 1:if(m=w.payload,typeof m=="function"){C=m.call(g,C,v);break e}C=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=w.payload,v=typeof m=="function"?m.call(g,C,v):m,v==null)break e;C=Er({},C,v);break e;case 2:ds=!0}}s.callback!==null&&s.lane!==0&&(t.flags|=64,v=i.effects,v===null?i.effects=[s]:v.push(s))}else g={eventTime:g,lane:v,tag:s.tag,payload:s.payload,callback:s.callback,next:null},h===null?(d=h=g,c=C):h=h.next=g,a|=v;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;v=s,s=v.next,v.next=null,i.lastBaseUpdate=v,i.shared.pending=null}}while(!0);if(h===null&&(c=C),i.baseState=c,i.firstBaseUpdate=d,i.lastBaseUpdate=h,e=i.shared.interleaved,e!==null){i=e;do a|=i.lane,i=i.next;while(i!==e)}else o===null&&(i.shared.lanes=0);Vl|=a,t.lanes=a,t.memoizedState=C}}function JC(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],i=n.callback;if(i!==null){if(n.callback=null,n=r,typeof i!="function")throw Error(Oe(191,i));i.call(n)}}}var wh={},Wo=Ns(wh),th=Ns(wh),rh=Ns(wh);function Ll(t){if(t===wh)throw Error(Oe(174));return t}function $6(t,e){switch(ir(rh,e),ir(th,t),ir(Wo,wh),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Gm(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Gm(e,t)}lr(Wo),ir(Wo,e)}function ju(){lr(Wo),lr(th),lr(rh)}function BO(t){Ll(rh.current);var e=Ll(Wo.current),r=Gm(e,t.type);e!==r&&(ir(th,t),ir(Wo,r))}function B6(t){th.current===t&&(lr(Wo),lr(th))}var Sr=Ns(0);function m2(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var S4=[];function H6(){for(var t=0;t<S4.length;t++)S4[t]._workInProgressVersionPrimary=null;S4.length=0}var Rf=Ma.ReactCurrentDispatcher,b4=Ma.ReactCurrentBatchConfig,Gl=0,xr=null,Yr=null,dn=null,v2=!1,N0=!1,nh=0,zR=0;function In(){throw Error(Oe(321))}function G6(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!yo(t[r],e[r]))return!1;return!0}function V6(t,e,r,n,i,o){if(Gl=o,xr=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Rf.current=t===null||t.memoizedState===null?GR:VR,t=r(n,i),N0){o=0;do{if(N0=!1,nh=0,25<=o)throw Error(Oe(301));o+=1,dn=Yr=null,e.updateQueue=null,Rf.current=UR,t=r(n,i)}while(N0)}if(Rf.current=y2,e=Yr!==null&&Yr.next!==null,Gl=0,dn=Yr=xr=null,v2=!1,e)throw Error(Oe(300));return t}function U6(){var t=nh!==0;return nh=0,t}function $o(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dn===null?xr.memoizedState=dn=t:dn=dn.next=t,dn}function Ki(){if(Yr===null){var t=xr.alternate;t=t!==null?t.memoizedState:null}else t=Yr.next;var e=dn===null?xr.memoizedState:dn.next;if(e!==null)dn=e,Yr=t;else{if(t===null)throw Error(Oe(310));Yr=t,t={memoizedState:Yr.memoizedState,baseState:Yr.baseState,baseQueue:Yr.baseQueue,queue:Yr.queue,next:null},dn===null?xr.memoizedState=dn=t:dn=dn.next=t}return dn}function ih(t,e){return typeof e=="function"?e(t):e}function _4(t){var e=Ki(),r=e.queue;if(r===null)throw Error(Oe(311));r.lastRenderedReducer=t;var n=Yr,i=n.baseQueue,o=r.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}n.baseQueue=i=o,r.pending=null}if(i!==null){o=i.next,n=n.baseState;var s=a=null,c=null,d=o;do{var h=d.lane;if((Gl&h)===h)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:t(n,d.action);else{var C={lane:h,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(s=c=C,a=n):c=c.next=C,xr.lanes|=h,Vl|=h}d=d.next}while(d!==null&&d!==o);c===null?a=n:c.next=s,yo(n,e.memoizedState)||(si=!0),e.memoizedState=n,e.baseState=a,e.baseQueue=c,r.lastRenderedState=n}if(t=r.interleaved,t!==null){i=t;do o=i.lane,xr.lanes|=o,Vl|=o,i=i.next;while(i!==t)}else i===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function x4(t){var e=Ki(),r=e.queue;if(r===null)throw Error(Oe(311));r.lastRenderedReducer=t;var n=r.dispatch,i=r.pending,o=e.memoizedState;if(i!==null){r.pending=null;var a=i=i.next;do o=t(o,a.action),a=a.next;while(a!==i);yo(o,e.memoizedState)||(si=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),r.lastRenderedState=o}return[o,n]}function HO(){}function GO(t,e){var r=xr,n=Ki(),i=e(),o=!yo(n.memoizedState,i);if(o&&(n.memoizedState=i,si=!0),n=n.queue,W6(WO.bind(null,r,n,t),[t]),n.getSnapshot!==e||o||dn!==null&&dn.memoizedState.tag&1){if(r.flags|=2048,oh(9,UO.bind(null,r,n,i,e),void 0,null),hn===null)throw Error(Oe(349));Gl&30||VO(r,e,i)}return i}function VO(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=xr.updateQueue,e===null?(e={lastEffect:null,stores:null},xr.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function UO(t,e,r,n){e.value=r,e.getSnapshot=n,XO(e)&&KO(t)}function WO(t,e,r){return r(function(){XO(e)&&KO(t)})}function XO(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!yo(t,r)}catch{return!0}}function KO(t){var e=Ia(t,1);e!==null&&po(e,t,1,-1)}function ew(t){var e=$o();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ih,lastRenderedState:t},e.queue=t,t=t.dispatch=HR.bind(null,xr,t),[e.memoizedState,t]}function oh(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=xr.updateQueue,e===null?(e={lastEffect:null,stores:null},xr.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function YO(){return Ki().memoizedState}function Nf(t,e,r,n){var i=$o();xr.flags|=t,i.memoizedState=oh(1|e,r,void 0,n===void 0?null:n)}function J2(t,e,r,n){var i=Ki();n=n===void 0?null:n;var o=void 0;if(Yr!==null){var a=Yr.memoizedState;if(o=a.destroy,n!==null&&G6(n,a.deps)){i.memoizedState=oh(e,r,o,n);return}}xr.flags|=t,i.memoizedState=oh(1|e,r,o,n)}function tw(t,e){return Nf(8390656,8,t,e)}function W6(t,e){return J2(2048,8,t,e)}function ZO(t,e){return J2(4,2,t,e)}function qO(t,e){return J2(4,4,t,e)}function QO(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function JO(t,e,r){return r=r!=null?r.concat([t]):null,J2(4,4,QO.bind(null,e,t),r)}function X6(){}function eP(t,e){var r=Ki();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&G6(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function tP(t,e){var r=Ki();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&G6(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function rP(t,e,r){return Gl&21?(yo(r,e)||(r=sO(),xr.lanes|=r,Vl|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,si=!0),t.memoizedState=r)}function $R(t,e){var r=Ht;Ht=r!==0&&4>r?r:4,t(!0);var n=b4.transition;b4.transition={};try{t(!1),e()}finally{Ht=r,b4.transition=n}}function nP(){return Ki().memoizedState}function BR(t,e,r){var n=xs(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},iP(t))oP(e,r);else if(r=zO(t,e,r,n),r!==null){var i=Vn();po(r,t,n,i),aP(r,e,n)}}function HR(t,e,r){var n=xs(t),i={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(iP(t))oP(e,i);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var a=e.lastRenderedState,s=o(a,r);if(i.hasEagerState=!0,i.eagerState=s,yo(s,a)){var c=e.interleaved;c===null?(i.next=i,j6(e)):(i.next=c.next,c.next=i),e.interleaved=i;return}}catch{}finally{}r=zO(t,e,i,n),r!==null&&(i=Vn(),po(r,t,n,i),aP(r,e,n))}}function iP(t){var e=t.alternate;return t===xr||e!==null&&e===xr}function oP(t,e){N0=v2=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function aP(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,x6(t,r)}}var y2={readContext:Xi,useCallback:In,useContext:In,useEffect:In,useImperativeHandle:In,useInsertionEffect:In,useLayoutEffect:In,useMemo:In,useReducer:In,useRef:In,useState:In,useDebugValue:In,useDeferredValue:In,useTransition:In,useMutableSource:In,useSyncExternalStore:In,useId:In,unstable_isNewReconciler:!1},GR={readContext:Xi,useCallback:function(t,e){return $o().memoizedState=[t,e===void 0?null:e],t},useContext:Xi,useEffect:tw,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Nf(4194308,4,QO.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Nf(4194308,4,t,e)},useInsertionEffect:function(t,e){return Nf(4,2,t,e)},useMemo:function(t,e){var r=$o();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=$o();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=BR.bind(null,xr,t),[n.memoizedState,t]},useRef:function(t){var e=$o();return t={current:t},e.memoizedState=t},useState:ew,useDebugValue:X6,useDeferredValue:function(t){return $o().memoizedState=t},useTransition:function(){var t=ew(!1),e=t[0];return t=$R.bind(null,t[1]),$o().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=xr,i=$o();if(hr){if(r===void 0)throw Error(Oe(407));r=r()}else{if(r=e(),hn===null)throw Error(Oe(349));Gl&30||VO(n,e,r)}i.memoizedState=r;var o={value:r,getSnapshot:e};return i.queue=o,tw(WO.bind(null,n,o,t),[t]),n.flags|=2048,oh(9,UO.bind(null,n,o,r,e),void 0,null),r},useId:function(){var t=$o(),e=hn.identifierPrefix;if(hr){var r=ba,n=Sa;r=(n&~(1<<32-fo(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=nh++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=zR++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},VR={readContext:Xi,useCallback:eP,useContext:Xi,useEffect:W6,useImperativeHandle:JO,useInsertionEffect:ZO,useLayoutEffect:qO,useMemo:tP,useReducer:_4,useRef:YO,useState:function(){return _4(ih)},useDebugValue:X6,useDeferredValue:function(t){var e=Ki();return rP(e,Yr.memoizedState,t)},useTransition:function(){var t=_4(ih)[0],e=Ki().memoizedState;return[t,e]},useMutableSource:HO,useSyncExternalStore:GO,useId:nP,unstable_isNewReconciler:!1},UR={readContext:Xi,useCallback:eP,useContext:Xi,useEffect:W6,useImperativeHandle:JO,useInsertionEffect:ZO,useLayoutEffect:qO,useMemo:tP,useReducer:x4,useRef:YO,useState:function(){return x4(ih)},useDebugValue:X6,useDeferredValue:function(t){var e=Ki();return Yr===null?e.memoizedState=t:rP(e,Yr.memoizedState,t)},useTransition:function(){var t=x4(ih)[0],e=Ki().memoizedState;return[t,e]},useMutableSource:HO,useSyncExternalStore:GO,useId:nP,unstable_isNewReconciler:!1};function so(t,e){if(t&&t.defaultProps){e=Er({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function uv(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Er({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var ep={isMounted:function(t){return(t=t._reactInternals)?Jl(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=Vn(),i=xs(t),o=Ea(n,i);o.payload=e,r!=null&&(o.callback=r),e=bs(t,o,i),e!==null&&(po(e,t,i,n),Mf(e,t,i))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=Vn(),i=xs(t),o=Ea(n,i);o.tag=1,o.payload=e,r!=null&&(o.callback=r),e=bs(t,o,i),e!==null&&(po(e,t,i,n),Mf(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=Vn(),n=xs(t),i=Ea(r,n);i.tag=2,e!=null&&(i.callback=e),e=bs(t,i,n),e!==null&&(po(e,t,n,r),Mf(e,t,n))}};function rw(t,e,r,n,i,o,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,o,a):e.prototype&&e.prototype.isPureReactComponent?!q0(r,n)||!q0(i,o):!0}function sP(t,e,r){var n=!1,i=Ts,o=e.contextType;return typeof o=="object"&&o!==null?o=Xi(o):(i=ui(e)?Bl:Dn.current,n=e.contextTypes,o=(n=n!=null)?Nu(t,i):Ts),e=new e(r,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=ep,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=o),e}function nw(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&ep.enqueueReplaceState(e,e.state,null)}function dv(t,e,r,n){var i=t.stateNode;i.props=r,i.state=t.memoizedState,i.refs={},z6(t);var o=e.contextType;typeof o=="object"&&o!==null?i.context=Xi(o):(o=ui(e)?Bl:Dn.current,i.context=Nu(t,o)),i.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(uv(t,e,o,r),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&ep.enqueueReplaceState(i,i.state,null),g2(t,r,i,n),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function zu(t,e){try{var r="",n=e;do r+=CM(n),n=n.return;while(n);var i=r}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:t,source:e,stack:i,digest:null}}function E4(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function hv(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var WR=typeof WeakMap=="function"?WeakMap:Map;function lP(t,e,r){r=Ea(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){w2||(w2=!0,bv=n),hv(t,e)},r}function cP(t,e,r){r=Ea(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){hv(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){hv(t,e),typeof n!="function"&&(_s===null?_s=new Set([this]):_s.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),r}function iw(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new WR;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=aN.bind(null,t,e,r),e.then(t,t))}function ow(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function aw(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=Ea(-1,1),e.tag=2,bs(r,e,1))),r.lanes|=1),t)}var XR=Ma.ReactCurrentOwner,si=!1;function Gn(t,e,r,n){e.child=t===null?jO(e,null,r,n):Du(e,t.child,r,n)}function sw(t,e,r,n,i){r=r.render;var o=e.ref;return Pu(e,i),n=V6(t,e,r,n,o,i),r=U6(),t!==null&&!si?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Aa(t,e,i)):(hr&&r&&L6(e),e.flags|=1,Gn(t,e,n,i),e.child)}function lw(t,e,r,n,i){if(t===null){var o=r.type;return typeof o=="function"&&!t8(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,uP(t,e,o,n,i)):(t=zf(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var a=o.memoizedProps;if(r=r.compare,r=r!==null?r:q0,r(a,n)&&t.ref===e.ref)return Aa(t,e,i)}return e.flags|=1,t=Es(o,n),t.ref=e.ref,t.return=e,e.child=t}function uP(t,e,r,n,i){if(t!==null){var o=t.memoizedProps;if(q0(o,n)&&t.ref===e.ref)if(si=!1,e.pendingProps=n=o,(t.lanes&i)!==0)t.flags&131072&&(si=!0);else return e.lanes=t.lanes,Aa(t,e,i)}return fv(t,e,r,n,i)}function dP(t,e,r){var n=e.pendingProps,i=n.children,o=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ir(Cu,Ci),Ci|=r;else{if(!(r&1073741824))return t=o!==null?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ir(Cu,Ci),Ci|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,ir(Cu,Ci),Ci|=n}else o!==null?(n=o.baseLanes|r,e.memoizedState=null):n=r,ir(Cu,Ci),Ci|=n;return Gn(t,e,i,r),e.child}function hP(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function fv(t,e,r,n,i){var o=ui(r)?Bl:Dn.current;return o=Nu(e,o),Pu(e,i),r=V6(t,e,r,n,o,i),n=U6(),t!==null&&!si?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,Aa(t,e,i)):(hr&&n&&L6(e),e.flags|=1,Gn(t,e,r,i),e.child)}function cw(t,e,r,n,i){if(ui(r)){var o=!0;u2(e)}else o=!1;if(Pu(e,i),e.stateNode===null)Ff(t,e),sP(e,r,n),dv(e,r,n,i),n=!0;else if(t===null){var a=e.stateNode,s=e.memoizedProps;a.props=s;var c=a.context,d=r.contextType;typeof d=="object"&&d!==null?d=Xi(d):(d=ui(r)?Bl:Dn.current,d=Nu(e,d));var h=r.getDerivedStateFromProps,C=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";C||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||c!==d)&&nw(e,a,n,d),ds=!1;var v=e.memoizedState;a.state=v,g2(e,n,a,i),c=e.memoizedState,s!==n||v!==c||ci.current||ds?(typeof h=="function"&&(uv(e,r,h,n),c=e.memoizedState),(s=ds||rw(e,r,s,n,v,c,d))?(C||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=c),a.props=n,a.state=c,a.context=d,n=s):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{a=e.stateNode,$O(t,e),s=e.memoizedProps,d=e.type===e.elementType?s:so(e.type,s),a.props=d,C=e.pendingProps,v=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=Xi(c):(c=ui(r)?Bl:Dn.current,c=Nu(e,c));var g=r.getDerivedStateFromProps;(h=typeof g=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==C||v!==c)&&nw(e,a,n,c),ds=!1,v=e.memoizedState,a.state=v,g2(e,n,a,i);var m=e.memoizedState;s!==C||v!==m||ci.current||ds?(typeof g=="function"&&(uv(e,r,g,n),m=e.memoizedState),(d=ds||rw(e,r,d,n,v,m,c)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,m,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,m,c)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===t.memoizedProps&&v===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&v===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=m),a.props=n,a.state=m,a.context=c,n=d):(typeof a.componentDidUpdate!="function"||s===t.memoizedProps&&v===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&v===t.memoizedState||(e.flags|=1024),n=!1)}return pv(t,e,r,n,o,i)}function pv(t,e,r,n,i,o){hP(t,e);var a=(e.flags&128)!==0;if(!n&&!a)return i&&KC(e,r,!1),Aa(t,e,o);n=e.stateNode,XR.current=e;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&a?(e.child=Du(e,t.child,null,o),e.child=Du(e,null,s,o)):Gn(t,e,s,o),e.memoizedState=n.state,i&&KC(e,r,!0),e.child}function fP(t){var e=t.stateNode;e.pendingContext?XC(t,e.pendingContext,e.pendingContext!==e.context):e.context&&XC(t,e.context,!1),$6(t,e.containerInfo)}function uw(t,e,r,n,i){return Fu(),R6(i),e.flags|=256,Gn(t,e,r,n),e.child}var gv={dehydrated:null,treeContext:null,retryLane:0};function mv(t){return{baseLanes:t,cachePool:null,transitions:null}}function pP(t,e,r){var n=e.pendingProps,i=Sr.current,o=!1,a=(e.flags&128)!==0,s;if((s=a)||(s=t!==null&&t.memoizedState===null?!1:(i&2)!==0),s?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),ir(Sr,i&1),t===null)return lv(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=n.children,t=n.fallback,o?(n=e.mode,o=e.child,a={mode:"hidden",children:a},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=np(a,n,0,null),t=Rl(t,n,r,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=mv(r),e.memoizedState=gv,t):K6(e,a));if(i=t.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return KR(t,e,a,n,s,i,r);if(o){o=n.fallback,a=e.mode,i=t.child,s=i.sibling;var c={mode:"hidden",children:n.children};return!(a&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=c,e.deletions=null):(n=Es(i,c),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Es(s,o):(o=Rl(o,a,r,null),o.flags|=2),o.return=e,n.return=e,n.sibling=o,e.child=n,n=o,o=e.child,a=t.child.memoizedState,a=a===null?mv(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=t.childLanes&~r,e.memoizedState=gv,n}return o=t.child,t=o.sibling,n=Es(o,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function K6(t,e){return e=np({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function B1(t,e,r,n){return n!==null&&R6(n),Du(e,t.child,null,r),t=K6(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function KR(t,e,r,n,i,o,a){if(r)return e.flags&256?(e.flags&=-257,n=E4(Error(Oe(422))),B1(t,e,a,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=n.fallback,i=e.mode,n=np({mode:"visible",children:n.children},i,0,null),o=Rl(o,i,a,null),o.flags|=2,n.return=e,o.return=e,n.sibling=o,e.child=n,e.mode&1&&Du(e,t.child,null,a),e.child.memoizedState=mv(a),e.memoizedState=gv,o);if(!(e.mode&1))return B1(t,e,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,o=Error(Oe(419)),n=E4(o,n,void 0),B1(t,e,a,n)}if(s=(a&t.childLanes)!==0,si||s){if(n=hn,n!==null){switch(a&-a){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(n.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Ia(t,i),po(n,t,i,-1))}return e8(),n=E4(Error(Oe(421))),B1(t,e,a,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=sN.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,Si=Ss(i.nextSibling),bi=e,hr=!0,co=null,t!==null&&(Hi[Gi++]=Sa,Hi[Gi++]=ba,Hi[Gi++]=Hl,Sa=t.id,ba=t.overflow,Hl=e),e=K6(e,n.children),e.flags|=4096,e)}function dw(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),cv(t.return,e,r)}function O4(t,e,r,n,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function gP(t,e,r){var n=e.pendingProps,i=n.revealOrder,o=n.tail;if(Gn(t,e,n.children,r),n=Sr.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&dw(t,r,e);else if(t.tag===19)dw(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(ir(Sr,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&m2(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),O4(e,!1,i,r,o);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&m2(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}O4(e,!0,r,null,o);break;case"together":O4(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Ff(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Aa(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Vl|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Oe(153));if(e.child!==null){for(t=e.child,r=Es(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Es(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function YR(t,e,r){switch(e.tag){case 3:fP(e),Fu();break;case 5:BO(e);break;case 1:ui(e.type)&&u2(e);break;case 4:$6(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;ir(f2,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(ir(Sr,Sr.current&1),e.flags|=128,null):r&e.child.childLanes?pP(t,e,r):(ir(Sr,Sr.current&1),t=Aa(t,e,r),t!==null?t.sibling:null);ir(Sr,Sr.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return gP(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ir(Sr,Sr.current),n)break;return null;case 22:case 23:return e.lanes=0,dP(t,e,r)}return Aa(t,e,r)}var mP,vv,vP,yP;mP=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};vv=function(){};vP=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Ll(Wo.current);var o=null;switch(r){case"input":i=zm(t,i),n=zm(t,n),o=[];break;case"select":i=Er({},i,{value:void 0}),n=Er({},n,{value:void 0}),o=[];break;case"textarea":i=Hm(t,i),n=Hm(t,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=l2)}Vm(r,n);var a;r=null;for(d in i)if(!n.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var s=i[d];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(V0.hasOwnProperty(d)?o||(o=[]):(o=o||[]).push(d,null));for(d in n){var c=n[d];if(s=i!=null?i[d]:void 0,n.hasOwnProperty(d)&&c!==s&&(c!=null||s!=null))if(d==="style")if(s){for(a in s)!s.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&s[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(o||(o=[]),o.push(d,r)),r=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,s=s?s.__html:void 0,c!=null&&s!==c&&(o=o||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(V0.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&sr("scroll",t),o||s===c||(o=[])):(o=o||[]).push(d,c))}r&&(o=o||[]).push("style",r);var d=o;(e.updateQueue=d)&&(e.flags|=4)}};yP=function(t,e,r,n){r!==n&&(e.flags|=4)};function n0(t,e){if(!hr)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function An(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function ZR(t,e,r){var n=e.pendingProps;switch(M6(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return An(e),null;case 1:return ui(e.type)&&c2(),An(e),null;case 3:return n=e.stateNode,ju(),lr(ci),lr(Dn),H6(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(z1(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,co!==null&&(Ev(co),co=null))),vv(t,e),An(e),null;case 5:B6(e);var i=Ll(rh.current);if(r=e.type,t!==null&&e.stateNode!=null)vP(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(Oe(166));return An(e),null}if(t=Ll(Wo.current),z1(e)){n=e.stateNode,r=e.type;var o=e.memoizedProps;switch(n[Bo]=e,n[eh]=o,t=(e.mode&1)!==0,r){case"dialog":sr("cancel",n),sr("close",n);break;case"iframe":case"object":case"embed":sr("load",n);break;case"video":case"audio":for(i=0;i<E0.length;i++)sr(E0[i],n);break;case"source":sr("error",n);break;case"img":case"image":case"link":sr("error",n),sr("load",n);break;case"details":sr("toggle",n);break;case"input":wC(n,o),sr("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},sr("invalid",n);break;case"textarea":bC(n,o),sr("invalid",n)}Vm(r,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?n.textContent!==s&&(o.suppressHydrationWarning!==!0&&j1(n.textContent,s,t),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&j1(n.textContent,s,t),i=["children",""+s]):V0.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&sr("scroll",n)}switch(r){case"input":I1(n),SC(n,o,!0);break;case"textarea":I1(n),_C(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=l2)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=WE(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=a.createElement(r,{is:n.is}):(t=a.createElement(r),r==="select"&&(a=t,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):t=a.createElementNS(t,r),t[Bo]=e,t[eh]=n,mP(t,e,!1,!1),e.stateNode=t;e:{switch(a=Um(r,n),r){case"dialog":sr("cancel",t),sr("close",t),i=n;break;case"iframe":case"object":case"embed":sr("load",t),i=n;break;case"video":case"audio":for(i=0;i<E0.length;i++)sr(E0[i],t);i=n;break;case"source":sr("error",t),i=n;break;case"img":case"image":case"link":sr("error",t),sr("load",t),i=n;break;case"details":sr("toggle",t),i=n;break;case"input":wC(t,n),i=zm(t,n),sr("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=Er({},n,{value:void 0}),sr("invalid",t);break;case"textarea":bC(t,n),i=Hm(t,n),sr("invalid",t);break;default:i=n}Vm(r,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var c=s[o];o==="style"?YE(t,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&XE(t,c)):o==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&U0(t,c):typeof c=="number"&&U0(t,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(V0.hasOwnProperty(o)?c!=null&&o==="onScroll"&&sr("scroll",t):c!=null&&y6(t,o,c,a))}switch(r){case"input":I1(t),SC(t,n,!1);break;case"textarea":I1(t),_C(t);break;case"option":n.value!=null&&t.setAttribute("value",""+ks(n.value));break;case"select":t.multiple=!!n.multiple,o=n.value,o!=null?_u(t,!!n.multiple,o,!1):n.defaultValue!=null&&_u(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=l2)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return An(e),null;case 6:if(t&&e.stateNode!=null)yP(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(Oe(166));if(r=Ll(rh.current),Ll(Wo.current),z1(e)){if(n=e.stateNode,r=e.memoizedProps,n[Bo]=e,(o=n.nodeValue!==r)&&(t=bi,t!==null))switch(t.tag){case 3:j1(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&j1(n.nodeValue,r,(t.mode&1)!==0)}o&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Bo]=e,e.stateNode=n}return An(e),null;case 13:if(lr(Sr),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(hr&&Si!==null&&e.mode&1&&!(e.flags&128))FO(),Fu(),e.flags|=98560,o=!1;else if(o=z1(e),n!==null&&n.dehydrated!==null){if(t===null){if(!o)throw Error(Oe(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(Oe(317));o[Bo]=e}else Fu(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;An(e),o=!1}else co!==null&&(Ev(co),co=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||Sr.current&1?Zr===0&&(Zr=3):e8())),e.updateQueue!==null&&(e.flags|=4),An(e),null);case 4:return ju(),vv(t,e),t===null&&Q0(e.stateNode.containerInfo),An(e),null;case 10:return D6(e.type._context),An(e),null;case 17:return ui(e.type)&&c2(),An(e),null;case 19:if(lr(Sr),o=e.memoizedState,o===null)return An(e),null;if(n=(e.flags&128)!==0,a=o.rendering,a===null)if(n)n0(o,!1);else{if(Zr!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(a=m2(t),a!==null){for(e.flags|=128,n0(o,!1),n=a.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)o=r,t=n,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,t=a.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return ir(Sr,Sr.current&1|2),e.child}t=t.sibling}o.tail!==null&&Rr()>$u&&(e.flags|=128,n=!0,n0(o,!1),e.lanes=4194304)}else{if(!n)if(t=m2(a),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),n0(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!hr)return An(e),null}else 2*Rr()-o.renderingStartTime>$u&&r!==1073741824&&(e.flags|=128,n=!0,n0(o,!1),e.lanes=4194304);o.isBackwards?(a.sibling=e.child,e.child=a):(r=o.last,r!==null?r.sibling=a:e.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Rr(),e.sibling=null,r=Sr.current,ir(Sr,n?r&1|2:r&1),e):(An(e),null);case 22:case 23:return J6(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?Ci&1073741824&&(An(e),e.subtreeFlags&6&&(e.flags|=8192)):An(e),null;case 24:return null;case 25:return null}throw Error(Oe(156,e.tag))}function qR(t,e){switch(M6(e),e.tag){case 1:return ui(e.type)&&c2(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ju(),lr(ci),lr(Dn),H6(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return B6(e),null;case 13:if(lr(Sr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Oe(340));Fu()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return lr(Sr),null;case 4:return ju(),null;case 10:return D6(e.type._context),null;case 22:case 23:return J6(),null;case 24:return null;default:return null}}var H1=!1,Fn=!1,QR=typeof WeakSet=="function"?WeakSet:Set,De=null;function yu(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){kr(t,e,n)}else r.current=null}function yv(t,e,r){try{r()}catch(n){kr(t,e,n)}}var hw=!1;function JR(t,e){if(tv=o2,t=_O(),A6(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var a=0,s=-1,c=-1,d=0,h=0,C=t,v=null;t:for(;;){for(var g;C!==r||i!==0&&C.nodeType!==3||(s=a+i),C!==o||n!==0&&C.nodeType!==3||(c=a+n),C.nodeType===3&&(a+=C.nodeValue.length),(g=C.firstChild)!==null;)v=C,C=g;for(;;){if(C===t)break t;if(v===r&&++d===i&&(s=a),v===o&&++h===n&&(c=a),(g=C.nextSibling)!==null)break;C=v,v=C.parentNode}C=g}r=s===-1||c===-1?null:{start:s,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(rv={focusedElem:t,selectionRange:r},o2=!1,De=e;De!==null;)if(e=De,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,De=t;else for(;De!==null;){e=De;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var w=m.memoizedProps,x=m.memoizedState,b=e.stateNode,O=b.getSnapshotBeforeUpdate(e.elementType===e.type?w:so(e.type,w),x);b.__reactInternalSnapshotBeforeUpdate=O}break;case 3:var f=e.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Oe(163))}}catch(S){kr(e,e.return,S)}if(t=e.sibling,t!==null){t.return=e.return,De=t;break}De=e.return}return m=hw,hw=!1,m}function F0(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&yv(e,r,o)}i=i.next}while(i!==n)}}function tp(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Cv(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function CP(t){var e=t.alternate;e!==null&&(t.alternate=null,CP(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[Bo],delete e[eh],delete e[ov],delete e[NR],delete e[FR])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function wP(t){return t.tag===5||t.tag===3||t.tag===4}function fw(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||wP(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function wv(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=l2));else if(n!==4&&(t=t.child,t!==null))for(wv(t,e,r),t=t.sibling;t!==null;)wv(t,e,r),t=t.sibling}function Sv(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(Sv(t,e,r),t=t.sibling;t!==null;)Sv(t,e,r),t=t.sibling}var vn=null,lo=!1;function rs(t,e,r){for(r=r.child;r!==null;)SP(t,e,r),r=r.sibling}function SP(t,e,r){if(Uo&&typeof Uo.onCommitFiberUnmount=="function")try{Uo.onCommitFiberUnmount(X2,r)}catch{}switch(r.tag){case 5:Fn||yu(r,e);case 6:var n=vn,i=lo;vn=null,rs(t,e,r),vn=n,lo=i,vn!==null&&(lo?(t=vn,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):vn.removeChild(r.stateNode));break;case 18:vn!==null&&(lo?(t=vn,r=r.stateNode,t.nodeType===8?C4(t.parentNode,r):t.nodeType===1&&C4(t,r),Y0(t)):C4(vn,r.stateNode));break;case 4:n=vn,i=lo,vn=r.stateNode.containerInfo,lo=!0,rs(t,e,r),vn=n,lo=i;break;case 0:case 11:case 14:case 15:if(!Fn&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&yv(r,e,a),i=i.next}while(i!==n)}rs(t,e,r);break;case 1:if(!Fn&&(yu(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){kr(r,e,s)}rs(t,e,r);break;case 21:rs(t,e,r);break;case 22:r.mode&1?(Fn=(n=Fn)||r.memoizedState!==null,rs(t,e,r),Fn=n):rs(t,e,r);break;default:rs(t,e,r)}}function pw(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new QR),e.forEach(function(n){var i=lN.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function no(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var o=t,a=e,s=a;e:for(;s!==null;){switch(s.tag){case 5:vn=s.stateNode,lo=!1;break e;case 3:vn=s.stateNode.containerInfo,lo=!0;break e;case 4:vn=s.stateNode.containerInfo,lo=!0;break e}s=s.return}if(vn===null)throw Error(Oe(160));SP(o,a,i),vn=null,lo=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(d){kr(i,e,d)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)bP(e,t),e=e.sibling}function bP(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(no(e,t),Do(t),n&4){try{F0(3,t,t.return),tp(3,t)}catch(w){kr(t,t.return,w)}try{F0(5,t,t.return)}catch(w){kr(t,t.return,w)}}break;case 1:no(e,t),Do(t),n&512&&r!==null&&yu(r,r.return);break;case 5:if(no(e,t),Do(t),n&512&&r!==null&&yu(r,r.return),t.flags&32){var i=t.stateNode;try{U0(i,"")}catch(w){kr(t,t.return,w)}}if(n&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,a=r!==null?r.memoizedProps:o,s=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&VE(i,o),Um(s,a);var d=Um(s,o);for(a=0;a<c.length;a+=2){var h=c[a],C=c[a+1];h==="style"?YE(i,C):h==="dangerouslySetInnerHTML"?XE(i,C):h==="children"?U0(i,C):y6(i,h,C,d)}switch(s){case"input":$m(i,o);break;case"textarea":UE(i,o);break;case"select":var v=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var g=o.value;g!=null?_u(i,!!o.multiple,g,!1):v!==!!o.multiple&&(o.defaultValue!=null?_u(i,!!o.multiple,o.defaultValue,!0):_u(i,!!o.multiple,o.multiple?[]:"",!1))}i[eh]=o}catch(w){kr(t,t.return,w)}}break;case 6:if(no(e,t),Do(t),n&4){if(t.stateNode===null)throw Error(Oe(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(w){kr(t,t.return,w)}}break;case 3:if(no(e,t),Do(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Y0(e.containerInfo)}catch(w){kr(t,t.return,w)}break;case 4:no(e,t),Do(t);break;case 13:no(e,t),Do(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(q6=Rr())),n&4&&pw(t);break;case 22:if(h=r!==null&&r.memoizedState!==null,t.mode&1?(Fn=(d=Fn)||h,no(e,t),Fn=d):no(e,t),Do(t),n&8192){if(d=t.memoizedState!==null,(t.stateNode.isHidden=d)&&!h&&t.mode&1)for(De=t,h=t.child;h!==null;){for(C=De=h;De!==null;){switch(v=De,g=v.child,v.tag){case 0:case 11:case 14:case 15:F0(4,v,v.return);break;case 1:yu(v,v.return);var m=v.stateNode;if(typeof m.componentWillUnmount=="function"){n=v,r=v.return;try{e=n,m.props=e.memoizedProps,m.state=e.memoizedState,m.componentWillUnmount()}catch(w){kr(n,r,w)}}break;case 5:yu(v,v.return);break;case 22:if(v.memoizedState!==null){mw(C);continue}}g!==null?(g.return=v,De=g):mw(C)}h=h.sibling}e:for(h=null,C=t;;){if(C.tag===5){if(h===null){h=C;try{i=C.stateNode,d?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=C.stateNode,c=C.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,s.style.display=KE("display",a))}catch(w){kr(t,t.return,w)}}}else if(C.tag===6){if(h===null)try{C.stateNode.nodeValue=d?"":C.memoizedProps}catch(w){kr(t,t.return,w)}}else if((C.tag!==22&&C.tag!==23||C.memoizedState===null||C===t)&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===t)break e;for(;C.sibling===null;){if(C.return===null||C.return===t)break e;h===C&&(h=null),C=C.return}h===C&&(h=null),C.sibling.return=C.return,C=C.sibling}}break;case 19:no(e,t),Do(t),n&4&&pw(t);break;case 21:break;default:no(e,t),Do(t)}}function Do(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(wP(r)){var n=r;break e}r=r.return}throw Error(Oe(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(U0(i,""),n.flags&=-33);var o=fw(t);Sv(t,o,i);break;case 3:case 4:var a=n.stateNode.containerInfo,s=fw(t);wv(t,s,a);break;default:throw Error(Oe(161))}}catch(c){kr(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function eN(t,e,r){De=t,_P(t)}function _P(t,e,r){for(var n=(t.mode&1)!==0;De!==null;){var i=De,o=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||H1;if(!a){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Fn;s=H1;var d=Fn;if(H1=a,(Fn=c)&&!d)for(De=i;De!==null;)a=De,c=a.child,a.tag===22&&a.memoizedState!==null?vw(i):c!==null?(c.return=a,De=c):vw(i);for(;o!==null;)De=o,_P(o),o=o.sibling;De=i,H1=s,Fn=d}gw(t)}else i.subtreeFlags&8772&&o!==null?(o.return=i,De=o):gw(t)}}function gw(t){for(;De!==null;){var e=De;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Fn||tp(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Fn)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:so(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&JC(e,o,n);break;case 3:var a=e.updateQueue;if(a!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}JC(e,a,r)}break;case 5:var s=e.stateNode;if(r===null&&e.flags&4){r=s;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var d=e.alternate;if(d!==null){var h=d.memoizedState;if(h!==null){var C=h.dehydrated;C!==null&&Y0(C)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Oe(163))}Fn||e.flags&512&&Cv(e)}catch(v){kr(e,e.return,v)}}if(e===t){De=null;break}if(r=e.sibling,r!==null){r.return=e.return,De=r;break}De=e.return}}function mw(t){for(;De!==null;){var e=De;if(e===t){De=null;break}var r=e.sibling;if(r!==null){r.return=e.return,De=r;break}De=e.return}}function vw(t){for(;De!==null;){var e=De;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{tp(4,e)}catch(c){kr(e,r,c)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(c){kr(e,i,c)}}var o=e.return;try{Cv(e)}catch(c){kr(e,o,c)}break;case 5:var a=e.return;try{Cv(e)}catch(c){kr(e,a,c)}}}catch(c){kr(e,e.return,c)}if(e===t){De=null;break}var s=e.sibling;if(s!==null){s.return=e.return,De=s;break}De=e.return}}var tN=Math.ceil,C2=Ma.ReactCurrentDispatcher,Y6=Ma.ReactCurrentOwner,Ui=Ma.ReactCurrentBatchConfig,At=0,hn=null,Gr=null,yn=0,Ci=0,Cu=Ns(0),Zr=0,ah=null,Vl=0,rp=0,Z6=0,D0=null,oi=null,q6=0,$u=1/0,ya=null,w2=!1,bv=null,_s=null,G1=!1,vs=null,S2=0,j0=0,_v=null,Df=-1,jf=0;function Vn(){return At&6?Rr():Df!==-1?Df:Df=Rr()}function xs(t){return t.mode&1?At&2&&yn!==0?yn&-yn:jR.transition!==null?(jf===0&&(jf=sO()),jf):(t=Ht,t!==0||(t=window.event,t=t===void 0?16:pO(t.type)),t):1}function po(t,e,r,n){if(50<j0)throw j0=0,_v=null,Error(Oe(185));vh(t,r,n),(!(At&2)||t!==hn)&&(t===hn&&(!(At&2)&&(rp|=r),Zr===4&&fs(t,yn)),di(t,n),r===1&&At===0&&!(e.mode&1)&&($u=Rr()+500,Q2&&Fs()))}function di(t,e){var r=t.callbackNode;jM(t,e);var n=i2(t,t===hn?yn:0);if(n===0)r!==null&&OC(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&OC(r),e===1)t.tag===0?DR(yw.bind(null,t)):MO(yw.bind(null,t)),MR(function(){!(At&6)&&Fs()}),r=null;else{switch(lO(n)){case 1:r=_6;break;case 4:r=oO;break;case 16:r=n2;break;case 536870912:r=aO;break;default:r=n2}r=AP(r,xP.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function xP(t,e){if(Df=-1,jf=0,At&6)throw Error(Oe(327));var r=t.callbackNode;if(ku()&&t.callbackNode!==r)return null;var n=i2(t,t===hn?yn:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=b2(t,n);else{e=n;var i=At;At|=2;var o=OP();(hn!==t||yn!==e)&&(ya=null,$u=Rr()+500,Ml(t,e));do try{iN();break}catch(s){EP(t,s)}while(!0);F6(),C2.current=o,At=i,Gr!==null?e=0:(hn=null,yn=0,e=Zr)}if(e!==0){if(e===2&&(i=Zm(t),i!==0&&(n=i,e=xv(t,i))),e===1)throw r=ah,Ml(t,0),fs(t,n),di(t,Rr()),r;if(e===6)fs(t,n);else{if(i=t.current.alternate,!(n&30)&&!rN(i)&&(e=b2(t,n),e===2&&(o=Zm(t),o!==0&&(n=o,e=xv(t,o))),e===1))throw r=ah,Ml(t,0),fs(t,n),di(t,Rr()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(Oe(345));case 2:Pl(t,oi,ya);break;case 3:if(fs(t,n),(n&130023424)===n&&(e=q6+500-Rr(),10<e)){if(i2(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){Vn(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=iv(Pl.bind(null,t,oi,ya),e);break}Pl(t,oi,ya);break;case 4:if(fs(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var a=31-fo(n);o=1<<a,a=e[a],a>i&&(i=a),n&=~o}if(n=i,n=Rr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*tN(n/1960))-n,10<n){t.timeoutHandle=iv(Pl.bind(null,t,oi,ya),n);break}Pl(t,oi,ya);break;case 5:Pl(t,oi,ya);break;default:throw Error(Oe(329))}}}return di(t,Rr()),t.callbackNode===r?xP.bind(null,t):null}function xv(t,e){var r=D0;return t.current.memoizedState.isDehydrated&&(Ml(t,e).flags|=256),t=b2(t,e),t!==2&&(e=oi,oi=r,e!==null&&Ev(e)),t}function Ev(t){oi===null?oi=t:oi.push.apply(oi,t)}function rN(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!yo(o(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function fs(t,e){for(e&=~Z6,e&=~rp,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-fo(e),n=1<<r;t[r]=-1,e&=~n}}function yw(t){if(At&6)throw Error(Oe(327));ku();var e=i2(t,0);if(!(e&1))return di(t,Rr()),null;var r=b2(t,e);if(t.tag!==0&&r===2){var n=Zm(t);n!==0&&(e=n,r=xv(t,n))}if(r===1)throw r=ah,Ml(t,0),fs(t,e),di(t,Rr()),r;if(r===6)throw Error(Oe(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Pl(t,oi,ya),di(t,Rr()),null}function Q6(t,e){var r=At;At|=1;try{return t(e)}finally{At=r,At===0&&($u=Rr()+500,Q2&&Fs())}}function Ul(t){vs!==null&&vs.tag===0&&!(At&6)&&ku();var e=At;At|=1;var r=Ui.transition,n=Ht;try{if(Ui.transition=null,Ht=1,t)return t()}finally{Ht=n,Ui.transition=r,At=e,!(At&6)&&Fs()}}function J6(){Ci=Cu.current,lr(Cu)}function Ml(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,LR(r)),Gr!==null)for(r=Gr.return;r!==null;){var n=r;switch(M6(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&c2();break;case 3:ju(),lr(ci),lr(Dn),H6();break;case 5:B6(n);break;case 4:ju();break;case 13:lr(Sr);break;case 19:lr(Sr);break;case 10:D6(n.type._context);break;case 22:case 23:J6()}r=r.return}if(hn=t,Gr=t=Es(t.current,null),yn=Ci=e,Zr=0,ah=null,Z6=rp=Vl=0,oi=D0=null,Al!==null){for(e=0;e<Al.length;e++)if(r=Al[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,o=r.pending;if(o!==null){var a=o.next;o.next=i,n.next=a}r.pending=n}Al=null}return t}function EP(t,e){do{var r=Gr;try{if(F6(),Rf.current=y2,v2){for(var n=xr.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}v2=!1}if(Gl=0,dn=Yr=xr=null,N0=!1,nh=0,Y6.current=null,r===null||r.return===null){Zr=1,ah=e,Gr=null;break}e:{var o=t,a=r.return,s=r,c=e;if(e=yn,s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,h=s,C=h.tag;if(!(h.mode&1)&&(C===0||C===11||C===15)){var v=h.alternate;v?(h.updateQueue=v.updateQueue,h.memoizedState=v.memoizedState,h.lanes=v.lanes):(h.updateQueue=null,h.memoizedState=null)}var g=ow(a);if(g!==null){g.flags&=-257,aw(g,a,s,o,e),g.mode&1&&iw(o,d,e),e=g,c=d;var m=e.updateQueue;if(m===null){var w=new Set;w.add(c),e.updateQueue=w}else m.add(c);break e}else{if(!(e&1)){iw(o,d,e),e8();break e}c=Error(Oe(426))}}else if(hr&&s.mode&1){var x=ow(a);if(x!==null){!(x.flags&65536)&&(x.flags|=256),aw(x,a,s,o,e),R6(zu(c,s));break e}}o=c=zu(c,s),Zr!==4&&(Zr=2),D0===null?D0=[o]:D0.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var b=lP(o,c,e);QC(o,b);break e;case 1:s=c;var O=o.type,f=o.stateNode;if(!(o.flags&128)&&(typeof O.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(_s===null||!_s.has(f)))){o.flags|=65536,e&=-e,o.lanes|=e;var S=cP(o,s,e);QC(o,S);break e}}o=o.return}while(o!==null)}kP(r)}catch(E){e=E,Gr===r&&r!==null&&(Gr=r=r.return);continue}break}while(!0)}function OP(){var t=C2.current;return C2.current=y2,t===null?y2:t}function e8(){(Zr===0||Zr===3||Zr===2)&&(Zr=4),hn===null||!(Vl&268435455)&&!(rp&268435455)||fs(hn,yn)}function b2(t,e){var r=At;At|=2;var n=OP();(hn!==t||yn!==e)&&(ya=null,Ml(t,e));do try{nN();break}catch(i){EP(t,i)}while(!0);if(F6(),At=r,C2.current=n,Gr!==null)throw Error(Oe(261));return hn=null,yn=0,Zr}function nN(){for(;Gr!==null;)PP(Gr)}function iN(){for(;Gr!==null&&!TM();)PP(Gr)}function PP(t){var e=IP(t.alternate,t,Ci);t.memoizedProps=t.pendingProps,e===null?kP(t):Gr=e,Y6.current=null}function kP(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=qR(r,e),r!==null){r.flags&=32767,Gr=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Zr=6,Gr=null;return}}else if(r=ZR(r,e,Ci),r!==null){Gr=r;return}if(e=e.sibling,e!==null){Gr=e;return}Gr=e=t}while(e!==null);Zr===0&&(Zr=5)}function Pl(t,e,r){var n=Ht,i=Ui.transition;try{Ui.transition=null,Ht=1,oN(t,e,r,n)}finally{Ui.transition=i,Ht=n}return null}function oN(t,e,r,n){do ku();while(vs!==null);if(At&6)throw Error(Oe(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(Oe(177));t.callbackNode=null,t.callbackPriority=0;var o=r.lanes|r.childLanes;if(zM(t,o),t===hn&&(Gr=hn=null,yn=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||G1||(G1=!0,AP(n2,function(){return ku(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=Ui.transition,Ui.transition=null;var a=Ht;Ht=1;var s=At;At|=4,Y6.current=null,JR(t,r),bP(r,t),ER(rv),o2=!!tv,rv=tv=null,t.current=r,eN(r),IM(),At=s,Ht=a,Ui.transition=o}else t.current=r;if(G1&&(G1=!1,vs=t,S2=i),o=t.pendingLanes,o===0&&(_s=null),MM(r.stateNode),di(t,Rr()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(w2)throw w2=!1,t=bv,bv=null,t;return S2&1&&t.tag!==0&&ku(),o=t.pendingLanes,o&1?t===_v?j0++:(j0=0,_v=t):j0=0,Fs(),null}function ku(){if(vs!==null){var t=lO(S2),e=Ui.transition,r=Ht;try{if(Ui.transition=null,Ht=16>t?16:t,vs===null)var n=!1;else{if(t=vs,vs=null,S2=0,At&6)throw Error(Oe(331));var i=At;for(At|=4,De=t.current;De!==null;){var o=De,a=o.child;if(De.flags&16){var s=o.deletions;if(s!==null){for(var c=0;c<s.length;c++){var d=s[c];for(De=d;De!==null;){var h=De;switch(h.tag){case 0:case 11:case 15:F0(8,h,o)}var C=h.child;if(C!==null)C.return=h,De=C;else for(;De!==null;){h=De;var v=h.sibling,g=h.return;if(CP(h),h===d){De=null;break}if(v!==null){v.return=g,De=v;break}De=g}}}var m=o.alternate;if(m!==null){var w=m.child;if(w!==null){m.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}De=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,De=a;else e:for(;De!==null;){if(o=De,o.flags&2048)switch(o.tag){case 0:case 11:case 15:F0(9,o,o.return)}var b=o.sibling;if(b!==null){b.return=o.return,De=b;break e}De=o.return}}var O=t.current;for(De=O;De!==null;){a=De;var f=a.child;if(a.subtreeFlags&2064&&f!==null)f.return=a,De=f;else e:for(a=O;De!==null;){if(s=De,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:tp(9,s)}}catch(E){kr(s,s.return,E)}if(s===a){De=null;break e}var S=s.sibling;if(S!==null){S.return=s.return,De=S;break e}De=s.return}}if(At=i,Fs(),Uo&&typeof Uo.onPostCommitFiberRoot=="function")try{Uo.onPostCommitFiberRoot(X2,t)}catch{}n=!0}return n}finally{Ht=r,Ui.transition=e}}return!1}function Cw(t,e,r){e=zu(r,e),e=lP(t,e,1),t=bs(t,e,1),e=Vn(),t!==null&&(vh(t,1,e),di(t,e))}function kr(t,e,r){if(t.tag===3)Cw(t,t,r);else for(;e!==null;){if(e.tag===3){Cw(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(_s===null||!_s.has(n))){t=zu(r,t),t=cP(e,t,1),e=bs(e,t,1),t=Vn(),e!==null&&(vh(e,1,t),di(e,t));break}}e=e.return}}function aN(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=Vn(),t.pingedLanes|=t.suspendedLanes&r,hn===t&&(yn&r)===r&&(Zr===4||Zr===3&&(yn&130023424)===yn&&500>Rr()-q6?Ml(t,0):Z6|=r),di(t,e)}function TP(t,e){e===0&&(t.mode&1?(e=M1,M1<<=1,!(M1&130023424)&&(M1=4194304)):e=1);var r=Vn();t=Ia(t,e),t!==null&&(vh(t,e,r),di(t,r))}function sN(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),TP(t,r)}function lN(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(Oe(314))}n!==null&&n.delete(e),TP(t,r)}var IP;IP=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||ci.current)si=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return si=!1,YR(t,e,r);si=!!(t.flags&131072)}else si=!1,hr&&e.flags&1048576&&RO(e,h2,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Ff(t,e),t=e.pendingProps;var i=Nu(e,Dn.current);Pu(e,r),i=V6(null,e,n,t,i,r);var o=U6();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ui(n)?(o=!0,u2(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,z6(e),i.updater=ep,e.stateNode=i,i._reactInternals=e,dv(e,n,t,r),e=pv(null,e,n,!0,o,r)):(e.tag=0,hr&&o&&L6(e),Gn(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Ff(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=uN(n),t=so(n,t),i){case 0:e=fv(null,e,n,t,r);break e;case 1:e=cw(null,e,n,t,r);break e;case 11:e=sw(null,e,n,t,r);break e;case 14:e=lw(null,e,n,so(n.type,t),r);break e}throw Error(Oe(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:so(n,i),fv(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:so(n,i),cw(t,e,n,i,r);case 3:e:{if(fP(e),t===null)throw Error(Oe(387));n=e.pendingProps,o=e.memoizedState,i=o.element,$O(t,e),g2(e,n,null,r);var a=e.memoizedState;if(n=a.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=zu(Error(Oe(423)),e),e=uw(t,e,n,r,i);break e}else if(n!==i){i=zu(Error(Oe(424)),e),e=uw(t,e,n,r,i);break e}else for(Si=Ss(e.stateNode.containerInfo.firstChild),bi=e,hr=!0,co=null,r=jO(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Fu(),n===i){e=Aa(t,e,r);break e}Gn(t,e,n,r)}e=e.child}return e;case 5:return BO(e),t===null&&lv(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,a=i.children,nv(n,i)?a=null:o!==null&&nv(n,o)&&(e.flags|=32),hP(t,e),Gn(t,e,a,r),e.child;case 6:return t===null&&lv(e),null;case 13:return pP(t,e,r);case 4:return $6(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Du(e,null,n,r):Gn(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:so(n,i),sw(t,e,n,i,r);case 7:return Gn(t,e,e.pendingProps,r),e.child;case 8:return Gn(t,e,e.pendingProps.children,r),e.child;case 12:return Gn(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=i.value,ir(f2,n._currentValue),n._currentValue=a,o!==null)if(yo(o.value,a)){if(o.children===i.children&&!ci.current){e=Aa(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var c=s.firstContext;c!==null;){if(c.context===n){if(o.tag===1){c=Ea(-1,r&-r),c.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?c.next=c:(c.next=h.next,h.next=c),d.pending=c}}o.lanes|=r,c=o.alternate,c!==null&&(c.lanes|=r),cv(o.return,r,e),s.lanes|=r;break}c=c.next}}else if(o.tag===10)a=o.type===e.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(Oe(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),cv(a,r,e),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Gn(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,Pu(e,r),i=Xi(i),n=n(i),e.flags|=1,Gn(t,e,n,r),e.child;case 14:return n=e.type,i=so(n,e.pendingProps),i=so(n.type,i),lw(t,e,n,i,r);case 15:return uP(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:so(n,i),Ff(t,e),e.tag=1,ui(n)?(t=!0,u2(e)):t=!1,Pu(e,r),sP(e,n,i),dv(e,n,i,r),pv(null,e,n,!0,t,r);case 19:return gP(t,e,r);case 22:return dP(t,e,r)}throw Error(Oe(156,e.tag))};function AP(t,e){return iO(t,e)}function cN(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vi(t,e,r,n){return new cN(t,e,r,n)}function t8(t){return t=t.prototype,!(!t||!t.isReactComponent)}function uN(t){if(typeof t=="function")return t8(t)?1:0;if(t!=null){if(t=t.$$typeof,t===w6)return 11;if(t===S6)return 14}return 2}function Es(t,e){var r=t.alternate;return r===null?(r=Vi(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function zf(t,e,r,n,i,o){var a=2;if(n=t,typeof t=="function")t8(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case cu:return Rl(r.children,i,o,e);case C6:a=8,i|=8;break;case Nm:return t=Vi(12,r,e,i|2),t.elementType=Nm,t.lanes=o,t;case Fm:return t=Vi(13,r,e,i),t.elementType=Fm,t.lanes=o,t;case Dm:return t=Vi(19,r,e,i),t.elementType=Dm,t.lanes=o,t;case BE:return np(r,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case zE:a=10;break e;case $E:a=9;break e;case w6:a=11;break e;case S6:a=14;break e;case us:a=16,n=null;break e}throw Error(Oe(130,t==null?t:typeof t,""))}return e=Vi(a,r,e,i),e.elementType=t,e.type=n,e.lanes=o,e}function Rl(t,e,r,n){return t=Vi(7,t,n,e),t.lanes=r,t}function np(t,e,r,n){return t=Vi(22,t,n,e),t.elementType=BE,t.lanes=r,t.stateNode={isHidden:!1},t}function P4(t,e,r){return t=Vi(6,t,null,e),t.lanes=r,t}function k4(t,e,r){return e=Vi(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function dN(t,e,r,n,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=l4(0),this.expirationTimes=l4(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=l4(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function r8(t,e,r,n,i,o,a,s,c){return t=new dN(t,e,r,s,c),e===1?(e=1,o===!0&&(e|=8)):e=0,o=Vi(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},z6(o),t}function hN(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:lu,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function LP(t){if(!t)return Ts;t=t._reactInternals;e:{if(Jl(t)!==t||t.tag!==1)throw Error(Oe(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(ui(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Oe(171))}if(t.tag===1){var r=t.type;if(ui(r))return LO(t,r,e)}return e}function MP(t,e,r,n,i,o,a,s,c){return t=r8(r,n,!0,t,i,o,a,s,c),t.context=LP(null),r=t.current,n=Vn(),i=xs(r),o=Ea(n,i),o.callback=e??null,bs(r,o,i),t.current.lanes=i,vh(t,i,n),di(t,n),t}function ip(t,e,r,n){var i=e.current,o=Vn(),a=xs(i);return r=LP(r),e.context===null?e.context=r:e.pendingContext=r,e=Ea(o,a),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=bs(i,e,a),t!==null&&(po(t,i,a,o),Mf(t,i,a)),a}function _2(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function ww(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function n8(t,e){ww(t,e),(t=t.alternate)&&ww(t,e)}function fN(){return null}var RP=typeof reportError=="function"?reportError:function(t){console.error(t)};function i8(t){this._internalRoot=t}op.prototype.render=i8.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(Oe(409));ip(t,e,null,null)};op.prototype.unmount=i8.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ul(function(){ip(null,t,null,null)}),e[Ta]=null}};function op(t){this._internalRoot=t}op.prototype.unstable_scheduleHydration=function(t){if(t){var e=dO();t={blockedOn:null,target:t,priority:e};for(var r=0;r<hs.length&&e!==0&&e<hs[r].priority;r++);hs.splice(r,0,t),r===0&&fO(t)}};function o8(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function ap(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Sw(){}function pN(t,e,r,n,i){if(i){if(typeof n=="function"){var o=n;n=function(){var d=_2(a);o.call(d)}}var a=MP(e,n,t,0,null,!1,!1,"",Sw);return t._reactRootContainer=a,t[Ta]=a.current,Q0(t.nodeType===8?t.parentNode:t),Ul(),a}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var d=_2(c);s.call(d)}}var c=r8(t,0,!1,null,null,!1,!1,"",Sw);return t._reactRootContainer=c,t[Ta]=c.current,Q0(t.nodeType===8?t.parentNode:t),Ul(function(){ip(e,c,r,n)}),c}function sp(t,e,r,n,i){var o=r._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var c=_2(a);s.call(c)}}ip(e,a,t,i)}else a=pN(r,e,t,i,n);return _2(a)}cO=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=x0(e.pendingLanes);r!==0&&(x6(e,r|1),di(e,Rr()),!(At&6)&&($u=Rr()+500,Fs()))}break;case 13:Ul(function(){var n=Ia(t,1);if(n!==null){var i=Vn();po(n,t,1,i)}}),n8(t,1)}};E6=function(t){if(t.tag===13){var e=Ia(t,134217728);if(e!==null){var r=Vn();po(e,t,134217728,r)}n8(t,134217728)}};uO=function(t){if(t.tag===13){var e=xs(t),r=Ia(t,e);if(r!==null){var n=Vn();po(r,t,e,n)}n8(t,e)}};dO=function(){return Ht};hO=function(t,e){var r=Ht;try{return Ht=t,e()}finally{Ht=r}};Xm=function(t,e,r){switch(e){case"input":if($m(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=q2(n);if(!i)throw Error(Oe(90));GE(n),$m(n,i)}}}break;case"textarea":UE(t,r);break;case"select":e=r.value,e!=null&&_u(t,!!r.multiple,e,!1)}};QE=Q6;JE=Ul;var gN={usingClientEntryPoint:!1,Events:[Ch,fu,q2,ZE,qE,Q6]},i0={findFiberByHostInstance:Il,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},mN={bundleType:i0.bundleType,version:i0.version,rendererPackageName:i0.rendererPackageName,rendererConfig:i0.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ma.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=rO(t),t===null?null:t.stateNode},findFiberByHostInstance:i0.findFiberByHostInstance||fN,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 V1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!V1.isDisabled&&V1.supportsFiber)try{X2=V1.inject(mN),Uo=V1}catch{}}Oi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gN;Oi.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!o8(e))throw Error(Oe(200));return hN(t,e,null,r)};Oi.createRoot=function(t,e){if(!o8(t))throw Error(Oe(299));var r=!1,n="",i=RP;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=r8(t,1,!1,null,null,r,!1,n,i),t[Ta]=e.current,Q0(t.nodeType===8?t.parentNode:t),new i8(e)};Oi.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(Oe(188)):(t=Object.keys(t).join(","),Error(Oe(268,t)));return t=rO(e),t=t===null?null:t.stateNode,t};Oi.flushSync=function(t){return Ul(t)};Oi.hydrate=function(t,e,r){if(!ap(e))throw Error(Oe(200));return sp(null,t,e,!0,r)};Oi.hydrateRoot=function(t,e,r){if(!o8(t))throw Error(Oe(405));var n=r!=null&&r.hydratedSources||null,i=!1,o="",a=RP;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),e=MP(e,null,t,1,r??null,i,!1,o,a),t[Ta]=e.current,Q0(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new op(e)};Oi.render=function(t,e,r){if(!ap(e))throw Error(Oe(200));return sp(null,t,e,!1,r)};Oi.unmountComponentAtNode=function(t){if(!ap(t))throw Error(Oe(40));return t._reactRootContainer?(Ul(function(){sp(null,null,t,!1,function(){t._reactRootContainer=null,t[Ta]=null})}),!0):!1};Oi.unstable_batchedUpdates=Q6;Oi.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!ap(r))throw Error(Oe(200));if(t==null||t._reactInternals===void 0)throw Error(Oe(38));return sp(t,e,r,!1,n)};Oi.version="18.3.1-next-f1338f8080-20240426";function NP(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(NP)}catch(t){console.error(t)}}NP(),NE.exports=Oi;var Sh=NE.exports,Ov,bw=Sh;Ov=bw.createRoot,bw.hydrateRoot;function vN(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function ve(t,e){if(t==null)return{};var r,n,i=vN(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}var FP={exports:{}},yN="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",CN=yN,wN=CN;function DP(){}function jP(){}jP.resetWarningCache=DP;var SN=function(){function t(n,i,o,a,s,c){if(c!==wN){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}t.isRequired=t;function e(){return t}var r={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:jP,resetWarningCache:DP};return r.PropTypes=r,r};FP.exports=SN();var bN=FP.exports;const j=ql(bN);var zP={exports:{}},Qt={};/**
* @license React
* react-is.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var a8=Symbol.for("react.transitional.element"),s8=Symbol.for("react.portal"),lp=Symbol.for("react.fragment"),cp=Symbol.for("react.strict_mode"),up=Symbol.for("react.profiler"),dp=Symbol.for("react.consumer"),hp=Symbol.for("react.context"),fp=Symbol.for("react.forward_ref"),pp=Symbol.for("react.suspense"),gp=Symbol.for("react.suspense_list"),mp=Symbol.for("react.memo"),vp=Symbol.for("react.lazy"),_N=Symbol.for("react.view_transition"),xN=Symbol.for("react.client.reference");function qi(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case a8:switch(t=t.type,t){case lp:case up:case cp:case pp:case gp:case _N:return t;default:switch(t=t&&t.$$typeof,t){case hp:case fp:case vp:case mp:return t;case dp:return t;default:return e}}case s8:return e}}}Qt.ContextConsumer=dp;Qt.ContextProvider=hp;Qt.Element=a8;Qt.ForwardRef=fp;Qt.Fragment=lp;Qt.Lazy=vp;Qt.Memo=mp;Qt.Portal=s8;Qt.Profiler=up;Qt.StrictMode=cp;Qt.Suspense=pp;Qt.SuspenseList=gp;Qt.isContextConsumer=function(t){return qi(t)===dp};Qt.isContextProvider=function(t){return qi(t)===hp};Qt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===a8};Qt.isForwardRef=function(t){return qi(t)===fp};Qt.isFragment=function(t){return qi(t)===lp};Qt.isLazy=function(t){return qi(t)===vp};Qt.isMemo=function(t){return qi(t)===mp};Qt.isPortal=function(t){return qi(t)===s8};Qt.isProfiler=function(t){return qi(t)===up};Qt.isStrictMode=function(t){return qi(t)===cp};Qt.isSuspense=function(t){return qi(t)===pp};Qt.isSuspenseList=function(t){return qi(t)===gp};Qt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===lp||t===up||t===cp||t===pp||t===gp||typeof t=="object"&&t!==null&&(t.$$typeof===vp||t.$$typeof===mp||t.$$typeof===hp||t.$$typeof===dp||t.$$typeof===fp||t.$$typeof===xN||t.getModuleId!==void 0)};Qt.typeOf=qi;zP.exports=Qt;var $P=zP.exports;function EN(t){function e(J,Q,te,we,U){for(var F=0,$=0,ie=0,pe=0,ce,le,xe=0,Ne=0,_e,He=_e=ce=0,Ee=0,Ve=0,We=0,Me=0,gt=te.length,St=gt-1,qe,je="",Ke="",bt="",Lt="",tr;Ee<gt;){if(le=te.charCodeAt(Ee),Ee===St&&$+pe+ie+F!==0&&($!==0&&(le=$===47?10:47),pe=ie=F=0,gt++,St++),$+pe+ie+F===0){if(Ee===St&&(0<Ve&&(je=je.replace(v,"")),0<je.trim().length)){switch(le){case 32:case 9:case 59:case 13:case 10:break;default:je+=te.charAt(Ee)}le=59}switch(le){case 123:for(je=je.trim(),ce=je.charCodeAt(0),_e=1,Me=++Ee;Ee<gt;){switch(le=te.charCodeAt(Ee)){case 123:_e++;break;case 125:_e--;break;case 47:switch(le=te.charCodeAt(Ee+1)){case 42:case 47:e:{for(He=Ee+1;He<St;++He)switch(te.charCodeAt(He)){case 47:if(le===42&&te.charCodeAt(He-1)===42&&Ee+2!==He){Ee=He+1;break e}break;case 10:if(le===47){Ee=He+1;break e}}Ee=He}}break;case 91:le++;case 40:le++;case 34:case 39:for(;Ee++<St&&te.charCodeAt(Ee)!==le;);}if(_e===0)break;Ee++}switch(_e=te.substring(Me,Ee),ce===0&&(ce=(je=je.replace(C,"").trim()).charCodeAt(0)),ce){case 64:switch(0<Ve&&(je=je.replace(v,"")),le=je.charCodeAt(1),le){case 100:case 109:case 115:case 45:Ve=Q;break;default:Ve=q}if(_e=e(Q,Ve,_e,le,U+1),Me=_e.length,0<K&&(Ve=r(q,je,We),tr=s(3,_e,Ve,Q,B,z,Me,le,U,we),je=Ve.join(""),tr!==void 0&&(Me=(_e=tr.trim()).length)===0&&(le=0,_e="")),0<Me)switch(le){case 115:je=je.replace(I,a);case 100:case 109:case 45:_e=je+"{"+_e+"}";break;case 107:je=je.replace(O,"$1 $2"),_e=je+"{"+_e+"}",_e=W===1||W===2&&o("@"+_e,3)?"@-webkit-"+_e+"@"+_e:"@"+_e;break;default:_e=je+_e,we===112&&(_e=(Ke+=_e,""))}else _e="";break;default:_e=e(Q,r(Q,je,We),_e,we,U+1)}bt+=_e,_e=We=Ve=He=ce=0,je="",le=te.charCodeAt(++Ee);break;case 125:case 59:if(je=(0<Ve?je.replace(v,""):je).trim(),1<(Me=je.length))switch(He===0&&(ce=je.charCodeAt(0),ce===45||96<ce&&123>ce)&&(Me=(je=je.replace(" ",":")).length),0<K&&(tr=s(1,je,Q,J,B,z,Ke.length,we,U,we))!==void 0&&(Me=(je=tr.trim()).length)===0&&(je="\0\0"),ce=je.charCodeAt(0),le=je.charCodeAt(1),ce){case 0:break;case 64:if(le===105||le===99){Lt+=je+te.charAt(Ee);break}default:je.charCodeAt(Me-1)!==58&&(Ke+=i(je,ce,le,je.charCodeAt(2)))}We=Ve=He=ce=0,je="",le=te.charCodeAt(++Ee)}}switch(le){case 13:case 10:$===47?$=0:1+ce===0&&we!==107&&0<je.length&&(Ve=1,je+="\0"),0<K*ne&&s(0,je,Q,J,B,z,Ke.length,we,U,we),z=1,B++;break;case 59:case 125:if($+pe+ie+F===0){z++;break}default:switch(z++,qe=te.charAt(Ee),le){case 9:case 32:if(pe+F+$===0)switch(xe){case 44:case 58:case 9:case 32:qe="";break;default:le!==32&&(qe=" ")}break;case 0:qe="\\0";break;case 12:qe="\\f";break;case 11:qe="\\v";break;case 38:pe+$+F===0&&(Ve=We=1,qe="\f"+qe);break;case 108:if(pe+$+F+Y===0&&0<He)switch(Ee-He){case 2:xe===112&&te.charCodeAt(Ee-3)===58&&(Y=xe);case 8:Ne===111&&(Y=Ne)}break;case 58:pe+$+F===0&&(He=Ee);break;case 44:$+ie+pe+F===0&&(Ve=1,qe+="\r");break;case 34:case 39:$===0&&(pe=pe===le?0:pe===0?le:pe);break;case 91:pe+$+ie===0&&F++;break;case 93:pe+$+ie===0&&F--;break;case 41:pe+$+F===0&&ie--;break;case 40:if(pe+$+F===0){if(ce===0)switch(2*xe+3*Ne){case 533:break;default:ce=1}ie++}break;case 64:$+ie+pe+F+He+_e===0&&(_e=1);break;case 42:case 47:if(!(0<pe+F+ie))switch($){case 0:switch(2*le+3*te.charCodeAt(Ee+1)){case 235:$=47;break;case 220:Me=Ee,$=42}break;case 42:le===47&&xe===42&&Me+2!==Ee&&(te.charCodeAt(Me+2)===33&&(Ke+=te.substring(Me,Ee+1)),qe="",$=0)}}$===0&&(je+=qe)}Ne=xe,xe=le,Ee++}if(Me=Ke.length,0<Me){if(Ve=Q,0<K&&(tr=s(2,Ke,Ve,J,B,z,Me,we,U,we),tr!==void 0&&(Ke=tr).length===0))return Lt+Ke+bt;if(Ke=Ve.join(",")+"{"+Ke+"}",W*Y!==0){switch(W!==2||o(Ke,2)||(Y=0),Y){case 111:Ke=Ke.replace(S,":-moz-$1")+Ke;break;case 112:Ke=Ke.replace(f,"::-webkit-input-$1")+Ke.replace(f,"::-moz-$1")+Ke.replace(f,":-ms-input-$1")+Ke}Y=0}}return Lt+Ke+bt}function r(J,Q,te){var we=Q.trim().split(x);Q=we;var U=we.length,F=J.length;switch(F){case 0:case 1:var $=0;for(J=F===0?"":J[0]+" ";$<U;++$)Q[$]=n(J,Q[$],te).trim();break;default:var ie=$=0;for(Q=[];$<U;++$)for(var pe=0;pe<F;++pe)Q[ie++]=n(J[pe]+" ",we[$],te).trim()}return Q}function n(J,Q,te){var we=Q.charCodeAt(0);switch(33>we&&(we=(Q=Q.trim()).charCodeAt(0)),we){case 38:return Q.replace(b,"$1"+J.trim());case 58:return J.trim()+Q.replace(b,"$1"+J.trim());default:if(0<1*te&&0<Q.indexOf("\f"))return Q.replace(b,(J.charCodeAt(0)===58?"":"$1")+J.trim())}return J+Q}function i(J,Q,te,we){var U=J+";",F=2*Q+3*te+4*we;if(F===944){J=U.indexOf(":",9)+1;var $=U.substring(J,U.length-1).trim();return $=U.substring(0,J).trim()+$+";",W===1||W===2&&o($,1)?"-webkit-"+$+$:$}if(W===0||W===2&&!o(U,1))return U;switch(F){case 1015:return U.charCodeAt(10)===97?"-webkit-"+U+U:U;case 951:return U.charCodeAt(3)===116?"-webkit-"+U+U:U;case 963:return U.charCodeAt(5)===110?"-webkit-"+U+U:U;case 1009:if(U.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+U+U;case 978:return"-webkit-"+U+"-moz-"+U+U;case 1019:case 983:return"-webkit-"+U+"-moz-"+U+"-ms-"+U+U;case 883:if(U.charCodeAt(8)===45)return"-webkit-"+U+U;if(0<U.indexOf("image-set(",11))return U.replace(D,"$1-webkit-$2")+U;break;case 932:if(U.charCodeAt(4)===45)switch(U.charCodeAt(5)){case 103:return"-webkit-box-"+U.replace("-grow","")+"-webkit-"+U+"-ms-"+U.replace("grow","positive")+U;case 115:return"-webkit-"+U+"-ms-"+U.replace("shrink","negative")+U;case 98:return"-webkit-"+U+"-ms-"+U.replace("basis","preferred-size")+U}return"-webkit-"+U+"-ms-"+U+U;case 964:return"-webkit-"+U+"-ms-flex-"+U+U;case 1023:if(U.charCodeAt(8)!==99)break;return $=U.substring(U.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+$+"-webkit-"+U+"-ms-flex-pack"+$+U;case 1005:return m.test(U)?U.replace(g,":-webkit-")+U.replace(g,":-moz-")+U:U;case 1e3:switch($=U.substring(13).trim(),Q=$.indexOf("-")+1,$.charCodeAt(0)+$.charCodeAt(Q)){case 226:$=U.replace(E,"tb");break;case 232:$=U.replace(E,"tb-rl");break;case 220:$=U.replace(E,"lr");break;default:return U}return"-webkit-"+U+"-ms-"+$+U;case 1017:if(U.indexOf("sticky",9)===-1)break;case 975:switch(Q=(U=J).length-10,$=(U.charCodeAt(Q)===33?U.substring(0,Q):U).substring(J.indexOf(":",7)+1).trim(),F=$.charCodeAt(0)+($.charCodeAt(7)|0)){case 203:if(111>$.charCodeAt(8))break;case 115:U=U.replace($,"-webkit-"+$)+";"+U;break;case 207:case 102:U=U.replace($,"-webkit-"+(102<F?"inline-":"")+"box")+";"+U.replace($,"-webkit-"+$)+";"+U.replace($,"-ms-"+$+"box")+";"+U}return U+";";case 938:if(U.charCodeAt(5)===45)switch(U.charCodeAt(6)){case 105:return $=U.replace("-items",""),"-webkit-"+U+"-webkit-box-"+$+"-ms-flex-"+$+U;case 115:return"-webkit-"+U+"-ms-flex-item-"+U.replace(k,"")+U;default:return"-webkit-"+U+"-ms-flex-line-pack"+U.replace("align-content","").replace(k,"")+U}break;case 973:case 989:if(U.charCodeAt(3)!==45||U.charCodeAt(4)===122)break;case 931:case 953:if(T.test(J)===!0)return($=J.substring(J.indexOf(":")+1)).charCodeAt(0)===115?i(J.replace("stretch","fill-available"),Q,te,we).replace(":fill-available",":stretch"):U.replace($,"-webkit-"+$)+U.replace($,"-moz-"+$.replace("fill-",""))+U;break;case 962:if(U="-webkit-"+U+(U.charCodeAt(5)===102?"-ms-"+U:"")+U,te+we===211&&U.charCodeAt(13)===105&&0<U.indexOf("transform",10))return U.substring(0,U.indexOf(";",27)+1).replace(w,"$1-webkit-$2")+U}return U}function o(J,Q){var te=J.indexOf(Q===1?":":"{"),we=J.substring(0,Q!==3?te:10);return te=J.substring(te+1,J.length-1),ue(Q!==2?we:we.replace(N,"$1"),te,Q)}function a(J,Q){var te=i(Q,Q.charCodeAt(0),Q.charCodeAt(1),Q.charCodeAt(2));return te!==Q+";"?te.replace(R," or ($1)").substring(4):"("+Q+")"}function s(J,Q,te,we,U,F,$,ie,pe,ce){for(var le=0,xe=Q,Ne;le<K;++le)switch(Ne=ee[le].call(h,J,xe,te,we,U,F,$,ie,pe,ce)){case void 0:case!1:case!0:case null:break;default:xe=Ne}if(xe!==Q)return xe}function c(J){switch(J){case void 0:case null:K=ee.length=0;break;default:if(typeof J=="function")ee[K++]=J;else if(typeof J=="object")for(var Q=0,te=J.length;Q<te;++Q)c(J[Q]);else ne=!!J|0}return c}function d(J){return J=J.prefix,J!==void 0&&(ue=null,J?typeof J!="function"?W=1:(W=2,ue=J):W=0),d}function h(J,Q){var te=J;if(33>te.charCodeAt(0)&&(te=te.trim()),ae=te,te=[ae],0<K){var we=s(-1,Q,te,te,B,z,0,0,0,0);we!==void 0&&typeof we=="string"&&(Q=we)}var U=e(q,te,Q,0,0);return 0<K&&(we=s(-2,U,te,te,B,z,U.length,0,0,0),we!==void 0&&(U=we)),ae="",Y=0,z=B=1,U}var C=/^\0+/g,v=/[\0\r\f]/g,g=/: */g,m=/zoo|gra/,w=/([,: ])(transform)/g,x=/,\r+?/g,b=/([\t\r\n ])*\f?&/g,O=/@(k\w+)\s*(\S*)\s*/,f=/::(place)/g,S=/:(read-only)/g,E=/[svh]\w+-[tblr]{2}/,I=/\(\s*(.*)\s*\)/g,R=/([\s\S]*?);/g,k=/-self|flex-/g,N=/[^]*?(:[rp][el]a[\w-]+)[^]*/,T=/stretch|:\s*\w+\-(?:conte|avail)/,D=/([^-])(image-set\()/,z=1,B=1,Y=0,W=1,q=[],ee=[],K=0,ue=null,ne=0,ae="";return h.use=c,h.set=d,t!==void 0&&d(t),h}var ON={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function PN(t){var e=Object.create(null);return function(r){return e[r]===void 0&&(e[r]=t(r)),e[r]}}var kN=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,_w=PN(function(t){return kN.test(t)||t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)<91}),BP={exports:{}},Gt={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var fn=typeof Symbol=="function"&&Symbol.for,l8=fn?Symbol.for("react.element"):60103,c8=fn?Symbol.for("react.portal"):60106,yp=fn?Symbol.for("react.fragment"):60107,Cp=fn?Symbol.for("react.strict_mode"):60108,wp=fn?Symbol.for("react.profiler"):60114,Sp=fn?Symbol.for("react.provider"):60109,bp=fn?Symbol.for("react.context"):60110,u8=fn?Symbol.for("react.async_mode"):60111,_p=fn?Symbol.for("react.concurrent_mode"):60111,xp=fn?Symbol.for("react.forward_ref"):60112,Ep=fn?Symbol.for("react.suspense"):60113,TN=fn?Symbol.for("react.suspense_list"):60120,Op=fn?Symbol.for("react.memo"):60115,Pp=fn?Symbol.for("react.lazy"):60116,IN=fn?Symbol.for("react.block"):60121,AN=fn?Symbol.for("react.fundamental"):60117,LN=fn?Symbol.for("react.responder"):60118,MN=fn?Symbol.for("react.scope"):60119;function ki(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case l8:switch(t=t.type,t){case u8:case _p:case yp:case wp:case Cp:case Ep:return t;default:switch(t=t&&t.$$typeof,t){case bp:case xp:case Pp:case Op:case Sp:return t;default:return e}}case c8:return e}}}function HP(t){return ki(t)===_p}Gt.AsyncMode=u8;Gt.ConcurrentMode=_p;Gt.ContextConsumer=bp;Gt.ContextProvider=Sp;Gt.Element=l8;Gt.ForwardRef=xp;Gt.Fragment=yp;Gt.Lazy=Pp;Gt.Memo=Op;Gt.Portal=c8;Gt.Profiler=wp;Gt.StrictMode=Cp;Gt.Suspense=Ep;Gt.isAsyncMode=function(t){return HP(t)||ki(t)===u8};Gt.isConcurrentMode=HP;Gt.isContextConsumer=function(t){return ki(t)===bp};Gt.isContextProvider=function(t){return ki(t)===Sp};Gt.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===l8};Gt.isForwardRef=function(t){return ki(t)===xp};Gt.isFragment=function(t){return ki(t)===yp};Gt.isLazy=function(t){return ki(t)===Pp};Gt.isMemo=function(t){return ki(t)===Op};Gt.isPortal=function(t){return ki(t)===c8};Gt.isProfiler=function(t){return ki(t)===wp};Gt.isStrictMode=function(t){return ki(t)===Cp};Gt.isSuspense=function(t){return ki(t)===Ep};Gt.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===yp||t===_p||t===wp||t===Cp||t===Ep||t===TN||typeof t=="object"&&t!==null&&(t.$$typeof===Pp||t.$$typeof===Op||t.$$typeof===Sp||t.$$typeof===bp||t.$$typeof===xp||t.$$typeof===AN||t.$$typeof===LN||t.$$typeof===MN||t.$$typeof===IN)};Gt.typeOf=ki;BP.exports=Gt;var RN=BP.exports,d8=RN,NN={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},FN={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},DN={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},GP={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},h8={};h8[d8.ForwardRef]=DN;h8[d8.Memo]=GP;function xw(t){return d8.isMemo(t)?GP:h8[t.$$typeof]||NN}var jN=Object.defineProperty,zN=Object.getOwnPropertyNames,Ew=Object.getOwnPropertySymbols,$N=Object.getOwnPropertyDescriptor,BN=Object.getPrototypeOf,Ow=Object.prototype;function VP(t,e,r){if(typeof e!="string"){if(Ow){var n=BN(e);n&&n!==Ow&&VP(t,n,r)}var i=zN(e);Ew&&(i=i.concat(Ew(e)));for(var o=xw(t),a=xw(e),s=0;s<i.length;++s){var c=i[s];if(!FN[c]&&!(r&&r[c])&&!(a&&a[c])&&!(o&&o[c])){var d=$N(e,c);try{jN(t,c,d)}catch{}}}}return t}var HN=VP;const GN=ql(HN);var $i={};function ho(){return(ho=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}var Pw=function(t,e){for(var r=[t[0]],n=0,i=e.length;n<i;n+=1)r.push(e[n],t[n+1]);return r},Pv=function(t){return t!==null&&typeof t=="object"&&(t.toString?t.toString():Object.prototype.toString.call(t))==="[object Object]"&&!$P.typeOf(t)},x2=Object.freeze([]),Os=Object.freeze({});function Bu(t){return typeof t=="function"}function kw(t){return t.displayName||t.name||"Component"}function f8(t){return t&&typeof t.styledComponentId=="string"}var Hu=typeof process<"u"&&$i!==void 0&&($i.REACT_APP_SC_ATTR||$i.SC_ATTR)||"data-styled",p8=typeof window<"u"&&"HTMLElement"in window,VN=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&$i!==void 0&&($i.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&$i.REACT_APP_SC_DISABLE_SPEEDY!==""?$i.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&$i.REACT_APP_SC_DISABLE_SPEEDY:$i.SC_DISABLE_SPEEDY!==void 0&&$i.SC_DISABLE_SPEEDY!==""&&$i.SC_DISABLE_SPEEDY!=="false"&&$i.SC_DISABLE_SPEEDY)),UN={};function Wl(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];throw new Error("An error occurred. See https://git.io/JUIaE#"+t+" for more information."+(r.length>0?" Args: "+r.join(", "):""))}var WN=function(){function t(r){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=r}var e=t.prototype;return e.indexOfGroup=function(r){for(var n=0,i=0;i<r;i++)n+=this.groupSizes[i];return n},e.insertRules=function(r,n){if(r>=this.groupSizes.length){for(var i=this.groupSizes,o=i.length,a=o;r>=a;)(a<<=1)<0&&Wl(16,""+r);this.groupSizes=new Uint32Array(a),this.groupSizes.set(i),this.length=a;for(var s=o;s<a;s++)this.groupSizes[s]=0}for(var c=this.indexOfGroup(r+1),d=0,h=n.length;d<h;d++)this.tag.insertRule(c,n[d])&&(this.groupSizes[r]++,c++)},e.clearGroup=function(r){if(r<this.length){var n=this.groupSizes[r],i=this.indexOfGroup(r),o=i+n;this.groupSizes[r]=0;for(var a=i;a<o;a++)this.tag.deleteRule(i)}},e.getGroup=function(r){var n="";if(r>=this.length||this.groupSizes[r]===0)return n;for(var i=this.groupSizes[r],o=this.indexOfGroup(r),a=o+i,s=o;s<a;s++)n+=this.tag.getRule(s)+`/*!sc*/
`;return n},t}(),$f=new Map,E2=new Map,z0=1,U1=function(t){if($f.has(t))return $f.get(t);for(;E2.has(z0);)z0++;var e=z0++;return $f.set(t,e),E2.set(e,t),e},XN=function(t){return E2.get(t)},KN=function(t,e){e>=z0&&(z0=e+1),$f.set(t,e),E2.set(e,t)},YN="style["+Hu+'][data-styled-version="5.3.11"]',ZN=new RegExp("^"+Hu+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),qN=function(t,e,r){for(var n,i=r.split(","),o=0,a=i.length;o<a;o++)(n=i[o])&&t.registerName(e,n)},QN=function(t,e){for(var r=(e.textContent||"").split(`/*!sc*/
`),n=[],i=0,o=r.length;i<o;i++){var a=r[i].trim();if(a){var s=a.match(ZN);if(s){var c=0|parseInt(s[1],10),d=s[2];c!==0&&(KN(d,c),qN(t,d,s[3]),t.getTag().insertRules(c,n)),n.length=0}else n.push(a)}}},JN=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},UP=function(t){var e=document.head,r=t||e,n=document.createElement("style"),i=function(s){for(var c=s.childNodes,d=c.length;d>=0;d--){var h=c[d];if(h&&h.nodeType===1&&h.hasAttribute(Hu))return h}}(r),o=i!==void 0?i.nextSibling:null;n.setAttribute(Hu,"active"),n.setAttribute("data-styled-version","5.3.11");var a=JN();return a&&n.setAttribute("nonce",a),r.insertBefore(n,o),n},eF=function(){function t(r){var n=this.element=UP(r);n.appendChild(document.createTextNode("")),this.sheet=function(i){if(i.sheet)return i.sheet;for(var o=document.styleSheets,a=0,s=o.length;a<s;a++){var c=o[a];if(c.ownerNode===i)return c}Wl(17)}(n),this.length=0}var e=t.prototype;return e.insertRule=function(r,n){try{return this.sheet.insertRule(n,r),this.length++,!0}catch{return!1}},e.deleteRule=function(r){this.sheet.deleteRule(r),this.length--},e.getRule=function(r){var n=this.sheet.cssRules[r];return n!==void 0&&typeof n.cssText=="string"?n.cssText:""},t}(),tF=function(){function t(r){var n=this.element=UP(r);this.nodes=n.childNodes,this.length=0}var e=t.prototype;return e.insertRule=function(r,n){if(r<=this.length&&r>=0){var i=document.createTextNode(n),o=this.nodes[r];return this.element.insertBefore(i,o||null),this.length++,!0}return!1},e.deleteRule=function(r){this.element.removeChild(this.nodes[r]),this.length--},e.getRule=function(r){return r<this.length?this.nodes[r].textContent:""},t}(),rF=function(){function t(r){this.rules=[],this.length=0}var e=t.prototype;return e.insertRule=function(r,n){return r<=this.length&&(this.rules.splice(r,0,n),this.length++,!0)},e.deleteRule=function(r){this.rules.splice(r,1),this.length--},e.getRule=function(r){return r<this.length?this.rules[r]:""},t}(),Tw=p8,nF={isServer:!p8,useCSSOMInjection:!VN},O2=function(){function t(r,n,i){r===void 0&&(r=Os),n===void 0&&(n={}),this.options=ho({},nF,{},r),this.gs=n,this.names=new Map(i),this.server=!!r.isServer,!this.server&&p8&&Tw&&(Tw=!1,function(o){for(var a=document.querySelectorAll(YN),s=0,c=a.length;s<c;s++){var d=a[s];d&&d.getAttribute(Hu)!=="active"&&(QN(o,d),d.parentNode&&d.parentNode.removeChild(d))}}(this))}t.registerId=function(r){return U1(r)};var e=t.prototype;return e.reconstructWithOptions=function(r,n){return n===void 0&&(n=!0),new t(ho({},this.options,{},r),this.gs,n&&this.names||void 0)},e.allocateGSInstance=function(r){return this.gs[r]=(this.gs[r]||0)+1},e.getTag=function(){return this.tag||(this.tag=(i=(n=this.options).isServer,o=n.useCSSOMInjection,a=n.target,r=i?new rF(a):o?new eF(a):new tF(a),new WN(r)));var r,n,i,o,a},e.hasNameForId=function(r,n){return this.names.has(r)&&this.names.get(r).has(n)},e.registerName=function(r,n){if(U1(r),this.names.has(r))this.names.get(r).add(n);else{var i=new Set;i.add(n),this.names.set(r,i)}},e.insertRules=function(r,n,i){this.registerName(r,n),this.getTag().insertRules(U1(r),i)},e.clearNames=function(r){this.names.has(r)&&this.names.get(r).clear()},e.clearRules=function(r){this.getTag().clearGroup(U1(r)),this.clearNames(r)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(r){for(var n=r.getTag(),i=n.length,o="",a=0;a<i;a++){var s=XN(a);if(s!==void 0){var c=r.names.get(s),d=n.getGroup(a);if(c&&d&&c.size){var h=Hu+".g"+a+'[id="'+s+'"]',C="";c!==void 0&&c.forEach(function(v){v.length>0&&(C+=v+",")}),o+=""+d+h+'{content:"'+C+`"}/*!sc*/
`}}}return o}(this)},t}(),iF=/(a)(d)/gi,Iw=function(t){return String.fromCharCode(t+(t>25?39:97))};function kv(t){var e,r="";for(e=Math.abs(t);e>52;e=e/52|0)r=Iw(e%52)+r;return(Iw(e%52)+r).replace(iF,"$1-$2")}var wu=function(t,e){for(var r=e.length;r;)t=33*t^e.charCodeAt(--r);return t},WP=function(t){return wu(5381,t)};function XP(t){for(var e=0;e<t.length;e+=1){var r=t[e];if(Bu(r)&&!f8(r))return!1}return!0}var oF=WP("5.3.11"),aF=function(){function t(e,r,n){this.rules=e,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&XP(e),this.componentId=r,this.baseHash=wu(oF,r),this.baseStyle=n,O2.registerId(r)}return t.prototype.generateAndInjectStyles=function(e,r,n){var i=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,r,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(i,this.staticRulesId))o.push(this.staticRulesId);else{var a=Xl(this.rules,e,r,n).join(""),s=kv(wu(this.baseHash,a)>>>0);if(!r.hasNameForId(i,s)){var c=n(a,"."+s,void 0,i);r.insertRules(i,s,c)}o.push(s),this.staticRulesId=s}else{for(var d=this.rules.length,h=wu(this.baseHash,n.hash),C="",v=0;v<d;v++){var g=this.rules[v];if(typeof g=="string")C+=g;else if(g){var m=Xl(g,e,r,n),w=Array.isArray(m)?m.join(""):m;h=wu(h,w+v),C+=w}}if(C){var x=kv(h>>>0);if(!r.hasNameForId(i,x)){var b=n(C,"."+x,void 0,i);r.insertRules(i,x,b)}o.push(x)}}return o.join(" ")},t}(),sF=/^\s*\/\/.*$/gm,lF=[":","[",".","#"];function cF(t){var e,r,n,i,o=Os,a=o.options,s=a===void 0?Os:a,c=o.plugins,d=c===void 0?x2:c,h=new EN(s),C=[],v=function(w){function x(b){if(b)try{w(b+"}")}catch{}}return function(b,O,f,S,E,I,R,k,N,T){switch(b){case 1:if(N===0&&O.charCodeAt(0)===64)return w(O+";"),"";break;case 2:if(k===0)return O+"/*|*/";break;case 3:switch(k){case 102:case 112:return w(f[0]+O),"";default:return O+(T===0?"/*|*/":"")}case-2:O.split("/*|*/}").forEach(x)}}}(function(w){C.push(w)}),g=function(w,x,b){return x===0&&lF.indexOf(b[r.length])!==-1||b.match(i)?w:"."+e};function m(w,x,b,O){O===void 0&&(O="&");var f=w.replace(sF,""),S=x&&b?b+" "+x+" { "+f+" }":f;return e=O,r=x,n=new RegExp("\\"+r+"\\b","g"),i=new RegExp("(\\"+r+"\\b){2,}"),h(b||!x?"":x,S)}return h.use([].concat(d,[function(w,x,b){w===2&&b.length&&b[0].lastIndexOf(r)>0&&(b[0]=b[0].replace(n,g))},v,function(w){if(w===-2){var x=C;return C=[],x}}])),m.hash=d.length?d.reduce(function(w,x){return x.name||Wl(15),wu(w,x.name)},5381).toString():"",m}var KP=y.createContext();KP.Consumer;var YP=y.createContext(),uF=(YP.Consumer,new O2),Tv=cF();function ZP(){return G.useContext(KP)||uF}function qP(){return G.useContext(YP)||Tv}var QP=function(){function t(e,r){var n=this;this.inject=function(i,o){o===void 0&&(o=Tv);var a=n.name+o.hash;i.hasNameForId(n.id,a)||i.insertRules(n.id,a,o(n.rules,a,"@keyframes"))},this.toString=function(){return Wl(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=r}return t.prototype.getName=function(e){return e===void 0&&(e=Tv),this.name+e.hash},t}(),dF=/([A-Z])/,hF=/([A-Z])/g,fF=/^ms-/,pF=function(t){return"-"+t.toLowerCase()};function Aw(t){return dF.test(t)?t.replace(hF,pF).replace(fF,"-ms-"):t}var Lw=function(t){return t==null||t===!1||t===""};function Xl(t,e,r,n){if(Array.isArray(t)){for(var i,o=[],a=0,s=t.length;a<s;a+=1)(i=Xl(t[a],e,r,n))!==""&&(Array.isArray(i)?o.push.apply(o,i):o.push(i));return o}if(Lw(t))return"";if(f8(t))return"."+t.styledComponentId;if(Bu(t)){if(typeof(d=t)!="function"||d.prototype&&d.prototype.isReactComponent||!e)return t;var c=t(e);return Xl(c,e,r,n)}var d;return t instanceof QP?r?(t.inject(r,n),t.getName(n)):t:Pv(t)?function h(C,v){var g,m,w=[];for(var x in C)C.hasOwnProperty(x)&&!Lw(C[x])&&(Array.isArray(C[x])&&C[x].isCss||Bu(C[x])?w.push(Aw(x)+":",C[x],";"):Pv(C[x])?w.push.apply(w,h(C[x],x)):w.push(Aw(x)+": "+(g=x,(m=C[x])==null||typeof m=="boolean"||m===""?"":typeof m!="number"||m===0||g in ON||g.startsWith("--")?String(m).trim():m+"px")+";"));return v?[v+" {"].concat(w,["}"]):w}(t):t.toString()}var Mw=function(t){return Array.isArray(t)&&(t.isCss=!0),t};function X(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return Bu(t)||Pv(t)?Mw(Xl(Pw(x2,[t].concat(r)))):r.length===0&&t.length===1&&typeof t[0]=="string"?t:Mw(Xl(Pw(t,r)))}var JP=function(t,e,r){return r===void 0&&(r=Os),t.theme!==r.theme&&t.theme||e||r.theme},gF=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,mF=/(^-|-$)/g;function T4(t){return t.replace(gF,"-").replace(mF,"")}var g8=function(t){return kv(WP(t)>>>0)};function W1(t){return typeof t=="string"&&!0}var Iv=function(t){return typeof t=="function"||typeof t=="object"&&t!==null&&!Array.isArray(t)},vF=function(t){return t!=="__proto__"&&t!=="constructor"&&t!=="prototype"};function yF(t,e,r){var n=t[r];Iv(e)&&Iv(n)?ek(n,e):t[r]=e}function ek(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];for(var i=0,o=r;i<o.length;i++){var a=o[i];if(Iv(a))for(var s in a)vF(s)&&yF(t,a[s],s)}return t}var Gu=y.createContext();Gu.Consumer;function CF(t){var e=G.useContext(Gu),r=G.useMemo(function(){return function(n,i){if(!n)return Wl(14);if(Bu(n)){var o=n(i);return o}return Array.isArray(n)||typeof n!="object"?Wl(8):i?ho({},i,{},n):n}(t.theme,e)},[t.theme,e]);return t.children?y.createElement(Gu.Provider,{value:r},t.children):null}var I4={};function tk(t,e,r){var n=f8(t),i=!W1(t),o=e.attrs,a=o===void 0?x2:o,s=e.componentId,c=s===void 0?function(O,f){var S=typeof O!="string"?"sc":T4(O);I4[S]=(I4[S]||0)+1;var E=S+"-"+g8("5.3.11"+S+I4[S]);return f?f+"-"+E:E}(e.displayName,e.parentComponentId):s,d=e.displayName,h=d===void 0?function(O){return W1(O)?"styled."+O:"Styled("+kw(O)+")"}(t):d,C=e.displayName&&e.componentId?T4(e.displayName)+"-"+e.componentId:e.componentId||c,v=n&&t.attrs?Array.prototype.concat(t.attrs,a).filter(Boolean):a,g=e.shouldForwardProp;n&&t.shouldForwardProp&&(g=e.shouldForwardProp?function(O,f,S){return t.shouldForwardProp(O,f,S)&&e.shouldForwardProp(O,f,S)}:t.shouldForwardProp);var m,w=new aF(r,C,n?t.componentStyle:void 0),x=w.isStatic&&a.length===0,b=function(O,f){return function(S,E,I,R){var k=S.attrs,N=S.componentStyle,T=S.defaultProps,D=S.foldedComponentIds,z=S.shouldForwardProp,B=S.styledComponentId,Y=S.target,W=function(we,U,F){we===void 0&&(we=Os);var $=ho({},U,{theme:we}),ie={};return F.forEach(function(pe){var ce,le,xe,Ne=pe;for(ce in Bu(Ne)&&(Ne=Ne($)),Ne)$[ce]=ie[ce]=ce==="className"?(le=ie[ce],xe=Ne[ce],le&&xe?le+" "+xe:le||xe):Ne[ce]}),[$,ie]}(JP(E,G.useContext(Gu),T)||Os,E,k),q=W[0],ee=W[1],K=function(we,U,F,$){var ie=ZP(),pe=qP(),ce=U?we.generateAndInjectStyles(Os,ie,pe):we.generateAndInjectStyles(F,ie,pe);return ce}(N,R,q),ue=I,ne=ee.$as||E.$as||ee.as||E.as||Y,ae=W1(ne),J=ee!==E?ho({},E,{},ee):E,Q={};for(var te in J)te[0]!=="$"&&te!=="as"&&(te==="forwardedAs"?Q.as=J[te]:(z?z(te,_w,ne):!ae||_w(te))&&(Q[te]=J[te]));return E.style&&ee.style!==E.style&&(Q.style=ho({},E.style,{},ee.style)),Q.className=Array.prototype.concat(D,B,K!==B?K:null,E.className,ee.className).filter(Boolean).join(" "),Q.ref=ue,G.createElement(ne,Q)}(m,O,f,x)};return b.displayName=h,(m=y.forwardRef(b)).attrs=v,m.componentStyle=w,m.displayName=h,m.shouldForwardProp=g,m.foldedComponentIds=n?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):x2,m.styledComponentId=C,m.target=n?t.target:t,m.withComponent=function(O){var f=e.componentId,S=function(I,R){if(I==null)return{};var k,N,T={},D=Object.keys(I);for(N=0;N<D.length;N++)k=D[N],R.indexOf(k)>=0||(T[k]=I[k]);return T}(e,["componentId"]),E=f&&f+"-"+(W1(O)?O:T4(kw(O)));return tk(O,ho({},S,{attrs:v,componentId:E}),r)},Object.defineProperty(m,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(O){this._foldedDefaultProps=n?ek({},t.defaultProps,O):O}}),Object.defineProperty(m,"toString",{value:function(){return"."+m.styledComponentId}}),i&&GN(m,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),m}var Z=function(t){return function e(r,n,i){if(i===void 0&&(i=Os),!$P.isValidElementType(n))return Wl(1,String(n));var o=function(){return r(n,i,X.apply(void 0,arguments))};return o.withConfig=function(a){return e(r,n,ho({},i,{},a))},o.attrs=function(a){return e(r,n,ho({},i,{attrs:Array.prototype.concat(i.attrs,a).filter(Boolean)}))},o}(tk,t)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(t){Z[t]=Z(t)});var wF=function(){function t(r,n){this.rules=r,this.componentId=n,this.isStatic=XP(r),O2.registerId(this.componentId+1)}var e=t.prototype;return e.createStyles=function(r,n,i,o){var a=o(Xl(this.rules,n,i,o).join(""),""),s=this.componentId+r;i.insertRules(s,s,a)},e.removeStyles=function(r,n){n.clearRules(this.componentId+r)},e.renderStyles=function(r,n,i,o){r>2&&O2.registerId(this.componentId+r),this.removeStyles(r,i),this.createStyles(r,n,i,o)},t}();function kp(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var i=X.apply(void 0,[t].concat(r)),o="sc-global-"+g8(JSON.stringify(i)),a=new wF(i,o);function s(d){var h=ZP(),C=qP(),v=G.useContext(Gu),g=G.useRef(h.allocateGSInstance(o)).current;return h.server&&c(g,d,h,v,C),G.useLayoutEffect(function(){if(!h.server)return c(g,d,h,v,C),function(){return a.removeStyles(g,h)}},[g,d,h,v,C]),null}function c(d,h,C,v,g){if(a.isStatic)a.renderStyles(d,UN,C,g);else{var m=ho({},h,{theme:JP(h,v,s.defaultProps)});a.renderStyles(d,m,C,g)}}return y.memo(s)}function m8(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var i=X.apply(void 0,[t].concat(r)).join(""),o=g8(i);return new QP(o,i)}var SF=function(){return G.useContext(Gu)},P2={exports:{}};P2.exports;(function(t,e){var r=200,n="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",c="[object Array]",d="[object AsyncFunction]",h="[object Boolean]",C="[object Date]",v="[object Error]",g="[object Function]",m="[object GeneratorFunction]",w="[object Map]",x="[object Number]",b="[object Null]",O="[object Object]",f="[object Proxy]",S="[object RegExp]",E="[object Set]",I="[object String]",R="[object Undefined]",k="[object WeakMap]",N="[object ArrayBuffer]",T="[object DataView]",D="[object Float32Array]",z="[object Float64Array]",B="[object Int8Array]",Y="[object Int16Array]",W="[object Int32Array]",q="[object Uint8Array]",ee="[object Uint8ClampedArray]",K="[object Uint16Array]",ue="[object Uint32Array]",ne=/[\\^$.*+?()[\]{}|]/g,ae=/^\[object .+?Constructor\]$/,J=/^(?:0|[1-9]\d*)$/,Q={};Q[D]=Q[z]=Q[B]=Q[Y]=Q[W]=Q[q]=Q[ee]=Q[K]=Q[ue]=!0,Q[s]=Q[c]=Q[N]=Q[h]=Q[T]=Q[C]=Q[v]=Q[g]=Q[w]=Q[x]=Q[O]=Q[S]=Q[E]=Q[I]=Q[k]=!1;var te=typeof gs=="object"&&gs&&gs.Object===Object&&gs,we=typeof self=="object"&&self&&self.Object===Object&&self,U=te||we||Function("return this")(),F=e&&!e.nodeType&&e,$=F&&!0&&t&&!t.nodeType&&t,ie=$&&$.exports===F,pe=ie&&te.process,ce=function(){try{var V=$&&$.require&&$.require("util").types;return V||pe&&pe.binding&&pe.binding("util")}catch{}}(),le=ce&&ce.isTypedArray;function xe(V,re,fe){switch(fe.length){case 0:return V.call(re);case 1:return V.call(re,fe[0]);case 2:return V.call(re,fe[0],fe[1]);case 3:return V.call(re,fe[0],fe[1],fe[2])}return V.apply(re,fe)}function Ne(V,re){for(var fe=-1,ze=Array(V);++fe<V;)ze[fe]=re(fe);return ze}function _e(V){return function(re){return V(re)}}function He(V,re){return V==null?void 0:V[re]}function Ee(V,re){return function(fe){return V(re(fe))}}var Ve=Array.prototype,We=Function.prototype,Me=Object.prototype,gt=U["__core-js_shared__"],St=We.toString,qe=Me.hasOwnProperty,je=function(){var V=/[^.]+$/.exec(gt&&gt.keys&&gt.keys.IE_PROTO||"");return V?"Symbol(src)_1."+V:""}(),Ke=Me.toString,bt=St.call(Object),Lt=RegExp("^"+St.call(qe).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tr=ie?U.Buffer:void 0,Ii=U.Symbol,mt=U.Uint8Array;tr&&tr.allocUnsafe;var Pe=Ee(Object.getPrototypeOf,Object),at=Object.create,ct=Me.propertyIsEnumerable,Tt=Ve.splice,It=Ii?Ii.toStringTag:void 0,or=function(){try{var V=xc(Object,"defineProperty");return V({},"",{}),V}catch{}}(),gr=tr?tr.isBuffer:void 0,nn=Math.max,pi=Date.now,Qe=xc(U,"Map"),Je=xc(Object,"create"),jt=function(){function V(){}return function(re){if(!na(re))return{};if(at)return at(re);V.prototype=re;var fe=new V;return V.prototype=void 0,fe}}();function ut(V){var re=-1,fe=V==null?0:V.length;for(this.clear();++re<fe;){var ze=V[re];this.set(ze[0],ze[1])}}function Dr(){this.__data__=Je?Je(null):{},this.size=0}function jr(V){var re=this.has(V)&&delete this.__data__[V];return this.size-=re?1:0,re}function Qi(V){var re=this.__data__;if(Je){var fe=re[V];return fe===n?void 0:fe}return qe.call(re,V)?re[V]:void 0}function Ai(V){var re=this.__data__;return Je?re[V]!==void 0:qe.call(re,V)}function Va(V,re){var fe=this.__data__;return this.size+=this.has(V)?0:1,fe[V]=Je&&re===void 0?n:re,this}ut.prototype.clear=Dr,ut.prototype.delete=jr,ut.prototype.get=Qi,ut.prototype.has=Ai,ut.prototype.set=Va;function Sn(V){var re=-1,fe=V==null?0:V.length;for(this.clear();++re<fe;){var ze=V[re];this.set(ze[0],ze[1])}}function rl(){this.__data__=[],this.size=0}function nl(V){var re=this.__data__,fe=Sc(re,V);if(fe<0)return!1;var ze=re.length-1;return fe==ze?re.pop():Tt.call(re,fe,1),--this.size,!0}function mr(V){var re=this.__data__,fe=Sc(re,V);return fe<0?void 0:re[fe][1]}function vr(V){return Sc(this.__data__,V)>-1}function pn(V,re){var fe=this.__data__,ze=Sc(fe,V);return ze<0?(++this.size,fe.push([V,re])):fe[ze][1]=re,this}Sn.prototype.clear=rl,Sn.prototype.delete=nl,Sn.prototype.get=mr,Sn.prototype.has=vr,Sn.prototype.set=pn;function Kn(V){var re=-1,fe=V==null?0:V.length;for(this.clear();++re<fe;){var ze=V[re];this.set(ze[0],ze[1])}}function xd(){this.size=0,this.__data__={hash:new ut,map:new(Qe||Sn),string:new ut}}function wc(V){var re=il(this,V).delete(V);return this.size-=re?1:0,re}function j3(V){return il(this,V).get(V)}function z3(V){return il(this,V).has(V)}function $3(V,re){var fe=il(this,V),ze=fe.size;return fe.set(V,re),this.size+=fe.size==ze?0:1,this}Kn.prototype.clear=xd,Kn.prototype.delete=wc,Kn.prototype.get=j3,Kn.prototype.has=z3,Kn.prototype.set=$3;function Ua(V){var re=this.__data__=new Sn(V);this.size=re.size}function B3(){this.__data__=new Sn,this.size=0}function H3(V){var re=this.__data__,fe=re.delete(V);return this.size=re.size,fe}function G3(V){return this.__data__.get(V)}function V3(V){return this.__data__.has(V)}function U3(V,re){var fe=this.__data__;if(fe instanceof Sn){var ze=fe.__data__;if(!Qe||ze.length<r-1)return ze.push([V,re]),this.size=++fe.size,this;fe=this.__data__=new Kn(ze)}return fe.set(V,re),this.size=fe.size,this}Ua.prototype.clear=B3,Ua.prototype.delete=H3,Ua.prototype.get=G3,Ua.prototype.has=V3,Ua.prototype.set=U3;function W3(V,re){var fe=Ld(V),ze=!fe&&ra(V),vt=!fe&&!ze&&Md(V),zt=!fe&&!ze&&!vt&&kc(V),rr=fe||ze||vt||zt,st=rr?Ne(V.length,String):[],Nt=st.length;for(var an in V)rr&&(an=="length"||vt&&(an=="offset"||an=="parent")||zt&&(an=="buffer"||an=="byteLength"||an=="byteOffset")||Yn(an,Nt))||st.push(an);return st}function Ed(V,re,fe){(fe!==void 0&&!Xa(V[re],fe)||fe===void 0&&!(re in V))&&Od(V,re,fe)}function X3(V,re,fe){var ze=V[re];(!(qe.call(V,re)&&Xa(ze,fe))||fe===void 0&&!(re in V))&&Od(V,re,fe)}function Sc(V,re){for(var fe=V.length;fe--;)if(Xa(V[fe][0],re))return fe;return-1}function Od(V,re,fe){re=="__proto__"&&or?or(V,re,{configurable:!0,enumerable:!0,value:fe,writable:!0}):V[re]=fe}var Pd=_c();function Oo(V){return V==null?V===void 0?R:b:It&&It in Object(V)?Ec(V):al(V)}function bc(V){return cl(V)&&Oo(V)==s}function kd(V){if(!na(V)||q3(V))return!1;var re=ll(V)?Lt:ae;return re.test(Uh(V))}function K3(V){return cl(V)&&Rd(V.length)&&!!Q[Oo(V)]}function Td(V){if(!na(V))return Oc(V);var re=ol(V),fe=[];for(var ze in V)ze=="constructor"&&(re||!qe.call(V,ze))||fe.push(ze);return fe}function ea(V,re,fe,ze,vt){V!==re&&Pd(re,function(zt,rr){if(vt||(vt=new Ua),na(zt))Po(V,re,rr,fe,ea,ze,vt);else{var st=ze?ze(Id(V,rr),zt,rr+"",V,re,vt):void 0;st===void 0&&(st=zt),Ed(V,rr,st)}},Tc)}function Po(V,re,fe,ze,vt,zt,rr){var st=Id(V,fe),Nt=Id(re,fe),an=rr.get(Nt);if(an){Ed(V,fe,an);return}var sn=zt?zt(st,Nt,fe+"",V,re,rr):void 0,To=sn===void 0;if(To){var xn=Ld(Nt),En=!xn&&Md(Nt),Io=!xn&&!En&&kc(Nt);sn=Nt,xn||En||Io?Ld(st)?sn=st:kt(st)?sn=ta(st):En?(To=!1,sn=ko(Nt)):Io?(To=!1,sn=bn(Nt)):sn=[]:zr(Nt)||ra(Nt)?(sn=st,ra(st)?sn=J3(st):(!na(st)||ll(st))&&(sn=Vh(Nt))):To=!1}To&&(rr.set(Nt,sn),vt(sn,Nt,ze,zt,rr),rr.delete(Nt)),Ed(V,fe,sn)}function Xt(V,re){return Q3(Pc(V,re,gi),V+"")}var Vt=or?function(V,re){return or(V,"toString",{configurable:!0,enumerable:!1,value:Ic(re),writable:!0})}:gi;function ko(V,re){return V.slice()}function on(V){var re=new V.constructor(V.byteLength);return new mt(re).set(new mt(V)),re}function bn(V,re){var fe=on(V.buffer);return new V.constructor(fe,V.byteOffset,V.length)}function ta(V,re){var fe=-1,ze=V.length;for(re||(re=Array(ze));++fe<ze;)re[fe]=V[fe];return re}function Wa(V,re,fe,ze){var vt=!fe;fe||(fe={});for(var zt=-1,rr=re.length;++zt<rr;){var st=re[zt],Nt=void 0;Nt===void 0&&(Nt=V[st]),vt?Od(fe,st,Nt):X3(fe,st,Nt)}return fe}function _n(V){return Xt(function(re,fe){var ze=-1,vt=fe.length,zt=vt>1?fe[vt-1]:void 0,rr=vt>2?fe[2]:void 0;for(zt=V.length>3&&typeof zt=="function"?(vt--,zt):void 0,rr&&Y3(fe[0],fe[1],rr)&&(zt=vt<3?void 0:zt,vt=1),re=Object(re);++ze<vt;){var st=fe[ze];st&&V(re,st,ze,zt)}return re})}function _c(V){return function(re,fe,ze){for(var vt=-1,zt=Object(re),rr=ze(re),st=rr.length;st--;){var Nt=rr[++vt];if(fe(zt[Nt],Nt,zt)===!1)break}return re}}function il(V,re){var fe=V.__data__;return Z3(re)?fe[typeof re=="string"?"string":"hash"]:fe.map}function xc(V,re){var fe=He(V,re);return kd(fe)?fe:void 0}function Ec(V){var re=qe.call(V,It),fe=V[It];try{V[It]=void 0;var ze=!0}catch{}var vt=Ke.call(V);return ze&&(re?V[It]=fe:delete V[It]),vt}function Vh(V){return typeof V.constructor=="function"&&!ol(V)?jt(Pe(V)):{}}function Yn(V,re){var fe=typeof V;return re=re??a,!!re&&(fe=="number"||fe!="symbol"&&J.test(V))&&V>-1&&V%1==0&&V<re}function Y3(V,re,fe){if(!na(fe))return!1;var ze=typeof re;return(ze=="number"?sl(fe)&&Yn(re,fe.length):ze=="string"&&re in fe)?Xa(fe[re],V):!1}function Z3(V){var re=typeof V;return re=="string"||re=="number"||re=="symbol"||re=="boolean"?V!=="__proto__":V===null}function q3(V){return!!je&&je in V}function ol(V){var re=V&&V.constructor,fe=typeof re=="function"&&re.prototype||Me;return V===fe}function Oc(V){var re=[];if(V!=null)for(var fe in Object(V))re.push(fe);return re}function al(V){return Ke.call(V)}function Pc(V,re,fe){return re=nn(re===void 0?V.length-1:re,0),function(){for(var ze=arguments,vt=-1,zt=nn(ze.length-re,0),rr=Array(zt);++vt<zt;)rr[vt]=ze[re+vt];vt=-1;for(var st=Array(re+1);++vt<re;)st[vt]=ze[vt];return st[re]=fe(rr),xe(V,this,st)}}function Id(V,re){if(!(re==="constructor"&&typeof V[re]=="function")&&re!="__proto__")return V[re]}var Q3=Ad(Vt);function Ad(V){var re=0,fe=0;return function(){var ze=pi(),vt=o-(ze-fe);if(fe=ze,vt>0){if(++re>=i)return arguments[0]}else re=0;return V.apply(void 0,arguments)}}function Uh(V){if(V!=null){try{return St.call(V)}catch{}try{return V+""}catch{}}return""}function Xa(V,re){return V===re||V!==V&&re!==re}var ra=bc(function(){return arguments}())?bc:function(V){return cl(V)&&qe.call(V,"callee")&&!ct.call(V,"callee")},Ld=Array.isArray;function sl(V){return V!=null&&Rd(V.length)&&!ll(V)}function kt(V){return cl(V)&&sl(V)}var Md=gr||t5;function ll(V){if(!na(V))return!1;var re=Oo(V);return re==g||re==m||re==d||re==f}function Rd(V){return typeof V=="number"&&V>-1&&V%1==0&&V<=a}function na(V){var re=typeof V;return V!=null&&(re=="object"||re=="function")}function cl(V){return V!=null&&typeof V=="object"}function zr(V){if(!cl(V)||Oo(V)!=O)return!1;var re=Pe(V);if(re===null)return!0;var fe=qe.call(re,"constructor")&&re.constructor;return typeof fe=="function"&&fe instanceof fe&&St.call(fe)==bt}var kc=le?_e(le):K3;function J3(V){return Wa(V,Tc(V))}function Tc(V){return sl(V)?W3(V):Td(V)}var e5=_n(function(V,re,fe){ea(V,re,fe)});function Ic(V){return function(){return V}}function gi(V){return V}function t5(){return!1}t.exports=e5})(P2,P2.exports);var bF=P2.exports;const _F=ql(bF);var yl=function(e,r){return e.reduce(function(n,i){return Object.assign(n,A({},i,r))},{})};function Av(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function xF(t){if(Array.isArray(t))return Av(t)}function rk(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function v8(t,e){if(t){if(typeof t=="string")return Av(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Av(t,e):void 0}}function EF(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cr(t){return xF(t)||rk(t)||v8(t)||EF()}function Se(t,e){var r=function(o){return"Sfx".concat(t).concat(o?"-".concat(o):"")},n=[];return e&&(Array.isArray(e)?n.push.apply(n,cr(e.filter(function(i){return typeof i=="string"}).map(function(i){return r(i)}))):typeof e=="string"&&n.push(r(e))),n.length===0&&n.push(r()),n.join(" ")}function pt(t,e){var r=G.forwardRef(t);return r.displayName=t.name,r}function OF(t){return Object.keys(t)}function ht(t){return Object.values(t)}function PF(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return typeof t=="function"?t.apply(void 0,r):t}function Bt(t){return Object.keys(t).reduce(function(e,r){var n=t[r];return n.displayName="".concat(r),Object.assign(e,A({},r,n))},{})}function Rw(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function y8(t,e){return G.useMemo(function(){return t==null&&e==null?null:function(r){Rw(t,r),Rw(e,r)}},[t,e])}function Hc(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,n=r||1e6,i=+t;return Math.min(Math.max(e,i),n)}function A4(t,e,r,n,i){return(t-e)*(i-n)/(r-e)+n}var C8=function(e){return e.replaceAll(/[^\d,]/gi,"").split(",").map(function(r){return+r})},Bf=function(e){return e?[Number.parseInt(e.slice(1,3),16),Number.parseInt(e.slice(3,5),16),Number.parseInt(e.slice(5,7),16)]:[0,0,0]},nk=function(e){return e.toString(16).padStart(2,"0")},ik=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return"#".concat(r.map(nk).join(""))},kF=function(e,r,n){var i=n/100,o=r*Math.min(i,1-i)/100,a=function(c){var d=(c+e/30)%12,h=i-o*Math.max(Math.min(d-3,9-d,1),-1);return nk(Math.round(255*h))};return"#".concat(a(0)).concat(a(8)).concat(a(4))},Nw=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r[0],o=r[1],a=r[2];i/=255,o/=255,a/=255;var s=Math.min(i,o,a),c=Math.max(i,o,a),d,h,C=(c+s)/2;if(c===s)d=0,h=0;else{var v=c-s;switch(h=C>.5?v/(2-c-s):v/(c+s),c){case i:d=(o-a)/v+(o<a?6:0);break;case o:d=(a-i)/v+2;break;case a:d=(i-o)/v+4;break;default:d=0}d/=6}return[Math.round(d*360),Math.round(h*100),Math.round(C*100)]},L4=function(e){if(e.startsWith("#")){var r=e;return e.length===4&&(r="#".concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2]).concat(e[3]).concat(e[3])),Nw.apply(void 0,cr(Bf(r)))}if(e.startsWith("rgb")){var n=C8(e);return Nw.apply(void 0,cr(n))}return typeof e=="string"?[0,0,0]:e},Fw=function(e){return e.startsWith("#")?e.length===7?e:"#".concat(e[0]).concat(e[0]).concat(e[1]).concat(e[1]).concat(e[2]).concat(e[2]):e.startsWith("rgb")?ik.apply(void 0,cr(C8(e))):typeof e=="string"?"#000000":e},ok=function(e,r){return r===0&&(e===0||e===1)},ak=function(e,r){return e===0&&r===1},TF=function(e,r,n){var i=r,o=(2-r)*n/2;o!==0&&(o===1?i=0:o<.5?i=i*n/(o*2):i=i*n/(2-o*2));var a=ok(i,o);return[a||ak(i,o)?0:e,a?0:Math.round(i*100),Math.round(o*100)]},IF=function(e,r,n){var i=r,o=n*2;i*=o<=1?o:2-o;var a=(o+i)/2;i=2*i/(o+i);var s=ok(i,n);return[s||ak(i,n)?0:e,s?0:Math.round(i*100),Math.round(a*100)]},Dw=function(e){return/^#[\da-f]{6}$/i.test(e)};function Cl(t){if(!t)return null;var e=t.getBoundingClientRect(),r=document,n=r.body,i=document.documentElement,o=window.pageYOffset||i.scrollTop||n.scrollTop,a=window.pageXOffset||i.scrollLeft||n.scrollLeft,s=i.clientTop||n.clientTop||0,c=i.clientLeft||n.clientLeft||0,d=e.top+o-s,h=e.left+a-c;return{top:Math.round(d),left:Math.round(h),width:e.width,height:e.height}}function sk(t,e){return t-e}function M4(t,e,r){return(t-e)*100/(r-e)}function AF(t,e,r){return(r-e)*t+e}function LF(t){if(Math.abs(t)<1){var e=t.toExponential().split("e-"),r=e[0].split(".")[1];return(r?r.length:0)+Number.parseInt(e[1],10)}var n=t.toString().split(".")[1];return n?n.length:0}function MF(t,e,r){var n=Math.round((t-r)/e)*e+r;return Number(n.toFixed(LF(e)))}function jw(t){var e=t.values,r=t.newValue,n=t.index,i=e.slice();return i[n]=r,i.sort(sk)}function RF(t,e){var r=t.reduce(function(i,o,a){var s=Math.abs(e-o);return i===null||s<i.distance||s===i.distance?{distance:s,index:a}:i},null),n=r.index;return n}function Hf(t){return t&&t.ownerDocument||document}function R4(t,e,r){return t==null?e:Math.min(Math.max(e,t),r)}function X1(t,e){if(e.current!==void 0&&t.changedTouches){for(var r=0;r<t.changedTouches.length;r+=1){var n=t.changedTouches[r];if(n.identifier===e.current)return{x:n.clientX,y:n.clientY}}return!1}return{x:t.clientX,y:t.clientY}}var N4={horizontal:{offset:function(e){return{left:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},"horizontal-reverse":{offset:function(e){return{right:"".concat(e,"%")}},leap:function(e){return{width:"".concat(e,"%")}}},vertical:{offset:function(e){return{bottom:"".concat(e,"%")}},leap:function(e){return{height:"".concat(e,"%")}}}};function K1(t){var e=t.sliderRef,r=t.activeIndex,n=t.setActive,i=Hf(e.current);if(!e.current.contains(i.activeElement)||Number(i.activeElement.getAttribute("data-index"))!==r){var o;(o=e.current.querySelector('[type="range"][data-index="'.concat(r,'"]')))===null||o===void 0||o.focus()}n&&n(r)}var M={TextPrimary:"txt-primary",TextSecondary:"txt-secondary",TextSecondaryInvert:"txt-secondary-invert",TextPlaceholder:"txt-placeholder",TextWarning:"txt-warning",TextError:"txt-error",TextInfo:"txt-info",AccentPrimary:"accent-primary",AccentPrimaryHover:"accent-primary-hover",AccentPrimaryActive:"accent-primary-active",AccentPrimaryDisabled:"accent-primary-disabled",AccentSecondaryDisabled:"accent-secondary-disabled",AccentStateless:"accent-stateless",AccentStateless_0_4_Opacity:"accent-stateless_0_4_opacity",Accent_0_5_Opacity:"accent_0_5_opacity",Accent_1_2_Opacity:"accent_1_2_opacity",Accent_1_8_Opacity:"accent_1_8_opacity",Accent_2_8_Opacity:"accent_2_8_opacity",Accent_4_0_Opacity:"accent_4_0_opacity",BackgroundGrey:"bg-grey",BackgroundStateless:"bg-stateless",BackgroundActive:"bg-active",BackgroundBaseLight:"bg-base-light",BackgroundBaseMedium:"bg-base-medium",BackgroundPrimary:"bg-primary",BackgroundPrimaryLight:"bg-primary-light",BackgroundPrimaryHover:"bg-primary-hover",BackgroundPrimaryActive:"bg-primary-active",BackgroundPrimaryStateless:"bg-primary-stateless",BackgroundPrimary_0_5_Opacity:"bg-primary-0-5-opacity",BackgroundSecondary:"bg-secondary",BackgroundHover:"bg-hover",BackgroundGreen:"bg-green",BackgroundGreenMedium:"bg-green-medium",BackgroundBlue:"bg-blue",BackgroundRed:"bg-red",BackgroundRedLight:"bg-red-light",BackgroundRedMedium:"background-red-medium",BackgroundOrange:"bg-orange",BackgroundTooltip:"bg-tooltip",IconsPrimary:"icon-primary",IconsPrimaryOpacity_0_6:"icons-primary-opacity-0-6",IconsSecondary:"icons-secondary",IconsPlaceholder:"icons-placeholder",IconsInvert:"icons-invert",IconsMuted:"icons-muted",IconsPrimaryHover:"icons-primary-hover",IconsSecondaryHover:"icons-secondary-hover",ButtonPrimaryText:"btn-primary-text",ButtonPrimaryText_0_6:"btn-primary-text-0-6",ButtonPrimaryText_0_4:"btn-primary-text-0-4",ButtonDisabledText:"btn-disabled-text",ButtonSecondaryText:"btn-secondary-text",LinkPrimary:"link-primary",LinkStateless:"link-stateless",LinkHover:"link-hover",LinkActive:"link-active",LinkMuted:"link-muted",LinkPressed:"link-pressed",BordersPrimary:"borders-primary",BordersPrimaryHover:"borders-primary-hover",BordersSecondary:"borders-secondary",BordersStrong:"borders-strong",BordersInvert:"borders-invert",BorderHoverBottom:"border-hover-bottom",BorderActiveBottom:"border-active-bottom",BorderPrimaryStateless:"border-primary-stateless",BordersDisabled:"borders-disabled",BordersButton:"borders-button",BordersItem:"borders-item",BordersBaseLight:"borders-base-light",BordersBaseMedium:"borders-base-medium",BordersGreen:"borders-green",BordersGreenMedium:"borders-green-medium",BordersRed:"borders-red",ActiveSecondary:"active-secondary",ActiveSecondaryHover:"active-secondary-hover",Tag:"tag",StatesErrorDisabledText:"states-error-disabled-text",Error:"error",Error_0_28_Opacity:"error-0-28-opacity",Error_0_12_Opacity:"error-0-12-opacity",ErrorHover:"error-hover",ErrorActive:"error-active",Success:"success",SuccessHover:"success-hover",SuccessActive:"success-Active",Warning:"warning",WarningHover:"warning-hover",WarningActive:"warning-active",Info:"info",Modified:"modified",Red:"red",Orange:"orange",Salad:"salad",Green:"green",Blue:"blue",Indigo:"indigo",Violet:"violet",Pink:"pink",GradientRight:"gradient-right",Extra_0_3_Overlay:"extra-0-3-overlay",GradientRightActive:"gradient-right-active",GradientRightHover:"gradient-right-hover",Extra_0_5_Overlay:"extra-0-5-overlay",Extra_0_7_Overlay:"extra-0-7-overlay",Extra_0_9_Overlay:"extra-0-9-overlay",Red_0_1_Overlay:"red-0-1-overlay",Orange_0_1_Overlay:"orange-0-1-overlay",Accent_0_8_Overlay:"accent-0-8-overlay",Link:"link",Camera:"camera",GoogleDrive:"google-drive",Dropbox:"dropbox",OneDrive:"one-drive",Device:"device",Instagram:"instagram",FreeImages:"free-images",FreeIcons:"free-icons",Canvas:"canvas",Box:"box",ScreenCast:"screen-cast",Unsplash:"unsplash",LightShadow:"light-shadow",MediumShadow:"medium-shadow",LargeShadow:"large-shadow",XLargeShadow:"x-large-shadow"},lk=function(e){var r=e.theme.palette;return X(["scrollbar-color:"," ",";scrollbar-width:thin;::-webkit-scrollbar{width:12px;}::-webkit-scrollbar-track{margin-block:6px;}::-webkit-scrollbar-thumb{background:",";border:4px solid ",";border-radius:99px;padding:4px 6px;background-clip:padding-box;}"],r[M.IconsMuted],r[M.ActiveSecondary],r[M.Extra_0_3_Overlay],r[M.ActiveSecondary])},Rn={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg",Xl:"xl",Xxl:"xxl",Xxxl:"xxxl"},ni={ShadowSm:"shadow-sm",ShadowMd:"shadow-md",ShadowLg:"shadow-lg",ShadowXl:"shadow-xl",Label:"label",Header:"header",HeaderPopup:"header-popup",FooterPopup:"footer-popup",LeftPanelMd:"left-panel-md",RightPanelMd:"right-panel-md",LeftPanelSm:"left-panel-sm",RightPanelSm:"right-panel-sm"},nr={Regular:400,Medium:500},ke={TextExtraSmall:"text-extra-small",TextSmall:"text-small",TextSmallUp:"text-small-up",TextMedium:"text-medium",TextLarge:"text-large",TextExtraLarge:"text-extra-large",TextXExtraLarge:"text-x-extra-large",TitleH6:"title-h6",TitleH5:"title-h5",TitleH4:"title-h4",TitleH3:"title-h3",TitleH2:"title-h2",TitleH1:"title-h1",LabelExtraSmall:"label-extra-small",LabelExtraSmallEmphasis:"label-extra-small-emphasis",LabelExtraSmallUp:"label-extra-small-up",LabelSmall:"label-small",LabelSmallEmphasis:"label-small-emphasis",LabelSmallUp:"label-small-up",LabelSmallUpEmphasis:"label-small-up-emphasis",LabelMedium:"label-medium",LabelMediumEmphasis:"label-medium-emphasis",LabelLarge:"label-large",LabelLargeEmphasis:"label-large-emphasis",LabelLargeUp:"label-large-up",LabelExtraLargeEmphasis:"label-extra-large-emphasis",LabelExtraLarge:"label-extra-large",LabelXExtraLargeEmphasis:"label-x-extra-large-emphasis",LabelXExtraLarge:"label-x-extra-large",LabelXXExtraLargeEmphasis:"label-x-x-extra-large-emphasis",LabelXXExtraLarge:"label-x-x-extra-large",LabelXXXExtraLarge:"label-x-x-x-extra-large",ButtonSmEmphasis:"btn-sm-emphasis",ButtonSm:"btn-sm",ButtonSmUpEmphasis:"btn-sm-up-emphasis",ButtonSmUp:"btn-sm-up",ButtonMdEmphasis:"btn-md-emphasis",ButtonMd:"btn-md",ButtonLgEmphasis:"btn-lg-emphasis",ButtonLg:"btn-lg",ButtonLgUpEmphasis:"btn-lg-up-emphasis",ButtonLgUp:"btn-lg-up",LinkSmall:"link-small",LinkSmallEmphasis:"link-small-emphasis",LinkSmallUp:"link-small-up",LinkSmallUpEmphasis:"link-small-up-emphasis",LinkMedium:"link-medium",LinkMediumEmphasis:"link-medium-emphasis",LinkLarge:"link-large",LinkLargeEmphasis:"link-large-emphasis",LinkLargeUp:"link-large-up",LinkLargeUpEmphasis:"link-large-up-emphasis",InputSm:"input-sm",InputSmUp:"input-sm-up",InputMd:"input-md",InputLg:"input-lg"},go={Sm:"sm",Md:"md",Lg:"lg"},NF=kp(["",";"],function(t){var e=t.theme,r=e.typography.baseLineHeight;return X(["h1,h2,h3,h4,h5,h6,p,small{line-height:",";}"],r)});function zw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function be(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zw(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Ge={fontFamily:'"Roboto"',fontStyle:"normal",fontWeight:nr.Regular},ck=function(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e={},A(A(A(A(A(A(A(A(A(A(e,ke.LabelExtraSmall,be(be({},Ge),{},{fontSize:"10px",lineHeight:"12px"},r)),ke.LabelExtraSmallEmphasis,be(be({},Ge),{},{fontWeight:"Bold",fontSize:"10px",lineHeight:"12px"},r)),ke.LabelExtraSmallUp,be(be({},Ge),{},{fontSize:"11px",lineHeight:"12px"},r)),ke.LabelSmall,be(be({},Ge),{},{fontSize:"12px",lineHeight:"14px"},r)),ke.LabelSmallEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"12px",lineHeight:"14px"},r)),ke.LabelSmallUp,be(be({fontSize:"13px",lineHeight:"16px"},Ge),r)),ke.LabelSmallUpEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"13px",lineHeight:"16px"},r)),ke.LabelMedium,be(be({fontSize:"14px",lineHeight:"16px"},Ge),r)),ke.LabelMediumEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"14px",lineHeight:"16px"},r)),ke.LabelLarge,be(be({},Ge),{},{fontSize:"16px",lineHeight:"18px"},r)),A(A(A(A(A(A(A(A(A(e,ke.LabelLargeEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"16px",lineHeight:"18px"},r)),ke.LabelLargeUp,be(be({},Ge),{},{fontWeight:nr.Regular,fontSize:"18px",lineHeight:"20px"},r)),ke.LabelExtraLargeEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"24px",lineHeight:"28px"},r)),ke.LabelExtraLarge,be(be({},Ge),{},{fontWeight:nr.Regular,fontSize:"24px",lineHeight:"28px"},r)),ke.LabelXExtraLargeEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"32px",lineHeight:"36px"},r)),ke.LabelXExtraLarge,be(be({},Ge),{},{fontSize:"32px",lineHeight:"36px"},r)),ke.LabelXXExtraLargeEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"48px",lineHeight:"54px"},r)),ke.LabelXXExtraLarge,be(be({},Ge),{},{fontSize:"48px",lineHeight:"54px"},r)),ke.LabelXXXExtraLarge,be(be({},Ge),{},{fontSize:"60px",lineHeight:"68px"},r))},FF=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return A(A(A(A(A(A(A({},ke.TextExtraSmall,be(be({},ck()[ke.LabelExtraSmallUp]),{},{lineHeight:"14px"},e)),ke.TextSmall,be(be({},Ge),{},{fontSize:"12px",lineHeight:"18px"},e)),ke.TextSmallUp,be(be({},Ge),{},{fontSize:"13px",lineHeight:"18px"},e)),ke.TextMedium,be(be({},Ge),{},{fontSize:"14px",lineHeight:"20px"},e)),ke.TextLarge,be(be({},Ge),{},{fontSize:"16px",lineHeight:"22px"},e)),ke.TextExtraLarge,be(be({},Ge),{},{fontSize:"18px",lineHeight:"26px"},e)),ke.TextXExtraLarge,be(be({},Ge),{},{fontSize:"28px",lineHeight:"40px"},e))},DF=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return A(A(A(A(A(A(A(A(A(A({},ke.ButtonSmEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"12px",lineHeight:"14px"},e)),ke.ButtonSm,be(be({},Ge),{},{fontSize:"12px",lineHeight:"14px"},e)),ke.ButtonSmUpEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"13px",lineHeight:"16px"},e)),ke.ButtonSmUp,be(be({},Ge),{},{fontSize:"13px",lineHeight:"16px"},e)),ke.ButtonMdEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"14px",lineHeight:"16px"},e)),ke.ButtonMd,be(be({},Ge),{},{fontSize:"14px",lineHeight:"16px"},e)),ke.ButtonLgEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"16px",lineHeight:"18px"},e)),ke.ButtonLg,be(be({},Ge),{},{fontSize:"16px",lineHeight:"18px"},e)),ke.ButtonLgUpEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"18px",lineHeight:"20px"},e)),ke.ButtonLgUp,be(be({},Ge),{},{fontSize:"18px",lineHeight:"20px"},e))},jF=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return A(A(A(A(A(A(A(A(A(A({},ke.LinkSmall,be(be({},Ge),{},{fontSize:"12px",lineHeight:"14px"},e)),ke.LinkSmallEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"12px",lineHeight:"14px"},e)),ke.LinkSmallUp,be(be({},Ge),{},{fontSize:"13px",lineHeight:"16px"},e)),ke.LinkSmallUpEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"13px",lineHeight:"16px"},e)),ke.LinkMedium,be(be({},Ge),{},{fontSize:"14px",lineHeight:"16px"},e)),ke.LinkMediumEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"14px",lineHeight:"16px"},e)),ke.LinkLarge,be(be({},Ge),{},{fontSize:"16px",lineHeight:"18px"},e)),ke.LinkLargeEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"16px",lineHeight:"18px"},e)),ke.LinkLargeUp,be(be({},Ge),{},{fontSize:"18px",lineHeight:"20px"},e)),ke.LinkLargeUpEmphasis,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"18px",lineHeight:"20px"},e))},zF=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return A(A(A(A({},ke.InputSm,be(be({},Ge),{},{fontSize:"12px",lineHeight:"14px"},e)),ke.InputSmUp,be(be({},Ge),{},{fontSize:"13px",lineHeight:"16px"},e)),ke.InputMd,be(be({},Ge),{},{fontSize:"14px",lineHeight:"16px"},e)),ke.InputLg,be(be({},Ge),{},{fontSize:"16px",lineHeight:"18px"},e))},$F=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return A(A(A(A(A(A({},ke.TitleH6,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"12px",lineHeight:"18px"},e)),ke.TitleH5,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"14px",lineHeight:"21px"},e)),ke.TitleH4,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"16px",lineHeight:"24px"},e)),ke.TitleH3,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"18px",lineHeight:"27px"},e)),ke.TitleH2,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"20px",lineHeight:"30px"},e)),ke.TitleH1,be(be({},Ge),{},{fontWeight:nr.Medium,fontSize:"28px",lineHeight:"42px"},e))},uk=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return be(be({fontFamily:Ge.fontFamily,baseLineHeight:1.375},e),{},{font:be(be(be(be(be(be({},ck(e)),FF(e)),DF(e)),jF(e)),zF(e)),$F(e))})},BF=kp(["@keyframes spinner{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.Menu-open{overflow:hidden;}.Modal-open{overflow:hidden;}"]),ei,Nn=(ei={},A(A(A(A(A(A(A(A(A(A(ei,M.TextPrimary,"rgba(55, 65, 75, 1)"),M.TextSecondary,"rgba(118, 138, 159, 1)"),M.TextSecondaryInvert,"rgba(213, 216, 220, 1)"),M.TextPlaceholder,"rgba(169, 182, 194, 1)"),M.TextWarning,"rgba(196, 110, 0, 1)"),M.TextError,"rgba(185, 33, 46, 1)"),M.TextInfo,"rgba(35, 117, 171, 1)"),M.AccentPrimary,"rgba(104, 121, 235, 1)"),M.AccentPrimaryHover,"rgba(96, 111, 209, 1)"),M.AccentPrimaryActive,"rgba(73, 88, 188, 1)"),A(A(A(A(A(A(A(A(A(A(ei,M.AccentPrimaryDisabled,"rgba(233, 238, 242, 1)"),M.AccentSecondaryDisabled,"#F9FBFC"),M.AccentStateless,"rgba(104, 121, 235, 1)"),M.AccentStateless_0_4_Opacity,"rgba(104, 121, 235, 0.4)"),M.Accent_0_5_Opacity,"rgba(104, 121, 235, 0.05)"),M.Accent_1_2_Opacity,"rgba(104, 121, 235, 0.12)"),M.Accent_1_8_Opacity,"rgba(104, 121, 235, 0.18)"),M.Accent_2_8_Opacity,"rgba(104, 121, 235, 0.28)"),M.Accent_4_0_Opacity,"rgba(104, 121, 235, 0.4)"),M.BackgroundGrey,"rgba(216, 224, 232, 1)"),A(A(A(A(A(A(A(A(A(A(ei,M.BackgroundStateless,"rgba(255, 255, 255, 1)"),M.BackgroundActive,"rgba(243, 247, 250, 1)"),M.BackgroundBaseLight,"rgba(235, 239, 252, 1)"),M.BackgroundBaseMedium,"rgba(227, 231, 251, 1)"),M.BackgroundPrimary,"rgba(248, 250, 251, 1)"),M.BackgroundPrimaryLight,"rgba(243, 245, 247, 1)"),M.BackgroundPrimaryHover,"rgba(239, 243, 246, 1)"),M.BackgroundPrimaryActive,"rgba(93, 109, 126, 1)"),M.BackgroundPrimary_0_5_Opacity,"rgba(255, 255, 255, 0.500)"),M.BackgroundPrimaryStateless,"#CCD6DE"),A(A(A(A(A(A(A(A(A(A(ei,M.BackgroundSecondary,"rgba(255, 255, 255, 1)"),M.BackgroundHover,"rgba(249, 251, 252, 1)"),M.BackgroundGreen,"rgba(237, 250, 244, 1)"),M.BackgroundGreenMedium,"rgba(227, 250, 239, 1)"),M.BackgroundBlue,"rgba(244, 249, 255, 1)"),M.BackgroundRed,"rgba(253, 244, 242, 1)"),M.BackgroundRedLight,"rgba(255, 245, 245, 1)"),M.BackgroundRedMedium,"rgba(247, 228, 230, 1)"),M.BackgroundOrange,"rgba(255, 249, 242, 1)"),M.BackgroundTooltip,"rgba(79, 98, 118, 1)"),A(A(A(A(A(A(A(A(A(A(ei,M.IconsPrimary,"rgba(118, 138, 159, 1)"),M.IconsPrimaryOpacity_0_6,"rgba(93, 109, 126, 0.600)"),M.IconsSecondary,"rgba(151, 166, 182, 1)"),M.IconsPlaceholder,"rgba(223, 231, 237, 1)"),M.IconsInvert,"rgba(255, 255, 255, 1)"),M.IconsMuted,"rgba(169, 182, 194, 1)"),M.IconsPrimaryHover,"rgba(79, 98, 118, 1)"),M.IconsSecondaryHover,"rgba(118, 138, 159, 1)"),M.ButtonPrimaryText,"rgba(255, 255, 255, 1)"),M.ButtonPrimaryText_0_6,"rgba(255, 255, 255, 0.6)"),A(A(A(A(A(A(A(A(A(A(ei,M.ButtonPrimaryText_0_4,"rgba(255, 255, 255, 0.4)"),M.ButtonDisabledText,"rgba(169, 182, 194, 1)"),M.ButtonSecondaryText,"rgba(0, 0, 0, 1)"),M.LinkPrimary,"rgba(118, 138, 159, 1)"),M.LinkStateless,"rgba(118, 138, 159, 1)"),M.LinkHover,"rgba(79, 98, 118, 1)"),M.LinkActive,"rgba(55, 65, 75, 1)"),M.LinkPressed,"rgba(104, 121, 235, 1)"),M.LinkMuted,"rgba(169, 182, 194, 1)"),M.BordersPrimary,"rgba(204, 214, 222, 1)"),A(A(A(A(A(A(A(A(A(A(ei,M.BordersPrimaryHover,"rgba(104, 118, 134, 1)"),M.BordersSecondary,"rgba(236, 240, 243, 1)"),M.BordersStrong,"rgba(204, 214, 222, 1)"),M.BordersInvert,"rgba(85, 99, 115, 1)"),M.BorderHoverBottom,"rgba(104, 121, 235, 0.18)"),M.BorderActiveBottom,"#4958BC"),M.BorderPrimaryStateless,"rgba(204, 214, 222, 1)"),M.BordersDisabled,"rgba(73, 88, 188, 0.4)"),M.BordersButton,"rgba(151, 166, 182, 1)"),M.BordersItem,"rgba(226, 232, 236, 1)"),A(A(A(A(A(A(A(A(A(A(ei,M.BordersBaseLight,"rgba(211, 219, 250, 1)"),M.BordersBaseMedium,"rgba(164, 175, 227, 1)"),M.BordersGreen,"rgba(27, 161, 99, 0.22)"),M.BordersGreenMedium,"rgba(27, 161, 99, 0.4)"),M.BordersRed,"rgba(185, 33, 46, 0.4)"),M.ActiveSecondary,"#FFFFFF"),M.ActiveSecondaryHover,"rgba(104, 121, 235, 0.05)"),M.Error,"rgba(246, 61, 61, 1)"),M.Error_0_28_Opacity,"rgba(185, 33, 46, 0.28)"),M.Error_0_12_Opacity,"rgba(255, 86, 78, 0.1)"),A(A(A(A(A(A(A(A(A(A(ei,M.ErrorHover,"rgba(216, 46, 46, 1)"),M.ErrorActive,"rgba(185, 33, 46, 1)"),M.Success,"rgba(38, 193, 122, 1)"),M.SuccessHover,"rgba(30, 154, 98, 1)"),M.SuccessActive,"rgba(23, 116, 73, 1)"),M.Warning,"rgba(255, 172, 74, 1)"),M.WarningHover,"rgba(237, 145, 7, 1)"),M.WarningActive,"rgba(224, 135, 0, 1)"),M.Info,"rgba(41, 127, 184, 1)"),M.Modified,"rgba(165, 166, 246, 1)"),A(A(A(A(A(A(A(A(A(A(ei,M.Red,"rgba(219, 46, 50, 1)"),M.Orange,"rgba(255, 168, 0, 1)"),M.Salad,"rgba(143, 176, 33, 1)"),M.Green,"rgba(22, 160, 134, 1)"),M.Blue,"rgba(41, 127, 184, 1)"),M.Indigo,"rgba(91, 72, 162, 1)"),M.Violet,"rgba(141, 68, 173, 1)"),M.Pink,"rgba(211, 92, 158, 1)"),M.GradientRight,"linear-gradient(270deg, #FFFFFF 1.56%, rgba(255, 255, 255, 0.89) 52.4%, rgba(255, 255, 255, 0.532165) 76.04%, rgba(255, 255, 255, 0) 100%)"),M.Extra_0_3_Overlay,"rgba(79, 98, 118, 0.3)"),A(A(A(A(A(A(A(A(A(A(ei,M.GradientRightActive,"linear-gradient(270deg, #F3F7FA 1.56%, #F3F7FA 52.4%, rgba(243, 247, 250, 0.53) 76.04%, rgba(243, 247, 250, 0) 100%)"),M.GradientRightHover,"linear-gradient(270deg, #F9FBFC 1.56%, #F9FBFC 52.4%, rgba(249, 251, 252, 0.53) 76.04%, rgba(249, 251, 252, 0) 100%)"),M.Extra_0_5_Overlay,"rgba(79, 98, 118, 0.5)"),M.Extra_0_7_Overlay,"rgba(79, 98, 118, 0.7)"),M.Extra_0_9_Overlay,"rgba(79, 98, 118, 0.9)"),M.Red_0_1_Overlay,"rgba(232, 91, 70, 0.1)"),M.Orange_0_1_Overlay,"rgba(250, 157, 47, 0.1)"),M.Accent_0_8_Overlay,"rgba(104, 121, 235, 0.08)"),M.Link,"rgba(250, 166, 68, 1)"),M.Camera,"rgba(73, 186, 224, 1)"),A(A(A(A(A(A(A(A(A(A(ei,M.GoogleDrive,"rgba(81, 136, 238, 1)"),M.Dropbox,"rgba(17, 40, 124, 1)"),M.OneDrive,"rgba(40, 100, 186, 1)"),M.Device,"rgba(102, 73, 209, 1)"),M.Instagram,"rgba(244, 70, 154, 1)"),M.Unsplash,"rgba(173, 38, 220, 1)"),M.FreeImages,"rgba(16, 163, 135, 1)"),M.FreeIcons,"rgba(62, 207, 139, 1)"),M.Canvas,"rgba(36, 190, 202, 1)"),M.Box,"rgba(0, 97, 213, 1)"),A(A(A(A(A(A(A(ei,M.ScreenCast,"rgba(48, 61, 78, 1)"),M.Tag,"#889AAC"),M.StatesErrorDisabledText,"rgba(185, 33, 46, 0.3)"),M.LightShadow,"rgba(146, 166, 188, 0.2)"),M.MediumShadow,"rgba(146, 166, 188, 0.24)"),M.LargeShadow,"rgba(146, 166, 188, 0.32)"),M.XLargeShadow,"rgba(146, 166, 188, 0.5)")),HF=Nn,F4,GF=(F4={},A(A(A(A(A(A(A(A(A(A(F4,ni.ShadowSm,"0px 1px 2px 0px rgba(146, 166, 188, 0.2)"),ni.ShadowMd," 0px 1px 4px 0px rgba(146, 166, 188, 0.24)"),ni.ShadowLg," 0px 2px 6px 0px rgba(146, 166, 188, 0.32)"),ni.ShadowXl," 0px 2px 6px 0px rgba(146, 166, 188, 0.5)"),ni.Label," 0px 1px 3px 0px rgba(77, 78, 78, 0.15)"),ni.Header," 0px 6px 10px 0px rgba(146, 166, 188, 0.2)"),ni.HeaderPopup," 0px 3px 7px 0px rgba(146, 166, 188, 0.16)"),ni.FooterPopup," 0px -4px 8px 0px rgba(208, 215, 220, 0.22)"),ni.LeftPanelMd," 6px 8px 12px 0px rgba(146, 166, 188, 0.14)"),ni.RightPanelMd,"-6px 8px 12px 0px rgba(146, 166, 188, 0.14)"),A(A(F4,ni.LeftPanelSm,"6px -4px 12px 0px rgba(146, 166, 188, 0.14)"),ni.RightPanelSm,"-6px -4px 12px 0px rgba(146, 166, 188, 0.14)")),VF=GF,$w={values:A(A(A(A(A(A(A({},Rn.Xs,0),Rn.Sm,576),Rn.Md,768),Rn.Lg,1084),Rn.Xl,1342),Rn.Xxl,1600),Rn.Xxxl,1920),classes:A(A(A(A(A(A(A({},Rn.Xs,".sfx-breakpoint-xs"),Rn.Sm,".sfx-breakpoint-sm"),Rn.Md,".sfx-breakpoint-md"),Rn.Lg,".sfx-breakpoint-lg"),Rn.Xl,".sfx-breakpoint-xl"),Rn.Xxl,".sfx-breakpoint-xxl"),Rn.Xxxl,".sfx-breakpoint-xxxl")},UF=function(e){var r=e.values,n=r===void 0?$w.values:r,i=e.classes,o=i===void 0?$w.classes:i,a="px",s=Object.keys(n),c=function(m){var w=typeof n[m]=="number"?n[m]:m;return"@media (min-width:".concat(w).concat(a,")")},d=function(m){var w=n[m];return"@media (max-width:".concat(w).concat(a,")")},h=function(m,w){var x=s.indexOf(w);return"@media (min-width:".concat(n[m]).concat(a,") and (max-width:").concat(n[s[x]]).concat(a,")")},C=function(m){return s.indexOf(m)+1<s.length?h(m,s[s.indexOf(m)+1]):c(m)},v=function(m,w){var x=function(O){return O.slice(1)};return m>=n.xs&&m<n.sm?w?x(o.xs):o.xs:m>=n.sm&&m<n.md?w?x(o.sm):o.sm:m>=n.md&&m<n.lg?w?x(o.md):o.md:m>=n.lg&&m<n.xl?w?x(o.lg):o.lg:m>=n.xl&&m<n.xxl?w?x(o.xl):o.xl:m>=n.xxl&&m<n.xxxl?w?x(o.xxl):o.xxl:m>=n.xxxl?w?x(o.xxxl):o.xxxl:w?x(o.md):o.md};return{keys:s,values:n,classes:o,getBreakpointClass:v,up:c,down:d,between:h,only:C}};function Bw(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function as(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Bw(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Bw(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var WF={borderRadius:A(A(A({},go.Sm,"2px"),go.Md,"4px"),go.Lg,"8px")},dk=function(e){var r=e.children,n=e.theme,i=n===void 0?{}:n,o=i.palette,a=o===void 0?{}:o,s=i.breakpoints,c=s===void 0?{}:s,d=i.typography,h=d===void 0?{}:d,C=i.shape,v=C===void 0?{}:C,g=i.shadows,m=g===void 0?{}:g,w=G.useMemo(function(){var x=as(as({},HF),a),b=UF(c),O=as(as({},VF),m);return{palette:x,breakpoints:b,typography:uk(h),shape:as({},_F(as({},WF),as({},v))),shadows:O}},[JSON.stringify(i)]);return y.createElement(CF,{theme:w},y.createElement(y.Fragment,null,PF(r,w),y.createElement(BF,null),y.createElement(NF,null)))},w8=uk();w8.baseLineHeight;w8.font;var XF=ve(w8,["baseLineHeight","font"]);dk.propTypes={children:j.oneOfType([j.node,j.func,j.arrayOf(j.node)]).isRequired,theme:j.exact({breakpoints:j.exact({keys:j.arrayOf(j.string),values:j.exact(yl(ht(Rn),j.number)),classes:j.exact(yl(ht(Rn),j.string)),getBreakpointClass:j.func,up:j.func,down:j.func,between:j.func,only:j.func}),palette:j.exact(yl(ht(M),j.string)),shadows:j.exact(yl(ht(ni),j.string)),shape:j.exact({borderRadius:j.exact(yl(ht(go),j.string))}),typography:j.exact(as({baseLineHeight:j.oneOfType([j.string,j.number]),font:j.exact(yl(ht(ke),j.object))},yl(OF(XF),j.string)))})};function hk(t){if(Array.isArray(t))return t}function KF(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,o,a,s=[],c=!0,d=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);c=!0);}catch(h){d=!0,i=h}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(d)throw i}}return s}}function fk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ie(t,e){return hk(t)||KF(t,e)||v8(t,e)||fk()}function he(){return he=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},he.apply(null,arguments)}var pk={exports:{}},Tp={},k2={},ft={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t._registerNode=t.Konva=t.glob=void 0;const e=Math.PI/180;function r(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}t.glob=typeof gs<"u"?gs:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},t.Konva={_global:t.glob,version:"9.3.20",isBrowser:r(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return t.Konva.angleDeg?i*e:i},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 t.Konva.DD.isDragging},isTransforming(){var i;return(i=t.Konva.Transformer)===null||i===void 0?void 0:i.isTransforming()},isDragReady(){return!!t.Konva.DD.node},releaseCanvasOnDestroy:!0,document:t.glob.document,_injectGlobal(i){t.glob.Konva=i}};const n=i=>{t.Konva[i.prototype.getClassName()]=i};t._registerNode=n,t.Konva._injectGlobal(t.Konva)})(ft);var Or={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Transform=void 0;const e=ft;class r{constructor(S=[1,0,0,1,0,0]){this.dirty=!1,this.m=S&&S.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 r(this.m)}copyInto(S){S.m[0]=this.m[0],S.m[1]=this.m[1],S.m[2]=this.m[2],S.m[3]=this.m[3],S.m[4]=this.m[4],S.m[5]=this.m[5]}point(S){const E=this.m;return{x:E[0]*S.x+E[2]*S.y+E[4],y:E[1]*S.x+E[3]*S.y+E[5]}}translate(S,E){return this.m[4]+=this.m[0]*S+this.m[2]*E,this.m[5]+=this.m[1]*S+this.m[3]*E,this}scale(S,E){return this.m[0]*=S,this.m[1]*=S,this.m[2]*=E,this.m[3]*=E,this}rotate(S){const E=Math.cos(S),I=Math.sin(S),R=this.m[0]*E+this.m[2]*I,k=this.m[1]*E+this.m[3]*I,N=this.m[0]*-I+this.m[2]*E,T=this.m[1]*-I+this.m[3]*E;return this.m[0]=R,this.m[1]=k,this.m[2]=N,this.m[3]=T,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(S,E){const I=this.m[0]+this.m[2]*E,R=this.m[1]+this.m[3]*E,k=this.m[2]+this.m[0]*S,N=this.m[3]+this.m[1]*S;return this.m[0]=I,this.m[1]=R,this.m[2]=k,this.m[3]=N,this}multiply(S){const E=this.m[0]*S.m[0]+this.m[2]*S.m[1],I=this.m[1]*S.m[0]+this.m[3]*S.m[1],R=this.m[0]*S.m[2]+this.m[2]*S.m[3],k=this.m[1]*S.m[2]+this.m[3]*S.m[3],N=this.m[0]*S.m[4]+this.m[2]*S.m[5]+this.m[4],T=this.m[1]*S.m[4]+this.m[3]*S.m[5]+this.m[5];return this.m[0]=E,this.m[1]=I,this.m[2]=R,this.m[3]=k,this.m[4]=N,this.m[5]=T,this}invert(){const S=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),E=this.m[3]*S,I=-this.m[1]*S,R=-this.m[2]*S,k=this.m[0]*S,N=S*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),T=S*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=E,this.m[1]=I,this.m[2]=R,this.m[3]=k,this.m[4]=N,this.m[5]=T,this}getMatrix(){return this.m}decompose(){const S=this.m[0],E=this.m[1],I=this.m[2],R=this.m[3],k=this.m[4],N=this.m[5],T=S*R-E*I,D={x:k,y:N,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(S!=0||E!=0){const z=Math.sqrt(S*S+E*E);D.rotation=E>0?Math.acos(S/z):-Math.acos(S/z),D.scaleX=z,D.scaleY=T/z,D.skewX=(S*I+E*R)/T,D.skewY=0}else if(I!=0||R!=0){const z=Math.sqrt(I*I+R*R);D.rotation=Math.PI/2-(R>0?Math.acos(-I/z):-Math.acos(I/z)),D.scaleX=T/z,D.scaleY=z,D.skewX=0,D.skewY=(S*I+E*R)/T}return D.rotation=t.Util._getRotation(D.rotation),D}}t.Transform=r;const n="[object Array]",i="[object Number]",o="[object String]",a="[object Boolean]",s=Math.PI/180,c=180/Math.PI,d="#",h="",C="0",v="Konva warning: ",g="Konva error: ",m="rgb(",w={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]},x=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let b=[];const O=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(f){setTimeout(f,60)};t.Util={_isElement(f){return!!(f&&f.nodeType==1)},_isFunction(f){return!!(f&&f.constructor&&f.call&&f.apply)},_isPlainObject(f){return!!f&&f.constructor===Object},_isArray(f){return Object.prototype.toString.call(f)===n},_isNumber(f){return Object.prototype.toString.call(f)===i&&!isNaN(f)&&isFinite(f)},_isString(f){return Object.prototype.toString.call(f)===o},_isBoolean(f){return Object.prototype.toString.call(f)===a},isObject(f){return f instanceof Object},isValidSelector(f){if(typeof f!="string")return!1;const S=f[0];return S==="#"||S==="."||S===S.toUpperCase()},_sign(f){return f===0||f>0?1:-1},requestAnimFrame(f){b.push(f),b.length===1&&O(function(){const S=b;b=[],S.forEach(function(E){E()})})},createCanvasElement(){const f=document.createElement("canvas");try{f.style=f.style||{}}catch{}return f},createImageElement(){return document.createElement("img")},_isInDocument(f){for(;f=f.parentNode;)if(f==document)return!0;return!1},_urlToImage(f,S){const E=t.Util.createImageElement();E.onload=function(){S(E)},E.src=f},_rgbToHex(f,S,E){return((1<<24)+(f<<16)+(S<<8)+E).toString(16).slice(1)},_hexToRgb(f){f=f.replace(d,h);const S=parseInt(f,16);return{r:S>>16&255,g:S>>8&255,b:S&255}},getRandomColor(){let f=(Math.random()*16777215<<0).toString(16);for(;f.length<6;)f=C+f;return d+f},getRGB(f){let S;return f in w?(S=w[f],{r:S[0],g:S[1],b:S[2]}):f[0]===d?this._hexToRgb(f.substring(1)):f.substr(0,4)===m?(S=x.exec(f.replace(/ /g,"")),{r:parseInt(S[1],10),g:parseInt(S[2],10),b:parseInt(S[3],10)}):{r:0,g:0,b:0}},colorToRGBA(f){return f=f||"black",t.Util._namedColorToRBA(f)||t.Util._hex3ColorToRGBA(f)||t.Util._hex4ColorToRGBA(f)||t.Util._hex6ColorToRGBA(f)||t.Util._hex8ColorToRGBA(f)||t.Util._rgbColorToRGBA(f)||t.Util._rgbaColorToRGBA(f)||t.Util._hslColorToRGBA(f)},_namedColorToRBA(f){const S=w[f.toLowerCase()];return S?{r:S[0],g:S[1],b:S[2],a:1}:null},_rgbColorToRGBA(f){if(f.indexOf("rgb(")===0){f=f.match(/rgb\(([^)]+)\)/)[1];const S=f.split(/ *, */).map(Number);return{r:S[0],g:S[1],b:S[2],a:1}}},_rgbaColorToRGBA(f){if(f.indexOf("rgba(")===0){f=f.match(/rgba\(([^)]+)\)/)[1];const S=f.split(/ *, */).map((E,I)=>E.slice(-1)==="%"?I===3?parseInt(E)/100:parseInt(E)/100*255:Number(E));return{r:S[0],g:S[1],b:S[2],a:S[3]}}},_hex8ColorToRGBA(f){if(f[0]==="#"&&f.length===9)return{r:parseInt(f.slice(1,3),16),g:parseInt(f.slice(3,5),16),b:parseInt(f.slice(5,7),16),a:parseInt(f.slice(7,9),16)/255}},_hex6ColorToRGBA(f){if(f[0]==="#"&&f.length===7)return{r:parseInt(f.slice(1,3),16),g:parseInt(f.slice(3,5),16),b:parseInt(f.slice(5,7),16),a:1}},_hex4ColorToRGBA(f){if(f[0]==="#"&&f.length===5)return{r:parseInt(f[1]+f[1],16),g:parseInt(f[2]+f[2],16),b:parseInt(f[3]+f[3],16),a:parseInt(f[4]+f[4],16)/255}},_hex3ColorToRGBA(f){if(f[0]==="#"&&f.length===4)return{r:parseInt(f[1]+f[1],16),g:parseInt(f[2]+f[2],16),b:parseInt(f[3]+f[3],16),a:1}},_hslColorToRGBA(f){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(f)){const[S,...E]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(f),I=Number(E[0])/360,R=Number(E[1])/100,k=Number(E[2])/100;let N,T,D;if(R===0)return D=k*255,{r:Math.round(D),g:Math.round(D),b:Math.round(D),a:1};k<.5?N=k*(1+R):N=k+R-k*R;const z=2*k-N,B=[0,0,0];for(let Y=0;Y<3;Y++)T=I+1/3*-(Y-1),T<0&&T++,T>1&&T--,6*T<1?D=z+(N-z)*6*T:2*T<1?D=N:3*T<2?D=z+(N-z)*(2/3-T)*6:D=z,B[Y]=D*255;return{r:Math.round(B[0]),g:Math.round(B[1]),b:Math.round(B[2]),a:1}}},haveIntersection(f,S){return!(S.x>f.x+f.width||S.x+S.width<f.x||S.y>f.y+f.height||S.y+S.height<f.y)},cloneObject(f){const S={};for(const E in f)this._isPlainObject(f[E])?S[E]=this.cloneObject(f[E]):this._isArray(f[E])?S[E]=this.cloneArray(f[E]):S[E]=f[E];return S},cloneArray(f){return f.slice(0)},degToRad(f){return f*s},radToDeg(f){return f*c},_degToRad(f){return t.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),t.Util.degToRad(f)},_radToDeg(f){return t.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),t.Util.radToDeg(f)},_getRotation(f){return e.Konva.angleDeg?t.Util.radToDeg(f):f},_capitalize(f){return f.charAt(0).toUpperCase()+f.slice(1)},throw(f){throw new Error(g+f)},error(f){console.error(g+f)},warn(f){e.Konva.showWarnings&&console.warn(v+f)},each(f,S){for(const E in f)S(E,f[E])},_inRange(f,S,E){return S<=f&&f<E},_getProjectionToSegment(f,S,E,I,R,k){let N,T,D;const z=(f-E)*(f-E)+(S-I)*(S-I);if(z==0)N=f,T=S,D=(R-E)*(R-E)+(k-I)*(k-I);else{const B=((R-f)*(E-f)+(k-S)*(I-S))/z;B<0?(N=f,T=S,D=(f-R)*(f-R)+(S-k)*(S-k)):B>1?(N=E,T=I,D=(E-R)*(E-R)+(I-k)*(I-k)):(N=f+B*(E-f),T=S+B*(I-S),D=(N-R)*(N-R)+(T-k)*(T-k))}return[N,T,D]},_getProjectionToLine(f,S,E){const I=t.Util.cloneObject(f);let R=Number.MAX_VALUE;return S.forEach(function(k,N){if(!E&&N===S.length-1)return;const T=S[(N+1)%S.length],D=t.Util._getProjectionToSegment(k.x,k.y,T.x,T.y,f.x,f.y),z=D[0],B=D[1],Y=D[2];Y<R&&(I.x=z,I.y=B,R=Y)}),I},_prepareArrayForTween(f,S,E){const I=[],R=[];if(f.length>S.length){const N=S;S=f,f=N}for(let N=0;N<f.length;N+=2)I.push({x:f[N],y:f[N+1]});for(let N=0;N<S.length;N+=2)R.push({x:S[N],y:S[N+1]});const k=[];return R.forEach(function(N){const T=t.Util._getProjectionToLine(N,I,E);k.push(T.x),k.push(T.y)}),k},_prepareToStringify(f){let S;f.visitedByCircularReferenceRemoval=!0;for(const E in f)if(f.hasOwnProperty(E)&&f[E]&&typeof f[E]=="object"){if(S=Object.getOwnPropertyDescriptor(f,E),f[E].visitedByCircularReferenceRemoval||t.Util._isElement(f[E]))if(S.configurable)delete f[E];else return null;else if(t.Util._prepareToStringify(f[E])===null)if(S.configurable)delete f[E];else return null}return delete f.visitedByCircularReferenceRemoval,f},_assign(f,S){for(const E in S)f[E]=S[E];return f},_getFirstPointerId(f){return f.touches?f.changedTouches[0].identifier:f.pointerId||999},releaseCanvas(...f){e.Konva.releaseCanvasOnDestroy&&f.forEach(S=>{S.width=0,S.height=0})},drawRoundedRectPath(f,S,E,I){let R=0,k=0,N=0,T=0;typeof I=="number"?R=k=N=T=Math.min(I,S/2,E/2):(R=Math.min(I[0]||0,S/2,E/2),k=Math.min(I[1]||0,S/2,E/2),T=Math.min(I[2]||0,S/2,E/2),N=Math.min(I[3]||0,S/2,E/2)),f.moveTo(R,0),f.lineTo(S-k,0),f.arc(S-k,k,k,Math.PI*3/2,0,!1),f.lineTo(S,E-T),f.arc(S-T,E-T,T,0,Math.PI/2,!1),f.lineTo(N,E),f.arc(N,E-N,N,Math.PI/2,Math.PI,!1),f.lineTo(0,R),f.arc(R,R,R,Math.PI,Math.PI*3/2,!1)}}})(Or);var fr={},wt={},Xe={};Object.defineProperty(Xe,"__esModule",{value:!0});Xe.RGBComponent=YF;Xe.alphaComponent=ZF;Xe.getNumberValidator=qF;Xe.getNumberOrArrayOfNumbersValidator=QF;Xe.getNumberOrAutoValidator=JF;Xe.getStringValidator=eD;Xe.getStringOrGradientValidator=tD;Xe.getFunctionValidator=rD;Xe.getNumberArrayValidator=nD;Xe.getBooleanValidator=iD;Xe.getComponentValidator=oD;const Ra=ft,Tr=Or;function Na(t){return Tr.Util._isString(t)?'"'+t+'"':Object.prototype.toString.call(t)==="[object Number]"||Tr.Util._isBoolean(t)?t:Object.prototype.toString.call(t)}function YF(t){return t>255?255:t<0?0:Math.round(t)}function ZF(t){return t>1?1:t<1e-4?1e-4:t}function qF(){if(Ra.Konva.isUnminified)return function(t,e){return Tr.Util._isNumber(t)||Tr.Util.warn(Na(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}function QF(t){if(Ra.Konva.isUnminified)return function(e,r){let n=Tr.Util._isNumber(e),i=Tr.Util._isArray(e)&&e.length==t;return!n&&!i&&Tr.Util.warn(Na(e)+' is a not valid value for "'+r+'" attribute. The value should be a number or Array<number>('+t+")"),e}}function JF(){if(Ra.Konva.isUnminified)return function(t,e){var r=Tr.Util._isNumber(t),n=t==="auto";return r||n||Tr.Util.warn(Na(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}function eD(){if(Ra.Konva.isUnminified)return function(t,e){return Tr.Util._isString(t)||Tr.Util.warn(Na(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function tD(){if(Ra.Konva.isUnminified)return function(t,e){const r=Tr.Util._isString(t),n=Object.prototype.toString.call(t)==="[object CanvasGradient]"||t&&t.addColorStop;return r||n||Tr.Util.warn(Na(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function rD(){if(Ra.Konva.isUnminified)return function(t,e){return Tr.Util._isFunction(t)||Tr.Util.warn(Na(t)+' is a not valid value for "'+e+'" attribute. The value should be a function.'),t}}function nD(){if(Ra.Konva.isUnminified)return function(t,e){const r=Int8Array?Object.getPrototypeOf(Int8Array):null;return r&&t instanceof r||(Tr.Util._isArray(t)?t.forEach(function(n){Tr.Util._isNumber(n)||Tr.Util.warn('"'+e+'" attribute has non numeric element '+n+". Make sure that all elements are numbers.")}):Tr.Util.warn(Na(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}function iD(){if(Ra.Konva.isUnminified)return function(t,e){var r=t===!0||t===!1;return r||Tr.Util.warn(Na(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}function oD(t){if(Ra.Konva.isUnminified)return function(e,r){return e==null||Tr.Util.isObject(e)||Tr.Util.warn(Na(e)+' is a not valid value for "'+r+'" attribute. The value should be an object with properties '+t),e}}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Factory=void 0;const e=Or,r=Xe,n="get",i="set";t.Factory={addGetterSetter(o,a,s,c,d){t.Factory.addGetter(o,a,s),t.Factory.addSetter(o,a,c,d),t.Factory.addOverloadedGetterSetter(o,a)},addGetter(o,a,s){var c=n+e.Util._capitalize(a);o.prototype[c]=o.prototype[c]||function(){const d=this.attrs[a];return d===void 0?s:d}},addSetter(o,a,s,c){var d=i+e.Util._capitalize(a);o.prototype[d]||t.Factory.overWriteSetter(o,a,s,c)},overWriteSetter(o,a,s,c){var d=i+e.Util._capitalize(a);o.prototype[d]=function(h){return s&&h!==void 0&&h!==null&&(h=s.call(this,h,a)),this._setAttr(a,h),c&&c.call(this),this}},addComponentsGetterSetter(o,a,s,c,d){const h=s.length,C=e.Util._capitalize,v=n+C(a),g=i+C(a);o.prototype[v]=function(){const w={};for(let x=0;x<h;x++){const b=s[x];w[b]=this.getAttr(a+C(b))}return w};const m=(0,r.getComponentValidator)(s);o.prototype[g]=function(w){const x=this.attrs[a];c&&(w=c.call(this,w,a)),m&&m.call(this,w,a);for(const b in w)w.hasOwnProperty(b)&&this._setAttr(a+C(b),w[b]);return w||s.forEach(b=>{this._setAttr(a+C(b),void 0)}),this._fireChangeEvent(a,x,w),d&&d.call(this),this},t.Factory.addOverloadedGetterSetter(o,a)},addOverloadedGetterSetter(o,a){var s=e.Util._capitalize(a),c=i+s,d=n+s;o.prototype[a]=function(){return arguments.length?(this[c](arguments[0]),this):this[d]()}},addDeprecatedGetterSetter(o,a,s,c){e.Util.error("Adding deprecated "+a);const d=n+e.Util._capitalize(a),h=a+" property is deprecated and will be removed soon. Look at Konva change log for more information.";o.prototype[d]=function(){e.Util.error(h);const C=this.attrs[a];return C===void 0?s:C},t.Factory.addSetter(o,a,c,function(){e.Util.error(h)}),t.Factory.addOverloadedGetterSetter(o,a)},backCompat(o,a){e.Util.each(a,function(s,c){const d=o.prototype[c],h=n+e.Util._capitalize(s),C=i+e.Util._capitalize(s);function v(){d.apply(this,arguments),e.Util.error('"'+s+'" method is deprecated and will be removed soon. Use ""'+c+'" instead.')}o.prototype[s]=v,o.prototype[h]=v,o.prototype[C]=v})},afterSetFilter(){this._filterUpToDate=!1}}})(wt);var mo={},Oa={};Object.defineProperty(Oa,"__esModule",{value:!0});Oa.HitContext=Oa.SceneContext=Oa.Context=void 0;const gk=Or,aD=ft;function sD(t){const e=[],r=t.length,n=gk.Util;for(let i=0;i<r;i++){let o=t[i];n._isNumber(o)?o=Math.round(o*1e3)/1e3:n._isString(o)||(o=o+""),e.push(o)}return e}const Hw=",",lD="(",cD=")",uD="([",dD="])",hD=";",fD="()",pD="=",Gw=["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"],gD=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"],mD=100;let Ip=class{constructor(e){this.canvas=e,aD.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,r){let n=this.traceArr,i=n.length,o="",a,s,c,d;for(a=0;a<i;a++)s=n[a],c=s.method,c?(d=s.args,o+=c,e?o+=fD:gk.Util._isArray(d[0])?o+=uD+d.join(Hw)+dD:(r&&(d=d.map(h=>typeof h=="number"?Math.floor(h):h)),o+=lD+d.join(Hw)+cD)):(o+=s.property,e||(o+=pD+s.val)),o+=hD;return o}clearTrace(){this.traceArr=[]}_trace(e){let r=this.traceArr,n;r.push(e),n=r.length,n>=mD&&r.shift()}reset(){const e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){const r=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,r.getWidth()/r.pixelRatio,r.getHeight()/r.pixelRatio)}_applyLineCap(e){const r=e.attrs.lineCap;r&&this.setAttr("lineCap",r)}_applyOpacity(e){const r=e.getAbsoluteOpacity();r!==1&&this.setAttr("globalAlpha",r)}_applyLineJoin(e){const r=e.attrs.lineJoin;r&&this.setAttr("lineJoin",r)}setAttr(e,r){this._context[e]=r}arc(e,r,n,i,o,a){this._context.arc(e,r,n,i,o,a)}arcTo(e,r,n,i,o){this._context.arcTo(e,r,n,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(e,r,n,i,o,a){this._context.bezierCurveTo(e,r,n,i,o,a)}clearRect(e,r,n,i){this._context.clearRect(e,r,n,i)}clip(...e){this._context.clip.apply(this._context,e)}closePath(){this._context.closePath()}createImageData(e,r){const n=arguments;if(n.length===2)return this._context.createImageData(e,r);if(n.length===1)return this._context.createImageData(e)}createLinearGradient(e,r,n,i){return this._context.createLinearGradient(e,r,n,i)}createPattern(e,r){return this._context.createPattern(e,r)}createRadialGradient(e,r,n,i,o,a){return this._context.createRadialGradient(e,r,n,i,o,a)}drawImage(e,r,n,i,o,a,s,c,d){const h=arguments,C=this._context;h.length===3?C.drawImage(e,r,n):h.length===5?C.drawImage(e,r,n,i,o):h.length===9&&C.drawImage(e,r,n,i,o,a,s,c,d)}ellipse(e,r,n,i,o,a,s,c){this._context.ellipse(e,r,n,i,o,a,s,c)}isPointInPath(e,r,n,i){return n?this._context.isPointInPath(n,e,r,i):this._context.isPointInPath(e,r,i)}fill(...e){this._context.fill.apply(this._context,e)}fillRect(e,r,n,i){this._context.fillRect(e,r,n,i)}strokeRect(e,r,n,i){this._context.strokeRect(e,r,n,i)}fillText(e,r,n,i){i?this._context.fillText(e,r,n,i):this._context.fillText(e,r,n)}measureText(e){return this._context.measureText(e)}getImageData(e,r,n,i){return this._context.getImageData(e,r,n,i)}lineTo(e,r){this._context.lineTo(e,r)}moveTo(e,r){this._context.moveTo(e,r)}rect(e,r,n,i){this._context.rect(e,r,n,i)}roundRect(e,r,n,i,o){this._context.roundRect(e,r,n,i,o)}putImageData(e,r,n){this._context.putImageData(e,r,n)}quadraticCurveTo(e,r,n,i){this._context.quadraticCurveTo(e,r,n,i)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,r){this._context.scale(e,r)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,r,n,i,o,a){this._context.setTransform(e,r,n,i,o,a)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,r,n,i){this._context.strokeText(e,r,n,i)}transform(e,r,n,i,o,a){this._context.transform(e,r,n,i,o,a)}translate(e,r){this._context.translate(e,r)}_enableTrace(){let e=this,r=Gw.length,n=this.setAttr,i,o;const a=function(s){let c=e[s],d;e[s]=function(){return o=sD(Array.prototype.slice.call(arguments,0)),d=c.apply(e,arguments),e._trace({method:s,args:o}),d}};for(i=0;i<r;i++)a(Gw[i]);e.setAttr=function(){n.apply(e,arguments);const s=arguments[0];let c=arguments[1];(s==="shadowOffsetX"||s==="shadowOffsetY"||s==="shadowBlur")&&(c=c/this.canvas.getPixelRatio()),e._trace({property:s,val:c})}}_applyGlobalCompositeOperation(e){const r=e.attrs.globalCompositeOperation;!r||r==="source-over"||this.setAttr("globalCompositeOperation",r)}};Oa.Context=Ip;gD.forEach(function(t){Object.defineProperty(Ip.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});let vD=class extends Ip{constructor(e,{willReadFrequently:r=!1}={}){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:r})}_fillColor(e){const r=e.fill();this.setAttr("fillStyle",r),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){const r=e._getLinearGradient();r&&(this.setAttr("fillStyle",r),e._fillFunc(this))}_fillRadialGradient(e){const r=e._getRadialGradient();r&&(this.setAttr("fillStyle",r),e._fillFunc(this))}_fill(e){const r=e.fill(),n=e.getFillPriority();if(r&&n==="color"){this._fillColor(e);return}const i=e.getFillPatternImage();if(i&&n==="pattern"){this._fillPattern(e);return}const o=e.getFillLinearGradientColorStops();if(o&&n==="linear-gradient"){this._fillLinearGradient(e);return}const a=e.getFillRadialGradientColorStops();if(a&&n==="radial-gradient"){this._fillRadialGradient(e);return}r?this._fillColor(e):i?this._fillPattern(e):o?this._fillLinearGradient(e):a&&this._fillRadialGradient(e)}_strokeLinearGradient(e){const r=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),i=e.getStrokeLinearGradientColorStops(),o=this.createLinearGradient(r.x,r.y,n.x,n.y);if(i){for(let a=0;a<i.length;a+=2)o.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",o)}}_stroke(e){const r=e.dash(),n=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!n){this.save();const o=this.getCanvas().getPixelRatio();this.setTransform(o,0,0,o,0,0)}this._applyLineCap(e),r&&e.dashEnabled()&&(this.setLineDash(r),this.setAttr("lineDashOffset",e.dashOffset())),this.setAttr("lineWidth",e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),e.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(e):this.setAttr("strokeStyle",e.stroke()),e._strokeFunc(this),n||this.restore()}}_applyShadow(e){var r,n,i;const o=(r=e.getShadowRGBA())!==null&&r!==void 0?r:"black",a=(n=e.getShadowBlur())!==null&&n!==void 0?n:5,s=(i=e.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},c=e.getAbsoluteScale(),d=this.canvas.getPixelRatio(),h=c.x*d,C=c.y*d;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",a*Math.min(Math.abs(h),Math.abs(C))),this.setAttr("shadowOffsetX",s.x*h),this.setAttr("shadowOffsetY",s.y*C)}};Oa.SceneContext=vD;let yD=class extends Ip{constructor(e){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:!0})}_fill(e){this.save(),this.setAttr("fillStyle",e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){const r=e.getStrokeScaleEnabled();if(!r){this.save();const o=this.getCanvas().getPixelRatio();this.setTransform(o,0,0,o,0,0)}this._applyLineCap(e);const n=e.hitStrokeWidth(),i=n==="auto"?e.strokeWidth():n;this.setAttr("lineWidth",i),this.setAttr("strokeStyle",e.colorKey),e._strokeFuncHit(this),r||this.restore()}}};Oa.HitContext=yD;Object.defineProperty(mo,"__esModule",{value:!0});mo.HitCanvas=mo.SceneCanvas=mo.Canvas=void 0;const T2=Or,mk=Oa,vk=ft;let Y1;function CD(){if(Y1)return Y1;const t=T2.Util.createCanvasElement(),e=t.getContext("2d");return Y1=function(){const r=vk.Konva._global.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return r/n}(),T2.Util.releaseCanvas(t),Y1}let S8=class{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const n=(e||{}).pixelRatio||vk.Konva.pixelRatio||CD();this.pixelRatio=n,this._canvas=T2.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(e){const r=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/r,this.getHeight()/r)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";const r=this.pixelRatio;this.getContext()._context.scale(r,r)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";const r=this.pixelRatio;this.getContext()._context.scale(r,r)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,r){this.setWidth(e||0),this.setHeight(r||0)}toDataURL(e,r){try{return this._canvas.toDataURL(e,r)}catch{try{return this._canvas.toDataURL()}catch(i){return T2.Util.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}};mo.Canvas=S8;let wD=class extends S8{constructor(e={width:0,height:0,willReadFrequently:!1}){super(e),this.context=new mk.SceneContext(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}};mo.SceneCanvas=wD;let SD=class extends S8{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new mk.HitContext(this),this.setSize(e.width,e.height)}};mo.HitCanvas=SD;var Ap={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DD=void 0;const e=ft,r=Or;t.DD={get isDragging(){let n=!1;return t.DD._dragElements.forEach(i=>{i.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){let n;return t.DD._dragElements.forEach(i=>{n=i.node}),n},_dragElements:new Map,_drag(n){const i=[];t.DD._dragElements.forEach((o,a)=>{const{node:s}=o,c=s.getStage();c.setPointersPositions(n),o.pointerId===void 0&&(o.pointerId=r.Util._getFirstPointerId(n));const d=c._changedPointerPositions.find(h=>h.id===o.pointerId);if(d){if(o.dragStatus!=="dragging"){const h=s.dragDistance();if(Math.max(Math.abs(d.x-o.startPointerPos.x),Math.abs(d.y-o.startPointerPos.y))<h||(s.startDrag({evt:n}),!s.isDragging()))return}s._setDragPosition(n,o),i.push(s)}}),i.forEach(o=>{o.fire("dragmove",{type:"dragmove",target:o,evt:n},!0)})},_endDragBefore(n){const i=[];t.DD._dragElements.forEach(o=>{const{node:a}=o,s=a.getStage();if(n&&s.setPointersPositions(n),!s._changedPointerPositions.find(h=>h.id===o.pointerId))return;(o.dragStatus==="dragging"||o.dragStatus==="stopped")&&(t.DD.justDragged=!0,e.Konva._mouseListenClick=!1,e.Konva._touchListenClick=!1,e.Konva._pointerListenClick=!1,o.dragStatus="stopped");const d=o.node.getLayer()||o.node instanceof e.Konva.Stage&&o.node;d&&i.indexOf(d)===-1&&i.push(d)}),i.forEach(o=>{o.draw()})},_endDragAfter(n){t.DD._dragElements.forEach((i,o)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:n},!0),i.dragStatus!=="dragging"&&t.DD._dragElements.delete(o)})}},e.Konva.isBrowser&&(window.addEventListener("mouseup",t.DD._endDragBefore,!0),window.addEventListener("touchend",t.DD._endDragBefore,!0),window.addEventListener("touchcancel",t.DD._endDragBefore,!0),window.addEventListener("mousemove",t.DD._drag),window.addEventListener("touchmove",t.DD._drag),window.addEventListener("mouseup",t.DD._endDragAfter,!1),window.addEventListener("touchend",t.DD._endDragAfter,!1),window.addEventListener("touchcancel",t.DD._endDragAfter,!1))})(Ap);Object.defineProperty(fr,"__esModule",{value:!0});fr.Node=void 0;const xt=Or,bh=wt,o0=mo,ns=ft,ji=Ap,Nr=Xe,Gf="absoluteOpacity",Z1="allEventListeners",ma="absoluteTransform",Vw="absoluteScale",wl="canvas",bD="Change",_D="children",xD="konva",Lv="listening",Uw="mouseenter",Ww="mouseleave",Xw="set",Kw="Shape",Vf=" ",Yw="stage",ss="transform",ED="Stage",Mv="visible",OD=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Vf);let PD=1,it=class Rv{constructor(e){this._id=PD++,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(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===ss||e===ma)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,r){let n=this._cache.get(e);return(n===void 0||(e===ss||e===ma)&&n.dirty===!0)&&(n=r.call(this),this._cache.set(e,n)),n}_calculate(e,r,n){if(!this._attachedDepsListeners.get(e)){const i=r.map(o=>o+"Change.konva").join(Vf);this.on(i,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(wl)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===ma&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(wl)){const{scene:e,filter:r,hit:n}=this._cache.get(wl);xt.Util.releaseCanvas(e,r,n),this._cache.delete(wl)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){const r=e||{};let n={};(r.x===void 0||r.y===void 0||r.width===void 0||r.height===void 0)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let i=Math.ceil(r.width||n.width),o=Math.ceil(r.height||n.height),a=r.pixelRatio,s=r.x===void 0?Math.floor(n.x):r.x,c=r.y===void 0?Math.floor(n.y):r.y,d=r.offset||0,h=r.drawBorder||!1,C=r.hitCanvasPixelRatio||1;if(!i||!o){xt.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const v=Math.abs(Math.round(n.x)-s)>.5?1:0,g=Math.abs(Math.round(n.y)-c)>.5?1:0;i+=d*2+v,o+=d*2+g,s-=d,c-=d;const m=new o0.SceneCanvas({pixelRatio:a,width:i,height:o}),w=new o0.SceneCanvas({pixelRatio:a,width:0,height:0,willReadFrequently:!0}),x=new o0.HitCanvas({pixelRatio:C,width:i,height:o}),b=m.getContext(),O=x.getContext();return x.isCache=!0,m.isCache=!0,this._cache.delete(wl),this._filterUpToDate=!1,r.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,w.getContext()._context.imageSmoothingEnabled=!1),b.save(),O.save(),b.translate(-s,-c),O.translate(-s,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Gf),this._clearSelfAndDescendantCache(Vw),this.drawScene(m,this),this.drawHit(x,this),this._isUnderCache=!1,b.restore(),O.restore(),h&&(b.save(),b.beginPath(),b.rect(0,0,i,o),b.closePath(),b.setAttr("strokeStyle","red"),b.setAttr("lineWidth",5),b.stroke(),b.restore()),this._cache.set(wl,{scene:m,filter:w,hit:x,x:s,y:c}),this._requestDraw(),this}isCached(){return this._cache.has(wl)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,r){const n=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}];let i=1/0,o=1/0,a=-1/0,s=-1/0;const c=this.getAbsoluteTransform(r);return n.forEach(function(d){const h=c.point(d);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const r=this._getCanvasCache();e.translate(r.x,r.y);const n=this._getCachedSceneCanvas(),i=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/i,n.height/i),e.restore()}_drawCachedHitCanvas(e){const r=this._getCanvasCache(),n=r.hit;e.save(),e.translate(r.x,r.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){let e=this.filters(),r=this._getCanvasCache(),n=r.scene,i=r.filter,o=i.getContext(),a,s,c,d;if(e){if(!this._filterUpToDate){const h=n.pixelRatio;i.setSize(n.width/n.pixelRatio,n.height/n.pixelRatio);try{for(a=e.length,o.clear(),o.drawImage(n._canvas,0,0,n.getWidth()/h,n.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),c=0;c<a;c++){if(d=e[c],typeof d!="function"){xt.Util.error("Filter should be type of function, but got "+typeof d+" instead. Please check correct filters");continue}d.call(this,s),o.putImageData(s,0,0)}}catch(C){xt.Util.error("Unable to apply filter. "+C.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return n}on(e,r){if(this._cache&&this._cache.delete(Z1),arguments.length===3)return this._delegate.apply(this,arguments);let n=e.split(Vf),i=n.length,o,a,s,c,d;for(o=0;o<i;o++)a=n[o],s=a.split("."),c=s[0],d=s[1]||"",this.eventListeners[c]||(this.eventListeners[c]=[]),this.eventListeners[c].push({name:d,handler:r});return this}off(e,r){let n=(e||"").split(Vf),i=n.length,o,a,s,c,d,h;if(this._cache&&this._cache.delete(Z1),!e)for(a in this.eventListeners)this._off(a);for(o=0;o<i;o++)if(s=n[o],c=s.split("."),d=c[0],h=c[1],d)this.eventListeners[d]&&this._off(d,h,r);else for(a in this.eventListeners)this._off(a,h,r);return this}dispatchEvent(e){const r={target:this,type:e.type,evt:e};return this.fire(e.type,r),this}addEventListener(e,r){return this.on(e,function(n){r.call(this,n.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,r,n){const i=this;this.on(e,function(o){const a=o.target.findAncestors(r,!0,i);for(let s=0;s<a.length;s++)o=xt.Util.cloneObject(o),o.currentTarget=a[s],n.call(a[s],o)})}remove(){return this.isDragging()&&this.stopDrag(),ji.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(ma),this._clearSelfAndDescendantCache(Gf),this._clearSelfAndDescendantCache(Vw),this._clearSelfAndDescendantCache(Yw),this._clearSelfAndDescendantCache(Mv),this._clearSelfAndDescendantCache(Lv)}_remove(){this._clearCaches();const e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(e){const r="get"+xt.Util._capitalize(e);return xt.Util._isFunction(this[r])?this[r]():this.attrs[e]}getAncestors(){let e=this.getParent(),r=[];for(;e;)r.push(e),e=e.getParent();return r}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{let r,n;if(!e)return this;for(r in e)r!==_D&&(n=Xw+xt.Util._capitalize(r),xt.Util._isFunction(this[n])?this[n](e[r]):this._setAttr(r,e[r]))}),this}isListening(){return this._getCache(Lv,this._isListening)}_isListening(e){if(!this.listening())return!1;const n=this.getParent();return n&&n!==e&&this!==e?n._isListening(e):!0}isVisible(){return this._getCache(Mv,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const n=this.getParent();return n&&n!==e&&this!==e?n._isVisible(e):!0}shouldDrawHit(e,r=!1){if(e)return this._isVisible(e)&&this._isListening(e);const n=this.getLayer();let i=!1;ji.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===n)&&(i=!0)});const o=!r&&!ns.Konva.hitOnDragEnabled&&(i||ns.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let e=this.getDepth(),r=this,n=0,i,o,a,s;function c(h){for(i=[],o=h.length,a=0;a<o;a++)s=h[a],n++,s.nodeType!==Kw&&(i=i.concat(s.getChildren().slice())),s._id===r._id&&(a=o);i.length>0&&i[0].getDepth()<=e&&c(i)}const d=this.getStage();return r.nodeType!==ED&&d&&c(d.getChildren()),n}getDepth(){let e=0,r=this.parent;for(;r;)e++,r=r.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ss),this._clearSelfAndDescendantCache(ma)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const e=this.getStage();if(!e)return null;const r=e.getPointerPosition();if(!r)return null;const n=this.getAbsoluteTransform().copy();return n.invert(),n.point(r)}getAbsolutePosition(e){let r=!1,n=this.parent;for(;n;){if(n.isCached()){r=!0;break}n=n.parent}r&&!e&&(e=!0);const i=this.getAbsoluteTransform(e).getMatrix(),o=new xt.Transform,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(e){const{x:r,y:n,...i}=this._clearTransform();this.attrs.x=r,this.attrs.y=n,this._clearCache(ss);const o=this._getAbsoluteTransform().copy();return o.invert(),o.translate(e.x,e.y),e={x:this.attrs.x+o.getTranslation().x,y:this.attrs.y+o.getTranslation().y},this._setTransform(i),this.setPosition({x:e.x,y:e.y}),this._clearCache(ss),this._clearSelfAndDescendantCache(ma),this}_setTransform(e){let r;for(r in e)this.attrs[r]=e[r]}_clearTransform(){const e={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,e}move(e){let r=e.x,n=e.y,i=this.x(),o=this.y();return r!==void 0&&(i+=r),n!==void 0&&(o+=n),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(e,r){let n=[],i=this.getParent(),o,a;if(!(r&&r._id===this._id)){for(n.unshift(this);i&&(!r||i._id!==r._id);)n.unshift(i),i=i.parent;for(o=n.length,a=0;a<o;a++)e(n[a])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return xt.Util.warn("Node has no parent. moveToTop function is ignored."),!1;const e=this.index,r=this.parent.getChildren().length;return e<r-1?(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return xt.Util.warn("Node has no parent. moveUp function is ignored."),!1;const e=this.index,r=this.parent.getChildren().length;return e<r-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return xt.Util.warn("Node has no parent. moveDown function is ignored."),!1;const e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return xt.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return xt.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&xt.Util.warn("Unexpected value "+e+" 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 r=this.index;return this.parent.children.splice(r,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Gf,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let e=this.opacity();const r=this.getParent();return r&&!r._isUnderCache&&(e*=r.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){let e=this.getAttrs(),r,n,i,o,a;const s={attrs:{},className:this.getClassName()};for(r in e)n=e[r],a=xt.Util.isObject(n)&&!xt.Util._isPlainObject(n)&&!xt.Util._isArray(n),!a&&(i=typeof this[r]=="function"&&this[r],delete e[r],o=i?i.call(this):null,e[r]=n,o!==n&&(s.attrs[r]=n));return xt.Util._prepareToStringify(s)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,r,n){const i=[];r&&this._isMatch(e)&&i.push(this);let o=this.parent;for(;o;){if(o===n)return i;o._isMatch(e)&&i.push(o),o=o.parent}return i}isAncestorOf(e){return!1}findAncestor(e,r,n){return this.findAncestors(e,r,n)[0]}_isMatch(e){if(!e)return!1;if(typeof e=="function")return e(this);let r=e.replace(/ /g,"").split(","),n=r.length,i,o;for(i=0;i<n;i++)if(o=r[i],xt.Util.isValidSelector(o)||(xt.Util.warn('Selector "'+o+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),xt.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),xt.Util.warn("Konva is awesome, right?")),o.charAt(0)==="#"){if(this.id()===o.slice(1))return!0}else if(o.charAt(0)==="."){if(this.hasName(o.slice(1)))return!0}else if(this.className===o||this.nodeType===o)return!0;return!1}getLayer(){const e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(Yw,this._getStage)}_getStage(){const e=this.getParent();return e?e.getStage():null}fire(e,r={},n){return r.target=r.target||this,n?this._fireAndBubble(e,r):this._fire(e,r),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(ma,this._getAbsoluteTransform)}_getAbsoluteTransform(e){let r;if(e)return r=new xt.Transform,this._eachAncestorReverse(function(n){const i=n.transformsEnabled();i==="all"?r.multiply(n.getTransform()):i==="position"&&r.translate(n.x()-n.offsetX(),n.y()-n.offsetY())},e),r;{r=this._cache.get(ma)||new xt.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(r):r.reset();const n=this.transformsEnabled();if(n==="all")r.multiply(this.getTransform());else if(n==="position"){const i=this.attrs.x||0,o=this.attrs.y||0,a=this.attrs.offsetX||0,s=this.attrs.offsetY||0;r.translate(i-a,o-s)}return r.dirty=!1,r}}getAbsoluteScale(e){let r=this;for(;r;)r._isUnderCache&&(e=r),r=r.getParent();const i=this.getAbsoluteTransform(e).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(ss,this._getTransform)}_getTransform(){var e,r;const n=this._cache.get(ss)||new xt.Transform;n.reset();const i=this.x(),o=this.y(),a=ns.Konva.getAngle(this.rotation()),s=(e=this.attrs.scaleX)!==null&&e!==void 0?e:1,c=(r=this.attrs.scaleY)!==null&&r!==void 0?r:1,d=this.attrs.skewX||0,h=this.attrs.skewY||0,C=this.attrs.offsetX||0,v=this.attrs.offsetY||0;return(i!==0||o!==0)&&n.translate(i,o),a!==0&&n.rotate(a),(d!==0||h!==0)&&n.skew(d,h),(s!==1||c!==1)&&n.scale(s,c),(C!==0||v!==0)&&n.translate(-1*C,-1*v),n.dirty=!1,n}clone(e){let r=xt.Util.cloneObject(this.attrs),n,i,o,a,s;for(n in e)r[n]=e[n];const c=new this.constructor(r);for(n in this.eventListeners)for(i=this.eventListeners[n],o=i.length,a=0;a<o;a++)s=i[a],s.name.indexOf(xD)<0&&(c.eventListeners[n]||(c.eventListeners[n]=[]),c.eventListeners[n].push(s));return c}_toKonvaCanvas(e){e=e||{};const r=this.getClientRect(),n=this.getStage(),i=e.x!==void 0?e.x:Math.floor(r.x),o=e.y!==void 0?e.y:Math.floor(r.y),a=e.pixelRatio||1,s=new o0.SceneCanvas({width:e.width||Math.ceil(r.width)||(n?n.width():0),height:e.height||Math.ceil(r.height)||(n?n.height():0),pixelRatio:a}),c=s.getContext(),d=new o0.SceneCanvas({width:s.width/s.pixelRatio+Math.abs(i),height:s.height/s.pixelRatio+Math.abs(o),pixelRatio:s.pixelRatio});return e.imageSmoothingEnabled===!1&&(c._context.imageSmoothingEnabled=!1),c.save(),(i||o)&&c.translate(-1*i,-1*o),this.drawScene(s,void 0,d),c.restore(),s}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e=e||{};const r=e.mimeType||null,n=e.quality||null,i=this._toKonvaCanvas(e).toDataURL(r,n);return e.callback&&e.callback(i),i}toImage(e){return new Promise((r,n)=>{try{const i=e==null?void 0:e.callback;i&&delete e.callback,xt.Util._urlToImage(this.toDataURL(e),function(o){r(o),i==null||i(o)})}catch(i){n(i)}})}toBlob(e){return new Promise((r,n)=>{try{const i=e==null?void 0:e.callback;i&&delete e.callback,this.toCanvas(e).toBlob(o=>{r(o),i==null||i(o)},e==null?void 0:e.mimeType,e==null?void 0:e.quality)}catch(i){n(i)}})}setSize(e){return this.width(e.width),this.height(e.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():ns.Konva.dragDistance}_off(e,r,n){let i=this.eventListeners[e],o,a,s;for(o=0;o<i.length;o++)if(a=i[o].name,s=i[o].handler,(a!=="konva"||r==="konva")&&(!r||a===r)&&(!n||n===s)){if(i.splice(o,1),i.length===0){delete this.eventListeners[e];break}o--}}_fireChangeEvent(e,r,n){this._fire(e+bD,{oldVal:r,newVal:n})}addName(e){if(!this.hasName(e)){const r=this.name(),n=r?r+" "+e:e;this.name(n)}return this}hasName(e){if(!e)return!1;const r=this.name();return r?(r||"").split(/\s/g).indexOf(e)!==-1:!1}removeName(e){const r=(this.name()||"").split(/\s/g),n=r.indexOf(e);return n!==-1&&(r.splice(n,1),this.name(r.join(" "))),this}setAttr(e,r){const n=this[Xw+xt.Util._capitalize(e)];return xt.Util._isFunction(n)?n.call(this,r):this._setAttr(e,r),this}_requestDraw(){if(ns.Konva.autoDrawEnabled){const e=this.getLayer()||this.getStage();e==null||e.batchDraw()}}_setAttr(e,r){const n=this.attrs[e];n===r&&!xt.Util.isObject(r)||(r==null?delete this.attrs[e]:this.attrs[e]=r,this._shouldFireChangeEvents&&this._fireChangeEvent(e,n,r),this._requestDraw())}_setComponentAttr(e,r,n){let i;n!==void 0&&(i=this.attrs[e],i||(this.attrs[e]=this.getAttr(e)),this.attrs[e][r]=n,this._fireChangeEvent(e,i,n))}_fireAndBubble(e,r,n){if(r&&this.nodeType===Kw&&(r.target=this),!((e===Uw||e===Ww)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType==="Stage"&&!n))){this._fire(e,r);const o=(e===Uw||e===Ww)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(r&&!r.cancelBubble||!r)&&this.parent&&this.parent.isListening()&&!o&&(n&&n.parent?this._fireAndBubble.call(this.parent,e,r,n):this._fireAndBubble.call(this.parent,e,r))}}_getProtoListeners(e){var r,n,i;const o=(r=this._cache.get(Z1))!==null&&r!==void 0?r:{};let a=o==null?void 0:o[e];if(a===void 0){a=[];let s=Object.getPrototypeOf(this);for(;s;){const c=(i=(n=s.eventListeners)===null||n===void 0?void 0:n[e])!==null&&i!==void 0?i:[];a.push(...c),s=Object.getPrototypeOf(s)}o[e]=a,this._cache.set(Z1,o)}return a}_fire(e,r){r=r||{},r.currentTarget=this,r.type=e;const n=this._getProtoListeners(e);if(n)for(var i=0;i<n.length;i++)n[i].handler.call(this,r);const o=this.eventListeners[e];if(o)for(var i=0;i<o.length;i++)o[i].handler.call(this,r)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){const r=e?e.pointerId:void 0,n=this.getStage(),i=this.getAbsolutePosition();if(!n)return;const o=n._getPointerById(r)||n._changedPointerPositions[0]||i;ji.DD._dragElements.set(this._id,{node:this,startPointerPos:o,offset:{x:o.x-i.x,y:o.y-i.y},dragStatus:"ready",pointerId:r})}startDrag(e,r=!0){ji.DD._dragElements.has(this._id)||this._createDragElement(e);const n=ji.DD._dragElements.get(this._id);n.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},r)}_setDragPosition(e,r){const n=this.getStage()._getPointerById(r.pointerId);if(!n)return;let i={x:n.x-r.offset.x,y:n.y-r.offset.y};const o=this.dragBoundFunc();if(o!==void 0){const a=o.call(this,i,e);a?i=a:xt.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!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}stopDrag(e){const r=ji.DD._dragElements.get(this._id);r&&(r.dragStatus="stopped"),ji.DD._endDragBefore(e),ji.DD._endDragAfter(e)}setDraggable(e){this._setAttr("draggable",e),this._dragChange()}isDragging(){const e=ji.DD._dragElements.get(this._id);return e?e.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(e){if(!(!(e.evt.button!==void 0)||ns.Konva.dragButtons.indexOf(e.evt.button)>=0)||this.isDragging())return;let i=!1;ji.DD._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(e)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const r=ji.DD._dragElements.get(this._id),n=r&&r.dragStatus==="dragging",i=r&&r.dragStatus==="ready";n?this.stopDrag():i&&ji.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const r=this.getStage();if(!r)return!1;const n={x:-e.x,y:-e.y,width:r.width()+2*e.x,height:r.height()+2*e.y};return xt.Util.haveIntersection(n,this.getClientRect())}static create(e,r){return xt.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,r)}static _createNode(e,r){let n=Rv.prototype.getClassName.call(e),i=e.children,o,a,s;r&&(e.attrs.container=r),ns.Konva[n]||(xt.Util.warn('Can not find a node with class name "'+n+'". Fallback to "Shape".'),n="Shape");const c=ns.Konva[n];if(o=new c(e.attrs),i)for(a=i.length,s=0;s<a;s++)o.add(Rv._createNode(i[s]));return o}};fr.Node=it;it.prototype.nodeType="Node";it.prototype._attrsAffectingSize=[];it.prototype.eventListeners={};it.prototype.on.call(it.prototype,OD,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(ss),this._clearSelfAndDescendantCache(ma)});it.prototype.on.call(it.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Mv)});it.prototype.on.call(it.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(Lv)});it.prototype.on.call(it.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Gf)});const Jt=bh.Factory.addGetterSetter;Jt(it,"zIndex");Jt(it,"absolutePosition");Jt(it,"position");Jt(it,"x",0,(0,Nr.getNumberValidator)());Jt(it,"y",0,(0,Nr.getNumberValidator)());Jt(it,"globalCompositeOperation","source-over",(0,Nr.getStringValidator)());Jt(it,"opacity",1,(0,Nr.getNumberValidator)());Jt(it,"name","",(0,Nr.getStringValidator)());Jt(it,"id","",(0,Nr.getStringValidator)());Jt(it,"rotation",0,(0,Nr.getNumberValidator)());bh.Factory.addComponentsGetterSetter(it,"scale",["x","y"]);Jt(it,"scaleX",1,(0,Nr.getNumberValidator)());Jt(it,"scaleY",1,(0,Nr.getNumberValidator)());bh.Factory.addComponentsGetterSetter(it,"skew",["x","y"]);Jt(it,"skewX",0,(0,Nr.getNumberValidator)());Jt(it,"skewY",0,(0,Nr.getNumberValidator)());bh.Factory.addComponentsGetterSetter(it,"offset",["x","y"]);Jt(it,"offsetX",0,(0,Nr.getNumberValidator)());Jt(it,"offsetY",0,(0,Nr.getNumberValidator)());Jt(it,"dragDistance",void 0,(0,Nr.getNumberValidator)());Jt(it,"width",0,(0,Nr.getNumberValidator)());Jt(it,"height",0,(0,Nr.getNumberValidator)());Jt(it,"listening",!0,(0,Nr.getBooleanValidator)());Jt(it,"preventDefault",!0,(0,Nr.getBooleanValidator)());Jt(it,"filters",void 0,function(t){return this._filterUpToDate=!1,t});Jt(it,"visible",!0,(0,Nr.getBooleanValidator)());Jt(it,"transformsEnabled","all",(0,Nr.getStringValidator)());Jt(it,"size");Jt(it,"dragBoundFunc");Jt(it,"draggable",!1,(0,Nr.getBooleanValidator)());bh.Factory.backCompat(it,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var ec={};Object.defineProperty(ec,"__esModule",{value:!0});ec.Container=void 0;const ld=wt,D4=fr,Lp=Xe;let tc=class extends D4.Node{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const r=this.children||[],n=[];return r.forEach(function(i){e(i)&&n.push(i)}),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(let n=0;n<e.length;n++)this.add(e[n]);return this}const r=e[0];return r.getParent()?(r.moveTo(this),this):(this._validateAdd(r),r.index=this.getChildren().length,r.parent=this,r._clearCaches(),this.getChildren().push(r),this._fire("add",{child:r}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){const r=this._generalFind(e,!0);return r.length>0?r[0]:void 0}_generalFind(e,r){const n=[];return this._descendants(i=>{const o=i._isMatch(e);return o&&n.push(i),!!(o&&r)}),n}_descendants(e){let r=!1;const n=this.getChildren();for(const i of n){if(r=e(i),r)return!0;if(i.hasChildren()&&(r=i._descendants(e),r))return!0}return!1}toObject(){const e=D4.Node.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(r=>{e.children.push(r.toObject())}),e}isAncestorOf(e){let r=e.getParent();for(;r;){if(r._id===this._id)return!0;r=r.getParent()}return!1}clone(e){const r=D4.Node.prototype.clone.call(this,e);return this.getChildren().forEach(function(n){r.add(n.clone())}),r}getAllIntersections(e){const r=[];return this.find("Shape").forEach(n=>{n.isVisible()&&n.intersects(e)&&r.push(n)}),r}_clearSelfAndDescendantCache(e){var r;super._clearSelfAndDescendantCache(e),!this.isCached()&&((r=this.children)===null||r===void 0||r.forEach(function(n){n._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(r,n){r.index=n}),this._requestDraw()}drawScene(e,r,n){const i=this.getLayer(),o=e||i&&i.getCanvas(),a=o&&o.getContext(),s=this._getCanvasCache(),c=s&&s.scene,d=o&&o.isCache;if(!this.isVisible()&&!d)return this;if(c){a.save();const h=this.getAbsoluteTransform(r).getMatrix();a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren("drawScene",o,r,n);return this}drawHit(e,r){if(!this.shouldDrawHit(r))return this;const n=this.getLayer(),i=e||n&&n.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache();if(a&&a.hit){o.save();const c=this.getAbsoluteTransform(r).getMatrix();o.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,r);return this}_drawChildren(e,r,n,i){var o;const a=r&&r.getContext(),s=this.clipWidth(),c=this.clipHeight(),d=this.clipFunc(),h=typeof s=="number"&&typeof c=="number"||d,C=n===this;if(h){a.save();const g=this.getAbsoluteTransform(n);let m=g.getMatrix();a.transform(m[0],m[1],m[2],m[3],m[4],m[5]),a.beginPath();let w;if(d)w=d.call(this,a,this);else{const x=this.clipX(),b=this.clipY();a.rect(x||0,b||0,s,c)}a.clip.apply(a,w),m=g.copy().invert().getMatrix(),a.transform(m[0],m[1],m[2],m[3],m[4],m[5])}const v=!C&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";v&&(a.save(),a._applyGlobalCompositeOperation(this)),(o=this.children)===null||o===void 0||o.forEach(function(g){g[e](r,n,i)}),v&&a.restore(),h&&a.restore()}getClientRect(e={}){var r;const n=e.skipTransform,i=e.relativeTo;let o,a,s,c,d={x:1/0,y:1/0,width:0,height:0};const h=this;(r=this.children)===null||r===void 0||r.forEach(function(g){if(!g.visible())return;const m=g.getClientRect({relativeTo:h,skipShadow:e.skipShadow,skipStroke:e.skipStroke});m.width===0&&m.height===0||(o===void 0?(o=m.x,a=m.y,s=m.x+m.width,c=m.y+m.height):(o=Math.min(o,m.x),a=Math.min(a,m.y),s=Math.max(s,m.x+m.width),c=Math.max(c,m.y+m.height)))});const C=this.find("Shape");let v=!1;for(let g=0;g<C.length;g++)if(C[g]._isVisible(this)){v=!0;break}return v&&o!==void 0?d={x:o,y:a,width:s-o,height:c-a}:d={x:0,y:0,width:0,height:0},n?d:this._transformedRect(d,i)}};ec.Container=tc;ld.Factory.addComponentsGetterSetter(tc,"clip",["x","y","width","height"]);ld.Factory.addGetterSetter(tc,"clipX",void 0,(0,Lp.getNumberValidator)());ld.Factory.addGetterSetter(tc,"clipY",void 0,(0,Lp.getNumberValidator)());ld.Factory.addGetterSetter(tc,"clipWidth",void 0,(0,Lp.getNumberValidator)());ld.Factory.addGetterSetter(tc,"clipHeight",void 0,(0,Lp.getNumberValidator)());ld.Factory.addGetterSetter(tc,"clipFunc");var yk={},Ds={};Object.defineProperty(Ds,"__esModule",{value:!0});Ds.getCapturedShape=TD;Ds.createEvent=b8;Ds.hasPointerCapture=ID;Ds.setPointerCapture=AD;Ds.releaseCapture=wk;const kD=ft,sh=new Map,Ck=kD.Konva._global.PointerEvent!==void 0;function TD(t){return sh.get(t)}function b8(t){return{evt:t,pointerId:t.pointerId}}function ID(t,e){return sh.get(t)===e}function AD(t,e){wk(t),e.getStage()&&(sh.set(t,e),Ck&&e._fire("gotpointercapture",b8(new PointerEvent("gotpointercapture"))))}function wk(t,e){const r=sh.get(t);if(!r)return;const n=r.getStage();n&&n.content,sh.delete(t),Ck&&r._fire("lostpointercapture",b8(new PointerEvent("lostpointercapture")))}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Stage=t.stages=void 0;const e=Or,r=wt,n=ec,i=ft,o=mo,a=Ap,s=ft,c=Ds,d="Stage",h="string",C="px",v="mouseout",g="mouseleave",m="mouseover",w="mouseenter",x="mousemove",b="mousedown",O="mouseup",f="pointermove",S="pointerdown",E="pointerup",I="pointercancel",R="lostpointercapture",k="pointerout",N="pointerleave",T="pointerover",D="pointerenter",z="contextmenu",B="touchstart",Y="touchend",W="touchmove",q="touchcancel",ee="wheel",K=5,ue=[[w,"_pointerenter"],[b,"_pointerdown"],[x,"_pointermove"],[O,"_pointerup"],[g,"_pointerleave"],[B,"_pointerdown"],[W,"_pointermove"],[Y,"_pointerup"],[q,"_pointercancel"],[m,"_pointerover"],[ee,"_wheel"],[z,"_contextmenu"],[S,"_pointerdown"],[f,"_pointermove"],[E,"_pointerup"],[I,"_pointercancel"],[R,"_lostpointercapture"]],ne={mouse:{[k]:v,[N]:g,[T]:m,[D]:w,[f]:x,[S]:b,[E]:O,[I]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[k]:"touchout",[N]:"touchleave",[T]:"touchover",[D]:"touchenter",[f]:W,[S]:B,[E]:Y,[I]:q,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[k]:k,[N]:N,[T]:T,[D]:D,[f]:f,[S]:S,[E]:E,[I]:I,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},ae=U=>U.indexOf("pointer")>=0?"pointer":U.indexOf("touch")>=0?"touch":"mouse",J=U=>{const F=ae(U);if(F==="pointer")return i.Konva.pointerEventsEnabled&&ne.pointer;if(F==="touch")return ne.touch;if(F==="mouse")return ne.mouse};function Q(U={}){return(U.clipFunc||U.clipWidth||U.clipHeight)&&e.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),U}const te="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);";t.stages=[];class we extends n.Container{constructor(F){super(Q(F)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),t.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",()=>{Q(this.attrs)}),this._checkVisibility()}_validateAdd(F){const $=F.getType()==="Layer",ie=F.getType()==="FastLayer";$||ie||e.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const F=this.visible()?"":"none";this.content.style.display=F}setContainer(F){if(typeof F===h){if(F.charAt(0)==="."){const ie=F.slice(1);F=document.getElementsByClassName(ie)[0]}else{var $;F.charAt(0)!=="#"?$=F:$=F.slice(1),F=document.getElementById($)}if(!F)throw"Can not find container in document with id "+$}return this._setAttr("container",F),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),F.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const F=this.children,$=F.length;for(let ie=0;ie<$;ie++)F[ie].clear();return this}clone(F){return F||(F={}),F.container=typeof document<"u"&&document.createElement("div"),n.Container.prototype.clone.call(this,F)}destroy(){super.destroy();const F=this.content;F&&e.Util._isInDocument(F)&&this.container().removeChild(F);const $=t.stages.indexOf(this);return $>-1&&t.stages.splice($,1),e.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const F=this._pointerPositions[0]||this._changedPointerPositions[0];return F?{x:F.x,y:F.y}:(e.Util.warn(te),null)}_getPointerById(F){return this._pointerPositions.find($=>$.id===F)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(F){F=F||{},F.x=F.x||0,F.y=F.y||0,F.width=F.width||this.width(),F.height=F.height||this.height();const $=new o.SceneCanvas({width:F.width,height:F.height,pixelRatio:F.pixelRatio||1}),ie=$.getContext()._context,pe=this.children;return(F.x||F.y)&&ie.translate(-1*F.x,-1*F.y),pe.forEach(function(ce){if(!ce.isVisible())return;const le=ce._toKonvaCanvas(F);ie.drawImage(le._canvas,F.x,F.y,le.getWidth()/le.getPixelRatio(),le.getHeight()/le.getPixelRatio())}),$}getIntersection(F){if(!F)return null;const $=this.children,ie=$.length,pe=ie-1;for(let ce=pe;ce>=0;ce--){const le=$[ce].getIntersection(F);if(le)return le}return null}_resizeDOM(){const F=this.width(),$=this.height();this.content&&(this.content.style.width=F+C,this.content.style.height=$+C),this.bufferCanvas.setSize(F,$),this.bufferHitCanvas.setSize(F,$),this.children.forEach(ie=>{ie.setSize({width:F,height:$}),ie.draw()})}add(F,...$){if(arguments.length>1){for(let pe=0;pe<arguments.length;pe++)this.add(arguments[pe]);return this}super.add(F);const ie=this.children.length;return ie>K&&e.Util.warn("The stage has "+ie+" 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."),F.setSize({width:this.width(),height:this.height()}),F.draw(),i.Konva.isBrowser&&this.content.appendChild(F.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(F){return c.hasPointerCapture(F,this)}setPointerCapture(F){c.setPointerCapture(F,this)}releaseCapture(F){c.releaseCapture(F,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&ue.forEach(([F,$])=>{this.content.addEventListener(F,ie=>{this[$](ie)},{passive:!1})})}_pointerenter(F){this.setPointersPositions(F);const $=J(F.type);$&&this._fire($.pointerenter,{evt:F,target:this,currentTarget:this})}_pointerover(F){this.setPointersPositions(F);const $=J(F.type);$&&this._fire($.pointerover,{evt:F,target:this,currentTarget:this})}_getTargetShape(F){let $=this[F+"targetShape"];return $&&!$.getStage()&&($=null),$}_pointerleave(F){const $=J(F.type),ie=ae(F.type);if(!$)return;this.setPointersPositions(F);const pe=this._getTargetShape(ie),ce=!(i.Konva.isDragging()||i.Konva.isTransforming())||i.Konva.hitOnDragEnabled;pe&&ce?(pe._fireAndBubble($.pointerout,{evt:F}),pe._fireAndBubble($.pointerleave,{evt:F}),this._fire($.pointerleave,{evt:F,target:this,currentTarget:this}),this[ie+"targetShape"]=null):ce&&(this._fire($.pointerleave,{evt:F,target:this,currentTarget:this}),this._fire($.pointerout,{evt:F,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(F){const $=J(F.type),ie=ae(F.type);if(!$)return;this.setPointersPositions(F);let pe=!1;this._changedPointerPositions.forEach(ce=>{const le=this.getIntersection(ce);if(a.DD.justDragged=!1,i.Konva["_"+ie+"ListenClick"]=!0,!le||!le.isListening()){this[ie+"ClickStartShape"]=void 0;return}i.Konva.capturePointerEventsEnabled&&le.setPointerCapture(ce.id),this[ie+"ClickStartShape"]=le,le._fireAndBubble($.pointerdown,{evt:F,pointerId:ce.id}),pe=!0;const xe=F.type.indexOf("touch")>=0;le.preventDefault()&&F.cancelable&&xe&&F.preventDefault()}),pe||this._fire($.pointerdown,{evt:F,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(F){const $=J(F.type),ie=ae(F.type);if(!$||(i.Konva.isDragging()&&a.DD.node.preventDefault()&&F.cancelable&&F.preventDefault(),this.setPointersPositions(F),!(!(i.Konva.isDragging()||i.Konva.isTransforming())||i.Konva.hitOnDragEnabled)))return;const ce={};let le=!1;const xe=this._getTargetShape(ie);this._changedPointerPositions.forEach(Ne=>{const _e=c.getCapturedShape(Ne.id)||this.getIntersection(Ne),He=Ne.id,Ee={evt:F,pointerId:He},Ve=xe!==_e;if(Ve&&xe&&(xe._fireAndBubble($.pointerout,{...Ee},_e),xe._fireAndBubble($.pointerleave,{...Ee},_e)),_e){if(ce[_e._id])return;ce[_e._id]=!0}_e&&_e.isListening()?(le=!0,Ve&&(_e._fireAndBubble($.pointerover,{...Ee},xe),_e._fireAndBubble($.pointerenter,{...Ee},xe),this[ie+"targetShape"]=_e),_e._fireAndBubble($.pointermove,{...Ee})):xe&&(this._fire($.pointerover,{evt:F,target:this,currentTarget:this,pointerId:He}),this[ie+"targetShape"]=null)}),le||this._fire($.pointermove,{evt:F,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(F){const $=J(F.type),ie=ae(F.type);if(!$)return;this.setPointersPositions(F);const pe=this[ie+"ClickStartShape"],ce=this[ie+"ClickEndShape"],le={};let xe=!1;this._changedPointerPositions.forEach(Ne=>{const _e=c.getCapturedShape(Ne.id)||this.getIntersection(Ne);if(_e){if(_e.releaseCapture(Ne.id),le[_e._id])return;le[_e._id]=!0}const He=Ne.id,Ee={evt:F,pointerId:He};let Ve=!1;i.Konva["_"+ie+"InDblClickWindow"]?(Ve=!0,clearTimeout(this[ie+"DblTimeout"])):a.DD.justDragged||(i.Konva["_"+ie+"InDblClickWindow"]=!0,clearTimeout(this[ie+"DblTimeout"])),this[ie+"DblTimeout"]=setTimeout(function(){i.Konva["_"+ie+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),_e&&_e.isListening()?(xe=!0,this[ie+"ClickEndShape"]=_e,_e._fireAndBubble($.pointerup,{...Ee}),i.Konva["_"+ie+"ListenClick"]&&pe&&pe===_e&&(_e._fireAndBubble($.pointerclick,{...Ee}),Ve&&ce&&ce===_e&&_e._fireAndBubble($.pointerdblclick,{...Ee}))):(this[ie+"ClickEndShape"]=null,i.Konva["_"+ie+"ListenClick"]&&this._fire($.pointerclick,{evt:F,target:this,currentTarget:this,pointerId:He}),Ve&&this._fire($.pointerdblclick,{evt:F,target:this,currentTarget:this,pointerId:He}))}),xe||this._fire($.pointerup,{evt:F,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+ie+"ListenClick"]=!1,F.cancelable&&ie!=="touch"&&ie!=="pointer"&&F.preventDefault()}_contextmenu(F){this.setPointersPositions(F);const $=this.getIntersection(this.getPointerPosition());$&&$.isListening()?$._fireAndBubble(z,{evt:F}):this._fire(z,{evt:F,target:this,currentTarget:this})}_wheel(F){this.setPointersPositions(F);const $=this.getIntersection(this.getPointerPosition());$&&$.isListening()?$._fireAndBubble(ee,{evt:F}):this._fire(ee,{evt:F,target:this,currentTarget:this})}_pointercancel(F){this.setPointersPositions(F);const $=c.getCapturedShape(F.pointerId)||this.getIntersection(this.getPointerPosition());$&&$._fireAndBubble(E,c.createEvent(F)),c.releaseCapture(F.pointerId)}_lostpointercapture(F){c.releaseCapture(F.pointerId)}setPointersPositions(F){const $=this._getContentPosition();let ie=null,pe=null;F=F||window.event,F.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(F.touches,ce=>{this._pointerPositions.push({id:ce.identifier,x:(ce.clientX-$.left)/$.scaleX,y:(ce.clientY-$.top)/$.scaleY})}),Array.prototype.forEach.call(F.changedTouches||F.touches,ce=>{this._changedPointerPositions.push({id:ce.identifier,x:(ce.clientX-$.left)/$.scaleX,y:(ce.clientY-$.top)/$.scaleY})})):(ie=(F.clientX-$.left)/$.scaleX,pe=(F.clientY-$.top)/$.scaleY,this.pointerPos={x:ie,y:pe},this._pointerPositions=[{x:ie,y:pe,id:e.Util._getFirstPointerId(F)}],this._changedPointerPositions=[{x:ie,y:pe,id:e.Util._getFirstPointerId(F)}])}_setPointerPosition(F){e.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(F)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const F=this.content.getBoundingClientRect();return{top:F.top,left:F.left,scaleX:F.width/this.content.clientWidth||1,scaleY:F.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new o.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new o.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!i.Konva.isBrowser)return;const F=this.container();if(!F)throw"Stage has no container. A container is required.";F.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"),F.appendChild(this.content),this._resizeDOM()}cache(){return e.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(F){F.batchDraw()}),this}}t.Stage=we,we.prototype.nodeType=d,(0,s._registerNode)(we),r.Factory.addGetterSetter(we,"container"),i.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{t.stages.forEach(U=>{U.batchDraw()})})})(yk);var _h={},Jr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Shape=t.shapes=void 0;const e=ft,r=Or,n=wt,i=fr,o=Xe,a=ft,s=Ds,c="hasShadow",d="shadowRGBA",h="patternImage",C="linearGradient",v="radialGradient";let g;function m(){return g||(g=r.Util.createCanvasElement().getContext("2d"),g)}t.shapes={};function w(N){const T=this.attrs.fillRule;T?N.fill(T):N.fill()}function x(N){N.stroke()}function b(N){const T=this.attrs.fillRule;T?N.fill(T):N.fill()}function O(N){N.stroke()}function f(){this._clearCache(c)}function S(){this._clearCache(d)}function E(){this._clearCache(h)}function I(){this._clearCache(C)}function R(){this._clearCache(v)}class k extends i.Node{constructor(T){super(T);let D;for(;D=r.Util.getRandomColor(),!(D&&!(D in t.shapes)););this.colorKey=D,t.shapes[D]=this}getContext(){return r.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return r.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(c,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(h,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const D=m().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(D&&D.setTransform){const z=new r.Transform;z.translate(this.fillPatternX(),this.fillPatternY()),z.rotate(e.Konva.getAngle(this.fillPatternRotation())),z.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),z.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const B=z.getMatrix(),Y=typeof DOMMatrix>"u"?{a:B[0],b:B[1],c:B[2],d:B[3],e:B[4],f:B[5]}:new DOMMatrix(B);D.setTransform(Y)}return D}}_getLinearGradient(){return this._getCache(C,this.__getLinearGradient)}__getLinearGradient(){const T=this.fillLinearGradientColorStops();if(T){const D=m(),z=this.fillLinearGradientStartPoint(),B=this.fillLinearGradientEndPoint(),Y=D.createLinearGradient(z.x,z.y,B.x,B.y);for(let W=0;W<T.length;W+=2)Y.addColorStop(T[W],T[W+1]);return Y}}_getRadialGradient(){return this._getCache(v,this.__getRadialGradient)}__getRadialGradient(){const T=this.fillRadialGradientColorStops();if(T){const D=m(),z=this.fillRadialGradientStartPoint(),B=this.fillRadialGradientEndPoint(),Y=D.createRadialGradient(z.x,z.y,this.fillRadialGradientStartRadius(),B.x,B.y,this.fillRadialGradientEndRadius());for(let W=0;W<T.length;W+=2)Y.addColorStop(T[W],T[W+1]);return Y}}getShadowRGBA(){return this._getCache(d,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const T=r.Util.colorToRGBA(this.shadowColor());if(T)return"rgba("+T.r+","+T.g+","+T.b+","+T.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 T=this.hitStrokeWidth();return T==="auto"?this.hasStroke():this.strokeEnabled()&&!!T}intersects(T){const D=this.getStage();if(!D)return!1;const z=D.bufferHitCanvas;return z.getContext().clear(),this.drawHit(z,void 0,!0),z.context.getImageData(Math.round(T.x),Math.round(T.y),1,1).data[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete t.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(T){var D;if(!((D=this.attrs.perfectDrawEnabled)!==null&&D!==void 0?D:!0))return!1;const B=T||this.hasFill(),Y=this.hasStroke(),W=this.getAbsoluteOpacity()!==1;if(B&&Y&&W)return!0;const q=this.hasShadow(),ee=this.shadowForStrokeEnabled();return!!(B&&Y&&q&&ee)}setStrokeHitEnabled(T){r.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),T?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const T=this.size();return{x:this._centroid?-T.width/2:0,y:this._centroid?-T.height/2:0,width:T.width,height:T.height}}getClientRect(T={}){let D=!1,z=this.getParent();for(;z;){if(z.isCached()){D=!0;break}z=z.getParent()}const B=T.skipTransform,Y=T.relativeTo||D&&this.getStage()||void 0,W=this.getSelfRect(),ee=!T.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,K=W.width+ee,ue=W.height+ee,ne=!T.skipShadow&&this.hasShadow(),ae=ne?this.shadowOffsetX():0,J=ne?this.shadowOffsetY():0,Q=K+Math.abs(ae),te=ue+Math.abs(J),we=ne&&this.shadowBlur()||0,U=Q+we*2,F=te+we*2,$={width:U,height:F,x:-(ee/2+we)+Math.min(ae,0)+W.x,y:-(ee/2+we)+Math.min(J,0)+W.y};return B?$:this._transformedRect($,Y)}drawScene(T,D,z){const B=this.getLayer();let Y=T||B.getCanvas(),W=Y.getContext(),q=this._getCanvasCache(),ee=this.getSceneFunc(),K=this.hasShadow(),ue,ne;const ae=Y.isCache,J=D===this;if(!this.isVisible()&&!J)return this;if(q){W.save();const te=this.getAbsoluteTransform(D).getMatrix();return W.transform(te[0],te[1],te[2],te[3],te[4],te[5]),this._drawCachedSceneCanvas(W),W.restore(),this}if(!ee)return this;if(W.save(),this._useBufferCanvas()&&!ae){ue=this.getStage();const te=z||ue.bufferCanvas;ne=te.getContext(),ne.clear(),ne.save(),ne._applyLineJoin(this);var Q=this.getAbsoluteTransform(D).getMatrix();ne.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]),ee.call(this,ne,this),ne.restore();const we=te.pixelRatio;K&&W._applyShadow(this),W._applyOpacity(this),W._applyGlobalCompositeOperation(this),W.drawImage(te._canvas,0,0,te.width/we,te.height/we)}else{if(W._applyLineJoin(this),!J){var Q=this.getAbsoluteTransform(D).getMatrix();W.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]),W._applyOpacity(this),W._applyGlobalCompositeOperation(this)}K&&W._applyShadow(this),ee.call(this,W,this)}return W.restore(),this}drawHit(T,D,z=!1){if(!this.shouldDrawHit(D,z))return this;const B=this.getLayer(),Y=T||B.hitCanvas,W=Y&&Y.getContext(),q=this.hitFunc()||this.sceneFunc(),ee=this._getCanvasCache(),K=ee&&ee.hit;if(this.colorKey||r.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()"),K){W.save();const ne=this.getAbsoluteTransform(D).getMatrix();return W.transform(ne[0],ne[1],ne[2],ne[3],ne[4],ne[5]),this._drawCachedHitCanvas(W),W.restore(),this}if(!q)return this;if(W.save(),W._applyLineJoin(this),!(this===D)){const ne=this.getAbsoluteTransform(D).getMatrix();W.transform(ne[0],ne[1],ne[2],ne[3],ne[4],ne[5])}return q.call(this,W,this),W.restore(),this}drawHitFromCache(T=0){const D=this._getCanvasCache(),z=this._getCachedSceneCanvas(),B=D.hit,Y=B.getContext(),W=B.getWidth(),q=B.getHeight();Y.clear(),Y.drawImage(z._canvas,0,0,W,q);try{const ee=Y.getImageData(0,0,W,q),K=ee.data,ue=K.length,ne=r.Util._hexToRgb(this.colorKey);for(let ae=0;ae<ue;ae+=4)K[ae+3]>T?(K[ae]=ne.r,K[ae+1]=ne.g,K[ae+2]=ne.b,K[ae+3]=255):K[ae+3]=0;Y.putImageData(ee,0,0)}catch(ee){r.Util.error("Unable to draw hit graph from cached scene canvas. "+ee.message)}return this}hasPointerCapture(T){return s.hasPointerCapture(T,this)}setPointerCapture(T){s.setPointerCapture(T,this)}releaseCapture(T){s.releaseCapture(T,this)}}t.Shape=k,k.prototype._fillFunc=w,k.prototype._strokeFunc=x,k.prototype._fillFuncHit=b,k.prototype._strokeFuncHit=O,k.prototype._centroid=!1,k.prototype.nodeType="Shape",(0,a._registerNode)(k),k.prototype.eventListeners={},k.prototype.on.call(k.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",f),k.prototype.on.call(k.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",S),k.prototype.on.call(k.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",E),k.prototype.on.call(k.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",I),k.prototype.on.call(k.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",R),n.Factory.addGetterSetter(k,"stroke",void 0,(0,o.getStringOrGradientValidator)()),n.Factory.addGetterSetter(k,"strokeWidth",2,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillAfterStrokeEnabled",!1),n.Factory.addGetterSetter(k,"hitStrokeWidth","auto",(0,o.getNumberOrAutoValidator)()),n.Factory.addGetterSetter(k,"strokeHitEnabled",!0,(0,o.getBooleanValidator)()),n.Factory.addGetterSetter(k,"perfectDrawEnabled",!0,(0,o.getBooleanValidator)()),n.Factory.addGetterSetter(k,"shadowForStrokeEnabled",!0,(0,o.getBooleanValidator)()),n.Factory.addGetterSetter(k,"lineJoin"),n.Factory.addGetterSetter(k,"lineCap"),n.Factory.addGetterSetter(k,"sceneFunc"),n.Factory.addGetterSetter(k,"hitFunc"),n.Factory.addGetterSetter(k,"dash"),n.Factory.addGetterSetter(k,"dashOffset",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"shadowColor",void 0,(0,o.getStringValidator)()),n.Factory.addGetterSetter(k,"shadowBlur",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"shadowOpacity",1,(0,o.getNumberValidator)()),n.Factory.addComponentsGetterSetter(k,"shadowOffset",["x","y"]),n.Factory.addGetterSetter(k,"shadowOffsetX",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"shadowOffsetY",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillPatternImage"),n.Factory.addGetterSetter(k,"fill",void 0,(0,o.getStringOrGradientValidator)()),n.Factory.addGetterSetter(k,"fillPatternX",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillPatternY",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillLinearGradientColorStops"),n.Factory.addGetterSetter(k,"strokeLinearGradientColorStops"),n.Factory.addGetterSetter(k,"fillRadialGradientStartRadius",0),n.Factory.addGetterSetter(k,"fillRadialGradientEndRadius",0),n.Factory.addGetterSetter(k,"fillRadialGradientColorStops"),n.Factory.addGetterSetter(k,"fillPatternRepeat","repeat"),n.Factory.addGetterSetter(k,"fillEnabled",!0),n.Factory.addGetterSetter(k,"strokeEnabled",!0),n.Factory.addGetterSetter(k,"shadowEnabled",!0),n.Factory.addGetterSetter(k,"dashEnabled",!0),n.Factory.addGetterSetter(k,"strokeScaleEnabled",!0),n.Factory.addGetterSetter(k,"fillPriority","color"),n.Factory.addComponentsGetterSetter(k,"fillPatternOffset",["x","y"]),n.Factory.addGetterSetter(k,"fillPatternOffsetX",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillPatternOffsetY",0,(0,o.getNumberValidator)()),n.Factory.addComponentsGetterSetter(k,"fillPatternScale",["x","y"]),n.Factory.addGetterSetter(k,"fillPatternScaleX",1,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillPatternScaleY",1,(0,o.getNumberValidator)()),n.Factory.addComponentsGetterSetter(k,"fillLinearGradientStartPoint",["x","y"]),n.Factory.addComponentsGetterSetter(k,"strokeLinearGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(k,"fillLinearGradientStartPointX",0),n.Factory.addGetterSetter(k,"strokeLinearGradientStartPointX",0),n.Factory.addGetterSetter(k,"fillLinearGradientStartPointY",0),n.Factory.addGetterSetter(k,"strokeLinearGradientStartPointY",0),n.Factory.addComponentsGetterSetter(k,"fillLinearGradientEndPoint",["x","y"]),n.Factory.addComponentsGetterSetter(k,"strokeLinearGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(k,"fillLinearGradientEndPointX",0),n.Factory.addGetterSetter(k,"strokeLinearGradientEndPointX",0),n.Factory.addGetterSetter(k,"fillLinearGradientEndPointY",0),n.Factory.addGetterSetter(k,"strokeLinearGradientEndPointY",0),n.Factory.addComponentsGetterSetter(k,"fillRadialGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(k,"fillRadialGradientStartPointX",0),n.Factory.addGetterSetter(k,"fillRadialGradientStartPointY",0),n.Factory.addComponentsGetterSetter(k,"fillRadialGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(k,"fillRadialGradientEndPointX",0),n.Factory.addGetterSetter(k,"fillRadialGradientEndPointY",0),n.Factory.addGetterSetter(k,"fillPatternRotation",0),n.Factory.addGetterSetter(k,"fillRule",void 0,(0,o.getStringValidator)()),n.Factory.backCompat(k,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(Jr);Object.defineProperty(_h,"__esModule",{value:!0});_h.Layer=void 0;const ua=Or,j4=ec,Gc=fr,_8=wt,Zw=mo,LD=Xe,MD=Jr,RD=ft,ND="#",FD="beforeDraw",DD="draw",Sk=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],jD=Sk.length;let cd=class extends j4.Container{constructor(e){super(e),this.canvas=new Zw.SceneCanvas,this.hitCanvas=new Zw.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(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);const r=this.getStage();return r&&r.content&&(r.content.removeChild(this.getNativeCanvasElement()),e<r.children.length-1?r.content.insertBefore(this.getNativeCanvasElement(),r.children[e+1].getCanvas()._canvas):r.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Gc.Node.prototype.moveToTop.call(this);const e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!Gc.Node.prototype.moveUp.call(this))return!1;const r=this.getStage();return!r||!r.content?!1:(r.content.removeChild(this.getNativeCanvasElement()),this.index<r.children.length-1?r.content.insertBefore(this.getNativeCanvasElement(),r.children[this.index+1].getCanvas()._canvas):r.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Gc.Node.prototype.moveDown.call(this)){const e=this.getStage();if(e){const r=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),r[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Gc.Node.prototype.moveToBottom.call(this)){const e=this.getStage();if(e){const r=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),r[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const e=this.getNativeCanvasElement();return Gc.Node.prototype.remove.call(this),e&&e.parentNode&&ua.Util._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:r}){return this.canvas.setSize(e,r),this.hitCanvas.setSize(e,r),this._setSmoothEnabled(),this}_validateAdd(e){const r=e.getType();r!=="Group"&&r!=="Shape"&&ua.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(e){return e=e||{},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x!==void 0?e.x:this.x(),e.y=e.y!==void 0?e.y:this.y(),Gc.Node.prototype._toKonvaCanvas.call(this,e)}_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(){ua.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){ua.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,ua.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;let r=1,n=!1;for(;;){for(let i=0;i<jD;i++){const o=Sk[i],a=this._getIntersection({x:e.x+o.x*r,y:e.y+o.y*r}),s=a.shape;if(s)return s;if(n=!!a.antialiased,!a.antialiased)break}if(n)r+=1;else return null}}_getIntersection(e){const r=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(e.x*r),Math.round(e.y*r),1,1).data,i=n[3];if(i===255){const o=ua.Util._rgbToHex(n[0],n[1],n[2]),a=MD.shapes[ND+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(e,r){const n=this.getLayer(),i=e||n&&n.getCanvas();return this._fire(FD,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),j4.Container.prototype.drawScene.call(this,i,r),this._fire(DD,{node:this}),this}drawHit(e,r){const n=this.getLayer(),i=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),j4.Container.prototype.drawHit.call(this,i,r),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){ua.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return ua.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const e=this.parent;!!this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}destroy(){return ua.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};_h.Layer=cd;cd.prototype.nodeType="Layer";(0,RD._registerNode)(cd);_8.Factory.addGetterSetter(cd,"imageSmoothingEnabled",!0);_8.Factory.addGetterSetter(cd,"clearBeforeDraw",!0);_8.Factory.addGetterSetter(cd,"hitGraphEnabled",!0,(0,LD.getBooleanValidator)());var Mp={};Object.defineProperty(Mp,"__esModule",{value:!0});Mp.FastLayer=void 0;const zD=Or,$D=_h,BD=ft;let x8=class extends $D.Layer{constructor(e){super(e),this.listening(!1),zD.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}};Mp.FastLayer=x8;x8.prototype.nodeType="FastLayer";(0,BD._registerNode)(x8);var ud={};Object.defineProperty(ud,"__esModule",{value:!0});ud.Group=void 0;const HD=Or,GD=ec,VD=ft;let E8=class extends GD.Container{_validateAdd(e){const r=e.getType();r!=="Group"&&r!=="Shape"&&HD.Util.throw("You may only add groups and shapes to groups.")}};ud.Group=E8;E8.prototype.nodeType="Group";(0,VD._registerNode)(E8);var dd={};Object.defineProperty(dd,"__esModule",{value:!0});dd.Animation=void 0;const z4=ft,qw=Or,$4=function(){return z4.glob.performance&&z4.glob.performance.now?function(){return z4.glob.performance.now()}:function(){return new Date().getTime()}}();let Rp=class au{constructor(e,r){this.id=au.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:$4(),frameRate:0},this.func=e,this.setLayers(r)}setLayers(e){let r=[];return e&&(r=Array.isArray(e)?e:[e]),this.layers=r,this}getLayers(){return this.layers}addLayer(e){const r=this.layers,n=r.length;for(let i=0;i<n;i++)if(r[i]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){const r=au.animations,n=r.length;for(let i=0;i<n;i++)if(r[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=$4(),au._addAnimation(this),this}stop(){return au._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){const r=e.id,n=this.animations,i=n.length;for(let o=0;o<i;o++)if(n[o].id===r){this.animations.splice(o,1);break}}static _runFrames(){const e={},r=this.animations;for(let n=0;n<r.length;n++){const i=r[n],o=i.layers,a=i.func;i._updateFrameObject($4());const s=o.length;let c;if(a?c=a.call(i,i.frame)!==!1:c=!0,!!c)for(let d=0;d<s;d++){const h=o[d];h._id!==void 0&&(e[h._id]=h)}}for(const n in e)e.hasOwnProperty(n)&&e[n].batchDraw()}static _animationLoop(){const e=au;e.animations.length?(e._runFrames(),qw.Util.requestAnimFrame(e._animationLoop)):e.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,qw.Util.requestAnimFrame(this._animationLoop))}};dd.Animation=Rp;Rp.animations=[];Rp.animIdCounter=0;Rp.animRunning=!1;var bk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Easings=t.Tween=void 0;const e=Or,r=dd,n=fr,i=ft,o={node:1,duration:1,easing:1,onFinish:1,yoyo:1},a=1,s=2,c=3,d=["fill","stroke","shadowColor"];let h=0;class C{constructor(m,w,x,b,O,f,S){this.prop=m,this.propFunc=w,this.begin=b,this._pos=b,this.duration=f,this._change=0,this.prevPos=0,this.yoyo=S,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=x,this._change=O-this.begin,this.pause()}fire(m){const w=this[m];w&&w()}setTime(m){m>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():m<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=m,this.update())}getTime(){return this._time}setPosition(m){this.prevPos=this._pos,this.propFunc(m),this._pos=m}getPosition(m){return m===void 0&&(m=this._time),this.func(m,this.begin,this._change,this.duration)}play(){this.state=s,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=c,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(m){this.pause(),this._time=m,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 m=this.getTimer()-this._startTime;this.state===s?this.setTime(m):this.state===c&&this.setTime(this.duration-m)}pause(){this.state=a,this.fire("onPause")}getTimer(){return new Date().getTime()}}class v{constructor(m){const w=this,x=m.node,b=x._id,O=m.easing||t.Easings.Linear,f=!!m.yoyo;let S,E;typeof m.duration>"u"?S=.3:m.duration===0?S=.001:S=m.duration,this.node=x,this._id=h++;const I=x.getLayer()||(x instanceof i.Konva.Stage?x.getLayers():null);I||e.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new r.Animation(function(){w.tween.onEnterFrame()},I),this.tween=new C(E,function(R){w._tweenFunc(R)},O,0,1,S*1e3,f),this._addListeners(),v.attrs[b]||(v.attrs[b]={}),v.attrs[b][this._id]||(v.attrs[b][this._id]={}),v.tweens[b]||(v.tweens[b]={});for(E in m)o[E]===void 0&&this._addAttr(E,m[E]);this.reset(),this.onFinish=m.onFinish,this.onReset=m.onReset,this.onUpdate=m.onUpdate}_addAttr(m,w){const x=this.node,b=x._id;let O,f,S,E,I;const R=v.tweens[b][m];R&&delete v.attrs[b][R][m];let k=x.getAttr(m);if(e.Util._isArray(w))if(O=[],f=Math.max(w.length,k.length),m==="points"&&w.length!==k.length&&(w.length>k.length?(E=k,k=e.Util._prepareArrayForTween(k,w,x.closed())):(S=w,w=e.Util._prepareArrayForTween(w,k,x.closed()))),m.indexOf("fill")===0)for(let N=0;N<f;N++)if(N%2===0)O.push(w[N]-k[N]);else{const T=e.Util.colorToRGBA(k[N]);I=e.Util.colorToRGBA(w[N]),k[N]=T,O.push({r:I.r-T.r,g:I.g-T.g,b:I.b-T.b,a:I.a-T.a})}else for(let N=0;N<f;N++)O.push(w[N]-k[N]);else d.indexOf(m)!==-1?(k=e.Util.colorToRGBA(k),I=e.Util.colorToRGBA(w),O={r:I.r-k.r,g:I.g-k.g,b:I.b-k.b,a:I.a-k.a}):O=w-k;v.attrs[b][this._id][m]={start:k,diff:O,end:w,trueEnd:S,trueStart:E},v.tweens[b][m]=this._id}_tweenFunc(m){const w=this.node,x=v.attrs[w._id][this._id];let b,O,f,S,E,I,R,k;for(b in x){if(O=x[b],f=O.start,S=O.diff,k=O.end,e.Util._isArray(f))if(E=[],R=Math.max(f.length,k.length),b.indexOf("fill")===0)for(I=0;I<R;I++)I%2===0?E.push((f[I]||0)+S[I]*m):E.push("rgba("+Math.round(f[I].r+S[I].r*m)+","+Math.round(f[I].g+S[I].g*m)+","+Math.round(f[I].b+S[I].b*m)+","+(f[I].a+S[I].a*m)+")");else for(I=0;I<R;I++)E.push((f[I]||0)+S[I]*m);else d.indexOf(b)!==-1?E="rgba("+Math.round(f.r+S.r*m)+","+Math.round(f.g+S.g*m)+","+Math.round(f.b+S.b*m)+","+(f.a+S.a*m)+")":E=f+S*m;w.setAttr(b,E)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const m=this.node,w=v.attrs[m._id][this._id];w.points&&w.points.trueEnd&&m.setAttr("points",w.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const m=this.node,w=v.attrs[m._id][this._id];w.points&&w.points.trueStart&&m.points(w.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(m){return this.tween.seek(m*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const m=this.node._id,w=this._id,x=v.tweens[m];this.pause();for(const b in x)delete v.tweens[m][b];delete v.attrs[m][w]}}t.Tween=v,v.attrs={},v.tweens={},n.Node.prototype.to=function(g){const m=g.onFinish;g.node=this,g.onFinish=function(){this.destroy(),m&&m()},new v(g).play()},t.Easings={BackEaseIn(g,m,w,x){return w*(g/=x)*g*((1.70158+1)*g-1.70158)+m},BackEaseOut(g,m,w,x){return w*((g=g/x-1)*g*((1.70158+1)*g+1.70158)+1)+m},BackEaseInOut(g,m,w,x){let b=1.70158;return(g/=x/2)<1?w/2*(g*g*(((b*=1.525)+1)*g-b))+m:w/2*((g-=2)*g*(((b*=1.525)+1)*g+b)+2)+m},ElasticEaseIn(g,m,w,x,b,O){let f=0;return g===0?m:(g/=x)===1?m+w:(O||(O=x*.3),!b||b<Math.abs(w)?(b=w,f=O/4):f=O/(2*Math.PI)*Math.asin(w/b),-(b*Math.pow(2,10*(g-=1))*Math.sin((g*x-f)*(2*Math.PI)/O))+m)},ElasticEaseOut(g,m,w,x,b,O){let f=0;return g===0?m:(g/=x)===1?m+w:(O||(O=x*.3),!b||b<Math.abs(w)?(b=w,f=O/4):f=O/(2*Math.PI)*Math.asin(w/b),b*Math.pow(2,-10*g)*Math.sin((g*x-f)*(2*Math.PI)/O)+w+m)},ElasticEaseInOut(g,m,w,x,b,O){let f=0;return g===0?m:(g/=x/2)===2?m+w:(O||(O=x*(.3*1.5)),!b||b<Math.abs(w)?(b=w,f=O/4):f=O/(2*Math.PI)*Math.asin(w/b),g<1?-.5*(b*Math.pow(2,10*(g-=1))*Math.sin((g*x-f)*(2*Math.PI)/O))+m:b*Math.pow(2,-10*(g-=1))*Math.sin((g*x-f)*(2*Math.PI)/O)*.5+w+m)},BounceEaseOut(g,m,w,x){return(g/=x)<1/2.75?w*(7.5625*g*g)+m:g<2/2.75?w*(7.5625*(g-=1.5/2.75)*g+.75)+m:g<2.5/2.75?w*(7.5625*(g-=2.25/2.75)*g+.9375)+m:w*(7.5625*(g-=2.625/2.75)*g+.984375)+m},BounceEaseIn(g,m,w,x){return w-t.Easings.BounceEaseOut(x-g,0,w,x)+m},BounceEaseInOut(g,m,w,x){return g<x/2?t.Easings.BounceEaseIn(g*2,0,w,x)*.5+m:t.Easings.BounceEaseOut(g*2-x,0,w,x)*.5+w*.5+m},EaseIn(g,m,w,x){return w*(g/=x)*g+m},EaseOut(g,m,w,x){return-w*(g/=x)*(g-2)+m},EaseInOut(g,m,w,x){return(g/=x/2)<1?w/2*g*g+m:-w/2*(--g*(g-2)-1)+m},StrongEaseIn(g,m,w,x){return w*(g/=x)*g*g*g*g+m},StrongEaseOut(g,m,w,x){return w*((g=g/x-1)*g*g*g*g+1)+m},StrongEaseInOut(g,m,w,x){return(g/=x/2)<1?w/2*g*g*g*g*g+m:w/2*((g-=2)*g*g*g*g+2)+m},Linear(g,m,w,x){return w*g/x+m}}})(bk);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;const e=ft,r=Or,n=fr,i=ec,o=yk,a=_h,s=Mp,c=ud,d=Ap,h=Jr,C=dd,v=bk,g=Oa,m=mo;t.Konva=r.Util._assign(e.Konva,{Util:r.Util,Transform:r.Transform,Node:n.Node,Container:i.Container,Stage:o.Stage,stages:o.stages,Layer:a.Layer,FastLayer:s.FastLayer,Group:c.Group,DD:d.DD,Shape:h.Shape,shapes:h.shapes,Animation:C.Animation,Tween:v.Tween,Easings:v.Easings,Context:g.Context,Canvas:m.Canvas}),t.default=t.Konva})(k2);var Np={};Object.defineProperty(Np,"__esModule",{value:!0});Np.Arc=void 0;const Fp=wt,UD=Jr,Qw=ft,Dp=Xe,WD=ft;let Fa=class extends UD.Shape{_sceneFunc(e){const r=Qw.Konva.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,r,n),e.arc(0,0,this.innerRadius(),r,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),r=this.outerRadius(),n=this.clockwise(),i=Qw.Konva.getAngle(n?360-this.angle():this.angle()),o=Math.cos(Math.min(i,Math.PI)),a=1,s=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),c=Math.sin(Math.min(i,Math.PI/2)),d=o*(o>0?e:r),h=a*r,C=s*(s>0?e:r),v=c*(c>0?r:e);return{x:d,y:n?-1*v:C,width:h-d,height:v-C}}};Np.Arc=Fa;Fa.prototype._centroid=!0;Fa.prototype.className="Arc";Fa.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"];(0,WD._registerNode)(Fa);Fp.Factory.addGetterSetter(Fa,"innerRadius",0,(0,Dp.getNumberValidator)());Fp.Factory.addGetterSetter(Fa,"outerRadius",0,(0,Dp.getNumberValidator)());Fp.Factory.addGetterSetter(Fa,"angle",0,(0,Dp.getNumberValidator)());Fp.Factory.addGetterSetter(Fa,"clockwise",!1,(0,Dp.getBooleanValidator)());var jp={},xh={};Object.defineProperty(xh,"__esModule",{value:!0});xh.Line=void 0;const zp=wt,XD=ft,KD=Jr,_k=Xe;function Nv(t,e,r,n,i,o,a){const s=Math.sqrt(Math.pow(r-t,2)+Math.pow(n-e,2)),c=Math.sqrt(Math.pow(i-r,2)+Math.pow(o-n,2)),d=a*s/(s+c),h=a*c/(s+c),C=r-d*(i-t),v=n-d*(o-e),g=r+h*(i-t),m=n+h*(o-e);return[C,v,g,m]}function Jw(t,e){const r=t.length,n=[];for(let i=2;i<r-2;i+=2){const o=Nv(t[i-2],t[i-1],t[i],t[i+1],t[i+2],t[i+3],e);isNaN(o[0])||(n.push(o[0]),n.push(o[1]),n.push(t[i]),n.push(t[i+1]),n.push(o[2]),n.push(o[3]))}return n}let js=class extends KD.Shape{constructor(e){super(e),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(e){let r=this.points(),n=r.length,i=this.tension(),o=this.closed(),a=this.bezier(),s,c,d;if(n){if(e.beginPath(),e.moveTo(r[0],r[1]),i!==0&&n>4){for(s=this.getTensionPoints(),c=s.length,d=o?0:4,o||e.quadraticCurveTo(s[0],s[1],s[2],s[3]);d<c-2;)e.bezierCurveTo(s[d++],s[d++],s[d++],s[d++],s[d++],s[d++]);o||e.quadraticCurveTo(s[c-2],s[c-1],r[n-2],r[n-1])}else if(a)for(d=2;d<n;)e.bezierCurveTo(r[d++],r[d++],r[d++],r[d++],r[d++],r[d++]);else for(d=2;d<n;d+=2)e.lineTo(r[d],r[d+1]);o?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():Jw(this.points(),this.tension())}_getTensionPointsClosed(){const e=this.points(),r=e.length,n=this.tension(),i=Nv(e[r-2],e[r-1],e[0],e[1],e[2],e[3],n),o=Nv(e[r-4],e[r-3],e[r-2],e[r-1],e[0],e[1],n),a=Jw(e,n);return[i[2],i[3]].concat(a).concat([o[0],o[1],e[r-2],e[r-1],o[2],o[3],i[0],i[1],e[0],e[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};this.tension()!==0?e=[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]]:e=this.points();let r=e[0],n=e[0],i=e[1],o=e[1],a,s;for(let c=0;c<e.length/2;c++)a=e[c*2],s=e[c*2+1],r=Math.min(r,a),n=Math.max(n,a),i=Math.min(i,s),o=Math.max(o,s);return{x:r,y:i,width:n-r,height:o-i}}};xh.Line=js;js.prototype.className="Line";js.prototype._attrsAffectingSize=["points","bezier","tension"];(0,XD._registerNode)(js);zp.Factory.addGetterSetter(js,"closed",!1);zp.Factory.addGetterSetter(js,"bezier",!1);zp.Factory.addGetterSetter(js,"tension",0,(0,_k.getNumberValidator)());zp.Factory.addGetterSetter(js,"points",[],(0,_k.getNumberArrayValidator)());var hd={},xk={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.t2length=t.getQuadraticArcLength=t.getCubicArcLength=t.binomialCoefficients=t.cValues=t.tValues=void 0,t.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]],t.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]],t.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const e=(a,s,c)=>{let d,h;const v=c/2;d=0;for(let g=0;g<20;g++)h=v*t.tValues[20][g]+v,d+=t.cValues[20][g]*n(a,s,h);return v*d};t.getCubicArcLength=e;const r=(a,s,c)=>{c===void 0&&(c=1);const d=a[0]-2*a[1]+a[2],h=s[0]-2*s[1]+s[2],C=2*a[1]-2*a[0],v=2*s[1]-2*s[0],g=4*(d*d+h*h),m=4*(d*C+h*v),w=C*C+v*v;if(g===0)return c*Math.sqrt(Math.pow(a[2]-a[0],2)+Math.pow(s[2]-s[0],2));const x=m/(2*g),b=w/g,O=c+x,f=b-x*x,S=O*O+f>0?Math.sqrt(O*O+f):0,E=x*x+f>0?Math.sqrt(x*x+f):0,I=x+Math.sqrt(x*x+f)!==0?f*Math.log(Math.abs((O+S)/(x+E))):0;return Math.sqrt(g)/2*(O*S-x*E+I)};t.getQuadraticArcLength=r;function n(a,s,c){const d=i(1,c,a),h=i(1,c,s),C=d*d+h*h;return Math.sqrt(C)}const i=(a,s,c)=>{const d=c.length-1;let h,C;if(d===0)return 0;if(a===0){C=0;for(let v=0;v<=d;v++)C+=t.binomialCoefficients[d][v]*Math.pow(1-s,d-v)*Math.pow(s,v)*c[v];return C}else{h=new Array(d);for(let v=0;v<d;v++)h[v]=d*(c[v+1]-c[v]);return i(a-1,s,h)}},o=(a,s,c)=>{let d=1,h=a/s,C=(a-c(h))/s,v=0;for(;d>.001;){const g=c(h+C),m=Math.abs(a-g)/s;if(m<d)d=m,h+=C;else{const w=c(h-C),x=Math.abs(a-w)/s;x<d?(d=x,h-=C):C/=2}if(v++,v>500)break}return h};t.t2length=o})(xk);Object.defineProperty(hd,"__esModule",{value:!0});hd.Path=void 0;const YD=wt,ZD=Jr,qD=ft,Vc=xk;let Eh=class ri extends ZD.Shape{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=ri.parsePathData(this.data()),this.pathLength=ri.getPathLength(this.dataArray)}_sceneFunc(e){const r=this.dataArray;e.beginPath();let n=!1;for(let w=0;w<r.length;w++){const x=r[w].command,b=r[w].points;switch(x){case"L":e.lineTo(b[0],b[1]);break;case"M":e.moveTo(b[0],b[1]);break;case"C":e.bezierCurveTo(b[0],b[1],b[2],b[3],b[4],b[5]);break;case"Q":e.quadraticCurveTo(b[0],b[1],b[2],b[3]);break;case"A":var i=b[0],o=b[1],a=b[2],s=b[3],c=b[4],d=b[5],h=b[6],C=b[7],v=a>s?a:s,g=a>s?1:a/s,m=a>s?s/a:1;e.translate(i,o),e.rotate(h),e.scale(g,m),e.arc(0,0,v,c,c+d,1-C),e.scale(1/g,1/m),e.rotate(-h),e.translate(-i,-o);break;case"z":n=!0,e.closePath();break}}!n&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){let e=[];this.dataArray.forEach(function(c){if(c.command==="A"){const d=c.points[4],h=c.points[5],C=c.points[4]+h;let v=Math.PI/180;if(Math.abs(d-C)<v&&(v=Math.abs(d-C)),h<0)for(let g=d-v;g>C;g-=v){const m=ri.getPointOnEllipticalArc(c.points[0],c.points[1],c.points[2],c.points[3],g,0);e.push(m.x,m.y)}else for(let g=d+v;g<C;g+=v){const m=ri.getPointOnEllipticalArc(c.points[0],c.points[1],c.points[2],c.points[3],g,0);e.push(m.x,m.y)}}else if(c.command==="C")for(let d=0;d<=1;d+=.01){const h=ri.getPointOnCubicBezier(d,c.start.x,c.start.y,c.points[0],c.points[1],c.points[2],c.points[3],c.points[4],c.points[5]);e.push(h.x,h.y)}else e=e.concat(c.points)});let r=e[0],n=e[0],i=e[1],o=e[1],a,s;for(let c=0;c<e.length/2;c++)a=e[c*2],s=e[c*2+1],isNaN(a)||(r=Math.min(r,a),n=Math.max(n,a)),isNaN(s)||(i=Math.min(i,s),o=Math.max(o,s));return{x:r,y:i,width:n-r,height:o-i}}getLength(){return this.pathLength}getPointAtLength(e){return ri.getPointAtLengthOfDataArray(e,this.dataArray)}static getLineLength(e,r,n,i){return Math.sqrt((n-e)*(n-e)+(i-r)*(i-r))}static getPathLength(e){let r=0;for(let n=0;n<e.length;++n)r+=e[n].pathLength;return r}static getPointAtLengthOfDataArray(e,r){let n,i=0,o=r.length;if(!o)return null;for(;i<o&&e>r[i].pathLength;)e-=r[i].pathLength,++i;if(i===o)return n=r[i-1].points.slice(-2),{x:n[0],y:n[1]};if(e<.01)return n=r[i].points.slice(0,2),{x:n[0],y:n[1]};const a=r[i],s=a.points;switch(a.command){case"L":return ri.getPointOnLine(e,a.start.x,a.start.y,s[0],s[1]);case"C":return ri.getPointOnCubicBezier((0,Vc.t2length)(e,ri.getPathLength(r),w=>(0,Vc.getCubicArcLength)([a.start.x,s[0],s[2],s[4]],[a.start.y,s[1],s[3],s[5]],w)),a.start.x,a.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return ri.getPointOnQuadraticBezier((0,Vc.t2length)(e,ri.getPathLength(r),w=>(0,Vc.getQuadraticArcLength)([a.start.x,s[0],s[2]],[a.start.y,s[1],s[3]],w)),a.start.x,a.start.y,s[0],s[1],s[2],s[3]);case"A":var c=s[0],d=s[1],h=s[2],C=s[3],v=s[4],g=s[5],m=s[6];return v+=g*e/a.pathLength,ri.getPointOnEllipticalArc(c,d,h,C,v,m)}return null}static getPointOnLine(e,r,n,i,o,a,s){a=a??r,s=s??n;const c=this.getLineLength(r,n,i,o);if(c<1e-10)return{x:r,y:n};if(i===r)return{x:a,y:s+(o>n?e:-e)};const d=(o-n)/(i-r),h=Math.sqrt(e*e/(1+d*d))*(i<r?-1:1),C=d*h;if(Math.abs(s-n-d*(a-r))<1e-10)return{x:a+h,y:s+C};const v=((a-r)*(i-r)+(s-n)*(o-n))/(c*c),g=r+v*(i-r),m=n+v*(o-n),w=this.getLineLength(a,s,g,m),x=Math.sqrt(e*e-w*w),b=Math.sqrt(x*x/(1+d*d))*(i<r?-1:1),O=d*b;return{x:g+b,y:m+O}}static getPointOnCubicBezier(e,r,n,i,o,a,s,c,d){function h(x){return x*x*x}function C(x){return 3*x*x*(1-x)}function v(x){return 3*x*(1-x)*(1-x)}function g(x){return(1-x)*(1-x)*(1-x)}const m=c*h(e)+a*C(e)+i*v(e)+r*g(e),w=d*h(e)+s*C(e)+o*v(e)+n*g(e);return{x:m,y:w}}static getPointOnQuadraticBezier(e,r,n,i,o,a,s){function c(g){return g*g}function d(g){return 2*g*(1-g)}function h(g){return(1-g)*(1-g)}const C=a*c(e)+i*d(e)+r*h(e),v=s*c(e)+o*d(e)+n*h(e);return{x:C,y:v}}static getPointOnEllipticalArc(e,r,n,i,o,a){const s=Math.cos(a),c=Math.sin(a),d={x:n*Math.cos(o),y:i*Math.sin(o)};return{x:e+(d.x*s-d.y*c),y:r+(d.x*c+d.y*s)}}static parsePathData(e){if(!e)return[];let r=e;const n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];r=r.replace(new RegExp(" ","g"),",");for(var i=0;i<n.length;i++)r=r.replace(new RegExp(n[i],"g"),"|"+n[i]);const o=r.split("|"),a=[],s=[];let c=0,d=0;const h=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let C;for(i=1;i<o.length;i++){let k=o[i],N=k.charAt(0);for(k=k.slice(1),s.length=0;C=h.exec(k);)s.push(C[0]);const T=[];for(let D=0,z=s.length;D<z;D++){if(s[D]==="00"){T.push(0,0);continue}const B=parseFloat(s[D]);isNaN(B)?T.push(0):T.push(B)}for(;T.length>0&&!isNaN(T[0]);){let D="",z=[];const B=c,Y=d;var v,g,m,w,x,b,O,f,S,E;switch(N){case"l":c+=T.shift(),d+=T.shift(),D="L",z.push(c,d);break;case"L":c=T.shift(),d=T.shift(),z.push(c,d);break;case"m":var I=T.shift(),R=T.shift();if(c+=I,d+=R,D="M",a.length>2&&a[a.length-1].command==="z"){for(let W=a.length-2;W>=0;W--)if(a[W].command==="M"){c=a[W].points[0]+I,d=a[W].points[1]+R;break}}z.push(c,d),N="l";break;case"M":c=T.shift(),d=T.shift(),D="M",z.push(c,d),N="L";break;case"h":c+=T.shift(),D="L",z.push(c,d);break;case"H":c=T.shift(),D="L",z.push(c,d);break;case"v":d+=T.shift(),D="L",z.push(c,d);break;case"V":d=T.shift(),D="L",z.push(c,d);break;case"C":z.push(T.shift(),T.shift(),T.shift(),T.shift()),c=T.shift(),d=T.shift(),z.push(c,d);break;case"c":z.push(c+T.shift(),d+T.shift(),c+T.shift(),d+T.shift()),c+=T.shift(),d+=T.shift(),D="C",z.push(c,d);break;case"S":g=c,m=d,v=a[a.length-1],v.command==="C"&&(g=c+(c-v.points[2]),m=d+(d-v.points[3])),z.push(g,m,T.shift(),T.shift()),c=T.shift(),d=T.shift(),D="C",z.push(c,d);break;case"s":g=c,m=d,v=a[a.length-1],v.command==="C"&&(g=c+(c-v.points[2]),m=d+(d-v.points[3])),z.push(g,m,c+T.shift(),d+T.shift()),c+=T.shift(),d+=T.shift(),D="C",z.push(c,d);break;case"Q":z.push(T.shift(),T.shift()),c=T.shift(),d=T.shift(),z.push(c,d);break;case"q":z.push(c+T.shift(),d+T.shift()),c+=T.shift(),d+=T.shift(),D="Q",z.push(c,d);break;case"T":g=c,m=d,v=a[a.length-1],v.command==="Q"&&(g=c+(c-v.points[0]),m=d+(d-v.points[1])),c=T.shift(),d=T.shift(),D="Q",z.push(g,m,c,d);break;case"t":g=c,m=d,v=a[a.length-1],v.command==="Q"&&(g=c+(c-v.points[0]),m=d+(d-v.points[1])),c+=T.shift(),d+=T.shift(),D="Q",z.push(g,m,c,d);break;case"A":w=T.shift(),x=T.shift(),b=T.shift(),O=T.shift(),f=T.shift(),S=c,E=d,c=T.shift(),d=T.shift(),D="A",z=this.convertEndpointToCenterParameterization(S,E,c,d,O,f,w,x,b);break;case"a":w=T.shift(),x=T.shift(),b=T.shift(),O=T.shift(),f=T.shift(),S=c,E=d,c+=T.shift(),d+=T.shift(),D="A",z=this.convertEndpointToCenterParameterization(S,E,c,d,O,f,w,x,b);break}a.push({command:D||N,points:z,start:{x:B,y:Y},pathLength:this.calcLength(B,Y,D||N,z)})}(N==="z"||N==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(e,r,n,i){let o,a,s,c;const d=ri;switch(n){case"L":return d.getLineLength(e,r,i[0],i[1]);case"C":return(0,Vc.getCubicArcLength)([e,i[0],i[2],i[4]],[r,i[1],i[3],i[5]],1);case"Q":return(0,Vc.getQuadraticArcLength)([e,i[0],i[2]],[r,i[1],i[3]],1);case"A":o=0;var h=i[4],C=i[5],v=i[4]+C,g=Math.PI/180;if(Math.abs(h-v)<g&&(g=Math.abs(h-v)),a=d.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),C<0)for(c=h-g;c>v;c-=g)s=d.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),o+=d.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(c=h+g;c<v;c+=g)s=d.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),o+=d.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=d.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],v,0),o+=d.getLineLength(a.x,a.y,s.x,s.y),o}return 0}static convertEndpointToCenterParameterization(e,r,n,i,o,a,s,c,d){const h=d*(Math.PI/180),C=Math.cos(h)*(e-n)/2+Math.sin(h)*(r-i)/2,v=-1*Math.sin(h)*(e-n)/2+Math.cos(h)*(r-i)/2,g=C*C/(s*s)+v*v/(c*c);g>1&&(s*=Math.sqrt(g),c*=Math.sqrt(g));let m=Math.sqrt((s*s*(c*c)-s*s*(v*v)-c*c*(C*C))/(s*s*(v*v)+c*c*(C*C)));o===a&&(m*=-1),isNaN(m)&&(m=0);const w=m*s*v/c,x=m*-c*C/s,b=(e+n)/2+Math.cos(h)*w-Math.sin(h)*x,O=(r+i)/2+Math.sin(h)*w+Math.cos(h)*x,f=function(T){return Math.sqrt(T[0]*T[0]+T[1]*T[1])},S=function(T,D){return(T[0]*D[0]+T[1]*D[1])/(f(T)*f(D))},E=function(T,D){return(T[0]*D[1]<T[1]*D[0]?-1:1)*Math.acos(S(T,D))},I=E([1,0],[(C-w)/s,(v-x)/c]),R=[(C-w)/s,(v-x)/c],k=[(-1*C-w)/s,(-1*v-x)/c];let N=E(R,k);return S(R,k)<=-1&&(N=Math.PI),S(R,k)>=1&&(N=0),a===0&&N>0&&(N=N-2*Math.PI),a===1&&N<0&&(N=N+2*Math.PI),[b,O,s,c,I,N,h,a]}};hd.Path=Eh;Eh.prototype.className="Path";Eh.prototype._attrsAffectingSize=["data"];(0,qD._registerNode)(Eh);YD.Factory.addGetterSetter(Eh,"data");Object.defineProperty(jp,"__esModule",{value:!0});jp.Arrow=void 0;const $p=wt,QD=xh,Ek=Xe,JD=ft,eS=hd;let rc=class extends QD.Line{_sceneFunc(e){super._sceneFunc(e);const r=Math.PI*2,n=this.points();let i=n;const o=this.tension()!==0&&n.length>4;o&&(i=this.getTensionPoints());const a=this.pointerLength(),s=n.length;let c,d;if(o){const v=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],n[s-2],n[s-1]],g=eS.Path.calcLength(i[i.length-4],i[i.length-3],"C",v),m=eS.Path.getPointOnQuadraticBezier(Math.min(1,1-a/g),v[0],v[1],v[2],v[3],v[4],v[5]);c=n[s-2]-m.x,d=n[s-1]-m.y}else c=n[s-2]-n[s-4],d=n[s-1]-n[s-3];const h=(Math.atan2(d,c)+r)%r,C=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[s-2],n[s-1]),e.rotate(h),e.moveTo(0,0),e.lineTo(-a,C/2),e.lineTo(-a,-C/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),o?(c=(i[0]+i[2])/2-n[0],d=(i[1]+i[3])/2-n[1]):(c=n[2]-n[0],d=n[3]-n[1]),e.rotate((Math.atan2(-d,-c)+r)%r),e.moveTo(0,0),e.lineTo(-a,C/2),e.lineTo(-a,-C/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){const r=this.dashEnabled();r&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),r&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),r=this.pointerWidth()/2;return{x:e.x,y:e.y-r,width:e.width,height:e.height+r*2}}};jp.Arrow=rc;rc.prototype.className="Arrow";(0,JD._registerNode)(rc);$p.Factory.addGetterSetter(rc,"pointerLength",10,(0,Ek.getNumberValidator)());$p.Factory.addGetterSetter(rc,"pointerWidth",10,(0,Ek.getNumberValidator)());$p.Factory.addGetterSetter(rc,"pointerAtBeginning",!1);$p.Factory.addGetterSetter(rc,"pointerAtEnding",!0);var Bp={};Object.defineProperty(Bp,"__esModule",{value:!0});Bp.Circle=void 0;const ej=wt,tj=Jr,rj=Xe,nj=ft;let fd=class extends tj.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}};Bp.Circle=fd;fd.prototype._centroid=!0;fd.prototype.className="Circle";fd.prototype._attrsAffectingSize=["radius"];(0,nj._registerNode)(fd);ej.Factory.addGetterSetter(fd,"radius",0,(0,rj.getNumberValidator)());var Hp={};Object.defineProperty(Hp,"__esModule",{value:!0});Hp.Ellipse=void 0;const O8=wt,ij=Jr,Ok=Xe,oj=ft;let zs=class extends ij.Shape{_sceneFunc(e){const r=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),r!==n&&e.scale(1,n/r),e.arc(0,0,r,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};Hp.Ellipse=zs;zs.prototype.className="Ellipse";zs.prototype._centroid=!0;zs.prototype._attrsAffectingSize=["radiusX","radiusY"];(0,oj._registerNode)(zs);O8.Factory.addComponentsGetterSetter(zs,"radius",["x","y"]);O8.Factory.addGetterSetter(zs,"radiusX",0,(0,Ok.getNumberValidator)());O8.Factory.addGetterSetter(zs,"radiusY",0,(0,Ok.getNumberValidator)());var Gp={};Object.defineProperty(Gp,"__esModule",{value:!0});Gp.Image=void 0;const B4=Or,nc=wt,aj=Jr,sj=ft,Oh=Xe;let Zo=class Pk extends aj.Shape{constructor(e){super(e),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",r=>{this._removeImageLoad(r.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener("load",this._loadListener)}_removeImageLoad(e){e&&e.removeEventListener&&e.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const e=!!this.cornerRadius(),r=this.hasShadow();return e&&r?!0:super._useBufferCanvas(!0)}_sceneFunc(e){const r=this.getWidth(),n=this.getHeight(),i=this.cornerRadius(),o=this.attrs.image;let a;if(o){const s=this.attrs.cropWidth,c=this.attrs.cropHeight;s&&c?a=[o,this.cropX(),this.cropY(),s,c,0,0,r,n]:a=[o,0,0,r,n]}(this.hasFill()||this.hasStroke()||i)&&(e.beginPath(),i?B4.Util.drawRoundedRectPath(e,r,n,i):e.rect(0,0,r,n),e.closePath(),e.fillStrokeShape(this)),o&&(i&&e.clip(),e.drawImage.apply(e,a))}_hitFunc(e){const r=this.width(),n=this.height(),i=this.cornerRadius();e.beginPath(),i?B4.Util.drawRoundedRectPath(e,r,n,i):e.rect(0,0,r,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,r;return(e=this.attrs.width)!==null&&e!==void 0?e:(r=this.image())===null||r===void 0?void 0:r.width}getHeight(){var e,r;return(e=this.attrs.height)!==null&&e!==void 0?e:(r=this.image())===null||r===void 0?void 0:r.height}static fromURL(e,r,n=null){const i=B4.Util.createImageElement();i.onload=function(){const o=new Pk({image:i});r(o)},i.onerror=n,i.crossOrigin="Anonymous",i.src=e}};Gp.Image=Zo;Zo.prototype.className="Image";(0,sj._registerNode)(Zo);nc.Factory.addGetterSetter(Zo,"cornerRadius",0,(0,Oh.getNumberOrArrayOfNumbersValidator)(4));nc.Factory.addGetterSetter(Zo,"image");nc.Factory.addComponentsGetterSetter(Zo,"crop",["x","y","width","height"]);nc.Factory.addGetterSetter(Zo,"cropX",0,(0,Oh.getNumberValidator)());nc.Factory.addGetterSetter(Zo,"cropY",0,(0,Oh.getNumberValidator)());nc.Factory.addGetterSetter(Zo,"cropWidth",0,(0,Oh.getNumberValidator)());nc.Factory.addGetterSetter(Zo,"cropHeight",0,(0,Oh.getNumberValidator)());var Vu={};Object.defineProperty(Vu,"__esModule",{value:!0});Vu.Tag=Vu.Label=void 0;const Vp=wt,lj=Jr,cj=ud,P8=Xe,kk=ft,Tk=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],uj="Change.konva",dj="none",Fv="up",Dv="right",jv="down",zv="left",hj=Tk.length;let k8=class extends cj.Group{constructor(e){super(e),this.on("add.konva",function(r){this._addListeners(r.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){let r=this,n;const i=function(){r._sync()};for(n=0;n<hj;n++)e.on(Tk[n]+uj,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let e=this.getText(),r=this.getTag(),n,i,o,a,s,c,d;if(e&&r){switch(n=e.width(),i=e.height(),o=r.pointerDirection(),a=r.pointerWidth(),d=r.pointerHeight(),s=0,c=0,o){case Fv:s=n/2,c=-1*d;break;case Dv:s=n+a,c=i/2;break;case jv:s=n/2,c=i+d;break;case zv:s=-1*a,c=i/2;break}r.setAttrs({x:-1*s,y:-1*c,width:n,height:i}),e.setAttrs({x:-1*s,y:-1*c})}}};Vu.Label=k8;k8.prototype.className="Label";(0,kk._registerNode)(k8);let ic=class extends lj.Shape{_sceneFunc(e){const r=this.width(),n=this.height(),i=this.pointerDirection(),o=this.pointerWidth(),a=this.pointerHeight(),s=this.cornerRadius();let c=0,d=0,h=0,C=0;typeof s=="number"?c=d=h=C=Math.min(s,r/2,n/2):(c=Math.min(s[0]||0,r/2,n/2),d=Math.min(s[1]||0,r/2,n/2),C=Math.min(s[2]||0,r/2,n/2),h=Math.min(s[3]||0,r/2,n/2)),e.beginPath(),e.moveTo(c,0),i===Fv&&(e.lineTo((r-o)/2,0),e.lineTo(r/2,-1*a),e.lineTo((r+o)/2,0)),e.lineTo(r-d,0),e.arc(r-d,d,d,Math.PI*3/2,0,!1),i===Dv&&(e.lineTo(r,(n-a)/2),e.lineTo(r+o,n/2),e.lineTo(r,(n+a)/2)),e.lineTo(r,n-C),e.arc(r-C,n-C,C,0,Math.PI/2,!1),i===jv&&(e.lineTo((r+o)/2,n),e.lineTo(r/2,n+a),e.lineTo((r-o)/2,n)),e.lineTo(h,n),e.arc(h,n-h,h,Math.PI/2,Math.PI,!1),i===zv&&(e.lineTo(0,(n+a)/2),e.lineTo(-1*o,n/2),e.lineTo(0,(n-a)/2)),e.lineTo(0,c),e.arc(c,c,c,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){let e=0,r=0,n=this.pointerWidth(),i=this.pointerHeight(),o=this.pointerDirection(),a=this.width(),s=this.height();return o===Fv?(r-=i,s+=i):o===jv?s+=i:o===zv?(e-=n*1.5,a+=n):o===Dv&&(a+=n*1.5),{x:e,y:r,width:a,height:s}}};Vu.Tag=ic;ic.prototype.className="Tag";(0,kk._registerNode)(ic);Vp.Factory.addGetterSetter(ic,"pointerDirection",dj);Vp.Factory.addGetterSetter(ic,"pointerWidth",0,(0,P8.getNumberValidator)());Vp.Factory.addGetterSetter(ic,"pointerHeight",0,(0,P8.getNumberValidator)());Vp.Factory.addGetterSetter(ic,"cornerRadius",0,(0,P8.getNumberOrArrayOfNumbersValidator)(4));var Ph={};Object.defineProperty(Ph,"__esModule",{value:!0});Ph.Rect=void 0;const fj=wt,pj=Jr,gj=ft,mj=Or,vj=Xe;let Up=class extends pj.Shape{_sceneFunc(e){const r=this.cornerRadius(),n=this.width(),i=this.height();e.beginPath(),r?mj.Util.drawRoundedRectPath(e,n,i,r):e.rect(0,0,n,i),e.closePath(),e.fillStrokeShape(this)}};Ph.Rect=Up;Up.prototype.className="Rect";(0,gj._registerNode)(Up);fj.Factory.addGetterSetter(Up,"cornerRadius",0,(0,vj.getNumberOrArrayOfNumbersValidator)(4));var Wp={};Object.defineProperty(Wp,"__esModule",{value:!0});Wp.RegularPolygon=void 0;const Ik=wt,yj=Jr,Ak=Xe,Cj=ft;let oc=class extends yj.Shape{_sceneFunc(e){const r=this._getPoints();e.beginPath(),e.moveTo(r[0].x,r[0].y);for(let n=1;n<r.length;n++)e.lineTo(r[n].x,r[n].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){const e=this.attrs.sides,r=this.attrs.radius||0,n=[];for(let i=0;i<e;i++)n.push({x:r*Math.sin(i*2*Math.PI/e),y:-1*r*Math.cos(i*2*Math.PI/e)});return n}getSelfRect(){const e=this._getPoints();let r=e[0].x,n=e[0].y,i=e[0].x,o=e[0].y;return e.forEach(a=>{r=Math.min(r,a.x),n=Math.max(n,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:r,y:i,width:n-r,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};Wp.RegularPolygon=oc;oc.prototype.className="RegularPolygon";oc.prototype._centroid=!0;oc.prototype._attrsAffectingSize=["radius"];(0,Cj._registerNode)(oc);Ik.Factory.addGetterSetter(oc,"radius",0,(0,Ak.getNumberValidator)());Ik.Factory.addGetterSetter(oc,"sides",0,(0,Ak.getNumberValidator)());var Xp={};Object.defineProperty(Xp,"__esModule",{value:!0});Xp.Ring=void 0;const Lk=wt,wj=Jr,Mk=Xe,Sj=ft,tS=Math.PI*2;let ac=class extends wj.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,tS,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),tS,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};Xp.Ring=ac;ac.prototype.className="Ring";ac.prototype._centroid=!0;ac.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,Sj._registerNode)(ac);Lk.Factory.addGetterSetter(ac,"innerRadius",0,(0,Mk.getNumberValidator)());Lk.Factory.addGetterSetter(ac,"outerRadius",0,(0,Mk.getNumberValidator)());var Kp={};Object.defineProperty(Kp,"__esModule",{value:!0});Kp.Sprite=void 0;const sc=wt,bj=Jr,_j=dd,Rk=Xe,xj=ft;let qo=class extends bj.Shape{constructor(e){super(e),this._updated=!0,this.anim=new _j.Animation(()=>{const r=this._updated;return this._updated=!1,r}),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(e){const r=this.animation(),n=this.frameIndex(),i=n*4,o=this.animations()[r],a=this.frameOffsets(),s=o[i+0],c=o[i+1],d=o[i+2],h=o[i+3],C=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,d,h),e.closePath(),e.fillStrokeShape(this)),C)if(a){const v=a[r],g=n*2;e.drawImage(C,s,c,d,h,v[g+0],v[g+1],d,h)}else e.drawImage(C,s,c,d,h,0,0,d,h)}_hitFunc(e){const r=this.animation(),n=this.frameIndex(),i=n*4,o=this.animations()[r],a=this.frameOffsets(),s=o[i+2],c=o[i+3];if(e.beginPath(),a){const d=a[r],h=n*2;e.rect(d[h+0],d[h+1],s,c)}else e.rect(0,0,s,c);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const e=this.frameIndex(),r=this.animation(),n=this.animations(),i=n[r],o=i.length/4;e<o-1?this.frameIndex(e+1):this.frameIndex(0)}};Kp.Sprite=qo;qo.prototype.className="Sprite";(0,xj._registerNode)(qo);sc.Factory.addGetterSetter(qo,"animation");sc.Factory.addGetterSetter(qo,"animations");sc.Factory.addGetterSetter(qo,"frameOffsets");sc.Factory.addGetterSetter(qo,"image");sc.Factory.addGetterSetter(qo,"frameIndex",0,(0,Rk.getNumberValidator)());sc.Factory.addGetterSetter(qo,"frameRate",17,(0,Rk.getNumberValidator)());sc.Factory.backCompat(qo,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});var Yp={};Object.defineProperty(Yp,"__esModule",{value:!0});Yp.Star=void 0;const T8=wt,Ej=Jr,I8=Xe,Oj=ft;let $s=class extends Ej.Shape{_sceneFunc(e){const r=this.innerRadius(),n=this.outerRadius(),i=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(let o=1;o<i*2;o++){const a=o%2===0?n:r,s=a*Math.sin(o*Math.PI/i),c=-1*a*Math.cos(o*Math.PI/i);e.lineTo(s,c)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};Yp.Star=$s;$s.prototype.className="Star";$s.prototype._centroid=!0;$s.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,Oj._registerNode)($s);T8.Factory.addGetterSetter($s,"numPoints",5,(0,I8.getNumberValidator)());T8.Factory.addGetterSetter($s,"innerRadius",0,(0,I8.getNumberValidator)());T8.Factory.addGetterSetter($s,"outerRadius",0,(0,I8.getNumberValidator)());var pd={};Object.defineProperty(pd,"__esModule",{value:!0});pd.Text=void 0;pd.stringToArray=kl;const $v=Or,jn=wt,Pj=Jr,H4=ft,Bs=Xe,kj=ft;function kl(t){return[...t].reduce((e,r,n,i)=>{if(new RegExp("\\p{Emoji}","u").test(r)){const o=i[n+1];o&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(o)?(e.push(r+o),i[n+1]=""):e.push(r)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(r+(i[n+1]||""))?e.push(r+i[n+1]):n>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(r)?e[e.length-1]+=r:r&&e.push(r);return e},[])}const Uc="auto",Tj="center",Nk="inherit",a0="justify",Ij="Change.konva",Aj="2d",rS="-",Fk="left",Lj="text",Mj="Text",Rj="top",Nj="bottom",nS="middle",Dk="normal",Fj="px ",q1=" ",Dj="right",iS="rtl",jj="word",zj="char",oS="none",G4="…",jk=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],$j=jk.length;function Bj(t){return t.split(",").map(e=>{e=e.trim();const r=e.indexOf(" ")>=0,n=e.indexOf('"')>=0||e.indexOf("'")>=0;return r&&!n&&(e=`"${e}"`),e}).join(", ")}let Q1;function V4(){return Q1||(Q1=$v.Util.createCanvasElement().getContext(Aj),Q1)}function Hj(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Gj(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Vj(t){return t=t||{},!t.fillLinearGradientColorStops&&!t.fillRadialGradientColorStops&&!t.fillPatternImage&&(t.fill=t.fill||"black"),t}let Ar=class extends Pj.Shape{constructor(e){super(Vj(e)),this._partialTextX=0,this._partialTextY=0;for(let r=0;r<$j;r++)this.on(jk[r]+Ij,this._setTextData);this._setTextData()}_sceneFunc(e){const r=this.textArr,n=r.length;if(!this.text())return;let i=this.padding(),o=this.fontSize(),a=this.lineHeight()*o,s=this.verticalAlign(),c=this.direction(),d=0,h=this.align(),C=this.getWidth(),v=this.letterSpacing(),g=this.fill(),m=this.textDecoration(),w=m.indexOf("underline")!==-1,x=m.indexOf("line-through")!==-1,b;c=c===Nk?e.direction:c;let O=a/2,f=nS;if(H4.Konva._fixTextRendering){const z=this.measureSize("M");f="alphabetic",O=(z.fontBoundingBoxAscent-z.fontBoundingBoxDescent)/2+a/2}var S=0,E=0;for(c===iS&&e.setAttr("direction",c),e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",f),e.setAttr("textAlign",Fk),s===nS?d=(this.getHeight()-n*a-i*2)/2:s===Nj&&(d=this.getHeight()-n*a-i*2),e.translate(i,d+i),b=0;b<n;b++){var S=0,E=0,I=r[b],R=I.text,k=I.width,N=I.lastInParagraph,T,D;if(e.save(),h===Dj?S+=C-k-i*2:h===Tj&&(S+=(C-k-i*2)/2),w){e.save(),e.beginPath();const Y=H4.Konva._fixTextRendering?Math.round(o/4):Math.round(o/2),W=S,q=O+E+Y;e.moveTo(W,q),T=R.split(" ").length-1,D=h===a0&&!N?C-i*2:k,e.lineTo(W+Math.round(D),q),e.lineWidth=o/15;const ee=this._getLinearGradient();e.strokeStyle=ee||g,e.stroke(),e.restore()}if(x){e.save(),e.beginPath();const Y=H4.Konva._fixTextRendering?-Math.round(o/4):0;e.moveTo(S,O+E+Y),T=R.split(" ").length-1,D=h===a0&&!N?C-i*2:k,e.lineTo(S+Math.round(D),O+E+Y),e.lineWidth=o/15;const W=this._getLinearGradient();e.strokeStyle=W||g,e.stroke(),e.restore()}if(c!==iS&&(v!==0||h===a0)){T=R.split(" ").length-1;const Y=kl(R);for(let W=0;W<Y.length;W++){const q=Y[W];q===" "&&!N&&h===a0&&(S+=(C-i*2-k)/T),this._partialTextX=S,this._partialTextY=O+E,this._partialText=q,e.fillStrokeShape(this),S+=this.measureSize(q).width+v}}else v!==0&&e.setAttr("letterSpacing",`${v}px`),this._partialTextX=S,this._partialTextY=O+E,this._partialText=R,e.fillStrokeShape(this);e.restore(),n>1&&(O+=a)}}_hitFunc(e){const r=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,r,n),e.closePath(),e.fillStrokeShape(this)}setText(e){const r=$v.Util._isString(e)?e:e==null?"":e+"";return this._setAttr(Lj,r),this}getWidth(){return this.attrs.width===Uc||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===Uc||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return $v.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var r,n,i,o,a,s,c,d,h,C,v;let g=V4(),m=this.fontSize(),w;g.save(),g.font=this._getContextFont(),w=g.measureText(e),g.restore();const x=m/100;return{actualBoundingBoxAscent:(r=w.actualBoundingBoxAscent)!==null&&r!==void 0?r:71.58203125*x,actualBoundingBoxDescent:(n=w.actualBoundingBoxDescent)!==null&&n!==void 0?n:0,actualBoundingBoxLeft:(i=w.actualBoundingBoxLeft)!==null&&i!==void 0?i:-7.421875*x,actualBoundingBoxRight:(o=w.actualBoundingBoxRight)!==null&&o!==void 0?o:75.732421875*x,alphabeticBaseline:(a=w.alphabeticBaseline)!==null&&a!==void 0?a:0,emHeightAscent:(s=w.emHeightAscent)!==null&&s!==void 0?s:100*x,emHeightDescent:(c=w.emHeightDescent)!==null&&c!==void 0?c:-20*x,fontBoundingBoxAscent:(d=w.fontBoundingBoxAscent)!==null&&d!==void 0?d:91*x,fontBoundingBoxDescent:(h=w.fontBoundingBoxDescent)!==null&&h!==void 0?h:21*x,hangingBaseline:(C=w.hangingBaseline)!==null&&C!==void 0?C:72.80000305175781*x,ideographicBaseline:(v=w.ideographicBaseline)!==null&&v!==void 0?v:-21*x,width:w.width,height:m}}_getContextFont(){return this.fontStyle()+q1+this.fontVariant()+q1+(this.fontSize()+Fj)+Bj(this.fontFamily())}_addTextLine(e){this.align()===a0&&(e=e.trim());const n=this._getTextWidth(e);return this.textArr.push({text:e,width:n,lastInParagraph:!1})}_getTextWidth(e){const r=this.letterSpacing(),n=e.length;return V4().measureText(e).width+r*n}_setTextData(){let e=this.text().split(`
`),r=+this.fontSize(),n=0,i=this.lineHeight()*r,o=this.attrs.width,a=this.attrs.height,s=o!==Uc&&o!==void 0,c=a!==Uc&&a!==void 0,d=this.padding(),h=o-d*2,C=a-d*2,v=0,g=this.wrap(),m=g!==oS,w=g!==zj&&m,x=this.ellipsis();this.textArr=[],V4().font=this._getContextFont();const b=x?this._getTextWidth(G4):0;for(let O=0,f=e.length;O<f;++O){let S=e[O],E=this._getTextWidth(S);if(s&&E>h)for(;S.length>0;){let I=0,R=kl(S).length,k="",N=0;for(;I<R;){const T=I+R>>>1,D=kl(S),z=D.slice(0,T+1).join(""),B=this._getTextWidth(z);(x&&c&&v+i>C?B+b:B)<=h?(I=T+1,k=z,N=B):R=T}if(k){if(w){const z=kl(S),B=kl(k),Y=z[B.length],W=Y===q1||Y===rS;let q;if(W&&N<=h)q=B.length;else{const ee=B.lastIndexOf(q1),K=B.lastIndexOf(rS);q=Math.max(ee,K)+1}q>0&&(I=q,k=z.slice(0,I).join(""),N=this._getTextWidth(k))}if(k=k.trimRight(),this._addTextLine(k),n=Math.max(n,N),v+=i,this._shouldHandleEllipsis(v)){this._tryToAddEllipsisToLastLine();break}if(S=kl(S).slice(I).join("").trimLeft(),S.length>0&&(E=this._getTextWidth(S),E<=h)){this._addTextLine(S),v+=i,n=Math.max(n,E);break}}else break}else this._addTextLine(S),v+=i,n=Math.max(n,E),this._shouldHandleEllipsis(v)&&O<f-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),c&&v+i>C)break}this.textHeight=r,this.textWidth=n}_shouldHandleEllipsis(e){const r=+this.fontSize(),n=this.lineHeight()*r,i=this.attrs.height,o=i!==Uc&&i!==void 0,a=this.padding(),s=i-a*2;return!(this.wrap()!==oS)||o&&e+n>s}_tryToAddEllipsisToLastLine(){const e=this.attrs.width,r=e!==Uc&&e!==void 0,n=this.padding(),i=e-n*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];!a||!o||(r&&(this._getTextWidth(a.text+G4)<i||(a.text=a.text.slice(0,a.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+G4))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const e=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,r=this.hasShadow();return e&&r?!0:super._useBufferCanvas()}};pd.Text=Ar;Ar.prototype._fillFunc=Hj;Ar.prototype._strokeFunc=Gj;Ar.prototype.className=Mj;Ar.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];(0,kj._registerNode)(Ar);jn.Factory.overWriteSetter(Ar,"width",(0,Bs.getNumberOrAutoValidator)());jn.Factory.overWriteSetter(Ar,"height",(0,Bs.getNumberOrAutoValidator)());jn.Factory.addGetterSetter(Ar,"direction",Nk);jn.Factory.addGetterSetter(Ar,"fontFamily","Arial");jn.Factory.addGetterSetter(Ar,"fontSize",12,(0,Bs.getNumberValidator)());jn.Factory.addGetterSetter(Ar,"fontStyle",Dk);jn.Factory.addGetterSetter(Ar,"fontVariant",Dk);jn.Factory.addGetterSetter(Ar,"padding",0,(0,Bs.getNumberValidator)());jn.Factory.addGetterSetter(Ar,"align",Fk);jn.Factory.addGetterSetter(Ar,"verticalAlign",Rj);jn.Factory.addGetterSetter(Ar,"lineHeight",1,(0,Bs.getNumberValidator)());jn.Factory.addGetterSetter(Ar,"wrap",jj);jn.Factory.addGetterSetter(Ar,"ellipsis",!1,(0,Bs.getBooleanValidator)());jn.Factory.addGetterSetter(Ar,"letterSpacing",0,(0,Bs.getNumberValidator)());jn.Factory.addGetterSetter(Ar,"text","",(0,Bs.getStringValidator)());jn.Factory.addGetterSetter(Ar,"textDecoration","");var Zp={};Object.defineProperty(Zp,"__esModule",{value:!0});Zp.TextPath=void 0;const U4=Or,So=wt,Uj=Jr,s0=hd,W4=pd,zk=Xe,Wj=ft,Xj="",$k="normal";function Bk(t){t.fillText(this.partialText,0,0)}function Hk(t){t.strokeText(this.partialText,0,0)}let en=class extends Uj.Shape{constructor(e){super(e),this.dummyCanvas=U4.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 s0.Path.getPathLength(this.dataArray)}_getPointAtLength(e){if(!this.attrs.data)return null;const r=this.pathLength;return e-1>r?null:s0.Path.getPointAtLengthOfDataArray(e,this.dataArray)}_readDataAttribute(){this.dataArray=s0.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();const r=this.textDecoration(),n=this.fill(),i=this.fontSize(),o=this.glyphInfo;r==="underline"&&e.beginPath();for(let a=0;a<o.length;a++){e.save();const s=o[a].p0;e.translate(s.x,s.y),e.rotate(o[a].rotation),this.partialText=o[a].text,e.fillStrokeShape(this),r==="underline"&&(a===0&&e.moveTo(0,i/2+1),e.lineTo(i,i/2+1)),e.restore()}r==="underline"&&(e.strokeStyle=n,e.lineWidth=i/20,e.stroke()),e.restore()}_hitFunc(e){e.beginPath();const r=this.glyphInfo;if(r.length>=1){const n=r[0].p0;e.moveTo(n.x,n.y)}for(let n=0;n<r.length;n++){const i=r[n].p1;e.lineTo(i.x,i.y)}e.setAttr("lineWidth",this.fontSize()),e.setAttr("strokeStyle",this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return U4.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(e){return W4.Text.prototype.setText.call(this,e)}_getContextFont(){return W4.Text.prototype._getContextFont.call(this)}_getTextSize(e){const n=this.dummyCanvas.getContext("2d");n.save(),n.font=this._getContextFont();const i=n.measureText(e);return n.restore(),{width:i.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:e,height:r}=this._getTextSize(this.attrs.text);if(this.textWidth=e,this.textHeight=r,this.glyphInfo=[],!this.attrs.data)return null;const n=this.letterSpacing(),i=this.align(),o=this.kerningFunc(),a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);let s=0;i==="center"&&(s=Math.max(0,this.pathLength/2-a/2)),i==="right"&&(s=Math.max(0,this.pathLength-a));const c=(0,W4.stringToArray)(this.text());let d=s;for(let h=0;h<c.length;h++){const C=this._getPointAtLength(d);if(!C)return;let v=this._getTextSize(c[h]).width+n;if(c[h]===" "&&i==="justify"){const O=this.text().split(" ").length-1;v+=(this.pathLength-a)/O}const g=this._getPointAtLength(d+v);if(!g)return;const m=s0.Path.getLineLength(C.x,C.y,g.x,g.y);let w=0;if(o)try{w=o(c[h-1],c[h])*this.fontSize()}catch{w=0}C.x+=w,g.x+=w,this.textWidth+=w;const x=s0.Path.getPointOnLine(w+m/2,C.x,C.y,g.x,g.y),b=Math.atan2(g.y-C.y,g.x-C.x);this.glyphInfo.push({transposeX:x.x,transposeY:x.y,text:c[h],rotation:b,p0:C,p1:g}),d+=v}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const e=[];this.glyphInfo.forEach(function(d){e.push(d.p0.x),e.push(d.p0.y),e.push(d.p1.x),e.push(d.p1.y)});let r=e[0]||0,n=e[0]||0,i=e[1]||0,o=e[1]||0,a,s;for(let d=0;d<e.length/2;d++)a=e[d*2],s=e[d*2+1],r=Math.min(r,a),n=Math.max(n,a),i=Math.min(i,s),o=Math.max(o,s);const c=this.fontSize();return{x:r-c/2,y:i-c/2,width:n-r+c,height:o-i+c}}destroy(){return U4.Util.releaseCanvas(this.dummyCanvas),super.destroy()}};Zp.TextPath=en;en.prototype._fillFunc=Bk;en.prototype._strokeFunc=Hk;en.prototype._fillFuncHit=Bk;en.prototype._strokeFuncHit=Hk;en.prototype.className="TextPath";en.prototype._attrsAffectingSize=["text","fontSize","data"];(0,Wj._registerNode)(en);So.Factory.addGetterSetter(en,"data");So.Factory.addGetterSetter(en,"fontFamily","Arial");So.Factory.addGetterSetter(en,"fontSize",12,(0,zk.getNumberValidator)());So.Factory.addGetterSetter(en,"fontStyle",$k);So.Factory.addGetterSetter(en,"align","left");So.Factory.addGetterSetter(en,"letterSpacing",0,(0,zk.getNumberValidator)());So.Factory.addGetterSetter(en,"textBaseline","middle");So.Factory.addGetterSetter(en,"fontVariant",$k);So.Factory.addGetterSetter(en,"text",Xj);So.Factory.addGetterSetter(en,"textDecoration","");So.Factory.addGetterSetter(en,"kerningFunc",void 0);var qp={};Object.defineProperty(qp,"__esModule",{value:!0});qp.Transformer=void 0;const Ut=Or,Ft=wt,aS=fr,Kj=Jr,Yj=Ph,sS=ud,oo=ft,Hs=Xe,Zj=ft,Gk="tr-konva",qj=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${Gk}`).join(" "),lS="nodesRect",Qj=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],Jj={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},ez="ontouchstart"in oo.Konva._global;function tz(t,e,r){if(t==="rotater")return r;e+=Ut.Util.degToRad(Jj[t]||0);const n=(Ut.Util.radToDeg(e)%360+360)%360;return Ut.Util._inRange(n,315+22.5,360)||Ut.Util._inRange(n,0,22.5)?"ns-resize":Ut.Util._inRange(n,45-22.5,45+22.5)?"nesw-resize":Ut.Util._inRange(n,90-22.5,90+22.5)?"ew-resize":Ut.Util._inRange(n,135-22.5,135+22.5)?"nwse-resize":Ut.Util._inRange(n,180-22.5,180+22.5)?"ns-resize":Ut.Util._inRange(n,225-22.5,225+22.5)?"nesw-resize":Ut.Util._inRange(n,270-22.5,270+22.5)?"ew-resize":Ut.Util._inRange(n,315-22.5,315+22.5)?"nwse-resize":(Ut.Util.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}const I2=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function rz(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function Vk(t,e,r){const n=r.x+(t.x-r.x)*Math.cos(e)-(t.y-r.y)*Math.sin(e),i=r.y+(t.x-r.x)*Math.sin(e)+(t.y-r.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:n,y:i}}function nz(t,e){const r=rz(t);return Vk(t,e,r)}function iz(t,e,r){let n=e;for(let i=0;i<t.length;i++){const o=oo.Konva.getAngle(t[i]),a=Math.abs(o-e)%(Math.PI*2);Math.min(a,Math.PI*2-a)<r&&(n=o)}return n}let Bv=0,Ot=class extends sS.Group{constructor(e){super(e),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(qj,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return Ut.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return Gk+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();const r=e.filter(i=>i.isAncestorOf(this)?(Ut.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=e=r,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const o=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(i._attrsAffectingSize.length){const a=i._attrsAffectingSize.map(s=>s+"Change."+this._getEventNamespace()).join(" ");i.on(a,o)}i.on(Qj.map(a=>a+`.${this._getEventNamespace()}`).join(" "),o),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,o),this._proxyDrag(i)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(e){let r;e.on(`dragstart.${this._getEventNamespace()}`,n=>{r=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(".back")&&this.startDrag(n,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!r)return;const i=e.getAbsolutePosition(),o=i.x-r.x,a=i.y-r.y;this.nodes().forEach(s=>{if(s===e||s.isDragging())return;const c=s.getAbsolutePosition();s.setAbsolutePosition({x:c.x+o,y:c.y+a}),s.startDrag(n)}),r=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(lS),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(lS,this.__getNodeRect)}__getNodeShape(e,r=this.rotation(),n){const i=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=e.getAbsoluteScale(n),a=e.getAbsolutePosition(n),s=i.x*o.x-e.offsetX()*o.x,c=i.y*o.y-e.offsetY()*o.y,d=(oo.Konva.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(d)+c*Math.sin(-d),y:a.y+c*Math.cos(d)+s*Math.sin(d),width:i.width*o.x,height:i.height*o.y,rotation:d};return Vk(h,-oo.Konva.getAngle(r),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const r=[];this.nodes().map(d=>{const h=d.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),C=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],v=d.getAbsoluteTransform();C.forEach(function(g){const m=v.point(g);r.push(m)})});const n=new Ut.Transform;n.rotate(-oo.Konva.getAngle(this.rotation()));let i=1/0,o=1/0,a=-1/0,s=-1/0;r.forEach(function(d){const h=n.point(d);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),n.invert();const c=n.point({x:i,y:o});return{x:c.x,y:c.y,width:a-i,height:s-o,rotation:oo.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(),I2.forEach(e=>{this._createAnchor(e)}),this._createAnchor("rotater")}_createAnchor(e){const r=new Yj.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:ez?10:"auto"}),n=this;r.on("mousedown touchstart",function(i){n._handleMouseDown(i)}),r.on("dragstart",i=>{r.stopDrag(),i.cancelBubble=!0}),r.on("dragend",i=>{i.cancelBubble=!0}),r.on("mouseenter",()=>{const i=oo.Konva.getAngle(this.rotation()),o=this.rotateAnchorCursor(),a=tz(e,i,o);r.getStage().content&&(r.getStage().content.style.cursor=a),this._cursorChange=!0}),r.on("mouseout",()=>{r.getStage().content&&(r.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(r)}_createBack(){const e=new Kj.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(r,n){const i=n.getParent(),o=i.padding();r.beginPath(),r.rect(-o,-o,n.width()+o*2,n.height()+o*2),r.moveTo(n.width()/2,-o),i.rotateEnabled()&&i.rotateLineVisible()&&r.lineTo(n.width()/2,-i.rotateAnchorOffset()*Ut.Util._sign(n.height())-o),r.fillStrokeShape(n)},hitFunc:(r,n)=>{if(!this.shouldOverdrawWholeArea())return;const i=this.padding();r.beginPath(),r.rect(-i,-i,n.width()+i*2,n.height()+i*2),r.fillStrokeShape(n)}});this.add(e),this._proxyDrag(e),e.on("dragstart",r=>{r.cancelBubble=!0}),e.on("dragmove",r=>{r.cancelBubble=!0}),e.on("dragend",r=>{r.cancelBubble=!0}),this.on("dragmove",r=>{this.update()})}_handleMouseDown(e){if(this._transforming)return;this._movingAnchorName=e.target.name().split(" ")[0];const r=this._getNodeRect(),n=r.width,i=r.height,o=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(n/o),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 a=e.target.getAbsolutePosition(),s=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},Bv++,this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach(c=>{c._fire("transformstart",{evt:e.evt,target:c})})}_handleMouseMove(e){let r,n,i;const o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(e);const s=a.getPointerPosition();let c={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const d=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(c=this.anchorDragBoundFunc()(d,c,e)),o.setAbsolutePosition(c);const h=o.getAbsolutePosition();if(d.x===h.x&&d.y===h.y)return;if(this._movingAnchorName==="rotater"){const E=this._getNodeRect();r=o.x()-E.width/2,n=-o.y()+E.height/2;let I=Math.atan2(-n,r)+Math.PI/2;E.height<0&&(I-=Math.PI);const k=oo.Konva.getAngle(this.rotation())+I,N=oo.Konva.getAngle(this.rotationSnapTolerance()),D=iz(this.rotationSnaps(),k,N)-E.rotation,z=nz(E,D);this._fitNodesInto(z,e);return}const C=this.shiftBehavior();let v;C==="inverted"?v=this.keepRatio()&&!e.shiftKey:C==="none"?v=this.keepRatio():v=this.keepRatio()||e.shiftKey;var b=this.centeredScaling()||e.altKey;if(this._movingAnchorName==="top-left"){if(v){var g=b?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(g.x-o.x(),2)+Math.pow(g.y-o.y(),2));var m=this.findOne(".top-left").x()>g.x?-1:1,w=this.findOne(".top-left").y()>g.y?-1:1;r=i*this.cos*m,n=i*this.sin*w,this.findOne(".top-left").x(g.x-r),this.findOne(".top-left").y(g.y-n)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(v){var g=b?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-g.x,2)+Math.pow(g.y-o.y(),2));var m=this.findOne(".top-right").x()<g.x?-1:1,w=this.findOne(".top-right").y()>g.y?-1:1;r=i*this.cos*m,n=i*this.sin*w,this.findOne(".top-right").x(g.x+r),this.findOne(".top-right").y(g.y-n)}var x=o.position();this.findOne(".top-left").y(x.y),this.findOne(".bottom-right").x(x.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(v){var g=b?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(g.x-o.x(),2)+Math.pow(o.y()-g.y,2));var m=g.x<o.x()?-1:1,w=o.y()<g.y?-1:1;r=i*this.cos*m,n=i*this.sin*w,o.x(g.x-r),o.y(g.y+n)}x=o.position(),this.findOne(".top-left").x(x.x),this.findOne(".bottom-right").y(x.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(o.y());else if(this._movingAnchorName==="bottom-right"){if(v){var g=b?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(o.x()-g.x,2)+Math.pow(o.y()-g.y,2));var m=this.findOne(".bottom-right").x()<g.x?-1:1,w=this.findOne(".bottom-right").y()<g.y?-1:1;r=i*this.cos*m,n=i*this.sin*w,this.findOne(".bottom-right").x(g.x+r),this.findOne(".bottom-right").y(g.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var b=this.centeredScaling()||e.altKey;if(b){const E=this.findOne(".top-left"),I=this.findOne(".bottom-right"),R=E.x(),k=E.y(),N=this.getWidth()-I.x(),T=this.getHeight()-I.y();I.move({x:-R,y:-k}),E.move({x:N,y:T})}const O=this.findOne(".top-left").getAbsolutePosition();r=O.x,n=O.y;const f=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),S=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:r,y:n,width:f,height:S,rotation:oo.Konva.getAngle(this.rotation())},e)}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){var r;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 n=this.getNode();Bv--,this._fire("transformend",{evt:e,target:n}),(r=this.getLayer())===null||r===void 0||r.batchDraw(),n&&this._nodes.forEach(i=>{var o;i._fire("transformend",{evt:e,target:i}),(o=i.getLayer())===null||o===void 0||o.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(e,r){const n=this._getNodeRect(),i=1;if(Ut.Util._inRange(e.width,-this.padding()*2-i,i)){this.update();return}if(Ut.Util._inRange(e.height,-this.padding()*2-i,i)){this.update();return}const o=new Ut.Transform;if(o.rotate(oo.Konva.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const v=o.point({x:-this.padding()*2,y:0});e.x+=v.x,e.y+=v.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=v.x,this._anchorDragOffset.y-=v.y}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const v=o.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=v.x,this._anchorDragOffset.y-=v.y,e.width+=this.padding()*2}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const v=o.point({x:0,y:-this.padding()*2});e.x+=v.x,e.y+=v.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=v.x,this._anchorDragOffset.y-=v.y,e.height+=this.padding()*2}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const v=o.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=v.x,this._anchorDragOffset.y-=v.y,e.height+=this.padding()*2}if(this.boundBoxFunc()){const v=this.boundBoxFunc()(n,e);v?e=v:Ut.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const a=1e7,s=new Ut.Transform;s.translate(n.x,n.y),s.rotate(n.rotation),s.scale(n.width/a,n.height/a);const c=new Ut.Transform,d=e.width/a,h=e.height/a;this.flipEnabled()===!1?(c.translate(e.x,e.y),c.rotate(e.rotation),c.translate(e.width<0?e.width:0,e.height<0?e.height:0),c.scale(Math.abs(d),Math.abs(h))):(c.translate(e.x,e.y),c.rotate(e.rotation),c.scale(d,h));const C=c.multiply(s.invert());this._nodes.forEach(v=>{var g;const m=v.getParent().getAbsoluteTransform(),w=v.getTransform().copy();w.translate(v.offsetX(),v.offsetY());const x=new Ut.Transform;x.multiply(m.copy().invert()).multiply(C).multiply(m).multiply(w);const b=x.decompose();v.setAttrs(b),(g=v.getLayer())===null||g===void 0||g.batchDraw()}),this.rotation(Ut.Util._getRotation(e.rotation)),this._nodes.forEach(v=>{this._fire("transform",{evt:r,target:v}),v._fire("transform",{evt:r,target:v})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,r){this.findOne(e).setAttrs(r)}update(){var e;const r=this._getNodeRect();this.rotation(Ut.Util._getRotation(r.rotation));const n=r.width,i=r.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),c=this.anchorSize(),d=this.find("._anchor");d.forEach(C=>{C.setAttrs({width:c,height:c,offsetX:c/2,offsetY:c/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:c/2+s,offsetY:c/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:c/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:c/2-s,offsetY:c/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:c/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:i/2,offsetX:c/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:c/2+s,offsetY:c/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:i,offsetY:c/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:i,offsetX:c/2-s,offsetY:c/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*Ut.Util._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const h=this.anchorStyleFunc();h&&d.forEach(C=>{h(C)}),(e=this.getLayer())===null||e===void 0||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),sS.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return aS.Node.prototype.toObject.call(this)}clone(e){return aS.Node.prototype.clone.call(this,e)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};qp.Transformer=Ot;Ot.isTransforming=()=>Bv>0;function oz(t){return t instanceof Array||Ut.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(e){I2.indexOf(e)===-1&&Ut.Util.warn("Unknown anchor name: "+e+". Available names are: "+I2.join(", "))}),t||[]}Ot.prototype.className="Transformer";(0,Zj._registerNode)(Ot);Ft.Factory.addGetterSetter(Ot,"enabledAnchors",I2,oz);Ft.Factory.addGetterSetter(Ot,"flipEnabled",!0,(0,Hs.getBooleanValidator)());Ft.Factory.addGetterSetter(Ot,"resizeEnabled",!0);Ft.Factory.addGetterSetter(Ot,"anchorSize",10,(0,Hs.getNumberValidator)());Ft.Factory.addGetterSetter(Ot,"rotateEnabled",!0);Ft.Factory.addGetterSetter(Ot,"rotateLineVisible",!0);Ft.Factory.addGetterSetter(Ot,"rotationSnaps",[]);Ft.Factory.addGetterSetter(Ot,"rotateAnchorOffset",50,(0,Hs.getNumberValidator)());Ft.Factory.addGetterSetter(Ot,"rotateAnchorCursor","crosshair");Ft.Factory.addGetterSetter(Ot,"rotationSnapTolerance",5,(0,Hs.getNumberValidator)());Ft.Factory.addGetterSetter(Ot,"borderEnabled",!0);Ft.Factory.addGetterSetter(Ot,"anchorStroke","rgb(0, 161, 255)");Ft.Factory.addGetterSetter(Ot,"anchorStrokeWidth",1,(0,Hs.getNumberValidator)());Ft.Factory.addGetterSetter(Ot,"anchorFill","white");Ft.Factory.addGetterSetter(Ot,"anchorCornerRadius",0,(0,Hs.getNumberValidator)());Ft.Factory.addGetterSetter(Ot,"borderStroke","rgb(0, 161, 255)");Ft.Factory.addGetterSetter(Ot,"borderStrokeWidth",1,(0,Hs.getNumberValidator)());Ft.Factory.addGetterSetter(Ot,"borderDash");Ft.Factory.addGetterSetter(Ot,"keepRatio",!0);Ft.Factory.addGetterSetter(Ot,"shiftBehavior","default");Ft.Factory.addGetterSetter(Ot,"centeredScaling",!1);Ft.Factory.addGetterSetter(Ot,"ignoreStroke",!1);Ft.Factory.addGetterSetter(Ot,"padding",0,(0,Hs.getNumberValidator)());Ft.Factory.addGetterSetter(Ot,"nodes");Ft.Factory.addGetterSetter(Ot,"node");Ft.Factory.addGetterSetter(Ot,"boundBoxFunc");Ft.Factory.addGetterSetter(Ot,"anchorDragBoundFunc");Ft.Factory.addGetterSetter(Ot,"anchorStyleFunc");Ft.Factory.addGetterSetter(Ot,"shouldOverdrawWholeArea",!1);Ft.Factory.addGetterSetter(Ot,"useSingleNodeRotation",!0);Ft.Factory.backCompat(Ot,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var Qp={};Object.defineProperty(Qp,"__esModule",{value:!0});Qp.Wedge=void 0;const Jp=wt,az=Jr,sz=ft,Uk=Xe,lz=ft;let Da=class extends az.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,sz.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};Qp.Wedge=Da;Da.prototype.className="Wedge";Da.prototype._centroid=!0;Da.prototype._attrsAffectingSize=["radius"];(0,lz._registerNode)(Da);Jp.Factory.addGetterSetter(Da,"radius",0,(0,Uk.getNumberValidator)());Jp.Factory.addGetterSetter(Da,"angle",0,(0,Uk.getNumberValidator)());Jp.Factory.addGetterSetter(Da,"clockwise",!1);Jp.Factory.backCompat(Da,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var eg={};Object.defineProperty(eg,"__esModule",{value:!0});eg.Blur=void 0;const cS=wt,cz=fr,uz=Xe;function uS(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const dz=[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],hz=[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 fz(t,e){const r=t.data,n=t.width,i=t.height;let o,a,s,c,d,h,C,v,g,m,w,x,b,O,f,S,E,I,R,k,N,T,D,z;const B=e+e+1,Y=n-1,W=i-1,q=e+1,ee=q*(q+1)/2,K=new uS,ue=dz[e],ne=hz[e];let ae=null,J=K,Q=null,te=null;for(s=1;s<B;s++)J=J.next=new uS,s===q&&(ae=J);for(J.next=K,C=h=0,a=0;a<i;a++){for(S=E=I=R=v=g=m=w=0,x=q*(k=r[h]),b=q*(N=r[h+1]),O=q*(T=r[h+2]),f=q*(D=r[h+3]),v+=ee*k,g+=ee*N,m+=ee*T,w+=ee*D,J=K,s=0;s<q;s++)J.r=k,J.g=N,J.b=T,J.a=D,J=J.next;for(s=1;s<q;s++)c=h+((Y<s?Y:s)<<2),v+=(J.r=k=r[c])*(z=q-s),g+=(J.g=N=r[c+1])*z,m+=(J.b=T=r[c+2])*z,w+=(J.a=D=r[c+3])*z,S+=k,E+=N,I+=T,R+=D,J=J.next;for(Q=K,te=ae,o=0;o<n;o++)r[h+3]=D=w*ue>>ne,D!==0?(D=255/D,r[h]=(v*ue>>ne)*D,r[h+1]=(g*ue>>ne)*D,r[h+2]=(m*ue>>ne)*D):r[h]=r[h+1]=r[h+2]=0,v-=x,g-=b,m-=O,w-=f,x-=Q.r,b-=Q.g,O-=Q.b,f-=Q.a,c=C+((c=o+e+1)<Y?c:Y)<<2,S+=Q.r=r[c],E+=Q.g=r[c+1],I+=Q.b=r[c+2],R+=Q.a=r[c+3],v+=S,g+=E,m+=I,w+=R,Q=Q.next,x+=k=te.r,b+=N=te.g,O+=T=te.b,f+=D=te.a,S-=k,E-=N,I-=T,R-=D,te=te.next,h+=4;C+=n}for(o=0;o<n;o++){for(E=I=R=S=g=m=w=v=0,h=o<<2,x=q*(k=r[h]),b=q*(N=r[h+1]),O=q*(T=r[h+2]),f=q*(D=r[h+3]),v+=ee*k,g+=ee*N,m+=ee*T,w+=ee*D,J=K,s=0;s<q;s++)J.r=k,J.g=N,J.b=T,J.a=D,J=J.next;for(d=n,s=1;s<=e;s++)h=d+o<<2,v+=(J.r=k=r[h])*(z=q-s),g+=(J.g=N=r[h+1])*z,m+=(J.b=T=r[h+2])*z,w+=(J.a=D=r[h+3])*z,S+=k,E+=N,I+=T,R+=D,J=J.next,s<W&&(d+=n);for(h=o,Q=K,te=ae,a=0;a<i;a++)c=h<<2,r[c+3]=D=w*ue>>ne,D>0?(D=255/D,r[c]=(v*ue>>ne)*D,r[c+1]=(g*ue>>ne)*D,r[c+2]=(m*ue>>ne)*D):r[c]=r[c+1]=r[c+2]=0,v-=x,g-=b,m-=O,w-=f,x-=Q.r,b-=Q.g,O-=Q.b,f-=Q.a,c=o+((c=a+q)<W?c:W)*n<<2,v+=S+=Q.r=r[c],g+=E+=Q.g=r[c+1],m+=I+=Q.b=r[c+2],w+=R+=Q.a=r[c+3],Q=Q.next,x+=k=te.r,b+=N=te.g,O+=T=te.b,f+=D=te.a,S-=k,E-=N,I-=T,R-=D,te=te.next,h+=n}}const pz=function(e){const r=Math.round(this.blurRadius());r>0&&fz(e,r)};eg.Blur=pz;cS.Factory.addGetterSetter(cz.Node,"blurRadius",0,(0,uz.getNumberValidator)(),cS.Factory.afterSetFilter);var tg={};Object.defineProperty(tg,"__esModule",{value:!0});tg.Brighten=void 0;const dS=wt,gz=fr,mz=Xe,vz=function(t){const e=this.brightness()*255,r=t.data,n=r.length;for(let i=0;i<n;i+=4)r[i]+=e,r[i+1]+=e,r[i+2]+=e};tg.Brighten=vz;dS.Factory.addGetterSetter(gz.Node,"brightness",0,(0,mz.getNumberValidator)(),dS.Factory.afterSetFilter);var rg={};Object.defineProperty(rg,"__esModule",{value:!0});rg.Contrast=void 0;const hS=wt,yz=fr,Cz=Xe,wz=function(t){const e=Math.pow((this.contrast()+100)/100,2),r=t.data,n=r.length;let i=150,o=150,a=150;for(let s=0;s<n;s+=4)i=r[s],o=r[s+1],a=r[s+2],i/=255,i-=.5,i*=e,i+=.5,i*=255,o/=255,o-=.5,o*=e,o+=.5,o*=255,a/=255,a-=.5,a*=e,a+=.5,a*=255,i=i<0?0:i>255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,r[s]=i,r[s+1]=o,r[s+2]=a};rg.Contrast=wz;hS.Factory.addGetterSetter(yz.Node,"contrast",0,(0,Cz.getNumberValidator)(),hS.Factory.afterSetFilter);var ng={};Object.defineProperty(ng,"__esModule",{value:!0});ng.Emboss=void 0;const Is=wt,ig=fr,Sz=Or,Wk=Xe,bz=function(t){const e=this.embossStrength()*10,r=this.embossWhiteLevel()*255,n=this.embossDirection(),i=this.embossBlend(),o=t.data,a=t.width,s=t.height,c=a*4;let d=0,h=0,C=s;switch(n){case"top-left":d=-1,h=-1;break;case"top":d=-1,h=0;break;case"top-right":d=-1,h=1;break;case"right":d=0,h=1;break;case"bottom-right":d=1,h=1;break;case"bottom":d=1,h=0;break;case"bottom-left":d=1,h=-1;break;case"left":d=0,h=-1;break;default:Sz.Util.error("Unknown emboss direction: "+n)}do{const v=(C-1)*c;let g=d;C+g<1&&(g=0),C+g>s&&(g=0);const m=(C-1+g)*a*4;let w=a;do{const x=v+(w-1)*4;let b=h;w+b<1&&(b=0),w+b>a&&(b=0);const O=m+(w-1+b)*4,f=o[x]-o[O],S=o[x+1]-o[O+1],E=o[x+2]-o[O+2];let I=f;const R=I>0?I:-I,k=S>0?S:-S,N=E>0?E:-E;if(k>R&&(I=S),N>R&&(I=E),I*=e,i){const T=o[x]+I,D=o[x+1]+I,z=o[x+2]+I;o[x]=T>255?255:T<0?0:T,o[x+1]=D>255?255:D<0?0:D,o[x+2]=z>255?255:z<0?0:z}else{let T=r-I;T<0?T=0:T>255&&(T=255),o[x]=o[x+1]=o[x+2]=T}}while(--w)}while(--C)};ng.Emboss=bz;Is.Factory.addGetterSetter(ig.Node,"embossStrength",.5,(0,Wk.getNumberValidator)(),Is.Factory.afterSetFilter);Is.Factory.addGetterSetter(ig.Node,"embossWhiteLevel",.5,(0,Wk.getNumberValidator)(),Is.Factory.afterSetFilter);Is.Factory.addGetterSetter(ig.Node,"embossDirection","top-left",void 0,Is.Factory.afterSetFilter);Is.Factory.addGetterSetter(ig.Node,"embossBlend",!1,void 0,Is.Factory.afterSetFilter);var og={};Object.defineProperty(og,"__esModule",{value:!0});og.Enhance=void 0;const fS=wt,_z=fr,xz=Xe;function X4(t,e,r,n,i){const o=r-e,a=i-n;if(o===0)return n+a/2;if(a===0)return n;let s=(t-e)/o;return s=a*s+n,s}const Ez=function(t){const e=t.data,r=e.length;let n=e[0],i=n,o,a=e[1],s=a,c,d=e[2],h=d,C;const v=this.enhance();if(v===0)return;for(let I=0;I<r;I+=4)o=e[I+0],o<n?n=o:o>i&&(i=o),c=e[I+1],c<a?a=c:c>s&&(s=c),C=e[I+2],C<d?d=C:C>h&&(h=C);i===n&&(i=255,n=0),s===a&&(s=255,a=0),h===d&&(h=255,d=0);let g,m,w,x,b,O,f,S,E;v>0?(m=i+v*(255-i),w=n-v*(n-0),b=s+v*(255-s),O=a-v*(a-0),S=h+v*(255-h),E=d-v*(d-0)):(g=(i+n)*.5,m=i+v*(i-g),w=n+v*(n-g),x=(s+a)*.5,b=s+v*(s-x),O=a+v*(a-x),f=(h+d)*.5,S=h+v*(h-f),E=d+v*(d-f));for(let I=0;I<r;I+=4)e[I+0]=X4(e[I+0],n,i,w,m),e[I+1]=X4(e[I+1],a,s,O,b),e[I+2]=X4(e[I+2],d,h,E,S)};og.Enhance=Ez;fS.Factory.addGetterSetter(_z.Node,"enhance",0,(0,xz.getNumberValidator)(),fS.Factory.afterSetFilter);var ag={};Object.defineProperty(ag,"__esModule",{value:!0});ag.Grayscale=void 0;const Oz=function(t){const e=t.data,r=e.length;for(let n=0;n<r;n+=4){const i=.34*e[n]+.5*e[n+1]+.16*e[n+2];e[n]=i,e[n+1]=i,e[n+2]=i}};ag.Grayscale=Oz;var sg={};Object.defineProperty(sg,"__esModule",{value:!0});sg.HSL=void 0;const Uu=wt,A8=fr,L8=Xe;Uu.Factory.addGetterSetter(A8.Node,"hue",0,(0,L8.getNumberValidator)(),Uu.Factory.afterSetFilter);Uu.Factory.addGetterSetter(A8.Node,"saturation",0,(0,L8.getNumberValidator)(),Uu.Factory.afterSetFilter);Uu.Factory.addGetterSetter(A8.Node,"luminance",0,(0,L8.getNumberValidator)(),Uu.Factory.afterSetFilter);const Pz=function(t){const e=t.data,r=e.length,n=1,i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a=this.luminance()*127,s=n*i*Math.cos(o*Math.PI/180),c=n*i*Math.sin(o*Math.PI/180),d=.299*n+.701*s+.167*c,h=.587*n-.587*s+.33*c,C=.114*n-.114*s-.497*c,v=.299*n-.299*s-.328*c,g=.587*n+.413*s+.035*c,m=.114*n-.114*s+.293*c,w=.299*n-.3*s+1.25*c,x=.587*n-.586*s-1.05*c,b=.114*n+.886*s-.2*c;let O,f,S,E;for(let I=0;I<r;I+=4)O=e[I+0],f=e[I+1],S=e[I+2],E=e[I+3],e[I+0]=d*O+h*f+C*S+a,e[I+1]=v*O+g*f+m*S+a,e[I+2]=w*O+x*f+b*S+a,e[I+3]=E};sg.HSL=Pz;var lg={};Object.defineProperty(lg,"__esModule",{value:!0});lg.HSV=void 0;const Wu=wt,M8=fr,R8=Xe,kz=function(t){const e=t.data,r=e.length,n=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a=n*i*Math.cos(o*Math.PI/180),s=n*i*Math.sin(o*Math.PI/180),c=.299*n+.701*a+.167*s,d=.587*n-.587*a+.33*s,h=.114*n-.114*a-.497*s,C=.299*n-.299*a-.328*s,v=.587*n+.413*a+.035*s,g=.114*n-.114*a+.293*s,m=.299*n-.3*a+1.25*s,w=.587*n-.586*a-1.05*s,x=.114*n+.886*a-.2*s;let b,O,f,S;for(let E=0;E<r;E+=4)b=e[E+0],O=e[E+1],f=e[E+2],S=e[E+3],e[E+0]=c*b+d*O+h*f,e[E+1]=C*b+v*O+g*f,e[E+2]=m*b+w*O+x*f,e[E+3]=S};lg.HSV=kz;Wu.Factory.addGetterSetter(M8.Node,"hue",0,(0,R8.getNumberValidator)(),Wu.Factory.afterSetFilter);Wu.Factory.addGetterSetter(M8.Node,"saturation",0,(0,R8.getNumberValidator)(),Wu.Factory.afterSetFilter);Wu.Factory.addGetterSetter(M8.Node,"value",0,(0,R8.getNumberValidator)(),Wu.Factory.afterSetFilter);var cg={};Object.defineProperty(cg,"__esModule",{value:!0});cg.Invert=void 0;const Tz=function(t){const e=t.data,r=e.length;for(let n=0;n<r;n+=4)e[n]=255-e[n],e[n+1]=255-e[n+1],e[n+2]=255-e[n+2]};cg.Invert=Tz;var ug={};Object.defineProperty(ug,"__esModule",{value:!0});ug.Kaleidoscope=void 0;const A2=wt,Xk=fr,pS=Or,Kk=Xe,Iz=function(t,e,r){const n=t.data,i=e.data,o=t.width,a=t.height,s=r.polarCenterX||o/2,c=r.polarCenterY||a/2;let d=Math.sqrt(s*s+c*c),h=o-s,C=a-c;const v=Math.sqrt(h*h+C*C);d=v>d?v:d;const g=a,m=o,w=360/m*Math.PI/180;for(let x=0;x<m;x+=1){const b=Math.sin(x*w),O=Math.cos(x*w);for(let f=0;f<g;f+=1){h=Math.floor(s+d*f/g*O),C=Math.floor(c+d*f/g*b);let S=(C*o+h)*4;const E=n[S+0],I=n[S+1],R=n[S+2],k=n[S+3];S=(x+f*o)*4,i[S+0]=E,i[S+1]=I,i[S+2]=R,i[S+3]=k}}},Az=function(t,e,r){const n=t.data,i=e.data,o=t.width,a=t.height,s=r.polarCenterX||o/2,c=r.polarCenterY||a/2;let d=Math.sqrt(s*s+c*c),h=o-s,C=a-c;const v=Math.sqrt(h*h+C*C);d=v>d?v:d;const g=a,m=o,w=0;let x,b;for(h=0;h<o;h+=1)for(C=0;C<a;C+=1){const O=h-s,f=C-c,S=Math.sqrt(O*O+f*f)*g/d;let E=(Math.atan2(f,O)*180/Math.PI+360+w)%360;E=E*m/360,x=Math.floor(E),b=Math.floor(S);let I=(b*o+x)*4;const R=n[I+0],k=n[I+1],N=n[I+2],T=n[I+3];I=(C*o+h)*4,i[I+0]=R,i[I+1]=k,i[I+2]=N,i[I+3]=T}},Lz=function(t){const e=t.width,r=t.height;let n,i,o,a,s,c,d,h,C,v,g=Math.round(this.kaleidoscopePower());const m=Math.round(this.kaleidoscopeAngle()),w=Math.floor(e*(m%360)/360);if(g<1)return;const x=pS.Util.createCanvasElement();x.width=e,x.height=r;const b=x.getContext("2d").getImageData(0,0,e,r);pS.Util.releaseCanvas(x),Iz(t,b,{polarCenterX:e/2,polarCenterY:r/2});let O=e/Math.pow(2,g);for(;O<=8;)O=O*2,g-=1;O=Math.ceil(O);let f=O,S=0,E=f,I=1;for(w+O>e&&(S=f,E=0,I=-1),i=0;i<r;i+=1)for(n=S;n!==E;n+=I)o=Math.round(n+w)%e,C=(e*i+o)*4,s=b.data[C+0],c=b.data[C+1],d=b.data[C+2],h=b.data[C+3],v=(e*i+n)*4,b.data[v+0]=s,b.data[v+1]=c,b.data[v+2]=d,b.data[v+3]=h;for(i=0;i<r;i+=1)for(f=Math.floor(O),a=0;a<g;a+=1){for(n=0;n<f+1;n+=1)C=(e*i+n)*4,s=b.data[C+0],c=b.data[C+1],d=b.data[C+2],h=b.data[C+3],v=(e*i+f*2-n-1)*4,b.data[v+0]=s,b.data[v+1]=c,b.data[v+2]=d,b.data[v+3]=h;f*=2}Az(b,t,{})};ug.Kaleidoscope=Lz;A2.Factory.addGetterSetter(Xk.Node,"kaleidoscopePower",2,(0,Kk.getNumberValidator)(),A2.Factory.afterSetFilter);A2.Factory.addGetterSetter(Xk.Node,"kaleidoscopeAngle",0,(0,Kk.getNumberValidator)(),A2.Factory.afterSetFilter);var dg={};Object.defineProperty(dg,"__esModule",{value:!0});dg.Mask=void 0;const gS=wt,Mz=fr,Rz=Xe;function J1(t,e,r){let n=(r*t.width+e)*4;const i=[];return i.push(t.data[n++],t.data[n++],t.data[n++],t.data[n++]),i}function l0(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}function Nz(t){const e=[0,0,0];for(let r=0;r<t.length;r++)e[0]+=t[r][0],e[1]+=t[r][1],e[2]+=t[r][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}function Fz(t,e){const r=J1(t,0,0),n=J1(t,t.width-1,0),i=J1(t,0,t.height-1),o=J1(t,t.width-1,t.height-1),a=e||10;if(l0(r,n)<a&&l0(n,o)<a&&l0(o,i)<a&&l0(i,r)<a){const s=Nz([n,r,o,i]),c=[];for(let d=0;d<t.width*t.height;d++){const h=l0(s,[t.data[d*4],t.data[d*4+1],t.data[d*4+2]]);c[d]=h<a?0:255}return c}}function Dz(t,e){for(let r=0;r<t.width*t.height;r++)t.data[4*r+3]=e[r]}function jz(t,e,r){const n=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(n.length)),o=Math.floor(i/2),a=[];for(let s=0;s<r;s++)for(let c=0;c<e;c++){const d=s*e+c;let h=0;for(let C=0;C<i;C++)for(let v=0;v<i;v++){const g=s+C-o,m=c+v-o;if(g>=0&&g<r&&m>=0&&m<e){const w=g*e+m,x=n[C*i+v];h+=t[w]*x}}a[d]=h===255*8?255:0}return a}function zz(t,e,r){const n=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(n.length)),o=Math.floor(i/2),a=[];for(let s=0;s<r;s++)for(let c=0;c<e;c++){const d=s*e+c;let h=0;for(let C=0;C<i;C++)for(let v=0;v<i;v++){const g=s+C-o,m=c+v-o;if(g>=0&&g<r&&m>=0&&m<e){const w=g*e+m,x=n[C*i+v];h+=t[w]*x}}a[d]=h>=255*4?255:0}return a}function $z(t,e,r){const n=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(n.length)),o=Math.floor(i/2),a=[];for(let s=0;s<r;s++)for(let c=0;c<e;c++){const d=s*e+c;let h=0;for(let C=0;C<i;C++)for(let v=0;v<i;v++){const g=s+C-o,m=c+v-o;if(g>=0&&g<r&&m>=0&&m<e){const w=g*e+m,x=n[C*i+v];h+=t[w]*x}}a[d]=h}return a}const Bz=function(t){const e=this.threshold();let r=Fz(t,e);return r&&(r=jz(r,t.width,t.height),r=zz(r,t.width,t.height),r=$z(r,t.width,t.height),Dz(t,r)),t};dg.Mask=Bz;gS.Factory.addGetterSetter(Mz.Node,"threshold",0,(0,Rz.getNumberValidator)(),gS.Factory.afterSetFilter);var hg={};Object.defineProperty(hg,"__esModule",{value:!0});hg.Noise=void 0;const mS=wt,Hz=fr,Gz=Xe,Vz=function(t){const e=this.noise()*255,r=t.data,n=r.length,i=e/2;for(let o=0;o<n;o+=4)r[o+0]+=i-2*i*Math.random(),r[o+1]+=i-2*i*Math.random(),r[o+2]+=i-2*i*Math.random()};hg.Noise=Vz;mS.Factory.addGetterSetter(Hz.Node,"noise",.2,(0,Gz.getNumberValidator)(),mS.Factory.afterSetFilter);var fg={};Object.defineProperty(fg,"__esModule",{value:!0});fg.Pixelate=void 0;const vS=wt,Uz=Or,Wz=fr,Xz=Xe,Kz=function(t){let e=Math.ceil(this.pixelSize()),r=t.width,n=t.height,i,o,a,s,c,d,h,C=Math.ceil(r/e),v=Math.ceil(n/e),g,m,w,x,b,O,f,S=t.data;if(e<=0){Uz.Util.error("pixelSize value can not be <= 0");return}for(b=0;b<C;b+=1)for(O=0;O<v;O+=1){for(s=0,c=0,d=0,h=0,g=b*e,m=g+e,w=O*e,x=w+e,f=0,i=g;i<m;i+=1)if(!(i>=r))for(o=w;o<x;o+=1)o>=n||(a=(r*o+i)*4,s+=S[a+0],c+=S[a+1],d+=S[a+2],h+=S[a+3],f+=1);for(s=s/f,c=c/f,d=d/f,h=h/f,i=g;i<m;i+=1)if(!(i>=r))for(o=w;o<x;o+=1)o>=n||(a=(r*o+i)*4,S[a+0]=s,S[a+1]=c,S[a+2]=d,S[a+3]=h)}};fg.Pixelate=Kz;vS.Factory.addGetterSetter(Wz.Node,"pixelSize",8,(0,Xz.getNumberValidator)(),vS.Factory.afterSetFilter);var pg={};Object.defineProperty(pg,"__esModule",{value:!0});pg.Posterize=void 0;const yS=wt,Yz=fr,Zz=Xe,qz=function(t){const e=Math.round(this.levels()*254)+1,r=t.data,n=r.length,i=255/e;for(let o=0;o<n;o+=1)r[o]=Math.floor(r[o]/i)*i};pg.Posterize=qz;yS.Factory.addGetterSetter(Yz.Node,"levels",.5,(0,Zz.getNumberValidator)(),yS.Factory.afterSetFilter);var gg={};Object.defineProperty(gg,"__esModule",{value:!0});gg.RGB=void 0;const L2=wt,N8=fr,Qz=Xe,Jz=function(t){const e=t.data,r=e.length,n=this.red(),i=this.green(),o=this.blue();for(let a=0;a<r;a+=4){const s=(.34*e[a]+.5*e[a+1]+.16*e[a+2])/255;e[a]=s*n,e[a+1]=s*i,e[a+2]=s*o,e[a+3]=e[a+3]}};gg.RGB=Jz;L2.Factory.addGetterSetter(N8.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});L2.Factory.addGetterSetter(N8.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});L2.Factory.addGetterSetter(N8.Node,"blue",0,Qz.RGBComponent,L2.Factory.afterSetFilter);var mg={};Object.defineProperty(mg,"__esModule",{value:!0});mg.RGBA=void 0;const lh=wt,vg=fr,e$=Xe,t$=function(t){const e=t.data,r=e.length,n=this.red(),i=this.green(),o=this.blue(),a=this.alpha();for(let s=0;s<r;s+=4){const c=1-a;e[s]=n*a+e[s]*c,e[s+1]=i*a+e[s+1]*c,e[s+2]=o*a+e[s+2]*c}};mg.RGBA=t$;lh.Factory.addGetterSetter(vg.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});lh.Factory.addGetterSetter(vg.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});lh.Factory.addGetterSetter(vg.Node,"blue",0,e$.RGBComponent,lh.Factory.afterSetFilter);lh.Factory.addGetterSetter(vg.Node,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t});var yg={};Object.defineProperty(yg,"__esModule",{value:!0});yg.Sepia=void 0;const r$=function(t){const e=t.data,r=e.length;for(let n=0;n<r;n+=4){const i=e[n+0],o=e[n+1],a=e[n+2];e[n+0]=Math.min(255,i*.393+o*.769+a*.189),e[n+1]=Math.min(255,i*.349+o*.686+a*.168),e[n+2]=Math.min(255,i*.272+o*.534+a*.131)}};yg.Sepia=r$;var Cg={};Object.defineProperty(Cg,"__esModule",{value:!0});Cg.Solarize=void 0;const n$=function(t){const e=t.data,r=t.width,n=t.height,i=r*4;let o=n;do{const a=(o-1)*i;let s=r;do{const c=a+(s-1)*4;let d=e[c],h=e[c+1],C=e[c+2];d>127&&(d=255-d),h>127&&(h=255-h),C>127&&(C=255-C),e[c]=d,e[c+1]=h,e[c+2]=C}while(--s)}while(--o)};Cg.Solarize=n$;var wg={};Object.defineProperty(wg,"__esModule",{value:!0});wg.Threshold=void 0;const CS=wt,i$=fr,o$=Xe,a$=function(t){const e=this.threshold()*255,r=t.data,n=r.length;for(let i=0;i<n;i+=1)r[i]=r[i]<e?0:255};wg.Threshold=a$;CS.Factory.addGetterSetter(i$.Node,"threshold",.5,(0,o$.getNumberValidator)(),CS.Factory.afterSetFilter);Object.defineProperty(Tp,"__esModule",{value:!0});Tp.Konva=void 0;const wS=k2,s$=Np,l$=jp,c$=Bp,u$=Hp,d$=Gp,SS=Vu,h$=xh,f$=hd,p$=Ph,g$=Wp,m$=Xp,v$=Kp,y$=Yp,C$=pd,w$=Zp,S$=qp,b$=Qp,_$=eg,x$=tg,E$=rg,O$=ng,P$=og,k$=ag,T$=sg,I$=lg,A$=cg,L$=ug,M$=dg,R$=hg,N$=fg,F$=pg,D$=gg,j$=mg,z$=yg,$$=Cg,B$=wg;Tp.Konva=wS.Konva.Util._assign(wS.Konva,{Arc:s$.Arc,Arrow:l$.Arrow,Circle:c$.Circle,Ellipse:u$.Ellipse,Image:d$.Image,Label:SS.Label,Tag:SS.Tag,Line:h$.Line,Path:f$.Path,Rect:p$.Rect,RegularPolygon:g$.RegularPolygon,Ring:m$.Ring,Sprite:v$.Sprite,Star:y$.Star,Text:C$.Text,TextPath:w$.TextPath,Transformer:S$.Transformer,Wedge:b$.Wedge,Filters:{Blur:_$.Blur,Brighten:x$.Brighten,Contrast:E$.Contrast,Emboss:O$.Emboss,Enhance:P$.Enhance,Grayscale:k$.Grayscale,HSL:T$.HSL,HSV:I$.HSV,Invert:A$.Invert,Kaleidoscope:L$.Kaleidoscope,Mask:M$.Mask,Noise:R$.Noise,Pixelate:N$.Pixelate,Posterize:F$.Posterize,RGB:D$.RGB,RGBA:j$.RGBA,Sepia:z$.Sepia,Solarize:$$.Solarize,Threshold:B$.Threshold}});var H$=pk.exports;Object.defineProperty(H$,"__esModule",{value:!0});const G$=Tp;pk.exports=G$.Konva;var Hv={exports:{}};(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;var r=k2;Object.defineProperty(e,"Konva",{enumerable:!0,get:function(){return r.Konva}});const n=k2;t.exports=n.Konva})(Hv,Hv.exports);var V$=Hv.exports;const ch=ql(V$);var Yk={exports:{}};/**
* @license React
* react-reconciler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var U$=function(e){var r={},n=G,i=T0,o=Object.assign;function a(l){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+l,p=1;p<arguments.length;p++)u+="&args[]="+encodeURIComponent(arguments[p]);return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,c=Symbol.for("react.element"),d=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),m=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),S=Symbol.for("react.offscreen"),E=Symbol.iterator;function I(l){return l===null||typeof l!="object"?null:(l=E&&l[E]||l["@@iterator"],typeof l=="function"?l:null)}function R(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case h:return"Fragment";case d:return"Portal";case v:return"Profiler";case C:return"StrictMode";case x:return"Suspense";case b:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case m:return(l.displayName||"Context")+".Consumer";case g:return(l._context.displayName||"Context")+".Provider";case w:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case O:return u=l.displayName||null,u!==null?u:R(l.type)||"Memo";case f:u=l._payload,l=l._init;try{return R(l(u))}catch{}}return null}function k(l){var u=l.type;switch(l.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=u.render,l=l.displayName||l.name||"",u.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return R(u);case 8:return u===C?"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 u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function N(l){var u=l,p=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,u.flags&4098&&(p=u.return),l=u.return;while(l)}return u.tag===3?p:null}function T(l){if(N(l)!==l)throw Error(a(188))}function D(l){var u=l.alternate;if(!u){if(u=N(l),u===null)throw Error(a(188));return u!==l?null:l}for(var p=l,_=u;;){var P=p.return;if(P===null)break;var L=P.alternate;if(L===null){if(_=P.return,_!==null){p=_;continue}break}if(P.child===L.child){for(L=P.child;L;){if(L===p)return T(P),l;if(L===_)return T(P),u;L=L.sibling}throw Error(a(188))}if(p.return!==_.return)p=P,_=L;else{for(var H=!1,oe=P.child;oe;){if(oe===p){H=!0,p=P,_=L;break}if(oe===_){H=!0,_=P,p=L;break}oe=oe.sibling}if(!H){for(oe=L.child;oe;){if(oe===p){H=!0,p=L,_=P;break}if(oe===_){H=!0,_=L,p=P;break}oe=oe.sibling}if(!H)throw Error(a(189))}}if(p.alternate!==_)throw Error(a(190))}if(p.tag!==3)throw Error(a(188));return p.stateNode.current===p?l:u}function z(l){return l=D(l),l!==null?B(l):null}function B(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var u=B(l);if(u!==null)return u;l=l.sibling}return null}function Y(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){if(l.tag!==4){var u=Y(l);if(u!==null)return u}l=l.sibling}return null}var W=Array.isArray,q=e.getPublicInstance,ee=e.getRootHostContext,K=e.getChildHostContext,ue=e.prepareForCommit,ne=e.resetAfterCommit,ae=e.createInstance,J=e.appendInitialChild,Q=e.finalizeInitialChildren,te=e.prepareUpdate,we=e.shouldSetTextContent,U=e.createTextInstance,F=e.scheduleTimeout,$=e.cancelTimeout,ie=e.noTimeout,pe=e.isPrimaryRenderer,ce=e.supportsMutation,le=e.supportsPersistence,xe=e.supportsHydration,Ne=e.getInstanceFromNode,_e=e.preparePortalMount,He=e.getCurrentEventPriority,Ee=e.detachDeletedInstance,Ve=e.supportsMicrotasks,We=e.scheduleMicrotask,Me=e.supportsTestSelectors,gt=e.findFiberRoot,St=e.getBoundingRect,qe=e.getTextContent,je=e.isHiddenSubtree,Ke=e.matchAccessibilityRole,bt=e.setFocusIfFocusable,Lt=e.setupIntersectionObserver,tr=e.appendChild,Ii=e.appendChildToContainer,mt=e.commitTextUpdate,Pe=e.commitMount,at=e.commitUpdate,ct=e.insertBefore,Tt=e.insertInContainerBefore,It=e.removeChild,or=e.removeChildFromContainer,gr=e.resetTextContent,nn=e.hideInstance,pi=e.hideTextInstance,Qe=e.unhideInstance,Je=e.unhideTextInstance,jt=e.clearContainer,ut=e.cloneInstance,Dr=e.createContainerChildSet,jr=e.appendChildToContainerChildSet,Qi=e.finalizeContainerChildren,Ai=e.replaceContainerChildren,Va=e.cloneHiddenInstance,Sn=e.cloneHiddenTextInstance,rl=e.canHydrateInstance,nl=e.canHydrateTextInstance,mr=e.canHydrateSuspenseInstance,vr=e.isSuspenseInstancePending,pn=e.isSuspenseInstanceFallback,Kn=e.getSuspenseInstanceFallbackErrorDetails,xd=e.registerSuspenseInstanceRetry,wc=e.getNextHydratableSibling,j3=e.getFirstHydratableChild,z3=e.getFirstHydratableChildWithinContainer,$3=e.getFirstHydratableChildWithinSuspenseInstance,Ua=e.hydrateInstance,B3=e.hydrateTextInstance,H3=e.hydrateSuspenseInstance,G3=e.getNextHydratableInstanceAfterSuspenseInstance,V3=e.commitHydratedContainer,U3=e.commitHydratedSuspenseInstance,W3=e.clearSuspenseBoundary,Ed=e.clearSuspenseBoundaryFromContainer,X3=e.shouldDeleteUnhydratedTailInstances,Sc=e.didNotMatchHydratedContainerTextInstance,Od=e.didNotMatchHydratedTextInstance,Pd;function Oo(l){if(Pd===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);Pd=u&&u[1]||""}return`
`+Pd+l}var bc=!1;function kd(l,u){if(!l||bc)return"";bc=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(Te){var _=Te}Reflect.construct(l,[],u)}else{try{u.call()}catch(Te){_=Te}l.call(u.prototype)}else{try{throw Error()}catch(Te){_=Te}l()}}catch(Te){if(Te&&_&&typeof Te.stack=="string"){for(var P=Te.stack.split(`
`),L=_.stack.split(`
`),H=P.length-1,oe=L.length-1;1<=H&&0<=oe&&P[H]!==L[oe];)oe--;for(;1<=H&&0<=oe;H--,oe--)if(P[H]!==L[oe]){if(H!==1||oe!==1)do if(H--,oe--,0>oe||P[H]!==L[oe]){var me=`
`+P[H].replace(" at new "," at ");return l.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",l.displayName)),me}while(1<=H&&0<=oe);break}}}finally{bc=!1,Error.prepareStackTrace=p}return(l=l?l.displayName||l.name:"")?Oo(l):""}var K3=Object.prototype.hasOwnProperty,Td=[],ea=-1;function Po(l){return{current:l}}function Xt(l){0>ea||(l.current=Td[ea],Td[ea]=null,ea--)}function Vt(l,u){ea++,Td[ea]=l.current,l.current=u}var ko={},on=Po(ko),bn=Po(!1),ta=ko;function Wa(l,u){var p=l.type.contextTypes;if(!p)return ko;var _=l.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===u)return _.__reactInternalMemoizedMaskedChildContext;var P={},L;for(L in p)P[L]=u[L];return _&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=u,l.__reactInternalMemoizedMaskedChildContext=P),P}function _n(l){return l=l.childContextTypes,l!=null}function _c(){Xt(bn),Xt(on)}function il(l,u,p){if(on.current!==ko)throw Error(a(168));Vt(on,u),Vt(bn,p)}function xc(l,u,p){var _=l.stateNode;if(u=u.childContextTypes,typeof _.getChildContext!="function")return p;_=_.getChildContext();for(var P in _)if(!(P in u))throw Error(a(108,k(l)||"Unknown",P));return o({},p,_)}function Ec(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||ko,ta=on.current,Vt(on,l),Vt(bn,bn.current),!0}function Vh(l,u,p){var _=l.stateNode;if(!_)throw Error(a(169));p?(l=xc(l,u,ta),_.__reactInternalMemoizedMergedChildContext=l,Xt(bn),Xt(on),Vt(on,l)):Xt(bn),Vt(bn,p)}var Yn=Math.clz32?Math.clz32:q3,Y3=Math.log,Z3=Math.LN2;function q3(l){return l>>>=0,l===0?32:31-(Y3(l)/Z3|0)|0}var ol=64,Oc=4194304;function al(l){switch(l&-l){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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function Pc(l,u){var p=l.pendingLanes;if(p===0)return 0;var _=0,P=l.suspendedLanes,L=l.pingedLanes,H=p&268435455;if(H!==0){var oe=H&~P;oe!==0?_=al(oe):(L&=H,L!==0&&(_=al(L)))}else H=p&~P,H!==0?_=al(H):L!==0&&(_=al(L));if(_===0)return 0;if(u!==0&&u!==_&&!(u&P)&&(P=_&-_,L=u&-u,P>=L||P===16&&(L&4194240)!==0))return u;if(_&4&&(_|=p&16),u=l.entangledLanes,u!==0)for(l=l.entanglements,u&=_;0<u;)p=31-Yn(u),P=1<<p,_|=l[p],u&=~P;return _}function Id(l,u){switch(l){case 1:case 2:case 4:return u+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 u+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 Q3(l,u){for(var p=l.suspendedLanes,_=l.pingedLanes,P=l.expirationTimes,L=l.pendingLanes;0<L;){var H=31-Yn(L),oe=1<<H,me=P[H];me===-1?(!(oe&p)||oe&_)&&(P[H]=Id(oe,u)):me<=u&&(l.expiredLanes|=oe),L&=~oe}}function Ad(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function Uh(){var l=ol;return ol<<=1,!(ol&4194240)&&(ol=64),l}function Xa(l){for(var u=[],p=0;31>p;p++)u.push(l);return u}function ra(l,u,p){l.pendingLanes|=u,u!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,u=31-Yn(u),l[u]=p}function Ld(l,u){var p=l.pendingLanes&~u;l.pendingLanes=u,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=u,l.mutableReadLanes&=u,l.entangledLanes&=u,u=l.entanglements;var _=l.eventTimes;for(l=l.expirationTimes;0<p;){var P=31-Yn(p),L=1<<P;u[P]=0,_[P]=-1,l[P]=-1,p&=~L}}function sl(l,u){var p=l.entangledLanes|=u;for(l=l.entanglements;p;){var _=31-Yn(p),P=1<<_;P&u|l[_]&u&&(l[_]|=u),p&=~P}}var kt=0;function Md(l){return l&=-l,1<l?4<l?l&268435455?16:536870912:4:1}var ll=i.unstable_scheduleCallback,Rd=i.unstable_cancelCallback,na=i.unstable_shouldYield,cl=i.unstable_requestPaint,zr=i.unstable_now,kc=i.unstable_ImmediatePriority,J3=i.unstable_UserBlockingPriority,Tc=i.unstable_NormalPriority,e5=i.unstable_IdlePriority,Ic=null,gi=null;function t5(l){if(gi&&typeof gi.onCommitFiberRoot=="function")try{gi.onCommitFiberRoot(Ic,l,void 0,(l.current.flags&128)===128)}catch{}}function V(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}var re=typeof Object.is=="function"?Object.is:V,fe=null,ze=!1,vt=!1;function zt(l){fe===null?fe=[l]:fe.push(l)}function rr(l){ze=!0,zt(l)}function st(){if(!vt&&fe!==null){vt=!0;var l=0,u=kt;try{var p=fe;for(kt=1;l<p.length;l++){var _=p[l];do _=_(!0);while(_!==null)}fe=null,ze=!1}catch(P){throw fe!==null&&(fe=fe.slice(l+1)),ll(kc,st),P}finally{kt=u,vt=!1}}return null}var Nt=[],an=0,sn=null,To=0,xn=[],En=0,Io=null,ia=1,oa="";function ul(l,u){Nt[an++]=To,Nt[an++]=sn,sn=l,To=u}function $9(l,u,p){xn[En++]=ia,xn[En++]=oa,xn[En++]=Io,Io=l;var _=ia;l=oa;var P=32-Yn(_)-1;_&=~(1<<P),p+=1;var L=32-Yn(u)+P;if(30<L){var H=P-P%5;L=(_&(1<<H)-1).toString(32),_>>=H,P-=H,ia=1<<32-Yn(u)+P|p<<P|_,oa=L+l}else ia=1<<L|p<<P|_,oa=l}function r5(l){l.return!==null&&(ul(l,1),$9(l,1,0))}function n5(l){for(;l===sn;)sn=Nt[--an],Nt[an]=null,To=Nt[--an],Nt[an]=null;for(;l===Io;)Io=xn[--En],xn[En]=null,oa=xn[--En],xn[En]=null,ia=xn[--En],xn[En]=null}var mi=null,Li=null,ur=!1,Nd=!1,Ji=null;function B9(l,u){var p=Di(5,null,null,0);p.elementType="DELETED",p.stateNode=u,p.return=l,u=l.deletions,u===null?(l.deletions=[p],l.flags|=16):u.push(p)}function H9(l,u){switch(l.tag){case 5:return u=rl(u,l.type,l.pendingProps),u!==null?(l.stateNode=u,mi=l,Li=j3(u),!0):!1;case 6:return u=nl(u,l.pendingProps),u!==null?(l.stateNode=u,mi=l,Li=null,!0):!1;case 13:if(u=mr(u),u!==null){var p=Io!==null?{id:ia,overflow:oa}:null;return l.memoizedState={dehydrated:u,treeContext:p,retryLane:1073741824},p=Di(18,null,null,0),p.stateNode=u,p.return=l,l.child=p,mi=l,Li=null,!0}return!1;default:return!1}}function i5(l){return(l.mode&1)!==0&&(l.flags&128)===0}function o5(l){if(ur){var u=Li;if(u){var p=u;if(!H9(l,u)){if(i5(l))throw Error(a(418));u=wc(p);var _=mi;u&&H9(l,u)?B9(_,p):(l.flags=l.flags&-4097|2,ur=!1,mi=l)}}else{if(i5(l))throw Error(a(418));l.flags=l.flags&-4097|2,ur=!1,mi=l}}}function G9(l){for(l=l.return;l!==null&&l.tag!==5&&l.tag!==3&&l.tag!==13;)l=l.return;mi=l}function Wh(l){if(!xe||l!==mi)return!1;if(!ur)return G9(l),ur=!0,!1;if(l.tag!==3&&(l.tag!==5||X3(l.type)&&!we(l.type,l.memoizedProps))){var u=Li;if(u){if(i5(l))throw V9(),Error(a(418));for(;u;)B9(l,u),u=wc(u)}}if(G9(l),l.tag===13){if(!xe)throw Error(a(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(317));Li=G3(l)}else Li=mi?wc(l.stateNode):null;return!0}function V9(){for(var l=Li;l;)l=wc(l)}function Ac(){xe&&(Li=mi=null,Nd=ur=!1)}function a5(l){Ji===null?Ji=[l]:Ji.push(l)}var vL=s.ReactCurrentBatchConfig;function Xh(l,u){if(re(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var p=Object.keys(l),_=Object.keys(u);if(p.length!==_.length)return!1;for(_=0;_<p.length;_++){var P=p[_];if(!K3.call(u,P)||!re(l[P],u[P]))return!1}return!0}function yL(l){switch(l.tag){case 5:return Oo(l.type);case 16:return Oo("Lazy");case 13:return Oo("Suspense");case 19:return Oo("SuspenseList");case 0:case 2:case 15:return l=kd(l.type,!1),l;case 11:return l=kd(l.type.render,!1),l;case 1:return l=kd(l.type,!0),l;default:return""}}function Fd(l,u,p){if(l=p.ref,l!==null&&typeof l!="function"&&typeof l!="object"){if(p._owner){if(p=p._owner,p){if(p.tag!==1)throw Error(a(309));var _=p.stateNode}if(!_)throw Error(a(147,l));var P=_,L=""+l;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===L?u.ref:(u=function(H){var oe=P.refs;H===null?delete oe[L]:oe[L]=H},u._stringRef=L,u)}if(typeof l!="string")throw Error(a(284));if(!p._owner)throw Error(a(290,l))}return l}function Kh(l,u){throw l=Object.prototype.toString.call(u),Error(a(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l))}function U9(l){var u=l._init;return u(l._payload)}function W9(l){function u(ge,se){if(l){var ye=ge.deletions;ye===null?(ge.deletions=[se],ge.flags|=16):ye.push(se)}}function p(ge,se){if(!l)return null;for(;se!==null;)u(ge,se),se=se.sibling;return null}function _(ge,se){for(ge=new Map;se!==null;)se.key!==null?ge.set(se.key,se):ge.set(se.index,se),se=se.sibling;return ge}function P(ge,se){return ge=es(ge,se),ge.index=0,ge.sibling=null,ge}function L(ge,se,ye){return ge.index=ye,l?(ye=ge.alternate,ye!==null?(ye=ye.index,ye<se?(ge.flags|=2,se):ye):(ge.flags|=2,se)):(ge.flags|=1048576,se)}function H(ge){return l&&ge.alternate===null&&(ge.flags|=2),ge}function oe(ge,se,ye,Re){return se===null||se.tag!==6?(se=t4(ye,ge.mode,Re),se.return=ge,se):(se=P(se,ye),se.return=ge,se)}function me(ge,se,ye,Re){var Ue=ye.type;return Ue===h?$e(ge,se,ye.props.children,Re,ye.key):se!==null&&(se.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===f&&U9(Ue)===se.type)?(Re=P(se,ye.props),Re.ref=Fd(ge,se,ye),Re.return=ge,Re):(Re=E1(ye.type,ye.key,ye.props,null,ge.mode,Re),Re.ref=Fd(ge,se,ye),Re.return=ge,Re)}function Te(ge,se,ye,Re){return se===null||se.tag!==4||se.stateNode.containerInfo!==ye.containerInfo||se.stateNode.implementation!==ye.implementation?(se=r4(ye,ge.mode,Re),se.return=ge,se):(se=P(se,ye.children||[]),se.return=ge,se)}function $e(ge,se,ye,Re,Ue){return se===null||se.tag!==7?(se=vl(ye,ge.mode,Re,Ue),se.return=ge,se):(se=P(se,ye),se.return=ge,se)}function tt(ge,se,ye){if(typeof se=="string"&&se!==""||typeof se=="number")return se=t4(""+se,ge.mode,ye),se.return=ge,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case c:return ye=E1(se.type,se.key,se.props,null,ge.mode,ye),ye.ref=Fd(ge,null,se),ye.return=ge,ye;case d:return se=r4(se,ge.mode,ye),se.return=ge,se;case f:var Re=se._init;return tt(ge,Re(se._payload),ye)}if(W(se)||I(se))return se=vl(se,ge.mode,ye,null),se.return=ge,se;Kh(ge,se)}return null}function Le(ge,se,ye,Re){var Ue=se!==null?se.key:null;if(typeof ye=="string"&&ye!==""||typeof ye=="number")return Ue!==null?null:oe(ge,se,""+ye,Re);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case c:return ye.key===Ue?me(ge,se,ye,Re):null;case d:return ye.key===Ue?Te(ge,se,ye,Re):null;case f:return Ue=ye._init,Le(ge,se,Ue(ye._payload),Re)}if(W(ye)||I(ye))return Ue!==null?null:$e(ge,se,ye,Re,null);Kh(ge,ye)}return null}function ar(ge,se,ye,Re,Ue){if(typeof Re=="string"&&Re!==""||typeof Re=="number")return ge=ge.get(ye)||null,oe(se,ge,""+Re,Ue);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case c:return ge=ge.get(Re.key===null?ye:Re.key)||null,me(se,ge,Re,Ue);case d:return ge=ge.get(Re.key===null?ye:Re.key)||null,Te(se,ge,Re,Ue);case f:var dt=Re._init;return ar(ge,se,ye,dt(Re._payload),Ue)}if(W(Re)||I(Re))return ge=ge.get(ye)||null,$e(se,ge,Re,Ue,null);Kh(se,Re)}return null}function Kt(ge,se,ye,Re){for(var Ue=null,dt=null,rt=se,Mt=se=0,un=null;rt!==null&&Mt<ye.length;Mt++){rt.index>Mt?(un=rt,rt=null):un=rt.sibling;var Rt=Le(ge,rt,ye[Mt],Re);if(Rt===null){rt===null&&(rt=un);break}l&&rt&&Rt.alternate===null&&u(ge,rt),se=L(Rt,se,Mt),dt===null?Ue=Rt:dt.sibling=Rt,dt=Rt,rt=un}if(Mt===ye.length)return p(ge,rt),ur&&ul(ge,Mt),Ue;if(rt===null){for(;Mt<ye.length;Mt++)rt=tt(ge,ye[Mt],Re),rt!==null&&(se=L(rt,se,Mt),dt===null?Ue=rt:dt.sibling=rt,dt=rt);return ur&&ul(ge,Mt),Ue}for(rt=_(ge,rt);Mt<ye.length;Mt++)un=ar(rt,ge,Mt,ye[Mt],Re),un!==null&&(l&&un.alternate!==null&&rt.delete(un.key===null?Mt:un.key),se=L(un,se,Mt),dt===null?Ue=un:dt.sibling=un,dt=un);return l&&rt.forEach(function(ts){return u(ge,ts)}),ur&&ul(ge,Mt),Ue}function Jn(ge,se,ye,Re){var Ue=I(ye);if(typeof Ue!="function")throw Error(a(150));if(ye=Ue.call(ye),ye==null)throw Error(a(151));for(var dt=Ue=null,rt=se,Mt=se=0,un=null,Rt=ye.next();rt!==null&&!Rt.done;Mt++,Rt=ye.next()){rt.index>Mt?(un=rt,rt=null):un=rt.sibling;var ts=Le(ge,rt,Rt.value,Re);if(ts===null){rt===null&&(rt=un);break}l&&rt&&ts.alternate===null&&u(ge,rt),se=L(ts,se,Mt),dt===null?Ue=ts:dt.sibling=ts,dt=ts,rt=un}if(Rt.done)return p(ge,rt),ur&&ul(ge,Mt),Ue;if(rt===null){for(;!Rt.done;Mt++,Rt=ye.next())Rt=tt(ge,Rt.value,Re),Rt!==null&&(se=L(Rt,se,Mt),dt===null?Ue=Rt:dt.sibling=Rt,dt=Rt);return ur&&ul(ge,Mt),Ue}for(rt=_(ge,rt);!Rt.done;Mt++,Rt=ye.next())Rt=ar(rt,ge,Mt,Rt.value,Re),Rt!==null&&(l&&Rt.alternate!==null&&rt.delete(Rt.key===null?Mt:Rt.key),se=L(Rt,se,Mt),dt===null?Ue=Rt:dt.sibling=Rt,dt=Rt);return l&&rt.forEach(function(KL){return u(ge,KL)}),ur&&ul(ge,Mt),Ue}function ca(ge,se,ye,Re){if(typeof ye=="object"&&ye!==null&&ye.type===h&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case c:e:{for(var Ue=ye.key,dt=se;dt!==null;){if(dt.key===Ue){if(Ue=ye.type,Ue===h){if(dt.tag===7){p(ge,dt.sibling),se=P(dt,ye.props.children),se.return=ge,ge=se;break e}}else if(dt.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===f&&U9(Ue)===dt.type){p(ge,dt.sibling),se=P(dt,ye.props),se.ref=Fd(ge,dt,ye),se.return=ge,ge=se;break e}p(ge,dt);break}else u(ge,dt);dt=dt.sibling}ye.type===h?(se=vl(ye.props.children,ge.mode,Re,ye.key),se.return=ge,ge=se):(Re=E1(ye.type,ye.key,ye.props,null,ge.mode,Re),Re.ref=Fd(ge,se,ye),Re.return=ge,ge=Re)}return H(ge);case d:e:{for(dt=ye.key;se!==null;){if(se.key===dt)if(se.tag===4&&se.stateNode.containerInfo===ye.containerInfo&&se.stateNode.implementation===ye.implementation){p(ge,se.sibling),se=P(se,ye.children||[]),se.return=ge,ge=se;break e}else{p(ge,se);break}else u(ge,se);se=se.sibling}se=r4(ye,ge.mode,Re),se.return=ge,ge=se}return H(ge);case f:return dt=ye._init,ca(ge,se,dt(ye._payload),Re)}if(W(ye))return Kt(ge,se,ye,Re);if(I(ye))return Jn(ge,se,ye,Re);Kh(ge,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"?(ye=""+ye,se!==null&&se.tag===6?(p(ge,se.sibling),se=P(se,ye),se.return=ge,ge=se):(p(ge,se),se=t4(ye,ge.mode,Re),se.return=ge,ge=se),H(ge)):p(ge,se)}return ca}var Lc=W9(!0),X9=W9(!1),Yh=Po(null),Zh=null,Mc=null,s5=null;function l5(){s5=Mc=Zh=null}function K9(l,u,p){pe?(Vt(Yh,u._currentValue),u._currentValue=p):(Vt(Yh,u._currentValue2),u._currentValue2=p)}function c5(l){var u=Yh.current;Xt(Yh),pe?l._currentValue=u:l._currentValue2=u}function u5(l,u,p){for(;l!==null;){var _=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,_!==null&&(_.childLanes|=u)):_!==null&&(_.childLanes&u)!==u&&(_.childLanes|=u),l===p)break;l=l.return}}function Rc(l,u){Zh=l,s5=Mc=null,l=l.dependencies,l!==null&&l.firstContext!==null&&(l.lanes&u&&(Zn=!0),l.firstContext=null)}function Mi(l){var u=pe?l._currentValue:l._currentValue2;if(s5!==l)if(l={context:l,memoizedValue:u,next:null},Mc===null){if(Zh===null)throw Error(a(308));Mc=l,Zh.dependencies={lanes:0,firstContext:l}}else Mc=Mc.next=l;return u}var dl=null;function d5(l){dl===null?dl=[l]:dl.push(l)}function Y9(l,u,p,_){var P=u.interleaved;return P===null?(p.next=p,d5(u)):(p.next=P.next,P.next=p),u.interleaved=p,Ao(l,_)}function Ao(l,u){l.lanes|=u;var p=l.alternate;for(p!==null&&(p.lanes|=u),p=l,l=l.return;l!==null;)l.childLanes|=u,p=l.alternate,p!==null&&(p.childLanes|=u),p=l,l=l.return;return p.tag===3?p.stateNode:null}var Ka=!1;function h5(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Z9(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function aa(l,u){return{eventTime:l,lane:u,tag:0,payload:null,callback:null,next:null}}function Ya(l,u,p){var _=l.updateQueue;if(_===null)return null;if(_=_.shared,yt&2){var P=_.pending;return P===null?u.next=u:(u.next=P.next,P.next=u),_.pending=u,Ao(l,p)}return P=_.interleaved,P===null?(u.next=u,d5(_)):(u.next=P.next,P.next=u),_.interleaved=u,Ao(l,p)}function qh(l,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194240)!==0)){var _=u.lanes;_&=l.pendingLanes,p|=_,u.lanes=p,sl(l,p)}}function q9(l,u){var p=l.updateQueue,_=l.alternate;if(_!==null&&(_=_.updateQueue,p===_)){var P=null,L=null;if(p=p.firstBaseUpdate,p!==null){do{var H={eventTime:p.eventTime,lane:p.lane,tag:p.tag,payload:p.payload,callback:p.callback,next:null};L===null?P=L=H:L=L.next=H,p=p.next}while(p!==null);L===null?P=L=u:L=L.next=u}else P=L=u;p={baseState:_.baseState,firstBaseUpdate:P,lastBaseUpdate:L,shared:_.shared,effects:_.effects},l.updateQueue=p;return}l=p.lastBaseUpdate,l===null?p.firstBaseUpdate=u:l.next=u,p.lastBaseUpdate=u}function Qh(l,u,p,_){var P=l.updateQueue;Ka=!1;var L=P.firstBaseUpdate,H=P.lastBaseUpdate,oe=P.shared.pending;if(oe!==null){P.shared.pending=null;var me=oe,Te=me.next;me.next=null,H===null?L=Te:H.next=Te,H=me;var $e=l.alternate;$e!==null&&($e=$e.updateQueue,oe=$e.lastBaseUpdate,oe!==H&&(oe===null?$e.firstBaseUpdate=Te:oe.next=Te,$e.lastBaseUpdate=me))}if(L!==null){var tt=P.baseState;H=0,$e=Te=me=null,oe=L;do{var Le=oe.lane,ar=oe.eventTime;if((_&Le)===Le){$e!==null&&($e=$e.next={eventTime:ar,lane:0,tag:oe.tag,payload:oe.payload,callback:oe.callback,next:null});e:{var Kt=l,Jn=oe;switch(Le=u,ar=p,Jn.tag){case 1:if(Kt=Jn.payload,typeof Kt=="function"){tt=Kt.call(ar,tt,Le);break e}tt=Kt;break e;case 3:Kt.flags=Kt.flags&-65537|128;case 0:if(Kt=Jn.payload,Le=typeof Kt=="function"?Kt.call(ar,tt,Le):Kt,Le==null)break e;tt=o({},tt,Le);break e;case 2:Ka=!0}}oe.callback!==null&&oe.lane!==0&&(l.flags|=64,Le=P.effects,Le===null?P.effects=[oe]:Le.push(oe))}else ar={eventTime:ar,lane:Le,tag:oe.tag,payload:oe.payload,callback:oe.callback,next:null},$e===null?(Te=$e=ar,me=tt):$e=$e.next=ar,H|=Le;if(oe=oe.next,oe===null){if(oe=P.shared.pending,oe===null)break;Le=oe,oe=Le.next,Le.next=null,P.lastBaseUpdate=Le,P.shared.pending=null}}while(!0);if($e===null&&(me=tt),P.baseState=me,P.firstBaseUpdate=Te,P.lastBaseUpdate=$e,u=P.shared.interleaved,u!==null){P=u;do H|=P.lane,P=P.next;while(P!==u)}else L===null&&(P.shared.lanes=0);fl|=H,l.lanes=H,l.memoizedState=tt}}function Q9(l,u,p){if(l=u.effects,u.effects=null,l!==null)for(u=0;u<l.length;u++){var _=l[u],P=_.callback;if(P!==null){if(_.callback=null,_=p,typeof P!="function")throw Error(a(191,P));P.call(_)}}}var Dd={},Ri=Po(Dd),jd=Po(Dd),Nc=Po(Dd);function Lo(l){if(l===Dd)throw Error(a(174));return l}function f5(l,u){Vt(Nc,u),Vt(jd,l),Vt(Ri,Dd),l=ee(u),Xt(Ri),Vt(Ri,l)}function Fc(){Xt(Ri),Xt(jd),Xt(Nc)}function J9(l){var u=Lo(Nc.current),p=Lo(Ri.current);u=K(p,l.type,u),p!==u&&(Vt(jd,l),Vt(Ri,u))}function p5(l){jd.current===l&&(Xt(Ri),Xt(jd))}var yr=Po(0);function Jh(l){for(var u=l;u!==null;){if(u.tag===13){var p=u.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||vr(p)||pn(p)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var g5=[];function m5(){for(var l=0;l<g5.length;l++){var u=g5[l];pe?u._workInProgressVersionPrimary=null:u._workInProgressVersionSecondary=null}g5.length=0}var e1=s.ReactCurrentDispatcher,v5=s.ReactCurrentBatchConfig,hl=0,Cr=null,Ur=null,ln=null,t1=!1,zd=!1,$d=0,CL=0;function On(){throw Error(a(321))}function y5(l,u){if(u===null)return!1;for(var p=0;p<u.length&&p<l.length;p++)if(!re(l[p],u[p]))return!1;return!0}function C5(l,u,p,_,P,L){if(hl=L,Cr=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,e1.current=l===null||l.memoizedState===null?_L:xL,l=p(_,P),zd){L=0;do{if(zd=!1,$d=0,25<=L)throw Error(a(301));L+=1,ln=Ur=null,u.updateQueue=null,e1.current=EL,l=p(_,P)}while(zd)}if(e1.current=i1,u=Ur!==null&&Ur.next!==null,hl=0,ln=Ur=Cr=null,t1=!1,u)throw Error(a(300));return l}function w5(){var l=$d!==0;return $d=0,l}function Mo(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ln===null?Cr.memoizedState=ln=l:ln=ln.next=l,ln}function Ni(){if(Ur===null){var l=Cr.alternate;l=l!==null?l.memoizedState:null}else l=Ur.next;var u=ln===null?Cr.memoizedState:ln.next;if(u!==null)ln=u,Ur=l;else{if(l===null)throw Error(a(310));Ur=l,l={memoizedState:Ur.memoizedState,baseState:Ur.baseState,baseQueue:Ur.baseQueue,queue:Ur.queue,next:null},ln===null?Cr.memoizedState=ln=l:ln=ln.next=l}return ln}function Bd(l,u){return typeof u=="function"?u(l):u}function S5(l){var u=Ni(),p=u.queue;if(p===null)throw Error(a(311));p.lastRenderedReducer=l;var _=Ur,P=_.baseQueue,L=p.pending;if(L!==null){if(P!==null){var H=P.next;P.next=L.next,L.next=H}_.baseQueue=P=L,p.pending=null}if(P!==null){L=P.next,_=_.baseState;var oe=H=null,me=null,Te=L;do{var $e=Te.lane;if((hl&$e)===$e)me!==null&&(me=me.next={lane:0,action:Te.action,hasEagerState:Te.hasEagerState,eagerState:Te.eagerState,next:null}),_=Te.hasEagerState?Te.eagerState:l(_,Te.action);else{var tt={lane:$e,action:Te.action,hasEagerState:Te.hasEagerState,eagerState:Te.eagerState,next:null};me===null?(oe=me=tt,H=_):me=me.next=tt,Cr.lanes|=$e,fl|=$e}Te=Te.next}while(Te!==null&&Te!==L);me===null?H=_:me.next=oe,re(_,u.memoizedState)||(Zn=!0),u.memoizedState=_,u.baseState=H,u.baseQueue=me,p.lastRenderedState=_}if(l=p.interleaved,l!==null){P=l;do L=P.lane,Cr.lanes|=L,fl|=L,P=P.next;while(P!==l)}else P===null&&(p.lanes=0);return[u.memoizedState,p.dispatch]}function b5(l){var u=Ni(),p=u.queue;if(p===null)throw Error(a(311));p.lastRenderedReducer=l;var _=p.dispatch,P=p.pending,L=u.memoizedState;if(P!==null){p.pending=null;var H=P=P.next;do L=l(L,H.action),H=H.next;while(H!==P);re(L,u.memoizedState)||(Zn=!0),u.memoizedState=L,u.baseQueue===null&&(u.baseState=L),p.lastRenderedState=L}return[L,_]}function ey(){}function ty(l,u){var p=Cr,_=Ni(),P=u(),L=!re(_.memoizedState,P);if(L&&(_.memoizedState=P,Zn=!0),_=_.queue,_5(iy.bind(null,p,_,l),[l]),_.getSnapshot!==u||L||ln!==null&&ln.memoizedState.tag&1){if(p.flags|=2048,Hd(9,ny.bind(null,p,_,P,u),void 0,null),cn===null)throw Error(a(349));hl&30||ry(p,u,P)}return P}function ry(l,u,p){l.flags|=16384,l={getSnapshot:u,value:p},u=Cr.updateQueue,u===null?(u={lastEffect:null,stores:null},Cr.updateQueue=u,u.stores=[l]):(p=u.stores,p===null?u.stores=[l]:p.push(l))}function ny(l,u,p,_){u.value=p,u.getSnapshot=_,oy(u)&&ay(l)}function iy(l,u,p){return p(function(){oy(u)&&ay(l)})}function oy(l){var u=l.getSnapshot;l=l.value;try{var p=u();return!re(l,p)}catch{return!0}}function ay(l){var u=Ao(l,1);u!==null&&Fi(u,l,1,-1)}function sy(l){var u=Mo();return typeof l=="function"&&(l=l()),u.memoizedState=u.baseState=l,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bd,lastRenderedState:l},u.queue=l,l=l.dispatch=bL.bind(null,Cr,l),[u.memoizedState,l]}function Hd(l,u,p,_){return l={tag:l,create:u,destroy:p,deps:_,next:null},u=Cr.updateQueue,u===null?(u={lastEffect:null,stores:null},Cr.updateQueue=u,u.lastEffect=l.next=l):(p=u.lastEffect,p===null?u.lastEffect=l.next=l:(_=p.next,p.next=l,l.next=_,u.lastEffect=l)),l}function ly(){return Ni().memoizedState}function r1(l,u,p,_){var P=Mo();Cr.flags|=l,P.memoizedState=Hd(1|u,p,void 0,_===void 0?null:_)}function n1(l,u,p,_){var P=Ni();_=_===void 0?null:_;var L=void 0;if(Ur!==null){var H=Ur.memoizedState;if(L=H.destroy,_!==null&&y5(_,H.deps)){P.memoizedState=Hd(u,p,L,_);return}}Cr.flags|=l,P.memoizedState=Hd(1|u,p,L,_)}function cy(l,u){return r1(8390656,8,l,u)}function _5(l,u){return n1(2048,8,l,u)}function uy(l,u){return n1(4,2,l,u)}function dy(l,u){return n1(4,4,l,u)}function hy(l,u){if(typeof u=="function")return l=l(),u(l),function(){u(null)};if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function fy(l,u,p){return p=p!=null?p.concat([l]):null,n1(4,4,hy.bind(null,u,l),p)}function x5(){}function py(l,u){var p=Ni();u=u===void 0?null:u;var _=p.memoizedState;return _!==null&&u!==null&&y5(u,_[1])?_[0]:(p.memoizedState=[l,u],l)}function gy(l,u){var p=Ni();u=u===void 0?null:u;var _=p.memoizedState;return _!==null&&u!==null&&y5(u,_[1])?_[0]:(l=l(),p.memoizedState=[l,u],l)}function my(l,u,p){return hl&21?(re(p,u)||(p=Uh(),Cr.lanes|=p,fl|=p,l.baseState=!0),u):(l.baseState&&(l.baseState=!1,Zn=!0),l.memoizedState=p)}function wL(l,u){var p=kt;kt=p!==0&&4>p?p:4,l(!0);var _=v5.transition;v5.transition={};try{l(!1),u()}finally{kt=p,v5.transition=_}}function vy(){return Ni().memoizedState}function SL(l,u,p){var _=Qa(l);if(p={lane:_,action:p,hasEagerState:!1,eagerState:null,next:null},yy(l))Cy(u,p);else if(p=Y9(l,u,p,_),p!==null){var P=Tn();Fi(p,l,_,P),wy(p,u,_)}}function bL(l,u,p){var _=Qa(l),P={lane:_,action:p,hasEagerState:!1,eagerState:null,next:null};if(yy(l))Cy(u,P);else{var L=l.alternate;if(l.lanes===0&&(L===null||L.lanes===0)&&(L=u.lastRenderedReducer,L!==null))try{var H=u.lastRenderedState,oe=L(H,p);if(P.hasEagerState=!0,P.eagerState=oe,re(oe,H)){var me=u.interleaved;me===null?(P.next=P,d5(u)):(P.next=me.next,me.next=P),u.interleaved=P;return}}catch{}finally{}p=Y9(l,u,P,_),p!==null&&(P=Tn(),Fi(p,l,_,P),wy(p,u,_))}}function yy(l){var u=l.alternate;return l===Cr||u!==null&&u===Cr}function Cy(l,u){zd=t1=!0;var p=l.pending;p===null?u.next=u:(u.next=p.next,p.next=u),l.pending=u}function wy(l,u,p){if(p&4194240){var _=u.lanes;_&=l.pendingLanes,p|=_,u.lanes=p,sl(l,p)}}var i1={readContext:Mi,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},_L={readContext:Mi,useCallback:function(l,u){return Mo().memoizedState=[l,u===void 0?null:u],l},useContext:Mi,useEffect:cy,useImperativeHandle:function(l,u,p){return p=p!=null?p.concat([l]):null,r1(4194308,4,hy.bind(null,u,l),p)},useLayoutEffect:function(l,u){return r1(4194308,4,l,u)},useInsertionEffect:function(l,u){return r1(4,2,l,u)},useMemo:function(l,u){var p=Mo();return u=u===void 0?null:u,l=l(),p.memoizedState=[l,u],l},useReducer:function(l,u,p){var _=Mo();return u=p!==void 0?p(u):u,_.memoizedState=_.baseState=u,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},_.queue=l,l=l.dispatch=SL.bind(null,Cr,l),[_.memoizedState,l]},useRef:function(l){var u=Mo();return l={current:l},u.memoizedState=l},useState:sy,useDebugValue:x5,useDeferredValue:function(l){return Mo().memoizedState=l},useTransition:function(){var l=sy(!1),u=l[0];return l=wL.bind(null,l[1]),Mo().memoizedState=l,[u,l]},useMutableSource:function(){},useSyncExternalStore:function(l,u,p){var _=Cr,P=Mo();if(ur){if(p===void 0)throw Error(a(407));p=p()}else{if(p=u(),cn===null)throw Error(a(349));hl&30||ry(_,u,p)}P.memoizedState=p;var L={value:p,getSnapshot:u};return P.queue=L,cy(iy.bind(null,_,L,l),[l]),_.flags|=2048,Hd(9,ny.bind(null,_,L,p,u),void 0,null),p},useId:function(){var l=Mo(),u=cn.identifierPrefix;if(ur){var p=oa,_=ia;p=(_&~(1<<32-Yn(_)-1)).toString(32)+p,u=":"+u+"R"+p,p=$d++,0<p&&(u+="H"+p.toString(32)),u+=":"}else p=CL++,u=":"+u+"r"+p.toString(32)+":";return l.memoizedState=u},unstable_isNewReconciler:!1},xL={readContext:Mi,useCallback:py,useContext:Mi,useEffect:_5,useImperativeHandle:fy,useInsertionEffect:uy,useLayoutEffect:dy,useMemo:gy,useReducer:S5,useRef:ly,useState:function(){return S5(Bd)},useDebugValue:x5,useDeferredValue:function(l){var u=Ni();return my(u,Ur.memoizedState,l)},useTransition:function(){var l=S5(Bd)[0],u=Ni().memoizedState;return[l,u]},useMutableSource:ey,useSyncExternalStore:ty,useId:vy,unstable_isNewReconciler:!1},EL={readContext:Mi,useCallback:py,useContext:Mi,useEffect:_5,useImperativeHandle:fy,useInsertionEffect:uy,useLayoutEffect:dy,useMemo:gy,useReducer:b5,useRef:ly,useState:function(){return b5(Bd)},useDebugValue:x5,useDeferredValue:function(l){var u=Ni();return Ur===null?u.memoizedState=l:my(u,Ur.memoizedState,l)},useTransition:function(){var l=b5(Bd)[0],u=Ni().memoizedState;return[l,u]},useMutableSource:ey,useSyncExternalStore:ty,useId:vy,unstable_isNewReconciler:!1};function eo(l,u){if(l&&l.defaultProps){u=o({},u),l=l.defaultProps;for(var p in l)u[p]===void 0&&(u[p]=l[p]);return u}return u}function E5(l,u,p,_){u=l.memoizedState,p=p(_,u),p=p==null?u:o({},u,p),l.memoizedState=p,l.lanes===0&&(l.updateQueue.baseState=p)}var o1={isMounted:function(l){return(l=l._reactInternals)?N(l)===l:!1},enqueueSetState:function(l,u,p){l=l._reactInternals;var _=Tn(),P=Qa(l),L=aa(_,P);L.payload=u,p!=null&&(L.callback=p),u=Ya(l,L,P),u!==null&&(Fi(u,l,P,_),qh(u,l,P))},enqueueReplaceState:function(l,u,p){l=l._reactInternals;var _=Tn(),P=Qa(l),L=aa(_,P);L.tag=1,L.payload=u,p!=null&&(L.callback=p),u=Ya(l,L,P),u!==null&&(Fi(u,l,P,_),qh(u,l,P))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var p=Tn(),_=Qa(l),P=aa(p,_);P.tag=2,u!=null&&(P.callback=u),u=Ya(l,P,_),u!==null&&(Fi(u,l,_,p),qh(u,l,_))}};function Sy(l,u,p,_,P,L,H){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(_,L,H):u.prototype&&u.prototype.isPureReactComponent?!Xh(p,_)||!Xh(P,L):!0}function by(l,u,p){var _=!1,P=ko,L=u.contextType;return typeof L=="object"&&L!==null?L=Mi(L):(P=_n(u)?ta:on.current,_=u.contextTypes,L=(_=_!=null)?Wa(l,P):ko),u=new u(p,L),l.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=o1,l.stateNode=u,u._reactInternals=l,_&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=P,l.__reactInternalMemoizedMaskedChildContext=L),u}function _y(l,u,p,_){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(p,_),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(p,_),u.state!==l&&o1.enqueueReplaceState(u,u.state,null)}function O5(l,u,p,_){var P=l.stateNode;P.props=p,P.state=l.memoizedState,P.refs={},h5(l);var L=u.contextType;typeof L=="object"&&L!==null?P.context=Mi(L):(L=_n(u)?ta:on.current,P.context=Wa(l,L)),P.state=l.memoizedState,L=u.getDerivedStateFromProps,typeof L=="function"&&(E5(l,u,L,p),P.state=l.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof P.getSnapshotBeforeUpdate=="function"||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(u=P.state,typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount(),u!==P.state&&o1.enqueueReplaceState(P,P.state,null),Qh(l,p,P,_),P.state=l.memoizedState),typeof P.componentDidMount=="function"&&(l.flags|=4194308)}function Dc(l,u){try{var p="",_=u;do p+=yL(_),_=_.return;while(_);var P=p}catch(L){P=`
Error generating stack: `+L.message+`
`+L.stack}return{value:l,source:u,stack:P,digest:null}}function P5(l,u,p){return{value:l,source:null,stack:p??null,digest:u??null}}function k5(l,u){try{console.error(u.value)}catch(p){setTimeout(function(){throw p})}}var OL=typeof WeakMap=="function"?WeakMap:Map;function xy(l,u,p){p=aa(-1,p),p.tag=3,p.payload={element:null};var _=u.value;return p.callback=function(){C1||(C1=!0,K5=_),k5(l,u)},p}function Ey(l,u,p){p=aa(-1,p),p.tag=3;var _=l.type.getDerivedStateFromError;if(typeof _=="function"){var P=u.value;p.payload=function(){return _(P)},p.callback=function(){k5(l,u)}}var L=l.stateNode;return L!==null&&typeof L.componentDidCatch=="function"&&(p.callback=function(){k5(l,u),typeof _!="function"&&(Za===null?Za=new Set([this]):Za.add(this));var H=u.stack;this.componentDidCatch(u.value,{componentStack:H!==null?H:""})}),p}function Oy(l,u,p){var _=l.pingCache;if(_===null){_=l.pingCache=new OL;var P=new Set;_.set(u,P)}else P=_.get(u),P===void 0&&(P=new Set,_.set(u,P));P.has(p)||(P.add(p),l=$L.bind(null,l,u,p),u.then(l,l))}function Py(l){do{var u;if((u=l.tag===13)&&(u=l.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return l;l=l.return}while(l!==null);return null}function ky(l,u,p,_,P){return l.mode&1?(l.flags|=65536,l.lanes=P,l):(l===u?l.flags|=65536:(l.flags|=128,p.flags|=131072,p.flags&=-52805,p.tag===1&&(p.alternate===null?p.tag=17:(u=aa(-1,1),u.tag=2,Ya(p,u,1))),p.lanes|=1),l)}var PL=s.ReactCurrentOwner,Zn=!1;function $n(l,u,p,_){u.child=l===null?X9(u,null,p,_):Lc(u,l.child,p,_)}function Ty(l,u,p,_,P){p=p.render;var L=u.ref;return Rc(u,P),_=C5(l,u,p,_,L,P),p=w5(),l!==null&&!Zn?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~P,sa(l,u,P)):(ur&&p&&r5(u),u.flags|=1,$n(l,u,_,P),u.child)}function Iy(l,u,p,_,P){if(l===null){var L=p.type;return typeof L=="function"&&!e4(L)&&L.defaultProps===void 0&&p.compare===null&&p.defaultProps===void 0?(u.tag=15,u.type=L,Ay(l,u,L,_,P)):(l=E1(p.type,null,_,u,u.mode,P),l.ref=u.ref,l.return=u,u.child=l)}if(L=l.child,!(l.lanes&P)){var H=L.memoizedProps;if(p=p.compare,p=p!==null?p:Xh,p(H,_)&&l.ref===u.ref)return sa(l,u,P)}return u.flags|=1,l=es(L,_),l.ref=u.ref,l.return=u,u.child=l}function Ay(l,u,p,_,P){if(l!==null){var L=l.memoizedProps;if(Xh(L,_)&&l.ref===u.ref)if(Zn=!1,u.pendingProps=_=L,(l.lanes&P)!==0)l.flags&131072&&(Zn=!0);else return u.lanes=l.lanes,sa(l,u,P)}return T5(l,u,p,_,P)}function Ly(l,u,p){var _=u.pendingProps,P=_.children,L=l!==null?l.memoizedState:null;if(_.mode==="hidden")if(!(u.mode&1))u.memoizedState={baseLanes:0,cachePool:null,transitions:null},Vt(zc,vi),vi|=p;else{if(!(p&1073741824))return l=L!==null?L.baseLanes|p:p,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:l,cachePool:null,transitions:null},u.updateQueue=null,Vt(zc,vi),vi|=l,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},_=L!==null?L.baseLanes:p,Vt(zc,vi),vi|=_}else L!==null?(_=L.baseLanes|p,u.memoizedState=null):_=p,Vt(zc,vi),vi|=_;return $n(l,u,P,p),u.child}function My(l,u){var p=u.ref;(l===null&&p!==null||l!==null&&l.ref!==p)&&(u.flags|=512,u.flags|=2097152)}function T5(l,u,p,_,P){var L=_n(p)?ta:on.current;return L=Wa(u,L),Rc(u,P),p=C5(l,u,p,_,L,P),_=w5(),l!==null&&!Zn?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~P,sa(l,u,P)):(ur&&_&&r5(u),u.flags|=1,$n(l,u,p,P),u.child)}function Ry(l,u,p,_,P){if(_n(p)){var L=!0;Ec(u)}else L=!1;if(Rc(u,P),u.stateNode===null)s1(l,u),by(u,p,_),O5(u,p,_,P),_=!0;else if(l===null){var H=u.stateNode,oe=u.memoizedProps;H.props=oe;var me=H.context,Te=p.contextType;typeof Te=="object"&&Te!==null?Te=Mi(Te):(Te=_n(p)?ta:on.current,Te=Wa(u,Te));var $e=p.getDerivedStateFromProps,tt=typeof $e=="function"||typeof H.getSnapshotBeforeUpdate=="function";tt||typeof H.UNSAFE_componentWillReceiveProps!="function"&&typeof H.componentWillReceiveProps!="function"||(oe!==_||me!==Te)&&_y(u,H,_,Te),Ka=!1;var Le=u.memoizedState;H.state=Le,Qh(u,_,H,P),me=u.memoizedState,oe!==_||Le!==me||bn.current||Ka?(typeof $e=="function"&&(E5(u,p,$e,_),me=u.memoizedState),(oe=Ka||Sy(u,p,oe,_,Le,me,Te))?(tt||typeof H.UNSAFE_componentWillMount!="function"&&typeof H.componentWillMount!="function"||(typeof H.componentWillMount=="function"&&H.componentWillMount(),typeof H.UNSAFE_componentWillMount=="function"&&H.UNSAFE_componentWillMount()),typeof H.componentDidMount=="function"&&(u.flags|=4194308)):(typeof H.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=_,u.memoizedState=me),H.props=_,H.state=me,H.context=Te,_=oe):(typeof H.componentDidMount=="function"&&(u.flags|=4194308),_=!1)}else{H=u.stateNode,Z9(l,u),oe=u.memoizedProps,Te=u.type===u.elementType?oe:eo(u.type,oe),H.props=Te,tt=u.pendingProps,Le=H.context,me=p.contextType,typeof me=="object"&&me!==null?me=Mi(me):(me=_n(p)?ta:on.current,me=Wa(u,me));var ar=p.getDerivedStateFromProps;($e=typeof ar=="function"||typeof H.getSnapshotBeforeUpdate=="function")||typeof H.UNSAFE_componentWillReceiveProps!="function"&&typeof H.componentWillReceiveProps!="function"||(oe!==tt||Le!==me)&&_y(u,H,_,me),Ka=!1,Le=u.memoizedState,H.state=Le,Qh(u,_,H,P);var Kt=u.memoizedState;oe!==tt||Le!==Kt||bn.current||Ka?(typeof ar=="function"&&(E5(u,p,ar,_),Kt=u.memoizedState),(Te=Ka||Sy(u,p,Te,_,Le,Kt,me)||!1)?($e||typeof H.UNSAFE_componentWillUpdate!="function"&&typeof H.componentWillUpdate!="function"||(typeof H.componentWillUpdate=="function"&&H.componentWillUpdate(_,Kt,me),typeof H.UNSAFE_componentWillUpdate=="function"&&H.UNSAFE_componentWillUpdate(_,Kt,me)),typeof H.componentDidUpdate=="function"&&(u.flags|=4),typeof H.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof H.componentDidUpdate!="function"||oe===l.memoizedProps&&Le===l.memoizedState||(u.flags|=4),typeof H.getSnapshotBeforeUpdate!="function"||oe===l.memoizedProps&&Le===l.memoizedState||(u.flags|=1024),u.memoizedProps=_,u.memoizedState=Kt),H.props=_,H.state=Kt,H.context=me,_=Te):(typeof H.componentDidUpdate!="function"||oe===l.memoizedProps&&Le===l.memoizedState||(u.flags|=4),typeof H.getSnapshotBeforeUpdate!="function"||oe===l.memoizedProps&&Le===l.memoizedState||(u.flags|=1024),_=!1)}return I5(l,u,p,_,L,P)}function I5(l,u,p,_,P,L){My(l,u);var H=(u.flags&128)!==0;if(!_&&!H)return P&&Vh(u,p,!1),sa(l,u,L);_=u.stateNode,PL.current=u;var oe=H&&typeof p.getDerivedStateFromError!="function"?null:_.render();return u.flags|=1,l!==null&&H?(u.child=Lc(u,l.child,null,L),u.child=Lc(u,null,oe,L)):$n(l,u,oe,L),u.memoizedState=_.state,P&&Vh(u,p,!0),u.child}function Ny(l){var u=l.stateNode;u.pendingContext?il(l,u.pendingContext,u.pendingContext!==u.context):u.context&&il(l,u.context,!1),f5(l,u.containerInfo)}function Fy(l,u,p,_,P){return Ac(),a5(P),u.flags|=256,$n(l,u,p,_),u.child}var A5={dehydrated:null,treeContext:null,retryLane:0};function L5(l){return{baseLanes:l,cachePool:null,transitions:null}}function Dy(l,u,p){var _=u.pendingProps,P=yr.current,L=!1,H=(u.flags&128)!==0,oe;if((oe=H)||(oe=l!==null&&l.memoizedState===null?!1:(P&2)!==0),oe?(L=!0,u.flags&=-129):(l===null||l.memoizedState!==null)&&(P|=1),Vt(yr,P&1),l===null)return o5(u),l=u.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?(u.mode&1?pn(l)?u.lanes=8:u.lanes=1073741824:u.lanes=1,null):(H=_.children,l=_.fallback,L?(_=u.mode,L=u.child,H={mode:"hidden",children:H},!(_&1)&&L!==null?(L.childLanes=0,L.pendingProps=H):L=O1(H,_,0,null),l=vl(l,_,p,null),L.return=u,l.return=u,L.sibling=l,u.child=L,u.child.memoizedState=L5(p),u.memoizedState=A5,l):M5(u,H));if(P=l.memoizedState,P!==null&&(oe=P.dehydrated,oe!==null))return kL(l,u,H,_,oe,P,p);if(L){L=_.fallback,H=u.mode,P=l.child,oe=P.sibling;var me={mode:"hidden",children:_.children};return!(H&1)&&u.child!==P?(_=u.child,_.childLanes=0,_.pendingProps=me,u.deletions=null):(_=es(P,me),_.subtreeFlags=P.subtreeFlags&14680064),oe!==null?L=es(oe,L):(L=vl(L,H,p,null),L.flags|=2),L.return=u,_.return=u,_.sibling=L,u.child=_,_=L,L=u.child,H=l.child.memoizedState,H=H===null?L5(p):{baseLanes:H.baseLanes|p,cachePool:null,transitions:H.transitions},L.memoizedState=H,L.childLanes=l.childLanes&~p,u.memoizedState=A5,_}return L=l.child,l=L.sibling,_=es(L,{mode:"visible",children:_.children}),!(u.mode&1)&&(_.lanes=p),_.return=u,_.sibling=null,l!==null&&(p=u.deletions,p===null?(u.deletions=[l],u.flags|=16):p.push(l)),u.child=_,u.memoizedState=null,_}function M5(l,u){return u=O1({mode:"visible",children:u},l.mode,0,null),u.return=l,l.child=u}function a1(l,u,p,_){return _!==null&&a5(_),Lc(u,l.child,null,p),l=M5(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function kL(l,u,p,_,P,L,H){if(p)return u.flags&256?(u.flags&=-257,_=P5(Error(a(422))),a1(l,u,H,_)):u.memoizedState!==null?(u.child=l.child,u.flags|=128,null):(L=_.fallback,P=u.mode,_=O1({mode:"visible",children:_.children},P,0,null),L=vl(L,P,H,null),L.flags|=2,_.return=u,L.return=u,_.sibling=L,u.child=_,u.mode&1&&Lc(u,l.child,null,H),u.child.memoizedState=L5(H),u.memoizedState=A5,L);if(!(u.mode&1))return a1(l,u,H,null);if(pn(P))return _=Kn(P).digest,L=Error(a(419)),_=P5(L,_,void 0),a1(l,u,H,_);if(p=(H&l.childLanes)!==0,Zn||p){if(_=cn,_!==null){switch(H&-H){case 4:P=2;break;case 16:P=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:P=32;break;case 536870912:P=268435456;break;default:P=0}P=P&(_.suspendedLanes|H)?0:P,P!==0&&P!==L.retryLane&&(L.retryLane=P,Ao(l,P),Fi(_,l,P,-1))}return J5(),_=P5(Error(a(421))),a1(l,u,H,_)}return vr(P)?(u.flags|=128,u.child=l.child,u=BL.bind(null,l),xd(P,u),null):(l=L.treeContext,xe&&(Li=$3(P),mi=u,ur=!0,Ji=null,Nd=!1,l!==null&&(xn[En++]=ia,xn[En++]=oa,xn[En++]=Io,ia=l.id,oa=l.overflow,Io=u)),u=M5(u,_.children),u.flags|=4096,u)}function jy(l,u,p){l.lanes|=u;var _=l.alternate;_!==null&&(_.lanes|=u),u5(l.return,u,p)}function R5(l,u,p,_,P){var L=l.memoizedState;L===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:_,tail:p,tailMode:P}:(L.isBackwards=u,L.rendering=null,L.renderingStartTime=0,L.last=_,L.tail=p,L.tailMode=P)}function zy(l,u,p){var _=u.pendingProps,P=_.revealOrder,L=_.tail;if($n(l,u,_.children,p),_=yr.current,_&2)_=_&1|2,u.flags|=128;else{if(l!==null&&l.flags&128)e:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&jy(l,p,u);else if(l.tag===19)jy(l,p,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break e;for(;l.sibling===null;){if(l.return===null||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}_&=1}if(Vt(yr,_),!(u.mode&1))u.memoizedState=null;else switch(P){case"forwards":for(p=u.child,P=null;p!==null;)l=p.alternate,l!==null&&Jh(l)===null&&(P=p),p=p.sibling;p=P,p===null?(P=u.child,u.child=null):(P=p.sibling,p.sibling=null),R5(u,!1,P,p,L);break;case"backwards":for(p=null,P=u.child,u.child=null;P!==null;){if(l=P.alternate,l!==null&&Jh(l)===null){u.child=P;break}l=P.sibling,P.sibling=p,p=P,P=l}R5(u,!0,p,null,L);break;case"together":R5(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function s1(l,u){!(u.mode&1)&&l!==null&&(l.alternate=null,u.alternate=null,u.flags|=2)}function sa(l,u,p){if(l!==null&&(u.dependencies=l.dependencies),fl|=u.lanes,!(p&u.childLanes))return null;if(l!==null&&u.child!==l.child)throw Error(a(153));if(u.child!==null){for(l=u.child,p=es(l,l.pendingProps),u.child=p,p.return=u;l.sibling!==null;)l=l.sibling,p=p.sibling=es(l,l.pendingProps),p.return=u;p.sibling=null}return u.child}function TL(l,u,p){switch(u.tag){case 3:Ny(u),Ac();break;case 5:J9(u);break;case 1:_n(u.type)&&Ec(u);break;case 4:f5(u,u.stateNode.containerInfo);break;case 10:K9(u,u.type._context,u.memoizedProps.value);break;case 13:var _=u.memoizedState;if(_!==null)return _.dehydrated!==null?(Vt(yr,yr.current&1),u.flags|=128,null):p&u.child.childLanes?Dy(l,u,p):(Vt(yr,yr.current&1),l=sa(l,u,p),l!==null?l.sibling:null);Vt(yr,yr.current&1);break;case 19:if(_=(p&u.childLanes)!==0,l.flags&128){if(_)return zy(l,u,p);u.flags|=128}var P=u.memoizedState;if(P!==null&&(P.rendering=null,P.tail=null,P.lastEffect=null),Vt(yr,yr.current),_)break;return null;case 22:case 23:return u.lanes=0,Ly(l,u,p)}return sa(l,u,p)}function Ro(l){l.flags|=4}function $y(l,u){if(l!==null&&l.child===u.child)return!0;if(u.flags&16)return!1;for(l=u.child;l!==null;){if(l.flags&12854||l.subtreeFlags&12854)return!1;l=l.sibling}return!0}var Gd,Vd,l1,c1;if(ce)Gd=function(l,u){for(var p=u.child;p!==null;){if(p.tag===5||p.tag===6)J(l,p.stateNode);else if(p.tag!==4&&p.child!==null){p.child.return=p,p=p.child;continue}if(p===u)break;for(;p.sibling===null;){if(p.return===null||p.return===u)return;p=p.return}p.sibling.return=p.return,p=p.sibling}},Vd=function(){},l1=function(l,u,p,_,P){if(l=l.memoizedProps,l!==_){var L=u.stateNode,H=Lo(Ri.current);p=te(L,p,l,_,P,H),(u.updateQueue=p)&&Ro(u)}},c1=function(l,u,p,_){p!==_&&Ro(u)};else if(le){Gd=function(l,u,p,_){for(var P=u.child;P!==null;){if(P.tag===5){var L=P.stateNode;p&&_&&(L=Va(L,P.type,P.memoizedProps,P)),J(l,L)}else if(P.tag===6)L=P.stateNode,p&&_&&(L=Sn(L,P.memoizedProps,P)),J(l,L);else if(P.tag!==4){if(P.tag===22&&P.memoizedState!==null)L=P.child,L!==null&&(L.return=P),Gd(l,P,!0,!0);else if(P.child!==null){P.child.return=P,P=P.child;continue}}if(P===u)break;for(;P.sibling===null;){if(P.return===null||P.return===u)return;P=P.return}P.sibling.return=P.return,P=P.sibling}};var By=function(l,u,p,_){for(var P=u.child;P!==null;){if(P.tag===5){var L=P.stateNode;p&&_&&(L=Va(L,P.type,P.memoizedProps,P)),jr(l,L)}else if(P.tag===6)L=P.stateNode,p&&_&&(L=Sn(L,P.memoizedProps,P)),jr(l,L);else if(P.tag!==4){if(P.tag===22&&P.memoizedState!==null)L=P.child,L!==null&&(L.return=P),By(l,P,!0,!0);else if(P.child!==null){P.child.return=P,P=P.child;continue}}if(P===u)break;for(;P.sibling===null;){if(P.return===null||P.return===u)return;P=P.return}P.sibling.return=P.return,P=P.sibling}};Vd=function(l,u){var p=u.stateNode;if(!$y(l,u)){l=p.containerInfo;var _=Dr(l);By(_,u,!1,!1),p.pendingChildren=_,Ro(u),Qi(l,_)}},l1=function(l,u,p,_,P){var L=l.stateNode,H=l.memoizedProps;if((l=$y(l,u))&&H===_)u.stateNode=L;else{var oe=u.stateNode,me=Lo(Ri.current),Te=null;H!==_&&(Te=te(oe,p,H,_,P,me)),l&&Te===null?u.stateNode=L:(L=ut(L,Te,p,H,_,u,l,oe),Q(L,p,_,P,me)&&Ro(u),u.stateNode=L,l?Ro(u):Gd(L,u,!1,!1))}},c1=function(l,u,p,_){p!==_?(l=Lo(Nc.current),p=Lo(Ri.current),u.stateNode=U(_,l,p,u),Ro(u)):u.stateNode=l.stateNode}}else Vd=function(){},l1=function(){},c1=function(){};function Ud(l,u){if(!ur)switch(l.tailMode){case"hidden":u=l.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?l.tail=null:p.sibling=null;break;case"collapsed":p=l.tail;for(var _=null;p!==null;)p.alternate!==null&&(_=p),p=p.sibling;_===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:_.sibling=null}}function Pn(l){var u=l.alternate!==null&&l.alternate.child===l.child,p=0,_=0;if(u)for(var P=l.child;P!==null;)p|=P.lanes|P.childLanes,_|=P.subtreeFlags&14680064,_|=P.flags&14680064,P.return=l,P=P.sibling;else for(P=l.child;P!==null;)p|=P.lanes|P.childLanes,_|=P.subtreeFlags,_|=P.flags,P.return=l,P=P.sibling;return l.subtreeFlags|=_,l.childLanes=p,u}function IL(l,u,p){var _=u.pendingProps;switch(n5(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pn(u),null;case 1:return _n(u.type)&&_c(),Pn(u),null;case 3:return p=u.stateNode,Fc(),Xt(bn),Xt(on),m5(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(l===null||l.child===null)&&(Wh(u)?Ro(u):l===null||l.memoizedState.isDehydrated&&!(u.flags&256)||(u.flags|=1024,Ji!==null&&(q5(Ji),Ji=null))),Vd(l,u),Pn(u),null;case 5:p5(u),p=Lo(Nc.current);var P=u.type;if(l!==null&&u.stateNode!=null)l1(l,u,P,_,p),l.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!_){if(u.stateNode===null)throw Error(a(166));return Pn(u),null}if(l=Lo(Ri.current),Wh(u)){if(!xe)throw Error(a(175));l=Ua(u.stateNode,u.type,u.memoizedProps,p,l,u,!Nd),u.updateQueue=l,l!==null&&Ro(u)}else{var L=ae(P,_,p,l,u);Gd(L,u,!1,!1),u.stateNode=L,Q(L,P,_,p,l)&&Ro(u)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return Pn(u),null;case 6:if(l&&u.stateNode!=null)c1(l,u,l.memoizedProps,_);else{if(typeof _!="string"&&u.stateNode===null)throw Error(a(166));if(l=Lo(Nc.current),p=Lo(Ri.current),Wh(u)){if(!xe)throw Error(a(176));if(l=u.stateNode,p=u.memoizedProps,(_=B3(l,p,u,!Nd))&&(P=mi,P!==null))switch(P.tag){case 3:Sc(P.stateNode.containerInfo,l,p,(P.mode&1)!==0);break;case 5:Od(P.type,P.memoizedProps,P.stateNode,l,p,(P.mode&1)!==0)}_&&Ro(u)}else u.stateNode=U(_,l,p,u)}return Pn(u),null;case 13:if(Xt(yr),_=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(ur&&Li!==null&&u.mode&1&&!(u.flags&128))V9(),Ac(),u.flags|=98560,P=!1;else if(P=Wh(u),_!==null&&_.dehydrated!==null){if(l===null){if(!P)throw Error(a(318));if(!xe)throw Error(a(344));if(P=u.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(a(317));H3(P,u)}else Ac(),!(u.flags&128)&&(u.memoizedState=null),u.flags|=4;Pn(u),P=!1}else Ji!==null&&(q5(Ji),Ji=null),P=!0;if(!P)return u.flags&65536?u:null}return u.flags&128?(u.lanes=p,u):(p=_!==null,p!==(l!==null&&l.memoizedState!==null)&&p&&(u.child.flags|=8192,u.mode&1&&(l===null||yr.current&1?Wr===0&&(Wr=3):J5())),u.updateQueue!==null&&(u.flags|=4),Pn(u),null);case 4:return Fc(),Vd(l,u),l===null&&_e(u.stateNode.containerInfo),Pn(u),null;case 10:return c5(u.type._context),Pn(u),null;case 17:return _n(u.type)&&_c(),Pn(u),null;case 19:if(Xt(yr),P=u.memoizedState,P===null)return Pn(u),null;if(_=(u.flags&128)!==0,L=P.rendering,L===null)if(_)Ud(P,!1);else{if(Wr!==0||l!==null&&l.flags&128)for(l=u.child;l!==null;){if(L=Jh(l),L!==null){for(u.flags|=128,Ud(P,!1),l=L.updateQueue,l!==null&&(u.updateQueue=l,u.flags|=4),u.subtreeFlags=0,l=p,p=u.child;p!==null;)_=p,P=l,_.flags&=14680066,L=_.alternate,L===null?(_.childLanes=0,_.lanes=P,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=L.childLanes,_.lanes=L.lanes,_.child=L.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=L.memoizedProps,_.memoizedState=L.memoizedState,_.updateQueue=L.updateQueue,_.type=L.type,P=L.dependencies,_.dependencies=P===null?null:{lanes:P.lanes,firstContext:P.firstContext}),p=p.sibling;return Vt(yr,yr.current&1|2),u.child}l=l.sibling}P.tail!==null&&zr()>X5&&(u.flags|=128,_=!0,Ud(P,!1),u.lanes=4194304)}else{if(!_)if(l=Jh(L),l!==null){if(u.flags|=128,_=!0,l=l.updateQueue,l!==null&&(u.updateQueue=l,u.flags|=4),Ud(P,!0),P.tail===null&&P.tailMode==="hidden"&&!L.alternate&&!ur)return Pn(u),null}else 2*zr()-P.renderingStartTime>X5&&p!==1073741824&&(u.flags|=128,_=!0,Ud(P,!1),u.lanes=4194304);P.isBackwards?(L.sibling=u.child,u.child=L):(l=P.last,l!==null?l.sibling=L:u.child=L,P.last=L)}return P.tail!==null?(u=P.tail,P.rendering=u,P.tail=u.sibling,P.renderingStartTime=zr(),u.sibling=null,l=yr.current,Vt(yr,_?l&1|2:l&1),u):(Pn(u),null);case 22:case 23:return Q5(),p=u.memoizedState!==null,l!==null&&l.memoizedState!==null!==p&&(u.flags|=8192),p&&u.mode&1?vi&1073741824&&(Pn(u),ce&&u.subtreeFlags&6&&(u.flags|=8192)):Pn(u),null;case 24:return null;case 25:return null}throw Error(a(156,u.tag))}function AL(l,u){switch(n5(u),u.tag){case 1:return _n(u.type)&&_c(),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return Fc(),Xt(bn),Xt(on),m5(),l=u.flags,l&65536&&!(l&128)?(u.flags=l&-65537|128,u):null;case 5:return p5(u),null;case 13:if(Xt(yr),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(a(340));Ac()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return Xt(yr),null;case 4:return Fc(),null;case 10:return c5(u.type._context),null;case 22:case 23:return Q5(),null;case 24:return null;default:return null}}var u1=!1,kn=!1,LL=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function jc(l,u){var p=l.ref;if(p!==null)if(typeof p=="function")try{p(null)}catch(_){dr(l,u,_)}else p.current=null}function N5(l,u,p){try{p()}catch(_){dr(l,u,_)}}var Hy=!1;function ML(l,u){for(ue(l.containerInfo),Fe=u;Fe!==null;)if(l=Fe,u=l.child,(l.subtreeFlags&1028)!==0&&u!==null)u.return=l,Fe=u;else for(;Fe!==null;){l=Fe;try{var p=l.alternate;if(l.flags&1024)switch(l.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var _=p.memoizedProps,P=p.memoizedState,L=l.stateNode,H=L.getSnapshotBeforeUpdate(l.elementType===l.type?_:eo(l.type,_),P);L.__reactInternalSnapshotBeforeUpdate=H}break;case 3:ce&&jt(l.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(a(163))}}catch(oe){dr(l,l.return,oe)}if(u=l.sibling,u!==null){u.return=l.return,Fe=u;break}Fe=l.return}return p=Hy,Hy=!1,p}function Wd(l,u,p){var _=u.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var P=_=_.next;do{if((P.tag&l)===l){var L=P.destroy;P.destroy=void 0,L!==void 0&&N5(u,p,L)}P=P.next}while(P!==_)}}function d1(l,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var p=u=u.next;do{if((p.tag&l)===l){var _=p.create;p.destroy=_()}p=p.next}while(p!==u)}}function F5(l){var u=l.ref;if(u!==null){var p=l.stateNode;switch(l.tag){case 5:l=q(p);break;default:l=p}typeof u=="function"?u(l):u.current=l}}function Gy(l){var u=l.alternate;u!==null&&(l.alternate=null,Gy(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&Ee(u)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function Vy(l){return l.tag===5||l.tag===3||l.tag===4}function Uy(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||Vy(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function D5(l,u,p){var _=l.tag;if(_===5||_===6)l=l.stateNode,u?Tt(p,l,u):Ii(p,l);else if(_!==4&&(l=l.child,l!==null))for(D5(l,u,p),l=l.sibling;l!==null;)D5(l,u,p),l=l.sibling}function j5(l,u,p){var _=l.tag;if(_===5||_===6)l=l.stateNode,u?ct(p,l,u):tr(p,l);else if(_!==4&&(l=l.child,l!==null))for(j5(l,u,p),l=l.sibling;l!==null;)j5(l,u,p),l=l.sibling}var gn=null,to=!1;function No(l,u,p){for(p=p.child;p!==null;)z5(l,u,p),p=p.sibling}function z5(l,u,p){if(gi&&typeof gi.onCommitFiberUnmount=="function")try{gi.onCommitFiberUnmount(Ic,p)}catch{}switch(p.tag){case 5:kn||jc(p,u);case 6:if(ce){var _=gn,P=to;gn=null,No(l,u,p),gn=_,to=P,gn!==null&&(to?or(gn,p.stateNode):It(gn,p.stateNode))}else No(l,u,p);break;case 18:ce&&gn!==null&&(to?Ed(gn,p.stateNode):W3(gn,p.stateNode));break;case 4:ce?(_=gn,P=to,gn=p.stateNode.containerInfo,to=!0,No(l,u,p),gn=_,to=P):(le&&(_=p.stateNode.containerInfo,P=Dr(_),Ai(_,P)),No(l,u,p));break;case 0:case 11:case 14:case 15:if(!kn&&(_=p.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){P=_=_.next;do{var L=P,H=L.destroy;L=L.tag,H!==void 0&&(L&2||L&4)&&N5(p,u,H),P=P.next}while(P!==_)}No(l,u,p);break;case 1:if(!kn&&(jc(p,u),_=p.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=p.memoizedProps,_.state=p.memoizedState,_.componentWillUnmount()}catch(oe){dr(p,u,oe)}No(l,u,p);break;case 21:No(l,u,p);break;case 22:p.mode&1?(kn=(_=kn)||p.memoizedState!==null,No(l,u,p),kn=_):No(l,u,p);break;default:No(l,u,p)}}function Wy(l){var u=l.updateQueue;if(u!==null){l.updateQueue=null;var p=l.stateNode;p===null&&(p=l.stateNode=new LL),u.forEach(function(_){var P=HL.bind(null,l,_);p.has(_)||(p.add(_),_.then(P,P))})}}function ro(l,u){var p=u.deletions;if(p!==null)for(var _=0;_<p.length;_++){var P=p[_];try{var L=l,H=u;if(ce){var oe=H;e:for(;oe!==null;){switch(oe.tag){case 5:gn=oe.stateNode,to=!1;break e;case 3:gn=oe.stateNode.containerInfo,to=!0;break e;case 4:gn=oe.stateNode.containerInfo,to=!0;break e}oe=oe.return}if(gn===null)throw Error(a(160));z5(L,H,P),gn=null,to=!1}else z5(L,H,P);var me=P.alternate;me!==null&&(me.return=null),P.return=null}catch(Te){dr(P,u,Te)}}if(u.subtreeFlags&12854)for(u=u.child;u!==null;)Xy(u,l),u=u.sibling}function Xy(l,u){var p=l.alternate,_=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:if(ro(u,l),Fo(l),_&4){try{Wd(3,l,l.return),d1(3,l)}catch(Le){dr(l,l.return,Le)}try{Wd(5,l,l.return)}catch(Le){dr(l,l.return,Le)}}break;case 1:ro(u,l),Fo(l),_&512&&p!==null&&jc(p,p.return);break;case 5:if(ro(u,l),Fo(l),_&512&&p!==null&&jc(p,p.return),ce){if(l.flags&32){var P=l.stateNode;try{gr(P)}catch(Le){dr(l,l.return,Le)}}if(_&4&&(P=l.stateNode,P!=null)){var L=l.memoizedProps;if(p=p!==null?p.memoizedProps:L,_=l.type,u=l.updateQueue,l.updateQueue=null,u!==null)try{at(P,u,_,p,L,l)}catch(Le){dr(l,l.return,Le)}}}break;case 6:if(ro(u,l),Fo(l),_&4&&ce){if(l.stateNode===null)throw Error(a(162));P=l.stateNode,L=l.memoizedProps,p=p!==null?p.memoizedProps:L;try{mt(P,p,L)}catch(Le){dr(l,l.return,Le)}}break;case 3:if(ro(u,l),Fo(l),_&4){if(ce&&xe&&p!==null&&p.memoizedState.isDehydrated)try{V3(u.containerInfo)}catch(Le){dr(l,l.return,Le)}if(le){P=u.containerInfo,L=u.pendingChildren;try{Ai(P,L)}catch(Le){dr(l,l.return,Le)}}}break;case 4:if(ro(u,l),Fo(l),_&4&&le){L=l.stateNode,P=L.containerInfo,L=L.pendingChildren;try{Ai(P,L)}catch(Le){dr(l,l.return,Le)}}break;case 13:ro(u,l),Fo(l),P=l.child,P.flags&8192&&(L=P.memoizedState!==null,P.stateNode.isHidden=L,!L||P.alternate!==null&&P.alternate.memoizedState!==null||(W5=zr())),_&4&&Wy(l);break;case 22:var H=p!==null&&p.memoizedState!==null;if(l.mode&1?(kn=(p=kn)||H,ro(u,l),kn=p):ro(u,l),Fo(l),_&8192){if(p=l.memoizedState!==null,(l.stateNode.isHidden=p)&&!H&&l.mode&1)for(Fe=l,_=l.child;_!==null;){for(u=Fe=_;Fe!==null;){H=Fe;var oe=H.child;switch(H.tag){case 0:case 11:case 14:case 15:Wd(4,H,H.return);break;case 1:jc(H,H.return);var me=H.stateNode;if(typeof me.componentWillUnmount=="function"){var Te=H,$e=H.return;try{var tt=Te;me.props=tt.memoizedProps,me.state=tt.memoizedState,me.componentWillUnmount()}catch(Le){dr(Te,$e,Le)}}break;case 5:jc(H,H.return);break;case 22:if(H.memoizedState!==null){Zy(u);continue}}oe!==null?(oe.return=H,Fe=oe):Zy(u)}_=_.sibling}if(ce){e:if(_=null,ce)for(u=l;;){if(u.tag===5){if(_===null){_=u;try{P=u.stateNode,p?nn(P):Qe(u.stateNode,u.memoizedProps)}catch(Le){dr(l,l.return,Le)}}}else if(u.tag===6){if(_===null)try{L=u.stateNode,p?pi(L):Je(L,u.memoizedProps)}catch(Le){dr(l,l.return,Le)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===l)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break e;for(;u.sibling===null;){if(u.return===null||u.return===l)break e;_===u&&(_=null),u=u.return}_===u&&(_=null),u.sibling.return=u.return,u=u.sibling}}}break;case 19:ro(u,l),Fo(l),_&4&&Wy(l);break;case 21:break;default:ro(u,l),Fo(l)}}function Fo(l){var u=l.flags;if(u&2){try{if(ce){e:{for(var p=l.return;p!==null;){if(Vy(p)){var _=p;break e}p=p.return}throw Error(a(160))}switch(_.tag){case 5:var P=_.stateNode;_.flags&32&&(gr(P),_.flags&=-33);var L=Uy(l);j5(l,L,P);break;case 3:case 4:var H=_.stateNode.containerInfo,oe=Uy(l);D5(l,oe,H);break;default:throw Error(a(161))}}}catch(me){dr(l,l.return,me)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function RL(l,u,p){Fe=l,Ky(l)}function Ky(l,u,p){for(var _=(l.mode&1)!==0;Fe!==null;){var P=Fe,L=P.child;if(P.tag===22&&_){var H=P.memoizedState!==null||u1;if(!H){var oe=P.alternate,me=oe!==null&&oe.memoizedState!==null||kn;oe=u1;var Te=kn;if(u1=H,(kn=me)&&!Te)for(Fe=P;Fe!==null;)H=Fe,me=H.child,H.tag===22&&H.memoizedState!==null?qy(P):me!==null?(me.return=H,Fe=me):qy(P);for(;L!==null;)Fe=L,Ky(L),L=L.sibling;Fe=P,u1=oe,kn=Te}Yy(l)}else P.subtreeFlags&8772&&L!==null?(L.return=P,Fe=L):Yy(l)}}function Yy(l){for(;Fe!==null;){var u=Fe;if(u.flags&8772){var p=u.alternate;try{if(u.flags&8772)switch(u.tag){case 0:case 11:case 15:kn||d1(5,u);break;case 1:var _=u.stateNode;if(u.flags&4&&!kn)if(p===null)_.componentDidMount();else{var P=u.elementType===u.type?p.memoizedProps:eo(u.type,p.memoizedProps);_.componentDidUpdate(P,p.memoizedState,_.__reactInternalSnapshotBeforeUpdate)}var L=u.updateQueue;L!==null&&Q9(u,L,_);break;case 3:var H=u.updateQueue;if(H!==null){if(p=null,u.child!==null)switch(u.child.tag){case 5:p=q(u.child.stateNode);break;case 1:p=u.child.stateNode}Q9(u,H,p)}break;case 5:var oe=u.stateNode;p===null&&u.flags&4&&Pe(oe,u.type,u.memoizedProps,u);break;case 6:break;case 4:break;case 12:break;case 13:if(xe&&u.memoizedState===null){var me=u.alternate;if(me!==null){var Te=me.memoizedState;if(Te!==null){var $e=Te.dehydrated;$e!==null&&U3($e)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(a(163))}kn||u.flags&512&&F5(u)}catch(tt){dr(u,u.return,tt)}}if(u===l){Fe=null;break}if(p=u.sibling,p!==null){p.return=u.return,Fe=p;break}Fe=u.return}}function Zy(l){for(;Fe!==null;){var u=Fe;if(u===l){Fe=null;break}var p=u.sibling;if(p!==null){p.return=u.return,Fe=p;break}Fe=u.return}}function qy(l){for(;Fe!==null;){var u=Fe;try{switch(u.tag){case 0:case 11:case 15:var p=u.return;try{d1(4,u)}catch(me){dr(u,p,me)}break;case 1:var _=u.stateNode;if(typeof _.componentDidMount=="function"){var P=u.return;try{_.componentDidMount()}catch(me){dr(u,P,me)}}var L=u.return;try{F5(u)}catch(me){dr(u,L,me)}break;case 5:var H=u.return;try{F5(u)}catch(me){dr(u,H,me)}}}catch(me){dr(u,u.return,me)}if(u===l){Fe=null;break}var oe=u.sibling;if(oe!==null){oe.return=u.return,Fe=oe;break}Fe=u.return}}var h1=0,f1=1,p1=2,g1=3,m1=4;if(typeof Symbol=="function"&&Symbol.for){var Xd=Symbol.for;h1=Xd("selector.component"),f1=Xd("selector.has_pseudo_class"),p1=Xd("selector.role"),g1=Xd("selector.test_id"),m1=Xd("selector.text")}function $5(l){var u=Ne(l);if(u!=null){if(typeof u.memoizedProps["data-testname"]!="string")throw Error(a(364));return u}if(l=gt(l),l===null)throw Error(a(362));return l.stateNode.current}function B5(l,u){switch(u.$$typeof){case h1:if(l.type===u.value)return!0;break;case f1:e:{u=u.value,l=[l,0];for(var p=0;p<l.length;){var _=l[p++],P=l[p++],L=u[P];if(_.tag!==5||!je(_)){for(;L!=null&&B5(_,L);)P++,L=u[P];if(P===u.length){u=!0;break e}else for(_=_.child;_!==null;)l.push(_,P),_=_.sibling}}u=!1}return u;case p1:if(l.tag===5&&Ke(l.stateNode,u.value))return!0;break;case m1:if((l.tag===5||l.tag===6)&&(l=qe(l),l!==null&&0<=l.indexOf(u.value)))return!0;break;case g1:if(l.tag===5&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===u.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function H5(l){switch(l.$$typeof){case h1:return"<"+(R(l.value)||"Unknown")+">";case f1:return":has("+(H5(l)||"")+")";case p1:return'[role="'+l.value+'"]';case m1:return'"'+l.value+'"';case g1:return'[data-testname="'+l.value+'"]';default:throw Error(a(365))}}function Qy(l,u){var p=[];l=[l,0];for(var _=0;_<l.length;){var P=l[_++],L=l[_++],H=u[L];if(P.tag!==5||!je(P)){for(;H!=null&&B5(P,H);)L++,H=u[L];if(L===u.length)p.push(P);else for(P=P.child;P!==null;)l.push(P,L),P=P.sibling}}return p}function G5(l,u){if(!Me)throw Error(a(363));l=$5(l),l=Qy(l,u),u=[],l=Array.from(l);for(var p=0;p<l.length;){var _=l[p++];if(_.tag===5)je(_)||u.push(_.stateNode);else for(_=_.child;_!==null;)l.push(_),_=_.sibling}return u}var NL=Math.ceil,v1=s.ReactCurrentDispatcher,V5=s.ReactCurrentOwner,Mr=s.ReactCurrentBatchConfig,yt=0,cn=null,$r=null,mn=0,vi=0,zc=Po(0),Wr=0,Kd=null,fl=0,y1=0,U5=0,Yd=null,qn=null,W5=0,X5=1/0,la=null;function $c(){X5=zr()+500}var C1=!1,K5=null,Za=null,w1=!1,qa=null,S1=0,Zd=0,Y5=null,b1=-1,_1=0;function Tn(){return yt&6?zr():b1!==-1?b1:b1=zr()}function Qa(l){return l.mode&1?yt&2&&mn!==0?mn&-mn:vL.transition!==null?(_1===0&&(_1=Uh()),_1):(l=kt,l!==0?l:He()):1}function Fi(l,u,p,_){if(50<Zd)throw Zd=0,Y5=null,Error(a(185));ra(l,p,_),(!(yt&2)||l!==cn)&&(l===cn&&(!(yt&2)&&(y1|=p),Wr===4&&Ja(l,mn)),Qn(l,_),p===1&&yt===0&&!(u.mode&1)&&($c(),ze&&st()))}function Qn(l,u){var p=l.callbackNode;Q3(l,u);var _=Pc(l,l===cn?mn:0);if(_===0)p!==null&&Rd(p),l.callbackNode=null,l.callbackPriority=0;else if(u=_&-_,l.callbackPriority!==u){if(p!=null&&Rd(p),u===1)l.tag===0?rr(eC.bind(null,l)):zt(eC.bind(null,l)),Ve?We(function(){!(yt&6)&&st()}):ll(kc,st),p=null;else{switch(Md(_)){case 1:p=kc;break;case 4:p=J3;break;case 16:p=Tc;break;case 536870912:p=e5;break;default:p=Tc}p=cC(p,Jy.bind(null,l))}l.callbackPriority=u,l.callbackNode=p}}function Jy(l,u){if(b1=-1,_1=0,yt&6)throw Error(a(327));var p=l.callbackNode;if(ml()&&l.callbackNode!==p)return null;var _=Pc(l,l===cn?mn:0);if(_===0)return null;if(_&30||_&l.expiredLanes||u)u=x1(l,_);else{u=_;var P=yt;yt|=2;var L=nC();(cn!==l||mn!==u)&&(la=null,$c(),pl(l,u));do try{jL();break}catch(oe){rC(l,oe)}while(!0);l5(),v1.current=L,yt=P,$r!==null?u=0:(cn=null,mn=0,u=Wr)}if(u!==0){if(u===2&&(P=Ad(l),P!==0&&(_=P,u=Z5(l,P))),u===1)throw p=Kd,pl(l,0),Ja(l,_),Qn(l,zr()),p;if(u===6)Ja(l,_);else{if(P=l.current.alternate,!(_&30)&&!FL(P)&&(u=x1(l,_),u===2&&(L=Ad(l),L!==0&&(_=L,u=Z5(l,L))),u===1))throw p=Kd,pl(l,0),Ja(l,_),Qn(l,zr()),p;switch(l.finishedWork=P,l.finishedLanes=_,u){case 0:case 1:throw Error(a(345));case 2:gl(l,qn,la);break;case 3:if(Ja(l,_),(_&130023424)===_&&(u=W5+500-zr(),10<u)){if(Pc(l,0)!==0)break;if(P=l.suspendedLanes,(P&_)!==_){Tn(),l.pingedLanes|=l.suspendedLanes&P;break}l.timeoutHandle=F(gl.bind(null,l,qn,la),u);break}gl(l,qn,la);break;case 4:if(Ja(l,_),(_&4194240)===_)break;for(u=l.eventTimes,P=-1;0<_;){var H=31-Yn(_);L=1<<H,H=u[H],H>P&&(P=H),_&=~L}if(_=P,_=zr()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*NL(_/1960))-_,10<_){l.timeoutHandle=F(gl.bind(null,l,qn,la),_);break}gl(l,qn,la);break;case 5:gl(l,qn,la);break;default:throw Error(a(329))}}}return Qn(l,zr()),l.callbackNode===p?Jy.bind(null,l):null}function Z5(l,u){var p=Yd;return l.current.memoizedState.isDehydrated&&(pl(l,u).flags|=256),l=x1(l,u),l!==2&&(u=qn,qn=p,u!==null&&q5(u)),l}function q5(l){qn===null?qn=l:qn.push.apply(qn,l)}function FL(l){for(var u=l;;){if(u.flags&16384){var p=u.updateQueue;if(p!==null&&(p=p.stores,p!==null))for(var _=0;_<p.length;_++){var P=p[_],L=P.getSnapshot;P=P.value;try{if(!re(L(),P))return!1}catch{return!1}}}if(p=u.child,u.subtreeFlags&16384&&p!==null)p.return=u,u=p;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Ja(l,u){for(u&=~U5,u&=~y1,l.suspendedLanes|=u,l.pingedLanes&=~u,l=l.expirationTimes;0<u;){var p=31-Yn(u),_=1<<p;l[p]=-1,u&=~_}}function eC(l){if(yt&6)throw Error(a(327));ml();var u=Pc(l,0);if(!(u&1))return Qn(l,zr()),null;var p=x1(l,u);if(l.tag!==0&&p===2){var _=Ad(l);_!==0&&(u=_,p=Z5(l,_))}if(p===1)throw p=Kd,pl(l,0),Ja(l,u),Qn(l,zr()),p;if(p===6)throw Error(a(345));return l.finishedWork=l.current.alternate,l.finishedLanes=u,gl(l,qn,la),Qn(l,zr()),null}function tC(l){qa!==null&&qa.tag===0&&!(yt&6)&&ml();var u=yt;yt|=1;var p=Mr.transition,_=kt;try{if(Mr.transition=null,kt=1,l)return l()}finally{kt=_,Mr.transition=p,yt=u,!(yt&6)&&st()}}function Q5(){vi=zc.current,Xt(zc)}function pl(l,u){l.finishedWork=null,l.finishedLanes=0;var p=l.timeoutHandle;if(p!==ie&&(l.timeoutHandle=ie,$(p)),$r!==null)for(p=$r.return;p!==null;){var _=p;switch(n5(_),_.tag){case 1:_=_.type.childContextTypes,_!=null&&_c();break;case 3:Fc(),Xt(bn),Xt(on),m5();break;case 5:p5(_);break;case 4:Fc();break;case 13:Xt(yr);break;case 19:Xt(yr);break;case 10:c5(_.type._context);break;case 22:case 23:Q5()}p=p.return}if(cn=l,$r=l=es(l.current,null),mn=vi=u,Wr=0,Kd=null,U5=y1=fl=0,qn=Yd=null,dl!==null){for(u=0;u<dl.length;u++)if(p=dl[u],_=p.interleaved,_!==null){p.interleaved=null;var P=_.next,L=p.pending;if(L!==null){var H=L.next;L.next=P,_.next=H}p.pending=_}dl=null}return l}function rC(l,u){do{var p=$r;try{if(l5(),e1.current=i1,t1){for(var _=Cr.memoizedState;_!==null;){var P=_.queue;P!==null&&(P.pending=null),_=_.next}t1=!1}if(hl=0,ln=Ur=Cr=null,zd=!1,$d=0,V5.current=null,p===null||p.return===null){Wr=1,Kd=u,$r=null;break}e:{var L=l,H=p.return,oe=p,me=u;if(u=mn,oe.flags|=32768,me!==null&&typeof me=="object"&&typeof me.then=="function"){var Te=me,$e=oe,tt=$e.tag;if(!($e.mode&1)&&(tt===0||tt===11||tt===15)){var Le=$e.alternate;Le?($e.updateQueue=Le.updateQueue,$e.memoizedState=Le.memoizedState,$e.lanes=Le.lanes):($e.updateQueue=null,$e.memoizedState=null)}var ar=Py(H);if(ar!==null){ar.flags&=-257,ky(ar,H,oe,L,u),ar.mode&1&&Oy(L,Te,u),u=ar,me=Te;var Kt=u.updateQueue;if(Kt===null){var Jn=new Set;Jn.add(me),u.updateQueue=Jn}else Kt.add(me);break e}else{if(!(u&1)){Oy(L,Te,u),J5();break e}me=Error(a(426))}}else if(ur&&oe.mode&1){var ca=Py(H);if(ca!==null){!(ca.flags&65536)&&(ca.flags|=256),ky(ca,H,oe,L,u),a5(Dc(me,oe));break e}}L=me=Dc(me,oe),Wr!==4&&(Wr=2),Yd===null?Yd=[L]:Yd.push(L),L=H;do{switch(L.tag){case 3:L.flags|=65536,u&=-u,L.lanes|=u;var ge=xy(L,me,u);q9(L,ge);break e;case 1:oe=me;var se=L.type,ye=L.stateNode;if(!(L.flags&128)&&(typeof se.getDerivedStateFromError=="function"||ye!==null&&typeof ye.componentDidCatch=="function"&&(Za===null||!Za.has(ye)))){L.flags|=65536,u&=-u,L.lanes|=u;var Re=Ey(L,oe,u);q9(L,Re);break e}}L=L.return}while(L!==null)}oC(p)}catch(Ue){u=Ue,$r===p&&p!==null&&($r=p=p.return);continue}break}while(!0)}function nC(){var l=v1.current;return v1.current=i1,l===null?i1:l}function J5(){(Wr===0||Wr===3||Wr===2)&&(Wr=4),cn===null||!(fl&268435455)&&!(y1&268435455)||Ja(cn,mn)}function x1(l,u){var p=yt;yt|=2;var _=nC();(cn!==l||mn!==u)&&(la=null,pl(l,u));do try{DL();break}catch(P){rC(l,P)}while(!0);if(l5(),yt=p,v1.current=_,$r!==null)throw Error(a(261));return cn=null,mn=0,Wr}function DL(){for(;$r!==null;)iC($r)}function jL(){for(;$r!==null&&!na();)iC($r)}function iC(l){var u=lC(l.alternate,l,vi);l.memoizedProps=l.pendingProps,u===null?oC(l):$r=u,V5.current=null}function oC(l){var u=l;do{var p=u.alternate;if(l=u.return,u.flags&32768){if(p=AL(p,u),p!==null){p.flags&=32767,$r=p;return}if(l!==null)l.flags|=32768,l.subtreeFlags=0,l.deletions=null;else{Wr=6,$r=null;return}}else if(p=IL(p,u,vi),p!==null){$r=p;return}if(u=u.sibling,u!==null){$r=u;return}$r=u=l}while(u!==null);Wr===0&&(Wr=5)}function gl(l,u,p){var _=kt,P=Mr.transition;try{Mr.transition=null,kt=1,zL(l,u,p,_)}finally{Mr.transition=P,kt=_}return null}function zL(l,u,p,_){do ml();while(qa!==null);if(yt&6)throw Error(a(327));p=l.finishedWork;var P=l.finishedLanes;if(p===null)return null;if(l.finishedWork=null,l.finishedLanes=0,p===l.current)throw Error(a(177));l.callbackNode=null,l.callbackPriority=0;var L=p.lanes|p.childLanes;if(Ld(l,L),l===cn&&($r=cn=null,mn=0),!(p.subtreeFlags&2064)&&!(p.flags&2064)||w1||(w1=!0,cC(Tc,function(){return ml(),null})),L=(p.flags&15990)!==0,p.subtreeFlags&15990||L){L=Mr.transition,Mr.transition=null;var H=kt;kt=1;var oe=yt;yt|=4,V5.current=null,ML(l,p),Xy(p,l),ne(l.containerInfo),l.current=p,RL(p),cl(),yt=oe,kt=H,Mr.transition=L}else l.current=p;if(w1&&(w1=!1,qa=l,S1=P),L=l.pendingLanes,L===0&&(Za=null),t5(p.stateNode),Qn(l,zr()),u!==null)for(_=l.onRecoverableError,p=0;p<u.length;p++)P=u[p],_(P.value,{componentStack:P.stack,digest:P.digest});if(C1)throw C1=!1,l=K5,K5=null,l;return S1&1&&l.tag!==0&&ml(),L=l.pendingLanes,L&1?l===Y5?Zd++:(Zd=0,Y5=l):Zd=0,st(),null}function ml(){if(qa!==null){var l=Md(S1),u=Mr.transition,p=kt;try{if(Mr.transition=null,kt=16>l?16:l,qa===null)var _=!1;else{if(l=qa,qa=null,S1=0,yt&6)throw Error(a(331));var P=yt;for(yt|=4,Fe=l.current;Fe!==null;){var L=Fe,H=L.child;if(Fe.flags&16){var oe=L.deletions;if(oe!==null){for(var me=0;me<oe.length;me++){var Te=oe[me];for(Fe=Te;Fe!==null;){var $e=Fe;switch($e.tag){case 0:case 11:case 15:Wd(8,$e,L)}var tt=$e.child;if(tt!==null)tt.return=$e,Fe=tt;else for(;Fe!==null;){$e=Fe;var Le=$e.sibling,ar=$e.return;if(Gy($e),$e===Te){Fe=null;break}if(Le!==null){Le.return=ar,Fe=Le;break}Fe=ar}}}var Kt=L.alternate;if(Kt!==null){var Jn=Kt.child;if(Jn!==null){Kt.child=null;do{var ca=Jn.sibling;Jn.sibling=null,Jn=ca}while(Jn!==null)}}Fe=L}}if(L.subtreeFlags&2064&&H!==null)H.return=L,Fe=H;else e:for(;Fe!==null;){if(L=Fe,L.flags&2048)switch(L.tag){case 0:case 11:case 15:Wd(9,L,L.return)}var ge=L.sibling;if(ge!==null){ge.return=L.return,Fe=ge;break e}Fe=L.return}}var se=l.current;for(Fe=se;Fe!==null;){H=Fe;var ye=H.child;if(H.subtreeFlags&2064&&ye!==null)ye.return=H,Fe=ye;else e:for(H=se;Fe!==null;){if(oe=Fe,oe.flags&2048)try{switch(oe.tag){case 0:case 11:case 15:d1(9,oe)}}catch(Ue){dr(oe,oe.return,Ue)}if(oe===H){Fe=null;break e}var Re=oe.sibling;if(Re!==null){Re.return=oe.return,Fe=Re;break e}Fe=oe.return}}if(yt=P,st(),gi&&typeof gi.onPostCommitFiberRoot=="function")try{gi.onPostCommitFiberRoot(Ic,l)}catch{}_=!0}return _}finally{kt=p,Mr.transition=u}}return!1}function aC(l,u,p){u=Dc(p,u),u=xy(l,u,1),l=Ya(l,u,1),u=Tn(),l!==null&&(ra(l,1,u),Qn(l,u))}function dr(l,u,p){if(l.tag===3)aC(l,l,p);else for(;u!==null;){if(u.tag===3){aC(u,l,p);break}else if(u.tag===1){var _=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof _.componentDidCatch=="function"&&(Za===null||!Za.has(_))){l=Dc(p,l),l=Ey(u,l,1),u=Ya(u,l,1),l=Tn(),u!==null&&(ra(u,1,l),Qn(u,l));break}}u=u.return}}function $L(l,u,p){var _=l.pingCache;_!==null&&_.delete(u),u=Tn(),l.pingedLanes|=l.suspendedLanes&p,cn===l&&(mn&p)===p&&(Wr===4||Wr===3&&(mn&130023424)===mn&&500>zr()-W5?pl(l,0):U5|=p),Qn(l,u)}function sC(l,u){u===0&&(l.mode&1?(u=Oc,Oc<<=1,!(Oc&130023424)&&(Oc=4194304)):u=1);var p=Tn();l=Ao(l,u),l!==null&&(ra(l,u,p),Qn(l,p))}function BL(l){var u=l.memoizedState,p=0;u!==null&&(p=u.retryLane),sC(l,p)}function HL(l,u){var p=0;switch(l.tag){case 13:var _=l.stateNode,P=l.memoizedState;P!==null&&(p=P.retryLane);break;case 19:_=l.stateNode;break;default:throw Error(a(314))}_!==null&&_.delete(u),sC(l,p)}var lC;lC=function(l,u,p){if(l!==null)if(l.memoizedProps!==u.pendingProps||bn.current)Zn=!0;else{if(!(l.lanes&p)&&!(u.flags&128))return Zn=!1,TL(l,u,p);Zn=!!(l.flags&131072)}else Zn=!1,ur&&u.flags&1048576&&$9(u,To,u.index);switch(u.lanes=0,u.tag){case 2:var _=u.type;s1(l,u),l=u.pendingProps;var P=Wa(u,on.current);Rc(u,p),P=C5(null,u,_,l,P,p);var L=w5();return u.flags|=1,typeof P=="object"&&P!==null&&typeof P.render=="function"&&P.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,_n(_)?(L=!0,Ec(u)):L=!1,u.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,h5(u),P.updater=o1,u.stateNode=P,P._reactInternals=u,O5(u,_,l,p),u=I5(null,u,_,!0,L,p)):(u.tag=0,ur&&L&&r5(u),$n(null,u,P,p),u=u.child),u;case 16:_=u.elementType;e:{switch(s1(l,u),l=u.pendingProps,P=_._init,_=P(_._payload),u.type=_,P=u.tag=VL(_),l=eo(_,l),P){case 0:u=T5(null,u,_,l,p);break e;case 1:u=Ry(null,u,_,l,p);break e;case 11:u=Ty(null,u,_,l,p);break e;case 14:u=Iy(null,u,_,eo(_.type,l),p);break e}throw Error(a(306,_,""))}return u;case 0:return _=u.type,P=u.pendingProps,P=u.elementType===_?P:eo(_,P),T5(l,u,_,P,p);case 1:return _=u.type,P=u.pendingProps,P=u.elementType===_?P:eo(_,P),Ry(l,u,_,P,p);case 3:e:{if(Ny(u),l===null)throw Error(a(387));_=u.pendingProps,L=u.memoizedState,P=L.element,Z9(l,u),Qh(u,_,null,p);var H=u.memoizedState;if(_=H.element,xe&&L.isDehydrated)if(L={element:_,isDehydrated:!1,cache:H.cache,pendingSuspenseBoundaries:H.pendingSuspenseBoundaries,transitions:H.transitions},u.updateQueue.baseState=L,u.memoizedState=L,u.flags&256){P=Dc(Error(a(423)),u),u=Fy(l,u,_,p,P);break e}else if(_!==P){P=Dc(Error(a(424)),u),u=Fy(l,u,_,p,P);break e}else for(xe&&(Li=z3(u.stateNode.containerInfo),mi=u,ur=!0,Ji=null,Nd=!1),p=X9(u,null,_,p),u.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling;else{if(Ac(),_===P){u=sa(l,u,p);break e}$n(l,u,_,p)}u=u.child}return u;case 5:return J9(u),l===null&&o5(u),_=u.type,P=u.pendingProps,L=l!==null?l.memoizedProps:null,H=P.children,we(_,P)?H=null:L!==null&&we(_,L)&&(u.flags|=32),My(l,u),$n(l,u,H,p),u.child;case 6:return l===null&&o5(u),null;case 13:return Dy(l,u,p);case 4:return f5(u,u.stateNode.containerInfo),_=u.pendingProps,l===null?u.child=Lc(u,null,_,p):$n(l,u,_,p),u.child;case 11:return _=u.type,P=u.pendingProps,P=u.elementType===_?P:eo(_,P),Ty(l,u,_,P,p);case 7:return $n(l,u,u.pendingProps,p),u.child;case 8:return $n(l,u,u.pendingProps.children,p),u.child;case 12:return $n(l,u,u.pendingProps.children,p),u.child;case 10:e:{if(_=u.type._context,P=u.pendingProps,L=u.memoizedProps,H=P.value,K9(u,_,H),L!==null)if(re(L.value,H)){if(L.children===P.children&&!bn.current){u=sa(l,u,p);break e}}else for(L=u.child,L!==null&&(L.return=u);L!==null;){var oe=L.dependencies;if(oe!==null){H=L.child;for(var me=oe.firstContext;me!==null;){if(me.context===_){if(L.tag===1){me=aa(-1,p&-p),me.tag=2;var Te=L.updateQueue;if(Te!==null){Te=Te.shared;var $e=Te.pending;$e===null?me.next=me:(me.next=$e.next,$e.next=me),Te.pending=me}}L.lanes|=p,me=L.alternate,me!==null&&(me.lanes|=p),u5(L.return,p,u),oe.lanes|=p;break}me=me.next}}else if(L.tag===10)H=L.type===u.type?null:L.child;else if(L.tag===18){if(H=L.return,H===null)throw Error(a(341));H.lanes|=p,oe=H.alternate,oe!==null&&(oe.lanes|=p),u5(H,p,u),H=L.sibling}else H=L.child;if(H!==null)H.return=L;else for(H=L;H!==null;){if(H===u){H=null;break}if(L=H.sibling,L!==null){L.return=H.return,H=L;break}H=H.return}L=H}$n(l,u,P.children,p),u=u.child}return u;case 9:return P=u.type,_=u.pendingProps.children,Rc(u,p),P=Mi(P),_=_(P),u.flags|=1,$n(l,u,_,p),u.child;case 14:return _=u.type,P=eo(_,u.pendingProps),P=eo(_.type,P),Iy(l,u,_,P,p);case 15:return Ay(l,u,u.type,u.pendingProps,p);case 17:return _=u.type,P=u.pendingProps,P=u.elementType===_?P:eo(_,P),s1(l,u),u.tag=1,_n(_)?(l=!0,Ec(u)):l=!1,Rc(u,p),by(u,_,P),O5(u,_,P,p),I5(null,u,_,!0,l,p);case 19:return zy(l,u,p);case 22:return Ly(l,u,p)}throw Error(a(156,u.tag))};function cC(l,u){return ll(l,u)}function GL(l,u,p,_){this.tag=l,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Di(l,u,p,_){return new GL(l,u,p,_)}function e4(l){return l=l.prototype,!(!l||!l.isReactComponent)}function VL(l){if(typeof l=="function")return e4(l)?1:0;if(l!=null){if(l=l.$$typeof,l===w)return 11;if(l===O)return 14}return 2}function es(l,u){var p=l.alternate;return p===null?(p=Di(l.tag,u,l.key,l.mode),p.elementType=l.elementType,p.type=l.type,p.stateNode=l.stateNode,p.alternate=l,l.alternate=p):(p.pendingProps=u,p.type=l.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=l.flags&14680064,p.childLanes=l.childLanes,p.lanes=l.lanes,p.child=l.child,p.memoizedProps=l.memoizedProps,p.memoizedState=l.memoizedState,p.updateQueue=l.updateQueue,u=l.dependencies,p.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},p.sibling=l.sibling,p.index=l.index,p.ref=l.ref,p}function E1(l,u,p,_,P,L){var H=2;if(_=l,typeof l=="function")e4(l)&&(H=1);else if(typeof l=="string")H=5;else e:switch(l){case h:return vl(p.children,P,L,u);case C:H=8,P|=8;break;case v:return l=Di(12,p,u,P|2),l.elementType=v,l.lanes=L,l;case x:return l=Di(13,p,u,P),l.elementType=x,l.lanes=L,l;case b:return l=Di(19,p,u,P),l.elementType=b,l.lanes=L,l;case S:return O1(p,P,L,u);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case g:H=10;break e;case m:H=9;break e;case w:H=11;break e;case O:H=14;break e;case f:H=16,_=null;break e}throw Error(a(130,l==null?l:typeof l,""))}return u=Di(H,p,u,P),u.elementType=l,u.type=_,u.lanes=L,u}function vl(l,u,p,_){return l=Di(7,l,_,u),l.lanes=p,l}function O1(l,u,p,_){return l=Di(22,l,_,u),l.elementType=S,l.lanes=p,l.stateNode={isHidden:!1},l}function t4(l,u,p){return l=Di(6,l,null,u),l.lanes=p,l}function r4(l,u,p){return u=Di(4,l.children!==null?l.children:[],l.key,u),u.lanes=p,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}function UL(l,u,p,_,P){this.tag=u,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ie,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xa(0),this.expirationTimes=Xa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xa(0),this.identifierPrefix=_,this.onRecoverableError=P,xe&&(this.mutableSourceEagerHydrationData=null)}function uC(l,u,p,_,P,L,H,oe,me){return l=new UL(l,u,p,oe,me),u===1?(u=1,L===!0&&(u|=8)):u=0,L=Di(3,null,null,u),l.current=L,L.stateNode=l,L.memoizedState={element:_,isDehydrated:p,cache:null,transitions:null,pendingSuspenseBoundaries:null},h5(L),l}function dC(l){if(!l)return ko;l=l._reactInternals;e:{if(N(l)!==l||l.tag!==1)throw Error(a(170));var u=l;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(_n(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(a(171))}if(l.tag===1){var p=l.type;if(_n(p))return xc(l,p,u)}return u}function hC(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(a(188)):(l=Object.keys(l).join(","),Error(a(268,l)));return l=z(u),l===null?null:l.stateNode}function fC(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var p=l.retryLane;l.retryLane=p!==0&&p<u?p:u}}function P1(l,u){fC(l,u),(l=l.alternate)&&fC(l,u)}function WL(l){return l=z(l),l===null?null:l.stateNode}function XL(){return null}return r.attemptContinuousHydration=function(l){if(l.tag===13){var u=Ao(l,134217728);if(u!==null){var p=Tn();Fi(u,l,134217728,p)}P1(l,134217728)}},r.attemptDiscreteHydration=function(l){if(l.tag===13){var u=Ao(l,1);if(u!==null){var p=Tn();Fi(u,l,1,p)}P1(l,1)}},r.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13){var u=Qa(l),p=Ao(l,u);if(p!==null){var _=Tn();Fi(p,l,u,_)}P1(l,u)}},r.attemptSynchronousHydration=function(l){switch(l.tag){case 3:var u=l.stateNode;if(u.current.memoizedState.isDehydrated){var p=al(u.pendingLanes);p!==0&&(sl(u,p|1),Qn(u,zr()),!(yt&6)&&($c(),st()))}break;case 13:tC(function(){var _=Ao(l,1);if(_!==null){var P=Tn();Fi(_,l,1,P)}}),P1(l,1)}},r.batchedUpdates=function(l,u){var p=yt;yt|=1;try{return l(u)}finally{yt=p,yt===0&&($c(),ze&&st())}},r.createComponentSelector=function(l){return{$$typeof:h1,value:l}},r.createContainer=function(l,u,p,_,P,L,H){return uC(l,u,!1,null,p,_,P,L,H)},r.createHasPseudoClassSelector=function(l){return{$$typeof:f1,value:l}},r.createHydrationContainer=function(l,u,p,_,P,L,H,oe,me){return l=uC(p,_,!0,l,P,L,H,oe,me),l.context=dC(null),p=l.current,_=Tn(),P=Qa(p),L=aa(_,P),L.callback=u??null,Ya(p,L,P),l.current.lanes=P,ra(l,P,_),Qn(l,_),l},r.createPortal=function(l,u,p){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:_==null?null:""+_,children:l,containerInfo:u,implementation:p}},r.createRoleSelector=function(l){return{$$typeof:p1,value:l}},r.createTestNameSelector=function(l){return{$$typeof:g1,value:l}},r.createTextSelector=function(l){return{$$typeof:m1,value:l}},r.deferredUpdates=function(l){var u=kt,p=Mr.transition;try{return Mr.transition=null,kt=16,l()}finally{kt=u,Mr.transition=p}},r.discreteUpdates=function(l,u,p,_,P){var L=kt,H=Mr.transition;try{return Mr.transition=null,kt=1,l(u,p,_,P)}finally{kt=L,Mr.transition=H,yt===0&&$c()}},r.findAllNodes=G5,r.findBoundingRects=function(l,u){if(!Me)throw Error(a(363));u=G5(l,u),l=[];for(var p=0;p<u.length;p++)l.push(St(u[p]));for(u=l.length-1;0<u;u--){p=l[u];for(var _=p.x,P=_+p.width,L=p.y,H=L+p.height,oe=u-1;0<=oe;oe--)if(u!==oe){var me=l[oe],Te=me.x,$e=Te+me.width,tt=me.y,Le=tt+me.height;if(_>=Te&&L>=tt&&P<=$e&&H<=Le){l.splice(u,1);break}else if(_!==Te||p.width!==me.width||Le<L||tt>H){if(!(L!==tt||p.height!==me.height||$e<_||Te>P)){Te>_&&(me.width+=Te-_,me.x=_),$e<P&&(me.width=P-Te),l.splice(u,1);break}}else{tt>L&&(me.height+=tt-L,me.y=L),Le<H&&(me.height=H-tt),l.splice(u,1);break}}}return l},r.findHostInstance=hC,r.findHostInstanceWithNoPortals=function(l){return l=D(l),l=l!==null?Y(l):null,l===null?null:l.stateNode},r.findHostInstanceWithWarning=function(l){return hC(l)},r.flushControlled=function(l){var u=yt;yt|=1;var p=Mr.transition,_=kt;try{Mr.transition=null,kt=1,l()}finally{kt=_,Mr.transition=p,yt=u,yt===0&&($c(),st())}},r.flushPassiveEffects=ml,r.flushSync=tC,r.focusWithin=function(l,u){if(!Me)throw Error(a(363));for(l=$5(l),u=Qy(l,u),u=Array.from(u),l=0;l<u.length;){var p=u[l++];if(!je(p)){if(p.tag===5&&bt(p.stateNode))return!0;for(p=p.child;p!==null;)u.push(p),p=p.sibling}}return!1},r.getCurrentUpdatePriority=function(){return kt},r.getFindAllNodesFailureDescription=function(l,u){if(!Me)throw Error(a(363));var p=0,_=[];l=[$5(l),0];for(var P=0;P<l.length;){var L=l[P++],H=l[P++],oe=u[H];if((L.tag!==5||!je(L))&&(B5(L,oe)&&(_.push(H5(oe)),H++,H>p&&(p=H)),H<u.length))for(L=L.child;L!==null;)l.push(L,H),L=L.sibling}if(p<u.length){for(l=[];p<u.length;p++)l.push(H5(u[p]));return`findAllNodes was able to match part of the selector:
`+(_.join(" > ")+`
No matching component was found for:
`)+l.join(" > ")}return null},r.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return q(l.child.stateNode);default:return l.child.stateNode}},r.injectIntoDevTools=function(l){if(l={bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:WL,findFiberByHostInstance:l.findFiberByHostInstance||XL,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)l=!0;else{try{Ic=u.inject(l),gi=u}catch{}l=!!u.checkDCE}}return l},r.isAlreadyRendering=function(){return!1},r.observeVisibleRects=function(l,u,p,_){if(!Me)throw Error(a(363));l=G5(l,u);var P=Lt(l,p,_).disconnect;return{disconnect:function(){P()}}},r.registerMutableSourceForHydration=function(l,u){var p=u._getVersion;p=p(u._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[u,p]:l.mutableSourceEagerHydrationData.push(u,p)},r.runWithPriority=function(l,u){var p=kt;try{return kt=l,u()}finally{kt=p}},r.shouldError=function(){return null},r.shouldSuspend=function(){return!1},r.updateContainer=function(l,u,p,_){var P=u.current,L=Tn(),H=Qa(P);return p=dC(p),u.context===null?u.context=p:u.pendingContext=p,u=aa(L,H),u.payload={element:l},_=_===void 0?null:_,_!==null&&(u.callback=_),l=Ya(P,u,H),l!==null&&(Fi(l,P,H,L),qh(l,P,H)),H},r};Yk.exports=U$;var W$=Yk.exports;const X$=ql(W$);var Zk={exports:{}},lc={};/**
* @license React
* react-reconciler-constants.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/lc.ConcurrentRoot=1;lc.ContinuousEventPriority=4;lc.DefaultEventPriority=16;lc.DiscreteEventPriority=1;lc.IdleEventPriority=536870912;lc.LegacyRoot=0;Zk.exports=lc;var qk=Zk.exports;const bS={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let _S=!1,xS=!1;const F8=".react-konva-event";let Qk=!1;function K$(t){Qk=t}const Y$=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.
Position of a node will be changed during drag&drop, so you should update state of the react app as well.
Consider to add onDragMove or onDragEnd events.
For more info see: https://github.com/konvajs/react-konva/issues/256
`,Z$=`ReactKonva: You are using "zIndex" attribute for a Konva node.
react-konva may get confused with ordering. Just define correct order of elements in your render function of a component.
For more info see: https://github.com/konvajs/react-konva/issues/194
`,q$={};function Sg(t,e,r=q$){if(!_S&&"zIndex"in e&&(console.warn(Z$),_S=!0),!xS&&e.draggable){var n=e.x!==void 0||e.y!==void 0,i=e.onDragEnd||e.onDragMove;n&&!i&&(console.warn(Y$),xS=!0)}for(var o in r)if(!bS[o]){var a=o.slice(0,2)==="on",s=r[o]!==e[o];if(a&&s){var c=o.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),t.off(c,r[o])}var d=!e.hasOwnProperty(o);d&&t.setAttr(o,void 0)}var h=Qk||e._useStrictMode,C={},v=!1;const g={};for(var o in e)if(!bS[o]){var a=o.slice(0,2)==="on",m=r[o]!==e[o];if(a&&m){var c=o.substr(2).toLowerCase();c.substr(0,7)==="content"&&(c="content"+c.substr(7,1).toUpperCase()+c.substr(8)),e[o]&&(g[c]=e[o])}!a&&(e[o]!==r[o]||h&&e[o]!==t.getAttr(o))&&(v=!0,C[o]=e[o])}v&&(t.setAttrs(C),Gs(t));for(var c in g)t.on(c+F8,g[c])}function Gs(t){if(!ft.Konva.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}const Jk={},Q$={};ch.Node.prototype._applyProps=Sg;function J$(t,e){if(typeof e=="string"){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${e}`);return}t.add(e),Gs(t)}function eB(t,e,r){let n=ch[t];n||(console.error(`Konva has no node with the type ${t}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${t}" 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=ch.Group);const i={},o={};for(var a in e){var s=a.slice(0,2)==="on";s?o[a]=e[a]:i[a]=e[a]}const c=new n(i);return Sg(c,o),c}function tB(t,e,r){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${t}"`)}function rB(t,e,r){return!1}function nB(t){return t}function iB(){return null}function oB(){return null}function aB(t,e,r,n){return Q$}function sB(){}function lB(t){}function cB(t,e){return!1}function uB(){return Jk}function dB(){return Jk}const hB=setTimeout,fB=clearTimeout,pB=-1;function gB(t,e){return!1}const mB=!1,vB=!0,yB=!0;function CB(t,e){e.parent===t?e.moveToTop():t.add(e),Gs(t)}function wB(t,e){e.parent===t?e.moveToTop():t.add(e),Gs(t)}function eT(t,e,r){e._remove(),t.add(e),e.setZIndex(r.getZIndex()),Gs(t)}function SB(t,e,r){eT(t,e,r)}function bB(t,e){e.destroy(),e.off(F8),Gs(t)}function _B(t,e){e.destroy(),e.off(F8),Gs(t)}function xB(t,e,r){console.error(`Text components are not yet supported in ReactKonva. You text is: "${r}"`)}function EB(t,e,r){}function OB(t,e,r,n,i){Sg(t,i,n)}function PB(t){t.hide(),Gs(t)}function kB(t){}function TB(t,e){(e.visible==null||e.visible)&&t.show()}function IB(t,e){}function AB(t){}function LB(){}const MB=()=>qk.DefaultEventPriority,RB=Object.freeze(Object.defineProperty({__proto__:null,appendChild:CB,appendChildToContainer:wB,appendInitialChild:J$,cancelTimeout:fB,clearContainer:AB,commitMount:EB,commitTextUpdate:xB,commitUpdate:OB,createInstance:eB,createTextInstance:tB,detachDeletedInstance:LB,finalizeInitialChildren:rB,getChildHostContext:dB,getCurrentEventPriority:MB,getPublicInstance:nB,getRootHostContext:uB,hideInstance:PB,hideTextInstance:kB,idlePriority:T0.unstable_IdlePriority,insertBefore:eT,insertInContainerBefore:SB,isPrimaryRenderer:mB,noTimeout:pB,now:T0.unstable_now,prepareForCommit:iB,preparePortalMount:oB,prepareUpdate:aB,removeChild:bB,removeChildFromContainer:_B,resetAfterCommit:sB,resetTextContent:lB,run:T0.unstable_runWithPriority,scheduleTimeout:hB,shouldDeprioritizeSubtree:cB,shouldSetTextContent:gB,supportsMutation:yB,unhideInstance:TB,unhideTextInstance:IB,warnsIfNotActing:vB},Symbol.toStringTag,{value:"Module"}));var NB=Object.defineProperty,FB=Object.defineProperties,DB=Object.getOwnPropertyDescriptors,ES=Object.getOwnPropertySymbols,jB=Object.prototype.hasOwnProperty,zB=Object.prototype.propertyIsEnumerable,OS=(t,e,r)=>e in t?NB(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,PS=(t,e)=>{for(var r in e||(e={}))jB.call(e,r)&&OS(t,r,e[r]);if(ES)for(var r of ES(e))zB.call(e,r)&&OS(t,r,e[r]);return t},$B=(t,e)=>FB(t,DB(e)),kS,TS;typeof window<"u"&&((kS=window.document)!=null&&kS.createElement||((TS=window.navigator)==null?void 0:TS.product)==="ReactNative")?G.useLayoutEffect:G.useEffect;function tT(t,e,r){if(!t)return;if(r(t)===!0)return t;let n=t.child;for(;n;){const i=tT(n,e,r);if(i)return i;n=n.sibling}}function rT(t){try{return Object.defineProperties(t,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return t}}const IS=console.error;console.error=function(){const t=[...arguments].join("");if(t!=null&&t.startsWith("Warning:")&&t.includes("useContext")){console.error=IS;return}return IS.apply(this,arguments)};const D8=rT(G.createContext(null));class nT extends G.Component{render(){return G.createElement(D8.Provider,{value:this._reactInternals},this.props.children)}}function BB(){const t=G.useContext(D8);if(t===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=G.useId();return G.useMemo(()=>{for(const n of[t,t==null?void 0:t.alternate]){if(!n)continue;const i=tT(n,!1,o=>{let a=o.memoizedState;for(;a;){if(a.memoizedState===e)return!0;a=a.next}});if(i)return i}},[t,e])}function HB(){const t=BB(),[e]=G.useState(()=>new Map);e.clear();let r=t;for(;r;){if(r.type&&typeof r.type=="object"){const i=r.type._context===void 0&&r.type.Provider===r.type?r.type:r.type._context;i&&i!==D8&&!e.has(i)&&e.set(i,G.useContext(rT(i)))}r=r.return}return e}function GB(){const t=HB();return G.useMemo(()=>Array.from(t.keys()).reduce((e,r)=>n=>G.createElement(e,null,G.createElement(r.Provider,$B(PS({},n),{value:t.get(r)}))),e=>G.createElement(nT,PS({},e))),[t])}function VB(t){const e=y.useRef({});return y.useLayoutEffect(()=>{e.current=t}),y.useLayoutEffect(()=>()=>{e.current={}},[]),e.current}const UB=t=>{const e=y.useRef(),r=y.useRef(),n=y.useRef(),i=VB(t),o=GB(),a=s=>{const{forwardedRef:c}=t;c&&(typeof c=="function"?c(s):c.current=s)};return y.useLayoutEffect(()=>(r.current=new ch.Stage({width:t.width,height:t.height,container:e.current}),a(r.current),n.current=O0.createContainer(r.current,qk.LegacyRoot,!1,null),O0.updateContainer(y.createElement(o,{},t.children),n.current),()=>{ch.isBrowser&&(a(null),O0.updateContainer(null,n.current,null),r.current.destroy())}),[]),y.useLayoutEffect(()=>{a(r.current),Sg(r.current,t,i),O0.updateContainer(y.createElement(o,{},t.children),n.current,null)}),y.createElement("div",{ref:e,id:t.id,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})},j8="Layer",WB="Group",iT="Rect",oT="Ellipse",XB="Line",bg="Image",KB="Text",YB="RegularPolygon",ZB="Arrow",aT="Transformer",O0=X$(RB);O0.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:y.version,rendererPackageName:"react-konva"});const sT=y.forwardRef((t,e)=>y.createElement(nT,{},y.createElement(UB,{...t,forwardedRef:e}))),qB=K$;var Gv=function(t,e,r,n){return Math.min(t/r,e/n)||1},M2="FIE_root",QB="FIE_design-layer",lT="FIE_transformers-layer",cT="FIE_original-image",uT="FIE_nodes-transformer",As="watermark",Vv="353297d2-40b4-4684-a875-45a2178a8157",dT=.92,Zt={FINETUNE:"Finetune",FILTERS:"Filters",ADJUST:"Adjust",WATERMARK:"Watermark",ANNOTATE:"Annotate",RESIZE:"Resize"},de={CROP:"Crop",ROTATE:"Rotate",FLIP_X:"Flip_X",FLIP_Y:"Flip_Y",BRIGHTNESS:"Brightness",CONTRAST:"Contrast",HSV:"HueSaturationValue",WARMTH:"Warmth",BLUR:"Blur",THRESHOLD:"Threshold",POSTERIZE:"Posterize",PIXELATE:"Pixelate",NOISE:"Noise",FILTERS:"Filters",RECT:"Rect",ELLIPSE:"Ellipse",POLYGON:"Polygon",TEXT:"Text",LINE:"Line",IMAGE:"Image",ARROW:"Arrow",WATERMARK:"Watermark",PEN:"Pen",RESIZE:"Resize"},z8={X:"X",Y:"Y"},Co=1,Xu=["png","jpeg","jpg","webp"],JB=[].concat(Xu,["svg","gif","avif","apng"]),AS=Xu[0],_a={DEFAULT:"default",DRAW:"crosshair",SELECT:"pointer",MOVE:"move",DRAG:"GRAB"},$8="Crop",hT="custom",cc="ellipse",Hr={TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right",MIDDLE_LEFT:"middle-left",MIDDLE_CENTER:"middle-center",MIDDLE_RIGHT:"middle-right",BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right"},LS={WIDTH:14,HEIGHT:14},fT={AFTER_SAVE:"after-saving",CLOSE_BUTTON:"close-button-clicked"},Ku={WARNING:"warning",ERROR:"error"},MS={top:"north",bottom:"south",left:"west",center:"center",right:"east"},eH={northwest:"top-left",northcenter:"top-center",northeast:"top-right",centerwest:"center-left",centercenter:"center-center",centereast:"center-right",southwest:"bottom-left",southcenter:"bottom-center",southeast:"bottom-right"},tH=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0&&arguments[2];e.ratio!==cc||r?t.rect(e.x,e.y,e.width,e.height):t.ellipse(e.x+e.width/2,e.y+e.height/2,e.width/2,e.height/2,0,0,2*Math.PI)};function RS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function NS(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?RS(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):RS(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var pT="ADD_FILTER",rH=function(t,e){return NS(NS({},t),{},{isDesignState:!e.dismissHistory,filter:e.filter||null})};function FS(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function DS(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?FS(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):FS(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var _g="HIDE_LOADER",nH=function(t){return DS(DS({},t),{},{isLoadingGlobally:!1})};function gT(t){return hk(t)||rk(t)||v8(t)||fk()}var Wc;const mT=(Wc={theme:{palette:{"bg-primary-active":"#ECF3FF"},typography:{fontFamily:"Roboto, Arial"}},annotationsCommon:{fill:"#000000",stroke:"#000000",strokeWidth:0,shadowOffsetX:0,shadowOffsetY:0,shadowBlur:0,shadowColor:"#000000",shadowOpacity:1,opacity:1}},A(A(A(A(A(A(A(A(A(A(Wc,de.TEXT,{text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",fontFamily:"Arial",fonts:[{label:"Arial",value:"Arial"},"Tahoma","Sans-serif",{label:"Comic Sans",value:"Comic-sans"}],fontSize:14,letterSpacing:0,lineHeight:1,align:"left",fontStyle:"normal",onFontChange:void 0}),de.IMAGE,{fill:void 0,disableUpload:!1,gallery:[]}),de.RECT,{cornerRadius:0}),de.ELLIPSE,{}),de.POLYGON,{sides:3}),de.PEN,{strokeWidth:1,tension:.5,lineCap:"round",selectAnnotationAfterDrawing:!0}),de.LINE,{lineCap:"butt",strokeWidth:1}),de.ARROW,{strokeWidth:6,lineCap:"butt",pointerLength:void 0,pointerWidth:void 0}),de.WATERMARK,{gallery:[],textScalingRatio:.5,imageScalingRatio:.5,hideTextWatermark:!1,onUploadWatermarkImgClick:void 0}),de.CROP,{minWidth:LS.WIDTH,minHeight:LS.HEIGHT,width:null,height:null,maxWidth:null,maxHeight:null,ratio:null,ratioTitleKey:void 0,noPresets:!1,autoResize:!1,presetsItems:[],presetsFolders:[],lockCropAreaAt:null}),A(A(A(A(A(A(A(A(A(A(Wc,de.ROTATE,{angle:60,componentType:"slider"}),"tabsIds",[]),"defaultTabId",Zt.ADJUST),"defaultToolId",de.CROP),"onClose",void 0),"onSave",void 0),"onBeforeSave",void 0),"closeAfterSave",!1),"defaultSavedImageName",void 0),"defaultSavedImageType",null),A(A(A(A(A(A(A(A(A(A(Wc,"defaultSavedImageQuality",.92),"forceToPngInEllipticalCrop",!1),"useBackendTranslations",!0),"translations",null),"language","en"),"avoidChangesNotSavedAlertOnLeave",!1),"loadableDesignState",null),"moreSaveOptions",[]),"savingPixelRatio",4),"previewPixelRatio",window&&window.devicePixelRatio||1),A(A(A(A(A(A(A(A(A(A(Wc,"showBackButton",!1),"useCloudimage",!1),"cloudimage",{token:"",dontPrefixUrl:!1,domain:"cloudimg.io",version:"",loadableQuery:"",secureProtocol:!0,imageSealing:{enable:!1,salt:"",charCount:10,includeParams:[]}}),"observePluginContainerSize",!1),"showCanvasOnly",!1),"getCurrentImgDataFnRef",void 0),"onModify",void 0),"useZoomPresetsMenu",!0),"disableZooming",!1),"noCrossOrigin",!1),A(A(A(Wc,"disableSaveIfNoChanges",!1),"removeSaveButton",!1),"resetOnImageSourceChange",!1));var B8={exports:{}},xg={},vT={},Ct={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t._registerNode=t.Konva=t.glob=void 0;const e=Math.PI/180;function r(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}t.glob=typeof gs<"u"?gs:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},t.Konva={_global:t.glob,version:"9.3.6",isBrowser:r(),isUnminified:/param/.test((function(i){}).toString()),dblClickWindow:400,getAngle(i){return t.Konva.angleDeg?i*e:i},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,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return t.Konva.DD.isDragging},isTransforming(){var i;return(i=t.Konva.Transformer)===null||i===void 0?void 0:i.isTransforming()},isDragReady(){return!!t.Konva.DD.node},releaseCanvasOnDestroy:!0,document:t.glob.document,_injectGlobal(i){t.glob.Konva=i}};const n=i=>{t.Konva[i.prototype.getClassName()]=i};t._registerNode=n,t.Konva._injectGlobal(t.Konva)})(Ct);var Pr={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Transform=void 0;const e=Ct;class r{constructor(S=[1,0,0,1,0,0]){this.dirty=!1,this.m=S&&S.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 r(this.m)}copyInto(S){S.m[0]=this.m[0],S.m[1]=this.m[1],S.m[2]=this.m[2],S.m[3]=this.m[3],S.m[4]=this.m[4],S.m[5]=this.m[5]}point(S){var E=this.m;return{x:E[0]*S.x+E[2]*S.y+E[4],y:E[1]*S.x+E[3]*S.y+E[5]}}translate(S,E){return this.m[4]+=this.m[0]*S+this.m[2]*E,this.m[5]+=this.m[1]*S+this.m[3]*E,this}scale(S,E){return this.m[0]*=S,this.m[1]*=S,this.m[2]*=E,this.m[3]*=E,this}rotate(S){var E=Math.cos(S),I=Math.sin(S),R=this.m[0]*E+this.m[2]*I,k=this.m[1]*E+this.m[3]*I,N=this.m[0]*-I+this.m[2]*E,T=this.m[1]*-I+this.m[3]*E;return this.m[0]=R,this.m[1]=k,this.m[2]=N,this.m[3]=T,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(S,E){var I=this.m[0]+this.m[2]*E,R=this.m[1]+this.m[3]*E,k=this.m[2]+this.m[0]*S,N=this.m[3]+this.m[1]*S;return this.m[0]=I,this.m[1]=R,this.m[2]=k,this.m[3]=N,this}multiply(S){var E=this.m[0]*S.m[0]+this.m[2]*S.m[1],I=this.m[1]*S.m[0]+this.m[3]*S.m[1],R=this.m[0]*S.m[2]+this.m[2]*S.m[3],k=this.m[1]*S.m[2]+this.m[3]*S.m[3],N=this.m[0]*S.m[4]+this.m[2]*S.m[5]+this.m[4],T=this.m[1]*S.m[4]+this.m[3]*S.m[5]+this.m[5];return this.m[0]=E,this.m[1]=I,this.m[2]=R,this.m[3]=k,this.m[4]=N,this.m[5]=T,this}invert(){var S=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),E=this.m[3]*S,I=-this.m[1]*S,R=-this.m[2]*S,k=this.m[0]*S,N=S*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),T=S*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=E,this.m[1]=I,this.m[2]=R,this.m[3]=k,this.m[4]=N,this.m[5]=T,this}getMatrix(){return this.m}decompose(){var S=this.m[0],E=this.m[1],I=this.m[2],R=this.m[3],k=this.m[4],N=this.m[5],T=S*R-E*I;let D={x:k,y:N,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(S!=0||E!=0){var z=Math.sqrt(S*S+E*E);D.rotation=E>0?Math.acos(S/z):-Math.acos(S/z),D.scaleX=z,D.scaleY=T/z,D.skewX=(S*I+E*R)/T,D.skewY=0}else if(I!=0||R!=0){var B=Math.sqrt(I*I+R*R);D.rotation=Math.PI/2-(R>0?Math.acos(-I/B):-Math.acos(I/B)),D.scaleX=T/B,D.scaleY=B,D.skewX=0,D.skewY=(S*I+E*R)/T}return D.rotation=t.Util._getRotation(D.rotation),D}}t.Transform=r;var n="[object Array]",i="[object Number]",o="[object String]",a="[object Boolean]",s=Math.PI/180,c=180/Math.PI,d="#",h="",C="0",v="Konva warning: ",g="Konva error: ",m="rgb(",w={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]},x=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,b=[];const O=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(f){setTimeout(f,60)};t.Util={_isElement(f){return!!(f&&f.nodeType==1)},_isFunction(f){return!!(f&&f.constructor&&f.call&&f.apply)},_isPlainObject(f){return!!f&&f.constructor===Object},_isArray(f){return Object.prototype.toString.call(f)===n},_isNumber(f){return Object.prototype.toString.call(f)===i&&!isNaN(f)&&isFinite(f)},_isString(f){return Object.prototype.toString.call(f)===o},_isBoolean(f){return Object.prototype.toString.call(f)===a},isObject(f){return f instanceof Object},isValidSelector(f){if(typeof f!="string")return!1;var S=f[0];return S==="#"||S==="."||S===S.toUpperCase()},_sign(f){return f===0||f>0?1:-1},requestAnimFrame(f){b.push(f),b.length===1&&O(function(){const S=b;b=[],S.forEach(function(E){E()})})},createCanvasElement(){var f=document.createElement("canvas");try{f.style=f.style||{}}catch{}return f},createImageElement(){return document.createElement("img")},_isInDocument(f){for(;f=f.parentNode;)if(f==document)return!0;return!1},_urlToImage(f,S){var E=t.Util.createImageElement();E.onload=function(){S(E)},E.src=f},_rgbToHex(f,S,E){return((1<<24)+(f<<16)+(S<<8)+E).toString(16).slice(1)},_hexToRgb(f){f=f.replace(d,h);var S=parseInt(f,16);return{r:S>>16&255,g:S>>8&255,b:S&255}},getRandomColor(){for(var f=(Math.random()*16777215<<0).toString(16);f.length<6;)f=C+f;return d+f},getRGB(f){var S;return f in w?(S=w[f],{r:S[0],g:S[1],b:S[2]}):f[0]===d?this._hexToRgb(f.substring(1)):f.substr(0,4)===m?(S=x.exec(f.replace(/ /g,"")),{r:parseInt(S[1],10),g:parseInt(S[2],10),b:parseInt(S[3],10)}):{r:0,g:0,b:0}},colorToRGBA(f){return f=f||"black",t.Util._namedColorToRBA(f)||t.Util._hex3ColorToRGBA(f)||t.Util._hex4ColorToRGBA(f)||t.Util._hex6ColorToRGBA(f)||t.Util._hex8ColorToRGBA(f)||t.Util._rgbColorToRGBA(f)||t.Util._rgbaColorToRGBA(f)||t.Util._hslColorToRGBA(f)},_namedColorToRBA(f){var S=w[f.toLowerCase()];return S?{r:S[0],g:S[1],b:S[2],a:1}:null},_rgbColorToRGBA(f){if(f.indexOf("rgb(")===0){f=f.match(/rgb\(([^)]+)\)/)[1];var S=f.split(/ *, */).map(Number);return{r:S[0],g:S[1],b:S[2],a:1}}},_rgbaColorToRGBA(f){if(f.indexOf("rgba(")===0){f=f.match(/rgba\(([^)]+)\)/)[1];var S=f.split(/ *, */).map((E,I)=>E.slice(-1)==="%"?I===3?parseInt(E)/100:parseInt(E)/100*255:Number(E));return{r:S[0],g:S[1],b:S[2],a:S[3]}}},_hex8ColorToRGBA(f){if(f[0]==="#"&&f.length===9)return{r:parseInt(f.slice(1,3),16),g:parseInt(f.slice(3,5),16),b:parseInt(f.slice(5,7),16),a:parseInt(f.slice(7,9),16)/255}},_hex6ColorToRGBA(f){if(f[0]==="#"&&f.length===7)return{r:parseInt(f.slice(1,3),16),g:parseInt(f.slice(3,5),16),b:parseInt(f.slice(5,7),16),a:1}},_hex4ColorToRGBA(f){if(f[0]==="#"&&f.length===5)return{r:parseInt(f[1]+f[1],16),g:parseInt(f[2]+f[2],16),b:parseInt(f[3]+f[3],16),a:parseInt(f[4]+f[4],16)/255}},_hex3ColorToRGBA(f){if(f[0]==="#"&&f.length===4)return{r:parseInt(f[1]+f[1],16),g:parseInt(f[2]+f[2],16),b:parseInt(f[3]+f[3],16),a:1}},_hslColorToRGBA(f){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(f)){const[S,...E]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(f),I=Number(E[0])/360,R=Number(E[1])/100,k=Number(E[2])/100;let N,T,D;if(R===0)return D=k*255,{r:Math.round(D),g:Math.round(D),b:Math.round(D),a:1};k<.5?N=k*(1+R):N=k+R-k*R;const z=2*k-N,B=[0,0,0];for(let Y=0;Y<3;Y++)T=I+1/3*-(Y-1),T<0&&T++,T>1&&T--,6*T<1?D=z+(N-z)*6*T:2*T<1?D=N:3*T<2?D=z+(N-z)*(2/3-T)*6:D=z,B[Y]=D*255;return{r:Math.round(B[0]),g:Math.round(B[1]),b:Math.round(B[2]),a:1}}},haveIntersection(f,S){return!(S.x>f.x+f.width||S.x+S.width<f.x||S.y>f.y+f.height||S.y+S.height<f.y)},cloneObject(f){var S={};for(var E in f)this._isPlainObject(f[E])?S[E]=this.cloneObject(f[E]):this._isArray(f[E])?S[E]=this.cloneArray(f[E]):S[E]=f[E];return S},cloneArray(f){return f.slice(0)},degToRad(f){return f*s},radToDeg(f){return f*c},_degToRad(f){return t.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),t.Util.degToRad(f)},_radToDeg(f){return t.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),t.Util.radToDeg(f)},_getRotation(f){return e.Konva.angleDeg?t.Util.radToDeg(f):f},_capitalize(f){return f.charAt(0).toUpperCase()+f.slice(1)},throw(f){throw new Error(g+f)},error(f){console.error(g+f)},warn(f){e.Konva.showWarnings&&console.warn(v+f)},each(f,S){for(var E in f)S(E,f[E])},_inRange(f,S,E){return S<=f&&f<E},_getProjectionToSegment(f,S,E,I,R,k){var N,T,D,z=(f-E)*(f-E)+(S-I)*(S-I);if(z==0)N=f,T=S,D=(R-E)*(R-E)+(k-I)*(k-I);else{var B=((R-f)*(E-f)+(k-S)*(I-S))/z;B<0?(N=f,T=S,D=(f-R)*(f-R)+(S-k)*(S-k)):B>1?(N=E,T=I,D=(E-R)*(E-R)+(I-k)*(I-k)):(N=f+B*(E-f),T=S+B*(I-S),D=(N-R)*(N-R)+(T-k)*(T-k))}return[N,T,D]},_getProjectionToLine(f,S,E){var I=t.Util.cloneObject(f),R=Number.MAX_VALUE;return S.forEach(function(k,N){if(!(!E&&N===S.length-1)){var T=S[(N+1)%S.length],D=t.Util._getProjectionToSegment(k.x,k.y,T.x,T.y,f.x,f.y),z=D[0],B=D[1],Y=D[2];Y<R&&(I.x=z,I.y=B,R=Y)}}),I},_prepareArrayForTween(f,S,E){var I,R=[],k=[];if(f.length>S.length){var N=S;S=f,f=N}for(I=0;I<f.length;I+=2)R.push({x:f[I],y:f[I+1]});for(I=0;I<S.length;I+=2)k.push({x:S[I],y:S[I+1]});var T=[];return k.forEach(function(D){var z=t.Util._getProjectionToLine(D,R,E);T.push(z.x),T.push(z.y)}),T},_prepareToStringify(f){var S;f.visitedByCircularReferenceRemoval=!0;for(var E in f)if(f.hasOwnProperty(E)&&f[E]&&typeof f[E]=="object"){if(S=Object.getOwnPropertyDescriptor(f,E),f[E].visitedByCircularReferenceRemoval||t.Util._isElement(f[E]))if(S.configurable)delete f[E];else return null;else if(t.Util._prepareToStringify(f[E])===null)if(S.configurable)delete f[E];else return null}return delete f.visitedByCircularReferenceRemoval,f},_assign(f,S){for(var E in S)f[E]=S[E];return f},_getFirstPointerId(f){return f.touches?f.changedTouches[0].identifier:f.pointerId||999},releaseCanvas(...f){e.Konva.releaseCanvasOnDestroy&&f.forEach(S=>{S.width=0,S.height=0})},drawRoundedRectPath(f,S,E,I){let R=0,k=0,N=0,T=0;typeof I=="number"?R=k=N=T=Math.min(I,S/2,E/2):(R=Math.min(I[0]||0,S/2,E/2),k=Math.min(I[1]||0,S/2,E/2),T=Math.min(I[2]||0,S/2,E/2),N=Math.min(I[3]||0,S/2,E/2)),f.moveTo(R,0),f.lineTo(S-k,0),f.arc(S-k,k,k,Math.PI*3/2,0,!1),f.lineTo(S,E-T),f.arc(S-T,E-T,T,0,Math.PI/2,!1),f.lineTo(N,E),f.arc(N,E-N,N,Math.PI/2,Math.PI,!1),f.lineTo(0,R),f.arc(R,R,R,Math.PI,Math.PI*3/2,!1)}}})(Pr);var pr={},ot={},Be={};Object.defineProperty(Be,"__esModule",{value:!0});Be.getComponentValidator=Be.getBooleanValidator=Be.getNumberArrayValidator=Be.getFunctionValidator=Be.getStringOrGradientValidator=Be.getStringValidator=Be.getNumberOrAutoValidator=Be.getNumberOrArrayOfNumbersValidator=H8=Be.getNumberValidator=Be.alphaComponent=Be.RGBComponent=void 0;const ja=Ct,Ir=Pr;function za(t){return Ir.Util._isString(t)?'"'+t+'"':Object.prototype.toString.call(t)==="[object Number]"||Ir.Util._isBoolean(t)?t:Object.prototype.toString.call(t)}function iH(t){return t>255?255:t<0?0:Math.round(t)}Be.RGBComponent=iH;function oH(t){return t>1?1:t<1e-4?1e-4:t}Be.alphaComponent=oH;function aH(){if(ja.Konva.isUnminified)return function(t,e){return Ir.Util._isNumber(t)||Ir.Util.warn(za(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}var H8=Be.getNumberValidator=aH;function sH(t){if(ja.Konva.isUnminified)return function(e,r){let n=Ir.Util._isNumber(e),i=Ir.Util._isArray(e)&&e.length==t;return!n&&!i&&Ir.Util.warn(za(e)+' is a not valid value for "'+r+'" attribute. The value should be a number or Array<number>('+t+")"),e}}Be.getNumberOrArrayOfNumbersValidator=sH;function lH(){if(ja.Konva.isUnminified)return function(t,e){var r=Ir.Util._isNumber(t),n=t==="auto";return r||n||Ir.Util.warn(za(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}Be.getNumberOrAutoValidator=lH;function cH(){if(ja.Konva.isUnminified)return function(t,e){return Ir.Util._isString(t)||Ir.Util.warn(za(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}Be.getStringValidator=cH;function uH(){if(ja.Konva.isUnminified)return function(t,e){const r=Ir.Util._isString(t),n=Object.prototype.toString.call(t)==="[object CanvasGradient]"||t&&t.addColorStop;return r||n||Ir.Util.warn(za(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}Be.getStringOrGradientValidator=uH;function dH(){if(ja.Konva.isUnminified)return function(t,e){return Ir.Util._isFunction(t)||Ir.Util.warn(za(t)+' is a not valid value for "'+e+'" attribute. The value should be a function.'),t}}Be.getFunctionValidator=dH;function hH(){if(ja.Konva.isUnminified)return function(t,e){const r=Int8Array?Object.getPrototypeOf(Int8Array):null;return r&&t instanceof r||(Ir.Util._isArray(t)?t.forEach(function(n){Ir.Util._isNumber(n)||Ir.Util.warn('"'+e+'" attribute has non numeric element '+n+". Make sure that all elements are numbers.")}):Ir.Util.warn(za(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}Be.getNumberArrayValidator=hH;function fH(){if(ja.Konva.isUnminified)return function(t,e){var r=t===!0||t===!1;return r||Ir.Util.warn(za(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}Be.getBooleanValidator=fH;function pH(t){if(ja.Konva.isUnminified)return function(e,r){return e==null||Ir.Util.isObject(e)||Ir.Util.warn(za(e)+' is a not valid value for "'+r+'" attribute. The value should be an object with properties '+t),e}}Be.getComponentValidator=pH;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Factory=void 0;const e=Pr,r=Be;var n="get",i="set";t.Factory={addGetterSetter(o,a,s,c,d){t.Factory.addGetter(o,a,s),t.Factory.addSetter(o,a,c,d),t.Factory.addOverloadedGetterSetter(o,a)},addGetter(o,a,s){var c=n+e.Util._capitalize(a);o.prototype[c]=o.prototype[c]||function(){var d=this.attrs[a];return d===void 0?s:d}},addSetter(o,a,s,c){var d=i+e.Util._capitalize(a);o.prototype[d]||t.Factory.overWriteSetter(o,a,s,c)},overWriteSetter(o,a,s,c){var d=i+e.Util._capitalize(a);o.prototype[d]=function(h){return s&&h!==void 0&&h!==null&&(h=s.call(this,h,a)),this._setAttr(a,h),c&&c.call(this),this}},addComponentsGetterSetter(o,a,s,c,d){var h=s.length,C=e.Util._capitalize,v=n+C(a),g=i+C(a),m,w;o.prototype[v]=function(){var b={};for(m=0;m<h;m++)w=s[m],b[w]=this.getAttr(a+C(w));return b};var x=(0,r.getComponentValidator)(s);o.prototype[g]=function(b){var O=this.attrs[a],f;c&&(b=c.call(this,b)),x&&x.call(this,b,a);for(f in b)b.hasOwnProperty(f)&&this._setAttr(a+C(f),b[f]);return b||s.forEach(S=>{this._setAttr(a+C(S),void 0)}),this._fireChangeEvent(a,O,b),d&&d.call(this),this},t.Factory.addOverloadedGetterSetter(o,a)},addOverloadedGetterSetter(o,a){var s=e.Util._capitalize(a),c=i+s,d=n+s;o.prototype[a]=function(){return arguments.length?(this[c](arguments[0]),this):this[d]()}},addDeprecatedGetterSetter(o,a,s,c){e.Util.error("Adding deprecated "+a);var d=n+e.Util._capitalize(a),h=a+" property is deprecated and will be removed soon. Look at Konva change log for more information.";o.prototype[d]=function(){e.Util.error(h);var C=this.attrs[a];return C===void 0?s:C},t.Factory.addSetter(o,a,c,function(){e.Util.error(h)}),t.Factory.addOverloadedGetterSetter(o,a)},backCompat(o,a){e.Util.each(a,function(s,c){var d=o.prototype[c],h=n+e.Util._capitalize(s),C=i+e.Util._capitalize(s);function v(){d.apply(this,arguments),e.Util.error('"'+s+'" method is deprecated and will be removed soon. Use ""'+c+'" instead.')}o.prototype[s]=v,o.prototype[h]=v,o.prototype[C]=v})},afterSetFilter(){this._filterUpToDate=!1}}})(ot);var vo={},Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});Pa.HitContext=Pa.SceneContext=Pa.Context=void 0;const yT=Pr,gH=Ct;function mH(t){var e=[],r=t.length,n=yT.Util,i,o;for(i=0;i<r;i++)o=t[i],n._isNumber(o)?o=Math.round(o*1e3)/1e3:n._isString(o)||(o=o+""),e.push(o);return e}var jS=",",vH="(",yH=")",CH="([",wH="])",SH=";",bH="()",_H="=",zS=["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"],xH=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const EH=100;class Eg{constructor(e){this.canvas=e,gH.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,r){var n=this.traceArr,i=n.length,o="",a,s,c,d;for(a=0;a<i;a++)s=n[a],c=s.method,c?(d=s.args,o+=c,e?o+=bH:yT.Util._isArray(d[0])?o+=CH+d.join(jS)+wH:(r&&(d=d.map(h=>typeof h=="number"?Math.floor(h):h)),o+=vH+d.join(jS)+yH)):(o+=s.property,e||(o+=_H+s.val)),o+=SH;return o}clearTrace(){this.traceArr=[]}_trace(e){var r=this.traceArr,n;r.push(e),n=r.length,n>=EH&&r.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var r=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,r.getWidth()/r.pixelRatio,r.getHeight()/r.pixelRatio)}_applyLineCap(e){const r=e.attrs.lineCap;r&&this.setAttr("lineCap",r)}_applyOpacity(e){var r=e.getAbsoluteOpacity();r!==1&&this.setAttr("globalAlpha",r)}_applyLineJoin(e){const r=e.attrs.lineJoin;r&&this.setAttr("lineJoin",r)}setAttr(e,r){this._context[e]=r}arc(e,r,n,i,o,a){this._context.arc(e,r,n,i,o,a)}arcTo(e,r,n,i,o){this._context.arcTo(e,r,n,i,o)}beginPath(){this._context.beginPath()}bezierCurveTo(e,r,n,i,o,a){this._context.bezierCurveTo(e,r,n,i,o,a)}clearRect(e,r,n,i){this._context.clearRect(e,r,n,i)}clip(...e){this._context.clip.apply(this._context,e)}closePath(){this._context.closePath()}createImageData(e,r){var n=arguments;if(n.length===2)return this._context.createImageData(e,r);if(n.length===1)return this._context.createImageData(e)}createLinearGradient(e,r,n,i){return this._context.createLinearGradient(e,r,n,i)}createPattern(e,r){return this._context.createPattern(e,r)}createRadialGradient(e,r,n,i,o,a){return this._context.createRadialGradient(e,r,n,i,o,a)}drawImage(e,r,n,i,o,a,s,c,d){var h=arguments,C=this._context;h.length===3?C.drawImage(e,r,n):h.length===5?C.drawImage(e,r,n,i,o):h.length===9&&C.drawImage(e,r,n,i,o,a,s,c,d)}ellipse(e,r,n,i,o,a,s,c){this._context.ellipse(e,r,n,i,o,a,s,c)}isPointInPath(e,r,n,i){return n?this._context.isPointInPath(n,e,r,i):this._context.isPointInPath(e,r,i)}fill(...e){this._context.fill.apply(this._context,e)}fillRect(e,r,n,i){this._context.fillRect(e,r,n,i)}strokeRect(e,r,n,i){this._context.strokeRect(e,r,n,i)}fillText(e,r,n,i){i?this._context.fillText(e,r,n,i):this._context.fillText(e,r,n)}measureText(e){return this._context.measureText(e)}getImageData(e,r,n,i){return this._context.getImageData(e,r,n,i)}lineTo(e,r){this._context.lineTo(e,r)}moveTo(e,r){this._context.moveTo(e,r)}rect(e,r,n,i){this._context.rect(e,r,n,i)}roundRect(e,r,n,i,o){this._context.roundRect(e,r,n,i,o)}putImageData(e,r,n){this._context.putImageData(e,r,n)}quadraticCurveTo(e,r,n,i){this._context.quadraticCurveTo(e,r,n,i)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,r){this._context.scale(e,r)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,r,n,i,o,a){this._context.setTransform(e,r,n,i,o,a)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,r,n,i){this._context.strokeText(e,r,n,i)}transform(e,r,n,i,o,a){this._context.transform(e,r,n,i,o,a)}translate(e,r){this._context.translate(e,r)}_enableTrace(){var e=this,r=zS.length,n=this.setAttr,i,o,a=function(s){var c=e[s],d;e[s]=function(){return o=mH(Array.prototype.slice.call(arguments,0)),d=c.apply(e,arguments),e._trace({method:s,args:o}),d}};for(i=0;i<r;i++)a(zS[i]);e.setAttr=function(){n.apply(e,arguments);var s=arguments[0],c=arguments[1];(s==="shadowOffsetX"||s==="shadowOffsetY"||s==="shadowBlur")&&(c=c/this.canvas.getPixelRatio()),e._trace({property:s,val:c})}}_applyGlobalCompositeOperation(e){const r=e.attrs.globalCompositeOperation;var n=!r||r==="source-over";n||this.setAttr("globalCompositeOperation",r)}}Pa.Context=Eg;xH.forEach(function(t){Object.defineProperty(Eg.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});class OH extends Eg{constructor(e,{willReadFrequently:r=!1}={}){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:r})}_fillColor(e){var r=e.fill();this.setAttr("fillStyle",r),e._fillFunc(this)}_fillPattern(e){this.setAttr("fillStyle",e._getFillPattern()),e._fillFunc(this)}_fillLinearGradient(e){var r=e._getLinearGradient();r&&(this.setAttr("fillStyle",r),e._fillFunc(this))}_fillRadialGradient(e){const r=e._getRadialGradient();r&&(this.setAttr("fillStyle",r),e._fillFunc(this))}_fill(e){const r=e.fill(),n=e.getFillPriority();if(r&&n==="color"){this._fillColor(e);return}const i=e.getFillPatternImage();if(i&&n==="pattern"){this._fillPattern(e);return}const o=e.getFillLinearGradientColorStops();if(o&&n==="linear-gradient"){this._fillLinearGradient(e);return}const a=e.getFillRadialGradientColorStops();if(a&&n==="radial-gradient"){this._fillRadialGradient(e);return}r?this._fillColor(e):i?this._fillPattern(e):o?this._fillLinearGradient(e):a&&this._fillRadialGradient(e)}_strokeLinearGradient(e){const r=e.getStrokeLinearGradientStartPoint(),n=e.getStrokeLinearGradientEndPoint(),i=e.getStrokeLinearGradientColorStops(),o=this.createLinearGradient(r.x,r.y,n.x,n.y);if(i){for(var a=0;a<i.length;a+=2)o.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",o)}}_stroke(e){var r=e.dash(),n=e.getStrokeScaleEnabled();if(e.hasStroke()){if(!n){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(e),r&&e.dashEnabled()&&(this.setLineDash(r),this.setAttr("lineDashOffset",e.dashOffset())),this.setAttr("lineWidth",e.strokeWidth()),e.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var o=e.getStrokeLinearGradientColorStops();o?this._strokeLinearGradient(e):this.setAttr("strokeStyle",e.stroke()),e._strokeFunc(this),n||this.restore()}}_applyShadow(e){var r,n,i,o=(r=e.getShadowRGBA())!==null&&r!==void 0?r:"black",a=(n=e.getShadowBlur())!==null&&n!==void 0?n:5,s=(i=e.getShadowOffset())!==null&&i!==void 0?i:{x:0,y:0},c=e.getAbsoluteScale(),d=this.canvas.getPixelRatio(),h=c.x*d,C=c.y*d;this.setAttr("shadowColor",o),this.setAttr("shadowBlur",a*Math.min(Math.abs(h),Math.abs(C))),this.setAttr("shadowOffsetX",s.x*h),this.setAttr("shadowOffsetY",s.y*C)}}Pa.SceneContext=OH;class PH extends Eg{constructor(e){super(e),this._context=e._canvas.getContext("2d",{willReadFrequently:!0})}_fill(e){this.save(),this.setAttr("fillStyle",e.colorKey),e._fillFuncHit(this),this.restore()}strokeShape(e){e.hasHitStroke()&&this._stroke(e)}_stroke(e){if(e.hasHitStroke()){const o=e.getStrokeScaleEnabled();if(!o){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,0,0)}this._applyLineCap(e);var n=e.hitStrokeWidth(),i=n==="auto"?e.strokeWidth():n;this.setAttr("lineWidth",i),this.setAttr("strokeStyle",e.colorKey),e._strokeFuncHit(this),o||this.restore()}}}Pa.HitContext=PH;Object.defineProperty(vo,"__esModule",{value:!0});vo.HitCanvas=vo.SceneCanvas=vo.Canvas=void 0;const R2=Pr,CT=Pa,wT=Ct,kH=ot,TH=Be;var ef;function IH(){if(ef)return ef;var t=R2.Util.createCanvasElement(),e=t.getContext("2d");return ef=function(){var r=wT.Konva._global.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return r/n}(),R2.Util.releaseCanvas(t),ef}class Og{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var r=e||{},n=r.pixelRatio||wT.Konva.pixelRatio||IH();this.pixelRatio=n,this._canvas=R2.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(e){var r=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/r,this.getHeight()/r)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";var r=this.pixelRatio,n=this.getContext()._context;n.scale(r,r)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";var r=this.pixelRatio,n=this.getContext()._context;n.scale(r,r)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,r){this.setWidth(e||0),this.setHeight(r||0)}toDataURL(e,r){try{return this._canvas.toDataURL(e,r)}catch{try{return this._canvas.toDataURL()}catch(i){return R2.Util.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}vo.Canvas=Og;kH.Factory.addGetterSetter(Og,"pixelRatio",void 0,(0,TH.getNumberValidator)());class AH extends Og{constructor(e={width:0,height:0,willReadFrequently:!1}){super(e),this.context=new CT.SceneContext(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}}vo.SceneCanvas=AH;class LH extends Og{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new CT.HitContext(this),this.setSize(e.width,e.height)}}vo.HitCanvas=LH;var Pg={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DD=void 0;const e=Ct,r=Pr;t.DD={get isDragging(){var n=!1;return t.DD._dragElements.forEach(i=>{i.dragStatus==="dragging"&&(n=!0)}),n},justDragged:!1,get node(){var n;return t.DD._dragElements.forEach(i=>{n=i.node}),n},_dragElements:new Map,_drag(n){const i=[];t.DD._dragElements.forEach((o,a)=>{const{node:s}=o,c=s.getStage();c.setPointersPositions(n),o.pointerId===void 0&&(o.pointerId=r.Util._getFirstPointerId(n));const d=c._changedPointerPositions.find(v=>v.id===o.pointerId);if(d){if(o.dragStatus!=="dragging"){var h=s.dragDistance(),C=Math.max(Math.abs(d.x-o.startPointerPos.x),Math.abs(d.y-o.startPointerPos.y));if(C<h||(s.startDrag({evt:n}),!s.isDragging()))return}s._setDragPosition(n,o),i.push(s)}}),i.forEach(o=>{o.fire("dragmove",{type:"dragmove",target:o,evt:n},!0)})},_endDragBefore(n){const i=[];t.DD._dragElements.forEach(o=>{const{node:a}=o,s=a.getStage();if(n&&s.setPointersPositions(n),!s._changedPointerPositions.find(h=>h.id===o.pointerId))return;(o.dragStatus==="dragging"||o.dragStatus==="stopped")&&(t.DD.justDragged=!0,e.Konva._mouseListenClick=!1,e.Konva._touchListenClick=!1,e.Konva._pointerListenClick=!1,o.dragStatus="stopped");const d=o.node.getLayer()||o.node instanceof e.Konva.Stage&&o.node;d&&i.indexOf(d)===-1&&i.push(d)}),i.forEach(o=>{o.draw()})},_endDragAfter(n){t.DD._dragElements.forEach((i,o)=>{i.dragStatus==="stopped"&&i.node.fire("dragend",{type:"dragend",target:i.node,evt:n},!0),i.dragStatus!=="dragging"&&t.DD._dragElements.delete(o)})}},e.Konva.isBrowser&&(window.addEventListener("mouseup",t.DD._endDragBefore,!0),window.addEventListener("touchend",t.DD._endDragBefore,!0),window.addEventListener("mousemove",t.DD._drag),window.addEventListener("touchmove",t.DD._drag),window.addEventListener("mouseup",t.DD._endDragAfter,!1),window.addEventListener("touchend",t.DD._endDragAfter,!1))})(Pg);Object.defineProperty(pr,"__esModule",{value:!0});pr.Node=void 0;const Et=Pr,kh=ot,c0=vo,is=Ct,zi=Pg,Fr=Be;var Uf="absoluteOpacity",tf="allEventListeners",va="absoluteTransform",$S="absoluteScale",Sl="canvas",MH="Change",RH="children",NH="konva",Uv="listening",BS="mouseenter",HS="mouseleave",GS="set",VS="Shape",Wf=" ",US="stage",ls="transform",FH="Stage",Wv="visible",DH=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Wf);let jH=1;class Ze{constructor(e){this._id=jH++,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(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){(e===ls||e===va)&&this._cache.get(e)?this._cache.get(e).dirty=!0:e?this._cache.delete(e):this._cache.clear()}_getCache(e,r){var n=this._cache.get(e),i=e===ls||e===va,o=n===void 0||i&&n.dirty===!0;return o&&(n=r.call(this),this._cache.set(e,n)),n}_calculate(e,r,n){if(!this._attachedDepsListeners.get(e)){const i=r.map(o=>o+"Change.konva").join(Wf);this.on(i,()=>{this._clearCache(e)}),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(Sl)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===va&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Sl)){const{scene:e,filter:r,hit:n}=this._cache.get(Sl);Et.Util.releaseCanvas(e,r,n),this._cache.delete(Sl)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var r=e||{},n={};(r.x===void 0||r.y===void 0||r.width===void 0||r.height===void 0)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var i=Math.ceil(r.width||n.width),o=Math.ceil(r.height||n.height),a=r.pixelRatio,s=r.x===void 0?Math.floor(n.x):r.x,c=r.y===void 0?Math.floor(n.y):r.y,d=r.offset||0,h=r.drawBorder||!1,C=r.hitCanvasPixelRatio||1;if(!i||!o){Et.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const v=Math.abs(Math.round(n.x)-s)>.5?1:0,g=Math.abs(Math.round(n.y)-c)>.5?1:0;i+=d*2+v,o+=d*2+g,s-=d,c-=d;var m=new c0.SceneCanvas({pixelRatio:a,width:i,height:o}),w=new c0.SceneCanvas({pixelRatio:a,width:0,height:0,willReadFrequently:!0}),x=new c0.HitCanvas({pixelRatio:C,width:i,height:o}),b=m.getContext(),O=x.getContext();return x.isCache=!0,m.isCache=!0,this._cache.delete(Sl),this._filterUpToDate=!1,r.imageSmoothingEnabled===!1&&(m.getContext()._context.imageSmoothingEnabled=!1,w.getContext()._context.imageSmoothingEnabled=!1),b.save(),O.save(),b.translate(-s,-c),O.translate(-s,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache(Uf),this._clearSelfAndDescendantCache($S),this.drawScene(m,this),this.drawHit(x,this),this._isUnderCache=!1,b.restore(),O.restore(),h&&(b.save(),b.beginPath(),b.rect(0,0,i,o),b.closePath(),b.setAttr("strokeStyle","red"),b.setAttr("lineWidth",5),b.stroke(),b.restore()),this._cache.set(Sl,{scene:m,filter:w,hit:x,x:s,y:c}),this._requestDraw(),this}isCached(){return this._cache.has(Sl)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,r){var n=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],i=1/0,o=1/0,a=-1/0,s=-1/0,c=this.getAbsoluteTransform(r);return n.forEach(function(d){var h=c.point(d);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),{x:i,y:o,width:a-i,height:s-o}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const r=this._getCanvasCache();e.translate(r.x,r.y);var n=this._getCachedSceneCanvas(),i=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/i,n.height/i),e.restore()}_drawCachedHitCanvas(e){var r=this._getCanvasCache(),n=r.hit;e.save(),e.translate(r.x,r.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e=this.filters(),r=this._getCanvasCache(),n=r.scene,i=r.filter,o=i.getContext(),a,s,c,d;if(e){if(!this._filterUpToDate){var h=n.pixelRatio;i.setSize(n.width/n.pixelRatio,n.height/n.pixelRatio);try{for(a=e.length,o.clear(),o.drawImage(n._canvas,0,0,n.getWidth()/h,n.getHeight()/h),s=o.getImageData(0,0,i.getWidth(),i.getHeight()),c=0;c<a;c++){if(d=e[c],typeof d!="function"){Et.Util.error("Filter should be type of function, but got "+typeof d+" instead. Please check correct filters");continue}d.call(this,s),o.putImageData(s,0,0)}}catch(C){Et.Util.error("Unable to apply filter. "+C.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return n}on(e,r){if(this._cache&&this._cache.delete(tf),arguments.length===3)return this._delegate.apply(this,arguments);var n=e.split(Wf),i=n.length,o,a,s,c,d;for(o=0;o<i;o++)a=n[o],s=a.split("."),c=s[0],d=s[1]||"",this.eventListeners[c]||(this.eventListeners[c]=[]),this.eventListeners[c].push({name:d,handler:r});return this}off(e,r){var n=(e||"").split(Wf),i=n.length,o,a,s,c,d,h;if(this._cache&&this._cache.delete(tf),!e)for(a in this.eventListeners)this._off(a);for(o=0;o<i;o++)if(s=n[o],c=s.split("."),d=c[0],h=c[1],d)this.eventListeners[d]&&this._off(d,h,r);else for(a in this.eventListeners)this._off(a,h,r);return this}dispatchEvent(e){var r={target:this,type:e.type,evt:e};return this.fire(e.type,r),this}addEventListener(e,r){return this.on(e,function(n){r.call(this,n.evt)}),this}removeEventListener(e){return this.off(e),this}_delegate(e,r,n){var i=this;this.on(e,function(o){for(var a=o.target.findAncestors(r,!0,i),s=0;s<a.length;s++)o=Et.Util.cloneObject(o),o.currentTarget=a[s],n.call(a[s],o)})}remove(){return this.isDragging()&&this.stopDrag(),zi.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(va),this._clearSelfAndDescendantCache(Uf),this._clearSelfAndDescendantCache($S),this._clearSelfAndDescendantCache(US),this._clearSelfAndDescendantCache(Wv),this._clearSelfAndDescendantCache(Uv)}_remove(){this._clearCaches();var e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(e){var r="get"+Et.Util._capitalize(e);return Et.Util._isFunction(this[r])?this[r]():this.attrs[e]}getAncestors(){for(var e=this.getParent(),r=[];e;)r.push(e),e=e.getParent();return r}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{var r,n;if(!e)return this;for(r in e)r!==RH&&(n=GS+Et.Util._capitalize(r),Et.Util._isFunction(this[n])?this[n](e[r]):this._setAttr(r,e[r]))}),this}isListening(){return this._getCache(Uv,this._isListening)}_isListening(e){if(!this.listening())return!1;const n=this.getParent();return n&&n!==e&&this!==e?n._isListening(e):!0}isVisible(){return this._getCache(Wv,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const n=this.getParent();return n&&n!==e&&this!==e?n._isVisible(e):!0}shouldDrawHit(e,r=!1){if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),i=!1;zi.DD._dragElements.forEach(a=>{a.dragStatus==="dragging"&&(a.node.nodeType==="Stage"||a.node.getLayer()===n)&&(i=!0)});var o=!r&&!is.Konva.hitOnDragEnabled&&(i||is.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e=this.getDepth(),r=this,n=0,i,o,a,s;function c(h){for(i=[],o=h.length,a=0;a<o;a++)s=h[a],n++,s.nodeType!==VS&&(i=i.concat(s.getChildren().slice())),s._id===r._id&&(a=o);i.length>0&&i[0].getDepth()<=e&&c(i)}const d=this.getStage();return r.nodeType!==FH&&d&&c(d.getChildren()),n}getDepth(){for(var e=0,r=this.parent;r;)e++,r=r.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(ls),this._clearSelfAndDescendantCache(va)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const e=this.getStage();if(!e)return null;var r=e.getPointerPosition();if(!r)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(r)}getAbsolutePosition(e){let r=!1,n=this.parent;for(;n;){if(n.isCached()){r=!0;break}n=n.parent}r&&!e&&(e=!0);var i=this.getAbsoluteTransform(e).getMatrix(),o=new Et.Transform,a=this.offset();return o.m=i.slice(),o.translate(a.x,a.y),o.getTranslation()}setAbsolutePosition(e){const{x:r,y:n,...i}=this._clearTransform();this.attrs.x=r,this.attrs.y=n,this._clearCache(ls);var o=this._getAbsoluteTransform().copy();return o.invert(),o.translate(e.x,e.y),e={x:this.attrs.x+o.getTranslation().x,y:this.attrs.y+o.getTranslation().y},this._setTransform(i),this.setPosition({x:e.x,y:e.y}),this._clearCache(ls),this._clearSelfAndDescendantCache(va),this}_setTransform(e){var r;for(r in e)this.attrs[r]=e[r]}_clearTransform(){var e={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,e}move(e){var r=e.x,n=e.y,i=this.x(),o=this.y();return r!==void 0&&(i+=r),n!==void 0&&(o+=n),this.setPosition({x:i,y:o}),this}_eachAncestorReverse(e,r){var n=[],i=this.getParent(),o,a;if(!(r&&r._id===this._id)){for(n.unshift(this);i&&(!r||i._id!==r._id);)n.unshift(i),i=i.parent;for(o=n.length,a=0;a<o;a++)e(n[a])}}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return Et.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var e=this.index,r=this.parent.getChildren().length;return e<r-1?(this.parent.children.splice(e,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0):!1}moveUp(){if(!this.parent)return Et.Util.warn("Node has no parent. moveUp function is ignored."),!1;var e=this.index,r=this.parent.getChildren().length;return e<r-1?(this.parent.children.splice(e,1),this.parent.children.splice(e+1,0,this),this.parent._setChildrenIndices(),!0):!1}moveDown(){if(!this.parent)return Et.Util.warn("Node has no parent. moveDown function is ignored."),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return Et.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0?(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(e){if(!this.parent)return Et.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&Et.Util.warn("Unexpected value "+e+" 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)+".");var r=this.index;return this.parent.children.splice(r,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(Uf,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),r=this.getParent();return r&&!r._isUnderCache&&(e*=r.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e=this.getAttrs(),r,n,i,o,a;const s={attrs:{},className:this.getClassName()};for(r in e)n=e[r],a=Et.Util.isObject(n)&&!Et.Util._isPlainObject(n)&&!Et.Util._isArray(n),!a&&(i=typeof this[r]=="function"&&this[r],delete e[r],o=i?i.call(this):null,e[r]=n,o!==n&&(s.attrs[r]=n));return Et.Util._prepareToStringify(s)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,r,n){var i=[];r&&this._isMatch(e)&&i.push(this);for(var o=this.parent;o;){if(o===n)return i;o._isMatch(e)&&i.push(o),o=o.parent}return i}isAncestorOf(e){return!1}findAncestor(e,r,n){return this.findAncestors(e,r,n)[0]}_isMatch(e){if(!e)return!1;if(typeof e=="function")return e(this);var r=e.replace(/ /g,"").split(","),n=r.length,i,o;for(i=0;i<n;i++)if(o=r[i],Et.Util.isValidSelector(o)||(Et.Util.warn('Selector "'+o+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),Et.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),Et.Util.warn("Konva is awesome, right?")),o.charAt(0)==="#"){if(this.id()===o.slice(1))return!0}else if(o.charAt(0)==="."){if(this.hasName(o.slice(1)))return!0}else if(this.className===o||this.nodeType===o)return!0;return!1}getLayer(){var e=this.getParent();return e?e.getLayer():null}getStage(){return this._getCache(US,this._getStage)}_getStage(){var e=this.getParent();return e?e.getStage():null}fire(e,r={},n){return r.target=r.target||this,n?this._fireAndBubble(e,r):this._fire(e,r),this}getAbsoluteTransform(e){return e?this._getAbsoluteTransform(e):this._getCache(va,this._getAbsoluteTransform)}_getAbsoluteTransform(e){var r;if(e)return r=new Et.Transform,this._eachAncestorReverse(function(i){var o=i.transformsEnabled();o==="all"?r.multiply(i.getTransform()):o==="position"&&r.translate(i.x()-i.offsetX(),i.y()-i.offsetY())},e),r;r=this._cache.get(va)||new Et.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(r):r.reset();var n=this.transformsEnabled();if(n==="all")r.multiply(this.getTransform());else if(n==="position"){const i=this.attrs.x||0,o=this.attrs.y||0,a=this.attrs.offsetX||0,s=this.attrs.offsetY||0;r.translate(i-a,o-s)}return r.dirty=!1,r}getAbsoluteScale(e){for(var r=this;r;)r._isUnderCache&&(e=r),r=r.getParent();const i=this.getAbsoluteTransform(e).decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(ls,this._getTransform)}_getTransform(){var e,r,n=this._cache.get(ls)||new Et.Transform;n.reset();var i=this.x(),o=this.y(),a=is.Konva.getAngle(this.rotation()),s=(e=this.attrs.scaleX)!==null&&e!==void 0?e:1,c=(r=this.attrs.scaleY)!==null&&r!==void 0?r:1,d=this.attrs.skewX||0,h=this.attrs.skewY||0,C=this.attrs.offsetX||0,v=this.attrs.offsetY||0;return(i!==0||o!==0)&&n.translate(i,o),a!==0&&n.rotate(a),(d!==0||h!==0)&&n.skew(d,h),(s!==1||c!==1)&&n.scale(s,c),(C!==0||v!==0)&&n.translate(-1*C,-1*v),n.dirty=!1,n}clone(e){var r=Et.Util.cloneObject(this.attrs),n,i,o,a,s;for(n in e)r[n]=e[n];var c=new this.constructor(r);for(n in this.eventListeners)for(i=this.eventListeners[n],o=i.length,a=0;a<o;a++)s=i[a],s.name.indexOf(NH)<0&&(c.eventListeners[n]||(c.eventListeners[n]=[]),c.eventListeners[n].push(s));return c}_toKonvaCanvas(e){e=e||{};var r=this.getClientRect(),n=this.getStage(),i=e.x!==void 0?e.x:Math.floor(r.x),o=e.y!==void 0?e.y:Math.floor(r.y),a=e.pixelRatio||1,s=new c0.SceneCanvas({width:e.width||Math.ceil(r.width)||(n?n.width():0),height:e.height||Math.ceil(r.height)||(n?n.height():0),pixelRatio:a}),c=s.getContext();const d=new c0.SceneCanvas({width:s.width/s.pixelRatio+Math.abs(i),height:s.height/s.pixelRatio+Math.abs(o),pixelRatio:s.pixelRatio});return e.imageSmoothingEnabled===!1&&(c._context.imageSmoothingEnabled=!1),c.save(),(i||o)&&c.translate(-1*i,-1*o),this.drawScene(s,void 0,d),c.restore(),s}toCanvas(e){return this._toKonvaCanvas(e)._canvas}toDataURL(e){e=e||{};var r=e.mimeType||null,n=e.quality||null,i=this._toKonvaCanvas(e).toDataURL(r,n);return e.callback&&e.callback(i),i}toImage(e){return new Promise((r,n)=>{try{const i=e==null?void 0:e.callback;i&&delete e.callback,Et.Util._urlToImage(this.toDataURL(e),function(o){r(o),i==null||i(o)})}catch(i){n(i)}})}toBlob(e){return new Promise((r,n)=>{try{const i=e==null?void 0:e.callback;i&&delete e.callback,this.toCanvas(e).toBlob(o=>{r(o),i==null||i(o)},e==null?void 0:e.mimeType,e==null?void 0:e.quality)}catch(i){n(i)}})}setSize(e){return this.width(e.width),this.height(e.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():is.Konva.dragDistance}_off(e,r,n){var i=this.eventListeners[e],o,a,s;for(o=0;o<i.length;o++)if(a=i[o].name,s=i[o].handler,(a!=="konva"||r==="konva")&&(!r||a===r)&&(!n||n===s)){if(i.splice(o,1),i.length===0){delete this.eventListeners[e];break}o--}}_fireChangeEvent(e,r,n){this._fire(e+MH,{oldVal:r,newVal:n})}addName(e){if(!this.hasName(e)){var r=this.name(),n=r?r+" "+e:e;this.name(n)}return this}hasName(e){if(!e)return!1;const r=this.name();if(!r)return!1;var n=(r||"").split(/\s/g);return n.indexOf(e)!==-1}removeName(e){var r=(this.name()||"").split(/\s/g),n=r.indexOf(e);return n!==-1&&(r.splice(n,1),this.name(r.join(" "))),this}setAttr(e,r){var n=this[GS+Et.Util._capitalize(e)];return Et.Util._isFunction(n)?n.call(this,r):this._setAttr(e,r),this}_requestDraw(){if(is.Konva.autoDrawEnabled){const e=this.getLayer()||this.getStage();e==null||e.batchDraw()}}_setAttr(e,r){var n=this.attrs[e];n===r&&!Et.Util.isObject(r)||(r==null?delete this.attrs[e]:this.attrs[e]=r,this._shouldFireChangeEvents&&this._fireChangeEvent(e,n,r),this._requestDraw())}_setComponentAttr(e,r,n){var i;n!==void 0&&(i=this.attrs[e],i||(this.attrs[e]=this.getAttr(e)),this.attrs[e][r]=n,this._fireChangeEvent(e,i,n))}_fireAndBubble(e,r,n){r&&this.nodeType===VS&&(r.target=this);var i=(e===BS||e===HS)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||this.nodeType==="Stage"&&!n);if(!i){this._fire(e,r);var o=(e===BS||e===HS)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(r&&!r.cancelBubble||!r)&&this.parent&&this.parent.isListening()&&!o&&(n&&n.parent?this._fireAndBubble.call(this.parent,e,r,n):this._fireAndBubble.call(this.parent,e,r))}}_getProtoListeners(e){var r,n,i;const o=(r=this._cache.get(tf))!==null&&r!==void 0?r:{};let a=o==null?void 0:o[e];if(a===void 0){a=[];let s=Object.getPrototypeOf(this);for(;s;){const c=(i=(n=s.eventListeners)===null||n===void 0?void 0:n[e])!==null&&i!==void 0?i:[];a.push(...c),s=Object.getPrototypeOf(s)}o[e]=a,this._cache.set(tf,o)}return a}_fire(e,r){r=r||{},r.currentTarget=this,r.type=e;const n=this._getProtoListeners(e);if(n)for(var i=0;i<n.length;i++)n[i].handler.call(this,r);const o=this.eventListeners[e];if(o)for(var i=0;i<o.length;i++)o[i].handler.call(this,r)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(e){var r=e?e.pointerId:void 0,n=this.getStage(),i=this.getAbsolutePosition();if(n){var o=n._getPointerById(r)||n._changedPointerPositions[0]||i;zi.DD._dragElements.set(this._id,{node:this,startPointerPos:o,offset:{x:o.x-i.x,y:o.y-i.y},dragStatus:"ready",pointerId:r})}}startDrag(e,r=!0){zi.DD._dragElements.has(this._id)||this._createDragElement(e);const n=zi.DD._dragElements.get(this._id);n.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:e&&e.evt},r)}_setDragPosition(e,r){const n=this.getStage()._getPointerById(r.pointerId);if(n){var i={x:n.x-r.offset.x,y:n.y-r.offset.y},o=this.dragBoundFunc();if(o!==void 0){const a=o.call(this,i,e);a?i=a:Et.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!==i.x||this._lastPos.y!==i.y)&&(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(e){const r=zi.DD._dragElements.get(this._id);r&&(r.dragStatus="stopped"),zi.DD._endDragBefore(e),zi.DD._endDragAfter(e)}setDraggable(e){this._setAttr("draggable",e),this._dragChange()}isDragging(){const e=zi.DD._dragElements.get(this._id);return e?e.dragStatus==="dragging":!1}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(e){var r=e.evt.button!==void 0,n=!r||is.Konva.dragButtons.indexOf(e.evt.button)>=0;if(n&&!this.isDragging()){var i=!1;zi.DD._dragElements.forEach(o=>{this.isAncestorOf(o.node)&&(i=!0)}),i||this._createDragElement(e)}})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var e=this.getStage();if(!e)return;const r=zi.DD._dragElements.get(this._id),n=r&&r.dragStatus==="dragging",i=r&&r.dragStatus==="ready";n?this.stopDrag():i&&zi.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const r=this.getStage();if(!r)return!1;const n={x:-e.x,y:-e.y,width:r.width()+2*e.x,height:r.height()+2*e.y};return Et.Util.haveIntersection(n,this.getClientRect())}static create(e,r){return Et.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,r)}static _createNode(e,r){var n=Ze.prototype.getClassName.call(e),i=e.children,o,a,s;r&&(e.attrs.container=r),is.Konva[n]||(Et.Util.warn('Can not find a node with class name "'+n+'". Fallback to "Shape".'),n="Shape");const c=is.Konva[n];if(o=new c(e.attrs),i)for(a=i.length,s=0;s<a;s++)o.add(Ze._createNode(i[s]));return o}}pr.Node=Ze;Ze.prototype.nodeType="Node";Ze.prototype._attrsAffectingSize=[];Ze.prototype.eventListeners={};Ze.prototype.on.call(Ze.prototype,DH,function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(ls),this._clearSelfAndDescendantCache(va)});Ze.prototype.on.call(Ze.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(Wv)});Ze.prototype.on.call(Ze.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(Uv)});Ze.prototype.on.call(Ze.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(Uf)});const er=kh.Factory.addGetterSetter;er(Ze,"zIndex");er(Ze,"absolutePosition");er(Ze,"position");er(Ze,"x",0,(0,Fr.getNumberValidator)());er(Ze,"y",0,(0,Fr.getNumberValidator)());er(Ze,"globalCompositeOperation","source-over",(0,Fr.getStringValidator)());er(Ze,"opacity",1,(0,Fr.getNumberValidator)());er(Ze,"name","",(0,Fr.getStringValidator)());er(Ze,"id","",(0,Fr.getStringValidator)());er(Ze,"rotation",0,(0,Fr.getNumberValidator)());kh.Factory.addComponentsGetterSetter(Ze,"scale",["x","y"]);er(Ze,"scaleX",1,(0,Fr.getNumberValidator)());er(Ze,"scaleY",1,(0,Fr.getNumberValidator)());kh.Factory.addComponentsGetterSetter(Ze,"skew",["x","y"]);er(Ze,"skewX",0,(0,Fr.getNumberValidator)());er(Ze,"skewY",0,(0,Fr.getNumberValidator)());kh.Factory.addComponentsGetterSetter(Ze,"offset",["x","y"]);er(Ze,"offsetX",0,(0,Fr.getNumberValidator)());er(Ze,"offsetY",0,(0,Fr.getNumberValidator)());er(Ze,"dragDistance",null,(0,Fr.getNumberValidator)());er(Ze,"width",0,(0,Fr.getNumberValidator)());er(Ze,"height",0,(0,Fr.getNumberValidator)());er(Ze,"listening",!0,(0,Fr.getBooleanValidator)());er(Ze,"preventDefault",!0,(0,Fr.getBooleanValidator)());er(Ze,"filters",null,function(t){return this._filterUpToDate=!1,t});er(Ze,"visible",!0,(0,Fr.getBooleanValidator)());er(Ze,"transformsEnabled","all",(0,Fr.getStringValidator)());er(Ze,"size");er(Ze,"dragBoundFunc");er(Ze,"draggable",!1,(0,Fr.getBooleanValidator)());kh.Factory.backCompat(Ze,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});var uc={};Object.defineProperty(uc,"__esModule",{value:!0});uc.Container=void 0;const gd=ot,K4=pr,kg=Be;let dc=class extends K4.Node{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const r=this.children||[];var n=[];return r.forEach(function(i){e(i)&&n.push(i)}),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(e=>{e.parent=null,e.index=0,e.destroy()}),this.children=[],this._requestDraw(),this}add(...e){if(e.length===0)return this;if(e.length>1){for(var r=0;r<e.length;r++)this.add(e[r]);return this}const n=e[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(e){return this._generalFind(e,!1)}findOne(e){var r=this._generalFind(e,!0);return r.length>0?r[0]:void 0}_generalFind(e,r){var n=[];return this._descendants(i=>{const o=i._isMatch(e);return o&&n.push(i),!!(o&&r)}),n}_descendants(e){let r=!1;const n=this.getChildren();for(const i of n){if(r=e(i),r)return!0;if(i.hasChildren()&&(r=i._descendants(e),r))return!0}return!1}toObject(){var e=K4.Node.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach(r=>{e.children.push(r.toObject())}),e}isAncestorOf(e){for(var r=e.getParent();r;){if(r._id===this._id)return!0;r=r.getParent()}return!1}clone(e){var r=K4.Node.prototype.clone.call(this,e);return this.getChildren().forEach(function(n){r.add(n.clone())}),r}getAllIntersections(e){var r=[];return this.find("Shape").forEach(n=>{n.isVisible()&&n.intersects(e)&&r.push(n)}),r}_clearSelfAndDescendantCache(e){var r;super._clearSelfAndDescendantCache(e),!this.isCached()&&((r=this.children)===null||r===void 0||r.forEach(function(n){n._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;(e=this.children)===null||e===void 0||e.forEach(function(r,n){r.index=n}),this._requestDraw()}drawScene(e,r,n){var i=this.getLayer(),o=e||i&&i.getCanvas(),a=o&&o.getContext(),s=this._getCanvasCache(),c=s&&s.scene,d=o&&o.isCache;if(!this.isVisible()&&!d)return this;if(c){a.save();var h=this.getAbsoluteTransform(r).getMatrix();a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren("drawScene",o,r,n);return this}drawHit(e,r){if(!this.shouldDrawHit(r))return this;var n=this.getLayer(),i=e||n&&n.hitCanvas,o=i&&i.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){o.save();var c=this.getAbsoluteTransform(r).getMatrix();o.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",i,r);return this}_drawChildren(e,r,n,i){var o,a=r&&r.getContext(),s=this.clipWidth(),c=this.clipHeight(),d=this.clipFunc(),h=typeof s=="number"&&typeof c=="number"||d;const C=n===this;if(h){a.save();var v=this.getAbsoluteTransform(n),g=v.getMatrix();a.transform(g[0],g[1],g[2],g[3],g[4],g[5]),a.beginPath();let b;if(d)b=d.call(this,a,this);else{var m=this.clipX(),w=this.clipY();a.rect(m||0,w||0,s,c)}a.clip.apply(a,b),g=v.copy().invert().getMatrix(),a.transform(g[0],g[1],g[2],g[3],g[4],g[5])}var x=!C&&this.globalCompositeOperation()!=="source-over"&&e==="drawScene";x&&(a.save(),a._applyGlobalCompositeOperation(this)),(o=this.children)===null||o===void 0||o.forEach(function(b){b[e](r,n,i)}),x&&a.restore(),h&&a.restore()}getClientRect(e={}){var r,n=e.skipTransform,i=e.relativeTo,o,a,s,c,d={x:1/0,y:1/0,width:0,height:0},h=this;(r=this.children)===null||r===void 0||r.forEach(function(w){if(w.visible()){var x=w.getClientRect({relativeTo:h,skipShadow:e.skipShadow,skipStroke:e.skipStroke});x.width===0&&x.height===0||(o===void 0?(o=x.x,a=x.y,s=x.x+x.width,c=x.y+x.height):(o=Math.min(o,x.x),a=Math.min(a,x.y),s=Math.max(s,x.x+x.width),c=Math.max(c,x.y+x.height)))}});for(var C=this.find("Shape"),v=!1,g=0;g<C.length;g++){var m=C[g];if(m._isVisible(this)){v=!0;break}}return v&&o!==void 0?d={x:o,y:a,width:s-o,height:c-a}:d={x:0,y:0,width:0,height:0},n?d:this._transformedRect(d,i)}};uc.Container=dc;gd.Factory.addComponentsGetterSetter(dc,"clip",["x","y","width","height"]);gd.Factory.addGetterSetter(dc,"clipX",void 0,(0,kg.getNumberValidator)());gd.Factory.addGetterSetter(dc,"clipY",void 0,(0,kg.getNumberValidator)());gd.Factory.addGetterSetter(dc,"clipWidth",void 0,(0,kg.getNumberValidator)());gd.Factory.addGetterSetter(dc,"clipHeight",void 0,(0,kg.getNumberValidator)());gd.Factory.addGetterSetter(dc,"clipFunc");var ST={},wi={};Object.defineProperty(wi,"__esModule",{value:!0});wi.releaseCapture=wi.setPointerCapture=wi.hasPointerCapture=wi.createEvent=wi.getCapturedShape=void 0;const zH=Ct,uh=new Map,bT=zH.Konva._global.PointerEvent!==void 0;function $H(t){return uh.get(t)}wi.getCapturedShape=$H;function G8(t){return{evt:t,pointerId:t.pointerId}}wi.createEvent=G8;function BH(t,e){return uh.get(t)===e}wi.hasPointerCapture=BH;function HH(t,e){_T(t),e.getStage()&&(uh.set(t,e),bT&&e._fire("gotpointercapture",G8(new PointerEvent("gotpointercapture"))))}wi.setPointerCapture=HH;function _T(t,e){const r=uh.get(t);if(!r)return;const n=r.getStage();n&&n.content,uh.delete(t),bT&&r._fire("lostpointercapture",G8(new PointerEvent("lostpointercapture")))}wi.releaseCapture=_T;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Stage=t.stages=void 0;const e=Pr,r=ot,n=uc,i=Ct,o=vo,a=Pg,s=Ct,c=wi;var d="Stage",h="string",C="px",v="mouseout",g="mouseleave",m="mouseover",w="mouseenter",x="mousemove",b="mousedown",O="mouseup",f="pointermove",S="pointerdown",E="pointerup",I="pointercancel",R="lostpointercapture",k="pointerout",N="pointerleave",T="pointerover",D="pointerenter",z="contextmenu",B="touchstart",Y="touchend",W="touchmove",q="touchcancel",ee="wheel",K=5,ue=[[w,"_pointerenter"],[b,"_pointerdown"],[x,"_pointermove"],[O,"_pointerup"],[g,"_pointerleave"],[B,"_pointerdown"],[W,"_pointermove"],[Y,"_pointerup"],[q,"_pointercancel"],[m,"_pointerover"],[ee,"_wheel"],[z,"_contextmenu"],[S,"_pointerdown"],[f,"_pointermove"],[E,"_pointerup"],[I,"_pointercancel"],[R,"_lostpointercapture"]];const ne={mouse:{[k]:v,[N]:g,[T]:m,[D]:w,[f]:x,[S]:b,[E]:O,[I]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[k]:"touchout",[N]:"touchleave",[T]:"touchover",[D]:"touchenter",[f]:W,[S]:B,[E]:Y,[I]:q,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[k]:k,[N]:N,[T]:T,[D]:D,[f]:f,[S]:S,[E]:E,[I]:I,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},ae=U=>U.indexOf("pointer")>=0?"pointer":U.indexOf("touch")>=0?"touch":"mouse",J=U=>{const F=ae(U);if(F==="pointer")return i.Konva.pointerEventsEnabled&&ne.pointer;if(F==="touch")return ne.touch;if(F==="mouse")return ne.mouse};function Q(U={}){return(U.clipFunc||U.clipWidth||U.clipHeight)&&e.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),U}const te="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);";t.stages=[];class we extends n.Container{constructor(F){super(Q(F)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),t.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",()=>{Q(this.attrs)}),this._checkVisibility()}_validateAdd(F){const $=F.getType()==="Layer",ie=F.getType()==="FastLayer";$||ie||e.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const F=this.visible()?"":"none";this.content.style.display=F}setContainer(F){if(typeof F===h){if(F.charAt(0)==="."){var $=F.slice(1);F=document.getElementsByClassName($)[0]}else{var ie;F.charAt(0)!=="#"?ie=F:ie=F.slice(1),F=document.getElementById(ie)}if(!F)throw"Can not find container in document with id "+ie}return this._setAttr("container",F),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),F.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var F=this.children,$=F.length,ie;for(ie=0;ie<$;ie++)F[ie].clear();return this}clone(F){return F||(F={}),F.container=typeof document<"u"&&document.createElement("div"),n.Container.prototype.clone.call(this,F)}destroy(){super.destroy();var F=this.content;F&&e.Util._isInDocument(F)&&this.container().removeChild(F);var $=t.stages.indexOf(this);return $>-1&&t.stages.splice($,1),e.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const F=this._pointerPositions[0]||this._changedPointerPositions[0];return F?{x:F.x,y:F.y}:(e.Util.warn(te),null)}_getPointerById(F){return this._pointerPositions.find($=>$.id===F)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(F){F=F||{},F.x=F.x||0,F.y=F.y||0,F.width=F.width||this.width(),F.height=F.height||this.height();var $=new o.SceneCanvas({width:F.width,height:F.height,pixelRatio:F.pixelRatio||1}),ie=$.getContext()._context,pe=this.children;return(F.x||F.y)&&ie.translate(-1*F.x,-1*F.y),pe.forEach(function(ce){if(ce.isVisible()){var le=ce._toKonvaCanvas(F);ie.drawImage(le._canvas,F.x,F.y,le.getWidth()/le.getPixelRatio(),le.getHeight()/le.getPixelRatio())}}),$}getIntersection(F){if(!F)return null;var $=this.children,ie=$.length,pe=ie-1,ce;for(ce=pe;ce>=0;ce--){const le=$[ce].getIntersection(F);if(le)return le}return null}_resizeDOM(){var F=this.width(),$=this.height();this.content&&(this.content.style.width=F+C,this.content.style.height=$+C),this.bufferCanvas.setSize(F,$),this.bufferHitCanvas.setSize(F,$),this.children.forEach(ie=>{ie.setSize({width:F,height:$}),ie.draw()})}add(F,...$){if(arguments.length>1){for(var ie=0;ie<arguments.length;ie++)this.add(arguments[ie]);return this}super.add(F);var pe=this.children.length;return pe>K&&e.Util.warn("The stage has "+pe+" 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."),F.setSize({width:this.width(),height:this.height()}),F.draw(),i.Konva.isBrowser&&this.content.appendChild(F.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(F){return c.hasPointerCapture(F,this)}setPointerCapture(F){c.setPointerCapture(F,this)}releaseCapture(F){c.releaseCapture(F,this)}getLayers(){return this.children}_bindContentEvents(){i.Konva.isBrowser&&ue.forEach(([F,$])=>{this.content.addEventListener(F,ie=>{this[$](ie)},{passive:!1})})}_pointerenter(F){this.setPointersPositions(F);const $=J(F.type);$&&this._fire($.pointerenter,{evt:F,target:this,currentTarget:this})}_pointerover(F){this.setPointersPositions(F);const $=J(F.type);$&&this._fire($.pointerover,{evt:F,target:this,currentTarget:this})}_getTargetShape(F){let $=this[F+"targetShape"];return $&&!$.getStage()&&($=null),$}_pointerleave(F){const $=J(F.type),ie=ae(F.type);if($){this.setPointersPositions(F);var pe=this._getTargetShape(ie),ce=!(i.Konva.isDragging()||i.Konva.isTransforming())||i.Konva.hitOnDragEnabled;pe&&ce?(pe._fireAndBubble($.pointerout,{evt:F}),pe._fireAndBubble($.pointerleave,{evt:F}),this._fire($.pointerleave,{evt:F,target:this,currentTarget:this}),this[ie+"targetShape"]=null):ce&&(this._fire($.pointerleave,{evt:F,target:this,currentTarget:this}),this._fire($.pointerout,{evt:F,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(F){const $=J(F.type),ie=ae(F.type);if($){this.setPointersPositions(F);var pe=!1;this._changedPointerPositions.forEach(ce=>{var le=this.getIntersection(ce);if(a.DD.justDragged=!1,i.Konva["_"+ie+"ListenClick"]=!0,!le||!le.isListening())return;i.Konva.capturePointerEventsEnabled&&le.setPointerCapture(ce.id),this[ie+"ClickStartShape"]=le,le._fireAndBubble($.pointerdown,{evt:F,pointerId:ce.id}),pe=!0;const xe=F.type.indexOf("touch")>=0;le.preventDefault()&&F.cancelable&&xe&&F.preventDefault()}),pe||this._fire($.pointerdown,{evt:F,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(F){const $=J(F.type),ie=ae(F.type);if(!$)return;i.Konva.isDragging()&&a.DD.node.preventDefault()&&F.cancelable&&F.preventDefault(),this.setPointersPositions(F);var pe=!(i.Konva.isDragging()||i.Konva.isTransforming())||i.Konva.hitOnDragEnabled;if(!pe)return;var ce={};let le=!1;var xe=this._getTargetShape(ie);this._changedPointerPositions.forEach(Ne=>{const _e=c.getCapturedShape(Ne.id)||this.getIntersection(Ne),He=Ne.id,Ee={evt:F,pointerId:He};var Ve=xe!==_e;if(Ve&&xe&&(xe._fireAndBubble($.pointerout,{...Ee},_e),xe._fireAndBubble($.pointerleave,{...Ee},_e)),_e){if(ce[_e._id])return;ce[_e._id]=!0}_e&&_e.isListening()?(le=!0,Ve&&(_e._fireAndBubble($.pointerover,{...Ee},xe),_e._fireAndBubble($.pointerenter,{...Ee},xe),this[ie+"targetShape"]=_e),_e._fireAndBubble($.pointermove,{...Ee})):xe&&(this._fire($.pointerover,{evt:F,target:this,currentTarget:this,pointerId:He}),this[ie+"targetShape"]=null)}),le||this._fire($.pointermove,{evt:F,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(F){const $=J(F.type),ie=ae(F.type);if(!$)return;this.setPointersPositions(F);const pe=this[ie+"ClickStartShape"],ce=this[ie+"ClickEndShape"];var le={};let xe=!1;this._changedPointerPositions.forEach(Ne=>{const _e=c.getCapturedShape(Ne.id)||this.getIntersection(Ne);if(_e){if(_e.releaseCapture(Ne.id),le[_e._id])return;le[_e._id]=!0}const He=Ne.id,Ee={evt:F,pointerId:He};let Ve=!1;i.Konva["_"+ie+"InDblClickWindow"]?(Ve=!0,clearTimeout(this[ie+"DblTimeout"])):a.DD.justDragged||(i.Konva["_"+ie+"InDblClickWindow"]=!0,clearTimeout(this[ie+"DblTimeout"])),this[ie+"DblTimeout"]=setTimeout(function(){i.Konva["_"+ie+"InDblClickWindow"]=!1},i.Konva.dblClickWindow),_e&&_e.isListening()?(xe=!0,this[ie+"ClickEndShape"]=_e,_e._fireAndBubble($.pointerup,{...Ee}),i.Konva["_"+ie+"ListenClick"]&&pe&&pe===_e&&(_e._fireAndBubble($.pointerclick,{...Ee}),Ve&&ce&&ce===_e&&_e._fireAndBubble($.pointerdblclick,{...Ee}))):(this[ie+"ClickEndShape"]=null,i.Konva["_"+ie+"ListenClick"]&&this._fire($.pointerclick,{evt:F,target:this,currentTarget:this,pointerId:He}),Ve&&this._fire($.pointerdblclick,{evt:F,target:this,currentTarget:this,pointerId:He}))}),xe||this._fire($.pointerup,{evt:F,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),i.Konva["_"+ie+"ListenClick"]=!1,F.cancelable&&ie!=="touch"&&F.preventDefault()}_contextmenu(F){this.setPointersPositions(F);var $=this.getIntersection(this.getPointerPosition());$&&$.isListening()?$._fireAndBubble(z,{evt:F}):this._fire(z,{evt:F,target:this,currentTarget:this})}_wheel(F){this.setPointersPositions(F);var $=this.getIntersection(this.getPointerPosition());$&&$.isListening()?$._fireAndBubble(ee,{evt:F}):this._fire(ee,{evt:F,target:this,currentTarget:this})}_pointercancel(F){this.setPointersPositions(F);const $=c.getCapturedShape(F.pointerId)||this.getIntersection(this.getPointerPosition());$&&$._fireAndBubble(E,c.createEvent(F)),c.releaseCapture(F.pointerId)}_lostpointercapture(F){c.releaseCapture(F.pointerId)}setPointersPositions(F){var $=this._getContentPosition(),ie=null,pe=null;F=F||window.event,F.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(F.touches,ce=>{this._pointerPositions.push({id:ce.identifier,x:(ce.clientX-$.left)/$.scaleX,y:(ce.clientY-$.top)/$.scaleY})}),Array.prototype.forEach.call(F.changedTouches||F.touches,ce=>{this._changedPointerPositions.push({id:ce.identifier,x:(ce.clientX-$.left)/$.scaleX,y:(ce.clientY-$.top)/$.scaleY})})):(ie=(F.clientX-$.left)/$.scaleX,pe=(F.clientY-$.top)/$.scaleY,this.pointerPos={x:ie,y:pe},this._pointerPositions=[{x:ie,y:pe,id:e.Util._getFirstPointerId(F)}],this._changedPointerPositions=[{x:ie,y:pe,id:e.Util._getFirstPointerId(F)}])}_setPointerPosition(F){e.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(F)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var F=this.content.getBoundingClientRect();return{top:F.top,left:F.left,scaleX:F.width/this.content.clientWidth||1,scaleY:F.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new o.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new o.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!!i.Konva.isBrowser){var F=this.container();if(!F)throw"Stage has no container. A container is required.";F.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"),F.appendChild(this.content),this._resizeDOM()}}cache(){return e.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(F){F.batchDraw()}),this}}t.Stage=we,we.prototype.nodeType=d,(0,s._registerNode)(we),r.Factory.addGetterSetter(we,"container")})(ST);var Th={},tn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Shape=t.shapes=void 0;const e=Ct,r=Pr,n=ot,i=pr,o=Be,a=Ct,s=wi;var c="hasShadow",d="shadowRGBA",h="patternImage",C="linearGradient",v="radialGradient";let g;function m(){return g||(g=r.Util.createCanvasElement().getContext("2d"),g)}t.shapes={};function w(N){const T=this.attrs.fillRule;T?N.fill(T):N.fill()}function x(N){N.stroke()}function b(N){N.fill()}function O(N){N.stroke()}function f(){this._clearCache(c)}function S(){this._clearCache(d)}function E(){this._clearCache(h)}function I(){this._clearCache(C)}function R(){this._clearCache(v)}class k extends i.Node{constructor(T){super(T);let D;for(;D=r.Util.getRandomColor(),!(D&&!(D in t.shapes)););this.colorKey=D,t.shapes[D]=this}getContext(){return r.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return r.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(c,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(h,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var T=m();const D=T.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(D&&D.setTransform){const z=new r.Transform;z.translate(this.fillPatternX(),this.fillPatternY()),z.rotate(e.Konva.getAngle(this.fillPatternRotation())),z.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),z.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const B=z.getMatrix(),Y=typeof DOMMatrix>"u"?{a:B[0],b:B[1],c:B[2],d:B[3],e:B[4],f:B[5]}:new DOMMatrix(B);D.setTransform(Y)}return D}}_getLinearGradient(){return this._getCache(C,this.__getLinearGradient)}__getLinearGradient(){var T=this.fillLinearGradientColorStops();if(T){for(var D=m(),z=this.fillLinearGradientStartPoint(),B=this.fillLinearGradientEndPoint(),Y=D.createLinearGradient(z.x,z.y,B.x,B.y),W=0;W<T.length;W+=2)Y.addColorStop(T[W],T[W+1]);return Y}}_getRadialGradient(){return this._getCache(v,this.__getRadialGradient)}__getRadialGradient(){var T=this.fillRadialGradientColorStops();if(T){for(var D=m(),z=this.fillRadialGradientStartPoint(),B=this.fillRadialGradientEndPoint(),Y=D.createRadialGradient(z.x,z.y,this.fillRadialGradientStartRadius(),B.x,B.y,this.fillRadialGradientEndRadius()),W=0;W<T.length;W+=2)Y.addColorStop(T[W],T[W+1]);return Y}}getShadowRGBA(){return this._getCache(d,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var T=r.Util.colorToRGBA(this.shadowColor());if(T)return"rgba("+T.r+","+T.g+","+T.b+","+T.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 T=this.hitStrokeWidth();return T==="auto"?this.hasStroke():this.strokeEnabled()&&!!T}intersects(T){var D=this.getStage();if(!D)return!1;const z=D.bufferHitCanvas;return z.getContext().clear(),this.drawHit(z,void 0,!0),z.context.getImageData(Math.round(T.x),Math.round(T.y),1,1).data[3]>0}destroy(){return i.Node.prototype.destroy.call(this),delete t.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(T){var D;if(!((D=this.attrs.perfectDrawEnabled)!==null&&D!==void 0?D:!0))return!1;const B=T||this.hasFill(),Y=this.hasStroke(),W=this.getAbsoluteOpacity()!==1;if(B&&Y&&W)return!0;const q=this.hasShadow(),ee=this.shadowForStrokeEnabled();return!!(B&&Y&&q&&ee)}setStrokeHitEnabled(T){r.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),T?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){var T=this.size();return{x:this._centroid?-T.width/2:0,y:this._centroid?-T.height/2:0,width:T.width,height:T.height}}getClientRect(T={}){const D=T.skipTransform,z=T.relativeTo,B=this.getSelfRect(),W=!T.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,q=B.width+W,ee=B.height+W,K=!T.skipShadow&&this.hasShadow(),ue=K?this.shadowOffsetX():0,ne=K?this.shadowOffsetY():0,ae=q+Math.abs(ue),J=ee+Math.abs(ne),Q=K&&this.shadowBlur()||0,te=ae+Q*2,we=J+Q*2,U={width:te,height:we,x:-(W/2+Q)+Math.min(ue,0)+B.x,y:-(W/2+Q)+Math.min(ne,0)+B.y};return D?U:this._transformedRect(U,z)}drawScene(T,D,z){var B=this.getLayer(),Y=T||B.getCanvas(),W=Y.getContext(),q=this._getCanvasCache(),ee=this.getSceneFunc(),K=this.hasShadow(),ue,ne,ae=Y.isCache,J=D===this;if(!this.isVisible()&&!J)return this;if(q){W.save();var Q=this.getAbsoluteTransform(D).getMatrix();return W.transform(Q[0],Q[1],Q[2],Q[3],Q[4],Q[5]),this._drawCachedSceneCanvas(W),W.restore(),this}if(!ee)return this;if(W.save(),this._useBufferCanvas()&&!ae){ue=this.getStage();const U=z||ue.bufferCanvas;ne=U.getContext(),ne.clear(),ne.save(),ne._applyLineJoin(this);var te=this.getAbsoluteTransform(D).getMatrix();ne.transform(te[0],te[1],te[2],te[3],te[4],te[5]),ee.call(this,ne,this),ne.restore();var we=U.pixelRatio;K&&W._applyShadow(this),W._applyOpacity(this),W._applyGlobalCompositeOperation(this),W.drawImage(U._canvas,0,0,U.width/we,U.height/we)}else{if(W._applyLineJoin(this),!J){var te=this.getAbsoluteTransform(D).getMatrix();W.transform(te[0],te[1],te[2],te[3],te[4],te[5]),W._applyOpacity(this),W._applyGlobalCompositeOperation(this)}K&&W._applyShadow(this),ee.call(this,W,this)}return W.restore(),this}drawHit(T,D,z=!1){if(!this.shouldDrawHit(D,z))return this;var B=this.getLayer(),Y=T||B.hitCanvas,W=Y&&Y.getContext(),q=this.hitFunc()||this.sceneFunc(),ee=this._getCanvasCache(),K=ee&&ee.hit;if(this.colorKey||r.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()"),K){W.save();var ue=this.getAbsoluteTransform(D).getMatrix();return W.transform(ue[0],ue[1],ue[2],ue[3],ue[4],ue[5]),this._drawCachedHitCanvas(W),W.restore(),this}if(!q)return this;if(W.save(),W._applyLineJoin(this),!(this===D)){var ae=this.getAbsoluteTransform(D).getMatrix();W.transform(ae[0],ae[1],ae[2],ae[3],ae[4],ae[5])}return q.call(this,W,this),W.restore(),this}drawHitFromCache(T=0){var D=this._getCanvasCache(),z=this._getCachedSceneCanvas(),B=D.hit,Y=B.getContext(),W=B.getWidth(),q=B.getHeight(),ee,K,ue,ne,ae,J;Y.clear(),Y.drawImage(z._canvas,0,0,W,q);try{for(ee=Y.getImageData(0,0,W,q),K=ee.data,ue=K.length,ne=r.Util._hexToRgb(this.colorKey),ae=0;ae<ue;ae+=4)J=K[ae+3],J>T?(K[ae]=ne.r,K[ae+1]=ne.g,K[ae+2]=ne.b,K[ae+3]=255):K[ae+3]=0;Y.putImageData(ee,0,0)}catch(Q){r.Util.error("Unable to draw hit graph from cached scene canvas. "+Q.message)}return this}hasPointerCapture(T){return s.hasPointerCapture(T,this)}setPointerCapture(T){s.setPointerCapture(T,this)}releaseCapture(T){s.releaseCapture(T,this)}}t.Shape=k,k.prototype._fillFunc=w,k.prototype._strokeFunc=x,k.prototype._fillFuncHit=b,k.prototype._strokeFuncHit=O,k.prototype._centroid=!1,k.prototype.nodeType="Shape",(0,a._registerNode)(k),k.prototype.eventListeners={},k.prototype.on.call(k.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",f),k.prototype.on.call(k.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",S),k.prototype.on.call(k.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",E),k.prototype.on.call(k.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",I),k.prototype.on.call(k.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",R),n.Factory.addGetterSetter(k,"stroke",void 0,(0,o.getStringOrGradientValidator)()),n.Factory.addGetterSetter(k,"strokeWidth",2,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillAfterStrokeEnabled",!1),n.Factory.addGetterSetter(k,"hitStrokeWidth","auto",(0,o.getNumberOrAutoValidator)()),n.Factory.addGetterSetter(k,"strokeHitEnabled",!0,(0,o.getBooleanValidator)()),n.Factory.addGetterSetter(k,"perfectDrawEnabled",!0,(0,o.getBooleanValidator)()),n.Factory.addGetterSetter(k,"shadowForStrokeEnabled",!0,(0,o.getBooleanValidator)()),n.Factory.addGetterSetter(k,"lineJoin"),n.Factory.addGetterSetter(k,"lineCap"),n.Factory.addGetterSetter(k,"sceneFunc"),n.Factory.addGetterSetter(k,"hitFunc"),n.Factory.addGetterSetter(k,"dash"),n.Factory.addGetterSetter(k,"dashOffset",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"shadowColor",void 0,(0,o.getStringValidator)()),n.Factory.addGetterSetter(k,"shadowBlur",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"shadowOpacity",1,(0,o.getNumberValidator)()),n.Factory.addComponentsGetterSetter(k,"shadowOffset",["x","y"]),n.Factory.addGetterSetter(k,"shadowOffsetX",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"shadowOffsetY",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillPatternImage"),n.Factory.addGetterSetter(k,"fill",void 0,(0,o.getStringOrGradientValidator)()),n.Factory.addGetterSetter(k,"fillPatternX",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillPatternY",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillLinearGradientColorStops"),n.Factory.addGetterSetter(k,"strokeLinearGradientColorStops"),n.Factory.addGetterSetter(k,"fillRadialGradientStartRadius",0),n.Factory.addGetterSetter(k,"fillRadialGradientEndRadius",0),n.Factory.addGetterSetter(k,"fillRadialGradientColorStops"),n.Factory.addGetterSetter(k,"fillPatternRepeat","repeat"),n.Factory.addGetterSetter(k,"fillEnabled",!0),n.Factory.addGetterSetter(k,"strokeEnabled",!0),n.Factory.addGetterSetter(k,"shadowEnabled",!0),n.Factory.addGetterSetter(k,"dashEnabled",!0),n.Factory.addGetterSetter(k,"strokeScaleEnabled",!0),n.Factory.addGetterSetter(k,"fillPriority","color"),n.Factory.addComponentsGetterSetter(k,"fillPatternOffset",["x","y"]),n.Factory.addGetterSetter(k,"fillPatternOffsetX",0,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillPatternOffsetY",0,(0,o.getNumberValidator)()),n.Factory.addComponentsGetterSetter(k,"fillPatternScale",["x","y"]),n.Factory.addGetterSetter(k,"fillPatternScaleX",1,(0,o.getNumberValidator)()),n.Factory.addGetterSetter(k,"fillPatternScaleY",1,(0,o.getNumberValidator)()),n.Factory.addComponentsGetterSetter(k,"fillLinearGradientStartPoint",["x","y"]),n.Factory.addComponentsGetterSetter(k,"strokeLinearGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(k,"fillLinearGradientStartPointX",0),n.Factory.addGetterSetter(k,"strokeLinearGradientStartPointX",0),n.Factory.addGetterSetter(k,"fillLinearGradientStartPointY",0),n.Factory.addGetterSetter(k,"strokeLinearGradientStartPointY",0),n.Factory.addComponentsGetterSetter(k,"fillLinearGradientEndPoint",["x","y"]),n.Factory.addComponentsGetterSetter(k,"strokeLinearGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(k,"fillLinearGradientEndPointX",0),n.Factory.addGetterSetter(k,"strokeLinearGradientEndPointX",0),n.Factory.addGetterSetter(k,"fillLinearGradientEndPointY",0),n.Factory.addGetterSetter(k,"strokeLinearGradientEndPointY",0),n.Factory.addComponentsGetterSetter(k,"fillRadialGradientStartPoint",["x","y"]),n.Factory.addGetterSetter(k,"fillRadialGradientStartPointX",0),n.Factory.addGetterSetter(k,"fillRadialGradientStartPointY",0),n.Factory.addComponentsGetterSetter(k,"fillRadialGradientEndPoint",["x","y"]),n.Factory.addGetterSetter(k,"fillRadialGradientEndPointX",0),n.Factory.addGetterSetter(k,"fillRadialGradientEndPointY",0),n.Factory.addGetterSetter(k,"fillPatternRotation",0),n.Factory.addGetterSetter(k,"fillRule",void 0,(0,o.getStringValidator)()),n.Factory.backCompat(k,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})})(tn);Object.defineProperty(Th,"__esModule",{value:!0});Th.Layer=void 0;const da=Pr,Y4=uc,Xc=pr,V8=ot,WS=vo,GH=Be,VH=tn,UH=Ct;var WH="#",XH="beforeDraw",KH="draw",xT=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],YH=xT.length;class md extends Y4.Container{constructor(e){super(e),this.canvas=new WS.SceneCanvas,this.hitCanvas=new WS.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(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var r=this.getStage();return r&&r.content&&(r.content.removeChild(this.getNativeCanvasElement()),e<r.children.length-1?r.content.insertBefore(this.getNativeCanvasElement(),r.children[e+1].getCanvas()._canvas):r.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Xc.Node.prototype.moveToTop.call(this);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var e=Xc.Node.prototype.moveUp.call(this);if(!e)return!1;var r=this.getStage();return!r||!r.content?!1:(r.content.removeChild(this.getNativeCanvasElement()),this.index<r.children.length-1?r.content.insertBefore(this.getNativeCanvasElement(),r.children[this.index+1].getCanvas()._canvas):r.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Xc.Node.prototype.moveDown.call(this)){var e=this.getStage();if(e){var r=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),r[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Xc.Node.prototype.moveToBottom.call(this)){var e=this.getStage();if(e){var r=e.children;e.content&&(e.content.removeChild(this.getNativeCanvasElement()),e.content.insertBefore(this.getNativeCanvasElement(),r[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var e=this.getNativeCanvasElement();return Xc.Node.prototype.remove.call(this),e&&e.parentNode&&da.Util._isInDocument(e)&&e.parentNode.removeChild(e),this}getStage(){return this.parent}setSize({width:e,height:r}){return this.canvas.setSize(e,r),this.hitCanvas.setSize(e,r),this._setSmoothEnabled(),this}_validateAdd(e){var r=e.getType();r!=="Group"&&r!=="Shape"&&da.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(e){return e=e||{},e.width=e.width||this.getWidth(),e.height=e.height||this.getHeight(),e.x=e.x!==void 0?e.x:this.x(),e.y=e.y!==void 0?e.y:this.y(),Xc.Node.prototype._toKonvaCanvas.call(this,e)}_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(){da.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){da.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,da.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var r=1,n=!1;;){for(let i=0;i<YH;i++){const o=xT[i],a=this._getIntersection({x:e.x+o.x*r,y:e.y+o.y*r}),s=a.shape;if(s)return s;if(n=!!a.antialiased,!a.antialiased)break}if(n)r+=1;else return null}}_getIntersection(e){const r=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(e.x*r),Math.round(e.y*r),1,1).data,i=n[3];if(i===255){const o=da.Util._rgbToHex(n[0],n[1],n[2]),a=VH.shapes[WH+o];return a?{shape:a}:{antialiased:!0}}else if(i>0)return{antialiased:!0};return{}}drawScene(e,r){var n=this.getLayer(),i=e||n&&n.getCanvas();return this._fire(XH,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Y4.Container.prototype.drawScene.call(this,i,r),this._fire(KH,{node:this}),this}drawHit(e,r){var n=this.getLayer(),i=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),Y4.Container.prototype.drawHit.call(this,i,r),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){da.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return da.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!(!this.parent||!this.parent.content)){var e=this.parent,r=!!this.hitCanvas._canvas.parentNode;r?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return da.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Th.Layer=md;md.prototype.nodeType="Layer";(0,UH._registerNode)(md);V8.Factory.addGetterSetter(md,"imageSmoothingEnabled",!0);V8.Factory.addGetterSetter(md,"clearBeforeDraw",!0);V8.Factory.addGetterSetter(md,"hitGraphEnabled",!0,(0,GH.getBooleanValidator)());var Tg={};Object.defineProperty(Tg,"__esModule",{value:!0});Tg.FastLayer=void 0;const ZH=Pr,qH=Th,QH=Ct;class U8 extends qH.Layer{constructor(e){super(e),this.listening(!1),ZH.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Tg.FastLayer=U8;U8.prototype.nodeType="FastLayer";(0,QH._registerNode)(U8);var vd={};Object.defineProperty(vd,"__esModule",{value:!0});vd.Group=void 0;const JH=Pr,eG=uc,tG=Ct;class W8 extends eG.Container{_validateAdd(e){var r=e.getType();r!=="Group"&&r!=="Shape"&&JH.Util.throw("You may only add groups and shapes to groups.")}}vd.Group=W8;W8.prototype.nodeType="Group";(0,tG._registerNode)(W8);var yd={};Object.defineProperty(yd,"__esModule",{value:!0});yd.Animation=void 0;const Z4=Ct,XS=Pr,q4=function(){return Z4.glob.performance&&Z4.glob.performance.now?function(){return Z4.glob.performance.now()}:function(){return new Date().getTime()}}();class Ho{constructor(e,r){this.id=Ho.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:q4(),frameRate:0},this.func=e,this.setLayers(r)}setLayers(e){let r=[];return e&&(r=Array.isArray(e)?e:[e]),this.layers=r,this}getLayers(){return this.layers}addLayer(e){const r=this.layers,n=r.length;for(let i=0;i<n;i++)if(r[i]._id===e._id)return!1;return this.layers.push(e),!0}isRunning(){const r=Ho.animations,n=r.length;for(let i=0;i<n;i++)if(r[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=q4(),Ho._addAnimation(this),this}stop(){return Ho._removeAnimation(this),this}_updateFrameObject(e){this.frame.timeDiff=e-this.frame.lastTime,this.frame.lastTime=e,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(e){this.animations.push(e),this._handleAnimation()}static _removeAnimation(e){const r=e.id,n=this.animations,i=n.length;for(let o=0;o<i;o++)if(n[o].id===r){this.animations.splice(o,1);break}}static _runFrames(){const e={},r=this.animations;for(let n=0;n<r.length;n++){const i=r[n],o=i.layers,a=i.func;i._updateFrameObject(q4());const s=o.length;let c;if(a?c=a.call(i,i.frame)!==!1:c=!0,!!c)for(let d=0;d<s;d++){const h=o[d];h._id!==void 0&&(e[h._id]=h)}}for(let n in e)e.hasOwnProperty(n)&&e[n].batchDraw()}static _animationLoop(){const e=Ho;e.animations.length?(e._runFrames(),XS.Util.requestAnimFrame(e._animationLoop)):e.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,XS.Util.requestAnimFrame(this._animationLoop))}}yd.Animation=Ho;Ho.animations=[];Ho.animIdCounter=0;Ho.animRunning=!1;var ET={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Easings=t.Tween=void 0;const e=Pr,r=yd,n=pr,i=Ct;var o={node:1,duration:1,easing:1,onFinish:1,yoyo:1},a=1,s=2,c=3,d=0,h=["fill","stroke","shadowColor"];class C{constructor(m,w,x,b,O,f,S){this.prop=m,this.propFunc=w,this.begin=b,this._pos=b,this.duration=f,this._change=0,this.prevPos=0,this.yoyo=S,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=x,this._change=O-this.begin,this.pause()}fire(m){var w=this[m];w&&w()}setTime(m){m>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():m<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=m,this.update())}getTime(){return this._time}setPosition(m){this.prevPos=this._pos,this.propFunc(m),this._pos=m}getPosition(m){return m===void 0&&(m=this._time),this.func(m,this.begin,this._change,this.duration)}play(){this.state=s,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=c,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(m){this.pause(),this._time=m,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(){var m=this.getTimer()-this._startTime;this.state===s?this.setTime(m):this.state===c&&this.setTime(this.duration-m)}pause(){this.state=a,this.fire("onPause")}getTimer(){return new Date().getTime()}}class v{constructor(m){var w=this,x=m.node,b=x._id,O,f=m.easing||t.Easings.Linear,S=!!m.yoyo,E;typeof m.duration>"u"?O=.3:m.duration===0?O=.001:O=m.duration,this.node=x,this._id=d++;var I=x.getLayer()||(x instanceof i.Konva.Stage?x.getLayers():null);I||e.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new r.Animation(function(){w.tween.onEnterFrame()},I),this.tween=new C(E,function(R){w._tweenFunc(R)},f,0,1,O*1e3,S),this._addListeners(),v.attrs[b]||(v.attrs[b]={}),v.attrs[b][this._id]||(v.attrs[b][this._id]={}),v.tweens[b]||(v.tweens[b]={});for(E in m)o[E]===void 0&&this._addAttr(E,m[E]);this.reset(),this.onFinish=m.onFinish,this.onReset=m.onReset,this.onUpdate=m.onUpdate}_addAttr(m,w){var x=this.node,b=x._id,O,f,S,E,I,R,k,N;if(S=v.tweens[b][m],S&&delete v.attrs[b][S][m],O=x.getAttr(m),e.Util._isArray(w))if(f=[],I=Math.max(w.length,O.length),m==="points"&&w.length!==O.length&&(w.length>O.length?(k=O,O=e.Util._prepareArrayForTween(O,w,x.closed())):(R=w,w=e.Util._prepareArrayForTween(w,O,x.closed()))),m.indexOf("fill")===0)for(E=0;E<I;E++)if(E%2===0)f.push(w[E]-O[E]);else{var T=e.Util.colorToRGBA(O[E]);N=e.Util.colorToRGBA(w[E]),O[E]=T,f.push({r:N.r-T.r,g:N.g-T.g,b:N.b-T.b,a:N.a-T.a})}else for(E=0;E<I;E++)f.push(w[E]-O[E]);else h.indexOf(m)!==-1?(O=e.Util.colorToRGBA(O),N=e.Util.colorToRGBA(w),f={r:N.r-O.r,g:N.g-O.g,b:N.b-O.b,a:N.a-O.a}):f=w-O;v.attrs[b][this._id][m]={start:O,diff:f,end:w,trueEnd:R,trueStart:k},v.tweens[b][m]=this._id}_tweenFunc(m){var w=this.node,x=v.attrs[w._id][this._id],b,O,f,S,E,I,R,k;for(b in x){if(O=x[b],f=O.start,S=O.diff,k=O.end,e.Util._isArray(f))if(E=[],R=Math.max(f.length,k.length),b.indexOf("fill")===0)for(I=0;I<R;I++)I%2===0?E.push((f[I]||0)+S[I]*m):E.push("rgba("+Math.round(f[I].r+S[I].r*m)+","+Math.round(f[I].g+S[I].g*m)+","+Math.round(f[I].b+S[I].b*m)+","+(f[I].a+S[I].a*m)+")");else for(I=0;I<R;I++)E.push((f[I]||0)+S[I]*m);else h.indexOf(b)!==-1?E="rgba("+Math.round(f.r+S.r*m)+","+Math.round(f.g+S.g*m)+","+Math.round(f.b+S.b*m)+","+(f.a+S.a*m)+")":E=f+S*m;w.setAttr(b,E)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var m=this.node,w=v.attrs[m._id][this._id];w.points&&w.points.trueEnd&&m.setAttr("points",w.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var m=this.node,w=v.attrs[m._id][this._id];w.points&&w.points.trueStart&&m.points(w.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(m){return this.tween.seek(m*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var m=this.node._id,w=this._id,x=v.tweens[m],b;this.pause();for(b in x)delete v.tweens[m][b];delete v.attrs[m][w]}}t.Tween=v,v.attrs={},v.tweens={},n.Node.prototype.to=function(g){var m=g.onFinish;g.node=this,g.onFinish=function(){this.destroy(),m&&m()};var w=new v(g);w.play()},t.Easings={BackEaseIn(g,m,w,x){var b=1.70158;return w*(g/=x)*g*((b+1)*g-b)+m},BackEaseOut(g,m,w,x){var b=1.70158;return w*((g=g/x-1)*g*((b+1)*g+b)+1)+m},BackEaseInOut(g,m,w,x){var b=1.70158;return(g/=x/2)<1?w/2*(g*g*(((b*=1.525)+1)*g-b))+m:w/2*((g-=2)*g*(((b*=1.525)+1)*g+b)+2)+m},ElasticEaseIn(g,m,w,x,b,O){var f=0;return g===0?m:(g/=x)===1?m+w:(O||(O=x*.3),!b||b<Math.abs(w)?(b=w,f=O/4):f=O/(2*Math.PI)*Math.asin(w/b),-(b*Math.pow(2,10*(g-=1))*Math.sin((g*x-f)*(2*Math.PI)/O))+m)},ElasticEaseOut(g,m,w,x,b,O){var f=0;return g===0?m:(g/=x)===1?m+w:(O||(O=x*.3),!b||b<Math.abs(w)?(b=w,f=O/4):f=O/(2*Math.PI)*Math.asin(w/b),b*Math.pow(2,-10*g)*Math.sin((g*x-f)*(2*Math.PI)/O)+w+m)},ElasticEaseInOut(g,m,w,x,b,O){var f=0;return g===0?m:(g/=x/2)===2?m+w:(O||(O=x*(.3*1.5)),!b||b<Math.abs(w)?(b=w,f=O/4):f=O/(2*Math.PI)*Math.asin(w/b),g<1?-.5*(b*Math.pow(2,10*(g-=1))*Math.sin((g*x-f)*(2*Math.PI)/O))+m:b*Math.pow(2,-10*(g-=1))*Math.sin((g*x-f)*(2*Math.PI)/O)*.5+w+m)},BounceEaseOut(g,m,w,x){return(g/=x)<1/2.75?w*(7.5625*g*g)+m:g<2/2.75?w*(7.5625*(g-=1.5/2.75)*g+.75)+m:g<2.5/2.75?w*(7.5625*(g-=2.25/2.75)*g+.9375)+m:w*(7.5625*(g-=2.625/2.75)*g+.984375)+m},BounceEaseIn(g,m,w,x){return w-t.Easings.BounceEaseOut(x-g,0,w,x)+m},BounceEaseInOut(g,m,w,x){return g<x/2?t.Easings.BounceEaseIn(g*2,0,w,x)*.5+m:t.Easings.BounceEaseOut(g*2-x,0,w,x)*.5+w*.5+m},EaseIn(g,m,w,x){return w*(g/=x)*g+m},EaseOut(g,m,w,x){return-w*(g/=x)*(g-2)+m},EaseInOut(g,m,w,x){return(g/=x/2)<1?w/2*g*g+m:-w/2*(--g*(g-2)-1)+m},StrongEaseIn(g,m,w,x){return w*(g/=x)*g*g*g*g+m},StrongEaseOut(g,m,w,x){return w*((g=g/x-1)*g*g*g*g+1)+m},StrongEaseInOut(g,m,w,x){return(g/=x/2)<1?w/2*g*g*g*g*g+m:w/2*((g-=2)*g*g*g*g+2)+m},Linear(g,m,w,x){return w*g/x+m}}})(ET);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;const e=Ct,r=Pr,n=pr,i=uc,o=ST,a=Th,s=Tg,c=vd,d=Pg,h=tn,C=yd,v=ET,g=Pa,m=vo;t.Konva=r.Util._assign(e.Konva,{Util:r.Util,Transform:r.Transform,Node:n.Node,Container:i.Container,Stage:o.Stage,stages:o.stages,Layer:a.Layer,FastLayer:s.FastLayer,Group:c.Group,DD:d.DD,Shape:h.Shape,shapes:h.shapes,Animation:C.Animation,Tween:v.Tween,Easings:v.Easings,Context:g.Context,Canvas:m.Canvas}),t.default=t.Konva})(vT);var Ig={};Object.defineProperty(Ig,"__esModule",{value:!0});Ig.Arc=void 0;const Ag=ot,rG=tn,KS=Ct,Lg=Be,nG=Ct;class $a extends rG.Shape{_sceneFunc(e){var r=KS.Konva.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,r,n),e.arc(0,0,this.innerRadius(),r,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),r=this.outerRadius(),n=this.clockwise(),i=KS.Konva.getAngle(n?360-this.angle():this.angle()),o=Math.cos(Math.min(i,Math.PI)),a=1,s=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),c=Math.sin(Math.min(i,Math.PI/2)),d=o*(o>0?e:r),h=a*r,C=s*(s>0?e:r),v=c*(c>0?r:e);return{x:d,y:n?-1*v:C,width:h-d,height:v-C}}}Ig.Arc=$a;$a.prototype._centroid=!0;$a.prototype.className="Arc";$a.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,nG._registerNode)($a);Ag.Factory.addGetterSetter($a,"innerRadius",0,(0,Lg.getNumberValidator)());Ag.Factory.addGetterSetter($a,"outerRadius",0,(0,Lg.getNumberValidator)());Ag.Factory.addGetterSetter($a,"angle",0,(0,Lg.getNumberValidator)());Ag.Factory.addGetterSetter($a,"clockwise",!1,(0,Lg.getBooleanValidator)());var Mg={},Ih={};Object.defineProperty(Ih,"__esModule",{value:!0});Ih.Line=void 0;const Rg=ot,iG=tn,OT=Be,oG=Ct;function Xv(t,e,r,n,i,o,a){var s=Math.sqrt(Math.pow(r-t,2)+Math.pow(n-e,2)),c=Math.sqrt(Math.pow(i-r,2)+Math.pow(o-n,2)),d=a*s/(s+c),h=a*c/(s+c),C=r-d*(i-t),v=n-d*(o-e),g=r+h*(i-t),m=n+h*(o-e);return[C,v,g,m]}function YS(t,e){var r=t.length,n=[],i,o;for(i=2;i<r-2;i+=2)o=Xv(t[i-2],t[i-1],t[i],t[i+1],t[i+2],t[i+3],e),!isNaN(o[0])&&(n.push(o[0]),n.push(o[1]),n.push(t[i]),n.push(t[i+1]),n.push(o[2]),n.push(o[3]));return n}let Vs=class extends iG.Shape{constructor(e){super(e),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(e){var r=this.points(),n=r.length,i=this.tension(),o=this.closed(),a=this.bezier(),s,c,d;if(n){if(e.beginPath(),e.moveTo(r[0],r[1]),i!==0&&n>4){for(s=this.getTensionPoints(),c=s.length,d=o?0:4,o||e.quadraticCurveTo(s[0],s[1],s[2],s[3]);d<c-2;)e.bezierCurveTo(s[d++],s[d++],s[d++],s[d++],s[d++],s[d++]);o||e.quadraticCurveTo(s[c-2],s[c-1],r[n-2],r[n-1])}else if(a)for(d=2;d<n;)e.bezierCurveTo(r[d++],r[d++],r[d++],r[d++],r[d++],r[d++]);else for(d=2;d<n;d+=2)e.lineTo(r[d],r[d+1]);o?(e.closePath(),e.fillStrokeShape(this)):e.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():YS(this.points(),this.tension())}_getTensionPointsClosed(){var e=this.points(),r=e.length,n=this.tension(),i=Xv(e[r-2],e[r-1],e[0],e[1],e[2],e[3],n),o=Xv(e[r-4],e[r-3],e[r-2],e[r-1],e[0],e[1],n),a=YS(e,n),s=[i[2],i[3]].concat(a).concat([o[0],o[1],e[r-2],e[r-1],o[2],o[3],i[0],i[1],e[0],e[1]]);return s}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};this.tension()!==0?e=[e[0],e[1],...this._getTensionPoints(),e[e.length-2],e[e.length-1]]:e=this.points();for(var r=e[0],n=e[0],i=e[1],o=e[1],a,s,c=0;c<e.length/2;c++)a=e[c*2],s=e[c*2+1],r=Math.min(r,a),n=Math.max(n,a),i=Math.min(i,s),o=Math.max(o,s);return{x:r,y:i,width:n-r,height:o-i}}};Ih.Line=Vs;Vs.prototype.className="Line";Vs.prototype._attrsAffectingSize=["points","bezier","tension"];(0,oG._registerNode)(Vs);Rg.Factory.addGetterSetter(Vs,"closed",!1);Rg.Factory.addGetterSetter(Vs,"bezier",!1);Rg.Factory.addGetterSetter(Vs,"tension",0,(0,OT.getNumberValidator)());Rg.Factory.addGetterSetter(Vs,"points",[],(0,OT.getNumberArrayValidator)());var Cd={},PT={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.t2length=t.getQuadraticArcLength=t.getCubicArcLength=t.binomialCoefficients=t.cValues=t.tValues=void 0,t.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]],t.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]],t.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]];const e=(a,s,c)=>{let d,h,C;d=c/2,h=0;for(let g=0;g<20;g++)C=d*t.tValues[20][g]+d,h+=t.cValues[20][g]*n(a,s,C);return d*h};t.getCubicArcLength=e;const r=(a,s,c)=>{c===void 0&&(c=1);const d=a[0]-2*a[1]+a[2],h=s[0]-2*s[1]+s[2],C=2*a[1]-2*a[0],v=2*s[1]-2*s[0],g=4*(d*d+h*h),m=4*(d*C+h*v),w=C*C+v*v;if(g===0)return c*Math.sqrt(Math.pow(a[2]-a[0],2)+Math.pow(s[2]-s[0],2));const x=m/(2*g),b=w/g,O=c+x,f=b-x*x,S=O*O+f>0?Math.sqrt(O*O+f):0,E=x*x+f>0?Math.sqrt(x*x+f):0,I=x+Math.sqrt(x*x+f)!==0?f*Math.log(Math.abs((O+S)/(x+E))):0;return Math.sqrt(g)/2*(O*S-x*E+I)};t.getQuadraticArcLength=r;function n(a,s,c){const d=i(1,c,a),h=i(1,c,s),C=d*d+h*h;return Math.sqrt(C)}const i=(a,s,c)=>{const d=c.length-1;let h,C;if(d===0)return 0;if(a===0){C=0;for(let v=0;v<=d;v++)C+=t.binomialCoefficients[d][v]*Math.pow(1-s,d-v)*Math.pow(s,v)*c[v];return C}else{h=new Array(d);for(let v=0;v<d;v++)h[v]=d*(c[v+1]-c[v]);return i(a-1,s,h)}},o=(a,s,c)=>{let d=1,h=a/s,C=(a-c(h))/s,v=0;for(;d>.001;){const g=c(h+C),m=Math.abs(a-g)/s;if(m<d)d=m,h+=C;else{const w=c(h-C),x=Math.abs(a-w)/s;x<d?(d=x,h-=C):C/=2}if(v++,v>500)break}return h};t.t2length=o})(PT);Object.defineProperty(Cd,"__esModule",{value:!0});Cd.Path=void 0;const aG=ot,sG=tn,lG=Ct,Kc=PT;class Kr extends sG.Shape{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=Kr.parsePathData(this.data()),this.pathLength=Kr.getPathLength(this.dataArray)}_sceneFunc(e){var r=this.dataArray;e.beginPath();for(var n=!1,i=0;i<r.length;i++){var o=r[i].command,a=r[i].points;switch(o){case"L":e.lineTo(a[0],a[1]);break;case"M":e.moveTo(a[0],a[1]);break;case"C":e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var s=a[0],c=a[1],d=a[2],h=a[3],C=a[4],v=a[5],g=a[6],m=a[7],w=d>h?d:h,x=d>h?1:d/h,b=d>h?h/d:1;e.translate(s,c),e.rotate(g),e.scale(x,b),e.arc(0,0,w,C,C+v,1-m),e.scale(1/x,1/b),e.rotate(-g),e.translate(-s,-c);break;case"z":n=!0,e.closePath();break}}!n&&!this.hasFill()?e.strokeShape(this):e.fillStrokeShape(this)}getSelfRect(){var e=[];this.dataArray.forEach(function(d){if(d.command==="A"){var h=d.points[4],C=d.points[5],v=d.points[4]+C,g=Math.PI/180;if(Math.abs(h-v)<g&&(g=Math.abs(h-v)),C<0)for(let m=h-g;m>v;m-=g){const w=Kr.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],m,0);e.push(w.x,w.y)}else for(let m=h+g;m<v;m+=g){const w=Kr.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],m,0);e.push(w.x,w.y)}}else if(d.command==="C")for(let m=0;m<=1;m+=.01){const w=Kr.getPointOnCubicBezier(m,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);e.push(w.x,w.y)}else e=e.concat(d.points)});for(var r=e[0],n=e[0],i=e[1],o=e[1],a,s,c=0;c<e.length/2;c++)a=e[c*2],s=e[c*2+1],isNaN(a)||(r=Math.min(r,a),n=Math.max(n,a)),isNaN(s)||(i=Math.min(i,s),o=Math.max(o,s));return{x:r,y:i,width:n-r,height:o-i}}getLength(){return this.pathLength}getPointAtLength(e){return Kr.getPointAtLengthOfDataArray(e,this.dataArray)}static getLineLength(e,r,n,i){return Math.sqrt((n-e)*(n-e)+(i-r)*(i-r))}static getPathLength(e){let r=0;for(var n=0;n<e.length;++n)r+=e[n].pathLength;return r}static getPointAtLengthOfDataArray(e,r){var n,i=0,o=r.length;if(!o)return null;for(;i<o&&e>r[i].pathLength;)e-=r[i].pathLength,++i;if(i===o)return n=r[i-1].points.slice(-2),{x:n[0],y:n[1]};if(e<.01)return n=r[i].points.slice(0,2),{x:n[0],y:n[1]};var a=r[i],s=a.points;switch(a.command){case"L":return Kr.getPointOnLine(e,a.start.x,a.start.y,s[0],s[1]);case"C":return Kr.getPointOnCubicBezier((0,Kc.t2length)(e,Kr.getPathLength(r),w=>(0,Kc.getCubicArcLength)([a.start.x,s[0],s[2],s[4]],[a.start.y,s[1],s[3],s[5]],w)),a.start.x,a.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return Kr.getPointOnQuadraticBezier((0,Kc.t2length)(e,Kr.getPathLength(r),w=>(0,Kc.getQuadraticArcLength)([a.start.x,s[0],s[2]],[a.start.y,s[1],s[3]],w)),a.start.x,a.start.y,s[0],s[1],s[2],s[3]);case"A":var c=s[0],d=s[1],h=s[2],C=s[3],v=s[4],g=s[5],m=s[6];return v+=g*e/a.pathLength,Kr.getPointOnEllipticalArc(c,d,h,C,v,m)}return null}static getPointOnLine(e,r,n,i,o,a,s){a===void 0&&(a=r),s===void 0&&(s=n);var c=(o-n)/(i-r+1e-8),d=Math.sqrt(e*e/(1+c*c));i<r&&(d*=-1);var h=c*d,C;if(i===r)C={x:a,y:s+h};else if((s-n)/(a-r+1e-8)===c)C={x:a+d,y:s+h};else{var v,g,m=this.getLineLength(r,n,i,o),w=(a-r)*(i-r)+(s-n)*(o-n);w=w/(m*m),v=r+w*(i-r),g=n+w*(o-n);var x=this.getLineLength(a,s,v,g),b=Math.sqrt(e*e-x*x);d=Math.sqrt(b*b/(1+c*c)),i<r&&(d*=-1),h=c*d,C={x:v+d,y:g+h}}return C}static getPointOnCubicBezier(e,r,n,i,o,a,s,c,d){function h(x){return x*x*x}function C(x){return 3*x*x*(1-x)}function v(x){return 3*x*(1-x)*(1-x)}function g(x){return(1-x)*(1-x)*(1-x)}var m=c*h(e)+a*C(e)+i*v(e)+r*g(e),w=d*h(e)+s*C(e)+o*v(e)+n*g(e);return{x:m,y:w}}static getPointOnQuadraticBezier(e,r,n,i,o,a,s){function c(g){return g*g}function d(g){return 2*g*(1-g)}function h(g){return(1-g)*(1-g)}var C=a*c(e)+i*d(e)+r*h(e),v=s*c(e)+o*d(e)+n*h(e);return{x:C,y:v}}static getPointOnEllipticalArc(e,r,n,i,o,a){var s=Math.cos(a),c=Math.sin(a),d={x:n*Math.cos(o),y:i*Math.sin(o)};return{x:e+(d.x*s-d.y*c),y:r+(d.x*c+d.y*s)}}static parsePathData(e){if(!e)return[];var r=e,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];r=r.replace(new RegExp(" ","g"),",");for(var i=0;i<n.length;i++)r=r.replace(new RegExp(n[i],"g"),"|"+n[i]);var o=r.split("|"),a=[],s=[],c=0,d=0,h=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi,C;for(i=1;i<o.length;i++){var v=o[i],g=v.charAt(0);for(v=v.slice(1),s.length=0;C=h.exec(v);)s.push(C[0]);for(var m=[],w=0,x=s.length;w<x;w++){if(s[w]==="00"){m.push(0,0);continue}var b=parseFloat(s[w]);isNaN(b)?m.push(0):m.push(b)}for(;m.length>0&&!isNaN(m[0]);){var O="",f=[],S=c,E=d,I,R,k,N,T,D,z,B,Y,W;switch(g){case"l":c+=m.shift(),d+=m.shift(),O="L",f.push(c,d);break;case"L":c=m.shift(),d=m.shift(),f.push(c,d);break;case"m":var q=m.shift(),ee=m.shift();if(c+=q,d+=ee,O="M",a.length>2&&a[a.length-1].command==="z"){for(var K=a.length-2;K>=0;K--)if(a[K].command==="M"){c=a[K].points[0]+q,d=a[K].points[1]+ee;break}}f.push(c,d),g="l";break;case"M":c=m.shift(),d=m.shift(),O="M",f.push(c,d),g="L";break;case"h":c+=m.shift(),O="L",f.push(c,d);break;case"H":c=m.shift(),O="L",f.push(c,d);break;case"v":d+=m.shift(),O="L",f.push(c,d);break;case"V":d=m.shift(),O="L",f.push(c,d);break;case"C":f.push(m.shift(),m.shift(),m.shift(),m.shift()),c=m.shift(),d=m.shift(),f.push(c,d);break;case"c":f.push(c+m.shift(),d+m.shift(),c+m.shift(),d+m.shift()),c+=m.shift(),d+=m.shift(),O="C",f.push(c,d);break;case"S":R=c,k=d,I=a[a.length-1],I.command==="C"&&(R=c+(c-I.points[2]),k=d+(d-I.points[3])),f.push(R,k,m.shift(),m.shift()),c=m.shift(),d=m.shift(),O="C",f.push(c,d);break;case"s":R=c,k=d,I=a[a.length-1],I.command==="C"&&(R=c+(c-I.points[2]),k=d+(d-I.points[3])),f.push(R,k,c+m.shift(),d+m.shift()),c+=m.shift(),d+=m.shift(),O="C",f.push(c,d);break;case"Q":f.push(m.shift(),m.shift()),c=m.shift(),d=m.shift(),f.push(c,d);break;case"q":f.push(c+m.shift(),d+m.shift()),c+=m.shift(),d+=m.shift(),O="Q",f.push(c,d);break;case"T":R=c,k=d,I=a[a.length-1],I.command==="Q"&&(R=c+(c-I.points[0]),k=d+(d-I.points[1])),c=m.shift(),d=m.shift(),O="Q",f.push(R,k,c,d);break;case"t":R=c,k=d,I=a[a.length-1],I.command==="Q"&&(R=c+(c-I.points[0]),k=d+(d-I.points[1])),c+=m.shift(),d+=m.shift(),O="Q",f.push(R,k,c,d);break;case"A":N=m.shift(),T=m.shift(),D=m.shift(),z=m.shift(),B=m.shift(),Y=c,W=d,c=m.shift(),d=m.shift(),O="A",f=this.convertEndpointToCenterParameterization(Y,W,c,d,z,B,N,T,D);break;case"a":N=m.shift(),T=m.shift(),D=m.shift(),z=m.shift(),B=m.shift(),Y=c,W=d,c+=m.shift(),d+=m.shift(),O="A",f=this.convertEndpointToCenterParameterization(Y,W,c,d,z,B,N,T,D);break}a.push({command:O||g,points:f,start:{x:S,y:E},pathLength:this.calcLength(S,E,O||g,f)})}(g==="z"||g==="Z")&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(e,r,n,i){var o,a,s,c,d=Kr;switch(n){case"L":return d.getLineLength(e,r,i[0],i[1]);case"C":return(0,Kc.getCubicArcLength)([e,i[0],i[2],i[4]],[r,i[1],i[3],i[5]],1);case"Q":return(0,Kc.getQuadraticArcLength)([e,i[0],i[2]],[r,i[1],i[3]],1);case"A":o=0;var h=i[4],C=i[5],v=i[4]+C,g=Math.PI/180;if(Math.abs(h-v)<g&&(g=Math.abs(h-v)),a=d.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),C<0)for(c=h-g;c>v;c-=g)s=d.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),o+=d.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(c=h+g;c<v;c+=g)s=d.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],c,0),o+=d.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=d.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],v,0),o+=d.getLineLength(a.x,a.y,s.x,s.y),o}return 0}static convertEndpointToCenterParameterization(e,r,n,i,o,a,s,c,d){var h=d*(Math.PI/180),C=Math.cos(h)*(e-n)/2+Math.sin(h)*(r-i)/2,v=-1*Math.sin(h)*(e-n)/2+Math.cos(h)*(r-i)/2,g=C*C/(s*s)+v*v/(c*c);g>1&&(s*=Math.sqrt(g),c*=Math.sqrt(g));var m=Math.sqrt((s*s*(c*c)-s*s*(v*v)-c*c*(C*C))/(s*s*(v*v)+c*c*(C*C)));o===a&&(m*=-1),isNaN(m)&&(m=0);var w=m*s*v/c,x=m*-c*C/s,b=(e+n)/2+Math.cos(h)*w-Math.sin(h)*x,O=(r+i)/2+Math.sin(h)*w+Math.cos(h)*x,f=function(T){return Math.sqrt(T[0]*T[0]+T[1]*T[1])},S=function(T,D){return(T[0]*D[0]+T[1]*D[1])/(f(T)*f(D))},E=function(T,D){return(T[0]*D[1]<T[1]*D[0]?-1:1)*Math.acos(S(T,D))},I=E([1,0],[(C-w)/s,(v-x)/c]),R=[(C-w)/s,(v-x)/c],k=[(-1*C-w)/s,(-1*v-x)/c],N=E(R,k);return S(R,k)<=-1&&(N=Math.PI),S(R,k)>=1&&(N=0),a===0&&N>0&&(N=N-2*Math.PI),a===1&&N<0&&(N=N+2*Math.PI),[b,O,s,c,I,N,h,a]}}Cd.Path=Kr;Kr.prototype.className="Path";Kr.prototype._attrsAffectingSize=["data"];(0,lG._registerNode)(Kr);aG.Factory.addGetterSetter(Kr,"data");Object.defineProperty(Mg,"__esModule",{value:!0});Mg.Arrow=void 0;const Ng=ot,cG=Ih,kT=Be,uG=Ct,ZS=Cd;let hc=class extends cG.Line{_sceneFunc(e){super._sceneFunc(e);var r=Math.PI*2,n=this.points(),i=n,o=this.tension()!==0&&n.length>4;o&&(i=this.getTensionPoints());var a=this.pointerLength(),s=n.length,c,d;if(o){const v=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],n[s-2],n[s-1]],g=ZS.Path.calcLength(i[i.length-4],i[i.length-3],"C",v),m=ZS.Path.getPointOnQuadraticBezier(Math.min(1,1-a/g),v[0],v[1],v[2],v[3],v[4],v[5]);c=n[s-2]-m.x,d=n[s-1]-m.y}else c=n[s-2]-n[s-4],d=n[s-1]-n[s-3];var h=(Math.atan2(d,c)+r)%r,C=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[s-2],n[s-1]),e.rotate(h),e.moveTo(0,0),e.lineTo(-a,C/2),e.lineTo(-a,-C/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),o?(c=(i[0]+i[2])/2-n[0],d=(i[1]+i[3])/2-n[1]):(c=n[2]-n[0],d=n[3]-n[1]),e.rotate((Math.atan2(-d,-c)+r)%r),e.moveTo(0,0),e.lineTo(-a,C/2),e.lineTo(-a,-C/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var r=this.dashEnabled();r&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),r&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),r=this.pointerWidth()/2;return{x:e.x-r,y:e.y-r,width:e.width+r*2,height:e.height+r*2}}};Mg.Arrow=hc;hc.prototype.className="Arrow";(0,uG._registerNode)(hc);Ng.Factory.addGetterSetter(hc,"pointerLength",10,(0,kT.getNumberValidator)());Ng.Factory.addGetterSetter(hc,"pointerWidth",10,(0,kT.getNumberValidator)());Ng.Factory.addGetterSetter(hc,"pointerAtBeginning",!1);Ng.Factory.addGetterSetter(hc,"pointerAtEnding",!0);var Fg={};Object.defineProperty(Fg,"__esModule",{value:!0});Fg.Circle=void 0;const dG=ot,hG=tn,fG=Be,pG=Ct;class wd extends hG.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}Fg.Circle=wd;wd.prototype._centroid=!0;wd.prototype.className="Circle";wd.prototype._attrsAffectingSize=["radius"];(0,pG._registerNode)(wd);dG.Factory.addGetterSetter(wd,"radius",0,(0,fG.getNumberValidator)());var Dg={};Object.defineProperty(Dg,"__esModule",{value:!0});Dg.Ellipse=void 0;const X8=ot,gG=tn,TT=Be,mG=Ct;let Us=class extends gG.Shape{_sceneFunc(e){var r=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),r!==n&&e.scale(1,n/r),e.arc(0,0,r,0,Math.PI*2,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}};Dg.Ellipse=Us;Us.prototype.className="Ellipse";Us.prototype._centroid=!0;Us.prototype._attrsAffectingSize=["radiusX","radiusY"];(0,mG._registerNode)(Us);X8.Factory.addComponentsGetterSetter(Us,"radius",["x","y"]);X8.Factory.addGetterSetter(Us,"radiusX",0,(0,TT.getNumberValidator)());X8.Factory.addGetterSetter(Us,"radiusY",0,(0,TT.getNumberValidator)());var jg={};Object.defineProperty(jg,"__esModule",{value:!0});jg.Image=void 0;const Q4=Pr,fc=ot,vG=tn,yG=Ct,Ah=Be;let Qo=class IT extends vG.Shape{constructor(e){super(e),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&e.readyState===4||e&&e.addEventListener&&e.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){const r=this.getWidth(),n=this.getHeight(),i=this.cornerRadius(),o=this.attrs.image;let a;if(o){const s=this.attrs.cropWidth,c=this.attrs.cropHeight;s&&c?a=[o,this.cropX(),this.cropY(),s,c,0,0,r,n]:a=[o,0,0,r,n]}(this.hasFill()||this.hasStroke()||i)&&(e.beginPath(),i?Q4.Util.drawRoundedRectPath(e,r,n,i):e.rect(0,0,r,n),e.closePath(),e.fillStrokeShape(this)),o&&(i&&e.clip(),e.drawImage.apply(e,a))}_hitFunc(e){var r=this.width(),n=this.height(),i=this.cornerRadius();e.beginPath(),i?Q4.Util.drawRoundedRectPath(e,r,n,i):e.rect(0,0,r,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,r;return(e=this.attrs.width)!==null&&e!==void 0?e:(r=this.image())===null||r===void 0?void 0:r.width}getHeight(){var e,r;return(e=this.attrs.height)!==null&&e!==void 0?e:(r=this.image())===null||r===void 0?void 0:r.height}static fromURL(e,r,n=null){var i=Q4.Util.createImageElement();i.onload=function(){var o=new IT({image:i});r(o)},i.onerror=n,i.crossOrigin="Anonymous",i.src=e}};jg.Image=Qo;Qo.prototype.className="Image";(0,yG._registerNode)(Qo);fc.Factory.addGetterSetter(Qo,"cornerRadius",0,(0,Ah.getNumberOrArrayOfNumbersValidator)(4));fc.Factory.addGetterSetter(Qo,"image");fc.Factory.addComponentsGetterSetter(Qo,"crop",["x","y","width","height"]);fc.Factory.addGetterSetter(Qo,"cropX",0,(0,Ah.getNumberValidator)());fc.Factory.addGetterSetter(Qo,"cropY",0,(0,Ah.getNumberValidator)());fc.Factory.addGetterSetter(Qo,"cropWidth",0,(0,Ah.getNumberValidator)());fc.Factory.addGetterSetter(Qo,"cropHeight",0,(0,Ah.getNumberValidator)());var Yu={};Object.defineProperty(Yu,"__esModule",{value:!0});Yu.Tag=Yu.Label=void 0;const zg=ot,CG=tn,wG=vd,K8=Be,AT=Ct;var LT=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],SG="Change.konva",bG="none",Kv="up",Yv="right",Zv="down",qv="left",_G=LT.length;let Y8=class extends wG.Group{constructor(e){super(e),this.on("add.konva",function(r){this._addListeners(r.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){var r=this,n,i=function(){r._sync()};for(n=0;n<_G;n++)e.on(LT[n]+SG,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var e=this.getText(),r=this.getTag(),n,i,o,a,s,c,d;if(e&&r){switch(n=e.width(),i=e.height(),o=r.pointerDirection(),a=r.pointerWidth(),d=r.pointerHeight(),s=0,c=0,o){case Kv:s=n/2,c=-1*d;break;case Yv:s=n+a,c=i/2;break;case Zv:s=n/2,c=i+d;break;case qv:s=-1*a,c=i/2;break}r.setAttrs({x:-1*s,y:-1*c,width:n,height:i}),e.setAttrs({x:-1*s,y:-1*c})}}};Yu.Label=Y8;Y8.prototype.className="Label";(0,AT._registerNode)(Y8);class pc extends CG.Shape{_sceneFunc(e){var r=this.width(),n=this.height(),i=this.pointerDirection(),o=this.pointerWidth(),a=this.pointerHeight(),s=this.cornerRadius();let c=0,d=0,h=0,C=0;typeof s=="number"?c=d=h=C=Math.min(s,r/2,n/2):(c=Math.min(s[0]||0,r/2,n/2),d=Math.min(s[1]||0,r/2,n/2),C=Math.min(s[2]||0,r/2,n/2),h=Math.min(s[3]||0,r/2,n/2)),e.beginPath(),e.moveTo(c,0),i===Kv&&(e.lineTo((r-o)/2,0),e.lineTo(r/2,-1*a),e.lineTo((r+o)/2,0)),e.lineTo(r-d,0),e.arc(r-d,d,d,Math.PI*3/2,0,!1),i===Yv&&(e.lineTo(r,(n-a)/2),e.lineTo(r+o,n/2),e.lineTo(r,(n+a)/2)),e.lineTo(r,n-C),e.arc(r-C,n-C,C,0,Math.PI/2,!1),i===Zv&&(e.lineTo((r+o)/2,n),e.lineTo(r/2,n+a),e.lineTo((r-o)/2,n)),e.lineTo(h,n),e.arc(h,n-h,h,Math.PI/2,Math.PI,!1),i===qv&&(e.lineTo(0,(n+a)/2),e.lineTo(-1*o,n/2),e.lineTo(0,(n-a)/2)),e.lineTo(0,c),e.arc(c,c,c,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){var e=0,r=0,n=this.pointerWidth(),i=this.pointerHeight(),o=this.pointerDirection(),a=this.width(),s=this.height();return o===Kv?(r-=i,s+=i):o===Zv?s+=i:o===qv?(e-=n*1.5,a+=n):o===Yv&&(a+=n*1.5),{x:e,y:r,width:a,height:s}}}Yu.Tag=pc;pc.prototype.className="Tag";(0,AT._registerNode)(pc);zg.Factory.addGetterSetter(pc,"pointerDirection",bG);zg.Factory.addGetterSetter(pc,"pointerWidth",0,(0,K8.getNumberValidator)());zg.Factory.addGetterSetter(pc,"pointerHeight",0,(0,K8.getNumberValidator)());zg.Factory.addGetterSetter(pc,"cornerRadius",0,(0,K8.getNumberOrArrayOfNumbersValidator)(4));var Lh={};Object.defineProperty(Lh,"__esModule",{value:!0});Lh.Rect=void 0;const xG=ot,EG=tn,OG=Ct,PG=Pr,kG=Be;class $g extends EG.Shape{_sceneFunc(e){var r=this.cornerRadius(),n=this.width(),i=this.height();e.beginPath(),r?PG.Util.drawRoundedRectPath(e,n,i,r):e.rect(0,0,n,i),e.closePath(),e.fillStrokeShape(this)}}Lh.Rect=$g;$g.prototype.className="Rect";(0,OG._registerNode)($g);xG.Factory.addGetterSetter($g,"cornerRadius",0,(0,kG.getNumberOrArrayOfNumbersValidator)(4));var Bg={};Object.defineProperty(Bg,"__esModule",{value:!0});Bg.RegularPolygon=void 0;const MT=ot,TG=tn,RT=Be,IG=Ct;class gc extends TG.Shape{_sceneFunc(e){const r=this._getPoints();e.beginPath(),e.moveTo(r[0].x,r[0].y);for(var n=1;n<r.length;n++)e.lineTo(r[n].x,r[n].y);e.closePath(),e.fillStrokeShape(this)}_getPoints(){const e=this.attrs.sides,r=this.attrs.radius||0,n=[];for(var i=0;i<e;i++)n.push({x:r*Math.sin(i*2*Math.PI/e),y:-1*r*Math.cos(i*2*Math.PI/e)});return n}getSelfRect(){const e=this._getPoints();var r=e[0].x,n=e[0].y,i=e[0].x,o=e[0].y;return e.forEach(a=>{r=Math.min(r,a.x),n=Math.max(n,a.x),i=Math.min(i,a.y),o=Math.max(o,a.y)}),{x:r,y:i,width:n-r,height:o-i}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}Bg.RegularPolygon=gc;gc.prototype.className="RegularPolygon";gc.prototype._centroid=!0;gc.prototype._attrsAffectingSize=["radius"];(0,IG._registerNode)(gc);MT.Factory.addGetterSetter(gc,"radius",0,(0,RT.getNumberValidator)());MT.Factory.addGetterSetter(gc,"sides",0,(0,RT.getNumberValidator)());var Hg={};Object.defineProperty(Hg,"__esModule",{value:!0});Hg.Ring=void 0;const NT=ot,AG=tn,FT=Be,LG=Ct;var qS=Math.PI*2;class mc extends AG.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,qS,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),qS,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}Hg.Ring=mc;mc.prototype.className="Ring";mc.prototype._centroid=!0;mc.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,LG._registerNode)(mc);NT.Factory.addGetterSetter(mc,"innerRadius",0,(0,FT.getNumberValidator)());NT.Factory.addGetterSetter(mc,"outerRadius",0,(0,FT.getNumberValidator)());var Gg={};Object.defineProperty(Gg,"__esModule",{value:!0});Gg.Sprite=void 0;const vc=ot,MG=tn,RG=yd,DT=Be,NG=Ct;class Jo extends MG.Shape{constructor(e){super(e),this._updated=!0,this.anim=new RG.Animation(()=>{var r=this._updated;return this._updated=!1,r}),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(e){var r=this.animation(),n=this.frameIndex(),i=n*4,o=this.animations()[r],a=this.frameOffsets(),s=o[i+0],c=o[i+1],d=o[i+2],h=o[i+3],C=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,d,h),e.closePath(),e.fillStrokeShape(this)),C)if(a){var v=a[r],g=n*2;e.drawImage(C,s,c,d,h,v[g+0],v[g+1],d,h)}else e.drawImage(C,s,c,d,h,0,0,d,h)}_hitFunc(e){var r=this.animation(),n=this.frameIndex(),i=n*4,o=this.animations()[r],a=this.frameOffsets(),s=o[i+2],c=o[i+3];if(e.beginPath(),a){var d=a[r],h=n*2;e.rect(d[h+0],d[h+1],s,c)}else e.rect(0,0,s,c);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),r=this.animation(),n=this.animations(),i=n[r],o=i.length/4;e<o-1?this.frameIndex(e+1):this.frameIndex(0)}}Gg.Sprite=Jo;Jo.prototype.className="Sprite";(0,NG._registerNode)(Jo);vc.Factory.addGetterSetter(Jo,"animation");vc.Factory.addGetterSetter(Jo,"animations");vc.Factory.addGetterSetter(Jo,"frameOffsets");vc.Factory.addGetterSetter(Jo,"image");vc.Factory.addGetterSetter(Jo,"frameIndex",0,(0,DT.getNumberValidator)());vc.Factory.addGetterSetter(Jo,"frameRate",17,(0,DT.getNumberValidator)());vc.Factory.backCompat(Jo,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});var Vg={};Object.defineProperty(Vg,"__esModule",{value:!0});Vg.Star=void 0;const Z8=ot,FG=tn,q8=Be,DG=Ct;class Ws extends FG.Shape{_sceneFunc(e){var r=this.innerRadius(),n=this.outerRadius(),i=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var o=1;o<i*2;o++){var a=o%2===0?n:r,s=a*Math.sin(o*Math.PI/i),c=-1*a*Math.cos(o*Math.PI/i);e.lineTo(s,c)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}Vg.Star=Ws;Ws.prototype.className="Star";Ws.prototype._centroid=!0;Ws.prototype._attrsAffectingSize=["innerRadius","outerRadius"];(0,DG._registerNode)(Ws);Z8.Factory.addGetterSetter(Ws,"numPoints",5,(0,q8.getNumberValidator)());Z8.Factory.addGetterSetter(Ws,"innerRadius",0,(0,q8.getNumberValidator)());Z8.Factory.addGetterSetter(Ws,"outerRadius",0,(0,q8.getNumberValidator)());var Kl={};Object.defineProperty(Kl,"__esModule",{value:!0});Kl.Text=Kl.stringToArray=void 0;const Qv=Pr,zn=ot,jG=tn,Xs=Be,zG=Ct;function jT(t){return Array.from(t)}Kl.stringToArray=jT;var Yc="auto",$G="center",zT="inherit",u0="justify",BG="Change.konva",HG="2d",QS="-",$T="left",GG="text",VG="Text",UG="top",WG="bottom",JS="middle",BT="normal",XG="px ",rf=" ",KG="right",eb="rtl",YG="word",ZG="char",tb="none",J4="…",HT=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],qG=HT.length;function QG(t){return t.split(",").map(e=>{e=e.trim();const r=e.indexOf(" ")>=0,n=e.indexOf('"')>=0||e.indexOf("'")>=0;return r&&!n&&(e=`"${e}"`),e}).join(", ")}var nf;function em(){return nf||(nf=Qv.Util.createCanvasElement().getContext(HG),nf)}function JG(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function eV(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function tV(t){return t=t||{},!t.fillLinearGradientColorStops&&!t.fillRadialGradientColorStops&&!t.fillPatternImage&&(t.fill=t.fill||"black"),t}let Lr=class extends jG.Shape{constructor(e){super(tV(e)),this._partialTextX=0,this._partialTextY=0;for(var r=0;r<qG;r++)this.on(HT[r]+BG,this._setTextData);this._setTextData()}_sceneFunc(e){var r=this.textArr,n=r.length;if(this.text()){var i=this.padding(),o=this.fontSize(),a=this.lineHeight()*o,s=this.verticalAlign(),c=this.direction(),d=0,h=this.align(),C=this.getWidth(),v=this.letterSpacing(),g=this.fill(),m=this.textDecoration(),w=m.indexOf("underline")!==-1,x=m.indexOf("line-through")!==-1,b;c=c===zT?e.direction:c;var O=0,O=a/2,f=0,S=0;for(c===eb&&e.setAttr("direction",c),e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",JS),e.setAttr("textAlign",$T),s===JS?d=(this.getHeight()-n*a-i*2)/2:s===WG&&(d=this.getHeight()-n*a-i*2),e.translate(i,d+i),b=0;b<n;b++){var f=0,S=0,E=r[b],I=E.text,R=E.width,k=E.lastInParagraph,N,T,D;if(e.save(),h===KG?f+=C-R-i*2:h===$G&&(f+=(C-R-i*2)/2),w){e.save(),e.beginPath(),e.moveTo(f,O+S+Math.round(o/2)),N=I.split(" ").length-1,T=N===0,D=h===u0&&!k?C-i*2:R,e.lineTo(f+Math.round(D),O+S+Math.round(o/2)),e.lineWidth=o/15;const ee=this._getLinearGradient();e.strokeStyle=ee||g,e.stroke(),e.restore()}if(x){e.save(),e.beginPath(),e.moveTo(f,O+S),N=I.split(" ").length-1,T=N===0,D=h===u0&&k&&!T?C-i*2:R,e.lineTo(f+Math.round(D),O+S),e.lineWidth=o/15;const ee=this._getLinearGradient();e.strokeStyle=ee||g,e.stroke(),e.restore()}if(c!==eb&&(v!==0||h===u0)){N=I.split(" ").length-1;for(var z=jT(I),B=0;B<z.length;B++){var Y=z[B];Y===" "&&!k&&h===u0&&(f+=(C-i*2-R)/N),this._partialTextX=f,this._partialTextY=O+S,this._partialText=Y,e.fillStrokeShape(this),f+=this.measureSize(Y).width+v}}else v!==0&&e.setAttr("letterSpacing",`${v}px`),this._partialTextX=f,this._partialTextY=O+S,this._partialText=I,e.fillStrokeShape(this);e.restore(),n>1&&(O+=a)}}}_hitFunc(e){var r=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,r,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var r=Qv.Util._isString(e)?e:e==null?"":e+"";return this._setAttr(GG,r),this}getWidth(){var e=this.attrs.width===Yc||this.attrs.width===void 0;return e?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){var e=this.attrs.height===Yc||this.attrs.height===void 0;return e?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return Qv.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var r=em(),n=this.fontSize(),i;return r.save(),r.font=this._getContextFont(),i=r.measureText(e),r.restore(),{width:i.width,height:n}}_getContextFont(){return this.fontStyle()+rf+this.fontVariant()+rf+(this.fontSize()+XG)+QG(this.fontFamily())}_addTextLine(e){this.align()===u0&&(e=e.trim());var n=this._getTextWidth(e);return this.textArr.push({text:e,width:n,lastInParagraph:!1})}_getTextWidth(e){var r=this.letterSpacing(),n=e.length;return em().measureText(e).width+(n?r*(n-1):0)}_setTextData(){var e=this.text().split(`
`),r=+this.fontSize(),n=0,i=this.lineHeight()*r,o=this.attrs.width,a=this.attrs.height,s=o!==Yc&&o!==void 0,c=a!==Yc&&a!==void 0,d=this.padding(),h=o-d*2,C=a-d*2,v=0,g=this.wrap(),m=g!==tb,w=g!==ZG&&m,x=this.ellipsis();this.textArr=[],em().font=this._getContextFont();for(var b=x?this._getTextWidth(J4):0,O=0,f=e.length;O<f;++O){var S=e[O],E=this._getTextWidth(S);if(s&&E>h)for(;S.length>0;){for(var I=0,R=S.length,k="",N=0;I<R;){var T=I+R>>>1,D=S.slice(0,T+1),z=this._getTextWidth(D)+b;z<=h?(I=T+1,k=D,N=z):R=T}if(k){if(w){var B,Y=S[k.length],W=Y===rf||Y===QS;W&&N<=h?B=k.length:B=Math.max(k.lastIndexOf(rf),k.lastIndexOf(QS))+1,B>0&&(I=B,k=k.slice(0,I),N=this._getTextWidth(k))}k=k.trimRight(),this._addTextLine(k),n=Math.max(n,N),v+=i;var q=this._shouldHandleEllipsis(v);if(q){this._tryToAddEllipsisToLastLine();break}if(S=S.slice(I),S=S.trimLeft(),S.length>0&&(E=this._getTextWidth(S),E<=h)){this._addTextLine(S),v+=i,n=Math.max(n,E);break}}else break}else this._addTextLine(S),v+=i,n=Math.max(n,E),this._shouldHandleEllipsis(v)&&O<f-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),c&&v+i>C)break}this.textHeight=r,this.textWidth=n}_shouldHandleEllipsis(e){var r=+this.fontSize(),n=this.lineHeight()*r,i=this.attrs.height,o=i!==Yc&&i!==void 0,a=this.padding(),s=i-a*2,c=this.wrap(),d=c!==tb;return!d||o&&e+n>s}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,r=e!==Yc&&e!==void 0,n=this.padding(),i=e-n*2,o=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(!(!a||!o)){if(r){var s=this._getTextWidth(a.text+J4)<i;s||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+J4)}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const e=this.textDecoration().indexOf("underline")!==-1||this.textDecoration().indexOf("line-through")!==-1,r=this.hasShadow();return e&&r?!0:super._useBufferCanvas()}};Kl.Text=Lr;Lr.prototype._fillFunc=JG;Lr.prototype._strokeFunc=eV;Lr.prototype.className=VG;Lr.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"];(0,zG._registerNode)(Lr);zn.Factory.overWriteSetter(Lr,"width",(0,Xs.getNumberOrAutoValidator)());zn.Factory.overWriteSetter(Lr,"height",(0,Xs.getNumberOrAutoValidator)());zn.Factory.addGetterSetter(Lr,"direction",zT);zn.Factory.addGetterSetter(Lr,"fontFamily","Arial");zn.Factory.addGetterSetter(Lr,"fontSize",12,(0,Xs.getNumberValidator)());zn.Factory.addGetterSetter(Lr,"fontStyle",BT);zn.Factory.addGetterSetter(Lr,"fontVariant",BT);zn.Factory.addGetterSetter(Lr,"padding",0,(0,Xs.getNumberValidator)());zn.Factory.addGetterSetter(Lr,"align",$T);zn.Factory.addGetterSetter(Lr,"verticalAlign",UG);zn.Factory.addGetterSetter(Lr,"lineHeight",1,(0,Xs.getNumberValidator)());zn.Factory.addGetterSetter(Lr,"wrap",YG);zn.Factory.addGetterSetter(Lr,"ellipsis",!1,(0,Xs.getBooleanValidator)());zn.Factory.addGetterSetter(Lr,"letterSpacing",0,(0,Xs.getNumberValidator)());zn.Factory.addGetterSetter(Lr,"text","",(0,Xs.getStringValidator)());zn.Factory.addGetterSetter(Lr,"textDecoration","");var Ug={};Object.defineProperty(Ug,"__esModule",{value:!0});Ug.TextPath=void 0;const tm=Pr,bo=ot,rV=tn,d0=Cd,rm=Kl,GT=Be,nV=Ct;var iV="",VT="normal";function UT(t){t.fillText(this.partialText,0,0)}function WT(t){t.strokeText(this.partialText,0,0)}class rn extends rV.Shape{constructor(e){super(e),this.dummyCanvas=tm.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 d0.Path.getPathLength(this.dataArray)}_getPointAtLength(e){if(!this.attrs.data)return null;const r=this.pathLength;return e-1>r?null:d0.Path.getPointAtLengthOfDataArray(e,this.dataArray)}_readDataAttribute(){this.dataArray=d0.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();var r=this.textDecoration(),n=this.fill(),i=this.fontSize(),o=this.glyphInfo;r==="underline"&&e.beginPath();for(var a=0;a<o.length;a++){e.save();var s=o[a].p0;e.translate(s.x,s.y),e.rotate(o[a].rotation),this.partialText=o[a].text,e.fillStrokeShape(this),r==="underline"&&(a===0&&e.moveTo(0,i/2+1),e.lineTo(i,i/2+1)),e.restore()}r==="underline"&&(e.strokeStyle=n,e.lineWidth=i/20,e.stroke()),e.restore()}_hitFunc(e){e.beginPath();var r=this.glyphInfo;if(r.length>=1){var n=r[0].p0;e.moveTo(n.x,n.y)}for(var i=0;i<r.length;i++){var o=r[i].p1;e.lineTo(o.x,o.y)}e.setAttr("lineWidth",this.fontSize()),e.setAttr("strokeStyle",this.colorKey),e.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return tm.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(e){return rm.Text.prototype.setText.call(this,e)}_getContextFont(){return rm.Text.prototype._getContextFont.call(this)}_getTextSize(e){var r=this.dummyCanvas,n=r.getContext("2d");n.save(),n.font=this._getContextFont();var i=n.measureText(e);return n.restore(),{width:i.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:e,height:r}=this._getTextSize(this.attrs.text);if(this.textWidth=e,this.textHeight=r,this.glyphInfo=[],!this.attrs.data)return null;const n=this.letterSpacing(),i=this.align(),o=this.kerningFunc(),a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);let s=0;i==="center"&&(s=Math.max(0,this.pathLength/2-a/2)),i==="right"&&(s=Math.max(0,this.pathLength-a));const c=(0,rm.stringToArray)(this.text());let d=s;for(var h=0;h<c.length;h++){const C=this._getPointAtLength(d);if(!C)return;let v=this._getTextSize(c[h]).width+n;if(c[h]===" "&&i==="justify"){const O=this.text().split(" ").length-1;v+=(this.pathLength-a)/O}const g=this._getPointAtLength(d+v);if(!g)return;const m=d0.Path.getLineLength(C.x,C.y,g.x,g.y);let w=0;if(o)try{w=o(c[h-1],c[h])*this.fontSize()}catch{w=0}C.x+=w,g.x+=w,this.textWidth+=w;const x=d0.Path.getPointOnLine(w+m/2,C.x,C.y,g.x,g.y),b=Math.atan2(g.y-C.y,g.x-C.x);this.glyphInfo.push({transposeX:x.x,transposeY:x.y,text:c[h],rotation:b,p0:C,p1:g}),d+=v}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var e=[];this.glyphInfo.forEach(function(h){e.push(h.p0.x),e.push(h.p0.y),e.push(h.p1.x),e.push(h.p1.y)});for(var r=e[0]||0,n=e[0]||0,i=e[1]||0,o=e[1]||0,a,s,c=0;c<e.length/2;c++)a=e[c*2],s=e[c*2+1],r=Math.min(r,a),n=Math.max(n,a),i=Math.min(i,s),o=Math.max(o,s);var d=this.fontSize();return{x:r-d/2,y:i-d/2,width:n-r+d,height:o-i+d}}destroy(){return tm.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}Ug.TextPath=rn;rn.prototype._fillFunc=UT;rn.prototype._strokeFunc=WT;rn.prototype._fillFuncHit=UT;rn.prototype._strokeFuncHit=WT;rn.prototype.className="TextPath";rn.prototype._attrsAffectingSize=["text","fontSize","data"];(0,nV._registerNode)(rn);bo.Factory.addGetterSetter(rn,"data");bo.Factory.addGetterSetter(rn,"fontFamily","Arial");bo.Factory.addGetterSetter(rn,"fontSize",12,(0,GT.getNumberValidator)());bo.Factory.addGetterSetter(rn,"fontStyle",VT);bo.Factory.addGetterSetter(rn,"align","left");bo.Factory.addGetterSetter(rn,"letterSpacing",0,(0,GT.getNumberValidator)());bo.Factory.addGetterSetter(rn,"textBaseline","middle");bo.Factory.addGetterSetter(rn,"fontVariant",VT);bo.Factory.addGetterSetter(rn,"text",iV);bo.Factory.addGetterSetter(rn,"textDecoration",null);bo.Factory.addGetterSetter(rn,"kerningFunc",null);var Wg={};Object.defineProperty(Wg,"__esModule",{value:!0});Wg.Transformer=void 0;const Wt=Pr,Dt=ot,rb=pr,oV=tn,aV=Lh,nb=vd,ao=Ct,Ks=Be,sV=Ct;var XT="tr-konva",lV=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${XT}`).join(" "),ib="nodesRect",cV=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],uV={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const dV="ontouchstart"in ao.Konva._global;function hV(t,e,r){if(t==="rotater")return r;e+=Wt.Util.degToRad(uV[t]||0);var n=(Wt.Util.radToDeg(e)%360+360)%360;return Wt.Util._inRange(n,315+22.5,360)||Wt.Util._inRange(n,0,22.5)?"ns-resize":Wt.Util._inRange(n,45-22.5,45+22.5)?"nesw-resize":Wt.Util._inRange(n,90-22.5,90+22.5)?"ew-resize":Wt.Util._inRange(n,135-22.5,135+22.5)?"nwse-resize":Wt.Util._inRange(n,180-22.5,180+22.5)?"ns-resize":Wt.Util._inRange(n,225-22.5,225+22.5)?"nesw-resize":Wt.Util._inRange(n,270-22.5,270+22.5)?"ew-resize":Wt.Util._inRange(n,315-22.5,315+22.5)?"nwse-resize":(Wt.Util.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var N2=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function fV(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function KT(t,e,r){const n=r.x+(t.x-r.x)*Math.cos(e)-(t.y-r.y)*Math.sin(e),i=r.y+(t.x-r.x)*Math.sin(e)+(t.y-r.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:n,y:i}}function pV(t,e){const r=fV(t);return KT(t,e,r)}function gV(t,e,r){let n=e;for(let i=0;i<t.length;i++){const o=ao.Konva.getAngle(t[i]),a=Math.abs(o-e)%(Math.PI*2);Math.min(a,Math.PI*2-a)<r&&(n=o)}return n}let Jv=0;class Pt extends nb.Group{constructor(e){super(e),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(lV,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return Wt.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return XT+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();const r=e.filter(i=>i.isAncestorOf(this)?(Wt.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);this._nodes=e=r,e.length===1&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(i=>{const o=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()},a=i._attrsAffectingSize.map(s=>s+"Change."+this._getEventNamespace()).join(" ");i.on(a,o),i.on(cV.map(s=>s+`.${this._getEventNamespace()}`).join(" "),o),i.on(`absoluteTransformChange.${this._getEventNamespace()}`,o),this._proxyDrag(i)}),this._resetTransformCache();var n=!!this.findOne(".top-left");return n&&this.update(),this}_proxyDrag(e){let r;e.on(`dragstart.${this._getEventNamespace()}`,n=>{r=e.getAbsolutePosition(),!this.isDragging()&&e!==this.findOne(".back")&&this.startDrag(n,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!r)return;const i=e.getAbsolutePosition(),o=i.x-r.x,a=i.y-r.y;this.nodes().forEach(s=>{if(s===e||s.isDragging())return;const c=s.getAbsolutePosition();s.setAbsolutePosition({x:c.x+o,y:c.y+a}),s.startDrag(n)}),r=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(e=>{e.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(ib),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(ib,this.__getNodeRect)}__getNodeShape(e,r=this.rotation(),n){var i=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=e.getAbsoluteScale(n),a=e.getAbsolutePosition(n),s=i.x*o.x-e.offsetX()*o.x,c=i.y*o.y-e.offsetY()*o.y;const d=(ao.Konva.getAngle(e.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),h={x:a.x+s*Math.cos(d)+c*Math.sin(-d),y:a.y+c*Math.cos(d)+s*Math.sin(d),width:i.width*o.x,height:i.height*o.y,rotation:d};return KT(h,-ao.Konva.getAngle(r),{x:0,y:0})}__getNodeRect(){var e=this.getNode();if(!e)return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const r=[];this.nodes().map(d=>{const h=d.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var C=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}],v=d.getAbsoluteTransform();C.forEach(function(g){var m=v.point(g);r.push(m)})});const n=new Wt.Transform;n.rotate(-ao.Konva.getAngle(this.rotation()));var i=1/0,o=1/0,a=-1/0,s=-1/0;r.forEach(function(d){var h=n.point(d);i===void 0&&(i=a=h.x,o=s=h.y),i=Math.min(i,h.x),o=Math.min(o,h.y),a=Math.max(a,h.x),s=Math.max(s,h.y)}),n.invert();const c=n.point({x:i,y:o});return{x:c.x,y:c.y,width:a-i,height:s-o,rotation:ao.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(),N2.forEach(e=>{this._createAnchor(e)}),this._createAnchor("rotater")}_createAnchor(e){var r=new aV.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:dV?10:"auto"}),n=this;r.on("mousedown touchstart",function(i){n._handleMouseDown(i)}),r.on("dragstart",i=>{r.stopDrag(),i.cancelBubble=!0}),r.on("dragend",i=>{i.cancelBubble=!0}),r.on("mouseenter",()=>{var i=ao.Konva.getAngle(this.rotation()),o=this.rotateAnchorCursor(),a=hV(e,i,o);r.getStage().content&&(r.getStage().content.style.cursor=a),this._cursorChange=!0}),r.on("mouseout",()=>{r.getStage().content&&(r.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(r)}_createBack(){var e=new oV.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(r,n){var i=n.getParent(),o=i.padding();r.beginPath(),r.rect(-o,-o,n.width()+o*2,n.height()+o*2),r.moveTo(n.width()/2,-o),i.rotateEnabled()&&i.rotateLineVisible()&&r.lineTo(n.width()/2,-i.rotateAnchorOffset()*Wt.Util._sign(n.height())-o),r.fillStrokeShape(n)},hitFunc:(r,n)=>{if(this.shouldOverdrawWholeArea()){var i=this.padding();r.beginPath(),r.rect(-i,-i,n.width()+i*2,n.height()+i*2),r.fillStrokeShape(n)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",r=>{r.cancelBubble=!0}),e.on("dragmove",r=>{r.cancelBubble=!0}),e.on("dragend",r=>{r.cancelBubble=!0}),this.on("dragmove",r=>{this.update()})}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(" ")[0];var r=this._getNodeRect(),n=r.width,i=r.height,o=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));this.sin=Math.abs(i/o),this.cos=Math.abs(n/o),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;var a=e.target.getAbsolutePosition(),s=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},Jv++,this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach(c=>{c._fire("transformstart",{evt:e.evt,target:c})})}_handleMouseMove(e){var r,n,i,o=this.findOne("."+this._movingAnchorName),a=o.getStage();a.setPointersPositions(e);const s=a.getPointerPosition();let c={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const d=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(c=this.anchorDragBoundFunc()(d,c,e)),o.setAbsolutePosition(c);const h=o.getAbsolutePosition();if(!(d.x===h.x&&d.y===h.y)){if(this._movingAnchorName==="rotater"){var C=this._getNodeRect();r=o.x()-C.width/2,n=-o.y()+C.height/2;let B=Math.atan2(-n,r)+Math.PI/2;C.height<0&&(B-=Math.PI);var v=ao.Konva.getAngle(this.rotation());const Y=v+B,W=ao.Konva.getAngle(this.rotationSnapTolerance()),ee=gV(this.rotationSnaps(),Y,W)-C.rotation,K=pV(C,ee);this._fitNodesInto(K,e);return}var g=this.shiftBehavior(),m;g==="inverted"?m=this.keepRatio()&&!e.shiftKey:g==="none"?m=this.keepRatio():m=this.keepRatio()||e.shiftKey;var f=this.centeredScaling()||e.altKey;if(this._movingAnchorName==="top-left"){if(m){var w=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(w.x-o.x(),2)+Math.pow(w.y-o.y(),2));var x=this.findOne(".top-left").x()>w.x?-1:1,b=this.findOne(".top-left").y()>w.y?-1:1;r=i*this.cos*x,n=i*this.sin*b,this.findOne(".top-left").x(w.x-r),this.findOne(".top-left").y(w.y-n)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(o.y());else if(this._movingAnchorName==="top-right"){if(m){var w=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(o.x()-w.x,2)+Math.pow(w.y-o.y(),2));var x=this.findOne(".top-right").x()<w.x?-1:1,b=this.findOne(".top-right").y()>w.y?-1:1;r=i*this.cos*x,n=i*this.sin*b,this.findOne(".top-right").x(w.x+r),this.findOne(".top-right").y(w.y-n)}var O=o.position();this.findOne(".top-left").y(O.y),this.findOne(".bottom-right").x(O.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(o.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(o.x());else if(this._movingAnchorName==="bottom-left"){if(m){var w=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(w.x-o.x(),2)+Math.pow(o.y()-w.y,2));var x=w.x<o.x()?-1:1,b=o.y()<w.y?-1:1;r=i*this.cos*x,n=i*this.sin*b,o.x(w.x-r),o.y(w.y+n)}O=o.position(),this.findOne(".top-left").x(O.x),this.findOne(".bottom-right").y(O.y)}else if(this._movingAnchorName==="bottom-center")this.findOne(".bottom-right").y(o.y());else if(this._movingAnchorName==="bottom-right"){if(m){var w=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(o.x()-w.x,2)+Math.pow(o.y()-w.y,2));var x=this.findOne(".bottom-right").x()<w.x?-1:1,b=this.findOne(".bottom-right").y()<w.y?-1:1;r=i*this.cos*x,n=i*this.sin*b,this.findOne(".bottom-right").x(w.x+r),this.findOne(".bottom-right").y(w.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var f=this.centeredScaling()||e.altKey;if(f){var S=this.findOne(".top-left"),E=this.findOne(".bottom-right"),I=S.x(),R=S.y(),k=this.getWidth()-E.x(),N=this.getHeight()-E.y();E.move({x:-I,y:-R}),S.move({x:k,y:N})}var T=this.findOne(".top-left").getAbsolutePosition();r=T.x,n=T.y;var D=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),z=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:r,y:n,width:D,height:z,rotation:ao.Konva.getAngle(this.rotation())},e)}}_handleMouseUp(e){this._removeEvents(e)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(e){var r;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));var n=this.getNode();Jv--,this._fire("transformend",{evt:e,target:n}),(r=this.getLayer())===null||r===void 0||r.batchDraw(),n&&this._nodes.forEach(i=>{var o;i._fire("transformend",{evt:e,target:i}),(o=i.getLayer())===null||o===void 0||o.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(e,r){var n=this._getNodeRect();const i=1;if(Wt.Util._inRange(e.width,-this.padding()*2-i,i)){this.update();return}if(Wt.Util._inRange(e.height,-this.padding()*2-i,i)){this.update();return}var o=new Wt.Transform;if(o.rotate(ao.Konva.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const v=o.point({x:-this.padding()*2,y:0});e.x+=v.x,e.y+=v.y,e.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=v.x,this._anchorDragOffset.y-=v.y}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const v=o.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=v.x,this._anchorDragOffset.y-=v.y,e.width+=this.padding()*2}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const v=o.point({x:0,y:-this.padding()*2});e.x+=v.x,e.y+=v.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=v.x,this._anchorDragOffset.y-=v.y,e.height+=this.padding()*2}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const v=o.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=v.x,this._anchorDragOffset.y-=v.y,e.height+=this.padding()*2}if(this.boundBoxFunc()){const v=this.boundBoxFunc()(n,e);v?e=v:Wt.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const a=1e7,s=new Wt.Transform;s.translate(n.x,n.y),s.rotate(n.rotation),s.scale(n.width/a,n.height/a);const c=new Wt.Transform,d=e.width/a,h=e.height/a;this.flipEnabled()===!1?(c.translate(e.x,e.y),c.rotate(e.rotation),c.translate(e.width<0?e.width:0,e.height<0?e.height:0),c.scale(Math.abs(d),Math.abs(h))):(c.translate(e.x,e.y),c.rotate(e.rotation),c.scale(d,h));const C=c.multiply(s.invert());this._nodes.forEach(v=>{var g;const m=v.getParent().getAbsoluteTransform(),w=v.getTransform().copy();w.translate(v.offsetX(),v.offsetY());const x=new Wt.Transform;x.multiply(m.copy().invert()).multiply(C).multiply(m).multiply(w);const b=x.decompose();v.setAttrs(b),(g=v.getLayer())===null||g===void 0||g.batchDraw()}),this.rotation(Wt.Util._getRotation(e.rotation)),this._nodes.forEach(v=>{this._fire("transform",{evt:r,target:v}),v._fire("transform",{evt:r,target:v})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,r){this.findOne(e).setAttrs(r)}update(){var e,r=this._getNodeRect();this.rotation(Wt.Util._getRotation(r.rotation));var n=r.width,i=r.height,o=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),c=this.anchorSize();const d=this.find("._anchor");d.forEach(C=>{C.setAttrs({width:c,height:c,offsetX:c/2,offsetY:c/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:c/2+s,offsetY:c/2+s,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:c/2+s,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:c/2-s,offsetY:c/2+s,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:c/2+s,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:i/2,offsetX:c/2-s,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:c/2+s,offsetY:c/2-s,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:i,offsetY:c/2-s,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:i,offsetX:c/2-s,offsetY:c/2-s,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*Wt.Util._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const h=this.anchorStyleFunc();h&&d.forEach(C=>{h(C)}),(e=this.getLayer())===null||e===void 0||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),nb.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return rb.Node.prototype.toObject.call(this)}clone(e){var r=rb.Node.prototype.clone.call(this,e);return r}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}Wg.Transformer=Pt;Pt.isTransforming=()=>Jv>0;function mV(t){return t instanceof Array||Wt.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(e){N2.indexOf(e)===-1&&Wt.Util.warn("Unknown anchor name: "+e+". Available names are: "+N2.join(", "))}),t||[]}Pt.prototype.className="Transformer";(0,sV._registerNode)(Pt);Dt.Factory.addGetterSetter(Pt,"enabledAnchors",N2,mV);Dt.Factory.addGetterSetter(Pt,"flipEnabled",!0,(0,Ks.getBooleanValidator)());Dt.Factory.addGetterSetter(Pt,"resizeEnabled",!0);Dt.Factory.addGetterSetter(Pt,"anchorSize",10,(0,Ks.getNumberValidator)());Dt.Factory.addGetterSetter(Pt,"rotateEnabled",!0);Dt.Factory.addGetterSetter(Pt,"rotateLineVisible",!0);Dt.Factory.addGetterSetter(Pt,"rotationSnaps",[]);Dt.Factory.addGetterSetter(Pt,"rotateAnchorOffset",50,(0,Ks.getNumberValidator)());Dt.Factory.addGetterSetter(Pt,"rotateAnchorCursor","crosshair");Dt.Factory.addGetterSetter(Pt,"rotationSnapTolerance",5,(0,Ks.getNumberValidator)());Dt.Factory.addGetterSetter(Pt,"borderEnabled",!0);Dt.Factory.addGetterSetter(Pt,"anchorStroke","rgb(0, 161, 255)");Dt.Factory.addGetterSetter(Pt,"anchorStrokeWidth",1,(0,Ks.getNumberValidator)());Dt.Factory.addGetterSetter(Pt,"anchorFill","white");Dt.Factory.addGetterSetter(Pt,"anchorCornerRadius",0,(0,Ks.getNumberValidator)());Dt.Factory.addGetterSetter(Pt,"borderStroke","rgb(0, 161, 255)");Dt.Factory.addGetterSetter(Pt,"borderStrokeWidth",1,(0,Ks.getNumberValidator)());Dt.Factory.addGetterSetter(Pt,"borderDash");Dt.Factory.addGetterSetter(Pt,"keepRatio",!0);Dt.Factory.addGetterSetter(Pt,"shiftBehavior","default");Dt.Factory.addGetterSetter(Pt,"centeredScaling",!1);Dt.Factory.addGetterSetter(Pt,"ignoreStroke",!1);Dt.Factory.addGetterSetter(Pt,"padding",0,(0,Ks.getNumberValidator)());Dt.Factory.addGetterSetter(Pt,"node");Dt.Factory.addGetterSetter(Pt,"nodes");Dt.Factory.addGetterSetter(Pt,"boundBoxFunc");Dt.Factory.addGetterSetter(Pt,"anchorDragBoundFunc");Dt.Factory.addGetterSetter(Pt,"anchorStyleFunc");Dt.Factory.addGetterSetter(Pt,"shouldOverdrawWholeArea",!1);Dt.Factory.addGetterSetter(Pt,"useSingleNodeRotation",!0);Dt.Factory.backCompat(Pt,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});var Xg={};Object.defineProperty(Xg,"__esModule",{value:!0});Xg.Wedge=void 0;const Kg=ot,vV=tn,yV=Ct,YT=Be,CV=Ct;class Ba extends vV.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,yV.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}Xg.Wedge=Ba;Ba.prototype.className="Wedge";Ba.prototype._centroid=!0;Ba.prototype._attrsAffectingSize=["radius"];(0,CV._registerNode)(Ba);Kg.Factory.addGetterSetter(Ba,"radius",0,(0,YT.getNumberValidator)());Kg.Factory.addGetterSetter(Ba,"angle",0,(0,YT.getNumberValidator)());Kg.Factory.addGetterSetter(Ba,"clockwise",!1);Kg.Factory.backCompat(Ba,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var Yg={};Object.defineProperty(Yg,"__esModule",{value:!0});Yg.Blur=void 0;const ob=ot,wV=pr,SV=Be;function ab(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var bV=[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],_V=[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 xV(t,e){var r=t.data,n=t.width,i=t.height,o,a,s,c,d,h,C,v,g,m,w,x,b,O,f,S,E,I,R,k,N,T,D,z,B=e+e+1,Y=n-1,W=i-1,q=e+1,ee=q*(q+1)/2,K=new ab,ue=null,ne=K,ae=null,J=null,Q=bV[e],te=_V[e];for(s=1;s<B;s++)ne=ne.next=new ab,s===q&&(ue=ne);for(ne.next=K,C=h=0,a=0;a<i;a++){for(S=E=I=R=v=g=m=w=0,x=q*(k=r[h]),b=q*(N=r[h+1]),O=q*(T=r[h+2]),f=q*(D=r[h+3]),v+=ee*k,g+=ee*N,m+=ee*T,w+=ee*D,ne=K,s=0;s<q;s++)ne.r=k,ne.g=N,ne.b=T,ne.a=D,ne=ne.next;for(s=1;s<q;s++)c=h+((Y<s?Y:s)<<2),v+=(ne.r=k=r[c])*(z=q-s),g+=(ne.g=N=r[c+1])*z,m+=(ne.b=T=r[c+2])*z,w+=(ne.a=D=r[c+3])*z,S+=k,E+=N,I+=T,R+=D,ne=ne.next;for(ae=K,J=ue,o=0;o<n;o++)r[h+3]=D=w*Q>>te,D!==0?(D=255/D,r[h]=(v*Q>>te)*D,r[h+1]=(g*Q>>te)*D,r[h+2]=(m*Q>>te)*D):r[h]=r[h+1]=r[h+2]=0,v-=x,g-=b,m-=O,w-=f,x-=ae.r,b-=ae.g,O-=ae.b,f-=ae.a,c=C+((c=o+e+1)<Y?c:Y)<<2,S+=ae.r=r[c],E+=ae.g=r[c+1],I+=ae.b=r[c+2],R+=ae.a=r[c+3],v+=S,g+=E,m+=I,w+=R,ae=ae.next,x+=k=J.r,b+=N=J.g,O+=T=J.b,f+=D=J.a,S-=k,E-=N,I-=T,R-=D,J=J.next,h+=4;C+=n}for(o=0;o<n;o++){for(E=I=R=S=g=m=w=v=0,h=o<<2,x=q*(k=r[h]),b=q*(N=r[h+1]),O=q*(T=r[h+2]),f=q*(D=r[h+3]),v+=ee*k,g+=ee*N,m+=ee*T,w+=ee*D,ne=K,s=0;s<q;s++)ne.r=k,ne.g=N,ne.b=T,ne.a=D,ne=ne.next;for(d=n,s=1;s<=e;s++)h=d+o<<2,v+=(ne.r=k=r[h])*(z=q-s),g+=(ne.g=N=r[h+1])*z,m+=(ne.b=T=r[h+2])*z,w+=(ne.a=D=r[h+3])*z,S+=k,E+=N,I+=T,R+=D,ne=ne.next,s<W&&(d+=n);for(h=o,ae=K,J=ue,a=0;a<i;a++)c=h<<2,r[c+3]=D=w*Q>>te,D>0?(D=255/D,r[c]=(v*Q>>te)*D,r[c+1]=(g*Q>>te)*D,r[c+2]=(m*Q>>te)*D):r[c]=r[c+1]=r[c+2]=0,v-=x,g-=b,m-=O,w-=f,x-=ae.r,b-=ae.g,O-=ae.b,f-=ae.a,c=o+((c=a+q)<W?c:W)*n<<2,v+=S+=ae.r=r[c],g+=E+=ae.g=r[c+1],m+=I+=ae.b=r[c+2],w+=R+=ae.a=r[c+3],ae=ae.next,x+=k=J.r,b+=N=J.g,O+=T=J.b,f+=D=J.a,S-=k,E-=N,I-=T,R-=D,J=J.next,h+=n}}const EV=function(e){var r=Math.round(this.blurRadius());r>0&&xV(e,r)};Yg.Blur=EV;ob.Factory.addGetterSetter(wV.Node,"blurRadius",0,(0,SV.getNumberValidator)(),ob.Factory.afterSetFilter);var Zg={};Object.defineProperty(Zg,"__esModule",{value:!0});Zg.Brighten=void 0;const sb=ot,OV=pr,PV=Be,kV=function(t){var e=this.brightness()*255,r=t.data,n=r.length,i;for(i=0;i<n;i+=4)r[i]+=e,r[i+1]+=e,r[i+2]+=e};Zg.Brighten=kV;sb.Factory.addGetterSetter(OV.Node,"brightness",0,(0,PV.getNumberValidator)(),sb.Factory.afterSetFilter);var qg={};Object.defineProperty(qg,"__esModule",{value:!0});qg.Contrast=void 0;const lb=ot,TV=pr,IV=Be,AV=function(t){var e=Math.pow((this.contrast()+100)/100,2),r=t.data,n=r.length,i=150,o=150,a=150,s;for(s=0;s<n;s+=4)i=r[s],o=r[s+1],a=r[s+2],i/=255,i-=.5,i*=e,i+=.5,i*=255,o/=255,o-=.5,o*=e,o+=.5,o*=255,a/=255,a-=.5,a*=e,a+=.5,a*=255,i=i<0?0:i>255?255:i,o=o<0?0:o>255?255:o,a=a<0?0:a>255?255:a,r[s]=i,r[s+1]=o,r[s+2]=a};qg.Contrast=AV;lb.Factory.addGetterSetter(TV.Node,"contrast",0,(0,IV.getNumberValidator)(),lb.Factory.afterSetFilter);var Qg={};Object.defineProperty(Qg,"__esModule",{value:!0});Qg.Emboss=void 0;const Ls=ot,Jg=pr,LV=Pr,ZT=Be,MV=function(t){var e=this.embossStrength()*10,r=this.embossWhiteLevel()*255,n=this.embossDirection(),i=this.embossBlend(),o=0,a=0,s=t.data,c=t.width,d=t.height,h=c*4,C=d;switch(n){case"top-left":o=-1,a=-1;break;case"top":o=-1,a=0;break;case"top-right":o=-1,a=1;break;case"right":o=0,a=1;break;case"bottom-right":o=1,a=1;break;case"bottom":o=1,a=0;break;case"bottom-left":o=1,a=-1;break;case"left":o=0,a=-1;break;default:LV.Util.error("Unknown emboss direction: "+n)}do{var v=(C-1)*h,g=o;C+g<1&&(g=0),C+g>d&&(g=0);var m=(C-1+g)*c*4,w=c;do{var x=v+(w-1)*4,b=a;w+b<1&&(b=0),w+b>c&&(b=0);var O=m+(w-1+b)*4,f=s[x]-s[O],S=s[x+1]-s[O+1],E=s[x+2]-s[O+2],I=f,R=I>0?I:-I,k=S>0?S:-S,N=E>0?E:-E;if(k>R&&(I=S),N>R&&(I=E),I*=e,i){var T=s[x]+I,D=s[x+1]+I,z=s[x+2]+I;s[x]=T>255?255:T<0?0:T,s[x+1]=D>255?255:D<0?0:D,s[x+2]=z>255?255:z<0?0:z}else{var B=r-I;B<0?B=0:B>255&&(B=255),s[x]=s[x+1]=s[x+2]=B}}while(--w)}while(--C)};Qg.Emboss=MV;Ls.Factory.addGetterSetter(Jg.Node,"embossStrength",.5,(0,ZT.getNumberValidator)(),Ls.Factory.afterSetFilter);Ls.Factory.addGetterSetter(Jg.Node,"embossWhiteLevel",.5,(0,ZT.getNumberValidator)(),Ls.Factory.afterSetFilter);Ls.Factory.addGetterSetter(Jg.Node,"embossDirection","top-left",null,Ls.Factory.afterSetFilter);Ls.Factory.addGetterSetter(Jg.Node,"embossBlend",!1,null,Ls.Factory.afterSetFilter);var e3={};Object.defineProperty(e3,"__esModule",{value:!0});e3.Enhance=void 0;const cb=ot,RV=pr,NV=Be;function nm(t,e,r,n,i){var o=r-e,a=i-n,s;return o===0?n+a/2:a===0?n:(s=(t-e)/o,s=a*s+n,s)}const FV=function(t){var e=t.data,r=e.length,n=e[0],i=n,o,a=e[1],s=a,c,d=e[2],h=d,C,v,g=this.enhance();if(g!==0){for(v=0;v<r;v+=4)o=e[v+0],o<n?n=o:o>i&&(i=o),c=e[v+1],c<a?a=c:c>s&&(s=c),C=e[v+2],C<d?d=C:C>h&&(h=C);i===n&&(i=255,n=0),s===a&&(s=255,a=0),h===d&&(h=255,d=0);var m,w,x,b,O,f,S,E,I;for(g>0?(w=i+g*(255-i),x=n-g*(n-0),O=s+g*(255-s),f=a-g*(a-0),E=h+g*(255-h),I=d-g*(d-0)):(m=(i+n)*.5,w=i+g*(i-m),x=n+g*(n-m),b=(s+a)*.5,O=s+g*(s-b),f=a+g*(a-b),S=(h+d)*.5,E=h+g*(h-S),I=d+g*(d-S)),v=0;v<r;v+=4)e[v+0]=nm(e[v+0],n,i,x,w),e[v+1]=nm(e[v+1],a,s,f,O),e[v+2]=nm(e[v+2],d,h,I,E)}};e3.Enhance=FV;cb.Factory.addGetterSetter(RV.Node,"enhance",0,(0,NV.getNumberValidator)(),cb.Factory.afterSetFilter);var t3={};Object.defineProperty(t3,"__esModule",{value:!0});t3.Grayscale=void 0;const DV=function(t){var e=t.data,r=e.length,n,i;for(n=0;n<r;n+=4)i=.34*e[n]+.5*e[n+1]+.16*e[n+2],e[n]=i,e[n+1]=i,e[n+2]=i};t3.Grayscale=DV;var r3={};Object.defineProperty(r3,"__esModule",{value:!0});r3.HSL=void 0;const Zu=ot,Q8=pr,J8=Be;Zu.Factory.addGetterSetter(Q8.Node,"hue",0,(0,J8.getNumberValidator)(),Zu.Factory.afterSetFilter);Zu.Factory.addGetterSetter(Q8.Node,"saturation",0,(0,J8.getNumberValidator)(),Zu.Factory.afterSetFilter);Zu.Factory.addGetterSetter(Q8.Node,"luminance",0,(0,J8.getNumberValidator)(),Zu.Factory.afterSetFilter);const jV=function(t){var e=t.data,r=e.length,n=1,i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a=this.luminance()*127,s,c=n*i*Math.cos(o*Math.PI/180),d=n*i*Math.sin(o*Math.PI/180),h=.299*n+.701*c+.167*d,C=.587*n-.587*c+.33*d,v=.114*n-.114*c-.497*d,g=.299*n-.299*c-.328*d,m=.587*n+.413*c+.035*d,w=.114*n-.114*c+.293*d,x=.299*n-.3*c+1.25*d,b=.587*n-.586*c-1.05*d,O=.114*n+.886*c-.2*d,f,S,E,I;for(s=0;s<r;s+=4)f=e[s+0],S=e[s+1],E=e[s+2],I=e[s+3],e[s+0]=h*f+C*S+v*E+a,e[s+1]=g*f+m*S+w*E+a,e[s+2]=x*f+b*S+O*E+a,e[s+3]=I};r3.HSL=jV;var n3={};Object.defineProperty(n3,"__esModule",{value:!0});n3.HSV=void 0;const qu=ot,e7=pr,t7=Be,zV=function(t){var e=t.data,r=e.length,n=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),o=Math.abs(this.hue()+360)%360,a,s=n*i*Math.cos(o*Math.PI/180),c=n*i*Math.sin(o*Math.PI/180),d=.299*n+.701*s+.167*c,h=.587*n-.587*s+.33*c,C=.114*n-.114*s-.497*c,v=.299*n-.299*s-.328*c,g=.587*n+.413*s+.035*c,m=.114*n-.114*s+.293*c,w=.299*n-.3*s+1.25*c,x=.587*n-.586*s-1.05*c,b=.114*n+.886*s-.2*c,O,f,S,E;for(a=0;a<r;a+=4)O=e[a+0],f=e[a+1],S=e[a+2],E=e[a+3],e[a+0]=d*O+h*f+C*S,e[a+1]=v*O+g*f+m*S,e[a+2]=w*O+x*f+b*S,e[a+3]=E};n3.HSV=zV;qu.Factory.addGetterSetter(e7.Node,"hue",0,(0,t7.getNumberValidator)(),qu.Factory.afterSetFilter);qu.Factory.addGetterSetter(e7.Node,"saturation",0,(0,t7.getNumberValidator)(),qu.Factory.afterSetFilter);qu.Factory.addGetterSetter(e7.Node,"value",0,(0,t7.getNumberValidator)(),qu.Factory.afterSetFilter);var i3={};Object.defineProperty(i3,"__esModule",{value:!0});i3.Invert=void 0;const $V=function(t){var e=t.data,r=e.length,n;for(n=0;n<r;n+=4)e[n]=255-e[n],e[n+1]=255-e[n+1],e[n+2]=255-e[n+2]};i3.Invert=$V;var o3={};Object.defineProperty(o3,"__esModule",{value:!0});o3.Kaleidoscope=void 0;const F2=ot,qT=pr,ub=Pr,QT=Be;var BV=function(t,e,r){var n=t.data,i=e.data,o=t.width,a=t.height,s=r.polarCenterX||o/2,c=r.polarCenterY||a/2,d,h,C,v=0,g=0,m=0,w=0,x,b=Math.sqrt(s*s+c*c);h=o-s,C=a-c,x=Math.sqrt(h*h+C*C),b=x>b?x:b;var O=a,f=o,S,E,I=360/f*Math.PI/180,R,k;for(E=0;E<f;E+=1)for(R=Math.sin(E*I),k=Math.cos(E*I),S=0;S<O;S+=1)h=Math.floor(s+b*S/O*k),C=Math.floor(c+b*S/O*R),d=(C*o+h)*4,v=n[d+0],g=n[d+1],m=n[d+2],w=n[d+3],d=(E+S*o)*4,i[d+0]=v,i[d+1]=g,i[d+2]=m,i[d+3]=w},HV=function(t,e,r){var n=t.data,i=e.data,o=t.width,a=t.height,s=r.polarCenterX||o/2,c=r.polarCenterY||a/2,d,h,C,v,g,m=0,w=0,x=0,b=0,O,f=Math.sqrt(s*s+c*c);h=o-s,C=a-c,O=Math.sqrt(h*h+C*C),f=O>f?O:f;var S=a,E=o,I,R,k=0,N,T;for(h=0;h<o;h+=1)for(C=0;C<a;C+=1)v=h-s,g=C-c,I=Math.sqrt(v*v+g*g)*S/f,R=(Math.atan2(g,v)*180/Math.PI+360+k)%360,R=R*E/360,N=Math.floor(R),T=Math.floor(I),d=(T*o+N)*4,m=n[d+0],w=n[d+1],x=n[d+2],b=n[d+3],d=(C*o+h)*4,i[d+0]=m,i[d+1]=w,i[d+2]=x,i[d+3]=b};const GV=function(t){var e=t.width,r=t.height,n,i,o,a,s,c,d,h,C,v,g=Math.round(this.kaleidoscopePower()),m=Math.round(this.kaleidoscopeAngle()),w=Math.floor(e*(m%360)/360);if(!(g<1)){var x=ub.Util.createCanvasElement();x.width=e,x.height=r;var b=x.getContext("2d").getImageData(0,0,e,r);ub.Util.releaseCanvas(x),BV(t,b,{polarCenterX:e/2,polarCenterY:r/2});for(var O=e/Math.pow(2,g);O<=8;)O=O*2,g-=1;O=Math.ceil(O);var f=O,S=0,E=f,I=1;for(w+O>e&&(S=f,E=0,I=-1),i=0;i<r;i+=1)for(n=S;n!==E;n+=I)o=Math.round(n+w)%e,C=(e*i+o)*4,s=b.data[C+0],c=b.data[C+1],d=b.data[C+2],h=b.data[C+3],v=(e*i+n)*4,b.data[v+0]=s,b.data[v+1]=c,b.data[v+2]=d,b.data[v+3]=h;for(i=0;i<r;i+=1)for(f=Math.floor(O),a=0;a<g;a+=1){for(n=0;n<f+1;n+=1)C=(e*i+n)*4,s=b.data[C+0],c=b.data[C+1],d=b.data[C+2],h=b.data[C+3],v=(e*i+f*2-n-1)*4,b.data[v+0]=s,b.data[v+1]=c,b.data[v+2]=d,b.data[v+3]=h;f*=2}HV(b,t,{})}};o3.Kaleidoscope=GV;F2.Factory.addGetterSetter(qT.Node,"kaleidoscopePower",2,(0,QT.getNumberValidator)(),F2.Factory.afterSetFilter);F2.Factory.addGetterSetter(qT.Node,"kaleidoscopeAngle",0,(0,QT.getNumberValidator)(),F2.Factory.afterSetFilter);var a3={};Object.defineProperty(a3,"__esModule",{value:!0});a3.Mask=void 0;const db=ot,VV=pr,UV=Be;function of(t,e,r){var n=(r*t.width+e)*4,i=[];return i.push(t.data[n++],t.data[n++],t.data[n++],t.data[n++]),i}function h0(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}function WV(t){for(var e=[0,0,0],r=0;r<t.length;r++)e[0]+=t[r][0],e[1]+=t[r][1],e[2]+=t[r][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}function XV(t,e){var r=of(t,0,0),n=of(t,t.width-1,0),i=of(t,0,t.height-1),o=of(t,t.width-1,t.height-1),a=e||10;if(h0(r,n)<a&&h0(n,o)<a&&h0(o,i)<a&&h0(i,r)<a){for(var s=WV([n,r,o,i]),c=[],d=0;d<t.width*t.height;d++){var h=h0(s,[t.data[d*4],t.data[d*4+1],t.data[d*4+2]]);c[d]=h<a?0:255}return c}}function KV(t,e){for(var r=0;r<t.width*t.height;r++)t.data[4*r+3]=e[r]}function YV(t,e,r){for(var n=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(n.length)),o=Math.floor(i/2),a=[],s=0;s<r;s++)for(var c=0;c<e;c++){for(var d=s*e+c,h=0,C=0;C<i;C++)for(var v=0;v<i;v++){var g=s+C-o,m=c+v-o;if(g>=0&&g<r&&m>=0&&m<e){var w=g*e+m,x=n[C*i+v];h+=t[w]*x}}a[d]=h===255*8?255:0}return a}function ZV(t,e,r){for(var n=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(n.length)),o=Math.floor(i/2),a=[],s=0;s<r;s++)for(var c=0;c<e;c++){for(var d=s*e+c,h=0,C=0;C<i;C++)for(var v=0;v<i;v++){var g=s+C-o,m=c+v-o;if(g>=0&&g<r&&m>=0&&m<e){var w=g*e+m,x=n[C*i+v];h+=t[w]*x}}a[d]=h>=255*4?255:0}return a}function qV(t,e,r){for(var n=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],i=Math.round(Math.sqrt(n.length)),o=Math.floor(i/2),a=[],s=0;s<r;s++)for(var c=0;c<e;c++){for(var d=s*e+c,h=0,C=0;C<i;C++)for(var v=0;v<i;v++){var g=s+C-o,m=c+v-o;if(g>=0&&g<r&&m>=0&&m<e){var w=g*e+m,x=n[C*i+v];h+=t[w]*x}}a[d]=h}return a}const QV=function(t){var e=this.threshold(),r=XV(t,e);return r&&(r=YV(r,t.width,t.height),r=ZV(r,t.width,t.height),r=qV(r,t.width,t.height),KV(t,r)),t};a3.Mask=QV;db.Factory.addGetterSetter(VV.Node,"threshold",0,(0,UV.getNumberValidator)(),db.Factory.afterSetFilter);var s3={};Object.defineProperty(s3,"__esModule",{value:!0});s3.Noise=void 0;const hb=ot,JV=pr,eU=Be,tU=function(t){var e=this.noise()*255,r=t.data,n=r.length,i=e/2,o;for(o=0;o<n;o+=4)r[o+0]+=i-2*i*Math.random(),r[o+1]+=i-2*i*Math.random(),r[o+2]+=i-2*i*Math.random()};s3.Noise=tU;hb.Factory.addGetterSetter(JV.Node,"noise",.2,(0,eU.getNumberValidator)(),hb.Factory.afterSetFilter);var l3={};Object.defineProperty(l3,"__esModule",{value:!0});l3.Pixelate=void 0;const fb=ot,rU=Pr,nU=pr,iU=Be,oU=function(t){var e=Math.ceil(this.pixelSize()),r=t.width,n=t.height,i,o,a,s,c,d,h,C=Math.ceil(r/e),v=Math.ceil(n/e),g,m,w,x,b,O,f,S=t.data;if(e<=0){rU.Util.error("pixelSize value can not be <= 0");return}for(b=0;b<C;b+=1)for(O=0;O<v;O+=1){for(s=0,c=0,d=0,h=0,g=b*e,m=g+e,w=O*e,x=w+e,f=0,i=g;i<m;i+=1)if(!(i>=r))for(o=w;o<x;o+=1)o>=n||(a=(r*o+i)*4,s+=S[a+0],c+=S[a+1],d+=S[a+2],h+=S[a+3],f+=1);for(s=s/f,c=c/f,d=d/f,h=h/f,i=g;i<m;i+=1)if(!(i>=r))for(o=w;o<x;o+=1)o>=n||(a=(r*o+i)*4,S[a+0]=s,S[a+1]=c,S[a+2]=d,S[a+3]=h)}};l3.Pixelate=oU;fb.Factory.addGetterSetter(nU.Node,"pixelSize",8,(0,iU.getNumberValidator)(),fb.Factory.afterSetFilter);var c3={};Object.defineProperty(c3,"__esModule",{value:!0});c3.Posterize=void 0;const pb=ot,aU=pr,sU=Be,lU=function(t){var e=Math.round(this.levels()*254)+1,r=t.data,n=r.length,i=255/e,o;for(o=0;o<n;o+=1)r[o]=Math.floor(r[o]/i)*i};c3.Posterize=lU;pb.Factory.addGetterSetter(aU.Node,"levels",.5,(0,sU.getNumberValidator)(),pb.Factory.afterSetFilter);var u3={};Object.defineProperty(u3,"__esModule",{value:!0});u3.RGB=void 0;const D2=ot,r7=pr,cU=Be,uU=function(t){var e=t.data,r=e.length,n=this.red(),i=this.green(),o=this.blue(),a,s;for(a=0;a<r;a+=4)s=(.34*e[a]+.5*e[a+1]+.16*e[a+2])/255,e[a]=s*n,e[a+1]=s*i,e[a+2]=s*o,e[a+3]=e[a+3]};u3.RGB=uU;D2.Factory.addGetterSetter(r7.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});D2.Factory.addGetterSetter(r7.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});D2.Factory.addGetterSetter(r7.Node,"blue",0,cU.RGBComponent,D2.Factory.afterSetFilter);var d3={};Object.defineProperty(d3,"__esModule",{value:!0});d3.RGBA=void 0;const dh=ot,h3=pr,dU=Be,hU=function(t){var e=t.data,r=e.length,n=this.red(),i=this.green(),o=this.blue(),a=this.alpha(),s,c;for(s=0;s<r;s+=4)c=1-a,e[s]=n*a+e[s]*c,e[s+1]=i*a+e[s+1]*c,e[s+2]=o*a+e[s+2]*c};d3.RGBA=hU;dh.Factory.addGetterSetter(h3.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});dh.Factory.addGetterSetter(h3.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)});dh.Factory.addGetterSetter(h3.Node,"blue",0,dU.RGBComponent,dh.Factory.afterSetFilter);dh.Factory.addGetterSetter(h3.Node,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t});var f3={};Object.defineProperty(f3,"__esModule",{value:!0});f3.Sepia=void 0;const fU=function(t){var e=t.data,r=e.length,n,i,o,a;for(n=0;n<r;n+=4)i=e[n+0],o=e[n+1],a=e[n+2],e[n+0]=Math.min(255,i*.393+o*.769+a*.189),e[n+1]=Math.min(255,i*.349+o*.686+a*.168),e[n+2]=Math.min(255,i*.272+o*.534+a*.131)};f3.Sepia=fU;var p3={};Object.defineProperty(p3,"__esModule",{value:!0});p3.Solarize=void 0;const pU=function(t){var e=t.data,r=t.width,n=t.height,i=r*4,o=n;do{var a=(o-1)*i,s=r;do{var c=a+(s-1)*4,d=e[c],h=e[c+1],C=e[c+2];d>127&&(d=255-d),h>127&&(h=255-h),C>127&&(C=255-C),e[c]=d,e[c+1]=h,e[c+2]=C}while(--s)}while(--o)};p3.Solarize=pU;var g3={};Object.defineProperty(g3,"__esModule",{value:!0});g3.Threshold=void 0;const gb=ot,gU=pr,mU=Be,vU=function(t){var e=this.threshold()*255,r=t.data,n=r.length,i;for(i=0;i<n;i+=1)r[i]=r[i]<e?0:255};g3.Threshold=vU;gb.Factory.addGetterSetter(gU.Node,"threshold",.5,(0,mU.getNumberValidator)(),gb.Factory.afterSetFilter);Object.defineProperty(xg,"__esModule",{value:!0});xg.Konva=void 0;const mb=vT,yU=Ig,CU=Mg,wU=Fg,SU=Dg,bU=jg,vb=Yu,_U=Ih,xU=Cd,EU=Lh,OU=Bg,PU=Hg,kU=Gg,TU=Vg,IU=Kl,AU=Ug,LU=Wg,MU=Xg,RU=Yg,NU=Zg,FU=qg,DU=Qg,jU=e3,zU=t3,$U=r3,BU=n3,HU=i3,GU=o3,VU=a3,UU=s3,WU=l3,XU=c3,KU=u3,YU=d3,ZU=f3,qU=p3,QU=g3;xg.Konva=mb.Konva.Util._assign(mb.Konva,{Arc:yU.Arc,Arrow:CU.Arrow,Circle:wU.Circle,Ellipse:SU.Ellipse,Image:bU.Image,Label:vb.Label,Tag:vb.Tag,Line:_U.Line,Path:xU.Path,Rect:EU.Rect,RegularPolygon:OU.RegularPolygon,Ring:PU.Ring,Sprite:kU.Sprite,Star:TU.Star,Text:IU.Text,TextPath:AU.TextPath,Transformer:LU.Transformer,Wedge:MU.Wedge,Filters:{Blur:RU.Blur,Brighten:NU.Brighten,Contrast:FU.Contrast,Emboss:DU.Emboss,Enhance:jU.Enhance,Grayscale:zU.Grayscale,HSL:$U.HSL,HSV:BU.HSV,Invert:HU.Invert,Kaleidoscope:GU.Kaleidoscope,Mask:VU.Mask,Noise:UU.Noise,Pixelate:WU.Pixelate,Posterize:XU.Posterize,RGB:KU.RGB,RGBA:YU.RGBA,Sepia:ZU.Sepia,Solarize:qU.Solarize,Threshold:QU.Threshold}});var JU=B8.exports;Object.defineProperty(JU,"__esModule",{value:!0});const eW=xg;B8.exports=eW.Konva;var tW=B8.exports;const br=ql(tW);function rW(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=nW(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){a=!0},f:function s(){try{o||r.return==null||r.return()}finally{if(a)throw s}}}}function nW(t,e){if(t){if(typeof t=="string")return yb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yb(t,e):void 0}}function yb(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Ce={apply:function(e){for(var r=e.data,n=r.length,i=arguments.length,o=Array(1<i?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];for(var s=0;s<n;s+=4){var c,d=rW(o);try{for(d.s();!(c=d.n()).done;){var h=c.value,C=h([r[s],r[s+1],r[s+2]]),v=Ie(C,3);r[s]=v[0],r[s+1]=v[1],r[s+2]=v[2]}}catch(g){d.e(g)}finally{d.f()}}},brightness:function(e){return function(r){var n=e;return n=1<n?1:n,n=-1>n?-1:n,n=~~(255*n),[r[0]+n,r[1]+n,r[2]+n]}},contrast:function(e){return function(r){var n=e;n*=255;var i=259*(n+255)/(255*(259-n));return[i*(r[0]-128)+128,i*(r[1]-128)+128,i*(r[2]-128)+128]}},saturation:function(e){return function(r){var n=e;n=-1>n?-1:n;var i=r[0],o=r[1],a=r[2],s=.2989*i+.587*o+.114*a;return[-s*n+i*(1+n),-s*n+o*(1+n),-s*n+a*(1+n)]}},grayscale:function(){return function(e){var r=e[0],n=e[1],i=e[2];return[,,,].fill(.2126*r+.7152*n+.0722*i)}},sepia:function(e){return function(r){var n=r[0],i=r[1],o=r[2];return[n*(1-.607*e)+.769*i*e+.189*o*e,.349*n*e+i*(1-.314*e)+.168*o*e,.272*n*e+.534*i*e+o*(1-.869*e)]}},adjustRGB:function(e){return function(r){return[r[0]*e[0],r[1]*e[1],r[2]*e[2]]}},colorFilter:function(e){return function(r){var n=r[0],i=r[1],o=r[2],a=e[3];return[n-(n-e[0])*a,i-(i-e[1])*a,o-(o-e[2])*a]}}};function n7(t){Ce.apply(t,function(e){var r=(e[0]+e[1]+e[2])/3>100,n=r?255:0;return[n,n,n]})}n7.filterName="BlackAndWhite";var iW=.1,oW=.1,aW=.15;function i7(t){Ce.apply(t,Ce.brightness(iW),Ce.contrast(oW),Ce.saturation(aW))}i7.filterName="Clarendon";var sW=.04,lW=-.15;function o7(t){Ce.apply(t,Ce.sepia(sW),Ce.contrast(lW))}o7.filterName="Gingham";var cW=.1;function a7(t){Ce.apply(t,Ce.grayscale(),Ce.brightness(cW));var e=t.data;e.length}a7.filterName="Moon";var uW=.08,dW=[1,1.03,1.05],hW=.12;function s7(t){Ce.apply(t,Ce.brightness(uW),Ce.adjustRGB(dW),Ce.saturation(hW))}s7.filterName="Lark";var fW=.4,pW=.13,gW=-.05;function l7(t){Ce.apply(t,Ce.sepia(fW),Ce.brightness(pW),Ce.contrast(gW))}l7.filterName="Reyes";var mW=[1.01,1.04,1],vW=.3;function c7(t){Ce.apply(t,Ce.adjustRGB(mW),Ce.saturation(vW))}c7.filterName="Juno";var yW=.1,CW=-.5;function u7(t){Ce.apply(t,Ce.brightness(yW),Ce.saturation(CW))}u7.filterName="Slumber";var wW=[1.04,1,1.02],SW=-.05;function d7(t){Ce.apply(t,Ce.adjustRGB(wW),Ce.saturation(SW))}d7.filterName="Crema";var bW=.05,_W=-.03;function h7(t){Ce.apply(t,Ce.brightness(bW),Ce.saturation(_W))}h7.filterName="Ludwig";var xW=[228,130,225,.13],EW=-.2;function f7(t){Ce.apply(t,Ce.colorFilter(xW),Ce.saturation(EW))}f7.filterName="Aden";var OW=[1.05,1.1,1];function p7(t){Ce.apply(t,Ce.adjustRGB(OW))}p7.filterName="Perpetua";var PW=.3,kW=.15;function g7(t){Ce.apply(t,Ce.saturation(PW),Ce.brightness(kW))}g7.filterName="Amaro";var TW=[230,115,108,.05],IW=.15;function m7(t){Ce.apply(t,Ce.colorFilter(TW),Ce.saturation(IW))}m7.filterName="Mayfair";var AW=[255,170,0,.1],LW=.09,MW=.1;function v7(t){Ce.apply(t,Ce.colorFilter(AW),Ce.brightness(LW),Ce.saturation(MW))}v7.filterName="Rise";var RW=[1,1,1.25],NW=.1,FW=.15;function y7(t){Ce.apply(t,Ce.adjustRGB(RW),Ce.contrast(NW),Ce.brightness(FW))}y7.filterName="Hudson";var DW=[255,225,80,.08],jW=.1,zW=.05;function C7(t){Ce.apply(t,Ce.colorFilter(DW),Ce.saturation(jW),Ce.contrast(zW))}C7.filterName="Valencia";var $W=[255,255,0,.07],BW=.2,HW=.15;function w7(t){Ce.apply(t,Ce.colorFilter($W),Ce.saturation(BW),Ce.contrast(HW))}w7.filterName="XPro2";var GW=-.15,VW=.1;function S7(t){Ce.apply(t,Ce.contrast(GW),Ce.saturation(VW))}S7.filterName="Sierra";var UW=[100,28,210,.03],WW=.1;function b7(t){Ce.apply(t,Ce.grayscale(),Ce.colorFilter(UW),Ce.brightness(WW))}b7.filterName="Willow";var XW=.15,KW=.2;function _7(t){Ce.apply(t,Ce.contrast(XW),Ce.saturation(KW))}_7.filterName="LoFi";var YW=.1,ZW=.15;function x7(t){Ce.apply(t,Ce.contrast(YW),Ce.saturation(ZW))}x7.filterName="Hefe";var qW=[220,115,188,.12],QW=-.05;function E7(t){Ce.apply(t,Ce.colorFilter(qW),Ce.contrast(QW))}E7.filterName="Nashville";var JW=.1,eX=.3;function O7(t){Ce.apply(t,Ce.brightness(JW),Ce.sepia(eX))}O7.filterName="Stinson";var tX=[255,225,0,.05],rX=.06,nX=.06;function P7(t){Ce.apply(t,Ce.colorFilter(tX),Ce.brightness(rX),Ce.contrast(nX))}P7.filterName="Vesper";var iX=[255,165,40,.2];function k7(t){Ce.apply(t,Ce.colorFilter(iX))}k7.filterName="Earlybird";var oX=.2,aX=[140,10,185,.1];function T7(t){Ce.apply(t,Ce.contrast(oX),Ce.colorFilter(aX))}T7.filterName="Brannan";var sX=-.1,lX=-.1;function I7(t){Ce.apply(t,Ce.brightness(sX),Ce.saturation(lX))}I7.filterName="Sutro";var cX=.1,uX=[255,145,0,.2];function A7(t){Ce.apply(t,Ce.sepia(cX),Ce.colorFilter(uX))}A7.filterName="Toaster";var dX=.1,hX=[255,255,0,.2];function L7(t){Ce.apply(t,Ce.brightness(dX),Ce.colorFilter(hX))}L7.filterName="Walden";var fX=[255,25,0,.15],pX=.1;function M7(t){Ce.apply(t,Ce.colorFilter(fX),Ce.brightness(pX))}M7.filterName="NinteenSeventySeven";var gX=[255,140,0,.1],mX=[1.15,1.05,1],vX=.35;function R7(t){Ce.apply(t,Ce.colorFilter(gX),Ce.adjustRGB(mX),Ce.saturation(vX))}R7.filterName="Kelvin";var yX=[225,240,0,.1],CX=.25,wX=.05;function N7(t){Ce.apply(t,Ce.colorFilter(yX),Ce.saturation(CX),Ce.contrast(wX))}N7.filterName="Maven";var SX=.06,bX=.1;function F7(t){Ce.apply(t,Ce.sepia(SX),Ce.brightness(bX))}F7.filterName="Ginza";var _X=.35,xX=.1;function D7(t){Ce.apply(t,Ce.saturation(_X),Ce.brightness(xX))}D7.filterName="Skyline";var EX=.15,OX=.1;function j7(t){Ce.apply(t,Ce.contrast(EX),Ce.brightness(OX))}j7.filterName="Dogpatch";var PX=[25,240,252,.05],kX=.3;function z7(t){Ce.apply(t,Ce.colorFilter(PX),Ce.sepia(kX))}z7.filterName="Brooklyn";var TX=[208,208,86,.2],IX=.15;function $7(t){Ce.apply(t,Ce.colorFilter(TX),Ce.contrast(IX))}$7.filterName="Helena";var AX=[255,160,25,.1],LX=.1;function B7(t){Ce.apply(t,Ce.colorFilter(AX),Ce.brightness(LX))}B7.filterName="Ashby";var MX=[255,50,80,.12],RX=.05;function H7(t){Ce.apply(t,Ce.colorFilter(MX),Ce.contrast(RX))}H7.filterName="Charmes";const NX=Object.freeze(Object.defineProperty({__proto__:null,Aden:f7,Amaro:g7,Ashby:B7,BlackAndWhite:n7,Brannan:T7,Brooklyn:z7,Charmes:H7,Clarendon:i7,Crema:d7,Dogpatch:j7,Earlybird:k7,Gingham:o7,Ginza:F7,Hefe:x7,Helena:$7,Hudson:y7,Juno:c7,Kelvin:R7,Lark:s7,LoFi:_7,Ludwig:h7,Maven:N7,Mayfair:m7,Moon:a7,Nashville:E7,NinteenSeventySeven:M7,Perpetua:p7,Reyes:l7,Rise:v7,Sierra:S7,Skyline:D7,Slumber:u7,Stinson:O7,Sutro:I7,Toaster:A7,Valencia:C7,Vesper:P7,Walden:L7,Willow:b7,XPro2:w7},Symbol.toStringTag,{value:"Module"}));var JT=function(t){return t?NX[t]||br.Filters[t]:null};function G7(t){for(var e=this.warmth(),r=t.data,n=r.length,i=0;i<n;i+=4)r[i]+=e,r[i+2]-=e}G7.finetuneName="Warmth";ot.Factory.addGetterSetter(br.Image,"warmth",0,H8(),ot.Factory.afterSetFilter);function eI(t){for(var e=this.threshold(),r=t.data,n=r.length,i=0;i<n;i+=4)e===0||(r[i]=r[i]>=e?255:0,r[i+1]=r[i+1]>=e?255:0,r[i+2]=r[i+2]>=e?255:0)}eI.finetuneName="CustomThreshold";ot.Factory.addGetterSetter(br.Image,"threshold",0,H8,ot.Factory.afterSetFilter);const FX=Object.freeze(Object.defineProperty({__proto__:null,CustomThreshold:eI,Warmth:G7},Symbol.toStringTag,{value:"Module"}));var tI=function(t){return Array.isArray(t)&&0<t.length?t.map(function(e){return br.Filters[e]||FX[e]}):[]};function Cb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function im(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Cb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Cb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var rI=function(){var t,e,r,n,i=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},o=im({},i.loadableDesignState);Array.isArray(o.finetunes)&&(o.finetunes=tI(o.finetunes)),o.filter&&(o.filter=JT(o.filter));var a=!!i.loadableDesignState||!!(i.useCloudimage&&(!((t=i.cloudimage)===null||t===void 0)&&t.loadableQuery));return im(im({imgSrc:typeof i.source=="string"?i.source:((e=i.source)===null||e===void 0?void 0:e.src)||"",finetunes:[],finetunesProps:{},filter:null,adjustments:{crop:{ratio:i[de.CROP].ratio,ratioTitleKey:(r=i[de.CROP].ratioTitleKey)!==null&&r!==void 0?r:i[de.CROP].ratio,width:null,height:null,x:0,y:0},isFlippedX:!1,isFlippedY:!1,rotation:0},annotations:{},resize:{},shownImageDimensions:{}},o),{},{pointerCssIcon:_a.DEFAULT,canvasScale:1,zoom:{factor:Co,x:null,y:null},isLoadingGlobally:!0,selectionsIds:[],tabId:i.defaultTabId||null,toolId:i.defaultToolId||null,feedback:{},pastDesignStates:[],futureDesignStates:[],isResetted:(n=!a)===null||n===void 0||n,haveNotSavedChanges:!1,latestColors:{},showTabsMenu:!1})},Qu=function(t,e){var r=rI(e?t:mT);return{imgSrc:t.imgSrc||r.imgSrc,finetunes:t.finetunes||r.finetunes,finetunesProps:t.finetunesProps||r.finetunesProps,filter:t.filter||r.filter,adjustments:t.adjustments||r.adjustments,annotations:t.annotations||r.annotations,resize:t.resize||r.resize}};function wb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function om(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?wb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):wb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var V7="REDO",DX=function(t){if(t.futureDesignStates&&0<t.futureDesignStates.length){var e=Qu(t),r=gT(t.futureDesignStates),n=r[0],i=r.slice(1),o=[e].concat(cr(t.pastDesignStates||[]));return om(om(om({},t),n),{},{selectionsIds:[],pastDesignStates:o,futureDesignStates:i,hasUndo:!0,hasRedo:0<i.length,haveNotSavedChanges:!0})}return t};function Sb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function f0(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Sb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Sb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var m3="RESET",jX=function(t,e){var r=Qu(f0(f0({},e.config),{},{imgSrc:t.imgSrc}),!0);return f0(f0(f0({},t),r),{},{zoom:{factor:Co,x:null,y:null},selectionsIds:[],isResetted:!0,pastDesignStates:[],futureDesignStates:[],hasUndo:!1,hasRedo:!1,haveNotSavedChanges:!1})};function bb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function _b(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?bb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):bb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Ys="SET_FEEDBACK",zX=function(t,e){return _b(_b({},t),{},{isLoadingGlobally:!1,feedback:e.feedback||{}})};function xb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Eb(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?xb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):xb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var U7="SHOW_LOADER",$X=function(t){return Eb(Eb({},t),{},{isLoadingGlobally:!0})};function Ae(t,e){var r=G.forwardRef(t);return r.displayName=t.name,r}var BX=["color","stroke","size"],HX=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.stroke,o=i===void 0?"currentColor":i,a=t.size,s=a===void 0?14:a,c=ve(t,BX);return y.createElement("svg",he({ref:e,width:s,height:s,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},c),y.createElement("path",{d:"M23.54 1.53186C23.54 0.96198 24.002 0.5 24.5719 0.5C25.1417 0.5 25.6037 0.961981 25.6037 1.53186V5.82108C25.6037 6.39096 25.1417 6.85294 24.5719 6.85294C24.002 6.85294 23.54 6.39096 23.54 5.82108V1.53186ZM23.54 43.1985C23.54 42.6287 24.002 42.1667 24.5719 42.1667C25.1417 42.1667 25.6037 42.6287 25.6037 43.1985V47.4877C25.6037 48.0576 25.1417 48.5196 24.5719 48.5196C24.002 48.5196 23.54 48.0576 23.54 47.4877V43.1985ZM47.4876 23.5397C48.0574 23.5397 48.5194 24.0017 48.5194 24.5716C48.5194 25.1415 48.0574 25.6034 47.4876 25.6034H43.1983C42.6285 25.6034 42.1665 25.1415 42.1665 24.5716C42.1665 24.0017 42.6285 23.5397 43.1984 23.5397H47.4876ZM5.8209 23.5397C6.39078 23.5397 6.85276 24.0017 6.85276 24.5716C6.85276 25.1415 6.39078 25.6034 5.82089 25.6034H1.53168C0.961798 25.6034 0.499817 25.1415 0.499817 24.5716C0.499817 24.0017 0.961797 23.5397 1.53168 23.5397H5.8209ZM41.6177 39.8976C42.0207 40.3006 42.0207 40.9539 41.6177 41.3569C41.2147 41.7599 40.5614 41.7599 40.1584 41.3569L37.1255 38.324C36.7225 37.921 36.7225 37.2677 37.1255 36.8647C37.5285 36.4617 38.1818 36.4617 38.5848 36.8647L41.6177 39.8976ZM12.1551 10.4347C12.558 10.8377 12.558 11.491 12.1551 11.894C11.7521 12.297 11.0988 12.297 10.6958 11.894L7.66285 8.86105C7.25989 8.45808 7.25989 7.80474 7.66286 7.40178C8.06582 6.99881 8.71916 6.99881 9.12213 7.40178L12.1551 10.4347ZM9.12179 41.617C8.71882 42.0199 8.06548 42.0199 7.66251 41.617C7.25955 41.214 7.25955 40.5607 7.66251 40.1577L10.6954 37.1248C11.0984 36.7218 11.7518 36.7218 12.1547 37.1248C12.5577 37.5277 12.5577 38.1811 12.1547 38.584L9.12179 41.617ZM38.5862 12.1549C38.1832 12.5579 37.5299 12.5579 37.1269 12.1549C36.724 11.752 36.724 11.0986 37.1269 10.6957L40.1599 7.66274C40.5628 7.25977 41.2162 7.25977 41.6191 7.66274C42.0221 8.06571 42.0221 8.71905 41.6191 9.12201L38.5862 12.1549ZM38.7161 24.5098C38.7161 32.3555 32.3559 38.7157 24.5102 38.7157C16.6645 38.7157 10.3043 32.3555 10.3043 24.5098C10.3043 16.6641 16.6645 10.3039 24.5102 10.3039C32.3559 10.3039 38.7161 16.6641 38.7161 24.5098ZM24.5102 36.652C31.2161 36.652 36.6524 31.2157 36.6524 24.5098C36.6524 17.8039 31.2161 12.3676 24.5102 12.3676C17.8043 12.3676 12.3681 17.8039 12.3681 24.5098C12.3681 31.2157 17.8043 36.652 24.5102 36.652Z",fill:n,stroke:o}))}),GX=function(t,e){return t&&Object.keys(t||{}).every(function(r){return t[r]===0})&&e&&Object.keys(e||{}).length===0},W7=G.createContext({});function nI(){return SF()}function VX(t){var e=t.replace(/^@media( ?)/m,""),r=G.useState(function(){return window.matchMedia(e).matches}),n=Ie(r,2),i=n[0],o=n[1];return G.useEffect(function(){var a=!0,s=window.matchMedia(e),c=function(){a&&o(s.matches)};return c(),s.addEventListener("change",c),function(){a=!1,s.removeEventListener("change",c)}},[e,matchMedia]),i}const e6={name:"Name",save:"Save",saveAs:"Save as",back:"Back",loading:"Loading...",resetOperations:"Reset/delete all operations",changesLoseWarningHint:"If you press button “reset” your changes will lost. Would you like to continue?",discardChangesWarningHint:"If you close modal, your last change will not be saved.",cancel:"Cancel",apply:"Apply",warning:"Warning",confirm:"Confirm",discardChanges:"Discard changes",undoTitle:"Undo last operation",redoTitle:"Redo last operation",showImageTitle:"Show original image",zoomInTitle:"Zoom in",zoomOutTitle:"Zoom out",toggleZoomMenuTitle:"Toggle zoom menu",adjustTab:"Adjust",finetuneTab:"Finetune",filtersTab:"Filters",watermarkTab:"Watermark",annotateTabLabel:"Annotate",resize:"Resize",resizeTab:"Resize",imageName:"Image name",invalidImageError:"Invalid image provided.",uploadImageError:"Error while uploading the image.",areNotImages:"are not images",isNotImage:"is not image",toBeUploaded:"to be uploaded",cropTool:"Crop",original:"Original",custom:"Custom",square:"Square",landscape:"Landscape",portrait:"Portrait",ellipse:"Ellipse",classicTv:"Classic TV",cinemascope:"Cinemascope",arrowTool:"Arrow",blurTool:"Blur",brightnessTool:"Brightness",contrastTool:"Contrast",ellipseTool:"Ellipse",unFlipX:"Un-Flip X",flipX:"Flip X",unFlipY:"Un-Flip Y",flipY:"Flip Y",hsvTool:"HSV",hue:"Hue",brightness:"Brightness",saturation:"Saturation",value:"Value",imageTool:"Image",importing:"Importing...",addImage:"+ Add image",uploadImage:"Upload image",fromGallery:"From gallery",lineTool:"Line",penTool:"Pen",polygonTool:"Polygon",sides:"Sides",rectangleTool:"Rectangle",cornerRadius:"Corner Radius",resizeWidthTitle:"Width in pixels",resizeHeightTitle:"Height in pixels",toggleRatioLockTitle:"Toggle ratio lock",resetSize:"Reset to original image size",rotateTool:"Rotate",textTool:"Text",textSpacings:"Text spacings",textAlignment:"Text alignment",fontFamily:"Font family",size:"Size",letterSpacing:"Letter Spacing",lineHeight:"Line height",warmthTool:"Warmth",addWatermark:"+ Add watermark",addTextWatermark:"+ Add text watermark",addWatermarkTitle:"Choose the watermark type",uploadWatermark:"Upload watermark",addWatermarkAsText:"Add as text",padding:"Padding",paddings:"Paddings",shadow:"Shadow",horizontal:"Horizontal",vertical:"Vertical",blur:"Blur",opacity:"Opacity",transparency:"Transparency",position:"Position",stroke:"Stroke",saveAsModalTitle:"Save as",extension:"Extension",format:"Format",nameIsRequired:"Name is required.",quality:"Quality",imageDimensionsHoverTitle:"Saved image size (width x height)",cropSizeLowerThanResizedWarning:"Note, the selected crop area is lower than the applied resize which might cause quality decrease",actualSize:"Actual size (100%)",fitSize:"Fit size",addImageTitle:"Select image to add...",mutualizedFailedToLoadImg:"Failed to load image.",tabsMenu:"Menu",download:"Download",width:"Width",height:"Height",plus:"+",cropItemNoEffect:"No preview available for this crop item"};function Ob(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function t6(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Ob(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Ob(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Xf={},X7=t6({},e6),Pb="Error while loading translations from backend.",iI=function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},e=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"en";return Object.assign(X7,Xf[e==null?void 0:e.toLowerCase()]||{},t)},UX=function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:[];return new Promise(function(e,r){var n=new XMLHttpRequest;n.responseType="json",n.onload=function(){if(200<=n.status&&300>n.status)e(n.response);else{var i;console.warn("Error in sending translation key to backend ".concat((i=n.response)===null||i===void 0?void 0:i.hint,", ").concat(n.status)),r()}},n.onerror=function(){var i;console.warn("Error in sending translation key to backend ".concat((i=n.response)===null||i===void 0?void 0:i.hint,", ").concat(n.status)),r()},n.open("POST","https://neo.wordplex.io/api/import/request-translations?grid_uuid=".concat(Vv)),n.send(JSON.stringify({grid_uuid:Vv,translations_requests:t}))})},WX=function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"en",e=1<arguments.length?arguments[1]:void 0;return new Promise(function(r,n){var i=t.toLowerCase(),o=new XMLHttpRequest;o.responseType="json",o.onload=function(){if(200<=o.status&&300>o.status){(o.response||[]).forEach(function(h){Xf[i]=t6(t6({},Xf[i]),{},A({},h.translation_key,h.translations[i]))});var a=[];Object.keys(e6).forEach(function(h){var C;h&&!((C=Xf[i])!==null&&C!==void 0&&C[h])&&a.push({key:h,lang:i,default:e6[h]})}),0<a.length&&UX(a),iI(e,i),r(X7)}else{var s,c,d;console.error("Status code: ".concat(o.status)),console.error(((s=o.response)===null||s===void 0?void 0:s.msg)||((c=o.response)===null||c===void 0?void 0:c.msg)||((d=o.response)===null||d===void 0?void 0:d.details)||Pb),n()}},o.onerror=function(){console.error("Status code ".concat(o.status,", error: ").concat(Pb)),n()},o.open("GET","https://i18n.ultrafast.io/api/export?grid=".concat(Vv)),o.send()})},XX=function(t){return X7[t]||t||""},KX=function(t,e){return Ux[e.type]&&Ux[e.type](t,e.payload)||t};function kb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Tb(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?kb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var am=!0,oI=function(t){var e=t.children,r=t.config,n=r===void 0?{}:r,i=lK(KX,rI(n),n),o=Ie(i,2),a=o[0],s=o[1];G.useEffect(function(){return am=!0,function(){am=!1}},[]);var c=G.useCallback(function(){am&&s.apply(void 0,arguments)},[s]);G.useEffect(function(){iI(n.translations,n.language)},[n.useBackendTranslations,n.language,n.translations]);var d=nI(),h=G.useMemo(function(){return Tb(Tb({},a),{},{config:n,theme:d,dispatch:c,t:XX})},[n,a]);return y.createElement(W7.Provider,{value:h},e)};oI.defaultProps={config:{}};var YX=function(t){var e=t.children,r=t.overridingValue;return y.createElement(W7.Provider,{value:r},e)},Ye=function(){return G.useContext(W7)};function Ib(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ab(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Ib(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Ib(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Mh=function(t,e){var r=Ye(),n=r.dispatch,i=r.finetunes,o=r.finetunesProps,a=G.useCallback(function(s){n({type:BA,payload:{finetune:t,finetuneProps:s}})},[]);return G.useEffect(function(){i.includes(t)||GX(e,o)||a(Ab(Ab({},e),o))},[]),G.useMemo(function(){return[o,a]},[o])},ZX=function(){var t=Ye(),e=t.dispatch,r=t.filter,n=G.useCallback(function(i){e({type:pT,payload:{filter:i}})},[]);return G.useMemo(function(){return[r,n]},[r])},v3=function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return"".concat(t).concat(t?"-":"").concat(parseInt(Date.now()*Math.random(),10))},y3=function(t){var e,r=1<arguments.length&&arguments[1]!==void 0?arguments[1]:300;return function(){var n,i;clearTimeout(e);for(var o=arguments.length,a=Array(o),s=0;s<o;s++)a[s]=arguments[s];var c=a[0],d=a.slice(1);e=setTimeout(t.bind.apply(t,[null,(n=c==null||(i=c.target)===null||i===void 0?void 0:i.value)!==null&&n!==void 0?n:c].concat(cr(d))),r)}},r6=function(){var t,e,r=document,n=r.body,i=document.documentElement,o=((t=window)===null||t===void 0?void 0:t.pageYOffset)||i.scrollTop||n.scrollTop,a=((e=window)===null||e===void 0?void 0:e.pageXOffset)||i.scrollLeft||n.scrollLeft;return{topOffset:o,leftOffset:a}},aI=function(t){if(!t)return null;var e=t.getBoundingClientRect(),r=document,n=r.body,i=r6(),o=i.topOffset,a=i.leftOffset,s=document.documentElement,c=s.clientTop||n.clientTop||0,d=s.clientLeft||n.clientLeft||0,h=e.top+o-c,C=e.left+a-d;return{top:Math.round(h),left:Math.round(C),width:e.width,height:e.height}},Vr=function(t){var e=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,r=2<arguments.length?arguments[2]:void 0;return Math.min(Math.max(e,+t),r||1e6)},Kf=function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},e=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},r=t.parent,n=r.getStage(),i=n.attrs.zoomFactor,o=r.getRelativePointerPosition();return{offsetX:Vr(o.x,0,e.width/(n.scaleX()/i))+r.attrs.xPadding,offsetY:Vr(o.y,0,e.height/(n.scaleY()/i))+r.attrs.yPadding}},Lb=function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},e=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},r=2<arguments.length?arguments[2]:void 0,n={},i=r.parent.attrs;return n.x=Math.min(t.offsetX,e.startedX)-i.xPadding||0,n.y=Math.min(t.offsetY,e.startedY)-i.yPadding||0,n.width=t.offsetX-e.startedX,n.height=t.offsetY-e.startedY,n.startedX=e.startedX-i.xPadding||0,n.startedY=e.startedY-i.yPadding||0,n},qX=["width","height","startedX","startedY"];function Mb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Rb(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Mb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Mb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var QX=A(A(A(A(A(A(A({},de.RECT,br.Rect),de.ELLIPSE,br.Ellipse),de.POLYGON,br.RegularPolygon),de.LINE,br.Line),de.IMAGE,br.Image),de.TEXT,br.Text),de.ARROW,br.Arrow),sI=[de.LINE,de.ARROW],JX=[].concat(sI,[de.ELLIPSE,de.POLYGON]),Nb=function(t){var e,r,n;return new QX[t.name](Rb(Rb({},t),{},{opacity:(e=t.opacity)!==null&&e!==void 0?e:.7,x:(r=t.x)!==null&&r!==void 0?r:0,y:(n=t.y)!==null&&n!==void 0?n:0,width:Math.abs(t.width)||0,height:Math.abs(t.height)||0},sI.includes(t.name)?{stroke:t.stroke||"#000000"}:{}))},eK=function(t,e,r){var n=t.width,i=t.height,o=t.startedX,a=t.startedY,s=ve(t,qX),c=Math.abs(n),d=Math.abs(i),h=0>n,C=0>i;switch(e){case de.RECT:r?(s.width=Math.sqrt(c*c+d*d),s.height=s.width,s.x-=h?s.width-c:0,s.y-=C?s.height-d:0):(s.width=c,s.height=d);break;case de.ELLIPSE:r?(s.radiusX=Math.sqrt(c*c+d*d)/2,s.radiusY=s.radiusX,s.x-=h?2*s.radiusX-c:0,s.y-=C?2*s.radiusY-d:0):(s.radiusX=c/2,s.radiusY=d/2),s.offsetX=-s.radiusX,s.offsetY=-s.radiusY;break;case de.POLYGON:s.radius=(c+d)/2,s.x-=h?2*s.radius-c:0,s.y-=C?2*s.radius-d:0,s.offsetX=-s.radius,s.offsetY=-s.radius;break;case de.LINE:case de.ARROW:s.x=o,s.y=a,s.points=[0,0],r?s.points.push(c>=d?n:0,d>c?i:0):s.points=[0,0,n,i];break;default:s.width=c,s.height=d}return s},tK=["id","x","y","points"],rK=["startedX","startedY","offsetX","offsetY","width","height"];function Fb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Zc(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Fb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Fb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var jo={startedX:void 0,startedY:void 0,isOutOfCanvas:!1},ti={passive:!0},p0=1,qc=null,g0=null,Bn=null,nK=function(t,e,r,n){var i=function(){return aI(t.content)},o=function(w){g0=Nb(Zc(Zc({},w),{},{name:de.RECT,fill:"",stroke:"#000000",strokeWidth:2,shadowColor:"#ffffff",shadowBlur:1,shadowOpacity:.7})),r.add(g0)},a=function(w){qc=Nb(w),r.add(qc),w.name===de.TEXT&&o(w),Bn=w},s=function(w,x){if(Bn){var b=eK(w,Bn.name,x);g0&&g0.setAttrs(b),qc.setAttrs(b),Bn=Zc(Zc({},Bn),b)}},c=function(w){var x=Kf(r,i());s(Lb(x,jo,r),w.shiftKey)},d=function(){r&&qc&&r.destroyChildren()},h=function(w){var x;if(!(1<((x=w.evt.touches)===null||x===void 0?void 0:x.length))){var b=Kf(r,i());jo.isOutOfCanvas&&(document.removeEventListener("mousemove",c,ti),document.removeEventListener("touchmove",c,ti),jo.isOutOfCanvas=!1);var O=Lb(b,jo,r);if(qc)s(O,w.evt.shiftKey);else{e.id,e.x,e.y,e.points;var f=ve(e,tK);a(Zc(Zc({},f),O))}t.setAttrs({isDrawing:!0})}},C=function(){jo.isOutOfCanvas||(document.addEventListener("mousemove",c,ti),document.addEventListener("touchmove",c,ti),jo.isOutOfCanvas=!0)},v=function(){var w,x;if(d(),Bn&&(Bn.width>=p0&&Bn.height>=p0||Bn.radiusX>=p0&&Bn.radiusY>=p0||(w=Bn.points)!==null&&w!==void 0&&w[2]||(x=Bn.points)!==null&&x!==void 0&&x[3]||Bn.radius>=p0)){var b=Bn;b.startedX,b.startedY,b.offsetX,b.offsetY;var O=b.width,f=b.height,S=ve(b,rK);JX.includes(e.name)||(S.width=O,S.height=f),n(S,!0)}qc=null,g0=null,Bn=null,t.setAttrs({isDrawing:!1}),t.off("mousemove touchmove",h),t.off("mouseleave touchcancel",C),document.removeEventListener("mouseup",v,ti),document.removeEventListener("touchend",v,ti),document.removeEventListener("mouseleave",v,ti),document.removeEventListener("touchcancel",v,ti),document.removeEventListener("mousemove",c,ti),document.removeEventListener("touchmove",c,ti),jo.isOutOfCanvas=!1},g=function(w){var x;if(w.evt.preventDefault(),!(w.target.attrs.draggable||1<((x=w.evt.touches)===null||x===void 0?void 0:x.length))){d();var b=Kf(r,i());jo.startedX=b.offsetX,jo.startedY=b.offsetY,jo.isOutOfCanvas=!1,t.on("mousemove touchmove",h),t.on("mouseleave touchcancel",C),document.addEventListener("mouseup",v,ti),document.addEventListener("touchend",v,ti),document.addEventListener("mouseleave",v,ti),document.addEventListener("touchcancel",v,ti)}};return t.on("mousedown touchstart",g),function(){d(),t.off("mousedown touchstart",g)}},lI=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:[];return G.useCallback(y3(t,e),r)},iK=["fonts","onFontChange"],oK=["x","y","width","height","radius","radiusX","radiusY","points","image","text","scaleX","scaleY","rotation"],aK=["shouldSave","neverSave"];function Db(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function wr(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Db(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Db(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Zs=function(){var t,e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},r=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1],n=Ye(),i=n.dispatch,o=n.previewGroup,a=n.annotations,s=n.selectionsIds,c=s===void 0?[]:s,d=n.config,h=wr(wr({},d.annotationsCommon),d[((t=a[c[0]])===null||t===void 0?void 0:t.name)||e.name]),C=G.useState(function(){return wr(wr(wr({},h),e),a[c[0]])}),v=Ie(C,2),g=v[0],m=v[1],w=G.useRef(),x=o==null?void 0:o.getStage(),b=G.useCallback(function(E){E.fonts,E.onFontChange;var I=ve(E,iK);i({type:$l,payload:I}),I.id&&e.name!==de.PEN&&y3(function(){i({type:nd,payload:{annotationId:I.id}})},30)()},[]),O=lI(function(E){m(function(I){return wr(wr({},I),{},{shouldSave:!1,neverSave:!1},typeof E=="function"?E(I):E)})},15),f=G.useCallback(function(E,I){if(E.name===I){E.x,E.y,E.width,E.height,E.radius,E.radiusX,E.radiusY,E.points,E.image,E.text,E.scaleX,E.scaleY,E.rotation;var R=ve(E,oK);return wr(wr(wr({},h),e),R)}return wr(wr({},h),e)},[]),S=G.useCallback(function(E){m(function(I){var R=f(I,E.name||e.name);return wr(wr(wr({},R),E),{},{id:E.id||v3(E.name||I.name),shouldSave:!0,neverSave:!1})})},[]);return G.useEffect(function(){var E=g.shouldSave,I=g.neverSave,R=ve(g,aK),k=c.length===1&&a[c[0]];!I&&(E||k)&&b(wr(wr({},R),{},{id:E?R.id:k.id}))},[g]),G.useEffect(function(){setTimeout(function(){c.length===1?(w.current=g,m(wr(wr({},a[c[0]]),{},{neverSave:!0}))):w.current&&(m(wr(wr({},w.current),{},{neverSave:!0})),w.current=null)})},[c,a]),G.useEffect(function(){var E=null;if(x&&r){var I=f(g,e.name);E=nK(x,wr(wr({},I),{},{name:e.name}),o,S)}return function(){E&&E()}},[x,g,o]),G.useMemo(function(){return[g,O,S]},[g,O,S])},sK=["isDesignState"];function jb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function af(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?jb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):jb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var zb,$b=function(t,e){zb=setTimeout(function(){clearTimeout(zb),typeof t=="function"&&e&&t(e)})},lK=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{},n=af(af({},e),{},{pastDesignStates:[],futureDesignStates:[],hasRedo:!1,hasUndo:!1});return G.useReducer(function(o,a){var s=t(o,a)||n;if([I9,V7,m3].includes(a.type))return $b(r.onModify,s),s;if(s.isDesignState){var c=Qu(o);s.isDesignState;var d=ve(s,sK),h=af(af({},d),{},{pastDesignStates:[c].concat(cr(o.pastDesignStates)),hasUndo:!0,hasRedo:!1,futureDesignStates:[],isResetted:!1,haveNotSavedChanges:!0});return $b(r.onModify,h),h}return s},n)},cK=function(){var t=Ye(),e=t.tabId,r=t.dispatch,n=G.useMemo(function(){return e!==Zt.ANNOTATE&&e!==Zt.WATERMARK},[e]),i=G.useCallback(function(h){r({type:$l,payload:h})},[]),o=G.useCallback(function(h){i({id:h.target.id(),x:h.target.x(),y:h.target.y()})},[]),a=G.useCallback(function(h){var C={id:h.target.id(),rotation:h.target.rotation(),x:h.target.x(),y:h.target.y()};return h.target.name()===de.TEXT?(C.width=h.target.width()*h.target.scaleX(),C.height=h.target.height()*h.target.scaleY(),C.scaleX=1,C.scaleY=1):(C.scaleX=h.target.scaleX(),C.scaleY=h.target.scaleY()),C},[]),s=G.useCallback(function(h){i(a(h))},[]),c=G.useCallback(function(h){h.target.name()===de.TEXT&&h.target.setAttrs(a(h))}),d=G.useCallback(function(h){if(!(h.target.id()===As||h.target.getStage().attrs.isDrawing)){var C=h.evt.ctrlKey||h.evt.shiftKey||h.evt.metaKey;r({type:nd,payload:{annotationId:h.target.id(),multiple:C}}),r({type:W2,payload:{toolId:h.target.name(),keepSelections:C}})}},[]);return G.useMemo(function(){return n?{}:{onTransform:c,onTransformEnd:s,onDragEnd:o,onClick:d,onTap:d}},[n])},K7=function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:function(){},e=G.useRef(t),r=G.useRef(),n=G.useCallback(function(d){d.forEach(function(h){if(h.contentRect){var C=h.contentRect,v=C.width,g=C.height;e.current({entry:h,width:v,height:g})}})},[]),i=G.useCallback(function(d){e.current=d},[]),o=G.useCallback(function(){r.current||(r.current=new ResizeObserver(n))},[]),a=G.useCallback(function(d,h){d&&(!r.current&&o(),r.current.observe(d),h&&(e.current=h))},[]),s=G.useCallback(function(d,h){r.current&&d&&(r.current.unobserve(d),h&&(e.current=h))},[]),c=G.useCallback(function(){r.current&&r.current.disconnect()},[]);return G.useEffect(function(){return o(),c},[]),G.useMemo(function(){return[a,s,i]},[])},_o=function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:438;return window.matchMedia("(max-width: ".concat(t,"px)")).matches},Go=function(t,e,r,n,i){return(t-e)*(i-n)/(r-e)+n};function Bb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function sm(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Bb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Bb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var j2=function(t,e,r){var n,i;return sm(sm(sm({},t.x||t.x===0?{x:Math.round(Go(t.x,0,e.width,0,r.width))}:{}),t.y||t.y===0?{y:Math.round(Go(t.y,0,e.height,0,r.height))}:{}),{},{width:Math.round(Go((n=t.width)!==null&&n!==void 0?n:e.width,0,e.width,0,r.width)),height:Math.round(Go((i=t.height)!==null&&i!==void 0?i:e.height,0,e.height,0,r.height))})},Ms=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0,n=Math.abs(r),i=Math.round(r),o=90<n,a=o?n-90:n,s=o?e:t,c=o?t:e,d=a*Math.PI/180,h=Math.abs(Math.sin(d)),C=Math.abs(Math.cos(d));return{width:Math.round(s*C)+Math.round(c*h),height:Math.round(s*h)+Math.round(c*C),offsetTop:0<=i&&90>=i?0:function(){return 0>i&&-90<i||90<i?s*h:c*C+s*h}(),offsetLeft:0>=i&&-90<=i?0:function(){return 90<i?s*C+c*h:c*h}()}},uK=function(t){if(t instanceof HTMLImageElement){var e=document.createElement("canvas"),r=e.getContext("2d");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),e.toDataURL()}return""},cI=function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"",e=1<arguments.length?arguments[1]:void 0,r=e,n=t;if(!r&&JB.some(function(a){return t.lastIndexOf(".".concat(a))===t.length-".".concat(a).length})){var i,o=(i=t.slice(t.lastIndexOf(".")+1))===null||i===void 0?void 0:i.toLowerCase();r=o&&Xu.includes(o)?o:AS,n=t.slice(0,t.lastIndexOf("."))}return r=r||AS,{fullName:"".concat(n,".").concat(r),name:n,extension:r}},ha=function(t,e){return t<<e|t>>>32-e},m0=function(t){var e,r,n="";for(e=7;0<=e;e--)r=15&t>>>4*e,n+=r.toString(16);return n},dK=function(t){for(var e,r=t.replace(/\r\n/g,`
`),n="",i=0;i<r.length;i++)e=r.charCodeAt(i),128>e?n+=String.fromCharCode(e):127<e&&2048>e?(n+=String.fromCharCode(192|e>>6),n+=String.fromCharCode(128|63&e)):(n+=String.fromCharCode(224|e>>12),n+=String.fromCharCode(128|63&e>>6),n+=String.fromCharCode(128|63&e));return n},hK=function(t){var e,r,n,i,o,a,s,c,d,h=t,C=Array(80),v=1732584193,g=4023233417,m=2562383102,w=271733878,x=3285377520;h=dK(h);var b=h.length,O=[];for(r=0;r<b-3;r+=4)n=h.charCodeAt(r)<<24|h.charCodeAt(r+1)<<16|h.charCodeAt(r+2)<<8|h.charCodeAt(r+3),O.push(n);switch(b%4){case 0:r=2147483648;break;case 1:r=8388608|h.charCodeAt(b-1)<<24;break;case 2:r=32768|(h.charCodeAt(b-2)<<24|h.charCodeAt(b-1)<<16);break;case 3:r=128|(h.charCodeAt(b-3)<<24|h.charCodeAt(b-2)<<16|h.charCodeAt(b-1)<<8);break}for(O.push(r);O.length%16!=14;)O.push(0);for(O.push(b>>>29),O.push(4294967295&b<<3),e=0;e<O.length;e+=16){for(r=0;16>r;r++)C[r]=O[e+r];for(r=16;79>=r;r++)C[r]=ha(C[r-3]^C[r-8]^C[r-14]^C[r-16],1);for(i=v,o=g,a=m,s=w,c=x,r=0;19>=r;r++)d=4294967295&ha(i,5)+(o&a|~o&s)+c+C[r]+1518500249,c=s,s=a,a=ha(o,30),o=i,i=d;for(r=20;39>=r;r++)d=4294967295&ha(i,5)+(o^a^s)+c+C[r]+1859775393,c=s,s=a,a=ha(o,30),o=i,i=d;for(r=40;59>=r;r++)d=4294967295&ha(i,5)+(o&a|o&s|a&s)+c+C[r]+2400959708,c=s,s=a,a=ha(o,30),o=i,i=d;for(r=60;79>=r;r++)d=4294967295&ha(i,5)+(o^a^s)+c+C[r]+3395469782,c=s,s=a,a=ha(o,30),o=i,i=d;v=4294967295&v+i,g=4294967295&g+o,m=4294967295&m+a,w=4294967295&w+s,x=4294967295&x+c}return d=m0(v)+m0(g)+m0(m)+m0(w)+m0(x),d.toLowerCase()},fK=function(t){return btoa(t).replace(/=*$/g,"")},pK=function(t,e){return hK(t).slice(0,e)},gK=function(t,e,r,n){var i=fK(t),o=pK(e+i+r,n);return[o?"ci_seal=".concat(o):"",i?"ci_eqs=".concat(i):""].filter(function(a){return a}).join("&")},mK=function(t,e,r){var n=e||{},i=n.salt,o=n.charCount,a=n.includeParams,s=a===void 0?[]:a,c=!s||(s==null?void 0:s.length)===0,d="",h="",C=[],v=[];return t.split("&").forEach(function(g){var m=g.split("="),w=Ie(m,1),x=w[0];-1<(s==null?void 0:s.indexOf(x))||c?C.push(g):v.push(g)}),0<v.length&&(h=v.join("&")),d=gK(C.join("&"),r,i,o),[d,h].filter(function(g){return g}).join("&")},vK=function(){var t,e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"",r={hex:"000000",opacity:1};if(!e)return r;if(e.startsWith("#"))return{hex:e.replace("#",""),opacity:1};var n=e.split(","),i=Ie(n,4),o=i[0],a=i[1],s=i[2],c=i[3];return o&&a&&s?(o=parseFloat(o.replace(/rgba?\(/,"").trim()).toString(16),a=parseFloat(a.trim()).toString(16),s=parseFloat(s.trim()).toString(16),c=c?parseFloat((t=c.trim())!==null&&t!==void 0?t:1):void 0,o.length===1&&(o="0".concat(o)),a.length===1&&(a="0".concat(a)),s.length===1&&(s="0".concat(s)),{hex:"".concat(o).concat(a).concat(s),opacity:c}):r},_r=function(t){var e=1<arguments.length&&arguments[1]!==void 0?arguments[1]:5;return t&&+parseFloat(t).toFixed(e)},yK=["width","height","x","y","opacity","scaleX","scaleY"];function Hb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Gb(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Hb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Hb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var CK=function(t,e,r,n){if(t.noEffect)return t.ratio.includes("=")?t.ratio:"gravity=".concat(t.ratio);var i=(n||{}).lockCropAreaAt,o=j2(t,e,r),a=o.x,s=o.y,c=o.width,d=o.height,h=t.ratio===cc?"&radius=".concat(Math.max(c,d),"&force_format=png"):"";if(i){var C=i.split("-"),v=Ie(C,2),g=v[0],m=v[1],w="".concat(MS[g]).concat(MS[m]);return"gravity=".concat(w,"&aspect_ratio=").concat(_r(typeof t.ratio=="string"?c/d:t.ratio,2)).concat(h)}return"tl_px=".concat(a,",").concat(s,"&br_px=").concat(a+c,",").concat(s+d).concat(h)},wK=function(){var t=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},e=t.width,r=t.height;return"w=".concat(e,"&h=").concat(r)},SK=function(t){return"r=".concat(-t)},bK=function(t,e){return"flip=".concat(t?"x":"").concat(e?"y":"")},_K=function(t){var e,r=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{},i=r.width,o=r.height,a=r.x,s=r.y,c=r.opacity,d=r.scaleX,h=d===void 0?1:d,C=r.scaleY,v=C===void 0?1:C,g=ve(r,yK),m=t.width/t.height,w=t.width*t.scaledBy,x=t.height*t.scaledBy,b=a*t.scaledBy,O=s*t.scaledBy,f="wat=1&wat_gravity=absolute&wat_pos=".concat(Math.floor(100*((b-(n.x||0))/w),2),"p,").concat(Math.floor(100*((O-(n.y||0))/x),2),"p");if(r.name===de.TEXT){var S,E=vK(g.fill),I=E.hex,R=E.opacity;return"".concat(f,"&wat_text=").concat(g.text.replaceAll(`
`,""),"&wat_font=").concat(g.fontFamily,"&wat_color=").concat(I,"&wat_opacity=").concat((S=R??c)!==null&&S!==void 0?S:1,"&wat_fontsize=").concat(g.fontSize,"max")}var k=((e=g.image)===null||e===void 0?void 0:e.src)||g.image,N=!k.startsWith("blob:")&&k,T=_r(100*(i/o>m?i*h/w:o*v/x),2);return"".concat(f,"&wat_opacity=").concat(c,"&wat_scale=").concat(T,"p").concat(N?"&wat_url=".concat(encodeURIComponent(N)):"")},Yf={Brighten:{cloudimage:{name:"bright",min:-100,max:100},internal:{propName:"brightness",min:-1,max:1}},Contrast:{cloudimage:{name:"contrast",min:-100,max:100},internal:{propName:"contrast",min:-100,max:100}},Blur:{cloudimage:{name:"blur",min:0,max:100},internal:{propName:"blurRadius",min:0,max:100}}},xK=function(t){var e=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},r=[];return t.forEach(function(n){var i=(n.finetuneName||n.name)&&Yf[n.finetuneName||n.name];if(i){var o=_r(Go(e[i.internal.propName],i.internal.min,i.internal.max,i.cloudimage.min,i.cloudimage.max),2);r.push("".concat(i.cloudimage.name,"=").concat(o))}}),r.join("&")},EK=function(t,e,r,n,i){var o=t.token,a=t.domain,s=t.dontPrefixUrl,c=t.version,d=t.imageSealing,h=t.secureProtocol,C=e.imgSrc,v=e.adjustments,g=v.crop,m=v.rotation,w=v.isFlippedX,x=v.isFlippedY,b=e.resize,O=b===void 0?{}:b,f=e.finetunes,S=f===void 0?{}:f,E=e.finetunesProps,I=e.annotations,R=I===void 0?{}:I,k=s?"":"http".concat(h?"s":"","://").concat(o,".").concat(a.replace(/^(https?:\/\/)?(www\.)?|^\.|\/$/g,""),"/").concat(c?"".concat(c,"/"):""),N=[];g.width&&g.height&&(g.x||g.x===0)&&(g.y||g.y===0)&&N.push(CK(g,r,n,i)),(O.width||O.height)&&N.push(wK(Gb(Gb({},n),O))),m&&N.push(SK(m)),(w||x)&&N.push(bK(w,x)),0<S.length&&E&&N.push(xK(S,E)),R[As]&&N.push(_K(r,R[As],g)),N.push("ci_url_encoded=1");var T=N.join("&");d.enable&&(T=mK(T,d,C)),T=T.replaceAll(" ","+");var D=!s||C.indexOf("?")===-1?"?":"&";return"".concat(k).concat(s?C:encodeURIComponent(C)).concat(T?"".concat(D).concat(T.replace(/&$/,"")):"")},OK=["filter"];function Vb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bl(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Vb(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Vb(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var uI=function(){var t=Ye(),e=t.dispatch,r=t.designLayer,n=t.shownImageDimensions,i=t.originalImage,o=t.resize,a=o===void 0?{}:o,s=t.adjustments,c=s===void 0?{}:s,d=c.crop,h=d===void 0?{}:d,C=c.rotation,v=C===void 0?0:C,g=c.isFlippedX,m=c.isFlippedY,w=t.config,x=w.savingPixelRatio,b=w.previewPixelRatio,O=w.forceToPngInEllipticalCrop,f=w.defaultSavedImageType,S=w.useCloudimage,E=w.cloudimage,I=w[de.CROP];return S?function(){var k,N,T=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},D=Qu(t);D.filter;var z=ve(D,OK),B=EK(E,z,n,i,I),Y=j2({x:h.x,y:h.y,width:h.width,height:h.height},n,i),W={cloudimageUrl:B,width:(T==null||(k=T.size)===null||k===void 0?void 0:k.width)||Y.width,height:(T==null||(N=T.size)===null||N===void 0?void 0:N.height)||Y.height};return{imageData:W,designState:z}}:function(){var k=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},N=1<arguments.length&&arguments[1]!==void 0&&arguments[1],T=2<arguments.length&&arguments[2]!==void 0&&arguments[2],D=bl({size:a},k);br.pixelRatio=N||x;var z=r.attrs,B=z.clipWidth,Y=z.clipHeight,W=z.clipX,q=z.clipY;r.setAttr("isSaving",!0);var ee=r.getStage().clone({width:i.width,height:i.height,scaleX:g?-1:1,scaleY:m?-1:1}),K=Ie(ee.children,1),ue=K[0];ee.children[1].destroy();var ne=ee.findOne("#".concat(cT));ne.cache();var ae={x:ee.width()/n.width,y:ee.height()/n.height};ue.setAttrs({rotation:0,offsetX:0,offsetY:0,x:0,y:0,scaleX:ae.x,scaleY:ae.y});var J=bl(bl({},(!D.name||!D.extension)&&cI(i.name,O&&h.ratio===cc?"png":Xu.includes(f==null?void 0:f.toLowerCase())&&f)),D),Q=J.name,te=J.extension,we=J.quality,U=we===void 0?92:we,F=J.size,$=F===void 0?{}:F,ie=["jpeg","jpg","webp"].includes(te),pe=j2(h.noEffect?{x:0,y:0}:{x:h.x||W,y:h.y||q,width:h.width||B,height:h.height||Y},n,ee.attrs),ce=Ms(pe.width,pe.height,v);if(ee.setAttrs({offsetX:pe.width/2+pe.x,offsetY:pe.height/2+pe.y,width:ce.width,height:ce.height,x:ce.width/2,y:ce.height/2,rotation:v}),$.width){var le=(g?-1:1)*($.width/ee.width());ee.setAttrs({scaleX:le,width:$.width,x:ee.x()*Math.abs(le)})}if($.height){var xe=(m?-1:1)*($.height/ee.height());ee.setAttrs({scaleY:xe,height:$.height,y:ee.y()*Math.abs(xe)})}var Ne=bl({mimeType:"image/".concat(te==="jpg"?"jpeg":te)},ie?{quality:U}:{}),_e=ee.toCanvas(Ne),He=ee.toDataURL(Ne),Ee=bl(bl({},Qu(t)),{},{shownImageDimensions:{width:t.shownImageDimensions.width,height:t.shownImageDimensions.height,scaledBy:t.shownImageDimensions.scaledBy}});Ee.filter&&(Ee.filter=Ee.filter.filterName||Ee.filter.name),Ee.finetunes=Ee.finetunes.map(function(Me){return Me.finetuneName||Me.name}),Object.keys(Ee.annotations).forEach(function(Me){var gt,St=Ee.annotations[Me],qe=St.name===de.IMAGE&&((gt=St.image)===null||gt===void 0?void 0:gt.src);qe&&qe.startsWith("blob:")?Ee.annotations[Me].image=uK(St.image):St.image instanceof HTMLImageElement&&(Ee.annotations[Me].image=qe)});var Ve=bl({fullName:"".concat(Q,".").concat(te),name:Q,extension:te,mimeType:"image/".concat(te),imageCanvas:_e,imageBase64:He,width:$.width||pe.width,height:$.height||pe.height},ie?{quality:U}:{});r.setAttr("isSaving",!1),e({type:KA}),ne.clearCache(),ee.destroy(),br.pixelRatio=b;var We=function(){e({type:_g})};return T||We(),{imageData:Ve,designState:Ee,hideLoadingSpinner:We}}},xa={Left:"left",Right:"right",Top:"top",Bottom:"bottom"},$0={Primary:"primary",Secondary:"secondary",White:"white"},Br={Primary:"primary",Secondary:"secondary",Basic:"basic",LinkPrimary:"link-primary",LinkSecondary:"link-secondary",LinkBasicPrimary:"link-basic-primary",LinkBasicSecondary:"link-basic-secondary",ErrorPrimary:"error-primary",ErrorSecondary:"error-secondary",ErrorBasic:"error-basic",WarningPrimary:"warning-primary",WarningSecondary:"warning-secondary",WarningBasic:"warning-basic"},Tu={Primary:"primary",Secondary:"secondary",Basic:"basic"},nt={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg"},lt={Sm:"sm",Md:"md"},dI={Default:"default",Localization:"localization"},PK=function(e){var r=e.theme.palette;return X(["color:"," !important;"],r[M.Error])},kK=A(A({},lt.Sm,`
padding: 8px 12px;
height: 32px;
`),lt.Md,`
padding: 11px 16px;
height: 40px;
`);A(A({},lt.Sm,`
padding: 4px 6px 4px 12px;
max-height: 32px;
`),lt.Md,`
padding: 0px 4px 0px 16px;
max-height: 40px;
`);var hI=A(A({},lt.Sm,function(t){var e=t.theme.typography.font;return X(["",""],e[ke.InputMd])}),lt.Md,function(t){var e=t.theme.typography.font;return X(["",""],e[ke.InputLg])}),TK=A(A({},lt.Sm,function(t){var e=t.theme.typography.font;return X(e[ke.LabelSmall])}),lt.Md,function(t){var e=t.theme.typography.font;return X(e[ke.LabelMedium])}),IK=function(e){var r=e.theme.palette;return X(["background:"," !important;border:1px solid "," !important;"],r[M.BackgroundSecondary],r[M.Error])},Y7="Label",AK=Z.label.attrs({className:Se(Y7,"root")}).withConfig({componentId:"sc-16k2ql4-0"})(function(t){var e=t.size,r=e===void 0?lt.Md:e,n=t.error,i=n===void 0?!1:n,o=t.disabled,a=o===void 0?!1:o,s=t.htmlFor,c=t.theme;return X(["display:flex;align-items:center;color:",";font-style:normal;font-weight:normal;"," "," cursor:",";",";"],c.palette[M.TextSecondary],a&&X(["color:",";","{color:",";}"],c.palette[M.ButtonDisabledText],fI,c.palette[M.IconsMuted]),TK[r],s&&"pointer",i&&PK)}),LK=Z.span.attrs({className:Se(Y7,"text")}).withConfig({componentId:"sc-16k2ql4-1"})(["white-space:nowrap;text-overflow:ellipsis;overflow:hidden;"]),fI=Z.span.attrs({className:Se(Y7,"Icon")}).withConfig({componentId:"sc-16k2ql4-2"})(function(t){var e=t.theme.palette,r=t.$end,n=r===void 0?!1:r;return X(["display:flex;",";color:",";"],n?"margin-left: 4px":"margin-right: 4px",e[M.IconsSecondary])}),Zf=Bt({Label:AK,Icon:fI,Text:LK}),MK=["children","iconStart","iconEnd","error","disabled","size","type"],qt=pt(function(t,e){var r=t.children,n=t.iconStart,i=t.iconEnd,o=t.error,a=t.disabled,s=t.size,c=t.type,d=ve(t,MK),h=G.useRef(null),C=G.useState(!1),v=Ie(C,2),g=v[0],m=v[1],w=function(f,S){return y.createElement(Zf.Icon,{$end:S},typeof f=="function"?f({size:s==="md"?14:12}):f)},x=function(){if(typeof r=="string"&&g)return r},b=function(){if(h.current!==null&&h.current){var f,S;m((h==null||(f=h.current)===null||f===void 0?void 0:f.offsetWidth)<(h==null||(S=h.current)===null||S===void 0?void 0:S.scrollWidth))}};return y.createElement(Zf.Label,he({ref:e,error:o,disabled:a,size:s,type:c},d),n&&w(n,!1),y.createElement(Zf.Text,{title:x(),onMouseOver:b,ref:h},r),i&&w(i,!0))});qt.defaultProps={type:dI.Default,error:!1};var Z7={type:j.oneOf(ht(dI)),iconStart:j.oneOfType([j.node,j.func]),iconEnd:j.oneOfType([j.node,j.func]),error:j.bool,size:j.oneOf(ht(lt)),htmlFor:j.string};qt.propTypes=Z7;var RK=Z.div.withConfig({componentId:"sc-dwg14p-0"})(["width:fit-content;margin:0 auto;max-width:99.5%;max-height:170px;[data-phone='true'] &{padding:0;margin-top:8px;max-height:initial;}"]),NK=Z.div.withConfig({componentId:"sc-dwg14p-1"})(["padding:8px 16px 16px 16px;display:flex;gap:12px;align-items:center;overflow:hidden;",""],function(t){var e=t.isPhoneScreen;return e&&`
justify-content: space-between;
padding: 12px;
gap: 8px;
`}),FK=Z.div.withConfig({componentId:"sc-dwg14p-2"})(function(t){var e=t.theme,r=t.isPhoneScreen;return`
display: flex;
gap: 6px;
border-radius: 2px;
align-items: center;
justify-content: center;
padding: 8px 12px;
svg {
color: `.concat(e.palette[M.IconsPrimary],`;
}
&,
* {
cursor: pointer;
}
&:hover {
`).concat(!r&&"background: ".concat(e.palette["bg-primary-active"],";"),`
}
&[aria-selected='true'] {
`).concat(!r&&"background: ".concat(e.palette["bg-primary-active"],";"),`
border-radius: 4px;
* {
color: `).concat(e.palette["accent-primary-active"],`;
}
}
`).concat(r&&X(["display:flex;flex-direction:column;min-width:52px;min-height:52px;padding:8px;gap:4px;"]),`
`)}),q7=Z(qt).withConfig({componentId:"sc-dwg14p-3"})(function(t){var e=t.theme,r=t.isPhoneScreen;return X(["color:",";",";"],e.palette[M.TextPrimary],r&&e.typography.font[ke.LabelExtraSmallUp])}),DK=Z.div.withConfig({componentId:"sc-dwg14p-4"})(["position:relative;width:100%;transition:max-height 100ms ease-in-out;display:flex;justify-content:center;align-items:center;gap:24px;",";",""],function(t){return`
max-height: `.concat(t.hasChildren?"56px":0,`;
margin: `).concat(t.hasChildren?"0 auto 8px":0,`;
`)},function(t){var e=t.isPhoneScreen;return e&&`
max-height: unset;
flex-direction: column;
padding: 0 12px 8px 12px;
gap: 8px;
margin: 0;
`}),pI=function(t){var e=t.id,r=t.label,n=t.onClick,i=t.Icon,o=t.isSelected,a=t.children,s=t.className,c=_o(320);return y.createElement(FK,{className:s,onClick:function(h){n(e,h)},"aria-selected":o,isPhoneScreen:c},y.createElement(i,{size:c?20:16}),r&&y.createElement(q7,{isPhoneScreen:c},r),a)};pI.defaultProps={isSelected:!1,id:void 0,children:null,label:""};const Qr=G.memo(pI);var gI=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_brightness-tool-button",id:de.BRIGHTNESS,label:n("brightnessTool"),Icon:HX,onClick:e,isSelected:r})};gI.defaultProps={isSelected:!1};function jK(t){var e=t.controlled,r=t.default,n=G.useRef(e!==void 0),i=n.current,o=G.useState(r),a=Ie(o,2),s=a[0],c=a[1],d=i?e:s,h=G.useCallback(function(C){i||c(C)},[]);return[d,h]}var zK=typeof window<"u"?G.useLayoutEffect:G.useEffect;function Qc(t){var e=G.useRef(t);return zK(function(){e.current=t}),G.useCallback(function(){return e.current.apply(void 0,arguments)},[])}var Sd={Auto:"auto",On:"on",Off:"off"},bd="Slider",$K=Z.span.attrs({className:Se(bd,"root")}).withConfig({componentId:"sc-jjink6-0"})(function(t){var e=t.theme,r=t.disabled,n=r===void 0?!1:r;return X(["display:inline-block;border-radius:2px;position:relative;cursor:pointer;touch-action:none;color:",";height:4px;width:100%;padding:12px 0;"],n?e.palette[M.AccentPrimaryDisabled]:e.palette[M.BorderActiveBottom])}),BK=Z.span.attrs({className:Se(bd,"rail")}).withConfig({componentId:"sc-jjink6-1"})(["display:block;position:absolute;border-radius:inherit;background-color:currentColor;opacity:0.38;width:100%;height:inherit;top:50%;transform:translateY(-50%);"]),HK=Z.span.attrs({className:Se(bd,"Track")}).withConfig({componentId:"sc-jjink6-2"})(["display:block;position:absolute;border-radius:inherit;border:1px solid currentColor;background-color:currentColor;height:inherit;top:50%;transform:translateY(-50%);"]),GK=Z.span.attrs({className:Se(bd,"thumb")}).withConfig({componentId:"sc-jjink6-3"})(["position:absolute;width:15px;height:15px;box-sizing:border-box;border-radius:50%;outline:0;background-color:currentColor;display:flex;align-items:center;justify-content:center;top:50%;transform:translate(-50%,-50%);& > input{border:0px;clip:rect(0px,0px,0px,0px);height:100%;margin:-1px;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:100%;direction:ltr;}&::before{position:absolute;content:'';border-radius:inherit;width:100%;height:100%;box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);}&::after{position:absolute;content:'';border-radius:50%;width:42px;height:42px;top:50%;left:50%;transform:translate(-50%,-50%);}"]),VK=Z.span.attrs({className:Se(bd,"label")}).withConfig({componentId:"sc-jjink6-4"})(function(t){var e=t.theme,r=t.open,n=r===void 0?!1:r,i=t.disabled,o=i===void 0?!1:i;return X(["display:flex;align-items:center;justify-content:center;padding:6px 6px;border-radius:2px;position:absolute;top:-10px;font-size:10px;z-index:1;white-space:nowrap;transition:transform 150ms cubic-bezier(0.4,0,0.2,1) 0ms;transform-origin:bottom center;transform:",";background-color:",";color:#fff;cursor:pointer;transition:all 100ms ease-out;&::before{position:absolute;content:'';background-color:inherit;width:8px;height:8px;bottom:0px;left:50%;transform:translate(-50%,50%) rotate(45deg);}"],n?"translateY(-100%) scale(1)":"translateY(-100%) scale(0)",o?e.palette[M.AccentPrimaryDisabled]:e.palette[M.LinkStateless])}),UK=Z.div.attrs({className:Se(bd,"annotation")}).withConfig({componentId:"sc-jjink6-5"})(function(t){var e=t.theme;return X(["display:flex;justify-content:space-between;margin-top:12px;color:",";"],e.palette[M.TextSecondary])}),Jc=Bt({Slider:$K,Rail:BK,Track:HK,Thumb:GK,SliderAnnotation:UK,LabelTooltip:VK}),WK=["defaultValue","disabled","disableSwap","hideTrack","hideAnnotation","value","min","max","onChange","onMouseDown","onMouseUp","step","labelTooltip","annotation","components","componentsProps"];function Ub(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function io(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ub(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ub(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var XK=2,Wb="data-index",C3=pt(function(t,e){var r=t.defaultValue,n=t.disabled,i=n===void 0?!1:n,o=t.disableSwap,a=o===void 0?!1:o,s=t.hideTrack,c=s===void 0?!1:s,d=t.hideAnnotation,h=d===void 0?!1:d,C=t.value,v=t.min,g=v===void 0?0:v,m=t.max,w=m===void 0?100:m,x=t.onChange,b=t.onMouseDown,O=t.onMouseUp,f=t.step,S=f===void 0?1:f,E=t.labelTooltip,I=E===void 0?Sd.Off:E,R=t.annotation,k=R===void 0?"":R,N=t.components,T=N===void 0?{}:N,D=t.componentsProps,z=D===void 0?{}:D,B=ve(t,WK),Y=G.useState(-1),W=Ie(Y,2),q=W[0],ee=W[1],K=G.useState(-1),ue=Ie(K,2),ne=ue[0],ae=ue[1],J=G.useState(!1),Q=Ie(J,2),te=Q[0],we=Q[1],U=G.useRef(0),F=G.useRef(0),$=G.useRef(),ie=G.useRef(null),pe=y8(e,ie),ce=jK({controlled:C,default:r??g}),le=Ie(ce,2),xe=le[0],Ne=le[1],_e="horizontal",He=Array.isArray(xe),Ee=He?xe.slice().sort(sk):[xe],Ve=function(Je){var jt=Je.finger,ut=Je.move,Dr=ut===void 0?!1:ut,jr=Je.values,Qi=ie.current;if(Qi){var Ai=Qi.getBoundingClientRect(),Va=Ai.width,Sn=Ai.height,rl=Ai.bottom,nl=Ai.left,mr;_e.indexOf("vertical")===0?mr=(rl-jt.y)/Sn:mr=(jt.x-nl)/Va,_e.includes("-reverse")&&(mr=1-mr);var vr;vr=AF(mr,g,w),S&&(vr=MF(vr,S,g)),vr=R4(vr,g,w);var pn=0;if(He){Dr?pn=F.current:pn=RF(jr,vr),a&&(vr=R4(vr,jr[pn-1]||-1/0,jr[pn+1]||1/0));var Kn=vr;vr=jw({values:jr,newValue:vr,index:pn}),!(a&&Dr)&&Array.isArray(vr)&&(pn=vr.indexOf(Kn),F.current=pn)}return{newValue:vr,activeIndex:pn}}return null},We=function(Je,jt,ut){x&&x(Je,jt,ut)},Me=function(Je){var jt=Number(Je.currentTarget.getAttribute(Wb)),ut=Je.target.valueAsNumber;if(He){a&&(ut=R4(ut,Ee[jt-1]||-1/0,Ee[jt+1]||1/0));var Dr=ut;ut=jw({values:Ee,newValue:ut,index:jt});var jr=jt;a||(jr=ut.indexOf(Dr)),K1({sliderRef:ie,activeIndex:jr})}Ne(ut),We(Je,ut,jt),O&&O(Je)},gt=Qc(function(Qe){var Je=X1(Qe,$);if(Je){if(U.current+=1,Qe.type==="mousemove"&&Qe.buttons===0){St(Qe);return}var jt=Ve({finger:Je,move:!0,values:Ee}),ut=jt.newValue,Dr=jt.activeIndex;K1({sliderRef:ie,activeIndex:Dr,setActive:ee}),Ne(ut),!te&&U.current>XK&&we(!0),We(Qe,ut,Dr)}}),St=Qc(function(Qe){var Je=X1(Qe,$);we(!1),Je&&(ee(-1),Qe.type==="touchend"&&ae(-1),O&&O(Qe),$.current=void 0,Lt())}),qe=Qc(function(Qe){var Je=Qe.changedTouches[0];Je!=null&&($.current=Je.identifier);var jt=X1(Qe,$),ut=Ve({finger:jt,values:Ee}),Dr=ut.newValue,jr=ut.activeIndex;K1({sliderRef:ie,activeIndex:jr,setActive:ee}),Ne(Dr),We(Qe,Dr,jr),U.current=0;var Qi=Hf(ie.current);Qi.addEventListener("touchmove",gt),Qi.addEventListener("touchend",St)}),je=Qc(function(Qe){var Je=Number(Qe.currentTarget.getAttribute(Wb));ae(Je)}),Ke=Qc(function(){ae(-1)}),bt=Qc(function(Qe){if(i)Qe.preventDefault();else{if(b&&b(Qe),Qe.button!==0)return;Qe.preventDefault();var Je=X1(Qe,$),jt=Ve({finger:Je,values:Ee}),ut=jt.newValue,Dr=jt.activeIndex;K1({sliderRef:ie,activeIndex:Dr,setActive:ee}),Ne(ut),We(Qe,ut,Dr),U.current=0;var jr=Hf(ie.current);jr.addEventListener("mousemove",gt),jr.addEventListener("mouseup",St)}}),Lt=G.useCallback(function(){var Qe=Hf(ie.current);Qe.removeEventListener("mousemove",gt),Qe.removeEventListener("mouseup",St),Qe.removeEventListener("touchmove",gt),Qe.removeEventListener("touchend",St)},[St,gt]);G.useEffect(function(){var Qe=ie.current;if(Qe)return function(){Lt()}},[Lt,qe]),G.useEffect(function(){i&&Lt()},[i,Lt]),i&&q!==-1&&ee(-1);var tr=M4(He?Ee[0]:g,g,w),Ii=M4(Ee[Ee.length-1],g,w)-tr,mt=io(io({},N4[_e].offset(tr)),N4[_e].leap(Ii)),Pe=z.rail,at=typeof T.Rail=="function"?y.createElement(T.Rail,he({},Pe,{style:io({},Pe==null?void 0:Pe.style)})):y.createElement(Jc.Rail,he({},Pe,{style:io({},Pe==null?void 0:Pe.style)})),ct=z.track,Tt=!c&&(typeof T.Track=="function"?y.createElement(T.Track,he({},ct,{style:io(io({},mt),ct==null?void 0:ct.style)})):y.createElement(Jc.Track,he({},ct,{style:io(io({},mt),ct==null?void 0:ct.style)}))),It=z.thumb,or=T.Thumb||Jc.Thumb,gr=T.LabelTooltip||Jc.LabelTooltip,nn=z.labelTooltip,pi=k?" ".concat(k):"";return y.createElement(Jc.Slider,he({ref:pe,disabled:i,onTouchStart:qe,onMouseDown:bt},B),at,Tt,Ee.map(function(Qe,Je){var jt=M4(Qe,g,w),ut=N4[_e].offset(jt);return y.createElement(y.Fragment,{key:Je},y.createElement(or,he({"data-index":Je,onMouseOver:je,onMouseLeave:Ke},It,{style:io(io({},ut),{},{pointerEvents:a&&q!==Je?"none":void 0},It==null?void 0:It.style)}),y.createElement("input",{"data-index":Je,type:"range",min:g,max:w,value:Ee[Je],step:S,disabled:i,onChange:Me}),y.createElement(gr,{open:(ne===Je||q===Je||I==="on")&&I!=="off",disabled:i,style:io({},nn==null?void 0:nn.style)},Ee[Je],pi)))}),!h&&y.createElement(Jc.SliderAnnotation,null,y.createElement("span",null,g,pi),y.createElement("span",null,w,pi)))});C3.defaultProps={annotation:"MB",min:0,max:100,step:1,labelTooltip:Sd.Off};C3.propTypes={defaultValue:j.oneOfType([j.array,j.number]),value:j.oneOfType([j.array,j.number]),min:j.number,max:j.number,onChange:j.func,onMouseDown:j.func,onMouseUp:j.func,step:j.number,annotation:j.string,disabled:j.bool,disableSwap:j.bool,hideTrack:j.bool,hideAnnotation:j.bool,labelTooltip:j.oneOf(ht(Sd)),components:j.shape({Rail:j.elementType,Track:j.elementType,Thumb:j.elementType,LabelTooltip:j.elementType}),componentsProps:j.object};var KK=Z(C3).withConfig({componentId:"sc-1wort0h-0"})(["width:",";max-width:",";user-select:none;padding:0;margin-bottom:",";.SfxSlider-thumb{background-color:",";}.SfxSlider-Track{height:2px;color:",";}.SfxSlider-rail{height:2px;background-color:",";}"],function(t){var e=t.width;return e||"104px"},function(t){var e=t.width;return e||"104px"},function(t){var e=t.noMargin;return e?"":"16px"},function(t){var e=t.theme.palette;return e[M.AccentStateless]},function(t){var e=t.theme.palette;return e[M.AccentStateless]},function(t){var e=t.theme.palette;return e[M.BordersItem]}),YK=["onChange"],qr=function(t){var e=t.onChange,r=ve(t,YK);return y.createElement(KK,he({annotation:"",onChange:function(i,o){return e?e(o):void 0},hideAnnotation:!0,labelTooltip:"auto"},r))},Q7={size:j.number,width:j.oneOfType([j.string,j.number]),height:j.oneOfType([j.string,j.number]),color:j.string,color2:j.string,stroke:j.string,stroke2:j.string,viewBox:j.string},ZK=["color","size"],qK=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,ZK);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8468 3.13984C11.0457 3.33138 11.0517 3.64791 10.8602 3.84682L6.04534 8.84682C5.95332 8.94238 5.82709 8.99746 5.69445 8.99991C5.5618 9.00237 5.43362 8.95201 5.33812 8.85992L0.152931 3.85992C-0.0458479 3.66824 -0.0516033 3.35171 0.140078 3.15293C0.331758 2.95415 0.648288 2.9484 0.847067 3.14008L5.67208 7.79277L10.1398 3.15318C10.3314 2.95427 10.6479 2.9483 10.8468 3.13984Z",fill:n}))}),QK=A(A(A(A({},xa.Right,X(["svg{transform:rotate(-90deg);transition:transform 150ms ease-out;}"])),xa.Left,X(["svg{transform:rotate(90deg);transition:transform 150ms ease-out;}"])),xa.Top,X(["svg{transform:rotate(180deg);transition:transform 150ms ease-out;}"])),xa.Bottom,X(["svg{transform:rotate(0);transition:transform 150ms ease-out;}"])),JK="ArrowTick",eY=Z.span.attrs({className:Se(JK,"root")}).withConfig({componentId:"sc-tlypde-0"})(function(t){var e=t.type,r=e===void 0?xa.Right:e;return X(["display:inline-flex;",""],QK[r])}),tY=Bt({ArrowTick:eY}),rY=["IconProps"],w3=pt(function(t,e){var r=t.IconProps,n=ve(t,rY);return y.createElement(tY.ArrowTick,he({},n,{ref:e}),y.createElement(qK,r))});w3.defaultProps={type:xa.Right};w3.propTypes={type:j.oneOf(ht(xa)),IconProps:j.exact(Q7)};var S3="AccordionHeader",nY=Z.span.attrs({className:Se(S3,"icon")}).withConfig({componentId:"sc-1dtjsgt-0"})(function(){return X(["display:inline-flex;padding-left:8px;"])}),iY=Z.span.attrs({className:Se(S3,"label")}).withConfig({componentId:"sc-1dtjsgt-1"})(function(t){var e=t.theme;return X(["",""],e.typography.font[ke.ButtonSm])}),oY=Z.div.attrs({className:Se(S3,"root")}).withConfig({componentId:"sc-1dtjsgt-2"})(function(t){var e=t.theme,r=t.fullWidth;return X(["display:inline-flex;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:pointer;width:",";color:",";user-select:none;"],r?"100%":"auto",e.palette[M.LinkPrimary])}),aY=Z.div.attrs({className:Se(S3,"wrapper")}).withConfig({componentId:"sc-1dtjsgt-3"})(function(t){var e=t.theme;return X(["color:",";"],e.palette[M.LinkPrimary])}),Iu=Bt({Header:oY,Wrapper:aY,Icon:nY,Label:iY}),sY=["expanded","label","onChange","onClick","onContextMenu","hideIcon","fullWidth","iconProps"];function Xb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function lY(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Xb(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Xb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var J7=pt(function(t,e){var r=t.expanded,n=t.label,i=t.onChange,o=t.onClick,a=t.onContextMenu,s=t.hideIcon,c=t.fullWidth,d=t.iconProps,h=ve(t,sY);return y.createElement(Iu.Header,he({ref:e,onClick:function(v){typeof i=="function"&&i(!r),typeof o=="function"&&o(v)},fullWidth:c},h),y.createElement(Iu.Label,{onContextMenu:a},n),!s&&y.createElement(Iu.Icon,{onContextMenu:a},y.createElement(w3,{type:r?xa.Top:xa.Bottom,IconProps:lY({size:11},d)})))});J7.defaultProps={expanded:!1,hideIcon:!1,fullWidth:!1};J7.propTypes={label:j.node.isRequired,expanded:j.bool,hideIcon:j.bool,fullWidth:j.bool,onChange:j.func,iconProps:j.exact(Q7)};var cY="AccordionDetails",uY=Z.div.attrs({className:Se(cY,"root")}).withConfig({componentId:"sc-1wr6wpr-0"})(["margin:16px 0;"]),mI=Bt({AccordionDetails:uY}),dY=["expanded","children"],e9=pt(function(t,e){var r=t.expanded,n=t.children,i=ve(t,dY);return y.createElement(y.Fragment,null,r&&y.createElement(mI.AccordionDetails,he({ref:e},i),n))});e9.defaultProps={expanded:!1};e9.propTypes={expanded:j.bool};var hY="Accordion",fY=Z.div.attrs({className:Se(hY,"root")}).withConfig({componentId:"sc-1g4tz7s-0"})([""]),pY=Bt({Accordion:fY}),gY=["label","expanded","children","detailStyle","headerStyle","fullWidth","iconProps","onClick","onChange","onContextMenu","hideIcon"];function Kb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Yb(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Kb(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Kb(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var b3=pt(function(t,e){var r=t.label,n=t.expanded,i=t.children,o=t.detailStyle,a=t.headerStyle,s=t.fullWidth,c=t.iconProps,d=t.onClick,h=t.onChange,C=t.onContextMenu,v=t.hideIcon,g=ve(t,gY);return y.createElement(pY.Accordion,he({ref:e},g),y.createElement(J7,{label:r,expanded:n,style:Yb({},a),hideIcon:v,onClick:function(w){typeof h=="function"&&h(!n,w),typeof d=="function"&&d(w)},onContextMenu:C,iconProps:c,fullWidth:s}),y.createElement(e9,{expanded:n,style:Yb({},o)},i))});b3.defaultProps={expanded:!1,hideIcon:!1};b3.propTypes={label:j.node.isRequired,expanded:j.bool,detailStyle:j.object,headerStyle:j.object,onChange:j.func,onContextMenu:j.func,hideIcon:j.bool,fullWidth:j.bool,iconProps:j.exact(Q7)};var mY=["stroke","size"],vY=Ae(function(t,e){var r=t.stroke,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?10:i,a=ve(t,mY);return y.createElement("svg",he({ref:e,width:o*(51/56),height:o,viewBox:"0 0 51 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M12.2754 3L37.2754 27.0741L12.2754 53",stroke:n,strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}))}),yY=["color","size"],vI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,yY);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M12.9783 2.30184C12.7972 2.12074 12.586 2 12.3143 2C12.0728 2 11.8314 2.09055 11.6503 2.30184L4.73816 9.84779L2.29327 7.34254C2.11217 7.16143 1.8707 7.07088 1.62923 7.07088C1.38776 7.07088 1.14629 7.19162 0.995367 7.37272C0.663345 7.76511 0.663345 8.36879 1.02555 8.73099L4.13448 11.9003C4.31559 12.0814 4.52687 12.1719 4.76835 12.1719C5.00982 12.1719 5.25129 12.0814 5.43239 11.8701L12.9783 3.62993C13.3406 3.2979 13.3406 2.66404 12.9783 2.30184Z",fill:n}))}),CY=["color","size"],yI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,CY);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.33984 12.111V2.04761C2.33984 1.49532 2.78756 1.04761 3.33984 1.04761H10.8182C11.3705 1.04761 11.8182 1.49532 11.8182 2.04761V12.111C11.8182 12.6633 11.3705 13.111 10.8182 13.111H3.33984C2.78756 13.111 2.33984 12.6633 2.33984 12.111ZM3.33984 12.111V2.04761L10.8182 2.04761L10.8182 12.111L3.33984 12.111Z",fill:n}),y.createElement("path",{d:"M13.66 4.97388C13.66 4.69774 13.4361 4.47388 13.16 4.47388C12.8838 4.47388 12.66 4.69774 12.66 4.97388V13.9523H5.40491C5.12876 13.9523 4.90491 14.1761 4.90491 14.4523C4.90491 14.7284 5.12876 14.9523 5.40491 14.9523H13.16C13.4361 14.9523 13.66 14.7284 13.66 14.4523V4.97388Z",fill:n}))}),wY=["color","size"],SY=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,wY);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M25 31.625C8.64336 31.625 0.533984 17.3656 0.196875 16.759C-0.065625 16.2867 -0.065625 15.7129 0.196875 15.2406C0.533984 14.6344 8.64336 0.375 25 0.375C41.3566 0.375 49.466 14.6344 49.8031 15.241C50.0656 15.7133 50.0656 16.2871 49.8031 16.7594C49.466 17.3656 41.3566 31.625 25 31.625ZM3.40117 15.9977C5.25977 18.8145 12.557 28.5 25 28.5C37.4824 28.5 44.7473 18.8223 46.5988 16.0023C44.7402 13.1855 37.443 3.5 25 3.5C12.5176 3.5 5.25273 13.1777 3.40117 15.9977ZM25 25.375C19.8305 25.375 15.625 21.1695 15.625 16C15.625 10.8305 19.8305 6.625 25 6.625C30.1695 6.625 34.375 10.8305 34.375 16C34.375 21.1695 30.1695 25.375 25 25.375ZM25 9.75C21.5539 9.75 18.75 12.5539 18.75 16C18.75 19.4461 21.5539 22.25 25 22.25C28.4461 22.25 31.25 19.4461 31.25 16C31.25 12.5539 28.4461 9.75 25 9.75Z",fill:n}))}),bY=["color","size"],_Y=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,bY);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M36.2553 6.05501C36.5966 5.71376 37.1514 5.71376 37.4926 6.05501C37.8339 6.39626 37.8339 6.95103 37.4926 7.29228L32.3765 12.4084C38.3601 15.8067 42.6046 20.7607 42.7917 20.9825C43.0682 21.3097 43.0699 21.7874 42.7936 22.113C42.3893 22.5908 32.7818 33.7978 22.0001 33.7978C18.9909 33.7978 15.9678 33.1203 13.0065 31.7785L7.74272 37.0423C7.57292 37.2121 7.34897 37.2978 7.12495 37.2978C6.90092 37.2978 6.67698 37.212 6.50545 37.0423C6.1642 36.701 6.1642 36.1462 6.50545 35.805L17.0426 25.2678C17.0453 25.265 17.0481 25.2622 17.0509 25.2595C17.0531 25.2573 17.0553 25.2551 17.0575 25.2529L25.7063 16.6041C25.7081 16.6023 25.7098 16.6005 25.7116 16.5987C25.7134 16.5969 25.7152 16.5952 25.717 16.5934L30.2895 12.0208C30.3028 12.0067 30.3164 11.9931 30.3304 11.9799L36.2553 6.05501ZM31.0895 13.6954L27.5301 17.2548C28.4835 18.476 28.9998 19.9721 28.9998 21.5478C28.9998 25.4083 25.8603 28.5478 21.9999 28.5478C20.4242 28.5478 18.9281 28.0314 17.7069 27.078L14.3353 30.4497C16.8728 31.5113 19.445 32.0478 22 32.0478C30.6537 32.0478 38.863 23.8071 40.9489 21.5478C39.6267 20.1195 35.855 16.3016 31.0895 13.6954ZM18.9574 25.8276C19.8392 26.458 20.8929 26.7977 21.9999 26.7977C24.8943 26.7977 27.2499 24.4422 27.2499 21.5477C27.2499 20.4409 26.9092 19.3873 26.2793 18.5056L18.9574 25.8276Z",fill:n}),y.createElement("path",{d:"M27.7418 10.3057C25.7504 9.63545 23.8184 9.29773 22.0001 9.29773C11.2183 9.29773 1.61084 20.5047 1.20659 20.9825C0.951064 21.2835 0.930064 21.721 1.15762 22.0482C1.27837 22.2215 4.17111 26.3287 9.18485 29.659C9.33358 29.7587 9.49985 29.806 9.66785 29.806C9.94963 29.806 10.2279 29.6695 10.3959 29.4122C10.6636 29.0115 10.5534 28.4672 10.1509 28.2012C6.46889 25.753 3.94889 22.7973 3.00561 21.595C5.01989 19.4075 13.2834 11.0478 22.0001 11.0478C23.6293 11.0478 25.3741 11.3558 27.1835 11.963C27.642 12.1275 28.139 11.8738 28.2913 11.4135C28.4453 10.955 28.2003 10.4598 27.7418 10.3057Z",fill:n}),y.createElement("path",{d:"M23.2197 14.6685C22.8224 14.5985 22.4164 14.5477 22 14.5477C18.1395 14.5477 15 17.6872 15 21.5477C15 21.9642 15.0508 22.3702 15.1225 22.7674C15.1977 23.1909 15.567 23.4902 15.9817 23.4902C16.0325 23.4902 16.0832 23.4867 16.1357 23.4762C16.6099 23.3922 16.9285 22.9371 16.8445 22.4629C16.7902 22.1654 16.75 21.8627 16.75 21.5477C16.75 18.6532 19.1055 16.2977 22 16.2977C22.315 16.2977 22.6177 16.338 22.9152 16.3905C23.3807 16.485 23.8444 16.1559 23.9284 15.6817C24.0124 15.2075 23.694 14.7525 23.2197 14.6685Z",fill:n}))}),CI=function(e,r){return e||r?Nn[M.BackgroundHover]:Nn[M.BackgroundStateless]},wI=function(e,r){return e?Nn[M.AccentPrimaryHover]:r?Nn[M.TextPlaceholder]:Nn[M.TextPrimary]},SI=function(e,r){return e?Nn[M.BordersItem]:r?Nn[M.BordersSecondary]:Nn[M.BorderPrimaryStateless]},bI=function(e,r){navigator.clipboard.writeText(e),r(!0)},sf={Text:"text",Password:"password"},xo="Input",P0=Z.span.attrs({className:Se(xo,"Icon")}).withConfig({componentId:"sc-150k0cz-0"})(function(t){var e=t.iconClickStart,r=t.iconClickEnd,n=t.disabled,i=t.readOnly,o=t.iconType,a=t.theme.palette;return X(["display:flex;color:",";cursor:",";flex-shrink:0;",""],a[M.IconsPrimary],(e||r)&&!n&&!i?"pointer":"default",o==="end"&&X(["color:",";"],a[M.IconsSecondary]))}),_I=Z.span.attrs({className:Se(xo,"CopyIcon")}).withConfig({componentId:"sc-150k0cz-1"})(function(t){var e=t.theme.palette;return X(["display:flex;color:",";cursor:pointer;"],e[M.IconsSecondary])}),xY=Z(_I).attrs({className:Se(xo,"PasswordIcon")}).withConfig({componentId:"sc-150k0cz-2"})([""]),EY=Z.div.attrs({className:Se(xo,"Container")}).withConfig({componentId:"sc-150k0cz-3"})(function(){return X(["display:block;color:inherit;font-size:inherit;width:100%;min-width:0;margin:0;padding:0;border:0;background-color:transparent;outline:none;"])}),n6=Z.input.attrs({className:Se(xo,"Base")}).withConfig({componentId:"sc-150k0cz-4"})(function(t){var e=t.theme.palette,r=t.isEllipsis,n=r===void 0?!1:r;return X(["display:block;color:inherit;width:100%;min-width:fit-content;margin:0;padding:0;border:0;background-color:transparent;outline:none;"," &::placeholder{color:",";}"],n&&X(["text-overflow:ellipsis;"]),e[M.TextPlaceholder])}),OY=Z.div.attrs({className:Se(xo,"root")}).withConfig({componentId:"sc-150k0cz-5"})(function(t){var e=t.size,r=e===void 0?lt.Md:e,n=t.error,i=n===void 0?!1:n,o=t.fullWidth,a=o===void 0?!1:o,s=t.readOnly,c=s===void 0?!1:s,d=t.disabled,h=d===void 0?!1:d,C=t.isHovering,v=C===void 0?!1:C,g=t.isSelectedItems,m=g===void 0?!1:g,w=t.theme;return X(["position:relative;display:inline-flex;align-items:center;box-sizing:border-box;column-gap:8px;cursor:text;transition:all 100ms ease-out;width:",";pointer-events:",";background-color:",";border-radius:",";border:1px solid ",";color:",";"," ",";","{","}"," "," &:hover{color:",";}",""],a?"100%":"300px",h?"none":"auto",CI(c,h),w.shape.borderRadius[go.Md],SI(c,h),h?w.palette[M.TextPlaceholder]:w.palette[M.TextPrimary],kK[r],m&&`
height: fit-content;
`.concat(n6,` {
max-width: fit-content;
min-width: 20px;
flex-grow: 1;
width: 40px;
}
`),n6,hI[r],!c&&!h&&X(["&:focus-within{background-color:","!important;border:1px solid ",";&:hover{border:1px solid ",";","{color:",";}}}"," &:hover{background-color:",";border:1px solid ",";","{color:",";}}"],w.palette[M.BackgroundSecondary],w.palette[M.AccentStateless],w.palette[M.AccentStateless],P0,w.palette[M.IconsPrimary],v&&X(["","{color:",";}"],P0,w.palette[M.IconsPrimaryHover]),w.palette[M.BackgroundStateless],w.palette[M.BordersPrimaryHover],P0,w.palette[M.IconsPrimaryHover]),h&&X(["","{color:",";}"],P0,w.palette[M.IconsMuted]),wI(c,h),i&&IK)}),PY=Z.span.attrs({className:Se(xo,"ClearIcon")}).withConfig({componentId:"sc-150k0cz-6"})(function(t){var e=t.theme.palette;return X(["display:flex;cursor:pointer;color:",";"],e[M.IconsPrimary])}),kY=Z.div.attrs({className:Se(xo,"NotificationBox")}).withConfig({componentId:"sc-150k0cz-7"})(function(t){var e=t.size,r=e===void 0?lt.Md:e,n=t.isTextarea,i=n===void 0?!1:n,o=t.theme.palette;return X(["display:flex;position:absolute;align-items:center;max-height:34px;right:0px;padding:8px 12px;gap:6px;bottom:",";box-shadow:0px 2px 6px ",";background-color:",";border-radius:4px;align-items:center;",""],r===lt.Md?"45px":"35px",o[M.LargeShadow],o[M.BackgroundStateless],i&&`
bottom: `.concat(r===lt.Md?27:22,`px;
right: `).concat(r===lt.Md?16:12,`px;
`))}),TY=Z.span.attrs({className:Se(xo,"NotificationIcon")}).withConfig({componentId:"sc-150k0cz-8"})(function(t){var e=t.theme.palette;return X(["display:flex;color:",";"],e[M.IconsPrimary])}),IY=Z.span.attrs({className:Se(xo,"NotificationText")}).withConfig({componentId:"sc-150k0cz-9"})(function(t){var e=t.theme,r=e.palette,n=e.typography.font;return X(["display:flex;white-space:nowrap;",";color:",";"],n[ke.TextSmall],r[M.TextPrimary])}),AY=Z.div.attrs({className:Se(xo,"fieldWrapper")}).withConfig({componentId:"sc-150k0cz-10"})(function(t){var e=t.isSelectedItems;return X(["width:100%;height:100%;display:inline-flex;flex-wrap:wrap;gap:8px;max-height:120px;",";::-webkit-scrollbar{display:none;}"],e&&`
overflow-y: auto;
`)}),ii=Bt({Input:OY,Container:EY,Base:n6,Icon:P0,CopyIcon:_I,PasswordIcon:xY,ClearIcon:PY,NotificationBox:kY,NotificationIcon:TY,NotificationText:IY,FieldWrapper:AY}),LY=["inputType","children","iconStart","iconEnd","iconChange","clearIcon","iconClickStart","iconClickEnd","clearIconClick","size","className","style","fullWidth","readOnly","disabled","hideCopyIcon","focusOnMount","focusOnClick","isEllipsis","copyTextMessage","copySuccessIcon","error","renderTags","showPlaceholder"],lm=function(e,r){switch(e){case lt.Md:return r==="start"?15:14;case lt.Sm:default:return r==="start"?13:10}},Zb=function(e){switch(e){case lt.Md:return 16;case lt.Sm:default:return 14}},Yl=pt(function(t,e){var r,n=t.inputType,i=t.children,o=t.iconStart,a=t.iconEnd,s=t.iconChange,c=t.clearIcon,d=t.iconClickStart,h=t.iconClickEnd,C=t.clearIconClick,v=t.size,g=v===void 0?lt.Md:v,m=t.className,w=t.style,x=t.fullWidth,b=t.readOnly,O=t.disabled,f=t.hideCopyIcon,S=f===void 0?!1:f,E=t.focusOnMount,I=E===void 0?!1:E,R=t.focusOnClick,k=R===void 0?!0:R,N=t.isEllipsis,T=N===void 0?!1:N,D=t.copyTextMessage,z=t.copySuccessIcon,B=t.error,Y=t.renderTags,W=t.showPlaceholder,q=ve(t,LY),ee=G.useState(!1),K=Ie(ee,2),ue=K[0],ne=K[1],ae=G.useState(!1),J=Ie(ae,2),Q=J[0],te=J[1],we=G.useState(!1),U=Ie(we,2),F=U[0],$=U[1],ie=G.useRef(null),pe=(r=q.selectedItems)===null||r===void 0?void 0:r.length,ce=q.value||pe?"":q.placeholder,le=ue&&b&&q.value.length>0&&!S,xe=function(){var bt;O||b||(W==null||W(!1),(bt=ie.current)===null||bt===void 0||bt.focus())};G.useEffect(function(){I&&xe()},[]),G.useEffect(function(){setTimeout(function(){return te(!1)},2e3)},[Q]);var Ne=function(){setTimeout(function(){ne(!0)},150)},_e=function(){setTimeout(function(){ne(!1)},200)},He=function(bt,Lt){O||b||(k&&xe(),Lt==="start"?d&&d(bt):Lt==="end"?h&&h(bt):C&&C(bt))},Ee=function(bt,Lt){return bt?y.createElement(ii.Icon,{onClick:function(Ii){return He(Ii,Lt)},iconClickStart:d,iconClickEnd:h,iconType:Lt,disabled:O,readOnly:b},typeof bt=="function"?bt({size:lm(g,Lt)}):bt):void 0},Ve=function(){return O||b||!c?void 0:y.createElement(ii.ClearIcon,{onClick:function(Lt){return He(Lt,"clear")}},typeof c=="function"?c({size:lm(g,"clear")}):c)},We=function(bt){return le?y.createElement(ii.CopyIcon,{onClick:function(){return bI(q.value,te)}},typeof bt=="function"?bt():bt):void 0},Me=function(bt){bt.stopPropagation(),$(!F)},gt=function(){return y.createElement(ii.PasswordIcon,{onClick:function(Lt){return Me(Lt)}},F?y.createElement(_Y,{size:Zb(g)}):y.createElement(SY,{size:Zb(g)}))},St=function(){return!n&&q!==null&&q!==void 0&&q.type?q==null?void 0:q.type:n===sf.Password&&!F?sf.Password:sf.Text},qe=function(){return y.createElement(ii.FieldWrapper,{isSelectedItems:!!pe},Y&&Y(),y.createElement(ii.Base,he({},q,{placeholder:ce,ref:ie,readOnly:!!b,type:St(),isEllipsis:T})))},je=function(){return y.createElement(ii.NotificationBox,{size:g},y.createElement(ii.NotificationIcon,null,z),y.createElement(ii.NotificationText,null,D))};return y.createElement(ii.Input,{onClick:k?xe:void 0,ref:e,size:g,onMouseEnter:Ne,onMouseLeave:_e,className:m,style:w,readOnly:b,disabled:O,fullWidth:!!x,error:B,clearIcon:c,isHovering:q.isHovering,isSelectedItems:!!pe},Ee(o,"start"),qe(),We(y.createElement(yI,{size:lm(g,"copy")})),Q&&je(),Ve(),n===sf.Password&&gt(),Ee(a,"end"),Ee(s,""),i&&y.createElement(y.Fragment,null,i))}),MY={size:lt.Md,error:!1,fullWidth:!1,readOnly:!1,disabled:!1,copyTextMessage:"Copied!"};Yl.defaultProps=MY;var xI={size:j.oneOf(ht(lt)),iconStart:j.oneOfType([j.node,j.func]),iconEnd:j.oneOfType([j.node,j.func]),iconChange:j.oneOfType([j.node,j.func]),copySuccessIcon:j.oneOfType([j.node,j.func]),clearIcon:j.oneOfType([j.node,j.func]),error:j.bool,fullWidth:j.bool,value:j.any,readOnly:j.bool,disabled:j.bool,iconClickStart:j.func,showPlaceholder:j.func,iconClickEnd:j.func,clearIconClick:j.func,focusOnMount:j.bool,focusOnClick:j.bool,copyTextMessage:j.string,inputType:j.string,renderTags:j.func};Yl.propTypes=xI;var hi="top",Yi="bottom",Zi="right",fi="left",t9="auto",Rh=[hi,Yi,Zi,fi],Ju="start",hh="end",RY="clippingParents",EI="viewport",v0="popper",NY="reference",qb=Rh.reduce(function(t,e){return t.concat([e+"-"+Ju,e+"-"+hh])},[]),OI=[].concat(Rh,[t9]).reduce(function(t,e){return t.concat([e,e+"-"+Ju,e+"-"+hh])},[]),FY="beforeRead",DY="read",jY="afterRead",zY="beforeMain",$Y="main",BY="afterMain",HY="beforeWrite",GY="write",VY="afterWrite",UY=[FY,DY,jY,zY,$Y,BY,HY,GY,VY];function Ko(t){return t?(t.nodeName||"").toLowerCase():null}function xi(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Zl(t){var e=xi(t).Element;return t instanceof e||t instanceof Element}function Wi(t){var e=xi(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function r9(t){if(typeof ShadowRoot>"u")return!1;var e=xi(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function WY(t){var e=t.state;Object.keys(e.elements).forEach(function(r){var n=e.styles[r]||{},i=e.attributes[r]||{},o=e.elements[r];!Wi(o)||!Ko(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function XY(t){var e=t.state,r={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,r.popper),e.styles=r,e.elements.arrow&&Object.assign(e.elements.arrow.style,r.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],o=e.attributes[n]||{},a=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:r[n]),s=a.reduce(function(c,d){return c[d]="",c},{});!Wi(i)||!Ko(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const KY={name:"applyStyles",enabled:!0,phase:"write",fn:WY,effect:XY,requires:["computeStyles"]};function Xo(t){return t.split("-")[0]}var Nl=Math.max,z2=Math.min,ed=Math.round;function i6(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function PI(){return!/^((?!chrome|android).)*safari/i.test(i6())}function td(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!1);var n=t.getBoundingClientRect(),i=1,o=1;e&&Wi(t)&&(i=t.offsetWidth>0&&ed(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&ed(n.height)/t.offsetHeight||1);var a=Zl(t)?xi(t):window,s=a.visualViewport,c=!PI()&&r,d=(n.left+(c&&s?s.offsetLeft:0))/i,h=(n.top+(c&&s?s.offsetTop:0))/o,C=n.width/i,v=n.height/o;return{width:C,height:v,top:h,right:d+C,bottom:h+v,left:d,x:d,y:h}}function n9(t){var e=td(t),r=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-r)<=1&&(r=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:r,height:n}}function kI(t,e){var r=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(r&&r9(r)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function La(t){return xi(t).getComputedStyle(t)}function YY(t){return["table","td","th"].indexOf(Ko(t))>=0}function qs(t){return((Zl(t)?t.ownerDocument:t.document)||window.document).documentElement}function _3(t){return Ko(t)==="html"?t:t.assignedSlot||t.parentNode||(r9(t)?t.host:null)||qs(t)}function Qb(t){return!Wi(t)||La(t).position==="fixed"?null:t.offsetParent}function ZY(t){var e=/firefox/i.test(i6()),r=/Trident/i.test(i6());if(r&&Wi(t)){var n=La(t);if(n.position==="fixed")return null}var i=_3(t);for(r9(i)&&(i=i.host);Wi(i)&&["html","body"].indexOf(Ko(i))<0;){var o=La(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Nh(t){for(var e=xi(t),r=Qb(t);r&&YY(r)&&La(r).position==="static";)r=Qb(r);return r&&(Ko(r)==="html"||Ko(r)==="body"&&La(r).position==="static")?e:r||ZY(t)||e}function i9(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function B0(t,e,r){return Nl(t,z2(e,r))}function qY(t,e,r){var n=B0(t,e,r);return n>r?r:n}function TI(){return{top:0,right:0,bottom:0,left:0}}function II(t){return Object.assign({},TI(),t)}function AI(t,e){return e.reduce(function(r,n){return r[n]=t,r},{})}var QY=function(e,r){return e=typeof e=="function"?e(Object.assign({},r.rects,{placement:r.placement})):e,II(typeof e!="number"?e:AI(e,Rh))};function JY(t){var e,r=t.state,n=t.name,i=t.options,o=r.elements.arrow,a=r.modifiersData.popperOffsets,s=Xo(r.placement),c=i9(s),d=[fi,Zi].indexOf(s)>=0,h=d?"height":"width";if(!(!o||!a)){var C=QY(i.padding,r),v=n9(o),g=c==="y"?hi:fi,m=c==="y"?Yi:Zi,w=r.rects.reference[h]+r.rects.reference[c]-a[c]-r.rects.popper[h],x=a[c]-r.rects.reference[c],b=Nh(o),O=b?c==="y"?b.clientHeight||0:b.clientWidth||0:0,f=w/2-x/2,S=C[g],E=O-v[h]-C[m],I=O/2-v[h]/2+f,R=B0(S,I,E),k=c;r.modifiersData[n]=(e={},e[k]=R,e.centerOffset=R-I,e)}}function eZ(t){var e=t.state,r=t.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||kI(e.elements.popper,i)&&(e.elements.arrow=i))}const tZ={name:"arrow",enabled:!0,phase:"main",fn:JY,effect:eZ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rd(t){return t.split("-")[1]}var rZ={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nZ(t,e){var r=t.x,n=t.y,i=e.devicePixelRatio||1;return{x:ed(r*i)/i||0,y:ed(n*i)/i||0}}function Jb(t){var e,r=t.popper,n=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,c=t.gpuAcceleration,d=t.adaptive,h=t.roundOffsets,C=t.isFixed,v=a.x,g=v===void 0?0:v,m=a.y,w=m===void 0?0:m,x=typeof h=="function"?h({x:g,y:w}):{x:g,y:w};g=x.x,w=x.y;var b=a.hasOwnProperty("x"),O=a.hasOwnProperty("y"),f=fi,S=hi,E=window;if(d){var I=Nh(r),R="clientHeight",k="clientWidth";if(I===xi(r)&&(I=qs(r),La(I).position!=="static"&&s==="absolute"&&(R="scrollHeight",k="scrollWidth")),I=I,i===hi||(i===fi||i===Zi)&&o===hh){S=Yi;var N=C&&I===E&&E.visualViewport?E.visualViewport.height:I[R];w-=N-n.height,w*=c?1:-1}if(i===fi||(i===hi||i===Yi)&&o===hh){f=Zi;var T=C&&I===E&&E.visualViewport?E.visualViewport.width:I[k];g-=T-n.width,g*=c?1:-1}}var D=Object.assign({position:s},d&&rZ),z=h===!0?nZ({x:g,y:w},xi(r)):{x:g,y:w};if(g=z.x,w=z.y,c){var B;return Object.assign({},D,(B={},B[S]=O?"0":"",B[f]=b?"0":"",B.transform=(E.devicePixelRatio||1)<=1?"translate("+g+"px, "+w+"px)":"translate3d("+g+"px, "+w+"px, 0)",B))}return Object.assign({},D,(e={},e[S]=O?w+"px":"",e[f]=b?g+"px":"",e.transform="",e))}function iZ(t){var e=t.state,r=t.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,a=o===void 0?!0:o,s=r.roundOffsets,c=s===void 0?!0:s,d={placement:Xo(e.placement),variation:rd(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Jb(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:c})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Jb(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const oZ={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:iZ,data:{}};var lf={passive:!0};function aZ(t){var e=t.state,r=t.instance,n=t.options,i=n.scroll,o=i===void 0?!0:i,a=n.resize,s=a===void 0?!0:a,c=xi(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&d.forEach(function(h){h.addEventListener("scroll",r.update,lf)}),s&&c.addEventListener("resize",r.update,lf),function(){o&&d.forEach(function(h){h.removeEventListener("scroll",r.update,lf)}),s&&c.removeEventListener("resize",r.update,lf)}}const sZ={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:aZ,data:{}};var lZ={left:"right",right:"left",bottom:"top",top:"bottom"};function qf(t){return t.replace(/left|right|bottom|top/g,function(e){return lZ[e]})}var cZ={start:"end",end:"start"};function e_(t){return t.replace(/start|end/g,function(e){return cZ[e]})}function o9(t){var e=xi(t),r=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:r,scrollTop:n}}function a9(t){return td(qs(t)).left+o9(t).scrollLeft}function uZ(t,e){var r=xi(t),n=qs(t),i=r.visualViewport,o=n.clientWidth,a=n.clientHeight,s=0,c=0;if(i){o=i.width,a=i.height;var d=PI();(d||!d&&e==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:o,height:a,x:s+a9(t),y:c}}function dZ(t){var e,r=qs(t),n=o9(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Nl(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Nl(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+a9(t),c=-n.scrollTop;return La(i||r).direction==="rtl"&&(s+=Nl(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:c}}function s9(t){var e=La(t),r=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function LI(t){return["html","body","#document"].indexOf(Ko(t))>=0?t.ownerDocument.body:Wi(t)&&s9(t)?t:LI(_3(t))}function H0(t,e){var r;e===void 0&&(e=[]);var n=LI(t),i=n===((r=t.ownerDocument)==null?void 0:r.body),o=xi(n),a=i?[o].concat(o.visualViewport||[],s9(n)?n:[]):n,s=e.concat(a);return i?s:s.concat(H0(_3(a)))}function o6(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function hZ(t,e){var r=td(t,!1,e==="fixed");return r.top=r.top+t.clientTop,r.left=r.left+t.clientLeft,r.bottom=r.top+t.clientHeight,r.right=r.left+t.clientWidth,r.width=t.clientWidth,r.height=t.clientHeight,r.x=r.left,r.y=r.top,r}function t_(t,e,r){return e===EI?o6(uZ(t,r)):Zl(e)?hZ(e,r):o6(dZ(qs(t)))}function fZ(t){var e=H0(_3(t)),r=["absolute","fixed"].indexOf(La(t).position)>=0,n=r&&Wi(t)?Nh(t):t;return Zl(n)?e.filter(function(i){return Zl(i)&&kI(i,n)&&Ko(i)!=="body"}):[]}function pZ(t,e,r,n){var i=e==="clippingParents"?fZ(t):[].concat(e),o=[].concat(i,[r]),a=o[0],s=o.reduce(function(c,d){var h=t_(t,d,n);return c.top=Nl(h.top,c.top),c.right=z2(h.right,c.right),c.bottom=z2(h.bottom,c.bottom),c.left=Nl(h.left,c.left),c},t_(t,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function MI(t){var e=t.reference,r=t.element,n=t.placement,i=n?Xo(n):null,o=n?rd(n):null,a=e.x+e.width/2-r.width/2,s=e.y+e.height/2-r.height/2,c;switch(i){case hi:c={x:a,y:e.y-r.height};break;case Yi:c={x:a,y:e.y+e.height};break;case Zi:c={x:e.x+e.width,y:s};break;case fi:c={x:e.x-r.width,y:s};break;default:c={x:e.x,y:e.y}}var d=i?i9(i):null;if(d!=null){var h=d==="y"?"height":"width";switch(o){case Ju:c[d]=c[d]-(e[h]/2-r[h]/2);break;case hh:c[d]=c[d]+(e[h]/2-r[h]/2);break}}return c}function fh(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=n===void 0?t.placement:n,o=r.strategy,a=o===void 0?t.strategy:o,s=r.boundary,c=s===void 0?RY:s,d=r.rootBoundary,h=d===void 0?EI:d,C=r.elementContext,v=C===void 0?v0:C,g=r.altBoundary,m=g===void 0?!1:g,w=r.padding,x=w===void 0?0:w,b=II(typeof x!="number"?x:AI(x,Rh)),O=v===v0?NY:v0,f=t.rects.popper,S=t.elements[m?O:v],E=pZ(Zl(S)?S:S.contextElement||qs(t.elements.popper),c,h,a),I=td(t.elements.reference),R=MI({reference:I,element:f,placement:i}),k=o6(Object.assign({},f,R)),N=v===v0?k:I,T={top:E.top-N.top+b.top,bottom:N.bottom-E.bottom+b.bottom,left:E.left-N.left+b.left,right:N.right-E.right+b.right},D=t.modifiersData.offset;if(v===v0&&D){var z=D[i];Object.keys(T).forEach(function(B){var Y=[Zi,Yi].indexOf(B)>=0?1:-1,W=[hi,Yi].indexOf(B)>=0?"y":"x";T[B]+=z[W]*Y})}return T}function gZ(t,e){e===void 0&&(e={});var r=e,n=r.placement,i=r.boundary,o=r.rootBoundary,a=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,d=c===void 0?OI:c,h=rd(n),C=h?s?qb:qb.filter(function(m){return rd(m)===h}):Rh,v=C.filter(function(m){return d.indexOf(m)>=0});v.length===0&&(v=C);var g=v.reduce(function(m,w){return m[w]=fh(t,{placement:w,boundary:i,rootBoundary:o,padding:a})[Xo(w)],m},{});return Object.keys(g).sort(function(m,w){return g[m]-g[w]})}function mZ(t){if(Xo(t)===t9)return[];var e=qf(t);return[e_(t),e,e_(e)]}function vZ(t){var e=t.state,r=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!0:a,c=r.fallbackPlacements,d=r.padding,h=r.boundary,C=r.rootBoundary,v=r.altBoundary,g=r.flipVariations,m=g===void 0?!0:g,w=r.allowedAutoPlacements,x=e.options.placement,b=Xo(x),O=b===x,f=c||(O||!m?[qf(x)]:mZ(x)),S=[x].concat(f).reduce(function(te,we){return te.concat(Xo(we)===t9?gZ(e,{placement:we,boundary:h,rootBoundary:C,padding:d,flipVariations:m,allowedAutoPlacements:w}):we)},[]),E=e.rects.reference,I=e.rects.popper,R=new Map,k=!0,N=S[0],T=0;T<S.length;T++){var D=S[T],z=Xo(D),B=rd(D)===Ju,Y=[hi,Yi].indexOf(z)>=0,W=Y?"width":"height",q=fh(e,{placement:D,boundary:h,rootBoundary:C,altBoundary:v,padding:d}),ee=Y?B?Zi:fi:B?Yi:hi;E[W]>I[W]&&(ee=qf(ee));var K=qf(ee),ue=[];if(o&&ue.push(q[z]<=0),s&&ue.push(q[ee]<=0,q[K]<=0),ue.every(function(te){return te})){N=D,k=!1;break}R.set(D,ue)}if(k)for(var ne=m?3:1,ae=function(we){var U=S.find(function(F){var $=R.get(F);if($)return $.slice(0,we).every(function(ie){return ie})});if(U)return N=U,"break"},J=ne;J>0;J--){var Q=ae(J);if(Q==="break")break}e.placement!==N&&(e.modifiersData[n]._skip=!0,e.placement=N,e.reset=!0)}}const yZ={name:"flip",enabled:!0,phase:"main",fn:vZ,requiresIfExists:["offset"],data:{_skip:!1}};function r_(t,e,r){return r===void 0&&(r={x:0,y:0}),{top:t.top-e.height-r.y,right:t.right-e.width+r.x,bottom:t.bottom-e.height+r.y,left:t.left-e.width-r.x}}function n_(t){return[hi,Zi,Yi,fi].some(function(e){return t[e]>=0})}function CZ(t){var e=t.state,r=t.name,n=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=fh(e,{elementContext:"reference"}),s=fh(e,{altBoundary:!0}),c=r_(a,n),d=r_(s,i,o),h=n_(c),C=n_(d);e.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:C},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":C})}const wZ={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:CZ};function SZ(t,e,r){var n=Xo(t),i=[fi,hi].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},e,{placement:t})):r,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[fi,Zi].indexOf(n)>=0?{x:s,y:a}:{x:a,y:s}}function bZ(t){var e=t.state,r=t.options,n=t.name,i=r.offset,o=i===void 0?[0,0]:i,a=OI.reduce(function(h,C){return h[C]=SZ(C,e.rects,o),h},{}),s=a[e.placement],c=s.x,d=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=d),e.modifiersData[n]=a}const _Z={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:bZ};function xZ(t){var e=t.state,r=t.name;e.modifiersData[r]=MI({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const EZ={name:"popperOffsets",enabled:!0,phase:"read",fn:xZ,data:{}};function OZ(t){return t==="x"?"y":"x"}function PZ(t){var e=t.state,r=t.options,n=t.name,i=r.mainAxis,o=i===void 0?!0:i,a=r.altAxis,s=a===void 0?!1:a,c=r.boundary,d=r.rootBoundary,h=r.altBoundary,C=r.padding,v=r.tether,g=v===void 0?!0:v,m=r.tetherOffset,w=m===void 0?0:m,x=fh(e,{boundary:c,rootBoundary:d,padding:C,altBoundary:h}),b=Xo(e.placement),O=rd(e.placement),f=!O,S=i9(b),E=OZ(S),I=e.modifiersData.popperOffsets,R=e.rects.reference,k=e.rects.popper,N=typeof w=="function"?w(Object.assign({},e.rects,{placement:e.placement})):w,T=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,z={x:0,y:0};if(I){if(o){var B,Y=S==="y"?hi:fi,W=S==="y"?Yi:Zi,q=S==="y"?"height":"width",ee=I[S],K=ee+x[Y],ue=ee-x[W],ne=g?-k[q]/2:0,ae=O===Ju?R[q]:k[q],J=O===Ju?-k[q]:-R[q],Q=e.elements.arrow,te=g&&Q?n9(Q):{width:0,height:0},we=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:TI(),U=we[Y],F=we[W],$=B0(0,R[q],te[q]),ie=f?R[q]/2-ne-$-U-T.mainAxis:ae-$-U-T.mainAxis,pe=f?-R[q]/2+ne+$+F+T.mainAxis:J+$+F+T.mainAxis,ce=e.elements.arrow&&Nh(e.elements.arrow),le=ce?S==="y"?ce.clientTop||0:ce.clientLeft||0:0,xe=(B=D==null?void 0:D[S])!=null?B:0,Ne=ee+ie-xe-le,_e=ee+pe-xe,He=B0(g?z2(K,Ne):K,ee,g?Nl(ue,_e):ue);I[S]=He,z[S]=He-ee}if(s){var Ee,Ve=S==="x"?hi:fi,We=S==="x"?Yi:Zi,Me=I[E],gt=E==="y"?"height":"width",St=Me+x[Ve],qe=Me-x[We],je=[hi,fi].indexOf(b)!==-1,Ke=(Ee=D==null?void 0:D[E])!=null?Ee:0,bt=je?St:Me-R[gt]-k[gt]-Ke+T.altAxis,Lt=je?Me+R[gt]+k[gt]-Ke-T.altAxis:qe,tr=g&&je?qY(bt,Me,Lt):B0(g?bt:St,Me,g?Lt:qe);I[E]=tr,z[E]=tr-Me}e.modifiersData[n]=z}}const kZ={name:"preventOverflow",enabled:!0,phase:"main",fn:PZ,requiresIfExists:["offset"]};function TZ(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function IZ(t){return t===xi(t)||!Wi(t)?o9(t):TZ(t)}function AZ(t){var e=t.getBoundingClientRect(),r=ed(e.width)/t.offsetWidth||1,n=ed(e.height)/t.offsetHeight||1;return r!==1||n!==1}function LZ(t,e,r){r===void 0&&(r=!1);var n=Wi(e),i=Wi(e)&&AZ(e),o=qs(e),a=td(t,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Ko(e)!=="body"||s9(o))&&(s=IZ(e)),Wi(e)?(c=td(e,!0),c.x+=e.clientLeft,c.y+=e.clientTop):o&&(c.x=a9(o))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function MZ(t){var e=new Map,r=new Set,n=[];t.forEach(function(o){e.set(o.name,o)});function i(o){r.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!r.has(s)){var c=e.get(s);c&&i(c)}}),n.push(o)}return t.forEach(function(o){r.has(o.name)||i(o)}),n}function RZ(t){var e=MZ(t);return UY.reduce(function(r,n){return r.concat(e.filter(function(i){return i.phase===n}))},[])}function NZ(t){var e;return function(){return e||(e=new Promise(function(r){Promise.resolve().then(function(){e=void 0,r(t())})})),e}}function FZ(t){var e=t.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(e).map(function(r){return e[r]})}var i_={placement:"bottom",modifiers:[],strategy:"absolute"};function o_(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function DZ(t){t===void 0&&(t={});var e=t,r=e.defaultModifiers,n=r===void 0?[]:r,i=e.defaultOptions,o=i===void 0?i_:i;return function(s,c,d){d===void 0&&(d=o);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},i_,o),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},C=[],v=!1,g={state:h,setOptions:function(b){var O=typeof b=="function"?b(h.options):b;w(),h.options=Object.assign({},o,h.options,O),h.scrollParents={reference:Zl(s)?H0(s):s.contextElement?H0(s.contextElement):[],popper:H0(c)};var f=RZ(FZ([].concat(n,h.options.modifiers)));return h.orderedModifiers=f.filter(function(S){return S.enabled}),m(),g.update()},forceUpdate:function(){if(!v){var b=h.elements,O=b.reference,f=b.popper;if(o_(O,f)){h.rects={reference:LZ(O,Nh(f),h.options.strategy==="fixed"),popper:n9(f)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(T){return h.modifiersData[T.name]=Object.assign({},T.data)});for(var S=0;S<h.orderedModifiers.length;S++){if(h.reset===!0){h.reset=!1,S=-1;continue}var E=h.orderedModifiers[S],I=E.fn,R=E.options,k=R===void 0?{}:R,N=E.name;typeof I=="function"&&(h=I({state:h,options:k,name:N,instance:g})||h)}}}},update:NZ(function(){return new Promise(function(x){g.forceUpdate(),x(h)})}),destroy:function(){w(),v=!0}};if(!o_(s,c))return g;g.setOptions(d).then(function(x){!v&&d.onFirstUpdate&&d.onFirstUpdate(x)});function m(){h.orderedModifiers.forEach(function(x){var b=x.name,O=x.options,f=O===void 0?{}:O,S=x.effect;if(typeof S=="function"){var E=S({state:h,name:b,instance:g,options:f}),I=function(){};C.push(E||I)}})}function w(){C.forEach(function(x){return x()}),C=[]}return g}}var jZ=[sZ,EZ,oZ,KY,_Z,yZ,kZ,tZ,wZ],zZ=DZ({defaultModifiers:jZ});function $Z(t){var e=document.createElement("div");return e.setAttribute("id",t),e}function BZ(t){document.body.append(t)}function RI(t){var e=G.useRef(null);G.useEffect(function(){var n=document.querySelector("#".concat(t)),i=n||$Z(t);return n||BZ(i),e.current&&i.append(e.current),function(){e.current&&e.current.remove(),i.childNodes.length===-1&&i.remove()}},[]);function r(){return e.current||(e.current=document.createElement("div")),e.current}return r()}var Xr={AutoStart:"auto-start",Auto:"auto",AutoEnd:"auto-end",TopStart:"top-start",Top:"top",TopEnd:"top-end",BottomStart:"bottom-start",Bottom:"bottom",BottomEnd:"bottom-end",LeftStart:"left-start",Left:"left",LeftEnd:"left-end",RightStart:"right-start",Right:"right",RightEnd:"right-end"},HZ={Absloute:"absolute",Fixed:"fixed"},cm,GZ=(cm={},A(A(A(A(A(A(A(A(A(A(cm,Xr.Auto,X(["top:0px;bottom:0px;left:0px;right:0px;"])),Xr.AutoEnd,X(["top:0px;bottom:0px;left:0px;right:0px;"])),Xr.AutoStart,X(["top:0px;bottom:0px;left:0px;right:0px;"])),Xr.Right,X(["left:-4px;"])),Xr.RightEnd,X(["left:-4px;"])),Xr.RightStart,X(["left:-4px;"])),Xr.Left,X(["right:-4px;"])),Xr.LeftEnd,X(["right:-4px;"])),Xr.LeftStart,X(["right:-4px;"])),Xr.Top,X(["bottom:-4px;"])),A(A(A(A(A(cm,Xr.TopEnd,X(["bottom:-4px;"])),Xr.TopStart,X(["bottom:-4px;"])),Xr.Bottom,X(["top:-4px;"])),Xr.BottomEnd,X(["top:-4px;"])),Xr.BottomStart,X(["top:-4px;"]))),x3="Popper",VZ=Z.div.attrs({className:Se(x3,"root")}).withConfig({componentId:"sc-1373tsp-0"})([""]),UZ=Z.div.attrs({className:Se(x3,"wrapper")}).withConfig({componentId:"sc-1373tsp-1"})(function(t){var e=t.zIndex;return X(["position:relative;z-index:",";"],e)}),WZ=Z.div.attrs({className:Se(x3,"arrow")}).withConfig({componentId:"sc-1373tsp-2"})(function(t){var e=t.warning,r=e===void 0?!1:e,n=t.position,i=n===void 0?Xr.Right:n,o=t.theme;return X(["width:8px;height:8px;position:absolute;&::before{content:'';background:",";width:8px;height:8px;transform:rotate(45deg);position:absolute;top:0;left:0;z-index:-1;}",""],r?o.palette[M.BackgroundOrange]:o.palette[M.BackgroundGrey],GZ[i])}),XZ=Z.div.attrs({className:Se(x3,"Overlay")}).withConfig({componentId:"sc-1373tsp-3"})(function(){return X(["position:fixed;right:0;bottom:0;top:0;left:0;background-color:transparent;"])}),cf=Bt({Popper:VZ,Overlay:XZ,Arrow:WZ,PopperWrapper:UZ}),KZ=["anchorEl","children","open","warning","position","arrow","popperOptions","onClick","overlay","zIndex","enableUnderlayingEvent","wrapperStyles"];function a_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function um(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?a_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var E3=pt(function(t,e){var r=t.anchorEl,n=t.children,i=t.open,o=t.warning,a=o===void 0?!1:o,s=t.position,c=s===void 0?"bottom":s,d=t.arrow,h=d===void 0?!1:d,C=t.popperOptions,v=t.onClick,g=t.overlay,m=g===void 0?!1:g,w=t.zIndex,x=w===void 0?1300:w,b=t.enableUnderlayingEvent,O=t.wrapperStyles,f=O===void 0?{}:O,S=ve(t,KZ),E=RI(Se("Popper")),I=G.useRef(null),R=y8(I,e);G.useEffect(function(){if(!(!r||!i||I.current===null)){var z=[{name:"arrow",options:{element:"[data-popper-arrow]"}},{name:"offset",options:{offset:[0,10]}}],B=h?z:[];C&&C.modifiers!=null&&(B=B.concat(C.modifiers));var Y=zZ(r,I.current,um(um({placement:c},C),{},{modifiers:B}));return R.current=Y,function(){Y.destroy(),R.current=null}}},[r,i,C,c,h]);var k=function(B){setTimeout(function(){if(B.clientX&&B.clientY){var Y=document.elementFromPoint(B.clientX,B.clientY);Y&&Y.dispatchEvent(B.nativeEvent)}},0)},N=function(B){B.persist(),B.preventDefault(),B.stopPropagation(),v&&v(B),b&&k(B)},T=function(){return y.createElement(cf.Overlay,{onClick:N,onContextMenu:N})};if(!i)return y.createElement("div",{hidden:!0,ref:R});var D=function(){var B;return y.createElement(cf.PopperWrapper,{zIndex:x,style:um({},f)},m&&T(),y.createElement(cf.Popper,he({ref:R},S),n,h&&y.createElement(cf.Arrow,{warning:a,"data-popper-arrow":!0,position:(R==null||(B=R.state)===null||B===void 0?void 0:B.placement)||c})))};return Sh.createPortal(D(),E)});E3.defaultProps={};var NI={anchorEl:j.oneOfType([j.instanceOf(Element),j.object]),popperOptions:j.shape({modifiers:j.arrayOf(j.shape({data:j.object,effect:j.func,enabled:j.bool,fn:j.func,name:j.any.isRequired,options:j.object,phase:j.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:j.arrayOf(j.string),requiresIfExists:j.arrayOf(j.string)})),onFirstUpdate:j.func,placement:j.oneOf(ht(Xr)),strategy:j.oneOf(ht(HZ))}),overlay:j.bool,warning:j.bool,arrow:j.bool,zIndex:j.number,enableUnderlayingEvent:j.bool,wrapperStyles:j.object};E3.propTypes=NI;var FI="Menu",YZ=Z.div.attrs({className:Se(FI,"Overlay")}).withConfig({componentId:"sc-10okxhw-0"})(function(){return X(["position:fixed;right:0;bottom:0;top:0;left:0;background-color:transparent;z-index:-1;"])}),ZZ=m8(["from{opacity:0;}to{opacity:1;}"]),qZ=m8(["from{transform:scale(0.97);margin-top:0px;}to{transform:scale(1);margin-top:4px;}"]),QZ=X(["animation:"," 250ms 0ms cubic-bezier(0.4,0,0.2,1),"," 250ms cubic-bezier(0.4,0,0.2,1);"],ZZ,qZ),JZ=Z.div.attrs({className:Se(FI,"root")}).withConfig({componentId:"sc-10okxhw-1"})(function(t){var e=t.rect,r=t.theme,n=t.scroll,i=t.maxHeight,o=i===void 0?"":i;return X(["min-width:","px;width:195px;min-height:16px;overflow-x:hidden;overflow-y:auto;transition:opacity 250ms cubic-bezier(0.4,0,0,1),transform 250ms cubic-bezier(0.4,0,0,1),margin-top 250ms cubic-bezier(0.4,0,0,1);outline:0;box-shadow:0 2px 4px ",";border-radius:",";"," "," margin-top:4px;",""],e.width,r.palette[M.MediumShadow],r.shape.borderRadius[go.Md],n&&lk,o&&X(["max-height:",";"],Number.isNaN(+o)?o:"".concat(o,"px")),QZ)}),eq=Bt({Menu:JZ,Overlay:YZ}),tq=["id","children","open","fullWidth","anchorElPosition","anchorEl","onClose","containerProps","alignCenter","maxHeight","position","popperOptions","enableOverlay","zIndex","hideScroll","scroll","enableUnderlayingEvent","popperWrapperStyles"];function s_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function rq(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?s_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Ha=pt(function(t,e){t.id;var r=t.children,n=t.open;t.fullWidth;var i=t.anchorElPosition,o=t.anchorEl,a=t.onClose,s=t.containerProps,c=t.alignCenter,d=t.maxHeight,h=t.position,C=t.popperOptions,v=t.enableOverlay,g=v===void 0?!0:v,m=t.zIndex,w=t.hideScroll,x=w===void 0?!0:w,b=t.scroll,O=b===void 0?!0:b,f=t.enableUnderlayingEvent,S=f===void 0?!1:f,E=t.popperWrapperStyles,I=E===void 0?{}:E,R=ve(t,tq),k=G.useState(null),N=Ie(k,2),T=N[0],D=N[1],z=G.useState(new DOMRect),B=Ie(z,2),Y=B[0],W=B[1],q=G.useRef(null),ee=G.useCallback(function(){var ne,ae=rq({top:0,left:0,height:0,width:0},i||{}),J=new DOMRect(ae.left,ae.top,ae.width,ae.height);W((ne=o==null?void 0:o.getBoundingClientRect())!==null&&ne!==void 0?ne:J)},[n,T,o]),K=G.useCallback(function(){n&&(T&&clearTimeout(T),D(setTimeout(ee,300)))},[n,T]);G.useEffect(function(){return window.addEventListener("resize",K),function(){window.removeEventListener("resize",K)}},[K]),G.useEffect(function(){ee()},[i,ee]),G.useEffect(function(){if(x)return n?(document.body.classList.add("Menu-open"),ee()):document.body.classList.remove("Menu-open"),function(){document.body.classList.remove("Menu-open")}},[n,ee]);var ue=function(ae){typeof a=="function"&&a(ae)};return y.createElement(y.Fragment,null,y.createElement(E3,{ref:q,position:h||"bottom-start",open:!!o,anchorEl:o,overlay:!!g,onClick:ue,popperOptions:C,zIndex:m,enableUnderlayingEvent:S,wrapperStyles:I},y.createElement(eq.Menu,he({},s,{alignCenter:!!c,scroll:O,rect:Y},R,{ref:e,maxHeight:d}),r)))}),nq={open:!1,containerProps:{},maxHeight:250,position:Xr.BottomStart,enableOverlay:!0,hideScroll:!0,scroll:!0};Ha.defaultProps=nq;var DI={anchorElPosition:j.shape({left:j.number,right:j.number,top:j.number,bottom:j.number}),anchorEl:j.instanceOf(Element),open:j.bool,fullWidth:j.bool,onClose:j.func,id:j.string,containerProps:j.object,alignCenter:j.bool,maxHeight:j.oneOfType([j.string,j.number]),popperOptions:NI.popperOptions,position:j.oneOf(ht(Xr)),enableOverlay:j.bool,zIndex:j.number,hideScroll:j.bool,scroll:j.bool,enableUnderlayingEvent:j.bool,popperWrapperStyles:j.object,style:j.object};Ha.propTypes=DI;var wn={Sm:"sm",Md:"md"},iq=A(A({},wn.Sm,function(t){var e=t.theme.typography.font;return X(["padding:8px 16px;min-height:32px;",""],e[ke.LabelMedium])}),wn.Md,function(t){var e=t.theme.typography.font;return X(["padding:11px 16px;min-height:40px;",""],e[ke.LabelLarge])}),Qs="MenuItem",jI=Z.span.attrs({className:Se(Qs,"Icon")}).withConfig({componentId:"sc-rrzye0-0"})(function(t){var e=t.theme.palette,r=t.disabled;return X(["flex-shrink:0;margin-right:10px;color:",";"],r?e[M.TextPlaceholder]:e[M.IconsPrimary])}),oq=Z(jI).attrs({className:Se(Qs,"Actions")}).withConfig({componentId:"sc-rrzye0-1"})(function(){return X(["margin-right:0px;margin-left:16px;"])}),aq=Z.span.attrs({className:Se(Qs,"Label")}).withConfig({componentId:"sc-rrzye0-2"})(["align-items:center;column-gap:4px;flex-grow:1;"]),sq=Z.div.attrs({className:Se(Qs,"wrapper")}).withConfig({componentId:"sc-rrzye0-3"})(function(t){var e=t.divider,r=e===void 0?!1:e,n=t.noOptionsText,i=n===void 0?!1:n,o=t.disabled,a=o===void 0?!1:o,s=t.theme;return X([""," ",""],r&&X(["width:100%;height:1px;background:",";box-sizing:border-box;"],s.palette[M.BordersSecondary]),(i||a)&&X(["color:",";"],s.palette[M.ButtonDisabledText]))}),lq=Z.div.attrs({className:Se(Qs,"root")}).withConfig({componentId:"sc-rrzye0-4"})(function(t){var e=t.size,r=e===void 0?wn.Sm:e,n=t.active,i=t.theme,o=t.disableHover,a=o===void 0?!1:o,s=t.noOptionsText,c=t.disabled;return X(["display:flex;justify-content:space-between;flex-direction:row;align-items:center;width:100%;background:",";color:",";cursor:pointer;box-sizing:border-box;transition:all 100ms ease-out;"," &:focus-within,&:focus,&:hover{",";","}",""],i.palette[n?M.BackgroundActive:M.BackgroundSecondary],i.palette[M.TextPrimary],iq[r],!a&&"background-color: ".concat(i.palette[M.BackgroundHover]),(s||c)&&X(["cursor:default;background-color:white;"]),(s||c)&&X(["& > svg{path{fill:",";}}color:",";"],i.palette[M.ButtonDisabledText],i.palette[M.ButtonDisabledText]))}),cq=Z.div.attrs({className:Se(Qs,"prefix")}).withConfig({componentId:"sc-rrzye0-5"})(function(){return X(["display:flex;"])}),uq=Z.div.attrs({className:Se(Qs,"content")}).withConfig({componentId:"sc-rrzye0-6"})(function(){return X(["flex-grow:1;line-height:16px;"])}),dq=Z.div.attrs({className:Se(Qs,"suffix")}).withConfig({componentId:"sc-rrzye0-7"})(function(){return X(["display:flex;margin-left:8px;"])}),Bi=Bt({MenuItemWrapper:sq,MenuItem:lq,MenuPrefix:cq,MenuContent:uq,MenuSuffix:dq,Label:aq,Icon:jI,Actions:oq}),hq=["list","depth","children","disableHover","noOptionsText","disabled","enableScrollIntoView"];function l_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fq(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?l_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var wo=pt(function(t,e){var r=t.list,n=t.depth,i=n===void 0?0:n,o=t.children,a=t.disableHover,s=t.noOptionsText,c=t.disabled,d=t.enableScrollIntoView,h=ve(t,hq),C=G.useRef(null),v=y.useState(null),g=Ie(v,2),m=g[0],w=g[1],x=y.useState([]),b=Ie(x,2),O=b[0],f=b[1],S=function(T){w(T.currentTarget)},E=function(){var T;(T=C.current)===null||T===void 0||T.scrollIntoView({behavior:"auto",block:"nearest"})};G.useEffect(function(){h.active&&d&&E()},[h.active]);var I=function(T,D,z){var B=O.slice(0);B[z]=D,f(B),S(T)},R=function(T){var D=O.slice(0);D[T]="",f(D),w(null)},k=function(T){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return T.map(function(z){var B=z.subList&&z.subList.length>0,Y;if(O[D]===z.key&&B){var W=D+1;Y=y.createElement(Ha,he({key:z.key,position:"right",open:!!m,anchorEl:m,enableOverlay:!1},z.subMenuProps),y.createElement(wo,he({list:z.subList,depth:W},h)))}return z.content==="divider"?y.createElement(Bi.MenuItemWrapper,{divider:!0,key:z.key}):y.createElement(Bi.MenuItemWrapper,he({disabled:!1,key:z.key,onMouseLeave:function(){return R(D)}},h),y.createElement(Bi.MenuItem,he({},h,{className:z.className,ref:e,active:!!z.active,onClick:z.onClick?function(q){return z.onClick(fq({event:q},h))}:void 0,onMouseEnter:function(ee){return I(ee,z.key,D)},disableHover:a||z.disableHover}),z.prefix&&y.createElement(Bi.MenuPrefix,null,typeof z.prefix=="function"?z.prefix(h):z.prefix),z.content&&y.createElement(Bi.MenuContent,null,typeof z.content=="function"?z.content(h):z.content),(z.suffix||z.subList)&&y.createElement(Bi.MenuSuffix,null,typeof z.suffix=="function"?z.suffix(h):z.suffix,z.subList&&y.createElement(vY,{size:10,color:"#768A9F"}))),Y)})};return r?y.createElement(y.Fragment,null,k(r,i)):h.value==="divider"?y.createElement(Bi.MenuItemWrapper,{divider:!0,key:h.value}):y.createElement(Bi.MenuItemWrapper,{noOptionsText:!!s,disabled:!!c},y.createElement(Bi.MenuItem,he({},h,{ref:C,disableHover:a,noOptionsText:s,disabled:c}),o))});wo.displayName="MenuItem";var pq={size:wn.Sm,active:!1};wo.defaultProps=pq;wo.propTypes={size:j.oneOf(ht(wn)),children:j.oneOfType([j.node,j.func]),active:j.bool,value:j.oneOfType([j.string,j.number,j.bool,j.oneOf([null])]),depth:j.number,disableHover:j.bool,noOptionsText:j.bool,disabled:j.bool,enableScrollIntoView:j.bool};var gq=["children","disabled","size"],mq=function(e){switch(e){case wn.Md:return 16;case wn.Sm:default:return 14}},l9=pt(function(t,e){var r=t.children,n=t.disabled,i=t.size,o=i===void 0?wn.Md:i,a=ve(t,gq);return y.createElement(Bi.Icon,he({disabled:n},a,{ref:e}),r&&typeof r=="function"?r({size:mq(o)}):r)});l9.defaultProps={size:wn.Md};l9.propTypes={size:j.oneOf(ht(wn)),children:j.oneOfType([j.node,j.func]).isRequired,disabled:j.bool};var vq=["children"],O3=pt(function(t,e){var r=t.children,n=ve(t,vq);return y.createElement(Bi.Label,he({},n,{ref:e}),r)});O3.displayName="MenuItemLabel";var yq=["children"],P3=pt(function(t,e){var r=t.children,n=ve(t,yq);return y.createElement(Bi.Actions,he({},n,{ref:e}),r&&typeof r=="function"?r({size:n.size}):r)});P3.displayName="MenuItemActions";P3.defaultProps={size:wn.Md};P3.propTypes={size:j.oneOf(ht(wn)),children:j.oneOfType([j.node,j.func]).isRequired};var Cq=["color","size"],zI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,Cq);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M43.3196 40.0403C44.2253 40.9461 44.2253 42.4146 43.3196 43.3204C42.4138 44.2262 40.9453 44.2262 40.0396 43.3204L21.9997 25.2802L3.95952 43.3207C3.05376 44.2264 1.58525 44.2264 0.679494 43.3207C-0.226258 42.4149 -0.226258 40.9464 0.679495 40.0406L18.7197 22.0001L0.679313 3.95941C-0.226437 3.05364 -0.226439 1.5851 0.679314 0.679328C1.58507 -0.226442 3.05358 -0.226443 3.95934 0.679328L21.9997 18.72L40.0398 0.679604C40.9455 -0.226163 42.414 -0.226165 43.3198 0.679605C44.2255 1.58537 44.2255 3.05392 43.3198 3.95969L25.2797 22.0001L43.3196 40.0403Z",fill:n}))}),wq=A(A({},lt.Sm,function(t){var e=t.theme.typography.font;return X(e[ke.LabelExtraSmallUp])}),lt.Md,function(t){var e=t.theme.typography.font;return X(e[ke.LabelSmall])}),Sq="FormHint",bq=Z.span.attrs({className:Se(Sq,"root")}).withConfig({componentId:"sc-1vu99sv-0"})(function(t){var e=t.size,r=e===void 0?lt.Md:e,n=t.error,i=n===void 0?!1:n,o=t.disabled,a=o===void 0?!1:o,s=t.theme;return X(["display:flex;align-items:center;color:",";"," ",""],i?s.palette[M.Error]:s.palette[M.TextSecondary],a&&X(["color:",";"],s.palette[M.ButtonDisabledText]),wq[r])}),$I=Bt({FormHint:bq}),k3=pt(function(t,e){return y.createElement($I.FormHint,he({ref:e},t))});k3.defaultProps={error:!1};k3.propTypes={error:j.bool,size:j.oneOf(ht(lt))};var _q=A(A(A({},$0.Primary,function(t){var e=t.theme.palette;return X(["background-color:",";color:",";"],e[M.AccentPrimary],e[M.ButtonPrimaryText])}),$0.White,function(t){var e=t.theme.palette;return X(["background-color:",";color:",";"],e[M.ButtonPrimaryText],e[M.AccentPrimary])}),$0.Secondary,function(t){var e=t.theme.palette;return X(["background-color:",";color:",";"],e[M.Accent_1_2_Opacity],e[M.TextPrimary])}),BI="Badge",dm=20,xq=Z.span.attrs({className:Se(BI,"root")}).withConfig({componentId:"sc-1rfm40m-0"})(["position:relative;display:inline-flex;flex-shrink:0;vertical-align:middle;"]),Eq=Z.span.attrs({className:Se(BI)}).withConfig({componentId:"sc-1rfm40m-1"})(function(t){var e=t.size,r=t.color,n=r===void 0?"secondary":r,i=t.fontSize,o=t.padding,a=o===void 0?"0 6px":o,s=t.inline;return X([""," display:flex;flex-wrap:wrap;flex-direction:row;justify-content:center;align-items:center;align-content:center;height:","px;min-width:","px;line-height:1;padding:",";font-size:",";box-sizing:border-box;transition:transform 225ms cubic-bezier(0.4,0,0.2,1) 0ms;border-radius:","px;z-index:1;",""],s?"":"position: absolute;",e||dm,e||dm,typeof a=="number"?"".concat(a,"px"):a,typeof i=="number"?"".concat(i,"px"):i,(e||dm)/2,_q[n])}),Yt=Bt({BadgeRoot:xq,Badge:Eq}),Oq=["badgeContent"],c9=pt(function(t,e){var r=t.badgeContent,n=ve(t,Oq);return y.createElement(Yt.BadgeRoot,{ref:e},y.createElement(Yt.Badge,n,r))});c9.defaultProps={color:$0.Secondary,inline:!1};c9.propTypes={color:j.oneOf(ht($0)),badgeContent:j.node,size:j.oneOfType([j.number]),fontSize:j.oneOfType([j.number,j.string]),padding:j.oneOfType([j.number,j.string]),inline:j.bool};var Pq=["color","size"],hm=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?28:i,a=ve(t,Pq);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M41.3465 44.355C33.5656 50.7844 22.9687 51.6268 14.3708 47.3665L17.8949 44.4545C24.754 47.117 32.7424 46.1093 38.709 41.1792C44.6755 36.249 47.1546 28.6071 45.8085 21.3893L49.3325 18.4773C51.9291 27.6967 49.1274 37.9256 41.3465 44.355Z",fill:n}),y.createElement("path",{d:"M36.1749 2.63356L32.6509 5.54555C25.821 2.91828 17.838 3.86187 11.8366 8.82088C5.87009 13.7511 3.42028 21.4282 4.7372 28.6107L1.21311 31.5227C-1.38344 22.3034 1.45314 12.0456 9.19916 5.64502C16.9801 -0.784402 27.5768 -1.62682 36.1749 2.63356Z",fill:n}))}),kq=["color","size"],c_=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,kq);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M5.74299 0.152553C5.95998 -0.056404 6.30528 -0.0498885 6.51424 0.167105C6.7232 0.384099 6.71668 0.7294 6.49969 0.938357L1.43832 5.81227L6.51398 11.0759C6.72309 11.2928 6.71681 11.6381 6.49996 11.8472C6.28311 12.0563 5.9378 12.05 5.7287 11.8332L0.274151 6.1766C0.17369 6.07242 0.118752 5.93258 0.121433 5.78788C0.124113 5.64317 0.184193 5.50547 0.288444 5.40508L5.74299 0.152553Z",fill:n}),y.createElement("path",{d:"M10.9549 0.152554C11.1719 -0.0564031 11.5172 -0.0498876 11.7262 0.167106C11.9351 0.3841 11.9286 0.729401 11.7116 0.938357L6.65023 5.81227L11.7259 11.0759C11.935 11.2928 11.9287 11.6381 11.7119 11.8472C11.495 12.0563 11.1497 12.05 10.9406 11.8332L5.48606 6.1766C5.3856 6.07242 5.33067 5.93258 5.33335 5.78788C5.33603 5.64317 5.39611 5.50547 5.50036 5.40508L10.9549 0.152554Z",fill:n}))}),Tq=["color","size"],u_=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,Tq);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M6.25714 11.8474C6.04014 12.0564 5.69484 12.0499 5.48588 11.8329C5.27693 11.6159 5.28344 11.2706 5.50043 11.0616L10.5618 6.18773L5.48614 0.924074C5.27704 0.707224 5.28331 0.361919 5.50016 0.152813C5.71701 -0.0562931 6.06232 -0.0500145 6.27143 0.166835L11.726 5.8234C11.8264 5.92758 11.8814 6.06742 11.8787 6.21212C11.876 6.35683 11.8159 6.49453 11.7117 6.59492L6.25714 11.8474Z",fill:n}),y.createElement("path",{d:"M1.04522 11.8474C0.828227 12.0564 0.482925 12.0499 0.273969 11.8329C0.065012 11.6159 0.0715275 11.2706 0.288521 11.0616L5.34989 6.18773L0.274227 0.924074C0.0651226 0.707224 0.0714006 0.361919 0.28825 0.152813C0.5051 -0.0562931 0.850407 -0.0500145 1.05951 0.166835L6.51406 5.8234C6.61452 5.92758 6.66946 6.06742 6.66678 6.21212C6.6641 6.35683 6.60402 6.49453 6.49977 6.59492L1.04522 11.8474Z",fill:n}))}),Au={Default:"default",Sidebar:"sidebar"},wa={Left:"left",Right:"right"},Tl=function(e){switch(e){case nt.Lg:return 18;case nt.Md:return 16;case nt.Sm:return 14;case nt.Xs:return 12;default:return 16}},Iq=function(e){switch(e){case nt.Lg:return 12;case nt.Md:return 11;case nt.Sm:return 10;default:return 11}},fm,Aq=(fm={},A(A(A(A(A(A(A(A(A(A(fm,Br.Primary,function(t){var e=t.theme.palette,r=t.active;return X(["background-color:",";color:",";","{color:",";background:transparent;}&:hover{background-color:",";}&:active{background-color:",";}"," &:disabled{color:",";background:",";cursor:default;","{color:",";background:transparent;}}"],e[M.AccentStateless],e[M.ButtonPrimaryText],Yt.Badge,e[M.ButtonPrimaryText],e[M.AccentPrimaryHover],e[M.AccentPrimaryActive],r&&X(["background-color:",";&:hover,&:focus{background-color:",";}"],e[M.AccentPrimaryActive],e[M.AccentPrimaryActive]),e[M.BordersDisabled],e[M.Accent_1_2_Opacity],Yt.Badge,e[M.BordersDisabled])}),Br.Secondary,function(t){var e=t.theme.palette,r=t.active;return X(["background-color:",";color:",";border:1px solid ",";","{color:",";background:transparent;}&:hover{color:",";background-color:",";","{color:",";}}&:focus{color:",";background-color:",";border:1px solid ",";","{color:",";}}&:active{color:",";background-color:",";","{color:",";}}"," &:disabled{color:",";background:",";border:none;cursor:default;","{color:",";}}"],e[M.BackgroundStateless],e[M.AccentStateless],e[M.AccentStateless],Yt.Badge,e[M.AccentStateless],e[M.ButtonPrimaryText],e[M.AccentPrimaryHover],Yt.Badge,e[M.ButtonPrimaryText],e[M.AccentPrimaryActive],e[M.Accent_1_2_Opacity],e[M.AccentPrimaryActive],Yt.Badge,e[M.AccentPrimaryActive],e[M.ButtonPrimaryText],e[M.AccentPrimaryActive],Yt.Badge,e[M.ButtonPrimaryText],r&&X(["color:",";background-color:",";","{color:",";}&:hover,&:focus{color:",";background-color:",";","{color:",";}}"],e[M.ButtonPrimaryText],e[M.AccentPrimaryActive],Yt.Badge,e[M.ButtonPrimaryText],e[M.ButtonPrimaryText],e[M.AccentPrimaryActive],Yt.Badge,e[M.ButtonPrimaryText]),e[M.BordersDisabled],e[M.Accent_1_2_Opacity],Yt.Badge,e[M.BordersDisabled])}),Br.Basic,function(t){var e=t.theme.palette,r=t.active;return X(["background-color:transparent;border:1px solid ",";color:",";","{background-color:transparent;color:",";}&:hover{background-color:",";color:",";","{color:",";}}&:active{background-color:",";color:",";","{color:",";}}"," &:disabled{background-color:",";color:",";cursor:default;border:none;","{color:",";}}"],e[M.BordersButton],e[M.LinkStateless],Yt.Badge,e[M.LinkStateless],e[M.BackgroundHover],e[M.LinkHover],Yt.Badge,e[M.LinkHover],e[M.BackgroundActive],e[M.LinkHover],Yt.Badge,e[M.LinkHover],r&&X(["background-color:",";color:",";","{color:",";}&:hover,&:focus{background-color:",";color:",";}"],e[M.BackgroundActive],e[M.LinkHover],Yt.Badge,e[M.LinkHover],e[M.BackgroundActive],e[M.LinkHover]),e[M.Accent_1_2_Opacity],e[M.BordersDisabled],Yt.Badge,e[M.BordersDisabled])}),Br.LinkPrimary,function(t){var e=t.theme.palette,r=t.active;return X(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],e[M.AccentStateless],e[M.AccentPrimaryHover],e[M.AccentPrimaryActive],r&&X(["color:",";&:hover,&:focus{color:",";"],e[M.AccentPrimaryActive],e[M.AccentPrimaryActive]),e[M.BordersDisabled])}),Br.LinkSecondary,function(t){var e=t.theme.palette,r=t.active;return X(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],e[M.LinkStateless],e[M.AccentPrimaryHover],e[M.AccentPrimaryActive],r&&X(["color:",";&:hover,&:focus{color:",";}"],e[M.AccentPrimaryActive],e[M.AccentPrimaryActive]),e[M.BordersDisabled])}),Br.LinkBasicPrimary,function(t){var e=t.theme.palette,r=t.active;return X(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],e[M.AccentStateless],e[M.AccentPrimaryHover],e[M.AccentPrimaryActive],r&&X(["color:",";&:hover,&:focus{color:",";}"],e[M.AccentPrimaryActive],e[M.AccentPrimaryActive]),e[M.BordersDisabled])}),Br.LinkBasicSecondary,function(t){var e=t.theme.palette,r=t.active;return X(["color:",";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:",";}&:active{color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],e[M.LinkStateless],e[M.AccentPrimaryHover],e[M.AccentPrimaryActive],r&&X(["color:",";&:hover,&:focus{color:",";}"],e[M.AccentPrimaryActive],e[M.AccentPrimaryActive]),e[M.BordersDisabled])}),Br.ErrorPrimary,function(t){var e=t.theme.palette,r=t.active;return X(["background-color:",";color:",";","{color:",";background:transparent;}&:hover{background-color:",";}&:active{background-color:",";}"," &:disabled{background-color:",";color:",";cursor:default;","{color:",";background:transparent;}}"],e[M.Error],e[M.ButtonPrimaryText],Yt.Badge,e[M.ButtonPrimaryText],e[M.ErrorHover],e[M.ErrorActive],r&&X(["background-color:",";&:hover,&:focus{background-color:",";}"],e[M.ErrorActive],e[M.ErrorActive]),e[M.Accent_1_2_Opacity],e[M.BordersDisabled],Yt.Badge,e[M.BordersDisabled])}),Br.ErrorSecondary,function(t){var e=t.theme.palette,r=t.active;return X(["background-color:",";color:",";border:1px solid ",";","{color:",";background-color:transparent;}&:hover{background-color:",";color:",";border:none;","{color:",";}}&:active{background-color:",";color:",";border:none;}"," &:disabled{color:",";background:",";border:none;cursor:default;","{color:",";}}"],e[M.BackgroundStateless],e[M.LinkStateless],e[M.BordersButton],Yt.Badge,e[M.LinkStateless],e[M.ErrorHover],e[M.ButtonPrimaryText],Yt.Badge,e[M.ButtonPrimaryText],e[M.ErrorActive],e[M.ButtonPrimaryText],r&&X(["background-color:",";color:",";border:none;&:hover,&:focus{background-color:",";}"],e[M.ErrorActive],e[M.ButtonPrimaryText],e[M.ErrorActive]),e[M.BordersDisabled],e[M.Accent_1_2_Opacity],Yt.Badge,e[M.BordersDisabled])}),Br.ErrorBasic,function(t){var e=t.theme.palette,r=t.active;return X(["color:",";background-color:transparent;&:hover{color:",";}&:active{color:",";}"," &:disabled{color:",";cursor:default;}"],e[M.LinkStateless],e[M.ErrorHover],e[M.ErrorActive],r&&X(["color:",";&:hover,&:focus{color:",";}"],e[M.ErrorActive],e[M.ErrorActive]),e[M.BordersDisabled])}),A(A(A(fm,Br.WarningPrimary,function(t){var e=t.theme.palette,r=t.active;return X(["background-color:",";color:",";","{color:",";background:transparent;}&:hover{background-color:",";}&:active{background-color:",";}"," &:disabled{background-color:",";color:",";cursor:default;","{color:",";background:transparent;}}"],e[M.Warning],e[M.ButtonPrimaryText],Yt.Badge,e[M.ButtonPrimaryText],e[M.WarningHover],e[M.WarningActive],r&&X(["background-color:",";&:hover,&:focus{background-color:",";}"],e[M.WarningActive],e[M.WarningActive]),e[M.Accent_1_2_Opacity],e[M.BordersDisabled],Yt.Badge,e[M.BordersDisabled])}),Br.WarningSecondary,function(t){var e=t.theme.palette,r=t.active;return X(["background-color:",";color:",";border:1px solid ",";","{color:",";background-color:transparent;}&:hover{background-color:",";color:",";border:none;","{color:",";}}&:active{background-color:",";color:",";border:none;}"," &:disabled{color:",";background:",";border:none;cursor:default;","{color:",";}}"],e[M.BackgroundStateless],e[M.LinkStateless],e[M.BordersButton],Yt.Badge,e[M.LinkStateless],e[M.WarningHover],e[M.ButtonPrimaryText],Yt.Badge,e[M.ButtonPrimaryText],e[M.WarningActive],e[M.ButtonPrimaryText],r&&X(["background-color:",";color:",";border:none;","{color:",";background-color:transparent;}&:hover,&:focus{background-color:",";}"],e[M.WarningActive],e[M.ButtonPrimaryText],Yt.Badge,e[M.ButtonPrimaryText],e[M.WarningActive]),e[M.BordersDisabled],e[M.Accent_1_2_Opacity],Yt.Badge,e[M.BordersDisabled])}),Br.WarningBasic,function(t){var e=t.theme.palette,r=t.active;return X(["color:",";background-color:transparent;&:hover{color:",";}&:active{color:",";}"," &:disabled{color:",";cursor:default;}"],e[M.LinkStateless],e[M.WarningHover],e[M.WarningActive],r&&X(["color:",";&:hover,&:focus{color:",";}"],e[M.WarningActive],e[M.WarningActive]),e[M.BordersDisabled])})),Lq=A(A(A(A({},nt.Xs,X(["padding:5px 10px;"])),nt.Sm,X(["padding:8px 12px;"])),nt.Md,X(["padding:11px 16px;"])),nt.Lg,X(["padding:14px 24px;"])),Mq=A(A(A(A({},nt.Xs,X(["padding:4px 10px;"])),nt.Sm,X(["padding:7px 12px;"])),nt.Md,X(["padding:10px 16px;"])),nt.Lg,X(["padding:13px 24px;"])),Rq=A(A(A(A({},nt.Xs,X(["padding:5px 10px;"])),nt.Sm,X(["padding:8px 12px;"])),nt.Md,X(["padding:11px 14px;"])),nt.Lg,X(["padding:14px 16px;"])),Nq=A(A(A(A({},nt.Xs,X(["height:14px;"])),nt.Sm,X(["height:16px;"])),nt.Md,X(["height:18px;"])),nt.Lg,X(["height:20px;"])),Fq=A(A(A(A({},nt.Xs,X(["margin-right:5px;"])),nt.Sm,X(["margin-right:6px;"])),nt.Md,X(["margin-right:7px;"])),nt.Lg,X(["margin-right:8px;"])),d_=A(A(A(A({},nt.Xs,function(t){var e=t.theme.typography.font;return X(e[ke.ButtonSm])}),nt.Sm,function(t){var e=t.theme.typography.font;return X(e[ke.ButtonMd])}),nt.Md,function(t){var e=t.theme.typography.font;return X(e[ke.ButtonLg])}),nt.Lg,function(t){var e=t.theme.typography.font;return X(e[ke.ButtonLgUp])}),Js="Button",HI=Z.span.attrs({className:Se(Js,"Label")}).withConfig({componentId:"sc-lxwit0-0"})(["display:flex;"]),GI=Z.span.attrs({className:Se(Js,"Badge")}).withConfig({componentId:"sc-lxwit0-1"})(["display:flex;margin-left:5px;"]),Dq=Z.span.attrs({className:Se(Js,"Body")}).withConfig({componentId:"sc-lxwit0-2"})(function(){return X(["display:flex;align-items:center;"])}),jq=Z.button.attrs({className:Se(Js,"root")}).withConfig({componentId:"sc-lxwit0-3"})(function(t){var e=t.color,r=e===void 0?Br.Secondary:e,n=t.size,i=n===void 0?nt.Md:n,o=t.buttonType,a=t.active,s=t.theme;return X(["display:inline-flex;flex-shrink:0;flex-direction:row;align-items:center;justify-content:center;border-radius:",";transition:all 100ms ease-out;border:0;cursor:pointer;outline:none;"," "," "," ","{"," ","}","{","}",""],s.shape.borderRadius[go.Md],o!==Au.Sidebar&&Aq[r],o===Au.Sidebar?Rq[i]:Lq[i],r===Br.Secondary&&Mq[i],HI,d_[i],(r===Br.LinkBasicPrimary||r===Br.LinkBasicSecondary)&&"font-weight: 400",GI,d_[i],o===Au.Sidebar&&X(["background-color:",";color:",";border:1px solid ",";"," "," &:disabled{color:",";background:",";border:none;cursor:default;}"],s.palette[M.ButtonPrimaryText],s.palette[M.LinkStateless],s.palette[M.BordersButton],!a&&X(["&:hover{color:",";background-color:",";border:none;}&:active{color:",";background-color:",";border:none;}"],s.palette[M.ButtonPrimaryText],s.palette[M.AccentPrimaryHover],s.palette[M.ButtonPrimaryText],s.palette[M.AccentPrimaryActive]),a&&X(["background-color:",";color:",";border:1px solid ",";"],s.palette[M.Accent_1_2_Opacity],s.palette[M.AccentPrimaryActive],s.palette[M.AccentPrimaryActive]),s.palette[M.BordersDisabled],s.palette[M.AccentPrimaryDisabled]))}),zq=Z.span.attrs({className:Se(Js,"StartIcon")}).withConfig({componentId:"sc-lxwit0-4"})(function(t){var e=t.$loading,r=t.size,n=r===void 0?nt.Md:r;return X(["display:flex;svg{animation:",";}",""],e?"spinner 1.2s linear infinite":"1.2s",Fq[n])}),$q=Z.span.attrs({className:Se(Js,"SideBar")}).withConfig({componentId:"sc-lxwit0-5"})(function(t){var e=t.sideBarType;return X(["display:flex;",":12px;"],"margin-".concat(e===wa.Left?"right":"left"))}),Bq=Z.span.attrs({className:Se(Js,"Divider")}).withConfig({componentId:"sc-lxwit0-6"})(function(t){var e=t.sideBarType,r=t.size,n=r===void 0?nt.Md:r;return X(["border-left-style:solid;border-width:1px;"," ",":12px;"],Nq[n],"margin-".concat(e===wa.Left?"right":"left"))}),Hq=Z.span.attrs({className:Se(Js,"EndIcon")}).withConfig({componentId:"sc-lxwit0-7"})(["display:flex;margin-left:6px;"]),zo=Bt({Button:jq,Wrapper:Dq,Label:HI,SideArrows:$q,Divider:Bq,StartIcon:zq,EndIcon:Hq,Badge:GI}),Gq=["children","startIcon","endIcon","badge","color","active","buttonType","sideBarType","size","loading","disabled"],Ei=pt(function(t,e){var r=t.children,n=t.startIcon,i=t.endIcon,o=t.badge,a=t.color,s=t.active,c=t.buttonType,d=t.sideBarType,h=d===void 0?wa.Left:d,C=t.size,v=t.loading,g=t.disabled,m=ve(t,Gq),w=function(O){switch(h){case wa.Right:return s?y.createElement(u_,O):y.createElement(c_,O);case wa.Left:return s?y.createElement(c_,O):y.createElement(u_,O)}},x=function(){var O=[y.createElement(zo.SideArrows,{key:"arrows",sideBarType:h},w({size:Iq(C)}))],f=y.createElement(zo.Divider,{key:"divider",size:C,sideBarType:h});return h===wa.Right?O.unshift(f):O.push(f),c===Au.Sidebar&&O};return y.createElement(zo.Button,he({type:"button",buttonType:c},m,{disabled:v||g,sideBarType:h,color:a,active:s,size:C,ref:e}),h===wa.Left&&x(),y.createElement(zo.Wrapper,null,n&&y.createElement(zo.StartIcon,{$loading:v,size:C},typeof n=="function"?v?y.createElement(hm,{size:Tl(C)}):n({size:Tl(C)}):v?y.createElement(hm,{size:Tl(C)}):n),v&&!n&&y.createElement(zo.StartIcon,{$loading:v},y.createElement(hm,{size:Tl(C)})),y.createElement(zo.Label,null,r),i&&y.createElement(zo.EndIcon,null,typeof i=="function"?i({size:Tl(C)}):i)),h===wa.Right&&x(),o&&y.createElement(zo.Badge,null,y.createElement(c9,{inline:!0,size:14,padding:"0 1px",badgeContent:o,color:a===Br.Primary?"white":"secondary"})))});Ei.defaultProps={size:nt.Md,color:Br.Secondary,buttonType:Au.Default,active:!1};Ei.propTypes={size:j.oneOf(ht(nt)),color:j.oneOf(ht(Br)),buttonType:j.oneOf(ht(Au)),sideBarType:j.oneOf(ht(wa)),startIcon:j.oneOfType([j.node,j.func]),endIcon:j.oneOfType([j.node,j.func]),badge:j.node,active:j.bool,loading:j.bool,disabled:j.bool};var Vq=["color","size"],Uq=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,Vq);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M0.483002 4.49014V37.5097C0.483002 38.5725 0.90519 39.5917 1.65669 40.3432C2.40819 41.0947 3.42745 41.5169 4.49023 41.5169H37.5098C38.5726 41.5169 39.5918 41.0947 40.3433 40.3432C41.0948 39.5917 41.517 38.5725 41.517 37.5097V4.49014C41.517 3.42735 41.0948 2.4081 40.3433 1.6566C39.5918 0.905099 38.5726 0.48291 37.5098 0.48291H4.49023C3.42745 0.48291 2.40819 0.905099 1.65669 1.6566C0.90519 2.4081 0.483002 3.42735 0.483002 4.49014ZM38.9272 5.87776V31.3044L26.3817 19.5446L21.8068 22.3356L14.8048 15.3337L3.07279 23.0543V6.06233C3.07279 5.2695 3.38775 4.50913 3.94836 3.94851C4.50898 3.38789 5.26935 3.07294 6.06218 3.07294H36.1222C36.8661 3.07294 37.5795 3.36844 38.1055 3.89444C38.6316 4.42044 38.9272 5.13385 38.9272 5.87776Z",fill:n}),y.createElement("path",{d:"M30.4602 15.6943C33.066 15.6943 35.1784 13.5819 35.1784 10.976C35.1784 8.37021 33.066 6.25777 30.4602 6.25777C27.8543 6.25777 25.7419 8.37021 25.7419 10.976C25.7419 13.5819 27.8543 15.6943 30.4602 15.6943Z",fill:n}))}),Wq=["color","size"],Xq=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,Wq);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 40 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M39.5112 31.2036C39.5112 41.568 31.0785 50 20.7148 50H14.0613C12.9587 50 12.0652 49.1066 12.0652 48.004V47.3386C12.0652 46.2359 12.9586 45.3425 14.0613 45.3425H20.7148C28.5107 45.3425 34.8537 38.9995 34.8537 31.2036C34.8537 23.4078 28.5107 17.0648 20.7148 17.0648H8.4394L16.8935 25.5189C17.8015 26.4266 17.8015 27.9042 16.8935 28.8119C16.0124 29.6923 14.479 29.691 13.5999 28.8119L1.17111 16.3828C0.731285 15.943 0.488892 15.3581 0.488892 14.7359C0.488892 14.1142 0.731285 13.529 1.17111 13.0894L13.6006 0.65976C14.4797 -0.220001 16.0144 -0.220001 16.8936 0.65976C17.8016 1.56722 17.8016 3.04511 16.8936 3.95246L8.43951 12.4072H20.7148C31.0785 12.4072 39.5112 20.8395 39.5112 31.2036Z",fill:n}))}),Kq=["color","size"],Yq=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,Kq);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 40 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M0.98 31.2037C0.98 41.568 9.41216 50 19.7752 50H26.4284C27.5309 50 28.4244 49.1066 28.4244 48.004V47.3386C28.4244 46.2359 27.531 45.3425 26.4284 45.3425H19.7752C11.9798 45.3425 5.6372 38.9995 5.6372 31.2037C5.6372 23.4079 11.9798 17.0648 19.7752 17.0648H32.05L23.5964 25.5189C22.6884 26.4266 22.6884 27.9043 23.5964 28.812C24.4774 29.6924 26.0107 29.6911 26.8897 28.812L39.3178 16.3828C39.7576 15.943 40 15.3582 40 14.736C40 14.1142 39.7576 13.5291 39.3178 13.0895L26.8891 0.659821C26.01 -0.21994 24.4754 -0.21994 23.5962 0.659821C22.6883 1.56728 22.6883 3.04517 23.5962 3.95252L32.0498 12.4073H19.7752C9.41216 12.4073 0.98 20.8396 0.98 31.2037Z",fill:n}))}),Zq=["color","size"],qq=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,Zq);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M40.1901 7.27549L7.59689 39.8687C6.83412 40.6315 6.83412 41.8681 7.59689 42.6308C8.35965 43.3936 9.59626 43.3936 10.359 42.6308L42.9522 10.0376C43.715 9.27486 43.715 8.03825 42.9522 7.27549C42.1895 6.51272 40.9529 6.51272 40.1901 7.27549Z",fill:n}))}),Qq=["color","size"],Jq=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,Qq);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M41.2229 16.7653C41.3215 12.426 39.7436 8.284 36.6864 5.02956C33.6292 1.77513 29.4872 -2.09808e-05 25.0493 -2.09808e-05C20.6114 -2.09808e-05 16.3708 1.77513 13.3136 5.02956C10.2564 8.18538 8.6785 12.3274 8.77712 16.7653C3.45168 19.5266 0 25.1479 0 31.1637C0 37.2781 3.25444 42.6035 8.57988 45.4635C11.0454 46.7455 13.7081 47.4359 16.2722 47.4359C19.3294 47.4359 22.288 46.5483 24.9507 44.8718C29.9803 48.1262 36.0947 48.3234 41.4201 45.4635C46.7456 42.6035 50 37.2781 50 31.1637C50 25.0493 46.6469 19.5266 41.2229 16.7653ZM22.7811 43.0966C18.6391 45.3649 13.7081 45.3649 9.56607 42.998C5.22682 40.5325 2.66272 36.1933 2.66272 31.1637C2.66272 26.43 5.12821 22.0907 9.1716 19.6252C10.1578 24.359 13.3136 28.501 17.6529 30.6706C17.4556 35.4043 19.3294 39.8422 22.7811 43.0966ZM32.1499 27.8106C31.4596 24.5562 29.783 21.499 27.3176 19.2307C30.6706 17.357 34.8126 17.0611 38.4615 18.3432C37.7712 22.2879 35.503 25.7396 32.1499 27.8106ZM20.6114 28.1065C21.3018 25.2465 22.8797 22.6824 25.0493 20.8087C27.5148 22.8797 29.1913 25.8382 29.6844 28.9941C26.7258 30.0789 23.4714 30.0789 20.4142 28.9941C20.4142 28.6982 20.5128 28.4023 20.6114 28.1065ZM25.0493 17.4556C23.57 16.4694 21.8935 15.7791 20.1183 15.3846C19.428 15.1874 18.6391 15.6805 18.5404 16.3708C18.4418 16.7653 18.5404 17.0611 18.7377 17.357C18.9349 17.6528 19.2308 17.8501 19.5266 17.9487C20.7101 18.2446 21.7949 18.639 22.7811 19.2307C20.3156 21.499 18.6391 24.4576 17.9487 27.8106C14.5957 25.7396 12.2288 22.2879 11.6371 18.3432C11.9329 18.2446 12.1302 18.1459 12.426 18.0473C12.7219 17.9487 13.0178 17.7515 13.215 17.357C13.4122 17.0611 13.4122 16.6666 13.3136 16.3708C13.1164 15.6805 12.3274 15.286 11.6371 15.4832C11.5385 15.4832 11.5385 15.4832 11.4398 15.5818C11.8343 8.48124 17.7515 2.6627 25.0493 2.6627C32.3471 2.6627 38.2643 8.38262 38.6588 15.5818C34.0237 14.2012 28.9941 14.8915 25.0493 17.4556ZM29.783 31.7554C29.5858 35.5029 27.9093 39.0532 25.0493 41.5187C22.1893 39.0532 20.4142 35.6016 20.3156 31.7554C23.3728 32.7416 26.7258 32.7416 29.783 31.7554ZM32.4458 30.6706C36.785 28.4023 39.8422 24.359 40.927 19.6252C44.9704 22.0907 47.4359 26.43 47.4359 31.1637C47.4359 36.0947 44.8718 40.5325 40.5325 42.998C36.3905 45.3649 31.4596 45.3649 27.3176 43.0966C30.7692 39.8422 32.643 35.4043 32.4458 30.6706Z",fill:n}),y.createElement("path",{d:"M15.5819 14.8915C14.9901 14.9901 14.497 15.5818 14.497 16.1735C14.497 16.8639 15.0888 17.5542 15.8777 17.5542C16.6667 17.5542 17.2584 16.9625 17.2584 16.1735C17.2584 15.7791 17.0611 15.3846 16.7653 15.1874C16.3708 14.9901 15.9763 14.8915 15.5819 14.8915Z",fill:n}))}),eQ=["color","size"],tQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,eQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2.00049C3.34315 2.00049 2 3.34364 2 5.00049V16.7505H5.5V5.50049H16.75V2.00049H5ZM45 2.00049H33.25V5.50049H44.5V16.7505H48V5.00049C48 3.34363 46.6569 2.00049 45 2.00049ZM5.5 33.2505H2V45.0005C2 46.6573 3.34315 48.0005 5 48.0005H16.75V44.5005H5.5V33.2505ZM48 33.2505H44.5V44.5005H33.25V48.0005H45C46.6569 48.0005 48 46.6573 48 45.0005V33.2505Z",fill:n}))}),rQ=["color","size"],nQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,rQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 53 37",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.11841 3.93799V32.063H47.8684V3.93799H4.11841ZM3.49341 0.812988C2.1127 0.812988 0.993408 1.91229 0.993408 3.26835V32.7326C0.993408 34.0887 2.1127 35.188 3.49341 35.188H48.4934C49.8741 35.188 50.9934 34.0887 50.9934 32.7326V3.26835C50.9934 1.91229 49.8741 0.812988 48.4934 0.812988H3.49341Z",fill:n}))}),iQ=["color","size"],oQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,iQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M0.5 0.5H3V2.375H2.375V3H0.5V0.5Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.5 21.125H3V21.2693H24.7308V43H24.875V45.5L0.5 45.5001V21.125ZM22.2308 43L3 43.0001V23.7693H22.2308V43Z",fill:n}),y.createElement("path",{d:"M43 45.5H45.5V43H43.625V43.625H43V45.5Z",fill:n}),y.createElement("path",{d:"M45.5 3V0.5H43V2.375H43.625V3H45.5Z",fill:n}),y.createElement("path",{d:"M6.125 0.5V3H9.875V0.5H6.125Z",fill:n}),y.createElement("path",{d:"M13.625 0.5V3H17.375V0.5H13.625Z",fill:n}),y.createElement("path",{d:"M21.125 0.5V3H24.875V0.5H21.125Z",fill:n}),y.createElement("path",{d:"M28.625 0.5V3H32.375V0.5H28.625Z",fill:n}),y.createElement("path",{d:"M36.125 0.5V3H39.875V0.5H36.125Z",fill:n}),y.createElement("path",{d:"M45.5 6.125H43V9.875H45.5V6.125Z",fill:n}),y.createElement("path",{d:"M45.5 13.625H43V17.375H45.5V13.625Z",fill:n}),y.createElement("path",{d:"M45.5 21.125H43V24.875H45.5V21.125Z",fill:n}),y.createElement("path",{d:"M45.5 28.625H43V32.375H45.5V28.625Z",fill:n}),y.createElement("path",{d:"M45.5 36.125H43V39.875H45.5V36.125Z",fill:n}),y.createElement("path",{d:"M39.875 45.5V43H36.125V45.5H39.875Z",fill:n}),y.createElement("path",{d:"M32.375 45.5V43H28.625V45.5H32.375Z",fill:n}),y.createElement("path",{d:"M0.5 17.375H3V13.625H0.5V17.375Z",fill:n}),y.createElement("path",{d:"M0.5 9.875H3V6.125H0.5V9.875Z",fill:n}),y.createElement("path",{d:"M35.1391 9.23718L26.3209 17.8619C25.8274 18.3446 25.8186 19.136 26.3013 19.6295C26.784 20.1231 27.5754 20.1319 28.069 19.6492L37.1012 10.815V16.9907C37.1012 17.681 37.6609 18.2407 38.3512 18.2407C39.0416 18.2407 39.6012 17.681 39.6012 16.9907V7.98718C39.6012 7.29683 39.0416 6.73718 38.3512 6.73718L29.3477 6.73718C28.6574 6.73718 28.0977 7.29683 28.0977 7.98718C28.0977 8.67754 28.6574 9.23718 29.3477 9.23718L35.1391 9.23718Z",fill:n}))}),aQ=["color","size"],sQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,aQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M42.1323 0.500031H2.73399C1.42693 0.500031 0.399963 1.527 0.399963 2.83406V43.166C0.399963 44.4731 1.42693 45.5 2.73399 45.5H42.1323C43.4394 45.5 44.4664 44.4731 44.4664 43.166V2.83406C44.4664 1.527 43.4394 0.500031 42.1323 0.500031ZM41.6655 3.30086V25.8942L36.624 21.693C36.1572 21.2262 35.4103 21.2262 34.8502 21.5996L28.595 26.2677L15.5244 11.2365C15.3377 10.9565 14.9643 10.7697 14.5908 10.7697C14.2174 10.7697 13.8439 10.9565 13.5639 11.1432L3.20079 21.693V3.30086H41.6655ZM3.20079 42.6992V39.8984C4.22776 40.3652 5.72154 40.832 7.58876 40.832C9.36262 40.832 10.483 40.2718 11.3232 39.805C12.0701 39.4316 12.5369 39.1515 13.3771 39.2448C14.3108 39.3382 14.8709 39.5249 15.4311 39.805C16.2713 40.0851 17.2049 40.4585 18.9788 40.4585V38.3112C17.6717 38.3112 17.0182 38.0312 16.178 37.7511C15.5244 37.471 14.6842 37.1909 13.5639 37.0975C12.0701 36.9108 11.1365 37.471 10.2962 37.8444C9.54934 38.2179 8.80245 38.5913 7.4954 38.5913C5.06801 38.5913 3.6676 37.7511 3.10743 37.2843V35.0436C4.1344 35.5104 5.62818 35.9772 7.4954 35.9772C9.26926 35.9772 10.3896 35.417 11.2298 34.9502C11.9767 34.5768 12.4435 34.2967 13.2838 34.3901C14.2174 34.4834 14.7776 34.6702 15.3377 34.9502C16.178 35.2303 17.1116 35.6038 18.8854 35.6038V33.4565C17.5784 33.4565 16.9249 33.1764 16.0846 32.8963C15.4311 32.6162 14.5908 32.3361 13.4705 32.2428C11.9767 32.056 11.0431 32.6162 10.2029 32.9897C9.45598 33.3631 8.70909 33.7365 7.40204 33.7365C4.97465 33.7365 3.57424 32.8963 3.01407 32.4295V30.1888C4.04104 30.6556 5.53482 31.1224 7.40204 31.1224C9.1759 31.1224 10.2962 30.5623 11.1365 30.0955C11.8834 29.722 12.3502 29.4419 13.1904 29.5353C14.124 29.6287 14.6842 29.8154 15.2444 30.0955C16.0846 30.3755 17.0182 30.749 18.7921 30.749V28.6017C17.485 28.6017 16.8315 28.3216 15.9912 28.0415C15.3377 27.7614 14.4975 27.4814 13.3771 27.388C11.8834 27.2013 10.9498 27.7614 10.1095 28.1349C9.36262 28.5083 8.61573 28.8818 7.30868 28.8818C4.88129 28.8818 3.48088 28.0415 2.92071 27.5747V25.7075L14.124 14.2241L27.1012 29.0685C27.568 29.6287 28.4083 29.722 28.9684 29.2552L35.4103 24.4004L41.3854 29.4419V42.6058H3.20079V42.6992Z",fill:n}),y.createElement("path",{d:"M32.7029 15.7179C35.4103 15.7179 37.651 13.4772 37.651 10.7697C37.651 8.06227 35.4103 5.82161 32.7029 5.82161C29.9954 5.82161 27.7547 8.06227 27.7547 10.7697C27.7547 13.4772 29.9954 15.7179 32.7029 15.7179ZM32.7029 8.15563C34.1966 8.15563 35.317 9.36933 35.317 10.7697C35.317 12.1702 34.1033 13.3838 32.7029 13.3838C31.3025 13.3838 30.0888 12.1702 30.0888 10.7697C30.0888 9.36933 31.2091 8.15563 32.7029 8.15563Z",fill:n}))}),lQ=["color","size"],cQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,lQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M43.4164 5.98527H1.06762C0.533808 5.98527 0 6.53674 0 7.08821V49C0 49.7353 0.533808 50.1029 1.06762 50.1029H43.4164C44.1281 50.1029 44.484 49.7353 44.484 49V7.08821C44.484 6.53674 44.1281 5.98527 43.4164 5.98527ZM35.7651 13.1544C37.9004 13.1544 39.5 15.0809 39.5 17.1029C39.5 19.3088 37.7224 20.6029 35.7651 20.6029C33.8078 20.6029 32 19.125 32 17.1029C31.8221 14.897 33.6299 13.1544 35.7651 13.1544ZM1.9573 45.875C2.13523 45.6912 14.2349 30.9853 16.548 27.8603C16.726 27.4926 17.2598 27.4926 17.4377 27.8603L29.7153 43.4853L35.0534 37.4191C35.4093 37.0514 35.7651 37.2353 35.9431 37.4191L42.5267 45.875H1.9573Z",fill:n}),y.createElement("path",{d:"M48.9164 -3.8147e-06H6.74555C6.03381 -3.8147e-06 5.5 0.367643 5.5 1.10294V4.29294H7.5V2.20588H47.6892V39H46.2473V44.1176H48.9164C49.6281 44.1176 49.984 43.75 49.984 43.0147V1.10294C49.984 0.367643 49.6281 -3.8147e-06 48.9164 -3.8147e-06Z",fill:n}))}),uQ=["color","size"],VI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,uQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M25 0C38.8071 0 50 11.1929 50 25C50 38.807 38.8071 50 25 50C14.111 50 4.854 43.0397 1.42326 33.333C0.963005 32.0312 1.6455 30.603 2.94725 30.143C4.249 29.6828 5.67725 30.365 6.1375 31.667C8.88425 39.4382 16.2957 45 25 45C36.0457 45 45 36.0457 45 25C45 13.9543 36.0457 5 25 5C21.121 5 17.8345 6.40292 14.7095 8.6015C12.6078 10.0803 10.663 11.8526 8.6895 13.75H16.25C17.6308 13.75 18.75 14.8693 18.75 16.25C18.75 17.6307 17.6308 18.75 16.25 18.75H2.5C1.11926 18.75 0 17.6307 0 16.25V2.5C0 1.1193 1.11926 0 2.5 0C3.88075 0 5 1.1193 5 2.5V10.3593C7.12075 8.31457 9.38601 6.23342 11.8325 4.51222C15.5128 1.9229 19.7882 0 25 0Z",fill:n}))}),dQ=["color","size"],UI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,dQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M39.4229 8.89453L39.7891 16.6582H38.8613C38.6823 15.291 38.4382 14.3145 38.1289 13.7285C37.6243 12.7845 36.9489 12.0928 36.1025 11.6533C35.2725 11.1976 34.1738 10.9697 32.8066 10.9697H28.1436V36.2627C28.1436 38.2972 28.3633 39.5667 28.8027 40.0713C29.4212 40.7549 30.3734 41.0967 31.6592 41.0967H32.8066V42H18.7686V41.0967H19.9404C21.3402 41.0967 22.333 40.6735 22.9189 39.8271C23.277 39.3063 23.4561 38.1182 23.4561 36.2627V10.9697H19.4766C17.9303 10.9697 16.8317 11.0837 16.1807 11.3115C15.3343 11.6208 14.61 12.2148 14.0078 13.0938C13.4056 13.9727 13.0475 15.1608 12.9336 16.6582H12.0059L12.3965 8.89453H39.4229Z",fill:n}))}),hQ=["color","size"],h_=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,hQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 45 29",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M0 1.89502C0 1.20466 0.559644 0.64502 1.25 0.64502H28.75C29.4404 0.64502 30 1.20466 30 1.89502C30 2.58538 29.4404 3.14502 28.75 3.14502H1.25C0.559645 3.14502 0 2.58538 0 1.89502Z",fill:n}),y.createElement("path",{d:"M0 14.395C0 13.7047 0.559644 13.145 1.25 13.145H43.75C44.4404 13.145 45 13.7047 45 14.395C45 15.0854 44.4404 15.645 43.75 15.645H1.25C0.559645 15.645 0 15.0854 0 14.395Z",fill:n}),y.createElement("path",{d:"M1.25 25.645C0.559644 25.645 0 26.2047 0 26.895C0 27.5854 0.559645 28.145 1.25 28.145H28.75C29.4404 28.145 30 27.5854 30 26.895C30 26.2047 29.4404 25.645 28.75 25.645H1.25Z",fill:n}))}),fQ=["color","size"],WI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,fQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 46 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M38 1.50049C38 0.810132 37.4404 0.250488 36.75 0.250488H9.25C8.55964 0.250488 8 0.810132 8 1.50049C8 2.19084 8.55964 2.75049 9.25 2.75049H36.75C37.4404 2.75049 38 2.19084 38 1.50049Z",fill:n}),y.createElement("path",{d:"M45.5 14.0005C45.5 13.3101 44.9404 12.7505 44.25 12.7505H1.75C1.05964 12.7505 0.5 13.3101 0.5 14.0005C0.5 14.6908 1.05964 15.2505 1.75 15.2505H44.25C44.9404 15.2505 45.5 14.6908 45.5 14.0005Z",fill:n}),y.createElement("path",{d:"M36.75 25.2505C37.4404 25.2505 38 25.8101 38 26.5005C38 27.1908 37.4404 27.7505 36.75 27.7505H9.25C8.55964 27.7505 8 27.1908 8 26.5005C8 25.8101 8.55964 25.2505 9.25 25.2505H36.75Z",fill:n}))}),pQ=["color","size"],XI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,pQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 45 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M2.66027 14.6997L3.59752 14.4437L3.09232 3.93218C3.05918 3.24262 2.47331 2.71049 1.78375 2.74363C1.09419 2.77677 0.562061 3.36263 0.595202 4.05219L1.16041 15.8123C1.19355 16.5018 1.77942 17.034 2.46898 17.0008L14.2291 16.4356C14.9186 16.4025 15.4508 15.8166 15.4176 15.1271C15.3845 14.4375 14.7986 13.9054 14.1091 13.9385L5.48447 14.353C8.23224 7.41077 15.0052 2.50049 22.925 2.50049C33.2802 2.50049 41.6748 10.8951 41.6748 21.2503C41.6748 22.4035 41.5706 23.5324 41.3713 24.6281L43.7968 25.261C44.0449 23.9622 44.1748 22.6214 44.1748 21.2503C44.1748 9.51435 34.6609 0.000488281 22.925 0.000488281C15.0467 0.000488281 8.16974 4.28779 4.50001 10.6566L2.66027 14.6997Z",fill:n}),y.createElement("path",{d:"M9.88491 34.708L8.27773 36.6309C8.82614 37.1539 9.40248 37.6479 10.0043 38.1103L11.5276 36.128C10.9528 35.6863 10.4043 35.2121 9.88491 34.708Z",fill:n}),y.createElement("path",{d:"M12.3142 39.6567C13.9038 40.5764 15.6235 41.2961 17.439 41.7814L18.0846 39.3662C16.4846 38.9385 14.9685 38.3041 13.5662 37.4928L12.3142 39.6567Z",fill:n}),y.createElement("path",{d:"M20.1654 42.3209C21.0738 42.4394 22.0002 42.5005 22.9408 42.5005C23.8815 42.5005 24.8079 42.4394 25.7162 42.3209L25.3929 39.8419C24.5915 39.9465 23.7731 40.0005 22.9408 40.0005C22.1086 40.0005 21.2902 39.9465 20.4888 39.8419L20.1654 42.3209Z",fill:n}),y.createElement("path",{d:"M28.4427 41.7814C30.2582 41.2961 31.9779 40.5764 33.5674 39.6567L32.3154 37.4928C30.9132 38.3041 29.397 38.9385 27.7971 39.3662L28.4427 41.7814Z",fill:n}),y.createElement("path",{d:"M35.8774 38.1103C37.3494 36.9791 38.6692 35.6594 39.8004 34.1873L37.8181 32.664C36.8193 33.9638 35.6538 35.1292 34.354 36.128L35.8774 38.1103Z",fill:n}),y.createElement("path",{d:"M41.3468 31.8773C42.2665 30.2878 42.9862 28.5681 43.4715 26.7526L41.0563 26.107C40.6286 27.707 39.9942 29.2231 39.1829 30.6253L41.3468 31.8773Z",fill:n}))}),gQ=["color","size"],mQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,gQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("g",{clipPath:"url(#clip0)"},y.createElement("path",{d:"M50.2753 26.8064H24.4689L36.5656 14.7096C32.735 11.0806 28.7027 9.66933 23.6624 9.66933C13.3802 9.66933 6.32372 15.3145 3.50118 25.5967L0.275391 24.7903C3.50118 13.0968 11.9689 6.44355 23.6625 6.44355C29.7109 6.44355 34.348 8.25806 38.9851 12.2903L50.2754 1L50.2753 26.8064Z",fill:n}),y.createElement("path",{d:"M34.5495 46.3628L33.1382 44.3467C33.743 43.9435 34.3479 43.3386 34.9527 42.9355L36.5656 44.75C35.9608 45.1532 35.3559 45.758 34.5495 46.3628Z",fill:n}),y.createElement("path",{d:"M27.2913 49.387C26.6865 49.5886 26.0817 49.5886 25.4768 49.7903L25.0736 47.3709C26.4848 47.1693 27.8962 46.7661 29.3074 46.3628L30.1139 48.5806C29.1058 48.9838 28.2994 49.1854 27.2913 49.387ZM20.4365 49.9919C18.8235 49.7903 17.2107 49.5886 15.5978 48.9838L16.4042 46.766C17.8155 47.1693 19.2268 47.5724 20.6381 47.5724L20.4365 49.9919ZM11.1623 46.9677C9.75104 46.1612 8.33971 45.1532 7.13003 43.9435L8.74296 42.129C9.75104 43.137 10.9607 43.9435 12.372 44.7499L11.1623 46.9677ZM3.90425 40.3144C2.89617 38.9032 2.08974 37.2903 1.6865 35.879L3.90425 35.0726C4.50909 36.4838 5.11393 37.6935 5.92036 38.9032L3.90425 40.3144Z",fill:n}),y.createElement("path",{d:"M3.2996 30.0322L0.880241 30.2338C0.678647 29.2257 0.678647 28.4193 0.678647 27.4112H3.09801C3.09801 28.4193 3.2996 29.2258 3.2996 30.0322Z",fill:n})),y.createElement("defs",null,y.createElement("rect",{width:"50",height:"50",fill:"white",transform:"translate(0.275391)"})))}),vQ=["color","size"],yQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,vQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 51 51",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M40.5 20H38V12.5C38 5.6 32.4 0 25.5 0C18.6 0 13 5.6 13 12.5V20H10.5C9.1 20 8 21.1 8 22.5V47.5C8 48.9 9.1 50 10.5 50H40.5C41.9 50 43 48.9 43 47.5V22.5C43 21.1 41.9 20 40.5 20ZM15.5 12.5C15.5 7 20 2.5 25.5 2.5C31 2.5 35.5 7 35.5 12.5V20H15.5V12.5ZM40.5 47.5H10.5V22.5H40.5V47.5Z",fill:n}),y.createElement("path",{d:"M24.3 37.3V41.3H26.8V37.3C28.3 36.8 29.3 35.4 29.3 33.8C29.3 31.7 27.6 30 25.5 30C23.4 30 21.7 31.7 21.7 33.8C21.8 35.4 22.8 36.8 24.3 37.3ZM25.5 32.5C26.2 32.5 26.8 33.1 26.8 33.8C26.8 34.5 26.2 35.1 25.5 35.1C24.8 35.1 24.2 34.5 24.2 33.8C24.3 33.1 24.8 32.5 25.5 32.5Z",fill:n}))}),CQ=["color","size"],wQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,CQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M36.2754 7.5C34.2754 3.1 29.8754 0 24.7754 0C17.8754 0 12.2754 5.6 12.2754 12.5V20H9.77539C8.37539 20 7.27539 21.1 7.27539 22.5V47.5C7.27539 48.9 8.37539 50 9.77539 50H39.7754C41.1754 50 42.2754 48.9 42.2754 47.5V22.5C42.2754 21.1 41.1754 20 39.7754 20H14.7754V12.5C14.7754 7 19.2754 2.5 24.7754 2.5C28.4754 2.5 31.7754 4.5 33.4754 7.6L36.2754 7.5ZM39.7754 47.5H9.77539V22.5H39.7754V47.5Z",fill:n}),y.createElement("path",{d:"M24.7754 30C22.6754 30 20.9754 31.7 20.9754 33.7C20.9754 35.3 21.9754 36.7 23.4754 37.2V41.2H25.9754V37.2C27.4754 36.7 28.4754 35.3 28.4754 33.7C28.5754 31.7 26.8754 30 24.7754 30ZM24.7754 35C24.0754 35 23.4754 34.4 23.4754 33.7C23.4754 33 24.0754 32.4 24.7754 32.4C25.4754 32.4 25.9754 33 25.9754 33.7C25.9754 34.4 25.4754 35 24.7754 35Z",fill:n}))}),SQ=["color","size"],bQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,SQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("circle",{cx:"25",cy:"25",r:"8.33333",fill:n}))}),_Q=["color","size"],xQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,_Q);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M42.6793 7.32203C32.916 -2.44013 17.0863 -2.44122 7.32197 7.32203C-2.44128 17.0853 -2.4402 32.915 7.32197 42.6793C17.0852 52.4404 32.9149 52.4415 42.6793 42.6793C52.4414 32.915 52.4403 17.0864 42.6793 7.32203ZM28.2605 35.8705C28.2605 37.6716 26.8007 39.1314 24.9995 39.1314C23.1984 39.1314 21.7386 37.6716 21.7386 35.8705V22.8267C21.7386 21.0256 23.1984 19.5658 24.9995 19.5658C26.8007 19.5658 28.2605 21.0256 28.2605 22.8267V35.8705ZM24.9419 17.2527C23.0636 17.2527 21.8114 15.9222 21.8506 14.2798C21.8114 12.558 23.0636 11.2678 24.98 11.2678C26.8974 11.2678 28.1105 12.5591 28.1507 14.2798C28.1496 15.9222 26.8985 17.2527 24.9419 17.2527Z",fill:n}))}),EQ=["color","size"],KI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,EQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M48.9856 38.314L31.3034 3.80423C29.9688 1.42247 27.6118 0 24.9985 0C22.3852 0 20.0282 1.42247 18.6936 3.80423C18.6836 3.82245 18.6751 3.84067 18.665 3.8589L1.04158 38.2594C-0.321602 40.6914 -0.347383 43.612 0.971367 46.0713C2.29314 48.5321 4.67439 50 7.345 50H42.5544C45.225 50 47.7041 48.5321 49.0258 46.0713C50.3445 43.6121 50.3188 40.6913 48.9856 38.314ZM22.0659 15.8013C22.0659 14.0842 23.3789 12.6924 24.9985 12.6924C26.6182 12.6924 27.9311 14.0843 27.9311 15.8013V28.2372C27.9311 29.9541 26.6181 31.3462 24.9985 31.3462C23.3789 31.3462 22.0659 29.954 22.0659 28.2372V15.8013ZM24.9985 43.7821C22.5728 43.7821 20.5995 41.6902 20.5995 39.1186C20.5995 36.5471 22.5727 34.4552 24.9985 34.4552C27.4242 34.4552 29.3974 36.5471 29.3974 39.1186C29.3975 41.6901 27.4243 43.7821 24.9985 43.7821Z",fill:n}))}),OQ=["color","size"],PQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,OQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M25 50C11.2033 50 0 38.7967 0 25C0 11.2033 11.2033 0 25 0C38.7967 0 50 11.2033 50 25C50 38.7967 38.6929 50 25 50ZM25 3.52697C13.1743 3.52697 3.63071 13.1743 3.63071 24.8963C3.63071 36.6183 13.278 46.2656 25 46.2656C36.8257 46.2656 46.3693 36.6183 46.3693 24.8963C46.3693 13.1743 36.8257 3.52697 25 3.52697Z",fill:n}),y.createElement("path",{d:"M28.3755 13.125C28.3755 11.3992 26.9765 10 25.2505 10C23.5245 10 22.1255 11.3992 22.1255 13.125C22.1255 14.8516 23.5245 16.25 25.2505 16.25C26.9765 16.25 28.3755 14.8516 28.3755 13.125Z",fill:n}),y.createElement("path",{d:"M20.563 38.5H29.938C30.8009 38.5 31.5005 37.8012 31.5005 36.9375C31.5005 36.0746 30.8009 35.375 29.938 35.375H28.3755V20.9375C28.3755 20.0746 27.6759 19.375 26.813 19.375H20.563C19.7001 19.375 19.0005 20.0746 19.0005 20.9375C19.0005 21.8012 19.7001 22.5 20.563 22.5H22.1255V35.375H20.563C19.7001 35.375 19.0005 36.0746 19.0005 36.9375C19.0005 37.8012 19.7001 38.5 20.563 38.5Z",fill:n}))}),kQ=["color","size"],YI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,kQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M31.3032 17.8662C34.0646 17.8662 36.3032 15.6276 36.3032 12.8662C36.3032 10.1048 34.0646 7.86618 31.3032 7.86618C28.5418 7.86618 26.3032 10.1048 26.3032 12.8662C26.3032 15.6276 28.5418 17.8662 31.3032 17.8662ZM31.3032 15.3662C32.6839 15.3662 33.8032 14.2469 33.8032 12.8662C33.8032 11.4855 32.6839 10.3662 31.3032 10.3662C29.9225 10.3662 28.8032 11.4855 28.8032 12.8662C28.8032 14.2469 29.9225 15.3662 31.3032 15.3662Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9372 15.1063C16.3967 15.0794 16.8338 15.3071 17.075 15.6991L25.0831 28.7141L29.8357 24.4289C30.0935 24.1966 30.4362 24.0818 30.7819 24.1121C31.1276 24.1424 31.4452 24.3151 31.6586 24.5887L40.2822 35.6497C40.5759 36.0264 40.6292 36.5376 40.4196 36.9668C40.21 37.396 39.7741 37.6683 39.2964 37.6683H6.70331C6.2766 37.6683 5.87937 37.4506 5.64974 37.091C5.42011 36.7313 5.38981 36.2794 5.56937 35.8923L14.8765 15.8282C15.0702 15.4106 15.4777 15.1333 15.9372 15.1063ZM16.1652 18.991L8.66108 35.1683H36.7368L30.5126 27.1848L25.6422 31.5761C25.3666 31.8246 24.9947 31.9378 24.6274 31.885C24.26 31.8322 23.9351 31.6189 23.7406 31.3027L16.1652 18.991Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V43C45.5 44.3807 44.3807 45.5 43 45.5H3C1.61929 45.5 0.5 44.3807 0.5 43V3ZM3 3H43V43H3V3Z",fill:n}))}),TQ=["color","size"],IQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,TQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.562515 0.562512H3.68752V2.90626H2.90627V3.68751H0.562515V0.562512ZM0.562515 44.3125V47.4375H3.68752V45.0938H2.90627V44.3125H0.562515ZM44.3125 47.4375H47.4375V44.3125H45.0938V45.0938H44.3125V47.4375ZM47.4375 3.68751V0.562512H44.3125V2.90626H45.0938V3.68751H47.4375ZM7.59376 0.562512V3.68751H12.2813V0.562512H7.59376ZM16.9688 0.562512V3.68751H21.6563V0.562512H16.9688ZM26.3438 0.562512V3.68751H31.0313V0.562512H26.3438ZM35.7188 0.562512V3.68751H40.4063V0.562512H35.7188ZM47.4375 7.59376H44.3125V12.2813H47.4375V7.59376ZM47.4375 16.9688H44.3125V21.6563H47.4375V16.9688ZM47.4375 26.3438H44.3125V31.0313H47.4375V26.3438ZM47.4375 35.7188H44.3125V40.4063H47.4375V35.7188ZM40.4063 47.4375V44.3125H35.7188V47.4375H40.4063ZM31.0313 47.4375V44.3125H26.3438V47.4375H31.0313ZM21.6563 47.4375V44.3125H16.9688V47.4375H21.6563ZM12.2813 47.4375V44.3125H7.59377V47.4375H12.2813ZM0.562515 40.4063H3.68752V35.7188H0.562515V40.4063ZM0.562515 31.0313H3.68752V26.3438H0.562515V31.0313ZM0.562515 21.6563H3.68752V16.9688H0.562515V21.6563ZM0.562515 12.2813H3.68752V7.59376H0.562515V12.2813Z",fill:n}))}),AQ=["color","size"],LQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,AQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.5001 24.0625C38.2086 24.0625 38.8284 23.5858 39.0102 22.901C39.1921 22.2162 38.8904 21.4948 38.2753 21.1433L3.27531 1.14333C2.79171 0.866989 2.19757 0.868973 1.71583 1.14854C1.23409 1.4281 0.937592 1.94298 0.937592 2.49996V22.5C0.937592 23.3629 1.63715 24.0625 2.50009 24.0625L37.5001 24.0625ZM4.06259 20.9375L4.06259 5.19243L31.6164 20.9375L4.06259 20.9375Z",fill:n}),y.createElement("path",{d:"M38.2753 28.8566C38.8904 28.5051 39.1921 27.7837 39.0102 27.0989C38.8284 26.4142 38.2086 25.9375 37.5001 25.9375H35.3126V26.9504L34.5374 27.3933L35.3126 28.75V29.0625H35.4912L36.0878 30.1066L38.2753 28.8566Z",fill:n}),y.createElement("path",{d:"M27.3378 35.1066L31.7128 32.6066L30.1624 29.8933L25.7874 32.3933L27.3378 35.1066Z",fill:n}),y.createElement("path",{d:"M30.9376 25.9375H26.5626L26.5626 29.0625H30.9376L30.9376 25.9375Z",fill:n}),y.createElement("path",{d:"M18.5878 40.1066L22.9628 37.6066L21.4124 34.8933L17.0374 37.3933L18.5878 40.1066Z",fill:n}),y.createElement("path",{d:"M22.1876 25.9375H17.8126V29.0625H22.1876V25.9375Z",fill:n}),y.createElement("path",{d:"M9.83781 45.1066L14.2128 42.6066L12.6624 39.8933L8.28738 42.3933L9.83781 45.1066Z",fill:n}),y.createElement("path",{d:"M13.4376 25.9375H9.0626V29.0625H13.4376V25.9375Z",fill:n}),y.createElement("path",{d:"M3.27531 48.8566L5.46281 47.6066L4.06259 45.1562V45H3.97331L3.91238 44.8933L3.72578 45H0.937592V47.5C0.937592 48.0569 1.23409 48.5718 1.71583 48.8514C2.19758 49.1309 2.79171 49.1329 3.27531 48.8566Z",fill:n}),y.createElement("path",{d:"M4.6876 25.9375L2.50009 25.9375C1.63715 25.9375 0.937592 26.637 0.937592 27.5V30H4.06259V29.0625H4.6876V25.9375Z",fill:n}),y.createElement("path",{d:"M0.937592 35V40L4.06259 40V35H0.937592Z",fill:n}))}),MQ=["color","size"],RQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,MQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.0625 1.93758C24.0625 1.22909 23.5858 0.609274 22.901 0.427427C22.2163 0.245581 21.4949 0.547225 21.1434 1.16237L1.14337 39.2874C0.867028 39.771 0.869012 40.3651 1.14858 40.8468C1.42814 41.3286 1.94302 41.6251 2.5 41.6251H22.5C23.3629 41.6251 24.0625 40.9255 24.0625 40.0626V1.93758ZM20.9375 38.5001H5.19247L20.9375 7.82128V38.5001Z",fill:n}),y.createElement("path",{d:"M28.8566 1.16237C28.5051 0.547225 27.7837 0.245581 27.099 0.427428C26.4142 0.609274 25.9375 1.22909 25.9375 1.93758V4.12508H26.9504L27.3934 4.9003L28.75 4.12508H29.0625V3.94651L30.1066 3.34986L28.8566 1.16237Z",fill:n}),y.createElement("path",{d:"M35.1066 12.0999L32.6066 7.72486L29.8934 9.2753L32.3934 13.6503L35.1066 12.0999Z",fill:n}),y.createElement("path",{d:"M25.9375 8.50008V12.8751H29.0625V8.50008H25.9375Z",fill:n}),y.createElement("path",{d:"M40.1066 23.9749L37.6066 19.5999L34.8934 21.1503L37.3934 25.5253L40.1066 23.9749Z",fill:n}),y.createElement("path",{d:"M25.9375 20.3751V24.7501H29.0625V20.3751H25.9375Z",fill:n}),y.createElement("path",{d:"M45.1066 32.7249L42.6066 28.3499L39.8934 29.9003L42.3934 34.2753L45.1066 32.7249Z",fill:n}),y.createElement("path",{d:"M25.9375 29.1251V33.5001H29.0625V29.1251H25.9375Z",fill:n}),y.createElement("path",{d:"M48.8566 39.2874L47.6066 37.0999L45.1562 38.5001H45V38.5894L44.8934 38.6503L45 38.8369V41.6251H47.5C48.057 41.6251 48.5719 41.3286 48.8514 40.8468C49.131 40.3651 49.133 39.771 48.8566 39.2874Z",fill:n}),y.createElement("path",{d:"M25.9375 37.8751V40.0626C25.9375 40.9255 26.6371 41.6251 27.5 41.6251H30V38.5001H29.0625V37.8751H25.9375Z",fill:n}),y.createElement("path",{d:"M35 41.6251H40V38.5001H35V41.6251Z",fill:n}))}),NQ=["color","size"],ZI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,NQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25.2047 46.875C37.2859 46.875 47.0797 37.0812 47.0797 25C47.0797 12.9188 37.2859 3.125 25.2047 3.125C13.1235 3.125 3.32968 12.9188 3.32968 25C3.32968 37.0812 13.1235 46.875 25.2047 46.875ZM25.2047 50C39.0118 50 50.2047 38.8071 50.2047 25C50.2047 11.1929 39.0118 0 25.2047 0C11.3976 0 0.204681 11.1929 0.204681 25C0.204681 38.8071 11.3976 50 25.2047 50Z",fill:n}))}),FQ=["color","size"],DQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,FQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 51 36",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.11841 3.93805V32.063H47.8684V3.93805H4.11841ZM3.49341 0.813049C2.1127 0.813049 0.993408 1.91235 0.993408 3.26841V32.7327C0.993408 34.0887 2.1127 35.188 3.49341 35.188H48.4934C49.8741 35.188 50.9934 34.0887 50.9934 32.7327V3.26841C50.9934 1.91235 49.8741 0.813049 48.4934 0.813049H3.49341Z",fill:n}))}),jQ=["color","size"],zQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,jQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.50015 7.9997C5.50015 6.61898 6.61944 5.49969 8.00015 5.49969H38.0002C39.3809 5.49969 40.5002 6.61898 40.5002 7.99969V37.9997C40.5002 39.3804 39.3809 40.4997 38.0002 40.4997H8.00015C6.61944 40.4997 5.50015 39.3804 5.50015 37.9997V7.9997ZM8.00015 7.99969H38.0002V37.9997H8.00015V7.99969Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V43C45.5 44.3807 44.3807 45.5 43 45.5H3C1.61929 45.5 0.5 44.3807 0.5 43V3ZM3 3H43V43H3V3Z",fill:n}))}),$Q=["color","size"],BQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,$Q);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M0.166672 0.166664H8.50001V8.5H0.166672V0.166664Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8333 8.5H8.50001V16.8333H0.166672V25.1667H8.50001V33.5H0.166672V41.8333H8.50001V33.5H16.8333V41.8333H25.1667V33.5H33.5V41.8333H41.8333V33.5H33.5V25.1667H41.8333V16.8333H33.5V8.5H41.8333V0.166664H33.5V8.5H25.1667V0.166664H16.8333V8.5ZM16.8333 16.8333V8.5H25.1667V16.8333H16.8333ZM16.8333 25.1667V33.5H25.1667V25.1667H33.5V16.8333H25.1667V25.1667H16.8333ZM16.8333 25.1667H8.50001V16.8333H16.8333V25.1667Z",fill:n}))}),HQ=["color","size"],GQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,HQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.95831 0.458374C1.5776 0.458374 0.458313 1.57766 0.458313 2.95837V35.4584C0.458313 36.8391 1.5776 37.9584 2.95831 37.9584H7.54167V43.7917C7.54167 45.8627 9.2206 47.5417 11.2917 47.5417H43.7917C45.8627 47.5417 47.5417 45.8627 47.5417 43.7917V11.2917C47.5417 9.22059 45.8627 7.54166 43.7917 7.54166H37.9583V2.95837C37.9583 1.57766 36.839 0.458374 35.4583 0.458374H2.95831ZM35.4583 2.95837H2.95831L2.95831 35.4584H35.4583V2.95837ZM15.7267 37.9584L10.0417 43.746V37.9584H15.7267ZM11.5135 45.0417L18.4712 37.9584H28.5529L21.4696 45.0417H11.5135ZM24.4159 45.0417H34.2932L45.0417 34.1339V24.0207L37.9583 31.3242V35.4584C37.9583 36.8391 36.839 37.9584 35.4583 37.9584H31.4912C31.4689 37.9859 31.445 38.0126 31.4194 38.0382L24.4159 45.0417ZM45.0417 21.3515L37.9583 28.655V18.9107L45.0417 11.8338V21.3515ZM37.0311 45.0417H43.7917C44.482 45.0417 45.0417 44.482 45.0417 43.7917V36.9124L37.0311 45.0417ZM43.8844 10.045C43.8538 10.0428 43.8229 10.0417 43.7917 10.0417H37.9583V15.9657L43.8844 10.045Z",fill:n}))}),VQ=["color","size"],UQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,VQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M3 3H23V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V23H43V43H3V3Z",fill:n}),y.createElement("path",{d:"M45.5 7.25076H43V5.50076C43 5.15718 42.9321 4.83576 42.8113 4.54446L45.1206 3.58682C45.3651 4.17636 45.5 4.82281 45.5 5.50076V7.25076Z",fill:n}),y.createElement("path",{d:"M24.75 0.500763V3.00076H28.25V0.500763H24.75Z",fill:n}),y.createElement("path",{d:"M31.75 0.500763V3.00076H35.25V0.500763H31.75Z",fill:n}),y.createElement("path",{d:"M38.75 0.500763V3.00076H40.5C40.8436 3.00076 41.165 3.06868 41.4563 3.18948L42.414 0.880166C41.8244 0.635694 41.178 0.500763 40.5 0.500763H38.75Z",fill:n}),y.createElement("path",{d:"M45.5 10.7508H43V14.2508H45.5V10.7508Z",fill:n}),y.createElement("path",{d:"M45.5 17.7508H43V21.2508H45.5V17.7508Z",fill:n}))}),WQ=["color","size"],XQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,WQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M9.25008 9.24878H11.7501V10.9675H10.9688V11.7488H9.25008V9.24878Z",fill:n}),y.createElement("path",{d:"M9.25008 34.2488V36.7488H11.7501V35.03H10.9688V34.2488H9.25008Z",fill:n}),y.createElement("path",{d:"M34.2501 36.7488H36.7501V34.2488H35.0313V35.03H34.2501V36.7488Z",fill:n}),y.createElement("path",{d:"M36.7501 11.7488V9.24878H34.2501V10.9675H35.0313V11.7488H36.7501Z",fill:n}),y.createElement("path",{d:"M14.4063 9.24878V11.7488H17.8438V9.24878H14.4063Z",fill:n}),y.createElement("path",{d:"M21.2813 9.24878V11.7488H24.7188V9.24878H21.2813Z",fill:n}),y.createElement("path",{d:"M28.1563 9.24878V11.7488H31.5938V9.24878H28.1563Z",fill:n}),y.createElement("path",{d:"M36.7501 14.405H34.2501V17.8425H36.7501V14.405Z",fill:n}),y.createElement("path",{d:"M36.7501 21.28H34.2501V24.7175H36.7501V21.28Z",fill:n}),y.createElement("path",{d:"M36.7501 28.155H34.2501V31.5925H36.7501V28.155Z",fill:n}),y.createElement("path",{d:"M31.5938 36.7488V34.2488H28.1563V36.7488H31.5938Z",fill:n}),y.createElement("path",{d:"M24.7188 36.7488V34.2488H21.2813V36.7488H24.7188Z",fill:n}),y.createElement("path",{d:"M17.8438 36.7488V34.2488H14.4063V36.7488H17.8438Z",fill:n}),y.createElement("path",{d:"M9.25008 31.5925H11.7501V28.155H9.25008V31.5925Z",fill:n}),y.createElement("path",{d:"M9.25008 24.7175H11.7501V21.28H9.25008V24.7175Z",fill:n}),y.createElement("path",{d:"M9.25008 17.8425H11.7501V14.405H9.25008V17.8425Z",fill:n}),y.createElement("path",{d:"M23.0002 26.7497C25.0712 26.7497 26.7502 25.0708 26.7502 22.9997C26.7502 20.9286 25.0712 19.2497 23.0002 19.2497C20.9291 19.2497 19.2502 20.9286 19.2502 22.9997C19.2502 25.0708 20.9291 26.7497 23.0002 26.7497Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 0.5C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V3C45.5 1.61929 44.3807 0.5 43 0.5H3ZM43 3H3V43H43V3Z",fill:n}))}),KQ=["color","size"],YQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,KQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.29986 0.991788C4.78802 0.503633 5.57947 0.503633 6.06763 0.991788L9.367 4.29116C9.85516 4.77932 9.85516 5.57077 9.367 6.05893C8.87885 6.54708 8.08739 6.54708 7.59924 6.05893L6.43374 4.89344V34.0829L7.59924 32.9174C8.08739 32.4293 8.87885 32.4293 9.367 32.9174C9.85516 33.4056 9.85516 34.197 9.367 34.6852L6.06763 37.9846C5.8332 38.219 5.51524 38.3507 5.18371 38.3507C4.85217 38.3507 4.53422 38.219 4.29981 37.9845L1.00084 34.6851C0.512712 34.1969 0.512761 33.4055 1.00095 32.9174C1.48913 32.4292 2.28059 32.4293 2.76871 32.9175L3.93374 34.0827V4.89344L2.76825 6.05893C2.2801 6.54708 1.48864 6.54708 1.00049 6.05893C0.51233 5.57077 0.51233 4.77932 1.00049 4.29116L4.29986 0.991788ZM13.1588 8.34109V1.49725H46.3156V8.34102H43.398V7.19776C43.398 5.54595 42.0562 4.20442 40.4047 4.20442H31.8516V26.0992C31.8516 28.1387 33.5088 29.7957 35.5481 29.7957H36.5137V32.4599H23.01V29.7957H23.9756C26.0151 29.7957 27.6721 28.1387 27.6721 26.0992V4.20448H19.0697C17.418 4.20448 16.0763 5.54604 16.0763 7.19783V8.34109H13.1588ZM46.9995 39.7088C47.4877 39.2207 47.4877 38.4292 46.9995 37.9411L43.7001 34.6417C43.212 34.1535 42.4205 34.1535 41.9324 34.6417C41.4442 35.1298 41.4442 35.9213 41.9324 36.4095L43.0979 37.5749L15.0832 37.5749L16.2484 36.4099C16.7366 35.9218 16.7366 35.1303 16.2485 34.6421C15.7604 34.154 14.9689 34.1539 14.4807 34.642L11.1814 37.941C10.9469 38.1754 10.8152 38.4934 10.8152 38.8249C10.8152 39.1564 10.9469 39.4744 11.1813 39.7088L14.4807 43.0082C14.9688 43.4964 15.7603 43.4964 16.2485 43.0082C16.7366 42.5201 16.7366 41.7286 16.2485 41.2404L15.083 40.0749L43.0979 40.0749L41.9324 41.2404C41.4442 41.7286 41.4442 42.5201 41.9324 43.0082C42.4205 43.4964 43.212 43.4964 43.7001 43.0082L46.9995 39.7088Z",fill:n}))}),ZQ=["color","size"],qQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,ZQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M13.8334 9.19949C13.8334 8.50914 14.3931 7.94949 15.0834 7.94949H31.3334C32.0238 7.94949 32.5834 8.50914 32.5834 9.19949C32.5834 9.88985 32.0238 10.4495 31.3334 10.4495H15.0834C14.3931 10.4495 13.8334 9.88985 13.8334 9.19949Z",fill:n}),y.createElement("path",{d:"M15.0834 35.5496C14.3931 35.5496 13.8334 36.1092 13.8334 36.7996C13.8334 37.4899 14.3931 38.0496 15.0834 38.0496H31.3334C32.0238 38.0496 32.5834 37.4899 32.5834 36.7996C32.5834 36.1092 32.0238 35.5496 31.3334 35.5496H15.0834Z",fill:n}),y.createElement("path",{d:"M36.8001 13.4163C37.4905 13.4163 38.0501 13.9759 38.0501 14.6663V30.9163C38.0501 31.6066 37.4905 32.1663 36.8001 32.1663C36.1098 32.1663 35.5501 31.6066 35.5501 30.9163V14.6663C35.5501 13.9759 36.1098 13.4163 36.8001 13.4163Z",fill:n}),y.createElement("path",{d:"M10.45 14.6663C10.45 13.9759 9.89038 13.4163 9.20003 13.4163C8.50967 13.4163 7.95003 13.9759 7.95003 14.6663L7.95003 30.9163C7.95003 31.6066 8.50967 32.1663 9.20003 32.1663C9.89038 32.1663 10.45 31.6066 10.45 30.9163L10.45 14.6663Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 0.5C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V3C45.5 1.61929 44.3807 0.5 43 0.5H3ZM43 3H3V43H43V3Z",fill:n}))}),QQ=["color","size"],JQ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,QQ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M44.103 18.4866L24.0002 3.8811L3.89749 18.4866L11.5761 42.1188H36.4244L44.103 18.4866ZM25.8371 1.35293C24.7418 0.557164 23.2587 0.557162 22.1634 1.35292L2.06066 15.9584C0.96539 16.7542 0.507082 18.1647 0.925439 19.4523L8.604 43.0845C9.02236 44.372 10.2222 45.2438 11.5761 45.2438H36.4244C37.7782 45.2438 38.9781 44.372 39.3965 43.0845L47.075 19.4523C47.4934 18.1647 47.0351 16.7542 45.9398 15.9584L25.8371 1.35293Z",fill:n}))}),eJ=["color","size"],tJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,eJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.0078 29.9669H25.835L24.7803 35.9727H27.4609L28.5156 29.9669H32.2363V27.4473H28.9551L29.6875 23.2872H33.3496V20.7383H30.1416L31.2109 14.6446H28.5303L27.4609 20.7383H24.6191L25.6885 14.6446H23.0225L21.9531 20.7383H18.1006V23.2872H21.499L20.7666 27.4473H17.002V29.9669H20.3271L19.2725 35.9727H21.9531L23.0078 29.9669ZM26.2744 27.4473H23.4473L24.165 23.2872H27.0068L26.2744 27.4473Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.5448 0.821208C24.421 0.184598 25.6075 0.184597 26.4837 0.821207L48.4803 16.8026C49.3565 17.4392 49.7231 18.5677 49.3885 19.5977L40.9865 45.4562C40.6518 46.4862 39.692 47.1836 38.6089 47.1836H11.4197C10.3366 47.1836 9.37672 46.4862 9.04204 45.4562L0.640107 19.5977C0.305422 18.5677 0.672067 17.4392 1.54829 16.8026L23.5448 0.821208ZM25.0143 2.84375L47.0108 18.8252L38.6089 44.6836H11.4197L3.01775 18.8252L25.0143 2.84375Z",fill:n}))}),rJ=["color","size"],nJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,rJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 46 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.5 15.0005C45.5 15.7079 45.2003 16.3822 44.6753 16.8562L30.8291 29.3562C29.8042 30.2814 28.2234 30.2006 27.2982 29.1758C26.373 28.1509 26.4537 26.57 27.4786 25.6448L36.5 17.5005L3 17.5005C1.61928 17.5005 0.499999 16.3812 0.499999 15.0005C0.499999 13.6198 1.61929 12.5005 3 12.5005L36.5 12.5005L27.4786 4.35618C26.4537 3.43096 26.373 1.85011 27.2982 0.82525C28.2234 -0.199608 29.8042 -0.280382 30.8291 0.644837L44.6753 13.1448C45.2003 13.6189 45.5 14.2931 45.5 15.0005Z",fill:n}))}),iJ=["color","size"],oJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,iJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 48L26.9931 2H31.2019L23.2087 48H19Z",fill:n}))}),aJ=["color","size"],sJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,aJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M0.214966 17.4813V0.518677H6.61123C8.82693 0.518677 10.5075 0.914783 11.653 1.70699C12.7985 2.49144 13.3712 3.64481 13.3712 5.16709C13.3712 5.99814 13.1413 6.7321 12.6814 7.36898C12.2216 7.99809 11.5819 8.46021 10.7625 8.75535C11.699 8.97282 12.4348 9.41164 12.9699 10.0718C13.5133 10.732 13.7851 11.5397 13.7851 12.4951C13.7851 14.1261 13.2249 15.361 12.1045 16.1998C10.9841 17.0386 9.38713 17.4658 7.31357 17.4813H0.214966ZM3.97748 10.0951V14.6736H7.20069C8.08697 14.6736 8.77677 14.4795 9.27007 14.0911C9.77174 13.695 10.0226 13.1513 10.0226 12.4601C10.0226 10.9067 9.1572 10.1184 7.42644 10.0951H3.97748ZM3.97748 7.62528H6.76173C8.65971 7.59421 9.6087 6.89132 9.6087 5.5166C9.6087 4.74769 9.36623 4.19625 8.88128 3.86228C8.4047 3.52054 7.64801 3.34967 6.61123 3.34967H3.97748V7.62528Z",fill:n}))}),lJ=["color","size"],qI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,lJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M17.5911 1.54582C16.7075 0.680052 15.2937 0.680014 14.4101 1.54573L4.05296 11.6925C3.15635 12.5709 3.14159 14.0098 4.01999 14.9064C4.89839 15.8031 6.33733 15.8178 7.23394 14.9394L13.7278 8.57741V30.4419C13.7278 31.6971 14.7454 32.7147 16.0006 32.7147C17.2558 32.7147 18.2733 31.6971 18.2733 30.4419V8.57782L24.766 14.9393C25.6625 15.8178 27.1015 15.8031 27.9799 14.9065C28.8584 14.01 28.8437 12.571 27.9471 11.6926L17.5911 1.54582Z",fill:n}),y.createElement("path",{d:"M2.78827 36.5543C1.53308 36.5543 0.515541 37.5719 0.515541 38.827C0.515541 40.0822 1.53308 41.0998 2.78827 41.0998H29.1519C30.4071 41.0998 31.4246 40.0822 31.4246 38.827C31.4246 37.5719 30.4071 36.5543 29.1519 36.5543H2.78827Z",fill:n}))}),cJ=["color","size"],QI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,cJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 28 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.907 0.71085C25.7493 -0.292553 23.9445 -0.224769 22.8758 0.862251L0.931376 23.1837C-0.0773525 24.2097 -0.0773525 25.7913 0.931376 26.8173L22.8758 49.1388C23.9445 50.2258 25.7493 50.2936 26.907 49.2902C28.0647 48.2868 28.1369 46.5921 27.0683 45.5051L6.90997 25.0005L27.0683 4.49589C28.1369 3.40888 28.0647 1.71425 26.907 0.71085Z",fill:n}))}),uJ=["color","size"],dJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,uJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 28 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.09286 0.71085C2.25057 -0.292553 4.05541 -0.224769 5.12407 0.862251L27.0685 23.1837C28.0772 24.2097 28.0772 25.7913 27.0685 26.8173L5.12407 49.1388C4.05541 50.2258 2.25057 50.2936 1.09286 49.2902C-0.0648579 48.2868 -0.137051 46.5921 0.93161 45.5051L21.0899 25.0005L0.93161 4.49589C-0.137051 3.40888 -0.0648579 1.71425 1.09286 0.71085Z",fill:n}))}),hJ=["color","size"],fJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,hJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 38 38",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M16.9167 21.0838L16.9167 35.6672C16.9167 36.8177 17.8494 37.7505 19 37.7505C20.1506 37.7505 21.0833 36.8177 21.0833 35.6672L21.0833 21.0838H35.6667C36.8173 21.0838 37.75 20.1511 37.75 19.0005C37.75 17.8499 36.8173 16.9172 35.6667 16.9172L21.0833 16.9172L21.0833 2.33382C21.0833 1.18323 20.1506 0.250488 19 0.250488C17.8494 0.250488 16.9167 1.18323 16.9167 2.33382L16.9167 16.9172H2.33333C1.18274 16.9172 0.25 17.8499 0.25 19.0005C0.25 20.1511 1.18274 21.0838 2.33333 21.0838H16.9167Z",fill:n}))}),pJ=["color","size"],gJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,pJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.04757 38.9503C0.437373 38.3401 0.437373 37.3508 1.04757 36.7406L33.9229 3.86697L23.8354 3.33584C22.9736 3.29047 22.3118 2.5551 22.3572 1.69335C22.4026 0.831601 23.138 0.169794 23.9997 0.215167L37.5909 0.930759C38.3892 0.972794 39.027 1.61063 39.0691 2.40894L39.7846 16.0001C39.83 16.8619 39.1682 17.5972 38.3065 17.6426C37.4447 17.688 36.7093 17.0262 36.664 16.1644L36.1328 6.07651L3.25728 38.9503C2.64708 39.5605 1.65776 39.5605 1.04757 38.9503Z",fill:n}))}),mJ=["color","size"],vJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,mJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.1607 4.16667V2.08333C27.1607 0.93274 26.2279 0 25.0773 0C23.9267 0 22.994 0.932741 22.994 2.08333V4.16667H4.244C1.94281 4.16667 0.0773315 6.03215 0.0773315 8.33333V41.6667C0.0773315 43.9679 1.94281 45.8333 4.244 45.8333H22.994V47.9167C22.994 49.0673 23.9267 50 25.0773 50C26.2279 50 27.1607 49.0673 27.1607 47.9167V45.8333H45.9107C48.2118 45.8333 50.0773 43.9678 50.0773 41.6667V8.33333C50.0773 6.03215 48.2119 4.16667 45.9107 4.16667H27.1607ZM22.994 8.33333H4.244L4.244 41.6667H22.994V8.33333ZM27.1607 41.6667V8.33333H45.9107V41.6667H27.1607Z",fill:n}))}),yJ=["color","size"],CJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,yJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 38 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M35.835 5.0769L2.16498 5.0769C1.00277 5.0769 0.0606079 4.14726 0.0606079 3.00048C0.060608 1.85371 1.00277 0.924072 2.16498 0.924072L35.835 0.924074C36.9972 0.924074 37.9394 1.85372 37.9394 3.00049C37.9394 4.14726 36.9972 5.0769 35.835 5.0769Z",fill:n}))}),wJ=["color","size"],SJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,wJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.48799 3.125H17.0311L17.0311 24.4063C17.0311 26.6148 18.1889 28.4084 19.5429 29.5401C21.7011 31.3438 23.0656 34.0456 23.0656 37.069C23.0656 42.4847 18.6753 46.875 13.2595 46.875C7.84382 46.875 3.45351 42.4847 3.45351 37.069C3.45351 34.0456 4.81799 31.3438 6.97617 29.5401C8.33021 28.4084 9.48799 26.6148 9.48799 24.4063V3.125ZM20.1561 3.125C20.1561 1.39911 18.757 0 17.0311 0H9.48799C7.7621 0 6.36299 1.39911 6.36299 3.125V24.4063C6.36299 25.4785 5.79482 26.4547 4.97216 27.1423C2.13398 29.5143 0.328506 33.0808 0.328506 37.069C0.328506 44.2106 6.11793 50 13.2595 50C20.4012 50 26.1906 44.2106 26.1906 37.069C26.1906 33.0808 24.3851 29.5143 21.5469 27.1423C20.7243 26.4547 20.1561 25.4785 20.1561 24.4063V3.125ZM35.6715 1.25C35.6715 0.559645 35.1119 0 34.4215 0H28.1715C27.4812 0 26.9215 0.559644 26.9215 1.25C26.9215 1.94036 27.4812 2.5 28.1715 2.5L34.4215 2.5C35.1119 2.5 35.6715 1.94036 35.6715 1.25ZM35.6715 8.24951C35.6715 7.55916 35.1119 6.99951 34.4215 6.99951H28.1715C27.4812 6.99951 26.9215 7.55916 26.9215 8.24951C26.9215 8.93987 27.4812 9.49951 28.1715 9.49951H34.4215C35.1119 9.49951 35.6715 8.93987 35.6715 8.24951ZM34.4215 13.999C35.1119 13.999 35.6715 14.5587 35.6715 15.249C35.6715 15.9394 35.1119 16.499 34.4215 16.499H28.1715C27.4812 16.499 26.9215 15.9394 26.9215 15.249C26.9215 14.5587 27.4812 13.999 28.1715 13.999H34.4215ZM13.2594 43.7501C16.366 43.7501 18.8844 41.2317 18.8844 38.1251C18.8844 35.4037 16.9519 33.1337 14.3844 32.6126V10.3662C14.3844 9.67582 13.8247 9.11617 13.1344 9.11617C12.444 9.11617 11.8844 9.67582 11.8844 10.3662V32.6694C9.44245 33.2829 7.63441 35.4928 7.63441 38.1251C7.63441 41.2317 10.1528 43.7501 13.2594 43.7501Z",fill:n}))}),bJ=["color","size"],_J=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,bJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.4376 40.6858V38.5625V4.18746V3.31418C10.8133 4.10816 3.25006 12.1708 3.25006 22C3.25006 31.8292 10.8133 39.8918 20.4376 40.6858ZM40.7501 22C40.7501 31.8292 33.1868 39.8918 23.5626 40.6858V38.5625V4.18746V3.31418C33.1868 4.10816 40.7501 12.1708 40.7501 22ZM43.8751 22C43.8751 34.0812 34.0813 43.875 22.0001 43.875C9.91883 43.875 0.125061 34.0812 0.125061 22C0.125061 9.91877 9.91883 0.125 22.0001 0.125C34.0813 0.125 43.8751 9.91877 43.8751 22Z",fill:n}))}),xJ=["color","size"],EJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,xJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.3679 7.50003C15.7995 10.005 13.5592 11.875 10.8823 11.875C8.20528 11.875 5.96506 10.005 5.39665 7.50003H1.5448C0.854444 7.50003 0.2948 6.94039 0.2948 6.25003C0.2948 5.55967 0.854444 5.00003 1.5448 5.00003H5.39665C5.96506 2.49504 8.20528 0.625031 10.8823 0.625031C13.5592 0.625031 15.7995 2.49504 16.3679 5.00003H48.4557C49.1461 5.00003 49.7057 5.55967 49.7057 6.25003C49.7057 6.94039 49.1461 7.50003 48.4557 7.50003H16.3679ZM14.0073 6.25003C14.0073 7.97592 12.6082 9.37503 10.8823 9.37503C9.15637 9.37503 7.75726 7.97592 7.75726 6.25003C7.75726 4.52414 9.15637 3.12503 10.8823 3.12503C12.6082 3.12503 14.0073 4.52414 14.0073 6.25003Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M34.5715 27.625C37.2485 27.625 39.4887 25.755 40.0571 23.25H48.4554C49.1458 23.25 49.7054 22.6904 49.7054 22C49.7054 21.3096 49.1458 20.75 48.4554 20.75H40.0571C39.4887 18.245 37.2485 16.375 34.5715 16.375C31.8946 16.375 29.6543 18.245 29.0859 20.75H1.5448C0.854444 20.75 0.2948 21.3096 0.2948 22C0.2948 22.6904 0.854444 23.25 1.5448 23.25H29.0859C29.6543 25.755 31.8946 27.625 34.5715 27.625ZM34.5715 25.125C36.2974 25.125 37.6965 23.7259 37.6965 22C37.6965 20.2741 36.2974 18.875 34.5715 18.875C32.8456 18.875 31.4465 20.2741 31.4465 22C31.4465 23.7259 32.8456 25.125 34.5715 25.125Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.7702 39C22.2018 41.505 19.9615 43.375 17.2845 43.375C14.6076 43.375 12.3673 41.505 11.7989 39H1.5448C0.854444 39 0.2948 38.4403 0.2948 37.75C0.2948 37.0596 0.854444 36.5 1.5448 36.5H11.7989C12.3673 33.995 14.6076 32.125 17.2845 32.125C19.9615 32.125 22.2018 33.995 22.7702 36.5H48.4554C49.1458 36.5 49.7054 37.0596 49.7054 37.75C49.7054 38.4403 49.1458 39 48.4554 39H22.7702ZM20.4095 37.75C20.4095 39.4759 19.0104 40.875 17.2845 40.875C15.5587 40.875 14.1595 39.4759 14.1595 37.75C14.1595 36.0241 15.5587 34.625 17.2845 34.625C19.0104 34.625 20.4095 36.0241 20.4095 37.75Z",fill:n}))}),OJ=["color","size"],PJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,OJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M37.2341 37.6984H37.5121V37.4237C41.4447 33.4687 43.875 28.0182 43.875 22C43.875 15.9819 41.4447 10.5314 37.5121 6.57632V6.30045H37.2328C33.2942 2.47819 27.9219 0.125031 22 0.125031C9.91877 0.125031 0.125 9.9188 0.125 22C0.125 34.0813 9.91877 43.875 22 43.875C24.718 43.875 27.3203 43.3793 29.7213 42.4733H30.5303V42.1494C33.0389 41.0861 35.308 39.5679 37.2341 37.6984ZM20.4257 3.31519C10.807 4.1148 3.25 12.1749 3.25 22C3.25 31.8252 10.807 39.8853 20.4257 40.6849V3.31519ZM34.3871 36.0759C33.221 37.1029 31.9263 37.9873 30.5303 38.7017V5.29836C31.9263 6.01281 33.221 6.89715 34.3871 7.92411V36.0759ZM37.5121 11.4641C39.5556 14.4669 40.75 18.094 40.75 22C40.75 25.9061 39.5556 29.5332 37.5121 32.536V11.4641ZM23.5507 40.6868C24.8796 40.578 26.1693 40.3307 27.4053 39.9592V4.04089C26.1693 3.66941 24.8796 3.42203 23.5507 3.31324V40.6868Z",fill:n}))}),kJ=["color","size"],TJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,kJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M46.1442 31.379C45.4585 31.379 44.8974 31.9429 44.8974 32.6321V43.7349C44.8974 45.8025 43.2267 47.4817 41.157 47.4943H6.22156C4.16433 47.4943 2.49361 45.8151 2.48114 43.7349V11.1283C2.48114 9.06067 4.15186 7.38147 6.22156 7.36894H17.2807C17.9665 7.36894 18.5275 6.80503 18.5275 6.1158C18.5275 5.42658 17.9665 4.86267 17.2807 4.86267H6.22156C2.79284 4.8752 0 7.66969 0 11.1283V43.7349C0 47.1935 2.79284 50.0005 6.22156 50.0005H41.157C44.5982 50.0005 47.3786 47.1935 47.3786 43.7474V32.6321C47.391 31.9429 46.83 31.379 46.1442 31.379Z",fill:n}),y.createElement("path",{d:"M46.8923 1.65462C44.698 -0.55089 41.157 -0.55089 38.9627 1.65462L16.7571 23.9729C16.6075 24.1233 16.4953 24.3113 16.4329 24.5243L13.5154 35.1258C13.3907 35.5644 13.5154 36.0281 13.8396 36.3413C14.1513 36.6546 14.6251 36.7799 15.049 36.6672L25.5969 33.7348C25.8089 33.6722 25.9959 33.5719 26.1455 33.409L48.3636 11.0782C50.5455 8.87267 50.5455 5.31377 48.3636 3.10826L46.8923 1.65462ZM19.4751 24.7875L37.6535 6.51678L43.5135 12.4065L25.3351 30.6897L19.4751 24.7875ZM18.3031 27.1559L22.9911 31.8677L16.5077 33.6722L18.3031 27.1559ZM46.5931 9.31127L45.2715 10.6396L39.4115 4.74986L40.7331 3.42154C41.9425 2.206 43.9249 2.206 45.1343 3.42154L46.5931 4.88771C47.815 6.11578 47.815 8.09573 46.5931 9.31127Z",fill:n}))}),IJ=["color","size"],AJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,IJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M18.3626 41.293C17.5103 41.4285 16.7096 40.8474 16.5742 39.9952C16.4387 39.143 17.0198 38.3423 17.872 38.2068C18.2902 38.1403 18.6988 38.0456 19.0958 37.9246C21.9368 37.059 24.1957 34.8468 25.1254 32.0335C25.2671 31.6049 25.378 31.1621 25.4555 30.7076C25.6005 29.857 26.4076 29.2849 27.2583 29.4299C28.109 29.5749 28.681 30.3821 28.536 31.2327C28.432 31.8429 28.283 32.4379 28.0926 33.0142C26.8449 36.7893 23.8206 39.7519 20.0065 40.914C19.4728 41.0766 18.9239 41.2038 18.3626 41.293Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M33.9356 31.0645C33.9356 23.9644 24.1764 8.59028 19.4747 1.59549C18.2785 -0.184172 15.7216 -0.184172 14.5254 1.59548C9.82374 8.59028 0.0645752 23.9644 0.0645752 31.0645C0.0645752 40.4177 7.64685 48 17.0001 48C26.3533 48 33.9356 40.4177 33.9356 31.0645ZM30.8106 31.0645C30.8106 29.8836 30.375 28.0316 29.4236 25.578C28.5 23.1959 27.1988 20.5159 25.7187 17.7756C22.8106 12.3913 19.3287 6.98743 17.0001 3.51586C14.6715 6.98743 11.1895 12.3913 8.28145 17.7756C6.80135 20.5159 5.50017 23.1959 4.57655 25.578C3.62517 28.0316 3.18958 29.8836 3.18958 31.0645C3.18958 38.6918 9.37274 44.875 17.0001 44.875C24.6274 44.875 30.8106 38.6918 30.8106 31.0645Z",fill:n}))}),LJ=["color","size"],MJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,LJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M43.0081 15.2287L36.7869 17.6214L28.935 29.9601C30.5809 33.9266 30.3662 38.0903 27.1408 41.3158L26.5656 41.8909C25.9554 42.5011 24.9661 42.5011 24.3559 41.8909L14.4122 31.9472L2.99211 43.3673C2.38192 43.9775 1.3926 43.9775 0.782403 43.3673C0.17221 42.7571 0.172211 41.7678 0.782403 41.1576L12.2025 29.7375L2.25883 19.7938C1.64864 19.1836 1.64864 18.1943 2.25883 17.5841L2.50512 17.3378C5.73058 14.1123 10.2231 13.5688 14.1897 15.2147L26.5283 7.36283L28.9211 1.14165C29.327 0.0863053 30.6847 -0.201832 31.4843 0.597706L43.552 12.6655C44.3516 13.465 44.0634 14.8228 43.0081 15.2287ZM29.0752 9.44618L30.9747 4.50752L39.6422 13.1751L34.7035 15.0745L25.4251 29.655L26.0486 31.1577C27.234 34.0146 27.0773 36.5309 25.4342 38.5498L5.64209 18.7576C7.75439 17.2384 10.4304 17.0382 12.992 18.1011L14.4948 18.7246L29.0752 9.44618Z",fill:n}))}),RJ=["color","size"],NJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,RJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.312012 34.847V3.39883C0.312012 1.67294 1.71112 0.273834 3.43701 0.273834H26.807C28.5329 0.273834 29.932 1.67294 29.932 3.39883V34.847C29.932 36.5729 28.5329 37.972 26.807 37.972H3.43701C1.71112 37.972 0.312012 36.5729 0.312012 34.847ZM3.43701 34.847V3.39883L26.807 3.39883L26.807 34.847L3.43701 34.847Z",fill:n}),y.createElement("path",{d:"M35.6874 12.5434C35.6874 11.6805 34.9878 10.9809 34.1249 10.9809C33.2619 10.9809 32.5624 11.6805 32.5624 12.5434V40.6009H9.89033C9.02739 40.6009 8.32783 41.3005 8.32783 42.1634C8.32783 43.0263 9.02739 43.7259 9.89033 43.7259H34.1249C34.9878 43.7259 35.6874 43.0263 35.6874 42.1634V12.5434Z",fill:n}))}),FJ=["color","size"],JI=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,FJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M15.75 17.3125C15.75 16.4496 16.4496 15.75 17.3125 15.75C18.1754 15.75 18.875 16.4496 18.875 17.3125L18.875 32.9375C18.875 33.8005 18.1754 34.5 17.3125 34.5C16.4496 34.5 15.75 33.8005 15.75 32.9375L15.75 17.3125Z",fill:n}),y.createElement("path",{d:"M26.6875 15.75C25.8246 15.75 25.125 16.4496 25.125 17.3125L25.125 32.9375C25.125 33.8005 25.8246 34.5 26.6875 34.5C27.5504 34.5 28.25 33.8005 28.25 32.9375V17.3125C28.25 16.4496 27.5504 15.75 26.6875 15.75Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.625 6.37503V3.25003C12.625 1.52414 14.0241 0.125031 15.75 0.125031H28.25C29.9759 0.125031 31.375 1.52414 31.375 3.25003V6.37503H42.3125C43.1754 6.37503 43.875 7.07459 43.875 7.93753C43.875 8.80048 43.1754 9.50003 42.3125 9.50003H39.1875V40.75C39.1875 42.4759 37.7884 43.875 36.0625 43.875H7.9375C6.21161 43.875 4.8125 42.4759 4.8125 40.75V9.50003L1.6875 9.50003C0.824554 9.50003 0.125 8.80048 0.125 7.93753C0.125 7.07459 0.824555 6.37503 1.6875 6.37503H12.625ZM15.75 3.25003H28.25V6.37503H15.75V3.25003ZM7.9375 9.50003L7.9375 40.75H36.0625V9.50003H7.9375Z",fill:n}))}),DJ=["color","size"],jJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,DJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M43 3H31.75V0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V14.25H43V3Z",fill:n}),y.createElement("path",{d:"M3 14.25V3H14.25V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V14.25H3Z",fill:n}),y.createElement("path",{d:"M0.5 31.75V43C0.5 44.3807 1.61929 45.5 3 45.5H14.25V43H3V31.75H0.5Z",fill:n}),y.createElement("path",{d:"M43 31.75H45.5V43C45.5 44.3807 44.3807 45.5 43 45.5H31.75V43H43V31.75Z",fill:n}))}),zJ=["color","size"],$J=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,zJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 36 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.0559 46.8755L32.0559 3.12555L3.93091 3.12555L3.93091 46.8755H32.0559ZM35.1809 3.12555C35.1809 1.39966 33.7818 0.000549316 32.0559 0.000549316H3.93091C2.20502 0.000549316 0.805908 1.39966 0.805908 3.12555V46.8755C0.805908 48.6014 2.20502 50.0005 3.93091 50.0005H32.0559C33.7818 50.0005 35.1809 48.6014 35.1809 46.8755L35.1809 3.12555Z",fill:n}))}),BJ=["color","size"],HJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,BJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.961 39.0119L28.2837 7.27185C27.5934 6.17538 26.3971 5.5 24.9981 5.5C23.5956 5.5 22.3967 6.17887 21.7073 7.28034L4.06571 38.9613L4.03009 39.0197C3.33595 40.159 3.32316 41.4697 3.9939 42.6216C4.67405 43.786 5.89 44.5 7.34459 44.5H42.554C44.0596 44.5 45.3464 43.7436 46.0016 42.6231C46.6817 41.4564 46.652 40.1455 45.9968 39.0706L45.961 39.0119ZM49.0254 44.3856C47.7038 46.6495 45.2246 48 42.554 48H7.34459C4.67398 48 2.29272 46.6495 0.970942 44.3856C-0.347811 42.1231 -0.322029 39.4361 1.04116 37.1987L18.6646 5.55018C18.6697 5.5418 18.6743 5.53342 18.6789 5.52504C18.6836 5.51666 18.6882 5.50828 18.6932 5.49989C20.0278 3.30867 22.3849 2 24.9981 2C27.6114 2 29.9685 3.30867 31.303 5.49989L48.9853 37.2489C50.3185 39.436 50.3442 42.1232 49.0254 44.3856Z",fill:n}),y.createElement("path",{d:"M22.0001 16C22.0001 14.3431 23.3433 13 25.0001 13C26.657 13 28.0001 14.3431 28.0001 16V28C28.0001 29.6569 26.657 31 25.0001 31C23.3433 31 22.0001 29.6569 22.0001 28V16Z",fill:n}),y.createElement("path",{d:"M28.0001 37C28.0001 38.6569 26.657 40 25.0001 40C23.3433 40 22.0001 38.6569 22.0001 37C22.0001 35.3431 23.3433 34 25.0001 34C26.657 34 28.0001 35.3431 28.0001 37Z",fill:n}))}),GJ=["color","size"],VJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,GJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5 10.5001C20.5 16.023 16.0228 20.5001 10.5 20.5001C4.97714 20.5001 0.5 16.023 0.5 10.5001C0.5 4.97727 4.97714 0.500122 10.5 0.500122C16.0228 0.500122 20.5 4.97727 20.5 10.5001ZM7.88239 9.56904C8.00439 9.62145 8.11473 9.69763 8.20698 9.79314L9.49998 11.0861L12.793 7.79314C12.8852 7.69763 12.9956 7.62145 13.1176 7.56904C13.2396 7.51663 13.3708 7.48905 13.5036 7.48789C13.6363 7.48674 13.768 7.51204 13.8909 7.56232C14.0138 7.6126 14.1255 7.68686 14.2194 7.78075C14.3133 7.87464 14.3875 7.98629 14.4378 8.10919C14.4881 8.23208 14.5134 8.36376 14.5122 8.49654C14.5111 8.62932 14.4835 8.76054 14.4311 8.88255C14.3787 9.00455 14.3025 9.1149 14.207 9.20714L10.207 13.2071C10.0194 13.3946 9.76514 13.4999 9.49998 13.4999C9.23482 13.4999 8.98051 13.3946 8.79298 13.2071L6.79298 11.2071C6.69747 11.1149 6.62129 11.0046 6.56888 10.8825C6.51647 10.7605 6.48889 10.6293 6.48773 10.4965C6.48658 10.3638 6.51188 10.2321 6.56216 10.1092C6.61244 9.98629 6.6867 9.87464 6.78059 9.78075C6.87448 9.68686 6.98613 9.6126 7.10903 9.56232C7.23193 9.51204 7.3636 9.48674 7.49638 9.48789C7.62916 9.48905 7.76038 9.51663 7.88239 9.56904Z",fill:n}))}),UJ=["color","size"],WJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,UJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5 20.5001C16.0228 20.5001 20.5 16.023 20.5 10.5001C20.5 4.97727 16.0228 0.500122 10.5 0.500122C4.97715 0.500122 0.5 4.97727 0.5 10.5001C0.5 16.023 4.97715 20.5001 10.5 20.5001ZM15.4375 7.0912L11.8155 10.7132L15.4638 14.309C15.6213 14.4665 15.7 14.6503 15.7 14.8865C15.7 15.1227 15.6213 15.3064 15.4638 15.4639C15.3063 15.6214 15.1226 15.7001 14.8864 15.7001C14.6501 15.7001 14.4664 15.6214 14.3089 15.4639L10.6869 11.8419L7.06483 15.4639C6.77612 15.7789 6.25118 15.7789 5.93622 15.4639C5.77874 15.3064 5.7 15.0964 5.7 14.8865C5.7 14.6765 5.77874 14.4928 5.93622 14.3353L9.55827 10.7132L5.93622 7.0912C5.77874 6.93372 5.7 6.72374 5.7 6.51377C5.7 6.3038 5.77874 6.12007 5.93622 5.96259C6.25118 5.64763 6.74987 5.64763 7.06483 5.96259L10.6869 9.58464L14.3089 5.93634C14.5976 5.62138 15.1226 5.62138 15.4375 5.93634C15.595 6.09382 15.6738 6.27755 15.6738 6.51377C15.6738 6.74999 15.595 6.93372 15.4375 7.0912Z",fill:n}))}),XJ=["color","size"],KJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,XJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 52 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M37.3438 16.4782L28.2887 25.5333L37.4095 34.5228C37.8032 34.9165 38 35.3758 38 35.9664C38 36.5569 37.8032 37.0162 37.4095 37.4099C37.0158 37.8036 36.5564 38.0005 35.9659 38.0005C35.3753 38.0005 34.916 37.8036 34.5223 37.4099L25.4672 28.3548L16.4121 37.4099C15.6903 38.1973 14.378 38.1973 13.5906 37.4099C13.1969 37.0162 13 36.4913 13 35.9664C13 35.4414 13.1969 34.9821 13.5906 34.5884L22.6457 25.5333L13.5906 16.4782C13.1969 16.0845 13 15.5595 13 15.0346C13 14.5097 13.1969 14.0504 13.5906 13.6567C14.378 12.8693 15.6247 12.8693 16.4121 13.6567L25.4672 22.7118L34.5223 13.591C35.2441 12.8036 36.5564 12.8036 37.3438 13.591C37.7375 13.9847 37.9344 14.4441 37.9344 15.0346C37.9344 15.6252 37.7375 16.0845 37.3438 16.4782Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M-0.000488281 25.0005C-0.000488281 38.7972 11.2028 50.0005 24.9995 50.0005C38.6925 50.0005 49.9995 38.7972 49.9995 25.0005C49.9995 11.2038 38.7962 0.000488281 24.9995 0.000488281C11.2028 0.000488281 -0.000488281 11.2038 -0.000488281 25.0005ZM3.63022 24.8968C3.63022 13.1748 13.1738 3.52746 24.9995 3.52746C36.8252 3.52746 46.3688 13.1748 46.3688 24.8968C46.3688 36.6187 36.8252 46.266 24.9995 46.266C13.2775 46.266 3.63022 36.6187 3.63022 24.8968Z",fill:n}))}),YJ=["color","size"],ZJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,YJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M29.9338 5.26853C27.8524 4.75154 25.7006 4.56814 23.5381 4.72351C22.4874 4.799 21.4379 4.95535 20.4183 5.18855L19.3724 0.636496C20.6245 0.350265 21.9128 0.158175 23.2017 0.065597C25.8579 -0.125223 28.5034 0.100753 31.0653 0.737277L29.9338 5.26853Z",fill:n}),y.createElement("path",{opacity:"0.9",d:"M40.6131 11.9278C38.5498 9.48098 35.9044 7.52805 32.963 6.2805L34.7952 1.98303C38.4106 3.51633 41.6615 5.91575 44.1962 8.922L40.6131 11.9278Z",fill:n}),y.createElement("path",{opacity:"0.8",d:"M45.3329 23.5739L45.3303 23.5392C45.097 20.3085 44.1359 17.275 42.4734 14.5227L46.4838 12.1129C48.5302 15.501 49.7133 19.2325 50 23.2036L45.3329 23.5739Z",fill:n}),y.createElement("path",{opacity:"0.7",d:"M46.2688 38.2308L42.2981 35.7565C43.9958 33.0458 45.0372 29.9357 45.3095 26.7618L49.9744 27.1604C49.639 31.0674 48.3577 34.8958 46.2688 38.2308Z",fill:n}),y.createElement("path",{opacity:"0.6",d:"M34.4209 48.1735L32.6626 43.8456C35.6192 42.6505 38.2938 40.7405 40.3975 38.3222L43.9338 41.3828C41.3483 44.3551 38.0588 46.7033 34.4209 48.1735V48.1735Z",fill:n}),y.createElement("path",{opacity:"0.5",d:"M26.8033 49.9345C24.1593 50.1242 21.5262 49.9011 18.9766 49.2716L20.1013 44.7386C22.1729 45.25 24.3148 45.4309 26.4673 45.2766C27.5283 45.2004 28.5879 45.0416 29.6165 44.8049L30.6697 49.3551C29.4061 49.6459 28.1052 49.841 26.8033 49.9345V49.9345Z",fill:n}),y.createElement("path",{opacity:"0.4",d:"M15.2449 48.0311C11.6272 46.5033 8.37276 44.1086 5.83362 41.1063L9.412 38.0952C11.479 40.5388 14.1272 42.4877 17.0704 43.7306L15.2449 48.0311Z",fill:n}),y.createElement("path",{opacity:"0.3",d:"M3.54069 37.9198C1.48217 34.5223 0.292537 30.78 0.00479729 26.7959L0 26.7274L4.66972 26.3918L4.67579 26.478C4.90861 29.7017 5.87511 32.7443 7.54751 35.504L3.54069 37.9198Z",fill:n}),y.createElement("path",{opacity:"0.2",d:"M4.69761 23.2075L0.0335693 22.802C0.374666 18.8955 1.66191 15.0691 3.75587 11.7373L7.72274 14.2175C6.02088 16.9257 4.97478 20.0344 4.69761 23.2075V23.2075Z",fill:n}))}),qJ=["color","color2","size"],QJ=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r;t.color2;var i=t.size,o=i===void 0?14:i,a=ve(t,qJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M42.0001 6.11477C42.0001 4.48089 41.3639 2.94468 40.2086 1.78931C37.8238 -0.595528 33.9433 -0.595878 31.5582 1.78931L25.666 7.68191L22.9908 5.00654C22.5351 4.5509 21.7965 4.5509 21.3407 5.00654L17.8405 8.50695C17.3849 8.96259 17.3849 9.70141 17.8405 10.1572L20.5157 12.8325L3.63971 29.7097C3.5116 29.8378 3.41511 29.9939 3.35783 30.1658L2.27826 33.4048L1.30626 34.3769C-0.435198 36.1186 -0.435314 38.9525 1.30626 40.6943C3.04783 42.436 5.88157 42.4359 7.62314 40.6943L8.59514 39.7223L11.834 38.6426C12.0058 38.5853 12.1619 38.4888 12.29 38.3607L29.1661 21.4835L31.8413 24.1588C32.297 24.6145 33.0357 24.6145 33.4914 24.1588L36.9916 20.6584C37.4472 20.2028 37.4472 19.464 36.9916 19.0082L34.3164 16.3328L40.2086 10.4402C41.3639 9.28486 42.0001 7.74876 42.0001 6.11477ZM20.5157 26.8341H9.81507L22.1658 14.4826L27.516 19.8333L20.5157 26.8341ZM32.6663 21.6836L20.3156 9.332L22.1657 7.48168L34.5163 19.8333L32.6663 21.6836ZM38.5585 8.79014L32.6663 14.6827L27.316 9.332L33.2081 3.4394C34.6833 1.96421 37.0835 1.96409 38.5584 3.4394C40.0263 4.84774 40.0261 7.3818 38.5585 8.79014Z",fill:n}))}),JJ=["color","size"],eA=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,JJ);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 7.75049C0 6.92206 0.671573 6.25049 1.5 6.25049H48.5C49.3284 6.25049 50 6.92206 50 7.75049V9.43806C50 10.2665 49.3284 10.9381 48.5 10.9381H1.5C0.671571 10.9381 0 10.2665 0 9.43806V7.75049ZM0 24.1567C0 23.3283 0.671573 22.6567 1.5 22.6567H48.5C49.3284 22.6567 50 23.3283 50 24.1567V25.8443C50 26.6727 49.3284 27.3443 48.5 27.3443H1.5C0.671571 27.3443 0 26.6727 0 25.8443V24.1567ZM1.5 39.0629C0.671573 39.0629 0 39.7345 0 40.5629V42.2505C0 43.0789 0.671571 43.7505 1.5 43.7505H48.5C49.3284 43.7505 50 43.0789 50 42.2505V40.5629C50 39.7345 49.3284 39.0629 48.5 39.0629H1.5Z",fill:n}))}),eee=["color","size"],tee=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,eee);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 46 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.23229 1.23267C2.20863 0.256387 3.79154 0.256434 4.76782 1.23277L22.9989 19.465L41.2323 1.23267C42.2086 0.256387 43.7915 0.256434 44.7678 1.23277C45.7441 2.20911 45.7441 3.79203 44.7677 4.76831L24.7665 24.7683C24.2977 25.2371 23.6618 25.5005 22.9987 25.5005C22.3357 25.5005 21.6998 25.2371 21.231 24.7682L1.23218 4.7682C0.255899 3.79186 0.255946 2.20895 1.23229 1.23267Z",fill:n}))}),ree=["color","size"],nee=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,ree);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 46 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2326 1.23271C22.2089 0.256404 23.7918 0.256417 24.7681 1.23274L44.7678 21.2327C45.7441 22.2091 45.7441 23.792 44.7678 24.7683C43.7914 25.7446 42.2085 25.7446 41.2322 24.7682L23.0003 6.53602L4.76775 24.7683C3.79143 25.7446 2.20852 25.7446 1.23222 24.7682C0.255916 23.7919 0.255928 22.209 1.23225 21.2327L21.2326 1.23271Z",fill:n}))}),iee=["color","size"],oee=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,iee);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 47.5006C37.4264 47.5006 47.5 37.427 47.5 25.0006C47.5 12.5742 37.4264 2.50061 25 2.50061C12.5736 2.50061 2.5 12.5742 2.5 25.0006C2.5 37.427 12.5736 47.5006 25 47.5006ZM25 50.0006C38.8071 50.0006 50 38.8077 50 25.0006C50 11.1935 38.8071 0.000610352 25 0.000610352C11.1929 0.000610352 0 11.1935 0 25.0006C0 38.8077 11.1929 50.0006 25 50.0006Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M27.7355 35.1357C27.1751 35.7705 26.2217 35.7926 25.6359 35.1773L17.3026 26.423C17.0301 26.1368 16.8819 25.755 16.8752 25.3647C16.8686 24.9745 17.0037 24.5881 17.2652 24.2923L25.5985 14.8647C26.1593 14.2302 27.1128 14.2089 27.6981 14.8247C28.2539 15.4093 28.2679 16.3516 27.7348 16.9546L20.36 25.2978L27.6974 33.0057C28.2536 33.59 28.2681 34.5323 27.7355 35.1357ZM26.6695 34.3756C26.7058 34.3748 26.753 34.3599 26.7984 34.3085C26.9042 34.1886 26.8989 33.9798 26.792 33.8676L19.0594 25.7444C18.8357 25.5095 18.829 25.1425 19.0438 24.8995L26.7983 16.1268C26.9041 16.007 26.899 15.7983 26.7921 15.6859C26.7464 15.6377 26.7001 15.6249 26.6639 15.6256C26.6276 15.6263 26.5805 15.6412 26.5351 15.6926L18.2017 25.1202C18.1562 25.1717 18.1235 25.2514 18.1251 25.3435C18.1266 25.4356 18.1619 25.5128 18.208 25.5612L26.5413 34.3154C26.5871 34.3635 26.6334 34.3763 26.6695 34.3756Z",fill:n}),y.createElement("path",{d:"M26.7984 34.3085C26.753 34.3599 26.7058 34.3748 26.6695 34.3756C26.6334 34.3763 26.5871 34.3635 26.5413 34.3154L18.208 25.5612C18.1619 25.5128 18.1266 25.4356 18.1251 25.3435C18.1235 25.2514 18.1562 25.1717 18.2017 25.1202L26.5351 15.6926C26.5805 15.6412 26.6276 15.6263 26.6639 15.6256C26.7001 15.6249 26.7464 15.6377 26.7921 15.6859C26.899 15.7983 26.9041 16.007 26.7983 16.1268L19.0438 24.8995C18.829 25.1425 18.8357 25.5095 19.0594 25.7444L26.792 33.8676C26.8989 33.9798 26.9042 34.1886 26.7984 34.3085Z",fill:n}))}),aee=["color","size"],see=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,aee);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 47.5006C37.4264 47.5006 47.5 37.427 47.5 25.0006C47.5 12.5742 37.4264 2.50061 25 2.50061C12.5736 2.50061 2.5 12.5742 2.5 25.0006C2.5 37.427 12.5736 47.5006 25 47.5006ZM25 50.0006C38.8071 50.0006 50 38.8077 50 25.0006C50 11.1935 38.8071 0.000610352 25 0.000610352C11.1929 0.000610352 0 11.1935 0 25.0006C0 38.8077 11.1929 50.0006 25 50.0006Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.2645 14.8655C22.8249 14.2307 23.7783 14.2086 24.3641 14.8239L32.6974 23.5781C32.9699 23.8644 33.1181 24.2461 33.1248 24.6364C33.1314 25.0267 32.9963 25.4131 32.7348 25.7089L24.4015 35.1365C23.8406 35.7709 22.8872 35.7923 22.3019 35.1765C21.7461 34.5919 21.7321 33.6496 22.2652 33.0465L29.6399 24.7034L22.3026 16.9954C21.7464 16.4112 21.7319 15.4689 22.2645 14.8655ZM23.3305 15.6256C23.2942 15.6264 23.247 15.6413 23.2016 15.6927C23.0958 15.8126 23.1011 16.0214 23.208 16.1336L30.9406 24.2568C31.1643 24.4917 31.171 24.8586 30.9562 25.1016L23.2017 33.8744C23.0959 33.9942 23.101 34.2029 23.2079 34.3153C23.2536 34.3634 23.2999 34.3763 23.3361 34.3756C23.3724 34.3748 23.4195 34.36 23.4649 34.3086L31.7983 24.881C31.8438 24.8295 31.8765 24.7497 31.8749 24.6577C31.8734 24.5656 31.838 24.4883 31.792 24.44L23.4587 15.6858C23.4129 15.6377 23.3666 15.6249 23.3305 15.6256Z",fill:n}),y.createElement("path",{d:"M23.2016 15.6927C23.247 15.6413 23.2942 15.6264 23.3305 15.6256C23.3666 15.6249 23.4129 15.6377 23.4587 15.6858L31.792 24.44C31.838 24.4883 31.8734 24.5656 31.8749 24.6577C31.8765 24.7497 31.8438 24.8295 31.7983 24.881L23.4649 34.3086C23.4195 34.36 23.3724 34.3748 23.3361 34.3756C23.2999 34.3763 23.2536 34.3634 23.2079 34.3153C23.101 34.2029 23.0959 33.9942 23.2017 33.8744L30.9562 25.1016C31.171 24.8586 31.1643 24.4917 30.9406 24.2568L23.208 16.1336C23.1011 16.0214 23.0958 15.8126 23.2016 15.6927Z",fill:n}))}),lee=["color","size"],cee=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,lee);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M48.5577 38.9423H34.8557C31.8069 38.9423 29.327 41.4224 29.327 44.4712C29.327 45.9293 28.1406 47.1157 26.6827 47.1157H5.52902C4.07066 47.1157 2.88467 45.9293 2.88467 44.4712V42.5459C2.88467 41.0886 4.07028 39.9025 5.5275 39.9018L9.33952 39.8999C9.34067 39.8999 9.34219 39.8995 9.34334 39.8995C9.38683 39.8995 9.43031 39.8968 9.47418 39.893C9.49211 39.8915 9.50966 39.8884 9.52759 39.8861C9.54628 39.8835 9.56535 39.8819 9.58405 39.8789L19.7636 38.1229C19.7689 38.1217 19.7739 38.1206 19.7788 38.1195C19.7948 38.1164 19.8105 38.113 19.8261 38.1095C19.8517 38.1038 19.8769 38.0981 19.9017 38.0908C19.9192 38.0863 19.9368 38.0809 19.9543 38.0756C19.9776 38.068 20.0008 38.0599 20.0241 38.0512C20.0409 38.0447 20.0581 38.039 20.0748 38.0321C20.1107 38.0168 20.1458 38.0008 20.1805 37.9829C20.1942 37.9756 20.208 37.9672 20.2217 37.9596C20.2461 37.9459 20.2702 37.9321 20.2938 37.9169C20.3083 37.9077 20.3228 37.8978 20.3373 37.8879C20.3602 37.8719 20.3831 37.8551 20.4052 37.8375C20.417 37.8284 20.4292 37.8192 20.4411 37.8093C20.4746 37.7815 20.5074 37.7525 20.5383 37.7212L46.2479 12.0109C48.3097 9.94895 48.3097 6.59377 46.2479 4.53146L43.2632 1.54708C41.2014 -0.515234 37.846 -0.514853 35.7841 1.54708L10.075 27.2574C10.0437 27.2883 10.0147 27.3215 9.9865 27.355C9.97696 27.3665 9.9678 27.3783 9.95865 27.3901C9.9411 27.4127 9.92432 27.4355 9.90829 27.4588C9.89838 27.4729 9.88846 27.4874 9.8793 27.5019C9.86443 27.5252 9.85069 27.5488 9.83734 27.5729C9.82857 27.5885 9.81941 27.6042 9.81102 27.6198C9.79424 27.653 9.77898 27.6862 9.76448 27.7205C9.75723 27.7377 9.75113 27.7556 9.74426 27.7732C9.73625 27.7953 9.72824 27.8178 9.72099 27.8403C9.71527 27.8586 9.70993 27.8769 9.70497 27.8952C9.69849 27.9189 9.69276 27.9429 9.68742 27.9673C9.68361 27.9841 9.67979 28.0009 9.67674 28.0177C9.6756 28.0226 9.67445 28.0272 9.67369 28.0318L8.12378 37.0158L5.52597 37.017C2.47879 37.0185 0 39.4989 0 42.5459V44.4712C0 47.5201 2.48032 50.0005 5.52902 50.0005H26.6827C29.7314 50.0005 32.2117 47.5201 32.2117 44.4712C32.2117 43.0132 33.3977 41.8267 34.8557 41.8267H48.5577C49.3542 41.8267 50 41.1813 50 40.3847C50 39.5878 49.3542 38.9423 48.5577 38.9423ZM12.043 31.2653L16.5306 35.7531L11.1076 36.6885L12.043 31.2653ZM33.5567 7.85382L35.7288 10.026L15.3065 30.4493L13.1344 28.2771L33.5567 7.85382ZM19.5183 34.6613L17.3462 32.4891L37.7689 12.0658L39.941 14.238L19.5183 34.6613ZM37.8239 3.58651C38.7611 2.64958 40.2859 2.64958 41.2235 3.58651L44.2078 6.57126C45.145 7.50858 45.145 9.03376 44.2078 9.97108L41.9804 12.1986L35.5965 5.81401L37.8239 3.58651Z",fill:n}))}),uee=["color","size"],dee=Ae(function(t,e){var r=t.color,n=r===void 0?"currentColor":r,i=t.size,o=i===void 0?14:i,a=ve(t,uee);return y.createElement("svg",he({ref:e,width:o,height:o,viewBox:"0 0 52 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),y.createElement("path",{d:"M46.4326 40.0282C46.1217 40.5666 45.6098 40.9595 45.0093 41.1204C44.4088 41.2813 43.7691 41.197 43.2307 40.8862C42.6923 40.5754 42.2995 40.0634 42.1386 39.463C41.9777 38.8625 42.0619 38.2227 42.3727 37.6843C45.2819 32.6454 46.0703 26.6571 44.5644 21.0369C43.0584 15.4167 39.3816 10.6249 34.3426 7.71563C25.1427 2.4043 13.7736 4.38306 6.93632 12.1744L14.5457 12.0831H14.5744C15.196 12.0795 15.7937 12.3229 16.2358 12.7599C16.678 13.1969 16.9284 13.7916 16.9321 14.4133C16.9357 15.0349 16.6923 15.6326 16.2553 16.0747C15.8183 16.5169 15.2236 16.7673 14.6019 16.771L2.37222 16.9175H2.34409C2.03391 16.9175 1.72681 16.856 1.44059 16.7364C1.15437 16.6169 0.894721 16.4417 0.676697 16.2211C0.458674 16.0004 0.28661 15.7387 0.170478 15.4511C0.0543471 15.1635 -0.00354164 14.8557 0.000167612 14.5455L0.147346 2.31591C0.151046 2.00811 0.215338 1.70404 0.336549 1.42108C0.457761 1.13812 0.633519 0.881802 0.853788 0.666765C1.07406 0.451728 1.33453 0.282182 1.62032 0.167807C1.90611 0.0534328 2.21164 -0.00353076 2.51944 0.000169355C2.82725 0.00386947 3.13132 0.0681609 3.41428 0.189372C3.69724 0.310584 3.95356 0.486342 4.16859 0.706611C4.38363 0.926881 4.55318 1.18735 4.66755 1.47314C4.78193 1.75894 4.83889 2.06446 4.83519 2.37227L4.77171 7.65586C9.37537 3.16334 15.4496 0.489016 21.8718 0.127065C28.2941 -0.234886 34.6303 1.74001 39.7096 5.6868C44.7889 9.63359 48.2679 15.2855 49.5038 21.5981C50.7397 27.9107 49.6485 34.4574 46.4326 40.0282Z",fill:n}),y.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 28C26.6569 28 28 26.6569 28 25C28 23.3431 26.6569 22 25 22C23.3431 22 22 23.3431 22 25C22 26.6569 23.3431 28 25 28ZM25 32C28.866 32 32 28.866 32 25C32 21.134 28.866 18 25 18C21.134 18 18 21.134 18 25C18 28.866 21.134 32 25 32Z",fill:n}))});function tA(t){if(t==null)throw new TypeError("Cannot destructure "+t)}var li={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg"},hee="CrossButton",fee=A(A(A(A({},li.Xs,X(["padding:5px;height:20px;"])),li.Sm,X(["padding:6px;height:24px;"])),li.Md,X(["padding:9px;"])),li.Lg,X(["padding:12px;"])),pee=Z.button.attrs({className:Se(hee,"root")}).withConfig({componentId:"sc-ygfku-0"})(function(t){var e=t.size,r=e===void 0?li.Lg:e,n=t.theme;return X(["display:flex;justify-content:center;align-items:center;cursor:pointer;border-radius:4px;"," color:",";background:transparent;border:none;transition:all 100ms ease-out;&:hover{color:",";background:",";}&:active{color:",";background:",";}"],fee[r],n.palette[M.IconsSecondary],n.palette[M.IconsPrimary],n.palette[M.BackgroundHover],n.palette[M.IconsPrimaryHover],n.palette[M.BackgroundActive])}),gee=Bt({CrossButton:pee}),mee=function(e){switch(e){case li.Lg:return 16;case li.Xs:return 10;case li.Sm:default:return 12}},_d=pt(function(t,e){var r=he({},(tA(t),t));return y.createElement(gee.CrossButton,he({},r,{ref:e}),y.createElement(zI,{size:mee(r.size)}))});_d.defaultProps={size:li.Lg};_d.propTypes={size:j.oneOf(ht(li))};var el="Select",vee=Z.span.attrs({className:Se(el,"Icon")}).withConfig({componentId:"sc-mfrapg-0"})(function(t){var e=t.theme.palette,r=t.size;return X(["display:flex;flex-shrink:0;color:",";padding:",";"],e[M.IconsPrimary],r===wn.Md?"2.5px":"2px")}),yee=Z.span.attrs({className:Se(el,"tickIcon")}).withConfig({componentId:"sc-mfrapg-1"})(function(t){var e=t.theme.palette;return X(["color:",";"],e[M.AccentStateless])}),Cee=Z.div.attrs({className:Se(el,"Container")}).withConfig({componentId:"sc-mfrapg-2"})(function(t){var e=t.fullWidth,r=e===void 0?!1:e;return X(["position:relative;display:inline-flex;",""],r?"width: 100%":"")}),rA=Z(_d).attrs({className:Se(el,"CrossButton")}).withConfig({componentId:"sc-mfrapg-3"})(function(){return X(["display:none;margin-right:6px;"])}),wee=Z(ii.Input).attrs({className:Se(el,"root")}).withConfig({componentId:"sc-mfrapg-4"})(function(t){var e=t.theme.palette,r=t.disabled,n=t.readOnly,i=t.size,o=i===void 0?"sm":i,a=t.isValueExists;return X(["cursor:",";user-select:none;gap:0px;background:",";"," ",";"],r||n?"default":"pointer",r?e[M.BackgroundHover]:e[M.BackgroundStateless],a&&`
&:hover {
`.concat(rA,` {
display: flex;
}
}
`),hI[o])}),See=Z.label.attrs({className:Se(el,"Label")}).withConfig({componentId:"sc-mfrapg-5"})(function(t){var e=t.hideEllipsis,r=t.size,n=r===void 0?wn.Md:r;return`
flex-grow: 1;
margin-right: `.concat(n===wn.Md?8:12,`px;
`).concat(!e&&X(["white-space:nowrap;text-overflow:ellipsis;overflow:hidden;"]),`
`)}),bee=Z.span.attrs({className:Se(el,"Placeholder")}).withConfig({componentId:"sc-mfrapg-6"})(function(t){var e=t.theme.palette,r=t.size;return X(["width:100%;color:",";margin-right:","px;"],e[M.TextPlaceholder],r===wn.Md?16:12)}),_ee=Z.input.attrs({className:Se(el,"Input"),"aria-hidden":"true",tabindex:"-1"}).withConfig({componentId:"sc-mfrapg-7"})(["left:0;width:100%;bottom:0;opacity:0;position:absolute;pointer-events:none;box-sizing:border-box;"]),cs=Bt({Container:Cee,Select:wee,Label:See,Icon:vee,TickIcon:yee,Input:_ee,Placeholder:bee,StyledCrossButton:rA});function f_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xee(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?f_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Eee=function(e){switch(e){case lt.Md:return 16;case lt.Sm:default:return 14}},Oee=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=y.createElement(O3,null,e);if(r&&e){var a=y.createElement(P3,null,y.createElement(cs.TickIcon,null,y.createElement(vI,{size:Eee(n)})));if(y.Children.count(e)===1)return y.createElement(y.Fragment,null,o,!i&&a);if(y.Children.count(e)>1&&!y.Children.toArray(e).some(function(s){var c;return(s==null||(c=s.type)===null||c===void 0?void 0:c.displayName)==="MenuItemActions"}))return y.createElement(y.Fragment,null,e,a)}return o},Pee=function(e,r){var n,i,o,a,s=r.value,c=r.multiple,d=c===void 0?!1:c,h=r.size,C=h===void 0?lt.Md:h,v=r.hideMenuItemsActions,g=v===void 0?!1:v,m=r.onClose,w=r.onChange;if(!y.isValidElement(e))return e;if(((n=e.type)===null||n===void 0?void 0:n.displayName)!=="MenuItem")return y.cloneElement(e);var x=e==null||(i=e.props)===null||i===void 0?void 0:i.value,b=d?Array.isArray(s)?s:[]:[s],O=b.length>0&&b.includes(x),f=e==null||(o=e.props)===null||o===void 0?void 0:o.disabled;return y.cloneElement(e,{active:O,size:C,children:Oee(e==null||(a=e.props)===null||a===void 0?void 0:a.children,O,C,g),onClick:function(){var E;if(!d&&typeof m=="function"&&m(),typeof w=="function"&&!f&&(x!=null&&(E=x.toString())!==null&&E!==void 0&&E.length)){var I=x;if(d){I=cr(Array.isArray(s)?s:[]);var R=I.indexOf(x);R>-1?I.splice(R,1):I.push(x)}w(I)}}})},p_=function t(e){var r=e.props?e.props.children:e;return Array.isArray(r)?r.map(function(n){return t(n)}).join(" "):Un(r)==="object"?t(r.props.children):r},kee=function(e,r){if(e&&e.children){for(var n=r?e.value:e.children;typeof n!="string";)Array.isArray(n)?n=p_(n[1]):n=p_(n);return n}},Tee=function(e){var r=e.value,n=e.multiple,i=n===void 0?!1:n,o=e.children,a=e.showSelectionKey,s=a===void 0?!1:a,c=[];y.Children.forEach(o,function(h){if(y.isValidElement(h)){var C=h==null?void 0:h.type,v=C.displayName;v==="MenuItem"&&h.props&&c.push(xee({},h.props))}});var d=i?c.filter(function(h){return Array.isArray(r)&&r.includes(h.value)}):[c.find(function(h){return h.value===r})];return d.length>0?d.map(function(h){return kee(h,s)}).join(", "):Array.isArray(r)?r.join(", "):r},Iee=["children","size","error","multiple","onChange","value","fullWidth","selectProps","MenuProps","readOnly","disabled","scroll","placeholder","showSelectionKey","hideMenuItemsActions","showClearIcon","renderLabel","onRequestClose","hideEllipsis"],Fh=pt(function(t,e){var r,n=t.children,i=t.size,o=t.error,a=t.multiple,s=t.onChange,c=t.value,d=t.fullWidth,h=t.selectProps,C=t.MenuProps,v=t.readOnly,g=t.disabled,m=t.scroll,w=m===void 0?!0:m,x=t.placeholder,b=t.showSelectionKey,O=t.hideMenuItemsActions,f=t.showClearIcon,S=t.renderLabel,E=t.onRequestClose,I=t.hideEllipsis,R=I===void 0?!1:I,k=ve(t,Iee),N=G.useState(void 0),T=Ie(N,2),D=T[0],z=T[1],B=!!D,Y=function(ue){return z(ue.currentTarget)},W=Array.isArray(c)?!!c.length:!!(c!=null&&(r=c.toString())!==null&&r!==void 0&&r.length),q=function(){E&&E(),z(void 0)},ee=function(ue){ue.stopPropagation(),typeof s=="function"&&s("")};return y.createElement(cs.Container,{ref:e,fullWidth:!!d},y.createElement(cs.Select,he({},k,{disabled:g,size:i,error:o,fullWidth:!!d,readOnly:v,showSelectionKey:b,isValueExists:W,onClick:v||g?void 0:Y}),W&&y.createElement(cs.Label,{hideEllipsis:R,size:i},typeof S=="function"?S(c):Tee({value:c,multiple:a,children:n,showSelectionKey:b})),!W&&y.createElement(cs.Placeholder,{size:i},x),!v&&f&&y.createElement(cs.StyledCrossButton,{size:i===li.Md?li.Sm:li.Xs,onClick:ee}),y.createElement(cs.Icon,{size:i},y.createElement(w3,{type:B?"top":"bottom",IconProps:{size:i===li.Md?11:10}})),y.createElement(cs.Input,h)),y.createElement(Ha,he({onClose:q,scroll:w,open:B,anchorEl:D},C),y.Children.map(n,function(K){return Pee(K,{value:c,multiple:a,size:i,hideMenuItemsActions:O,onClose:q,onChange:v||g?void 0:s})})))}),Aee={size:lt.Md,error:!1,multiple:!1,fullWidth:!1,readOnly:!1,disabled:!1,showClearIcon:!1,scroll:!0,hideMenuItemsActions:!1};Fh.defaultProps=Aee;var Lee=j.oneOfType([j.string,j.number,j.oneOf([null])]),T3={size:j.oneOf(ht(lt)),error:j.bool,multiple:j.bool,fullWidth:j.bool,children:j.oneOfType([j.element,j.arrayOf(j.element)]),value:j.oneOfType([j.string,j.number,j.bool,j.oneOf([null]),j.arrayOf(Lee)]),onChange:j.func,MenuProps:j.exact(DI),selectProps:j.object,readOnly:j.bool,disabled:j.bool,showClearIcon:j.bool,hideMenuItemsActions:j.bool,showSelectionKey:j.bool,scroll:j.bool,renderLabel:j.func,onRequestClose:j.func,hideEllipsis:j.bool};Fh.propTypes=T3;function g_(t,e,r){var n=function(s){if(typeof t=="function"){var c;t(((c=s.touches)===null||c===void 0?void 0:c[0])||s)}},i=function a(s){document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",a),document.removeEventListener("mouseleave",a),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",a),document.removeEventListener("touchcancel",a)},o=function(s){if(document.addEventListener("mousemove",n),document.addEventListener("mouseup",i),document.addEventListener("mouseleave",i),document.addEventListener("touchmove",n),document.addEventListener("touchend",i),document.addEventListener("touchcancel",i),typeof e=="function"){var c;e(((c=s.touches)===null||c===void 0?void 0:c[0])||s)}};return{onMouseDown:o,onTouchStart:o}}function m_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Mee(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?m_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Eo="ColorPicker",Ree="ColorItem",Nee=Z.div.attrs({className:Se(Eo,"root")}).withConfig({componentId:"sc-qj4xo5-0"})(["background-color:",";box-shadow:0px 1px 2px rgba(78,77,77,0.15);border-radius:2px;padding:12px;max-width:300px;"],function(t){var e=t.theme;return e.palette[M.BackgroundSecondary]}),Fee=Z.div.attrs({className:Se(Eo,"icon")}).withConfig({componentId:"sc-qj4xo5-1"})(["display:flex;justify-content:space-between;align-items:center;cursor:pointer;"]),Dee=Z.div.attrs({className:Se(Eo,"range-picker")}).withConfig({componentId:"sc-qj4xo5-2"})(function(t){var e=t.color;return X(["position:relative;border-radius:2px;width:100%;height:180px;user-select:none;cursor:crosshair;background-color:",";"],e)}),jee=Z.div.attrs({className:Se(Eo,"white-gradient")}).withConfig({componentId:"sc-qj4xo5-3"})(["background:linear-gradient(to right,white 0%,rgba(255,255,255,0) 100%);z-index:0;position:absolute;width:100%;height:100%;border-radius:2px;user-select:none;pointer-events:none;top:-1px;"]),zee=Z.div.attrs({className:Se(Eo,"black-gradient")}).withConfig({componentId:"sc-qj4xo5-4"})(["background:linear-gradient(to bottom,rgba(0,0,0,0) 0%,black 100%);z-index:1;position:absolute;width:100%;height:100%;border-radius:2px;user-select:none;pointer-events:none;"]),$ee=Z.span.attrs(function(t){var e=t.left,r=e===void 0?0:e,n=t.top,i=n===void 0?0:n,o=t.considerTopWidth,a=o===void 0?!1:o,s=t.style;return{className:Se(Eo,"pointer"),style:Mee({left:r-7,top:i-(a?7:0)},s)}}).withConfig({componentId:"sc-qj4xo5-5"})(function(t){var e=t.theme,r=t.pointerColor;return X(["display:inline-block;box-sizing:border-box;width:15px;height:15px;border-radius:20px;box-shadow:0px 1px 2px rgba(78,77,77,0.15);border:2px solid ",";background-color:",";position:absolute;cursor:pointer;z-index:11;user-select:none;outline:none;"],e.palette[M.BackgroundSecondary],r)}),Bee=Z.div.attrs({className:Se(Eo,"bar-wrapper")}).withConfig({componentId:"sc-qj4xo5-6"})(["margin-top:8px;position:relative;width:100%;height:12px;"]),Hee=Z.table.attrs({className:Se(Eo,"bar")}).withConfig({componentId:"sc-qj4xo5-7"})(["border-radius:4px;width:100%;height:8px;border-collapse:collapse;"]),Gee=Z.td.attrs(function(t){var e=t.$color;return{className:Se(Eo,"stop"),style:{backgroundColor:e}}}).withConfig({componentId:"sc-qj4xo5-8"})(["padding:0;user-select:none;pointer-events:none;&:first-child{width:4px;border-top-left-radius:4px;border-bottom-left-radius:4px;}&:last-child{width:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;}"]),Vee=Z.div.attrs({className:Se(Eo,"action")}).withConfig({componentId:"sc-qj4xo5-9"})(["display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;"]),Uee=Z.label.attrs({className:Se(Ree,"label")}).withConfig({componentId:"sc-qj4xo5-10"})(function(t){var e=t.theme,r=t.size,n=t.color,i=t.stroke,o=t.value;return X(["border-radius:2px;border:",";box-sizing:border-box;width:","px;height:","px;background-color:",";user-select:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 300ms;margin-bottom:8px;background:",";input{display:none;}"],"1px solid ".concat(i),r,r,n,o==="rgba(0,0,0,0)"&&"repeating-conic-gradient(".concat(e.palette[M.LinkPrimary]," 0% 25%, transparent 0% 50%) 50% / 8px 8px"))}),Wee=Z.div.withConfig({componentId:"sc-qj4xo5-11"})(["display:flex;flex-wrap:wrap;align-content:space-between;margin-top:14px;margin-left:12px;& > .item{margin-right:8px;display:flex;justify-content:center;}"]),Xee=Z.div.attrs({className:Se(Eo,"select")}).withConfig({componentId:"sc-qj4xo5-12"})(function(t){var e=t.value;return X(["width:",";"],e==="rgb"?"25%":"35%")}),Kee=Z.div.withConfig({componentId:"sc-qj4xo5-13"})({display:"flex",alignItems:"center",gap:"12px"}),Hn=Bt({ColorPickerWrapper:Nee,RangePickerWrapper:Dee,WhiteGradient:jee,BlackGradient:zee,ColorPointer:$ee,BarWrapper:Bee,Bar:Hee,BarColorStop:Gee,ColorPickerAction:Vee,ColorPickerIcon:Fee,ColorItemsContainer:Wee,ColorItemWrapper:Uee,Select:Xee,SelectWrapper:Kee}),u9=pt(function(t,e){var r=t.value,n=t.onChange,i=t.checked,o=t.size,a=o===void 0?24:o,s=G.useMemo(function(){return r==="#ffffff"||r==="rgba(0,0,0,0)"?"black":"white"},[r]);return y.createElement(Hn.ColorItemWrapper,{ref:e,color:r,size:a,stroke:r==="rgba(0,0,0,0)"?"#a8a8a8":"#E9EEF2",value:r},y.createElement("input",{type:"radio",value:r,checked:i,onChange:n}),i&&y.createElement(vI,{color:s}))});u9.defaultProps={};u9.propTypes={value:j.string.isRequired,checked:j.bool,onChange:j.func.isRequired,size:j.number};var Yee=["defaultColor","onChange","pinnedColors","showTransparentColor","hidePinIcon","containerProps"];function v_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pm(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?v_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var uf=["rgba(0,0,0,0)"],df="#00000000",gm=360,d9=pt(function(t,e){var r=t.defaultColor,n=r===void 0?"#000000":r,i=t.onChange,o=t.pinnedColors,a=o===void 0?[]:o,s=t.showTransparentColor,c=s===void 0?!1:s,d=t.hidePinIcon,h=d===void 0?!1:d,C=t.containerProps,v=ve(t,Yee),g=c?uf.concat(a):a,m=function(Pe){return Pe===df||Pe===uf[0]},w=G.useState({color:"#ff0000",pointerLeft:0}),x=Ie(w,2),b=x[0],O=x[1],f=G.useState({color:m(n)?"#00000000":Fw(n)||"#000000",pointer:{left:0,top:0}}),S=Ie(f,2),E=S[0],I=S[1],R=G.useState(g),k=Ie(R,2),N=k[0],T=k[1],D=G.useState("hex"),z=Ie(D,2),B=z[0],Y=z[1],W=G.useState([]),q=Ie(W,2),ee=q[0],K=q[1],ue=G.useState(Fw(E.color)),ne=Ie(ue,2),ae=ne[0],J=ne[1],Q=G.useState(null),te=Ie(Q,2),we=te[0],U=te[1],F=G.useState(null),$=Ie(F,2),ie=$[0],pe=$[1],ce=function(Pe){return Pe===uf[0]&&E.color===df?!0:Pe===E.color},le=function(Pe){return Pe.filter(function(at){return at!=="rgba(0,0,0,0)"})},xe=function(Pe){return m(Pe)?uf[0]:"rgb(".concat(Bf(Pe).join(", "),")")},Ne=function(Pe,at){if(at==="add"){var ct=[].concat(cr(N),[Pe]);T(ct),typeof i=="function"&&i(E.color,xe(Pe),le(ct))}else{var Tt=N.filter(function(It){return It!==E.color});T(Tt),typeof i=="function"&&i(E.color,xe(Pe),le(Tt))}},_e=function(Pe){if(we!==null){var at=Cl(we),ct=at.left,Tt=L4(Pe||E.color),It=Ie(Tt,1),or=It[0],gr=we.querySelector("[data-hue='".concat(or,"']"));if(gr!==null){var nn=gr.style.backgroundColor||b.color;O({color:nn,pointerLeft:Cl(gr).left-ct||b.pointerLeft})}}},He=function(Pe,at){if(!(Pe>255||Number.isNaN(Pe))){var ct=ee;ct[at]=Pe;var Tt=ik.apply(void 0,cr(ct));K(cr(ct)),Dw(Tt)&&(I(pm(pm({},E),{},{color:Tt})),_e(Tt))}},Ee=function(Pe){Pe.includes("rgb")?K(C8(Pe)):K(Bf(Pe))},Ve=function(Pe){return m(Pe)?df:Pe},We=function(Pe){if(ie!==null){var at=Cl(ie),ct=at.width,Tt=at.height,It=L4(Pe),or=IF(It[0],It[1]/100,It[2]/100),gr=A4(or[1],0,100,0,ct),nn=Tt-A4(or[2],0,100,0,Tt);I({color:Ve(Pe),pointer:{left:gr,top:nn}}),_e(Pe),Ee(Pe),typeof i=="function"&&i(Ve(Pe),xe(Pe),le(N))}},Me=function(Pe,at,ct){if(ie!==null){var Tt=Cl(ie),It=Tt.width,or=Tt.height,gr=L4(ct),nn=Ie(gr,1),pi=nn[0],Qe=Hc(Pe,0,It)||0,Je=Hc(at,0,or)||0,jt=TF(pi,Qe/It,(or-Je)/or),ut=kF(jt[0],jt[1],jt[2]);I({color:ut,pointer:{left:Qe,top:Je}}),typeof i=="function"&&i(ut,"rgb(".concat(Bf(ut).join(", "),")"),le(N))}},gt=function(Pe){var at=we;if(at!==null){var ct=Cl(at),Tt=ct.width,It=Hc(Math.round(A4(Pe,0,Tt,0,gm)),0,gm),or=at.querySelector("[data-hue='".concat(It,"']")),gr=or.style.backgroundColor;return O({color:gr,pointerLeft:Hc(Pe,0,Tt)}),gr}return b.color},St=function(Pe){var at=we;if(at!==null){var ct,Tt=Cl(at),It=Tt.left,or=((ct=Pe.touches)===null||ct===void 0?void 0:ct[0])||Pe,gr=gt(or.pageX-It);Me(E.pointer.left,E.pointer.top,gr)}},qe=function(Pe){var at=ie;if(at!==null){var ct=Cl(at),Tt=ct.left,It=ct.top,or=ct.height,gr=ct.width,nn=Pe?Hc(Pe.pageX-Tt,0,gr):E.pointer.left||0,pi=Pe?Hc(Pe.pageY-It,0,or):E.pointer.left||0;Me(nn,pi,b.color)}},je=function(Pe){Pe.key!=="ArrowLeft"&&Pe.key!=="ArrowRight"||gt(b.pointerLeft+(Pe.key==="ArrowLeft"?-1:1))},Ke=function(Pe){var at=0;Pe.key==="ArrowLeft"||Pe.key==="ArrowUp"?at=-1:(Pe.key==="ArrowRight"||Pe.key==="ArrowDown")&&(at=1),at&&Me((E.pointer.left||0)+(["ArrowLeft","ArrowRight"].includes(Pe.key)?at:0),(E.pointer.top||0)+(["ArrowUp","ArrowDown"].includes(Pe.key)?at:0),b.color)},bt=function(Pe){var at=Dw(Pe);at&&We(Pe),J(Pe)};G.useEffect(function(){_e(E.color),We(E.color)},[we]),G.useEffect(function(){J(E.color),Ee(E.color)},[E.color]);var Lt=G.useMemo(function(){return cr(new Array(gm+1)).map(function(mt,Pe){return y.createElement(Hn.BarColorStop,{key:Pe,$color:"hsl(".concat(Pe,", 100%, 50%)"),"data-hue":Pe})})},[]),tr=g_(St,St),Ii=g_(qe,qe);return y.createElement(Hn.ColorPickerWrapper,he({ref:e},v),y.createElement(Hn.ColorPickerAction,null,y.createElement(Hn.SelectWrapper,null,y.createElement(Hn.Select,{value:B},y.createElement(Fh,{size:"sm",value:B,MenuProps:pm({zIndex:11112},C),onChange:function(Pe){return Y(Pe)},fullWidth:!0,hideEllipsis:!0},y.createElement(wo,{value:"hex"},"Hex"),y.createElement(wo,{value:"rgb"},"RGB"))),B==="hex"?y.createElement(Yl,{size:"sm",error:!/^#([\da-f]{3}){1,2}$/i.test(E.color),value:ae,onChange:function(Pe){return bt(Pe.target.value)},style:{width:"45%"}}):ee.map(function(mt,Pe){return y.createElement(Yl,{key:Pe,size:"sm",value:mt,onChange:function(ct){var Tt;return He(Number((Tt=ct.target)===null||Tt===void 0?void 0:Tt.value),Pe)},style:{width:"20%"}})})),E.color!==df&&!h&&y.createElement(Hn.ColorPickerIcon,{onClick:function(){return N.some(function(Pe){return ce(Pe)})?Ne(E.color,"delete"):Ne(E.color,"add")}},N.some(function(mt){return ce(mt)})?y.createElement(JI,null):y.createElement(MJ,null))),y.createElement(Hn.RangePickerWrapper,he({ref:pe,color:b.color},Ii),y.createElement(Hn.WhiteGradient,null),y.createElement(Hn.BlackGradient,null),y.createElement(Hn.ColorPointer,{tabIndex:-1,left:E.pointer.left||0,top:E.pointer.top||0,onKeyDown:Ke,pointerColor:ae,considerTopWidth:!0})),y.createElement(Hn.BarWrapper,tr,y.createElement(Hn.Bar,{ref:U},y.createElement("tbody",null,y.createElement("tr",null,Lt))),y.createElement(Hn.ColorPointer,{tabIndex:-1,left:b.pointerLeft,onKeyDown:je,considerTopWidth:!1,pointerColor:ae,style:{top:-3}})),y.createElement(Hn.ColorItemsContainer,null,N.map(function(mt){return y.createElement("div",{className:"item",key:mt},y.createElement(u9,{value:mt,checked:ce(mt),onChange:function(at){return We(at.target.value)}}))})))});d9.defaultProps={defaultColor:"#000000",pinnedColors:[],showTransparentColor:!1,hidePinIcon:!1};d9.propTypes={defaultColor:j.string,onChange:j.func,pinnedColors:j.array,showTransparentColor:j.bool,hidePinIcon:j.bool};var Zee=A(A(A({},Tu.Primary,function(t){var e=t.theme.palette,r=t.active;return X(["background-color:",";color:",";&:hover{background-color:",";}&:focus{background-color:",";}&:active{background-color:",";}"," &:disabled{color:",";background:",";cursor:default;}"],e[M.AccentStateless],e[M.IconsInvert],e[M.AccentPrimaryHover],e[M.AccentPrimaryActive],e[M.AccentPrimaryActive],r&&X(["background-color:",";&:hover,&:focus{background-color:",";}"],e[M.AccentPrimaryActive],e[M.AccentPrimaryActive]),e[M.BordersDisabled],e[M.Accent_1_2_Opacity])}),Tu.Secondary,function(t){var e=t.theme.palette,r=t.active;return X(["background-color:",";color:",";border:1px solid ",";&:hover{color:",";background-color:",";}&:focus{background-color:",";color:",";border:1px solid ",";}&:active{color:",";background-color:",";}"," &:disabled{color:",";background:",";border:none;cursor:default;}"],e[M.BackgroundStateless],e[M.AccentStateless],e[M.AccentStateless],e[M.IconsInvert],e[M.AccentPrimaryHover],e[M.Accent_1_2_Opacity],e[M.AccentPrimaryActive],e[M.AccentPrimaryActive],e[M.IconsInvert],e[M.AccentPrimaryActive],r&&X(["color:",";background-color:",";&:hover,&:focus{color:",";background-color:",";}"],e[M.IconsInvert],e[M.AccentPrimaryActive],e[M.IconsInvert],e[M.AccentPrimaryActive]),e[M.BordersDisabled],e[M.Accent_1_2_Opacity])}),Tu.Basic,function(t){var e=t.theme.palette,r=t.active;return X(["background-color:transparent;color:",";border:none;&:hover{background-color:",";color:",";}&:focus{background-color:",";color:",";}&:active{background-color:",";color:",";}"," &:disabled{background-color:transparent;color:",";cursor:default;}"],e[M.IconsPrimary],e[M.BackgroundHover],e[M.IconsPrimaryHover],e[M.BackgroundActive],e[M.LinkActive],e[M.BackgroundActive],e[M.LinkActive],r&&X(["background-color:",";color:",";&:hover,&:focus{background-color:",";color:",";}"],e[M.BackgroundActive],e[M.LinkActive],e[M.BackgroundActive],e[M.LinkActive]),e[M.BordersDisabled])}),qee=A(A(A(A({},nt.Xs,X(["padding:6px;"])),nt.Sm,X(["padding:9px;"])),nt.Md,X(["padding:12px;"])),nt.Lg,X(["padding:11px;"])),Qee="IconButton",Jee=Z(zo.Button).attrs({className:Se(Qee,"root")}).withConfig({componentId:"sc-10edh45-0"})(function(t){var e=t.color,r=e===void 0?Tu.Secondary:e,n=t.size,i=n===void 0?nt.Md:n;return X([""," ",""],qee[i],Zee[r])}),ete=Bt({IconButton:Jee}),tte=["children"],Yo=pt(function(t,e){var r=t.children,n=ve(t,tte);return y.createElement(ete.IconButton,he({},n,{ref:e}),r&&(typeof r=="function"?r({size:Tl(n.size)}):r))});Yo.defaultProps={size:nt.Md,color:Tu.Secondary,active:!1};Yo.propTypes={children:j.oneOfType([j.node,j.func]).isRequired,size:j.oneOf(ht(nt)),color:j.oneOf(ht(Tu)),disabled:j.bool,active:j.bool};var mm=function(e,r){e.preventDefault(),e.button===0&&r&&r(e)},rte=function(e){var r=e.theme.palette;return X(["background:"," !important;border:1px solid "," !important;"],r[M.BackgroundSecondary],r[M.Error])},nte=A(A({},lt.Sm,function(){return X(["height:136px;"])}),lt.Md,function(){return X(["height:152px;"])}),nA=A(A({},lt.Sm,function(t){var e=t.theme.typography.font;return X(["padding:8px 12px;",""],e[ke.InputMd])}),lt.Md,function(t){var e=t.theme.typography.font;return X(["padding:8px 16px;",""],e[ke.InputLg])}),I3="Textarea",ite=Z.div.attrs({className:Se(I3,"root")}).withConfig({componentId:"sc-1usif6k-0"})(function(t){var e=t.size,r=e===void 0?lt.Md:e,n=t.error,i=n===void 0?!1:n,o=t.fullWidth,a=o===void 0?!1:o,s=t.readOnly,c=s===void 0?!1:s,d=t.disabled,h=d===void 0?!1:d,C=t.autoSize,v=C===void 0?!1:C,g=t.theme;return X(["position:relative;display:inline-flex;flex-direction:column;align-items:flex-end;justify-content:space-between;cursor:text;box-sizing:border-box;transition:all 100ms ease-out;width:",";pointer-events:",";background-color:",";border-radius:",";border:1px solid ",";color:",";"," "," &:hover{color:",";}"," ",""],a?"100%":"300px",h?"none":"auto",CI(c,h),g.shape.borderRadius[go.Md],SI(c,h),h?g.palette[M.TextPlaceholder]:g.palette[M.TextPrimary],nte[r],!c&&!h&&X(["&:focus-within{background-color:","!important;border:1px solid ",";&:hover{border:1px solid ",";}}&:hover{background-color:",";border:1px solid ",";}"],g.palette[M.BackgroundSecondary],g.palette[M.AccentStateless],g.palette[M.AccentStateless],g.palette[M.BackgroundStateless],g.palette[M.BordersPrimaryHover]),wI(c,h),i&&rte,v&&X(["width:auto;height:auto;"]))}),ote=Z.textarea.attrs({className:Se(I3,"Base")}).withConfig({componentId:"sc-1usif6k-1"})(function(t){var e=t.theme.palette,r=t.readOnly,n=r===void 0?!1:r,i=t.size,o=i===void 0?lt.Md:i;return X(["display:block;width:100%;height:100%;color:inherit;outline:none;resize:none;min-width:0;margin:0;padding:0;border:0;background-color:transparent;outline:none;font-size:inherit;line-height:inherit;color:inherit;font-weight:inherit;font-family:inherit;box-sizing:border-box;flex:1;"," ",";&::placeholder{color:",";}::-webkit-scrollbar{width:12px;}::-webkit-scrollbar-track{width:8px;}::-webkit-scrollbar-thumb{background:",";border-radius:8px;border:4px solid ",";}"],n&&"padding-bottom: 0px;",nA[o],e[M.TextPlaceholder],e[M.BorderPrimaryStateless],e[M.BackgroundStateless])}),ate=Z.div.attrs({className:Se(I3,"ActionsButtonsWrapper")}).withConfig({componentId:"sc-1usif6k-2"})(function(t){var e=t.size,r=e===void 0?lt.Md:e;return X(["display:flex;align-items:center;width:100%;column-gap:12px;box-sizing:border-box;",";.SfxButton-Label{font-weight:500;}"],nA[r])}),ste=Z.span.attrs({className:Se(I3,"CopyIcon")}).withConfig({componentId:"sc-1usif6k-3"})(function(t){var e=t.theme.palette;return X(["cursor:pointer;color:",";margin-left:auto;"],e[M.IconsPrimary])}),hf=Bt({Textarea:ite,CopyIcon:ste,Base:ote,ActionsButtonsWrapper:ate}),lte=["fullWidth","size","value","readOnly","disabled","error","cols","rows","copyTextMessage","copySuccessIcon","showActionButton","showClearButton","showCopyIcon","disableActionButton","isActionButtonLoading","actionButtonLabel","clearAllButtonLabel","onClickActionButton","onClear","onChange"];function y_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function cte(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?y_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var h9=pt(function(t,e){var r,n=t.fullWidth,i=t.size,o=t.value,a=t.readOnly,s=t.disabled,c=t.error,d=t.cols,h=t.rows,C=t.copyTextMessage,v=C===void 0?"":C,g=t.copySuccessIcon,m=t.showActionButton,w=m===void 0?!1:m,x=t.showClearButton,b=x===void 0?!1:x,O=t.showCopyIcon,f=O===void 0?!1:O,S=t.disableActionButton,E=S===void 0?!1:S,I=t.isActionButtonLoading,R=I===void 0?!1:I,k=t.actionButtonLabel,N=t.clearAllButtonLabel,T=t.onClickActionButton,D=t.onClear,z=t.onChange,B=ve(t,lte),Y=G.useRef(null),W=y8(Y,e),q=G.useState(!1),ee=Ie(q,2),K=ee[0],ue=ee[1],ne=G.useState({}),ae=Ie(ne,2),J=ae[0],Q=ae[1],te=G.useState(!1),we=Ie(te,2),U=we[0],F=we[1],$=G.useState(o),ie=Ie($,2),pe=ie[0],ce=ie[1],le=function(Me){T&&T(Me)},xe=function(Me){ce(""),D&&D(Me)},Ne=function(Me){ce(Me.target.value),z&&z(Me)},_e=function(){f&&bI(pe,F)};G.useEffect(function(){var We=Y.current;We&&We.scrollHeight>We.clientHeight&&Q({paddingRight:i===wn.Md?"4px":"0px"})},[(r=Y.current)===null||r===void 0?void 0:r.scrollHeight,i]),G.useEffect(function(){setTimeout(function(){return F(!1)},2e3)},[U]),G.useEffect(function(){ce(o)},[o]);var He=function(){setTimeout(function(){ue(!0)},150)},Ee=function(){setTimeout(function(){ue(!1)},200)},Ve=function(){return y.createElement(ii.NotificationBox,{size:i,isTextarea:!0},y.createElement(ii.NotificationIcon,null,g),y.createElement(ii.NotificationText,null,v))};return y.createElement(hf.Textarea,{size:i,value:pe,onMouseEnter:He,onMouseLeave:Ee,readOnly:a,disabled:s,fullWidth:!!n,error:c,autoSize:!!d||!!h},y.createElement(hf.Base,he({},B,{value:pe,ref:W,size:i,onChange:Ne,readOnly:a,disabled:s,style:cte({},J)})),(w||b||f)&&y.createElement(hf.ActionsButtonsWrapper,{size:i},w&&y.createElement(Ei,{color:"link-primary",size:"sm",disabled:E,loading:R,onMouseDown:function(Me){return mm(Me,le)}},k),b&&y.createElement(Ei,{color:"link-secondary",size:"sm",onMouseDown:function(Me){return mm(Me,xe)}},N),f&&y.createElement(hf.CopyIcon,{showCopyIcon:K&&pe.length>0,size:i,onMouseDown:function(Me){return mm(Me,_e)}},y.createElement(yI,{size:Tl(i)}),U&&Ve())))});h9.defaultProps={size:lt.Md,error:!1,fullWidth:!1,readOnly:!1,disabled:!1,disableActionButton:!1,isActionButtonLoading:!1,actionButtonLabel:"Action",clearAllButtonLabel:"Clear all"};var iA={error:j.bool,readOnly:j.bool,disabled:j.bool,fullWidth:j.bool,disableActionButton:j.bool,isActionButtonLoading:j.bool,value:j.any,size:j.oneOf(ht(lt)),copySuccessIcon:j.oneOfType([j.node,j.func]),copyTextMessage:j.string,cols:j.number,rows:j.number,showActionButton:j.bool,showClearButton:j.bool,showCopyIcon:j.bool,actionButtonLabel:j.string,clearAllButtonLabel:j.string,onClickActionButton:j.func,onClear:j.func};h9.propTypes=iA;var $2={Input:"input",Textarea:"textarea"},ute="InputGroup",dte=Z.div.attrs({className:Se(ute,"root")}).withConfig({componentId:"sc-zhtjwh-0"})(["","{margin-top:4px;}","{margin-bottom:4px;}"],$I.FormHint,Zf.Label),oA=Bt({InputGroup:dte}),hte=["children","type","error","label","hint","LabelProps","InputProps","inputProps","inputRef","TextareaProps","readOnly","disabled","size","value"];function C_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fte(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?C_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):C_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var A3=pt(function(t,e){t.children;var r=t.type,n=t.error,i=t.label,o=t.hint,a=t.LabelProps,s=t.InputProps,c=t.inputProps,d=t.inputRef,h=t.TextareaProps,C=t.readOnly,v=t.disabled,g=t.size,m=t.value,w=ve(t,hte),x=function(){return i?typeof i=="function"?i({error:n}):Un(i)==="object"?i:y.createElement(qt,he({size:g,error:n,disabled:v},a||{}),i):null},b=function(){var S=fte({value:m,readOnly:C,disabled:v,size:g,error:n},w);return r===$2.Input?y.createElement(Yl,he({},S,s||{},c,{ref:(d==null?void 0:d.ref)||d,readOnly:C,disabled:v})):r===$2.Textarea?y.createElement(h9,he({},S,h||{})):null},O=function(){return o?typeof o=="function"?o({error:n}):Un(o)==="object"?o:y.createElement(k3,{size:g,error:n,disabled:v},o):null};return y.createElement(oA.InputGroup,{ref:e},x(),b(),O())});A3.defaultProps={type:$2.Input,error:!1,readOnly:!1};A3.propTypes={type:j.oneOf(ht($2)),size:j.oneOf(ht(lt)),label:j.node,hint:j.node,error:j.bool,value:j.any,LabelProps:j.exact(Z7),InputProps:j.exact(xI),inputProps:j.object,inputRef:j.oneOfType([j.func,j.object]),TextareaProps:j.exact(iA),readOnly:j.bool,disabled:j.bool};var ps={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg",Xl:"xl"},pte=G.createContext({modalOpened:!1}),gte=A(A(A(A(A({},ps.Xs,X(["max-width:300px;"])),ps.Sm,X(["max-width:600px;"])),ps.Md,X(["max-width:960px;"])),ps.Lg,X(["max-width:1280px;"])),ps.Xl,X(["max-width:1920px;"])),L3="Modal",mte=Z.div.attrs({className:Se(L3,"Wrapper")}).withConfig({componentId:"sc-80m07l-0"})(function(t){var e=t.open;return X(["position:fixed;right:0px;bottom:0px;top:0px;left:0px;z-index:1200;visibility:",";"],e?"visible":"hidden")}),vte=Z.div.attrs({className:Se(L3,"Overlay")}).withConfig({componentId:"sc-80m07l-1"})(function(t){var e=t.open;return X(["position:fixed;right:0px;bottom:0px;top:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:-1;transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms;opacity:",";"],e?"1":"0")}),yte=Z.div.attrs({className:Se(L3,"Container")}).withConfig({componentId:"sc-80m07l-2"})(function(t){var e=t.theme,r=t.open,n=r===void 0?!1:r,i=t.fullWidth,o=i===void 0?!1:i,a=t.maxWidth,s=a===void 0?ps.Sm:a;return X(["position:absolute;overflow-x:hidden;overflow-y:auto;transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms,transform 167ms cubic-bezier(0.4,0,0.2,1) 0ms;outline:0;border-radius:",";background-color:",";box-shadow:0px 2px 4px ",";visibility:",";opacity:",";display:flex;max-height:calc(100% - 64px);flex-direction:column;"," "," top:50%;left:50%;transform:translate(-50%,-50%);"],e.shape.borderRadius[go.Lg],e.palette[M.BackgroundSecondary],e.palette[M.LightShadow],n?"visible":"hidden",n?"1":"0",o&&X(["width:calc(100% - 64px);"]),gte[s])}),Cte=Z.div.attrs({className:Se(L3,"root")}).withConfig({componentId:"sc-80m07l-3"})(function(){return X(["position:relative;padding-top:8px;padding-bottom:8px;margin:0;padding:0;outline:0;display:flex;flex-direction:column;"])}),ff=Bt({Modal:Cte,Wrapper:mte,Overlay:vte,Container:yte}),wte=["children","open","onClose","maxWidth","fullWidth","modalStyles","hideOverlay","disableOverlayClick"];function w_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function S_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?w_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):w_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var Ste=function(e){return e&&G.isValidElement(e)&&y.Children.count(e)===1&&e.type===y.Fragment},M3=pt(function(t,e){var r=t.children,n=t.open,i=t.onClose,o=t.maxWidth,a=t.fullWidth,s=t.modalStyles,c=t.hideOverlay,d=t.disableOverlayClick,h=ve(t,wte),C=Ste(r)?r.props.children:r,v=document.querySelector("body");G.useEffect(function(){return n?document.body.classList.add("Modal-open"):document.body.classList.remove("Modal-open"),function(){document.body.classList.remove("Modal-open")}},[n]);var g=function(){typeof i=="function"&&i()};G.useEffect(function(){var w=function(b){b.key==="Escape"&&g()};return document.addEventListener("keydown",w),function(){return document.removeEventListener("keydown",w)}});var m=function(){return y.createElement(pte.Provider,{value:{modalOpened:!!n}},y.createElement(ff.Wrapper,{style:S_({},s),open:!!n,ref:e},!c&&y.createElement(ff.Overlay,{onClick:function(){return d?null:g()},open:!!n}),y.createElement(ff.Container,he({},h,{maxWidth:o,fullWidth:a,open:!!n}),y.createElement(ff.Modal,null,y.Children.map(C,function(x){return G.isValidElement(x)&&x.type.displayName==="ModalTitle"?y.cloneElement(x,S_({onClose:g},x.props||{})):x})))))};return Sh.createPortal(m(),v)}),bte={open:!1,fullWidth:!1,disableOverlayClick:!1,hideOverlay:!1,maxWidth:ps.Xs};M3.defaultProps=bte;var _te={onClose:j.func,modalStyles:j.object,disableOverlayClick:j.bool,hideOverlay:j.bool,children:j.node.isRequired,maxWidth:j.oneOf(ht(ps)),open:j.bool,fullWidth:j.bool};M3.propTypes=_te;var B2={Left:"left",Center:"center",Right:"right"},xte="ModalActions",Ete=Z.div.attrs({className:Se(xte,"root")}).withConfig({componentId:"sc-1wg6u00-0"})(function(t){var e=t.align,r=e===void 0?B2.Center:e;return X(["position:relative;display:flex;align-items:center;padding:24px;justify-content:",";gap:12px;"],r===B2.Right?"flex-end":r)}),Ote=Bt({ModalActions:Ete}),Pte=["children"],Dh=pt(function(t,e){var r=t.children,n=ve(t,Pte);return y.createElement(Ote.ModalActions,he({},n,{ref:e}),r)});Dh.defaultProps={align:B2.Center};Dh.propTypes={children:j.node.isRequired,align:j.oneOf(ht(B2))};Dh.displayName="ModalActions";var kte="ModalContent",Tte=Z.div.attrs({className:Se(kte,"root")}).withConfig({componentId:"sc-1ng1w0v-0"})(function(){return X(["position:relative;padding:12px 24px 0px;"])}),Ite=Bt({ModalContent:Tte}),Ate=["children"],jh=pt(function(t,e){var r=t.children,n=ve(t,Ate);return y.createElement(Ite.ModalContent,he({},n,{ref:e}),r)});jh.defaultProps={};jh.propTypes={children:j.node.isRequired};jh.displayName="ModalContent";var ai={Default:"default",WithIcon:"with-icon"},zh="ModalTitle",Lte=Z.div.attrs({className:Se(zh,"Icon")}).withConfig({componentId:"sc-l3tf49-0"})(function(t){var e=t.theme.palette;return X(["display:flex;margin-bottom:8px;padding:14.5px;border-radius:50%;background:",";color:",";"],e[M.Accent_1_2_Opacity],e[M.AccentStateless])}),Mte=Z.div.attrs({className:Se(zh,"LabelPrimary")}).withConfig({componentId:"sc-l3tf49-1"})(function(t){var e=t.variant,r=e===void 0?ai.Default:e;return X(["font-size:18px;line-height:27px;font-weight:",";"],r===ai.Default?400:500)}),Rte=Z.div.attrs({className:Se(zh,"LabelSecondary")}).withConfig({componentId:"sc-l3tf49-2"})(["font-size:12px;line-height:14px;margin-top:4px;"]),Nte=Z.div.attrs({className:Se(zh,"Close")}).withConfig({componentId:"sc-l3tf49-3"})(function(t){var e=t.variant,r=e===void 0?ai.Default:e,n=t.theme.palette;return X(["position:absolute;display:flex;top:","px;right:","px;color:",";&:hover{color:",";}cursor:pointer;"],r===ai.WithIcon?2:8,r===ai.WithIcon?2:8,n[M.IconsSecondary],n[M.AccentPrimary])}),Fte=Z.div.attrs({className:Se(zh,"root")}).withConfig({componentId:"sc-l3tf49-4"})(function(t){var e=t.variant,r=e===void 0?ai.Default:e,n=t.theme,i=n.palette,o=n.shape.borderRadius;return X(["position:relative;color:",";border-radius:"," "," 0px 0px;"," "," ",""],i[M.TextPrimary],o[go.Md],o[go.Md],function(){var a=r===ai.WithIcon?26:14,s=r===ai.WithIcon?12:14,c=18,d=r===ai.WithIcon?c:40;return X(["padding:","px ","px ","px ","px;"],a,d,s,c)},r===ai.Default&&X(["background:",";border-bottom:1px solid ",";"],i[M.BackgroundPrimary],i[M.BordersSecondary]),r===ai.WithIcon&&X(["display:flex;align-items:center;flex-direction:column;"]))}),y0=Bt({ModalTitle:Fte,LabelPrimary:Mte,LabelSecondary:Rte,Close:Nte,Icon:Lte}),Dte=["secondary","onClose","primaryLabelStyles"],$h=pt(function(t,e){var r=t.secondary,n=t.onClose,i=t.primaryLabelStyles,o=ve(t,Dte);return y.createElement(y0.ModalTitle,he({},o,{ref:e}),o.icon&&y.createElement(y0.Icon,{iconShadow:!!o.iconShadow},o.icon),y.createElement(y0.LabelPrimary,{variant:o.variant,style:i},o.primary),o.variant===ai.WithIcon&&r&&y.createElement(y0.LabelSecondary,null,r),y.createElement(y0.Close,{variant:o.variant},y.createElement(_d,{size:"lg",onClick:n})))});$h.defaultProps={iconShadow:!0,variant:ai.Default};$h.propTypes={primary:j.node.isRequired,secondary:j.node,icon:j.node,iconShadow:j.bool,onClose:j.func,primaryLabelStyles:j.object,variant:j.oneOf(ht(ai))};$h.displayName="ModalTitle";var Vo={Success:"success",Info:"info",Error:"error",Warning:"warning"},jte="PopupStatus",zte=Z.span.attrs({className:Se(jte,"root")}).withConfig({componentId:"sc-qash56-0"})(function(){return X(["display:flex;"])}),$te=Bt({PopupStatus:zte}),Bte=["status","notificationBackground"],Hte=function(e,r){switch(e){case Vo.Warning:return r?y.createElement(KI,{color:Nn[M.Warning],size:20}):y.createElement(HJ,{color:Nn[M.Warning],size:12});case Vo.Error:return r?y.createElement(WJ,{color:Nn[M.Error],size:20}):y.createElement(KJ,{color:Nn[M.Error],size:12});case Vo.Info:return r?y.createElement(xQ,{color:Nn[M.Info],size:20}):y.createElement(PQ,{color:Nn[M.Info],size:12});case Vo.Success:default:return y.createElement(VJ,{color:Nn[M.Success],size:20})}},f9=pt(function(t,e){var r=t.status,n=t.notificationBackground,i=n===void 0?!0:n,o=ve(t,Bte);return y.createElement($te.PopupStatus,he({status:r},o,{ref:e}),Hte(r,i))}),aA={status:Vo.Success};f9.defaultProps=aA;var sA={status:j.oneOf(ht(Vo))};f9.propTypes=sA;var Gte=A(A(A(A({},Vo.Success,function(t){var e=t.theme.palette;return X(["background-color:",";"],e[M.BackgroundGreen])}),Vo.Info,function(t){var e=t.theme.palette;return X(["background-color:",";"],e[M.BackgroundBlue])}),Vo.Error,function(t){var e=t.theme.palette;return X(["background-color:",";"],e[M.BackgroundRed])}),Vo.Warning,function(t){var e=t.theme.palette;return X(["background-color:",";"],e[M.BackgroundOrange])}),Bh="PopupContent",Vte=Z.span.attrs({className:Se(Bh,"LabelWrapper")}).withConfig({componentId:"sc-njbmnt-0"})(function(t){var e=t.theme.palette;return X(["display:flex;flex-grow:1;margin-left:44px;margin-right:28px;padding:16px;padding-right:0;overflow:hidden;background:",";"],e[M.ButtonPrimaryText])}),Ute=Z.span.attrs({className:Se(Bh,"Label")}).withConfig({componentId:"sc-njbmnt-1"})(function(t){var e=t.theme,r=e.palette,n=e.typography.font;return X(["max-width:100%;overflow:hidden;text-overflow:ellipsis;color:",";",""],r[M.TextPrimary],n[ke.TextSmallUp])}),Wte=Z.div.attrs({className:Se(Bh,"PopupContent")}).withConfig({componentId:"sc-njbmnt-2"})(function(t){var e=t.theme;return X(["position:relative;display:flex;align-items:center;width:360px;border-radius:4px;box-shadow:0px 2px 6px ",";"],e.palette[M.LargeShadow])}),Xte=Z.div.attrs({className:Se(Bh,"PopupContent")}).withConfig({componentId:"sc-njbmnt-3"})(function(t){var e=t.theme;return X(["position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:flex-start;box-sizing:border-box;padding:2px;height:fit-content;cursor:pointer;background:",";border-radius:0 4px 4px 0;height:100%;"],e.palette[M.BackgroundStateless])}),Kte=Z.div.attrs({className:Se(Bh,"PopupStatus")}).withConfig({componentId:"sc-njbmnt-4"})(function(t){var e=t.status,r=e===void 0?"success":e;return X(["position:absolute;display:flex;left:0;z-index:1;height:100%;min-width:44px;align-items:center;justify-content:center;box-sizing:border-box;border-radius:4px 0 0 4px;",""],Gte[r])}),C0=Bt({PopupContent:Wte,PopupStatus:Kte,LabelWrapper:Vte,CloseWrapper:Xte,Label:Ute}),Yte=["onClose","message","status"];function b_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function a6(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?b_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var p9=pt(function(t,e){var r=t.onClose,n=t.message,i=t.status,o=ve(t,Yte);return y.createElement(C0.PopupContent,he({},o,{ref:e}),y.createElement(C0.PopupStatus,he({status:i,message:n},o),y.createElement(f9,{status:i})),y.createElement(C0.LabelWrapper,null,y.createElement(C0.Label,null,n)),y.createElement(C0.CloseWrapper,null,y.createElement(_d,{size:"sm",onClick:r})))}),lA=a6({},aA);p9.defaultProps=lA;var cA=a6(a6({},sA),{},{message:j.node.isRequired,onClose:j.func});p9.propTypes=cA;var Lu={Center:"center",Left:"left",Right:"right"},ph={Top:"top",Bottom:"bottom"},Zte=A(A(A({},Lu.Left,X(["left:25px;right:auto;"])),Lu.Center,X(["left:50%;right:auto;transform:translateX(-50%);"])),Lu.Right,X(["left:auto;right:25px;"])),qte=A(A({},ph.Top,X(["top:25px;bottom:auto;"])),ph.Bottom,X(["top:auto;bottom:25px;"])),Qte="Popup",Jte=Z.div.attrs({className:Se(Qte,"root")}).withConfig({componentId:"sc-jmtjri-0"})(function(t){var e=t.anchorOrigin;return X(["position:fixed;display:flex;align-items:center;justify-content:center;z-index:1400;"," ",""],Zte[(e==null?void 0:e.horizontal)||Lu.Left],qte[(e==null?void 0:e.vertical)||ph.Bottom])}),ere=Bt({Popup:Jte}),tre=["autoHideDuration","anchorOrigin","open","onClose"];function __(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function H2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?__(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):__(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var g9=pt(function(t,e){var r=t.autoHideDuration;t.anchorOrigin;var n=t.open,i=t.onClose,o=ve(t,tre),a=RI(Se("Popup")),s=G.useState(r),c=Ie(s,2),d=c[0],h=c[1],C=G.useState(!1),v=Ie(C,2),g=v[0],m=v[1],w=function(){m(!1),h(1e3)};G.useEffect(function(){n&&h(r)},[n]),G.useEffect(function(){var b=null;return n&&!g&&d&&typeof i=="function"&&(b=setTimeout(i,d)),function(){b&&clearTimeout(b)}},[d,g,n,i]);var x=function(){return n?y.createElement(ere.Popup,he({onMouseEnter:function(){return m(!0)},onMouseLeave:w},t),y.createElement(p9,he({onClose:i},o,{ref:e}))):null};return Sh.createPortal(x(),a)});g9.defaultProps=H2(H2({},lA),{},{open:!1,autoHideDuration:5e3,anchorOrigin:{vertical:ph.Bottom,horizontal:Lu.Left}});g9.propTypes=H2(H2({},cA),{},{anchorOrigin:j.exact({vertical:j.oneOf(ht(ph)),horizontal:j.oneOf(ht(Lu))}),open:j.bool,autoHideDuration:j.number,onClose:j.func});var yc="RotationSlider",rre=Z.ul.attrs({className:Se(yc,"list")}).withConfig({componentId:"sc-1xuruq0-0"})(["display:flex;align-items:center;position:relative;padding:0;width:100%;list-style:none;"]),nre=Z.li.attrs({className:Se(yc,"big-dot")}).withConfig({componentId:"sc-1xuruq0-1"})(function(t){var e=t.theme.palette;return X(["width:8px;height:8px;border-radius:50%;background-color:",";cursor:pointer;"],e[M.LinkPrimary])}),ire=Z.div.attrs({className:Se(yc,"small-dot-wrapper")}).withConfig({componentId:"sc-1xuruq0-2"})(["padding:2px;"]),ore=Z.li.attrs({className:Se(yc,"small-dot")}).withConfig({componentId:"sc-1xuruq0-3"})(function(t){var e=t.theme.palette;return X(["width:2px;height:2px;border-radius:50%;background-color:",";cursor:pointer;"],e[M.LinkPrimary])}),are=Z.span.attrs({className:Se(yc,"control")}).withConfig({componentId:"sc-1xuruq0-4"})(function(t){var e=t.theme.palette;return X(["display:flex;justify-content:center;align-items:center;position:absolute;height:18px;width:2px;transform:translate(-50%,-50%);top:50%;background-color:",";& > input{border:0px;clip:rect(0px,0px,0px,0px);height:100%;margin:-1px;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:100%;direction:ltr;}&::before{position:absolute;content:'';border-radius:inherit;width:100%;height:100%;box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);}&::after{position:absolute;content:'';border-radius:50%;width:42px;height:42px;top:50%;left:50%;transform:translate(-50%,-50%);}"],e[M.LinkActive])}),sre=Z.div.attrs({className:Se(yc,"mark")}).withConfig({componentId:"sc-1xuruq0-5"})(["padding:4px;"]),lre=Z.span.attrs({className:Se(yc,"mark-text")}).withConfig({componentId:"sc-1xuruq0-6"})(function(t){var e=t.theme.palette;return X(["position:absolute;top:20px;font-size:14px;transform:translateX(-10%);color:",";"],e[M.TextPrimary])}),_l=Bt({RotationSliderList:rre,RotationSliderBigDot:nre,RotationSliderSmallDotWrapper:ire,RotationSliderSmallDot:ore,RotationSliderControl:are,RotationSliderMark:sre,RotationSliderMarkText:lre}),cre=["min","max","angle","onChange","onMouseDown","onMouseUp","step","labelTooltipOptions","annotation","hideMarkText","showCurrentMarkText","value","railProps","trackProps","thumbProps","labelTooltipProps","markStyles","markTextStyles"];function x_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ln(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?x_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):x_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var m9=pt(function(t,e){var r=t.min,n=r===void 0?0:r,i=t.max,o=i===void 0?100:i,a=t.angle,s=a===void 0?10:a,c=t.onChange;t.onMouseDown,t.onMouseUp;var d=t.step,h=d===void 0?1:d,C=t.labelTooltipOptions,v=C===void 0?Sd.Off:C,g=t.annotation,m=g===void 0?"°":g,w=t.hideMarkText,x=w===void 0?!1:w,b=t.showCurrentMarkText,O=b===void 0?!1:b,f=t.value,S=t.railProps,E=S===void 0?{}:S,I=t.trackProps,R=I===void 0?{}:I,k=t.thumbProps,N=k===void 0?{}:k,T=t.labelTooltipProps,D=T===void 0?{}:T,z=t.markStyles,B=z===void 0?{}:z,Y=t.markTextStyles,W=Y===void 0?{}:Y,q=ve(t,cre),ee=function(J,Q){c&&c(J,Q)},K=function(){return f||f===0?f>o?o:f<n?n:f:n},ue=function(J){return x?!1:O?K()===J:!0},ne=function(){for(var J=[],Q,te=n;te<=o;te+=h)Q=[],te%s===0||te===o?Q=y.createElement(_l.RotationSliderMark,{key:te,style:Ln({},B)},ue(te)&&y.createElement(_l.RotationSliderMarkText,{style:Ln({},W)},te===n+1?o:te,y.createElement("sup",null,m)),y.createElement(_l.RotationSliderBigDot,null)):te%10===0&&(Q=y.createElement(_l.RotationSliderSmallDotWrapper,{key:te},y.createElement(_l.RotationSliderSmallDot,null))),Array.isArray(Q)||J.push(Q);return J};return y.createElement(C3,he({min:n,max:o,step:h,value:K(),hideTrack:!0,hideAnnotation:!0,annotation:m,onChange:ee,labelTooltip:v,ref:e,components:{Rail:function(J,Q){return y.createElement(_l.RotationSliderList,he({},J,{styles:Ln({},Q)}),ne())},Thumb:_l.RotationSliderControl},componentsProps:{rail:Ln(Ln({},E),{},{style:Ln({},E.style)}),track:Ln(Ln({},R),{},{style:Ln({},R.style)}),thumb:Ln(Ln({},N),{},{style:Ln({top:"15%"},N.style)}),labelTooltip:Ln(Ln({},D),{},{style:Ln({},D.style)})}},q,{defaultValue:Number(q.defaultValue),style:Ln({width:"auto",height:"auto"},q.style)}))});m9.defaultProps={annotation:"°",min:0,max:100,step:1,labelTooltipOptions:Sd.Off};m9.propTypes={value:j.oneOfType([j.array,j.number]),min:j.number,max:j.number,angle:j.number,onChange:j.func,onMouseDown:j.func,onMouseUp:j.func,step:j.number,annotation:j.string,hideMarkText:j.bool,showCurrentMarkText:j.bool,railProps:j.object,trackProps:j.object,thumbProps:j.object,labelTooltipProps:j.object,markStyles:j.object,markTextStyles:j.object,labelTooltipOptions:j.oneOf(ht(Sd))};var ure="SelectGroup",dre=Z(oA.InputGroup).attrs({className:Se(ure,"root")}).withConfig({componentId:"sc-1uvutwe-0"})([""]),hre=Bt({SelectGroup:dre}),fre=["children","size","error","label","placeholder","hint","LabelProps","SelectProps","selectProps","scroll","fullWidth","showSelectionKey","value","multiple","hideMenuItemsActions","onChange","readOnly","disabled","showClearIcon"];function E_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function O_(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?E_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var v9=pt(function(t,e){var r=t.children,n=t.size,i=t.error,o=t.label,a=t.placeholder,s=t.hint,c=t.LabelProps,d=t.SelectProps,h=t.selectProps,C=t.scroll,v=C===void 0?!0:C,g=t.fullWidth,m=t.showSelectionKey,w=t.value,x=t.multiple,b=t.hideMenuItemsActions,O=t.onChange,f=t.readOnly,S=t.disabled,E=t.showClearIcon,I=ve(t,fre),R=function(){return o?typeof o=="function"?o({error:i}):Un(o)==="object"?o:y.createElement(qt,he({error:i},c||{}),o):null},k=function(){return s?typeof s=="function"?s({error:i}):Un(s)==="object"?s:y.createElement(k3,{error:i},s):null};return y.createElement(hre.SelectGroup,he({},I,{ref:e}),R(),y.createElement(Fh,he({error:i,value:w,size:n,scroll:v,onChange:O,multiple:x,fullWidth:!!g},d||{},{selectProps:h,readOnly:f,disabled:S,placeholder:a,showSelectionKey:m,hideMenuItemsActions:b,showClearIcon:E}),r),k())});v9.defaultProps={error:!1,fullWidth:!1,readOnly:!1,disabled:!1,scroll:!0,hideMenuItemsActions:!1};T3.size;var pre=ve(T3,["size"]);v9.propTypes=O_(O_({},pre),{},{fullWidth:j.bool,size:j.oneOf(ht(lt)),label:j.node,hint:j.node,LabelProps:j.exact(Z7),SelectProps:j.exact(T3),selectProps:j.object,readOnly:j.bool,scroll:j.bool,showSelectionKey:j.bool,disabled:j.bool});var gre="Backdrop",mre=Z.div.attrs({className:Se(gre,"root")}).withConfig({componentId:"sc-txa5a-0"})(function(t){var e=t.theme.palette;return X(["position:fixed;display:flex;align-items:center;justify-content:center;inset:0px;background-color:",";transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms;opacity:1;z-index:-1;"],e[M.Extra_0_3_Overlay])}),vre=Bt({Backdrop:mre}),y9=pt(function(t,e){var r=he({},(tA(t),t));return y.createElement(vre.Backdrop,he({},r,{ref:e}))});y9.defaultProps={};y9.propTypes={};var Ti="Drawer",yre=Z.div.attrs({className:Se(Ti,"temporary")}).withConfig({componentId:"sc-1riasfx-0"})(function(t){var e=t.open;return X(["position:absolute;inset:0px;z-index:1200;visibility:",";"],!e&&"hidden")}),Cre=Z.div.attrs({className:Se(Ti,"persistent")}).withConfig({componentId:"sc-1riasfx-1"})([""]),wre=Z.div.attrs({className:Se(Ti,"root")}).withConfig({componentId:"sc-1riasfx-2"})(function(t){var e=t.open,r=t.isCollapsed,n=t.top,i=n===void 0?0:n,o=t.theme,a=o.palette,s=o.shadows,c=o.breakpoints;return X(["display:flex;flex-direction:column;flex:1 0 auto;background-color:",";box-shadow:",";overflow-y:overlay;overflow-x:hidden;transform:",";visibility:",";transition:200ms;height:calc(100% - ","px);","{margin-top:0px;height:100%;}"," &{margin-top:0px;height:100%;}box-sizing:border-box;width:",";",""],a[M.BackgroundStateless],s[ni.LeftPanelMd],e?"none":"translateX(-100%)",!e&&"hidden",i,c.down("md"),c.classes.sm,r?"68px":"302px",lk)}),Sre=Z.div.attrs({className:Se(Ti,"header")}).withConfig({componentId:"sc-1riasfx-3"})(function(t){var e=t.isCollapsed;return X(["display:",";justify-content:flex-start;align-items:center;position:relative;text-decoration:none;width:100%;box-sizing:border-box;text-align:left;margin-top:12px;transition:background-color 100ms ease-out;"],e?"none":"flex")}),bre=Z.div.attrs({className:Se(Ti,"body")}).withConfig({componentId:"sc-1riasfx-4"})(["flex:1 1 auto;.SfxAccordionDetails-root{margin:0;}"]),_re=Z.div.attrs({className:Se(Ti,"footer")}).withConfig({componentId:"sc-1riasfx-5"})(function(t){var e=t.isCollapsed;return X(["display:flex;flex-direction:column;width:100%;padding:",";"],e?"0px":"0px 8px")}),xre=Z.ul.attrs({className:Se(Ti,"list")}).withConfig({componentId:"sc-1riasfx-6"})(function(){return X(["list-style:none;margin:12px 0;padding:0;position:relative;"])}),Ere=Z.li.attrs({className:Se(Ti,"item")}).withConfig({componentId:"sc-1riasfx-7"})(function(t){var e=t.theme.palette,r=t.isCollapsed,n=t.selected;return X(["display:",";justify-content:flex-start;align-items:center;position:relative;text-decoration:none;width:100%;box-sizing:border-box;text-align:left;padding:13px 16px;transition:background-color 100ms ease-out;margin-bottom:4px;cursor:pointer;&:hover{background-color:",";& > *{color:",";}}",""],r?"none":"flex",e[M.BackgroundActive],e[M.AccentStateless],n&&X(["background-color:",";& > *{color:"," !important;}"],e[M.BackgroundActive],e[M.AccentStateless]))}),Ore=Z.div.attrs({className:Se(Ti,"text")}).withConfig({componentId:"sc-1riasfx-8"})(function(t){var e=t.theme,r=e.palette,n=e.typography.font,i=t.font,o=t.isCollapsed;return X(["flex:1 1 auto;color:",";",";transition:color 100ms ease-out;display:",";user-select:none;"],r[M.TextPrimary],n[i||ke.LabelLarge],o&&"none")}),Pre=Z.div.attrs({className:Se(Ti,"icon")}).withConfig({componentId:"sc-1riasfx-9"})(function(t){var e=t.theme.palette,r=t.isCollapsed;return X(["display:flex;flex-shrink:0;color:",";margin-right:",";transition:color 100ms ease-out;"],e[M.IconsPrimary],r?"0px":"12px")}),uA=Z.div.attrs({className:Se(Ti,"item-button")}).withConfig({componentId:"sc-1riasfx-10"})(function(t){var e=t.theme.palette,r=t.isCollapsed,n=t.selected;return X(["display:flex;justify-content:",";align-items:center;border-radius:4px;box-sizing:border-box;text-align:left;padding:",";width:",";margin-bottom:8px;margin:",";transition:background-color 150ms cubic-bezier(0.4,0,0.2,1) 0ms;cursor:pointer;&:hover{background-color:",";& > *{color:",";}}",""],r?"center":"flex-start",r?"12px 0px":"13px 16px",r&&"56px",r&&"8px auto",e[M.BackgroundActive],e[M.AccentStateless],n&&X(["background-color:",";& > *{color:",";}"],e[M.BackgroundActive],e[M.AccentStateless]))}),kre=Z(uA).attrs({className:Se(Ti,"item-button")}).withConfig({componentId:"sc-1riasfx-11"})(function(t){var e=t.isCollapsed;return X(["",""],!e&&X(["padding:13px 16px;"]))}),Tre=Z(b3).attrs({className:Se(Ti,"accordion")}).withConfig({componentId:"sc-1riasfx-12"})(function(t){var e=t.theme,r=e.palette,n=e.typography.font,i=t.selected;return X(["","{padding:13px 16px;transition:background-color 100ms ease-out;","{",";color:",";}&:hover{background-color:",";& > *{color:",";}}","}","{padding:0px 16px;}"],Iu.Header,Iu.Label,n[ke.LabelLargeEmphasis],r[M.TextPrimary],r[M.BackgroundActive],r[M.AccentStateless],i&&X(["","{color:",";}"],Iu.Label,r[M.AccentStateless]),mI.AccordionDetails)}),uo=Bt({TemporaryDrawer:yre,PersistentDrawer:Cre,Drawer:wre,Header:Sre,Body:bre,Footer:_re,List:xre,Item:Ere,ItemButton:uA,Icon:Pre,ItemText:Ore,DrawerAccordion:Tre,CollapsedButton:kre}),Hh=G.createContext({isCollapsed:!1,size:20}),Ire=["children","font"],C9=pt(function(t,e){var r=t.children,n=t.font,i=ve(t,Ire),o=G.useContext(Hh),a=o.isCollapsed;return y.createElement(uo.ItemText,he({font:n,isCollapsed:a},i,{ref:e}),r)});C9.defaultProps={};C9.propTypes={font:j.oneOf(ht(ke))};var Are=["children","size"],w9=pt(function(t,e){var r=t.children,n=t.size,i=ve(t,Are),o=G.useContext(Hh),a=o.isCollapsed,s=o.size;return y.createElement(uo.Icon,he({},i,{isCollapsed:a,ref:e}),r&&typeof r=="function"?r({size:s||n}):r)});w9.defaultProps={size:20};w9.propTypes={size:j.number,children:j.oneOfType([j.node,j.func]).isRequired};var Su={Auto:"auto",Temporary:"temporary",Persistent:"persistent"},Lre=["children","open","iconsSize","collapsed","top","hideBackdrop","disablePortal","collapseButtonLabel","persistentDrawerStyles","temproryDrawerStyles","variant","onClose","onCollapse","onCollapseClick"];function P_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vm(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?P_(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):P_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var S9=pt(function(t,e){var r=t.children,n=t.open,i=t.iconsSize,o=i===void 0?20:i,a=t.collapsed,s=a===void 0?!1:a,c=t.top,d=t.hideBackdrop,h=t.disablePortal,C=t.collapseButtonLabel,v=C===void 0?"Collapse menu":C,g=t.persistentDrawerStyles,m=g===void 0?{}:g,w=t.temproryDrawerStyles,x=w===void 0?{}:w,b=t.variant,O=b===void 0?Su.Auto:b,f=t.onClose,S=t.onCollapse,E=t.onCollapseClick,I=ve(t,Lre),R=nI(),k=VX(R.breakpoints.down("xl")),N=G.useState(s),T=Ie(N,2),D=T[0],z=T[1],B=G.useRef(null),Y=G.useMemo(function(){return o},[o]),W=document.querySelector("body");G.useEffect(function(){z(s)},[s]),G.useEffect(function(){S&&S(D)},[D]);var q=function(){var we=!D;z(we),E&&E(we)},ee=function(){typeof f=="function"&&f()},K=function(we){var U=!1;if(B!=null&&B.current){var F;U=(B==null||(F=B.current)===null||F===void 0?void 0:F.offsetWidth)>0}we.key==="Escape"&&U&&ee()};G.useEffect(function(){return document.addEventListener("keydown",K),function(){return document.removeEventListener("keydown",K)}},[]);var ue=function(we){return y.createElement(uo.Drawer,he({open:n,top:c},I,{isCollapsed:we?D:!1,ref:e}),r,we&&y.createElement(uo.CollapsedButton,{onClick:q,isCollapsed:D},y.createElement(w9,null,D?function(U){return y.createElement(see,he({},U,{size:o}))}:function(U){return y.createElement(oee,he({},U,{size:o}))}),y.createElement(C9,null,v)))},ne=function(){return!d&&n?y.createElement(y9,{onClick:f}):null},ae=function(){return h?y.createElement(uo.TemporaryDrawer,{ref:B,style:vm({},x),open:n},ne(),ue(!1)):Sh.createPortal(y.createElement(uo.TemporaryDrawer,{ref:B,style:vm({},x),open:n},ne(),ue(!1)),W)},J=function(){return y.createElement(uo.PersistentDrawer,{style:vm({},m)},ue(!0))},Q=function(){switch(O){case Su.Auto:return k?ae():J();case Su.Temporary:return ae();case Su.Persistent:return J();default:return k?ae():J()}};return y.createElement(Hh.Provider,{value:{isCollapsed:k?!1:D,size:Y}},Q())}),Mre={open:!1,hideBackdrop:!1,iconsSize:20,variant:Su.Auto};S9.defaultProps=Mre;var Rre={onClose:j.func.isRequired,onCollapse:j.func,onCollapseClick:j.func,children:j.node.isRequired,top:j.number,iconsSize:j.number,open:j.bool,hideBackdrop:j.bool,collapsed:j.bool,disablePortal:j.bool,collapseButtonLabel:j.string,persistentDrawerStyles:j.object,temproryDrawerStyles:j.object,variant:j.oneOf(ht(Su))};S9.propTypes=Rre;var Nre=["children"],b9=pt(function(t,e){var r=t.children,n=ve(t,Nre),i=G.useContext(Hh),o=i.isCollapsed;return y.createElement(uo.Header,he({},n,{isCollapsed:o,ref:e}),r)});b9.defaultProps={};b9.propTypes={};var Fre=["children"],_9=pt(function(t,e){var r=t.children,n=ve(t,Fre);return y.createElement(uo.Body,he({},n,{ref:e}),r)});_9.defaultProps={};_9.propTypes={};var Dre=["children"],x9=pt(function(t,e){var r=t.children,n=ve(t,Dre);return y.createElement(uo.List,he({},n,{ref:e}),r)});x9.defaultProps={};x9.propTypes={};var jre=["children","selected"],E9=pt(function(t,e){var r=t.children,n=t.selected,i=ve(t,jre),o=G.useContext(Hh),a=o.isCollapsed;return y.createElement(uo.Item,he({selected:n,isCollapsed:a},i,{ref:e}),r)});E9.defaultProps={selected:!1};E9.propTypes={selected:j.bool};var zre=Z.div.withConfig({componentId:"sc-1rfxjvn-0"})(["display:flex;width:100%;justify-content:space-between;gap:10px;.SfxSlider-root{min-width:100px;}",""],function(t){var e=t.isPhoneScreen;return e&&`
flex-direction: column;
.SfxSlider-root {
min-width: 230px;
}
`}),Fl=Z.div.withConfig({componentId:"sc-1rfxjvn-1"})(["display:flex;flex-direction:column;"]),Dl=Z(qt).withConfig({componentId:"sc-1rfxjvn-2"})(["",";"],function(t){var e=t.theme;return e.typography.font[ke.LabelExtraSmallUp]}),jl=Z.div.withConfig({componentId:"sc-1rfxjvn-3"})(["display:flex;align-items:center;"]),zl=Z(Yl).withConfig({componentId:"sc-1rfxjvn-4"})(["display:inline-block;width:40px;height:28px;padding:6px 2px;margin-left:10px;border:none;.SfxInput-Base{text-align:center;width:100%;min-width:100%;max-width:100%;}"]),k_=-1,ym={brightness:0},T_=1,$re={width:150,padding:0,margin:0},Bre=function(t){var e,r,n=t.t,i=Mh(br.Filters.Brighten,ym),o=Ie(i,2),a=o[0],s=o[1],c=function(d){s({brightness:Vr(d,k_,T_)})};return y.createElement(Fl,{className:"FIE_brightness-option-wrapper"},y.createElement(Dl,{className:"FIE_brightness-option-label"},n("brightness")),y.createElement(jl,null,y.createElement(qr,{className:"FIE_brightness-option",min:k_,step:.05,max:T_,width:"124px",value:(e=a.brightness)!==null&&e!==void 0?e:ym.brightness,onChange:c,style:$re}),y.createElement(zl,{value:(r=a.brightness)!==null&&r!==void 0?r:ym.brightness,onChange:function(h){var C=h.target.value;return c(C)}})))},G2=function(t,e){return Math.min(t.width/e.width,t.height/e.height)||Co},I_=[{titleKey:"custom",ratio:hT,icon:IQ,hide:function(){var e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},r=e.lockCropAreaAt;return r}},{titleKey:"original",ratio:$8,icon:YI},{titleKey:"landscape",descriptionKey:"16:9",ratio:_r(16/9),icon:DQ},{titleKey:"portrait",descriptionKey:"9:16",ratio:_r(9/16),icon:$J},{titleKey:"ellipse",ratio:cc,icon:ZI}],Hre=Z.div.withConfig({componentId:"sc-ldar2z-0"})(["display:flex;"]),Gre=Z(Ei).withConfig({componentId:"sc-ldar2z-1"})(["margin:0 0 0 6px;padding:0;"]),dA=Z.div.withConfig({componentId:"sc-ldar2z-2"})(["svg,span{vertical-align:middle;}"]),Vre=Z(qt).withConfig({componentId:"sc-ldar2z-3"})(["cursor:pointer;",""],function(t){var e=t.theme.typography;return e.font[ke.InputSm]}),Ure=Z.div.withConfig({componentId:"sc-ldar2z-4"})(["min-width:270px;border-radius:4px;overflow:hidden;background-color:",";"],function(t){var e=t.theme.palette;return e[M.BackgroundStateless]}),hA=Z(wo).withConfig({componentId:"sc-ldar2z-5"})(["display:flex;gap:10px;justify-content:flex-start;align-items:center;border-radius:4px;padding:8px 16px;"," ",""],function(t){var e=t.isAccordion;return e&&"padding-left: 22px;"},function(t){var e=t.isListItem;return e&&"padding: 0;"}),Wre=Z(qt).withConfig({componentId:"sc-ldar2z-6"})(function(t){var e=t.theme;return X(["color:",";",";"],e.palette[M.TextPrimary],e.typography.font[ke.InputMd])}),Xre=Z(b3).withConfig({componentId:"sc-ldar2z-7"})(function(t){var e=t.theme;return X([".SfxAccordionHeader-icon{padding-left:0;}.SfxAccordionHeader-label{",";color:",";}.SfxAccordionHeader-root{display:flex;flex-direction:row-reverse;width:fit-content;gap:10px;}"],e.typography.font[ke.LabelMediumEmphasis],e.palette[M.TextPrimary])}),O9=function(t){var e=t.titleKey,r=t.description,n=t.ratio,i=t.onClick,o=t.Icon,a=t.isActive,s=t.isAccordion,c=t.theme,d=t.width,h=t.height,C=t.t,v=t.disableManualResize,g=t.noEffect;return y.createElement(hA,{active:a,onClick:function(w){return i(w,n,{ratioTitleKey:e,width:d,height:h,disableManualResize:v,noEffect:g})},isAccordion:s},o&&y.createElement(dA,null,typeof o=="string"?y.createElement("span",{dangerouslySetInnerHTML:{__html:o}}):y.createElement(o,{color:c.palette["icon-primary"]})),y.createElement(Wre,null,C(e)),r&&y.createElement(Vre,null,r))};O9.defaultProps={Icon:void 0,width:void 0,height:void 0,disableManualResize:!1,isAccordion:!1,noEffect:!1};function A_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function L_(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?A_(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):A_(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Kre=function(t){var e=t.groupTitleKey,r=t.items,n=t.onItemSelect,i=t.t,o=t.isExpanded,a=t.setExpandedGroup,s=Ye(),c=s.adjustments.crop,d=c.ratio,h=c.ratioGroupKey,C=c.ratioTitleKey,v=s.theme,g=function(m,w,x){n(m,w,L_(L_({},x),{},{ratioGroupKey:e}))};return y.createElement(Xre,{label:i(e),onChange:function(){a(o?null:e)},expanded:o},r.map(function(m){var w=m.titleKey,x=m.ratio,b=m.width,O=m.height,f=m.descriptionKey,S=m.icon,E=m.disableManualResize,I=m.noEffect,R=x??_r(b/O);return y.createElement(O9,{key:w,titleKey:w,t:i,description:i(f),size:"sm",onClick:g,width:b,height:O,ratio:R,Icon:S,theme:v,isAccordion:!0,disableManualResize:E,isActive:d===R&&C===w&&h===e,noEffect:I})}))};function M_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function R_(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?M_(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):M_(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var fA=function(t){var e=t.titleKey,r=t.Icon,n=t.theme,i=t.groups,o=t.onItemSelect,a=t.t,s=Ye(),c=s.adjustments.crop,d=c.ratioFolderKey,h=c.ratioGroupKey,C=G.useState(""),v=Ie(C,2),g=v[0],m=v[1],w=function(x,b,O){o(x,b,R_(R_({},O),{},{ratioFolderKey:e}))};return y.createElement(hA,{isListItem:!0,list:[{content:a(e),key:e,active:e===d,prefix:r&&y.createElement(dA,null,typeof r=="string"?y.createElement("span",{dangerouslySetInnerHTML:{__html:r}}):y.createElement(r,{color:n.palette["icon-primary"]})),subList:i.map(function(x){var b=x.titleKey,O=x.items;return{content:y.createElement(Kre,{groupTitleKey:b,setExpandedGroup:m,isExpanded:g===""?h===b:g===b,t:a,items:O,onItemSelect:w}),key:b,disableHover:!0}}),subMenuProps:{style:{backgroundColor:n.palette[M.BackgroundStateless]}}}]})};fA.defaultProps={Icon:void 0};var pA=function(t){var e=t.anchorEl,r=t.onClose,n=Ye(),i=n.dispatch,o=n.t,a=n.adjustments,s=a===void 0?{}:a,c=s.crop,d=c===void 0?{}:c,h=d.ratio,C=d.ratioTitleKey,v=d.ratioFolderKey,g=n.shownImageDimensions,m=n.config,w=n.theme,x=m[de.CROP],b=_o(),O=G.useMemo(function(){var S=x.presetsItems,E=S===void 0?[]:S,I=x.presetsFolders,R=I===void 0?[]:I,k=x.lockCropAreaAt,N=k?I_.filter(function(T){var D;return!((D=T.hide)!==null&&D!==void 0&&D.call(T,{lockCropAreaAt:k}))}):I_;return[].concat(cr(R),cr(N),cr(E))},[x]),f=function(S,E,I){S.stopPropagation();var R={ratio:E,ratioTitleKey:I.ratioTitleKey,ratioGroupKey:I.ratioGroupKey,ratioFolderKey:I.ratioFolderKey,noEffect:I.noEffect};i({type:M9,payload:R}),x.autoResize&&(i({type:Mu,payload:{width:I.width,height:I.height,manualChangeDisabled:I.disableManualResize}}),i({type:id,payload:{factor:I.width>g.width||I.height>g.height?G2(g,I):Co}})),r()};return y.createElement(y.Fragment,null,y.createElement(Hre,null,y.createElement(q7,{className:"FIE_crop-tool-label FIE_selected-crop-preset-label",isPhoneScreen:b},o(C||"cropTool")),y.createElement(Gre,{className:"FIE_crop-presets-opener-button",color:"link-secondary",size:"lg"},e?y.createElement(nee,{size:10}):y.createElement(tee,{size:10}))),y.createElement(Ha,{className:"FIE_crop-presets-menu",anchorEl:e,enableOverlay:!0,onClose:r,open:!!e,position:"top",popperOptions:{modifiers:[{name:"offset",options:{offset:[0,4]}}]},maxHeight:"100%"},y.createElement(Ure,null,O.map(function(E){var I=E.titleKey,R=E.descriptionKey,k=E.ratio,N=E.width,T=E.height,D=E.groups,z=E.icon,B=E.disableManualResize,Y=E.noEffect;return D?y.createElement(fA,{key:I,titleKey:I,groups:D,Icon:z,theme:w,onItemSelect:f,t:o,disableManualResize:B}):y.createElement(O9,{key:k,ratio:k??_r(N/T),titleKey:I,t:o,description:o(R),Icon:z,isActive:(h||$8)===(k??_r(N/T))&&!v,theme:w,width:N,height:T,onClick:f,disableManualResize:B,noEffect:Y})}))))};pA.defaultProps={anchorEl:null};var gA=function(t){var e=t.selectTool,r=t.isSelected,n=Ye(),i=n.config,o=n.t,a=G.useState(),s=Ie(a,2),c=s[0],d=s[1];return y.createElement(Qr,{className:"FIE_crop-tool",id:de.CROP,Icon:tQ,onClick:function(C,v){e(C),d(v.currentTarget)},isSelected:r},i[de.CROP].noPresets?y.createElement(q7,{className:"FIE_crop-tool-label"},o("cropTool")):y.createElement(pA,{anchorEl:c,onClose:function(){d(null)}}))};gA.defaultProps={isSelected:!1};var Yre={transform:"scaleX(-1)"},mA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t,i=Ye(),o=i.dispatch,a=i.adjustments.isFlippedX,s=_o(320),c=G.useMemo(function(){return{reverseLabelOfCurrXFlipDir:n(a?"unFlipX":"flipX"),reverseIconOfCurrXFlipDir:function(){return y.createElement(RQ,{size:s?20:16,style:a?Yre:void 0})}}},[a]),d=c.reverseLabelOfCurrXFlipDir,h=c.reverseIconOfCurrXFlipDir,C=G.useCallback(function(){o({type:L9,payload:{direction:z8.X}})},[]),v=G.useCallback(function(g){e(g),C()},[]);return y.createElement(Qr,{className:"FIE_flip-x-tool-button",id:de.FLIP_X,label:d,Icon:h,onClick:v,isSelected:r})};mA.defaultProps={isSelected:!1};var Zre={transform:"scaleY(-1)"},vA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t,i=Ye(),o=i.dispatch,a=i.adjustments.isFlippedY,s=_o(320),c=G.useMemo(function(){return{reverseLabelOfCurrXFlipDir:n(a?"unFlipY":"flipY"),reverseIconOfCurrXFlipDir:function(){return y.createElement(LQ,{size:s?20:16,style:a?Zre:void 0})}}},[a]),d=c.reverseLabelOfCurrXFlipDir,h=c.reverseIconOfCurrXFlipDir,C=G.useCallback(function(){o({type:L9,payload:{direction:z8.Y}})},[]),v=G.useCallback(function(g){e(g),C()},[]);return y.createElement(Qr,{className:"FIE_flip-y-tool-button",id:de.FLIP_Y,label:d,Icon:h,onClick:v,isSelected:r})};vA.defaultProps={isSelected:!1};var yA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_rotate-tool-button",id:de.ROTATE,label:n("rotateTool"),Icon:XI,onClick:e,isSelected:r})};yA.defaultProps={isSelected:!1};var qre=Z.div.withConfig({componentId:"sc-wbx58r-0"})(["display:flex;align-items:center;gap:16px;"]),Qre=Z(m9).withConfig({componentId:"sc-wbx58r-1"})([".SfxRotationSlider-control{width:1px;height:10px;background-color:",";&:before{box-shadow:unset;}}.SfxRotationSlider-mark,.SfxRotationSlider-small-dot-wrapper{padding:0;.SfxRotationSlider-mark-text{top:10px;}.SfxRotationSlider-big-dot{width:4px;height:4px;}.SfxRotationSlider-small-dot{width:1px;height:1px;}}.SfxRotationSlider-list{gap:4px;}"],function(t){var e=t.theme.palette;return e[M.IconsSecondary]}),Jre=Z(Yo).withConfig({componentId:"sc-wbx58r-2"})([""]),ene=function(){var t=Ye(),e=t.dispatch,r=t.adjustments.rotation,n=r===void 0?0:r,i=t.resize,o=i===void 0?{}:i,a=t.config,s=a[de.ROTATE],c=_o(),d=lI(function(h,C){var v=Vr(C,-180,180);if(e({type:HA,payload:{rotation:v}}),o.width&&o.height){var g=Ms(o.width,o.height,v);e({type:Mu,payload:{width:g.width,height:g.height}})}},20);return s.componentType==="buttons"?y.createElement(y.Fragment,null,y.createElement(Qr,{className:"FIE_rotate_button_left",id:de.IMAGE,label:"-".concat(s.angle,"°"),Icon:XI,onClick:function(C){var v=n-s.angle;d(C,v)}}),y.createElement(Qr,{className:"FIE_rotate_button_right",id:de.IMAGE,label:"+".concat(s.angle,"°"),Icon:mQ,onClick:function(C){var v=n+s.angle;d(C,v)}})):y.createElement(qre,null,y.createElement(Qre,{className:"FIE_rotate-slider",showCurrentMarkText:!0,min:-180,max:180,step:c?s.angle/3:1,value:n,angle:s.angle||90,onChange:d}),y.createElement(Jre,{size:"sm",color:"basic",onClick:function(C){return d(C,n+90)}},y.createElement(dee,{width:15})))},CA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_contrast-tool-button",id:de.CONTRAST,label:n("contrastTool"),Icon:_J,onClick:e,isSelected:r})};CA.defaultProps={isSelected:!1};var N_=-100,Cm={contrast:0},F_=100,tne={width:150,padding:0,margin:0},rne=function(t){var e,r,n=t.t,i=Mh(br.Filters.Contrast,Cm),o=Ie(i,2),a=o[0],s=o[1],c=function(d){s({contrast:Vr(d,N_,F_)})};return y.createElement(Fl,{className:"FIE_contrast-option-wrapper"},y.createElement(Dl,{className:"FIE_contrast-option-label"},n("contrastTool")),y.createElement(jl,null,y.createElement(qr,{className:"FIE_contrast-option",min:N_,max:F_,width:"124px",value:(e=a.contrast)!==null&&e!==void 0?e:Cm.contrast,onChange:c,style:tne}),y.createElement(zl,{value:(r=a.contrast)!==null&&r!==void 0?r:Cm.contrast,onChange:function(h){var C=h.target.value;return c(C)}})))},wA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_hsv-tool-button",id:de.HSV,label:n("hsvTool"),Icon:PJ,onClick:e,isSelected:r})};wA.defaultProps={isSelected:!1};var xl={hue:0,saturation:0,value:0},D_={hue:259,saturation:10,value:2},wm={padding:0,margin:0},nne=_o(),ine=function(t){var e,r,n,i,o,a,s=t.t,c=Mh(br.Filters.HSV,xl),d=Ie(c,2),h=d[0],C=d[1],v=function(g,m){C(A({},g,m>D_[g]?D_[g]:+m))};return y.createElement(zre,{isPhoneScreen:nne},y.createElement(Fl,{className:"FIE_hue-option-wrapper"},y.createElement(Dl,{className:"FIE_hue-option-label"},s("hue")),y.createElement(jl,null,y.createElement(qr,{className:"FIE_hue-option",min:0,step:1,max:259,value:(e=h.hue)!==null&&e!==void 0?e:xl.hue,onChange:function(m){return v("hue",m)},style:wm}),y.createElement(zl,{value:(r=h.hue)!==null&&r!==void 0?r:xl.hue,onChange:function(m){var w=m.target.value;return v("hue",w)}}))),y.createElement(Fl,{className:"FIE_saturation-option-wrapper"},y.createElement(Dl,{className:"FIE_saturation-option-label"},s("saturation")),y.createElement(jl,null,y.createElement(qr,{className:"FIE_saturation-option",min:-2,step:.5,max:10,value:(n=h.saturation)!==null&&n!==void 0?n:xl.saturation,onChange:function(m){return v("saturation",m)},style:wm}),y.createElement(zl,{value:(i=h.saturation)!==null&&i!==void 0?i:xl.saturation,onChange:function(m){var w=m.target.value;return v("saturation",w)}}))),y.createElement(Fl,{className:"FIE_value-option-wrapper"},y.createElement(Dl,{className:"FIE_value-option-label"},s("value")),y.createElement(jl,null,y.createElement(qr,{className:"FIE_value-option",min:-2,step:.1,max:2,value:(o=h.value)!==null&&o!==void 0?o:xl.value,onChange:function(m){return v("value",m)},style:wm}),y.createElement(zl,{value:(a=h.value)!==null&&a!==void 0?a:xl.value,onChange:function(m){var w=m.target.value;return v("value",w)}}))))},SA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_blur-tool-button",id:de.BLUR,label:n("blurTool"),Icon:AJ,onClick:e,isSelected:r})};SA.defaultProps={isSelected:!1};var j_=0,Sm={blurRadius:0},z_=100,one={width:150,padding:0,margin:0},ane=function(t){var e,r,n=t.t,i=Mh(br.Filters.Blur,Sm),o=Ie(i,2),a=o[0],s=o[1],c=function(d){s({blurRadius:Vr(d,j_,z_)})};return y.createElement(Fl,{className:"FIE_blur-option-wrapper"},y.createElement(Dl,{className:"FIE_blur-option-label"},n("blur")),y.createElement(jl,null,y.createElement(qr,{className:"FIE_blur-option",min:j_,max:z_,width:"124px",value:(e=a.blurRadius)!==null&&e!==void 0?e:Sm.blurRadius,onChange:c,style:one}),y.createElement(zl,{value:(r=a.blurRadius)!==null&&r!==void 0?r:Sm.blurRadius,onChange:function(h){var C=h.target.value;return c(C)}})))},bA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_warmth-tool-button",id:de.WARMTH,label:n("warmthTool"),Icon:SJ,onClick:e,isSelected:r})};bA.defaultProps={isSelected:!1};var $_=0,bm={warmth:0},B_=200,sne={width:150,padding:0,margin:0},lne=function(t){var e,r,n=t.t,i=Mh(G7,bm),o=Ie(i,2),a=o[0],s=o[1],c=function(d){s({warmth:Vr(d,$_,B_)})};return y.createElement(Fl,{className:"FIE_warmth-option-wrapper"},y.createElement(Dl,{className:"FIE_warmth-option-label"},n("warmthTool")),y.createElement(jl,null,y.createElement(qr,{className:"FIE_warmth-option",min:$_,max:B_,width:"124px",value:(e=a.warmth)!==null&&e!==void 0?e:bm.warmth,onChange:c,style:sne}),y.createElement(zl,{value:(r=a.warmth)!==null&&r!==void 0?r:bm.warmth,onChange:function(h){var C=h.target.value;return c(C)}})))},cne=Z.div.withConfig({componentId:"sc-1nr0bka-0"})(["max-width:680px;min-width:150px;position:relative;overflow:hidden;touch-action:pan-y pinch-zoom;"]),une=Z.ul.withConfig({componentId:"sc-1nr0bka-1"})(["padding:0;margin:0;white-space:nowrap;overflow:hidden;"]),dne=Z.li.withConfig({componentId:"sc-1nr0bka-2"})(["padding:4px;display:inline-block;list-style-type:none;user-select:none;"]),_A=X(["position:absolute;top:0;height:100%;width:60px;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:1;svg{color:",";}"],function(t){var e=t.theme.palette;return e[M.IconsSecondary]}),hne=Z.div.withConfig({componentId:"sc-1nr0bka-3"})([""," left:0;justify-content:flex-start;background:linear-gradient( 90deg,#ffffff 1.56%,rgba(255,255,255,0.89) 52.4%,rgba(255,255,255,0.532165) 76.04%,rgba(255,255,255,0) 100% );"],_A),fne=Z.div.withConfig({componentId:"sc-1nr0bka-4"})([""," right:0;justify-content:flex-end;background:linear-gradient( 270deg,#ffffff 1.56%,rgba(255,255,255,0.89) 52.4%,rgba(255,255,255,0.532165) 76.04%,rgba(255,255,255,0) 100% );"],_A),R3=function(t){var e=t.children,r=t.style,n=t.className,i=G.useRef(!1),o=G.useRef(),a=K7(),s=Ie(a,1),c=s[0],d=G.useState(!1),h=Ie(d,2),C=h[0],v=h[1],g=G.useState(!1),m=Ie(g,2),w=m[0],x=m[1],b=G.Children.toArray(e),O=function(){if(o.current){var R=o.current,k=R.scrollWidth,N=R.offsetWidth,T=R.scrollLeft,D=Math.round(k-N),z=Math.round(D-T);v(0<T),x(0<z)}},f=function(R,k){var N=R.findIndex(function(T){return T.classList.contains("FIE_carousel-item")});N!==-1&&(R[N].scrollIntoView({inline:k,behavior:"smooth",block:"nearest"}),setTimeout(function(){O()},500))},S=function(R){if(i.current){var k,N=(((k=R.touches)===null||k===void 0?void 0:k[0])||R).pageX;o.current.scrollBy(i.current-N,0),i.current=N,y3(O,30)()}},E=function(){i.current=null,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",S),document.removeEventListener("touchcancel",E),document.removeEventListener("touchend",E)},I=function(R){var k;i.current=(((k=R.touches)===null||k===void 0?void 0:k[0])||R).pageX,document.addEventListener("mousemove",S),document.addEventListener("mouseup",E),document.addEventListener("touchmove",S),document.addEventListener("touchcancel",E),document.addEventListener("touchend",E)};return G.useEffect(function(){o.current&&c(o.current,O)},[]),y.createElement(cne,{className:"".concat(n,"-wrapper"),style:r,onMouseDown:I,onTouchStart:I},C&&y.createElement(hne,{className:"FIE_carousel-prev-button",onClick:function(k){var N=r6(),T=N.topOffset,D=N.leftOffset,z=document.elementsFromPoint(k.pageX+k.currentTarget.offsetWidth-D,k.pageY-T);f(z,"end")}},y.createElement(QI,null)),y.createElement(une,{className:"".concat(n,"-items"),ref:o},b.map(function(R){return y.createElement(dne,{className:"".concat(n,"-item-wrapper FIE_carousel-item"),key:R.key},R)})),w&&y.createElement(fne,{className:"FIE_carousel-next-button",onClick:function(k){var N=r6(),T=N.topOffset,D=N.leftOffset,z=document.elementsFromPoint(k.pageX-k.currentTarget.offsetWidth-D,k.pageY-T);f(z,"start")}},y.createElement(dJ,null)))};R3.defaultProps={style:null};var pne=Z.div.withConfig({componentId:"sc-oxugzy-0"})(["display:inline-flex;flex-direction:column;align-items:center;justify-content:center;padding:0px 2px;gap:6px;cursor:pointer;border-radius:2px;canvas{border-radius:2px;}"]),gne=Z(sT).withConfig({componentId:"sc-oxugzy-1"})(["[aria-selected='true'] &{padding:1px;border:1px solid ",";border-radius:2px;}"],function(t){var e=t.theme;return e.palette["accent-primary-active"]}),mne=Z(qt).withConfig({componentId:"sc-oxugzy-2"})(function(t){var e=t.theme;return X(["color:",";",";[aria-selected='true'] &{color:",";}"],e.palette[M.TextPrimary],e.typography.font[ke.LabelExtraSmallUp],e.palette["accent-primary-active"])}),pf=60,gf=45,xA=function(t){var e=t.filterLabel,r=t.filterFn,n=t.applyFilter,i=t.isActive,o=t.image,a=G.useRef(),s=G.useCallback(function(){n(r)},[r]),c=G.useCallback(function(){a.current?a.current.cache():setTimeout(c,0)},[]);G.useEffect(function(){return o&&c(),function(){var g;(g=a.current)===null||g===void 0||g.clearCache()}},[o]);var d=o.width/o.height,h=1>d,C=h?pf:gf*d,v=h?pf/d:gf;return y.createElement(pne,{className:"FIE_filters-item",onClick:s,"aria-selected":i},y.createElement(gne,{className:"FIE_filters-item-preview",width:pf,height:gf},y.createElement(j8,{onTap:s},y.createElement(bg,{image:o,filters:r?[r]:[],width:C,height:v,x:-(C-pf)/2,y:-(v-gf)/2,ref:a}))),y.createElement(mne,{className:"FIE_filters-item-label"},e))};xA.defaultProps={filterFn:void 0};const vne=G.memo(xA);var mf=br.Filters,yne=[{label:"Original",filterFn:null},{label:"Invert",filterFn:mf.Invert},{label:"Black & White",filterFn:n7},{label:"Sepia",filterFn:mf.Sepia},{label:"Solarize",filterFn:mf.Solarize},{label:"Clarendon",filterFn:i7},{label:"Gingham",filterFn:o7},{label:"Moon",filterFn:a7},{label:"Lark",filterFn:s7},{label:"Reyes",filterFn:l7},{label:"Juno",filterFn:c7},{label:"Slumber",filterFn:u7},{label:"Crema",filterFn:d7},{label:"Ludwig",filterFn:h7},{label:"Aden",filterFn:f7},{label:"Perpetua",filterFn:p7},{label:"Amaro",filterFn:g7},{label:"Mayfair",filterFn:m7},{label:"Rise",filterFn:v7},{label:"Hudson",filterFn:y7},{label:"Valencia",filterFn:C7},{label:"X-Pro II",filterFn:w7},{label:"Sierra",filterFn:S7},{label:"Willow",filterFn:b7},{label:"Lo-Fi",filterFn:_7},{label:"Inkwell",filterFn:mf.Grayscale},{label:"Hefe",filterFn:x7},{label:"Nashville",filterFn:E7},{label:"Stinson",filterFn:O7},{label:"Vesper",filterFn:P7},{label:"Earlybird",filterFn:k7},{label:"Brannan",filterFn:T7},{label:"Sutro",filterFn:I7},{label:"Toaster",filterFn:A7},{label:"Walden",filterFn:L7},{label:"1977",filterFn:M7},{label:"Kelvin",filterFn:R7},{label:"Maven",filterFn:N7},{label:"Ginza",filterFn:F7},{label:"Skyline",filterFn:D7},{label:"Dogpatch",filterFn:j7},{label:"Brooklyn",filterFn:z7},{label:"Helena",filterFn:$7},{label:"Ashby",filterFn:B7},{label:"Charmes",filterFn:H7}],Cne={maxWidth:"100%",width:"100%"},wne=function(){var t=Ye(),e=t.originalImage,r=ZX(),n=Ie(r,2),i=n[0],o=n[1];return y.createElement(R3,{className:"FIE_filters",style:Cne},yne.map(function(a){return y.createElement(vne,{key:a.label,filterLabel:a.label,filterFn:a.filterFn,applyFilter:o,isActive:i===a.filterFn,image:e})}))},EA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_text-tool-button",id:de.TEXT,label:n("textTool"),Icon:UI,onClick:e,isSelected:r})};EA.defaultProps={isSelected:!1};var Sne=Z.div.withConfig({componentId:"sc-qvjmv1-0"})(["display:flex;align-items:center;justify-content:center;padding:8px 16px;margin-top:4px;gap:8px;flex-wrap:wrap;"," svg{color:",";}"],function(t){var e=t.isPhoneScreen;return e&&`
max-width: 315px;
padding: 0;
`},function(t){var e=t.theme.palette;return e[M.IconsPrimary]}),bne=Z.div.withConfig({componentId:"sc-qvjmv1-1"})(["display:flex;flex-wrap:wrap;margin-left:-4px;gap:4px;.FIE_annotation-option-triggerer{padding:6px;}"]),V2=Z.div.withConfig({componentId:"sc-qvjmv1-2"})(["background:",";border-radius:4px;display:flex;flex-direction:column;padding:8px 12px;overflow:visible;"," "," *{font-family:'Roboto',sans-serif;}"],function(t){var e=t.theme;return e.palette["bg-secondary"]},function(t){var e=t.position;return e&&`
display: grid;
grid-template-columns: repeat(4, auto);
padding: 0;
margin-top: 8px;
box-shadow: 0px 1px 2px `.concat(function(r){var n=r.theme;return n.palette["light-shadow"]},`;
`)},function(t){var e=t.disablePadding;return e&&`
padding: 0;
`}),tl=Z.div.withConfig({componentId:"sc-qvjmv1-3"})(["display:flex;align-items:center;gap:12px;",""],function(t){var e=t.preventFlex;return e&&`
display: block;
label {
margin-bottom: 8px;
}
`}),H_=Z.div.withConfig({componentId:"sc-qvjmv1-4"})(["display:flex;align-items:center;justify-content:space-between;"]),vf=Z.div.withConfig({componentId:"sc-qvjmv1-5"})(["&:not(:first-child){margin-left:12px;}"]),Ps=Z.div.withConfig({componentId:"sc-qvjmv1-6"})(function(t){var e=t.theme,r=t.addThinBorder,n=t.secondaryIconColor,i=t.active,o=t.watermarkTool;return`
cursor: pointer;
padding: `.concat(o?"6px":"8px 12px",`;
border-radius: 2px;
display: flex;
justify-content: center;
align-items: center;
gap: 6px;
svg {
vertical-align: middle;
margin: 0 auto;
}
`).concat(r?"border: 0.5px solid ".concat(e.palette["borders-secondary"],`;
padding: 8px 8px;`):"",`;
color: `).concat(n?e.palette[M.IconsSecondary]:"",`;
`).concat(i&&`
border-radius: 4px;
border-color: `.concat(e.palette[M.AccentStateless],`;
background-color: `).concat(e.palette[M.BackgroundActive],`;
* {
color: `).concat(e.palette[M.AccentStateless],`;
}
`),`
:hover {
background: `).concat(e.palette["bg-primary-active"],`;
}
`)}),OA=Z(qt).withConfig({componentId:"sc-qvjmv1-7"})(["color:",";"],function(t){var e=t.theme.palette;return e[M.TextPrimary]}),_ne=0,xne=1,Ene=function(t){var e=t.annotation,r=t.updateAnnotation,n=t.t,i=e.opacity,o=Math.round(100*i);return y.createElement(V2,{disablePadding:!0},y.createElement(qt,null,n("transparency")),y.createElement(tl,null,y.createElement(qr,{annotation:"%",onChange:function(s){r({opacity:Vr(s/100,_ne,xne)})},value:o,noMargin:!0}),y.createElement(OA,null,"".concat(o,"%"))))},One=Z(M3).withConfig({componentId:"sc-7tf41j-0"})(["max-width:350px;"]),Pne=Z.div.withConfig({componentId:"sc-7tf41j-1"})([".SfxColorPicker-root{max-width:100%;padding:0;box-shadow:none;border:none;","}.SfxColorPicker-action{display:flex;gap:12px;.SfxColorPicker-select{width:100px;}.SfxInput-root{width:190px !important;}}.SfxColorPicker-icon{color:",";}.SfxColorPicker-range-picker,.SfxColorPicker-bar-wrapper{width:100%;}"],function(t){var e=t.hideModalTitle;return e&&"padding-top: 12px;"},function(t){var e=t.theme.palette;return e[M.IconsPrimary]}),kne=Z(Dh).withConfig({componentId:"sc-7tf41j-2"})(["gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}"]),_m={ColorPickerModal:One,ColorPickerWrap:Pne,ModalActions:kne},Tne={zIndex:1301},PA=function(t){var e=t.hideModalTitle,r=t.defaultColor,n=r===void 0?"":r,i=t.onChange,o=t.open,a=t.pinnedColors,s=t.onClose,c=t.onApply,d=Ye(),h=d.t;return o?y.createElement(_m.ColorPickerModal,{onClose:s,open:o,fullWidth:!0,modalStyles:Tne},!e&&y.createElement($h,{onClose:s,primary:h("colorPickerModalTitleLabel","Pick color"),icon:y.createElement(QJ,{size:29}),iconShadow:!0,variant:"with-icon"}),y.createElement(jh,null,y.createElement(_m.ColorPickerWrap,{hideModalTitle:e},y.createElement(d9,{onChange:i,pinnedColors:a,defaultColor:n,showTransparentColor:!0}))),y.createElement(_m.ModalActions,null,y.createElement(Ei,{color:"basic",onClick:s},h("cancel")),y.createElement(Ei,{color:"primary",onClick:c},h("apply")))):null};PA.defaultProps={defaultColor:"",pinnedColors:[],onChange:function(){},open:!1,hideModalTitle:!1,onClose:function(){},onApply:function(){}};var Ine=Z.div.attrs(function(t){var e=t.$color;return{style:{background:e==="rgba(0,0,0,0)"?"repeating-conic-gradient(#5d6d7e 0% 25%, transparent 0% 50%) 50% / 8px 8px":e}}}).withConfig({componentId:"sc-zmv0gj-0"})(["background:",";border-radius:4px;width:32px;height:32px;border:1px solid ",";cursor:pointer;box-sizing:border-box;"],function(t){var e=t.theme;return e.palette["icons-primary"]},function(t){var e=t.theme;return e.palette[M.BorderPrimaryStateless]}),xm="FIE_pinnedColors",N3=function(t){var e,r=t.onChange,n=t.color,i=t.colorFor,o=Ye(),a=o.selectionsIds,s=a===void 0?[]:a,c=o.config.annotationsCommon,d=c===void 0?{}:c,h=o.dispatch,C=o.latestColors,v=C===void 0?{}:C,g=v[i],m=G.useState(),w=Ie(m,2),x=w[0],b=w[1],O=G.useState(function(){return g||n||d.fill}),f=Ie(O,2),S=f[0],E=f[1],I=G.useState((e=window)!==null&&e!==void 0&&e.localStorage?JSON.parse(localStorage.getItem(xm)||"[]"):[]),R=Ie(I,2),k=R[0],N=R[1],T=G.useRef(S),D=function(B){var Y;if((Y=window)!==null&&Y!==void 0&&Y.localStorage){var W=window.localStorage.getItem(xm);if(JSON.stringify(B)!==W){var q=B.slice(-9);window.localStorage.setItem(xm,JSON.stringify(q)),N(q)}}},z=function(B){b(x?null:B.currentTarget)};return G.useEffect(function(){var B=s.length===0&&g||n;E(B),r(B)},[n,s]),y.createElement(y.Fragment,null,y.createElement(Ine,{className:"FIE_color-picker-triggerer",onClick:z,$color:S,onChange:r}),y.createElement(PA,{hideModalTitle:!0,onChange:function(Y,W,q){E(W),r(W),D(q),g!==W&&h({type:YA,payload:{latestColors:A({},i,W)}})},defaultColor:S,pinnedColors:k,open:!!x,onClose:function(Y){r(T.current||S),z(Y)},onApply:z}))};N3.defaultProps={color:void 0};var Ane=0,Lne=100,Mne=function(t){var e=t.annotation,r=t.updateAnnotation,n=e.stroke,i=e.strokeWidth;return y.createElement(tl,null,y.createElement(qr,{annotation:"px",onChange:function(a){r({strokeWidth:Vr(a,Ane,Lne)})},value:i,noMargin:!0}),y.createElement(N3,{color:n,onChange:function(a){r({stroke:a})},colorFor:"stroke"}))},Rne=function(t){var e=t.annotation,r=t.updateAnnotation,n=t.t,i=e.shadowOffsetX,o=e.shadowOffsetY,a=e.shadowBlur,s=e.shadowColor,c=e.shadowOpacity,d=function(h,C){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0,g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:100;r(A({},h,Vr(C,v,g)))};return y.createElement(tl,{preventFlex:!0},y.createElement(qt,null,n("shadow")),y.createElement(H_,null,y.createElement(vf,null,y.createElement(qt,null,n("horizontal")),y.createElement(qr,{annotation:"px",min:-100,max:100,onChange:function(C){return d("shadowOffsetX",C,-100,100)},value:i||0,hideTrack:!0})),y.createElement(vf,null,y.createElement(qt,null,n("vertical")),y.createElement(qr,{annotation:"px",min:-100,max:100,onChange:function(C){return d("shadowOffsetY",C,-100,100)},value:o||0,hideTrack:!0}))),y.createElement(H_,null,y.createElement(vf,null,y.createElement(qt,null,n("blur")),y.createElement(qr,{annotation:"%",onChange:function(C){return d("shadowBlur",C)},value:a})),y.createElement(vf,null,y.createElement(qt,null,n("opacity")),y.createElement(qr,{annotation:"%",onChange:function(C){return d("shadowOpacity",C/100,0,1)},value:Math.round(100*c)}))),y.createElement(N3,{color:s,onChange:function(C){r({shadowColor:C})},colorFor:"shadow"}))},Nne=function(t,e,r){var n=t.width,i=t.height,o=t.scaleX,a=o===void 0?1:o,s=t.scaleY,c=s===void 0?1:s,d=t.rotation,h=d===void 0?0:d,C=t.padding,v=C===void 0?0:C,g=t.radius,m=t.radiusX,w=t.radiusY,x=Ms((n||2*(g||m))*a,(i||2*(g||w))*c,h),b=e.attrs,O=b.clipWidth,f=b.clipHeight,S=b.clipX,E=S===void 0?0:S,I=b.clipY,R=I===void 0?0:I,k={left:E+x.offsetLeft+v,center:E+O/2-(x.width/2-x.offsetLeft)+v,right:E+O-x.width-v+x.offsetLeft},N={top:R+x.offsetTop+v,middle:R+f/2-(x.height/2-x.offsetTop)+v,bottom:R+f-x.height-v+x.offsetTop},T=A(A(A(A(A(A(A(A(A({},Hr.TOP_LEFT,function(){return{x:k.left,y:N.top}}),Hr.TOP_CENTER,function(){return{x:k.center,y:N.top}}),Hr.TOP_RIGHT,function(){return{x:k.right,y:N.top}}),Hr.MIDDLE_LEFT,function(){return{x:k.left,y:N.middle}}),Hr.MIDDLE_CENTER,function(){return{x:k.center,y:N.middle}}),Hr.MIDDLE_RIGHT,function(){return{x:k.right,y:N.middle}}),Hr.BOTTOM_LEFT,function(){return{x:k.left,y:N.bottom}}),Hr.BOTTOM_CENTER,function(){return{x:k.center,y:N.bottom}}),Hr.BOTTOM_RIGHT,function(){return{x:k.right,y:N.bottom}});return T[r]()},G_=Object.values(Hr),Fne=A(A(A(A(A(A(A(A(A({},Hr.TOP_LEFT,-145),Hr.TOP_CENTER,-90),Hr.TOP_RIGHT,-45),Hr.MIDDLE_LEFT,180),Hr.MIDDLE_CENTER,0),Hr.MIDDLE_RIGHT,0),Hr.BOTTOM_LEFT,135),Hr.BOTTOM_CENTER,90),Hr.BOTTOM_RIGHT,45),fa={OPACITY:"opacity",STROKE:"stroke",SHADOW:"shadow",POSITION:"position"},Dne=function(t){var e=t.annotation,r=t.updateAnnotation,n=G.useState(null),i=Ie(n,2),o=i[0],a=i[1],s=Ye(),c=s.designLayer,d=function(C){r(Nne(e,c,C)),a(C)},h=G_.length;return G_.map(function(C,v){return y.createElement(G.Fragment,{key:C},y.createElement(Ps,{onClick:function(){return d(C)},active:o===C,secondaryIconColor:!0,addThinBorder:!0},C===Hr.MIDDLE_CENTER?y.createElement(bQ,null):y.createElement(nJ,{style:{transform:"rotate(".concat(Fne[C],"deg)")}})),(v+1)%3==0&&v+1!==h&&y.createElement("div",null))})},jne=["children","morePoppableOptionsPrepended","moreOptionsPopupComponentsObj","morePoppableOptionsAppended","annotation","updateAnnotation","hideFillOption","hidePositionField","className"];function V_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function U_(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?V_(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):V_(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Ga=function(t){var e=t.children,r=t.morePoppableOptionsPrepended,n=t.moreOptionsPopupComponentsObj,i=t.morePoppableOptionsAppended,o=t.annotation,a=t.updateAnnotation,s=t.hideFillOption,c=t.hidePositionField,d=t.className,h=ve(t,jne),C=G.useState(null),v=Ie(C,2),g=v[0],m=v[1],w=G.useState(null),x=Ie(w,2),b=x[0],O=x[1],f=Ye(),S=f.config.useCloudimage,E=f.t,I=_o(320),R=G.useMemo(function(){return[].concat(cr(r),[{titleKey:"opacity",name:fa.OPACITY,Icon:BQ}],cr(S?[]:[{titleKey:"stroke",name:fa.STROKE,Icon:zQ},{titleKey:"shadow",name:fa.SHADOW,Icon:GQ}]),[c?void 0:{titleKey:"position",name:fa.POSITION,Icon:XQ}])},[r]),k=G.useMemo(function(){return U_(U_({},n),{},A(A(A(A({},fa.OPACITY,Ene),fa.STROKE,Mne),fa.SHADOW,Rne),fa.POSITION,Dne),i)},[n]),N=G.useCallback(function(z,B){var Y=z==null?void 0:z.currentTarget;m(Y),O(B)},[]),T=G.useCallback(function(z){a({fill:z})},[a]),D=g&&b&&k[b];return y.createElement(Sne,{className:"FIE_annotations-options".concat(d?" ".concat(d):""),isPhoneScreen:I},!s&&y.createElement(N3,{color:o.fill,onChange:T,colorFor:"fill"}),e,y.createElement(bne,null,R.map(function(z){return z&&y.createElement(Ps,{className:"FIE_annotation-option-triggerer",key:z.name,title:E(z.titleKey),onClick:function(Y){return N(Y,z.name)},active:b===z.name},y.createElement(z.Icon,{size:20}))})),D&&y.createElement(Ha,{className:"FIE_annotation-option-popup",anchorEl:g,open:!!g,onClose:N,position:"top"},y.createElement(V2,null,b===fa.POSITION?function(){return y.createElement(y.Fragment,null,y.createElement(qt,null,E("position")),y.createElement(V2,{position:!0},y.createElement(D,he({annotation:o,updateAnnotation:a},h))))}():y.createElement(D,he({annotation:o,updateAnnotation:a},h)))))};Ga.defaultProps={children:void 0,morePoppableOptionsPrepended:[],moreOptionsPopupComponentsObj:{},morePoppableOptionsAppended:[],hideFillOption:!1,hidePositionField:!1,className:void 0};var zne=Z(Fh).withConfig({componentId:"sc-1cwdnjz-0"})(["width:160px;"]),$ne=Z(Yl).withConfig({componentId:"sc-1cwdnjz-1"})(["width:72px;"]),Bne=Z.div.withConfig({componentId:"sc-1cwdnjz-2"})(["display:flex;"]),Hne=0,Gne=100,W_=1,Vne=function(t){var e=t.annotation,r=t.updateAnnotation,n=t.t,i=e.letterSpacing,o=e.lineHeight,a=function(s,c){r(A({},s,Vr(c,Hne,Gne)))};return y.createElement(tl,{preventFlex:!0},y.createElement(qt,null,n("letterSpacing")),y.createElement(qr,{annotation:"px",isActive:!!i,onChange:function(c){return a("letterSpacing",c)},value:i,step:W_}),y.createElement(qt,null,n("lineHeight")),y.createElement(qr,{annotation:"px",isActive:!!o,onChange:function(c){return a("lineHeight",c)},value:o,step:W_}))},Une={transform:"scaleX(-1)"},Wne=function(t){var e=t.annotation,r=t.updateAnnotation,n=e.align,i=function(o){r({align:o})};return y.createElement(tl,null,y.createElement(Ps,{onClick:function(){return i("left")},active:n==="left"},y.createElement(h_,null)),y.createElement(Ps,{onClick:function(){return i("center")},active:n==="center"},y.createElement(WI,null)),y.createElement(Ps,{onClick:function(){return i("right")},active:n==="right"},y.createElement(h_,{style:Une})))},Xne=[{titleKey:"textAlignment",name:"text-alignment",Icon:WI},{titleKey:"textSpacings",name:"text-spacings",Icon:YQ}],Kne=A(A({},"text-alignment",Wne),"text-spacings",Vne),et,$t,G0,s6,l6,kA=function(t){if(t.target!==et){var e=et.value;U2(),s6(e)}},U2=function(){et&&et.remove(et),window&&window.removeEventListener("click",kA),$t&&$t.show(),G0&&G0.show(),typeof l6=="function"&&l6(),$t=null,et=null,G0=null},Yne=function(t,e,r,n,i){function o(C){var v=C;v||(v=$t.placeholder.length*$t.fontSize());var g=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);(g||h)&&(v=Math.ceil(v));var m=document.documentMode||/Edge/.test(navigator.userAgent);m&&(v+=1),et.style.width="".concat(v,"px")}s6=n,l6=i,G0=r,$t=e.findOne("#".concat(t)),$t.hide(),G0.hide();var a=$t.absolutePosition();et=document.createElement("textarea"),e.container().parentNode.appendChild(et),et.value=$t.text(),et.style.position="absolute",et.style.top="".concat(a.y,"px"),et.style.left="".concat(a.x,"px"),et.style.width="".concat($t.width()-2*$t.padding(),"px"),et.style.height="".concat($t.height()-2*$t.padding()+5,"px"),et.style.maxWidth="".concat($t.width()-2*$t.padding(),"px"),et.style.maxHeight="".concat($t.height()-2*$t.padding()+5,"px"),et.style.fontSize="".concat($t.fontSize(),"px"),et.style.border="1px solid rgba(0, 0, 0, 0.5)",et.style.padding="0px",et.style.margin="0px",et.style.overflow="hidden",et.style.background="none",et.style.outline="none",et.style.resize="none",et.style.lineHeight=$t.lineHeight(),et.style.fontFamily=$t.fontFamily(),et.style.transformOrigin="left top",et.style.textAlign=$t.align(),et.style.fontStyle=$t.fontStyle(),et.style.letterSpacing=$t.letterSpacing(),et.style.lineHeight=$t.lineHeight(),et.style.color=$t.fill();var s=$t.rotation(),c="";s&&(c+="rotateZ(".concat(s,"deg)"));var d=0,h=-1<navigator.userAgent.toLowerCase().indexOf("firefox");h&&(d+=2+Math.round($t.fontSize()/20)),c+="translateY(-".concat(d,"px)"),et.style.transform=c,et.style.height="auto",et.style.height="".concat(et.scrollHeight+3,"px"),et.focus(),et.addEventListener("keydown",function(C){if(C.key==="Enter"&&!C.shiftKey){var v=et.value;U2(),s6(v)}C.key==="Escape"&&U2()}),et.addEventListener("keydown",function(C){if(C.key!=="Enter"&&C.key!=="Escape"){var v=$t.getAbsoluteScale().x;o($t.width()*v),et.style.height="auto",et.style.height="".concat(et.scrollHeight+$t.fontSize(),"px")}}),window&&setTimeout(function(){window.addEventListener("click",kA)})},P9=function(t){var e=t.text,r=t.saveText,n=t.children,i=Ye(),o=i.dispatch,a=i.textIdOfEditableContent,s=i.designLayer,c=i.t,d=i.config,h=d.useCloudimage,C=d[de.TEXT],v=C.fonts,g=v===void 0?[]:v,m=C.onFontChange,w=G.useCallback(function(S){var E=S.target,I=E.name,R=E.value,k=E.type;r(function(N){return A({id:N.id},I,k==="number"?Vr(R,1,500):R)})},[r]),x=G.useCallback(function(S){if(w({target:{name:"fontFamily",value:S}}),e.fontFamily!==S&&typeof m=="function"){var E=s.draw.bind(s);m(S,E)}},[w,e,s]),b=G.useCallback(function(S){var E,I=((E=e.fontStyle)===null||E===void 0?void 0:E.replace("normal","").split(" "))||[];0<Object.keys(I).length&&I.includes(S)?I=I.filter(function(R){return R!==S}):I.push(S),w({target:{name:"fontStyle",value:I.join(" ").trim()||"normal"}})},[e]),O=G.useCallback(function(){o({type:R9,payload:{textIdOfEditableContent:null}})},[]),f=G.useCallback(function(S){w({target:{name:"text",value:S}}),O()},[]);return G.useEffect(function(){var S;if(a&&e.id===a){var E=s.getStage(),I=Ie(E.findOne("#".concat(lT)).children,1);S=I[0],Yne(a,E,S,f,O)}return function(){S&&a&&U2()}},[a]),y.createElement(Ga,{className:"FIE_text-tool-options",annotation:e,updateAnnotation:r,morePoppableOptionsPrepended:h?[]:Xne,moreOptionsPopupComponentsObj:h?{}:Kne,t:c},Array.isArray(g)&&1<g.length&&y.createElement(zne,{className:"FIE_text-font-family-option",onChange:x,value:e.fontFamily,placeholder:c("fontFamily"),size:"sm"},g.map(function(){var S,E,I,R=0<arguments.length&&arguments[0]!==void 0?arguments[0]:"";return y.createElement(wo,{className:"FIE_text-font-family-item",key:(S=R.value)!==null&&S!==void 0?S:R,value:(E=R.value)!==null&&E!==void 0?E:R},(I=R.label)!==null&&I!==void 0?I:R)})),y.createElement($ne,{className:"FIE_text-size-option",value:e.fontSize||"",name:"fontSize",onChange:w,inputMode:"numeric",type:"number",size:"sm",placeholder:c("size")}),y.createElement(Bne,null,!h&&y.createElement(y.Fragment,null,y.createElement(Ps,{className:"FIE_text-bold-option",active:(e.fontStyle||"").includes("bold"),onClick:function(){return b("bold")},watermarkTool:!0},y.createElement(sJ,{size:20})),y.createElement(Ps,{className:"FIE_text-italic-option",active:(e.fontStyle||"").includes("italic"),onClick:function(){return b("italic")},watermarkTool:!0},y.createElement(oJ,{size:20}))),n))};P9.defaultProps={children:null};var Zne=function(t){var e=t.t,r=Zs({name:de.TEXT}),n=Ie(r,2),i=n[0],o=n[1];return y.createElement(P9,{text:i,saveText:o,t:e})},TA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_image-tool-button",id:de.IMAGE,label:n("imageTool"),Icon:YI,onClick:e,isSelected:r})};TA.defaultProps={isSelected:!1};var qne=Z.input.withConfig({componentId:"sc-h20emh-0"})(["display:none;width:1px;height:1px;position:absolute;z-index:-1;"]),Qne=function(t,e){return y.createElement(qne,he({type:"file",ref:e},t))};const IA=G.forwardRef(Qne);var Jne=Z.div.withConfig({componentId:"sc-m9ezm7-0"})(["display:flex;align-items:center;margin-left:",";flex-shrink:0;"],function(t){var e=t.noMargin;return e?"0":"12px"}),eie=Z(Ei).withConfig({componentId:"sc-m9ezm7-1"})(["flex-grow:1;justify-content:center;align-items:center;"]),tie=Z(Ha).withConfig({componentId:"sc-m9ezm7-2"})(["padding:8px;background-color:",";"],function(t){var e=t.theme.palette;return e[M.BackgroundStateless]}),rie=Z(wo).withConfig({componentId:"sc-m9ezm7-3"})(["border-radius:4px;"]),nie=Z(l9).withConfig({componentId:"sc-m9ezm7-4"})(["display:flex;align-items:center;"]),F3=function(t){var e=t.onClick,r=t.title,n=t.label,i=t.color,o=t.menuFromBtn,a=t.menuItems,s=t.menuPosition,c=s===void 0?"bottom":s,d=t.disabled,h=d!==void 0&&d,C=t.className,v=t.menuStyle,g=t.wrapperStyle,m=t.buttonRef,w=t.noMargin,x=Ye(),b=x.t,O=G.useRef(!0),f=G.useState(null),S=Ie(f,2),E=S[0],I=S[1],R="sm",k=a.filter(Boolean),N=1<k.length,T=function(B){O.current&&I(B.currentTarget)},D=function(){O.current&&I(null)},z=function(B){typeof B=="function"&&B(),D()};return G.useEffect(function(){return O.current=!0,function(){O.current=!1}},[]),y.createElement(y.Fragment,null,y.createElement(Jne,{className:"".concat(C,"-wrapper"),style:g,ref:m,noMargin:w},y.createElement(eie,{className:"".concat(C,"-button"),color:i,size:R,title:r,onClick:h?void 0:function(Y){var W;return o&&N?void T(Y):void(typeof e=="function"?e():(W=k[0])!==null&&W!==void 0&&W.onClick&&k[0].onClick())},disabled:h},n||b("saveAs"))),N&&y.createElement(tie,{className:"".concat(C,"-menu"),anchorEl:E,onClose:D,open:!0,style:v,position:c},a.map(function(B){return B&&y.createElement(rie,{className:"".concat(C,"-menu-item"),key:B.key,active:B.isActive,onClick:function(){return z(B.onClick)},size:R},B.icon&&y.createElement(nie,{size:R},typeof B.icon=="string"?y.createElement("span",{dangerouslySetInnerHTML:{__html:B.icon}}):y.createElement(B.icon,null)),y.createElement(O3,null,B.label))})))};F3.defaultProps={title:"",label:"",color:"primary",menuFromBtn:!1,noMargin:!1,menuPosition:"bottom",onClick:void 0,disabled:!1,menuStyle:void 0,wrapperStyle:void 0,buttonRef:void 0};var k9=function(t){var e=t.image,r=t.saveImage,n=t.children,i=t.t;return y.createElement(Ga,{className:"FIE_image-tool-options",annotation:e,updateAnnotation:r,t:i,hideFillOption:!0},n)};k9.defaultProps={children:null};var iie=Z.div.withConfig({componentId:"sc-dqni47-0"})(["background:",";box-shadow:0px 1px 2px ",";border-radius:4px;padding:8px;overflow-y:auto;max-height:350px;max-width:300px;"],function(t){var e=t.theme;return e.palette["bg-secondary"]},function(t){var e=t.theme;return e.palette["light-shadow"]}),oie=Z.div.withConfig({componentId:"sc-dqni47-1"})(["display:inline-flex;align-items:center;justify-content:center;width:60px;height:60px;margin:4px;padding:4px;cursor:pointer;border-radius:4px;border:2px solid ",";user-select:none;:hover{border-color:",";}img{width:100%;height:100%;object-fit:contain;}"],function(t){var e=t.theme;return e.palette["bg-primary-active"]},function(t){var e=t.theme;return e.palette["accent-primary-active"]}),AA=function(t){var e=t.gallery,r=t.anchorEl,n=t.onClose,i=t.onSelect;return y.createElement(E3,{className:"FIE_image-tool-gallery",anchorEl:r,open:!!r,position:"top",onClick:n,overlay:!0},y.createElement(iie,null,e.map(function(o){var a=o.originalUrl,s=o.previewUrl;return y.createElement(oie,{key:a,onClick:function(){return i(a)}},y.createElement("img",{src:s,alt:s,crossOrigin:"Anonymous",draggable:!1}))})))};AA.defaultProps={gallery:[],anchorEl:null};var X_=.15,aie=function(){var t=G.useState(),e=Ie(t,2),r=e[0],n=e[1],i=G.useState(null),o=Ie(i,2),a=o[0],s=o[1],c=G.useRef(),d=G.useRef(),h=Ye(),C=h.shownImageDimensions,v=h.dispatch,g=h.adjustments.crop,m=g===void 0?{}:g,w=h.t,x=h.config,b=x===void 0?{}:x,O=b[de.IMAGE],f=!O.disableUpload,S=Array.isArray(O.gallery)&&0<O.gallery.length,E=Zs({name:de.IMAGE,opacity:1},!1),I=Ie(E,3),R=I[0],k=I[1],N=I[2],T=G.useRef(0),D=function(ee){var K=m.width||C.width,ue=m.height||C.height,ne=m.x||0,ae=m.y||0,J=Math.min(1,K/(ee.width+ee.width*X_),ue/(ee.height+ee.height*X_));N({image:ee,x:ne+K/2-ee.width*J/2,y:ae+ue/2-ee.height*J/2,width:ee.width*J,height:ee.height*J})},z=function(ee){T.current+=1,T.current===ee&&(T.current=0,n(!1))},B=function(ee){v({type:Ys,payload:{feedback:{message:ee,status:Ku.WARNING}}})},Y=function(){c.current&&c.current.click()},W=function(){s(d.current)},q=G.useMemo(function(){return[f&&{key:"add-by-upload-image",label:w(r?"importing":"uploadImage"),icon:qI,onClick:r?void 0:Y},S&&{key:"add-from-gallery",label:w("fromGallery"),icon:cQ,onClick:W}]},[O,r,w]);return y.createElement(k9,{image:R,saveImage:k,t:w},y.createElement(F3,{className:"FIE_image-tool-add-option",color:"secondary",label:w("addImage"),title:w("addImageTitle"),menuPosition:"top",menuItems:q,size:"sm",style:{maxHeight:24},buttonRef:d,menuFromBtn:!0}),f&&y.createElement(IA,{ref:c,onChange:r?void 0:function(K){if(K.target.files){n(!0);var ue=[],ne=Array.from(K.target.files),ae=ne.length;if(ne.forEach(function(Q){if(Q.type.startsWith("image/")){var te=new Image;te.onload=function(){D(te),URL.revokeObjectURL(Q),z(ae)},te.onerror=function(){B(w("uploadImageError")),z(ae)},te.src=URL.createObjectURL(Q)}else ue.push(Q.name),z(ae)}),0<ue.length){var J=1<ue.length?w("areNotImages"):w("isNotImage");B("".concat(ue.join(", ")," ").concat(J," ").concat(w("toBeUploaded"),"."))}}K.target.value=""},disabled:r,multiple:!0}),S&&y.createElement(AA,{gallery:O.gallery,onSelect:function(K){n(!0);var ue=new Image;ue.onload=function(){D(ue),z(1)},ue.onerror=function(){B(w("uploadImageError")),z(1)},ue.crossOrigin="Anonymous",ue.src=K},onClose:function(){s(null)},anchorEl:a}))},LA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_rect-tool-button",id:de.RECT,label:n("rectangleTool"),Icon:nQ,onClick:e,isSelected:r})};LA.defaultProps={isSelected:!1};var K_=0,Y_=150,sie=function(t){var e=t.annotation,r=t.updateAnnotation,n=t.t,i=e.cornerRadius;return y.createElement(tl,null,y.createElement(qt,null,n("cornerRadius")),y.createElement(qr,{annotation:"px",onChange:function(a){r({cornerRadius:Vr(a,K_,Y_)})},value:i,min:K_,max:Y_,noMargin:!0}))},lie=[{titleKey:"cornerRadius",name:"corner-radius",Icon:UQ}],cie=A({},"corner-radius",sie),uie=function(t){var e=t.t,r=Zs({name:de.RECT}),n=Ie(r,2),i=n[0],o=n[1];return y.createElement(Ga,{className:"FIE_rect-tool-options",moreOptionsPopupComponentsObj:cie,morePoppableOptionsPrepended:lie,annotation:i,updateAnnotation:o,t:e})},MA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_ellipse-tool-button",id:de.ELLIPSE,label:n("ellipseTool"),Icon:ZI,onClick:e,isSelected:r})};MA.defaultProps={isSelected:!1};var die=function(t){var e=t.t,r=Zs({name:de.ELLIPSE}),n=Ie(r,2),i=n[0],o=n[1];return y.createElement(Ga,{className:"FIE_ellipse-tool-options",annotation:i,updateAnnotation:o,t:e})},RA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_pen-tool-button",id:de.PEN,label:n("penTool"),Icon:cee,onClick:e,isSelected:r})};RA.defaultProps={isSelected:!1};function Z_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Em(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Z_(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Z_(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var os={passive:!0},hie=function(t){var e=t.t,r=Ye(),n=r.dispatch,i=r.designLayer,o=r.previewGroup,a=r.config,s=Zs(Em(Em(Em({},a.annotationsCommon),a[de.PEN]),{},{name:de.PEN}),!1),c=Ie(s,3),d=c[0],h=c[1],C=c[2],v=G.useRef(null),g=G.useRef({points:[],moved:!1,id:""}),m=G.useCallback(function(){var O=aI(v.current.content),f=Kf(o,O);return[f.offsetX-(i.attrs.xPadding||0),f.offsetY-(i.attrs.yPadding||0)]},[i]),w=G.useCallback(function(){g.current.moved?(g.current.points=g.current.points.concat(m()),n({type:$l,payload:{id:g.current.id,points:g.current.points,dismissHistory:!0}})):(g.current={moved:!0,id:v3(de.PEN),points:[].concat(cr(g.current.points),cr(m()))},C({id:g.current.id,name:de.PEN,points:g.current.points}))},[m]),x=G.useCallback(function(){g.current.id&&a[de.PEN].selectAnnotationAfterDrawing&&n({type:nd,payload:{annotationId:g.current.id}}),g.current=null,v.current.off("mousemove touchmove",w),v.current.off("mouseleave touchcancel",x),document.removeEventListener("mouseup",x,os),document.removeEventListener("touchend",x,os),document.removeEventListener("mouseleave",x,os),document.removeEventListener("touchcancel",x,os)},[w]),b=G.useCallback(function(O){O.target.attrs.draggable||(O.evt.preventDefault(),g.current={points:m()},v.current.on("mousemove touchmove",w),v.current.on("mouseleave touchcancel",x),document.addEventListener("mouseup",x,os),document.addEventListener("touchend",x,os),document.addEventListener("mouseleave",x,os),document.addEventListener("touchcancel",x,os))},[m,w,x]);return G.useEffect(function(){return v.current=i==null?void 0:i.getStage(),v.current&&v.current.on("mousedown touchstart",b),function(){v.current&&v.current.off("mousedown touchstart",b)}},[i]),y.createElement(Ga,{className:"FIE_pen-tool-options",annotation:d,updateAnnotation:h,t:e,hidePositionField:!0,hideFillOption:!0})},NA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_line-tool-button",id:de.LINE,label:n("lineTool"),Icon:qq,onClick:e,isSelected:r})};NA.defaultProps={isSelected:!1};var fie=function(t){var e=t.t,r=Zs({name:de.LINE}),n=Ie(r,2),i=n[0],o=n[1];return y.createElement(Ga,{className:"FIE_line-tool-options",annotation:i,updateAnnotation:o,t:e,hidePositionField:!0,hideFillOption:!0})},FA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_arrow-tool-button",id:de.ARROW,label:n("arrowTool"),Icon:gJ,onClick:e,isSelected:r})};FA.defaultProps={isSelected:!1};var pie=function(t){var e=t.t,r=Zs({name:de.ARROW}),n=Ie(r,2),i=n[0],o=n[1];return y.createElement(Ga,{className:"FIE_arrow-tool-options",annotation:i,updateAnnotation:o,t:e,hidePositionField:!0,hideFillOption:!0})},DA=function(t){var e=t.selectTool,r=t.isSelected,n=t.t;return y.createElement(Qr,{className:"FIE_polygon-tool-button",id:de.POLYGON,label:n("polygonTool"),Icon:JQ,onClick:e,isSelected:r})};DA.defaultProps={isSelected:!1};var q_=3,Q_=25,gie=function(t){var e=t.annotation,r=t.updateAnnotation,n=t.t,i=e.sides;return y.createElement(tl,null,y.createElement(qt,null,n("sides")),y.createElement(qr,{annotation:"",onChange:function(a){r({sides:Vr(a,q_,Q_)})},value:i,min:q_,max:Q_,noMargin:!0}))},mie=[{titleKey:"sides",name:"sides-number",Icon:tJ}],vie=A({},"sides-number",gie),yie=function(t){var e=t.t,r=Zs({name:de.POLYGON}),n=Ie(r,2),i=n[0],o=n[1];return y.createElement(Ga,{className:"FIE_polygon-tool-options",morePoppableOptionsPrepended:mie,moreOptionsPopupComponentsObj:vie,annotation:i,updateAnnotation:o,t:e,hidePositionField:!0})};function J_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ex(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?J_(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):J_(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var jA=function(t,e,r,n){var i=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0;if(t.width&&t.height)return t;var o=j2(e,r,n),a=Ms(o.width,o.height,i);return t.width||t.height?{width:t.width||a.width,height:t.height||a.height}:a.width&&a.height&&a||ex(ex({},n),Ms(n.width,n.height,i))},Cie=Z.div.withConfig({componentId:"sc-17otqpz-0"})(["display:flex;justify-content:",";align-items:flex-end;gap:3px;flex-wrap:wrap;"],function(t){var e=t.alignment;return e||"center"}),tx=Z(A3).withConfig({componentId:"sc-17otqpz-1"})(function(t){var e=t.theme;return X(["width:106px;max-width:106px;margin-top:4px;.SfxInput-Base{width:100%;min-width:100%;max-width:100%;}span{color:",";",";}"],e.palette[M.TextSecondary],e.typography.font[ke.LabelMedium])}),wie=Z(Yo).withConfig({componentId:"sc-17otqpz-2"})(["svg{margin-bottom:1px;}"]),Sie=Z(Yo).withConfig({componentId:"sc-17otqpz-3"})(["margin-left:12px;"]);function rx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function nx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?rx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):rx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var T9=function(t){var e=t.onChange,r=t.currentSize,n=t.hideResetButton,i=t.alignment,o=Ye(),a=o.dispatch,s=o.originalImage,c=o.resize,d=o.shownImageDimensions,h=o.adjustments,C=h.crop,v=h.rotation,g=v===void 0?0:v,m=o.theme,w=o.t,x=function(I){var R,k=I.target,N=k.name,T=k.value;if(!(1>parseFloat(T))){var D=Math.min(10*s.width,10*s.height),z=Ms(s.width,s.height,g),B=A({},N,T&&Vr(T,0,D)),Y=N==="height",W=Y?"width":"height",q=(R=r.ratioUnlocked)!==null&&R!==void 0?R:c.ratioUnlocked;if(!q){var ee=z.width/z.height;B[W]=Math.round(Y?B[N]*ee:B[N]/ee)}if(B[N]!==c[N]||B[W]!==c[W]){if(typeof e=="function")return void e(B);a({type:Mu,payload:B});var K=C.width&&C.height&&C||d,ue=nx(nx({},c),B);a({type:id,payload:{factor:ue.width&&ue.height?G2(K,ue):Co,isAbsoluteZoom:!0}})}}},b=typeof c.width>"u"&&typeof c.height>"u"||s.width===c.width&&s.height===c.height,O=jA((r.width||r.height)&&r||c,C,d,s,g),f=c.manualChangeDisabled,S=typeof c.width<"u"&&!c.width,E=typeof c.height<"u"&&!c.height;return y.createElement(Cie,{className:"FIE_resize-tool-options",alignment:i},y.createElement(tx,{className:"FIE_resize-width-option",value:S?"":O.width,name:"width",onChange:f?void 0:x,inputMode:"numeric",title:w("resizeWidthTitle"),label:w("width"),inputProps:{type:"number"},size:"sm",iconEnd:"px",placeholder:"Width",disabled:f}),y.createElement(wie,{className:"FIE_resize-ratio-locker",title:w("toggleRatioLockTitle"),onClick:f?void 0:function(){return typeof e=="function"?void e({ratioUnlocked:!r.ratioUnlocked}):void a({type:Mu,payload:{ratioUnlocked:!c.ratioUnlocked}})},color:"basic",size:"sm",disabled:f},r.ratioUnlocked||c.ratioUnlocked?y.createElement(wQ,{size:16,color:m.palette.success}):y.createElement(yQ,{size:16,color:m.palette.error})),y.createElement(tx,{className:"FIE_resize-height-option",value:E?"":O.height,name:"height",onChange:f?void 0:x,inputMode:"numeric",title:w("resizeHeightTitle"),label:w("height"),inputProps:{type:"number"},size:"sm",iconEnd:"px",placeholder:"Height",disabled:f}),!n&&y.createElement(Sie,{className:"FIE_resize-reset-button",size:"sm",color:"basic",onClick:b||f?void 0:function(){a({type:Mu,payload:{width:void 0,height:void 0,ratioUnlocked:!1}});var R=C.width&&C.height&&C||d;a({type:id,payload:{factor:G2(R,R)}})},disabled:b||f},y.createElement(VI,null)))};T9.defaultProps={onChange:void 0,currentSize:{},hideResetButton:!1,alignment:"center"};var bie=Z.div.withConfig({componentId:"sc-fvaj5j-0"})(["display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;overflow:hidden;",";"],function(t){var e=t.noWrap;return e?"flex-wrap: nowrap;":""}),ix=Z.div.withConfig({componentId:"sc-fvaj5j-1"})(["margin-bottom:8px;"]),_ie=Z.div.withConfig({componentId:"sc-fvaj5j-2"})(function(t){var e=t.theme;return`
padding: 6px 4px;
border: 1px solid `.concat(e.palette["borders-secondary"],`;
width: fit-content;
height: 32px;
border-radius: 2px;
overflow: hidden;
cursor: pointer;
border-radius: 4px;
:hover {
background: `).concat(e.palette["bg-primary-active"],`;
}
&[aria-selected='true'] {
background: `).concat(e.palette["bg-primary-active"],`;
border-color: `).concat(e.palette["accent-primary-active"],`;
}
img {
max-width: 100%;
max-height: 100%;
}
`)}),zA=function(t){var e=t.addImgWatermark,r=t.loadAndSetWatermarkImg,n=t.style,i=Ye(),o=i.config,a=i.annotations,s=i.dispatch,c=i.t,d=G.useMemo(function(){var m;return(m=(a[As]||{}).image)===null||m===void 0?void 0:m.src},[a[As]]),h=function(m){var w=m.currentTarget.children[0];if(w.complete){if(!w.naturalWidth)return void s({type:Ys,payload:{feedback:{message:c("mutualizedFailedToLoadImg"),duration:2e3}}});e(w)}},C=o[de.WATERMARK]||{},v=C.gallery,g=v===void 0?[]:v;return g.length===0?null:y.createElement(R3,{className:"FIE_watermark-gallery",style:n},g.map(function(m){var w=(m==null?void 0:m.url)||m,x=(m==null?void 0:m.previewUrl)||w;return y.createElement(_ie,{className:"FIE_watermark-selected-item",onClick:function(O){return w===x?h(O):r(w)},key:w,"aria-selected":w===d},y.createElement("img",{src:x,alt:"Failed to load.",crossOrigin:"Anonymous",draggable:!1}))}))};zA.defaultProps={style:void 0};var xie=function(t){var e=t.watermark,r=t.saveWatermark,n=t.t,i=G.useState(null),o=Ie(i,2),a=o[0],s=o[1],c=e.padding||0;return y.createElement(y.Fragment,null,y.createElement(Ps,{className:"FIE_watermark-padding-triggerer",title:n("padding"),onClick:function(h){s(h.currentTarget)},active:a},y.createElement(qQ,{size:20})),y.createElement(Ha,{className:"FIE_watermark-padding-popup",anchorEl:a,open:!!a,onClose:function(){s(null)},position:"top"},y.createElement(V2,null,y.createElement(qt,null,n("padding")),y.createElement(tl,null,y.createElement(qr,{annotation:"px",onChange:function(h){r({padding:Vr(h,0,100)})},value:c,noMargin:!0}),y.createElement(OA,null,"".concat(c,"px"))))))};function ox(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function pa(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?ox(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ox(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var ax=.33,eu="watermark",Eie=function(){var t=Ye(),e=t.annotations,r=t.shownImageDimensions,n=t.selectionsIds,i=t.config,o=t.dispatch,a=t.t,s=t.adjustments.crop,c=s===void 0?{}:s,d=_o(),h=G.useState(!1),C=Ie(h,2),v=C[0],g=C[1],m=G.useRef(),w=i[de.WATERMARK],x=G.useMemo(function(){return e[eu]},[e[eu]]),b=c.width||r.width,O=c.height||r.height,f=c.x||0,S=c.y||0,E=w.textScalingRatio||ax,I=w.imageScalingRatio||ax,R=function(B){var Y=B.naturalWidth||B.width,W=B.naturalHeight||B.height,q=O>b?O*I/W:b*I/Y,ee=pa(pa(pa({},i.annotationsCommon),i[de.IMAGE]),{},{scaleX:q,scaleY:q,padding:1,image:B,width:Y,height:W,x:f+b/2-Y*q/2,y:S+O/2-W*q/2,id:eu,name:de.IMAGE,replaceCurrent:!0});o({type:$l,payload:ee})},k=function(B){o({type:$l,payload:pa(pa({},typeof B=="function"?B(x):B),{},{id:eu})})},N=function(B){o({type:Ys,payload:{feedback:{message:B,status:Ku.WARNING}}})},T=function(B,Y){if(B){g(!0);var W=new Image;W.onload=function(){R(W),Y&&URL.revokeObjectURL(B),g(!1)},W.onerror=function(){N(a("mutualizedFailedToLoadImg")),Y&&URL.revokeObjectURL(B),g(!1)},W.src=B}};G.useEffect(function(){x&&(o({type:A9}),o({type:nd,payload:{annotationId:"watermark"}}))},[x]),G.useEffect(function(){x&&(n.length===0||n[0].id!==eu)&&o({type:nd,payload:{annotationId:"watermark"}})},[n]);var D=[(!i.useCloudimage||typeof w.onUploadWatermarkImgClick=="function")&&{key:"upload-watermark",label:a("uploadWatermark"),icon:qI,onClick:function(){if(typeof w.onUploadWatermarkImgClick=="function"){var Y=w.onUploadWatermarkImgClick(T);return void(Y instanceof Promise&&Y.then(function(){var W=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},q=W.url,ee=W.revokeObjectUrl;return T(q,ee!==void 0&&ee)}))}m.current&&m.current.click()}},!w.hideTextWatermark&&{key:"add-text-watermark",label:a("addWatermarkAsText"),icon:UI,onClick:function(){var Y={height:O*E,width:b*E},W=pa(pa(pa(pa({},i.annotationsCommon),i[de.TEXT]),Y),{},{padding:1,x:f+b/2-Y.width/2,y:S+O/2-Y.height/2,fill:"#000000",id:eu,name:de.TEXT,replaceCurrent:!0});o({type:$l,payload:W})}}],z=function(){return y.createElement(xie,{watermark:x,saveWatermark:k,t:a})};return y.createElement("div",{className:"FIE_watermark-tool-wrapper"},(x==null?void 0:x.name)===de.TEXT&&y.createElement(ix,{className:"FIE_watermark-options-wrapper"},y.createElement(P9,{text:x,saveText:k,t:a},z())),(x==null?void 0:x.name)===de.IMAGE&&y.createElement(ix,{className:"FIE_watermark-options-wrapper"},y.createElement(k9,{image:x,saveImage:k,t:a},z())),y.createElement(bie,{className:"FIE_watermark-add-wrapper",noWrap:!0},y.createElement(F3,{className:"FIE_watermark-add",color:"secondary",label:function(){return d?a("plus"):D[0]?a("addWatermark"):a("addTextWatermark")}(),title:a("addWatermarkTitle"),menuPosition:"top",menuItems:D,menuFromBtn:!0,noMargin:!0}),y.createElement(zA,{loadAndSetWatermarkImg:T,addImgWatermark:R,style:d&&!(x==null||!x.name)?{width:"55%"}:void 0}),y.createElement(IA,{onChange:v?void 0:function(Y){if(Y.target.files){var W=Y.target.files[0];W.type.startsWith("image/")&&T(URL.createObjectURL(W),!0)}Y.target.value=""},disabled:v,ref:m})))},Om,w0=(Om={},A(A(A(A(A(A(A(A(A(A(Om,de.CROP,{id:de.CROP,Item:gA}),de.ROTATE,{id:de.ROTATE,Item:yA,ItemOptions:ene}),de.FLIP_X,{id:de.FLIP_X,Item:mA}),de.FLIP_Y,{id:de.FLIP_Y,Item:vA}),de.BRIGHTNESS,{id:de.BRIGHTNESS,Item:gI,ItemOptions:Bre}),de.CONTRAST,{id:de.CONTRAST,Item:CA,ItemOptions:rne}),de.HSV,{id:de.HSV,Item:wA,ItemOptions:ine,hideFn:function(e){var r=e.useCloudimage;return r}}),de.BLUR,{id:de.BLUR,Item:SA,ItemOptions:ane}),de.WARMTH,{id:de.WARMTH,Item:bA,ItemOptions:lne,hideFn:function(e){var r=e.useCloudimage;return r}}),de.FILTERS,{id:de.FILTERS,Item:wne}),A(A(A(A(A(A(A(A(A(A(Om,de.WATERMARK,{id:de.WATERMARK,Item:Eie}),de.TEXT,{id:de.TEXT,Item:EA,ItemOptions:Zne}),de.IMAGE,{id:de.IMAGE,Item:TA,ItemOptions:aie}),de.RECT,{id:de.RECT,Item:LA,ItemOptions:uie}),de.POLYGON,{id:de.POLYGON,Item:DA,ItemOptions:yie}),de.ELLIPSE,{id:de.ELLIPSE,Item:MA,ItemOptions:die}),de.PEN,{id:de.PEN,Item:RA,ItemOptions:hie}),de.LINE,{id:de.LINE,Item:NA,ItemOptions:fie}),de.ARROW,{id:de.ARROW,Item:FA,ItemOptions:pie}),de.RESIZE,{id:de.RESIZE,Item:T9})),Qf=A(A(A(A(A(A({},Zt.ADJUST,[de.CROP,de.ROTATE,de.FLIP_X,de.FLIP_Y]),Zt.FINETUNE,[de.BRIGHTNESS,de.CONTRAST,de.HSV,de.BLUR,de.WARMTH]),Zt.FILTERS,[de.FILTERS]),Zt.WATERMARK,[de.WATERMARK]),Zt.ANNOTATE,[de.TEXT,de.IMAGE,de.RECT,de.ELLIPSE,de.POLYGON,de.PEN,de.LINE,de.ARROW]),Zt.RESIZE,[de.RESIZE]);function sx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function lx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?sx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):sx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var $A="SELECT_TAB",Oie=function(t,e){return e.tabId===t.tabId?t:lx(lx({},t),{},{tabId:e.tabId,toolId:Qf[e.tabId][0],selectionsIds:[],pointerCssIcon:e.tabId===Zt.ANNOTATE?_a.DRAW:_a.DEFAULT})};function cx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Pm(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?cx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):cx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var I9="UNDO",Pie=function(t){if(t.pastDesignStates&&0<t.pastDesignStates.length){var e=Qu(t),r=gT(t.pastDesignStates),n=r[0],i=r.slice(1),o=[e].concat(cr(t.futureDesignStates||[]));return Pm(Pm(Pm({},t),n),{},{selectionsIds:[],pastDesignStates:i,futureDesignStates:o,hasUndo:0<i.length,hasRedo:!0,haveNotSavedChanges:0<i.length})}return t};function ux(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function yf(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?ux(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ux(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var BA="SET_FINETUNE",kie=function(t,e){return yf(yf({},t),{},{isDesignState:!e.dismissHistory,finetunes:!e.finetune||t.finetunes.includes(e.finetune)?t.finetunes:[].concat(cr(t.finetunes),[e.finetune]),finetunesProps:yf(yf({},t.finetunesProps),e.finetuneProps)})},Tie=["dismissHistory","replaceCurrent"];function dx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function tu(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?dx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):dx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var $l="SET_ANNOTATION",Iie=function(t){var e,r=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},n=r.dismissHistory,i=r.replaceCurrent,o=ve(r,Tie),a=(e=o.id)!==null&&e!==void 0?e:v3(o.name),s=t.annotations[a];return s&&!Object.keys(o).some(function(c){return(o[c]||o[c]===0)&&o[c]!==s[c]})?t:tu(tu({},t),{},{isDesignState:!(n!==void 0&&n),annotations:tu(tu({},t.annotations),{},A({},a,tu(tu({},i!==void 0&&i?{}:s),o)))})};function hx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function fx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?hx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):hx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var gh="CHANGE_POINTER_ICON",Aie=function(t,e){return t.pointerCssIcon===e.pointerCssIcon?t:fx(fx({},t),{},{pointerCssIcon:e.pointerCssIcon})};function px(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function gx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?px(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):px(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var nd="SELECT_ANNOTATION",Lie=function(t,e){if(t.selectionsIds.length===1&&t.selectionsIds[0]===e.annotationId)return t;var r;if(e.multiple){r=t.selectionsIds.filter(function(i){return i!==e.annotationId});var n=r.length!==t.selectionsIds.length;n||r.push(e.annotationId)}else r=[e.annotationId];return gx(gx({},t),{},{selectionsIds:r})};function mx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function vx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?mx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):mx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var A9="CLEAR_ANNOTATIONS_SELECTIONS",Mie=function(t){return t.selectionsIds.length===0?t:vx(vx({},t),{},{selectionsIds:[]})};function yx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Cx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?yx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):yx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var c6="TOGGLE_ORIGINAL_IMAGE_DISPLAY",Rie=function(t,e){return Cx(Cx({},t),{},{isShowOriginalImage:e.isShow})};function wx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?wx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):wx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var W2="SELECT_TOOL",Nie=function(t,e){return t.toolId===e.toolId?t:Sx(Sx({},t),{},{toolId:e.toolId,selectionsIds:e.keepSelections?t.selectionsIds:[]})};function bx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Cf(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?bx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):bx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var L9="TOGGLE_FLIP",Fie=function(t,e){var r="isFlipped".concat(e.direction===z8.X?"X":"Y");return Cf(Cf({},t),{},{isDesignState:!e.dismissHistory,adjustments:Cf(Cf({},t.adjustments),{},A({},r,!t.adjustments[r]))})};function _x(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ru(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?_x(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):_x(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var M9="SET_CROP",Die=function(t,e){var r,n,i,o,a,s,c,d=(r=t.adjustments.crop)!==null&&r!==void 0?r:{},h={x:(n=_r(e.x))!==null&&n!==void 0?n:d.x,y:(i=_r(e.y))!==null&&i!==void 0?i:d.y,ratio:typeof e.ratio=="string"?e.ratio:(o=_r(e.ratio))!==null&&o!==void 0?o:d.ratio,width:(a=_r(e.width))!==null&&a!==void 0?a:d.width,height:(s=_r(e.height))!==null&&s!==void 0?s:d.height,ratioTitleKey:(c=e.ratioTitleKey)!==null&&c!==void 0?c:d.ratioTitleKey,ratioGroupKey:e.ratioGroupKey,ratioFolderKey:e.ratioFolderKey,noEffect:e.noEffect};return ru(ru({},t),{},{isDesignState:!e.dismissHistory,adjustments:ru(ru({},t.adjustments),{},{crop:ru(ru({},d),h)})})};function xx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function wf(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?xx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):xx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var HA="CHANGE_ROTATION",jie=function(t,e){return t.adjustments.rotation===e.rotation?t:wf(wf({},t),{},{isDesignState:!e.dismissHistory,adjustments:wf(wf({},t.adjustments),{},{rotation:e.rotation})})};function Ex(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ox(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Ex(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Ex(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var zie=function(t,e,r,n){if(t.factor===Co)return{x:0,y:0,factor:Co};var i=t.factor>e.factor,o={x:(t.x-e.x||0)/e.factor,y:(t.y-e.y||0)/e.factor},a={x:t.x-o.x*t.factor,y:t.y-o.y*t.factor};if(i&&e.factor===1||(a.x=Math.min(0,Math.max(a.x,r*(1-e.factor))),a.y=Math.min(0,Math.max(a.y,n*(1-e.factor)))),1>t.factor){var s=r-r*t.factor,c=n-n*t.factor;a.x+=s/2,a.y+=c/2}return Ox(Ox({},a),{},{factor:t.factor})},$ie=["preparedDimensions"];function Px(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function nu(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Px(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Px(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var id="ZOOM_CANVAS",Bie=.03,Hie=60,Gie=function(t,e){var r,n=Vr(parseFloat(e.factor).toFixed(2),Bie,Hie);if(e.preparedDimensions){e.preparedDimensions;var i=ve(e,$ie);r=i}else{var o,a,s={x:e.x||e.x===0?(o=e.x)!==null&&o!==void 0?o:t.zoom.x:t.canvasWidth/2,y:e.y||e.y===0?(a=e.y)!==null&&a!==void 0?a:t.zoom.y:t.canvasHeight/2};r=zie(nu(nu({},s),{},{factor:n}),e.isAbsoluteZoom?{factor:Co,x:null,y:null}:t.zoom,t.canvasWidth,t.canvasHeight)}return r.factor===t.zoom.factor&&r.x===t.zoom.x&&r.y===t.zoom.y?t:nu(nu({},t),{},{zoom:nu(nu({},t.zoom),r)})};function kx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Tx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?kx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):kx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var GA="SET_CANVAS_SIZE",Vie=function(t,e){if(t.canvasWidth===e.canvasWidth&&t.canvasHeight===e.canvasHeight)return t;var r=t.initialCanvasWidth,n=r===void 0?e.canvasWidth:r,i=t.initialCanvasHeight,o=i===void 0?e.canvasHeight:i,a=Gv(t.initialCanvasWidth,t.initialCanvasHeight,t.originalImage.width,t.originalImage.height),s=a*t.originalImage.width,c=a*t.originalImage.height,d=1;if(n!==e.canvasWidth||o!==e.canvasHeight){var h=e.canvasWidth/s,C=e.canvasHeight/c;d=Math.min(h,C)}return Tx(Tx({},t),{},{initialCanvasWidth:n,initialCanvasHeight:o,canvasWidth:e.canvasWidth,canvasHeight:e.canvasHeight,canvasScale:d})};function Ix(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Ax(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Ix(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Ix(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var VA="SET_ORIGINAL_IMAGE",Uie=function(t,e){return Ax(Ax({},t),{},{feedback:{},originalImage:e.originalImage,imgSrc:e.originalImage.src})};function Lx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Sf(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Lx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Lx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var UA="SET_SHOWN_IMAGE_DIMENSIONS",Wie=function(t,e){return Sf(Sf({},t),{},{shownImageDimensions:Sf(Sf({},t.shownImageDimensions),e.shownImageDimensions),designLayer:e.designLayer||t.designLayer,previewGroup:e.previewGroup||t.previewGroup})};function Mx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Rx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Mx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Mx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var WA="REMOVE_ANNOTATIONS",Xie=function(t,e){var r=t.annotations,n=t.selectionsIds;return e.annotationsIds.forEach(function(i){if(n=n.filter(function(a){return a!==i}),t.designLayer&&r[i]){var o=t.designLayer.findOne("#".concat(i));o&&o.destroy(),delete r[i]}}),Rx(Rx({},t),{},{isDesignState:e.isDesignState||!0,annotations:r,selectionsIds:[]})};function Nx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function iu(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Nx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Nx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var XA="DUPLICATE_ANNOTATIONS",Kie=function(t,e){var r=t.annotations,n={};return e.annotationsIds.forEach(function(i){var o=r[i];if(o){var a=v3(o.name);n[a]=iu(iu({},o),{},{id:a,x:o.x+20,y:o.y+20})}}),iu(iu({},t),{},{isDesignState:!e.dismissHistory,annotations:iu(iu({},r),n)})};function Fx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Dx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Fx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Fx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var R9="ENABLE_TEXT_CONTENT_EDIT",Yie=function(t,e){return Dx(Dx({},t),{},{textIdOfEditableContent:e.textIdOfEditableContent||null})};function jx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function S0(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?jx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):jx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Mu="SET_RESIZE",Zie=function(t,e){var r;return S0(S0({},t),{},{isDesignState:!e.dismissHistory,resize:S0(S0(S0({},t.resize),e),{},{manualChangeDisabled:!((r=e.manualChangeDisabled)===null||r===void 0)&&r})})};function zx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function $x(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?zx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):zx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var KA="SET_SAVED",qie=function(t){return t.haveNotSavedChanges?$x($x({},t),{},{haveNotSavedChanges:!1}):t};function Bx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Qie(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Bx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Bx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Gh=function(t){var e=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{},r=2<arguments.length&&arguments[2]!==void 0&&arguments[2],n=Qie({},t),i=Object.keys(e);return i.forEach(function(o){var a=e[o];if(a!==void 0){var s=Un(a);if(s!=="object"||a instanceof HTMLElement||a===null||Array.isArray(a)||!t[o]||Un(t[o])!=="object")return void(n[o]=r&&Array.isArray(n[o])&&Array.isArray(a)?[].concat(cr(n[o]),cr(a)):a);n[o]=Gh(t[o],a)}}),n},Jf="UPDATE_STATE",Jie=function(t,e){var r=e&&typeof e=="function"?e(t):e;return r?Gh(t,r):t};function Hx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bf(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Hx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Hx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var YA="SET_LATEST_COLOR",eoe=function(t,e){return bf(bf({},t),{},{latestColors:bf(bf({},t.latestColors),e.latestColors)})};function Gx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Vx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Gx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Gx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var ZA="SET_SHOWN_TABS_MENU",toe=function(t,e){return Vx(Vx({},t),{},{showTabsMenu:e.opened})},_f;const Ux=(_f={},A(A(A(A(A(A(A(A(A(A(_f,VA,Uie),Ys,zX),U7,$X),_g,nH),gh,Aie),nd,Lie),A9,Mie),c6,Rie),$A,Oie),W2,Nie),A(A(A(A(A(A(A(A(A(A(_f,id,Gie),GA,Vie),UA,Wie),R9,Yie),YA,eoe),ZA,toe),pT,rH),BA,kie),$l,Iie),M9,Die),A(A(A(A(A(A(A(A(A(A(_f,HA,jie),L9,Fie),Mu,Zie),WA,Xie),XA,Kie),I9,Pie),V7,DX),m3,jX),KA,qie),Jf,Jie));var roe=.05,noe=12,ioe=function(){return 2*(window?Math.min(window.innerHeight,window.innerWidth)*roe:noe)},Wx=function(t,e){var r=t.x,n=t.y,i=e*Math.PI/180,o=Math.cos(i),a=Math.sin(i);return{x:r*o-n*a,y:n*o+r*a}},ooe=function(t,e,r){if(!t||!e||!r&&r!==0)return{x:0,y:0,rotation:r};var n={x:-t/2,y:-e/2},i=Wx(n,0),o=Wx(n,r),a=o.x-i.x,s=o.y-i.y;return{x:a,y:s,rotation:r}},Cc={definitions:{id:j.string.isRequired,name:j.string.isRequired,rotation:j.number,scaleX:j.number,scaleY:j.number,stroke:j.string,strokeWidth:j.number,shadowOffsetX:j.number,shadowOffsetY:j.number,shadowBlur:j.number,shadowColor:j.string,shadowOpacity:j.number,opacity:j.number},defaults:{rotation:0,scaleX:1,scaleY:1,stroke:void 0,strokeWidth:void 0,shadowOffsetX:void 0,shadowOffsetY:void 0,shadowBlur:void 0,shadowColor:void 0,shadowOpacity:void 0,opacity:1}},aoe=["id","name","fill","x","y","width","height","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity","cornerRadius"];function Xx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Kx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Xx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Xx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var qA=function(t){var e=t.id,r=t.name,n=t.fill,i=t.x,o=t.y,a=t.width,s=t.height,c=t.scaleX,d=t.scaleY,h=t.rotation,C=t.annotationEvents,v=t.stroke,g=t.strokeWidth,m=t.shadowOffsetX,w=t.shadowOffsetY,x=t.shadowBlur,b=t.shadowColor,O=t.shadowOpacity,f=t.opacity,S=t.cornerRadius,E=ve(t,aoe);return y.createElement(iT,he({id:e,name:r,rotation:h,scaleX:c,scaleY:d,stroke:v,strokeWidth:g,shadowOffsetX:m,shadowOffsetY:w,shadowBlur:x,shadowColor:b,shadowOpacity:O,fill:n,x:i,y:o,width:a,height:s,opacity:f,cornerRadius:S},C,E))};qA.defaultProps=Kx(Kx({},Cc.defaults),{},{fill:"#000",cornerRadius:0,width:0,height:0});var soe=["id","name","fill","x","y","radiusX","radiusY","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];function Yx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Zx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Yx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Yx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var QA=function(t){var e=t.id,r=t.name,n=t.fill,i=t.x,o=t.y,a=t.radiusX,s=t.radiusY,c=t.scaleX,d=t.scaleY,h=t.rotation,C=t.annotationEvents,v=t.stroke,g=t.strokeWidth,m=t.shadowOffsetX,w=t.shadowOffsetY,x=t.shadowBlur,b=t.shadowColor,O=t.shadowOpacity,f=t.opacity,S=ve(t,soe);return y.createElement(oT,he({id:e,name:r,rotation:h,scaleX:c,scaleY:d,stroke:v,strokeWidth:g,shadowOffsetX:m,shadowOffsetY:w,shadowBlur:x,shadowColor:b,shadowOpacity:O,fill:n,x:i,y:o,radiusX:a,radiusY:s,offsetX:-a,offsetY:-s,opacity:f},C,S))};QA.defaultProps=Zx(Zx({},Cc.defaults),{},{fill:"#000",radiusX:0,radiusY:0});var loe=["id","name","fill","x","y","radius","scaleX","scaleY","rotation","sides","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];function qx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Qx(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?qx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):qx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var JA=function(t){var e=t.id,r=t.name,n=t.fill,i=t.x,o=t.y,a=t.radius,s=t.scaleX,c=t.scaleY,d=t.rotation,h=t.sides,C=t.annotationEvents,v=t.stroke,g=t.strokeWidth,m=t.shadowOffsetX,w=t.shadowOffsetY,x=t.shadowBlur,b=t.shadowColor,O=t.shadowOpacity,f=t.opacity,S=ve(t,loe);return y.createElement(YB,he({id:e,name:r,rotation:d,scaleX:s,scaleY:c,stroke:v,strokeWidth:g,shadowOffsetX:m,shadowOffsetY:w,shadowBlur:x,shadowColor:b,shadowOpacity:O,fill:n,x:i,y:o,radius:a,offsetX:-a,offsetY:-a,sides:h,opacity:f},C,S))};JA.defaultProps=Qx(Qx({},Cc.defaults),{},{fill:"#000",sides:3});var coe=["id","name","text","fontFamily","fontSize","fontStyle","fill","x","y","width","height","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity","letterSpacing","lineHeight","align"];function Jx(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function eE(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?Jx(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Jx(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var N9=function(t){var e=t.id,r=t.name,n=t.text,i=t.fontFamily,o=t.fontSize,a=t.fontStyle,s=t.fill,c=t.x,d=t.y,h=t.width,C=t.height,v=t.scaleX,g=t.scaleY,m=t.rotation,w=t.annotationEvents,x=t.stroke,b=t.strokeWidth,O=t.shadowOffsetX,f=t.shadowOffsetY,S=t.shadowBlur,E=t.shadowColor,I=t.shadowOpacity,R=t.opacity,k=t.letterSpacing,N=t.lineHeight,T=t.align,D=ve(t,coe);return y.createElement(KB,he({id:e,name:r,rotation:m,scaleX:v,scaleY:g,stroke:x,strokeWidth:b,shadowOffsetX:O,shadowOffsetY:f,shadowBlur:S,shadowColor:E,shadowOpacity:I,opacity:R,fill:s,text:n,fontFamily:i,fontStyle:a,fontSize:o,letterSpacing:k,lineHeight:N,align:T,x:c,y:d,width:h,height:C},w,D))};N9.defaultProps=eE(eE({},Cc.defaults),{},{text:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur imperdiet tortor quis odio facilisis, id aliquet nulla facilisis. Etiam tincidunt tempor odio nec placerat.",fontFamily:"Arial",fontSize:14,fill:"#000",width:0,height:0,letterSpacing:void 0,lineHeight:void 0,align:"left"});var uoe=function(t){var e=t.split("/");return e[e.length-1].split("?")[0]},eL=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return new Promise(function(n,i){var o=new Image;r||(o.crossOrigin="Anonymous"),o.src=t,o.name=e??uoe(t),o.onload=function(){n(o)},o.onerror=function(){i(new Error("Error in loading the image with the provided url: ".concat(t)))}})},doe=["id","name","image","x","y","width","height","scaleX","scaleY","rotation","annotationEvents","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];function tE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function rE(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?tE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):tE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var tL=function(t){var e=t.id,r=t.name,n=t.image,i=t.x,o=t.y,a=t.width,s=t.height,c=t.scaleX,d=t.scaleY,h=t.rotation,C=t.annotationEvents,v=t.stroke,g=t.strokeWidth,m=t.shadowOffsetX,w=t.shadowOffsetY,x=t.shadowBlur,b=t.shadowColor,O=t.shadowOpacity,f=t.opacity,S=ve(t,doe),E=G.useState(null),I=Ie(E,2),R=I[0],k=I[1];G.useEffect(function(){typeof n=="string"&&eL(n).then(k)},[n]);var N=n instanceof HTMLImageElement;if(!N&&!R)return null;var T=N?n:R;return y.createElement(bg,he({id:e,name:r,rotation:h,scaleX:c,scaleY:d,stroke:v,strokeWidth:g,shadowOffsetX:m,shadowOffsetY:w,shadowBlur:x,shadowColor:b,shadowOpacity:O,image:T,x:i,y:o,width:a,height:s,opacity:f},S,C,S))};tL.defaultProps=rE(rE({},Cc.defaults),{},{width:0,height:0});var hoe=["id","name","scaleX","scaleY","rotation","annotationEvents","points","lineCap","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","tension","opacity"];function nE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function iE(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?nE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):nE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var u6=function(t){var e=t.id,r=t.name,n=t.scaleX,i=t.scaleY,o=t.rotation,a=t.annotationEvents,s=t.points,c=t.lineCap,d=t.stroke,h=t.strokeWidth,C=t.shadowOffsetX,v=t.shadowOffsetY,g=t.shadowBlur,m=t.shadowColor,w=t.shadowOpacity,x=t.tension,b=t.opacity,O=ve(t,hoe);return y.createElement(XB,he({id:e,name:r,rotation:o,scaleX:n,scaleY:i,stroke:d,strokeWidth:h,shadowOffsetX:C,shadowOffsetY:v,shadowBlur:g,shadowColor:m,shadowOpacity:w,points:s,lineCap:c,tension:x,hitStrokeWidth:20,x:0,y:0,opacity:b},a,O))};u6.defaultProps=iE(iE({},Cc.defaults),{},{stroke:"#000000",strokeWidth:1,lineCap:"butt",annotationEvents:{},tension:void 0});var foe=["id","name","fill","pointerLength","pointerWidth","scaleX","scaleY","rotation","annotationEvents","points","lineCap","stroke","strokeWidth","shadowOffsetX","shadowOffsetY","shadowBlur","shadowColor","shadowOpacity","opacity"];function oE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function aE(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?oE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):oE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var rL=function(t){var e=t.id,r=t.name,n=t.fill,i=t.pointerLength,o=t.pointerWidth,a=t.scaleX,s=t.scaleY,c=t.rotation,d=t.annotationEvents,h=t.points,C=t.lineCap,v=t.stroke,g=t.strokeWidth,m=t.shadowOffsetX,w=t.shadowOffsetY,x=t.shadowBlur,b=t.shadowColor,O=t.shadowOpacity,f=t.opacity,S=ve(t,foe);return y.createElement(ZB,he({id:e,name:r,rotation:c,scaleX:a,scaleY:s,stroke:v,strokeWidth:g,shadowOffsetX:m,shadowOffsetY:w,shadowBlur:x,shadowColor:b,shadowOpacity:O,fill:n,x:0,y:0,points:h,pointerLength:i,pointerWidth:o,lineCap:C,opacity:f},d,S))};rL.defaultProps=aE(aE({},Cc.defaults),{},{stroke:"#000000",strokeWidth:6,fill:void 0,lineCap:"butt",pointerLength:void 0,pointerWidth:void 0});var poe=A(A(A(A(A(A(A(A({},de.RECT,qA),de.ELLIPSE,QA),de.POLYGON,JA),de.TEXT,N9),de.IMAGE,tL),de.LINE,u6),de.ARROW,rL),de.PEN,u6),goe=function(t){var e=t.annotation,r=t.annotationEvents,n=t.selectionsIds,i=poe[e.name];return i?y.createElement(i,he({key:e.id,annotationEvents:r,draggable:n.includes(e.id)},e)):null};const moe=G.memo(goe);var voe=function(){var t=Ye(),e=t.annotations,r=e===void 0?{}:e,n=t.selectionsIds,i=n===void 0?[]:n,o=cK();return G.useMemo(function(){return Object.values(r).map(function(a){return y.createElement(moe,{key:a.id,annotation:a,annotationEvents:o,selectionsIds:i})})},[r,o,i])},yoe=function(t,e){return y.createElement(WB,he({ref:e},t))};const Coe=G.forwardRef(yoe);function sE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function km(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?sE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):sE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var woe=ioe(),Soe=10,boe=function(){var t,e,r,n,i=G.useRef(),o=Ye(),a=o.initialCanvasWidth,s=o.initialCanvasHeight,c=o.canvasWidth,d=o.canvasHeight,h=o.dispatch,C=o.toolId,v=o.canvasScale,g=o.originalImage,m=g===void 0?{}:g,w=o.finetunes,x=w===void 0?[]:w,b=o.finetunesProps,O=b===void 0?{}:b,f=o.filter,S=f===void 0?null:f,E=o.adjustments,I=E===void 0?{}:E,R=I.rotation,k=R===void 0?0:R,N=I.crop,T=N===void 0?{}:N,D=I.isFlippedX,z=I.isFlippedY,B=o.resize,Y=G.useRef(),W=G.useRef(),q=C===de.CROP,ee=G.useMemo(function(){return S?[].concat(cr(x),[S]):x},[x,S]),K=G.useMemo(function(){var We=Math.max(Soe,m.width-woe),Me=m.width/m.height;return{width:We,height:We/Me}},[m]),ue=G.useMemo(function(){return Ms(m.width,m.height,k)},[m,k]),ne=G.useMemo(function(){return Gv(a,s,m.width,m.height)},[m,a,s]),ae=G.useMemo(function(){return{width:K.width*ne,height:K.height*ne}},[K,ne]),J=B.width&&!q?B.width/((t=(e=T.width)!==null&&e!==void 0?e:ae.width)!==null&&t!==void 0?t:ue.width):1,Q=B.height&&!q?B.height/((r=(n=T.height)!==null&&n!==void 0?n:ae.height)!==null&&r!==void 0?r:ue.height):1,te=c/(2*v)-ae.width*J/2,we=d/(2*v)-ae.height*Q/2,U=c/(2*v)-ae.width/2,F=d/(2*v)-ae.height/2,$=G.useMemo(function(){return{x:Math.round(te),y:Math.round(we),abstractX:Math.round(U),abstractY:Math.round(F),width:ae.width,height:ae.height,scaledBy:v}},[v,te,we,U,F,ae]),ie=G.useCallback(function(){Y.current?Y.current.cache():setTimeout(ie,0)},[]),pe=Ms($.width,$.height,k),ce=q?1:Gv($.width,$.height,pe.width,pe.height);if(G.useEffect(function(){return m&&ie(),function(){var We;(We=Y.current)===null||We===void 0||We.clearCache()}},[m]),G.useEffect(function(){$&&h({type:UA,payload:{shownImageDimensions:$,designLayer:i.current,previewGroup:W.current}})},[$]),!te||!we||!$)return null;var le=ooe(T.x,T.y,k),xe=te+(!q&&T.width?(D?-1:1)*($.width/2-T.x-T.width/2+le.x)*J:0),Ne=we+(!q&&T.height?(z?-1:1)*($.height/2-T.y-T.height/2+le.y)*Q:0),_e=q?U:xe,He=q?F:Ne,Ee=(D?-1:1)*(q?1:J)*ce,Ve=(z?-1:1)*(q?1:Q)*ce;return y.createElement(j8,{id:QB,ref:i,xPadding:_e,yPadding:He,offsetX:ae.width/2,offsetY:ae.height/2,x:ae.width*J/2+_e,y:ae.height*Q/2+He,scaleX:Ee,scaleY:Ve,rotation:q?0:k,clipFunc:function(Me){var gt,St=q&&!((gt=i.current)!==null&&gt!==void 0&&(gt=gt.attrs)!==null&&gt!==void 0&&gt.isSaving),qe=St||T.noEffect?km(km({},$),{},{x:0,y:0}):{width:T.width||$.width,height:T.height||$.height,x:T.x||0,y:T.y||0};tH(Me,km({ratio:T.ratio},qe),St),i.current&&i.current.setAttrs({clipX:qe.x,clipY:qe.y,clipWidth:qe.width,clipHeight:qe.height})}},y.createElement(bg,he({id:cT,image:m,width:ae.width,height:ae.height,offsetX:ae.width/2,offsetY:ae.height/2,x:ae.width/2,y:ae.height/2,listening:!1,filters:ee,ref:Y},O)),y.createElement(voe,null),y.createElement(Coe,{ref:W}))},_oe=function(t,e){return _r(t)===_r(e)};function lE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xoe(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?lE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):lE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Eoe=function(t,e){var r=e.width-(2*t.radiusX||t.width),n=e.height-(2*t.radiusY||t.height);return{x:_r(Math.min(Math.max(t.x,0),r)),y:_r(Math.min(Math.max(t.y,0),n))}},Ooe=function(t,e,r){var n=t.split("-"),i=Ie(n,2),o=i[0],a=i[1],s={x:0,y:0};return o==="center"?s.y=e.height/2-r.height/2:o==="bottom"&&(s.y=e.height-r.height),a==="center"?s.x=e.width/2-r.width/2:a==="right"&&(s.x=e.width-r.width),s},Tm=function(t,e,r,n){var i=4<arguments.length&&arguments[4]!==void 0?arguments[4]:{},o={x:_r(r.abstractX*r.scaledBy),y:_r(r.abstractY*r.scaledBy),width:_r(r.width*r.scaledBy),height:_r(r.height*r.scaledBy)},a=xoe({},e);if(e.x<o.x&&(a.x=o.x,a.width=t.x-o.x+t.width),e.y<o.y&&(a.y=o.y,a.height=t.y-o.y+t.height),a.x+a.width>o.x+o.width&&(a.width=o.x+o.width-a.x),a.y+a.height>o.y+o.height&&(a.height=o.y+o.height-a.y),typeof n=="number"&&!_oe(a.width/a.height,n)){var s=a.height*n,c=a.width/n;_r(a.y+c)<=o.y+o.height?a.height=c:a.width=s}if((i.minWidth&&a.width<=i.minWidth||i.maxWidth&&a.width>=i.maxWidth)&&(a.width=Vr(a.width,i.minWidth,i.maxWidth),a.x=t.x,a.y=t.y,typeof n=="number"&&(a.height=a.width/n)),(i.minHeight&&e.height<=i.minHeight||i.maxHeight&&e.height>=i.maxHeight)&&(a.height=Vr(a.height,i.minHeight,i.maxHeight),a.x=t.x,a.y=t.y,typeof n=="number"&&(a.width=a.height*n)),typeof i.lockCropAreaAt=="string"){var d=Ooe(i.lockCropAreaAt,o,a),h=d.x,C=d.y;a.x=h,a.y=C}return a};function cE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function yi(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?cE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):cE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var uE=!1,xf={width:200,height:100},Poe=function(){var t=Ye(),e=t.dispatch,r=t.theme,n=t.designLayer,i=t.originalImage,o=t.shownImageDimensions,a=t.adjustments,s=a===void 0?{}:a,c=s.crop,d=c===void 0?{}:c,h=s.isFlippedX,C=s.isFlippedY,v=t.resize,g=v===void 0?{}:v,m=t.config,w=t.t,x=G.useRef(),b=G.useRef(),O=G.useRef(),f=G.useRef(),S=m[de.CROP],E=G.useMemo(function(){var U;return yi(yi({},S),{},{lockCropAreaAt:(U=d.lockCropAreaAt)!==null&&U!==void 0?U:S==null?void 0:S.lockCropAreaAt})},[d.lockCropAreaAt,S]),I=E.lockCropAreaAt,R=d.ratio||E.ratio,k=R===hT,N=R===cc,T=function(){return R===$8?i.width/i.height:R},D=function(U,F){var $=U.width,ie=U.height,pe=U.x,ce=U.y,le={x:h?o.width-pe-$:pe,y:C?o.height-ce-ie:ce,width:$,height:ie},xe=d.width>=g.width&&d.height>=g.height;g.width&&g.height&&($<g.width||ie<g.height)&&xe&&e({type:Ys,payload:{feedback:{message:w("cropSizeLowerThanResizedWarning"),status:Ku.WARNING}}}),e({type:M9,payload:yi(yi(yi({},d),le),{},{dismissHistory:F})})},z=function(U,F){var $,ie;b.current&&x.current&&b.current.nodes([x.current]);var pe=f.current,ce={width:U,height:F,x:($=d.x)!==null&&$!==void 0?$:0,y:(ie=d.y)!==null&&ie!==void 0?ie:0};D(Tm(ce,ce,yi(yi({},pe),{},{abstractX:0,abstractY:0}),!(k||N)&&T(),E),!0)};if(G.useEffect(function(){return n&&b.current&&x.current&&(O.current&&O.current.cache(),b.current.nodes([x.current])),function(){O.current&&O.current.clearCache()}},[n,i,o]),G.useEffect(function(){if(f.current){var U,F,$=f.current;z((U=d.width)!==null&&U!==void 0?U:$.width,(F=d.height)!==null&&F!==void 0?F:$.height)}},[R]),G.useEffect(function(){b.current&&x.current&&f.current&&d.width&&d.height&&z(d.width,d.height)},[E,o.width,o.height]),G.useEffect(function(){if(o&&(f.current=o,!uE&&R&&o.x&&o.width)){var U,F;z((U=d.width)!==null&&U!==void 0?U:o.width,(F=d.height)!==null&&F!==void 0?F:o.height),uE=!0}},[o]),!n)return null;var B,Y=(I||d.noEffect)&&[]||(k||N?void 0:["top-left","bottom-left","top-right","bottom-right"]),W=function(U){var F=1<arguments.length&&arguments[1]!==void 0&&arguments[1];U.target&&D({width:U.target.width()*U.target.scaleX(),height:U.target.height()*U.target.scaleY(),x:U.target.x(),y:U.target.y()},F)};if(!d.width&&!d.height){var q=1>o.scaledBy?o.scaledBy:1,ee=yi(yi({},o),{},{width:o.width/q,height:o.height/q});B=Tm(ee,yi(yi({},ee),{},{x:0,y:0}),yi(yi({},ee),{},{abstractX:0,abstractY:0}),!(k||N)&&T(),E)}else B=d;var K=B,ue=K.x,ne=ue===void 0?0:ue,ae=K.y,J=ae===void 0?0:ae,Q=K.width,te=K.height,we={x:h?o.width-ne-Q:ne,y:C?o.height-J-te:J,ref:x,fill:"#FFFFFF",scaleX:1,scaleY:1,globalCompositeOperation:"destination-out",onDragEnd:I?void 0:W,onDragMove:I?void 0:function(F){var $=F.target;$.setAttrs(Eoe($.attrs,f.current))},onTransformEnd:I?void 0:W,draggable:!I};return y.createElement(y.Fragment,null,y.createElement(bg,{image:i,x:h?o.width:0,y:C?o.height:0,width:o.width,height:o.height,filters:[br.Filters.Blur,br.Filters.Brighten],blurRadius:10,brightness:-.3,scaleX:h?-1:1,scaleY:C?-1:1,ref:O}),N?y.createElement(oT,he({},we,{radiusX:Q/2,radiusY:te/2,offset:{x:-Q/2,y:-te/2}})):y.createElement(iT,he({},we,{width:d.noEffect?0:Q,height:d.noEffect?0:te})),d.noEffect&&y.createElement(N9,{name:"Text",id:"no-preview-text-node",text:w("cropItemNoEffect"),x:o.width/2-xf.width/2,y:o.height/2-xf.height/2,fontSize:20,fill:"#ffffff",stroke:"#ff0000",strokeWidth:.2,shadowColor:"#ff0000",shadowBlur:10,annotationEvents:{},align:"center",width:xf.width,height:xf.height}),y.createElement(aT,{centeredScaling:!1,flipEnabled:!1,rotateEnabled:!1,nodes:x.current?[x.current]:[],anchorSize:14,anchorCornerRadius:7,enabledAnchors:Y,ignoreStroke:!1,anchorStroke:r.palette["accent-primary"],anchorFill:r.palette["access-primary"],anchorStrokeWidth:2,borderStroke:r.palette["accent-primary"],borderStrokeWidth:2,borderDash:[4],keepRatio:!k||!N,ref:b,boundBoxFunc:function(F,$){return Tm(F,$,f.current,!(k||N)&&T(),E)}}))},koe=function(){var t,e=Ye(),r=e.selectionsIds,n=r===void 0?[]:r,i=e.theme,o=e.designLayer,a=e.dispatch,s=e.config.useCloudimage,c=G.useMemo(function(){return o!=null&&o.findOne?n.map(function(C){return o.findOne("#".concat(C))}).filter(Boolean):[]},[n]),d=function(){c.length===1&&c[0].name()===de.TEXT&&a({type:R9,payload:{textIdOfEditableContent:c[0].id()}})},h=s?["top-left","bottom-left","top-right","bottom-right"]:void 0;return y.createElement(aT,{id:uT,centeredScaling:!1,rotationSnaps:[0,45,90,135,180,225,270,315],nodes:c,rotateAnchorOffset:30,anchorSize:14,anchorCornerRadius:7,padding:c.length===1&&(t=c[0].attrs.padding)!==null&&t!==void 0?t:1,ignoreStroke:!1,anchorStroke:i.palette["accent-primary"],anchorFill:i.palette["access-primary"],anchorStrokeWidth:2,borderStroke:i.palette["accent-primary"],borderStrokeWidth:2,borderDash:[4],rotateEnabled:!s,onMouseOver:function(){a({type:gh,payload:{pointerCssIcon:_a.MOVE}})},onMouseLeave:function(){a({type:gh,payload:{pointerCssIcon:_a.DRAW}})},onDblClick:d,onDblTap:d,enabledAnchors:h,flipEnabled:!s,shouldOverdrawWholeArea:!0})},Toe=function(){var t=Ye(),e=t.toolId,r=t.shownImageDimensions;return y.createElement(j8,{id:lT,x:r.abstractX||0,y:r.abstractY||0},y.createElement(koe,null),e===de.CROP&&y.createElement(Poe,null))},Ioe=Z.div.withConfig({componentId:"sc-1tst9ex-0"})(function(t){var e=t.theme,r=t.top,n=t.left;return`
position: absolute;
z-index: 1;
background: `.concat(e.palette["bg-secondary"],`;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0px 1px 2px `).concat(e.palette["light-shadow"],`;
top: `).concat((r||0)+8,`px;
left: `).concat((n||0)+4,`px;
transform: translateX(-50%);
height: 32px;
`)}),Aoe=function(){var t=Ye(),e=t.selectionsIds,r=e===void 0?[]:e,n=t.designLayer,i=t.annotations,o=t.dispatch,a=G.useState({left:0,top:0}),s=Ie(a,2),c=s[0],d=s[1],h=G.useMemo(function(){var g;return n==null||(g=n.getStage())===null||g===void 0?void 0:g.findOne("#".concat(uT))},[n]),C=r.length,v=y3(function(){h&&d({left:(h.x()+h.width()/2)*h.scaleX(),top:(h.y()+h.height())*h.scaleY()})},0);return G.useEffect(function(){v()},[r,h,i]),C===0||!h?null:y.createElement(Ioe,{className:"FIE_annotation-controls-overlay",left:c.left,top:c.top},r[0]!==As&&y.createElement(Yo,{color:"basic",size:"sm",onClick:function(){o({type:XA,payload:{annotationsIds:r}})}},y.createElement(NJ,null)),y.createElement(Yo,{color:"basic",size:"sm",onClick:function(){o({type:WA,payload:{annotationsIds:r}})}},y.createElement(JI,null)))};function dE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function hE(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?dE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):dE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}function Loe(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function fE(t,e){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}var su=null,k0=0,Moe=function(t,e){t.evt.preventDefault();var r=t.evt.touches[0],n=t.evt.touches[1];if(r&&n){var i=t.currentTarget;i.isDragging()&&i.stopDrag();var o={x:r.clientX,y:r.clientY},a={x:n.clientX,y:n.clientY};if(!su)return void(su=fE(o,a));var s=fE(o,a),c=Loe(o,a);k0||(k0=c);var d=i.attrs.zoomFactor||Co,h={x:(s.x-i.x())/d,y:(s.y-i.y())/d},C=(d||Co)*(c/k0),v=s.x-su.x,g=s.y-su.y,m={x:s.x-h.x*C+v,y:s.y-h.y*C+g};k0=c,su=s,e(hE(hE({},m),{},{factor:C,preparedDimensions:!0}))}},Roe=function(t){k0=0,su=null,typeof t=="function"&&t()},Noe=Z.div.withConfig({componentId:"sc-3ln9py-0"})(["width:100%;position:relative;height:calc(100% - 112px - 16px);overflow:hidden;min-height:250px;padding:16px;flex-grow:1;"]),Foe=Z.img.withConfig({componentId:"sc-3ln9py-1"})(["max-width:98%;max-height:98%;box-shadow:0 0 0 5px rgba(0,0,0,0.1);position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2;"]),Doe=Z(sT).withConfig({componentId:"sc-3ln9py-2"})(["outline:none;background:",";"],function(t){var e=t.theme;return e.palette["bg-hover"]});function pE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function gE(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?pE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):pE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var joe=function(t){var e=t.children;qB(!0);var r=G.useRef(),n=Ye(),i=n.dispatch,o=n.pointerCssIcon,a=n.tabId,s=n.toolId,c=n.canvasWidth,d=n.canvasHeight,h=n.canvasScale,C=n.selectionsIds,v=C===void 0?[]:C,g=n.zoom,m=g===void 0?{}:g,w=n.config,x=w.previewPixelRatio,b=w.disableZooming;br.pixelRatio=x;var O=Co,f=!b&&s!==de.CROP,S=G.useState(a!==Zt.ANNOTATE&&a!==Zt.WATERMARK&&m.factor>O),E=Ie(S,2),I=E[0],R=E[1],k=G.useMemo(function(){return{cursor:o===_a.DEFAULT&&a===Zt.ANNOTATE?_a.DRAW:o}},[a,o]),N=function(q){i({type:id,payload:q})},T=G.useCallback(function(q){var ee,K;q.evt.preventDefault(),(ee=(K=q.currentTarget).container)===null||ee===void 0||ee.call(K).focus(),q.target instanceof br.Stage&&0<v.length&&i({type:A9})},[v]),D=function(){return R(a!==Zt.ANNOTATE||a===Zt.WATERMARK)},z=function(q){(q.code==="Space"||q.key==="Control")&&!q.repeat&&m.factor>O&&f&&(q.preventDefault(),R(!0),i({type:gh,payload:{pointerCssIcon:_a.DRAG}}))},B=function(q){q.code==="Space"&&(q.preventDefault(),D())},Y=function(){r.current&&r.current.container().focus()};G.useEffect(function(){i({type:gh,payload:{pointerCssIcon:_a[I?"DRAG":"DEFAULT"]}})},[I]),G.useEffect(function(){R(a!==Zt.ANNOTATE&&a!==Zt.WATERMARK&&m.factor>O);var q;return r.current&&(q=r.current.container(),q.addEventListener("mouseenter",Y),q.addEventListener("keydown",z),q.addEventListener("keyup",B)),function(){q&&(q.removeEventListener("mouseenter",Y),q.removeEventListener("keydown",z),q.removeEventListener("keyup",B))}},[a,m.factor,O]);var W=h*(f&&m.factor||O);return y.createElement(Doe,{className:"FIE_canvas-node",tabIndex:-1,ref:r,width:c,height:d,scaleX:W,scaleY:W,x:f&&m.x||null,y:f&&m.y||null,zoomFactor:f&&m.factor||O,onWheel:f?function(ee){ee.evt.preventDefault();var K=(m.factor||O)+ee.evt.deltaY*-.006,ue=ee.currentTarget.getPointerPosition();N(gE(gE({},ue),{},{factor:K}))}:void 0,onTap:T,onClick:T,onTouchMove:f?function(q){return Moe(q,N)}:void 0,onDragStart:function(ee){var K;1<((K=ee.evt.touches)===null||K===void 0?void 0:K.length)&&R(!1)},onTouchEnd:f?function(){Roe(D)}:void 0,dragBoundFunc:function(ee){var K=Math.min(0,Math.max(ee.x,c*(1-m.factor))),ue=Math.min(0,Math.max(ee.y,d*(1-m.factor)));return{x:K,y:ue}},draggable:f&&I,onDragEnd:function(ee){ee.currentTarget.draggable()&&ee.target.nodeType.toLowerCase()==="stage"&&f&&I&&N({factor:m.factor,x:ee.target.x(),y:ee.target.y(),preparedDimensions:!0})},style:k},e)};const zoe=G.memo(joe);var $oe=function(){var t=K7(),e=Ie(t,1),r=e[0],n=Ye(),i=G.useRef(null),o=G.useCallback(function(a){var s=a.width,c=a.height;n.dispatch({type:GA,payload:{canvasWidth:s,canvasHeight:c}})},[]);return G.useEffect(function(){r(i.current,o)},[]),y.createElement(Noe,{className:"FIE_canvas-container",ref:i},!n.textIdOfEditableContent&&y.createElement(Aoe,null),n.isShowOriginalImage&&y.createElement(Foe,{className:"FIE_original-image-compare",src:n.originalImage.src}),y.createElement(zoe,null,y.createElement(YX,{overridingValue:n},y.createElement(boe,null),y.createElement(Toe,null))))},Boe=Z.div.withConfig({componentId:"sc-etsyb6-0"})(["display:inline-block;height:",";width:",";border-radius:1px;background:",";"],function(t){return t.height},function(t){return t.width},function(t){var e=t.theme.palette;return e[M.BordersSecondary]}),F9=function(t){var e=t.height,r=t.width;return y.createElement(Boe,{height:e,width:r})};F9.defaultProps={height:"24px",width:"1px"};var Hoe=Z.div.withConfig({componentId:"sc-21g986-0"})(["padding:16px;box-sizing:border-box;position:relative;width:100%;display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;border-bottom:1px solid ",";[data-phone='true'] &{padding:6px 6px 4px 6px;","}"],function(t){var e=t.theme.palette;return e[M.BordersSecondary]},function(t){var e=t.isPhoneScreen;return e&&`
padding: 12px 12px 0px;
gap: 12px;
`}),Goe=Z.div.withConfig({componentId:"sc-21g986-1"})(["display:flex;align-items:center;order:1;"]),Voe=Z.div.withConfig({componentId:"sc-21g986-2"})(["display:flex;align-items:center;order:3;gap:4px;"]),D9=Z(Yo).withConfig({componentId:"sc-21g986-3"})(["margin:",";svg{color:",";}"],function(t){var e=t.margin;return e??"0 4px"},function(t){var e=t.theme.palette,r=t.disabled;return r?e[M.IconsMuted]:e[M.IconsPrimary]}),Uoe=Z.div.withConfig({componentId:"sc-21g986-4"})(["display:flex;align-items:center;gap:2px;"]),Woe=Z(qt).withConfig({componentId:"sc-21g986-5"})(["flex-shrink:0;color:",";",";"],function(t){var e=t.theme.palette;return e[M.TextPlaceholder]},function(t){var e=t.theme.typography;return e.font[ke.LabelMedium]}),d6=Z(Yo).withConfig({componentId:"sc-21g986-6"})(["padding:8px;svg{color:",";}"],function(t){var e=t.theme.palette,r=t.showBackButton;return r?e[M.IconsPrimary]:e[M.IconsMuted]}),Xoe=Z.div.withConfig({componentId:"sc-21g986-7"})(["width:",";height:32px;display:block;width:100%;order:4;",";@media (min-width:761px){display:flex;align-items:center;justify-content:center;width:fit-content;order:2;}"],function(t){var e=t.showBackButton;return e?"318px":"384px"},function(t){var e=t.reverseDirection;return e?"flex-direction: row-reverse":""}),Koe=Z(qt).withConfig({componentId:"sc-21g986-8"})(["cursor:pointer;color:",";",";"],function(t){var e=t.theme.palette;return e[M.TextPrimary]},function(t){var e=t.theme.typography;return e.font[ke.InputMd]}),Yoe=Z.span.withConfig({componentId:"sc-21g986-9"})(["",";"],function(t){var e=t.theme.typography;return e.font[ke.ButtonMdEmphasis]}),Zoe=Z(_d).withConfig({componentId:"sc-21g986-10"})(["padding:8px;z-index:111;"]);Z(Ei).withConfig({componentId:"sc-21g986-11"})(["padding:4px 12px;"]);var qoe=Z(A3).withConfig({componentId:"sc-21g986-12"})([""]),Qoe=Z(v9).withConfig({componentId:"sc-21g986-13"})(["margin-top:16px;"]),Joe=Z.div.withConfig({componentId:"sc-21g986-14"})(["width:100%;margin-top:16px;"]),eae=Z.div.withConfig({componentId:"sc-21g986-15"})(["margin-top:16px;width:100%;"]),tae=Z(qt).withConfig({componentId:"sc-21g986-16"})(["margin-bottom:4px;"]),rae=Z.div.withConfig({componentId:"sc-21g986-17"})(["display:flex;gap:6px;"]),nae=Z.div.withConfig({componentId:"sc-21g986-18"})(["display:flex;gap:12px;justify-content:",";"],function(t){var e=t.isPhoneScreen;return e?"space-between":"center"}),iae=Z(Yo).withConfig({componentId:"sc-21g986-19"})(["@media (min-width:761px){display:none;}"]),oae=Z.div.withConfig({componentId:"sc-21g986-20"})(["display:flex;gap:12px;align-items:center;"]),aae=Z(M3).withConfig({componentId:"sc-kpjpf5-0"})(["width:",";max-width:unset;"],function(t){var e=t.width;return e||"300px"}),sae=Z($h).withConfig({componentId:"sc-kpjpf5-1"})(function(t){var e=t.theme,r=t.isWarning;return X(["padding-bottom:0;.SfxModalTitle-Icon{background-color:",";}.SfxModalTitle-LabelPrimary{margin-bottom:24px;",";}.SfxModalTitle-LabelSecondary{",";text-align:center;}"],r&&e.palette[M.Orange_0_1_Overlay],e.typography.font[ke.TitleH3],e.typography.font[ke.TextLarge])}),lae=Z(Dh).withConfig({componentId:"sc-kpjpf5-2"})(["gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}"]),j9=function(t){var e=t.title,r=t.hint,n=t.Icon,i=t.onDone,o=t.onCancel,a=t.doneLabel,s=t.cancelLabel,c=t.isOpened,d=t.doneButtonStyle,h=t.doneButtonColor,C=h===void 0?"basic":h,v=t.cancelButtonColor,g=v===void 0?"basic":v,m=t.children,w=t.areButtonsDisabled,x=t.zIndex,b=t.className,O=t.width,f=t.isWarning;return y.createElement(aae,{className:b,open:c,onClose:o,style:{zIndex:x},onKeyUp:function(E){E.key==="Enter"&&i(E)},width:O},y.createElement(sae,{icon:y.createElement(n,{size:25}),iconShadow:!0,isWarning:f,onClose:o,primary:e,secondary:r,variant:"with-icon"}),m&&y.createElement(jh,null,m),y.createElement(lae,{align:"center"},y.createElement(Ei,{color:g,onClick:o,size:"md",disabled:w},s),y.createElement(Ei,{color:C,onClick:i,size:"md",warning:f,style:d,disabled:w},a)))};j9.defaultProps={hint:"",isOpened:!1,doneLabel:"Yes",cancelLabel:"No",doneButtonStyle:void 0,doneButtonColor:"basic",cancelButtonColor:"basic",children:void 0,areButtonsDisabled:!1,zIndex:void 0,className:void 0,width:"",isWarning:!1};var D3=function(t){var e=t.children,r=t.isReset,n=Ye(),i=n.t,o=n.theme,a=n.config,s=n.dispatch,c=n.isResetted,d=n.haveNotSavedChanges,h=n.config.onClose,C=G.useState(!1),v=Ie(C,2),g=v[0],m=v[1];if(typeof h!="function"&&!r)return y.createElement("span",null);var w=function(){m(!1)},x=G.useCallback(function(){s({type:m3,payload:{config:a}}),w()},[a]),b=function(){r||(h(fT.CLOSE_BUTTON,d),x())};return y.createElement(y.Fragment,null,y.cloneElement(e,{onClick:c===void 0||c?b:function(){m(!0)}}),g&&y.createElement(j9,{title:i(r?"warning":"discardChanges"),hint:i(r?"changesLoseWarningHint":"discardChangesWarningHint"),isOpened:g,onCancel:w,onDone:r?x:b,Icon:function(){return y.createElement(KI,{color:o.palette.warning,size:25})},doneLabel:i("confirm"),doneButtonColor:"warning-primary",cancelLabel:i("cancel"),width:"400px",isWarning:!0}))};D3.defaultProps={isReset:!1};var cae=function(){var t=Ye(),e=t.config.onClose;return typeof e=="function"?y.createElement(y.Fragment,null,y.createElement(F9,null),y.createElement(D3,null,y.createElement(Zoe,{className:"FIE_topbar-close-button",color:"basic",size:"md"},y.createElement(zI,null)))):null},uae=function(t){return 0>=t||1<t?dT:t};function mE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function Mn(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?mE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):mE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var dae={marginBottom:16},hae={minWidth:67,width:"fit-content"},fae={marginLeft:12},Im=!0,vE=function(){var t=Ye(),e=G.useRef(),r=t.theme,n=t.dispatch,i=t.originalImage,o=t.resize,a=t.isLoadingGlobally,s=t.haveNotSavedChanges,c=t.feedback,d=t.hasUndo,h=t.t,C=t.adjustments,v=C===void 0?{}:C,g=v.crop,m=t.config,w=m.onClose,x=m.closeAfterSave,b=m.onBeforeSave,O=m.onSave,f=m.forceToPngInEllipticalCrop,S=m.defaultSavedImageName,E=m.defaultSavedImageType,I=m.defaultSavedImageQuality,R=I===void 0?dT:I,k=m.useCloudimage,N=m.moreSaveOptions,T=m.disableSaveIfNoChanges,D=m.removeSaveButton,z=G.useState(!1),B=Ie(z,2),Y=B[0],W=B[1],q=G.useState({quality:uae(R)}),ee=Ie(q,2),K=ee[0],ue=ee[1],ne=uI(),ae=["jpeg","jpg","webp"].includes(K.extension),J=c.duration===0,Q=function(){var ce=ne(K,!1,!0),le=e.current||O,xe=le(ce.imageData,ce.designState),Ne=function(){n({type:_g})};xe instanceof Promise?xe.finally(Ne):Ne(),e.current=null,x&&w&&w(fT.AFTER_SAVE,s)},te=function(){n({type:U7}),W(!1),setTimeout(Q,3)},we=function(){var ce=e.current||O;if(typeof ce!="function")throw new Error("Please provide onSave function handler.");return K.name&&K.extension?void te():void n({type:Ys,payload:{feedback:{message:h("nameIsRequired")}}})},U=function(){if(!T||d){if(k){var ce=ne(K),le=e.current||O;return void le(ce.imageData,ce.designState)}return e.current||typeof b!="function"||b(K)!==!1?void W(!0):void we()}},F=function(ce,le){if(typeof ce=="function")e.current=ce,le();else throw new Error("onSave function callback is required as an argument to the passed function.")},$=function(){var ce=cI(S||i.name,f&&g.ratio===cc?"png":Xu.includes(E==null?void 0:E.toLowerCase())&&E),le=ce.name,xe=ce.extension;ue(Mn(Mn({},K),{},{name:le,extension:xe}))};if(G.useEffect(function(){i&&$()},[i]),G.useEffect(function(){!i||K.name&&K.extension||$()},[Y]),G.useEffect(function(){ue(Mn(Mn({},K),{},{size:{width:o.width,height:o.height}}))},[o]),G.useEffect(function(){return Im=!0,function(){Im=!1}},[]),D)return null;var ie=Array.isArray(N)&&0<N.length?N.map(function(pe,ce){return Mn(Mn({},pe),{},{key:"".concat(pe.label||ce,"-option-key"),onClick:typeof pe.onClick=="function"?function(){return pe.onClick(function(le){return F(le,U)},function(le){return F(le,te)})}:void 0})}):[];return y.createElement(y.Fragment,null,y.createElement(F3,{className:"FIE_topbar-save",color:"primary",onClick:U,menuPosition:"bottom",menuFromBtn:!0,label:0<ie.length?h("saveAs"):h("save"),menuItems:ie,menuStyle:fae,wrapperStyle:hae,disabled:a||T&&!d||J,noMargin:!0}),Y&&y.createElement(j9,{className:"FIE_save-modal",title:h("saveAsModalTitle"),Icon:function(ce){return y.createElement(Uq,he({color:r.palette["accent-primary"]},ce))},isOpened:Y,onCancel:function(){Im&&Y&&(e.current=null,W(!1))},onDone:we,doneLabel:h("save"),cancelLabel:h("cancel"),doneButtonColor:"primary",areButtonsDisabled:a,zIndex:11110},y.createElement(qoe,{className:"FIE_save-file-name-input",value:K.name,onChange:function(ce){var le=ce.target.value;ue(Mn(Mn({},K),{},{name:le}))},size:"sm",label:h("name"),placeholder:h("imageName"),error:!K.name,fullWidth:!0,focusOnMount:!0}),y.createElement(Qoe,{className:"FIE_save-extension-selector",onChange:function(ce){return ue(Mn(Mn({},K),{},{extension:ce}))},value:K.extension,label:h("format"),placeholder:h("extension"),size:"sm",fullWidth:!0},Xu.map(function(pe){return y.createElement(wo,{key:pe,value:pe},pe)})),ae&&y.createElement(Joe,{className:"FIE_save-quality-wrapper"},y.createElement(qt,null,h("quality")),y.createElement(qr,{annotation:"%",min:1,max:100,onChange:function(ce){ue(Mn(Mn({},K),{},{quality:Vr(ce/100,.01,1)}))},value:parseInt(100*K.quality,10),width:"100%",style:dae})),y.createElement(eae,{className:"FIE_save-resize-wrapper"},y.createElement(tae,null,h("resize")),y.createElement(T9,{onChange:function(ce){ue(Mn(Mn({},K),{},{size:Mn(Mn({},K.size),ce)}))},currentSize:(K==null?void 0:K.size)||{},hideResetButton:!0,alignLeft:!0,alignment:"space-between"}))))},nL=function(t){var e=t.margin,r=Ye(),n=r.isResetted,i=r.feedback,o=r.t,a=i.duration===0;return y.createElement(D3,{isReset:!0},y.createElement(D9,{className:"FIE_topbar-reset-button",color:"basic",size:"sm",disabled:n===void 0||n||a,title:o("resetOperations"),margin:e},y.createElement(VI,null)))};nL.defaultProps={margin:void 0};var iL=function(t){var e=t.margin,r=Ye(),n=r.dispatch,i=r.hasUndo,o=i!==void 0&&i,a=r.t,s=r.feedback,c=s.duration===0,d=G.useCallback(function(){n({type:I9})},[]);return y.createElement(D9,{className:"FIE_topbar-undo-button",color:"basic",size:"sm",onClick:o?d:void 0,disabled:!o||c,title:a("undoTitle"),margin:e},y.createElement(Xq,null))};iL.defaultProps={margin:void 0};var oL=function(t){var e=t.margin,r=Ye(),n=r.dispatch,i=r.hasRedo,o=i!==void 0&&i,a=r.t,s=G.useCallback(function(){n({type:V7})},[]);return y.createElement(D9,{className:"FIE_topbar-redo-button",color:"basic",size:"sm",onClick:o?s:void 0,disabled:!o,title:a("redoTitle"),margin:e},y.createElement(Yq,null))};oL.defaultProps={margin:void 0};var pae=[{labelKey:"fitSize",factor:"fit"},{labelKey:"actualSize",factor:1},{label:"25%",factor:.25},{label:"50%",factor:.5},{label:"75%",factor:.75},{label:"125%",factor:1.25},{label:"170%",factor:1.7},{label:"300%",factor:3},{label:"500%",factor:5},{label:"1000%",factor:10}],yE=1.1,aL=function(t){var e=t.showBackButton,r=Ye(),n=r.dispatch,i=r.zoom,o=i===void 0?{}:i,a=r.toolId,s=r.feedback,c=r.t,d=r.shownImageDimensions,h=r.resize,C=r.originalImage,v=r.adjustments.crop,g=r.config.useZoomPresetsMenu,m=s.duration===0,w=G.useState(null),x=Ie(w,2),b=x[0],O=x[1],f=function(N,T){n({type:id,payload:{factor:N,isAbsoluteZoom:T}})},S=function(){var N=h.width&&h.height&&h||v.width&&v.height&&v||d,T=G2(v.width&&v.height&&v||d,N);f(T,!0)},E=function(N){O(b?null:N.target)},I=function(N){if(N==="fit")return S(),void E();var T=h.width||h.height?N:Math.min(N*C.width/d.width,N*C.height/d.height);f(T,!0),E()},R=a===de.CROP||m,k=!C||h.width||h.height?o.factor:Math.min(d.width*o.factor/C.width,d.height*o.factor/C.height);return y.createElement(Uoe,null,y.createElement(d6,{onClick:function(){f(o.factor/yE)},color:"basic",title:c("zoomOutTitle"),disabled:R,showBackButton:e,className:"FIE_topbar-zoom-out-btn"},y.createElement(CJ,null)),y.createElement(Koe,{title:c("toggleZoomMenuTitle"),onClick:R?void 0:g&&E||S,"aria-disabled":R,className:"FIE_topbar-zoom-label"},"".concat(_r(100*k,0),"%")),y.createElement(d6,{onClick:function(){f(o.factor*yE)},color:"basic",title:c("zoomInTitle"),disabled:R,showBackButton:e,className:"FIE_topbar-zoom-in-btn"},y.createElement(fJ,null)),y.createElement(Ha,{anchorEl:b,onClose:E,open:!!b,position:"bottom",className:"FIE_topbar-zoom-menu"},pae.map(function(N){var T=N.factor,D=N.labelKey,z=N.label;return y.createElement(wo,{key:z||D,onClick:function(){return I(T)}},y.createElement(O3,null,z??c(D)))})))};aL.defaultProps={showBackButton:!1};var sL=function(t){var e=t.showBackButton,r=t.isPhoneScreen,n=Ye(),i=n.dispatch,o=n.isResetted,a=o===void 0||o,s=n.originalImage,c=n.resize,d=c===void 0?{}:c,h=n.adjustments,C=h.crop,v=h.rotation,g=v===void 0?0:v,m=n.shownImageDimensions,w=n.config.disableZooming,x=n.t,b=function(){i({type:c6,payload:{isShow:!1}}),document.removeEventListener("mouseup",b),document.removeEventListener("mouseleave",b),document.removeEventListener("touchcancel",b),document.removeEventListener("touchend",b)},O=function(){i({type:c6,payload:{isShow:!0}}),document.addEventListener("mouseup",b),document.addEventListener("mouseleave",b),document.addEventListener("touchcancel",b),document.addEventListener("touchend",b)};if(!s)return null;var f=jA(d,C,m,s,g);return y.createElement(nae,{isPhoneScreen:r},y.createElement(Woe,{title:x("imageDimensionsHoverTitle")},"".concat(f.width," x ").concat(f.height," px")),y.createElement(oae,null,y.createElement(d6,{color:"basic",onMouseDown:a?void 0:O,onTouchStart:a?void 0:O,disabled:a,showBackButton:e,title:x("showImageTitle")},y.createElement(vJ,null)),!w&&y.createElement(y.Fragment,null,y.createElement(F9,null),y.createElement(aL,{showBackButton:e}))))};sL.defaultProps={showBackButton:!1,isPhoneScreen:!1};var gae=function(){var t=Ye(),e=t.t,r=_o();return y.createElement(D3,null,y.createElement(Ei,{className:"FIE_topbar-back-button",color:"link-secondary",size:"sm",startIcon:y.createElement(QI,null)},!r&&y.createElement(Yoe,null,e("back"))))},lL=function(t){var e=t.toggleMainMenu,r=Ye(),n=r.config.showBackButton,i=_o(320);return y.createElement(Hoe,{className:"FIE_topbar",isPhoneScreen:i},y.createElement(Goe,{className:"FIE_topbar-buttons-wrapper"},y.createElement(iae,{className:"FIE_tabs_toggle_btn",size:i?"sm":"lg",color:"basic",onClick:function(){return e(!0)}},function(o){return y.createElement(eA,o)}),n?y.createElement(gae,null):y.createElement(vE,null)),y.createElement(Xoe,{className:"FIE_topbar-center-options",showBackButton:n},y.createElement(sL,{showBackButton:n,isPhoneScreen:i})),y.createElement(Voe,null,y.createElement(rae,{className:"FIE_topbar-history-buttons"},y.createElement(nL,{margin:"0",showBackButton:n}),y.createElement(iL,{margin:"0",showBackButton:n}),y.createElement(oL,{margin:"0",showBackButton:n})),n?y.createElement(vE,null):y.createElement(cae,null)))};lL.defaultProps={toggleMainMenu:function(){}};var mae=Z.div.withConfig({componentId:"sc-qhd6ow-0"})(function(t){var e=t.theme;return`
width: 72px;
min-height: 66px;
padding: 4px 2px;
border-radius: 4px;
display: flex;
flex-direction: column;
gap: 6px;
background: `.concat(e.palette[M.BackgroundStateless],`;
align-items: center;
justify-content: center;
[data-phone='true'] & {
margin-bottom: 0;
height: 50px;
border-radius: 0;
}
svg {
color: `).concat(e.palette[M.IconsPrimary],`;
}
&,
* {
cursor: pointer;
}
&:hover {
background: `).concat(e.palette["bg-primary-active"],`;
}
&[aria-selected='true'] {
background: `).concat(e.palette["bg-primary-active"],`;
* {
color: `).concat(e.palette["accent-primary-active"],`;
}
}
`)}),vae=Z(qt).withConfig({componentId:"sc-qhd6ow-1"})(function(t){var e=t.theme;return`
color: `.concat(e.palette[M.TextPrimary],`;
`).concat(e.typography.font[ke.LabelSmall],`;
font-size: 12px;
line-height: 14px;
span {
white-space: normal;
}
[data-phone='true'] & {
font-size: 10px;
}
`)}),cL=function(t){var e=t.id,r=t.label,n=t.Icon,i=t.isSelected,o=t.onClick,a=G.useCallback(function(){typeof o=="function"&&o(e)},[e]);return y.createElement(mae,{className:"FIE_tab","aria-selected":i,onClick:a},y.createElement(n,{size:24}),r&&y.createElement(vae,{className:"FIE_tab-label"},r))};cL.defaultProps={isSelected:!1,onClick:void 0,label:void 0};const yae=G.memo(cL);var Am=[{id:Zt.ADJUST,labelKey:"adjustTab",icon:jJ},{id:Zt.FINETUNE,labelKey:"finetuneTab",icon:EJ},{id:Zt.FILTERS,labelKey:"filtersTab",icon:Jq,hideFn:function(e){var r=e.useCloudimage;return r}},{id:Zt.WATERMARK,labelKey:"watermarkTab",icon:sQ},{id:Zt.ANNOTATE,labelKey:"annotateTabLabel",icon:TJ,hideFn:function(e){var r=e.useCloudimage;return r}},{id:Zt.RESIZE,labelKey:"resizeTab",icon:oQ}],z9=function(t){var e=t.toggleMainMenu,r=t.isDrawer,n=Ye(),i=n.t,o=n.tabId,a=o===void 0?null:o,s=n.dispatch,c=n.config,d=c.defaultTabId,h=c.tabsIds,C=c.useCloudimage,v=G.useCallback(function(w){s({type:$A,payload:{tabId:w}}),e(!1)},[]),g=G.useMemo(function(){var w=[];return 0<Object.keys(h).length?Am.forEach(function(x){var b=h.indexOf(x.id);b!==-1&&(w[b]=x)}):w=Am,(0<w.length?w:Am).filter(function(x){var b=x.hideFn;return!b||!b({useCloudimage:C})})},[h]);if(g.length===1)return null;var m=function(w){var x=w.id,b=w.labelKey,O=w.icon;return y.createElement(yae,{key:x,id:x,label:i(b),Icon:O,isSelected:(a||d)===x,onClick:v})};return y.createElement(y.Fragment,null,g.map(function(w){return r?y.createElement(E9,{key:w.id},m(w)):m(w)}))};z9.defaultProps={toggleMainMenu:function(){},isDrawer:!1};var uL=function(t){var e=t.children,r=t.isPhoneScreen;return y.createElement(DK,{className:"FIE_tool-options-wrapper",hasChildren:!!e,isPhoneScreen:r},e)};uL.defaultProps={children:void 0,isPhoneScreen:!1};var Cae={maxWidth:"100%",width:"100%"},dL=function(t){var e,r=t.isPhoneScreen,n=Ye(),i=n.t,o=n.dispatch,a=n.tabId,s=n.toolId,c=n.annotations,d=n.selectionsIds,h=d===void 0?[]:d,C=n.config,v=C.defaultTabId,g=C.defaultToolId,m=C.useCloudimage,w=a||v,x=s||g||((e=Qf[w])===null||e===void 0?void 0:e[0]),b=G.useMemo(function(){return Qf[w]||[]},[w]),O=G.useCallback(function(E){o({type:W2,payload:{toolId:E}})},[]),f=G.useMemo(function(){return b.map(function(E){var I=w0[E],R=I.Item,k=I.hideFn;return R&&(!k||!k({useCloudimage:m}))&&y.createElement(R,{key:E,selectTool:O,t:i,isSelected:x===E})})},[b,x]),S=G.useMemo(function(){var E,I,R;if(!x)return!1;if(w===Zt.ANNOTATE){var k=h.length;if(k===1){var N,T=c[h[0]];return(N=w0[T.name])===null||N===void 0?void 0:N.ItemOptions}if(1<k)return null}return w&&x&&Qf[w].includes(x)&&(!((E=w0[s])!==null&&E!==void 0&&E.hideFn)||!((I=w0[s])!==null&&I!==void 0&&I.hideFn({useCloudimage:m})))&&((R=w0[s])===null||R===void 0?void 0:R.ItemOptions)},[w,x,c,h]);return G.useEffect(function(){!s&&x&&o({type:W2,payload:{toolId:x}})},[]),y.createElement(RK,{className:"FIE_tools-bar-wrapper"},y.createElement(uL,{isPhoneScreen:r},S&&y.createElement(S,{t:i})),f&&y.createElement(NK,{className:"FIE_tools-bar",isPhoneScreen:r},w===Zt.WATERMARK?f:y.createElement(R3,{className:"FIE_tools",style:Cae},f)))};dL.defaultProps={isPhoneScreen:!1};var wae={horizontal:"center",vertical:"bottom"},Sae=A(A({},Ku.ERROR,"error"),Ku.WARNING,"warning"),hL=function(t){var e,r=t.anchorOrigin,n=Ye(),i=n.feedback,o=i===void 0?{}:i,a=n.dispatch;return o.message?y.createElement(g9,{className:"FIE_feedback-robot",anchorOrigin:r,autoHideDuration:(e=o.duration)!==null&&e!==void 0?e:5e3,message:o.message,open:!!o.message,status:Sae[o.status||Ku.ERROR],onClose:function(){a({type:Ys,payload:{feedback:{}}})}}):null};hL.defaultProps={anchorOrigin:wae};var bae=m8(["to{transform:rotate(360deg);}"]),_ae=Z.div.withConfig({componentId:"sc-m42fbk-0"})(["background:",";display:flex;align-items:center;justify-content:center;position:absolute;z-index:11111;top:0;bottom:0;right:0;left:0;flex-direction:column;user-select:none;"],function(t){var e=t.theme.palette;return e[M.BackgroundStateless]}),xae=Z(ZJ).withConfig({componentId:"sc-m42fbk-1"})(["animation:"," 1.2s infinite;"],bae),fL=function(t){var e=t.theme;return y.createElement(_ae,{className:"FIE_spinner-wrapper"},y.createElement(xae,{size:50,color:e.palette[M.AccentStateless]}))};fL.defaultProps={theme:{}};var Eae=["cropX2","cropY2","crop","watermark"];function CE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ga(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?CE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):CE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Oae=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:{},n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:{},i=eH[e];switch(t){case"wat_text":return{watermark:{text:e.replaceAll("+"," ")}};case"wat_font":return{watermark:{fontFamily:e}};case"wat_color":return{watermark:{fill:"#".concat(e)}};case"wat_fontsize":return{watermark:{fontSize:parseFloat(e)}};case"wat_opacity":return{watermark:{opacity:parseFloat(e)}};case"wat_pos":{var o=e.split(","),a=Ie(o,2),s=a[0],c=a[1];return{watermark:{x:parseFloat(s)/100*r.width,y:parseFloat(c)/100*r.height}}}case"wat_url":return{watermark:{image:decodeURIComponent(e)}};case"wat_scale":{var d=e.split(","),h=Ie(d,2),C=h[0],v=h[1];return{watermark:{width:parseFloat(C)/100*(r.width||0),height:parseFloat(v)/100*(r.height||0)}}}case"tl_px":{var g=e.split(","),m=Ie(g,2),w=m[0],x=m[1];return{crop:{x:Go(parseFloat(w),0,n.width,0,r.width),y:Go(parseFloat(x),0,n.height,0,r.height)}}}case"br_px":{var b=e.split(","),O=Ie(b,2),f=O[0],S=O[1];return{cropX2:Go(parseFloat(f),0,n.width,0,r.width),cropY2:Go(parseFloat(S),0,n.height,0,r.height)}}case"round":return{crop:{ratio:cc}};case"gravity":return{crop:i?{lockCropAreaAt:i,width:null,height:null}:{noEffect:!0,ratio:e,ratioTitleKey:e,width:null,height:null}};case"aspect_ratio":return{crop:{ratio:+e}};case"w":return{resize:{width:parseFloat(e)}};case"h":return{resize:{height:parseFloat(e)}};case"r":return{adjustments:{rotation:-parseInt(e,10)}};case"flip":case"mirror":return{adjustments:{isFlippedX:e.includes("x")||e.includes("h"),isFlippedY:e.includes("y")||e.includes("v")}};default:{var E;if(Object.keys(Yf).forEach(function(N){Yf[N].cloudimage.name===t.toLowerCase()&&(E=N)}),!E)return null;var I=Yf[E],R=I.cloudimage,k=I.internal;return{finetunes:[br.Filters[E]],finetunesProps:A({},k.propName,Go(parseFloat(e),R.min,R.max,k.min,k.max))}}}},Pae=function(t,e,r){if(!t)return null;var n=t.split("&"),i={};n.forEach(function(v){var g=v.split("="),m=Ie(g,2),w=m[0],x=m[1],b=Oae(w,x,e,r);b&&(i=Gh(i,b,!0))});var o=i,a=o.cropX2,s=o.cropY2,c=o.crop,d=o.watermark,h=ve(o,Eae),C=ga(ga(ga({},h),a&&s&&c||c!=null&&c.noEffect||c!=null&&c.lockCropAreaAt?{adjustments:ga(ga({},h.adjustments),{},{crop:ga({width:(a||0)-c.x,height:(s||0)-c.y},c)})}:{}),{},{annotations:ga({},d?A({},As,ga(ga({},d),{},{x:((c==null?void 0:c.x)||0)+(d.x||0),y:((c==null?void 0:c.y)||0)+(d.y||0),id:As,name:d.text?de.TEXT:de.IMAGE},d.text?{width:d.text.length*d.fontSize,height:d.fontSize}:{})):{})});return C},Lm=function(t,e){return t&&e&&(t instanceof HTMLImageElement&&t.src===e.src&&t.width===e.width&&t.height===e.height||((t==null?void 0:t.src)||t)===e.src)},wE=function(t,e){var r=G.useRef(!0);G.useEffect(function(){return function(){r.current=!0}},[]),G.useEffect(function(){if(r.current)r.current=!1;else if(typeof t=="function")return t()},e)},kae=Z.div.attrs(function(t){var e,r,n=t.$size,i=n===void 0?{}:n;return{style:{width:(e=i.width)!==null&&e!==void 0?e:"100%",height:(r=i.height)!==null&&r!==void 0?r:"100%"}}}).withConfig({componentId:"sc-ugtqr7-0"})(["display:flex;flex-direction:column;align-items:center;height:100%;max-height:100%;width:100%;max-width:100%;overflow:auto;border-radius:8px;position:relative;min-height:250px;background:",";",""],function(t){var e=t.theme;return e.palette["bg-secondary"]},function(t){var e=t.showTabsDrawer;return e&&`
overflow: unset;
`}),Tae=Z.div.withConfig({componentId:"sc-ugtqr7-1"})(["display:flex;align-items:flex-start;width:100%;box-sizing:border-box;height:calc(100% - 95px);flex-grow:1;[data-phone='true'] &{padding:0;}"]),Iae=Z.div.withConfig({componentId:"sc-ugtqr7-2"})(["height:100%;width:calc(100% - 80px);flex-grow:1;overflow-y:auto;display:flex;flex-direction:column;",""],function(t){var e=t.showTabsDrawer;return e&&`
overflow-y: unset;
`}),Aae=Z.div.withConfig({componentId:"sc-ugtqr7-3"})(["min-width:108px;height:100%;padding:16px;display:flex;flex-direction:column;gap:16px;overflow-y:auto;max-height:100%;box-shadow:6px 8px 12px 0px rgba(146,166,188,0.14);[data-phone='true'] &{display:flex;padding:0;}"]),Lae=Z(S9).withConfig({componentId:"sc-ugtqr7-4"})(["transition:transform 200ms ease-in-out;width:92px;height:100%;padding:12px;.SfxDrawer-list,.SfxDrawer-item{padding:0;}"]),pL=function(t){var e=t.toggleMainMenu,r=Ye(),n=r.t,i=r.showTabsMenu;return y.createElement(Lae,{className:"FIE_tabs-drawer",open:i,onClose:function(){return e(!1)},disablePortal:!0},y.createElement(b9,null,y.createElement(Ei,{color:"link-basic-secondary",startIcon:y.createElement(eA,null),onClick:function(){return e(!1)}},n("tabsMenu"))),y.createElement(_9,null,y.createElement(x9,null,y.createElement(z9,{toggleMainMenu:e,isDrawer:!0}))))};pL.defaultProps={toggleMainMenu:function(){}};function SE(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function bE(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?SE(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):SE(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}var Mae=function(){var t=Ye(),e=t.config,r=t.isLoadingGlobally,n=t.haveNotSavedChanges,i=t.dispatch,o=t.originalImage,a=t.shownImageDimensions,s=t.t,c=t.theme,d=t.feedback,h=d===void 0?{}:d,C=e.loadableDesignState,v=e.useCloudimage,g=e.cloudimage,m=e.source,w=e.avoidChangesNotSavedAlertOnLeave,x=e.useBackendTranslations,b=e.translations,O=e.language,f=e.defaultSavedImageName,S=e.observePluginContainerSize,E=e.showCanvasOnly,I=e.getCurrentImgDataFnRef,R=e.updateStateFnRef,k=e.noCrossOrigin,N=e.resetOnImageSourceChange,T=window.matchMedia("(max-width: 760px)").matches,D=K7(),z=Ie(D,2),B=z[0],Y=z[1],W=G.useState({width:void 0,height:void 0}),q=Ie(W,2),ee=q[0],K=q[1],ue=_o(),ne=G.useRef(null),ae=G.useRef(!1),J=G.useRef(null),Q=G.useRef(n),te=uI(),we=G.useCallback(function(le){i({type:VA,payload:{originalImage:le}})},[]),U=G.useCallback(function(le){i({type:Ys,payload:{feedback:{message:le.message||le,duration:0}}})},[]),F=function(le){return new Promise(function(xe){var Ne=(le==null?void 0:le.src)||le;if(J.current===Ne||!Ne&&o||Lm(Ne,o))return void(J.current||xe());var _e=function(){J.current=null,xe()};J.current=Ne,setTimeout(function(){if(typeof le=="string")eL(le,f,k).then(we).catch(U).finally(_e);else if(le instanceof HTMLImageElement){if(!le.name&&f&&(le.name=f),!le.complete)return void le.addEventListener("load",function(){we(le),_e()});we(le),_e()}else U(s("invalidImageError")),_e()},0)})},$=function(le){Q.current&&(le.preventDefault(),le.returnValue="")},ie=function(){var le=0<arguments.length&&arguments[0]!==void 0?arguments[0]:function(){return[]};return i({type:U7}),Promise.all(le()).finally(function(){i({type:_g})})},pe=function(){C&&0<Object.keys(C).length&&i({type:Jf,payload:bE(bE({},C),{},{finetunes:tI(C==null?void 0:C.finetunes),filter:JT(C==null?void 0:C.filter)})})};wE(function(){m&&!Lm(m,o)&&(ae.current=!1,ie(function(){return[F(m)]})),N&&i({type:m3,payload:{config:e}})},[m]),wE(function(){var le=C==null?void 0:C.imgSrc;le&&!Lm(le,o)?ie(function(){return[F(le).then(pe)]}):pe()},[C]),G.useEffect(function(){0<Object.keys(a||{}).length&&!Object.keys(a).some(function(le){return!a[le]})&&o&&v&&g!==null&&g!==void 0&&g.loadableQuery&&!ae.current&&(i({type:Jf,payload:Pae(g.loadableQuery,a,o)}),ae.current=!0)},[a,o,v,g]),G.useEffect(function(){var le=!1;return S&&ne.current?B(ne.current.parentNode,function(xe){var Ne=xe.width,_e=xe.height;return K({width:Ne,height:_e})}):ee.width&&ee.height&&!le&&K({width:void 0,height:void 0}),function(){S&&ne.current&&Y(ne.current),le=!0}},[S]),G.useEffect(function(){return ie(function(){return[F((C==null?void 0:C.imgSrc)||m)].concat(cr(x?[WX(O,b)]:[]))}),window&&!w&&window.addEventListener("beforeunload",$),function(){window&&!w&&window.removeEventListener("beforeunload",$)}},[]),G.useEffect(function(){R&&Un(R)==="object"&&(R.current=function(le){i({type:Jf,payload:le})})},[R,i]),G.useEffect(function(){I&&Un(I)==="object"&&(I.current=te)},[te]),G.useEffect(function(){Q.current=n},[n]);var ce=function(le){i({type:ZA,payload:{opened:le}})};return y.createElement(kae,{className:M2,"data-phone":ue,showTabsDrawer:T,ref:ne,$size:ee},r&&y.createElement(fL,{theme:c}),function(){return y.createElement(y.Fragment,null,!E&&y.createElement(y.Fragment,null,T&&y.createElement(pL,{toggleMainMenu:ce}),y.createElement(lL,{toggleMainMenu:ce})),o&&h.duration!==0&&y.createElement(Tae,{className:"FIE_main-container"},!E&&!T&&y.createElement(Aae,{className:"FIE_tabs"},y.createElement(z9,{toggleMainMenu:ce})),y.createElement(Iae,{className:"FIE_editor-content",showTabsDrawer:T},y.createElement($oe,null),!E&&y.createElement(dL,{isPhoneScreen:ue}))))}(),y.createElement(hL,null))};const Rae=G.memo(Mae);var Nae=function(){Object.keys(Konva.Filters).forEach(function(t){return Konva.Filters[t].finetuneName=t})},Fae=kp([".","{font-family:",";}.SfxModal-Wrapper *{font-family:",";}"],M2,function(t){var e,r=t.theme,n=r===void 0?{}:r;return((e=n.typography)===null||e===void 0?void 0:e.fontFamily)||"Arial"},function(t){var e,r=t.theme,n=r===void 0?{}:r;return((e=n.typography)===null||e===void 0?void 0:e.fontFamily)||"Arial"}),Dae=kp([".Menu-open{overflow:visible !important;}.",",#SfxPopper{box-sizing:border-box;.SfxPopper-root .SfxMenu-root{overflow:visible;width:max-content;.SfxMenuItem-prefix{margin-right:6px;}}}."," *,#SfxPopper *{box-sizing:border-box;scrollbar-color:rgba(203,211,218,1) rgba(203,211,218,0.35);:not(button) > svg:not([color]){color:",'}:disabled,[aria-disabled="true"]{cursor:not-allowed;}&::-webkit-scrollbar{width:4px;height:4px;}&::-webkit-scrollbar-track{background:rgba(203,211,218,0.35);}&::-webkit-scrollbar-thumb{background:rgba(203,211,218,1);border-radius:10px;}}'],M2,M2,function(t){var e=t.theme;return e.palette["icons-primary"]}),gL=function(t){var e=t.source,r=t.useCloudimage,n=t.cloudimage;if(!e||typeof e!="string"&&!(e instanceof HTMLImageElement))throw new Error("`source` property is required either a string of image url or a HTMLImageElement for the image that will be edited.");if(r){var i,o;if(n!=null&&(i=n.imageSealing)!==null&&i!==void 0&&i.enable&&!(n!=null&&(o=n.imageSealing)!==null&&o!==void 0&&o.salt))throw new Error("`salt` property of imageSealing object is required in cloudimage mode as long as `imageSealing` is enabled.")}G.useEffect(function(){Nae()},[]);var a=Gh(mT,t);return y.createElement(y.StrictMode,null,y.createElement(dk,{theme:a.theme},y.createElement(Fae,null),y.createElement(Dae,null),y.createElement(oI,{config:a},y.createElement(Rae,null))))};gL.defaultProps={useCloudimage:!1,cloudimage:{}};const jae=G.memo(gL);function _E(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xE(t){for(var e,r=1;r<arguments.length;r++)e=arguments[r]==null?{}:arguments[r],r%2?_E(Object(e),!0).forEach(function(n){A(t,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):_E(Object(e)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))});return t}function Mm(t,e,r){zae(t,e),e.set(t,r)}function zae(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function El(t,e){return t.get(mL(t,e))}function Ef(t,e,r){return t.set(mL(t,e),r),r}function mL(t,e,r){if(typeof t=="function"?t===e:t.has(e))return 3>arguments.length?e:r;throw new TypeError("Private element is not present on this object")}var ou=new WeakMap,Of=new WeakMap,Pf=new WeakMap,bu=function(){function t(e){var r=1<arguments.length&&arguments[1]!==void 0?arguments[1]:{};if(YL(this,t),Mm(this,ou,void 0),Mm(this,Of,void 0),Mm(this,Pf,void 0),this.container=e,this.config=r,!e||!(e instanceof HTMLElement))throw new Error("`container` (argument 0) is required to initialize the image editor plugin.");Ef(ou,this,Ov(this.container)),Ef(Of,this,{}),Ef(Pf,this,{}),this.getCurrentImgData=this.getCurrentImgData.bind(this),this.render=this.render.bind(this),this.terminate=this.terminate.bind(this),this.updateState=this.updateState.bind(this)}return QL(t,[{key:"render",value:function(r){Un(r)==="object"&&(this.config=this.config=Gh(this.config||{},r)),this.config=xE(xE({},this.config),{},{getCurrentImgDataFnRef:El(Of,this),updateStateFnRef:El(Pf,this)}),El(ou,this)._internalRoot||Ef(ou,this,Ov(this.container)),El(ou,this).render(G.createElement(jae,this.config))}},{key:"terminate",value:function(){El(ou,this).unmount()}},{key:"getCurrentImgData",value:function(r,n,i){var o,a;return((o=El(Of,this))===null||o===void 0||(a=o.current)===null||a===void 0?void 0:a.call(o,r,n,i))||{}}},{key:"updateState",value:function(r){var n,i;(n=El(Pf,this))===null||n===void 0||(i=n.current)===null||i===void 0||i.call(n,r)}}])}();A(bu,"TABS",Zt),A(bu,"TOOLS",de),bu.TABS=Zt,bu.TOOLS=de;function yse({stateUrl:t,stateImageData:e,stateDesignState:r,statePath:n,translations:i,typographyFontFamily:o,paletteBgPrimary:a,paletteBgSecondary:s,paletteBgPrimaryActive:c,paletteAccentPrimary:d,paletteAccentPrimaryActive:h,paletteIconsPrimary:C,paletteIconsSecondary:v,paletteBordersSecondary:g,paletteBordersPrimary:m,paletteBordersStrong:w,paletteLightShadow:x,paletteWarning:b,paletteTextPrimary:O,paletteTextSecondary:f,paletteTextSecondaryInvert:S,paletteTextPlaceholder:E,paletteTextWarning:I,paletteTextError:R,paletteTextInfo:k,paletteAccentPrimaryHover:N,paletteAccentPrimaryDisabled:T,paletteAccentSecondaryDisabled:D,paletteAccentStateless:z,paletteAccentStateless_0_4_Opacity:B,paletteAccent_0_5_5_Opacity:Y,paletteAccent_0_5_Opacity:W,paletteAccent_0_7_Opacity:q,paletteAccent_1_2_Opacity:ee,paletteAccent_1_8_Opacity:K,paletteAccent_2_8_Opacity:ue,paletteAccent_4_0_Opacity:ne,paletteBackgroundGrey:ae,paletteBackgroundStateless:J,paletteBackgroundActive:Q,paletteBackgroundBaseLight:te,paletteBackgroundBaseMedium:we,paletteBackgroundPrimaryLight:U,paletteBackgroundPrimaryHover:F,paletteBackgroundPrimaryStateless:$,paletteBackgroundPrimary_0_5_Opacity:ie,paletteBackgroundSecondary:pe,paletteBackgroundHover:ce,paletteBackgroundGreen:le,paletteBackgroundGreenMedium:xe,paletteBackgroundBlue:Ne,paletteBackgroundRed:_e,paletteBackgroundRedLight:He,paletteBackgroundRedMedium:Ee,paletteBackgroundOrange:Ve,paletteBackgroundTooltip:We,paletteIconsPrimaryOpacity_0_6:Me,paletteIconsPlaceholder:gt,paletteIconsInvert:St,paletteIconsMuted:qe,paletteIconsPrimaryHover:je,paletteIconsSecondaryHover:Ke,paletteButtonPrimaryText:bt,paletteButtonPrimaryText_0_6:Lt,paletteButtonPrimaryText_0_4:tr,paletteButtonDisabledText:Ii,paletteButtonSecondaryText:mt,paletteLinkPrimary:Pe,paletteLinkStateless:at,paletteLinkHover:ct,paletteLinkActive:Tt,paletteLinkMuted:It,paletteLinkPressed:or,paletteBordersPrimaryHover:gr,paletteBordersInvert:nn,paletteBorderHoverBottom:pi,paletteBorderActiveBottom:Qe,paletteBorderPrimaryStateless:Je,paletteBordersDisabled:jt,paletteBordersButton:ut,paletteBordersItem:Dr,paletteBordersBaseLight:jr,paletteBordersBaseMedium:Qi,paletteBordersGreen:Ai,paletteBordersGreenMedium:Va,paletteBordersRed:Sn,paletteActiveSecondary:rl,paletteActiveSecondaryHover:nl}){return{stateUrl:t,statePath:n,stateImageData:e,stateDesignState:r,filerobotImageEditor:void 0,init:function(){const{TABS:mr,TOOLS:vr}=bu;let pn={source:"URL",Crop:{presetsItems:[],presetsFolders:[]},tabsIds:[mr.ADJUST,mr.FINETUNE,mr.FILTERS,mr.WATERMARK,mr.ANNOTATE,mr.RESIZE],useBackendTranslations:!1,translations:i,disableSaveIfNoChanges:!0,closeAfterSave:!1,removeSaveButton:!0,showBackButton:!0,theme:{palette:{"bg-primary":a,"bg-secondary":s,"bg-primary-active":c,"accent-primary":d,"accent-primary-active":h,"icons-primary":C,"icons-secondary":v,"borders-secondary":g,"borders-primary":m,"borders-strong":w,"light-shadow":x,warning:b,"txt-primary":O,"txt-secondary":f,"txt-secondary-invert":S,"txt-placeholder":E,"txt-warning":I,"txt-error":R,"txt-info":k,"accent-primary-hover":N,"accent-primary-disabled":T,"accent-secondary-disabled":D,"accent-stateless":z,"accent-stateless_0_4_opacity":B,accent_0_5_5_opacity:Y,accent_0_5_opacity:W,accent_0_7_opacity:q,accent_1_2_opacity:ee,accent_1_8_opacity:K,accent_2_8_opacity:ue,accent_4_0_opacity:ne,"bg-grey":ae,"bg-stateless":J,"bg-active":Q,"bg-base-light":te,"bg-base-medium":we,"bg-primary-light":U,"bg-primary-hover":F,"bg-primary-stateless":$,"bg-primary-0-5-opacity":ie,"bg-hover":ce,"bg-green":le,"bg-green-medium":xe,"bg-blue":Ne,"bg-red":_e,"bg-red-light":He,"background-red-medium":Ee,"bg-orange":Ve,"bg-tooltip":We,"icons-primary-opacity-0-6":Me,"icons-placeholder":gt,"icons-invert":St,"icons-muted":qe,"icons-primary-hover":je,"icons-secondary-hover":Ke,"btn-primary-text":bt,"btn-primary-text-0-6":Lt,"btn-primary-text-0-4":tr,"btn-disabled-text":Ii,"btn-secondary-text":mt,"link-primary":Pe,"link-stateless":at,"link-hover":ct,"link-active":Tt,"link-muted":It,"link-pressed":or,"borders-primary-hover":gr,"borders-invert":nn,"border-hover-bottom":pi,"border-active-bottom":Qe,"border-primary-stateless":Je,"borders-disabled":jt,"borders-button":ut,"borders-item":Dr,"borders-base-light":jr,"borders-base-medium":Qi,"borders-green":Ai,"borders-green-medium":Va,"borders-red":Sn,"active-secondary":rl,"active-secondary-hover":nl},typography:{fontFamily:o}}};this.filerobotImageEditor=new bu(this.$refs.container,pn),this.stateUrl&&this.renderFilerobotImageEditor(),this.$watch("stateUrl",Kn=>{Kn?(this.renderFilerobotImageEditor(),this.updateStateImageData({}),this.updateStateDesignState({})):this.filerobotImageEditor.terminate()})},renderFilerobotImageEditor:function(){let mr=this.filerobotImageEditor;this.filerobotImageEditor.terminate();let vr=this;mr.render({source:this.stateUrl,onModify:function(pn){let{designState:Kn,imageData:xd}=mr.getCurrentImgData();vr.updateStateImageData(xd),vr.updateStateDesignState(Kn)}})},updateStateImageData:function(mr){this.stateImageData=mr},updateStateDesignState:function(mr){this.stateDesignState=mr}}}export{yse as default};