-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
93243-8539309f65bc5f9.js.download
1 lines (1 loc) · 13.1 KB
/
93243-8539309f65bc5f9.js.download
1
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[93243,83278],{93243:function(n,e,t){t.d(e,{Z:function(){return mn}});var i,o=t(75190),r=t(52322),a=t(2784),l=t(49948),s=t(82740),c=t(96664),u=t(38789),d=t(94184),f=t.n(d),p=t(93321),h=t.n(p),g=t(5632),v=t(47726),x=t(22504),m=t(38082),b=t(86454),w=t(22710),y=t(5163),j=t(67557),Z=(i={position:"relative",a:{color:"inherit",textDecoration:"underline"},"a:hover, a:not([href]):not([tabindex]):hover, a:focus, a:not([href]):not([tabindex]):focus":{color:"inherit",textDecoration:"underline"}},(0,j.Z)(i,c[u.mqMd].up,{"&[data-platform-type=mobile]":{display:"none"}}),(0,j.Z)(i,c[u.mqMd].down,{"&[data-platform-type=desktop]":{display:"none"}}),i),S={flex:1,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},B={display:"inline-block",height:"auto !important",padding:"0 !important",fontSize:u.fontSize75,marginInlineStart:u.space100,textDecoration:"underline",flex:"0 0 auto",minWidth:"auto",color:"#ffffff !important"},_=(0,j.Z)({color:"#ffffff",fontSize:u.fontSize200,padding:u.space100,position:"absolute",right:u.space100,top:"50%","&:hover":{cursor:"pointer"},transform:"translate3d(0, -50%,0)",".c-i":{display:"block"}},c[u.mqLg].up,{right:u.space200}),k=t(70698),T=t(25084),C=t(68434),N=t(83475),I=t(35986),P=t(83434),L=function(n,e){var t,i=n.content,o=n.sx,l=n.btnUrl,s=n.btnLabel,c=n.platform,u=n.wrapperSx,d=n.id,f=n.onClose,p=(0,a.useRef)(null),h=(0,k.ZP)((function(){T.ZP.sendEvent({category:"Homepage",action:"Homepage_Topbanner_Impression",label:"".concat(d)})})).ref,g=(0,a.useCallback)((function(){T.ZP.sendEvent({category:"Homepage",action:"Homepage_Topbanner_ClickThrough",label:"".concat(d)})}),[d]);l&&s&&(t=(0,r.jsx)(N.ZP,{shapeType:"plain",link:l,sx:B,isNewOpen:!0,onClick:g,children:s}));var v=(0,a.useCallback)((function(){var n=null;if(p.current){var e=null===(n=p.current)||void 0===n?void 0:n.offsetHeight;e&&(n.style.cssText="overflow:hidden;height:".concat(e,"px;transition: height 0.35s;")),requestAnimationFrame((function(){n.style.height="0px"}))}f&&f(d),T.ZP.sendEvent({category:"Homepage",action:"Homepage_Topbanner_CloseBanner",label:"".concat(d)})}),[d]),x=(0,a.useMemo)((function(){return(0,r.jsx)(C.Z,{__css:_,onClick:v,children:(0,r.jsx)(I.Z,{color:"inherit",fontSize:"inherit"})})}),[]);return i?(0,r.jsxs)(C.Z,{__css:Z,ref:p,"data-platform-type":c,children:[(0,r.jsx)(C.Z,{sx:o,ref:h,children:(0,r.jsxs)(C.Z,{__css:u,children:[(0,r.jsx)(P.Z,{sx:S,color:"inherit",textType:"body-sm",title:i,children:i}),t]})}),x]}):null},M=a.memo(a.forwardRef(L)),E=t(95210),R=t(88536),O=t(43961),A="C_IGNORED_TOP_BANNERS",q=function n(){var e=this;(0,E.Z)(this,n),this.ignoredBanners=[],this._ignoredBannerMap={},this.isBannerVisible=function(n){return null==e._ignoredBannerMap[n]},this.ignoreBanner=function(n){var t={dateTime:(new Date).getTime(),id:n},i=function(){e.ignoredBanners.push(t)};if(null!=e._ignoredBannerMap[n]){var o=e._ignoredBannerMap[n];null!=e.ignoredBanners[o]?e.ignoredBanners[o]=t:i()}else i();e.updateLocalIgnoredBanners(e.ignoredBanners)},this.updateIgnoredBanners=function(n){var t=[],i=[],o={};if(n&&n.length>0)t=n;else{var r=(0,O.fp)(A),a=[];if(r)try{a=JSON.parse(r)}catch(l){console.error("Parse Top banner local visible ignored object error.")}a&&a.length>0&&(t=a)}t&&t.length>0&&t.forEach((function(n){if(n){var e=n.dateTime;n.id;(new Date).getTime()-e>864e7||(i.push(n),o[n.id]=i.length-1)}})),e.ignoredBanners=i,e._ignoredBannerMap=o,e.updateLocalIgnoredBanners(i)},this.updateLocalIgnoredBanners=function(n){(0,O.qQ)(A,JSON.stringify(n))},R.sk||this.updateIgnoredBanners()},D=t(15798),H=t.n(D),V=t(54293),z={transition:"height ".concat(500,"ms"),height:0,overflow:"hidden"},F={position:"relative"},G={backgroundColor:u.colorBlue,color:"#ffffff",paddingLeft:u.space200,paddingRight:u.space200,paddingTop:u.space100,paddingBottom:u.space100,display:"flex",justifyContent:"center"},U=(0,j.Z)({display:"inline-flex",justifyContent:"center",maxWidth:"100%",paddingRight:u.space300},c[u.mqLg].up,{paddingRight:u.space400}),W=function(n,e){var t,i=n.data,o=void 0===i?[]:i,l=[],s=(0,a.useRef)(null),c=(0,a.useState)([]),u=c[0],d=c[1],f=(0,a.useRef)({bannerVisibleManager:null,latestDOMHeight:0}),p=(0,a.useCallback)((function(n){f.current.bannerVisibleManager&&f.current.bannerVisibleManager.ignoreBanner(n)}),[]);(0,a.useEffect)((function(){f.current.bannerVisibleManager=new q;var n=function(){var n=(0,w.Z)((function(){var n,e,t,i,o,r,a,l,s;return(0,y.__generator)(this,(function(c){switch(c.label){case 0:return[4,J()];case 1:if(n=c.sent(),e=[],n&&n.data&&n.data.length>0)for(t=n.data,i=0;i<t.length;i++)(r=t[i])&&(a=r.body,l=r.trackingName,a&&(s=!1,(null===(o=f.current)||void 0===o?void 0:o.bannerVisibleManager)&&(s=f.current.bannerVisibleManager.isBannerVisible(l)),s&&e.push(r)));return d(e),[2]}}))}));return function(){return n.apply(this,arguments)}}();(!o||o.length<=0)&&n()}),[]);var h,g=o&&o.length>0?o:u,v=g&&g.length>0,x=null!==(h=null===(t=s.current)||void 0===t?void 0:t.offsetHeight)&&void 0!==h?h:0;if((0,a.useEffect)((function(){var n=s.current;if(n){var e=x;n.style.cssText="height:".concat(e,"px;");var t,i=0;if(v)i=null!==(t=n.scrollHeight)&&void 0!==t?t:0;Math.abs(i-e)>0&&requestAnimationFrame((function(){n.style.height="".concat(i,"px"),setTimeout((function(){n.style.height="auto"}),500)}))}}),[v]),g&&g.length>0)for(var m=0;m<g.length;m++){var b=g[m];if(b&&b.body){var j=b.body,Z=b.url,S=b.urlDescription,B=b.trackingName,_=b.platform;l.push((0,r.jsx)(M,{sx:G,wrapperSx:U,content:j,btnLabel:S,btnUrl:Z,platform:_,id:B,onClose:p},B))}}return(0,r.jsx)(C.Z,{__css:z,ref:s,children:(0,r.jsx)(C.Z,{className:"inner-banner",children:(0,r.jsx)(C.Z,{__css:F,children:l})})})},J=function(){return(0,V.N4)({baseURL:H().env.endpoints.javaApi,method:"get",url:"/content/v1/page-banners",withAuthHeader:!0}).then((function(n){return n.data}))},X=a.memo(a.forwardRef(W)),Q=t(63184),K=t(76183),Y=t(29745),$=t(46924),nn=t(27419),en=t(99503),tn=t(35475),on=t(28316),rn=t(3952),an=t(87681);function ln(){var n=(0,o.Z)(["\n position: fixed;\n right: 16px;\n bottom: 76px;\n ","\n width: 48px;\n height: 48px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n background: ",";\n color: ",";\n border-radius: 32px;\n user-select: none;\n cursor: pointer;\n opacity: 0;\n transition: opacity 0.3s ease-in-out;\n z-index: ",";\n\n &.visible {\n opacity: 0.85;\n\n &:hover {\n opacity: 0.7;\n }\n }\n\n .icon {\n font-size: 18px;\n height: 18px;\n width: 18px;\n }\n\n && {\n ","\n }\n"]);return ln=function(){return n},n}var sn=s.ZP.div.withConfig({componentId:"sc-4ce79553-0"})(ln(),(0,an.CC)("bottom: 68px;"),(function(n){return n.theme.scrollToTop.backgroundColor}),(function(n){return n.theme.scrollToTop.textColor}),(function(n){return n.isInApp?an.W5.COOKIE_POLICY_BANNER:9999}),(function(n){return n.addCSS}));var cn=function(n){var e=n.appendTo,t=n.customSx,i=n.isInApp,o=void 0!==i&&i,l=function(){var n=parseInt((0,rn.aZ)()/window.innerHeight*100,10)>=d;c!==n&&u(n)};if(D.isServer)return null;var s=(0,a.useState)(!1),c=s[0],u=s[1],d=5;return(0,a.useEffect)((function(){return x.Pc.addEventListener(l,500),function(){x.Pc.removeEventListener(l)}}),[c]),(0,r.jsx)(r.Fragment,{children:(0,on.createPortal)((0,r.jsx)(sn,{onClick:function(){(0,rn.X5)(),T.ZP.sendEvent({category:"Scroll To Top",action:"Scroll To Top",label:window.location.href})},className:c?"visible":void 0,addCSS:t,isInApp:o,children:(0,r.jsx)("span",{className:"icon icon-Chevron-up"})}),null!==e&&void 0!==e?e:document.body)})},un=t(83278);function dn(){var n=(0,o.Z)(["\n position: relative;\n"]);return dn=function(){return n},n}function fn(){var n=(0,o.Z)(["\n .main-content {\n min-height: 100vh;\n }\n "]);return fn=function(){return n},n}function pn(){var n=(0,o.Z)(["\n .grid {\n padding-left: 0;\n padding-right: 0;\n }\n "]);return pn=function(){return n},n}function hn(){var n=(0,o.Z)(["\n .grid {\n box-sizing: border-box;\n width: 100%;\n padding-right: 16px;\n padding-left: 16px;\n margin-right: auto;\n margin-left: auto;\n }\n\n @media (min-width: 1376px) {\n .grid {\n max-width: ",";\n }\n }\n\n .uikit-row {\n box-sizing: border-box;\n display: flex;\n flex-wrap: wrap;\n margin-right: -16px;\n margin-left: -16px;\n }\n\n .uikit-col-md-8,\n .uikit-col-sm-16 {\n box-sizing: border-box;\n position: relative;\n width: 100%;\n padding-right: 16px;\n padding-left: 16px;\n }\n\n @media (min-width: 1152px) {\n .uikit-col-md-8 {\n flex: 0 0 50%;\n max-width: 50%;\n }\n }\n "," {\n .uikit-col-sm-16 {\n flex: 0 0 100%;\n max-width: 100%;\n }\n }\n\n .flex-row {\n flex-direction: row !important;\n }\n\n .flex-wrap {\n flex-wrap: wrap !important;\n }\n\n .justify-content-lg-center {\n justify-content: center !important;\n }\n\n ","\n ","\n .full-width-layout {\n padding: 0;\n max-width: 100%;\n }\n"]);return hn=function(){return n},n}var gn=h()((function(){return Promise.all([t.e(20776),t.e(6557)]).then(t.bind(t,95024))}),{on:["visible"],compatibleMode:!0}),vn=s.ZP.div.withConfig({componentId:"sc-65dd1213-0"})(dn()),xn=s.ZP.div.withConfig({componentId:"sc-65dd1213-1"})(hn(),(function(n){return n.fullBleed?"unset":"1402px"}),c[u.mqMd].up,(function(n){return n.footerBelowFold&&(0,s.iv)(fn())}),(function(n){return n.fullBleed&&(0,s.iv)(pn())}));var mn=function(n){var e=n.children,t=n.fullBleed,i=void 0!==t&&t,o=n.useNewsletterSignup,s=void 0!==o&&o,c=n.fullWidth,u=void 0!==c&&c,d=n.footerBelowFold,p=void 0!==d&&d,h=n.hideLayout,w=void 0!==h&&h,y=n.hideFooter,j=void 0!==y&&y,Z=n.headerSx,S=void 0===Z?{}:Z,B=n.footerSx,_=void 0===B?{}:B,k=n.newsletterMaxWidth,T=void 0===k?1402:k,N=n.scrollToTopAppendTo,I=n.scrollToTopCustomSx,P=(0,l.useSelector)(v.PF),L=(0,g.useRouter)(),M=null===L||void 0===L?void 0:L.pathname,E=M&&["/","/coins","/tokens"].includes(M),R=(0,$.bd)().faqData.faqList,O=void 0===R?[]:R,A=(0,l.useSelector)(v.jC),q=(0,g.useRouter)().asPath,D=function(n){return{handleLogout:function(){(0,tn.kS)().then((function(){n((0,nn.kX)()),(0,en.M7)()}))},handleLogin:function(){n((0,nn.b_)({action:"LOGIN"})),(0,en.vJ)()},handleSignup:function(){n((0,nn.b_)({action:"SIGNUP"})),(0,en.JQ)()}}}((0,l.useDispatch)()).handleSignup,H=(0,a.useMemo)((function(){var n={};return T&&(n[".block-newsletter"]={"> [data-role=gl-one-column]":{maxWidth:"".concat(T,"px")}}),n}),[T]);if((0,a.useEffect)((function(){q.includes("invite")&&(A?(0,x.gT)():D())}),[A]),w)return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(un.default,{}),e]});var V=E?(0,r.jsx)(X,{}):null;return P?(0,r.jsxs)(xn,{fullBleed:i,footerBelowFold:p,children:[V,(0,r.jsx)(un.default,{}),(0,r.jsx)("div",{className:"main-content cmc-body-wrapper",children:(0,r.jsx)("div",{className:f()("grid",{"full-width-layout":!!u}),children:e})}),(0,r.jsx)(cn,{isInApp:!0,appendTo:N,customSx:I})]}):(0,r.jsxs)(xn,{className:"global-layout-v2",fullBleed:i,footerBelowFold:p,children:[(0,r.jsx)(m.Z,{faqs:O}),(0,r.jsxs)("div",{className:"main-content",children:[(0,r.jsxs)(vn,{children:[V,(0,r.jsx)(K.ZP,{sx:S}),(0,r.jsx)(un.default,{})]}),(0,r.jsx)("div",{className:"cmc-body-wrapper",children:(0,r.jsx)("div",{className:f()("grid",{"full-width-layout":!!u}),children:e})})]}),(0,r.jsx)(Q.Z,{faqs:O}),s&&(0,r.jsx)(C.Z,{__css:H,children:(0,r.jsx)(gn,{className:"block-newsletter"})}),!j&&(0,r.jsx)(b.Z,{sx:_}),(0,r.jsx)(cn,{isInApp:!1,appendTo:N,customSx:I}),(0,r.jsx)(Y.Z,{})]})}},83278:function(n,e,t){t.r(e);var i=t(52322),o=t(49948),r=t(47726),a=t(2784),l=t(74001),s=t(87612),c=t(83081),u=t(27419),d=t(5632),f=(0,l.Z)((function(){return Promise.all([t.e(55959),t.e(19436)]).then(t.bind(t,55959))}),!1,(function(){return null})),p={LOGIN:"login",SIGNUP:"signUp"};e.default=function(){var n=(0,o.useSelector)(r.Bh),e=(0,a.useState)(Boolean(n)),t=e[0],l=e[1],h=(0,a.useContext)(s.gX),g=h.invokeLogin,v=(h.userInfo,(0,o.useDispatch)()),x=(0,d.useRouter)(),m=function(){v((0,u.kX)()),"/settings"!==x.pathname&&v((0,u.b_)({action:"LOGIN",loginContinue:location.href}))};if((0,a.useEffect)((function(){return Boolean(n)&&!t&&l(!0),c.ZP.on(c.Vy.userLogout,m),function(){c.ZP.remove(c.Vy.userLogout,m)}}),[t,Boolean(n)]),!t)return null;var b={action:p[n]||n};return(0,i.jsx)(f,{loginModalStatus:b,setStep:g})}},70698:function(n,e,t){t.d(e,{nf:function(){return a}});var i=t(62230),o=t(81541),r=t(2784),a=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e4,t=(0,r.useRef)({});return function(){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];if(!(e&&r.length>0))return null===n||void 0===n?void 0:n.apply(void 0,(0,o.Z)(r));var l=r.join("-"),s=+new Date;return!t.current[l]||s-t.current[l]>e?(t.current[l]=s,null===n||void 0===n?void 0:n.apply(void 0,(0,o.Z)(r))):void 0}};e.ZP=function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=(0,r.useRef)(),o=(0,r.useState)(!1),a=o[0],l=o[1];return(0,r.useEffect)((function(){if(t.current){var o=new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting&&(null===n||void 0===n||n()),l(e.isIntersecting)}))}),(0,i.Z)({threshold:.2},e));return o.observe(t.current),function(){o.disconnect()}}}),[t.current]),{ref:t,inView:a}}}}]);