2 lines
39 KiB
JavaScript
2 lines
39 KiB
JavaScript
"use strict";(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[4765],{283:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357);const a="AtWkrIxV";var r=t(20021);const s=(0,o.ph)(()=>(0,r.FD)("div",{className:"Oob7moh7",children:[(0,r.Y)("div",{className:(0,i.A)("ao0o6F_1",a)}),(0,r.FD)("div",{className:"e94nYlC4",children:[(0,r.Y)("div",{className:(0,i.A)("ANs9RCJu",a)}),(0,r.Y)("div",{className:(0,i.A)("RSn3O5Rx",a)})]})]}))},629:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357);const a={root:"eGD1rubd",widget:"EXXsQxeq",min:"C4vXj96y",mid:"nRNm3LRD",max:"LdztzMx0",filler:"kudEBJOk"};var r=t(20021);const s=(0,o.ph)(function({value:e}){return(0,r.FD)("div",{className:(0,i.A)(a.root,"Toggle"),"aria-hidden":!0,children:[(0,r.Y)("i",{className:(0,i.A)(a.filler,a[e])}),(0,r.Y)("i",{className:(0,i.A)(a.widget,a[e])})]})})},1087:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(87357),a=t(17712),r=t(24956),s=t(20021);const l=(0,o.ph)(({id:e,name:n,options:t,selected:l,disabled:c,loadingOption:d,onChange:u,onClickAction:h,subLabelClassName:m,isLink:v,withIcon:A,subLabel:g,className:p})=>{const b=(0,o.hb)(e=>{const{value:n}=e.currentTarget;u(n,e)},[u]),f=(0,a.A)(e=>()=>{h?.(e)});return(0,s.Y)("div",{id:e,className:(0,i.A)("radio-group",p),children:t.map(e=>(0,s.Y)(r.A,{name:n,label:e.label,subLabel:g||e.subLabel,subLabelClassName:m,value:e.value,checked:e.value===l,hidden:e.hidden,isCanCheckedInDisabled:e.isCanCheckedInDisabled,disabled:c,withIcon:A,isLoading:d?d===e.value:void 0,className:e.className,onChange:b,onSubLabelClick:f(e.value),isLink:v}))})})},11124:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(84051),i=t(87357);var a=t(20021);const r=(0,o.ph)(({marks:e,onChange:n,rangeCount:t})=>{const r=(0,o.li)(),s=(0,o.Kr)(()=>e.indexOf(t),[e,t]),l=(0,o.Kr)(()=>e.indexOf(t).toString(),[e,t]);return(0,o.Nf)(()=>{if(r.current){const n=s/(e.length-1)*100,t=n/2;r.current.style.setProperty("--fill-percentage",`${n}%`),r.current.style.setProperty("--thumb-offset",`${t}%`)}},[s,e]),(0,a.Y)("div",{className:"s8NMMSES",children:(0,a.Y)("form",{children:(0,a.FD)("div",{className:"i_wrxmyh",children:[(0,a.Y)("div",{className:"O7SI4r_Y",children:e.map((e,n)=>{const t=n<=s;return(0,a.Y)("div",{className:(0,i.A)("b6UDc3zh",t?"VELPJsJ0":"K8NtimIi")},e)})}),(0,a.Y)("div",{className:"bVlnaLCI",children:e.map(e=>(0,a.Y)("div",{className:(0,i.A)("AFFaq4eZ",t===e&&"cuogxYPG"),children:e},e))}),(0,a.Y)("input",{ref:r,type:"range",className:"H_rMZrqn",min:"0",max:e.length-1,value:l,onChange:t=>{const o=parseInt(t.target.value,10),i=e[o];n(i)},step:"1"})]})})})})},12933:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(87357),i=t(59030),a=t(59324),r=t(64493),s=t(20021);const l=({isShown:e,iconName:n,className:t,color:l="primary",ariaLabel:c,disabled:d,isLoading:u,onClick:h})=>{const m=(0,i.A)(),v=(0,o.A)("FloatingActionButton",e&&"revealed",t);return(0,s.Y)(r.A,{className:v,color:l,round:!0,disabled:d,onClick:e&&!d?h:void 0,ariaLabel:c,tabIndex:-1,isRtl:m.isRtl,children:(0,s.Y)(a.A,{iconName:n,isLoading:u})})}},17208:(e,n,t)=>{t.d(n,{A:()=>D});var o=t(84051),i=t(13439),a=t(83649),r=t(31481),s=t(87357),l=t(11778),c=t(76023),d=t(4961),u=t(39351),h=t(17712),m=t(50680),v=t(87412),A=t(18276),g=t(9267),p=t(64493),b=t(3325),f=t(17663),C=t(32625),N=t(59030),w=t(68292);const y={root:"eldglPwL",svg:"xhUfxjkV",circle:"hsaty2zA"};var k=t(20021);const x=(0,o.ph)(({duration:e,className:n,onEnd:t})=>{const[i,a]=(0,o.J0)(e),r=(0,N.A)();return(0,C.A)(()=>a(e=>e-1),i>0?1e3:void 0),(0,o.vJ)(()=>{i<=0&&t?.()},[i,t]),(0,o.vJ)(()=>{a(e)},[e]),(0,k.FD)("div",{className:(0,s.A)(y.root,n),children:[(0,k.Y)("svg",{className:y.svg,width:"32px",height:"32px",children:(0,k.Y)("circle",{cx:"16",cy:"16",r:14,transform:"rotate(-90, 16, 16)",pathLength:"100","stroke-dasharray":"100","stroke-dashoffset":100-(i-1)/e*100,className:y.circle})}),(0,k.Y)(w.A,{className:y.text,text:(0,f.dq)(r,1e3*i)})]})}),Y=3e3,L=1.75*c.$,D=({notification:e})=>{const n=(0,i.ko)(),t=(0,u.A)(),{localId:c,message:f,action:C,actionText:N,cacheBreaker:w,className:y,disableClickDismiss:D,dismissAction:E,duration:M=Y,icon:S,shouldUseCustomIcon:T,customEmojiIconId:B,shouldShowTimer:F,title:R,containerSelector:I}=e,[O,K]=(0,o.J0)(!0),P=(0,o.li)(),{transitionClassNames:J}=(0,m.A)(O),$=(0,h.A)(()=>{n.dismissNotification({localId:c})}),q=(0,h.A)(e=>{!e&&D||(K(!1),setTimeout($,150+r.xB5),E&&n[E.action](E.payload))}),U=(0,h.A)(()=>{C&&(Array.isArray(C)?C.forEach(e=>n[e.action](e.payload)):n[C.action](C.payload)),D&&(K(!1),setTimeout($,150+r.xB5)),q()}),z=(0,h.A)(()=>{C&&(Array.isArray(C)?C.forEach(e=>n[e.action](e.payload)):n[C.action](C.payload)),q()});(0,o.vJ)(()=>O?(0,l.A)(q):void 0,[O,q]),(0,o.vJ)(()=>(P.current=window.setTimeout(()=>q(!0),M),()=>{P.current&&(clearTimeout(P.current),P.current=void 0)}),[M,w]);const _=(0,h.A)(()=>{D||P.current&&(clearTimeout(P.current),P.current=void 0)}),W=(0,h.A)(()=>{D||(P.current&&clearTimeout(P.current),P.current=window.setTimeout(q,M))}),j=(0,o.Kr)(()=>{if(R)return(0,a.Yw)(R)?t.with(R):(0,d.A)(R,["simple_markdown","emoji","br","links"])},[t,R]),H=(0,o.Kr)(()=>(0,a.Yw)(f)?t.with(f):"string"==typeof f?(0,d.A)(f,["simple_markdown","emoji","br","links"]):f,[t,f]),Q=(0,o.Kr)(()=>{if(N)return(0,a.Yw)(N)?t.with(N):N},[t,N]),G=(0,o.Kr)(()=>B?(0,k.Y)(v.A,{className:"notification-emoji-icon",forceAlways:!0,size:L,documentId:B}):T&&"star"===S?(0,k.Y)(g.A,{type:"gold",className:(0,s.A)("notification-icon"),size:"adaptive"}):(0,k.Y)(A.A,{name:S||"info-filled",className:"notification-icon"}),[B,S,T]);return(0,k.Y)(b.A,{className:"Notification-container",containerSelector:I,children:(0,k.FD)("div",{className:(0,s.A)("Notification",J,y),onClick:z,onMouseEnter:_,onMouseLeave:W,children:[G,(0,k.FD)("div",{className:"content",children:[Boolean(j)&&(0,k.Y)("div",{className:"notification-title",children:j}),H]}),Boolean(Q)&&(0,k.Y)(p.A,{color:"translucent-white",onClick:U,className:"notification-button",children:Q}),F&&(0,k.Y)(x,{className:"notification-timer",duration:Math.ceil(M/1e3)},w)]})})}},22337:(e,n,t)=>{t.d(n,{U:()=>x,A:()=>Y});var o=t(84051),i=t(87357),a=t(52674),r=t(14680),s=t(91034),l=t(29441),c=t(26072),d=t(17712),u=t(37859),h=t(59030),m=t(34201),v=t(64493),A=t(13439),g=t(86046),p=t(17142),b=t(48775),f=t(39351),C=t(96530);const N="w919CqtI";var w=t(20021);const y=(0,o.ph)((0,A.EK)(e=>{const{stars:n,ton:t}=e;return{starBalance:n?.balance,tonBalance:t?.balance,tonUsdRate:e.appConfig.tonUsdRate}})(function({starBalance:e,tonBalance:n,tonUsdRate:t,isModalOpen:o,currency:a,onCloseAnimationEnd:r}){const{openStarsBalanceModal:s}=(0,A.ko)(),l=(0,f.A)(),c="TON"===a,u=c?n:e,h=!!o&&Boolean(u),{ref:v,shouldRender:y}=(0,m.A)({isOpen:h,onCloseAnimationEnd:r,withShouldRender:!0}),k=(0,d.A)(()=>{s(c?{currency:"TON"}:{})});if(y&&u)return(0,w.FD)("div",{className:(0,i.A)("UtvP6LQ2"),ref:v,children:[(0,w.Y)("div",{children:l("ModalStarsBalanceBarDescription",c?{stars:(0,b.Ms)(l,(0,p.wD)(u.amount),{className:N})}:{stars:(0,b.U2)(l,(0,g.ZF)(l,u),{className:N})},{withNodes:!0,withMarkdown:!0})}),(0,w.FD)("div",{children:[c&&Boolean(t)&&(0,w.Y)("div",{className:"VMKBAQXy",style:"color: var(--color-text-secondary)",children:`≈ ${(0,p.Ad)((0,p.C)(u.amount,t,!0),"USD",l.code)}`}),!c&&(0,w.Y)(C.A,{isPrimary:!0,onClick:k,children:l("GetMoreStarsLinkText")})]})]})}));var k=t(3325);const x=200,Y=(0,s.A)(({dialogRef:e,title:n,className:t,contentClassName:s,headerClassName:A,isOpen:g,isSlim:p,header:b,hasCloseButton:f,hasAbsoluteCloseButton:C,absoluteCloseButtonColor:N="translucent",noBackdrop:Y,noBackdropClose:L,children:D,style:E,dialogStyle:M,isLowStackPriority:S,dialogContent:T,dialogClassName:B,onClose:F,onCloseAnimationEnd:R,onEnter:I,withBalanceBar:O,isCondensedHeader:K,currencyInBalanceBar:P="XTR"})=>{const{ref:J,shouldRender:$}=(0,m.A)({isOpen:g,onCloseAnimationEnd:R,withShouldRender:!0}),q=f||C;(0,o.vJ)(()=>{if(g)return(0,r.FD)(),r.wb},[g]);const U=(0,d.A)(e=>!!I&&(e.preventDefault(),I(),!0));(0,o.vJ)(()=>g?(0,a.A)({onEsc:F,onEnter:U}):void 0,[g,F,U]),(0,o.vJ)(()=>g&&J.current?(0,l.A)(J.current):void 0,[g,J]),(0,c.A)({isActive:g,onBack:F}),(0,u.A)(([e])=>(document.body.classList.toggle("has-open-dialog",Boolean(g)),(g||!g&&void 0!==e)&&(0,o.VK)(x),()=>{document.body.classList.remove("has-open-dialog")}),[g]);const z=(0,h.A)();if(!$)return;const _=(0,i.A)("Modal",t,Y&&"transparent-backdrop",p&&"slim",S&&"low-priority",O&&"with-balance-bar"),W=(0,i.A)("modal-dialog",B);return(0,w.Y)(k.A,{children:(0,w.FD)("div",{ref:J,className:_,tabIndex:-1,role:"dialog",children:[O&&(0,w.Y)(y,{isModalOpen:g,currency:P}),(0,w.FD)("div",{className:"modal-container",children:[(0,w.Y)("div",{className:"modal-backdrop",onClick:L?void 0:F}),(0,w.FD)("div",{className:W,ref:e,style:M,children:[function(){if(b)return b;const e=q?(0,w.Y)(v.A,{className:(0,i.A)(C&&"modal-absolute-close-button"),round:!0,color:N,size:"smaller",iconName:"close",ariaLabel:z("Close"),onClick:F}):void 0;return n?(0,w.FD)("div",{className:(0,i.A)("modal-header",A,K&&"modal-header-condensed"),children:[e,(0,w.Y)("div",{className:"modal-title",children:n})]}):e}(),T,(0,w.Y)("div",{className:(0,i.A)("modal-content custom-scroll",s),style:E,children:D})]})]})]})})})},22720:(e,n,t)=>{t.d(n,{A:()=>C});var o=t(84051),i=t(66644),a=t(96454),r=t(87357),s=t(4961),l=t(10722),c=t(11217),d=t(37661),u=t(39351),h=t(17712),m=t(18276),v=t(64493),A=t(71429),g=t(24433),p=t(60859),b=t(42452),f=t(20021);const C=({ref:e,buttonRef:n,icon:t,iconClassName:C,leftElement:N,buttonClassName:w,menuBubbleClassName:y,secondaryIcon:k,secondaryIconClassName:x,rightElement:Y,className:L,style:D,children:E,disabled:M,allowDisabledClick:S,ripple:T,narrow:B,inactive:F,focus:R,destructive:I,withPrimaryColor:O,multiline:K,isStatic:P,allowSelection:J,withColorTransition:$,contextActions:q,withPortalForMenu:U,href:z,nonInteractive:_,onClick:W,clickArg:j,onMouseDown:H,onContextMenu:Q,onSecondaryIconClick:G,onDragEnter:V,onDragLeave:X})=>{let Z=(0,o.li)();e&&(Z=e);const[ee,ne,te]=(0,d.A)(),{isContextMenuOpen:oe,contextMenuAnchor:ie,handleBeforeContextMenu:ae,handleContextMenu:re,handleContextMenuClose:se,handleContextMenuHide:le}=(0,l.A)(Z,!q),ce=(0,h.A)(()=>Z.current),de=(0,h.A)(()=>Z.current.closest(".custom-scroll")),ue=(0,h.A)(()=>(U?document.querySelector("#portals"):Z.current).querySelector(".ListItem-context-menu .bubble")),he=(0,h.A)(()=>({withPortal:U})),me=(0,h.A)(e=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===a.w3.Main){if(z&&!W)return;e.preventDefault()}}),ve=(0,h.A)(e=>{if(!M||S){if(z){if((e.ctrlKey||e.metaKey||e.shiftKey)&&e.button===a.w3.Main||e.button===a.w3.Auxiliary)return;W&&e.preventDefault()}W&&(W(e,j),a.TF&&!T&&(ne(),(0,i.YS)(te)))}}),{handleClick:Ae,handleMouseDown:ge}=(0,c.Q)(e=>{M&&!S||0!==e.button||!G&&!q||(e.stopPropagation(),G?G(e):re(e))}),pe=(0,h.A)(e=>{F||a.TF||(!q||e.button!==a.w3.Secondary&&W||ae(e),e.button===a.w3.Main&&(W?ve(e):re(e)))}),be=(0,u.A)(),fe=(0,r.A)("ListItem",L,J&&"allow-selection",T&&"has-ripple",B&&"narrow",M&&"disabled",S&&"click-allowed",F&&"inactive",ie&&"has-menu-open",R&&"focus",I&&"destructive",O&&"primary",K&&"multiline",P&&"is-static",$&&"with-color-transition"),Ce=z?"a":"div";return(0,f.FD)("div",{ref:Z,className:fe,dir:be.isRtl?"rtl":void 0,style:D,onMouseDown:H,onDragEnter:V,onDragLeave:X,children:[(0,f.FD)(Ce,{className:(0,r.A)("ListItem-button",ee&&"active",w),role:P||z?void 0:"button",href:z,ref:n,rel:z?"noopener noreferrer":void 0,tabIndex:P?void 0:0,onClick:!F&&a.TF?ve:me,onMouseDown:pe,onContextMenu:Q||(!F&&q?re:void 0),"aria-disabled":M||void 0,children:[!M&&!F&&T&&(0,f.Y)(b.A,{}),N,t&&(0,f.Y)(m.A,{name:t,className:(0,r.A)("ListItem-main-icon",C)}),K&&(0,f.Y)("div",{className:"multiline-item",children:E}),!K&&E,k&&(0,f.Y)(v.A,{nonInteractive:_,className:(0,r.A)("secondary-icon",x),round:!0,color:"translucent",size:"smaller",onClick:Ae,onMouseDown:ge,iconName:k}),Y]}),q&&void 0!==ie&&(0,f.Y)(A.A,{isOpen:oe,anchor:ie,getTriggerElement:ce,getRootElement:de,getMenuElement:ue,getLayout:he,className:"ListItem-context-menu with-menu-transitions",autoClose:!0,onClose:se,onCloseAnimationEnd:le,withPortal:U,bubbleClassName:y,children:q.map(e=>"isSeparator"in e?(0,f.Y)(p.A,{},e.key||"separator"):(0,f.Y)(g.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:(0,f.Y)("span",{className:"list-item-ellipsis",children:(0,s.A)(e.title)})},e.title))})]})}},24680:(e,n,t)=>{t.d(n,{A:()=>m});var o=t(84051),i=t(57446),a=t(96454),r=t(87357),s=t(36838),l=t(39351),c=t(73767),d=t(34132),u=t(20021);const h=a.pz?450:a.Ni?400:300,m=(0,o.ph)(({tabs:e,activeTab:n,className:t,tabClassName:a,contextRootElementSelector:m,onSwitchTab:v})=>{const A=(0,o.li)(),g=(0,c.A)(n),p=(0,l.A)();return(0,s.A)(A,void 0,!0),(0,o.vJ)(()=>{const e=A.current,{scrollWidth:t,offsetWidth:o,scrollLeft:a}=e;if(t<=o)return;const r=e.childNodes[n];if(!r)return;const{offsetLeft:s,offsetWidth:l}=r,c=s-o/2+l/2;Math.abs(c-a)<16||(0,i.A)(e,c,h)},[n]),(0,u.Y)("div",{className:(0,r.A)("TabList","no-scrollbar",t),ref:A,dir:p.isRtl?"rtl":void 0,children:e.map((e,t)=>(0,u.Y)(d.A,{title:e.title,isActive:t===n,isBlocked:e.isBlocked,badgeCount:e.badgeCount,isBadgeActive:e.isBadgeActive,previousActiveTab:g,onClick:v,clickArg:t,contextActions:e.contextActions,contextRootElementSelector:m,className:a},e.id))})})},24713:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(87357),a=t(68292),r=t(26607);var s=t(20021);const l=(0,o.ph)(({text:e,className:n,isAlternateColor:t})=>(0,s.Y)(r.A,{className:(0,i.A)("Y3ZoW17O",t?"Lq67O2D2":"DWjOG2Ze",n),isOpen:Boolean(e),children:e&&(0,s.Y)(a.A,{text:e})}))},24956:(e,n,t)=>{t.d(n,{A:()=>l});var o=t(84051),i=t(87357),a=t(39351),r=t(57474),s=t(20021);const l=(0,o.ph)(({id:e,label:n,subLabel:t,subLabelClassName:o,value:l,name:c,checked:d,disabled:u,hidden:h,isLoading:m,className:v,onlyInput:A,withIcon:g,isLink:p,onChange:b,onSubLabelClick:f,isCanCheckedInDisabled:C})=>{const N=(0,a.A)(),w=(0,i.A)("Radio",v,u&&"disabled",h&&"hidden-widget",g&&"with-icon",m&&"loading",A&&"onlyInput",Boolean(t)&&"withSubLabel",C&&"canCheckedInDisabled");return(0,s.FD)("label",{className:w,dir:N.isRtl?"rtl":void 0,children:[(0,s.Y)("input",{type:"radio",name:c,value:l,id:e,checked:d,onChange:b,disabled:u||h}),(0,s.FD)("div",{className:"Radio-main",children:[(0,s.Y)("span",{className:"label",dir:N.isRtl?"auto":void 0,children:n}),Boolean(t)&&(0,s.Y)("span",{className:(0,i.A)(o,"subLabel",p?"subLabelLink":void 0),dir:N.isRtl?"auto":void 0,onClick:p?f:void 0,children:t})]}),m&&(0,s.Y)(r.A,{})]})})},26607:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(73767),a=t(34201),r=t(20021);const s=({isOpen:e,isHidden:n,isCustom:t,id:s,className:l,onClick:c,children:d,noCloseTransition:u,shouldAnimateFirstRender:h,style:m,ref:v})=>{const A=(0,i.A)(e),g=(0,i.A)(d),p=(0,o.li)(),b=void 0===A,{ref:f,shouldRender:C}=(0,a.A)({isOpen:e&&!n,ref:v,noMountTransition:b&&!h,className:!t&&void 0,noCloseTransition:u,withShouldRender:!0});return A&&!e&&(p.current=g),(C||n)&&(0,r.Y)("div",{id:s,ref:f,className:l,onClick:c,style:m,children:e?d:p.current})}},32581:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(87357),i=t(59030);var a=t(20021);const r=function({children:e,className:n}){const t=(0,i.A)();return(0,a.Y)("div",{dir:t.isRtl?"rtl":void 0,className:(0,o.A)("LxlpQKLr",n),children:e})}},34132:(e,n,t)=>{t.d(n,{A:()=>b});var o=t(84051),i=t(66644),a=t(96454),r=t(87357),s=t(41402),l=t(4961),c=t(10722),d=t(11217),u=t(17712),h=t(18276),m=t(71429),v=t(24433),A=t(60859),g=t(20021);const p="Tab--active",b=({className:e,title:n,isActive:t,isBlocked:b,badgeCount:f,isBadgeActive:C,previousActiveTab:N,contextActions:w,contextRootElementSelector:y,icon:k,clickArg:x,onClick:Y})=>{const L=(0,o.li)();(0,o.Nf)(()=>{t&&void 0===N&&L.current&&L.current.classList.add(p)},[t,N]),(0,o.vJ)(()=>{if(!t||void 0===N)return;const e=L.current,n=e.parentElement.children[N];if(!n)return void(t&&!e.classList.contains(p)&&(0,i.RK)(()=>{e.classList.add(p)}));const o=e.querySelector(".platform"),a=n.querySelector(".platform"),r=a.parentElement.offsetLeft-o.parentElement.offsetLeft,l=a.clientWidth/o.clientWidth;(0,i.RK)(()=>{a.classList.remove("animate"),o.classList.remove("animate"),o.style.transform=`translate3d(${r}px, 0, 0) scale3d(${l}, 1, 1)`,(0,i.gm)(()=>((0,s.A)(o),()=>{o.classList.add("animate"),o.style.transform="none",n.classList.remove(p),e.classList.add(p)}))})},[t,N]);const{contextMenuAnchor:D,handleContextMenu:E,handleBeforeContextMenu:M,handleContextMenuClose:S,handleContextMenuHide:T,isContextMenuOpen:B}=(0,c.A)(L,!w),{handleClick:F,handleMouseDown:R}=(0,d.Q)(e=>{!w||e.button!==a.w3.Secondary&&Y||M(e),"mousedown"===e.type&&e.button!==a.w3.Main||Y?.(x)}),I=(0,u.A)(()=>L.current),O=(0,u.A)(()=>y?L.current.closest(y):document.body),K=(0,u.A)(()=>document.querySelector("#portals").querySelector(".Tab-context-menu .bubble")),P=(0,u.A)(()=>({withPortal:!0}));return(0,g.FD)("div",{className:(0,r.A)("Tab",Y&&"Tab--interactive",e),onClick:F,onMouseDown:R,onContextMenu:E,ref:L,children:[k,(0,g.FD)("span",{className:"Tab_inner",children:["string"==typeof n?(0,l.A)(n):n,Boolean(f)&&(0,g.Y)("span",{className:(0,r.A)("badge",C&&"Tab__badge--active"),children:f}),b&&(0,g.Y)(h.A,{name:"lock-badge",className:"blocked"}),(0,g.Y)("i",{className:"platform"})]}),w&&void 0!==D&&(0,g.Y)(m.A,{isOpen:B,anchor:D,getTriggerElement:I,getRootElement:O,getMenuElement:K,getLayout:P,className:"Tab-context-menu",autoClose:!0,onClose:S,onCloseAnimationEnd:T,withPortal:!0,children:w.map(e=>"isSeparator"in e?(0,g.Y)(A.A,{},e.key||"separator"):(0,g.Y)(v.A,{icon:e.icon,destructive:e.destructive,disabled:!e.handler,onClick:e.handler,children:e.title},e.title))})]})}},35913:(e,n,t)=>{t.d(n,{A:()=>v});var o=t(84051),i=t(66644),a=t(19822),r=t(87357),s=t(87094),l=t(41257),c=t(38691),d=t(18276),u=t(20021);const h={s:42,m:48,l:54,xl:52},m=.05,v=(0,o.ph)(({progress:e=0,size:n="l",square:t,transparent:v,noCross:A,rotationOffset:g,withColor:p,onClick:b})=>{const f=(0,o.li)(),C=h[n],N=(0,l.i)(e),w=(0,c.A)(),y=(0,s.A)(f,void 0,!p);(0,o.vJ)(()=>{let e,t,o=!0,r=m;(0,a.i0)(()=>{if(!f.current)return!1;N.current!==t&&(r=Math.min(Math.max(m,t||0),1),e=Date.now(),t=N.current);const i=Math.min(Math.max(m,N.current),1),s=Math.min(1,(Date.now()-e)/600),l=a.qM.easeOutQuad(s),c=r+(i-r)*l;return function(e,n,t,o,i,a,r=!1,s){const l=n/2,c=(n-t)/2-2*a,d=s??Date.now()%2e3/2e3,u=2*Math.PI*d,h=u+2*Math.PI*i,m=e.getContext("2d");r&&(e.width=n,e.height=n,m.lineCap="round",m.strokeStyle=o,m.lineWidth=t),m.clearRect(0,0,n,n),m.beginPath(),m.arc(l,l,c,u,h),m.stroke()}(f.current,C*w,("xl"===n?3:2)*w,y??"white",c,w,o,g),o=!1,c<1},i.RK)},[N,n,C,w,g,y]);const k=(0,r.A)(`ProgressSpinner size-${n}`,v&&"transparent",t&&"square",A&&"no-cross");return(0,u.FD)("div",{className:k,onClick:b,children:[!A&&(0,u.Y)(d.A,{name:"close"}),(0,u.Y)("canvas",{ref:f,className:"ProgressSpinner_canvas",style:`width: ${C}; height: ${C}px;`})]})})},36393:(e,n,t)=>{t.d(n,{A:()=>g});var o=t(84051),i=t(63495),a=t(87357),r=t(37661),s=t(79174),l=t(39351),c=t(17712),d=t(59030),u=t(18276),h=t(64493),m=t(52745),v=t(41036),A=t(20021);const g=(0,o.ph)(({ref:e,children:n,resultsItemSelector:t,value:g,inputId:p,className:b,focused:f,isLoading:C=!1,spinnerColor:N,spinnerBackgroundColor:w,placeholder:y,disabled:k,autoComplete:x,canClose:Y,autoFocusSearch:L,hasUpButton:D,hasDownButton:E,teactExperimentControlled:M,withBackIcon:S,onChange:T,onStartBackspace:B,onReset:F,onFocus:R,onBlur:I,onClick:O,onUpClick:K,onDownClick:P,onSpinnerClick:J,onEnter:$})=>{let q=(0,o.li)();e&&(q=e);const[U,z,_]=(0,r.A)(f);(0,s.A)(q,L,_),(0,o.vJ)(()=>{q.current&&(f?q.current.focus():q.current.blur())},[f,y]);const W=(0,d.A)(),j=(0,l.A)();function H(){z(),R?.()}const Q=(0,c.A)(e=>{if("Enter"===e.key){if($)return e.preventDefault(),void $();if(t){const e=document.querySelector(t);e&&e.focus()}}if(t&&"ArrowDown"===e.key){const e=document.querySelector(t);e&&e.focus()}"Backspace"===e.key&&0===e.currentTarget.selectionStart&&0===e.currentTarget.selectionEnd&&B?.()});return(0,A.FD)("div",{className:(0,a.A)("SearchInput",b,U&&"has-focus"),onClick:O,dir:j.isRtl?"rtl":void 0,children:[(0,A.Y)(v.Ay,{name:"fade",shouldCleanup:!0,activeKey:Number(!C&&!S),className:"icon-container-left",slideClassName:"icon-container-slide",children:C&&!S?(0,A.Y)(m.A,{color:N,backgroundColor:w,onClick:J}):S?(0,A.Y)(u.A,{name:"arrow-left",className:"back-icon",onClick:F}):(0,A.Y)(u.A,{name:"search",className:"search-icon"})}),(0,A.Y)("div",{children:n}),(0,A.Y)("input",{ref:q,id:p,type:"text",dir:"auto",placeholder:y||W("Search"),className:"form-control",value:g,disabled:k,autoComplete:x,spellCheck:!i.Vq&&void 0,onChange:function(e){const{currentTarget:n}=e;T(n.value),U||H()},onFocus:H,onBlur:function(){_(),I?.()},onKeyDown:Q,teactExperimentControlled:M}),D&&(0,A.Y)(h.A,{round:!0,size:"tiny",color:"translucent",iconName:"up",onClick:K,disabled:!K,ariaLabel:j("AriaSearchOlderResult")}),E&&(0,A.Y)(h.A,{round:!0,size:"tiny",color:"translucent",iconName:"down",onClick:P,disabled:!P,ariaLabel:j("AriaSearchNewerResult")}),(0,A.Y)(v.Ay,{name:"fade",shouldCleanup:!0,activeKey:Number(C),className:"icon-container-right",slideClassName:"icon-container-slide",children:S&&C?(0,A.Y)(m.A,{color:N,backgroundColor:w,onClick:J}):(g||Y)&&F&&(0,A.Y)(h.A,{round:!0,size:"tiny",color:"translucent",iconName:"close",onClick:F})})]})})},43434:(e,n,t)=>{t.d(n,{A:()=>c});var o=t(84051),i=t(87357),a=t(39351),r=t(18276),s=t(90751),l=t(20021);const c=(0,o.ph)(({title:e,disabled:n,isForForum:t,currentAvatarBlobUrl:c,onChange:d})=>{const[u,h]=(0,o.J0)(),[m,v]=(0,o.J0)(c),A=(0,a.A)();(0,o.vJ)(()=>{v(c)},[c]);const g=(0,o.hb)(e=>{h(void 0),d(e),m&&m!==c&&URL.revokeObjectURL(m),v(URL.createObjectURL(e))},[m,c,d]),p=(0,o.hb)(()=>{h(void 0)},[]),b=(0,i.A)(m&&"filled",n&&"disabled",t&&"rounded-square");return(0,l.FD)("div",{className:"AvatarEditable",children:[(0,l.FD)("label",{className:b,role:"button",tabIndex:0,title:e||A("ChangeYourProfilePicture"),children:[(0,l.Y)("input",{type:"file",onChange:function(e){const n=e.target;n?.files?.[0]&&(h(n.files[0]),n.value="")},accept:"image/png, image/jpeg"}),(0,l.Y)(r.A,{name:"camera-add"}),m&&(0,l.Y)("img",{src:m,draggable:!1,alt:""})]}),(0,l.Y)(s.A,{file:u,onClose:p,onChange:g})]})})},46222:(e,n,t)=>{t.d(n,{A:()=>h});var o=t(84051),i=t(89925),a=t(66644),r=t(96454),s=t(95807),l=t(9718),c=t(37836),d=t(17712),u=t(20021);const h=({ref:e,style:n,className:t,items:h,itemSelector:m=".ListItem",preloadBackwards:v=20,sensitiveArea:A=800,withAbsolutePositioning:g,maxHeight:p,noScrollRestore:b=!1,noScrollRestoreOnTop:f=!1,noFastList:C,cacheBuster:N,beforeChildren:w,children:y,scrollContainerClosest:k,onLoadMore:x,onScroll:Y,onWheel:L,onClick:D,onKeyDown:E})=>{let M=(0,o.li)();e&&(M=e);const S=(0,o.li)({}),[T,B]=(0,o.Kr)(()=>x?[(0,c.sg)((e=!1)=>{x({direction:i.TN.Backwards,noScroll:e})},1e3,!0,!1),(0,c.sg)(()=>{x({direction:i.TN.Forwards})},1e3,!0,!1)]:[],[x,h]);(0,o.vJ)(()=>{const e=k?M.current.closest(k):M.current;if(!T||!e)return;if(v>0&&(!h||h.length<v))return void T(!0);const{scrollHeight:n,clientHeight:t}=e;t&&n<t&&T()},[h,T,v,k]),(0,o.Nf)(()=>{const e=k?M.current.closest(k):M.current,n=M.current;(0,a.gm)(()=>{const t=S.current;let o;if(t.listItemElements=n.querySelectorAll(m),t.currentAnchor&&Array.from(t.listItemElements).includes(t.currentAnchor)){const{scrollTop:n}=e,i=t.currentAnchor.getBoundingClientRect().top;o=n+(i-t.currentAnchorTop)}else{const e=t.listItemElements[0];e&&(t.currentAnchor=e,t.currentAnchorTop=e.getBoundingClientRect().top)}if(g||b)return;const{scrollTop:i}=e;return f&&0===i?void 0:()=>{(0,l.A)(e,o),t.isScrollTopJustUpdated=!0}})},[h,m,b,f,N,g,k]);const F=(0,d.A)(e=>{if(B&&T){const{isScrollTopJustUpdated:e,currentAnchor:n,currentAnchorTop:t}=S.current,o=S.current.listItemElements;if(e)return void(S.current.isScrollTopJustUpdated=!1);const i=o.length,a=k?M.current.closest(k):M.current,{scrollTop:r,scrollHeight:s,offsetHeight:l}=a,c=r<=(i?o[0].offsetTop:0)+A,d=(i?o[i-1].offsetTop+o[i-1].offsetHeight:s)-(r+l)<=A;let u=!1;if(c){const e=o[0];if(e){const o=e.getBoundingClientRect().top,i=n?.offsetParent&&n!==e?n.getBoundingClientRect().top:o;n&&void 0!==t&&i>t&&(S.current.currentAnchor=e,S.current.currentAnchorTop=o,u=!0,B())}}if(d){const e=o[i-1];if(e){const o=e.getBoundingClientRect().top,i=n?.offsetParent&&n!==e?n.getBoundingClientRect().top:o;n&&void 0!==t&&i<t&&(S.current.currentAnchor=e,S.current.currentAnchorTop=o,u=!0,T())}}if(!u)if(n?.offsetParent)S.current.currentAnchorTop=n.getBoundingClientRect().top;else{const e=o[0];e&&(S.current.currentAnchor=e,S.current.currentAnchorTop=e.getBoundingClientRect().top)}}Y&&Y(e)});return(0,o.Nf)(()=>{const e=k?M.current.closest(k):M.current;if(!e)return;const n=e=>F(e);return e.addEventListener("scroll",n),()=>{e.removeEventListener("scroll",n)}},[F,k]),(0,u.FD)("div",{ref:M,className:t,style:n,teactFastList:!C&&!g,onClick:D,onKeyDown:E,onWheel:L,children:[w,g&&h?.length?(0,u.Y)("div",{teactFastList:!C,style:(0,s.A)("position: relative",r.Ni&&`height: ${p}px`),children:y}):y]})}},55158:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357),a=t(95807),r=t(20021);const s=(0,o.ph)(({variant:e="rectangular",animation:n="wave",width:t,height:o,forceAspectRatio:s,inline:l,className:c})=>{const d=(0,i.A)("Skeleton",e,n,c,l&&"inline"),u=t&&o?`aspect-ratio: ${t}/${o}`:void 0,h=(0,a.A)(s&&u,Boolean(t)&&`width: ${t}px`,!s&&Boolean(o)&&`height: ${o}px`);return(0,r.Y)("div",{className:d,style:h,children:l&&" "})})},55573:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(59030),i=t(64493),a=t(20021);const r=({count:e,itemName:n,itemPluralName:t,isLoading:r,onClick:s})=>{const l=(0,o.A)();return(0,a.FD)(i.A,{className:"ShowMoreButton",color:"translucent",isText:!0,isLoading:r,isRtl:l.isRtl,onClick:s,iconName:"down",children:["Show"," ",e," ","more"," ",e>1?t||`${n}s`:n]})}},60859:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(87357);const i={root:"h039vb1K",thin:"NGKaFgra",thick:"_BdnjPEa"};var a=t(20021);const r=({className:e,size:n="thin"})=>(0,a.Y)("div",{className:(0,o.A)(i.root,i[n],e)})},61361:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(17663),a=t(80140),r=t(32625),s=t(30857),l=t(68292),c=t(20021);const d=({endsAt:e,onEnd:n})=>{const t=(0,s.A)(),d=(0,a.Fm)(),u=d<e;if((0,r.A)(t,u?500:void 0),(0,o.vJ)(()=>{u||n?.()},[u,n]),!u)return;const h=e-d,m=(0,i.QO)(h).split(":"),v=(0,c.Y)("span",{style:"font-variant-numeric: tabular-nums;",children:m.map((e,n)=>(0,c.FD)(c.FK,{children:[n>0&&":",(0,c.Y)(l.A,{text:e},n)]}))});return(0,c.Y)("span",{children:v})}},63152:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(84051),i=t(87357),a=t(20021);const r=(0,o.ph)(({id:e,name:n,value:t,label:r,checked:s=!1,disabled:l,inactive:c,noAnimation:d,onChange:u,onCheck:h})=>{const m=(0,o.hb)(e=>{u&&u(e),h&&h(e.currentTarget.checked)},[u,h]),v=(0,i.A)("Switcher",l&&"disabled",c&&"inactive",d&&"no-animation");return(0,a.FD)("label",{className:v,title:r,children:[(0,a.Y)("input",{type:"checkbox",id:e,name:n,value:t,checked:s,disabled:l,onChange:m}),(0,a.Y)("span",{className:"widget"})]})})},63173:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(84051),i=t(87357),a=t(20021);const r=(0,o.ph)(e=>{const{id:n,value:t,label:o,hasArrow:r,error:s,ref:l,tabIndex:c,onChange:d,children:u}=e,h=s||o,m=(0,i.A)("input-group",t&&"touched",s&&"error",h&&"with-label",r&&"with-arrow","input-group");return(0,a.FD)("div",{className:m,children:[(0,a.Y)("select",{className:"form-control",id:n,value:t||"",onChange:d,tabIndex:c,ref:l,children:u}),h&&n&&(0,a.Y)("label",{htmlFor:n,children:h})]})})},66469:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(96454),a=t(17712),r=t(64493),s=t(20021);let l,c=!0;const d=({onActivate:e,...n})=>{const t=(0,o.li)(!1),d=(0,a.A)(n=>{if(t.current=!0,c)return c=!1,void e(n);l&&(clearTimeout(l),l=void 0),l=window.setTimeout(()=>{t.current&&e(n)},200)}),u=(0,a.A)(()=>{t.current=!1}),h=(0,a.A)(n=>{t.current=!0,e(n)});return(0,s.Y)(r.A,{...n,onMouseEnter:i.TF?void 0:d,onMouseLeave:i.TF?void 0:u,onClick:i.TF?h:e})}},77561:(e,n,t)=>{t.d(n,{A:()=>c});var o=t(84051),i=t(87357),a=t(87894),r=t(17712),s=t(19806),l=t(20021);const c=(0,o.ph)(({id:e,options:n,selected:t,disabled:o,nestedCheckbox:c,loadingOptions:d,isRound:u,onChange:h,onClickLabel:m,className:v})=>{const A=(0,r.A)((e,n)=>{const{value:o,checked:i}=e.currentTarget;let r;i?(r=(0,a.Am)([...t,o]),n?.forEach(e=>{r.includes(e.value)||r.push(e.value)})):(r=t.filter(e=>e!==o),n&&(r=r.filter(e=>!n.some(n=>n.value===e)))),h(r)}),g=(0,r.A)(e=>{const n=e?.filter(e=>t.includes(e.value)).length;return n>0?n:e.length});return(0,l.Y)("div",{id:e,className:(0,i.A)("radio-group",v),children:n.map(e=>(0,l.Y)(s.A,{label:e.label,subLabel:e.subLabel,value:e.value,peer:e.peer,checked:-1!==t?.indexOf(e.value),disabled:e.disabled||o,isLoading:d?-1!==d.indexOf(e.value):void 0,onChange:A,onClickLabel:m,nestedCheckbox:c,nestedCheckboxCount:g(e.nestedOptions??[]),nestedOptionList:e.nestedOptions,values:t,isRound:u}))})})},80401:(e,n,t)=>{t.d(n,{A:()=>u});var o=t(84051),i=t(87357),a=t(95807),r=t(15640),s=t(59030),l=t(18276);var c=t(20021);const d={x:0,y:0},u=(0,o.ph)(({children:e,id:n,onDrag:t,onDragEnd:u,style:h,knobStyle:m,isDisabled:v})=>{const A=(0,s.A)(),g=(0,o.li)(),[p,b]=(0,o.J0)({isDragging:!1,origin:d,translation:d}),f=e=>{e.stopPropagation(),e.preventDefault();const{x:n,y:t}=(0,r.A)(e);b({...p,isDragging:!0,origin:{x:n,y:t},width:g.current?.offsetWidth,height:g.current?.offsetHeight})},C=(0,o.hb)(e=>{const{x:o,y:i}=(0,r.A)(e),a={x:o-p.origin.x,y:i-p.origin.y};b(e=>({...e,translation:a})),t(a,n)},[n,t,p.origin.x,p.origin.y]),N=(0,o.hb)(()=>{b(e=>({...e,isDragging:!1,width:void 0,height:void 0})),u()},[u]);(0,o.vJ)(()=>{p.isDragging&&v&&b(e=>({...e,isDragging:!1,width:void 0,height:void 0}))},[v,p.isDragging]),(0,o.vJ)(()=>(p.isDragging?(window.addEventListener("touchmove",C),window.addEventListener("mousemove",C),window.addEventListener("touchend",N),window.addEventListener("touchcancel",N),window.addEventListener("mouseup",N)):(window.removeEventListener("touchmove",C),window.removeEventListener("mousemove",C),window.removeEventListener("touchend",N),window.removeEventListener("touchcancel",N),window.removeEventListener("mouseup",N),b(e=>({...e,translation:d}))),()=>{p.isDragging&&(window.removeEventListener("touchmove",C),window.removeEventListener("mousemove",C),window.removeEventListener("touchend",N),window.removeEventListener("touchcancel",N),window.removeEventListener("mouseup",N))}),[C,N,p.isDragging]);const w=(0,i.A)("kWQHzIMD",p.isDragging&&"k0c5WDAy"),y=(0,o.Kr)(()=>(0,a.A)(p.isDragging&&`transform: translate(${p.translation.x}px, ${p.translation.y}px)`,p.width?`width: ${p.width}px`:void 0,p.height?`height: ${p.height}px`:void 0,h),[h,p.height,p.isDragging,p.translation.x,p.translation.y,p.width]);return(0,c.FD)("div",{style:y,className:w,ref:g,children:[e,!v&&(0,c.Y)("div",{"aria-label":A("i18n_dragToSort"),tabIndex:0,role:"button",className:(0,i.A)("UpzQzcvs","div-button","draggable-knob"),onMouseDown:f,onTouchStart:f,style:m,children:(0,c.Y)(l.A,{name:"sort",className:"JIThxQAL"})})]})})},82497:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(87357),a=t(39351),r=t(20021);const s=(0,o.ph)(({options:e,min:n=0,max:t=(e?e.length-1:100),step:s=1,label:l,value:c,disabled:d,readOnly:u,bold:h,className:m,renderValue:v,onChange:A,isCenteredLayout:g})=>{const p=(0,a.A)(),b=(0,o.hb)(e=>{A(Number(e.currentTarget.value))},[A]),f=(0,i.A)(m,"RangeSlider",d&&"disabled",u&&"readOnly",h&&"bold"),C=(0,o.Kr)(()=>e?c/(e.length-1)*100:(c-n)/((t-n)/s)*100,[e,c,t,n,s]);return(0,r.FD)("div",{className:f,children:[g?(0,r.Y)("div",{className:"slider-top-row",dir:p.isRtl?"rtl":void 0,children:!e&&(0,r.FD)(r.FK,{children:[(0,r.Y)("span",{className:"value-min",dir:"auto",children:n}),(0,r.Y)("span",{className:"label",dir:"auto",children:v?v(c):c}),(0,r.Y)("span",{className:"value-max",dir:"auto",children:t})]})}):l?(0,r.FD)("div",{className:"slider-top-row",dir:p.isRtl?"rtl":void 0,children:[(0,r.Y)("span",{className:"label",dir:"auto",children:l}),!e&&(0,r.Y)("span",{className:"value",dir:"auto",children:v?v(c):c})]}):void 0,(0,r.FD)("div",{className:"slider-main",children:[(0,r.Y)("div",{className:"slider-fill-track",style:`width: ${C}%`}),(0,r.Y)("input",{min:n,max:t,value:c,step:s,type:"range",className:"RangeSlider__input",onChange:b}),e&&(0,r.Y)("div",{className:"slider-options",children:e.map((e,n)=>(0,r.Y)("div",{className:(0,i.A)("slider-option",n===c&&"active"),onClick:()=>A(n),children:e}))})]})]})})},90751:(e,n,t)=>{t.d(n,{A:()=>C});var o=t(84051),i=t(101),a=t(39351),r=t(95807),s=t(15640),l=t(87679),c=t(43336),d=t(76023),u=t(17712),h=t(39751),m=t(64493),v=t(82497);var A=t(20021);const g=.125*d.$,p=2*d.$,b=(0,o.ph)(({onChange:e,image:n,maxOutputSize:t,minOutputSize:i})=>{const[a,d]=(0,o.J0)({x:0,y:0}),[b,f]=(0,o.J0)(100),C=(0,o.li)(!1),N=(0,o.li)({x:0,y:0}),w=(0,o.li)({x:0,y:0}),{width:y}=(0,h.A)(),k=Math.min(400,y-2*p),x=n?Math.max(k/n.width,k/n.height):1,Y=x*b/100,L=(0,o.Kr)(()=>n?{width:n.width*Y,height:n.height*Y}:{width:0,height:0},[n,Y]),D=(e,n,t)=>{const o=k/2,i=t.width/2,a=t.height/2,r=Math.max(0,i-o),s=Math.max(0,a-o);return{x:(0,c.qE)(e,-r,r),y:(0,c.qE)(n,-s,s)}},E=e=>{C.current=!0,N.current=(0,s.A)(e),w.current={...a},document.addEventListener("mousemove",M),document.addEventListener("touchmove",M),document.addEventListener("mouseup",S),document.addEventListener("touchend",S)},M=(0,u.A)(e=>{if("touches"in e&&e.touches.length>1)return;if(!C.current)return;const{x:n,y:t}=(0,s.A)(e),o=n-N.current.x,i=t-N.current.y,a=D(w.current.x+o,w.current.y+i,L);d(a)}),S=(0,u.A)(()=>{C.current=!1,document.removeEventListener("mousemove",M),document.removeEventListener("touchmove",M),document.removeEventListener("mouseup",S),document.removeEventListener("touchend",S)}),T=(0,u.A)(e=>{const t=x*e/100,o={width:n.width*t,height:n.height*t},i=e/b,r=D(a.x*i,a.y*i,o);f(e),d(r)});if(!n)return;const B=(k-L.width)/2+a.x,F=(k-L.height)/2+a.y,R=(0,r.A)(`width: ${L.width}px`,`height: ${L.height}px`,`left: ${B}px`,`top: ${F}px`),I=(0,r.A)(`width: ${L.width}px`,`height: ${L.height}px`,`left: ${B-g}px`,`top: ${F-g}px`);return(0,A.FD)("div",{children:[(0,A.FD)("div",{className:"r_2tKzuI",style:(0,r.A)(`width: ${k}px`,`height: ${k}px`),children:[(0,A.Y)("img",{src:n.src,className:"caUABR3p",style:R,draggable:!1,onMouseDown:E,onTouchStart:E,alt:"",role:"presentation"}),(0,A.Y)("div",{className:"gR8q967h"}),(0,A.Y)("div",{className:"m_d02kUd",children:(0,A.Y)("img",{src:n.src,className:"nJUDgVTD",style:I,draggable:!1,alt:"",role:"presentation"})})]}),(0,A.FD)("div",{className:"_YQbrXkD",children:[(0,A.Y)(v.A,{className:"s73_IyYI",min:100,max:200,value:b,onChange:T}),(0,A.Y)(m.A,{className:"M0r9Gw03",round:!0,color:"primary",iconName:"check",onClick:()=>{if(!n)return;const o=k/Y,r=n.width/2-o/2-a.x/Y,s=n.height/2-o/2-a.y/Y,c=Math.min(t,Math.max(i,o)),d=document.createElement("canvas");d.width=c,d.height=c,d.getContext("2d").drawImage(n,r,s,o,o,0,0,c,c),d.toBlob(n=>{n&&e((0,l.ti)(n,"avatar.jpg"))},"image/jpeg")},ariaLabel:"Crop"})]})]})});var f=t(22337);const C=(0,o.ph)(({file:e,onChange:n,onClose:t})=>{const o=(0,a.A)(),{image:r}=(0,i.A)(e),s=Boolean(e)&&Boolean(r);return(0,A.Y)(f.A,{isOpen:s,onClose:t,title:o("CropperTitle"),className:"CropModal",hasCloseButton:!0,isCondensedHeader:!0,children:(0,A.Y)(b,{onChange:n,image:r,maxOutputSize:1024,minOutputSize:256})})})},91356:(e,n,t)=>{t.d(n,{A:()=>s});var o=t(84051),i=t(52844),a=t(90751);var r=t(20021);const s=(0,o.ph)(({onChange:e,inputRef:n})=>{const[t,s]=(0,o.J0)(),l=(0,o.hb)(n=>{s(void 0),e(n)},[e]),c=(0,o.hb)(()=>{s(void 0)},[]),d=(0,o.hb)(()=>{(0,i.p)("image/png, image/jpeg",e=>{const n=e.target;n?.files?.[0]&&s(n.files[0])},!0)},[]);return(0,r.FD)(r.FK,{children:[(0,r.Y)("input",{ref:n,className:"axfkbhWJ",onClick:d}),(0,r.Y)(a.A,{file:t,onClose:c,onChange:l})]})})},94079:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(66644),a=t(63495),r=t(87357),s=t(17712),l=t(59030),c=t(20021);const d=(0,o.ph)(({ref:e,id:n,className:t,value:d,label:u,error:h,success:m,disabled:v,readOnly:A,placeholder:g,autoComplete:p,inputMode:b,maxLength:f,maxLengthIndicator:C,tabIndex:N,onChange:w,onInput:y,onKeyPress:k,onKeyDown:x,onBlur:Y,onPaste:L,noReplaceNewlines:D})=>{let E=(0,o.li)();e&&(E=e);const M=(0,l.A)(),S=h||m||u,T=(0,r.A)("input-group",d&&"touched",h?"error":m&&"success",v&&"disabled",A&&"disabled",S&&"with-label",t),B=(0,s.A)(e=>{(0,i.RK)(()=>{e.style.height="0",(0,i.gm)(()=>{const n=e.scrollHeight;return()=>{e.style.height=`${n}px`}})})});(0,o.Nf)(()=>{const e=E.current;e&&B(e)},[]);const F=(0,o.hb)(e=>{const n=e.currentTarget;if(!D){const e=n.selectionEnd;n.value=n.value.replace(/\n/g," "),n.selectionEnd=e}B(n),w?.(e)},[D,w]);return(0,c.FD)("div",{className:T,dir:M.isRtl?"rtl":void 0,children:[(0,c.Y)("textarea",{ref:E,className:"form-control",id:n,dir:"auto",value:d||"",tabIndex:N,placeholder:g,maxLength:f,autoComplete:p,spellCheck:!a.Vq&&void 0,inputMode:b,disabled:v,readOnly:A,onChange:F,onInput:y,onKeyPress:k,onKeyDown:x,onBlur:Y,onPaste:L,"aria-label":S}),S&&(0,c.Y)("label",{htmlFor:n,children:S}),C&&(0,c.Y)("div",{className:"max-length-indicator",children:C})]})})},94189:(e,n,t)=>{t.d(n,{A:()=>d});var o=t(84051),i=t(87357),a=t(10328),r=t(39351),s=t(64493),l=t(22337),c=t(20021);const d=(0,o.ph)(({isOpen:e,title:n,noDefaultTitle:t,header:d,text:u,textParts:h,confirmLabel:m,confirmIsDestructive:v,isConfirmDisabled:A,isOnlyConfirm:g,areButtonsInColumn:p,className:b,children:f,confirmHandler:C,onClose:N,onCloseAnimationEnd:w})=>{const y=(0,r.A)(),k=(0,o.li)(),x=(0,o.hb)(e=>{-1===e&&C()},[C]),Y=(0,a.A)(k,e,x,".Button");return(0,c.FD)(l.A,{className:(0,i.A)("confirm",b),title:n||(t?void 0:y("Telegram")),header:d,isOpen:e,onClose:N,onCloseAnimationEnd:w,children:[u&&u.split("\\n").map(e=>(0,c.Y)("p",{children:e})),h||f,(0,c.FD)("div",{className:p?"dialog-buttons-column":"dialog-buttons mt-2",ref:k,onKeyDown:Y,children:[(0,c.Y)(s.A,{className:"confirm-dialog-button",isText:!0,onClick:C,color:v?"danger":"primary",disabled:A,children:m||y("GeneralConfirm")}),!g&&(0,c.Y)(s.A,{className:"confirm-dialog-button",isText:!0,onClick:N,children:y("Cancel")})]})]})})},98028:(e,n,t)=>{t.d(n,{A:()=>p});var o=t(84051),i=t(96454),a=t(87357),r=t(10722),s=t(11217),l=t(37661),c=t(17712),d=t(72167),u=t(18276),h=t(71429),m=t(24433),v=t(60859);const A={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=t(20021);const p=({className:e,title:n,isActive:t,isBlocked:p,badgeCount:b,isBadgeActive:f,contextActions:C,contextRootElementSelector:N,icon:w,clickArg:y,onClick:k})=>{const x=(0,o.li)(),[Y,L,D]=(0,l.A)(),{contextMenuAnchor:E,handleContextMenu:M,handleBeforeContextMenu:S,handleContextMenuClose:T,handleContextMenuHide:B,isContextMenuOpen:F}=(0,r.A)(x,!C),{handleClick:R,handleMouseDown:I}=(0,s.Q)(e=>{!C||e.button!==i.w3.Secondary&&k||S(e),"mousedown"===e.type&&e.button!==i.w3.Main||k?.(y)}),O=(0,c.A)(()=>x.current),K=(0,c.A)(()=>N?x.current.closest(N):document.body),P=(0,c.A)(()=>document.querySelector(`.${A.contextMenu} .bubble`)),J=(0,c.A)(()=>({withPortal:!0}));return(0,g.FD)("div",{className:(0,a.A)(A.folder,t&&A.active,e),onClick:R,onMouseDown:I,onContextMenu:M,onMouseEnter:L,onMouseLeave:D,ref:x,children:[(0,g.FD)("div",{className:A.icon,children:[(0,g.Y)(d.A,{emoji:"string"==typeof w?w:void 0,customEmojiId:"object"==typeof w?w.documentId:void 0,shouldAnimate:Y}),Boolean(b)&&(0,g.Y)("span",{className:(0,a.A)(A.badge,f&&A.badgeActive),children:b})]}),(0,g.Y)("span",{className:A.inner,children:(0,g.FD)("div",{className:A.title,children:[p&&(0,g.Y)(u.A,{name:"lock-badge",className:A.blocked}),n]})}),C&&void 0!==E&&(0,g.Y)(h.A,{isOpen:F,anchor:E,getTriggerElement:O,getRootElement:K,getMenuElement:P,getLayout:J,className:A.contextMenu,autoClose:!0,onClose:T,onCloseAnimationEnd:B,withPortal:!0,children:C.map(e=>"isSeparator"in e?(0,g.Y)(v.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))})]})}}}]);
|
||
//# sourceMappingURL=4765.bab5cf32c909a2bf1967.js.map
|