From 2a8bad243b0f9001848b78bb76080b9ef7ae4e9b Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Sat, 13 Jul 2024 09:05:01 +0200 Subject: [PATCH] fix: @nextcloud/typings import Signed-off-by: skjnldsv --- js/viewer-filerobot.js | 4 +- js/viewer-filerobot.js.map | 2 +- js/viewer-main.js | 4 +- js/viewer-main.js.LICENSE.txt | 559 +----------------- js/viewer-main.js.map | 2 +- ..._dialogs_dist_chunks_index-8MlGJxD8_mjs.js | 2 + ...logs_dist_chunks_index-8MlGJxD8_mjs.js.map | 1 + ..._dialogs_dist_chunks_index-RkOaxczZ_mjs.js | 3 - ...t_chunks_index-RkOaxczZ_mjs.js.LICENSE.txt | 21 - ...logs_dist_chunks_index-RkOaxczZ_mjs.js.map | 1 - ...ogs_dist_chunks_FilePicker-C62Gh8th_mjs.js | 2 + ...dist_chunks_FilePicker-C62Gh8th_mjs.js.map | 1 + ...ogs_dist_chunks_FilePicker-DBGB1Rec_mjs.js | 3 - ...nks_FilePicker-DBGB1Rec_mjs.js.LICENSE.txt | 63 -- ...dist_chunks_FilePicker-DBGB1Rec_mjs.js.map | 1 - package-lock.json | 8 +- package.json | 2 +- src/utils/fileUtils.ts | 3 +- 18 files changed, 20 insertions(+), 662 deletions(-) create mode 100644 js/viewer-node_modules_nextcloud_dialogs_dist_chunks_index-8MlGJxD8_mjs.js create mode 100644 js/viewer-node_modules_nextcloud_dialogs_dist_chunks_index-8MlGJxD8_mjs.js.map delete mode 100644 js/viewer-node_modules_nextcloud_dialogs_dist_chunks_index-RkOaxczZ_mjs.js delete mode 100644 js/viewer-node_modules_nextcloud_dialogs_dist_chunks_index-RkOaxczZ_mjs.js.LICENSE.txt delete mode 100644 js/viewer-node_modules_nextcloud_dialogs_dist_chunks_index-RkOaxczZ_mjs.js.map create mode 100644 js/viewer-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-C62Gh8th_mjs.js create mode 100644 js/viewer-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-C62Gh8th_mjs.js.map delete mode 100644 js/viewer-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DBGB1Rec_mjs.js delete mode 100644 js/viewer-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DBGB1Rec_mjs.js.LICENSE.txt delete mode 100644 js/viewer-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DBGB1Rec_mjs.js.map diff --git a/js/viewer-filerobot.js b/js/viewer-filerobot.js index 7b37730f1..79e04fea7 100644 --- a/js/viewer-filerobot.js +++ b/js/viewer-filerobot.js @@ -1,3 +1,3 @@ /*! For license information please see viewer-filerobot.js.LICENSE.txt */ -(self.webpackChunkviewer=self.webpackChunkviewer||[]).push([["filerobot"],{5543:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>wj});var r={};n.r(r),n.d(r,{appendChild:()=>Ui,appendChildToContainer:()=>Zi,appendInitialChild:()=>ki,cancelTimeout:()=>Hi,clearContainer:()=>oa,commitMount:()=>Qi,commitTextUpdate:()=>Ki,commitUpdate:()=>Ji,createInstance:()=>Oi,createTextInstance:()=>Pi,detachDeletedInstance:()=>ia,finalizeInitialChildren:()=>_i,getChildHostContext:()=>Di,getCurrentEventPriority:()=>aa,getPublicInstance:()=>Li,getRootHostContext:()=>Ri,hideInstance:()=>ea,hideTextInstance:()=>ta,idlePriority:()=>Ci.unstable_IdlePriority,insertBefore:()=>Xi,insertInContainerBefore:()=>Yi,isPrimaryRenderer:()=>Wi,noTimeout:()=>Bi,now:()=>Ci.unstable_now,prepareForCommit:()=>Ii,preparePortalMount:()=>Ti,prepareUpdate:()=>Mi,removeChild:()=>qi,removeChildFromContainer:()=>$i,resetAfterCommit:()=>ji,resetTextContent:()=>Ai,run:()=>Ci.unstable_runWithPriority,scheduleTimeout:()=>Ni,shouldDeprioritizeSubtree:()=>zi,shouldSetTextContent:()=>Fi,supportsMutation:()=>Gi,unhideInstance:()=>na,unhideTextInstance:()=>ra,warnsIfNotActing:()=>Vi});var o={};n.r(o),n.d(o,{Aden:()=>Zl,Amaro:()=>Kl,Ashby:()=>pc,BlackAndWhite:()=>Cl,Brannan:()=>zs,Brooklyn:()=>sc,Charmes:()=>vc,Clarendon:()=>El,Crema:()=>Fl,Dogpatch:()=>ic,Earlybird:()=>Ms,Gingham:()=>Ol,Ginza:()=>tc,Hefe:()=>xs,Helena:()=>dc,Hudson:()=>as,Juno:()=>Rl,Kelvin:()=>$s,Lark:()=>Tl,LoFi:()=>bs,Ludwig:()=>Vl,Maven:()=>Js,Mayfair:()=>es,Moon:()=>_l,Nashville:()=>Es,NinteenSeventySeven:()=>Zs,Perpetua:()=>ql,Reyes:()=>jl,Rise:()=>rs,Sierra:()=>ps,Skyline:()=>rc,Slumber:()=>Nl,Stinson:()=>Os,Sutro:()=>Ds,Toaster:()=>Bs,Valencia:()=>cs,Vesper:()=>Ls,Walden:()=>Vs,Willow:()=>vs,XPro2:()=>fs});var i={};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(e){var t=function(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==a(t)?t:String(t)}function s(e,t){for(var n=0;nCc,Warmth:()=>wc});var h=n(6540),p=n(5338);function g(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var m=n(5556),v=n.n(m),y=n(4363),b=n(2833),w=n.n(b);const x=function(e){function t(e,r,s,c,f){for(var h,p,g,m,w,C=0,S=0,E=0,k=0,O=0,M=0,A=g=h=0,R=0,D=0,N=0,H=0,B=s.length,F=B-1,W="",V="",G="",U="";Rh)&&(H=(W=W.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(m,"$1"+e.trim());case 58:return e.trim()+t.replace(m,"$1"+e.trim());default:if(0<1*n&&0s.charCodeAt(8))break;case 115:a=a.replace(s,"-webkit-"+s)+";"+a;break;case 207:case 102:a=a.replace(s,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var W=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&F(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=U&&(U=t+1),V.set(e,t),G.set(t,e)},q="style["+D+'][data-styled-version="5.3.11"]',$=new RegExp("^"+D+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),K=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(D))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(D,"active"),r.setAttribute("data-styled-version","5.3.11");var a=J();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},te=function(){function e(e){var t=this.element=ee(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(c+=e+",")})),r+=""+l+s+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),le=/(a)(d)/gi,se=function(e){return String.fromCharCode(e+(e>25?39:97))};function ce(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=se(t%52)+n;return(se(t%52)+n).replace(le,"$1-$2")}var ue=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},de=function(e){return ue(5381,e)};function fe(e){for(var t=0;t>>0);if(!t.hasNameForId(r,a)){var l=n(i,"."+a,void 0,r);t.insertRules(r,a,l)}o.push(a),this.staticRulesId=a}else{for(var s=this.rules.length,c=ue(this.baseHash,n.hash),u="",d=0;d>>0);if(!t.hasNameForId(r,g)){var m=n(u,"."+g,void 0,r);t.insertRules(r,g,m)}o.push(g)}}return o.join(" ")},e}(),ge=/^\s*\/\/.*$/gm,me=[":","[",".","#"];function ve(e){var t,n,r,o,i=void 0===e?j:e,a=i.options,l=void 0===a?j:a,s=i.plugins,c=void 0===s?M:s,u=new x(l),d=[],f=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,l,s,c,u,d){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){d.push(e)})),h=function(e,r,i){return 0===r&&-1!==me.indexOf(i[n.length])||i.match(o)?e:"."+t};function p(e,i,a,l){void 0===l&&(l="&");var s=e.replace(ge,""),c=i&&a?a+" "+i+" { "+s+" }":s;return t=l,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),u(a||!i?"":i,c)}return u.use([].concat(c,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,h))},f,function(e){if(-2===e){var t=d;return d=[],t}}])),p.hash=c.length?c.reduce((function(e,t){return t.name||F(15),ue(e,t.name)}),5381).toString():"",p}var ye=h.createContext(),be=(ye.Consumer,h.createContext()),we=(be.Consumer,new ae),xe=ve();function Ce(){return(0,h.useContext)(ye)||we}function Se(){return(0,h.useContext)(be)||xe}function Ee(e){var t=(0,h.useState)(e.stylisPlugins),n=t[0],r=t[1],o=Ce(),i=(0,h.useMemo)((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),a=(0,h.useMemo)((function(){return ve({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,h.useEffect)((function(){w()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),h.createElement(ye.Provider,{value:i},h.createElement(be.Provider,{value:a},e.children))}var ke=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=xe);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return F(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=xe),this.name+e.hash},e}(),Oe=/([A-Z])/,Pe=/([A-Z])/g,_e=/^ms-/,Le=function(e){return"-"+e.toLowerCase()};function Ie(e){return Oe.test(e)?e.replace(Pe,Le).replace(_e,"-ms-"):e}var Te=function(e){return null==e||!1===e||""===e};function Me(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,l=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,De=/(^-|-$)/g;function Ne(e){return e.replace(Re,"-").replace(De,"")}var He=function(e){return ce(de(e)>>>0)};function Be(e){return"string"==typeof e&&!0}var Fe=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},We=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Ve(e,t,n){var r=e[n];Fe(t)&&Fe(r)?Ge(r,t):e[n]=t}function Ge(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(Be(e)?e:Ne(z(e)));return Ye(e,L({},o,{attrs:f,componentId:i}),n)},Object.defineProperty(g,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?Ge({},e.defaultProps,t):t}}),Object.defineProperty(g,"toString",{value:function(){return"."+g.styledComponentId}}),o&&P()(g,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),g}var qe=function(e){return function e(t,n,r){if(void 0===r&&(r=j),!(0,y.isValidElementType)(n))return F(1,String(n));var o=function(){return t(n,r,Ae.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,L({},r,{},o))},o.attrs=function(o){return e(t,n,L({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(Ye,e)};["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(e){qe[e]=qe(e)}));var $e=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=fe(e),ae.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(Me(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&ae.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Ke(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r"+t+""},this.getStyleTags=function(){return e.sealed?F(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return F(2);var n=((t={})[D]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=J();return r&&(n.nonce=r),[h.createElement("style",L({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ae({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?F(2):h.createElement(Ee,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return F(3)}}();const Je=qe;var et=n(182),tt=n.n(et),nt=function(e,t){return e.reduce((function(e,n){return Object.assign(e,c({},n,t))}),{})};function rt(e){return Object.values(e)}var ot={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg",Xl:"xl",Xxl:"xxl",Xxxl:"xxxl"},it={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",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",LightShadow:"light-shadow",MediumShadow:"medium-shadow",LargeShadow:"large-shadow",XLargeShadow:"x-large-shadow"},at={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"},lt={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"},st={Sm:"sm",Md:"md",Lg:"lg"};const ct=Ke(["@keyframes spinner{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.Menu-open{overflow:hidden;}.Modal-open{overflow:hidden;}"]);const ut=Ke(["",";"],(function(e){return Ae(["h1,h2,h3,h4,h5,h6,p,small{line-height:",";}"],e.theme.typography.baseLineHeight)}));var dt,ft,ht,pt,gt,mt,vt,yt,bt=(c(dt={},it.TextPrimary,"rgba(55, 65, 75, 1)"),c(dt,it.TextSecondary,"rgba(118, 138, 159, 1)"),c(dt,it.TextSecondaryInvert,"rgba(213, 216, 220, 1)"),c(dt,it.TextPlaceholder,"rgba(169, 182, 194, 1)"),c(dt,it.TextWarning,"rgba(196, 110, 0, 1)"),c(dt,it.TextError,"rgba(170, 32, 0, 1)"),c(dt,it.TextInfo,"rgba(35, 117, 171, 1)"),c(dt,it.AccentPrimary,"rgba(104, 121, 235, 1)"),c(dt,it.AccentPrimaryHover,"rgba(96, 111, 209, 1)"),c(dt,it.AccentPrimaryActive,"rgba(73, 88, 188, 1)"),c(dt,it.AccentPrimaryDisabled,"rgba(233, 238, 242, 1)"),c(dt,it.AccentSecondaryDisabled,"#F9FBFC"),c(dt,it.AccentStateless,"rgba(104, 121, 235, 1)"),c(dt,it.AccentStateless_0_4_Opacity,"rgba(104, 121, 235, 0.4)"),c(dt,it.Accent_0_5_Opacity,"rgba(104, 121, 235, 0.05)"),c(dt,it.Accent_1_2_Opacity,"rgba(104, 121, 235, 0.12)"),c(dt,it.Accent_1_8_Opacity,"rgba(104, 121, 235, 0.18)"),c(dt,it.Accent_2_8_Opacity,"rgba(104, 121, 235, 0.28)"),c(dt,it.Accent_4_0_Opacity,"rgba(104, 121, 235, 0.4)"),c(dt,it.BackgroundGrey,"rgba(216, 224, 232, 1)"),c(dt,it.BackgroundStateless,"rgba(255, 255, 255, 1)"),c(dt,it.BackgroundActive,"rgba(243, 247, 250, 1)"),c(dt,it.BackgroundBaseLight,"rgba(235, 239, 252, 1)"),c(dt,it.BackgroundBaseMedium,"rgba(227, 231, 251, 1)"),c(dt,it.BackgroundPrimary,"rgba(248, 250, 251, 1)"),c(dt,it.BackgroundPrimaryLight,"rgba(243, 245, 247, 1)"),c(dt,it.BackgroundPrimaryHover,"rgba(239, 243, 246, 1)"),c(dt,it.BackgroundPrimaryActive,"rgba(93, 109, 126, 1)"),c(dt,it.BackgroundPrimary_0_5_Opacity,"rgba(255, 255, 255, 0.500)"),c(dt,it.BackgroundPrimaryStateless,"#CCD6DE"),c(dt,it.BackgroundSecondary,"rgba(255, 255, 255, 1)"),c(dt,it.BackgroundHover,"rgba(249, 251, 252, 1)"),c(dt,it.BackgroundGreen,"rgba(237, 250, 244, 1)"),c(dt,it.BackgroundGreenMedium,"rgba(227, 250, 239, 1)"),c(dt,it.BackgroundBlue,"rgba(244, 249, 255, 1)"),c(dt,it.BackgroundRed,"rgba(253, 244, 242, 1)"),c(dt,it.BackgroundRedMedium,"rgba(247, 228, 230, 1)"),c(dt,it.BackgroundOrange,"rgba(255, 249, 242, 1)"),c(dt,it.BackgroundTooltip,"rgba(79, 98, 118, 1)"),c(dt,it.IconsPrimary,"rgba(118, 138, 159, 1)"),c(dt,it.IconsPrimaryOpacity_0_6,"rgba(93, 109, 126, 0.600)"),c(dt,it.IconsSecondary,"rgba(151, 166, 182, 1)"),c(dt,it.IconsPlaceholder,"rgba(223, 231, 237, 1)"),c(dt,it.IconsInvert,"rgba(255, 255, 255, 1)"),c(dt,it.IconsMuted,"rgba(169, 182, 194, 1)"),c(dt,it.IconsPrimaryHover,"rgba(79, 98, 118, 1)"),c(dt,it.IconsSecondaryHover,"rgba(118, 138, 159, 1)"),c(dt,it.ButtonPrimaryText,"rgba(255, 255, 255, 1)"),c(dt,it.ButtonPrimaryText_0_6,"rgba(255, 255, 255, 0.6)"),c(dt,it.ButtonPrimaryText_0_4,"rgba(255, 255, 255, 0.4)"),c(dt,it.ButtonDisabledText,"rgba(169, 182, 194, 1)"),c(dt,it.ButtonSecondaryText,"rgba(0, 0, 0, 1)"),c(dt,it.LinkPrimary,"rgba(118, 138, 159, 1)"),c(dt,it.LinkStateless,"rgba(118, 138, 159, 1)"),c(dt,it.LinkHover,"rgba(79, 98, 118, 1)"),c(dt,it.LinkActive,"rgba(55, 65, 75, 1)"),c(dt,it.LinkPressed,"rgba(104, 121, 235, 1)"),c(dt,it.LinkMuted,"rgba(169, 182, 194, 1)"),c(dt,it.BordersPrimary,"rgba(204, 214, 222, 1)"),c(dt,it.BordersPrimaryHover,"rgba(104, 118, 134, 1)"),c(dt,it.BordersSecondary,"rgba(236, 240, 243, 1)"),c(dt,it.BordersStrong,"rgba(204, 214, 222, 1)"),c(dt,it.BordersInvert,"rgba(85, 99, 115, 1)"),c(dt,it.BorderHoverBottom,"rgba(104, 121, 235, 0.18)"),c(dt,it.BorderActiveBottom,"#4958BC"),c(dt,it.BorderPrimaryStateless,"rgba(204, 214, 222, 1)"),c(dt,it.BordersDisabled,"rgba(73, 88, 188, 0.4)"),c(dt,it.BordersButton,"rgba(151, 166, 182, 1)"),c(dt,it.BordersItem,"rgba(226, 232, 236, 1)"),c(dt,it.BordersBaseLight,"rgba(211, 219, 250, 1)"),c(dt,it.BordersBaseMedium,"rgba(164, 175, 227, 1)"),c(dt,it.BordersGreen,"rgba(27, 161, 99, 0.22)"),c(dt,it.BordersGreenMedium,"rgba(27, 161, 99, 0.4)"),c(dt,it.BordersRed,"rgba(185, 33, 46, 0.4)"),c(dt,it.ActiveSecondary,"#FFFFFF"),c(dt,it.ActiveSecondaryHover,"rgba(104, 121, 235, 0.05)"),c(dt,it.Error,"rgba(246, 61, 61, 1)"),c(dt,it.Error_0_28_Opacity,"rgba(185, 33, 46, 0.28)"),c(dt,it.Error_0_12_Opacity,"rgba(255, 86, 78, 0.1)"),c(dt,it.ErrorHover,"rgba(216, 46, 46, 1)"),c(dt,it.ErrorActive,"rgba(185, 33, 46, 1)"),c(dt,it.Success,"rgba(38, 193, 122, 1)"),c(dt,it.SuccessHover,"rgba(30, 154, 98, 1)"),c(dt,it.SuccessActive,"rgba(23, 116, 73, 1)"),c(dt,it.Warning,"rgba(255, 172, 74, 1)"),c(dt,it.WarningHover,"rgba(237, 145, 7, 1)"),c(dt,it.WarningActive,"rgba(224, 135, 0, 1)"),c(dt,it.Info,"rgba(41, 127, 184, 1)"),c(dt,it.Modified,"rgba(165, 166, 246, 1)"),c(dt,it.Red,"rgba(219, 46, 50, 1)"),c(dt,it.Orange,"rgba(255, 168, 0, 1)"),c(dt,it.Salad,"rgba(143, 176, 33, 1)"),c(dt,it.Green,"rgba(22, 160, 134, 1)"),c(dt,it.Blue,"rgba(41, 127, 184, 1)"),c(dt,it.Indigo,"rgba(91, 72, 162, 1)"),c(dt,it.Violet,"rgba(141, 68, 173, 1)"),c(dt,it.Pink,"rgba(211, 92, 158, 1)"),c(dt,it.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%)"),c(dt,it.Extra_0_3_Overlay,"rgba(79, 98, 118, 0.3)"),c(dt,it.GradientRightActive,"linear-gradient(270deg, #F3F7FA 1.56%, #F3F7FA 52.4%, rgba(243, 247, 250, 0.53) 76.04%, rgba(243, 247, 250, 0) 100%)"),c(dt,it.GradientRightHover,"linear-gradient(270deg, #F9FBFC 1.56%, #F9FBFC 52.4%, rgba(249, 251, 252, 0.53) 76.04%, rgba(249, 251, 252, 0) 100%)"),c(dt,it.Extra_0_5_Overlay,"rgba(79, 98, 118, 0.5)"),c(dt,it.Extra_0_7_Overlay,"rgba(79, 98, 118, 0.7)"),c(dt,it.Extra_0_9_Overlay,"rgba(79, 98, 118, 0.9)"),c(dt,it.Red_0_1_Overlay,"rgba(232, 91, 70, 0.1)"),c(dt,it.Orange_0_1_Overlay,"rgba(250, 157, 47, 0.1)"),c(dt,it.Accent_0_8_Overlay,"rgba(104, 121, 235, 0.08)"),c(dt,it.Link,"rgba(250, 166, 68, 1)"),c(dt,it.Camera,"rgba(73, 186, 224, 1)"),c(dt,it.GoogleDrive,"rgba(81, 136, 238, 1)"),c(dt,it.Dropbox,"rgba(17, 40, 124, 1)"),c(dt,it.OneDrive,"rgba(40, 100, 186, 1)"),c(dt,it.Device,"rgba(102, 73, 209, 1)"),c(dt,it.Instagram,"rgba(173, 38, 220, 1)"),c(dt,it.FreeImages,"rgba(16, 163, 135, 1)"),c(dt,it.FreeIcons,"rgba(62, 207, 139, 1)"),c(dt,it.Canvas,"rgba(36, 190, 202, 1)"),c(dt,it.Box,"rgba(0, 97, 213, 1)"),c(dt,it.ScreenCast,"rgba(48, 61, 78, 1)"),c(dt,it.Tag,"#889AAC"),c(dt,it.StatesErrorDisabledText,"rgba(185, 33, 46, 0.3)"),c(dt,it.LightShadow,"rgba(146, 166, 188, 0.2)"),c(dt,it.MediumShadow,"rgba(146, 166, 188, 0.24)"),c(dt,it.LargeShadow,"rgba(146, 166, 188, 0.32)"),c(dt,it.XLargeShadow,"rgba(146, 166, 188, 0.5)"),dt),wt=bt,xt=(c(ft={},at.ShadowSm,"0px 1px 2px 0px rgba(146, 166, 188, 0.2)"),c(ft,at.ShadowMd," 0px 1px 4px 0px rgba(146, 166, 188, 0.24)"),c(ft,at.ShadowLg," 0px 2px 6px 0px rgba(146, 166, 188, 0.32)"),c(ft,at.ShadowXl," 0px 2px 6px 0px rgba(146, 166, 188, 0.5)"),c(ft,at.Label," 0px 1px 3px 0px rgba(77, 78, 78, 0.15)"),c(ft,at.Header," 0px 6px 10px 0px rgba(146, 166, 188, 0.2)"),c(ft,at.HeaderPopup," 0px 3px 7px 0px rgba(146, 166, 188, 0.16)"),c(ft,at.FooterPopup," 0px -4px 8px 0px rgba(208, 215, 220, 0.22)"),c(ft,at.LeftPanelMd," 6px 8px 12px 0px rgba(146, 166, 188, 0.14)"),c(ft,at.RightPanelMd,"-6px 8px 12px 0px rgba(146, 166, 188, 0.14)"),c(ft,at.LeftPanelSm,"6px -4px 12px 0px rgba(146, 166, 188, 0.14)"),c(ft,at.RightPanelSm,"-6px -4px 12px 0px rgba(146, 166, 188, 0.14)"),ft),Ct=400,St=500;function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t=n.xs&&e=n.sm&&e=n.md&&e=n.lg&&e=n.xl&&e=n.xxl&&e=n.xxxl?t?r(o.xxxl):o.xxxl:t?r(o.md):o.md},up:l,down:function(e){var t=n[e];return"@media (max-width:".concat(t).concat(i,")")},between:s,only:function(e){return a.indexOf(e)+11?t-1:0),r=1;re.length)&&(t=e.length);for(var n=0,r=new Array(t);nrn.angleDeg?e*tn:e,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:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>rn.DD.isDragging,isDragReady:()=>!!rn.DD.node,releaseCanvasOnDestroy:!0,document:nn.document,_injectGlobal(e){nn.Konva=e}},on=e=>{rn[e.prototype.getClassName()]=e};rn._injectGlobal(rn);class an{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.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 an(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,o=this.m[1]*t+this.m[3]*n,i=this.m[0]*-n+this.m[2]*t,a=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=o,this.m[2]=i,this.m[3]=a,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,o=this.m[2]+this.m[0]*e,i=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=o,this.m[3]=i,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],o=this.m[1]*e.m[2]+this.m[3]*e.m[3],i=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],a=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=o,this.m[4]=i,this.m[5]=a,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,o=this.m[0]*e,i=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),a=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=o,this.m[4]=i,this.m[5]=a,this}getMatrix(){return this.m}decompose(){var e=this.m[0],t=this.m[1],n=this.m[2],r=this.m[3],o=e*r-t*n;let i={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=e||0!=t){var a=Math.sqrt(e*e+t*t);i.rotation=t>0?Math.acos(e/a):-Math.acos(e/a),i.scaleX=a,i.scaleY=o/a,i.skewX=(e*n+t*r)/o,i.skewY=0}else if(0!=n||0!=r){var l=Math.sqrt(n*n+r*r);i.rotation=Math.PI/2-(r>0?Math.acos(-n/l):-Math.acos(n/l)),i.scaleX=o/l,i.scaleY=l,i.skewX=0,i.skewY=(e*n+t*r)/o}return i.rotation=pn._getRotation(i.rotation),i}}var ln=Math.PI/180,sn=180/Math.PI,cn="Konva error: ",un={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]},dn=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,fn=[];const hn="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(e){setTimeout(e,60)},pn={_isElement:e=>!(!e||1!=e.nodeType),_isFunction:e=>!!(e&&e.constructor&&e.call&&e.apply),_isPlainObject:e=>!!e&&e.constructor===Object,_isArray:e=>"[object Array]"===Object.prototype.toString.call(e),_isNumber:e=>"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)&&isFinite(e),_isString:e=>"[object String]"===Object.prototype.toString.call(e),_isBoolean:e=>"[object Boolean]"===Object.prototype.toString.call(e),isObject:e=>e instanceof Object,isValidSelector(e){if("string"!=typeof e)return!1;var t=e[0];return"#"===t||"."===t||t===t.toUpperCase()},_sign:e=>0===e||e>0?1:-1,requestAnimFrame(e){fn.push(e),1===fn.length&&hn((function(){const e=fn;fn=[],e.forEach((function(e){e()}))}))},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch(e){}return e},createImageElement:()=>document.createElement("img"),_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,t){var n=pn.createImageElement();n.onload=function(){t(n)},n.src=e},_rgbToHex:(e,t,n)=>((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1),_hexToRgb(e){e=e.replace("#","");var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:255&t}},getRandomColor(){for(var e=(16777215*Math.random()|0).toString(16);e.length<6;)e="0"+e;return"#"+e},getRGB(e){var t;return e in un?{r:(t=un[e])[0],g:t[1],b:t[2]}:"#"===e[0]?this._hexToRgb(e.substring(1)):"rgb("===e.substr(0,4)?(t=dn.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA:e=>(e=e||"black",pn._namedColorToRBA(e)||pn._hex3ColorToRGBA(e)||pn._hex4ColorToRGBA(e)||pn._hex6ColorToRGBA(e)||pn._hex8ColorToRGBA(e)||pn._rgbColorToRGBA(e)||pn._rgbaColorToRGBA(e)||pn._hslColorToRGBA(e)),_namedColorToRBA(e){var t=un[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(0===e.indexOf("rgb(")){var t=(e=e.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(0===e.indexOf("rgba(")){var t=(e=e.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map(((e,t)=>"%"===e.slice(-1)?3===t?parseInt(e)/100:parseInt(e)/100*255:Number(e)));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(e){if("#"===e[0]&&9===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:parseInt(e.slice(7,9),16)/255}},_hex6ColorToRGBA(e){if("#"===e[0]&&7===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex4ColorToRGBA(e){if("#"===e[0]&&5===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:parseInt(e[4]+e[4],16)/255}},_hex3ColorToRGBA(e){if("#"===e[0]&&4===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,o=Number(n[1])/100,i=Number(n[2])/100;let a,l,s;if(0===o)return s=255*i,{r:Math.round(s),g:Math.round(s),b:Math.round(s),a:1};a=i<.5?i*(1+o):i+o-i*o;const c=2*i-a,u=[0,0,0];for(let e=0;e<3;e++)l=r+1/3*-(e-1),l<0&&l++,l>1&&l--,s=6*l<1?c+6*(a-c)*l:2*l<1?a:3*l<2?c+(a-c)*(2/3-l)*6:c,u[e]=255*s;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection:(e,t)=>!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.heighte.slice(0),degToRad:e=>e*ln,radToDeg:e=>e*sn,_degToRad:e=>(pn.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),pn.degToRad(e)),_radToDeg:e=>(pn.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),pn.radToDeg(e)),_getRotation:e=>rn.angleDeg?pn.radToDeg(e):e,_capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),throw(e){throw new Error(cn+e)},error(e){console.error(cn+e)},warn(e){rn.showWarnings&&console.warn("Konva warning: "+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange:(e,t,n)=>t<=e&&e1?(a=n,l=r,s=(n-o)*(n-o)+(r-i)*(r-i)):s=((a=e+u*(n-e))-o)*(a-o)+((l=t+u*(r-t))-i)*(l-i)}return[a,l,s]},_getProjectionToLine(e,t,n){var r=pn.cloneObject(e),o=Number.MAX_VALUE;return t.forEach((function(i,a){if(n||a!==t.length-1){var l=t[(a+1)%t.length],s=pn._getProjectionToSegment(i.x,i.y,l.x,l.y,e.x,e.y),c=s[0],u=s[1],d=s[2];dt.length){var a=t;t=e,e=a}for(r=0;re.touches?e.changedTouches[0].identifier:e.pointerId||999,releaseCanvas(...e){rn.releaseCanvasOnDestroy&&e.forEach((e=>{e.width=0,e.height=0}))},drawRoundedRectPath(e,t,n,r){let o=0,i=0,a=0,l=0;"number"==typeof r?o=i=a=l=Math.min(r,t/2,n/2):(o=Math.min(r[0]||0,t/2,n/2),i=Math.min(r[1]||0,t/2,n/2),l=Math.min(r[2]||0,t/2,n/2),a=Math.min(r[3]||0,t/2,n/2)),e.moveTo(o,0),e.lineTo(t-i,0),e.arc(t-i,i,i,3*Math.PI/2,0,!1),e.lineTo(t,n-l),e.arc(t-l,n-l,l,0,Math.PI/2,!1),e.lineTo(a,n),e.arc(a,n-a,a,Math.PI/2,Math.PI,!1),e.lineTo(0,o),e.arc(o,o,o,Math.PI,3*Math.PI/2,!1)}};function gn(e){return pn._isString(e)?'"'+e+'"':"[object Number]"===Object.prototype.toString.call(e)||pn._isBoolean(e)?e:Object.prototype.toString.call(e)}function mn(e){return e>255?255:e<0?0:Math.round(e)}function vn(){if(rn.isUnminified)return function(e,t){return pn._isNumber(e)||pn.warn(gn(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}}function yn(e){if(rn.isUnminified)return function(t,n){let r=pn._isNumber(t),o=pn._isArray(t)&&t.length==e;return r||o||pn.warn(gn(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}}function bn(){if(rn.isUnminified)return function(e,t){return pn._isNumber(e)||"auto"===e||pn.warn(gn(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}}function wn(){if(rn.isUnminified)return function(e,t){return pn._isString(e)||pn.warn(gn(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}}function xn(){if(rn.isUnminified)return function(e,t){const n=pn._isString(e),r="[object CanvasGradient]"===Object.prototype.toString.call(e)||e&&e.addColorStop;return n||r||pn.warn(gn(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}}function Cn(){if(rn.isUnminified)return function(e,t){return!0===e||!1===e||pn.warn(gn(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}}var Sn="get",En="set";const kn={addGetterSetter(e,t,n,r,o){kn.addGetter(e,t,n),kn.addSetter(e,t,r,o),kn.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){var r=Sn+pn._capitalize(t);e.prototype[r]=e.prototype[r]||function(){var e=this.attrs[t];return void 0===e?n:e}},addSetter(e,t,n,r){var o=En+pn._capitalize(t);e.prototype[o]||kn.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){var o=En+pn._capitalize(t);e.prototype[o]=function(e){return n&&null!=e&&(e=n.call(this,e,t)),this._setAttr(t,e),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,o){var i,a,l=n.length,s=pn._capitalize,c=Sn+s(t),u=En+s(t);e.prototype[c]=function(){var e={};for(i=0;i{this._setAttr(t+s(e),void 0)})),this._fireChangeEvent(t,a,e),o&&o.call(this),this},kn.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){var n=pn._capitalize(t),r=En+n,o=Sn+n;e.prototype[t]=function(){return arguments.length?(this[r](arguments[0]),this):this[o]()}},addDeprecatedGetterSetter(e,t,n,r){pn.error("Adding deprecated "+t);var o=Sn+pn._capitalize(t),i=t+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[o]=function(){pn.error(i);var e=this.attrs[t];return void 0===e?n:e},kn.addSetter(e,t,r,(function(){pn.error(i)})),kn.addOverloadedGetterSetter(e,t)},backCompat(e,t){pn.each(t,(function(t,n){var r=e.prototype[n],o=Sn+pn._capitalize(t),i=En+pn._capitalize(t);function a(){r.apply(this,arguments),pn.error('"'+t+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}e.prototype[t]=a,e.prototype[o]=a,e.prototype[i]=a}))},afterSetFilter(){this._filterUpToDate=!1}};var On=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];class Pn{constructor(e){this.canvas=e,rn.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,t){var n,r,o,i,a=this.traceArr,l=a.length,s="";for(n=0;n"number"==typeof e?Math.floor(e):e))),s+="("+i.join(",")+")")):(s+=r.property,e||(s+="="+r.val)),s+=";";return s}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr;t.push(e),t.length>=100&&t.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){const t=e.attrs.lineCap;t&&this.setAttr("lineCap",t)}_applyOpacity(e){var t=e.getAbsoluteOpacity();1!==t&&this.setAttr("globalAlpha",t)}_applyLineJoin(e){const t=e.attrs.lineJoin;t&&this.setAttr("lineJoin",t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,o,i){this._context.arc(e,t,n,r,o,i)}arcTo(e,t,n,r,o){this._context.arcTo(e,t,n,r,o)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,o,i){this._context.bezierCurveTo(e,t,n,r,o,i)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(e,t){var n=arguments;return 2===n.length?this._context.createImageData(e,t):1===n.length?this._context.createImageData(e):void 0}createLinearGradient(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}createPattern(e,t){return this._context.createPattern(e,t)}createRadialGradient(e,t,n,r,o,i){return this._context.createRadialGradient(e,t,n,r,o,i)}drawImage(e,t,n,r,o,i,a,l,s){var c=arguments,u=this._context;3===c.length?u.drawImage(e,t,n):5===c.length?u.drawImage(e,t,n,r,o):9===c.length&&u.drawImage(e,t,n,r,o,i,a,l,s)}ellipse(e,t,n,r,o,i,a,l){this._context.ellipse(e,t,n,r,o,i,a,l)}isPointInPath(e,t,n,r){return n?this._context.isPointInPath(n,e,t,r):this._context.isPointInPath(e,t,r)}fill(e){e?this._context.fill(e):this._context.fill()}fillRect(e,t,n,r){this._context.fillRect(e,t,n,r)}strokeRect(e,t,n,r){this._context.strokeRect(e,t,n,r)}fillText(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}measureText(e){return this._context.measureText(e)}getImageData(e,t,n,r){return this._context.getImageData(e,t,n,r)}lineTo(e,t){this._context.lineTo(e,t)}moveTo(e,t){this._context.moveTo(e,t)}rect(e,t,n,r){this._context.rect(e,t,n,r)}putImageData(e,t,n){this._context.putImageData(e,t,n)}quadraticCurveTo(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,t){this._context.scale(e,t)}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,t,n,r,o,i){this._context.setTransform(e,t,n,r,o,i)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,t,n,r){this._context.strokeText(e,t,n,r)}transform(e,t,n,r,o,i){this._context.transform(e,t,n,r,o,i)}translate(e,t){this._context.translate(e,t)}_enableTrace(){var e,t,n=this,r=On.length,o=this.setAttr,i=function(e){var r,o=n[e];n[e]=function(){return t=function(e){var t,n,r=[],o=e.length,i=pn;for(t=0;t{"dragging"===t.dragStatus&&(e=!0)})),e},justDragged:!1,get node(){var e;return An._dragElements.forEach((t=>{e=t.node})),e},_dragElements:new Map,_drag(e){const t=[];An._dragElements.forEach(((n,r)=>{const{node:o}=n,i=o.getStage();i.setPointersPositions(e),void 0===n.pointerId&&(n.pointerId=pn._getFirstPointerId(e));const a=i._changedPointerPositions.find((e=>e.id===n.pointerId));if(a){if("dragging"!==n.dragStatus){var l=o.dragDistance();if(Math.max(Math.abs(a.x-n.startPointerPos.x),Math.abs(a.y-n.startPointerPos.y)){t.fire("dragmove",{type:"dragmove",target:t,evt:e},!0)}))},_endDragBefore(e){const t=[];An._dragElements.forEach((n=>{const{node:r}=n,o=r.getStage();e&&o.setPointersPositions(e);if(!o._changedPointerPositions.find((e=>e.id===n.pointerId)))return;"dragging"!==n.dragStatus&&"stopped"!==n.dragStatus||(An.justDragged=!0,rn._mouseListenClick=!1,rn._touchListenClick=!1,rn._pointerListenClick=!1,n.dragStatus="stopped");const i=n.node.getLayer()||n.node instanceof rn.Stage&&n.node;i&&-1===t.indexOf(i)&&t.push(i)})),t.forEach((e=>{e.draw()}))},_endDragAfter(e){An._dragElements.forEach(((t,n)=>{"stopped"===t.dragStatus&&t.node.fire("dragend",{type:"dragend",target:t.node,evt:e},!0),"dragging"!==t.dragStatus&&An._dragElements.delete(n)}))}};rn.isBrowser&&(window.addEventListener("mouseup",An._endDragBefore,!0),window.addEventListener("touchend",An._endDragBefore,!0),window.addEventListener("mousemove",An._drag),window.addEventListener("touchmove",An._drag),window.addEventListener("mouseup",An._endDragAfter,!1),window.addEventListener("touchend",An._endDragAfter,!1));var zn="absoluteOpacity",Rn="allEventListeners",Dn="absoluteTransform",Nn="absoluteScale",Hn="canvas",Bn="listening",Fn="mouseenter",Wn="mouseleave",Vn="Shape",Gn=" ",Un="stage",Zn="transform",Xn="visible",Yn=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(Gn);let qn=1;class $n{constructor(e){this._id=qn++,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!==Zn&&e!==Dn||!this._cache.get(e)?e?this._cache.delete(e):this._cache.clear():this._cache.get(e).dirty=!0}_getCache(e,t){var n=this._cache.get(e);return(void 0===n||(e===Zn||e===Dn)&&!0===n.dirty)&&(n=t.call(this),this._cache.set(e,n)),n}_calculate(e,t,n){if(!this._attachedDepsListeners.get(e)){const n=t.map((e=>e+"Change.konva")).join(Gn);this.on(n,(()=>{this._clearCache(e)})),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(Hn)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===Dn&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(Hn)){const{scene:e,filter:t,hit:n}=this._cache.get(Hn);pn.releaseCanvas(e,t,n),this._cache.delete(Hn)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var t=e||{},n={};void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height||(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var r=Math.ceil(t.width||n.width),o=Math.ceil(t.height||n.height),i=t.pixelRatio,a=void 0===t.x?Math.floor(n.x):t.x,l=void 0===t.y?Math.floor(n.y):t.y,s=t.offset||0,c=t.drawBorder||!1,u=t.hitCanvasPixelRatio||1;if(r&&o){a-=s,l-=s;var d=new Mn({pixelRatio:i,width:r+=2*s+1,height:o+=2*s+1}),f=new Mn({pixelRatio:i,width:0,height:0}),h=new jn({pixelRatio:u,width:r,height:o}),p=d.getContext(),g=h.getContext();return h.isCache=!0,d.isCache=!0,this._cache.delete(Hn),this._filterUpToDate=!1,!1===t.imageSmoothingEnabled&&(d.getContext()._context.imageSmoothingEnabled=!1,f.getContext()._context.imageSmoothingEnabled=!1),p.save(),g.save(),p.translate(-a,-l),g.translate(-a,-l),this._isUnderCache=!0,this._clearSelfAndDescendantCache(zn),this._clearSelfAndDescendantCache(Nn),this.drawScene(d,this),this.drawHit(h,this),this._isUnderCache=!1,p.restore(),g.restore(),c&&(p.save(),p.beginPath(),p.rect(0,0,r,o),p.closePath(),p.setAttr("strokeStyle","red"),p.setAttr("lineWidth",5),p.stroke(),p.restore()),this._cache.set(Hn,{scene:d,filter:f,hit:h,x:a,y:l}),this._requestDraw(),this}pn.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}isCached(){return this._cache.has(Hn)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,t){var n,r,o,i,a=[{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}],l=this.getAbsoluteTransform(t);return a.forEach((function(e){var t=l.point(e);void 0===n&&(n=o=t.x,r=i=t.y),n=Math.min(n,t.x),r=Math.min(r,t.y),o=Math.max(o,t.x),i=Math.max(i,t.y)})),{x:n,y:r,width:o-n,height:i-r}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const t=this._getCanvasCache();e.translate(t.x,t.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e){var t=this._getCanvasCache(),n=t.hit;e.save(),e.translate(t.x,t.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e,t,n,r,o=this.filters(),i=this._getCanvasCache(),a=i.scene,l=i.filter,s=l.getContext();if(o){if(!this._filterUpToDate){var c=a.pixelRatio;l.setSize(a.width/a.pixelRatio,a.height/a.pixelRatio);try{for(e=o.length,s.clear(),s.drawImage(a._canvas,0,0,a.getWidth()/c,a.getHeight()/c),t=s.getImageData(0,0,l.getWidth(),l.getHeight()),n=0;n{var t,n;if(!e)return this;for(t in e)"children"!==t&&(n="set"+pn._capitalize(t),pn._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))})),this}isListening(){return this._getCache(Bn,this._isListening)}_isListening(e){if(!this.listening())return!1;const t=this.getParent();return!t||t===e||this===e||t._isListening(e)}isVisible(){return this._getCache(Xn,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const t=this.getParent();return!t||t===e||this===e||t._isVisible(e)}shouldDrawHit(e,t=!1){if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),r=!1;An._dragElements.forEach((e=>{"dragging"===e.dragStatus&&("Stage"===e.node.nodeType||e.node.getLayer()===n)&&(r=!0)}));var o=!t&&!rn.hitOnDragEnabled&&r;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,t,n,r,o=this.getDepth(),i=this,a=0;return"Stage"!==i.nodeType&&function l(s){for(e=[],t=s.length,n=0;n0&&e[0].getDepth()<=o&&l(e)}(i.getStage().getChildren()),a}getDepth(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(Zn),this._clearSelfAndDescendantCache(Dn)),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(){if(!this.getStage())return null;var e=this.getStage().getPointerPosition();if(!e)return null;var t=this.getAbsoluteTransform().copy();return t.invert(),t.point(e)}getAbsolutePosition(e){let t=!1,n=this.parent;for(;n;){if(n.isCached()){t=!0;break}n=n.parent}t&&!e&&(e=!0);var r=this.getAbsoluteTransform(e).getMatrix(),o=new an,i=this.offset();return o.m=r.slice(),o.translate(i.x,i.y),o.getTranslation()}setAbsolutePosition(e){var t=this._clearTransform();this.attrs.x=t.x,this.attrs.y=t.y,delete t.x,delete t.y,this._clearCache(Zn);var n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(e.x,e.y),e={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(t),this.setPosition({x:e.x,y:e.y}),this._clearCache(Zn),this._clearSelfAndDescendantCache(Dn),this}_setTransform(e){var t;for(t in e)this.attrs[t]=e[t]}_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 t=e.x,n=e.y,r=this.x(),o=this.y();return void 0!==t&&(r+=t),void 0!==n&&(o+=n),this.setPosition({x:r,y:o}),this}_eachAncestorReverse(e,t){var n,r,o=[],i=this.getParent();if(!t||t._id!==this._id){for(o.unshift(this);i&&(!t||i._id!==t._id);)o.unshift(i),i=i.parent;for(n=o.length,r=0;r0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return pn.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)}setZIndex(e){if(!this.parent)return pn.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&pn.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 t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(zn,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e,t,n,r,o={},i=this.getAttrs();for(e in o.attrs={},i)t=i[e],pn.isObject(t)&&!pn._isPlainObject(t)&&!pn._isArray(t)||(n="function"==typeof this[e]&&this[e],delete i[e],r=n?n.call(this):null,i[e]=t,r!==t&&(o.attrs[e]=t));return o.className=this.getClassName(),pn._prepareToStringify(o)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var o=this.parent;o;){if(o===n)return r;o._isMatch(e)&&r.push(o),o=o.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if("function"==typeof e)return e(this);var t,n,r=e.replace(/ /g,"").split(","),o=r.length;for(t=0;t{try{const n=null==e?void 0:e.callback;n&&delete e.callback,pn._urlToImage(this.toDataURL(e),(function(e){t(e),null==n||n(e)}))}catch(e){n(e)}}))}toBlob(e){return new Promise(((t,n)=>{try{const n=null==e?void 0:e.callback;n&&delete e.callback,this.toCanvas(e).toBlob((e=>{t(e),null==n||n(e)}))}catch(e){n(e)}}))}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 void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():rn.dragDistance}_off(e,t,n){var r,o,i,a=this.eventListeners[e];for(r=0;r=0)&&!this.isDragging()){var t=!1;An._dragElements.forEach((e=>{this.isAncestorOf(e.node)&&(t=!0)})),t||this._createDragElement(e)}}))}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const e=An._dragElements.get(this._id),t=e&&"dragging"===e.dragStatus,n=e&&"ready"===e.dragStatus;t?this.stopDrag():n&&An._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const t=this.getStage();if(!t)return!1;const n={x:-e.x,y:-e.y,width:t.width()+2*e.x,height:t.height()+2*e.y};return pn.haveIntersection(n,this.getClientRect())}static create(e,t){return pn._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(e,t){var n,r,o,i=$n.prototype.getClassName.call(e),a=e.children;t&&(e.attrs.container=t),rn[i]||(pn.warn('Can not find a node with class name "'+i+'". Fallback to "Shape".'),i="Shape");if(n=new(0,rn[i])(e.attrs),a)for(r=a.length,o=0;o0}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(0===e.length)return this;if(e.length>1){for(var t=0;t0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants((r=>{const o=r._isMatch(e);return o&&n.push(r),!(!o||!t)})),n}_descendants(e){let t=!1;const n=this.getChildren();for(const r of n){if(t=e(r),t)return!0;if(r.hasChildren()&&(t=r._descendants(e),t))return!0}return!1}toObject(){var e=$n.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach((t=>{e.children.push(t.toObject())})),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=$n.prototype.clone.call(this,e);return this.getChildren().forEach((function(e){t.add(e.clone())})),t}getAllIntersections(e){var t=[];return this.find("Shape").forEach((function(n){n.isVisible()&&n.intersects(e)&&t.push(n)})),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),this.isCached()||null===(t=this.children)||void 0===t||t.forEach((function(t){t._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;null===(e=this.children)||void 0===e||e.forEach((function(e,t){e.index=t})),this._requestDraw()}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas(),o=r&&r.getContext(),i=this._getCanvasCache(),a=i&&i.scene,l=r&&r.isCache;if(!this.isVisible()&&!l)return this;if(a){o.save();var s=this.getAbsoluteTransform(t).getMatrix();o.transform(s[0],s[1],s[2],s[3],s[4],s[5]),this._drawCachedSceneCanvas(o),o.restore()}else this._drawChildren("drawScene",r,t);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,o=r&&r.getContext(),i=this._getCanvasCache();if(i&&i.hit){o.save();var a=this.getAbsoluteTransform(t).getMatrix();o.transform(a[0],a[1],a[2],a[3],a[4],a[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",r,t);return this}_drawChildren(e,t,n){var r,o=t&&t.getContext(),i=this.clipWidth(),a=this.clipHeight(),l=this.clipFunc(),s=i&&a||l;const c=n===this;if(s){o.save();var u=this.getAbsoluteTransform(n),d=u.getMatrix();if(o.transform(d[0],d[1],d[2],d[3],d[4],d[5]),o.beginPath(),l)l.call(this,o,this);else{var f=this.clipX(),h=this.clipY();o.rect(f,h,i,a)}o.clip(),d=u.copy().invert().getMatrix(),o.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var p=!c&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===e;p&&(o.save(),o._applyGlobalCompositeOperation(this)),null===(r=this.children)||void 0===r||r.forEach((function(r){r[e](t,n)})),p&&o.restore(),s&&o.restore()}getClientRect(e){var t,n,r,o,i,a=(e=e||{}).skipTransform,l=e.relativeTo,s={x:1/0,y:1/0,width:0,height:0},c=this;null===(t=this.children)||void 0===t||t.forEach((function(t){if(t.visible()){var a=t.getClientRect({relativeTo:c,skipShadow:e.skipShadow,skipStroke:e.skipStroke});0===a.width&&0===a.height||(void 0===n?(n=a.x,r=a.y,o=a.x+a.width,i=a.y+a.height):(n=Math.min(n,a.x),r=Math.min(r,a.y),o=Math.max(o,a.x+a.width),i=Math.max(i,a.y+a.height)))}}));for(var u=this.find("Shape"),d=!1,f=0;fe.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",Lr=e=>{const t=_r(e);return"pointer"===t?rn.pointerEventsEnabled&&Pr.pointer:"touch"===t?Pr.touch:"mouse"===t?Pr.mouse:void 0};function Ir(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&pn.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}const Tr=[];class Mr extends Qn{constructor(e){super(Ir(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),Tr.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",(()=>{Ir(this.attrs)})),this._checkVisibility()}_validateAdd(e){const t="Layer"===e.getType(),n="FastLayer"===e.getType();t||n||pn.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const e=this.visible()?"":"none";this.content.style.display=e}setContainer(e){if("string"==typeof e){if("."===e.charAt(0)){var t=e.slice(1);e=document.getElementsByClassName(t)[0]}else{var n;n="#"!==e.charAt(0)?e:e.slice(1),e=document.getElementById(n)}if(!e)throw"Can not find container in document with id "+n}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e,t=this.children,n=t.length;for(e=0;e-1&&Tr.splice(t,1),pn.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(pn.warn("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);"),null)}_getPointerById(e){return this._pointerPositions.find((t=>t.id===e))}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){(e=e||{}).x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var t=new Mn({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach((function(t){if(t.isVisible()){var r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}})),t}getIntersection(e){if(!e)return null;var t,n=this.children;for(t=n.length-1;t>=0;t--){const r=n[t].getIntersection(e);if(r)return r}return null}_resizeDOM(){var e=this.width(),t=this.height();this.content&&(this.content.style.width=e+"px",this.content.style.height=t+"px"),this.bufferCanvas.setSize(e,t),this.bufferHitCanvas.setSize(e,t),this.children.forEach((n=>{n.setSize({width:e,height:t}),n.draw()}))}add(e,...t){if(arguments.length>1){for(var n=0;n5&&pn.warn("The stage has "+r+" 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."),e.setSize({width:this.width(),height:this.height()}),e.draw(),rn.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return rr(e,this)}setPointerCapture(e){or(e,this)}releaseCapture(e){ir(e)}getLayers(){return this.children}_bindContentEvents(){rn.isBrowser&&Or.forEach((([e,t])=>{this.content.addEventListener(e,(e=>{this[t](e)}),{passive:!1})}))}_pointerenter(e){this.setPointersPositions(e);const t=Lr(e.type);this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);const t=Lr(e.type);this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let t=this[e+"targetShape"];return t&&!t.getStage()&&(t=null),t}_pointerleave(e){const t=Lr(e.type),n=_r(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),o=!An.isDragging||rn.hitOnDragEnabled;r&&o?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+"targetShape"]=null):o&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(e){const t=Lr(e.type),n=_r(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach((o=>{var i=this.getIntersection(o);An.justDragged=!1,rn["_"+n+"ListenClick"]=!0;if(!(i&&i.isListening()))return;rn.capturePointerEventsEnabled&&i.setPointerCapture(o.id),this[n+"ClickStartShape"]=i,i._fireAndBubble(t.pointerdown,{evt:e,pointerId:o.id}),r=!0;const a=e.type.indexOf("touch")>=0;i.preventDefault()&&e.cancelable&&a&&e.preventDefault()})),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){const t=Lr(e.type),n=_r(e.type);if(!t)return;if(An.isDragging&&An.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),!(!An.isDragging||rn.hitOnDragEnabled))return;var r={};let o=!1;var i=this._getTargetShape(n);this._changedPointerPositions.forEach((a=>{const l=tr(a.id)||this.getIntersection(a),s=a.id,c={evt:e,pointerId:s};var u=i!==l;if(u&&i&&(i._fireAndBubble(t.pointerout,Object.assign({},c),l),i._fireAndBubble(t.pointerleave,Object.assign({},c),l)),l){if(r[l._id])return;r[l._id]=!0}l&&l.isListening()?(o=!0,u&&(l._fireAndBubble(t.pointerover,Object.assign({},c),i),l._fireAndBubble(t.pointerenter,Object.assign({},c),i),this[n+"targetShape"]=l),l._fireAndBubble(t.pointermove,Object.assign({},c))):i&&(this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:s}),this[n+"targetShape"]=null)})),o||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){const t=Lr(e.type),n=_r(e.type);if(!t)return;this.setPointersPositions(e);const r=this[n+"ClickStartShape"],o=this[n+"ClickEndShape"];var i={};let a=!1;this._changedPointerPositions.forEach((l=>{const s=tr(l.id)||this.getIntersection(l);if(s){if(s.releaseCapture(l.id),i[s._id])return;i[s._id]=!0}const c=l.id,u={evt:e,pointerId:c};let d=!1;rn["_"+n+"InDblClickWindow"]?(d=!0,clearTimeout(this[n+"DblTimeout"])):An.justDragged||(rn["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout((function(){rn["_"+n+"InDblClickWindow"]=!1}),rn.dblClickWindow),s&&s.isListening()?(a=!0,this[n+"ClickEndShape"]=s,s._fireAndBubble(t.pointerup,Object.assign({},u)),rn["_"+n+"ListenClick"]&&r&&r===s&&(s._fireAndBubble(t.pointerclick,Object.assign({},u)),d&&o&&o===s&&s._fireAndBubble(t.pointerdblclick,Object.assign({},u)))):(this[n+"ClickEndShape"]=null,rn["_"+n+"ListenClick"]&&this._fire(t.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:c}),d&&this._fire(t.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:c}))})),a||this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),rn["_"+n+"ListenClick"]=!1,e.cancelable&&"touch"!==n&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(wr,{evt:e}):this._fire(wr,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(kr,{evt:e}):this._fire(kr,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);const t=tr(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(pr,nr(e)),ir(e.pointerId)}_lostpointercapture(e){ir(e.pointerId)}setPointersPositions(e){var t=this._getContentPosition(),n=null,r=null;void 0!==(e=e||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,(e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})})),Array.prototype.forEach.call(e.changedTouches||e.touches,(e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))):(n=(e.clientX-t.left)/t.scaleX,r=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:r},this._pointerPositions=[{x:n,y:r,id:pn._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:r,id:pn._getFirstPointerId(e)}])}_setPointerPosition(e){pn.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new Mn({width:this.width(),height:this.height()}),this.bufferHitCanvas=new jn({pixelRatio:1,width:this.width(),height:this.height()}),rn.isBrowser){var e=this.container();if(!e)throw"Stage has no container. A container is required.";e.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"),e.appendChild(this.content),this._resizeDOM()}}cache(){return pn.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(e){e.batchDraw()})),this}}Mr.prototype.nodeType="Stage",on(Mr),kn.addGetterSetter(Mr,"container");var jr="hasShadow",Ar="shadowRGBA",zr="patternImage",Rr="linearGradient",Dr="radialGradient";let Nr;function Hr(){return Nr||(Nr=pn.createCanvasElement().getContext("2d"),Nr)}const Br={};class Fr extends $n{constructor(e){let t;for(super(e);t=pn.getRandomColor(),!t||t in Br;);this.colorKey=t,Br[t]=this}getContext(){return pn.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return pn.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(jr,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(zr,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const e=Hr().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(e&&e.setTransform){const t=new an;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(rn.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const n=t.getMatrix(),r="undefined"==typeof DOMMatrix?{a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]}:new DOMMatrix(n);e.setTransform(r)}return e}}_getLinearGradient(){return this._getCache(Rr,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=Hr(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),o=t.createLinearGradient(n.x,n.y,r.x,r.y),i=0;ithis.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 e=this.hitStrokeWidth();return"auto"===e?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var t=this.getStage().bufferHitCanvas;return t.getContext().clear(),this.drawHit(t,null,!0),t.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data[3]>0}destroy(){return $n.prototype.destroy.call(this),delete Br[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){var t;if(!this.getStage())return!1;if(!(null===(t=this.attrs.perfectDrawEnabled)||void 0===t||t))return!1;const n=e||this.hasFill(),r=this.hasStroke(),o=1!==this.getAbsoluteOpacity();if(n&&r&&o)return!0;const i=this.hasShadow(),a=this.shadowForStrokeEnabled();return!!(n&&r&&i&&a)}setStrokeHitEnabled(e){pn.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),e?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){const t=e.skipTransform,n=e.relativeTo,r=this.getSelfRect(),o=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,i=r.width+o,a=r.height+o,l=!e.skipShadow&&this.hasShadow(),s=l?this.shadowOffsetX():0,c=l?this.shadowOffsetY():0,u=i+Math.abs(s),d=a+Math.abs(c),f=l&&this.shadowBlur()||0,h={width:u+2*f,height:d+2*f,x:-(o/2+f)+Math.min(s,0)+r.x,y:-(o/2+f)+Math.min(c,0)+r.y};return t?h:this._transformedRect(h,n)}drawScene(e,t){var n,r,o=this.getLayer(),i=e||o.getCanvas(),a=i.getContext(),l=this._getCanvasCache(),s=this.getSceneFunc(),c=this.hasShadow(),u=i.isCache,d=t===this;if(!this.isVisible()&&!d)return this;if(l){a.save();var f=this.getAbsoluteTransform(t).getMatrix();return a.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),this._useBufferCanvas()&&!u){(r=(n=this.getStage().bufferCanvas).getContext()).clear(),r.save(),r._applyLineJoin(this);var h=this.getAbsoluteTransform(t).getMatrix();r.transform(h[0],h[1],h[2],h[3],h[4],h[5]),s.call(this,r,this),r.restore();var p=n.pixelRatio;c&&a._applyShadow(this),a._applyOpacity(this),a._applyGlobalCompositeOperation(this),a.drawImage(n._canvas,0,0,n.width/p,n.height/p)}else{if(a._applyLineJoin(this),!d){h=this.getAbsoluteTransform(t).getMatrix();a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)}c&&a._applyShadow(this),s.call(this,a,this)}return a.restore(),this}drawHit(e,t,n=!1){if(!this.shouldDrawHit(t,n))return this;var r=this.getLayer(),o=e||r.hitCanvas,i=o&&o.getContext(),a=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),s=l&&l.hit;if(this.colorKey||pn.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()"),s){i.save();var c=this.getAbsoluteTransform(t).getMatrix();return i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedHitCanvas(i),i.restore(),this}if(!a)return this;i.save(),i._applyLineJoin(this);if(!(this===t)){var u=this.getAbsoluteTransform(t).getMatrix();i.transform(u[0],u[1],u[2],u[3],u[4],u[5])}return a.call(this,i,this),i.restore(),this}drawHitFromCache(e=0){var t,n,r,o,i,a=this._getCanvasCache(),l=this._getCachedSceneCanvas(),s=a.hit,c=s.getContext(),u=s.getWidth(),d=s.getHeight();c.clear(),c.drawImage(l._canvas,0,0,u,d);try{for(r=(n=(t=c.getImageData(0,0,u,d)).data).length,o=pn._hexToRgb(this.colorKey),i=0;ie?(n[i]=o.r,n[i+1]=o.g,n[i+2]=o.b,n[i+3]=255):n[i+3]=0;c.putImageData(t,0,0)}catch(e){pn.error("Unable to draw hit graph from cached scene canvas. "+e.message)}return this}hasPointerCapture(e){return rr(e,this)}setPointerCapture(e){or(e,this)}releaseCapture(e){ir(e)}}Fr.prototype._fillFunc=function(e){e.fill()},Fr.prototype._strokeFunc=function(e){e.stroke()},Fr.prototype._fillFuncHit=function(e){e.fill()},Fr.prototype._strokeFuncHit=function(e){e.stroke()},Fr.prototype._centroid=!1,Fr.prototype.nodeType="Shape",on(Fr),Fr.prototype.eventListeners={},Fr.prototype.on.call(Fr.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(jr)})),Fr.prototype.on.call(Fr.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(Ar)})),Fr.prototype.on.call(Fr.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",(function(){this._clearCache(zr)})),Fr.prototype.on.call(Fr.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",(function(){this._clearCache(Rr)})),Fr.prototype.on.call(Fr.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",(function(){this._clearCache(Dr)})),kn.addGetterSetter(Fr,"stroke",void 0,xn()),kn.addGetterSetter(Fr,"strokeWidth",2,vn()),kn.addGetterSetter(Fr,"fillAfterStrokeEnabled",!1),kn.addGetterSetter(Fr,"hitStrokeWidth","auto",bn()),kn.addGetterSetter(Fr,"strokeHitEnabled",!0,Cn()),kn.addGetterSetter(Fr,"perfectDrawEnabled",!0,Cn()),kn.addGetterSetter(Fr,"shadowForStrokeEnabled",!0,Cn()),kn.addGetterSetter(Fr,"lineJoin"),kn.addGetterSetter(Fr,"lineCap"),kn.addGetterSetter(Fr,"sceneFunc"),kn.addGetterSetter(Fr,"hitFunc"),kn.addGetterSetter(Fr,"dash"),kn.addGetterSetter(Fr,"dashOffset",0,vn()),kn.addGetterSetter(Fr,"shadowColor",void 0,wn()),kn.addGetterSetter(Fr,"shadowBlur",0,vn()),kn.addGetterSetter(Fr,"shadowOpacity",1,vn()),kn.addComponentsGetterSetter(Fr,"shadowOffset",["x","y"]),kn.addGetterSetter(Fr,"shadowOffsetX",0,vn()),kn.addGetterSetter(Fr,"shadowOffsetY",0,vn()),kn.addGetterSetter(Fr,"fillPatternImage"),kn.addGetterSetter(Fr,"fill",void 0,xn()),kn.addGetterSetter(Fr,"fillPatternX",0,vn()),kn.addGetterSetter(Fr,"fillPatternY",0,vn()),kn.addGetterSetter(Fr,"fillLinearGradientColorStops"),kn.addGetterSetter(Fr,"strokeLinearGradientColorStops"),kn.addGetterSetter(Fr,"fillRadialGradientStartRadius",0),kn.addGetterSetter(Fr,"fillRadialGradientEndRadius",0),kn.addGetterSetter(Fr,"fillRadialGradientColorStops"),kn.addGetterSetter(Fr,"fillPatternRepeat","repeat"),kn.addGetterSetter(Fr,"fillEnabled",!0),kn.addGetterSetter(Fr,"strokeEnabled",!0),kn.addGetterSetter(Fr,"shadowEnabled",!0),kn.addGetterSetter(Fr,"dashEnabled",!0),kn.addGetterSetter(Fr,"strokeScaleEnabled",!0),kn.addGetterSetter(Fr,"fillPriority","color"),kn.addComponentsGetterSetter(Fr,"fillPatternOffset",["x","y"]),kn.addGetterSetter(Fr,"fillPatternOffsetX",0,vn()),kn.addGetterSetter(Fr,"fillPatternOffsetY",0,vn()),kn.addComponentsGetterSetter(Fr,"fillPatternScale",["x","y"]),kn.addGetterSetter(Fr,"fillPatternScaleX",1,vn()),kn.addGetterSetter(Fr,"fillPatternScaleY",1,vn()),kn.addComponentsGetterSetter(Fr,"fillLinearGradientStartPoint",["x","y"]),kn.addComponentsGetterSetter(Fr,"strokeLinearGradientStartPoint",["x","y"]),kn.addGetterSetter(Fr,"fillLinearGradientStartPointX",0),kn.addGetterSetter(Fr,"strokeLinearGradientStartPointX",0),kn.addGetterSetter(Fr,"fillLinearGradientStartPointY",0),kn.addGetterSetter(Fr,"strokeLinearGradientStartPointY",0),kn.addComponentsGetterSetter(Fr,"fillLinearGradientEndPoint",["x","y"]),kn.addComponentsGetterSetter(Fr,"strokeLinearGradientEndPoint",["x","y"]),kn.addGetterSetter(Fr,"fillLinearGradientEndPointX",0),kn.addGetterSetter(Fr,"strokeLinearGradientEndPointX",0),kn.addGetterSetter(Fr,"fillLinearGradientEndPointY",0),kn.addGetterSetter(Fr,"strokeLinearGradientEndPointY",0),kn.addComponentsGetterSetter(Fr,"fillRadialGradientStartPoint",["x","y"]),kn.addGetterSetter(Fr,"fillRadialGradientStartPointX",0),kn.addGetterSetter(Fr,"fillRadialGradientStartPointY",0),kn.addComponentsGetterSetter(Fr,"fillRadialGradientEndPoint",["x","y"]),kn.addGetterSetter(Fr,"fillRadialGradientEndPointX",0),kn.addGetterSetter(Fr,"fillRadialGradientEndPointY",0),kn.addGetterSetter(Fr,"fillPatternRotation",0),kn.backCompat(Fr,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Wr=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Vr=Wr.length;class Gr extends Qn{constructor(e){super(e),this.canvas=new Mn,this.hitCanvas=new jn({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 t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e{this.draw(),this._waitingForDraw=!1}))),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(let r=0;r0?{antialiased:!0}:{}}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),Qn.prototype.drawScene.call(this,r,t),this._fire("draw",{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),Qn.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){pn.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return pn.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(this.parent&&this.parent.content){var e=this.parent;!!this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return pn.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Gr.prototype.nodeType="Layer",on(Gr),kn.addGetterSetter(Gr,"imageSmoothingEnabled",!0),kn.addGetterSetter(Gr,"clearBeforeDraw",!0),kn.addGetterSetter(Gr,"hitGraphEnabled",!0,Cn());class Ur extends Gr{constructor(e){super(e),this.listening(!1),pn.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}Ur.prototype.nodeType="FastLayer",on(Ur);class Zr extends Qn{_validateAdd(e){var t=e.getType();"Group"!==t&&"Shape"!==t&&pn.throw("You may only add groups and shapes to groups.")}}Zr.prototype.nodeType="Group",on(Zr);var Xr=nn.performance&&nn.performance.now?function(){return nn.performance.now()}:function(){return(new Date).getTime()};class Yr{constructor(e,t){this.id=Yr.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Xr(),frameRate:0},this.func=e,this.setLayers(t)}setLayers(e){var t=[];return t=e?e.length>0?e:[e]:[],this.layers=t,this}getLayers(){return this.layers}addLayer(e){var t,n=this.layers,r=n.length;for(t=0;tthis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return void 0===e&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(e){this.pause(),this._time=e,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 e=this.getTimer()-this._startTime;2===this.state?this.setTime(e):3===this.state&&this.setTime(this.duration-e)}pause(){this.state=1,this.fire("onPause")}getTimer(){return(new Date).getTime()}}class Jr{constructor(e){var t,n,r=this,o=e.node,i=o._id,a=e.easing||eo.Linear,l=!!e.yoyo;t=void 0===e.duration?.3:0===e.duration?.001:e.duration,this.node=o,this._id=$r++;var s=o.getLayer()||(o instanceof rn.Stage?o.getLayers():null);for(n in s||pn.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Yr((function(){r.tween.onEnterFrame()}),s),this.tween=new Qr(n,(function(e){r._tweenFunc(e)}),a,0,1,1e3*t,l),this._addListeners(),Jr.attrs[i]||(Jr.attrs[i]={}),Jr.attrs[i][this._id]||(Jr.attrs[i][this._id]={}),Jr.tweens[i]||(Jr.tweens[i]={}),e)void 0===qr[n]&&this._addAttr(n,e[n]);this.reset(),this.onFinish=e.onFinish,this.onReset=e.onReset,this.onUpdate=e.onUpdate}_addAttr(e,t){var n,r,o,i,a,l,s,c,u=this.node,d=u._id;if((o=Jr.tweens[d][e])&&delete Jr.attrs[d][o][e],n=u.getAttr(e),pn._isArray(t))if(r=[],a=Math.max(t.length,n.length),"points"===e&&t.length!==n.length&&(t.length>n.length?(s=n,n=pn._prepareArrayForTween(n,t,u.closed())):(l=t,t=pn._prepareArrayForTween(t,n,u.closed()))),0===e.indexOf("fill"))for(i=0;i{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var e=this.node,t=Jr.attrs[e._id][this._id];t.points&&t.points.trueEnd&&e.setAttr("points",t.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var e=this.node,t=Jr.attrs[e._id][this._id];t.points&&t.points.trueStart&&e.points(t.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(e){return this.tween.seek(1e3*e),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var e,t=this.node._id,n=this._id,r=Jr.tweens[t];for(e in this.pause(),r)delete Jr.tweens[t][e];delete Jr.attrs[t][n]}}Jr.attrs={},Jr.tweens={},$n.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new Jr(e).play()};const eo={BackEaseIn(e,t,n,r){var o=1.70158;return n*(e/=r)*e*((o+1)*e-o)+t},BackEaseOut(e,t,n,r){var o=1.70158;return n*((e=e/r-1)*e*((o+1)*e+o)+1)+t},BackEaseInOut(e,t,n,r){var o=1.70158;return(e/=r/2)<1?n/2*(e*e*((1+(o*=1.525))*e-o))+t:n/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+t},ElasticEaseIn(e,t,n,r,o,i){var a=0;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),!o||o(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t,BounceEaseIn:(e,t,n,r)=>n-eo.BounceEaseOut(r-e,0,n,r)+t,BounceEaseInOut:(e,t,n,r)=>en*(e/=r)*e+t,EaseOut:(e,t,n,r)=>-n*(e/=r)*(e-2)+t,EaseInOut:(e,t,n,r)=>(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t,StrongEaseIn:(e,t,n,r)=>n*(e/=r)*e*e*e*e+t,StrongEaseOut:(e,t,n,r)=>n*((e=e/r-1)*e*e*e*e+1)+t,StrongEaseInOut:(e,t,n,r)=>(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t,Linear:(e,t,n,r)=>n*e/r+t},to=pn._assign(rn,{Util:pn,Transform:an,Node:$n,Container:Qn,Stage:Mr,stages:Tr,Layer:Gr,FastLayer:Ur,Group:Zr,DD:An,Shape:Fr,shapes:Br,Animation:Yr,Tween:Jr,Easings:eo,Context:Pn,Canvas:Tn});class no extends Fr{_sceneFunc(e){var t=rn.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),t=this.outerRadius(),n=this.clockwise(),r=rn.getAngle(n?360-this.angle():this.angle()),o=Math.cos(Math.min(r,Math.PI)),i=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),a=Math.sin(Math.min(r,Math.PI/2)),l=o*(o>0?e:t),s=i*(i>0?e:t),c=a*(a>0?t:e);return{x:l,y:n?-1*c:s,width:1*t-l,height:c-s}}}function ro(e,t,n,r,o,i,a){var l=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),s=Math.sqrt(Math.pow(o-n,2)+Math.pow(i-r,2)),c=a*l/(l+s),u=a*s/(l+s);return[n-c*(o-e),r-c*(i-t),n+u*(o-e),r+u*(i-t)]}function oo(e,t){var n,r,o=e.length,i=[];for(n=2;n4){for(n=(t=this.getTensionPoints()).length,r=l?0:4,l||e.quadraticCurveTo(t[0],t[1],t[2],t[3]);rc?s:c,g=s>c?1:s/c,m=s>c?c/s:1;e.translate(a,l),e.rotate(f),e.scale(g,m),e.arc(0,0,p,u,u+d,1-h),e.scale(1/g,1/m),e.rotate(-f),e.translate(-a,-l);break;case"z":n=!0,e.closePath()}}n||this.hasFill()?e.fillStrokeShape(this):e.strokeShape(this)}getSelfRect(){var e=[];this.dataArray.forEach((function(t){if("A"===t.command){var n=t.points[4],r=t.points[5],o=t.points[4]+r,i=Math.PI/180;if(Math.abs(n-o)o;r-=i){const n=ao.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);e.push(n.x,n.y)}else for(let r=n+i;rthis.dataArray[n].pathLength;)e-=this.dataArray[n].pathLength,++n;if(n===r)return{x:(t=this.dataArray[n-1].points.slice(-2))[0],y:t[1]};if(e<.01)return{x:(t=this.dataArray[n].points.slice(0,2))[0],y:t[1]};var o=this.dataArray[n],i=o.points;switch(o.command){case"L":return ao.getPointOnLine(e,o.start.x,o.start.y,i[0],i[1]);case"C":return ao.getPointOnCubicBezier(e/o.pathLength,o.start.x,o.start.y,i[0],i[1],i[2],i[3],i[4],i[5]);case"Q":return ao.getPointOnQuadraticBezier(e/o.pathLength,o.start.x,o.start.y,i[0],i[1],i[2],i[3]);case"A":var a=i[0],l=i[1],s=i[2],c=i[3],u=i[4],d=i[5],f=i[6];return u+=d*e/o.pathLength,ao.getPointOnEllipticalArc(a,l,s,c,u,f)}return null}static getLineLength(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}static getPointOnLine(e,t,n,r,o,i,a){void 0===i&&(i=t),void 0===a&&(a=n);var l=(o-n)/(r-t+1e-8),s=Math.sqrt(e*e/(1+l*l));r0&&!isNaN(h[0]);){var v,y,b,w,x,C,S,E,k,O,P=null,_=[],L=s,I=c;switch(f){case"l":s+=h.shift(),c+=h.shift(),P="L",_.push(s,c);break;case"L":s=h.shift(),c=h.shift(),_.push(s,c);break;case"m":var T=h.shift(),M=h.shift();if(s+=T,c+=M,P="M",a.length>2&&"z"===a[a.length-1].command)for(var j=a.length-2;j>=0;j--)if("M"===a[j].command){s=a[j].points[0]+T,c=a[j].points[1]+M;break}_.push(s,c),f="l";break;case"M":s=h.shift(),c=h.shift(),P="M",_.push(s,c),f="L";break;case"h":s+=h.shift(),P="L",_.push(s,c);break;case"H":s=h.shift(),P="L",_.push(s,c);break;case"v":c+=h.shift(),P="L",_.push(s,c);break;case"V":c=h.shift(),P="L",_.push(s,c);break;case"C":_.push(h.shift(),h.shift(),h.shift(),h.shift()),s=h.shift(),c=h.shift(),_.push(s,c);break;case"c":_.push(s+h.shift(),c+h.shift(),s+h.shift(),c+h.shift()),s+=h.shift(),c+=h.shift(),P="C",_.push(s,c);break;case"S":y=s,b=c,"C"===(v=a[a.length-1]).command&&(y=s+(s-v.points[2]),b=c+(c-v.points[3])),_.push(y,b,h.shift(),h.shift()),s=h.shift(),c=h.shift(),P="C",_.push(s,c);break;case"s":y=s,b=c,"C"===(v=a[a.length-1]).command&&(y=s+(s-v.points[2]),b=c+(c-v.points[3])),_.push(y,b,s+h.shift(),c+h.shift()),s+=h.shift(),c+=h.shift(),P="C",_.push(s,c);break;case"Q":_.push(h.shift(),h.shift()),s=h.shift(),c=h.shift(),_.push(s,c);break;case"q":_.push(s+h.shift(),c+h.shift()),s+=h.shift(),c+=h.shift(),P="Q",_.push(s,c);break;case"T":y=s,b=c,"Q"===(v=a[a.length-1]).command&&(y=s+(s-v.points[0]),b=c+(c-v.points[1])),s=h.shift(),c=h.shift(),P="Q",_.push(y,b,s,c);break;case"t":y=s,b=c,"Q"===(v=a[a.length-1]).command&&(y=s+(s-v.points[0]),b=c+(c-v.points[1])),s+=h.shift(),c+=h.shift(),P="Q",_.push(y,b,s,c);break;case"A":w=h.shift(),x=h.shift(),C=h.shift(),S=h.shift(),E=h.shift(),k=s,O=c,s=h.shift(),c=h.shift(),P="A",_=this.convertEndpointToCenterParameterization(k,O,s,c,S,E,w,x,C);break;case"a":w=h.shift(),x=h.shift(),C=h.shift(),S=h.shift(),E=h.shift(),k=s,O=c,s+=h.shift(),c+=h.shift(),P="A",_=this.convertEndpointToCenterParameterization(k,O,s,c,S,E,w,x,C)}a.push({command:P||f,points:_,start:{x:L,y:I},pathLength:this.calcLength(L,I,P||f,_)})}"z"!==f&&"Z"!==f||a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(e,t,n,r){var o,i,a,l,s=ao;switch(n){case"L":return s.getLineLength(e,t,r[0],r[1]);case"C":for(o=0,i=s.getPointOnCubicBezier(0,e,t,r[0],r[1],r[2],r[3],r[4],r[5]),l=.01;l<=1;l+=.01)a=s.getPointOnCubicBezier(l,e,t,r[0],r[1],r[2],r[3],r[4],r[5]),o+=s.getLineLength(i.x,i.y,a.x,a.y),i=a;return o;case"Q":for(o=0,i=s.getPointOnQuadraticBezier(0,e,t,r[0],r[1],r[2],r[3]),l=.01;l<=1;l+=.01)a=s.getPointOnQuadraticBezier(l,e,t,r[0],r[1],r[2],r[3]),o+=s.getLineLength(i.x,i.y,a.x,a.y),i=a;return o;case"A":o=0;var c=r[4],u=r[5],d=r[4]+u,f=Math.PI/180;if(Math.abs(c-d)d;l-=f)a=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),o+=s.getLineLength(i.x,i.y,a.x,a.y),i=a;else for(l=c+f;l1&&(a*=Math.sqrt(f),l*=Math.sqrt(f));var h=Math.sqrt((a*a*(l*l)-a*a*(d*d)-l*l*(u*u))/(a*a*(d*d)+l*l*(u*u)));o===i&&(h*=-1),isNaN(h)&&(h=0);var p=h*a*d/l,g=h*-l*u/a,m=(e+n)/2+Math.cos(c)*p-Math.sin(c)*g,v=(t+r)/2+Math.sin(c)*p+Math.cos(c)*g,y=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},b=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(y(e)*y(t))},w=function(e,t){return(e[0]*t[1]=1&&(E=0),0===i&&E>0&&(E-=2*Math.PI),1===i&&E<0&&(E+=2*Math.PI),[m,v,a,l,x,E,c,i]}}ao.prototype.className="Path",ao.prototype._attrsAffectingSize=["data"],on(ao),kn.addGetterSetter(ao,"data");class lo extends io{_sceneFunc(e){super._sceneFunc(e);var t=2*Math.PI,n=this.points(),r=n,o=0!==this.tension()&&n.length>4;o&&(r=this.getTensionPoints());var i,a,l=this.pointerLength(),s=n.length;if(o){const e=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[s-2],n[s-1]],t=ao.calcLength(r[r.length-4],r[r.length-3],"C",e),o=ao.getPointOnQuadraticBezier(Math.min(1,1-l/t),e[0],e[1],e[2],e[3],e[4],e[5]);i=n[s-2]-o.x,a=n[s-1]-o.y}else i=n[s-2]-n[s-4],a=n[s-1]-n[s-3];var c=(Math.atan2(a,i)+t)%t,u=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[s-2],n[s-1]),e.rotate(c),e.moveTo(0,0),e.lineTo(-l,u/2),e.lineTo(-l,-u/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),o?(i=(r[0]+r[2])/2-n[0],a=(r[1]+r[3])/2-n[1]):(i=n[2]-n[0],a=n[3]-n[1]),e.rotate((Math.atan2(-a,-i)+t)%t),e.moveTo(0,0),e.lineTo(-l,u/2),e.lineTo(-l,-u/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+2*t,height:e.height+2*t}}}lo.prototype.className="Arrow",on(lo),kn.addGetterSetter(lo,"pointerLength",10,vn()),kn.addGetterSetter(lo,"pointerWidth",10,vn()),kn.addGetterSetter(lo,"pointerAtBeginning",!1),kn.addGetterSetter(lo,"pointerAtEnding",!0);class so extends Fr{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}so.prototype._centroid=!0,so.prototype.className="Circle",so.prototype._attrsAffectingSize=["radius"],on(so),kn.addGetterSetter(so,"radius",0,vn());class co extends Fr{_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,2*Math.PI,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}}co.prototype.className="Ellipse",co.prototype._centroid=!0,co.prototype._attrsAffectingSize=["radiusX","radiusY"],on(co),kn.addComponentsGetterSetter(co,"radius",["x","y"]),kn.addGetterSetter(co,"radiusX",0,vn()),kn.addGetterSetter(co,"radiusY",0,vn());class uo extends Fr{constructor(e){super(e),this.on("imageChange.konva",(()=>{this._setImageLoad()})),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&4===e.readyState||e&&e.addEventListener&&e.addEventListener("load",(()=>{this._requestDraw()}))}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(e){const t=this.getWidth(),n=this.getHeight(),r=this.cornerRadius(),o=this.attrs.image;let i;if(o){const e=this.attrs.cropWidth,r=this.attrs.cropHeight;i=e&&r?[o,this.cropX(),this.cropY(),e,r,0,0,t,n]:[o,0,0,t,n]}(this.hasFill()||this.hasStroke()||r)&&(e.beginPath(),r?pn.drawRoundedRectPath(e,t,n,r):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),o&&(r&&e.clip(),e.drawImage.apply(e,i))}_hitFunc(e){var t=this.width(),n=this.height(),r=this.cornerRadius();e.beginPath(),r?pn.drawRoundedRectPath(e,t,n,r):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,t;return null!==(e=this.attrs.width)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.width}getHeight(){var e,t;return null!==(e=this.attrs.height)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.height}static fromURL(e,t,n=null){var r=pn.createImageElement();r.onload=function(){var e=new uo({image:r});t(e)},r.onerror=n,r.crossOrigin="Anonymous",r.src=e}}uo.prototype.className="Image",on(uo),kn.addGetterSetter(uo,"cornerRadius",0,yn(4)),kn.addGetterSetter(uo,"image"),kn.addComponentsGetterSetter(uo,"crop",["x","y","width","height"]),kn.addGetterSetter(uo,"cropX",0,vn()),kn.addGetterSetter(uo,"cropY",0,vn()),kn.addGetterSetter(uo,"cropWidth",0,vn()),kn.addGetterSetter(uo,"cropHeight",0,vn());var fo=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],ho="up",po="right",go="down",mo="left",vo=fo.length;class yo extends Zr{constructor(e){super(e),this.on("add.konva",(function(e){this._addListeners(e.child),this._sync()}))}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){var t,n=this,r=function(){n._sync()};for(t=0;t{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),o=Math.max(o,e.y)})),{x:t,y:r,width:n-t,height:o-r}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}xo.prototype.className="RegularPolygon",xo.prototype._centroid=!0,xo.prototype._attrsAffectingSize=["radius"],on(xo),kn.addGetterSetter(xo,"radius",0,vn()),kn.addGetterSetter(xo,"sides",0,vn());var Co=2*Math.PI;class So extends Fr{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,Co,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),Co,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}So.prototype.className="Ring",So.prototype._centroid=!0,So.prototype._attrsAffectingSize=["innerRadius","outerRadius"],on(So),kn.addGetterSetter(So,"innerRadius",0,vn()),kn.addGetterSetter(So,"outerRadius",0,vn());class Eo extends Fr{constructor(e){super(e),this._updated=!0,this.anim=new Yr((()=>{var e=this._updated;return this._updated=!1,e})),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 t=this.animation(),n=this.frameIndex(),r=4*n,o=this.animations()[t],i=this.frameOffsets(),a=o[r+0],l=o[r+1],s=o[r+2],c=o[r+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,s,c),e.closePath(),e.fillStrokeShape(this)),u)if(i){var d=i[t],f=2*n;e.drawImage(u,a,l,s,c,d[f+0],d[f+1],s,c)}else e.drawImage(u,a,l,s,c,0,0,s,c)}_hitFunc(e){var t=this.animation(),n=this.frameIndex(),r=4*n,o=this.animations()[t],i=this.frameOffsets(),a=o[r+2],l=o[r+3];if(e.beginPath(),i){var s=i[t],c=2*n;e.rect(s[c+0],s[c+1],a,l)}else e.rect(0,0,a,l);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(),t=this.animation();e1&&(m+=a)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=pn._isString(e)?e:null==e?"":e+"";return this._setAttr("text",t),this}getWidth(){return this.attrs.width===_o||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){return this.attrs.height===_o||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return pn.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var t,n=Do(),r=this.fontSize();return n.save(),n.font=this._getContextFont(),t=n.measureText(e),n.restore(),{width:t.width,height:r}}_getContextFont(){return this.fontStyle()+jo+this.fontVariant()+jo+(this.fontSize()+"px ")+function(e){return e.split(",").map((e=>{const t=(e=e.trim()).indexOf(" ")>=0,n=e.indexOf('"')>=0||e.indexOf("'")>=0;return t&&!n&&(e=`"${e}"`),e})).join(", ")}(this.fontFamily())}_addTextLine(e){this.align()===Lo&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t,lastInParagraph:!1})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return Do().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split("\n"),t=+this.fontSize(),n=0,r=this.lineHeight()*t,o=this.attrs.width,i=this.attrs.height,a=o!==_o&&void 0!==o,l=i!==_o&&void 0!==i,s=this.padding(),c=o-2*s,u=i-2*s,d=0,f=this.wrap(),h="char"!==f&&f!==Ao,p=this.ellipsis();this.textArr=[],Do().font=this._getContextFont();for(var g=p?this._getTextWidth("…"):0,m=0,v=e.length;mc)for(;y.length>0;){for(var w=0,x=y.length,C="",S=0;w>>1,k=y.slice(0,E+1),O=this._getTextWidth(k)+g;O<=c?(w=E+1,C=k,S=O):x=E}if(!C)break;if(h){var P,_=y[C.length];(P=(_===jo||"-"===_)&&S<=c?C.length:Math.max(C.lastIndexOf(jo),C.lastIndexOf("-"))+1)>0&&(w=P,C=C.slice(0,w),S=this._getTextWidth(C))}if(C=C.trimRight(),this._addTextLine(C),n=Math.max(n,S),d+=r,this._shouldHandleEllipsis(d)){this._tryToAddEllipsisToLastLine();break}if((y=(y=y.slice(w)).trimLeft()).length>0&&(b=this._getTextWidth(y))<=c){this._addTextLine(y),d+=r,n=Math.max(n,b);break}}else this._addTextLine(y),d+=r,n=Math.max(n,b),this._shouldHandleEllipsis(d)&&mu)break}this.textHeight=t,this.textWidth=n}_shouldHandleEllipsis(e){var t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.height,o=r!==_o&&void 0!==r,i=r-2*this.padding();return!(this.wrap()!==Ao)||o&&e+n>i}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,t=e!==_o&&void 0!==e,n=e-2*this.padding(),r=this.ellipsis(),o=this.textArr[this.textArr.length-1];if(o&&r){if(t)this._getTextWidth(o.text+"…")=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r0&&(a+=e.dataArray[l].pathLength);var s=0;"center"===r&&(s=Math.max(0,a/2-i/2)),"right"===r&&(s=Math.max(0,a-i));for(var c,u,d,f=Oo(this.text()),h=this.text().split(" ").length-1,p=-1,g=0,m=function(){g=0;for(var t=e.dataArray,n=p+1;n0)return p=n,t[n];"M"===t[n].command&&(c={x:t[n].points[0],y:t[n].points[1]})}return{}},v=function(t){var o=e._getTextSize(t).width+n;" "===t&&"justify"===r&&(o+=(a-i)/h);var l=0,s=0;for(u=void 0;Math.abs(o-l)/o>.01&&s<20;){s++;for(var f=l;void 0===d;)(d=m())&&f+d.pathLengtho?u=ao.getPointOnLine(o,c.x,c.y,d.points[0],d.points[1],c.x,c.y):d=void 0;break;case"A":var v=d.points[4],y=d.points[5],b=d.points[4]+y;0===g?g=v+1e-8:o>l?g+=Math.PI/180*y/Math.abs(y):g-=Math.PI/360*y/Math.abs(y),(y<0&&g=0&&g>b)&&(g=b,p=!0),u=ao.getPointOnEllipticalArc(d.points[0],d.points[1],d.points[2],d.points[3],g,d.points[6]);break;case"C":0===g?g=o>d.pathLength?1e-8:o/d.pathLength:o>l?g+=(o-l)/d.pathLength/2:g=Math.max(g-(l-o)/d.pathLength/2,0),g>1&&(g=1,p=!0),u=ao.getPointOnCubicBezier(g,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3],d.points[4],d.points[5]);break;case"Q":0===g?g=o/d.pathLength:o>l?g+=(o-l)/d.pathLength:g-=(l-o)/d.pathLength,g>1&&(g=1,p=!0),u=ao.getPointOnQuadraticBezier(g,d.start.x,d.start.y,d.points[0],d.points[1],d.points[2],d.points[3])}void 0!==u&&(l=ao.getLineLength(c.x,c.y,u.x,u.y)),p&&(p=!1,d=void 0)}},y=s/(e._getTextSize("C").width+n)-1,b=0;be+`.${Vo}`)).join(" "),Uo="nodesRect",Zo=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],Xo={"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 Yo="ontouchstart"in rn._global;var qo=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function $o(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),o=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign(Object.assign({},e),{rotation:e.rotation+t,x:r,y:o})}function Ko(e,t){const n=function(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}(e);return $o(e,t,n)}class Qo extends Zr{constructor(e){super(e),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(Go,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return pn.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 Vo+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();const t=e.filter((e=>!e.isAncestorOf(this)||(pn.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1)));return this._nodes=e=t,1===e.length&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach((e=>{const t=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()},n=e._attrsAffectingSize.map((e=>e+"Change."+this._getEventNamespace())).join(" ");e.on(n,t),e.on(Zo.map((e=>e+`.${this._getEventNamespace()}`)).join(" "),t),e.on(`absoluteTransformChange.${this._getEventNamespace()}`,t),this._proxyDrag(e)})),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(e){let t;e.on(`dragstart.${this._getEventNamespace()}`,(n=>{t=e.getAbsolutePosition(),this.isDragging()||e===this.findOne(".back")||this.startDrag(n,!1)})),e.on(`dragmove.${this._getEventNamespace()}`,(n=>{if(!t)return;const r=e.getAbsolutePosition(),o=r.x-t.x,i=r.y-t.y;this.nodes().forEach((t=>{if(t===e)return;if(t.isDragging())return;const r=t.getAbsolutePosition();t.setAbsolutePosition({x:r.x+o,y:r.y+i}),t.startDrag(n)})),t=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(Uo),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(Uo,this.__getNodeRect)}__getNodeShape(e,t=this.rotation(),n){var r=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=e.getAbsoluteScale(n),i=e.getAbsolutePosition(n),a=r.x*o.x-e.offsetX()*o.x,l=r.y*o.y-e.offsetY()*o.y;const s=(rn.getAngle(e.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return $o({x:i.x+a*Math.cos(s)+l*Math.sin(-s),y:i.y+l*Math.cos(s)+a*Math.sin(s),width:r.width*o.x,height:r.height*o.y,rotation:s},-rn.getAngle(t),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const e=[];this.nodes().map((t=>{const n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var r=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height},{x:n.x,y:n.y+n.height}],o=t.getAbsoluteTransform();r.forEach((function(t){var n=o.point(t);e.push(n)}))}));const t=new an;var n,r,o,i;t.rotate(-rn.getAngle(this.rotation())),e.forEach((function(e){var a=t.point(e);void 0===n&&(n=o=a.x,r=i=a.y),n=Math.min(n,a.x),r=Math.min(r,a.y),o=Math.max(o,a.x),i=Math.max(i,a.y)})),t.invert();const a=t.point({x:n,y:r});return{x:a.x,y:a.y,width:o-n,height:i-r,rotation:rn.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(),qo.forEach(function(e){this._createAnchor(e)}.bind(this)),this._createAnchor("rotater")}_createAnchor(e){var t=new wo({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:Yo?10:"auto"}),n=this;t.on("mousedown touchstart",(function(e){n._handleMouseDown(e)})),t.on("dragstart",(e=>{t.stopDrag(),e.cancelBubble=!0})),t.on("dragend",(e=>{e.cancelBubble=!0})),t.on("mouseenter",(()=>{var n=rn.getAngle(this.rotation()),r=function(e,t){if("rotater"===e)return"crosshair";t+=pn.degToRad(Xo[e]||0);var n=(pn.radToDeg(t)%360+360)%360;return pn._inRange(n,337.5,360)||pn._inRange(n,0,22.5)?"ns-resize":pn._inRange(n,22.5,67.5)?"nesw-resize":pn._inRange(n,67.5,112.5)?"ew-resize":pn._inRange(n,112.5,157.5)?"nwse-resize":pn._inRange(n,157.5,202.5)?"ns-resize":pn._inRange(n,202.5,247.5)?"nesw-resize":pn._inRange(n,247.5,292.5)?"ew-resize":pn._inRange(n,292.5,337.5)?"nwse-resize":(pn.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}(e,n);t.getStage().content&&(t.getStage().content.style.cursor=r),this._cursorChange=!0})),t.on("mouseout",(()=>{t.getStage().content&&(t.getStage().content.style.cursor=""),this._cursorChange=!1})),this.add(t)}_createBack(){var e=new Fr({name:"back",width:0,height:0,draggable:!0,sceneFunc(e){var t=this.getParent(),n=t.padding();e.beginPath(),e.rect(-n,-n,this.width()+2*n,this.height()+2*n),e.moveTo(this.width()/2,-n),t.rotateEnabled()&&e.lineTo(this.width()/2,-t.rotateAnchorOffset()*pn._sign(this.height())-n),e.fillStrokeShape(this)},hitFunc:(e,t)=>{if(this.shouldOverdrawWholeArea()){var n=this.padding();e.beginPath(),e.rect(-n,-n,t.width()+2*n,t.height()+2*n),e.fillStrokeShape(t)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",(e=>{e.cancelBubble=!0})),e.on("dragmove",(e=>{e.cancelBubble=!0})),e.on("dragend",(e=>{e.cancelBubble=!0})),this.on("dragmove",(e=>{this.update()}))}_handleMouseDown(e){this._movingAnchorName=e.target.name().split(" ")[0];var t=this._getNodeRect(),n=t.width,r=t.height,o=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=Math.abs(r/o),this.cos=Math.abs(n/o),"undefined"!=typeof window&&(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 i=e.target.getAbsolutePosition(),a=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:a.x-i.x,y:a.y-i.y},this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach((t=>{t._fire("transformstart",{evt:e.evt,target:t})}))}_handleMouseMove(e){var t,n,r,o=this.findOne("."+this._movingAnchorName),i=o.getStage();i.setPointersPositions(e);const a=i.getPointerPosition();let l={x:a.x-this._anchorDragOffset.x,y:a.y-this._anchorDragOffset.y};const s=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(s,l,e)),o.setAbsolutePosition(l);const c=o.getAbsolutePosition();if(s.x!==c.x||s.y!==c.y)if("rotater"!==this._movingAnchorName){var u=this.keepRatio()||e.shiftKey,d=this.centeredScaling()||e.altKey;if("top-left"===this._movingAnchorName){if(u){var f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(f.x-o.x(),2)+Math.pow(f.y-o.y(),2));var h=this.findOne(".top-left").x()>f.x?-1:1,p=this.findOne(".top-left").y()>f.y?-1:1;t=r*this.cos*h,n=r*this.sin*p,this.findOne(".top-left").x(f.x-t),this.findOne(".top-left").y(f.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(o.y());else if("top-right"===this._movingAnchorName){if(u){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(o.x()-f.x,2)+Math.pow(f.y-o.y(),2));h=this.findOne(".top-right").x()f.y?-1:1;t=r*this.cos*h,n=r*this.sin*p,this.findOne(".top-right").x(f.x+t),this.findOne(".top-right").y(f.y-n)}var g=o.position();this.findOne(".top-left").y(g.y),this.findOne(".bottom-right").x(g.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(o.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(o.x());else if("bottom-left"===this._movingAnchorName){if(u){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(f.x-o.x(),2)+Math.pow(o.y()-f.y,2));h=f.x{t._fire("transformend",{evt:e,target:t})})),this._movingAnchorName=null}}_fitNodesInto(e,t){var n=this._getNodeRect();if(pn._inRange(e.width,2*-this.padding()-1,1))return void this.update();if(pn._inRange(e.height,2*-this.padding()-1,1))return void this.update();const r=this.flipEnabled();var o=new an;if(o.rotate(rn.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const t=o.point({x:2*-this.padding(),y:0});if(e.x+=t.x,e.y+=t.y,e.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,!r)return void this.update()}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const t=o.point({x:2*this.padding(),y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.width+=2*this.padding(),!r)return void this.update()}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const t=o.point({x:0,y:2*-this.padding()});if(e.x+=t.x,e.y+=t.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding(),!r)return void this.update()}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const t=o.point({x:0,y:2*this.padding()});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding(),!r)return void this.update()}if(this.boundBoxFunc()){const t=this.boundBoxFunc()(n,e);t?e=t:pn.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const i=1e7,a=new an;a.translate(n.x,n.y),a.rotate(n.rotation),a.scale(n.width/i,n.height/i);const l=new an;l.translate(e.x,e.y),l.rotate(e.rotation),l.scale(e.width/i,e.height/i);const s=l.multiply(a.invert());this._nodes.forEach((e=>{var n;const r=e.getParent().getAbsoluteTransform(),o=e.getTransform().copy();o.translate(e.offsetX(),e.offsetY());const i=new an;i.multiply(r.copy().invert()).multiply(s).multiply(r).multiply(o);const a=i.decompose();e.setAttrs(a),this._fire("transform",{evt:t,target:e}),e._fire("transform",{evt:t,target:e}),null===(n=e.getLayer())||void 0===n||n.batchDraw()})),this.rotation(pn._getRotation(e.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,t){this.findOne(e).setAttrs(t)}update(){var e,t=this._getNodeRect();this.rotation(pn._getRotation(t.rotation));var n=t.width,r=t.height,o=this.enabledAnchors(),i=this.resizeEnabled(),a=this.padding(),l=this.anchorSize();this.find("._anchor").forEach((e=>{e.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})})),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+a,offsetY:l/2+a,visible:i&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:l/2+a,visible:i&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:l/2-a,offsetY:l/2+a,visible:i&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:r/2,offsetX:l/2+a,visible:i&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:r/2,offsetX:l/2-a,visible:i&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:r,offsetX:l/2+a,offsetY:l/2-a,visible:i&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:r,offsetY:l/2-a,visible:i&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:r,offsetX:l/2-a,offsetY:l/2-a,visible:i&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*pn._sign(r)-a,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:r,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),null===(e=this.getLayer())||void 0===e||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=""),Zr.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return $n.prototype.toObject.call(this)}clone(e){return $n.prototype.clone.call(this,e)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}Qo.prototype.className="Transformer",on(Qo),kn.addGetterSetter(Qo,"enabledAnchors",qo,(function(e){return e instanceof Array||pn.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach((function(e){-1===qo.indexOf(e)&&pn.warn("Unknown anchor name: "+e+". Available names are: "+qo.join(", "))})),e||[]})),kn.addGetterSetter(Qo,"flipEnabled",!0,Cn()),kn.addGetterSetter(Qo,"resizeEnabled",!0),kn.addGetterSetter(Qo,"anchorSize",10,vn()),kn.addGetterSetter(Qo,"rotateEnabled",!0),kn.addGetterSetter(Qo,"rotationSnaps",[]),kn.addGetterSetter(Qo,"rotateAnchorOffset",50,vn()),kn.addGetterSetter(Qo,"rotationSnapTolerance",5,vn()),kn.addGetterSetter(Qo,"borderEnabled",!0),kn.addGetterSetter(Qo,"anchorStroke","rgb(0, 161, 255)"),kn.addGetterSetter(Qo,"anchorStrokeWidth",1,vn()),kn.addGetterSetter(Qo,"anchorFill","white"),kn.addGetterSetter(Qo,"anchorCornerRadius",0,vn()),kn.addGetterSetter(Qo,"borderStroke","rgb(0, 161, 255)"),kn.addGetterSetter(Qo,"borderStrokeWidth",1,vn()),kn.addGetterSetter(Qo,"borderDash"),kn.addGetterSetter(Qo,"keepRatio",!0),kn.addGetterSetter(Qo,"centeredScaling",!1),kn.addGetterSetter(Qo,"ignoreStroke",!1),kn.addGetterSetter(Qo,"padding",0,vn()),kn.addGetterSetter(Qo,"node"),kn.addGetterSetter(Qo,"nodes"),kn.addGetterSetter(Qo,"boundBoxFunc"),kn.addGetterSetter(Qo,"anchorDragBoundFunc"),kn.addGetterSetter(Qo,"shouldOverdrawWholeArea",!1),kn.addGetterSetter(Qo,"useSingleNodeRotation",!0),kn.backCompat(Qo,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class Jo extends Fr{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,rn.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}function ei(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}Jo.prototype.className="Wedge",Jo.prototype._centroid=!0,Jo.prototype._attrsAffectingSize=["radius"],on(Jo),kn.addGetterSetter(Jo,"radius",0,vn()),kn.addGetterSetter(Jo,"angle",0,vn()),kn.addGetterSetter(Jo,"clockwise",!1),kn.backCompat(Jo,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var ti=[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],ni=[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];kn.addGetterSetter($n,"blurRadius",0,vn(),kn.afterSetFilter);kn.addGetterSetter($n,"brightness",0,vn(),kn.afterSetFilter);kn.addGetterSetter($n,"contrast",0,vn(),kn.afterSetFilter);function ri(e,t,n,r,o){var i=n-t,a=o-r;return 0===i?r+a/2:0===a?r:a*((e-t)/i)+r}kn.addGetterSetter($n,"embossStrength",.5,vn(),kn.afterSetFilter),kn.addGetterSetter($n,"embossWhiteLevel",.5,vn(),kn.afterSetFilter),kn.addGetterSetter($n,"embossDirection","top-left",null,kn.afterSetFilter),kn.addGetterSetter($n,"embossBlend",!1,null,kn.afterSetFilter);kn.addGetterSetter($n,"enhance",0,vn(),kn.afterSetFilter);kn.addGetterSetter($n,"hue",0,vn(),kn.afterSetFilter),kn.addGetterSetter($n,"saturation",0,vn(),kn.afterSetFilter),kn.addGetterSetter($n,"luminance",0,vn(),kn.afterSetFilter);kn.addGetterSetter($n,"hue",0,vn(),kn.afterSetFilter),kn.addGetterSetter($n,"saturation",0,vn(),kn.afterSetFilter),kn.addGetterSetter($n,"value",0,vn(),kn.afterSetFilter);function oi(e,t,n){var r=4*(n*e.width+t),o=[];return o.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),o}function ii(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}kn.addGetterSetter($n,"kaleidoscopePower",2,vn(),kn.afterSetFilter),kn.addGetterSetter($n,"kaleidoscopeAngle",0,vn(),kn.afterSetFilter);kn.addGetterSetter($n,"threshold",0,vn(),kn.afterSetFilter);kn.addGetterSetter($n,"noise",.2,vn(),kn.afterSetFilter);kn.addGetterSetter($n,"pixelSize",8,vn(),kn.afterSetFilter);kn.addGetterSetter($n,"levels",.5,vn(),kn.afterSetFilter);kn.addGetterSetter($n,"red",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),kn.addGetterSetter($n,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),kn.addGetterSetter($n,"blue",0,mn,kn.afterSetFilter);kn.addGetterSetter($n,"red",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),kn.addGetterSetter($n,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),kn.addGetterSetter($n,"blue",0,mn,kn.afterSetFilter),kn.addGetterSetter($n,"alpha",1,(function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}));kn.addGetterSetter($n,"threshold",.5,vn(),kn.afterSetFilter);const ai=to.Util._assign(to,{Arc:no,Arrow:lo,Circle:so,Ellipse:co,Image:uo,Label:yo,Tag:bo,Line:io,Path:ao,Rect:wo,RegularPolygon:xo,Ring:So,Sprite:Eo,Star:ko,Text:No,TextPath:Wo,Transformer:Qo,Wedge:Jo,Filters:{Blur:function(e){var t=Math.round(this.blurRadius());t>0&&function(e,t){var n,r,o,i,a,l,s,c,u,d,f,h,p,g,m,v,y,b,w,x,C,S,E,k,O=e.data,P=e.width,_=e.height,L=t+t+1,I=P-1,T=_-1,M=t+1,j=M*(M+1)/2,A=new ei,z=null,R=A,D=null,N=null,H=ti[t],B=ni[t];for(o=1;o>B,0!==E?(E=255/E,O[l]=(c*H>>B)*E,O[l+1]=(u*H>>B)*E,O[l+2]=(d*H>>B)*E):O[l]=O[l+1]=O[l+2]=0,c-=h,u-=p,d-=g,f-=m,h-=D.r,p-=D.g,g-=D.b,m-=D.a,i=s+((i=n+t+1)>B,E>0?(E=255/E,O[i]=(c*H>>B)*E,O[i+1]=(u*H>>B)*E,O[i+2]=(d*H>>B)*E):O[i]=O[i+1]=O[i+2]=0,c-=h,u-=p,d-=g,f-=m,h-=D.r,p-=D.g,g-=D.b,m-=D.a,i=n+((i=r+M)255?255:i,a=(a*=255)<0?0:a>255?255:a,l=(l*=255)<0?0:l>255?255:l,r[t]=i,r[t+1]=a,r[t+2]=l},Emboss:function(e){var t=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),o=this.embossBlend(),i=0,a=0,l=e.data,s=e.width,c=e.height,u=4*s,d=c;switch(r){case"top-left":i=-1,a=-1;break;case"top":i=-1,a=0;break;case"top-right":i=-1,a=1;break;case"right":i=0,a=1;break;case"bottom-right":i=1,a=1;break;case"bottom":i=1,a=0;break;case"bottom-left":i=1,a=-1;break;case"left":i=0,a=-1;break;default:pn.error("Unknown emboss direction: "+r)}do{var f=(d-1)*u,h=i;d+h<1&&(h=0),d+h>c&&(h=0);var p=(d-1+h)*s*4,g=s;do{var m=f+4*(g-1),v=a;g+v<1&&(v=0),g+v>s&&(v=0);var y=p+4*(g-1+v),b=l[m]-l[y],w=l[m+1]-l[y+1],x=l[m+2]-l[y+2],C=b,S=C>0?C:-C;if((w>0?w:-w)>S&&(C=w),(x>0?x:-x)>S&&(C=x),C*=t,o){var E=l[m]+C,k=l[m+1]+C,O=l[m+2]+C;l[m]=E>255?255:E<0?0:E,l[m+1]=k>255?255:k<0?0:k,l[m+2]=O>255?255:O<0?0:O}else{var P=n-C;P<0?P=0:P>255&&(P=255),l[m]=l[m+1]=l[m+2]=P}}while(--g)}while(--d)},Enhance:function(e){var t,n,r,o,i=e.data,a=i.length,l=i[0],s=l,c=i[1],u=c,d=i[2],f=d,h=this.enhance();if(0!==h){for(o=0;os&&(s=t),(n=i[o+1])u&&(u=n),(r=i[o+2])f&&(f=r);var p,g,m,v,y,b,w,x,C;for(s===l&&(s=255,l=0),u===c&&(u=255,c=0),f===d&&(f=255,d=0),h>0?(g=s+h*(255-s),m=l-h*(l-0),y=u+h*(255-u),b=c-h*(c-0),x=f+h*(255-f),C=d-h*(d-0)):(g=s+h*(s-(p=.5*(s+l))),m=l+h*(l-p),y=u+h*(u-(v=.5*(u+c))),b=c+h*(c-v),x=f+h*(f-(w=.5*(f+d))),C=d+h*(d-w)),o=0;ov?a:v;var y,b,w,x,C=u,S=c,E=360/S*Math.PI/180;for(b=0;bu&&(b=y,w=0,x=-1),n=0;nb?s:b;var w,x,C,S=f,E=d,k=n.polarRotation||0;for(o=0;o=0&&h=0&&p=0&&h=0&&p=1020?255:0}return a}(t,e.width,e.height),t=function(e,t,n){for(var r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),a=[],l=0;l=0&&h=0&&p=m))for(n=u;n=v||(o+=w[(r=4*(m*n+t))+0],i+=w[r+1],a+=w[r+2],l+=w[r+3],p+=1);for(o/=p,i/=p,a/=p,l/=p,t=s;t=m))for(n=u;n=v||(w[(r=4*(m*n+t))+0]=o,w[r+1]=i,w[r+2]=a,w[r+3]=l)}},Posterize:function(e){var t,n=Math.round(254*this.levels())+1,r=e.data,o=r.length,i=255/n;for(t=0;t127&&(s=255-s),c>127&&(c=255-c),u>127&&(u=255-u),t[l]=s,t[l+1]=c,t[l+2]=u}while(--a)}while(--o)},Threshold:function(e){var t,n=255*this.threshold(),r=e.data,o=r.length;for(t=0;tdi.DefaultEventPriority;var la=Object.defineProperty,sa=Object.defineProperties,ca=Object.getOwnPropertyDescriptors,ua=Object.getOwnPropertySymbols,da=Object.prototype.hasOwnProperty,fa=Object.prototype.propertyIsEnumerable,ha=(e,t,n)=>t in e?la(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pa=(e,t)=>{for(var n in t||(t={}))da.call(t,n)&&ha(e,n,t[n]);if(ua)for(var n of ua(t))fa.call(t,n)&&ha(e,n,t[n]);return e};function ga(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=ga(r,t,n);if(e)return e;r=t?null:r.sibling}}function ma(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}const va=ma(h.createContext(null));class ya extends h.Component{render(){return h.createElement(va.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:ba,ReactCurrentDispatcher:wa}=h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function xa(){const e=h.useContext(va);if(null===e)throw new Error("its-fine: useFiber must be called within a !");const t=h.useId();return h.useMemo((()=>{for(const n of[null==ba?void 0:ba.current,e,null==e?void 0:e.alternate]){if(!n)continue;const e=ga(n,!1,(e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}}));if(e)return e}}),[e,t])}function Ca(){const e=function(){var e,t;const n=xa(),[r]=h.useState((()=>new Map));r.clear();let o=n;for(;o;){const n=null==(e=o.type)?void 0:e._context;n&&n!==va&&!r.has(n)&&r.set(n,null==(t=null==wa?void 0:wa.current)?void 0:t.readContext(ma(n))),o=o.return}return r}();return h.useMemo((()=>Array.from(e.keys()).reduce(((t,n)=>r=>h.createElement(t,null,h.createElement(n.Provider,((e,t)=>sa(e,ca(t)))(pa({},r),{value:e.get(n)})))),(e=>h.createElement(ya,pa({},e))))),[e])}const Sa=e=>{const t=h.useRef(),n=h.useRef(),r=h.useRef(),o=function(e){const t=h.useRef({});return h.useLayoutEffect((()=>{t.current=e})),h.useLayoutEffect((()=>()=>{t.current={}}),[]),t.current}(e),i=Ca(),a=t=>{const{forwardedRef:n}=e;n&&("function"==typeof n?n(t):n.current=t)};return h.useLayoutEffect((()=>(n.current=new si.Stage({width:e.width,height:e.height,container:t.current}),a(n.current),r.current=La.createContainer(n.current,di.LegacyRoot,!1,null),La.updateContainer(h.createElement(i,{},e.children),r.current),()=>{si.isBrowser&&(a(null),La.updateContainer(null,r.current,null),n.current.destroy())})),[]),h.useLayoutEffect((()=>{a(n.current),wi(n.current,e,o),La.updateContainer(h.createElement(i,{},e.children),r.current,null)})),h.createElement("div",{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},Ea="Layer",ka="Rect",Oa="Ellipse",Pa="Image",_a="Transformer",La=ui()(r);La.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:h.version,rendererPackageName:"react-konva"});const Ia=h.forwardRef(((e,t)=>h.createElement(ya,{},h.createElement(Sa,{...e,forwardedRef:t})))),Ta=function(e){mi=e};const Ma=function(e,t,n,r){return Math.min(e/n,t/r)||1};var ja="FIE_root",Aa="FIE_transformers-layer",za="FIE_original-image",Ra="FIE_nodes-transformer",Da="watermark",Na="353297d2-40b4-4684-a875-45a2178a8157",Ha={FINETUNE:"Finetune",FILTERS:"Filters",ADJUST:"Adjust",WATERMARK:"Watermark",ANNOTATE:"Annotate",RESIZE:"Resize"},Ba={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"},Fa="X",Wa="Y",Va=["png","jpeg","jpg","webp"],Ga=[].concat(Va,["svg","gif","avif","apng"]),Ua=Va[0],Za={DEFAULT:"default",DRAW:"crosshair",SELECT:"pointer",MOVE:"move",DRAG:"GRAB"},Xa="Crop",Ya="custom",qa="ellipse",$a={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"},Ka=14,Qa=14,Ja="after-saving",el="close-button-clicked",tl="warning",nl="error",rl={top:"north",bottom:"south",left:"west",center:"center",right:"east"},ol={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"};const il=function(e,t){var n=!!(2=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,e},f:function e(){try{i||null==n.return||n.return()}finally{if(a)throw e}}}}function yl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n(n=1n?-1:n;var r=t[0],o=t[1],i=t[2],a=.2989*r+.587*o+.114*i;return[-a*n+r*(1+n),-a*n+o*(1+n),-a*n+i*(1+n)]}},grayscale:function(){return function(e){var t=e[0],n=e[1],r=e[2];return[,,,].fill(.2126*t+.7152*n+.0722*r)}},sepia:function(e){return function(t){var n=t[0],r=t[1],o=t[2];return[n*(1-.607*e)+.769*r*e+.189*o*e,.349*n*e+r*(1-.314*e)+.168*o*e,.272*n*e+.534*r*e+o*(1-.869*e)]}},adjustRGB:function(e){return function(t){return[t[0]*e[0],t[1]*e[1],t[2]*e[2]]}},colorFilter:function(e){return function(t){var n=t[0],r=t[1],o=t[2],i=e[3];return[n-(n-e[0])*i,r-(r-e[1])*i,o-(o-e[2])*i]}}};const wl=bl;function xl(e){wl.apply(e,(function(e){var t=(e[0]+e[1]+e[2])/3>100?255:0;return[t,t,t]}))}xl.filterName="BlackAndWhite";const Cl=xl;function Sl(e){wl.apply(e,wl.brightness(.1),wl.contrast(.1),wl.saturation(.15))}Sl.filterName="Clarendon";const El=Sl;function kl(e){wl.apply(e,wl.sepia(.04),wl.contrast(-.15))}kl.filterName="Gingham";const Ol=kl;function Pl(e){wl.apply(e,wl.grayscale(),wl.brightness(.1));e.data.length}Pl.filterName="Moon";const _l=Pl;var Ll=[1,1.03,1.05];function Il(e){wl.apply(e,wl.brightness(.08),wl.adjustRGB(Ll),wl.saturation(.12))}Il.filterName="Lark";const Tl=Il;function Ml(e){wl.apply(e,wl.sepia(.4),wl.brightness(.13),wl.contrast(-.05))}Ml.filterName="Reyes";const jl=Ml;var Al=[1.01,1.04,1];function zl(e){wl.apply(e,wl.adjustRGB(Al),wl.saturation(.3))}zl.filterName="Juno";const Rl=zl;function Dl(e){wl.apply(e,wl.brightness(.1),wl.saturation(-.5))}Dl.filterName="Slumber";const Nl=Dl;var Hl=[1.04,1,1.02];function Bl(e){wl.apply(e,wl.adjustRGB(Hl),wl.saturation(-.05))}Bl.filterName="Crema";const Fl=Bl;function Wl(e){wl.apply(e,wl.brightness(.05),wl.saturation(-.03))}Wl.filterName="Ludwig";const Vl=Wl;var Gl=[228,130,225,.13];function Ul(e){wl.apply(e,wl.colorFilter(Gl),wl.saturation(-.2))}Ul.filterName="Aden";const Zl=Ul;var Xl=[1.05,1.1,1];function Yl(e){wl.apply(e,wl.adjustRGB(Xl))}Yl.filterName="Perpetua";const ql=Yl;function $l(e){wl.apply(e,wl.saturation(.3),wl.brightness(.15))}$l.filterName="Amaro";const Kl=$l;var Ql=[230,115,108,.05];function Jl(e){wl.apply(e,wl.colorFilter(Ql),wl.saturation(.15))}Jl.filterName="Mayfair";const es=Jl;var ts=[255,170,0,.1];function ns(e){wl.apply(e,wl.colorFilter(ts),wl.brightness(.09),wl.saturation(.1))}ns.filterName="Rise";const rs=ns;var os=[1,1,1.25];function is(e){wl.apply(e,wl.adjustRGB(os),wl.contrast(.1),wl.brightness(.15))}is.filterName="Hudson";const as=is;var ls=[255,225,80,.08];function ss(e){wl.apply(e,wl.colorFilter(ls),wl.saturation(.1),wl.contrast(.05))}ss.filterName="Valencia";const cs=ss;var us=[255,255,0,.07];function ds(e){wl.apply(e,wl.colorFilter(us),wl.saturation(.2),wl.contrast(.15))}ds.filterName="XPro2";const fs=ds;function hs(e){wl.apply(e,wl.contrast(-.15),wl.saturation(.1))}hs.filterName="Sierra";const ps=hs;var gs=[100,28,210,.03];function ms(e){wl.apply(e,wl.grayscale(),wl.colorFilter(gs),wl.brightness(.1))}ms.filterName="Willow";const vs=ms;function ys(e){wl.apply(e,wl.contrast(.15),wl.saturation(.2))}ys.filterName="LoFi";const bs=ys;function ws(e){wl.apply(e,wl.contrast(.1),wl.saturation(.15))}ws.filterName="Hefe";const xs=ws;var Cs=[220,115,188,.12];function Ss(e){wl.apply(e,wl.colorFilter(Cs),wl.contrast(-.05))}Ss.filterName="Nashville";const Es=Ss;function ks(e){wl.apply(e,wl.brightness(.1),wl.sepia(.3))}ks.filterName="Stinson";const Os=ks;var Ps=[255,225,0,.05];function _s(e){wl.apply(e,wl.colorFilter(Ps),wl.brightness(.06),wl.contrast(.06))}_s.filterName="Vesper";const Ls=_s;var Is=[255,165,40,.2];function Ts(e){wl.apply(e,wl.colorFilter(Is))}Ts.filterName="Earlybird";const Ms=Ts;var js=[140,10,185,.1];function As(e){wl.apply(e,wl.contrast(.2),wl.colorFilter(js))}As.filterName="Brannan";const zs=As;function Rs(e){wl.apply(e,wl.brightness(-.1),wl.saturation(-.1))}Rs.filterName="Sutro";const Ds=Rs;var Ns=[255,145,0,.2];function Hs(e){wl.apply(e,wl.sepia(.1),wl.colorFilter(Ns))}Hs.filterName="Toaster";const Bs=Hs;var Fs=[255,255,0,.2];function Ws(e){wl.apply(e,wl.brightness(.1),wl.colorFilter(Fs))}Ws.filterName="Walden";const Vs=Ws;var Gs=[255,25,0,.15];function Us(e){wl.apply(e,wl.colorFilter(Gs),wl.brightness(.1))}Us.filterName="NinteenSeventySeven";const Zs=Us;var Xs=[255,140,0,.1],Ys=[1.15,1.05,1];function qs(e){wl.apply(e,wl.colorFilter(Xs),wl.adjustRGB(Ys),wl.saturation(.35))}qs.filterName="Kelvin";const $s=qs;var Ks=[225,240,0,.1];function Qs(e){wl.apply(e,wl.colorFilter(Ks),wl.saturation(.25),wl.contrast(.05))}Qs.filterName="Maven";const Js=Qs;function ec(e){wl.apply(e,wl.sepia(.06),wl.brightness(.1))}ec.filterName="Ginza";const tc=ec;function nc(e){wl.apply(e,wl.saturation(.35),wl.brightness(.1))}nc.filterName="Skyline";const rc=nc;function oc(e){wl.apply(e,wl.contrast(.15),wl.brightness(.1))}oc.filterName="Dogpatch";const ic=oc;var ac=[25,240,252,.05];function lc(e){wl.apply(e,wl.colorFilter(ac),wl.sepia(.3))}lc.filterName="Brooklyn";const sc=lc;var cc=[208,208,86,.2];function uc(e){wl.apply(e,wl.colorFilter(cc),wl.contrast(.15))}uc.filterName="Helena";const dc=uc;var fc=[255,160,25,.1];function hc(e){wl.apply(e,wl.colorFilter(fc),wl.brightness(.1))}hc.filterName="Ashby";const pc=hc;var gc=[255,50,80,.12];function mc(e){wl.apply(e,wl.colorFilter(gc),wl.contrast(.05))}mc.filterName="Charmes";const vc=mc;const yc=function(e){return e?o[e]||li.Filters[e]:null};function bc(e){for(var t=this.warmth(),n=e.data,r=n.length,o=0;o=t?255:0,n[o+1]=n[o+1]>=t?255:0,n[o+2]=n[o+2]>=t?255:0)}kn.addGetterSetter(li.Image,"warmth",0,vn(),kn.afterSetFilter),xc.finetuneName="CustomThreshold";const Cc=xc;kn.addGetterSetter(li.Image,"threshold",0,vn,kn.afterSetFilter);const Sc=function(e){return Array.isArray(e)&&0i.status){(i.response||[]).forEach((function(e){Qc[o]=Kc(Kc({},Qc[o]),{},c({},e.translation_key,e.translations[o]))}));var e=[];Object.keys(qc).forEach((function(t){var n;t&&(null===(n=Qc[o])||void 0===n||!n[t])&&e.push({key:t,lang:o,default:qc[t]})})),0r.status?t(r.response):(console.warn("Error in sending translation key to backend ".concat(null===(e=r.response)||void 0===e?void 0:e.hint,", ").concat(r.status)),n())},r.onerror=function(){var e;console.warn("Error in sending translation key to backend ".concat(null===(e=r.response)||void 0===e?void 0:e.hint,", ").concat(r.status)),n()},r.open("POST","https://neo.wordplex.io/api/import/request-translations?grid_uuid=".concat(Na)),r.send(JSON.stringify({grid_uuid:Na,translations_requests:e}))}))}(e),tu(t,o),n(Jc)}else{var a,l,s;console.error("Status code: ".concat(i.status)),console.error((null===(a=i.response)||void 0===a?void 0:a.msg)||(null===(l=i.response)||void 0===l?void 0:l.msg)||(null===(s=i.response)||void 0===s?void 0:s.details)||eu),r()}},i.onerror=function(){console.error("Status code ".concat(i.status,", error: ").concat(eu)),r()},i.open("GET","https://i18n.ultrafast.io/api/export?grid=".concat(Na)),i.send()}))},ru=function(e){return Jc[e]||e||""};const ou=function(e,t){return LP[t.type]&&LP[t.type](e,t.payload)||e};function iu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function au(e){for(var t,n=1;nr,d=0>o;switch(t){case Ba.RECT:n?(l.width=Math.sqrt(s*s+c*c),l.height=l.width,l.x-=u?l.width-s:0,l.y-=d?l.height-c:0):(l.width=s,l.height=c);break;case Ba.ELLIPSE:n?(l.radiusX=Math.sqrt(s*s+c*c)/2,l.radiusY=l.radiusX,l.x-=u?2*l.radiusX-s:0,l.y-=d?2*l.radiusY-c:0):(l.radiusX=s/2,l.radiusY=c/2),l.offsetX=-l.radiusX,l.offsetY=-l.radiusY;break;case Ba.POLYGON:l.radius=(s+c)/2,l.x-=u?2*l.radius-s:0,l.y-=d?2*l.radius-c:0,l.offsetX=-l.radius,l.offsetY=-l.radius;break;case Ba.LINE:case Ba.ARROW:l.x=i,l.y=a,l.points=[0,0],n?l.points.push(s>=c?r:0,c>s?o:0):l.points=[0,0,r,o];break;default:l.width=s,l.height=c}return l}(e,Hu.name,t);Nu&&Nu.setAttrs(n),Du.setAttrs(n),Hu=Au(Au({},Hu),n)},l=function(e){var t=Cu(n,o());a(Su(t,zu,n),e.shiftKey)},s=function(){n&&Du&&n.destroyChildren()},c=function(r){var s;if(!(1<(null===(s=r.evt.touches)||void 0===s?void 0:s.length))){var c=Cu(n,o());zu.isOutOfCanvas&&(document.removeEventListener("mousemove",l,Ru),document.removeEventListener("touchmove",l,Ru),zu.isOutOfCanvas=!1);var u=Su(c,zu,n);if(Du)a(u,r.evt.shiftKey);else{t.id,t.x,t.y,t.points;var d=g(t,Tu);i(Au(Au({},d),u))}e.setAttrs({isDrawing:!0})}},u=function(){zu.isOutOfCanvas||(document.addEventListener("mousemove",l,Ru),document.addEventListener("touchmove",l,Ru),zu.isOutOfCanvas=!0)},d=function(){var n,o;if(s(),Hu&&(Hu.width>=1&&Hu.height>=1||Hu.radiusX>=1&&Hu.radiusY>=1||null!==(n=Hu.points)&&void 0!==n&&n[2]||null!==(o=Hu.points)&&void 0!==o&&o[3]||Hu.radius>=1)){var i=Hu,a=(i.startedX,i.startedY,i.offsetX,i.offsetY,i.width),f=i.height,h=g(i,Mu);Lu.includes(t.name)||(h.width=a,h.height=f),r(h,!0)}Du=null,Nu=null,Hu=null,e.setAttrs({isDrawing:!1}),e.off("mousemove touchmove",c),e.off("mouseleave touchcancel",u),document.removeEventListener("mouseup",d,Ru),document.removeEventListener("touchend",d,Ru),document.removeEventListener("mouseleave",d,Ru),document.removeEventListener("touchcancel",d,Ru),document.removeEventListener("mousemove",l,Ru),document.removeEventListener("touchmove",l,Ru),zu.isOutOfCanvas=!1},f=function(t){var r;if(t.evt.preventDefault(),!(t.target.attrs.draggable||1<(null===(r=t.evt.touches)||void 0===r?void 0:r.length))){s();var i=Cu(n,o());zu.startedX=i.offsetX,zu.startedY=i.offsetY,zu.isOutOfCanvas=!1,e.on("mousemove touchmove",c),e.on("mouseleave touchcancel",u),document.addEventListener("mouseup",d,Ru),document.addEventListener("touchend",d,Ru),document.addEventListener("mouseleave",d,Ru),document.addEventListener("touchcancel",d,Ru)}};return e.on("mousedown touchstart",f),function(){s(),e.off("mousedown touchstart",f)}};const Fu=function(e,t){var n=2=o?0:0>o&&-90=o&&-90<=o?0:90>>32-t},ud=function(e){var t,n="";for(t=7;0<=t;t--)n+=(15&e>>>4*t).toString(16);return n};const dd=function(e){var t,n,r,o,i,a,l,s,c,u=e,d=Array(80),f=1732584193,h=4023233417,p=2562383102,g=271733878,m=3285377520;u=function(e){for(var t,n=e.replace(/\r\n/g,"\n"),r="",o=0;o(t=n.charCodeAt(o))?r+=String.fromCharCode(t):127t?(r+=String.fromCharCode(192|t>>6),r+=String.fromCharCode(128|63&t)):(r+=String.fromCharCode(224|t>>12),r+=String.fromCharCode(128|63&t>>6),r+=String.fromCharCode(128|63&t));return r}(u);var v=u.length,y=[];for(n=0;n>>29),y.push(4294967295&v<<3),t=0;tn;n++)d[n]=y[t+n];for(n=16;79>=n;n++)d[n]=cd(d[n-3]^d[n-8]^d[n-14]^d[n-16],1);for(o=f,i=h,a=p,l=g,s=m,n=0;19>=n;n++)c=4294967295&cd(o,5)+(i&a|~i&l)+s+d[n]+1518500249,s=l,l=a,a=cd(i,30),i=o,o=c;for(n=20;39>=n;n++)c=4294967295&cd(o,5)+(i^a^l)+s+d[n]+1859775393,s=l,l=a,a=cd(i,30),i=o,o=c;for(n=40;59>=n;n++)c=4294967295&cd(o,5)+(i&a|i&l|a&l)+s+d[n]+2400959708,s=l,l=a,a=cd(i,30),i=o,o=c;for(n=60;79>=n;n++)c=4294967295&cd(o,5)+(i^a^l)+s+d[n]+3395469782,s=l,l=a,a=cd(i,30),i=o,o=c;f=4294967295&f+o,h=4294967295&h+i,p=4294967295&p+a,g=4294967295&g+l,m=4294967295&m+s}return(c=ud(f)+ud(h)+ud(p)+ud(g)+ud(m)).toLowerCase()};var fd=function(e,t,n,r){var o=function(e){return btoa(e).replace(/=*$/g,"")}(e),i=function(e,t){return dd(e).slice(0,t)}(t+o+n,r);return[i?"ci_seal=".concat(i):"",o?"ci_eqs=".concat(o):""].filter((function(e){return e})).join("&")};const hd=function(e,t,n){var r=t||{},o=r.salt,i=r.charCount,a=r.includeParams,l=void 0===a?[]:a,s=!l||0===(null==l?void 0:l.length),c="",u=[],d=[];return e.split("&").forEach((function(e){var t=Jt(e.split("="),1)[0];-1<(null==l?void 0:l.indexOf(t))||s?u.push(e):d.push(e)})),0 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%);}"]),Sf=Je.span.attrs({className:_d(yf,"label")}).withConfig({componentId:"sc-jjink6-4"})((function(e){var t=e.theme,n=e.open,r=void 0!==n&&n,o=e.disabled;return Ae(["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);}"],r?"translateY(-100%) scale(1)":"translateY(-100%) scale(0)",void 0!==o&&o?t.palette[it.AccentPrimaryDisabled]:t.palette[it.LinkStateless])}));const Ef=Ld({Slider:bf,Rail:wf,Track:xf,Thumb:Cf,SliderAnnotation:Je.div.attrs({className:_d(yf,"annotation")}).withConfig({componentId:"sc-jjink6-5"})((function(e){return Ae(["display:flex;justify-content:space-between;margin-top:12px;color:",";"],e.theme.palette[it.TextSecondary])})),LabelTooltip:Sf});var kf=["defaultValue","disabled","disableSwap","hideTrack","hideAnnotation","value","min","max","onChange","onMouseDown","onMouseUp","step","labelTooltip","annotation","components","componentsProps"];function Of(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pf(e){for(var t=1;t2&&B(!0),ee(e,r,o)}else re(e)})),re=mf((function(e){var t=ff(e,V);B(!1),t&&(A(-1),"touchend"===e.type&&D(-1),w&&w(e),V.current=void 0,se())})),oe=mf((function(e){var t=e.changedTouches[0];null!=t&&(V.current=t.identifier);var n=ff(e,V),r=J({finger:n,values:Q}),o=r.newValue,i=r.activeIndex;pf({sliderRef:G,activeIndex:i,setActive:A}),q(o),ee(e,o,i),F.current=0;var a=uf(G.current);a.addEventListener("touchmove",ne),a.addEventListener("touchend",re)})),ie=mf((function(e){var t=Number(e.currentTarget.getAttribute(_f));D(t)})),ae=mf((function(){D(-1)})),le=mf((function(e){if(o)e.preventDefault();else{if(b&&b(e),0!==e.button)return;e.preventDefault();var t=ff(e,V),n=J({finger:t,values:Q}),r=n.newValue,i=n.activeIndex;pf({sliderRef:G,activeIndex:i,setActive:A}),q(r),ee(e,r,i),F.current=0;var a=uf(G.current);a.addEventListener("mousemove",ne),a.addEventListener("mouseup",re)}})),se=(0,h.useCallback)((function(){var e=uf(G.current);e.removeEventListener("mousemove",ne),e.removeEventListener("mouseup",re),e.removeEventListener("touchmove",ne),e.removeEventListener("touchend",re)}),[re,ne]);(0,h.useEffect)((function(){if(G.current)return function(){se()}}),[se,oe]),(0,h.useEffect)((function(){o&&se()}),[o,se]),o&&-1!==j&&A(-1);var ce=lf(K?Q[0]:p,p,v),ue=lf(Q[Q.length-1],p,v)-ce,de=Pf(Pf({},hf[$].offset(ce)),hf[$].leap(ue)),fe=I.rail,he="function"==typeof _.Rail?h.createElement(_.Rail,en({},fe,{style:Pf({},null==fe?void 0:fe.style)})):h.createElement(Ef.Rail,en({},fe,{style:Pf({},null==fe?void 0:fe.style)})),pe=I.track,ge=!s&&("function"==typeof _.Track?h.createElement(_.Track,en({},pe,{style:Pf(Pf({},de),null==pe?void 0:pe.style)})):h.createElement(Ef.Track,en({},pe,{style:Pf(Pf({},de),null==pe?void 0:pe.style)}))),me=I.thumb,ve=_.Thumb||Ef.Thumb,ye=_.LabelTooltip||Ef.LabelTooltip,be=I.labelTooltip,we=O?" ".concat(O):"";return h.createElement(Ef.Slider,en({ref:U,disabled:o,onTouchStart:oe,onMouseDown:le},T),he,ge,Q.map((function(e,t){var n=lf(e,p,v),r=hf[$].offset(n);return h.createElement(h.Fragment,{key:t},h.createElement(ve,en({"data-index":t,onMouseOver:ie,onMouseLeave:ae},me,{style:Pf(Pf({},r),{},{pointerEvents:a&&j!==t?"none":void 0},null==me?void 0:me.style)}),h.createElement("input",{"data-index":t,type:"range",min:p,max:v,value:Q[t],step:C,disabled:o,onChange:te}),h.createElement(ye,{open:(R===t||j===t||"on"===E)&&"off"!==E,disabled:o,style:Pf({},null==be?void 0:be.style)},Q[t],we)))})),!u&&h.createElement(Ef.SliderAnnotation,null,h.createElement("span",null,p,we),h.createElement("span",null,v,we)))}));Lf.defaultProps={annotation:"MB",min:0,max:100,step:1,labelTooltip:vf.Off},Lf.propTypes={defaultValue:v().oneOfType([v().array,v().number]),value:v().oneOfType([v().array,v().number]),min:v().number,max:v().number,onChange:v().func,onMouseDown:v().func,onMouseUp:v().func,step:v().number,annotation:v().string,disabled:v().bool,disableSwap:v().bool,hideTrack:v().bool,hideAnnotation:v().bool,labelTooltip:v().oneOf(rt(vf)),components:v().shape({Rail:v().elementType,Track:v().elementType,Thumb:v().elementType,LabelTooltip:v().elementType}),componentsProps:v().object};const If=Lf;var Tf=Je(If).withConfig({componentId:"sc-1wort0h-0"})(["width:",";max-width:",";user-select:none;padding:0;margin-bottom:",";.SfxSlider-annotation{display:none;}.SfxSlider-thumb{background-color:",";}.SfxSlider-Track{height:2px;color:",";}.SfxSlider-rail{height:2px;background-color:",";}"],(function(e){return e.width||"104px"}),(function(e){return e.width||"104px"}),(function(e){return e.noMargin?"":"16px"}),(function(e){return e.theme.palette[it.AccentStateless]}),(function(e){return e.theme.palette[it.AccentStateless]}),(function(e){return e.theme.palette[it.BordersItem]})),Mf=["onChange"];const jf=function(e){var t=e.onChange,n=g(e,Mf);return h.createElement(Tf,en({annotation:"",onChange:function(e,n){return t?t(n):void 0}},n))};var Af=["color","size"],zf=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Af);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}))}));const Rf=zf;var Df=["color","size"],Nf=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Df);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));const Hf=Nf;var Bf=["color","size"],Ff=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Bf);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}),h.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:r}))}));const Wf=Ff;var Vf=function(e,t){return e||t?bt[it.BackgroundHover]:bt[it.BackgroundStateless]},Gf=function(e,t){return e?bt[it.AccentPrimaryHover]:t?bt[it.TextPlaceholder]:bt[it.TextPrimary]},Uf=function(e,t){return e?bt[it.BordersItem]:t?bt[it.BordersSecondary]:bt[it.BorderPrimaryStateless]},Zf=function(e,t){navigator.clipboard.writeText(e),t(!0)},Xf="text",Yf="password",qf="Input",$f=Je.span.attrs({className:_d(qf,"Icon")}).withConfig({componentId:"sc-150k0cz-0"})((function(e){var t=e.iconClickStart,n=e.iconClickEnd,r=e.disabled,o=e.readOnly,i=e.iconType,a=e.theme.palette;return Ae(["display:flex;color:",";cursor:",";",""],a[it.IconsPrimary],!t&&!n||r||o?"default":"pointer","end"===i&&Ae(["color:",";"],a[it.IconsSecondary]))})),Kf=Je.span.attrs({className:_d(qf,"CopyIcon")}).withConfig({componentId:"sc-150k0cz-1"})((function(e){return Ae(["display:flex;color:",";cursor:pointer;"],e.theme.palette[it.IconsSecondary])})),Qf=Je(Kf).attrs({className:_d(qf,"PasswordIcon")}).withConfig({componentId:"sc-150k0cz-2"})([""]),Jf=Je.div.attrs({className:_d(qf,"Container")}).withConfig({componentId:"sc-150k0cz-3"})((function(){return Ae(["display:block;color:inherit;font-size:inherit;width:100%;min-width:0;margin:0;padding:0;border:0;background-color:transparent;outline:none;"])})),eh=Je.input.attrs({className:_d(qf,"Base")}).withConfig({componentId:"sc-150k0cz-4"})((function(e){var t=e.theme.palette,n=e.isEllipsis;return Ae(["display:block;color:inherit;width:100%;min-width:fit-content;margin:0;padding:0;border:0;background-color:transparent;outline:none;"," &::placeholder{color:",";}"],void 0!==n&&n&&Ae(["text-overflow:ellipsis;"]),t[it.TextPlaceholder])})),th=Je.div.attrs({className:_d(qf,"root")}).withConfig({componentId:"sc-150k0cz-5"})((function(e){var t=e.size,n=void 0===t?Od.Md:t,r=e.error,o=void 0!==r&&r,i=e.fullWidth,a=void 0!==i&&i,l=e.readOnly,s=void 0!==l&&l,c=e.disabled,u=void 0!==c&&c,d=e.isHovering,f=void 0!==d&&d,h=e.isSelectedItems,p=void 0!==h&&h,g=e.theme;return Ae(["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",u?"none":"auto",Vf(s,u),g.shape.borderRadius[st.Md],Uf(s,u),u?g.palette[it.TextPlaceholder]:g.palette[it.TextPrimary],zd[n],p&&"\n height: fit-content;\n\n ".concat(eh," {\n max-width: fit-content;\n min-width: 20px;\n flex-grow: 1;\n width: 40px;\n }\n "),eh,Rd[n],!s&&!u&&Ae(["&:focus-within{background-color:","!important;border:1px solid ",";&:hover{border:1px solid ",";","{color:",";}}}"," &:hover{background-color:",";border:1px solid ",";","{color:",";}}"],g.palette[it.BackgroundSecondary],g.palette[it.AccentStateless],g.palette[it.AccentStateless],$f,g.palette[it.IconsPrimary],f&&Ae(["","{color:",";}"],$f,g.palette[it.IconsPrimaryHover]),g.palette[it.BackgroundStateless],g.palette[it.BordersPrimaryHover],$f,g.palette[it.IconsPrimaryHover]),u&&Ae(["","{color:",";}"],$f,g.palette[it.IconsMuted]),Gf(s,u),o&&Nd)})),nh=Je.span.attrs({className:_d(qf,"ClearIcon")}).withConfig({componentId:"sc-150k0cz-6"})((function(e){return Ae(["display:flex;cursor:pointer;color:",";"],e.theme.palette[it.IconsPrimary])})),rh=Je.div.attrs({className:_d(qf,"NotificationBox")}).withConfig({componentId:"sc-150k0cz-7"})((function(e){var t=e.size,n=void 0===t?Od.Md:t,r=e.theme.palette;return Ae(["display:flex;position:absolute;align-items:center;max-height:34px;right:0px;padding:8px 12px;column-gap:6px;bottom:",";box-shadow:0px 2px 6px ",";background-color:",";border-radius:4px;"],n===Od.Md?"45px":"35px",r[it.LargeShadow],r[it.BackgroundStateless])}));const oh=Ld({Input:th,Container:Jf,Base:eh,Icon:$f,CopyIcon:Kf,PasswordIcon:Qf,ClearIcon:nh,NotificationBox:rh,NotificationIcon:Je.span.attrs({className:_d(qf,"NotificationIcon")}).withConfig({componentId:"sc-150k0cz-8"})((function(e){return Ae(["color:",";"],e.theme.palette[it.IconsPrimary])})),NotificationText:Je.span.attrs({className:_d(qf,"NotificationText")}).withConfig({componentId:"sc-150k0cz-9"})((function(e){var t=e.theme,n=t.palette;return Ae(["white-space:nowrap;",";color:",";"],t.typography.font[lt.TextSmall],n[it.TextPrimary])})),FieldWrapper:Je.div.attrs({className:_d(qf,"fieldWrapper")}).withConfig({componentId:"sc-150k0cz-10"})((function(e){return Ae(["width:100%;height:100%;display:inline-flex;flex-wrap:wrap;gap:8px;max-height:120px;",";::-webkit-scrollbar{display:none;}"],e.isSelectedItems&&"\n overflow-y: auto;\n ")}))});var ih=["inputType","children","iconStart","iconEnd","iconChange","clearIcon","iconClickStart","iconClickEnd","clearIconClick","size","className","style","fullWidth","readOnly","disabled","hideCopyIcon","focusOnMount","focusOnClick","isEllipsis","copyTextMessage","copySuccessIcon","error","renderTags","showPlaceholder"],ah=function(e,t){return e===Od.Md?"start"===t?15:14:"start"===t?13:10},lh=function(e){return e===Od.Md?16:14},sh=kd((function(e,t){var n,r=e.inputType,o=e.children,i=e.iconStart,a=e.iconEnd,l=e.iconChange,s=e.clearIcon,c=e.iconClickStart,u=e.iconClickEnd,d=e.clearIconClick,f=e.size,p=void 0===f?Od.Md:f,m=e.className,v=e.style,y=e.fullWidth,b=e.readOnly,w=e.disabled,x=e.hideCopyIcon,C=void 0!==x&&x,S=e.focusOnMount,E=void 0!==S&&S,k=e.focusOnClick,O=void 0===k||k,P=e.isEllipsis,_=void 0!==P&&P,L=e.copyTextMessage,I=e.copySuccessIcon,T=e.error,M=e.renderTags,j=e.showPlaceholder,A=g(e,ih),z=Jt((0,h.useState)(!1),2),R=z[0],D=z[1],N=Jt((0,h.useState)(!1),2),H=N[0],B=N[1],F=Jt((0,h.useState)(!1),2),W=F[0],V=F[1],G=(0,h.useRef)(null),U=null===(n=A.selectedItems)||void 0===n?void 0:n.length,Z=A.value||U?"":A.placeholder,X=function(){var e;w||b||(null==j||j(!1),null===(e=G.current)||void 0===e||e.focus())};(0,h.useEffect)((function(){E&&X()}),[]),(0,h.useEffect)((function(){setTimeout((function(){return B(!1)}),2e3)}),[H]);var Y,q=function(e,t){w||b||(O&&X(),"start"===t?c&&c(e):"end"===t?u&&u(e):d&&d(e))},$=function(e,t){return e?h.createElement(oh.Icon,{onClick:function(e){return q(e,t)},iconClickStart:c,iconClickEnd:u,iconType:t,disabled:w,readOnly:b},"function"==typeof e?e({size:ah(p,t)}):e):void 0};return h.createElement(oh.Input,{onClick:O?X:void 0,ref:t,size:p,onMouseEnter:function(){setTimeout((function(){D(!0)}),150)},onMouseLeave:function(){setTimeout((function(){D(!1)}),200)},className:m,style:v,readOnly:b,disabled:w,fullWidth:Boolean(y),error:T,clearIcon:s,isHovering:A.isHovering,isSelectedItems:Boolean(U)},$(i,"start"),h.createElement(oh.FieldWrapper,{isSelectedItems:Boolean(U)},M&&M(),h.createElement(oh.Base,en({},A,{placeholder:Z,ref:G,readOnly:Boolean(b),type:!r&&null!=A&&A.type?null==A?void 0:A.type:r!==Yf||W?Xf:Yf,isEllipsis:_}))),(Y=h.createElement(Rf,{size:ah(p,"copy")}),R&&b&&!C?h.createElement(oh.CopyIcon,{onClick:function(){return Zf(A.value,B)}},"function"==typeof Y?Y():Y):void 0),H&&h.createElement(oh.NotificationBox,{size:p},h.createElement(oh.NotificationIcon,null,I),h.createElement(oh.NotificationText,null,L)),w||b||!s?void 0:h.createElement(oh.ClearIcon,{onClick:function(e){return q(e,"clear")}},"function"==typeof s?s({size:ah(p,"clear")}):s),r===Yf&&h.createElement(oh.PasswordIcon,{onClick:function(e){return function(e){e.stopPropagation(),V(!W)}(e)}},W?h.createElement(Wf,{size:lh(p)}):h.createElement(Hf,{size:lh(p)})),$(a,"end"),$(l,""),o&&h.createElement(h.Fragment,null,o))})),ch={size:Od.Md,error:!1,fullWidth:!1,readOnly:!1,disabled:!1,copyTextMessage:"Copied!"};sh.defaultProps=ch;var uh={size:v().oneOf(rt(Od)),iconStart:v().oneOfType([v().node,v().func]),iconEnd:v().oneOfType([v().node,v().func]),iconChange:v().oneOfType([v().node,v().func]),copySuccessIcon:v().oneOfType([v().node,v().func]),clearIcon:v().node,error:v().bool,fullWidth:v().bool,value:v().any,readOnly:v().bool,disabled:v().bool,iconClickStart:v().func,showPlaceholder:v().func,iconClickEnd:v().func,clearIconClick:v().func,focusOnMount:v().bool,focusOnClick:v().bool,copyTextMessage:v().string,inputType:v().string,renderTags:v().func};sh.propTypes=uh;const dh=sh;var fh=Je.div.withConfig({componentId:"sc-1rfxjvn-0"})(["display:flex;width:100%;justify-content:space-between;gap:10px;.SfxSlider-root{min-width:100px;}",""],(function(e){return e.isPhoneScreen&&"\n flex-direction: column;\n\n .SfxSlider-root {\n min-width: 230px;\n }\n "})),hh=Je.div.withConfig({componentId:"sc-1rfxjvn-1"})(["display:flex;flex-direction:column;"]),ph=Je(Xd).withConfig({componentId:"sc-1rfxjvn-2"})(["",";"],(function(e){return e.theme.typography.font[lt.LabelExtraSmallUp]})),gh=Je.div.withConfig({componentId:"sc-1rfxjvn-3"})(["display:flex;align-items:center;"]),mh=Je(dh).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;}"]),vh={brightness:0},yh={width:150,padding:0,margin:0};const bh=function(e){var t,n,r=e.t,o=Jt(gu(li.Filters.Brighten,vh),2),i=o[0],a=o[1],l=function(e){a({brightness:xu(e,-1,1)})};return h.createElement(hh,{className:"FIE_brightness-option-wrapper"},h.createElement(ph,{className:"FIE_brightness-option-label"},r("brightness")),h.createElement(gh,null,h.createElement(jf,{className:"FIE_brightness-option",min:-1,step:.05,max:1,width:"124px",value:null!==(t=i.brightness)&&void 0!==t?t:vh.brightness,onChange:l,style:yh}),h.createElement(mh,{value:null!==(n=i.brightness)&&void 0!==n?n:vh.brightness,onChange:function(e){var t=e.target.value;return l(t)}})))};var wh=["color","size"],xh=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,wh);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));const Ch=function(e,t){return Math.min(e.width/t.width,e.height/t.height)||1};var Sh=["color","size"],Eh=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Sh);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 46 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));var kh=["color","size"],Oh=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,kh);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 46 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));var Ph=n(961);function _h(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Lh(e){return e instanceof _h(e).Element||e instanceof Element}function Ih(e){return e instanceof _h(e).HTMLElement||e instanceof HTMLElement}function Th(e){return"undefined"!=typeof ShadowRoot&&(e instanceof _h(e).ShadowRoot||e instanceof ShadowRoot)}var Mh=Math.max,jh=Math.min,Ah=Math.round;function zh(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Rh(){return!/^((?!chrome|android).)*safari/i.test(zh())}function Dh(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Ih(e)&&(o=e.offsetWidth>0&&Ah(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ah(r.height)/e.offsetHeight||1);var a=(Lh(e)?_h(e):window).visualViewport,l=!Rh()&&n,s=(r.left+(l&&a?a.offsetLeft:0))/o,c=(r.top+(l&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s,x:s,y:c}}function Nh(e){var t=_h(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Hh(e){return e?(e.nodeName||"").toLowerCase():null}function Bh(e){return((Lh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Fh(e){return Dh(Bh(e)).left+Nh(e).scrollLeft}function Wh(e){return _h(e).getComputedStyle(e)}function Vh(e){var t=Wh(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Gh(e,t,n){void 0===n&&(n=!1);var r,o,i=Ih(t),a=Ih(t)&&function(e){var t=e.getBoundingClientRect(),n=Ah(t.width)/e.offsetWidth||1,r=Ah(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),l=Bh(t),s=Dh(e,a,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!n)&&(("body"!==Hh(t)||Vh(l))&&(c=(r=t)!==_h(r)&&Ih(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:Nh(r)),Ih(t)?((u=Dh(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):l&&(u.x=Fh(l))),{x:s.left+c.scrollLeft-u.x,y:s.top+c.scrollTop-u.y,width:s.width,height:s.height}}function Uh(e){var t=Dh(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Zh(e){return"html"===Hh(e)?e:e.assignedSlot||e.parentNode||(Th(e)?e.host:null)||Bh(e)}function Xh(e){return["html","body","#document"].indexOf(Hh(e))>=0?e.ownerDocument.body:Ih(e)&&Vh(e)?e:Xh(Zh(e))}function Yh(e,t){var n;void 0===t&&(t=[]);var r=Xh(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=_h(r),a=o?[i].concat(i.visualViewport||[],Vh(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(Yh(Zh(a)))}function qh(e){return["table","td","th"].indexOf(Hh(e))>=0}function $h(e){return Ih(e)&&"fixed"!==Wh(e).position?e.offsetParent:null}function Kh(e){for(var t=_h(e),n=$h(e);n&&qh(n)&&"static"===Wh(n).position;)n=$h(n);return n&&("html"===Hh(n)||"body"===Hh(n)&&"static"===Wh(n).position)?t:n||function(e){var t=/firefox/i.test(zh());if(/Trident/i.test(zh())&&Ih(e)&&"fixed"===Wh(e).position)return null;var n=Zh(e);for(Th(n)&&(n=n.host);Ih(n)&&["html","body"].indexOf(Hh(n))<0;){var r=Wh(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var Qh="top",Jh="bottom",ep="right",tp="left",np="auto",rp=[Qh,Jh,ep,tp],op="start",ip="end",ap="clippingParents",lp="viewport",sp="popper",cp="reference",up=rp.reduce((function(e,t){return e.concat([t+"-"+op,t+"-"+ip])}),[]),dp=[].concat(rp,[np]).reduce((function(e,t){return e.concat([t,t+"-"+op,t+"-"+ip])}),[]),fp=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function hp(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var pp={placement:"bottom",modifiers:[],strategy:"absolute"};function gp(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function Cp(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?bp(o):null,a=o?wp(o):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(i){case Qh:t={x:l,y:n.y-r.height};break;case Jh:t={x:l,y:n.y+n.height};break;case ep:t={x:n.x+n.width,y:s};break;case tp:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var c=i?xp(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case op:t[c]=t[c]-(n[u]/2-r[u]/2);break;case ip:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var Sp={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ep(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,h=void 0===f?0:f,p=a.y,g=void 0===p?0:p,m="function"==typeof u?u({x:h,y:g}):{x:h,y:g};h=m.x,g=m.y;var v=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=tp,w=Qh,x=window;if(c){var C=Kh(n),S="clientHeight",E="clientWidth";if(C===_h(n)&&"static"!==Wh(C=Bh(n)).position&&"absolute"===l&&(S="scrollHeight",E="scrollWidth"),o===Qh||(o===tp||o===ep)&&i===ip)w=Jh,g-=(d&&C===x&&x.visualViewport?x.visualViewport.height:C[S])-r.height,g*=s?1:-1;if(o===tp||(o===Qh||o===Jh)&&i===ip)b=ep,h-=(d&&C===x&&x.visualViewport?x.visualViewport.width:C[E])-r.width,h*=s?1:-1}var k,O=Object.assign({position:l},c&&Sp),P=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Ah(n*o)/o||0,y:Ah(r*o)/o||0}}({x:h,y:g},_h(n)):{x:h,y:g};return h=P.x,g=P.y,s?Object.assign({},O,((k={})[w]=y?"0":"",k[b]=v?"0":"",k.transform=(x.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",k)):Object.assign({},O,((t={})[w]=y?g+"px":"",t[b]=v?h+"px":"",t.transform="",t))}const kp={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Ih(o)&&Hh(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Ih(r)&&Hh(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};const Op={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=dp.reduce((function(e,n){return e[n]=function(e,t,n){var r=bp(e),o=[tp,Qh].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*o,[tp,ep].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}(n,t.rects,i),e}),{}),l=a[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}};var Pp={left:"right",right:"left",bottom:"top",top:"bottom"};function _p(e){return e.replace(/left|right|bottom|top/g,(function(e){return Pp[e]}))}var Lp={start:"end",end:"start"};function Ip(e){return e.replace(/start|end/g,(function(e){return Lp[e]}))}function Tp(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Th(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Mp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jp(e,t,n){return t===lp?Mp(function(e,t){var n=_h(e),r=Bh(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,s=0;if(o){i=o.width,a=o.height;var c=Rh();(c||!c&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:i,height:a,x:l+Fh(e),y:s}}(e,n)):Lh(t)?function(e,t){var n=Dh(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Mp(function(e){var t,n=Bh(e),r=Nh(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=Mh(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Mh(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+Fh(e),s=-r.scrollTop;return"rtl"===Wh(o||n).direction&&(l+=Mh(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(Bh(e)))}function Ap(e,t,n,r){var o="clippingParents"===t?function(e){var t=Yh(Zh(e)),n=["absolute","fixed"].indexOf(Wh(e).position)>=0&&Ih(e)?Kh(e):e;return Lh(n)?t.filter((function(e){return Lh(e)&&Tp(e,n)&&"body"!==Hh(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],l=i.reduce((function(t,n){var o=jp(e,n,r);return t.top=Mh(o.top,t.top),t.right=jh(o.right,t.right),t.bottom=jh(o.bottom,t.bottom),t.left=Mh(o.left,t.left),t}),jp(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function zp(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Rp(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Dp(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,l=n.boundary,s=void 0===l?ap:l,c=n.rootBoundary,u=void 0===c?lp:c,d=n.elementContext,f=void 0===d?sp:d,h=n.altBoundary,p=void 0!==h&&h,g=n.padding,m=void 0===g?0:g,v=zp("number"!=typeof m?m:Rp(m,rp)),y=f===sp?cp:sp,b=e.rects.popper,w=e.elements[p?y:f],x=Ap(Lh(w)?w:w.contextElement||Bh(e.elements.popper),s,u,a),C=Dh(e.elements.reference),S=Cp({reference:C,element:b,strategy:"absolute",placement:o}),E=Mp(Object.assign({},b,S)),k=f===sp?E:C,O={top:x.top-k.top+v.top,bottom:k.bottom-x.bottom+v.bottom,left:x.left-k.left+v.left,right:k.right-x.right+v.right},P=e.modifiersData.offset;if(f===sp&&P){var _=P[o];Object.keys(O).forEach((function(e){var t=[ep,Jh].indexOf(e)>=0?1:-1,n=[Qh,Jh].indexOf(e)>=0?"y":"x";O[e]+=_[n]*t}))}return O}const Np={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,l=void 0===a||a,s=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,p=void 0===h||h,g=n.allowedAutoPlacements,m=t.options.placement,v=bp(m),y=s||(v===m||!p?[_p(m)]:function(e){if(bp(e)===np)return[];var t=_p(e);return[Ip(e),t,Ip(t)]}(m)),b=[m].concat(y).reduce((function(e,n){return e.concat(bp(n)===np?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,c=void 0===s?dp:s,u=wp(r),d=u?l?up:up.filter((function(e){return wp(e)===u})):rp,f=d.filter((function(e){return c.indexOf(e)>=0}));0===f.length&&(f=d);var h=f.reduce((function(t,n){return t[n]=Dp(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[bp(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:g}):n)}),[]),w=t.rects.reference,x=t.rects.popper,C=new Map,S=!0,E=b[0],k=0;k=0,I=L?"width":"height",T=Dp(t,{placement:O,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),M=L?_?ep:tp:_?Jh:Qh;w[I]>x[I]&&(M=_p(M));var j=_p(M),A=[];if(i&&A.push(T[P]<=0),l&&A.push(T[M]<=0,T[j]<=0),A.every((function(e){return e}))){E=O,S=!1;break}C.set(O,A)}if(S)for(var z=function(e){var t=b.find((function(t){var n=C.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return E=t,"break"},R=p?3:1;R>0;R--){if("break"===z(R))break}t.placement!==E&&(t.modifiersData[r]._skip=!0,t.placement=E,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Hp(e,t,n){return Mh(e,jh(t,n))}const Bp={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,l=void 0!==a&&a,s=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,h=void 0===f||f,p=n.tetherOffset,g=void 0===p?0:p,m=Dp(t,{boundary:s,rootBoundary:c,padding:d,altBoundary:u}),v=bp(t.placement),y=wp(t.placement),b=!y,w=xp(v),x="x"===w?"y":"x",C=t.modifiersData.popperOffsets,S=t.rects.reference,E=t.rects.popper,k="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,O="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_={x:0,y:0};if(C){if(i){var L,I="y"===w?Qh:tp,T="y"===w?Jh:ep,M="y"===w?"height":"width",j=C[w],A=j+m[I],z=j-m[T],R=h?-E[M]/2:0,D=y===op?S[M]:E[M],N=y===op?-E[M]:-S[M],H=t.elements.arrow,B=h&&H?Uh(H):{width:0,height:0},F=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},W=F[I],V=F[T],G=Hp(0,S[M],B[M]),U=b?S[M]/2-R-G-W-O.mainAxis:D-G-W-O.mainAxis,Z=b?-S[M]/2+R+G+V+O.mainAxis:N+G+V+O.mainAxis,X=t.elements.arrow&&Kh(t.elements.arrow),Y=X?"y"===w?X.clientTop||0:X.clientLeft||0:0,q=null!=(L=null==P?void 0:P[w])?L:0,$=j+Z-q,K=Hp(h?jh(A,j+U-q-Y):A,j,h?Mh(z,$):z);C[w]=K,_[w]=K-j}if(l){var Q,J="x"===w?Qh:tp,ee="x"===w?Jh:ep,te=C[x],ne="y"===x?"height":"width",re=te+m[J],oe=te-m[ee],ie=-1!==[Qh,tp].indexOf(v),ae=null!=(Q=null==P?void 0:P[x])?Q:0,le=ie?re:te-S[ne]-E[ne]-ae+O.altAxis,se=ie?te+S[ne]+E[ne]-ae-O.altAxis:oe,ce=h&&ie?function(e,t,n){var r=Hp(e,t,n);return r>n?n:r}(le,te,se):Hp(h?le:re,te,h?se:oe);C[x]=ce,_[x]=ce-te}t.modifiersData[r]=_}},requiresIfExists:["offset"]};const Fp={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=bp(n.placement),s=xp(l),c=[tp,ep].indexOf(l)>=0?"height":"width";if(i&&a){var u=function(e,t){return zp("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Rp(e,rp))}(o.padding,n),d=Uh(i),f="y"===s?Qh:tp,h="y"===s?Jh:ep,p=n.rects.reference[c]+n.rects.reference[s]-a[s]-n.rects.popper[c],g=a[s]-n.rects.reference[s],m=Kh(i),v=m?"y"===s?m.clientHeight||0:m.clientWidth||0:0,y=p/2-g/2,b=u[f],w=v-d[c]-u[h],x=v/2-d[c]/2+y,C=Hp(b,x,w),S=s;n.modifiersData[r]=((t={})[S]=C,t.centerOffset=C-x,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Tp(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Wp(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Vp(e){return[Qh,ep,Jh,tp].some((function(t){return e[t]>=0}))}var Gp=mp({defaultModifiers:[yp,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Cp({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,l=n.roundOffsets,s=void 0===l||l,c={placement:bp(t.placement),variation:wp(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Ep(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ep(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},kp,Op,Np,Bp,Fp,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Dp(t,{elementContext:"reference"}),l=Dp(t,{altBoundary:!0}),s=Wp(a,r),c=Wp(l,o,i),u=Vp(s),d=Vp(c);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});const Up=function(e){var t=(0,h.useRef)(null);return(0,h.useEffect)((function(){var n,r=document.querySelector("#".concat(e)),o=r||function(e){var t=document.createElement("div");return t.setAttribute("id",e),t}(e);return r||(n=o,document.body.append(n)),t.current&&o.append(t.current),function(){t.current&&t.current.remove(),-1===o.childNodes.length&&o.remove()}}),[]),t.current||(t.current=document.createElement("div")),t.current};var Zp,Xp={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"},Yp=(c(Zp={},Xp.Auto,Ae(["top:0px;bottom:0px;left:0px;right:0px;"])),c(Zp,Xp.AutoEnd,Ae(["top:0px;bottom:0px;left:0px;right:0px;"])),c(Zp,Xp.AutoStart,Ae(["top:0px;bottom:0px;left:0px;right:0px;"])),c(Zp,Xp.Right,Ae(["left:-4px;"])),c(Zp,Xp.RightEnd,Ae(["left:-4px;"])),c(Zp,Xp.RightStart,Ae(["left:-4px;"])),c(Zp,Xp.Left,Ae(["right:-4px;"])),c(Zp,Xp.LeftEnd,Ae(["right:-4px;"])),c(Zp,Xp.LeftStart,Ae(["right:-4px;"])),c(Zp,Xp.Top,Ae(["bottom:-4px;"])),c(Zp,Xp.TopEnd,Ae(["bottom:-4px;"])),c(Zp,Xp.TopStart,Ae(["bottom:-4px;"])),c(Zp,Xp.Bottom,Ae(["top:-4px;"])),c(Zp,Xp.BottomEnd,Ae(["top:-4px;"])),c(Zp,Xp.BottomStart,Ae(["top:-4px;"])),Zp),qp="Popper",$p=Je.div.attrs({className:_d(qp,"root")}).withConfig({componentId:"sc-1373tsp-0"})([""]),Kp=Je.div.attrs({className:_d(qp,"wrapper")}).withConfig({componentId:"sc-1373tsp-1"})((function(e){return Ae(["position:relative;z-index:",";"],e.zIndex)})),Qp=Je.div.attrs({className:_d(qp,"arrow")}).withConfig({componentId:"sc-1373tsp-2"})((function(e){var t=e.warning,n=void 0!==t&&t,r=e.position,o=void 0===r?Xp.Right:r,i=e.theme;return Ae(["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;}",""],n?i.palette[it.BackgroundOrange]:i.palette[it.BackgroundGrey],Yp[o])}));const Jp=Ld({Popper:$p,Overlay:Je.div.attrs({className:_d(qp,"Overlay")}).withConfig({componentId:"sc-1373tsp-3"})((function(){return Ae(["position:fixed;right:0;bottom:0;top:0;left:0;background-color:transparent;"])})),Arrow:Qp,PopperWrapper:Kp});var eg=["anchorEl","children","open","warning","position","arrow","popperOptions","onClick","overlay","zIndex","enableUnderlayingEvent","wrapperStyles"];function tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ng(e){for(var t=1;t svg{path{fill:",";}}color:",";"],o.palette[it.ButtonDisabledText],o.palette[it.ButtonDisabledText]))}));const Hm=Ld({MenuItemWrapper:Dm,MenuItem:Nm,MenuPrefix:Je.div.attrs({className:_d(jm,"prefix")}).withConfig({componentId:"sc-rrzye0-5"})((function(){return Ae(["display:flex;"])})),MenuContent:Je.div.attrs({className:_d(jm,"content")}).withConfig({componentId:"sc-rrzye0-6"})((function(){return Ae(["flex-grow:1;line-height:16px;"])})),MenuSuffix:Je.div.attrs({className:_d(jm,"suffix")}).withConfig({componentId:"sc-rrzye0-7"})((function(){return Ae(["display:flex;margin-left:8px;"])})),Label:Rm,Icon:Am,Actions:zm});var Bm=["list","depth","children","disableHover","noOptionsText","disabled","enableScrollIntoView"];function Fm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Wm=kd((function(e,t){var n=e.list,r=e.depth,o=void 0===r?0:r,i=e.children,a=e.disableHover,l=e.noOptionsText,s=e.disabled,u=e.enableScrollIntoView,d=g(e,Bm),f=(0,h.useRef)(null),p=Jt(h.useState(null),2),m=p[0],v=p[1],y=Jt(h.useState([]),2),b=y[0],w=y[1];(0,h.useEffect)((function(){var e;d.active&&u&&(null===(e=f.current)||void 0===e||e.scrollIntoView({behavior:"auto",block:"nearest"}))}),[d.active]);var x=function(e,t,n){var r=b.slice(0);r[n]=t,w(r),v(e.currentTarget)};return n?h.createElement(h.Fragment,null,function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.map((function(e){var r,o=e.subList&&e.subList.length>0;if(b[n]===e.key&&o){var i=n+1;r=h.createElement(mg,en({key:e.key,position:"right",open:Boolean(m),anchorEl:m,enableOverlay:!1},e.subMenuProps),h.createElement(Wm,en({list:e.subList,depth:i},d)))}return"divider"===e.content?h.createElement(Hm.MenuItemWrapper,{divider:!0,key:e.key}):h.createElement(Hm.MenuItemWrapper,en({disabled:!1,key:e.key,onMouseLeave:function(){return function(e){var t=b.slice(0);t[e]="",w(t),v(null)}(n)}},d),h.createElement(Hm.MenuItem,en({},d,{className:e.className,ref:t,active:Boolean(e.active),onClick:e.onClick?function(t){return e.onClick(function(e){for(var t=1;tf.width||r.height>f.height?Ch(f,r):1}})),n()};return h.createElement(h.Fragment,null,h.createElement(xv,null,h.createElement(Kd,{className:"FIE_crop-tool-label FIE_selected-crop-preset-label",isPhoneScreen:v},i(u||"cropTool")),h.createElement(Cv,{className:"FIE_crop-presets-opener-button",color:"link-secondary",size:"lg"},t?h.createElement(Eh,{size:10}):h.createElement(Oh,{size:10}))),h.createElement(mg,{className:"FIE_crop-presets-menu",anchorEl:t,enableOverlay:!0,onClose:n,open:!!t,position:"top",popperOptions:{modifiers:[{name:"offset",options:{offset:[0,4]}}]},maxHeight:"100%"},h.createElement(kv,null,y.map((function(e){var t=e.titleKey,n=e.descriptionKey,r=e.ratio,o=e.width,a=e.height,l=e.groups,s=e.icon,u=e.disableManualResize,f=e.noEffect;return l?h.createElement(Dv,{key:t,titleKey:t,groups:l,Icon:s,theme:g,onItemSelect:b,t:i,disableManualResize:u}):h.createElement(Iv,{key:r,ratio:null!=r?r:gd(o/a),titleKey:t,t:i,description:i(n),Icon:s,isActive:(c||Xa)===(null!=r?r:gd(o/a))&&!d,theme:g,width:o,height:a,onClick:b,disableManualResize:u,noEffect:f})})))))};Nv.defaultProps={anchorEl:null};const Hv=Nv;var Bv=function(e){var t=e.selectTool,n=e.isSelected,r=fu(),o=r.config,i=r.t,a=Jt((0,h.useState)(),2),l=a[0],s=a[1];return h.createElement(ef,{className:"FIE_crop-tool",id:Ba.CROP,Icon:xh,onClick:function(e,n){t(e),s(n.currentTarget)},isSelected:n},o[Ba.CROP].noPresets?h.createElement(Kd,{className:"FIE_crop-tool-label"},i("cropTool")):h.createElement(Hv,{anchorEl:l,onClose:function(){s(null)}}))};Bv.defaultProps={isSelected:!1};const Fv=Bv;var Wv=["color","size"],Vv=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Wv);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}),h.createElement("path",{d:"M35.1066 12.0999L32.6066 7.72486L29.8934 9.2753L32.3934 13.6503L35.1066 12.0999Z",fill:r}),h.createElement("path",{d:"M25.9375 8.50008V12.8751H29.0625V8.50008H25.9375Z",fill:r}),h.createElement("path",{d:"M40.1066 23.9749L37.6066 19.5999L34.8934 21.1503L37.3934 25.5253L40.1066 23.9749Z",fill:r}),h.createElement("path",{d:"M25.9375 20.3751V24.7501H29.0625V20.3751H25.9375Z",fill:r}),h.createElement("path",{d:"M45.1066 32.7249L42.6066 28.3499L39.8934 29.9003L42.3934 34.2753L45.1066 32.7249Z",fill:r}),h.createElement("path",{d:"M25.9375 29.1251V33.5001H29.0625V29.1251H25.9375Z",fill:r}),h.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:r}),h.createElement("path",{d:"M25.9375 37.8751V40.0626C25.9375 40.9255 26.6371 41.6251 27.5 41.6251H30V38.5001H29.0625V37.8751H25.9375Z",fill:r}),h.createElement("path",{d:"M35 41.6251H40V38.5001H35V41.6251Z",fill:r}))}));var Gv={transform:"scaleX(-1)"},Uv=function(e){var t=e.selectTool,n=e.isSelected,r=e.t,o=fu(),i=o.dispatch,a=o.adjustments.isFlippedX,l=td(320),s=(0,h.useMemo)((function(){return{reverseLabelOfCurrXFlipDir:r(a?"unFlipX":"flipX"),reverseIconOfCurrXFlipDir:function(){return h.createElement(Vv,{size:l?20:16,style:a?Gv:void 0})}}}),[a]),c=s.reverseLabelOfCurrXFlipDir,u=s.reverseIconOfCurrXFlipDir,d=(0,h.useCallback)((function(){i({type:bO,payload:{direction:Fa}})}),[]),f=(0,h.useCallback)((function(e){t(e),d()}),[]);return h.createElement(ef,{className:"FIE_flip-x-tool-button",id:Ba.FLIP_X,label:c,Icon:u,onClick:f,isSelected:n})};Uv.defaultProps={isSelected:!1};const Zv=Uv;var Xv=["color","size"],Yv=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Xv);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}),h.createElement("path",{d:"M27.3378 35.1066L31.7128 32.6066L30.1624 29.8933L25.7874 32.3933L27.3378 35.1066Z",fill:r}),h.createElement("path",{d:"M30.9376 25.9375H26.5626L26.5626 29.0625H30.9376L30.9376 25.9375Z",fill:r}),h.createElement("path",{d:"M18.5878 40.1066L22.9628 37.6066L21.4124 34.8933L17.0374 37.3933L18.5878 40.1066Z",fill:r}),h.createElement("path",{d:"M22.1876 25.9375H17.8126V29.0625H22.1876V25.9375Z",fill:r}),h.createElement("path",{d:"M9.83781 45.1066L14.2128 42.6066L12.6624 39.8933L8.28738 42.3933L9.83781 45.1066Z",fill:r}),h.createElement("path",{d:"M13.4376 25.9375H9.0626V29.0625H13.4376V25.9375Z",fill:r}),h.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:r}),h.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:r}),h.createElement("path",{d:"M0.937592 35V40L4.06259 40V35H0.937592Z",fill:r}))}));var qv={transform:"scaleY(-1)"},$v=function(e){var t=e.selectTool,n=e.isSelected,r=e.t,o=fu(),i=o.dispatch,a=o.adjustments.isFlippedY,l=td(320),s=(0,h.useMemo)((function(){return{reverseLabelOfCurrXFlipDir:r(a?"unFlipY":"flipY"),reverseIconOfCurrXFlipDir:function(){return h.createElement(Yv,{size:l?20:16,style:a?qv:void 0})}}}),[a]),c=s.reverseLabelOfCurrXFlipDir,u=s.reverseIconOfCurrXFlipDir,d=(0,h.useCallback)((function(){i({type:bO,payload:{direction:Wa}})}),[]),f=(0,h.useCallback)((function(e){t(e),d()}),[]);return h.createElement(ef,{className:"FIE_flip-y-tool-button",id:Ba.FLIP_Y,label:c,Icon:u,onClick:f,isSelected:n})};$v.defaultProps={isSelected:!1};const Kv=$v;var Qv=["color","size"],Jv=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Qv);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 45 43",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}),h.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:r}),h.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:r}),h.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:r}),h.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:r}),h.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:r}))}));const ey=Jv;var ty=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return h.createElement(ef,{className:"FIE_rotate-tool-button",id:Ba.ROTATE,label:r("rotateTool"),Icon:Jv,onClick:t,isSelected:n})};ty.defaultProps={isSelected:!1};const ny=ty;var ry=["color","size"],oy=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,ry);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.createElement("g",{clipPath:"url(#clip0)"},h.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:r}),h.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:r}),h.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:r}),h.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:r})),h.createElement("defs",null,h.createElement("rect",{width:"50",height:"50",fill:"white",transform:"translate(0.275391)"})))}));const iy=oy;var ay=["color","size"],ly=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,ay);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 52 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}))}));var sy="RotationSlider";const cy=Ld({RotationSliderList:Je.ul.attrs({className:_d(sy,"list")}).withConfig({componentId:"sc-1xuruq0-0"})(["display:flex;align-items:center;position:relative;padding:0;width:100%;list-style:none;"]),RotationSliderBigDot:Je.li.attrs({className:_d(sy,"big-dot")}).withConfig({componentId:"sc-1xuruq0-1"})((function(e){return Ae(["width:8px;height:8px;border-radius:50%;background-color:",";cursor:pointer;"],e.theme.palette[it.LinkPrimary])})),RotationSliderSmallDotWrapper:Je.div.attrs({className:_d(sy,"small-dot-wrapper")}).withConfig({componentId:"sc-1xuruq0-2"})(["padding:2px;"]),RotationSliderSmallDot:Je.li.attrs({className:_d(sy,"small-dot")}).withConfig({componentId:"sc-1xuruq0-3"})((function(e){return Ae(["width:2px;height:2px;border-radius:50%;background-color:",";cursor:pointer;"],e.theme.palette[it.LinkPrimary])})),RotationSliderControl:Je.span.attrs({className:_d(sy,"control")}).withConfig({componentId:"sc-1xuruq0-4"})((function(e){return Ae(["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.theme.palette[it.LinkActive])})),RotationSliderMark:Je.div.attrs({className:_d(sy,"mark")}).withConfig({componentId:"sc-1xuruq0-5"})(["padding:4px;"]),RotationSliderMarkText:Je.span.attrs({className:_d(sy,"mark-text")}).withConfig({componentId:"sc-1xuruq0-6"})((function(e){return Ae(["position:absolute;top:20px;font-size:14px;transform:translateX(-10%);color:",";"],e.theme.palette[it.TextPrimary])}))});var uy=["min","max","angle","onChange","onMouseDown","onMouseUp","step","labelTooltipOptions","annotation","hideMarkText","showCurrentMarkText","value","railProps","trackProps","thumbProps","labelTooltipProps","markStyles","markTextStyles"];function dy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fy(e){for(var t=1;ti?i:xBy[e]?By[e]:+t))};return h.createElement(fh,{isPhoneScreen:Wy},h.createElement(hh,{className:"FIE_hue-option-wrapper"},h.createElement(ph,{className:"FIE_hue-option-label"},l("hue")),h.createElement(gh,null,h.createElement(jf,{className:"FIE_hue-option",min:0,step:1,max:259,value:null!==(t=u.hue)&&void 0!==t?t:Hy.hue,onChange:function(e){return f("hue",e)},style:Fy}),h.createElement(mh,{value:null!==(n=u.hue)&&void 0!==n?n:Hy.hue,onChange:function(e){var t=e.target.value;return f("hue",t)}}))),h.createElement(hh,{className:"FIE_saturation-option-wrapper"},h.createElement(ph,{className:"FIE_saturation-option-label"},l("saturation")),h.createElement(gh,null,h.createElement(jf,{className:"FIE_saturation-option",min:-2,step:.5,max:10,value:null!==(r=u.saturation)&&void 0!==r?r:Hy.saturation,onChange:function(e){return f("saturation",e)},style:Fy}),h.createElement(mh,{value:null!==(o=u.saturation)&&void 0!==o?o:Hy.saturation,onChange:function(e){var t=e.target.value;return f("saturation",t)}}))),h.createElement(hh,{className:"FIE_value-option-wrapper"},h.createElement(ph,{className:"FIE_value-option-label"},l("value")),h.createElement(gh,null,h.createElement(jf,{className:"FIE_value-option",min:-2,step:.1,max:2,value:null!==(i=u.value)&&void 0!==i?i:Hy.value,onChange:function(e){return f("value",e)},style:Fy}),h.createElement(mh,{value:null!==(a=u.value)&&void 0!==a?a:Hy.value,onChange:function(e){var t=e.target.value;return f("value",t)}}))))};var Gy=["color","size"],Uy=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Gy);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}))}));var Zy=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return h.createElement(ef,{className:"FIE_blur-tool-button",id:Ba.BLUR,label:r("blurTool"),Icon:Uy,onClick:t,isSelected:n})};Zy.defaultProps={isSelected:!1};const Xy=Zy;var Yy={blurRadius:0},qy={width:150,padding:0,margin:0};const $y=function(e){var t,n,r=e.t,o=Jt(gu(li.Filters.Blur,Yy),2),i=o[0],a=o[1],l=function(e){a({blurRadius:xu(e,0,100)})};return h.createElement(hh,{className:"FIE_blur-option-wrapper"},h.createElement(ph,{className:"FIE_blur-option-label"},r("blur")),h.createElement(gh,null,h.createElement(jf,{className:"FIE_blur-option",min:0,max:100,width:"124px",value:null!==(t=i.blurRadius)&&void 0!==t?t:Yy.blurRadius,onChange:l,style:qy}),h.createElement(mh,{value:null!==(n=i.blurRadius)&&void 0!==n?n:Yy.blurRadius,onChange:function(e){var t=e.target.value;return l(t)}})))};var Ky=["color","size"],Qy=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Ky);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));var Jy=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return h.createElement(ef,{className:"FIE_warmth-tool-button",id:Ba.WARMTH,label:r("warmthTool"),Icon:Qy,onClick:t,isSelected:n})};Jy.defaultProps={isSelected:!1};const eb=Jy;var tb={warmth:0},nb={width:150,padding:0,margin:0};const rb=function(e){var t,n,r=e.t,o=Jt(gu(wc,tb),2),i=o[0],a=o[1],l=function(e){a({warmth:xu(e,0,200)})};return h.createElement(hh,{className:"FIE_warmth-option-wrapper"},h.createElement(ph,{className:"FIE_warmth-option-label"},r("warmthTool")),h.createElement(gh,null,h.createElement(jf,{className:"FIE_warmth-option",min:0,max:200,width:"124px",value:null!==(t=i.warmth)&&void 0!==t?t:tb.warmth,onChange:l,style:nb}),h.createElement(mh,{value:null!==(n=i.warmth)&&void 0!==n?n:tb.warmth,onChange:function(e){var t=e.target.value;return l(t)}})))};var ob=["color","size"],ib=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,ob);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 28 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));const ab=ib;var lb=["color","size"],sb=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,lb);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 28 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));var cb=Je.div.withConfig({componentId:"sc-1nr0bka-0"})(["max-width:680px;min-width:150px;position:relative;overflow:hidden;touch-action:pan-y pinch-zoom;"]),ub=Je.ul.withConfig({componentId:"sc-1nr0bka-1"})(["padding:0;margin:0;white-space:nowrap;overflow:hidden;"]),db=Je.li.withConfig({componentId:"sc-1nr0bka-2"})(["padding:4px;display:inline-block;list-style-type:none;user-select:none;"]),fb=Ae(["position:absolute;top:0;height:100%;width:60px;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:1;svg{color:",";}"],(function(e){return e.theme.palette[it.IconsSecondary]})),hb=Je.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% );"],fb),pb=Je.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% );"],fb),gb=function(e){var t=e.children,n=e.style,r=e.className,o=(0,h.useRef)(!1),i=(0,h.useRef)(),a=Jt(ed(),1)[0],l=Jt((0,h.useState)(!1),2),s=l[0],c=l[1],u=Jt((0,h.useState)(!1),2),d=u[0],f=u[1],p=h.Children.toArray(t),g=function(){if(i.current){var e=i.current,t=e.scrollWidth,n=e.offsetWidth,r=e.scrollLeft,o=Math.round(t-n),a=Math.round(o-r);c(0c,d=u?60:45*c,f=u?60/c:45;return h.createElement(vb,{className:"FIE_filters-item",onClick:l,"aria-selected":o},h.createElement(yb,{className:"FIE_filters-item-preview",width:60,height:45},h.createElement(Ea,{onTap:l},h.createElement(Pa,{image:i,filters:n?[n]:[],width:d,height:f,x:-(d-60)/2,y:-(f-45)/2,ref:a}))),h.createElement(bb,{className:"FIE_filters-item-label"},t))};wb.defaultProps={filterFn:void 0};const xb=(0,h.memo)(wb);var Cb=li.Filters,Sb=[{label:"Original",filterFn:null},{label:"Invert",filterFn:Cb.Invert},{label:"Black & White",filterFn:Cl},{label:"Sepia",filterFn:Cb.Sepia},{label:"Solarize",filterFn:Cb.Solarize},{label:"Clarendon",filterFn:El},{label:"Gingham",filterFn:Ol},{label:"Moon",filterFn:_l},{label:"Lark",filterFn:Tl},{label:"Reyes",filterFn:jl},{label:"Juno",filterFn:Rl},{label:"Slumber",filterFn:Nl},{label:"Crema",filterFn:Fl},{label:"Ludwig",filterFn:Vl},{label:"Aden",filterFn:Zl},{label:"Perpetua",filterFn:ql},{label:"Amaro",filterFn:Kl},{label:"Mayfair",filterFn:es},{label:"Rise",filterFn:rs},{label:"Hudson",filterFn:as},{label:"Valencia",filterFn:cs},{label:"X-Pro II",filterFn:fs},{label:"Sierra",filterFn:ps},{label:"Willow",filterFn:vs},{label:"Lo-Fi",filterFn:bs},{label:"Inkwell",filterFn:Cb.Grayscale},{label:"Hefe",filterFn:xs},{label:"Nashville",filterFn:Es},{label:"Stinson",filterFn:Os},{label:"Vesper",filterFn:Ls},{label:"Earlybird",filterFn:Ms},{label:"Brannan",filterFn:zs},{label:"Sutro",filterFn:Ds},{label:"Toaster",filterFn:Bs},{label:"Walden",filterFn:Vs},{label:"1977",filterFn:Zs},{label:"Kelvin",filterFn:$s},{label:"Maven",filterFn:Js},{label:"Ginza",filterFn:tc},{label:"Skyline",filterFn:rc},{label:"Dogpatch",filterFn:ic},{label:"Brooklyn",filterFn:sc},{label:"Helena",filterFn:dc},{label:"Ashby",filterFn:pc},{label:"Charmes",filterFn:vc}],Eb={maxWidth:"100%",width:"100%"};const kb=function(){var e=fu().originalImage,t=Jt(mu(),2),n=t[0],r=t[1];return h.createElement(mb,{className:"FIE_filters",style:Eb},Sb.map((function(t){return h.createElement(xb,{key:t.label,filterLabel:t.label,filterFn:t.filterFn,applyFilter:r,isActive:n===t.filterFn,image:e})})))};var Ob=["color","size"],Pb=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Ob);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));const _b=Pb;var Lb=function(e){var t=e.selectTool,n=e.isSelected,r=e.t;return h.createElement(ef,{className:"FIE_text-tool-button",id:Ba.TEXT,label:r("textTool"),Icon:Pb,onClick:t,isSelected:n})};Lb.defaultProps={isSelected:!1};const Ib=Lb;var Tb=["color","size"],Mb=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Tb);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));const jb=Mb;var Ab=["color","size"],zb=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Ab);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 48L26.9931 2H31.2019L23.2087 48H19Z",fill:r}))}));const Rb=zb;var Db=["color","size"],Nb=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Db);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.createElement("path",{d:"M0.166672 0.166664H8.50001V8.5H0.166672V0.166664Z",fill:r}),h.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:r}))}));const Hb=Nb;var Bb=["color","size"],Fb=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Bb);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));const Wb=Fb;var Vb=["color","size"],Gb=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Vb);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}))}));const Ub=Gb;var Zb=["color","size"],Xb=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Zb);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.createElement("path",{d:"M9.25008 9.24878H11.7501V10.9675H10.9688V11.7488H9.25008V9.24878Z",fill:r}),h.createElement("path",{d:"M9.25008 34.2488V36.7488H11.7501V35.03H10.9688V34.2488H9.25008Z",fill:r}),h.createElement("path",{d:"M34.2501 36.7488H36.7501V34.2488H35.0313V35.03H34.2501V36.7488Z",fill:r}),h.createElement("path",{d:"M36.7501 11.7488V9.24878H34.2501V10.9675H35.0313V11.7488H36.7501Z",fill:r}),h.createElement("path",{d:"M14.4063 9.24878V11.7488H17.8438V9.24878H14.4063Z",fill:r}),h.createElement("path",{d:"M21.2813 9.24878V11.7488H24.7188V9.24878H21.2813Z",fill:r}),h.createElement("path",{d:"M28.1563 9.24878V11.7488H31.5938V9.24878H28.1563Z",fill:r}),h.createElement("path",{d:"M36.7501 14.405H34.2501V17.8425H36.7501V14.405Z",fill:r}),h.createElement("path",{d:"M36.7501 21.28H34.2501V24.7175H36.7501V21.28Z",fill:r}),h.createElement("path",{d:"M36.7501 28.155H34.2501V31.5925H36.7501V28.155Z",fill:r}),h.createElement("path",{d:"M31.5938 36.7488V34.2488H28.1563V36.7488H31.5938Z",fill:r}),h.createElement("path",{d:"M24.7188 36.7488V34.2488H21.2813V36.7488H24.7188Z",fill:r}),h.createElement("path",{d:"M17.8438 36.7488V34.2488H14.4063V36.7488H17.8438Z",fill:r}),h.createElement("path",{d:"M9.25008 31.5925H11.7501V28.155H9.25008V31.5925Z",fill:r}),h.createElement("path",{d:"M9.25008 24.7175H11.7501V21.28H9.25008V24.7175Z",fill:r}),h.createElement("path",{d:"M9.25008 17.8425H11.7501V14.405H9.25008V17.8425Z",fill:r}),h.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:r}),h.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:r}))}));const Yb=Xb;var qb=Je.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(e){return e.isPhoneScreen&&"\n max-width: 315px;\n padding: 0;\n "}),(function(e){return e.theme.palette[it.IconsPrimary]})),$b=Je.div.withConfig({componentId:"sc-qvjmv1-1"})(["display:flex;flex-wrap:wrap;margin-left:-4px;gap:4px;.FIE_annotation-option-triggerer{padding:6px;}"]),Kb=Je.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(e){return e.theme.palette["bg-secondary"]}),(function(e){return e.position&&"\n display: grid;\n grid-template-columns: repeat(4, auto);\n padding: 0;\n margin-top: 8px;\n box-shadow: 0px 1px 2px ".concat((function(e){return e.theme.palette["light-shadow"]}),";\n ")}),(function(e){return e.disablePadding&&"\n padding: 0;\n "})),Qb=Je.div.withConfig({componentId:"sc-qvjmv1-3"})(["display:flex;align-items:center;gap:8px;",""],(function(e){return e.preventFlex&&"\n display: block;\n \n label {\n margin-bottom: 8px;\n }\n "})),Jb=Je.div.withConfig({componentId:"sc-qvjmv1-4"})(["display:flex;align-items:center;justify-content:space-between;"]),ew=Je.div.withConfig({componentId:"sc-qvjmv1-5"})(["&:not(:first-child){margin-left:12px;}"]),tw=Je.div.withConfig({componentId:"sc-qvjmv1-6"})((function(e){var t=e.theme,n=e.addThinBorder,r=e.secondaryIconColor,o=e.active,i=e.watermarkTool;return"\n cursor: pointer;\n padding: ".concat(i?"6px":"8px 12px",";\n border-radius: 2px;\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 6px;\n\n svg {\n vertical-align: middle;\n margin: 0 auto;\n }\n\n ").concat(n?"border: 0.5px solid ".concat(t.palette["borders-secondary"],";\n padding: 8px 8px;"):"",";\n color: ").concat(r?t.palette[it.IconsSecondary]:"",";\n\n ").concat(o&&"\n border-radius: 4px;\n border-color: ".concat(t.palette[it.AccentStateless],";\n background-color: ").concat(t.palette[it.BackgroundActive],";\n\n * {\n color: ").concat(t.palette[it.AccentStateless],";\n }\n "),"\n\n :hover {\n background: ").concat(t.palette["bg-primary-active"],";\n }\n ")})),nw=Je(Xd).withConfig({componentId:"sc-qvjmv1-7"})(["color:",";"],(function(e){return e.theme.palette[it.TextPrimary]}));const rw=function(e){var t=e.annotation,n=e.updateAnnotation,r=e.t,o=t.opacity,i=Math.round(100*o);return h.createElement(Kb,{disablePadding:!0},h.createElement(Xd,null,r("transparency")),h.createElement(Qb,null,h.createElement(jf,{annotation:"%",onChange:function(e){n({opacity:xu(e/100,0,1)})},value:i,noMargin:!0}),h.createElement(nw,null,"".concat(i,"%"))))};function ow(e){if(null==e)throw new TypeError("Cannot destructure "+e)}var iw=["color","size"],aw=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,iw);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));const lw=aw;var sw,cw={Sm:"sm",Md:"md",Lg:"lg"},uw=(c(sw={},cw.Sm,Ae(["padding:6px;"])),c(sw,cw.Md,Ae(["padding:9px;"])),c(sw,cw.Lg,Ae(["padding:12px;"])),sw),dw=Je.button.attrs({className:_d("CrossButton","root")}).withConfig({componentId:"sc-ygfku-0"})((function(e){var t=e.size,n=void 0===t?cw.Lg:t,r=e.theme;return Ae(["display:flex;justify-content:center;align-items:center;cursor:pointer;"," color:",";background:transparent;border:none;transition:all 100ms ease-out;&:hover{color:",";background:",";;}&:active{color:",";background:",";}"],uw[n],r.palette[it.IconsSecondary],r.palette[it.IconsPrimary],r.palette[it.BackgroundHover],r.palette[it.IconsPrimaryHover],r.palette[it.BackgroundActive])}));const fw=Ld({CrossButton:dw});var hw=kd((function(e,t){var n,r=en({},(ow(e),e));return h.createElement(fw.CrossButton,en({},r,{ref:t}),h.createElement(lw,{size:(n=r.size,n===cw.Lg?16:12)}))}));hw.defaultProps={size:cw.Lg},hw.propTypes={size:v().oneOf(rt(cw))};const pw=hw;var gw={Default:"default",WithIcon:"with-icon"},mw="ModalTitle",vw=Je.div.attrs({className:_d(mw,"Icon")}).withConfig({componentId:"sc-l3tf49-0"})((function(e){var t=e.theme.palette;return Ae(["display:flex;margin-bottom:8px;padding:14.5px;border-radius:50%;background:",";color:",";"],t[it.Accent_1_2_Opacity],t[it.AccentStateless])})),yw=Je.div.attrs({className:_d(mw,"LabelPrimary")}).withConfig({componentId:"sc-l3tf49-1"})((function(e){var t=e.variant;return Ae(["font-size:18px;line-height:27px;font-weight:",";"],(void 0===t?gw.Default:t)===gw.Default?400:500)})),bw=Je.div.attrs({className:_d(mw,"LabelSecondary")}).withConfig({componentId:"sc-l3tf49-2"})(["font-size:12px;line-height:14px;margin-top:4px;"]),ww=Je.div.attrs({className:_d(mw,"Close")}).withConfig({componentId:"sc-l3tf49-3"})((function(e){var t=e.variant,n=void 0===t?gw.Default:t,r=e.theme.palette;return Ae(["position:absolute;display:flex;top:","px;right:","px;color:",";&:hover{color:",";}cursor:pointer;"],n===gw.WithIcon?2:8,n===gw.WithIcon?2:8,r[it.IconsSecondary],r[it.AccentPrimary])}));const xw=Ld({ModalTitle:Je.div.attrs({className:_d(mw,"root")}).withConfig({componentId:"sc-l3tf49-4"})((function(e){var t=e.variant,n=void 0===t?gw.Default:t,r=e.theme,o=r.palette,i=r.shape.borderRadius;return Ae(["position:relative;color:",";border-radius:"," "," 0px 0px;"," "," ",""],o[it.TextPrimary],i[st.Md],i[st.Md],(function(){return Ae(["padding:","px ","px ","px ","px;"],n===gw.WithIcon?26:14,n===gw.WithIcon?18:40,n===gw.WithIcon?12:14,18)}),n===gw.Default&&Ae(["background:",";border-bottom:1px solid ",";"],o[it.BackgroundPrimary],o[it.BordersSecondary]),n===gw.WithIcon&&Ae(["display:flex;align-items:center;flex-direction:column;"]))})),LabelPrimary:yw,LabelSecondary:bw,Close:ww,Icon:vw});var Cw=["secondary","onClose"],Sw=kd((function(e,t){var n=e.secondary,r=e.onClose,o=g(e,Cw);return h.createElement(xw.ModalTitle,en({},o,{ref:t}),o.icon&&h.createElement(xw.Icon,{iconShadow:Boolean(o.iconShadow)},o.icon),h.createElement(xw.LabelPrimary,o,o.primary),o.variant===gw.WithIcon&&n&&h.createElement(xw.LabelSecondary,null,n),h.createElement(xw.Close,{variant:o.variant},h.createElement(pw,{size:"lg",onClick:r})))}));Sw.defaultProps={iconShadow:!0,variant:gw.Default},Sw.propTypes={primary:v().node.isRequired,secondary:v().node,icon:v().node,iconShadow:v().bool,onClose:v().func,variant:v().oneOf(rt(gw))},Sw.displayName="ModalTitle";const Ew=Sw;const kw=Ld({ModalContent:Je.div.attrs({className:_d("ModalContent","root")}).withConfig({componentId:"sc-1ng1w0v-0"})((function(){return Ae(["position:relative;padding:12px 24px 0px;"])}))});var Ow=["children"],Pw=kd((function(e,t){var n=e.children,r=g(e,Ow);return h.createElement(kw.ModalContent,en({},r,{ref:t}),n)}));Pw.defaultProps={},Pw.propTypes={children:v().node.isRequired},Pw.displayName="ModalContent";const _w=Pw;var Lw=["color","size"],Iw=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Lw);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}),h.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:r}))}));const Tw=Iw;var Mw=["color","size"],jw=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Mw);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));var Aw=["color","size"],zw=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Aw);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));const Rw=zw;var Dw=["children"],Nw=kd((function(e,t){var n=e.children,r=g(e,Dw);return h.createElement(Hm.Label,en({},r,{ref:t}),n)}));Nw.displayName="MenuItemLabel";const Hw=Nw;var Bw=["children"],Fw=kd((function(e,t){var n=e.children,r=g(e,Bw);return h.createElement(Hm.Actions,en({},r,{ref:t}),n&&"function"==typeof n?n({size:r.size}):n)}));Fw.displayName="MenuItemActions",Fw.defaultProps={size:Tm.Md},Fw.propTypes={size:v().oneOf(rt(Tm)),children:v().oneOfType([v().node,v().func]).isRequired};const Ww=Fw;var Vw="Select",Gw=Je.span.attrs({className:_d(Vw,"Icon")}).withConfig({componentId:"sc-mfrapg-0"})((function(e){var t=e.theme.palette,n=e.size;return Ae(["display:flex;flex-shrink:0;color:",";padding:",";margin-left:6px;"],t[it.IconsPrimary],n===Tm.Md?"2.5px":"2px")})),Uw=Je.span.attrs({className:_d(Vw,"tickIcon")}).withConfig({componentId:"sc-mfrapg-1"})((function(e){return Ae(["color:",";"],e.theme.palette[it.AccentStateless])})),Zw=Je.div.attrs({className:_d(Vw,"Container")}).withConfig({componentId:"sc-mfrapg-2"})((function(e){var t=e.fullWidth;return Ae(["position:relative;display:inline-flex;",""],void 0!==t&&t?"width: 100%":"")})),Xw=Je(oh.Input).attrs({className:_d(Vw,"root")}).withConfig({componentId:"sc-mfrapg-3"})((function(e){var t=e.theme.palette,n=e.disabled,r=e.readOnly,o=e.size,i=void 0===o?"sm":o;return Ae(["cursor:",";user-select:none;background:",";",";"],n||r?"default":"pointer",n?t[it.BackgroundHover]:t[it.BackgroundStateless],Rd[i])})),Yw=Je.label.attrs({className:_d(Vw,"Label")}).withConfig({componentId:"sc-mfrapg-4"})(["flex-grow:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;"]),qw=Je.span.attrs({className:_d(Vw,"Placeholder")}).withConfig({componentId:"sc-mfrapg-5"})((function(e){var t=e.theme.palette,n=e.size;return Ae(["width:100%;color:",";margin-right:","px;"],t[it.TextPlaceholder],n===Tm.Md?10:6)}));const $w=Ld({Container:Zw,Select:Xw,Label:Yw,Icon:Gw,TickIcon:Uw,Input:Je.input.attrs({className:_d(Vw,"Input"),"aria-hidden":"true",tabindex:"-1"}).withConfig({componentId:"sc-mfrapg-6"})(["left:0;width:100%;bottom:0;opacity:0;position:absolute;pointer-events:none;box-sizing:border-box;"]),Placeholder:qw});function Kw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qw=function(e){return e===Od.Md?11:10},Jw=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=h.createElement(Hw,null,e);if(t&&e){var i=h.createElement(Ww,null,h.createElement($w.TickIcon,null,h.createElement(zw,{size:Qw(n)})));if(1===h.Children.count(e))return h.createElement(h.Fragment,null,o,!r&&i);if(h.Children.count(e)>1&&!h.Children.toArray(e).some((function(e){var t;return"MenuItemActions"===(null==e||null===(t=e.type)||void 0===t?void 0:t.displayName)})))return h.createElement(h.Fragment,null,e,i)}return o},ex=function e(t){var n=t.props?t.props.children:t;return Array.isArray(n)?n.map((function(t){return e(t)})).join(" "):"object"===a(n)?e(n.props.children):n},tx=function(e){var t=e.value,n=e.multiple,r=void 0!==n&&n,o=e.children,i=e.showSelectionKey,a=void 0!==i&&i,l=[];h.Children.forEach(o,(function(e){h.isValidElement(e)&&("MenuItem"===(null==e?void 0:e.type).displayName&&Boolean(e.props)&&l.push(function(e){for(var t=1;t0?s.map((function(e){return function(e,t){if(e&&e.children){for(var n=t?e.value:e.children;"string"!=typeof n;)n=Array.isArray(n)?ex(n[1]):ex(n);return n}}(e,a)})).join(", "):Array.isArray(t)?t.join(", "):t},nx=["children","size","error","multiple","onChange","value","fullWidth","selectProps","MenuProps","readOnly","disabled","scroll","placeholder","showSelectionKey","hideMenuItemsActions","renderLabel","onRequestClose"],rx=kd((function(e,t){var n,r=e.children,o=e.size,i=e.error,a=e.multiple,l=e.onChange,s=e.value,c=e.fullWidth,u=e.selectProps,d=e.MenuProps,f=e.readOnly,p=e.disabled,m=e.scroll,v=void 0===m||m,y=e.placeholder,b=e.showSelectionKey,w=e.hideMenuItemsActions,x=e.renderLabel,C=e.onRequestClose,S=g(e,nx),E=Jt((0,h.useState)(void 0),2),k=E[0],O=E[1],P=Boolean(k),_=Array.isArray(s)?!!s.length:!(null==s||null===(n=s.toString())||void 0===n||!n.length),L=function(){C&&C(),O(void 0)};return h.createElement($w.Container,{ref:t,fullWidth:Boolean(c)},h.createElement($w.Select,en({},S,{disabled:p,size:o,error:i,fullWidth:Boolean(c),readOnly:f,showSelectionKey:b,onClick:f||p?void 0:function(e){return O(e.currentTarget)}}),_&&h.createElement($w.Label,null,"function"==typeof x?x(s):tx({value:s,multiple:a,children:r,showSelectionKey:b})),!_&&h.createElement($w.Placeholder,{size:o},y),h.createElement($w.Icon,{size:o},h.createElement(tv,{type:P?"top":"bottom",IconProps:{size:o===Tm.Md?11:10}})),h.createElement($w.Input,u)),h.createElement(mg,en({onClose:L,scroll:v,open:P,anchorEl:k},d),h.Children.map(r,(function(e){return function(e,t){var n,r,o,i,a=t.value,l=t.multiple,s=void 0!==l&&l,c=t.size,u=void 0===c?Od.Md:c,d=t.hideMenuItemsActions,f=void 0!==d&&d,p=t.onClose,g=t.onChange;if(!h.isValidElement(e))return e;if("MenuItem"!==(null===(n=e.type)||void 0===n?void 0:n.displayName))return h.cloneElement(e);var m=null==e||null===(r=e.props)||void 0===r?void 0:r.value,v=s?Array.isArray(a)?a:[]:[a],y=v.length>0&&v.includes(m),b=null==e||null===(o=e.props)||void 0===o?void 0:o.disabled;return h.cloneElement(e,{active:y,size:u,children:Jw(null==e||null===(i=e.props)||void 0===i?void 0:i.children,y,u,f),onClick:function(){var e;if(s||"function"!=typeof p||p(),"function"==typeof g&&!b&&null!=m&&null!==(e=m.toString())&&void 0!==e&&e.length){var t=m;if(s){var n=(t=$t(Array.isArray(a)?a:[])).indexOf(m);n>-1?t.splice(n,1):t.push(m)}g(t)}}})}(e,{value:s,multiple:a,size:o,hideMenuItemsActions:w,onClose:L,onChange:f||p?void 0:l})}))))})),ox={size:Od.Md,error:!1,multiple:!1,fullWidth:!1,readOnly:!1,disabled:!1,scroll:!0,hideMenuItemsActions:!1};rx.defaultProps=ox;var ix=v().oneOfType([v().string,v().number,v().oneOf([null])]),ax={size:v().oneOf(rt(Od)),error:v().bool,multiple:v().bool,fullWidth:v().bool,children:v().oneOfType([v().element,v().arrayOf(v().element)]),value:v().oneOfType([v().string,v().number,v().oneOf([null]),v().arrayOf(ix)]),onChange:v().func,MenuProps:v().exact(gg),selectProps:v().object,readOnly:v().bool,disabled:v().bool,hideMenuItemsActions:v().bool,showSelectionKey:v().bool,scroll:v().bool,renderLabel:v().func,onRequestClose:v().func};rx.propTypes=ax;const lx=rx;const sx=function(e,t,n){var r=function(t){var n;"function"==typeof e&&e((null===(n=t.touches)||void 0===n?void 0:n[0])||t)},o=function e(t){var o;(document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",e),document.removeEventListener("mouseleave",e),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",e),document.removeEventListener("touchcancel",e),"function"==typeof n)&&n((null===(o=t.touches)||void 0===o?void 0:o[0])||t)},i=function(e){var n;(document.addEventListener("mousemove",r),document.addEventListener("mouseup",o),document.addEventListener("mouseleave",o),document.addEventListener("touchmove",r),document.addEventListener("touchend",o),document.addEventListener("touchcancel",o),"function"==typeof t)&&t((null===(n=e.touches)||void 0===n?void 0:n[0])||e)};return{onMouseDown:i,onTouchStart:i}};var cx=function(e){return e.replaceAll(/[^\d,]/gi,"").split(",").map((function(e){return+e}))},ux=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]},dx=function(e){return e.toString(16).padStart(2,"0")},fx=function(){for(var e=arguments.length,t=new Array(e),n=0;n.5?d/(2-c-s):d/(c+s),c){case r:a=(o-i)/d+(o1&&void 0!==arguments[1]?arguments[1]:0,n=(arguments.length>2?arguments[2]:void 0)||1e6,r=+e;return Math.min(Math.max(t,r),n)}function Cx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sx(e){for(var t=1;t .item{margin-right:8px;display:flex;justify-content:center;}"]),ColorItemWrapper:zx,Select:Je.div.attrs({className:_d(Ex,"select")}).withConfig({componentId:"sc-qj4xo5-12"})((function(e){return Ae(["width:",";"],"rgb"===e.value?"25%":"35%")}))});var Dx=kd((function(e,t){var n=e.value,r=e.onChange,o=e.checked,i=e.size,a=void 0===i?24:i,l=(0,h.useMemo)((function(){return"#ffffff"===n||"rgba(0,0,0,0)"===n?"black":"white"}),[n]);return h.createElement(Rx.ColorItemWrapper,{ref:t,color:n,size:a,stroke:"rgba(0,0,0,0)"===n?"#a8a8a8":"#E9EEF2",value:n},h.createElement("input",{type:"radio",value:n,checked:o,onChange:r}),o&&h.createElement(Rw,{color:l}))}));Dx.defaultProps={},Dx.propTypes={value:v().string.isRequired,checked:v().bool,onChange:v().func.isRequired,size:v().number};const Nx=Dx;var Hx=["defaultColor","onChange","pinnedColors","showTransparentColor","containerProps"];function Bx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fx(e){for(var t=1;t255||Number.isNaN(e))){var n=_;n[t]=e;var r=fx.apply(void 0,$t(n));L($t(n)),yx(r)&&(w(Fx(Fx({},b),{},{color:r})),V(r))}}(Number(null===(n=e.target)||void 0===n?void 0:n.value),t)},style:{width:"20%"}})})),b.color!==Vx&&h.createElement(Rx.ColorPickerIcon,{onClick:function(){return C.some((function(e){return H(e)}))?W(b.color,"delete"):W(b.color,"add")}},C.some((function(e){return H(e)}))?h.createElement(Iw,null):h.createElement(jw,null))),h.createElement(Rx.RangePickerWrapper,en({ref:N,color:m.color},J),h.createElement(Rx.WhiteGradient,null),h.createElement(Rx.BlackGradient,null),h.createElement(Rx.ColorPointer,{tabIndex:-1,left:b.pointer.left||0,top:b.pointer.top||0,onKeyDown:function(e){var t=0;"ArrowLeft"===e.key||"ArrowUp"===e.key?t=-1:"ArrowRight"!==e.key&&"ArrowDown"!==e.key||(t=1),t&&X((b.pointer.left||0)+(["ArrowLeft","ArrowRight"].includes(e.key)?t:0),(b.pointer.top||0)+(["ArrowUp","ArrowDown"].includes(e.key)?t:0),m.color)},pointerColor:T,considerTopWidth:!0})),h.createElement(Rx.BarWrapper,Q,h.createElement(Rx.Bar,{ref:z},h.createElement("tbody",null,h.createElement("tr",null,K))),h.createElement(Rx.ColorPointer,{tabIndex:-1,left:m.pointerLeft,onKeyDown:function(e){"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||Y(m.pointerLeft+("ArrowLeft"===e.key?-1:1))},considerTopWidth:!1,pointerColor:T,style:{top:-3}})),h.createElement(Rx.ColorItemsContainer,null,C.map((function(e){return h.createElement("div",{className:"item",key:e},h.createElement(Nx,{value:e,checked:H(e),onChange:function(e){return Z(e.target.value)}}))}))))}));Gx.defaultProps={defaultColor:"#000000",pinnedColors:[],showTransparentColor:!1},Gx.propTypes={defaultColor:v().string,onChange:v().func,pinnedColors:v().array,showTransparentColor:v().bool};const Ux=Gx;var Zx=["color","color2","size"],Xx=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=(e.color2,e.size),i=void 0===o?14:o,a=g(e,Zx);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));const Yx=Xx;var qx={Xs:"xs",Sm:"sm",Md:"md",Lg:"lg",Xl:"xl"};const $x=h.createContext({modalOpened:!1});var Kx,Qx=(c(Kx={},qx.Xs,Ae(["max-width:300px;"])),c(Kx,qx.Sm,Ae(["max-width:600px;"])),c(Kx,qx.Md,Ae(["max-width:960px;"])),c(Kx,qx.Lg,Ae(["max-width:1280px;"])),c(Kx,qx.Xl,Ae(["max-width:1920px;"])),Kx),Jx="Modal",eC=Je.div.attrs({className:_d(Jx,"Wrapper")}).withConfig({componentId:"sc-80m07l-0"})((function(e){return Ae(["position:fixed;right:0px;bottom:0px;top:0px;left:0px;z-index:1200;visibility:",";"],e.open?"visible":"hidden")})),tC=Je.div.attrs({className:_d(Jx,"Overlay")}).withConfig({componentId:"sc-80m07l-1"})((function(e){return Ae(["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.open?"1":"0")})),nC=Je.div.attrs({className:_d(Jx,"Container")}).withConfig({componentId:"sc-80m07l-2"})((function(e){var t=e.theme,n=e.open,r=void 0!==n&&n,o=e.fullWidth,i=void 0!==o&&o,a=e.maxWidth,l=void 0===a?qx.Sm:a;return Ae(["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%);"],t.shape.borderRadius[st.Lg],t.palette[it.BackgroundSecondary],t.palette[it.LightShadow],r?"visible":"hidden",r?"1":"0",i&&Ae(["width:calc(100% - 64px);"]),Qx[l])}));const rC=Ld({Modal:Je.div.attrs({className:_d(Jx,"root")}).withConfig({componentId:"sc-80m07l-3"})((function(){return Ae(["position:relative;padding-top:8px;padding-bottom:8px;margin:0;padding:0;outline:0;display:flex;flex-direction:column;"])})),Wrapper:eC,Overlay:tC,Container:nC});var oC=["children","open","onClose","maxWidth","fullWidth","modalStyles"];function iC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aC(e){for(var t=1;t *:not(:first-child){margin-left:8px;}"],n===dC.Right?"flex-end":n)}))});var hC=["children"],pC=kd((function(e,t){var n=e.children,r=g(e,hC);return h.createElement(fC.ModalActions,en({},r,{ref:t}),n)}));pC.defaultProps={align:dC.Center},pC.propTypes={children:v().node.isRequired,align:v().oneOf(rt(dC))},pC.displayName="ModalActions";const gC=pC;const mC={ColorPickerModal:Je(uC).withConfig({componentId:"sc-7tf41j-0"})(["max-width:350px;"]),ColorPickerWrap:Je.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(e){return e.hideModalTitle&&"padding-top: 12px;"}),(function(e){return e.theme.palette[it.IconsPrimary]})),ModalActions:Je(gC).withConfig({componentId:"sc-7tf41j-2"})(["gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}"])};var vC={zIndex:1301},yC=function(e){var t=e.hideModalTitle,n=e.defaultColor,r=void 0===n?"":n,o=e.onChange,i=e.open,a=e.pinnedColors,l=e.onClose,s=fu().t;return i?h.createElement(mC.ColorPickerModal,{onClose:l,open:i,fullWidth:!0,modalStyles:vC},!t&&h.createElement(Ew,{onClose:l,primary:s("colorPickerModalTitleLabel","Pick color"),icon:h.createElement(Yx,{size:29}),iconShadow:!0,variant:"with-icon"}),h.createElement(_w,null,h.createElement(mC.ColorPickerWrap,{hideModalTitle:t},h.createElement(Ux,{onChange:o,pinnedColors:a,defaultColor:r,showTransparentColor:!0}))),h.createElement(mC.ModalActions,null,h.createElement(Om,{color:"basic",onClick:l},s("cancel")),h.createElement(Om,{color:"primary",onClick:l},s("apply")))):null};yC.defaultProps={defaultColor:"",pinnedColors:[],onChange:function(){},open:!1,hideModalTitle:!1,onClose:function(){}};const bC=yC;var wC=Je.div.attrs((function(e){var t=e.$color;return{style:{background:"rgba(0,0,0,0)"===t?"repeating-conic-gradient(#5d6d7e 0% 25%, transparent 0% 50%) 50% / 8px 8px":t}}})).withConfig({componentId:"sc-zmv0gj-0"})(["background:",";border-radius:4px;width:32px;height:32px;border:1px solid ",";cursor:pointer;box-sizing:border-box;"],(function(e){return e.theme.palette["icons-primary"]}),(function(e){return e.theme.palette[it.BorderPrimaryStateless]})),xC="FIE_pinnedColors",CC=function(e){var t,n=e.onChange,r=e.color,o=e.colorFor,i=fu(),a=i.selectionsIds,l=void 0===a?[]:a,s=i.config.annotationsCommon,u=void 0===s?{}:s,d=i.dispatch,f=i.latestColors,p=(void 0===f?{}:f)[o],g=Jt((0,h.useState)(),2),m=g[0],v=g[1],y=Jt((0,h.useState)((function(){return p||r||u.fill})),2),b=y[0],w=y[1],x=Jt((0,h.useState)(null!==(t=window)&&void 0!==t&&t.localStorage?JSON.parse(localStorage.getItem(xC)||"[]"):[]),2),C=x[0],S=x[1],E=function(e){v(m?null:e.currentTarget)};return(0,h.useEffect)((function(){var e=0===l.length&&p||r;w(e),n(e)}),[r,l]),h.createElement(h.Fragment,null,h.createElement(wC,{className:"FIE_color-picker-triggerer",onClick:E,$color:b,onChange:n}),h.createElement(bC,{hideModalTitle:!0,onChange:function(e,t,r){w(t),n(t),function(e){var t;if(null!==(t=window)&&void 0!==t&&t.localStorage){var n=window.localStorage.getItem(xC);if(JSON.stringify(e)!==n){var r=e.slice(-9);window.localStorage.setItem(xC,JSON.stringify(r)),S(r)}}}(r),p!==t&&d({type:CP,payload:{latestColors:c({},o,t)}})},defaultColor:b,pinnedColors:C,open:!!m,onClose:E}))};CC.defaultProps={color:void 0};const SC=CC;const EC=function(e){var t=e.annotation,n=e.updateAnnotation,r=t.stroke,o=t.strokeWidth;return h.createElement(Qb,null,h.createElement(jf,{annotation:"px",onChange:function(e){n({strokeWidth:xu(e,0,100)})},value:o,noMargin:!0}),h.createElement(SC,{color:r,onChange:function(e){n({stroke:e})},colorFor:"stroke"}))};const kC=function(e){var t=e.annotation,n=e.updateAnnotation,r=e.t,o=t.shadowOffsetX,i=t.shadowOffsetY,a=t.shadowBlur,l=t.shadowColor,s=t.shadowOpacity,u=function(e,t){n(c({},e,xu(t,2parseFloat(a))){var f=Math.min(10*s.width,10*s.height),h=ad(s.width,s.height,m),g=c({},i,a?xu(a,0,f):a),v="height"===i,y=v?"width":"height";if(!(null!==(r=n.ratioUnlocked)&&void 0!==r?r:u.ratioUnlocked)){var b=h.width/h.height;g[y]=v?Math.round(g[i]*b):Math.round(g[i]/b)}if(g[i]!==u[i]||g[y]!==u[y]){if("function"==typeof t)return void t(g);l({type:cP,payload:g});var w=p.width&&p.height&&p||d,x=gk(gk({},u),g);l({type:zO,payload:{factor:x.width&&x.height?Ch(w,x):1,isAbsoluteZoom:!0}})}}},w=void 0===u.width&&void 0===u.height||s.width===u.width&&s.height===u.height,x=BE((n.width||n.height)&&n||u,p,d,s,m),C=u.manualChangeDisabled,S=void 0!==u.width&&!u.width,E=void 0!==u.height&&!u.height;return h.createElement(uk,{className:"FIE_resize-tool-options",alignment:o,disableWrap:i},h.createElement(dk,{className:"FIE_resize-width-option",value:S?"":x.width,name:"width",onChange:C?void 0:b,inputMode:"numeric",title:y("resizeWidthTitle"),label:y("width"),inputProps:{type:"number"},size:"sm",iconEnd:"px",placeholder:"Width",disableWrap:i,disabled:C}),h.createElement(fk,{className:"FIE_resize-ratio-locker",title:y("toggleRatioLockTitle"),onClick:C?void 0:function(){return"function"==typeof t?void t({ratioUnlocked:!n.ratioUnlocked}):void l({type:cP,payload:{ratioUnlocked:!u.ratioUnlocked}})},color:"basic",size:"sm",disabled:C},n.ratioUnlocked||u.ratioUnlocked?h.createElement(AE,{size:16,color:v.palette.success}):h.createElement(TE,{size:16,color:v.palette.error})),h.createElement(dk,{className:"FIE_resize-height-option",value:E?"":x.height,name:"height",onChange:C?void 0:b,inputMode:"numeric",title:y("resizeHeightTitle"),label:y("height"),inputProps:{type:"number"},size:"sm",iconEnd:"px",placeholder:"Height",disableWrap:i,disabled:C}),!r&&h.createElement(hk,{className:"FIE_resize-reset-button",size:"sm",color:"basic",onClick:w||C?void 0:function(){l({type:cP,payload:{width:void 0,height:void 0,ratioUnlocked:!1}});var e=p.width&&p.height&&p||d;l({type:zO,payload:{factor:Ch(e,e)}})},disabled:w||C},h.createElement(RE,null)))};mk.defaultProps={onChange:void 0,currentSize:{},hideResetButton:!1,alignment:"center",disableWrap:!1};const vk=mk;var yk=Je.div.withConfig({componentId:"sc-fvaj5j-0"})(["display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;overflow:hidden;",";"],(function(e){return e.noWrap?"flex-wrap: nowrap;":""})),bk=Je.div.withConfig({componentId:"sc-fvaj5j-1"})(["margin-bottom:8px;"]),wk=Je.div.withConfig({componentId:"sc-fvaj5j-2"})((function(e){var t=e.theme;return"\n padding: 6px 4px;\n border: 1px solid ".concat(t.palette["borders-secondary"],";\n width: fit-content;\n height: 32px;\n border-radius: 2px;\n overflow: hidden;\n cursor: pointer;\n border-radius: 4px;\n\n :hover {\n background: ").concat(t.palette["bg-primary-active"],";\n }\n\n &[aria-selected='true'] {\n background: ").concat(t.palette["bg-primary-active"],";\n border-color: ").concat(t.palette["accent-primary-active"],";\n }\n\n img {\n max-width: 100%;\n max-height: 100%;\n }\n ")})),xk=function(e){var t=e.addImgWatermark,n=e.loadAndSetWatermarkImg,r=e.style,o=fu(),i=o.config,a=o.annotations,l=o.dispatch,s=o.t,c=(0,h.useMemo)((function(){var e;return null===(e=(a[Da]||{}).image)||void 0===e?void 0:e.src}),[a[Da]]),u=function(e){var n=e.currentTarget.children[0];if(n.complete){if(!n.naturalWidth)return void l({type:Nc,payload:{feedback:{message:s("mutualizedFailedToLoadImg"),duration:2e3}}});t(n)}},d=(i[Ba.WATERMARK]||{}).gallery,f=void 0===d?[]:d;return 0===f.length?null:h.createElement(mb,{className:"FIE_watermark-gallery",style:r},f.map((function(e){var t=(null==e?void 0:e.url)||e,r=(null==e?void 0:e.previewUrl)||t;return h.createElement(wk,{className:"FIE_watermark-selected-item",onClick:function(e){return t===r?u(e):n(t)},key:t,"aria-selected":t===c},h.createElement("img",{src:r,alt:"Failed to load.",crossOrigin:"Anonymous",draggable:!1}))})))};xk.defaultProps={style:void 0};const Ck=xk;var Sk=["color","size"],Ek=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,Sk);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}),h.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:r}),h.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:r}),h.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:r}))}));const kk=Ek;const Ok=function(e){var t=e.watermark,n=e.saveWatermark,r=e.t,o=Jt((0,h.useState)(null),2),i=o[0],a=o[1],l=t.padding||0;return h.createElement(h.Fragment,null,h.createElement(tw,{className:"FIE_watermark-padding-triggerer",title:r("padding"),onClick:function(e){a(e.currentTarget)},active:i},h.createElement(kk,{size:20})),h.createElement(mg,{className:"FIE_watermark-padding-popup",anchorEl:i,open:!!i,onClose:function(){a(null)},position:"top"},h.createElement(Kb,null,h.createElement(Xd,null,r("padding")),h.createElement(Qb,null,h.createElement(jf,{annotation:"px",onChange:function(e){n({padding:xu(e,0,100)})},value:l,noMargin:!0}),h.createElement(nw,null,"".concat(l,"px"))))))};function Pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _k(e){for(var t,n=1;nv){var r=y*C/e.height;n.height=e.height*r,n.width=n.height*t}else{var a=v*C/e.width;n.width=e.width*a,n.height=n.width/t}var l=_k(_k(_k(_k({},o.annotationsCommon),o[Ba.IMAGE]),n),{},{padding:1,image:e,x:b+v/2-n.width/2,y:w+y/2-n.height/2,id:Lk,name:Ba.IMAGE,replaceCurrent:!0});i({type:qk,payload:l})},E=function(e){i({type:qk,payload:_k(_k({},"function"==typeof e?e(m):e),{},{id:Lk})})},k=function(e,t){if(e){f(!0);var n=new Image;n.onload=function(){S(n),t&&URL.revokeObjectURL(e),f(!1)},n.onerror=function(){(function(e){i({type:Nc,payload:{feedback:{message:e,status:tl}}})})(a("mutualizedFailedToLoadImg")),t&&URL.revokeObjectURL(e),f(!1)},n.src=e}};(0,h.useEffect)((function(){m&&(i({type:lO}),i({type:rO,payload:{annotationId:"watermark"}}))}),[m]),(0,h.useEffect)((function(){m&&(0===r.length||r[0].id!==Lk)&&i({type:rO,payload:{annotationId:"watermark"}})}),[r]);var O=[(!o.useCloudimage||"function"==typeof g.onUploadWatermarkImgClick)&&{key:"upload-watermark",label:a("uploadWatermark"),icon:bS,onClick:function(){if("function"!=typeof g.onUploadWatermarkImgClick)p.current&&p.current.click();else{var e=g.onUploadWatermarkImgClick(k);e instanceof Promise&&e.then((function(){var e=0t.factor,i=(e.x-t.x||0)/t.factor,a=(e.y-t.y||0)/t.factor,l={x:e.x-i*e.factor,y:e.y-a*e.factor};if(o&&1===t.factor||(l.x=Math.min(0,Math.max(l.x,n*(1-t.factor))),l.y=Math.min(0,Math.max(l.y,r*(1-t.factor)))),1>e.factor){var s=n-n*e.factor,c=r-r*e.factor;l.x+=s/2,l.y+=c/2}return IO(IO({},l),{},{factor:e.factor})};var MO=["preparedDimensions"];function jO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function AO(e){for(var t,n=1;ni.x+i.width&&(a.width=i.x+i.width-a.x),a.y+a.height>i.y+i.height&&(a.height=i.y+i.height-a.y),"number"==typeof r&&!k_(a.width/a.height,r)){var l=a.height*r,s=a.width/r;gd(a.y+s)<=i.y+i.height?a.height=s:a.width=l}if((o.minWidth&&a.width<=o.minWidth||o.maxWidth&&a.width>=o.maxWidth)&&(a.width=xu(a.width,o.minWidth,o.maxWidth),a.x=e.x,a.y=e.y,"number"==typeof r&&(a.height=a.width/r)),(o.minHeight&&t.height<=o.minHeight||o.maxHeight&&t.height>=o.maxHeight)&&(a.height=xu(a.height,o.minHeight,o.maxHeight),a.x=e.x,a.y=e.y,"number"==typeof r&&(a.width=a.height*r)),"string"==typeof o.lockCropAreaAt){var u=function(e,t,n){var r=Jt(e.split("-"),2),o=r[0],i=r[1],a={x:0,y:0};return"center"===o?a.y=t.height/2-n.height/2:"bottom"===o&&(a.y=t.height-n.height),"center"===i?a.x=t.width/2-n.width/2:"right"===i&&(a.x=t.width-n.width),a}(o.lockCropAreaAt,i,a),d=u.x,f=u.y;a.x=d,a.y=f}return a};function __(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L_(e){for(var t,n=1;n=p.width&&c.height>=p.height;p.width&&p.height&&(ri.scaledBy?i.scaledBy:1,A=L_(L_({},i),{},{width:i.width/j,height:i.height/j});I=P_(A,L_(L_({},A),{},{x:0,y:0}),L_(L_({},A),{},{abstractX:0,abstractY:0}),!(k||O)&&P(),C)}var z=I,R=z.x,D=void 0===R?0:R,N=z.y,H=void 0===N?0:N,B=z.width,F=z.height,W={x:u?i.width-D-B:D,y:d?i.height-H-F:H,ref:v,fill:"#FFFFFF",scaleX:1,scaleY:1,globalCompositeOperation:"destination-out",onDragEnd:S?void 0:M,onDragMove:S?void 0:function(e){var t=e.target;t.setAttrs(function(e,t){var n=t.width-(2*e.radiusX||e.width),r=t.height-(2*e.radiusY||e.height);return{x:gd(Math.min(Math.max(e.x,0),n)),y:gd(Math.min(Math.max(e.y,0),r))}}(t.attrs,w.current))},onTransformEnd:S?void 0:M,draggable:!S};return h.createElement(h.Fragment,null,h.createElement(Pa,{image:o,x:u?i.width:0,y:d?i.height:0,width:i.width,height:i.height,filters:[li.Filters.Blur,li.Filters.Brighten],blurRadius:10,brightness:-.3,scaleX:u?-1:1,scaleY:d?-1:1,ref:b}),O?h.createElement(Oa,en({},W,{radiusX:B/2,radiusY:F/2,offset:{x:-B/2,y:-F/2}})):h.createElement(ka,en({},W,{width:c.noEffect?0:B,height:c.noEffect?0:F})),c.noEffect&&h.createElement(JP,{name:"Text",id:"no-preview-text-node",text:m("cropItemNoEffect"),x:i.width/2-T_/2,y:i.height/2-M_/2,fontSize:20,fill:"#ffffff",stroke:"#ff0000",strokeWidth:.2,shadowColor:"#ff0000",shadowBlur:10,annotationEvents:{},align:"center",width:T_,height:M_}),h.createElement(_a,{centeredScaling:!1,flipEnabled:!1,rotateEnabled:!1,nodes:v.current?[v.current]:[],anchorSize:14,anchorCornerRadius:7,enabledAnchors:T,ignoreStroke:!1,anchorStroke:n.palette["accent-primary"],anchorFill:n.palette["access-primary"],anchorStrokeWidth:2,borderStroke:n.palette["accent-primary"],borderStrokeWidth:2,borderDash:[4],keepRatio:!k||!O,ref:y,boundBoxFunc:function(e,t){return P_(e,t,w.current,!(k||O)&&P(),C)}}))};const A_=function(){var e,t=fu(),n=t.selectionsIds,r=void 0===n?[]:n,o=t.theme,i=t.designLayer,a=t.dispatch,l=t.config.useCloudimage,s=(0,h.useMemo)((function(){return null!=i&&i.findOne?r.map((function(e){return i.findOne("#".concat(e))})).filter(Boolean):[]}),[r]),c=function(){1===s.length&&s[0].name()===Ba.TEXT&&a({type:iP,payload:{textIdOfEditableContent:s[0].id()}})},u=l?["top-left","bottom-left","top-right","bottom-right"]:void 0;return h.createElement(_a,{id:Ra,centeredScaling:!1,rotationSnaps:[0,45,90,135,180,225,270,315],nodes:s,rotateAnchorOffset:30,anchorSize:14,anchorCornerRadius:7,padding:1===s.length&&null!==(e=s[0].attrs.padding)&&void 0!==e?e:1,ignoreStroke:!1,anchorStroke:o.palette["accent-primary"],anchorFill:o.palette["access-primary"],anchorStrokeWidth:2,borderStroke:o.palette["accent-primary"],borderStrokeWidth:2,borderDash:[4],rotateEnabled:!l,onMouseOver:function(){a({type:Jk,payload:{pointerCssIcon:Za.MOVE}})},onMouseLeave:function(){a({type:Jk,payload:{pointerCssIcon:Za.DRAW}})},onDblClick:c,onDblTap:c,enabledAnchors:u,flipEnabled:!l,shouldOverdrawWholeArea:!0})};const z_=function(){var e=fu(),t=e.toolId,n=e.shownImageDimensions;return h.createElement(Ea,{id:Aa,x:n.abstractX||0,y:n.abstractY||0},h.createElement(A_,null),t===Ba.CROP&&h.createElement(j_,null))};var R_=["color","size"],D_=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,R_);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}))}));const N_=D_;var H_=Je.div.withConfig({componentId:"sc-1tst9ex-0"})((function(e){var t=e.theme,n=e.top,r=e.left;return"\n position: absolute;\n z-index: 1;\n background: ".concat(t.palette["bg-secondary"],";\n border-radius: 2px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0px 1px 2px ").concat(t.palette["light-shadow"],";\n top: ").concat((n||0)+8,"px;\n left: ").concat((r||0)+4,"px;\n transform: translateX(-50%);\n height: 32px;\n")}));const B_=function(){var e=fu(),t=e.selectionsIds,n=void 0===t?[]:t,r=e.designLayer,o=e.annotations,i=e.dispatch,a=Jt((0,h.useState)({left:0,top:0}),2),l=a[0],s=a[1],c=(0,h.useMemo)((function(){var e;return null==r||null===(e=r.getStage())||void 0===e?void 0:e.findOne("#".concat(Ra))}),[r]),u=n.length,d=yu((function(){c&&s({left:(c.x()+c.width()/2)*c.scaleX(),top:(c.y()+c.height())*c.scaleY()})}),0);return(0,h.useEffect)((function(){d()}),[n,c,o]),0!==u&&c?h.createElement(H_,{className:"FIE_annotation-controls-overlay",left:l.left,top:l.top},n[0]!==Da&&h.createElement(Sy,{color:"basic",size:"sm",onClick:function(){i({type:tP,payload:{annotationsIds:n}})}},h.createElement(N_,null)),h.createElement(Sy,{color:"basic",size:"sm",onClick:function(){i({type:KO,payload:{annotationsIds:n}})}},h.createElement(Tw,null))):null};function F_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W_(e){for(var t,n=1;n1),2),x=w[0],C=w[1],S=(0,h.useMemo)((function(){return{cursor:i===Za.DEFAULT&&a===Ha.ANNOTATE?Za.DRAW:i}}),[a,i]),E=function(e){o({type:zO,payload:e})},k=(0,h.useCallback)((function(e){var t,n;e.evt.preventDefault(),null===(t=(n=e.currentTarget).container)||void 0===t||t.call(n).focus(),e.target instanceof li.Stage&&01&&b&&(e.preventDefault(),C(!0),o({type:Jk,payload:{pointerCssIcon:Za.DRAG}}))},_=function(e){"Space"===e.code&&(e.preventDefault(),O())},L=function(){n.current&&n.current.container().focus()};(0,h.useEffect)((function(){o({type:Jk,payload:{pointerCssIcon:Za[x?"DRAG":"DEFAULT"]}})}),[x]),(0,h.useEffect)((function(){var e;return C(a!==Ha.ANNOTATE&&a!==Ha.WATERMARK&&g.factor>1),n.current&&((e=n.current.container()).addEventListener("mouseenter",L),e.addEventListener("keydown",P),e.addEventListener("keyup",_)),function(){e&&(e.removeEventListener("mouseenter",L),e.removeEventListener("keydown",P),e.removeEventListener("keyup",_))}}),[a,g.factor,1]);var I=u*(b&&g.factor||1);return h.createElement(q_,{className:"FIE_canvas-node",tabIndex:-1,ref:n,width:s,height:c,scaleX:I,scaleY:I,x:b&&g.x||null,y:b&&g.y||null,zoomFactor:b&&g.factor||1,onWheel:b?function(e){e.evt.preventDefault();var t=(g.factor||1)+-.006*e.evt.deltaY,n=e.currentTarget.getPointerPosition();E(K_(K_({},n),{},{factor:t}))}:void 0,onTap:k,onClick:k,onTouchMove:b?function(e){return Z_(e,E)}:void 0,onDragStart:function(e){var t;1<(null===(t=e.evt.touches)||void 0===t?void 0:t.length)&&C(!1)},onTouchEnd:b?function(){!function(e){U_=0,G_=null,"function"==typeof e&&e()}(O)}:void 0,dragBoundFunc:function(e){return{x:Math.min(0,Math.max(e.x,s*(1-g.factor))),y:Math.min(0,Math.max(e.y,c*(1-g.factor)))}},draggable:b&&x,onDragEnd:function(e){e.currentTarget.draggable()&&"stage"===e.target.nodeType.toLowerCase()&&b&&x&&E({factor:g.factor,x:e.target.x(),y:e.target.y(),preparedDimensions:!0})},style:S},t)}));const J_=function(){var e=Jt(ed(),1)[0],t=fu(),n=(0,h.useRef)(null),r=(0,h.useCallback)((function(e){var n=e.width,r=e.height;t.dispatch({type:HO,payload:{canvasWidth:n,canvasHeight:r}})}),[]);return(0,h.useEffect)((function(){e(n.current,r)}),[]),h.createElement(X_,{className:"FIE_canvas-container",ref:n},!t.textIdOfEditableContent&&h.createElement(B_,null),t.isShowOriginalImage&&h.createElement(Y_,{className:"FIE_original-image-compare",src:t.originalImage.src}),h.createElement(Q_,null,h.createElement(uu,{overridingValue:t},h.createElement(E_,null),h.createElement(z_,null))))};var eL=["color","size"],tL=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,eL);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}))}));var nL=Je.div.withConfig({componentId:"sc-etsyb6-0"})(["display:inline-block;height:",";width:",";border-radius:1px;background:",";"],(function(e){return e.height}),(function(e){return e.width}),(function(e){return e.theme.palette[it.BordersSecondary]})),rL=function(e){var t=e.height,n=e.width;return h.createElement(nL,{height:t,width:n})};rL.defaultProps={height:"24px",width:"1px"};const oL=rL;const iL=Ld({SelectGroup:Je(ik.InputGroup).attrs({className:_d("SelectGroup","root")}).withConfig({componentId:"sc-1uvutwe-0"})([""])});var aL=["children","size","error","label","placeholder","hint","LabelProps","SelectProps","selectProps","scroll","fullWidth","showSelectionKey","value","multiple","hideMenuItemsActions","onChange","readOnly","disabled"];function lL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sL(e){for(var t=1;t=e||1 *{color:",";}}",""],n?"none":"flex",t[it.BackgroundActive],t[it.AccentStateless],r&&Ae(["background-color:",";& > *{color:"," !important;}"],t[it.BackgroundActive],t[it.AccentStateless]))})),zI=Je.div.attrs({className:_d(OI,"text")}).withConfig({componentId:"sc-1riasfx-8"})((function(e){var t=e.theme,n=t.palette,r=t.typography.font,o=e.font,i=e.isCollapsed;return Ae(["flex:1 1 auto;color:",";",";transition:color 100ms ease-out;display:",";user-select:none;"],n[it.TextPrimary],r[o||lt.LabelLarge],i&&"none")})),RI=Je.div.attrs({className:_d(OI,"icon")}).withConfig({componentId:"sc-1riasfx-9"})((function(e){var t=e.theme.palette,n=e.isCollapsed;return Ae(["display:flex;flex-shrink:0;color:",";margin-right:",";transition:color 100ms ease-out;"],t[it.IconsPrimary],n?"0px":"12px")})),DI=Je.div.attrs({className:_d(OI,"item-button")}).withConfig({componentId:"sc-1riasfx-10"})((function(e){var t=e.theme.palette,n=e.isCollapsed,r=e.selected;return Ae(["display:flex;justify-content:",";align-items:center;border-radius:4px;box-sizing:border-box;text-align:left;padding:",";transition:background-color 150ms cubic-bezier(0.4,0,0.2,1) 0ms;margin-bottom:8px;cursor:pointer;&:hover{background-color:",";& > *{color:",";}}",""],n?"center":"flex-start",n?"13px":"13px 16px",t[it.BackgroundActive],t[it.AccentStateless],r&&Ae(["background-color:",";& > *{color:",";}"],t[it.BackgroundActive],t[it.AccentStateless]))})),NI=Je(DI).attrs({className:_d(OI,"item-button")}).withConfig({componentId:"sc-1riasfx-11"})((function(e){return Ae(["",""],!e.isCollapsed&&Ae(["padding:13px 24px;"]))})),HI=Je(wv).attrs({className:_d(OI,"accordion")}).withConfig({componentId:"sc-1riasfx-12"})((function(e){var t=e.theme,n=t.palette,r=t.typography.font,o=e.selected;return Ae(["","{padding:13px 16px;transition:background-color 100ms ease-out;","{",";color:",";}&:hover{background-color:",";& > *{color:",";}}","}","{padding:0px 16px;}"],iv.Header,iv.Label,r[lt.LabelLargeEmphasis],n[it.TextPrimary],n[it.BackgroundActive],n[it.AccentStateless],o&&Ae(["","{color:",";}"],iv.Label,n[it.AccentStateless]),dv.AccordionDetails)}));const BI=Ld({TemporaryDrawer:PI,PersistentDrawer:_I,Drawer:LI,Header:II,Body:TI,Footer:MI,List:jI,Item:AI,ItemButton:DI,Icon:RI,ItemText:zI,DrawerAccordion:HI,CollapsedButton:NI});var FI=["children","selected"],WI=kd((function(e,t){var n=e.children,r=e.selected,o=g(e,FI),i=(0,h.useContext)(kI).isCollapsed;return h.createElement(BI.Item,en({selected:r,isCollapsed:i},o,{ref:t}),n)}));WI.defaultProps={selected:!1},WI.propTypes={selected:v().bool};const VI=WI;var GI=Je.div.withConfig({componentId:"sc-qhd6ow-0"})((function(e){var t=e.theme;return"\n width: 72px;\n min-height: 66px;\n padding: 4px 2px;\n border-radius: 4px;\n display: flex;\n flex-direction: column;\n gap: 6px;\n background: ".concat(t.palette[it.BackgroundStateless],";\n align-items: center;\n justify-content: center;\n\n [data-phone='true'] & {\n margin-bottom: 0;\n height: 50px;\n border-radius: 0;\n }\n\n svg {\n color: ").concat(t.palette[it.IconsPrimary],";\n }\n\n &,\n * {\n cursor: pointer;\n }\n\n &:hover {\n background: ").concat(t.palette["bg-primary-active"],";\n }\n\n &[aria-selected='true'] {\n background: ").concat(t.palette["bg-primary-active"],";\n\n * {\n color: ").concat(t.palette["accent-primary-active"],";\n }\n }\n ")})),UI=Je(Xd).withConfig({componentId:"sc-qhd6ow-1"})((function(e){var t=e.theme;return"\n color: ".concat(t.palette[it.TextPrimary],";\n ").concat(t.typography.font[lt.LabelSmall],";\n font-size: 12px;\n line-height: 14px;\n\n span {\n white-space: normal;\n }\n\n [data-phone='true'] & {\n font-size: 10px;\n }\n")})),ZI=function(e){var t=e.id,n=e.label,r=e.Icon,o=e.isSelected,i=e.onClick,a=(0,h.useCallback)((function(){"function"==typeof i&&i(t)}),[t]);return h.createElement(GI,{className:"FIE_tab","aria-selected":o,onClick:a},h.createElement(r,{size:24}),n&&h.createElement(UI,{className:"FIE_tab-label"},n))};ZI.defaultProps={isSelected:!1,onClick:void 0,label:void 0};const XI=(0,h.memo)(ZI);var YI=["color","size"],qI=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,YI);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.createElement("path",{d:"M43 3H31.75V0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V14.25H43V3Z",fill:r}),h.createElement("path",{d:"M3 14.25V3H14.25V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V14.25H3Z",fill:r}),h.createElement("path",{d:"M0.5 31.75V43C0.5 44.3807 1.61929 45.5 3 45.5H14.25V43H3V31.75H0.5Z",fill:r}),h.createElement("path",{d:"M43 31.75H45.5V43C45.5 44.3807 44.3807 45.5 43 45.5H31.75V43H43V31.75Z",fill:r}))}));var $I=["color","size"],KI=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,$I);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}),h.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:r}))}));var QI=["color","size"],JI=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,QI);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}))}));var eT=["color","size"],tT=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,eT);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}))}));var nT=["color","size"],rT=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,nT);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.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:r}),h.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:r}))}));var oT=["color","size"],iT=Gc((function(e,t){var n=e.color,r=void 0===n?"currentColor":n,o=e.size,i=void 0===o?14:o,a=g(e,oT);return h.createElement("svg",en({ref:t,width:i,height:i,viewBox:"0 0 50 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a),h.createElement("path",{d:"M0.5 0.5H3V2.375H2.375V3H0.5V0.5Z",fill:r}),h.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:r}),h.createElement("path",{d:"M43 45.5H45.5V43H43.625V43.625H43V45.5Z",fill:r}),h.createElement("path",{d:"M45.5 3V0.5H43V2.375H43.625V3H45.5Z",fill:r}),h.createElement("path",{d:"M6.125 0.5V3H9.875V0.5H6.125Z",fill:r}),h.createElement("path",{d:"M13.625 0.5V3H17.375V0.5H13.625Z",fill:r}),h.createElement("path",{d:"M21.125 0.5V3H24.875V0.5H21.125Z",fill:r}),h.createElement("path",{d:"M28.625 0.5V3H32.375V0.5H28.625Z",fill:r}),h.createElement("path",{d:"M36.125 0.5V3H39.875V0.5H36.125Z",fill:r}),h.createElement("path",{d:"M45.5 6.125H43V9.875H45.5V6.125Z",fill:r}),h.createElement("path",{d:"M45.5 13.625H43V17.375H45.5V13.625Z",fill:r}),h.createElement("path",{d:"M45.5 21.125H43V24.875H45.5V21.125Z",fill:r}),h.createElement("path",{d:"M45.5 28.625H43V32.375H45.5V28.625Z",fill:r}),h.createElement("path",{d:"M45.5 36.125H43V39.875H45.5V36.125Z",fill:r}),h.createElement("path",{d:"M39.875 45.5V43H36.125V45.5H39.875Z",fill:r}),h.createElement("path",{d:"M32.375 45.5V43H28.625V45.5H32.375Z",fill:r}),h.createElement("path",{d:"M0.5 17.375H3V13.625H0.5V17.375Z",fill:r}),h.createElement("path",{d:"M0.5 9.875H3V6.125H0.5V9.875Z",fill:r}),h.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:r}))}));var aT=[{id:Ha.ADJUST,labelKey:"adjustTab",icon:qI},{id:Ha.FINETUNE,labelKey:"finetuneTab",icon:KI},{id:Ha.FILTERS,labelKey:"filtersTab",icon:JI,hideFn:function(e){return e.useCloudimage}},{id:Ha.WATERMARK,labelKey:"watermarkTab",icon:tT},{id:Ha.ANNOTATE,labelKey:"annotateTabLabel",icon:rT,hideFn:function(e){return e.useCloudimage}},{id:Ha.RESIZE,labelKey:"resizeTab",icon:iT}],lT=function(e){var t=e.toggleMainMenu,n=e.isDrawer,r=fu(),o=r.t,i=r.tabId,a=void 0===i?null:i,l=r.dispatch,s=r.config,c=s.defaultTabId,u=s.tabsIds,d=s.useCloudimage,f=(0,h.useCallback)((function(e){l({type:Rk,payload:{tabId:e}}),t(!1)}),[]),p=(0,h.useMemo)((function(){var e=[];return 00);"Escape"===e.key&&n&&"function"==typeof x&&x()};(0,h.useEffect)((function(){return document.addEventListener("keydown",j),function(){return document.removeEventListener("keydown",j)}}),[]);var A=function(e){return h.createElement(BI.Drawer,en({open:r,top:s},E,{isCollapsed:!!e&&P,ref:t}),n,e&&h.createElement(BI.CollapsedButton,{onClick:M,isCollapsed:P},h.createElement(FM,null,P?function(e){return h.createElement(zM,en({},e,{size:i}))}:function(e){return h.createElement(MM,en({},e,{size:i}))}),h.createElement(NM,null,f)))},z=function(){return!c&&r?h.createElement(GM,{onClick:x}):null},R=function(){return u?h.createElement(BI.TemporaryDrawer,{ref:L,style:YM({},y),open:r},z(),A(!1)):(0,Ph.createPortal)(h.createElement(BI.TemporaryDrawer,{ref:L,style:YM({},y),open:r},z(),A(!1)),T)},D=function(){return h.createElement(BI.PersistentDrawer,{style:YM({},m)},A(!0))};return h.createElement(kI.Provider,{value:{isCollapsed:!k&&P,size:I}},function(){switch(w){case UM.Auto:return k?R():D();case UM.Temporary:return R();case UM.Persistent:return D();default:return k?R():D()}}())})),$M={open:!1,hideBackdrop:!1,iconsSize:20,variant:UM.Auto};qM.defaultProps=$M;var KM={onClose:v().func.isRequired,onCollapse:v().func,onCollapseClick:v().func,children:v().node.isRequired,top:v().number,iconsSize:v().number,open:v().bool,hideBackdrop:v().bool,collapsed:v().bool,disablePortal:v().bool,collapseButtonLabel:v().string,persistentDrawerStyles:v().object,temproryDrawerStyles:v().object,variant:v().oneOf(rt(UM))};qM.propTypes=KM;const QM=qM;var JM=Je.div.attrs((function(e){var t,n,r=e.$size,o=void 0===r?{}:r;return{style:{width:null!==(t=o.width)&&void 0!==t?t:"100%",height:null!==(n=o.height)&&void 0!==n?n:"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(e){return e.theme.palette["bg-secondary"]}),(function(e){return e.showTabsDrawer&&"\n overflow: unset;\n "})),ej=Je.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;}"]),tj=Je.div.withConfig({componentId:"sc-ugtqr7-2"})(["height:100%;width:calc(100% - 80px);flex-grow:1;overflow-y:auto;display:flex;flex-direction:column;",""],(function(e){return e.showTabsDrawer&&"\n overflow-y: unset;\n "})),nj=Je.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;}"]),rj=Je(QM).withConfig({componentId:"sc-ugtqr7-4"})(["transition:transform 200ms ease-in-out;width:92px;height:100%;padding:12px;.SfxDrawer-list,.SfxDrawer-item{padding:0;}"]),oj=function(e){var t=e.toggleMainMenu,n=fu(),r=n.t,o=n.showTabsMenu;return h.createElement(rj,{className:"FIE_tabs-drawer",open:o,onClose:function(){return t(!1)},disablePortal:!0},h.createElement(SM,null,h.createElement(Om,{color:"link-basic-secondary",startIcon:h.createElement(tL,null),onClick:function(){return t(!1)}},r("tabsMenu"))),h.createElement(OM,null,h.createElement(LM,null,h.createElement(sT,{toggleMainMenu:t,isDrawer:!0}))))};oj.defaultProps={toggleMainMenu:function(){}};const ij=oj;function aj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lj(e){for(var t,n=1;n 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;}}'],ja,ja,(function(e){return e.theme.palette["icons-primary"]})),dj=function(e){var t,n,r=e.img,o=e.source,i=e.useCloudimage,a=e.cloudimage;if(r)throw new Error("`img` is renamed to `source` please consider renaming it from your configurations.");if(!o||"string"!=typeof o&&!(o 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(i&&(null!=a&&null!==(t=a.imageSealing)&&void 0!==t&&t.enable&&(null==a||null===(n=a.imageSealing)||void 0===n||!n.salt)))throw new Error("`salt` property of imageSealing object is required in cloudimage mode as long as `imageSealing` is enabled.");var l=vP(ml,e);return h.createElement(h.StrictMode,null,h.createElement(Zt,{theme:l.theme},h.createElement(cj,null),h.createElement(uj,null),h.createElement(cu,{config:l},h.createElement(sj,null))))};dj.defaultProps={useCloudimage:!1,cloudimage:{},img:void 0};const fj=(0,h.memo)(dj);function hj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pj(e){for(var t,n=1;n{"use strict";var r=n(3404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var o=h(n);o&&o!==p&&e(t,o,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var l=s(t),g=s(n),m=0;m{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,h=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case l:case a:case h:return e;default:switch(e=e&&e.$$typeof){case c:case f:case m:case g:case s:return e;default:return t}}case o:return t}}}function C(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=m,t.Memo=g,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return C(e)||x(e)===u},t.isConcurrentMode=C,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===f},t.isFragment=function(e){return x(e)===i},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===l},t.isStrictMode=function(e){return x(e)===a},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===d||e===l||e===a||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===g||e.$$typeof===s||e.$$typeof===c||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=x},3404:(e,t,n)=>{"use strict";e.exports=n(3072)},182:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",o=9007199254740991,i="[object Arguments]",a="[object AsyncFunction]",l="[object Function]",s="[object GeneratorFunction]",c="[object Null]",u="[object Object]",d="[object Proxy]",f="[object Undefined]",h=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,g={};g["[object Float32Array]"]=g["[object Float64Array]"]=g["[object Int8Array]"]=g["[object Int16Array]"]=g["[object Int32Array]"]=g["[object Uint8Array]"]=g["[object Uint8ClampedArray]"]=g["[object Uint16Array]"]=g["[object Uint32Array]"]=!0,g[i]=g["[object Array]"]=g["[object ArrayBuffer]"]=g["[object Boolean]"]=g["[object DataView]"]=g["[object Date]"]=g["[object Error]"]=g[l]=g["[object Map]"]=g["[object Number]"]=g[u]=g["[object RegExp]"]=g["[object Set]"]=g["[object String]"]=g["[object WeakMap]"]=!1;var m="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,v="object"==typeof self&&self&&self.Object===Object&&self,y=m||v||Function("return this")(),b=t&&!t.nodeType&&t,w=b&&e&&!e.nodeType&&e,x=w&&w.exports===b,C=x&&m.process,S=function(){try{var e=w&&w.require&&w.require("util").types;return e||C&&C.binding&&C.binding("util")}catch(e){}}(),E=S&&S.isTypedArray;var k,O,P,_=Array.prototype,L=Function.prototype,I=Object.prototype,T=y["__core-js_shared__"],M=L.toString,j=I.hasOwnProperty,A=(k=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+k:"",z=I.toString,R=M.call(Object),D=RegExp("^"+M.call(j).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=x?y.Buffer:void 0,H=y.Symbol,B=y.Uint8Array,F=N?N.allocUnsafe:void 0,W=(O=Object.getPrototypeOf,P=Object,function(e){return O(P(e))}),V=Object.create,G=I.propertyIsEnumerable,U=_.splice,Z=H?H.toStringTag:void 0,X=function(){try{var e=be(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Y=N?N.isBuffer:void 0,q=Math.max,$=Date.now,K=be(y,"Map"),Q=be(Object,"create"),J=function(){function e(){}return function(t){if(!Te(t))return{};if(V)return V(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},te.prototype.set=function(e,t){var n=this.__data__,r=le(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},ne.prototype.clear=function(){this.size=0,this.__data__={hash:new ee,map:new(K||te),string:new ee}},ne.prototype.delete=function(e){var t=ye(this,e).delete(e);return this.size-=t?1:0,t},ne.prototype.get=function(e){return ye(this,e).get(e)},ne.prototype.has=function(e){return ye(this,e).has(e)},ne.prototype.set=function(e,t){var n=ye(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},re.prototype.clear=function(){this.__data__=new te,this.size=0},re.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},re.prototype.get=function(e){return this.__data__.get(e)},re.prototype.has=function(e){return this.__data__.has(e)},re.prototype.set=function(e,t){var n=this.__data__;if(n instanceof te){var r=n.__data__;if(!K||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ne(r)}return n.set(e,t),this.size=n.size,this};var ce,ue=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var l=i[ce?a:++r];if(!1===t(o[l],l,o))break}return e};function de(e){return null==e?void 0===e?f:c:Z&&Z in Object(e)?function(e){var t=j.call(e,Z),n=e[Z];try{e[Z]=void 0;var r=!0}catch(e){}var o=z.call(e);r&&(t?e[Z]=n:delete e[Z]);return o}(e):function(e){return z.call(e)}(e)}function fe(e){return Me(e)&&de(e)==i}function he(e){return!(!Te(e)||function(e){return!!A&&A in e}(e))&&(Le(e)?D:h).test(function(e){if(null!=e){try{return M.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function pe(e){if(!Te(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=xe(e),n=[];for(var r in e)("constructor"!=r||!t&&j.call(e,r))&&n.push(r);return n}function ge(e,t,n,r,o){e!==t&&ue(t,(function(i,a){if(o||(o=new re),Te(i))!function(e,t,n,r,o,i,a){var l=Ce(e,n),s=Ce(t,n),c=a.get(s);if(c)return void ie(e,n,c);var d=i?i(l,s,n+"",e,t,a):void 0,f=void 0===d;if(f){var h=Oe(s),p=!h&&_e(s),g=!h&&!p&&je(s);d=s,h||p||g?Oe(l)?d=l:Me(w=l)&&Pe(w)?d=function(e,t){var n=-1,r=e.length;t||(t=Array(r));for(;++n-1&&e%1==0&&e0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ve);function Ee(e,t){return e===t||e!=e&&t!=t}var ke=fe(function(){return arguments}())?fe:function(e){return Me(e)&&j.call(e,"callee")&&!G.call(e,"callee")},Oe=Array.isArray;function Pe(e){return null!=e&&Ie(e.length)&&!Le(e)}var _e=Y||function(){return!1};function Le(e){if(!Te(e))return!1;var t=de(e);return t==l||t==s||t==a||t==d}function Ie(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Te(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Me(e){return null!=e&&"object"==typeof e}var je=E?function(e){return function(t){return e(t)}}(E):function(e){return Me(e)&&Ie(e.length)&&!!g[de(e)]};function Ae(e){return Pe(e)?oe(e,!0):pe(e)}var ze,Re=(ze=function(e,t,n){ge(e,t,n)},me((function(e,t){var n=-1,r=t.length,o=r>1?t[r-1]:void 0,i=r>2?t[2]:void 0;for(o=ze.length>3&&"function"==typeof o?(r--,o):void 0,i&&function(e,t,n){if(!Te(n))return!1;var r=typeof t;return!!("number"==r?Pe(n)&&we(t,n.length):"string"==r&&t in n)&&Ee(n[t],e)}(t[0],t[1],i)&&(o=r<3?void 0:o,r=1),e=Object(e);++n{"use strict";var r=n(6925);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=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 l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),o=n(9982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n