montana/Russian/Site/messenger/dist/4765.e3067f5e960f91f40a97.js
2026-05-18 18:05:32 +03:00

2 lines
99 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self.webpackChunkmontana_messenger=self.webpackChunkmontana_messenger||[]).push([[4765],{43434(e,t,n){n.d(t,{A:()=>c});var r=n(84051),o=n(87357),i=n(39351),a=n(18276),l=n(90751),s=n(20021);const c=(0,r.ph)(({title:e,disabled:t,isForForum:n,currentAvatarBlobUrl:c,onChange:d})=>{const[h,u]=(0,r.J0)(),[p,m]=(0,r.J0)(c),f=(0,i.A)();(0,r.vJ)(()=>{m(c)},[c]);const g=(0,r.hb)(e=>{u(void 0),d(e),p&&p!==c&&URL.revokeObjectURL(p),m(URL.createObjectURL(e))},[p,c,d]),v=(0,r.hb)(()=>{u(void 0)},[]),A=(0,o.A)(p&&"filled",t&&"disabled",n&&"rounded-square");return(0,s.FD)("div",{className:"AvatarEditable",children:[(0,s.FD)("label",{className:A,role:"button",tabIndex:0,title:e||f("ChangeYourProfilePicture"),children:[(0,s.Y)("input",{type:"file",onChange:function(e){const t=e.target;t?.files?.[0]&&(u(t.files[0]),t.value="")},accept:"image/png, image/jpeg"}),(0,s.Y)(a.A,{name:"camera-add"}),p&&(0,s.Y)("img",{src:p,draggable:!1,alt:""})]}),(0,s.Y)(l.A,{file:h,onClose:v,onChange:g})]})})},24713(e,t,n){n.d(t,{A:()=>s});var r=n(84051),o=n(87357),i=n(68292),a=n(26607);var l=n(20021);const s=(0,r.ph)(({text:e,className:t,isAlternateColor:n})=>(0,l.Y)(a.A,{className:(0,o.A)("Y3ZoW17O",n?"Lq67O2D2":"DWjOG2Ze",t),isOpen:Boolean(e),children:e&&(0,l.Y)(i.A,{text:e})}))},19806(e,t,n){n.d(t,{A:()=>v});var r=n(84051),o=n(87357),i=n(76023),a=n(4961),l=n(14),s=n(39351),c=n(17712),d=n(21849),h=n(18276),u=n(64493),p=n(97422),m=n(20021);const f=1.25*i.$,g=({id:e,name:t,value:n,label:i,peer:v,labelText:A,subLabel:C,checked:w,tabIndex:x,disabled:b,withIcon:Y,blocking:y,permissionGroup:N,isLoading:k,className:S,rightIcon:D,onlyInput:M,isRound:B,nestedCheckbox:F,nestedCheckboxCount:_,nestedOptionList:L,leftElement:R,values:I,onChange:E,onCheck:T,onClickLabel:H})=>{const O=(0,s.A)(),$=(0,r.li)(),[P,J]=(0,r.J0)(!1),K=(0,l.A)(v,!0),z=(0,c.A)(e=>{b||(E&&E(e,L),T&&T(e.currentTarget.checked))}),q=(0,c.A)(()=>{J(!P)}),G=(0,o.A)("Checkbox",b&&"disabled",Y&&"withIcon",k&&"loading",y&&"blocking",F&&"nested",C&&"withSubLabel",N&&"permission-group",Boolean(R)&&"avatar",M&&"onlyInput",B&&"round",Boolean(D)&&"withNestedList",S);return(0,m.FD)(m.FK,{children:[(0,m.FD)("label",{className:G,dir:O.isRtl?"rtl":void 0,onClick:H?function(e){e.target!==$.current&&H?.(e,n)}:void 0,ref:$,children:[(0,m.Y)("input",{type:"checkbox",id:e,name:t,value:n,checked:w,disabled:b,tabIndex:x,onChange:z,onClick:H?function(e){e.stopPropagation()}:void 0}),(0,m.FD)("div",{className:(0,o.A)("Checkbox-main",Boolean(R)&&"Nested-avatar-list"),children:[(0,m.Y)("div",{className:(0,o.A)("user-avatar",K&&"user-avatar-visible"),children:K&&(0,m.Y)(d.A,{peer:K,size:f})}),(0,m.FD)("span",{className:"label",dir:"auto",children:[R,"string"==typeof i?(0,a.A)(i):i,Boolean(A)&&(0,m.Y)("span",{className:"ml-1",children:(0,a.A)(A)})]}),C&&(0,m.Y)("span",{className:"subLabel",dir:"auto",children:(0,a.A)(C)}),D&&(0,m.Y)(h.A,{name:D,className:"right-icon"})]}),F&&(0,m.Y)("span",{className:"nestedButton",dir:"auto",children:(0,m.FD)(u.A,{className:"button",color:"translucent",size:"smaller",onClick:q,children:[(0,m.Y)(h.A,{name:"group-filled",className:"group-icon"}),_,(0,m.Y)(h.A,{name:P?"up":"down"})]})}),k&&(0,m.Y)(p.A,{})]}),F&&(0,m.Y)("div",{className:(0,o.A)("nested-checkbox-group",P&&"nested-checkbox-group-open"),children:L?.map(e=>(0,m.Y)(g,{leftElement:R,onChange:z,checked:-1!==I?.indexOf(e.value),values:I,...e},e.value))})]})},v=(0,r.ph)(g)},77561(e,t,n){n.d(t,{A:()=>c});var r=n(84051),o=n(87357),i=n(87894),a=n(17712),l=n(19806),s=n(20021);const c=(0,r.ph)(({id:e,options:t,selected:n,disabled:r,nestedCheckbox:c,loadingOptions:d,isRound:h,onChange:u,onClickLabel:p,className:m})=>{const f=(0,a.A)((e,t)=>{const{value:r,checked:o}=e.currentTarget;let a;o?(a=(0,i.Am)([...n,r]),t?.forEach(e=>{a.includes(e.value)||a.push(e.value)})):(a=n.filter(e=>e!==r),t&&(a=a.filter(e=>!t.some(t=>t.value===e)))),u(a)}),g=(0,a.A)(e=>{const t=e?.filter(e=>n.includes(e.value)).length;return t>0?t:e.length});return(0,s.Y)("div",{id:e,className:(0,o.A)("radio-group",m),children:t.map(e=>(0,s.Y)(l.A,{label:e.label,subLabel:e.subLabel,value:e.value,peer:e.peer,checked:-1!==n?.indexOf(e.value),disabled:e.disabled||r,isLoading:d?-1!==d.indexOf(e.value):void 0,onChange:f,onClickLabel:p,nestedCheckbox:c,nestedCheckboxCount:g(e.nestedOptions??[]),nestedOptionList:e.nestedOptions,values:n,isRound:h}))})})},94189(e,t,n){n.d(t,{A:()=>d});var r=n(84051),o=n(87357),i=n(10328),a=n(39351),l=n(64493),s=n(22337),c=n(20021);const d=(0,r.ph)(({isOpen:e,title:t,noDefaultTitle:n,header:d,text:h,textParts:u,confirmLabel:p,confirmIsDestructive:m,isConfirmDisabled:f,isOnlyConfirm:g,areButtonsInColumn:v,className:A,children:C,confirmHandler:w,onClose:x,onCloseAnimationEnd:b})=>{const Y=(0,a.A)(),y=(0,r.li)(),N=(0,r.hb)(e=>{-1===e&&w()},[w]),k=(0,i.A)(y,e,N,".Button");return(0,c.FD)(s.A,{className:(0,o.A)("confirm",A),title:t||(n?void 0:Y("Telegram")),header:d,isOpen:e,onClose:x,isNativeDialog:!0,onCloseAnimationEnd:b,children:[h&&h.split("\\n").map(e=>(0,c.Y)("p",{children:e})),u||C,(0,c.FD)("div",{className:v?"dialog-buttons-column":"dialog-buttons mt-2",ref:y,onKeyDown:k,children:[(0,c.Y)(l.A,{className:"confirm-dialog-button",isText:!0,inline:!0,onClick:w,color:m?"danger":"primary",disabled:f,children:p||Y("GeneralConfirm")}),!g&&(0,c.Y)(l.A,{className:"confirm-dialog-button",isText:!0,onClick:x,children:Y("Cancel")})]})]})})},90751(e,t,n){n.d(t,{A:()=>w});var r=n(84051),o=n(101),i=n(39351),a=n(95807),l=n(15640),s=n(87679),c=n(43336),d=n(76023),h=n(17712),u=n(39751),p=n(64493),m=n(82497);var f=n(20021);const g=.125*d.$,v=2*d.$,A=(0,r.ph)(({onChange:e,image:t,maxOutputSize:n,minOutputSize:o})=>{const[i,d]=(0,r.J0)({x:0,y:0}),[A,C]=(0,r.J0)(100),w=(0,r.li)(!1),x=(0,r.li)({x:0,y:0}),b=(0,r.li)({x:0,y:0}),{width:Y}=(0,u.A)(),y=Math.min(400,Y-2*v),N=t?Math.max(y/t.width,y/t.height):1,k=N*A/100,S=(0,r.Kr)(()=>t?{width:t.width*k,height:t.height*k}:{width:0,height:0},[t,k]),D=(e,t,n)=>{const r=y/2,o=n.width/2,i=n.height/2,a=Math.max(0,o-r),l=Math.max(0,i-r);return{x:(0,c.qE)(e,-a,a),y:(0,c.qE)(t,-l,l)}},M=e=>{w.current=!0,x.current=(0,l.A)(e),b.current={...i},document.addEventListener("mousemove",B),document.addEventListener("touchmove",B),document.addEventListener("mouseup",F),document.addEventListener("touchend",F)},B=(0,h.A)(e=>{if("touches"in e&&e.touches.length>1)return;if(!w.current)return;const{x:t,y:n}=(0,l.A)(e),r=t-x.current.x,o=n-x.current.y,i=D(b.current.x+r,b.current.y+o,S);d(i)}),F=(0,h.A)(()=>{w.current=!1,document.removeEventListener("mousemove",B),document.removeEventListener("touchmove",B),document.removeEventListener("mouseup",F),document.removeEventListener("touchend",F)}),_=(0,h.A)(e=>{const n=N*e/100,r={width:t.width*n,height:t.height*n},o=e/A,a=D(i.x*o,i.y*o,r);C(e),d(a)});if(!t)return;const L=(y-S.width)/2+i.x,R=(y-S.height)/2+i.y,I=(0,a.A)(`width: ${S.width}px`,`height: ${S.height}px`,`left: ${L}px`,`top: ${R}px`),E=(0,a.A)(`width: ${S.width}px`,`height: ${S.height}px`,`left: ${L-g}px`,`top: ${R-g}px`);return(0,f.FD)("div",{children:[(0,f.FD)("div",{className:"r_2tKzuI",style:(0,a.A)(`width: ${y}px`,`height: ${y}px`),children:[(0,f.Y)("img",{src:t.src,className:"caUABR3p",style:I,draggable:!1,onMouseDown:M,onTouchStart:M,alt:"",role:"presentation"}),(0,f.Y)("div",{className:"gR8q967h"}),(0,f.Y)("div",{className:"m_d02kUd",children:(0,f.Y)("img",{src:t.src,className:"nJUDgVTD",style:E,draggable:!1,alt:"",role:"presentation"})})]}),(0,f.FD)("div",{className:"_YQbrXkD",children:[(0,f.Y)(m.A,{className:"s73_IyYI",min:100,max:200,value:A,onChange:_}),(0,f.Y)(p.A,{className:"M0r9Gw03",round:!0,color:"primary",iconName:"check",onClick:()=>{if(!t)return;const r=y/k,a=t.width/2-r/2-i.x/k,l=t.height/2-r/2-i.y/k,c=Math.min(n,Math.max(o,r)),d=document.createElement("canvas");d.width=c,d.height=c,d.getContext("2d").drawImage(t,a,l,r,r,0,0,c,c),d.toBlob(t=>{t&&e((0,s.ti)(t,"avatar.jpg"))},"image/jpeg")},ariaLabel:"Crop"})]})]})});var C=n(22337);const w=(0,r.ph)(({file:e,onChange:t,onClose:n})=>{const r=(0,i.A)(),{image:a}=(0,o.A)(e),l=Boolean(e)&&Boolean(a);return(0,f.Y)(C.A,{isOpen:l,onClose:n,title:r("CropperTitle"),className:"CropModal",hasCloseButton:!0,isCondensedHeader:!0,children:(0,f.Y)(A,{onChange:t,image:a,maxOutputSize:1024,minOutputSize:256})})})},80401(e,t,n){n.d(t,{A:()=>h});var r=n(84051),o=n(87357),i=n(95807),a=n(15640),l=n(59030),s=n(18276);var c=n(20021);const d={x:0,y:0},h=(0,r.ph)(({children:e,id:t,onDrag:n,onDragEnd:h,style:u,knobStyle:p,isDisabled:m})=>{const f=(0,l.A)(),g=(0,r.li)(),[v,A]=(0,r.J0)({isDragging:!1,origin:d,translation:d}),C=e=>{e.stopPropagation(),e.preventDefault();const{x:t,y:n}=(0,a.A)(e);A({...v,isDragging:!0,origin:{x:t,y:n},width:g.current?.offsetWidth,height:g.current?.offsetHeight})},w=(0,r.hb)(e=>{const{x:r,y:o}=(0,a.A)(e),i={x:r-v.origin.x,y:o-v.origin.y};A(e=>({...e,translation:i})),n(i,t)},[t,n,v.origin.x,v.origin.y]),x=(0,r.hb)(()=>{A(e=>({...e,isDragging:!1,width:void 0,height:void 0})),h()},[h]);(0,r.vJ)(()=>{v.isDragging&&m&&A(e=>({...e,isDragging:!1,width:void 0,height:void 0}))},[m,v.isDragging]),(0,r.vJ)(()=>(v.isDragging?(window.addEventListener("touchmove",w),window.addEventListener("mousemove",w),window.addEventListener("touchend",x),window.addEventListener("touchcancel",x),window.addEventListener("mouseup",x)):(window.removeEventListener("touchmove",w),window.removeEventListener("mousemove",w),window.removeEventListener("touchend",x),window.removeEventListener("touchcancel",x),window.removeEventListener("mouseup",x),A(e=>({...e,translation:d}))),()=>{v.isDragging&&(window.removeEventListener("touchmove",w),window.removeEventListener("mousemove",w),window.removeEventListener("touchend",x),window.removeEventListener("touchcancel",x),window.removeEventListener("mouseup",x))}),[w,x,v.isDragging]);const b=(0,o.A)("kWQHzIMD",v.isDragging&&"k0c5WDAy"),Y=(0,r.Kr)(()=>(0,i.A)(v.isDragging&&`transform: translate(${v.translation.x}px, ${v.translation.y}px)`,v.width?`width: ${v.width}px`:void 0,v.height?`height: ${v.height}px`:void 0,u),[u,v.height,v.isDragging,v.translation.x,v.translation.y,v.width]);return(0,c.FD)("div",{style:Y,className:b,ref:g,children:[e,!m&&(0,c.Y)("div",{"aria-label":f("i18n_dragToSort"),tabIndex:0,role:"button",className:(0,o.A)("UpzQzcvs","div-button","draggable-knob"),onMouseDown:C,onTouchStart:C,style:p,children:(0,c.Y)(s.A,{name:"sort",className:"JIThxQAL"})})]})})},22699(e,t,n){n.d(t,{A:()=>s});var r=n(84051),o=n(17712),i=n(64493),a=n(71429),l=n(20021);const s=({trigger:e,className:t,bubbleClassName:n,children:s,transformOriginX:c,transformOriginY:d,positionX:h="left",positionY:u="top",footer:p,forceOpen:m,withPortal:f,onOpen:g,onClose:v,onTransitionEnd:A,onMouseEnterBackdrop:C,onHide:w,autoClose:x=!0})=>{const b=(0,r.li)(),Y=(0,r.li)(),[y,N]=(0,r.J0)(!1),[k,S]=(0,r.J0)(),D=(0,r.hb)(()=>{N(!1),v?.()},[v]),M=(0,r.Kr)(()=>e||(({onTrigger:e,isOpen:t})=>(0,l.Y)(i.A,{round:!0,size:"smaller",color:"translucent",className:t?"active":"",iconName:"more",onClick:e,ariaLabel:"More actions"})),[e]),B=(0,o.A)(()=>Y.current),F=(0,o.A)(()=>document.body),_=(0,o.A)(()=>b.current?.querySelector(".bubble")),L=(0,o.A)(()=>({withPortal:!0}));return(0,l.FD)("div",{ref:Y,className:`DropdownMenu ${t||""}`,onKeyDown:e=>{const t=b.current;if(!y||40!==e.keyCode||!t)return;const n=document.activeElement,r=Array.from(t.children);n&&-1!==r.indexOf(n)||r[0].focus()},onTransitionEnd:A,children:[M({onTrigger:()=>{if(!y&&f&&Y.current){const e=Y.current.getBoundingClientRect();S({x:e.left,y:e.bottom})}N(!y),y?v?.():g?.()},isOpen:y}),(0,l.Y)(a.A,{ref:b,isOpen:y||Boolean(m),className:t||"",bubbleClassName:n||"",transformOriginX:c,transformOriginY:d,positionX:h,positionY:u,footer:p,autoClose:x,withPortal:f,onClose:D,onCloseAnimationEnd:w,onMouseEnterBackdrop:C,...f&&k?{anchor:k,getTriggerElement:B,getRootElement:F,getMenuElement:_,getLayout:L}:void 0,children:s})]})}},46144(e,t,n){n.d(t,{A:()=>p});var r=n(84051),o=n(66644),i=n(87357),a=n(76023),l=n(37661),s=n(39351),c=n(17712),d=n(93545);var h=n(20021);const u=4.1875*a.$,p=(0,r.ph)(({text:e,collapsedHeight:t=u,className:n})=>{const p=(0,s.A)(),[m,f,g]=(0,l.A)(!1),[v,A]=(0,r.J0)(),[C,w]=(0,r.J0)(!1),x=(0,r.li)(),b=e||"",Y=C,y=(0,c.A)(()=>{(0,o.YS)(()=>{x.current&&w(x.current.scrollHeight>t)})});(0,r.vJ)(()=>{y()},[b,t,y]),(0,d.A)(x,y);const N=(0,c.A)(()=>{m?g():(x.current&&A(x.current.scrollHeight),f())});return(0,h.FD)("div",{className:(0,i.A)("wQnkm0PP",!m&&Y&&"zTnTr5it",n),children:[(0,h.Y)("div",{className:"cIdCum0y",style:m&&v?`height: ${v}px`:`height: ${t/a.$}rem`,children:(0,h.Y)("span",{ref:x,className:"wAD3_xQA",children:b})}),Y&&(0,h.Y)("span",{className:"wRHZDd4K",children:(0,h.Y)("span",{className:"IZhl7cdQ",onClick:N,children:p(m?"TextShowLess":"TextShowMore")})})]})})},12933(e,t,n){n.d(t,{A:()=>s});var r=n(87357),o=n(59030),i=n(59324),a=n(64493),l=n(20021);const s=({isShown:e,iconName:t,className:n,style:s,color:c="primary",ariaLabel:d,disabled:h,isLoading:u,onClick:p})=>{const m=(0,o.A)(),f=(0,r.A)("FloatingActionButton",e&&"revealed",n);return(0,l.Y)(a.A,{className:f,style:s,color:c,round:!0,disabled:h,onClick:e&&!h?p:void 0,ariaLabel:d,tabIndex:-1,isRtl:m.isRtl,children:(0,l.Y)(i.A,{iconName:t,isLoading:u})})}},98028(e,t,n){n.d(t,{A:()=>v});var r=n(84051),o=n(96454),i=n(87357),a=n(10722),l=n(11217),s=n(37661),c=n(17712),d=n(72167),h=n(18276),u=n(71429),p=n(24433),m=n(60859);const f={folder:"r_wWhyY_","no-page-transitions":"WddG2sPd",noPageTransitions:"WddG2sPd",inner:"k59cp8Xp",title:"GfrkwlNw",icon:"Ehg2aEWm",badge:"XwWX8ZRp","badge-active":"JrMkpoeL",badgeActive:"JrMkpoeL",blocked:"xqOTsTUl",active:"y8ZeQOsX"};var g=n(20021);const v=({className:e,title:t,isActive:n,isBlocked:v,badgeCount:A,isBadgeActive:C,contextActions:w,contextRootElementSelector:x,icon:b,clickArg:Y,onClick:y})=>{const N=(0,r.li)(),[k,S,D]=(0,s.A)(),{contextMenuAnchor:M,handleContextMenu:B,handleBeforeContextMenu:F,handleContextMenuClose:_,handleContextMenuHide:L,isContextMenuOpen:R}=(0,a.A)(N,!w),{handleClick:I,handleMouseDown:E}=(0,l.Q)(e=>{!w||e.button!==o.w3.Secondary&&y||F(e),"mousedown"===e.type&&e.button!==o.w3.Main||y?.(Y)}),T=(0,c.A)(()=>N.current),H=(0,c.A)(()=>x?N.current.closest(x):document.body),O=(0,c.A)(()=>document.querySelector(`.${f.contextMenu} .bubble`)),$=(0,c.A)(()=>({withPortal:!0}));return(0,g.FD)("div",{className:(0,i.A)(f.folder,n&&f.active,e),onClick:I,onMouseDown:E,onContextMenu:B,onMouseEnter:S,onMouseLeave:D,ref:N,children:[(0,g.FD)("div",{className:f.icon,children:[(0,g.Y)(d.A,{emoji:"string"==typeof b?b:void 0,customEmojiId:"object"==typeof b?b.documentId:void 0,shouldAnimate:k}),Boolean(A)&&(0,g.Y)("span",{className:(0,i.A)(f.badge,C&&f.badgeActive),children:A})]}),(0,g.Y)("span",{className:f.inner,children:(0,g.FD)("div",{className:f.title,children:[v&&(0,g.Y)(h.A,{name:"lock-badge",className:f.blocked}),t]})}),w&&void 0!==M&&(0,g.Y)(u.A,{isOpen:R,anchor:M,getTriggerElement:T,getRootElement:H,getMenuElement:O,getLayout:$,className:f.contextMenu,autoClose:!0,onClose:_,onCloseAnimationEnd:L,withPortal:!0,children:w.map(e=>"isSeparator"in e?(0,g.Y)(m.A,{},e.key||"separator"):(0,g.Y)(p.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:e.title},e.title))})]})}},46222(e,t,n){n.d(t,{A:()=>u});var r=n(84051),o=n(89925),i=n(66644),a=n(96454),l=n(95807),s=n(9718),c=n(37836),d=n(17712),h=n(20021);const u=({ref:e,style:t,className:n,items:u,itemSelector:p=".ListItem",preloadBackwards:m=20,sensitiveArea:f=800,withAbsolutePositioning:g,maxHeight:v,noScrollRestore:A=!1,noScrollRestoreOnTop:C=!1,noFastList:w,cacheBuster:x,beforeChildren:b,children:Y,scrollContainerClosest:y,onLoadMore:N,onScroll:k,onWheel:S,onClick:D,onKeyDown:M})=>{let B=(0,r.li)();e&&(B=e);const F=(0,r.li)({}),[_,L]=(0,r.Kr)(()=>N?[(0,c.sg)((e=!1)=>{N({direction:o.TN.Backwards,noScroll:e})},1e3,!0,!1),(0,c.sg)(()=>{N({direction:o.TN.Forwards})},1e3,!0,!1)]:[],[N,u]);(0,r.vJ)(()=>{const e=y?B.current.closest(y):B.current;if(!_||!e)return;if(m>0&&(!u||u.length<m))return void _(!0);const{scrollHeight:t,clientHeight:n}=e;n&&t<n&&_()},[u,_,m,y]),(0,r.Nf)(()=>{const e=y?B.current.closest(y):B.current,t=B.current;(0,i.gm)(()=>{const n=F.current;let r;if(n.listItemElements=t.querySelectorAll(p),n.currentAnchor&&Array.from(n.listItemElements).includes(n.currentAnchor)){const{scrollTop:t}=e,o=n.currentAnchor.getBoundingClientRect().top;r=t+(o-n.currentAnchorTop)}else{const e=n.listItemElements[0];e&&(n.currentAnchor=e,n.currentAnchorTop=e.getBoundingClientRect().top)}if(g||A)return;const{scrollTop:o}=e;return C&&0===o?void 0:()=>{(0,s.A)(e,r),n.isScrollTopJustUpdated=!0}})},[u,p,A,C,x,g,y]);const R=(0,d.A)(e=>{if(L&&_){const{isScrollTopJustUpdated:e,currentAnchor:t,currentAnchorTop:n}=F.current,r=F.current.listItemElements;if(e)return void(F.current.isScrollTopJustUpdated=!1);const o=r.length,i=y?B.current.closest(y):B.current,{scrollTop:a,scrollHeight:l,offsetHeight:s}=i,c=a<=(o?r[0].offsetTop:0)+f,d=(o?r[o-1].offsetTop+r[o-1].offsetHeight:l)-(a+s)<=f;let h=!1;if(c){const e=r[0];if(e){const r=e.getBoundingClientRect().top,o=t?.offsetParent&&t!==e?t.getBoundingClientRect().top:r;t&&void 0!==n&&o>n&&(F.current.currentAnchor=e,F.current.currentAnchorTop=r,h=!0,L())}}if(d){const e=r[o-1];if(e){const r=e.getBoundingClientRect().top,o=t?.offsetParent&&t!==e?t.getBoundingClientRect().top:r;t&&void 0!==n&&o<n&&(F.current.currentAnchor=e,F.current.currentAnchorTop=r,h=!0,_())}}if(!h)if(t?.offsetParent)F.current.currentAnchorTop=t.getBoundingClientRect().top;else{const e=r[0];e&&(F.current.currentAnchor=e,F.current.currentAnchorTop=e.getBoundingClientRect().top)}}k&&k(e)});return(0,r.Nf)(()=>{const e=y?B.current.closest(y):B.current;if(!e)return;const t=e=>R(e);return e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t)}},[R,y]),(0,h.FD)("div",{ref:B,className:n,style:t,teactFastList:!w&&!g,onClick:D,onKeyDown:M,onWheel:S,children:[b,g&&u?.length?(0,h.Y)("div",{teactFastList:!w,style:(0,l.A)("position: relative",a.Ni&&`height: ${v}px`),children:Y}):Y]})}},40664(e,t,n){n.d(t,{A:()=>s});var r=n(84051),o=n(63495),i=n(87357),a=n(39351),l=n(20021);const s=(0,r.ph)(({ref:e,id:t,className:n,value:r,label:s,error:c,success:d,disabled:h,readOnly:u,placeholder:p,autoComplete:m="off",inputMode:f,maxLength:g,tabIndex:v,title:A,teactExperimentControlled:C,onChange:w,onInput:x,onKeyPress:b,onKeyDown:Y,onBlur:y,onPaste:N,onClick:k})=>{const S=(0,a.A)(),D=c||d||s,M=(0,i.A)("input-group",r&&"touched",c?"error":d&&"success",h&&"disabled",u&&"disabled",D&&"with-label",n);return(0,l.FD)("div",{className:M,dir:S.isRtl?"rtl":void 0,children:[(0,l.Y)("input",{ref:e,className:"form-control",type:"text",id:t,dir:"auto",value:r||"",tabIndex:v,placeholder:p,maxLength:g,autoComplete:m,spellCheck:!o.Vq&&void 0,inputMode:f,disabled:h,readOnly:u,onChange:w,onInput:x,onKeyPress:b,onKeyDown:Y,onBlur:y,onPaste:N,"aria-label":D,title:A,teactExperimentControlled:C,onClick:k}),D&&(0,l.Y)("label",{htmlFor:t,children:D})]})})},22720(e,t,n){n.d(t,{A:()=>w});var r=n(84051),o=n(66644),i=n(96454),a=n(87357),l=n(4961),s=n(10722),c=n(11217),d=n(37661),h=n(39351),u=n(17712),p=n(18276),m=n(64493),f=n(71429),g=n(24433),v=n(60859),A=n(42452),C=n(20021);const w=({ref:e,buttonRef:t,icon:n,iconClassName:w,leftElement:x,buttonClassName:b,menuBubbleClassName:Y,secondaryIcon:y,secondaryIconClassName:N,rightElement:k,className:S,style:D,children:M,disabled:B,allowDisabledClick:F,ripple:_,narrow:L,inactive:R,focus:I,destructive:E,withPrimaryColor:T,multiline:H,isStatic:O,allowSelection:$,withColorTransition:P,contextActions:J,withPortalForMenu:K,href:z,nonInteractive:q,onClick:G,clickArg:X,onMouseDown:V,onContextMenu:W,onSecondaryIconClick:U,onDragEnter:Z,onDragLeave:j})=>{let Q=(0,r.li)();e&&(Q=e);const ee=(0,r.li)(),[te,ne,re]=(0,d.A)(),{isContextMenuOpen:oe,contextMenuAnchor:ie,handleBeforeContextMenu:ae,handleContextMenu:le,handleContextMenuClose:se,handleContextMenuHide:ce}=(0,s.A)(Q,!J),de=(0,u.A)(()=>Q.current),he=(0,u.A)(()=>Q.current.closest(".custom-scroll")),ue=(0,u.A)(()=>ee.current),pe=(0,u.A)(()=>({withPortal:K})),me=(0,u.A)(e=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===i.w3.Main){if(z&&!G)return;e.preventDefault()}}),fe=(0,u.A)(e=>{if(!B||F){if(z){if((e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===i.w3.Main||e.button===i.w3.Auxiliary)return;G&&e.preventDefault()}G&&(G(e,X),i.TF&&!_&&(ne(),(0,o.YS)(re)))}}),{handleClick:ge,handleMouseDown:ve}=(0,c.Q)(e=>{B&&!F||0!==e.button||!U&&!J||(e.stopPropagation(),U?U(e):le(e))}),Ae=(0,u.A)(e=>{R||i.TF||(!J||e.button!==i.w3.Secondary&&G||ae(e),e.button===i.w3.Main&&(G?fe(e):le(e)))}),Ce=(0,h.A)(),we=(0,a.A)("ListItem",S,$&&"allow-selection",_&&"has-ripple",L&&"narrow",B&&"disabled",F&&"click-allowed",R&&"inactive",ie&&"has-menu-open",I&&"focus",E&&"destructive",T&&"primary",H&&"multiline",O&&"is-static",P&&"with-color-transition"),xe=z?"a":"div";return(0,C.FD)("div",{ref:Q,className:we,dir:Ce.isRtl?"rtl":void 0,style:D,onMouseDown:V,onDragEnter:Z,onDragLeave:j,children:[(0,C.FD)(xe,{className:(0,a.A)("ListItem-button",te&&"active",b),role:O||z?void 0:"button",href:z,ref:t,rel:z?"noopener noreferrer":void 0,tabIndex:O?void 0:0,onClick:!R&&i.TF?fe:me,onMouseDown:Ae,onContextMenu:W||(!R&&J?le:void 0),"aria-disabled":B||void 0,children:[!B&&!R&&_&&(0,C.Y)(A.A,{}),x,n&&(0,C.Y)(p.A,{name:n,className:(0,a.A)("ListItem-main-icon",w)}),H&&(0,C.Y)("div",{className:"multiline-item",children:M}),!H&&M,y&&(0,C.Y)(m.A,{nonInteractive:q,className:(0,a.A)("secondary-icon",N),round:!0,color:"translucent",size:"smaller",onClick:ge,onMouseDown:ve,iconName:y}),k]}),J&&void 0!==ie&&(0,C.Y)(f.A,{ref:ee,isOpen:oe,anchor:ie,getTriggerElement:de,getRootElement:he,getMenuElement:ue,getLayout:pe,className:"ListItem-context-menu with-menu-transitions",autoClose:!0,onClose:se,onCloseAnimationEnd:ce,withPortal:K,bubbleClassName:Y,children:J.map(e=>"isSeparator"in e?(0,C.Y)(v.A,{},e.key||"separator"):(0,C.Y)(g.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:(0,C.Y)("span",{className:"list-item-ellipsis",children:(0,l.A)(e.title)})},e.title))})]})}},52745(e,t,n){n.d(t,{A:()=>l});var r=n(84051),o=n(87357),i=n(97422),a=n(20021);const l=(0,r.ph)(({color:e="blue",backgroundColor:t,className:n,onClick:r})=>(0,a.Y)("div",{className:(0,o.A)("Loading",r&&"interactive",n),onClick:r,children:(0,a.Y)(i.A,{color:e,backgroundColor:t})}))},60859(e,t,n){n.d(t,{A:()=>a});var r=n(87357);const o={root:"h039vb1K",thin:"NGKaFgra",thick:"_BdnjPEa"};var i=n(20021);const a=({className:e,size:t="thin"})=>(0,i.Y)("div",{className:(0,r.A)(o.root,o[t],e)})},22337(e,t,n){n.d(t,{U:()=>S,A:()=>D});var r=n(84051),o=n(87357),i=n(52674),a=n(14680),l=n(29441),s=n(10722),c=n(1455),d=n(26072),h=n(17712),u=n(37859),p=n(59030),m=n(34201),f=n(64493),g=n(71429),v=n(13439),A=n(86046),C=n(17142),w=n(48775),x=n(72730),b=n(39351),Y=n(96530);var y=n(20021);const N=(0,r.ph)((0,v.EK)(e=>{const{stars:t,ton:n}=e;return{starBalance:t?.balance,tonBalance:n?.balance,tonUsdRate:e.appConfig.tonUsdRate}})(function({starBalance:e,tonBalance:t,tonUsdRate:n,isModalOpen:r,currency:i,onCloseAnimationEnd:a}){const{openStarsBalanceModal:l}=(0,v.ko)(),s=(0,b.A)(),c="TON"===i,d=c?t:e,u=!!r&&Boolean(d),{ref:p,shouldRender:f}=(0,m.A)({isOpen:u,onCloseAnimationEnd:a,withShouldRender:!0}),g=(0,x.A)(p,Boolean(f&&d)),N=(0,h.A)(()=>{l(c?{currency:"TON"}:{})});if(f&&d)return(0,y.FD)("div",{className:(0,o.A)("UtvP6LQ2",!g&&"xYkfrKnb"),ref:p,children:[(0,y.Y)("div",{children:s("ModalStarsBalanceBarDescription",c?{stars:(0,w.Ms)(s,(0,C.wD)(d.amount))}:{stars:(0,w.U2)(s,(0,A.ZF)(s,d))},{withNodes:!0,withMarkdown:!0})}),(0,y.FD)("div",{children:[c&&Boolean(n)&&(0,y.Y)("div",{className:"VMKBAQXy",style:"color: var(--color-text-secondary)",children:`${(0,C.Ad)((0,C.C)(d.amount,n,!0),"USD",s.code)}`}),!c&&(0,y.Y)(Y.A,{className:"GGPosAVA",isPrimary:!0,onClick:N,children:s("GetMoreStarsLinkText",void 0,{withNodes:!0,specialReplacement:w.hG})})]})]})}));var k=n(3325);const S=200,D=e=>{const{dialogRef:t,isOpen:n,noBackdropClose:v,noFreezeOnClose:A,isNativeDialog:C,onClose:w,onCloseAnimationEnd:x,onEnter:b}=e,{ref:Y,shouldRender:D}=(0,m.A)({isOpen:n,withShouldRender:!0,onCloseAnimationEnd:x}),M=!A&&!n,{title:B,isLowStackPriority:F,header:_,children:L,className:R,contentClassName:I,headerClassName:E,dialogClassName:T,isSlim:H,hasCloseButton:O,hasAbsoluteCloseButton:$,absoluteCloseButtonColor:P="translucent",isBackButton:J,noBackdrop:K,style:z,dialogStyle:q,dialogContent:G,moreMenuItems:X,headerRightToolBar:V,withBalanceBar:W,isCondensedHeader:U,currencyInBalanceBar:Z="XTR"}=(0,c.A)(e,M),j=(0,r.li)(),Q=(0,r.li)(),ee=(0,r.li)(),{isContextMenuOpen:te,contextMenuAnchor:ne,handleContextMenu:re,handleContextMenuClose:oe,handleContextMenuHide:ie}=(0,s.A)(Q),ae=t||j,le=Y,se=Y,ce=(0,h.A)(()=>ae.current),de=(0,h.A)(()=>Q.current),he=(0,h.A)(()=>ee.current),ue=(0,h.A)(()=>({withPortal:!0})),pe=O||$;(0,r.vJ)(()=>{if(n)return(0,a.FD)(),a.wb},[n]);const me=(0,h.A)(e=>!!b&&(e.preventDefault(),b(),!0));(0,r.vJ)(()=>n?(0,i.A)({onEsc:w,onEnter:me}):void 0,[n,w,me]),(0,r.vJ)(()=>n&&Y.current?(0,l.A)(Y.current):void 0,[n,Y]),(0,r.Nf)(()=>{if(!C||!D)return;const e=se.current;return e?(e.open||e.showModal(),()=>{e.open&&e.close()}):void 0},[C,se,D]),(0,r.vJ)(()=>{if(!C||!D)return;const e=se.current;if(!e)return;const t=e=>{e.preventDefault(),n&&w()};return e.addEventListener("cancel",t),()=>{e.removeEventListener("cancel",t)}},[C,n,se,w,D]),(0,d.A)({isActive:n,onBack:w}),(0,u.A)(([e])=>(document.body.classList.toggle("has-open-dialog",Boolean(n)),(n||!n&&void 0!==e)&&(0,r.VK)(S),()=>{document.body.classList.remove("has-open-dialog")}),[n]);const fe=(0,p.A)();if(!D)return;function ge(){if(_)return _;const e=(0,o.A)("animated-close-icon",J&&"state-back"),t=pe?(0,y.Y)(f.A,{className:(0,o.A)($&&"modal-absolute-close-button"),round:!0,color:P,size:"tiny",ariaLabel:fe(J?"Back":"Close"),onClick:w,children:(0,y.Y)("div",{className:e})}):void 0;return B?(0,y.FD)("div",{className:(0,o.A)("modal-header",E,U&&"modal-header-condensed"),children:[t,(0,y.Y)("div",{className:"modal-title",children:B})]}):t}const ve=(0,o.A)("Modal",R,K&&"transparent-backdrop",H&&"slim",F&&"low-priority",W&&"with-balance-bar"),Ae=(0,o.A)("modal-dialog",T);function Ce(){return(0,y.Y)(y.FK,{children:(0,y.FD)("div",{className:"modal-container",children:[(0,y.Y)("div",{className:"modal-backdrop",onClick:v?void 0:w}),W&&(0,y.Y)(N,{isModalOpen:n,currency:Z}),(0,y.FD)("div",{className:Ae,ref:ae,style:q,children:[ge(),V,Boolean(X)&&(0,y.FD)(y.FK,{children:[(0,y.Y)(f.A,{ref:Q,className:"modal-more-button",round:!0,color:P,size:"tiny",iconName:"more",ariaLabel:fe("AriaMoreButton"),onClick:re,onContextMenu:re}),(0,y.Y)(g.A,{ref:ee,isOpen:te,anchor:ne,autoClose:!0,withPortal:!0,positionX:"right",onClose:oe,onCloseAnimationEnd:ie,getRootElement:ce,getTriggerElement:de,getMenuElement:he,getLayout:ue,children:X})]}),G,(0,y.Y)("div",{className:(0,o.A)("modal-content custom-scroll",I),style:z,children:L})]})]})})}return(0,y.Y)(k.A,{children:C?(0,y.Y)("dialog",{ref:se,className:ve,"aria-modal":"true",children:Ce()}):(0,y.Y)("div",{ref:le,className:ve,tabIndex:-1,role:"dialog",children:Ce()})})}},34396(e,t,n){n.d(t,{A:()=>g});var r=n(84051),o=n(66644),i=n(87357),a=n(76023),l=n(37661),s=n(39351),c=n(17712),d=n(14745),h=n(39751),u=n(18276),p=n(71429),m=n(24433),f=n(20021);const g=({icon:e,customIcon:t,submenuIcon:n,className:g,children:v,submenu:A,submenuClassName:C,disabled:w,destructive:x,ariaLabel:b,footer:Y})=>{const y=(0,s.A)(),N=(0,r.li)(),k=(0,r.li)(),S=(0,r.li)(),D=(0,d.A)(),M=(0,r.li)(!1),[B,F,_]=(0,l.A)(!1);(0,r._W)(()=>{clearTimeout(k.current),clearTimeout(S.current)});const[L,R]=(0,r.J0)(),{isResizing:I}=(0,h.A)(),E=(0,c.A)(()=>{(0,o.YS)(()=>{if(!N.current)return;const e=N.current.getBoundingClientRect(),t=a.$;R({x:y.isRtl?e.left+t:e.right-t,y:e.top,width:e.width-2*t,height:e.height})})});(0,r.vJ)(()=>{B&&!I&&E()},[B,y.isRtl,E,I]);const T=(0,c.A)(()=>{clearTimeout(S.current),S.current=void 0}),H=(0,c.A)(()=>{clearTimeout(k.current),k.current=void 0}),O=(0,c.A)(()=>{H(),T(),S.current=window.setTimeout(()=>{S.current=void 0;const e=N.current?.closest(".bubble");e?.classList.contains("closing")||F()},150)}),$=(0,c.A)(()=>{T(),H(),k.current=window.setTimeout(()=>{_(),k.current=void 0},150)}),P=(0,c.A)(()=>{w||O()}),J=(0,c.A)(()=>{T(),H()}),K=(0,c.A)(()=>{$()}),z=(0,c.A)(()=>{const e=N.current?.closest(".Menu");if(e){const t=e.querySelector(".backdrop");if(t){const e=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window});t.dispatchEvent(e)}}}),q=(0,c.A)(()=>{M.current||(M.current=!0,T(),H(),_(),z(),setTimeout(()=>{M.current=!1},100))}),G=(0,c.A)(()=>N.current),X=(0,c.A)(()=>document.body),V=(0,c.A)(()=>document.getElementById(D)?.querySelector(".bubble")),W=(0,c.A)(()=>({withPortal:!0})),U=(0,c.A)(e=>{e.stopPropagation(),w||B||F()});return(0,f.Y)("div",{onMouseEnter:P,onMouseLeave:$,ref:N,children:(0,f.FD)(m.A,{icon:e,customIcon:t,className:(0,i.A)(g,"submenu"),disabled:w,destructive:x,ariaLabel:b,onClick:U,children:[v,(0,f.Y)(u.A,{name:n||(y.isRtl?"previous":"next"),className:"submenu-icon"}),L&&(0,f.Y)(p.A,{id:D,isOpen:B,className:(0,i.A)("submenu",C),anchor:L,positionX:y.isRtl?"left":"right",getTriggerElement:G,getRootElement:X,getMenuElement:V,getLayout:W,autoClose:!0,nested:!0,withPortal:!0,footer:Y,onClose:q,onMouseEnter:J,onMouseLeave:K,children:A})]})})}},35913(e,t,n){n.d(t,{A:()=>m});var r=n(84051),o=n(66644),i=n(19822),a=n(87357),l=n(87094),s=n(41257),c=n(38691),d=n(18276),h=n(20021);const u={s:42,m:48,l:54,xl:52},p=.05,m=(0,r.ph)(({progress:e=0,size:t="l",square:n,transparent:m,noCross:f,rotationOffset:g,withColor:v,onClick:A})=>{const C=(0,r.li)(),w=u[t],x=(0,s.i)(e),b=(0,c.A)(),Y=(0,l.A)(C,void 0,!v);(0,r.vJ)(()=>{let e,n,r=!0,a=p;(0,i.i0)(()=>{if(!C.current)return!1;x.current!==n&&(a=Math.min(Math.max(p,n||0),1),e=Date.now(),n=x.current);const o=Math.min(Math.max(p,x.current),1),l=Math.min(1,(Date.now()-e)/600),s=i.qM.easeOutQuad(l),c=a+(o-a)*s;return function(e,t,n,r,o,i,a=!1,l){const s=t/2,c=(t-n)/2-2*i,d=l??Date.now()%2e3/2e3,h=2*Math.PI*d,u=h+2*Math.PI*o,p=e.getContext("2d");a&&(e.width=t,e.height=t,p.lineCap="round",p.strokeStyle=r,p.lineWidth=n),p.clearRect(0,0,t,t),p.beginPath(),p.arc(s,s,c,h,u),p.stroke()}(C.current,w*b,("xl"===t?3:2)*b,Y??"white",c,b,r,g),r=!1,c<1},o.RK)},[x,t,w,b,g,Y]);const y=(0,a.A)(`ProgressSpinner size-${t}`,m&&"transparent",n&&"square",f&&"no-cross");return(0,h.FD)("div",{className:y,onClick:A,children:[!f&&(0,h.Y)(d.A,{name:"close"}),(0,h.Y)("canvas",{ref:C,className:"ProgressSpinner_canvas",style:`width: ${w}; height: ${w}px;`})]})})},24956(e,t,n){n.d(t,{A:()=>s});var r=n(84051),o=n(87357),i=n(39351),a=n(97422),l=n(20021);const s=(0,r.ph)(({id:e,label:t,subLabel:n,subLabelClassName:r,value:s,name:c,checked:d,disabled:h,hidden:u,isLoading:p,className:m,onlyInput:f,withIcon:g,isLink:v,onChange:A,onSubLabelClick:C,isCanCheckedInDisabled:w})=>{const x=(0,i.A)(),b=(0,o.A)("Radio",m,h&&"disabled",u&&"hidden-widget",g&&"with-icon",p&&"loading",f&&"onlyInput",Boolean(n)&&"withSubLabel",w&&"canCheckedInDisabled");return(0,l.FD)("label",{className:b,dir:x.isRtl?"rtl":void 0,children:[(0,l.Y)("input",{type:"radio",name:c,value:s,id:e,checked:d,onChange:A,disabled:h||u}),(0,l.FD)("div",{className:"Radio-main",children:[(0,l.Y)("span",{className:"label",dir:x.isRtl?"auto":void 0,children:t}),Boolean(n)&&(0,l.Y)("span",{className:(0,o.A)(r,"subLabel",v?"subLabelLink":void 0),dir:x.isRtl?"auto":void 0,onClick:v?C:void 0,children:n})]}),p&&(0,l.Y)(a.A,{})]})})},1087(e,t,n){n.d(t,{A:()=>s});var r=n(84051),o=n(87357),i=n(17712),a=n(24956),l=n(20021);const s=(0,r.ph)(({id:e,name:t,options:n,selected:s,disabled:c,loadingOption:d,onChange:h,onClickAction:u,subLabelClassName:p,isLink:m,withIcon:f,subLabel:g,className:v})=>{const A=(0,r.hb)(e=>{const{value:t}=e.currentTarget;h(t,e)},[h]),C=(0,i.A)(e=>()=>{u?.(e)});return(0,l.Y)("div",{id:e,className:(0,o.A)("radio-group",v),children:n.map(e=>(0,l.Y)(a.A,{name:t,label:e.label,subLabel:g||e.subLabel,subLabelClassName:p,value:e.value,checked:e.value===s,hidden:e.hidden,isCanCheckedInDisabled:e.isCanCheckedInDisabled,disabled:c,withIcon:f,isLoading:d?d===e.value:void 0,className:e.className,onChange:A,onSubLabelClick:C(e.value),isLink:m}))})})},82497(e,t,n){n.d(t,{A:()=>l});var r=n(84051),o=n(87357),i=n(39351),a=n(20021);const l=(0,r.ph)(({options:e,min:t=0,max:n=(e?e.length-1:100),step:l=1,label:s,value:c,disabled:d,readOnly:h,bold:u,className:p,renderValue:m,onChange:f,isCenteredLayout:g})=>{const v=(0,i.A)(),A=(0,r.hb)(e=>{f(Number(e.currentTarget.value))},[f]),C=(0,o.A)(p,"RangeSlider",d&&"disabled",h&&"readOnly",u&&"bold"),w=(0,r.Kr)(()=>e?c/(e.length-1)*100:(c-t)/((n-t)/l)*100,[e,c,n,t,l]);return(0,a.FD)("div",{className:C,children:[g?(0,a.Y)("div",{className:"slider-top-row",dir:v.isRtl?"rtl":void 0,children:!e&&(0,a.FD)(a.FK,{children:[(0,a.Y)("span",{className:"value-min",dir:"auto",children:t}),(0,a.Y)("span",{className:"label",dir:"auto",children:m?m(c):c}),(0,a.Y)("span",{className:"value-max",dir:"auto",children:n})]})}):s?(0,a.FD)("div",{className:"slider-top-row",dir:v.isRtl?"rtl":void 0,children:[(0,a.Y)("span",{className:"label",dir:"auto",children:s}),!e&&(0,a.Y)("span",{className:"value",dir:"auto",children:m?m(c):c})]}):void 0,(0,a.FD)("div",{className:"slider-main",children:[(0,a.Y)("div",{className:"slider-fill-track",style:`width: ${w}%`}),(0,a.Y)("input",{min:t,max:n,value:c,step:l,type:"range",className:"RangeSlider__input",onChange:A}),e&&(0,a.Y)("div",{className:"slider-options",children:e.map((e,t)=>(0,a.Y)("div",{className:(0,o.A)("slider-option",t===c&&"active"),onClick:()=>f(t),children:e}))})]})]})})},11124(e,t,n){n.d(t,{A:()=>a});var r=n(84051),o=n(87357);var i=n(20021);const a=(0,r.ph)(({marks:e,onChange:t,rangeCount:n})=>{const a=(0,r.li)(),l=(0,r.Kr)(()=>e.indexOf(n),[e,n]),s=(0,r.Kr)(()=>e.indexOf(n).toString(),[e,n]);return(0,r.Nf)(()=>{if(a.current){const t=l/(e.length-1)*100,n=t/2;a.current.style.setProperty("--fill-percentage",`${t}%`),a.current.style.setProperty("--thumb-offset",`${n}%`)}},[l,e]),(0,i.Y)("div",{className:"s8NMMSES",children:(0,i.Y)("form",{children:(0,i.FD)("div",{className:"i_wrxmyh",children:[(0,i.Y)("div",{className:"O7SI4r_Y",children:e.map((e,t)=>{const n=t<=l;return(0,i.Y)("div",{className:(0,o.A)("b6UDc3zh",n?"VELPJsJ0":"K8NtimIi")},e)})}),(0,i.Y)("div",{className:"bVlnaLCI",children:e.map(e=>(0,i.Y)("div",{className:(0,o.A)("AFFaq4eZ",n===e&&"cuogxYPG"),children:e},e))}),(0,i.Y)("input",{ref:a,type:"range",className:"H_rMZrqn",min:"0",max:e.length-1,value:s,onChange:n=>{const r=parseInt(n.target.value,10),o=e[r];t(o)},step:"1"})]})})})})},66469(e,t,n){n.d(t,{A:()=>d});var r=n(84051),o=n(96454),i=n(17712),a=n(64493),l=n(20021);let s,c=!0;const d=({onActivate:e,noClickActivation:t,...n})=>{const d=(0,r.li)(!1),h=(0,i.A)(t=>{if(d.current=!0,c)return c=!1,void e(t);s&&(clearTimeout(s),s=void 0),s=window.setTimeout(()=>{d.current&&e(t)},200)}),u=(0,i.A)(()=>{d.current=!1}),p=(0,i.A)(t=>{d.current=!0,e(t)});return(0,l.Y)(a.A,{...n,onMouseEnter:o.TF?void 0:h,onMouseLeave:o.TF?void 0:u,onClick:o.TF?p:t?void 0:e})}},36393(e,t,n){n.d(t,{A:()=>g});var r=n(84051),o=n(63495),i=n(87357),a=n(37661),l=n(79174),s=n(39351),c=n(17712),d=n(59030),h=n(18276),u=n(64493),p=n(52745),m=n(41036),f=n(20021);const g=(0,r.ph)(({ref:e,children:t,resultsItemSelector:n,value:g,inputId:v,className:A,focused:C,isLoading:w=!1,spinnerColor:x,spinnerBackgroundColor:b,placeholder:Y,disabled:y,autoComplete:N,canClose:k,autoFocusSearch:S,hasUpButton:D,hasDownButton:M,teactExperimentControlled:B,withBackIcon:F,onChange:_,onStartBackspace:L,onReset:R,onFocus:I,onBlur:E,onClick:T,onUpClick:H,onDownClick:O,onSpinnerClick:$,onEnter:P})=>{let J=(0,r.li)();e&&(J=e);const[K,z,q]=(0,a.A)(C);(0,l.A)(J,S,q),(0,r.vJ)(()=>{J.current&&(C?J.current.focus():J.current.blur())},[C,Y]);const G=(0,d.A)(),X=(0,s.A)();function V(){z(),I?.()}const W=(0,c.A)(e=>{if("Enter"===e.key){if(P)return e.preventDefault(),void P();if(n){const e=document.querySelector(n);e&&e.focus()}}if(n&&"ArrowDown"===e.key){const e=document.querySelector(n);e&&e.focus()}"Backspace"===e.key&&0===e.currentTarget.selectionStart&&0===e.currentTarget.selectionEnd&&L?.()});return(0,f.FD)("div",{className:(0,i.A)("SearchInput",A,K&&"has-focus"),onClick:T,dir:X.isRtl?"rtl":void 0,children:[(0,f.Y)(m.Ay,{name:"fade",shouldCleanup:!0,activeKey:Number(!w&&!F),className:"icon-container-left",slideClassName:"icon-container-slide",children:w&&!F?(0,f.Y)(p.A,{color:x,backgroundColor:b,onClick:$}):F?(0,f.Y)(h.A,{name:"arrow-left",className:"back-icon",onClick:R}):(0,f.Y)(h.A,{name:"search",className:"search-icon"})}),(0,f.Y)("div",{children:t}),(0,f.Y)("input",{ref:J,id:v,type:"text",dir:"auto",placeholder:Y||G("Search"),className:"form-control",value:g,disabled:y,autoComplete:N,spellCheck:!o.Vq&&void 0,onChange:function(e){const{currentTarget:t}=e;_(t.value),K||V()},onFocus:V,onBlur:function(){q(),E?.()},onKeyDown:W,teactExperimentControlled:B}),D&&(0,f.Y)(u.A,{round:!0,size:"tiny",color:"translucent",iconName:"up",onClick:H,disabled:!H,ariaLabel:X("AriaSearchOlderResult")}),M&&(0,f.Y)(u.A,{round:!0,size:"tiny",color:"translucent",iconName:"down",onClick:O,disabled:!O,ariaLabel:X("AriaSearchNewerResult")}),(0,f.Y)(m.Ay,{name:"fade",shouldCleanup:!0,activeKey:Number(w),className:"icon-container-right",slideClassName:"icon-container-slide",children:F&&w?(0,f.Y)(p.A,{color:x,backgroundColor:b,onClick:$}):(g||k)&&R&&(0,f.Y)(u.A,{round:!0,size:"tiny",color:"translucent",iconName:"close",onClick:R})})]})})},63173(e,t,n){n.d(t,{A:()=>a});var r=n(84051),o=n(87357),i=n(20021);const a=(0,r.ph)(e=>{const{id:t,value:n,label:r,hasArrow:a,error:l,ref:s,tabIndex:c,onChange:d,children:h}=e,u=l||r,p=(0,o.A)("input-group",n&&"touched",l&&"error",u&&"with-label",a&&"with-arrow","input-group");return(0,i.FD)("div",{className:p,children:[(0,i.Y)("select",{className:"form-control",id:t,value:n||"",onChange:d,tabIndex:c,ref:s,children:h}),u&&t&&(0,i.Y)("label",{htmlFor:t,children:u})]})})},91356(e,t,n){n.d(t,{A:()=>l});var r=n(84051),o=n(52844),i=n(90751);var a=n(20021);const l=(0,r.ph)(({onChange:e,inputRef:t})=>{const[n,l]=(0,r.J0)(),s=(0,r.hb)(t=>{l(void 0),e(t)},[e]),c=(0,r.hb)(()=>{l(void 0)},[]),d=(0,r.hb)(()=>{(0,o.p)("image/png, image/jpeg",e=>{const t=e.target;t?.files?.[0]&&l(t.files[0])},!0)},[]);return(0,a.FD)(a.FK,{children:[(0,a.Y)("input",{ref:t,className:"axfkbhWJ",onClick:d}),(0,a.Y)(i.A,{file:n,onClose:c,onChange:s})]})})},32581(e,t,n){n.d(t,{A:()=>a});var r=n(87357),o=n(59030);var i=n(20021);const a=function({children:e,className:t}){const n=(0,o.A)();return(0,i.Y)("div",{dir:n.isRtl?"rtl":void 0,className:(0,r.A)("LxlpQKLr",t),children:e})}},55573(e,t,n){n.d(t,{A:()=>a});var r=n(59030),o=n(64493),i=n(20021);const a=({count:e,itemName:t,itemPluralName:n,isLoading:a,onClick:l})=>{const s=(0,r.A)();return(0,i.FD)(o.A,{className:"ShowMoreButton",color:"translucent",isText:!0,isLoading:a,isRtl:s.isRtl,onClick:l,iconName:"down",children:["Show"," ",e," ","more"," ",e>1?n||`${t}s`:t]})}},26607(e,t,n){n.d(t,{A:()=>l});var r=n(84051),o=n(73767),i=n(34201),a=n(20021);const l=({isOpen:e,isHidden:t,isCustom:n,id:l,className:s,onClick:c,children:d,noCloseTransition:h,shouldAnimateFirstRender:u,style:p,ref:m})=>{const f=(0,o.A)(e),g=(0,o.A)(d),v=(0,r.li)(),A=void 0===f,{ref:C,shouldRender:w}=(0,i.A)({isOpen:e&&!t,ref:m,noMountTransition:A&&!u,className:!n&&void 0,noCloseTransition:h,withShouldRender:!0});return f&&!e&&(v.current=g),(w||t)&&(0,a.Y)("div",{id:l,ref:C,className:s,onClick:c,style:p,children:e?d:v.current})}},22191(e,t,n){n.d(t,{A:()=>h});var r=n(84051),o=n(87357),i=n(36838),a=n(39351),l=n(73767),s=n(63574),c=n(34132),d=n(20021);const h=(0,r.ph)(({tabs:e,activeTab:t,className:n,tabClassName:h,contextRootElementSelector:u,ref:p,onSwitchTab:m})=>{const f=(0,r.li)(),g=p||f,v=(0,l.A)(t),A=(0,a.A)();return(0,i.A)(g,void 0,!0),(0,s.A)(g,t),(0,d.Y)("div",{className:(0,o.A)("SquareTabList","no-scrollbar",n),ref:g,dir:A.isRtl?"rtl":void 0,children:e.map((e,n)=>(0,d.Y)(c.A,{title:e.title,isActive:n===t,isBlocked:e.isBlocked,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:v,onClick:m,clickArg:n,contextActions:e.contextActions,contextRootElementSelector:u,className:h},e.id))})})},63152(e,t,n){n.d(t,{A:()=>l});var r=n(84051),o=n(87357),i=n(17712),a=n(20021);const l=(0,r.ph)(({id:e,name:t,value:n,label:r,checked:l=!1,disabled:s,inactive:c,noAnimation:d,onCheck:h})=>{const u=(0,i.A)(e=>{h?.(e.currentTarget.checked)}),p=(0,o.A)("Switcher",s&&"disabled",c&&"inactive",d&&"no-animation");return(0,a.FD)("label",{className:p,title:r,children:[(0,a.Y)("input",{type:"checkbox",id:e,name:t,value:n,checked:l,disabled:s,onChange:u}),(0,a.Y)("span",{className:"widget"})]})})},34132(e,t,n){n.d(t,{A:()=>A});var r=n(84051),o=n(66644),i=n(96454),a=n(87357),l=n(41402),s=n(4961),c=n(10722),d=n(11217),h=n(17712),u=n(18276),p=n(71429),m=n(24433),f=n(60859),g=n(20021);const v="Tab--active",A=({className:e,title:t,isActive:n,isBlocked:A,badgeCount:C,isBadgeActive:w,previousActiveTab:x,contextActions:b,contextRootElementSelector:Y,icon:y,clickArg:N,onClick:k})=>{const S=(0,r.li)();(0,r.Nf)(()=>{n&&void 0===x&&S.current&&S.current.classList.add(v)},[n,x]),(0,r.vJ)(()=>{if(!n||void 0===x)return;const e=S.current,t=e.parentElement.children[x];if(!t)return void(n&&!e.classList.contains(v)&&(0,o.RK)(()=>{e.classList.add(v)}));const r=e.querySelector(".platform"),i=t.querySelector(".platform"),a=i.parentElement.offsetLeft-r.parentElement.offsetLeft,s=i.clientWidth/r.clientWidth;(0,o.RK)(()=>{i.classList.remove("animate"),r.classList.remove("animate"),r.style.transform=`translate3d(${a}px, 0, 0) scale3d(${s}, 1, 1)`,(0,o.gm)(()=>((0,l.A)(r),()=>{r.classList.add("animate"),r.style.transform="none",t.classList.remove(v),e.classList.add(v)}))})},[n,x]);const{contextMenuAnchor:D,handleContextMenu:M,handleBeforeContextMenu:B,handleContextMenuClose:F,handleContextMenuHide:_,isContextMenuOpen:L}=(0,c.A)(S,!b),{handleClick:R,handleMouseDown:I}=(0,d.Q)(e=>{!b||e.button!==i.w3.Secondary&&k||B(e),"mousedown"===e.type&&e.button!==i.w3.Main||k?.(N)}),E=(0,h.A)(()=>S.current),T=(0,h.A)(()=>Y?S.current.closest(Y):document.body),H=(0,h.A)(()=>document.querySelector("#portals").querySelector(".Tab-context-menu .bubble")),O=(0,h.A)(()=>({withPortal:!0}));return(0,g.FD)("div",{className:(0,a.A)("Tab",k&&"Tab--interactive",e),onClick:R,onMouseDown:I,onContextMenu:M,ref:S,children:[y,(0,g.FD)("span",{className:"Tab_inner",children:["string"==typeof t?(0,s.A)(t):t,Boolean(C)&&(0,g.Y)("span",{className:(0,a.A)("badge",w&&"Tab__badge--active"),children:C}),A&&(0,g.Y)(u.A,{name:"lock-badge",className:"blocked"}),(0,g.Y)("i",{className:"platform"})]}),b&&void 0!==D&&(0,g.Y)(p.A,{isOpen:L,anchor:D,getTriggerElement:E,getRootElement:T,getMenuElement:H,getLayout:O,className:"Tab-context-menu",autoClose:!0,onClose:F,onCloseAnimationEnd:_,withPortal:!0,children:b.map(e=>"isSeparator"in e?(0,g.Y)(f.A,{},e.key||"separator"):(0,g.Y)(m.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:e.title},e.title))})]})}},17486(e,t,n){n.d(t,{A:()=>x});var r=n(84051),o=n(87357),i=n(4961),a=n(37661),l=n(36838),s=n(17712),c=n(93545),d=n(63574),h=n(87412),u=n(18276),p=n(71429),m=n(24433),f=n(60859);const g="olvrE11Z",v="aqYb2jyH",A="A194nVWE",C="o1qYw03A";var w=n(20021);const x=(0,r.ph)(({tabs:e,activeTab:t,className:n,tabClassName:x,indicatorClassName:b,centered:Y,stretched:y,itemAlignment:N,withFadeMask:k,fadeMaskClassName:S,renderExtra:D,onSwitchTab:M})=>{const B=(0,r.li)(),F=(0,r.li)(),[_,L]=(0,r.J0)(""),[R,I,E]=(0,a.A)(),[T,H]=(0,r.J0)(),[O,$]=(0,r.J0)(),P=(0,r.li)();(0,l.A)(B,!e.length,!0);const J=(0,s.A)(()=>{const e=F.current,n=t>=0&&e?.childNodes[t];if(e&&n&&e.offsetWidth>0){const{offsetLeft:t,offsetWidth:r}=n,o=e.offsetWidth,i=(t/o*100).toFixed(1),a=((o-(t+r))/o*100).toFixed(1);L(`inset(0.25rem ${a}% 0.25rem ${i}% round var(--tab-radius))`)}else t<0&&L("inset(0 100% 0 100%)")});(0,r.vJ)(()=>{J()},[t,e]),(0,c.A)(F,J),(0,d.A)(B,t);const K=(0,s.A)(e=>{M(e)}),z=(0,s.A)((t,n)=>{const r=e[t]?.contextActions;r?.length&&(n.preventDefault(),P.current=n.currentTarget,$(t),H({x:n.clientX,y:n.clientY}),I())}),q=(0,s.A)(()=>{E()}),G=(0,s.A)(()=>{H(void 0),$(void 0)}),X=(0,s.A)(()=>P.current),V=(0,s.A)(()=>B.current),W=(0,s.A)(()=>B.current?.querySelector(".TabList-context-menu .bubble")),U=(0,s.A)(()=>({withPortal:!0}));if(!e.length)return;const Z=e.some(e=>e.contextActions?.length),j=(e,t)=>{const n="string"==typeof e.emoticon?e.emoticon:void 0,r="object"==typeof e.emoticon?e.emoticon:void 0;return(0,w.FD)("div",{className:(0,o.A)("U0xACBS1",x,"vertical"===N&&g,y&&A),onClick:()=>K(t),onContextMenu:Z?e=>z(t,e):void 0,children:[n&&(0,w.Y)("span",{className:C,children:n}),r&&(0,w.Y)(h.A,{documentId:r.documentId,className:C,size:20,shouldNotLoop:!0}),e.icon&&(0,w.Y)(u.A,{name:e.icon,className:"wz7cqDHX"}),"string"==typeof e.title?(0,i.A)(e.title):e.title,D?.(e,t),e.isBlocked&&(0,w.Y)(u.A,{name:"lock-badge",className:"V6G8MwAI"})]},e.id??t)},Q=void 0!==O?e[O]?.contextActions:void 0,ee=(0,w.FD)("div",{ref:B,className:(0,o.A)("TabList","Jya4TQTw",k&&"p1Zqtq7c",Y&&v,"vertical"===N&&g,n,_&&"Gsb2Drsd"),children:[e.map(j),(0,w.Y)("div",{ref:F,className:(0,o.A)("apT7vRiG",Y&&v,y&&A,b),style:_?`clip-path: ${_}`:void 0,"aria-hidden":!0,children:e.map(j)})]}),te=Q&&void 0!==T&&(0,w.Y)(p.A,{isOpen:R,anchor:T,getTriggerElement:X,getRootElement:V,getMenuElement:W,getLayout:U,className:"TabList-context-menu",autoClose:!0,onClose:q,onCloseAnimationEnd:G,withPortal:!0,children:Q.map(e=>"isSeparator"in e?(0,w.Y)(f.A,{},e.key||`separator-${Q.indexOf(e)}`):(0,w.Y)(m.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:(0,i.A)(e.title)},e.title))});return k?(0,w.FD)(w.FK,{children:[(0,w.Y)("div",{className:(0,o.A)("XDo81foY",S),children:ee}),te]}):(0,w.FD)(w.FK,{children:[ee,te]})})},94079(e,t,n){n.d(t,{A:()=>d});var r=n(84051),o=n(66644),i=n(63495),a=n(87357),l=n(17712),s=n(59030),c=n(20021);const d=(0,r.ph)(({ref:e,id:t,className:n,value:d,label:h,error:u,success:p,disabled:m,readOnly:f,placeholder:g,autoComplete:v,inputMode:A,maxLength:C,maxLengthIndicator:w,tabIndex:x,onChange:b,onInput:Y,onKeyPress:y,onKeyDown:N,onBlur:k,onPaste:S,noReplaceNewlines:D})=>{let M=(0,r.li)();e&&(M=e);const B=(0,s.A)(),F=u||p||h,_=(0,a.A)("input-group",d&&"touched",u?"error":p&&"success",m&&"disabled",f&&"disabled",F&&"with-label",n),L=(0,l.A)(e=>{(0,o.RK)(()=>{e.style.height="0",(0,o.gm)(()=>{const t=e.scrollHeight;return()=>{e.style.height=`${t}px`}})})});(0,r.Nf)(()=>{const e=M.current;e&&L(e)},[]);const R=(0,r.hb)(e=>{const t=e.currentTarget;if(!D){const e=t.selectionEnd;t.value=t.value.replace(/\n/g," "),t.selectionEnd=e}L(t),b?.(e)},[D,b]);return(0,c.FD)("div",{className:_,dir:B.isRtl?"rtl":void 0,children:[(0,c.Y)("textarea",{ref:M,className:"form-control",id:t,dir:"auto",value:d||"",tabIndex:x,placeholder:g,maxLength:C,autoComplete:v,spellCheck:!i.Vq&&void 0,inputMode:A,disabled:m,readOnly:f,onChange:R,onInput:Y,onKeyPress:y,onKeyDown:N,onBlur:k,onPaste:S,"aria-label":F}),F&&(0,c.Y)("label",{htmlFor:t,children:F}),w&&(0,c.Y)("div",{className:"max-length-indicator",children:w})]})})},61361(e,t,n){n.d(t,{A:()=>u});var r=n(84051),o=n(19801),i=n(80140),a=n(32625),l=n(14737),s=n(30857),c=n(39351),d=n(68292),h=n(20021);const u=({className:e,endsAt:t,mode:n="clock",shouldShowZeroOnEnd:u,onEnd:p})=>{const m=(0,s.A)(),f=(0,c.A)(),g=(0,i.Fm)(),v=g<t,A=Math.max(0,t-g),C="clock"===n||A<86400,w=v&&"countdown"===n&&!C?1e3*(A-86400)+500:void 0;if((0,l.A)(m,w),(0,a.A)(m,v&&C?500:void 0),(0,r.vJ)(()=>{v||p?.()},[v,p]),!v&&!u)return;if("countdown"===n&&!C)return(0,h.Y)("span",{className:e,children:(0,o.mi)(f,(0,o.Ft)(t),{anchorDate:(0,o.Ft)(g)})});const x=(0,o.ak)(A).split(":"),b=(0,h.Y)(h.FK,{children:x.map((e,t)=>(0,h.FD)("span",{children:[t>0&&":",(0,h.Y)(d.A,{text:e})]},t))});return(0,h.Y)("span",{className:e,style:"font-variant-numeric: tabular-nums;",children:"countdown"===n?f("TimeIn",{time:b},{withNodes:!0}):b})}},629(e,t,n){n.d(t,{A:()=>l});var r=n(84051),o=n(87357);const i={root:"eGD1rubd",widget:"EXXsQxeq",min:"C4vXj96y",mid:"nRNm3LRD",max:"LdztzMx0",filler:"kudEBJOk"};var a=n(20021);const l=(0,r.ph)(function({value:e}){return(0,a.FD)("div",{className:(0,o.A)(i.root,"Toggle"),"aria-hidden":!0,children:[(0,a.Y)("i",{className:(0,o.A)(i.filler,i[e])}),(0,a.Y)("i",{className:(0,o.A)(i.widget,i[e])})]})})},1715(e,t,n){n.d(t,{A:()=>ie});var r=n(84051),o=n(11597),i=n(30708),a=n(96454),l=n(87357),s=n(95807),c=n(11778),d=n(15640),h=n(87679),u=n(31460),p=n(76023);const m=document.createElement("canvas");function f(e,t,n){const r=n%2==1;return{width:r?t:e,height:r?e:t}}function g(e,t,n){if(0===n||e<=0||t<=0)return 1;const r=Math.abs(n*Math.PI/180),o=Math.cos(r),i=Math.sin(r);return Math.max(o+t/e*i,e/t*i+o)}function v(e,t,n=0,r=0,o=!0){t.points.length<2||(e.save(),"eraser"===t.tool?(e.globalCompositeOperation="destination-out",e.strokeStyle="rgba(0,0,0,1)",e.lineWidth=2*t.brushSize):"neon"===t.tool?(e.shadowColor=t.color,e.shadowBlur=2*t.brushSize,e.strokeStyle=t.color,e.lineWidth=.5*t.brushSize):"brush"===t.tool?(e.globalAlpha=.4,e.strokeStyle=t.color,e.lineWidth=2*t.brushSize):(e.strokeStyle=t.color,e.lineWidth=t.brushSize),e.lineCap="round",e.lineJoin="round","arrow"===t.tool?function(e,t,n,r,o){if(t.points.length<2)return;const i=t.points[0],a=t.points[t.points.length-1];e.beginPath(),e.moveTo(i.x+n,i.y+r);for(let o=1;o<t.points.length;o++){const i=t.points[o];e.lineTo(i.x+n,i.y+r)}if(e.stroke(),!o)return;const l=Math.max(0,t.points.length-10),s=t.points[l],c=Math.atan2(a.y-s.y,a.x-s.x),d=t.completedAt?Date.now()-t.completedAt:200,h=1-(1-Math.min(d/200,1))**3,u=3*t.brushSize*h;e.beginPath(),e.moveTo(a.x+n,a.y+r),e.lineTo(a.x+n-u*Math.cos(c-Math.PI/6),a.y+r-u*Math.sin(c-Math.PI/6)),e.moveTo(a.x+n,a.y+r),e.lineTo(a.x+n-u*Math.cos(c+Math.PI/6),a.y+r-u*Math.sin(c+Math.PI/6)),e.stroke()}(e,t,n,r,o):function(e,t,n,r){e.beginPath();const o=t.points[0];e.moveTo(o.x+n,o.y+r);for(let o=1;o<t.points.length;o++){const i=t.points[o];e.lineTo(i.x+n,i.y+r)}e.stroke()}(e,t,n,r),e.restore())}function A(e,t,n,r,o=0,i=1){const{width:a,height:l}=f(t.width,t.height,o);e.translate(a/2,l/2),e.rotate(n*Math.PI/180),e.scale(i*(r?-1:1),i),e.translate(-t.width/2,-t.height/2)}function C(e,t,n=0,r=0,o,i,a){const l=o&&!t.includes(o);if(0===t.length&&!l)return;const s=i||e.canvas.width,c=a||e.canvas.height;m.width=s,m.height=c;const d=m.getContext("2d");d.clearRect(0,0,s,c),t.forEach(e=>{v(d,e,n,r,!0)}),l&&v(d,o,n,r,!1),e.drawImage(m,0,0)}var w=n(63527),x=n(39351),b=n(17712),Y=n(34201),y=n(37836),N=n(43336);function k(e){return e.rotation-90*e.quarterTurns}const S=[{value:"free",labelKey:"Free"},{value:"original",labelKey:"Original"},{value:"square",labelKey:"Square",ratio:1},{value:"3:2",label:"3:2",ratio:1.5},{value:"2:3",label:"2:3",ratio:2/3},{value:"4:3",label:"4:3",ratio:4/3},{value:"3:4",label:"3:4",ratio:3/4},{value:"5:4",label:"5:4",ratio:5/4},{value:"4:5",label:"4:5",ratio:.8},{value:"16:9",label:"16:9",ratio:16/9},{value:"9:16",label:"9:16",ratio:9/16}],D={cropperX:0,cropperY:0,cropperWidth:0,cropperHeight:0,aspectRatio:"free",rotation:0,quarterTurns:0,flipH:!1},M=50;function B(e,t,n){let r,o;return n?e/t>n?(o=t,r=t*n):(r=e,o=e/n):(r=e,o=t),{cropperX:(e-r)/2,cropperY:(t-o)/2,cropperWidth:r,cropperHeight:o}}var F=n(48894),_=n(37661);const L=["#FE4438","#FF8901","#FFD60A","#33C759","#62E5E0","#0A84FF","#5856D6","#BD5CF3"];function R(e,t,n){const r=(0,F.hT)([e,t,n]);return{hue:e,saturation:t,brightness:n,hexInputValue:(0,F.v2)(r).toUpperCase(),rgbInputValue:`${r[0]}, ${r[1]}, ${r[2]}`}}const I={hue:0,saturation:1,brightness:1,hexInputValue:"",rgbInputValue:""};var E=n(18276),T=n(64493),H=n(12933),O=n(3325),$=n(22191),P=n(41036);const J={root:"fS7bjhZZ",canvasArea:"nOvdLJ1f",canvasContainer:"flFdG3Pw",canvas:"S__rCiJq",drawMode:"SsRJ8Ne8",transitioningToDraw:"icvmSYcf",canvasFadeInDelayed:"U1RgSGpb",transitioningToCrop:"NBftB_Wf",canvasZoomOut:"XWRi5K7q",transformAnimating:"FIix5Nx_",canvasTransformReveal:"oMjsJ3C4",flipAnimating:"KE1JgIqy",canvasFlipReveal:"hYKyTZX1",canvasSnapshot:"Hn9OjWnJ",zoomIn:"RYaLTunM",snapshotZoomIn:"GAZb8MPh",fadeOut:"cy5aDIor",snapshotFadeOut:"VHbOGv8X",rotateFade:"nruaroqo",snapshotRotateFade:"ow81UAjP",flipFade:"YVh8VNb5",snapshotFlipFade:"_AIjAMlP",cropWrapper:"GbMfO7GI",fadeIn:"Ztf1aNhm",fadingOut:"KgL8yEmQ",cropDarkOverlay:"iVu6ZHeJ",cropRegion:"r8Qx2Ktf",cropGrid:"BFtdoj0S",cropCorner:"nEDBQw1H",topLeft:"qzU5GUm_",topRight:"IBoPxRge",bottomLeft:"HrdjIhiG",bottomRight:"IdkngJiS",editPanel:"QVflGRhn",panelHeader:"O_DGaaLI",headerTitle:"E4eCdO4M",headerActions:"_4706V27",panelTabs:"mJXF_Yxs",modeTabs:"h8eu56lc",modeTab:"l4buYDV4",panelContent:"i6JIcnc8",sectionLabel:"_0du4yfwQ",colorRow:"pX2M1SEc",colorSwatch:"vvX7mrfr",selected:"dJPeRZqd",customColor:"_hSMHHR5",sizeRow:"vNJyCRnu",sizeSlider:"Rhwfg155",sizeValue:"iMkZTuXV",canvasControls:"dJwM8niH",hidden:"VeD7D760",fadingIn:"cureBZo1",aspectRatioList:"xj769eB6",toolList:"X0nYMkPZ",toolIcon:"fDGjX7uI",toolLabel:"piZ_2j0J",aspectRatioRow:"Vxu0LMkw",ratioBox:"E3afJRca",ratio1x1:"a3SrmuRv",ratio1X1:"a3SrmuRv",ratio3x2:"CRJondNh",ratio3X2:"CRJondNh",ratio2x3:"oh3kbhar",ratio2X3:"oh3kbhar",ratio4x3:"hW7rVntz",ratio4X3:"hW7rVntz",ratio3x4:"jaH1RSPd",ratio3X4:"jaH1RSPd",ratio5x4:"_7JukZoaG",ratio5X4:"_7JukZoaG",ratio4x5:"mU6KfKdp",ratio4X5:"mU6KfKdp",ratio16x9:"F5xquvwb",ratio16X9:"F5xquvwb",ratio9x16:"hG0HwSYF",ratio9X16:"hG0HwSYF",colorPickerInline:"A4gAVclo",colorPickerRow:"jSDhtnV4",saturationBrightness:"pakBNiyw",colorInputs:"fH8Baw0r",colorInput:"ZmhX1fIF",satBrightHandle:"XinWYrSA",hueSlider:"_MJjYdh1",hueHandle:"LBY1bylB",saveButton:"BSHyHGia"};var K=n(20021);const z=["topLeft","topRight","bottomLeft","bottomRight"],q=(0,r.ph)(function({cropState:e,displaySize:t,scale:n,isFadingOut:r,onCropperDragStart:o,onCornerResizeStart:i}){const{cropperX:a,cropperY:c,cropperWidth:d,cropperHeight:h}=e,u=a*n,p=c*n,m=d*n,f=h*n;if(0!==m&&0!==f)return(0,K.FD)("div",{className:(0,l.A)(J.cropWrapper,r&&J.fadingOut),style:`width: ${t.width}px; height: ${t.height}px`,children:[(0,K.Y)("div",{className:J.cropDarkOverlay,style:`clip-path: polygon(\n 0% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%,\n ${u}px ${p}px,\n ${u}px ${p+f}px,\n ${u+m}px ${p+f}px,\n ${u+m}px ${p}px,\n ${u}px ${p}px\n )`}),(0,K.Y)("div",{className:J.cropRegion,style:(0,s.A)(`left: ${u}px`,`top: ${p}px`,`width: ${m}px`,`height: ${f}px`),onMouseDown:o,onTouchStart:o,children:(0,K.Y)("div",{className:J.cropGrid})}),z.map(e=>{const t="topLeft"===e||"bottomLeft"===e?u:u+m,n="topLeft"===e||"topRight"===e?p:p+f;return(0,K.Y)("div",{className:(0,l.A)(J.cropCorner,J[e]),style:(0,s.A)(`left: ${t}px`,`top: ${n}px`),onMouseDown:t=>i(t,e),onTouchStart:t=>i(t,e)},e)})]})});var G=n(22720);const X={square:J.ratio1x1,"3:2":J.ratio3x2,"2:3":J.ratio2x3,"4:3":J.ratio4x3,"3:4":J.ratio3x4,"5:4":J.ratio5x4,"4:5":J.ratio4x5,"16:9":J.ratio16x9,"9:16":J.ratio9x16},V=S.slice(0,3),W=S.slice(3),U=(0,r.ph)(function({currentRatio:e,onRatioChange:t}){const n=(0,x.A)(),r=e=>"free"===e?(0,K.Y)(E.A,{name:"fullscreen",className:"ListItem-main-icon"}):"original"===e?(0,K.Y)(E.A,{name:"photo",className:"ListItem-main-icon"}):(0,K.Y)("div",{className:(0,l.A)("ListItem-main-icon",J.ratioBox,X[e])}),o=e=>e.labelKey?n(e.labelKey):e.label;return(0,K.FD)(K.FK,{children:[(0,K.Y)("div",{className:J.sectionLabel,children:n("AspectRatio")}),(0,K.FD)("div",{className:J.aspectRatioList,children:[V.map(n=>(0,K.FD)(G.A,{focus:e===n.value,onClick:()=>t(n.value),children:[r(n.value),o(n)]},n.value)),Array.from({length:Math.ceil(W.length/2)},(e,t)=>2*t).map(n=>{const o=W[n],i=W[n+1];return(0,K.FD)("div",{className:J.aspectRatioRow,children:[(0,K.FD)(G.A,{focus:e===o.value,onClick:()=>t(o.value),children:[r(o.value),o.label]}),i&&(0,K.FD)(G.A,{focus:e===i.value,onClick:()=>t(i.value),children:[r(i.value),i.label]})]},n)})]})]})});var Z=n(40664),j=n(82497);const Q=[{id:"pen",labelKey:"Pen",Icon:function(){return(0,K.FD)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"20",viewBox:"0 0 120 20",className:"draw-tool-icon",children:[(0,K.FD)("g",{"clip-path":"url(#clip0_2524_7134)",children:[(0,K.Y)("g",{filter:"url(#filter0_iiii_2524_7134)",children:(0,K.Y)("path",{d:"M0 1H80L110.2 8.44653C112.048 8.90213 112.971 9.12994 113.185 9.49307C113.369 9.80597 113.369 10.194 113.185 10.5069C112.971 10.8701 112.048 11.0979 110.2 11.5535L80 19H0V1Z",fill:"#3E3F3F"})}),(0,K.Y)("path",{d:"M112.564 10.9709L103.474 13.2132C103.21 13.2782 102.944 13.121 102.883 12.8566C102.736 12.2146 102.5 11.0296 102.5 10C102.5 8.9705 102.736 7.78549 102.883 7.14344C102.944 6.87906 103.21 6.72187 103.474 6.78685L112.564 9.02913C113.578 9.27925 113.578 10.7208 112.564 10.9709Z",fill:"currentColor"}),(0,K.Y)("rect",{x:"76",y:"1",width:"4",height:"18",rx:"0.5",fill:"currentColor"})]}),(0,K.FD)("defs",{children:[(0,K.FD)("filter",{id:"filter0_iiii_2524_7134",x:"0",y:"-4",width:"116.323",height:"28",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,K.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,K.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"5"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7134"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"3",dy:"-5"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect1_innerShadow_2524_7134",result:"effect2_innerShadow_2524_7134"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"-1"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect2_innerShadow_2524_7134",result:"effect3_innerShadow_2524_7134"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"1"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect3_innerShadow_2524_7134",result:"effect4_innerShadow_2524_7134"})]}),(0,K.Y)("clipPath",{id:"clip0_2524_7134",children:(0,K.Y)("rect",{width:"20",height:"120",fill:"currentColor",transform:"matrix(0 1 -1 0 120 0)"})})]})]})}},{id:"arrow",labelKey:"Arrow",Icon:function(){return(0,K.FD)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"20",viewBox:"0 0 120 20",className:"draw-tool-icon",children:[(0,K.FD)("g",{"clip-path":"url(#clip0_2524_7140)",children:[(0,K.Y)("path",{d:"M94 10H110M110 10L104 4M110 10L104 16",stroke:"url(#paint0_linear_2524_7140)","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"}),(0,K.Y)("g",{filter:"url(#filter0_iiii_2524_7140)",children:(0,K.Y)("path",{d:"M0 1H92C94.2091 1 96 2.79086 96 5V15C96 17.2091 94.2091 19 92 19H0V1Z",fill:"#3E3F3F"})}),(0,K.Y)("path",{d:"M92 1C94.2091 1 96 2.79086 96 5V15C96 17.2091 94.2091 19 92 19V1Z",fill:"currentColor"})]}),(0,K.FD)("defs",{children:[(0,K.FD)("filter",{id:"filter0_iiii_2524_7140",x:"0",y:"-4",width:"99",height:"28",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,K.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,K.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"5"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7140"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"3",dy:"-5"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect1_innerShadow_2524_7140",result:"effect2_innerShadow_2524_7140"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"-1"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect2_innerShadow_2524_7140",result:"effect3_innerShadow_2524_7140"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"1"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect3_innerShadow_2524_7140",result:"effect4_innerShadow_2524_7140"})]}),(0,K.FD)("linearGradient",{id:"paint0_linear_2524_7140",x1:"110",y1:"10",x2:"94",y2:"10",gradientUnits:"userSpaceOnUse",children:[(0,K.Y)("stop",{offset:"0.755","stop-color":"currentColor"}),(0,K.Y)("stop",{offset:"1","stop-color":"currentColor","stop-opacity":"0"})]}),(0,K.Y)("clipPath",{id:"clip0_2524_7140",children:(0,K.Y)("rect",{width:"20",height:"120",fill:"currentColor",transform:"matrix(0 1 -1 0 120 0)"})})]})]})}},{id:"brush",labelKey:"Brush",Icon:function(){return(0,K.FD)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"20",viewBox:"0 0 120 20",className:"draw-tool-icon",children:[(0,K.FD)("g",{"clip-path":"url(#clip0_2524_7174)",children:[(0,K.Y)("g",{filter:"url(#filter0_iiii_2524_7174)",children:(0,K.Y)("path",{d:"M0 1H82.3579C83.4414 1 84.5135 1.22006 85.5093 1.64684L91 4H101C101.552 4 102 4.44772 102 5V15C102 15.5523 101.552 16 101 16H91L85.5093 18.3532C84.5135 18.7799 83.4414 19 82.3579 19H0V1Z",fill:"#3E3F3F"})}),(0,K.Y)("rect",{x:"76",y:"1",width:"4",height:"18",rx:"0.5",fill:"currentColor"}),(0,K.Y)("path",{d:"M102 5H106.434C106.785 5 107.111 5.1843 107.291 5.4855L112.091 13.4855C112.491 14.152 112.011 15 111.234 15H102V5Z",fill:"currentColor"})]}),(0,K.FD)("defs",{children:[(0,K.FD)("filter",{id:"filter0_iiii_2524_7174",x:"0",y:"-4",width:"105",height:"28",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,K.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,K.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"5"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7174"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"3",dy:"-5"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect1_innerShadow_2524_7174",result:"effect2_innerShadow_2524_7174"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"-1"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect2_innerShadow_2524_7174",result:"effect3_innerShadow_2524_7174"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"1"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect3_innerShadow_2524_7174",result:"effect4_innerShadow_2524_7174"})]}),(0,K.Y)("clipPath",{id:"clip0_2524_7174",children:(0,K.Y)("rect",{width:"20",height:"120",fill:"currentColor",transform:"matrix(0 1 -1 0 120 0)"})})]})]})}},{id:"neon",labelKey:"Neon",Icon:function(){return(0,K.FD)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"20",viewBox:"0 0 120 20",className:"draw-tool-icon",children:[(0,K.FD)("g",{"clip-path":"url(#clip0_2524_7180)",children:[(0,K.Y)("g",{filter:"url(#filter0_f_2524_7180)",children:(0,K.Y)("path",{d:"M102 5H107.146C108.282 5 109.323 5.64872 109.601 6.75061C109.813 7.59297 110 8.70303 110 10C110 11.297 109.813 12.407 109.601 13.2494C109.323 14.3513 108.282 15 107.146 15H102V5Z",fill:"currentColor"})}),(0,K.Y)("g",{filter:"url(#filter1_f_2524_7180)",children:(0,K.Y)("path",{d:"M102 5H107.146C108.282 5 109.323 5.64872 109.601 6.75061C109.813 7.59297 110 8.70303 110 10C110 11.297 109.813 12.407 109.601 13.2494C109.323 14.3513 108.282 15 107.146 15H102V5Z",fill:"currentColor"})}),(0,K.Y)("g",{filter:"url(#filter2_f_2524_7180)",children:(0,K.Y)("path",{d:"M102 5H107.146C108.282 5 109.323 5.64872 109.601 6.75061C109.813 7.59297 110 8.70303 110 10C110 11.297 109.813 12.407 109.601 13.2494C109.323 14.3513 108.282 15 107.146 15H102V5Z",fill:"currentColor"})}),(0,K.Y)("g",{filter:"url(#filter3_iiii_2524_7180)",children:(0,K.Y)("path",{d:"M0 1H82.3579C83.4414 1 84.5135 1.22006 85.5093 1.64684L91 4H101C101.552 4 102 4.44772 102 5V15C102 15.5523 101.552 16 101 16H91L85.5093 18.3532C84.5135 18.7799 83.4414 19 82.3579 19H0V1Z",fill:"#3E3F3F"})}),(0,K.Y)("rect",{x:"76",y:"1",width:"4",height:"18",rx:"0.5",fill:"currentColor"}),(0,K.Y)("path",{d:"M102 5H107.146C108.282 5 109.323 5.64872 109.601 6.75061C109.813 7.59297 110 8.70303 110 10C110 11.297 109.813 12.407 109.601 13.2494C109.323 14.3513 108.282 15 107.146 15H102V5Z",fill:"currentColor"})]}),(0,K.FD)("defs",{children:[(0,K.FD)("filter",{id:"filter0_f_2524_7180",x:"96",y:"-1",width:"20",height:"22",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,K.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,K.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3",result:"effect1_foregroundBlur_2524_7180"})]}),(0,K.FD)("filter",{id:"filter1_f_2524_7180",x:"96",y:"-1",width:"20",height:"22",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,K.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,K.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3",result:"effect1_foregroundBlur_2524_7180"})]}),(0,K.FD)("filter",{id:"filter2_f_2524_7180",x:"96",y:"-1",width:"20",height:"22",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,K.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,K.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3",result:"effect1_foregroundBlur_2524_7180"})]}),(0,K.FD)("filter",{id:"filter3_iiii_2524_7180",x:"0",y:"-4",width:"105",height:"28",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,K.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,K.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"5"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7180"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"3",dy:"-5"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect1_innerShadow_2524_7180",result:"effect2_innerShadow_2524_7180"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"-1"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect2_innerShadow_2524_7180",result:"effect3_innerShadow_2524_7180"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"1"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect3_innerShadow_2524_7180",result:"effect4_innerShadow_2524_7180"})]}),(0,K.Y)("clipPath",{id:"clip0_2524_7180",children:(0,K.Y)("rect",{width:"20",height:"120",fill:"currentColor",transform:"matrix(0 1 -1 0 120 0)"})})]})]})}},{id:"eraser",labelKey:"Eraser",Icon:function(){return(0,K.FD)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"120",height:"20",viewBox:"0 0 120 20",className:"draw-tool-icon",children:[(0,K.FD)("g",{"clip-path":"url(#clip0_2524_7149)",children:[(0,K.FD)("g",{filter:"url(#filter0_i_2524_7149)",children:[(0,K.Y)("path",{d:"M95 1H108C110.209 1 112 2.79086 112 5V15C112 17.2091 110.209 19 108 19H95V1Z",fill:"#D9D9D9"}),(0,K.Y)("path",{d:"M95 1H108C110.209 1 112 2.79086 112 5V15C112 17.2091 110.209 19 108 19H95V1Z",fill:"#F09B99"})]}),(0,K.Y)("g",{filter:"url(#filter1_iiii_2524_7149)",children:(0,K.Y)("path",{d:"M0 1H77.6464C77.8728 1 78.0899 0.910072 78.25 0.75C78.4101 0.589928 78.6272 0.5 78.8536 0.5H96C97.1046 0.5 98 1.39543 98 2.5V17.5C98 18.6046 97.1046 19.5 96 19.5H78.8536C78.6272 19.5 78.4101 19.4101 78.25 19.25C78.0899 19.0899 77.8728 19 77.6464 19H0V1Z",fill:"#3E3F3F"})}),(0,K.Y)("path",{d:"M79 19.5V0.5L78 0.5V19.5H79Z",fill:"black","fill-opacity":"0.33"})]}),(0,K.FD)("defs",{children:[(0,K.FD)("filter",{id:"filter0_i_2524_7149",x:"95",y:"-1",width:"19",height:"20",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,K.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,K.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"2",dy:"-2"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"2"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.33 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7149"})]}),(0,K.FD)("filter",{id:"filter1_iiii_2524_7149",x:"0",y:"-4.5",width:"101",height:"29",filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB",children:[(0,K.Y)("feFlood",{"flood-opacity":"0",result:"BackgroundImageFix"}),(0,K.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"5"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_2524_7149"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"3",dy:"-5"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"3"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.137255 0 0 0 0 0.145098 0 0 0 0 0.14902 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect1_innerShadow_2524_7149",result:"effect2_innerShadow_2524_7149"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"-1"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect2_innerShadow_2524_7149",result:"effect3_innerShadow_2524_7149"}),(0,K.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,K.Y)("feOffset",{dx:"1",dy:"1"}),(0,K.Y)("feGaussianBlur",{stdDeviation:"0.5"}),(0,K.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,K.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.242217 0 0 0 0 0.247242 0 0 0 0 0.247101 0 0 0 1 0"}),(0,K.Y)("feBlend",{mode:"normal",in2:"effect3_innerShadow_2524_7149",result:"effect4_innerShadow_2524_7149"})]}),(0,K.Y)("clipPath",{id:"clip0_2524_7149",children:(0,K.Y)("rect",{width:"20",height:"120",fill:"white",transform:"matrix(0 1 -1 0 120 0)"})})]})]})}}],ee=(0,r.ph)(function({predefinedColors:e,selectedColor:t,isColorPickerOpen:n,hue:r,saturation:o,brightness:i,pickerColor:a,hexInputValue:c,rgbInputValue:d,brushSize:h,drawTool:u,hueSliderRef:p,satBrightRef:m,onColorSelect:f,onOpenColorPicker:g,onCloseColorPicker:v,onHueSliderMouseDown:A,onHueChange:C,onSatBrightMouseDown:w,onSatBrightChange:b,onHexInput:Y,onHexInputBlur:y,onRgbInput:N,onRgbInputBlur:k,onBrushSizeChange:S,onToolChange:D}){const M=(0,x.A)(),B=360*r;return(0,K.FD)(K.FK,{children:[(0,K.FD)("div",{className:J.colorRow,children:[n?(0,K.Y)("div",{ref:p,className:J.hueSlider,onMouseDown:A,onTouchStart:C,onTouchMove:C,children:(0,K.Y)("div",{className:J.hueHandle,style:`--picker-hue: ${B}`})}):e.map(e=>(0,K.Y)("button",{className:(0,l.A)(J.colorSwatch,t===e&&J.selected),style:`--swatch-color: ${e}; --swatch-outline: ${e}1a`,onClick:()=>f(e),"aria-label":e},e)),(0,K.Y)("button",{className:(0,l.A)(J.colorSwatch,J.customColor,n&&J.selected),onClick:n?v:g,"aria-label":M("CustomColor")})]}),n&&(0,K.Y)("div",{className:J.colorPickerInline,children:(0,K.FD)("div",{className:J.colorPickerRow,children:[(0,K.Y)("div",{ref:m,className:J.saturationBrightness,style:`--picker-hue: ${B}`,onMouseDown:w,onTouchStart:b,onTouchMove:b,children:(0,K.Y)("div",{className:J.satBrightHandle,style:(0,s.A)(`--picker-sat: ${100*o}%`,`--picker-bright: ${100*(1-i)}%`,`--picker-color: ${a}`)})}),(0,K.FD)("div",{className:J.colorInputs,children:[(0,K.Y)(Z.A,{className:J.colorInput,label:M("HEX"),value:c,onChange:Y,onBlur:y,maxLength:7}),(0,K.Y)(Z.A,{className:J.colorInput,label:M("RGB"),value:d,onChange:N,onBlur:k})]})]})}),(0,K.FD)("div",{className:J.sizeRow,style:`--selected-color: ${t}`,children:[(0,K.FD)("span",{className:J.sectionLabel,children:[M("Size"),(0,K.Y)("span",{className:J.sizeValue,children:h})]}),(0,K.Y)(j.A,{className:J.sizeSlider,min:2,max:50,value:h,onChange:S,bold:!0})]}),(0,K.Y)("div",{className:J.sectionLabel,children:M("Tool")}),(0,K.Y)("div",{className:J.toolList,children:Q.map(e=>{const n=(0,l.A)("ListItem-main-icon",J.toolIcon,u===e.id&&J.toolIconActive);return(0,K.FD)(G.A,{focus:u===e.id,onClick:()=>D(e.id),children:[(0,K.Y)("span",{className:n,style:`color: ${t}`,children:(0,K.Y)(e.Icon,{})}),(0,K.Y)("span",{className:J.toolLabel,children:M(e.labelKey)})]},e.id)})})]})}),te=(0,r.ph)(function({value:e,onChange:t,onChangeEnd:n}){const r=(0,b.A)(r=>{r.preventDefault();const{x:o}=(0,d.A)(r),i=e,a=e=>{e.preventDefault();const{x:n}=(0,d.A)(e),r=n-o,a=(0,N.qE)(Math.round(i-r/5),-90,90);t(a)},l=()=>{document.removeEventListener("mousemove",a),document.removeEventListener("touchmove",a),document.removeEventListener("mouseup",l),document.removeEventListener("touchend",l),n?.()};document.addEventListener("mousemove",a),document.addEventListener("touchmove",a,{passive:!1}),document.addEventListener("mouseup",l),document.addEventListener("touchend",l)}),o=15*Math.round(e/15),i=5*-e,a=[];for(let e=-90;e<=90;e+=15)a.push((0,K.Y)("span",{className:e===o?"tSDtmAv6":"wmzytKOT",style:`left: ${5*e}px`,children:e},e));return(0,K.Y)("div",{className:"YFefcZgL",children:(0,K.FD)("div",{className:"dXY4Fo0z",onMouseDown:r,onTouchStart:r,children:[(0,K.FD)("div",{className:"j5mg6w9j",style:`transform: translateX(${i}px)`,children:[(0,K.Y)("div",{className:"l0eEy5Rf",children:a}),(0,K.Y)("div",{className:"qitJ1s1k"})]}),(0,K.Y)("div",{className:"TLbgSYM9"})]})})}),ne=[{type:"draw",icon:"brush"},{type:"crop",icon:"crop"}],re="draw",oe=ne.map(e=>({title:(0,K.Y)(E.A,{name:e.icon})})),ie=(0,r.ph)(({isOpen:e,imageUrl:t,mimeType:n,filename:m,onClose:v,onSave:z})=>{const G=(0,x.A)(),X=(0,w.Ay)(i.Vu),V=(0,w.Ay)(o.SJA),W=(0,r.Kr)(()=>function(e){return"light"===e?["#000000",...L]:["#FFFFFF",...L]}(V),[V]),{ref:Z,shouldRender:j}=(0,Y.A)({isOpen:e,withShouldRender:!0}),Q=(0,r.li)(),ie=(0,r.li)(),ae=(0,r.li)(),le=(0,r.li)(void 0),[se,ce]=(0,r.J0)(re),[de,he]=(0,r.J0)(!1),[ue,pe]=(0,r.J0)(),[me,fe]=(0,r.J0)(""),[ge,ve]=(0,r.J0)({width:0,height:0}),[Ae,Ce]=(0,r.J0)(D),we=(0,r.Kr)(()=>0===ge.width?{width:0,height:0}:f(ge.width,ge.height,Ae.quarterTurns),[ge.width,ge.height,Ae.quarterTurns]),[xe,be]=(0,r.J0)(),[Ye,ye]=(0,r.J0)([]),[Ne,ke]=(0,r.J0)([]),Se=(0,r.li)([]),De=(0,r.li)([]);Se.current=Ye,De.current=Ne;const{displaySize:Me,getDisplayScale:Be,resetDisplaySize:Fe}=function({canvasAreaRef:e,imageWidth:t,imageHeight:n,reservedHeight:o=0}){const[i,a]=(0,r.J0)({width:0,height:0}),l=(0,b.A)(()=>0===i.width||0===t?1:Math.min(i.width/t,i.height/n));(0,r.vJ)(()=>{const r=e.current;if(!r||0===t)return;const i=()=>{const e=r.getBoundingClientRect(),i=getComputedStyle(r),l=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),s=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),c=e.width-l,d=e.height-s-o;if(c<=0||d<=0)return;const h=Math.min(c/t,d/n),u=Math.min(h,1);a({width:t*u,height:n*u})};return i(),window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[e,t,n,o]);const s=(0,b.A)(()=>{a({width:0,height:0})});return{displaySize:i,getDisplayScale:l,resetDisplaySize:s}}({canvasAreaRef:ae,imageWidth:we.width,imageHeight:we.height,reservedHeight:6.5*p.$}),{hueSliderRef:_e,satBrightRef:Le,selectedColor:Re,setSelectedColor:Ie,isColorPickerOpen:Ee,openColorPicker:Te,closeColorPicker:He,hue:Oe,saturation:$e,brightness:Pe,pickerColor:Je,hexInputValue:Ke,rgbInputValue:ze,handleHueChange:qe,handleSatBrightChange:Ge,handleHexInput:Xe,handleHexInputBlur:Ve,handleRgbInput:We,handleRgbInputBlur:Ue,handleColorSelect:Ze,handleHueSliderMouseDown:je,handleSatBrightMouseDown:Qe}=function({initialColor:e}){const t=(0,r.li)(),n=(0,r.li)(),[o,i]=(0,r.J0)(e),[a,l,s]=(0,_.A)(!1),[c,h]=(0,r.J0)(I),u=(0,F.v2)((0,F.hT)([c.hue,c.saturation,c.brightness]));(0,r.vJ)(()=>{if(!a)return;const e=(0,F.xp)(o.replace("#","")),[t,n,r]=(0,F.bi)(e);h(R(t,n,r))},[a]);const p=(0,b.A)((e,t,n)=>{const r=R(e,t,n);h(r),i((0,F.v2)((0,F.hT)([e,t,n])))}),m=(0,b.A)(e=>{const t=t=>e(t),n=()=>{document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)}),f=(0,b.A)(e=>{const n=t.current;if(!n)return;const r=n.getBoundingClientRect(),{x:o}=(0,d.A)(e),i=(0,N.qE)(o-r.left,0,r.width);p(i/r.width,c.saturation,c.brightness)}),g=(0,b.A)(e=>{const t=n.current;if(!t)return;const r=t.getBoundingClientRect(),{x:o,y:i}=(0,d.A)(e),a=(0,N.qE)(o-r.left,0,r.width),l=(0,N.qE)(i-r.top,0,r.height);p(c.hue,a/r.width,1-l/r.height)}),v=(0,b.A)(e=>{const t=e.target.value.toUpperCase().replace(/[^0-9A-F]/g,"").slice(0,6);e.target.value=`#${t}`;const n=3===t.length?t.split("").map(e=>e+e).join(""):t;if(6===n.length){const[e,r,o]=(0,F.bi)((0,F.xp)(n)),a=R(e,r,o);h({...a,hexInputValue:`#${t}`}),i((0,F.v2)((0,F.hT)([e,r,o])))}else h(e=>({...e,hexInputValue:`#${t}`}))}),A=(0,b.A)(e=>{const t=e.target.value,n=t.split(",").map(e=>e.trim());if(3===n.length){const e=parseInt(n[0],10),r=parseInt(n[1],10),o=parseInt(n[2],10);if(![e,r,o].some(e=>Number.isNaN(e)||e<0||e>255)){const[n,a,l]=(0,F.bi)([e,r,o]),s=R(n,a,l);return h({...s,rgbInputValue:t}),void i((0,F.v2)((0,F.hT)([n,a,l])))}}h(e=>({...e,rgbInputValue:t}))}),C=(0,b.A)(()=>{h(e=>({...e,hexInputValue:u.toUpperCase()}))}),w=(0,b.A)(()=>{const e=(0,F.hT)([c.hue,c.saturation,c.brightness]);h(t=>({...t,rgbInputValue:`${e[0]}, ${e[1]}, ${e[2]}`}))}),x=(0,b.A)(e=>{i(e),s()}),Y=(0,b.A)(e=>{f(e),m(f)}),y=(0,b.A)(e=>{g(e),m(g)});return{hueSliderRef:t,satBrightRef:n,selectedColor:o,setSelectedColor:i,isColorPickerOpen:a,openColorPicker:l,closeColorPicker:s,hue:c.hue,saturation:c.saturation,brightness:c.brightness,pickerColor:u,hexInputValue:c.hexInputValue,rgbInputValue:c.rgbInputValue,handleHueChange:f,handleSatBrightChange:g,handleHexInput:v,handleHexInputBlur:C,handleRgbInput:A,handleRgbInputBlur:w,handleColorSelect:x,handleHueSliderMouseDown:Y,handleSatBrightMouseDown:y}}({initialColor:W[1]}),et=(0,b.A)(e=>{const t=ie.current;if(!t)return{x:0,y:0};const n=t.getBoundingClientRect(),{x:r,y:o}=(0,d.A)(e);return{x:r-n.left,y:o-n.top}}),tt=(0,b.A)(e=>{ye(t=>[...t,e]),ke([])}),{getCroppedRegion:nt,initCropState:rt,handleCropperDragStart:ot,handleCornerResizeStart:it,handleAspectRatioChange:at,handleRotationChange:lt,handleRotationChangeEnd:st,handleQuarterRotate:ct,handleFlip:dt}=function({imageRef:e,displaySize:t,getDisplayScale:n,getDisplayCoordinates:o,onAction:i,cropState:a,setCropState:l}){const s=(0,r.li)(),c=(0,r.li)(D);c.current=a;const d=(0,b.A)(t=>{if("free"===t)return;if("original"===t&&e.current){const{width:t,height:n}=f(e.current.width,e.current.height,c.current.quarterTurns);return t/n}const n=S.find(e=>e.value===t);return n?.ratio}),h=(e,t)=>{const n=()=>{t(),document.removeEventListener("mousemove",e),document.removeEventListener("touchmove",e),document.removeEventListener("mouseup",n),document.removeEventListener("touchend",n)};document.addEventListener("mousemove",e),document.addEventListener("touchmove",e),document.addEventListener("mouseup",n),document.addEventListener("touchend",n)},u=(0,b.A)(r=>{const d=e.current;if(!d||0===t.width)return;r.preventDefault(),r.stopPropagation();const{x:u,y:p}=o(r),m=n();s.current={startX:u,startY:p,cropperX:a.cropperX,cropperY:a.cropperY,cropperWidth:a.cropperWidth,cropperHeight:a.cropperHeight},h(e=>{if(!s.current)return;const t=o(e),n=t.x-s.current.startX,r=t.y-s.current.startY,i=n/m,a=r/m,h=s.current.cropperX+i,u=s.current.cropperY+a,{width:p,height:g}=f(d.width,d.height,c.current.quarterTurns),v=(0,N.qE)(h,0,p-s.current.cropperWidth),A=(0,N.qE)(u,0,g-s.current.cropperHeight);l(e=>({...e,cropperX:v,cropperY:A}))},()=>{if(s.current){const e=s.current;if(e.cropperX!==c.current.cropperX||e.cropperY!==c.current.cropperY){const t={...c.current,cropperX:e.cropperX,cropperY:e.cropperY,cropperWidth:e.cropperWidth,cropperHeight:e.cropperHeight};i({type:"crop",previousState:t})}}s.current=void 0})}),p=(0,b.A)((r,u)=>{const p=e.current;if(!p||0===t.width)return;r.preventDefault(),r.stopPropagation();const{x:m,y:g}=o(r),v=n();s.current={startX:m,startY:g,cropperX:a.cropperX,cropperY:a.cropperY,cropperWidth:a.cropperWidth,cropperHeight:a.cropperHeight},h(e=>{if(!s.current)return;const t=o(e),n=t.x-s.current.startX,r=t.y-s.current.startY,i=n/v,a=r/v,h=s.current,{width:m,height:g}=f(p.width,p.height,c.current.quarterTurns);let A=h.cropperX,C=h.cropperY,w=h.cropperWidth,x=h.cropperHeight;const b=d(c.current.aspectRatio);if("topLeft"===u?(A=h.cropperX+i,C=h.cropperY+a,w=h.cropperWidth-i,x=h.cropperHeight-a):"topRight"===u?(C=h.cropperY+a,w=h.cropperWidth+i,x=h.cropperHeight-a):"bottomLeft"===u?(A=h.cropperX+i,w=h.cropperWidth-i,x=h.cropperHeight+a):"bottomRight"===u&&(w=h.cropperWidth+i,x=h.cropperHeight+a),b)if(w/x>b){const e=x*b;"topLeft"!==u&&"bottomLeft"!==u||(A+=w-e),w=e}else{const e=w/b;"topLeft"!==u&&"topRight"!==u||(C+=x-e),x=e}w<M&&("topLeft"!==u&&"bottomLeft"!==u||(A-=M-w),w=M,b&&(x=M/b)),x<M&&("topLeft"!==u&&"topRight"!==u||(C-=M-x),x=M,b&&(w=M*b));const Y=A+w,y=C+x;"topLeft"===u||"bottomLeft"===u?(A=Math.max(0,A),w=Y-A):w=Math.min(w,m-A),"topLeft"===u||"topRight"===u?(C=Math.max(0,C),x=y-C):x=Math.min(x,g-C),l(e=>({...e,cropperX:A,cropperY:C,cropperWidth:w,cropperHeight:x}))},()=>{if(s.current){const e=s.current;if(e.cropperX!==c.current.cropperX||e.cropperY!==c.current.cropperY||e.cropperWidth!==c.current.cropperWidth||e.cropperHeight!==c.current.cropperHeight){const t={...c.current,cropperX:e.cropperX,cropperY:e.cropperY,cropperWidth:e.cropperWidth,cropperHeight:e.cropperHeight};i({type:"crop",previousState:t})}}s.current=void 0})}),m=(0,b.A)(t=>{const n=e.current;if(!n)return;const r={...c.current},{width:o,height:a}=f(n.width,n.height,c.current.quarterTurns);l({...c.current,aspectRatio:t,...B(o,a,d(t))}),i({type:"crop",previousState:r})}),g=(0,b.A)((e,t)=>{l({aspectRatio:"free",cropperX:0,cropperY:0,cropperWidth:e,cropperHeight:t,rotation:0,quarterTurns:0,flipH:!1})}),v=(0,b.A)(()=>{const{cropperX:e,cropperY:t,cropperWidth:n,cropperHeight:r}=c.current;return{x:e,y:t,width:n,height:r}}),A=(0,r.li)();return{getCroppedRegion:v,initCropState:g,handleCropperDragStart:u,handleCornerResizeStart:p,handleAspectRatioChange:m,handleRotationChange:(0,b.A)(t=>{const n=e.current;if(!n)return;A.current||(A.current={...c.current});const{width:r,height:o}=f(n.width,n.height,c.current.quarterTurns);l({...c.current,rotation:(0,N.qE)(t,-90,90),...B(r,o,d(c.current.aspectRatio))})}),handleRotationChangeEnd:(0,b.A)(()=>{A.current&&(i({type:"crop",previousState:A.current}),A.current=void 0)}),handleQuarterRotate:(0,b.A)(()=>{const t=e.current;if(!t)return;const n={...c.current},r=(c.current.quarterTurns+1)%4,{width:o,height:a}=f(t.width,t.height,r);l({...c.current,quarterTurns:r,rotation:0,...B(o,a,d(c.current.aspectRatio))}),i({type:"crop",previousState:n})}),handleFlip:(0,b.A)(()=>{const t=e.current;if(!t)return;const n={...c.current},{width:r}=f(t.width,t.height,c.current.quarterTurns);l({...c.current,flipH:!c.current.flipH,cropperX:r-c.current.cropperX-c.current.cropperWidth}),i({type:"crop",previousState:n})})}}({imageRef:le,displaySize:Me,getDisplayScale:Be,getDisplayCoordinates:et,onAction:tt,cropState:Ae,setCropState:Ce}),ht=(0,r.Kr)(()=>Ye.filter(e=>"draw"===e.type),[Ye]),ut=(0,b.A)(e=>{const t=ie.current;if(!t)return{x:0,y:0};const n=t.getBoundingClientRect(),{x:r,y:o}=(0,d.A)(e),i=t.width/n.width,a=t.height/n.height;return{x:(r-n.left)*i,y:(o-n.top)*a}}),pt=(0,b.A)((e,t,n,r,o,i,a)=>{const l=k(Ae),{flipH:s}=Ae;let c=e-n,d=t-r;if(0!==l){const e=-l*Math.PI/180,t=Math.cos(e),n=Math.sin(e),r=c*n+d*t;c=c*t-d*n,d=r}return c/=a,d/=a,s&&(c=-c),{x:c+o,y:d+i}}),mt=(0,b.A)((e,t)=>{const n=nt(),r=le.current,o=n.x+e,i=n.y+t;if(!r||"draw"!==se)return{x:o,y:i};const{width:a,height:l}=f(r.width,r.height,Ae.quarterTurns),s=k(Ae),{flipH:c}=Ae,d=g(a,l,Ae.rotation);return 0!==s||c||1!==d?pt(o,i,a/2,l/2,r.width/2,r.height/2,d):{x:o,y:i}}),ft=(0,b.A)(e=>{ye(t=>[...t,e]),ke([])}),{drawTool:gt,setDrawTool:vt,brushSize:At,setBrushSize:Ct,currentDrawAction:wt,handlePointerDown:xt,resetDrawing:bt}=function({getCanvasCoordinates:e,canvasToImageCoords:t,selectedColor:n,onActionComplete:o}){const[i,a]=(0,r.J0)("pen"),[l,s]=(0,r.J0)(5),[c,d]=(0,r.J0)(void 0),[h,u,p]=(0,_.A)(!1),m=(0,r.li)(void 0),f=(0,b.A)(n=>{if(!h||!c||m.current===c)return;const r=e(n),o=t(r.x,r.y),i="shiftKey"in n&&n.shiftKey,a=i?[c.points[0],o]:[...c.points,o];d({...c,points:a,isShiftPressed:i})}),g=(0,b.A)(e=>{if(!h||!c||m.current===c)return;p();const t={...c,completedAt:Date.now()};m.current=t,d(void 0),t.points.length>1&&o(t),document.removeEventListener("mousemove",f),document.removeEventListener("touchmove",f),document.removeEventListener("mouseup",g),document.removeEventListener("touchend",g)}),v=(0,b.A)(r=>{u();const o=e(r),a=t(o.x,o.y),s="shiftKey"in r&&r.shiftKey;d({type:"draw",tool:i,points:[a],color:n,brushSize:l,isShiftPressed:s}),document.addEventListener("mousemove",f),document.addEventListener("touchmove",f),document.addEventListener("mouseup",g),document.addEventListener("touchend",g)}),A=(0,b.A)(()=>{d(void 0),p()});return{drawTool:i,setDrawTool:a,brushSize:l,setBrushSize:s,currentDrawAction:c,isDrawing:h,handlePointerDown:v,handlePointerMove:f,handlePointerUp:g,resetDrawing:A}}({getCanvasCoordinates:ut,canvasToImageCoords:mt,selectedColor:Re,onActionComplete:ft}),{canvasSize:Yt,renderCanvas:yt,resetCanvasSize:Nt}=function({canvasRef:e,imageRef:t,mode:n,cropState:o,drawActions:i,currentDrawAction:a}){const[l,s]=(0,r.J0)({width:0,height:0}),c=(0,b.A)(()=>{const r=e.current,c=t.current;if(!r||!c)return;const d={x:o.cropperX,y:o.cropperY,width:o.cropperWidth,height:o.cropperHeight},h=r.getContext("2d");if(!h)return;const u=k(o),{flipH:p}=o;if("crop"===n){const{width:e,height:t}=f(c.width,c.height,o.quarterTurns),n=g(e,t,o.rotation);if(l.width!==e||l.height!==t)return void s({width:e,height:t});!function(e,t,n,r,o,i,a=0,l=!1,s=0,c=1){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.save(),(0!==a||l||0!==s||1!==c)&&A(e,t,a,l,s,c),i?e.drawImage(t,0,0):e.drawImage(t,n.x,n.y,n.width,n.height,0,0,r,o),e.restore()}(h,c,d,e,t,!0,u,p,o.quarterTurns,n),0!==u||p||0!==o.quarterTurns||1!==n?(h.save(),A(h,c,u,p,o.quarterTurns,n),C(h,i,0,0,void 0,c.width,c.height),h.restore()):C(h,i)}else{if(d.width<=0||d.height<=0)return;const e=Math.round(d.width),t=Math.round(d.height);if(l.width!==e||l.height!==t)return void s({width:e,height:t});const{width:n,height:r}=f(c.width,c.height,o.quarterTurns),m=g(n,r,o.rotation),v=0!==u||p||0!==o.quarterTurns||1!==m,w=document.createElement("canvas");w.width=n,w.height=r;const x=w.getContext("2d");v&&(x.save(),A(x,c,u,p,o.quarterTurns,m)),x.drawImage(c,0,0),C(x,i,0,0,a,c.width,c.height),v&&x.restore(),h.drawImage(w,d.x,d.y,d.width,d.height,0,0,e,t)}}),d=(0,r.Kr)(()=>(0,y.nb)(y.IJ,c),[c]);(0,r.vJ)(()=>{d()},[i,a,l,n,o,d]);const h=(0,r.li)();(0,r.vJ)(()=>{const e=()=>i.some(e=>"arrow"===e.tool&&e.completedAt&&Date.now()-e.completedAt<200);if(!e())return;const t=()=>{c(),e()&&(h.current=requestAnimationFrame(t))};return h.current=requestAnimationFrame(t),()=>{h.current&&cancelAnimationFrame(h.current)}},[i,c]);const u=(0,b.A)(()=>{s({width:0,height:0})});return{canvasSize:l,renderCanvas:c,resetCanvasSize:u}}({canvasRef:ie,imageRef:le,mode:se,cropState:Ae,drawActions:ht,currentDrawAction:wt});(0,r.vJ)(()=>{e&&t&&(ye([]),ke([]),bt(),ce(re),pe(void 0),he(!1),be(void 0),Ie(W[1]),Ce(D),Nt(),Fe(),ve({width:0,height:0}),le.current=void 0)},[e,t]),(0,r.vJ)(()=>{e&&t&&(async()=>{let e;try{e=await(0,h.NN)(t)}catch{return}le.current=e,ve({width:e.width,height:e.height}),rt(e.width,e.height),yt()})()},[e,t,yt,rt]),(0,r.vJ)(()=>{if(e)return(0,c.A)(()=>{Ee?He():v()})},[e,Ee,He,v]),(0,r.vJ)(()=>{if(!e)return;const t=e=>{const t=e.metaKey||e.ctrlKey,n=e.key.toLowerCase();t&&"z"===n&&!e.shiftKey?(e.preventDefault(),kt()):(t&&"z"===n&&e.shiftKey||a.H8&&t&&"y"===n)&&(e.preventDefault(),St())};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e]);const kt=(0,b.A)(()=>{const e=Se.current;if(0===e.length)return;const t=e[e.length-1],n=e.slice(0,-1);if("crop"===t.type){const e={...Ae};Ce(t.previousState),ke(t=>[...t,{type:"crop",previousState:e}])}else ke(e=>[...e,t]);ye(n)}),St=(0,b.A)(()=>{const e=De.current;if(0===e.length)return;const t=e[e.length-1],n=e.slice(0,-1);if("crop"===t.type){const e={...Ae};Ce(t.previousState),ye(t=>[...t,{type:"crop",previousState:e}])}else ye(e=>[...e,t]);ke(n)}),Dt=(0,b.A)(e=>{const t=ie.current;if(t&&0!==t.width&&0!==t.height)try{const n=t.offsetWidth,r=t.offsetHeight,o=document.createElement("canvas");o.width=n,o.height=r;const i=o.getContext("2d");i&&(i.drawImage(t,0,0,n,r),pe(o.toDataURL()),fe(e?e(n,r):`width: ${n}px; height: ${r}px`))}catch{}}),Mt=(0,b.A)(()=>{X>0&&(Dt((e,t)=>{const n=ae.current;if(!n)return`width: ${e}px; height: ${t}px`;const r=f(ge.width,ge.height,(Ae.quarterTurns+1)%4),o=n.getBoundingClientRect(),i=getComputedStyle(n),a=parseFloat(i.paddingLeft)+parseFloat(i.paddingRight),l=parseFloat(i.paddingTop)+parseFloat(i.paddingBottom),s=Math.min((o.width-a)/r.width,(o.height-l-6.5*p.$)/r.height,1),c=r.width*s;return`width: ${e}px; height: ${t}px; --end-sx: ${r.height*s/e}; --end-sy: ${c/t}`}),be("rotate")),ct(),X>0&&setTimeout(()=>{be(void 0),pe(void 0)},300)}),Bt=(0,b.A)(()=>{X>0&&(Dt(),be("flip")),dt(),X>0&&setTimeout(()=>{be(void 0),pe(void 0)},300)}),Ft=(0,b.A)(()=>{const e=le.current;if(!e)return;const t=nt();if(t.width<=0||t.height<=0)return;const r=k(Ae),{flipH:o}=Ae,{width:i,height:a}=f(e.width,e.height,Ae.quarterTurns),l=g(i,a,Ae.rotation),s=0!==r||o||0!==Ae.quarterTurns||1!==l,c=document.createElement("canvas");c.width=i,c.height=a;const d=c.getContext("2d");if(!d)return;s&&(d.save(),A(d,e,r,o,Ae.quarterTurns,l)),d.drawImage(e,0,0),C(d,ht,0,0,void 0,e.width,e.height),s&&d.restore();const u=document.createElement("canvas");u.width=Math.round(t.width),u.height=Math.round(t.height);const p=u.getContext("2d");if(!p)return;p.drawImage(c,t.x,t.y,t.width,t.height,0,0,t.width,t.height);const w=n||"image/jpeg";u.toBlob(e=>{if(e){const t=m||`image.${function(e){return e.split("/")[1]}(w)}`,n=(0,h.ti)(e,t);z(n),v()}},w)}),_t=ne.findIndex(e=>e.type===se),Lt=(0,b.A)(e=>{const t=ne[e];t&&t.type!==se&&(X>0&&("draw"===t.type?Dt((e,t)=>{const n=Be(),r=Ae.cropperWidth*n,o=Ae.cropperHeight*n,i=Ae.cropperX*n,a=Ae.cropperY*n;return(0,s.A)(`width: ${e}px`,`height: ${t}px`,`--crop-top: ${a}px`,`--crop-right: ${e-(i+r)}px`,`--crop-bottom: ${t-(a+o)}px`,`--crop-left: ${i}px`,`--offset-x: ${e/2-(i+r/2)}px`,`--offset-y: ${t/2-(a+o/2)}px`)}):Dt(),he(!0),setTimeout(()=>{he(!1),pe(void 0)},300)),ce(t.type))}),Rt=Ye.length>0,It=Ne.length>0,Et=de&&"draw"===se,Tt=de&&"crop"===se,Ht="crop"===se||Et,Ot=Be(),$t=(0,r.Kr)(()=>{if(0===Me.width)return"";if("crop"===se){const e=(0,s.A)(`width: ${Me.width}px`,`height: ${Me.height}px`);if(de){const t=Ae.cropperWidth*Ot,n=Ae.cropperHeight*Ot,r=Ae.cropperX*Ot,o=Ae.cropperY*Ot;return(0,s.A)(e,`--crop-top: ${o}px`,`--crop-right: ${Me.width-(r+t)}px`,`--crop-bottom: ${Me.height-(o+n)}px`,`--crop-left: ${r}px`,`--offset-x: ${Me.width/2-(r+t/2)}px`,`--offset-y: ${Me.height/2-(o+n/2)}px`)}return e}const e=Ae.cropperWidth*Ot,t=Ae.cropperHeight*Ot;return(0,s.A)(`width: ${e}px`,`height: ${t}px`)},[Me,Ae,Ot,se,de]);if(j)return(0,K.Y)(O.A,{children:(0,K.FD)("div",{ref:Z,className:J.root,children:[(0,K.FD)("div",{ref:ae,className:J.canvasArea,children:[(0,K.FD)("div",{className:J.canvasContainer,children:[(0,K.Y)("canvas",{ref:ie,className:(0,l.A)(J.canvas,Et&&J.transitioningToDraw,Tt&&J.transitioningToCrop,"draw"===se&&!de&&J.drawMode,"rotate"===xe&&J.transformAnimating,"flip"===xe&&J.flipAnimating),width:Yt.width||void 0,height:Yt.height||void 0,style:$t,onMouseDown:"draw"===se?xt:void 0,onTouchStart:"draw"===se?xt:void 0}),ue&&(0,K.Y)("img",{className:(0,l.A)(J.canvasSnapshot,Et&&J.zoomIn,Tt&&J.fadeOut,"rotate"===xe&&J.rotateFade,"flip"===xe&&J.flipFade),src:ue,style:me,alt:"",draggable:!1}),Ht&&!xe&&Me.width>0&&(0,K.Y)(q,{cropState:Ae,displaySize:Me,scale:Ot,isFadingOut:Et,onCropperDragStart:ot,onCornerResizeStart:it})]}),(0,K.FD)("div",{className:(0,l.A)(J.canvasControls,Et&&J.fadingOut,Tt&&J.fadingIn,"draw"===se&&!de&&J.hidden),children:[(0,K.Y)(T.A,{round:!0,color:"translucent",size:"smaller",onClick:Mt,iconName:"rotate"}),(0,K.Y)(te,{value:Ae.rotation,onChange:lt,onChangeEnd:st}),(0,K.Y)(T.A,{round:!0,color:"translucent",size:"smaller",onClick:Bt,iconName:"flip"})]})]}),(0,K.FD)("div",{className:J.editPanel,children:[(0,K.FD)("div",{className:J.panelHeader,children:[(0,K.Y)(T.A,{round:!0,color:"translucent",size:"smaller",onClick:v,children:(0,K.Y)(E.A,{name:"close"})}),(0,K.Y)("div",{className:J.headerTitle,children:G("EditMedia")}),(0,K.FD)("div",{className:J.headerActions,children:[(0,K.Y)(T.A,{round:!0,color:"translucent",size:"smaller",onClick:kt,disabled:!Rt,iconName:"undo"}),(0,K.Y)(T.A,{round:!0,color:"translucent",size:"smaller",onClick:St,disabled:!It,iconName:"redo"})]})]}),(0,K.FD)("div",{className:J.panelTabs,children:[(0,K.Y)(P.Ay,{ref:Q,name:(0,u.P)("slideOptimized",X,void 0,G.isRtl),activeKey:_t,shouldRestoreHeight:!0,className:J.panelContent,children:(()=>{switch(se){case"crop":return(0,K.Y)(U,{currentRatio:Ae.aspectRatio,onRatioChange:at});case"draw":return(0,K.Y)(ee,{predefinedColors:W,selectedColor:Re,isColorPickerOpen:Ee,hue:Oe,saturation:$e,brightness:Pe,pickerColor:Je,hexInputValue:Ke,rgbInputValue:ze,brushSize:At,drawTool:gt,hueSliderRef:_e,satBrightRef:Le,onColorSelect:Ze,onOpenColorPicker:Te,onCloseColorPicker:He,onHueSliderMouseDown:je,onHueChange:qe,onSatBrightMouseDown:Qe,onSatBrightChange:Ge,onHexInput:Xe,onHexInputBlur:Ve,onRgbInput:We,onRgbInputBlur:Ue,onBrushSizeChange:Ct,onToolChange:vt});default:return}})()}),(0,K.Y)($.A,{tabs:oe,activeTab:_t,onSwitchTab:Lt,className:J.modeTabs,tabClassName:J.modeTab})]})]}),(0,K.Y)(H.A,{isShown:Ye.length>0,iconName:"check",className:J.saveButton,onClick:Ft,ariaLabel:G("Save")})]})})})},283(e,t,n){n.d(t,{A:()=>l});var r=n(84051),o=n(87357);const i="AtWkrIxV";var a=n(20021);const l=(0,r.ph)(()=>(0,a.FD)("div",{className:"Oob7moh7",children:[(0,a.Y)("div",{className:(0,o.A)("ao0o6F_1",i)}),(0,a.FD)("div",{className:"e94nYlC4",children:[(0,a.Y)("div",{className:(0,o.A)("ANs9RCJu",i)}),(0,a.Y)("div",{className:(0,o.A)("RSn3O5Rx",i)})]})]}))},55158(e,t,n){n.d(t,{A:()=>l});var r=n(84051),o=n(87357),i=n(95807),a=n(20021);const l=(0,r.ph)(({variant:e="rectangular",animation:t="none",width:n,height:r,forceAspectRatio:l,inline:s,className:c,style:d})=>{const h=(0,o.A)("Skeleton",e,t,c,s&&"inline"),u=n&&r?`aspect-ratio: ${n}/${r}`:void 0,p=(0,i.A)(d,l&&u,Boolean(n)&&`width: ${n}px`,!l&&Boolean(r)&&`height: ${r}px`);return(0,a.Y)("div",{className:h,style:p,children:s&&" "})})},41730(e,t,n){n.d(t,{A:()=>s});var r=n(84051),o=n(87357),i=n(55158);var a=n(20021);const l=[[85,90,87,83,87,70],[81,75,83,87,81,93],[73,87,91,75,87,91]],s=(0,r.ph)(({lines:e=6,className:t})=>{const n=(0,r.Kr)(()=>{const t=Math.floor(Math.random()*l.length),n=l[t];return Array.from({length:e},(e,t)=>n[t%n.length])},[e]);return(0,a.Y)("div",{className:(0,o.A)("HenC8uSU",t),children:n.map((e,t)=>(0,a.Y)(i.A,{variant:"rounded-rect",animation:"fast-wave",className:"j0EaVKZd",style:`width: ${e}%`},t))})})}}]);
//# sourceMappingURL=4765.e3067f5e960f91f40a97.js.map