Loading
function(e,t,n){"use strict";n.d(t,{A:()=>T,B:()=>y});var l=n(627968),i=n(64700),s=n(503698),r=n.n(s),a=n(308186),o=n(17928),u=n(554146),c=n(459192),d=n(990078),m=n(939249),h=n(805901),p=n(604121),f=n(775602),g=n(131607),E=n(189551),A=n(526292),C=n(821589),x=n(49999),I=n(307731),_=n(375708),S=n(579364);let y={tension:800,friction:24};function v(e){let{className:t,renderButtonContents:n,active:s,onMouseEnter:u,onMouseLeave:c,onContextMenu:d,onFocus:p,spriteClassName:g,spriteSize:A,ref:x,..._}=e,[v,T]=i.useState(!1),[N,j]=i.useState(50),b=v||s,R=(0,C.t)(S,"emojiButton",b?"Hovered":"Normal"),P=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:18;return{"--custom-emoji-sprite-size":`${t}px`,"--custom-emoji-sprite-row":Math.floor(e/20),"--custom-emoji-sprite-col":e%20}}(N,A),L=i.useCallback(()=>{if(b)return;let e=Math.floor(77*Math.random());T(!0),j(e),(0,E.K)(I.EmojiInteractionPoint.EmojiButtonMouseEntered)},[b,T,j]),M=i.useCallback(()=>{T(!1)},[T]),O=i.useCallback(()=>(0,E.K)(I.EmojiInteractionPoint.EmojiButtonFocused),[]),w=(0,o.bG)([f.Ay],()=>f.Ay.useReducedMotion);return(0,l.jsx)(m.D,{innerRef:x,className:r()(R,t),"aria-expanded":s,onMouseEnter:()=>{L(),u?.()},onMouseOver:L,onMouseLeave:()=>{M(),c?.()},onFocus:()=>{O(),p?.()},onContextMenu:d,..._,children:null!=n?n():(0,l.jsx)(h.c,{config:y,to:{value:+!!b},children:e=>{let{value:t}=e;return(0,l.jsxs)(a.animated.div,{className:S.spriteContainer,style:{...P,transform:t.to([0,1],[1,1.14]).to(e=>`scale(${e})`)},children:[(0,l.jsx)("div",{className:r()(S.sprite,S.spriteColored,b?S.active:S.inactive)}),(0,l.jsx)("div",{className:r()(S.sprite,S.spriteGreyscale,b?S.inactive:S.active,{[S.reducedMotion]:w},g)})]})}})})}function T(e){let{"aria-label":t=_.intl.string(_.t.lPHwuQ),tooltipText:s,active:a,onClick:m,"aria-controls":h,ref:E,keyboardShortcut:C,canShowNUXPremiumTooltip:I=!1,...y}=e,T=(0,o.bG)([f.Ay],()=>f.Ay.useReducedMotion),N=(0,A.k0)(),[j,b]=(0,g.kn)(N?[u.M.TRIAL_NUX_EMOJI_BUTTON]:[],void 0,!0),R=I&&j===u.M.TRIAL_NUX_EMOJI_BUTTON,P=!a&&R,L=i.useRef(null),M=E??L;function O(){return(0,l.jsx)(v,{ref:M,onMouseLeave:()=>{R&&b(x.i.USER_DISMISS)},onClick:e=>{m?.(e)},"aria-label":t,"aria-controls":h,active:a,spriteClassName:R?S.spritePremiumColored:void 0,...y})}return null==s?O():P?(0,l.jsx)(c.u,{targetElementRef:M,body:_.intl.format(_.t["/7R4q4"],{}),asset:(0,l.jsx)(p.a,{className:r()(S.premiumUnlockAnimation,{[S.reducedMotion]:T}),loop:!1,shouldAnimate:!T,pauseAtFrame:T?149:void 0,importData:()=>n.e("31838").then(n.t.bind(n,650125,19))}),position:"top",shouldShow:!0,children:O()}):(0,l.jsx)(d.m,{targetElementRef:M,shouldShow:!0,text:s,keyboardShortcut:C,children:O()})}}