@streamlayer/react 0.30.5 → 0.30.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("./index3.js"),k=require("@nanostores/react"),z=require("./masters2.js"),S=require("react"),j=require("@streamlayer/sdk-web-types"),C=require("./common.js"),Ne=require("react-countdown-circle-timer"),w=require("./index2.js");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("@lottiefiles/react-lottie-player");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");const Te=r.styled_default("div")({name:"Container",class:"c1vwopgc",propsAsIs:!1}),Ae=r.styled_default("div")({name:"QuestionTypeWrap",class:"qyktpt0",propsAsIs:!1}),Se=()=>r.i1,De=r.styled_default(Se())({name:"QuestionTypeIcon",class:"q951jdx",propsAsIs:!0}),ze=r.styled_default("span")({name:"QuestionTypeTitle",class:"qss5f0e",propsAsIs:!1}),Oe=r.styled_default("button")({name:"CloseButton",class:"c1ao1jtv",propsAsIs:!1}),_e=()=>r.i1,ke=r.styled_default(_e())({name:"CloseIcon",class:"cvsl7l3",propsAsIs:!0}),ue=({type:e,close:t,label:n})=>{const i=e?z.o[e]:{label:n,iconName:void 0};return s.jsxs(Te,{children:[s.jsxs(Ae,{children:[(i==null?void 0:i.iconName)&&s.jsx(De,{name:i.iconName}),(i==null?void 0:i.label)&&s.jsx(ze,{children:i.label})]}),s.jsx(Oe,{onClick:t,children:s.jsx(ke,{name:"icon-cross"})})]})},Ce=r.styled_default("div")({name:"Container",class:"c1zy8a",propsAsIs:!1}),be=r.styled_default("div")({name:"Title",class:"t1vih9p5",propsAsIs:!1}),we=r.styled_default("div")({name:"Indicator",class:"i1fbnvpb",propsAsIs:!1}),J=({indicator:e,title:t})=>s.jsxs(Ce,{children:[s.jsx(be,{children:t}),s.jsx(we,{children:e})]}),Ee=r.styled_default("div")({name:"Container",class:"ctmhwyc",propsAsIs:!1}),Le=r.styled_default("div")({name:"Indicator",class:"i1jri200",propsAsIs:!1}),$e=r.styled_default("div")({name:"Title",class:"t8s05oq",propsAsIs:!1}),R=({indicator:e,title:t})=>s.jsxs(Ee,{children:[s.jsx(Le,{children:e}),s.jsx($e,{children:t})]}),Re=r.styled_default("div")({name:"Container",class:"c1yrpn9o",propsAsIs:!1}),Qe=r.styled_default("div")({name:"TopInfo",class:"t17fwahh",propsAsIs:!1}),Ue=r.styled_default("div")({name:"BottomInfo",class:"by6w7e9",propsAsIs:!1}),qe=r.styled_default("div")({name:"User",class:"u1g7arbm",propsAsIs:!1}),Pe=r.styled_default("img")({name:"Avatar",class:"a1ldeata",propsAsIs:!1}),Ye=r.styled_default("div")({name:"UserInfo",class:"u10d4koz",propsAsIs:!1}),We=r.styled_default("div")({name:"UserName",class:"u1q6roj0",propsAsIs:!1}),Fe=r.styled_default("div")({name:"UserRating",class:"ui0m425",propsAsIs:!1}),Ve=r.styled_default("img")({name:"TrophyIcon",class:"t1el3mrn",propsAsIs:!1}),Be=r.styled_default("div")({name:"Rts",class:"r2vgnxv",propsAsIs:!1}),He=r.styled_default("div")({name:"RtsIndicator",class:"roqn06j",propsAsIs:!1}),Ze=r.styled_default("div")({name:"RtsLabel",class:"r15adx7c",propsAsIs:!1}),Ge=r.styled_default("div")({name:"Divider",class:"dv59lta",propsAsIs:!1}),Je=r.styled_default("div")({name:"Ranks",class:"r55lotb",propsAsIs:!1}),Ke=r.styled_default("div")({name:"Statistics",class:"s1knfgqt",propsAsIs:!1}),Xe=r.styled_default("div")({name:"AvatarPlaceholder",class:"a1mqo824",propsAsIs:!1}),et=r.styled_default("button")({name:"UserAccountBtn",class:"uxareh6",propsAsIs:!1}),tt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0d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wvc3ZnPgo=",pe=({avatar:e,name:t,points:n,friendsRank:i,rank:o,streak:m,correct:u,incorrect:p,inTop:d,successRate:I})=>s.jsxs(Re,{children:[s.jsx(Qe,{children:s.jsxs(qe,{children:[s.jsxs(et,{children:[e&&s.jsx(Pe,{alt:"avatar",src:e}),!e&&s.jsx(Xe,{children:C.o(t||"")})]}),s.jsxs(Ye,{children:[s.jsx(We,{children:t}),s.jsxs(Fe,{children:[s.jsxs(Be,{children:[s.jsx(Ve,{alt:"rank-icon",src:tt}),s.jsxs(He,{children:[C.i(n),s.jsx(Ze,{children:"PTS"})]})]}),s.jsx(Ge,{}),s.jsxs("div",{children:["TOP ",d||0,"%"]})]})]})]})}),s.jsxs(Ue,{children:[s.jsxs(Je,{children:[s.jsx(J,{indicator:i||0,title:"Friends rank"}),s.jsx(J,{indicator:o||0,title:"Global rank"})]}),s.jsxs(Ke,{children:[s.jsx(R,{indicator:m||0,title:"Win streak"}),s.jsx(R,{indicator:u||0,title:"Correct"}),s.jsx(R,{indicator:p||0,title:"Incorrect"}),s.jsx(R,{indicator:`${I||0}%`,title:"Succ. rate"})]})]})]}),st=r.styled_default("div")({name:"Container",class:"c38csyt",propsAsIs:!1}),nt=r.styled_default("div")({name:"Title",class:"ty221rx",propsAsIs:!1}),it=r.styled_default("div")({name:"Description",class:"dlaj9xp",propsAsIs:!1}),rt=({title:e,description:t})=>s.jsxs(st,{children:[s.jsx(r.i1,{name:"icon-check-circle"}),s.jsx(nt,{children:e}),s.jsx(it,{children:t})]}),ot=r.styled_default("div")({name:"Container",class:"c16sbdnm",propsAsIs:!1}),at=()=>r.i1,lt=r.styled_default(at())({name:"IconPrediction",class:"ibhorgl",propsAsIs:!0}),K=r.styled_default("div")({name:"FeedbackIconWrap",class:"f1g20ja7",propsAsIs:!1}),X=r.styled_default("div")({name:"FeedbackHeader",class:"f455ozj",propsAsIs:!1}),ct=r.styled_default("span")({name:"FeedbackTitle",class:"f1913njx",propsAsIs:!1}),P=r.styled_default("span")({name:"FeedbackDescription",class:"fzfk69z",propsAsIs:!1}),dt=r.styled_default("div")({name:"FeedbackText",class:"fx87qaj",propsAsIs:!1}),ut=({feedbackMessages:e,questionVotedCorrectly:t,questionVoted:n,questionType:i,hasCorrectAnswer:o,questionStatus:m})=>{const u=n&&(i===j.QuestionType.TRIVIA||i===j.QuestionType.PREDICTION);if(!u&&m!==j.QuestionStatus.RESOLVED)return null;const p=i===j.QuestionType.PREDICTION&&!o,d=t?"correct":"incorrect",I=t?e.correctFeedback:e.incorrectFeedback;return s.jsxs(ot,{"data-isPrediction":p,children:[m===j.QuestionStatus.RESOLVED&&i===j.QuestionType.TRIVIA&&!n&&s.jsxs(s.Fragment,{children:[s.jsx(K,{children:s.jsx(r.i1,{name:"questionExpired"})}),s.jsxs("div",{children:[s.jsx(X,{children:s.jsx(P,{children:"Question Expired"})}),s.jsx(dt,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),u&&p&&s.jsxs(s.Fragment,{children:[s.jsx(lt,{name:"icon-prediction"}),s.jsx(P,{children:"Stay tuned to see if your prediction was correct."})]}),u&&o&&s.jsxs(s.Fragment,{children:[s.jsx(K,{"data-feedbackType":d,children:s.jsx(r.i1,{name:d})}),s.jsx("div",{children:s.jsxs(X,{children:[s.jsx(ct,{"data-feedbackType":d,children:I==null?void 0:I.title}),s.jsx(P,{children:I==null?void 0:I.description})]})})]})]})},pt=r.styled_default("div")({name:"Container",class:"c14ielyq",propsAsIs:!1}),mt=r.styled_default("div")({name:"Content",class:"c1tlqx57",propsAsIs:!1}),It=r.styled_default("div")({name:"Title",class:"t1hq58md",propsAsIs:!1}),ft=r.styled_default("div")({name:"Options",class:"o1c8nxcx",propsAsIs:!1}),ht=r.styled_default("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),xt=r.styled_default("div")({name:"ButtonPct",class:"b4iik8i",propsAsIs:!1}),yt=r.styled_default("span")({name:"ButtonBody",class:"b1gq1lnf",propsAsIs:!1}),gt=r.styled_default("div")({name:"IconContainer",class:"i1j65z51",propsAsIs:!1}),jt=r.styled_default("div")({name:"IconWrap",class:"i19tpfua",propsAsIs:!1}),me=r.styled_default("img")({name:"Icon",class:"i1tubmma",propsAsIs:!1}),Mt=()=>me,vt=r.styled_default(Mt())({name:"IconDefault",class:"i1grrgwj",propsAsIs:!0}),Nt=()=>me,Tt=r.styled_default(Nt())({name:"IconCircle",class:"ibemyq8",propsAsIs:!0}),At=r.styled_default("span")({name:"Title",class:"t1dceht",propsAsIs:!1}),St=r.styled_default("span")({name:"Indicators",class:"i116q4vq",propsAsIs:!1}),Dt=r.styled_default("span")({name:"Percentage",class:"p17ajcu2",propsAsIs:!1}),zt=()=>r.i1,Ot=r.styled_default(zt())({name:"CheckIcon",class:"cu9kmlb",propsAsIs:!0}),ee={[j.QuestionImages.CENTERED]:e=>s.jsx(vt,{alt:"option-icon",src:e}),[j.QuestionImages.TRANSPARENT]:e=>s.jsx(gt,{children:s.jsx(jt,{style:{backgroundImage:`url(${e})`}})}),[j.QuestionImages.ROUNDED]:e=>s.jsx(Tt,{alt:"option-icon",src:e}),[j.QuestionImages.NONE]:()=>null,[j.QuestionImages.UNSET]:()=>null},_t=({questionType:e,hasCorrectAnswer:t,correct:n,youVoted:i,questionVoted:o})=>{if(e===j.QuestionType.POLL&&i)return"correct";if(e===j.QuestionType.PREDICTION){if(t&&o)return i?n?"correct":"incorrect":n?"correct":"unset";if(i)return"correct"}return e===j.QuestionType.TRIVIA&&o?i?n?"correct":"incorrect":n?"correct":"unset":"unset"},kt=({questionType:e,questionVoted:t,correct:n,hasCorrectAnswer:i,questionStatus:o})=>e===j.QuestionType.TRIVIA?t&&n:e===j.QuestionType.PREDICTION?t&&n&&i||o===j.QuestionStatus.RESOLVED&&n:!1,Ct=e=>{var t;const{id:n,icon:i,text:o,percentageDecimal:m,onVote:u,youSelected:p,questionVoted:d,imageMode:I,answerTimeExpired:M,questionStatus:T,isLoading:g,questionType:v,correct:N,hasCorrectAnswer:a}=e,l=_t(e),c=kt({questionType:v,questionVoted:d,correct:N,hasCorrectAnswer:a,questionStatus:T}),f=d||T===j.QuestionStatus.RESOLVED&&v===j.QuestionType.PREDICTION;return s.jsxs(ht,{value:n,"data-selected":p,"data-answerState":l,disabled:d||g||M,onClick:u,children:[f&&s.jsx(xt,{"data-answerState":l,style:{width:`${m}%`}}),s.jsxs(yt,{children:[i&&I&&((t=ee[I])==null?void 0:t.call(ee,i)),s.jsx(At,{children:o}),f&&s.jsxs(St,{children:[c&&s.jsx(Ot,{name:"selected"}),s.jsxs(Dt,{children:[m,"%"]})]})]})]})},bt=[w.E.PRIMARY_GREEN1,w.E.SECONDARY_RED1,w.E.SECONDARY_RED1],wt=[10,10,0],Et=r.styled_default("div")({name:"RemainingTime",class:"r165427",propsAsIs:!1}),Lt=w.E.SECONDARY_GREEN6,te=w.E.SECONDARY_RED3,$t=w.E.NEUTRALS_GRAY3,Rt=({isPlaying:e=!0,duration:t=30,onTimerExpired:n})=>{const[i,o]=S.useState(t>10?Lt:te),m=({remainingTime:d})=>s.jsx(Et,{children:d}),u=S.useCallback(()=>{n==null||n(),o($t)},[n,o]),p=S.useCallback(d=>{d===10&&o(te)},[o]);return s.jsx(Ne.CountdownCircleTimer,{isPlaying:e,duration:t,colors:bt,colorsTime:wt,size:32,strokeWidth:2,trailStrokeWidth:2,trailColor:i,onComplete:u,onUpdate:p,children:m})},Qt=r.styled_default("div")({name:"WinBarContainer",class:"wie6cqo",propsAsIs:!1}),Ut=r.styled_default("div")({name:"Content",class:"cgizw4u",propsAsIs:!1}),qt=r.styled_default("div")({name:"Title",class:"t1l3ucjp",propsAsIs:!1}),Pt=()=>r.i1,Yt=r.styled_default(Pt())({name:"WinIcon",class:"wx7j799",propsAsIs:!0}),Wt=r.styled_default("div")({name:"Points",class:"p4lwuj0",propsAsIs:!1}),Ft=r.styled_default("span")({name:"PointsCount",class:"po9i64o",propsAsIs:!1}),Vt=r.styled_default("span")({name:"PointsUnits",class:"pe5g05h",propsAsIs:!1}),Bt=({title:e,points:t,isPlayingTimer:n,isTimer:i,onTimerExpired:o})=>s.jsxs(Qt,{children:[s.jsxs(Ut,{children:[e&&s.jsx(qt,{children:e}),t!==void 0&&s.jsxs(s.Fragment,{children:[s.jsx(Yt,{name:"icon-trophy"}),s.jsxs(Wt,{children:[s.jsx(Ft,{children:t}),s.jsx(Vt,{children:"PTS"})]})]})]}),i&&s.jsx(Rt,{isPlaying:n,onTimerExpired:o})]}),Ht=({openedQuestion:e,vote:t,close:n})=>{var i;const o=e.subject,m=e.type,u=(i=e.options)==null?void 0:i.options,[p,d]=S.useState(!1),[I,M]=S.useState(!1),[T,g]=S.useState(""),v=e==null?void 0:e.id,N=S.useCallback(async y=>{if(v){const h=y.currentTarget.value;g(h),M(!0),await t(v,h),M(!1)}},[v,g,t]),a=S.useCallback(()=>{d(!0),setTimeout(n,3e3)},[n]),l=S.useMemo(()=>e==null?void 0:e.answers.find(y=>y.youVoted===!0),[e]),c=S.useMemo(()=>!!(e!=null&&e.answers.find(y=>y.correct===!0)),[e]),f=S.useMemo(()=>e?e.answers.map(y=>{var h;return{...y,questionVoted:!!l,youSelected:T===y.id,isLoading:I,hasCorrectAnswer:c,questionType:e.type,answerTimeExpired:p,questionStatus:e.status,imageMode:(h=e.appearance)==null?void 0:h.images,onVote:N}}):[],[c,p,I,e,l,N,T]),x=u&&(u.case==="trivia"||u.case==="prediction")?u.value:void 0;return s.jsx(z.r,{"data-question-header":"true",children:s.jsx(pt,{children:s.jsxs(mt,{children:[x&&s.jsx(ut,{feedbackMessages:x,questionVoted:!!l,questionVotedCorrectly:l==null?void 0:l.correct,questionType:m,hasCorrectAnswer:c,questionStatus:e.status}),s.jsx(Bt,{title:p?"Time expired":"To win",points:p?void 0:100,onTimerExpired:a,isTimer:!0}),p?s.jsx(rt,{title:"More to come...",description:"Watch for additional enhanced stream interactive experience."}):s.jsxs(s.Fragment,{children:[s.jsx(It,{children:o}),s.jsx(ft,{children:f.map(y=>s.jsx(Ct,{...y},y.id))})]})]})})})},Zt=r.styled_default("div")({name:"Container",class:"cgn5uen",propsAsIs:!1}),Gt=r.styled_default("div")({name:"Content",class:"c1px8nt6",propsAsIs:!1}),Jt=r.styled_default("h3")({name:"Title",class:"t5et2jt",propsAsIs:!1}),Kt=r.styled_default("div")({name:"Description",class:"d1i2kpk2",propsAsIs:!1}),Xt=r.styled_default("div")({name:"DateWrap",class:"dd3lh3p",propsAsIs:!1}),es=r.styled_default("img")({name:"Image",class:"i1gfjeu5",propsAsIs:!1}),Ie=({created:e,image:t,title:n,instantView:i})=>{const o=S.useMemo(()=>{if(e){const u=new Date(e);if(C.r(u))return{date:C.a(u),time:C.n(u)}}return null},[e]),m=(i==null?void 0:i.image)||t;return s.jsxs(Zt,{children:[o&&s.jsxs(Xt,{children:[o.date," · ",o.time]}),(i==null?void 0:i.video)&&s.jsx(z.w,{source:i.video.url,poster:i.video.thumbnailUrl}),m&&s.jsx(es,{src:m}),s.jsxs(Gt,{children:[s.jsx(Jt,{children:(i==null?void 0:i.heading)||n}),s.jsx(Kt,{children:i==null?void 0:i.body})]})]})},ts=r.styled_default("div")({name:"Container",class:"c1euiow",propsAsIs:!1}),ss=r.styled_default("a")({name:"WebLinkBtn",class:"w19zie3h",propsAsIs:!1}),ns=({instantView:e,...t})=>s.jsxs(ts,{children:[s.jsx(Ie,{instantView:e,...t}),(e==null?void 0:e.webLink)&&s.jsxs(ss,{href:e==null?void 0:e.webLink.url,target:"_blank",children:["Explore more of the Masters History",s.jsx(r.i1,{name:"icon-external-link"})]})]}),is=r.styled_default("div")({name:"QuestionContainer",class:"qdri6g3",propsAsIs:!1}),rs=({openedQuestion:e})=>{var t;return((t=e==null?void 0:e.attributes)==null?void 0:t.attributes.case)==="insight"?s.jsx(ns,{created:e.attributes.created,...e.attributes.attributes.value}):null},os=({extendedQuestion:e,vote:t,close:n})=>{const{loading:i,data:o}=e;return!i&&o?s.jsx(Ht,{vote:t,close:n,openedQuestion:o}):null},as=({gamification:e})=>{var t;const n=k.useStore(e.openedQuestion.$store),i=k.useStore(e.openedQuestion.$extendedStore);if(!n)return null;const o=n.type;return s.jsxs(is,{children:[s.jsx(ue,{close:e.closeQuestion,type:((t=n.attributes)==null?void 0:t.type)||j.QuestionType.UNSET}),o==="question"&&s.jsx(os,{vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:i}),o!=="question"&&s.jsx(rs,{openedQuestion:n})]})},ls=r.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),cs=r.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),ds=r.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),us=r.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var U=(e=>(e.HOME="home",e.LEADERBOARD="leaderboard",e))(U||{});const se=({title:e,active:t,onClick:n})=>s.jsx(ds,{onClick:n,"data-selected":t,children:s.jsx(us,{children:e})}),ps=({activePage:e="home",toggleActivePage:t})=>s.jsx(ls,{children:s.jsxs(cs,{"data-position":e==="home"?"left":"right",children:[s.jsx(se,{title:"Home",active:e==="home",onClick:()=>t("home")}),s.jsx(se,{title:"Leader Board",active:e==="leaderboard",onClick:()=>t("leaderboard")})]})});function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},F.apply(this,arguments)}function ne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},V(e,t)}function ms(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,V(e,t)}var ie=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Is(e,t){return!!(e===t||ie(e)&&ie(t))}function fs(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Is(e[n],t[n]))return!1;return!0}function Y(e,t){t===void 0&&(t=fs);var n,i=[],o,m=!1;function u(){for(var p=[],d=0;d<arguments.length;d++)p[d]=arguments[d];return m&&n===this&&t(p,i)||(o=e.apply(this,p),m=!0,n=this,i=p),o}return u}var hs=typeof performance=="object"&&typeof performance.now=="function",re=hs?function(){return performance.now()}:function(){return Date.now()};function oe(e){cancelAnimationFrame(e.id)}function xs(e,t){var n=re();function i(){re()-n>=t?e.call(null):o.id=requestAnimationFrame(i)}var o={id:requestAnimationFrame(i)};return o}var W=-1;function ae(e){if(e===void 0&&(e=!1),W===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),W=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return W}var b=null;function le(e){if(e===void 0&&(e=!1),b===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var i=document.createElement("div"),o=i.style;return o.width="100px",o.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?b="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?b="negative":b="positive-ascending"),document.body.removeChild(t),b}return b}var ys=150,gs=function(t,n){return t};function js(e){var t,n=e.getItemOffset,i=e.getEstimatedTotalSize,o=e.getItemSize,m=e.getOffsetForIndexAndAlignment,u=e.getStartIndexForOffset,p=e.getStopIndexForStartIndex,d=e.initInstanceProps,I=e.shouldResetStyleCacheOnItemSizeChange,M=e.validateProps;return t=function(T){ms(g,T);function g(N){var a;return a=T.call(this,N)||this,a._instanceProps=d(a.props,ne(a)),a._outerRef=void 0,a._resetIsScrollingTimeoutId=null,a.state={instance:ne(a),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof a.props.initialScrollOffset=="number"?a.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},a._callOnItemsRendered=void 0,a._callOnItemsRendered=Y(function(l,c,f,x){return a.props.onItemsRendered({overscanStartIndex:l,overscanStopIndex:c,visibleStartIndex:f,visibleStopIndex:x})}),a._callOnScroll=void 0,a._callOnScroll=Y(function(l,c,f){return a.props.onScroll({scrollDirection:l,scrollOffset:c,scrollUpdateWasRequested:f})}),a._getItemStyle=void 0,a._getItemStyle=function(l){var c=a.props,f=c.direction,x=c.itemSize,y=c.layout,h=a._getItemStyleCache(I&&x,I&&y,I&&f),A;if(h.hasOwnProperty(l))A=h[l];else{var D=n(a.props,l,a._instanceProps),O=o(a.props,l,a._instanceProps),_=f==="horizontal"||y==="horizontal",L=f==="rtl",$=_?D:0;h[l]=A={position:"absolute",left:L?void 0:$,right:L?$:void 0,top:_?0:D,height:_?"100%":O,width:_?O:"100%"}}return A},a._getItemStyleCache=void 0,a._getItemStyleCache=Y(function(l,c,f){return{}}),a._onScrollHorizontal=function(l){var c=l.currentTarget,f=c.clientWidth,x=c.scrollLeft,y=c.scrollWidth;a.setState(function(h){if(h.scrollOffset===x)return null;var A=a.props.direction,D=x;if(A==="rtl")switch(le()){case"negative":D=-x;break;case"positive-descending":D=y-f-x;break}return D=Math.max(0,Math.min(D,y-f)),{isScrolling:!0,scrollDirection:h.scrollOffset<x?"forward":"backward",scrollOffset:D,scrollUpdateWasRequested:!1}},a._resetIsScrollingDebounced)},a._onScrollVertical=function(l){var c=l.currentTarget,f=c.clientHeight,x=c.scrollHeight,y=c.scrollTop;a.setState(function(h){if(h.scrollOffset===y)return null;var A=Math.max(0,Math.min(y,x-f));return{isScrolling:!0,scrollDirection:h.scrollOffset<A?"forward":"backward",scrollOffset:A,scrollUpdateWasRequested:!1}},a._resetIsScrollingDebounced)},a._outerRefSetter=function(l){var c=a.props.outerRef;a._outerRef=l,typeof c=="function"?c(l):c!=null&&typeof c=="object"&&c.hasOwnProperty("current")&&(c.current=l)},a._resetIsScrollingDebounced=function(){a._resetIsScrollingTimeoutId!==null&&oe(a._resetIsScrollingTimeoutId),a._resetIsScrollingTimeoutId=xs(a._resetIsScrolling,ys)},a._resetIsScrolling=function(){a._resetIsScrollingTimeoutId=null,a.setState({isScrolling:!1},function(){a._getItemStyleCache(-1,null)})},a}g.getDerivedStateFromProps=function(a,l){return Ms(a,l),M(a),null};var v=g.prototype;return v.scrollTo=function(a){a=Math.max(0,a),this.setState(function(l){return l.scrollOffset===a?null:{scrollDirection:l.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},v.scrollToItem=function(a,l){l===void 0&&(l="auto");var c=this.props,f=c.itemCount,x=c.layout,y=this.state.scrollOffset;a=Math.max(0,Math.min(a,f-1));var h=0;if(this._outerRef){var A=this._outerRef;x==="vertical"?h=A.scrollWidth>A.clientWidth?ae():0:h=A.scrollHeight>A.clientHeight?ae():0}this.scrollTo(m(this.props,a,l,y,this._instanceProps,h))},v.componentDidMount=function(){var a=this.props,l=a.direction,c=a.initialScrollOffset,f=a.layout;if(typeof c=="number"&&this._outerRef!=null){var x=this._outerRef;l==="horizontal"||f==="horizontal"?x.scrollLeft=c:x.scrollTop=c}this._callPropsCallbacks()},v.componentDidUpdate=function(){var a=this.props,l=a.direction,c=a.layout,f=this.state,x=f.scrollOffset,y=f.scrollUpdateWasRequested;if(y&&this._outerRef!=null){var h=this._outerRef;if(l==="horizontal"||c==="horizontal")if(l==="rtl")switch(le()){case"negative":h.scrollLeft=-x;break;case"positive-ascending":h.scrollLeft=x;break;default:var A=h.clientWidth,D=h.scrollWidth;h.scrollLeft=D-A-x;break}else h.scrollLeft=x;else h.scrollTop=x}this._callPropsCallbacks()},v.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&oe(this._resetIsScrollingTimeoutId)},v.render=function(){var a=this.props,l=a.children,c=a.className,f=a.direction,x=a.height,y=a.innerRef,h=a.innerElementType,A=a.innerTagName,D=a.itemCount,O=a.itemData,_=a.itemKey,L=_===void 0?gs:_,$=a.layout,fe=a.outerElementType,he=a.outerTagName,xe=a.style,ye=a.useIsScrolling,ge=a.width,B=this.state.isScrolling,q=f==="horizontal"||$==="horizontal",je=q?this._onScrollHorizontal:this._onScrollVertical,H=this._getRangeToRender(),Me=H[0],ve=H[1],Z=[];if(D>0)for(var E=Me;E<=ve;E++)Z.push(S.createElement(l,{data:O,key:L(E,O),index:E,isScrolling:ye?B:void 0,style:this._getItemStyle(E)}));var G=i(this.props,this._instanceProps);return S.createElement(fe||he||"div",{className:c,onScroll:je,ref:this._outerRefSetter,style:F({position:"relative",height:x,width:ge,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:f},xe)},S.createElement(h||A||"div",{children:Z,ref:y,style:{height:q?"100%":G,pointerEvents:B?"none":void 0,width:q?G:"100%"}}))},v._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var a=this.props.itemCount;if(a>0){var l=this._getRangeToRender(),c=l[0],f=l[1],x=l[2],y=l[3];this._callOnItemsRendered(c,f,x,y)}}if(typeof this.props.onScroll=="function"){var h=this.state,A=h.scrollDirection,D=h.scrollOffset,O=h.scrollUpdateWasRequested;this._callOnScroll(A,D,O)}},v._getRangeToRender=function(){var a=this.props,l=a.itemCount,c=a.overscanCount,f=this.state,x=f.isScrolling,y=f.scrollDirection,h=f.scrollOffset;if(l===0)return[0,0,0,0];var A=u(this.props,h,this._instanceProps),D=p(this.props,A,h,this._instanceProps),O=!x||y==="backward"?Math.max(1,c):1,_=!x||y==="forward"?Math.max(1,c):1;return[Math.max(0,A-O),Math.max(0,Math.min(l-1,D+_)),A,D]},g}(S.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Ms=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},vs=js({getItemOffset:function(t,n){var i=t.itemSize;return n*i},getItemSize:function(t,n){var i=t.itemSize;return i},getEstimatedTotalSize:function(t){var n=t.itemCount,i=t.itemSize;return i*n},getOffsetForIndexAndAlignment:function(t,n,i,o,m,u){var p=t.direction,d=t.height,I=t.itemCount,M=t.itemSize,T=t.layout,g=t.width,v=p==="horizontal"||T==="horizontal",N=v?g:d,a=Math.max(0,I*M-N),l=Math.min(a,n*M),c=Math.max(0,n*M-N+M+u);switch(i==="smart"&&(o>=c-N&&o<=l+N?i="auto":i="center"),i){case"start":return l;case"end":return c;case"center":{var f=Math.round(c+(l-c)/2);return f<Math.ceil(N/2)?0:f>a+Math.floor(N/2)?a:f}case"auto":default:return o>=c&&o<=l?o:o<c?c:l}},getStartIndexForOffset:function(t,n){var i=t.itemCount,o=t.itemSize;return Math.max(0,Math.min(i-1,Math.floor(n/o)))},getStopIndexForStartIndex:function(t,n,i){var o=t.direction,m=t.height,u=t.itemCount,p=t.itemSize,d=t.layout,I=t.width,M=o==="horizontal"||d==="horizontal",T=n*p,g=M?I:m,v=Math.ceil((g+i-T)/p);return Math.max(0,Math.min(u-1,n+v-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});function Ns(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,i=e.startIndex,o=e.stopIndex;return!(i>n||o<t)}function Ts(e){for(var t=e.isItemLoaded,n=e.itemCount,i=e.minimumBatchSize,o=e.startIndex,m=e.stopIndex,u=[],p=null,d=null,I=o;I<=m;I++){var M=t(I);M?d!==null&&(u.push(p,d),p=d=null):(d=I,p===null&&(p=I))}if(d!==null){for(var T=Math.min(Math.max(d,p+i-1),n-1),g=d+1;g<=T&&!t(g);g++)d=g;u.push(p,d)}if(u.length)for(;u[1]-u[0]+1<i&&u[0]>0;){var v=u[0]-1;if(!t(v))u[0]=v;else break}return u}var As=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ss=function(){function e(t,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Ds=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},ce=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},zs=function(e){Ds(t,e);function t(){var n,i,o,m;As(this,t);for(var u=arguments.length,p=Array(u),d=0;d<u;d++)p[d]=arguments[d];return m=(i=(o=ce(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(p))),o),o._lastRenderedStartIndex=-1,o._lastRenderedStopIndex=-1,o._memoizedUnloadedRanges=[],o._onItemsRendered=function(I){var M=I.visibleStartIndex,T=I.visibleStopIndex;o._lastRenderedStartIndex=M,o._lastRenderedStopIndex=T,o._ensureRowsLoaded(M,T)},o._setRef=function(I){o._listRef=I},i),ce(o,m)}return Ss(t,[{key:"resetloadMoreItemsCache",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],i&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var i=this.props.children;return i({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(i,o){var m=this.props,u=m.isItemLoaded,p=m.itemCount,d=m.minimumBatchSize,I=d===void 0?10:d,M=m.threshold,T=M===void 0?15:M,g=Ts({isItemLoaded:u,itemCount:p,minimumBatchSize:I,startIndex:Math.max(0,i-T),stopIndex:Math.min(p-1,o+T)});(this._memoizedUnloadedRanges.length!==g.length||this._memoizedUnloadedRanges.some(function(v,N){return g[N]!==v}))&&(this._memoizedUnloadedRanges=g,this._loadUnloadedRanges(g))}},{key:"_loadUnloadedRanges",value:function(i){for(var o=this,m=this.props.loadMoreItems||this.props.loadMoreRows,u=function(I){var M=i[I],T=i[I+1],g=m(M,T);g!=null&&g.then(function(){if(Ns({lastRenderedStartIndex:o._lastRenderedStartIndex,lastRenderedStopIndex:o._lastRenderedStopIndex,startIndex:M,stopIndex:T})){if(o._listRef==null)return;typeof o._listRef.resetAfterIndex=="function"?o._listRef.resetAfterIndex(M,!0):(typeof o._listRef._getItemStyleCache=="function"&&o._listRef._getItemStyleCache(-1),o._listRef.forceUpdate())}})},p=0;p<i.length;p+=2)u(p)}}]),t}(S.PureComponent);const Os=r.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),_s=r.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),ks=r.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),Cs=r.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),bs=r.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),ws=r.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),Es=r.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),Ls=()=>r.i1,$s=r.styled_default(Ls())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),Rs=({rank:e,avatar:t,name:n,points:i,isCurrentUser:o,openItemDetail:m,style:u})=>s.jsxs(Os,{onClick:m,style:u,children:[s.jsx(_s,{children:e||0}),s.jsxs(bs,{children:[t?s.jsx(ks,{alt:"leaderboard-item-avatar",src:t}):s.jsx(Cs,{children:C.o(n||"")}),s.jsxs(ws,{children:[s.jsx(Es,{children:n||""}),o&&s.jsx($s,{name:"icon-star"})]})]}),s.jsx("div",{children:C.i(i)})]}),Qs=r.styled_default("div")({name:"ScrollContainer",class:"s13d8sg6",propsAsIs:!1}),Us=({items:e,currentUserId:t,openItemDetail:n,fetchMore:i})=>s.jsx(z.AutoSizer,{children:({width:o,height:m})=>s.jsx(zs,{isItemLoaded:u=>u<e.length,itemCount:e.length+1,loadMoreItems:i,children:({onItemsRendered:u,ref:p})=>s.jsx(Qs,{children:s.jsx(vs,{itemSize:56,onItemsRendered:u,ref:p,itemCount:e.length,width:o,height:m,children:({index:d,style:I})=>s.jsx(Rs,{style:{...I,maxHeight:48},...e[d],openItemDetail:()=>n(e[d].userId),isCurrentUser:!!t&&t===e[d].userId},e[d].userId)})})})}),qs=({deepLink:e})=>{const{data:t}=k.useStore(e.$store);return s.jsx(z.O,{inviteLink:t==null?void 0:t.url,socialLinks:[{icon:"icon-facebook",link:"https://www.facebook.com/TheMasters",label:"Facebook"},{icon:"icon-twitter",link:"https://twitter.com/@TheMasters",label:"X"}],inviteCardTitle:"It’s more fun with friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})},Ps=({gamification:e})=>{const{data:t}=k.useStore(e.leaderboardList.$store);return t!=null&&t.length?s.jsx(Us,{fetchMore:e.leaderboardList.fetchMore,items:t,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()}):s.jsx(qs,{deepLink:e.deepLink})},Ys=r.styled_default("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),Ws=r.styled_default("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),Fs=r.styled_default("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),Vs=r.styled_default("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),Bs=()=>r.i1,Q=r.styled_default(Bs())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),Hs=()=>r.i1,Zs=r.styled_default(Hs())({name:"QuestionTypeIcon",class:"qxlt78s",propsAsIs:!0}),Gs=r.styled_default("div")({name:"QuestionTypeLabel",class:"qmg0vkx",propsAsIs:!1}),Js=r.styled_default("div")({name:"QuestionContent",class:"q1uz5j1g",propsAsIs:!1}),Ks=r.styled_default("button")({name:"PlayButton",class:"p1pba9p1",propsAsIs:!1}),Xs={[j.PickHistoryStatus.LOST]:s.jsx(Q,{name:"icon-cross"}),[j.PickHistoryStatus.WON]:s.jsx(Q,{name:"icon-check"}),[j.PickHistoryStatus.UNSET]:s.jsx(Q,{name:"icon-arrow"}),[j.PickHistoryStatus.DNP]:s.jsx(Q,{name:"icon-arrow"})},en=({questionId:e,questionType:t,questionStatus:n,subject:i,openForVoting:o,openQuestion:m,status:u})=>{const p=z.o[t],d=Xs[u];return p?s.jsxs(Ys,{onClick:()=>m==null?void 0:m(e),children:[s.jsxs(Js,{children:[s.jsxs(Ws,{children:[s.jsx(Zs,{name:p.iconName}),s.jsxs(Gs,{children:[p.label,t===j.QuestionType.TRIVIA&&n===j.QuestionStatus.RESOLVED&&" • Expired"]})]}),s.jsx(Fs,{children:i||""})]}),s.jsx(Vs,{children:o?s.jsx(Ks,{children:"Play"}):d})]}):null},tn=r.styled_default("div")({name:"Container",class:"cll3md7",propsAsIs:!1}),sn=r.styled_default("button")({name:"ActionBtn",class:"a10g1iik",propsAsIs:!1}),nn=({openInsight:e,questionId:t,...n})=>s.jsxs(tn,{children:[s.jsx(Ie,{questionId:t,...n}),e&&s.jsx(sn,{onClick:()=>e(t),children:"View Insight"})]}),rn=r.styled_default("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),on=({questions:e,openQuestion:t})=>s.jsx(rn,{children:e==null?void 0:e.map(n=>{var i,o;if(n.type==="question"&&((i=n.attributes)==null?void 0:i.attributes.case)==="question"){const m=n.attributes.attributes.value;return s.jsx(en,{openQuestion:t,...m},m.questionId)}if(n.type==="insight"&&((o=n.attributes)==null?void 0:o.attributes.case)==="insight"){const m=n.attributes.attributes.value;return s.jsx(nn,{openInsight:t,...m},m.questionId)}return null})}),an=({store:e,openQuestion:t})=>{const n=k.useStore(e);return n!=null&&n.data?s.jsx(on,{openQuestion:t,questions:n.data}):s.jsx("div",{children:"wait questions..."})},ln=({userSummary:e})=>{var t,n;const i=k.useStore(e.getStore());return(t=i.data)!=null&&t.summary?s.jsx(pe,{...i.data.summary,successRate:(n=i.data.percentage)==null?void 0:n.correct}):s.jsx("div",{children:"wait user..."})},cn=({gamification:e})=>{const[t,n]=S.useState(U.HOME);return s.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(z.a,{style:{paddingBottom:"4px"},children:s.jsx(ps,{activePage:t,toggleActivePage:n})}),t===U.HOME&&s.jsxs(z.r,{children:[s.jsx(z.a,{style:{paddingTop:"12px"},children:s.jsx(ln,{userSummary:e.userSummary})}),s.jsx(z.n,{children:s.jsx(an,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),t===U.LEADERBOARD&&s.jsx("div",{className:"c1bp9dj2",children:s.jsx(Ps,{gamification:e})})]})},dn=()=>z.d,de=r.styled_default(dn())({name:"OpenedContainer",class:"oar61gl",propsAsIs:!0}),un=r.styled_default("div")({name:"UserContainer",class:"u14zaal4",propsAsIs:!1}),pn=({correct:e,incorrect:t})=>{const n=e+t;return n===0?0:Math.round(e/n*100)},mn=({gamification:e,className:t})=>{const n=k.useStore(e.openedQuestion.$store),i=k.useStore(e.openedUser);return s.jsxs(s.Fragment,{children:[n&&s.jsx(de,{className:t,children:s.jsx(as,{gamification:e})}),i&&s.jsx(de,{className:t,children:s.jsxs(un,{children:[s.jsx(ue,{label:"Friend's Rank",close:e.closeUser}),s.jsx(z.a,{children:s.jsx(pe,{...i,successRate:pn(i)})})]})}),s.jsx(z.r,{className:t,"data-nav":"true",children:s.jsx(cn,{gamification:e})})]})};exports.default=mn;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("./index3.js"),k=require("@nanostores/react"),z=require("./masters2.js"),S=require("react"),g=require("@streamlayer/sdk-web-types"),C=require("./common.js"),Ne=require("react-countdown-circle-timer"),w=require("./index2.js");require("@streamlayer/sdk-web-interfaces");require("@streamlayer/sdk-web-notifications");require("@lottiefiles/react-lottie-player");require("./useStreamLayerApp.js");require("@streamlayer/sdk-web");const Te=r.styled_default("div")({name:"Container",class:"c1vwopgc",propsAsIs:!1}),Ae=r.styled_default("div")({name:"QuestionTypeWrap",class:"qyktpt0",propsAsIs:!1}),Se=()=>r.i1,De=r.styled_default(Se())({name:"QuestionTypeIcon",class:"q951jdx",propsAsIs:!0}),ze=r.styled_default("span")({name:"QuestionTypeTitle",class:"qss5f0e",propsAsIs:!1}),Oe=r.styled_default("button")({name:"CloseButton",class:"c1ao1jtv",propsAsIs:!1}),_e=()=>r.i1,ke=r.styled_default(_e())({name:"CloseIcon",class:"cvsl7l3",propsAsIs:!0}),ue=({type:e,close:t,label:n})=>{const i=e?z.o[e]:{label:n,iconName:void 0};return s.jsxs(Te,{children:[s.jsxs(Ae,{children:[(i==null?void 0:i.iconName)&&s.jsx(De,{name:i.iconName}),(i==null?void 0:i.label)&&s.jsx(ze,{children:i.label})]}),s.jsx(Oe,{onClick:t,children:s.jsx(ke,{name:"icon-cross"})})]})},Ce=r.styled_default("div")({name:"Container",class:"c1zy8a",propsAsIs:!1}),be=r.styled_default("div")({name:"Title",class:"t1vih9p5",propsAsIs:!1}),we=r.styled_default("div")({name:"Indicator",class:"i1fbnvpb",propsAsIs:!1}),J=({indicator:e,title:t})=>s.jsxs(Ce,{children:[s.jsx(be,{children:t}),s.jsx(we,{children:e})]}),Ee=r.styled_default("div")({name:"Container",class:"ctmhwyc",propsAsIs:!1}),Le=r.styled_default("div")({name:"Indicator",class:"i1jri200",propsAsIs:!1}),Re=r.styled_default("div")({name:"Title",class:"t8s05oq",propsAsIs:!1}),$=({indicator:e,title:t})=>s.jsxs(Ee,{children:[s.jsx(Le,{children:e}),s.jsx(Re,{children:t})]}),$e=r.styled_default("div")({name:"Container",class:"c1yrpn9o",propsAsIs:!1}),Qe=r.styled_default("div")({name:"TopInfo",class:"t17fwahh",propsAsIs:!1}),Ue=r.styled_default("div")({name:"BottomInfo",class:"by6w7e9",propsAsIs:!1}),qe=r.styled_default("div")({name:"User",class:"u1g7arbm",propsAsIs:!1}),Pe=r.styled_default("img")({name:"Avatar",class:"a1ldeata",propsAsIs:!1}),Ye=r.styled_default("div")({name:"UserInfo",class:"u10d4koz",propsAsIs:!1}),We=r.styled_default("div")({name:"UserName",class:"u1q6roj0",propsAsIs:!1}),Fe=r.styled_default("div")({name:"UserRating",class:"ui0m425",propsAsIs:!1}),Ve=r.styled_default("img")({name:"TrophyIcon",class:"t1el3mrn",propsAsIs:!1}),Be=r.styled_default("div")({name:"Rts",class:"r2vgnxv",propsAsIs:!1}),He=r.styled_default("div")({name:"RtsIndicator",class:"roqn06j",propsAsIs:!1}),Ze=r.styled_default("div")({name:"RtsLabel",class:"r15adx7c",propsAsIs:!1}),Ge=r.styled_default("div")({name:"Divider",class:"dv59lta",propsAsIs:!1}),Je=r.styled_default("div")({name:"Ranks",class:"r55lotb",propsAsIs:!1}),Ke=r.styled_default("div")({name:"Statistics",class:"s1knfgqt",propsAsIs:!1}),Xe=r.styled_default("div")({name:"AvatarPlaceholder",class:"a1mqo824",propsAsIs:!1}),et=r.styled_default("button")({name:"UserAccountBtn",class:"uxareh6",propsAsIs:!1}),tt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1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zQ5IDEwLjQ1M0MxMC4yMTQ2IDEwLjE5MiAxMC41MTkxIDkuODg5NjcgMTAuNzg4NCA5LjU0NTkyQzExLjUxMjcgOS41MTQwOSAxMi4yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=",pe=({avatar:e,name:t,points:n,friendsRank:i,rank:o,streak:m,correct:u,incorrect:p,inTop:d,successRate:I})=>s.jsxs($e,{children:[s.jsx(Qe,{children:s.jsxs(qe,{children:[s.jsxs(et,{children:[e&&s.jsx(Pe,{alt:"avatar",src:e}),!e&&s.jsx(Xe,{children:C.o(t||"")})]}),s.jsxs(Ye,{children:[s.jsx(We,{children:t}),s.jsxs(Fe,{children:[s.jsxs(Be,{children:[s.jsx(Ve,{alt:"rank-icon",src:tt}),s.jsxs(He,{children:[C.i(n),s.jsx(Ze,{children:"PTS"})]})]}),s.jsx(Ge,{}),s.jsxs("div",{children:["TOP ",d||0,"%"]})]})]})]})}),s.jsxs(Ue,{children:[s.jsxs(Je,{children:[s.jsx(J,{indicator:i||0,title:"Friends rank"}),s.jsx(J,{indicator:o||0,title:"Global rank"})]}),s.jsxs(Ke,{children:[s.jsx($,{indicator:m||0,title:"Win streak"}),s.jsx($,{indicator:u||0,title:"Correct"}),s.jsx($,{indicator:p||0,title:"Incorrect"}),s.jsx($,{indicator:`${I||0}%`,title:"Succ. rate"})]})]})]}),st=r.styled_default("div")({name:"Container",class:"c38csyt",propsAsIs:!1}),nt=r.styled_default("div")({name:"Title",class:"ty221rx",propsAsIs:!1}),it=r.styled_default("div")({name:"Description",class:"dlaj9xp",propsAsIs:!1}),rt=({title:e,description:t})=>s.jsxs(st,{children:[s.jsx(r.i1,{name:"icon-check-circle"}),s.jsx(nt,{children:e}),s.jsx(it,{children:t})]}),ot=r.styled_default("div")({name:"Container",class:"c16sbdnm",propsAsIs:!1}),at=()=>r.i1,lt=r.styled_default(at())({name:"IconPrediction",class:"ibhorgl",propsAsIs:!0}),K=r.styled_default("div")({name:"FeedbackIconWrap",class:"f1g20ja7",propsAsIs:!1}),X=r.styled_default("div")({name:"FeedbackHeader",class:"f455ozj",propsAsIs:!1}),ct=r.styled_default("span")({name:"FeedbackTitle",class:"f1913njx",propsAsIs:!1}),P=r.styled_default("span")({name:"FeedbackDescription",class:"fzfk69z",propsAsIs:!1}),dt=r.styled_default("div")({name:"FeedbackText",class:"fx87qaj",propsAsIs:!1}),ut=({feedbackMessages:e,questionVotedCorrectly:t,questionVoted:n,questionType:i,hasCorrectAnswer:o,questionStatus:m})=>{const u=n&&(i===g.QuestionType.TRIVIA||i===g.QuestionType.PREDICTION);if(!u&&m!==g.QuestionStatus.RESOLVED)return null;const p=i===g.QuestionType.PREDICTION&&!o,d=t?"correct":"incorrect",I=t?e.correctFeedback:e.incorrectFeedback;return s.jsxs(ot,{"data-isPrediction":p,children:[m===g.QuestionStatus.RESOLVED&&i===g.QuestionType.TRIVIA&&!n&&s.jsxs(s.Fragment,{children:[s.jsx(K,{children:s.jsx(r.i1,{name:"questionExpired"})}),s.jsxs("div",{children:[s.jsx(X,{children:s.jsx(P,{children:"Question Expired"})}),s.jsx(dt,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),u&&p&&s.jsxs(s.Fragment,{children:[s.jsx(lt,{name:"icon-prediction"}),s.jsx(P,{children:"Stay tuned to see if your prediction was correct."})]}),u&&o&&s.jsxs(s.Fragment,{children:[s.jsx(K,{"data-feedbackType":d,children:s.jsx(r.i1,{name:d})}),s.jsx("div",{children:s.jsxs(X,{children:[s.jsx(ct,{"data-feedbackType":d,children:I==null?void 0:I.title}),s.jsx(P,{children:I==null?void 0:I.description})]})})]})]})},pt=r.styled_default("div")({name:"Container",class:"c14ielyq",propsAsIs:!1}),mt=r.styled_default("div")({name:"Content",class:"c1tlqx57",propsAsIs:!1}),It=r.styled_default("div")({name:"Title",class:"t1hq58md",propsAsIs:!1}),ft=r.styled_default("div")({name:"Options",class:"o1c8nxcx",propsAsIs:!1}),ht=r.styled_default("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),yt=r.styled_default("div")({name:"ButtonPct",class:"b4iik8i",propsAsIs:!1}),xt=r.styled_default("span")({name:"ButtonBody",class:"b1gq1lnf",propsAsIs:!1}),gt=r.styled_default("div")({name:"IconContainer",class:"i1j65z51",propsAsIs:!1}),jt=r.styled_default("div")({name:"IconWrap",class:"i19tpfua",propsAsIs:!1}),me=r.styled_default("img")({name:"Icon",class:"i1tubmma",propsAsIs:!1}),Mt=()=>me,vt=r.styled_default(Mt())({name:"IconDefault",class:"i1grrgwj",propsAsIs:!0}),Nt=()=>me,Tt=r.styled_default(Nt())({name:"IconCircle",class:"ibemyq8",propsAsIs:!0}),At=r.styled_default("span")({name:"Title",class:"t1dceht",propsAsIs:!1}),St=r.styled_default("span")({name:"Indicators",class:"i116q4vq",propsAsIs:!1}),Dt=r.styled_default("span")({name:"Percentage",class:"p17ajcu2",propsAsIs:!1}),zt=()=>r.i1,Ot=r.styled_default(zt())({name:"CheckIcon",class:"cu9kmlb",propsAsIs:!0}),ee={[g.QuestionImages.CENTERED]:e=>s.jsx(vt,{alt:"option-icon",src:e}),[g.QuestionImages.TRANSPARENT]:e=>s.jsx(gt,{children:s.jsx(jt,{style:{backgroundImage:`url(${e})`}})}),[g.QuestionImages.ROUNDED]:e=>s.jsx(Tt,{alt:"option-icon",src:e}),[g.QuestionImages.NONE]:()=>null,[g.QuestionImages.UNSET]:()=>null},_t=({questionType:e,hasCorrectAnswer:t,correct:n,youVoted:i,questionVoted:o})=>{if(e===g.QuestionType.POLL&&i)return"correct";if(e===g.QuestionType.PREDICTION){if(t&&o)return i?n?"correct":"incorrect":n?"correct":"unset";if(i)return"correct"}return e===g.QuestionType.TRIVIA&&o?i?n?"correct":"incorrect":n?"correct":"unset":"unset"},kt=({questionType:e,questionVoted:t,correct:n,hasCorrectAnswer:i,questionStatus:o})=>e===g.QuestionType.TRIVIA?t&&n:e===g.QuestionType.PREDICTION?t&&n&&i||o===g.QuestionStatus.RESOLVED&&n:!1,Ct=e=>{var t;const{id:n,icon:i,text:o,percentageDecimal:m,onVote:u,youSelected:p,questionVoted:d,imageMode:I,answerTimeExpired:M,questionStatus:T,isLoading:j,questionType:v,correct:N,hasCorrectAnswer:a}=e,l=_t(e),c=kt({questionType:v,questionVoted:d,correct:N,hasCorrectAnswer:a,questionStatus:T}),f=d||T===g.QuestionStatus.RESOLVED&&v===g.QuestionType.PREDICTION;return s.jsxs(ht,{value:n,"data-selected":p,"data-answerState":l,disabled:d||j||M,onClick:u,children:[f&&s.jsx(yt,{"data-answerState":l,style:{width:`${m}%`}}),s.jsxs(xt,{children:[i&&I&&((t=ee[I])==null?void 0:t.call(ee,i)),s.jsx(At,{children:o}),f&&s.jsxs(St,{children:[c&&s.jsx(Ot,{name:"selected"}),s.jsxs(Dt,{children:[m,"%"]})]})]})]})},bt=[w.E.PRIMARY_GREEN1,w.E.SECONDARY_RED1,w.E.SECONDARY_RED1],wt=[10,10,0],Et=r.styled_default("div")({name:"RemainingTime",class:"r165427",propsAsIs:!1}),Lt=w.E.SECONDARY_GREEN6,te=w.E.SECONDARY_RED3,Rt=w.E.NEUTRALS_GRAY3,$t=({isPlaying:e=!0,duration:t=30,onTimerExpired:n})=>{const[i,o]=S.useState(t>10?Lt:te),m=({remainingTime:d})=>s.jsx(Et,{children:d}),u=S.useCallback(()=>{n==null||n(),o(Rt)},[n,o]),p=S.useCallback(d=>{d===10&&o(te)},[o]);return s.jsx(Ne.CountdownCircleTimer,{isPlaying:e,duration:t,colors:bt,colorsTime:wt,size:32,strokeWidth:2,trailStrokeWidth:2,trailColor:i,onComplete:u,onUpdate:p,children:m})},Qt=r.styled_default("div")({name:"WinBarContainer",class:"wie6cqo",propsAsIs:!1}),Ut=r.styled_default("div")({name:"Content",class:"cgizw4u",propsAsIs:!1}),qt=r.styled_default("div")({name:"Title",class:"t1l3ucjp",propsAsIs:!1}),Pt=()=>r.i1,Yt=r.styled_default(Pt())({name:"WinIcon",class:"wx7j799",propsAsIs:!0}),Wt=r.styled_default("div")({name:"Points",class:"p4lwuj0",propsAsIs:!1}),Ft=r.styled_default("span")({name:"PointsCount",class:"po9i64o",propsAsIs:!1}),Vt=r.styled_default("span")({name:"PointsUnits",class:"pe5g05h",propsAsIs:!1}),Bt=({title:e,points:t,isPlayingTimer:n,isTimer:i,onTimerExpired:o})=>s.jsxs(Qt,{children:[s.jsxs(Ut,{children:[e&&s.jsx(qt,{children:e}),t!==void 0&&s.jsxs(s.Fragment,{children:[s.jsx(Yt,{name:"icon-trophy"}),s.jsxs(Wt,{children:[s.jsx(Ft,{children:t}),s.jsx(Vt,{children:"PTS"})]})]})]}),i&&s.jsx($t,{isPlaying:n,onTimerExpired:o})]}),Ht=({openedQuestion:e,vote:t,close:n})=>{var i;const o=e.subject,m=e.type,u=(i=e.options)==null?void 0:i.options,[p,d]=S.useState(!1),[I,M]=S.useState(!1),[T,j]=S.useState(""),v=e==null?void 0:e.id,N=S.useCallback(async x=>{if(v){const h=x.currentTarget.value;j(h),M(!0),await t(v,h),M(!1)}},[v,j,t]),a=S.useCallback(()=>{d(!0),setTimeout(n,3e3)},[n]),l=S.useMemo(()=>e==null?void 0:e.answers.find(x=>x.youVoted===!0),[e]),c=S.useMemo(()=>!!(e!=null&&e.answers.find(x=>x.correct===!0)),[e]),f=S.useMemo(()=>e?e.answers.map(x=>{var h;return{...x,questionVoted:!!l,youSelected:T===x.id,isLoading:I,hasCorrectAnswer:c,questionType:e.type,answerTimeExpired:p,questionStatus:e.status,imageMode:(h=e.appearance)==null?void 0:h.images,onVote:N}}):[],[c,p,I,e,l,N,T]),y=u&&(u.case==="trivia"||u.case==="prediction")?u.value:void 0;return s.jsx(z.r,{"data-question-header":"true",children:s.jsx(pt,{children:s.jsxs(mt,{children:[y&&s.jsx(ut,{feedbackMessages:y,questionVoted:!!l,questionVotedCorrectly:l==null?void 0:l.correct,questionType:m,hasCorrectAnswer:c,questionStatus:e.status}),e.type!==g.QuestionType.PREDICTION&&s.jsx(Bt,{title:p?"Time expired":"To win",points:p?void 0:100,onTimerExpired:a,isTimer:!0}),p?s.jsx(rt,{title:"More to come...",description:"Watch for additional enhanced stream interactive experience."}):s.jsxs(s.Fragment,{children:[s.jsx(It,{"data-isPrediction":e.type===g.QuestionType.PREDICTION,children:o}),s.jsx(ft,{children:f.map(x=>s.jsx(Ct,{...x},x.id))})]})]})})})},Zt=r.styled_default("div")({name:"Container",class:"cgn5uen",propsAsIs:!1}),Gt=r.styled_default("div")({name:"Content",class:"c1px8nt6",propsAsIs:!1}),Jt=r.styled_default("h3")({name:"Title",class:"t5et2jt",propsAsIs:!1}),Kt=r.styled_default("div")({name:"Description",class:"d1i2kpk2",propsAsIs:!1}),Xt=r.styled_default("div")({name:"DateWrap",class:"dd3lh3p",propsAsIs:!1}),es=r.styled_default("img")({name:"Image",class:"i1gfjeu5",propsAsIs:!1}),Ie=({created:e,image:t,title:n,instantView:i})=>{const o=S.useMemo(()=>{if(e){const u=new Date(e);if(C.r(u))return{date:C.a(u),time:C.n(u)}}return null},[e]),m=(i==null?void 0:i.image)||t;return s.jsxs(Zt,{children:[o&&s.jsxs(Xt,{children:[o.date," · ",o.time]}),(i==null?void 0:i.video)&&s.jsx(z.w,{source:i.video.url,poster:i.video.thumbnailUrl}),m&&s.jsx(es,{src:m}),s.jsxs(Gt,{children:[s.jsx(Jt,{children:(i==null?void 0:i.heading)||n}),s.jsx(Kt,{children:i==null?void 0:i.body})]})]})},ts=r.styled_default("div")({name:"Container",class:"c1euiow",propsAsIs:!1}),ss=r.styled_default("a")({name:"WebLinkBtn",class:"w19zie3h",propsAsIs:!1}),ns=({instantView:e,...t})=>s.jsxs(ts,{children:[s.jsx(Ie,{instantView:e,...t}),(e==null?void 0:e.webLink)&&s.jsxs(ss,{href:e==null?void 0:e.webLink.url,target:"_blank",children:["Explore more of the Masters History",s.jsx(r.i1,{name:"icon-external-link"})]})]}),is=r.styled_default("div")({name:"QuestionContainer",class:"qdri6g3",propsAsIs:!1}),rs=({openedQuestion:e})=>{var t;return((t=e==null?void 0:e.attributes)==null?void 0:t.attributes.case)==="insight"?s.jsx(ns,{created:e.attributes.created,...e.attributes.attributes.value}):null},os=({extendedQuestion:e,vote:t,close:n})=>{const{loading:i,data:o}=e;return!i&&o?s.jsx(Ht,{vote:t,close:n,openedQuestion:o}):null},as=({gamification:e})=>{var t;const n=k.useStore(e.openedQuestion.$store),i=k.useStore(e.openedQuestion.$extendedStore);if(!n)return null;const o=n.type;return s.jsxs(is,{children:[s.jsx(ue,{close:e.closeQuestion,type:((t=n.attributes)==null?void 0:t.type)||g.QuestionType.UNSET}),o==="question"&&s.jsx(os,{vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:i}),o!=="question"&&s.jsx(rs,{openedQuestion:n})]})},ls=r.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),cs=r.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),ds=r.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),us=r.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var U=(e=>(e.HOME="home",e.LEADERBOARD="leaderboard",e))(U||{});const se=({title:e,active:t,onClick:n})=>s.jsx(ds,{onClick:n,"data-selected":t,children:s.jsx(us,{children:e})}),ps=({activePage:e="home",toggleActivePage:t})=>s.jsx(ls,{children:s.jsxs(cs,{"data-position":e==="home"?"left":"right",children:[s.jsx(se,{title:"Home",active:e==="home",onClick:()=>t("home")}),s.jsx(se,{title:"Leader Board",active:e==="leaderboard",onClick:()=>t("leaderboard")})]})});function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},F.apply(this,arguments)}function ne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,o){return i.__proto__=o,i},V(e,t)}function ms(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,V(e,t)}var ie=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Is(e,t){return!!(e===t||ie(e)&&ie(t))}function fs(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Is(e[n],t[n]))return!1;return!0}function Y(e,t){t===void 0&&(t=fs);var n,i=[],o,m=!1;function u(){for(var p=[],d=0;d<arguments.length;d++)p[d]=arguments[d];return m&&n===this&&t(p,i)||(o=e.apply(this,p),m=!0,n=this,i=p),o}return u}var hs=typeof performance=="object"&&typeof performance.now=="function",re=hs?function(){return performance.now()}:function(){return Date.now()};function oe(e){cancelAnimationFrame(e.id)}function ys(e,t){var n=re();function i(){re()-n>=t?e.call(null):o.id=requestAnimationFrame(i)}var o={id:requestAnimationFrame(i)};return o}var W=-1;function ae(e){if(e===void 0&&(e=!1),W===-1||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),W=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return W}var b=null;function le(e){if(e===void 0&&(e=!1),b===null||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var i=document.createElement("div"),o=i.style;return o.width="100px",o.height="100px",t.appendChild(i),document.body.appendChild(t),t.scrollLeft>0?b="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?b="negative":b="positive-ascending"),document.body.removeChild(t),b}return b}var xs=150,gs=function(t,n){return t};function js(e){var t,n=e.getItemOffset,i=e.getEstimatedTotalSize,o=e.getItemSize,m=e.getOffsetForIndexAndAlignment,u=e.getStartIndexForOffset,p=e.getStopIndexForStartIndex,d=e.initInstanceProps,I=e.shouldResetStyleCacheOnItemSizeChange,M=e.validateProps;return t=function(T){ms(j,T);function j(N){var a;return a=T.call(this,N)||this,a._instanceProps=d(a.props,ne(a)),a._outerRef=void 0,a._resetIsScrollingTimeoutId=null,a.state={instance:ne(a),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof a.props.initialScrollOffset=="number"?a.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},a._callOnItemsRendered=void 0,a._callOnItemsRendered=Y(function(l,c,f,y){return a.props.onItemsRendered({overscanStartIndex:l,overscanStopIndex:c,visibleStartIndex:f,visibleStopIndex:y})}),a._callOnScroll=void 0,a._callOnScroll=Y(function(l,c,f){return a.props.onScroll({scrollDirection:l,scrollOffset:c,scrollUpdateWasRequested:f})}),a._getItemStyle=void 0,a._getItemStyle=function(l){var c=a.props,f=c.direction,y=c.itemSize,x=c.layout,h=a._getItemStyleCache(I&&y,I&&x,I&&f),A;if(h.hasOwnProperty(l))A=h[l];else{var D=n(a.props,l,a._instanceProps),O=o(a.props,l,a._instanceProps),_=f==="horizontal"||x==="horizontal",L=f==="rtl",R=_?D:0;h[l]=A={position:"absolute",left:L?void 0:R,right:L?R:void 0,top:_?0:D,height:_?"100%":O,width:_?O:"100%"}}return A},a._getItemStyleCache=void 0,a._getItemStyleCache=Y(function(l,c,f){return{}}),a._onScrollHorizontal=function(l){var c=l.currentTarget,f=c.clientWidth,y=c.scrollLeft,x=c.scrollWidth;a.setState(function(h){if(h.scrollOffset===y)return null;var A=a.props.direction,D=y;if(A==="rtl")switch(le()){case"negative":D=-y;break;case"positive-descending":D=x-f-y;break}return D=Math.max(0,Math.min(D,x-f)),{isScrolling:!0,scrollDirection:h.scrollOffset<y?"forward":"backward",scrollOffset:D,scrollUpdateWasRequested:!1}},a._resetIsScrollingDebounced)},a._onScrollVertical=function(l){var c=l.currentTarget,f=c.clientHeight,y=c.scrollHeight,x=c.scrollTop;a.setState(function(h){if(h.scrollOffset===x)return null;var A=Math.max(0,Math.min(x,y-f));return{isScrolling:!0,scrollDirection:h.scrollOffset<A?"forward":"backward",scrollOffset:A,scrollUpdateWasRequested:!1}},a._resetIsScrollingDebounced)},a._outerRefSetter=function(l){var c=a.props.outerRef;a._outerRef=l,typeof c=="function"?c(l):c!=null&&typeof c=="object"&&c.hasOwnProperty("current")&&(c.current=l)},a._resetIsScrollingDebounced=function(){a._resetIsScrollingTimeoutId!==null&&oe(a._resetIsScrollingTimeoutId),a._resetIsScrollingTimeoutId=ys(a._resetIsScrolling,xs)},a._resetIsScrolling=function(){a._resetIsScrollingTimeoutId=null,a.setState({isScrolling:!1},function(){a._getItemStyleCache(-1,null)})},a}j.getDerivedStateFromProps=function(a,l){return Ms(a,l),M(a),null};var v=j.prototype;return v.scrollTo=function(a){a=Math.max(0,a),this.setState(function(l){return l.scrollOffset===a?null:{scrollDirection:l.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},v.scrollToItem=function(a,l){l===void 0&&(l="auto");var c=this.props,f=c.itemCount,y=c.layout,x=this.state.scrollOffset;a=Math.max(0,Math.min(a,f-1));var h=0;if(this._outerRef){var A=this._outerRef;y==="vertical"?h=A.scrollWidth>A.clientWidth?ae():0:h=A.scrollHeight>A.clientHeight?ae():0}this.scrollTo(m(this.props,a,l,x,this._instanceProps,h))},v.componentDidMount=function(){var a=this.props,l=a.direction,c=a.initialScrollOffset,f=a.layout;if(typeof c=="number"&&this._outerRef!=null){var y=this._outerRef;l==="horizontal"||f==="horizontal"?y.scrollLeft=c:y.scrollTop=c}this._callPropsCallbacks()},v.componentDidUpdate=function(){var a=this.props,l=a.direction,c=a.layout,f=this.state,y=f.scrollOffset,x=f.scrollUpdateWasRequested;if(x&&this._outerRef!=null){var h=this._outerRef;if(l==="horizontal"||c==="horizontal")if(l==="rtl")switch(le()){case"negative":h.scrollLeft=-y;break;case"positive-ascending":h.scrollLeft=y;break;default:var A=h.clientWidth,D=h.scrollWidth;h.scrollLeft=D-A-y;break}else h.scrollLeft=y;else h.scrollTop=y}this._callPropsCallbacks()},v.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&oe(this._resetIsScrollingTimeoutId)},v.render=function(){var a=this.props,l=a.children,c=a.className,f=a.direction,y=a.height,x=a.innerRef,h=a.innerElementType,A=a.innerTagName,D=a.itemCount,O=a.itemData,_=a.itemKey,L=_===void 0?gs:_,R=a.layout,fe=a.outerElementType,he=a.outerTagName,ye=a.style,xe=a.useIsScrolling,ge=a.width,B=this.state.isScrolling,q=f==="horizontal"||R==="horizontal",je=q?this._onScrollHorizontal:this._onScrollVertical,H=this._getRangeToRender(),Me=H[0],ve=H[1],Z=[];if(D>0)for(var E=Me;E<=ve;E++)Z.push(S.createElement(l,{data:O,key:L(E,O),index:E,isScrolling:xe?B:void 0,style:this._getItemStyle(E)}));var G=i(this.props,this._instanceProps);return S.createElement(fe||he||"div",{className:c,onScroll:je,ref:this._outerRefSetter,style:F({position:"relative",height:y,width:ge,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:f},ye)},S.createElement(h||A||"div",{children:Z,ref:x,style:{height:q?"100%":G,pointerEvents:B?"none":void 0,width:q?G:"100%"}}))},v._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var a=this.props.itemCount;if(a>0){var l=this._getRangeToRender(),c=l[0],f=l[1],y=l[2],x=l[3];this._callOnItemsRendered(c,f,y,x)}}if(typeof this.props.onScroll=="function"){var h=this.state,A=h.scrollDirection,D=h.scrollOffset,O=h.scrollUpdateWasRequested;this._callOnScroll(A,D,O)}},v._getRangeToRender=function(){var a=this.props,l=a.itemCount,c=a.overscanCount,f=this.state,y=f.isScrolling,x=f.scrollDirection,h=f.scrollOffset;if(l===0)return[0,0,0,0];var A=u(this.props,h,this._instanceProps),D=p(this.props,A,h,this._instanceProps),O=!y||x==="backward"?Math.max(1,c):1,_=!y||x==="forward"?Math.max(1,c):1;return[Math.max(0,A-O),Math.max(0,Math.min(l-1,D+_)),A,D]},j}(S.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Ms=function(t,n){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,n.instance},vs=js({getItemOffset:function(t,n){var i=t.itemSize;return n*i},getItemSize:function(t,n){var i=t.itemSize;return i},getEstimatedTotalSize:function(t){var n=t.itemCount,i=t.itemSize;return i*n},getOffsetForIndexAndAlignment:function(t,n,i,o,m,u){var p=t.direction,d=t.height,I=t.itemCount,M=t.itemSize,T=t.layout,j=t.width,v=p==="horizontal"||T==="horizontal",N=v?j:d,a=Math.max(0,I*M-N),l=Math.min(a,n*M),c=Math.max(0,n*M-N+M+u);switch(i==="smart"&&(o>=c-N&&o<=l+N?i="auto":i="center"),i){case"start":return l;case"end":return c;case"center":{var f=Math.round(c+(l-c)/2);return f<Math.ceil(N/2)?0:f>a+Math.floor(N/2)?a:f}case"auto":default:return o>=c&&o<=l?o:o<c?c:l}},getStartIndexForOffset:function(t,n){var i=t.itemCount,o=t.itemSize;return Math.max(0,Math.min(i-1,Math.floor(n/o)))},getStopIndexForStartIndex:function(t,n,i){var o=t.direction,m=t.height,u=t.itemCount,p=t.itemSize,d=t.layout,I=t.width,M=o==="horizontal"||d==="horizontal",T=n*p,j=M?I:m,v=Math.ceil((j+i-T)/p);return Math.max(0,Math.min(u-1,n+v-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});function Ns(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,i=e.startIndex,o=e.stopIndex;return!(i>n||o<t)}function Ts(e){for(var t=e.isItemLoaded,n=e.itemCount,i=e.minimumBatchSize,o=e.startIndex,m=e.stopIndex,u=[],p=null,d=null,I=o;I<=m;I++){var M=t(I);M?d!==null&&(u.push(p,d),p=d=null):(d=I,p===null&&(p=I))}if(d!==null){for(var T=Math.min(Math.max(d,p+i-1),n-1),j=d+1;j<=T&&!t(j);j++)d=j;u.push(p,d)}if(u.length)for(;u[1]-u[0]+1<i&&u[0]>0;){var v=u[0]-1;if(!t(v))u[0]=v;else break}return u}var As=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ss=function(){function e(t,n){for(var i=0;i<n.length;i++){var o=n[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),Ds=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},ce=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},zs=function(e){Ds(t,e);function t(){var n,i,o,m;As(this,t);for(var u=arguments.length,p=Array(u),d=0;d<u;d++)p[d]=arguments[d];return m=(i=(o=ce(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(p))),o),o._lastRenderedStartIndex=-1,o._lastRenderedStopIndex=-1,o._memoizedUnloadedRanges=[],o._onItemsRendered=function(I){var M=I.visibleStartIndex,T=I.visibleStopIndex;o._lastRenderedStartIndex=M,o._lastRenderedStopIndex=T,o._ensureRowsLoaded(M,T)},o._setRef=function(I){o._listRef=I},i),ce(o,m)}return Ss(t,[{key:"resetloadMoreItemsCache",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],i&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var i=this.props.children;return i({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(i,o){var m=this.props,u=m.isItemLoaded,p=m.itemCount,d=m.minimumBatchSize,I=d===void 0?10:d,M=m.threshold,T=M===void 0?15:M,j=Ts({isItemLoaded:u,itemCount:p,minimumBatchSize:I,startIndex:Math.max(0,i-T),stopIndex:Math.min(p-1,o+T)});(this._memoizedUnloadedRanges.length!==j.length||this._memoizedUnloadedRanges.some(function(v,N){return j[N]!==v}))&&(this._memoizedUnloadedRanges=j,this._loadUnloadedRanges(j))}},{key:"_loadUnloadedRanges",value:function(i){for(var o=this,m=this.props.loadMoreItems||this.props.loadMoreRows,u=function(I){var M=i[I],T=i[I+1],j=m(M,T);j!=null&&j.then(function(){if(Ns({lastRenderedStartIndex:o._lastRenderedStartIndex,lastRenderedStopIndex:o._lastRenderedStopIndex,startIndex:M,stopIndex:T})){if(o._listRef==null)return;typeof o._listRef.resetAfterIndex=="function"?o._listRef.resetAfterIndex(M,!0):(typeof o._listRef._getItemStyleCache=="function"&&o._listRef._getItemStyleCache(-1),o._listRef.forceUpdate())}})},p=0;p<i.length;p+=2)u(p)}}]),t}(S.PureComponent);const Os=r.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),_s=r.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),ks=r.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),Cs=r.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),bs=r.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),ws=r.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),Es=r.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),Ls=()=>r.i1,Rs=r.styled_default(Ls())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),$s=({rank:e,avatar:t,name:n,points:i,isCurrentUser:o,openItemDetail:m,style:u})=>s.jsxs(Os,{onClick:m,style:u,children:[s.jsx(_s,{children:e||0}),s.jsxs(bs,{children:[t?s.jsx(ks,{alt:"leaderboard-item-avatar",src:t}):s.jsx(Cs,{children:C.o(n||"")}),s.jsxs(ws,{children:[s.jsx(Es,{children:n||""}),o&&s.jsx(Rs,{name:"icon-star"})]})]}),s.jsx("div",{children:C.i(i)})]}),Qs=r.styled_default("div")({name:"ScrollContainer",class:"s13d8sg6",propsAsIs:!1}),Us=({items:e,currentUserId:t,openItemDetail:n,fetchMore:i})=>s.jsx(z.AutoSizer,{children:({width:o,height:m})=>s.jsx(zs,{isItemLoaded:u=>u<e.length,itemCount:e.length+1,loadMoreItems:i,children:({onItemsRendered:u,ref:p})=>s.jsx(Qs,{children:s.jsx(vs,{itemSize:56,onItemsRendered:u,ref:p,itemCount:e.length,width:o,height:m,children:({index:d,style:I})=>s.jsx($s,{style:{...I,maxHeight:48},...e[d],openItemDetail:()=>n(e[d].userId),isCurrentUser:!!t&&t===e[d].userId},e[d].userId)})})})}),qs=({deepLink:e})=>{const{data:t}=k.useStore(e.$store);return s.jsx(z.O,{inviteLink:t==null?void 0:t.url,socialLinks:[{icon:"icon-facebook",link:"https://www.facebook.com/TheMasters",label:"Facebook"},{icon:"icon-twitter",link:"https://twitter.com/@TheMasters",label:"X"}],inviteCardTitle:"It’s more fun with friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})},Ps=({gamification:e})=>{const{data:t}=k.useStore(e.leaderboardList.$store);return t!=null&&t.length?s.jsx(Us,{fetchMore:e.leaderboardList.fetchMore,items:t,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()}):s.jsx(qs,{deepLink:e.deepLink})},Ys=r.styled_default("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),Ws=r.styled_default("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),Fs=r.styled_default("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),Vs=r.styled_default("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),Bs=()=>r.i1,Q=r.styled_default(Bs())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),Hs=()=>r.i1,Zs=r.styled_default(Hs())({name:"QuestionTypeIcon",class:"qxlt78s",propsAsIs:!0}),Gs=r.styled_default("div")({name:"QuestionTypeLabel",class:"qmg0vkx",propsAsIs:!1}),Js=r.styled_default("div")({name:"QuestionContent",class:"q1uz5j1g",propsAsIs:!1}),Ks=r.styled_default("button")({name:"PlayButton",class:"p1pba9p1",propsAsIs:!1}),Xs={[g.PickHistoryStatus.LOST]:s.jsx(Q,{name:"icon-cross"}),[g.PickHistoryStatus.WON]:s.jsx(Q,{name:"icon-check"}),[g.PickHistoryStatus.UNSET]:s.jsx(Q,{name:"icon-arrow"}),[g.PickHistoryStatus.DNP]:s.jsx(Q,{name:"icon-arrow"})},en=({questionId:e,questionType:t,questionStatus:n,subject:i,openForVoting:o,openQuestion:m,status:u})=>{const p=z.o[t],d=Xs[u];return p?s.jsxs(Ys,{onClick:()=>m==null?void 0:m(e),children:[s.jsxs(Js,{children:[s.jsxs(Ws,{children:[s.jsx(Zs,{name:p.iconName}),s.jsxs(Gs,{children:[p.label,t===g.QuestionType.TRIVIA&&n===g.QuestionStatus.RESOLVED&&" • Expired"]})]}),s.jsx(Fs,{children:i||""})]}),s.jsx(Vs,{children:o?s.jsx(Ks,{children:"Play"}):d})]}):null},tn=r.styled_default("div")({name:"Container",class:"cll3md7",propsAsIs:!1}),sn=r.styled_default("button")({name:"ActionBtn",class:"a10g1iik",propsAsIs:!1}),nn=({openInsight:e,questionId:t,...n})=>s.jsxs(tn,{children:[s.jsx(Ie,{questionId:t,...n}),e&&s.jsx(sn,{onClick:()=>e(t),children:"View Insight"})]}),rn=r.styled_default("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),on=({questions:e,openQuestion:t})=>s.jsx(rn,{children:e==null?void 0:e.map(n=>{var i,o;if(n.type==="question"&&((i=n.attributes)==null?void 0:i.attributes.case)==="question"){const m=n.attributes.attributes.value;return s.jsx(en,{openQuestion:t,...m},m.questionId)}if(n.type==="insight"&&((o=n.attributes)==null?void 0:o.attributes.case)==="insight"){const m=n.attributes.attributes.value;return s.jsx(nn,{openInsight:t,...m},m.questionId)}return null})}),an=({store:e,openQuestion:t})=>{const n=k.useStore(e);return n!=null&&n.data?s.jsx(on,{openQuestion:t,questions:n.data}):s.jsx("div",{children:"wait questions..."})},ln=({userSummary:e})=>{var t,n;const i=k.useStore(e.getStore());return(t=i.data)!=null&&t.summary?s.jsx(pe,{...i.data.summary,successRate:(n=i.data.percentage)==null?void 0:n.correct}):s.jsx("div",{children:"wait user..."})},cn=({gamification:e})=>{const[t,n]=S.useState(U.HOME);return s.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(z.a,{style:{paddingBottom:"4px"},children:s.jsx(ps,{activePage:t,toggleActivePage:n})}),t===U.HOME&&s.jsxs(z.r,{children:[s.jsx(z.a,{style:{paddingTop:"12px"},children:s.jsx(ln,{userSummary:e.userSummary})}),s.jsx(z.n,{children:s.jsx(an,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),t===U.LEADERBOARD&&s.jsx("div",{className:"c1bp9dj2",children:s.jsx(Ps,{gamification:e})})]})},dn=()=>z.d,de=r.styled_default(dn())({name:"OpenedContainer",class:"oar61gl",propsAsIs:!0}),un=r.styled_default("div")({name:"UserContainer",class:"u14zaal4",propsAsIs:!1}),pn=({correct:e,incorrect:t})=>{const n=e+t;return n===0?0:Math.round(e/n*100)},mn=({gamification:e,className:t})=>{const n=k.useStore(e.openedQuestion.$store),i=k.useStore(e.openedUser);return s.jsxs(s.Fragment,{children:[n&&s.jsx(de,{className:t,children:s.jsx(as,{gamification:e})}),i&&s.jsx(de,{className:t,children:s.jsxs(un,{children:[s.jsx(ue,{label:"Friend's Rank",close:e.closeUser}),s.jsx(z.a,{children:s.jsx(pe,{...i,successRate:pn(i)})})]})}),s.jsx(z.r,{className:t,"data-nav":"true",children:s.jsx(cn,{gamification:e})})]})};exports.default=mn;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("./masters.js"),T=require("react"),Te=n.styled_default("div")({name:"Container",class:"c1vwopgc",propsAsIs:!1}),Ne=n.styled_default("div")({name:"QuestionTypeWrap",class:"qyktpt0",propsAsIs:!1}),Ae=()=>n.i1,Se=n.styled_default(Ae())({name:"QuestionTypeIcon",class:"q951jdx",propsAsIs:!0}),De=n.styled_default("span")({name:"QuestionTypeTitle",class:"qss5f0e",propsAsIs:!1}),ze=n.styled_default("button")({name:"CloseButton",class:"c1ao1jtv",propsAsIs:!1}),ke=()=>n.i1,Oe=n.styled_default(ke())({name:"CloseIcon",class:"cvsl7l3",propsAsIs:!0}),ce=({type:e,close:t,label:i})=>{const r=e?n.o[e]:{label:i,iconName:void 0};return s.jsxs(Te,{children:[s.jsxs(Ne,{children:[(r==null?void 0:r.iconName)&&s.jsx(Se,{name:r.iconName}),(r==null?void 0:r.label)&&s.jsx(De,{children:r.label})]}),s.jsx(ze,{onClick:t,children:s.jsx(Oe,{name:"icon-cross"})})]})},we=n.styled_default("div")({name:"Container",class:"c1zy8a",propsAsIs:!1}),_e=n.styled_default("div")({name:"Title",class:"t1vih9p5",propsAsIs:!1}),Ce=n.styled_default("div")({name:"Indicator",class:"i1fbnvpb",propsAsIs:!1}),V=({indicator:e,title:t})=>s.jsxs(we,{children:[s.jsx(_e,{children:t}),s.jsx(Ce,{children:e})]}),be=n.styled_default("div")({name:"Container",class:"ctmhwyc",propsAsIs:!1}),Ee=n.styled_default("div")({name:"Indicator",class:"i1jri200",propsAsIs:!1}),$e=n.styled_default("div")({name:"Title",class:"t8s05oq",propsAsIs:!1}),C=({indicator:e,title:t})=>s.jsxs(be,{children:[s.jsx(Ee,{children:e}),s.jsx($e,{children:t})]}),Le=n.styled_default("div")({name:"Container",class:"c1yrpn9o",propsAsIs:!1}),Re=n.styled_default("div")({name:"TopInfo",class:"t17fwahh",propsAsIs:!1}),Qe=n.styled_default("div")({name:"BottomInfo",class:"by6w7e9",propsAsIs:!1}),Ue=n.styled_default("div")({name:"User",class:"u1g7arbm",propsAsIs:!1}),qe=n.styled_default("img")({name:"Avatar",class:"a1ldeata",propsAsIs:!1}),Pe=n.styled_default("div")({name:"UserInfo",class:"u10d4koz",propsAsIs:!1}),Ye=n.styled_default("div")({name:"UserName",class:"u1q6roj0",propsAsIs:!1}),We=n.styled_default("div")({name:"UserRating",class:"ui0m425",propsAsIs:!1}),Fe=n.styled_default("img")({name:"TrophyIcon",class:"t1el3mrn",propsAsIs:!1}),Ve=n.styled_default("div")({name:"Rts",class:"r2vgnxv",propsAsIs:!1}),Be=n.styled_default("div")({name:"RtsIndicator",class:"roqn06j",propsAsIs:!1}),He=n.styled_default("div")({name:"RtsLabel",class:"r15adx7c",propsAsIs:!1}),Ge=n.styled_default("div")({name:"Divider",class:"dv59lta",propsAsIs:!1}),Ze=n.styled_default("div")({name:"Ranks",class:"r55lotb",propsAsIs:!1}),Je=n.styled_default("div")({name:"Statistics",class:"s1knfgqt",propsAsIs:!1}),Ke=n.styled_default("div")({name:"AvatarPlaceholder",class:"a1mqo824",propsAsIs:!1}),Xe=n.styled_default("button")({name:"UserAccountBtn",class:"uxareh6",propsAsIs:!1}),et="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1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go8L2c+Cjwvc3ZnPgo=",de=({avatar:e,name:t,points:i,friendsRank:r,rank:a,streak:c,correct:l,incorrect:m,inTop:d,successRate:h})=>s.jsxs(Le,{children:[s.jsx(Re,{children:s.jsxs(Ue,{children:[s.jsxs(Xe,{children:[e&&s.jsx(qe,{alt:"avatar",src:e}),!e&&s.jsx(Ke,{children:n.o$1(t||"")})]}),s.jsxs(Pe,{children:[s.jsx(Ye,{children:t}),s.jsxs(We,{children:[s.jsxs(Ve,{children:[s.jsx(Fe,{alt:"rank-icon",src:et}),s.jsxs(Be,{children:[n.i(i),s.jsx(He,{children:"PTS"})]})]}),s.jsx(Ge,{}),s.jsxs("div",{children:["TOP ",d||0,"%"]})]})]})]})}),s.jsxs(Qe,{children:[s.jsxs(Ze,{children:[s.jsx(V,{indicator:r||0,title:"Friends rank"}),s.jsx(V,{indicator:a||0,title:"Global rank"})]}),s.jsxs(Je,{children:[s.jsx(C,{indicator:c||0,title:"Win streak"}),s.jsx(C,{indicator:l||0,title:"Correct"}),s.jsx(C,{indicator:m||0,title:"Incorrect"}),s.jsx(C,{indicator:`${h||0}%`,title:"Succ. rate"})]})]})]}),tt=n.styled_default("div")({name:"Container",class:"c38csyt",propsAsIs:!1}),st=n.styled_default("div")({name:"Title",class:"ty221rx",propsAsIs:!1}),nt=n.styled_default("div")({name:"Description",class:"dlaj9xp",propsAsIs:!1}),it=({title:e,description:t})=>s.jsxs(tt,{children:[s.jsx(n.i1,{name:"icon-check-circle"}),s.jsx(st,{children:e}),s.jsx(nt,{children:t})]}),rt=n.styled_default("div")({name:"Container",class:"c16sbdnm",propsAsIs:!1}),at=()=>n.i1,ot=n.styled_default(at())({name:"IconPrediction",class:"ibhorgl",propsAsIs:!0}),B=n.styled_default("div")({name:"FeedbackIconWrap",class:"f1g20ja7",propsAsIs:!1}),H=n.styled_default("div")({name:"FeedbackHeader",class:"f455ozj",propsAsIs:!1}),lt=n.styled_default("span")({name:"FeedbackTitle",class:"f1913njx",propsAsIs:!1}),L=n.styled_default("span")({name:"FeedbackDescription",class:"fzfk69z",propsAsIs:!1}),ct=n.styled_default("div")({name:"FeedbackText",class:"fx87qaj",propsAsIs:!1}),dt=({feedbackMessages:e,questionVotedCorrectly:t,questionVoted:i,questionType:r,hasCorrectAnswer:a,questionStatus:c})=>{const l=i&&(r===n.QuestionType.TRIVIA||r===n.QuestionType.PREDICTION);if(!l&&c!==n.QuestionStatus.RESOLVED)return null;const m=r===n.QuestionType.PREDICTION&&!a,d=t?"correct":"incorrect",h=t?e.correctFeedback:e.incorrectFeedback;return s.jsxs(rt,{"data-isPrediction":m,children:[c===n.QuestionStatus.RESOLVED&&r===n.QuestionType.TRIVIA&&!i&&s.jsxs(s.Fragment,{children:[s.jsx(B,{children:s.jsx(n.i1,{name:"questionExpired"})}),s.jsxs("div",{children:[s.jsx(H,{children:s.jsx(L,{children:"Question Expired"})}),s.jsx(ct,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),l&&m&&s.jsxs(s.Fragment,{children:[s.jsx(ot,{name:"icon-prediction"}),s.jsx(L,{children:"Stay tuned to see if your prediction was correct."})]}),l&&a&&s.jsxs(s.Fragment,{children:[s.jsx(B,{"data-feedbackType":d,children:s.jsx(n.i1,{name:d})}),s.jsx("div",{children:s.jsxs(H,{children:[s.jsx(lt,{"data-feedbackType":d,children:h==null?void 0:h.title}),s.jsx(L,{children:h==null?void 0:h.description})]})})]})]})},ut=n.styled_default("div")({name:"Container",class:"c14ielyq",propsAsIs:!1}),pt=n.styled_default("div")({name:"Content",class:"c1tlqx57",propsAsIs:!1}),mt=n.styled_default("div")({name:"Title",class:"t1hq58md",propsAsIs:!1}),ft=n.styled_default("div")({name:"Options",class:"o1c8nxcx",propsAsIs:!1}),ht=n.styled_default("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),It=n.styled_default("div")({name:"ButtonPct",class:"b4iik8i",propsAsIs:!1}),yt=n.styled_default("span")({name:"ButtonBody",class:"b1gq1lnf",propsAsIs:!1}),gt=n.styled_default("div")({name:"IconContainer",class:"i1j65z51",propsAsIs:!1}),xt=n.styled_default("div")({name:"IconWrap",class:"i19tpfua",propsAsIs:!1}),ue=n.styled_default("img")({name:"Icon",class:"i1tubmma",propsAsIs:!1}),jt=()=>ue,Mt=n.styled_default(jt())({name:"IconDefault",class:"i1grrgwj",propsAsIs:!0}),vt=()=>ue,Tt=n.styled_default(vt())({name:"IconCircle",class:"ibemyq8",propsAsIs:!0}),Nt=n.styled_default("span")({name:"Title",class:"t1dceht",propsAsIs:!1}),At=n.styled_default("span")({name:"Indicators",class:"i116q4vq",propsAsIs:!1}),St=n.styled_default("span")({name:"Percentage",class:"p17ajcu2",propsAsIs:!1}),Dt=()=>n.i1,zt=n.styled_default(Dt())({name:"CheckIcon",class:"cu9kmlb",propsAsIs:!0}),G={[n.QuestionImages.CENTERED]:e=>s.jsx(Mt,{alt:"option-icon",src:e}),[n.QuestionImages.TRANSPARENT]:e=>s.jsx(gt,{children:s.jsx(xt,{style:{backgroundImage:`url(${e})`}})}),[n.QuestionImages.ROUNDED]:e=>s.jsx(Tt,{alt:"option-icon",src:e}),[n.QuestionImages.NONE]:()=>null,[n.QuestionImages.UNSET]:()=>null},kt=({questionType:e,hasCorrectAnswer:t,correct:i,youVoted:r,questionVoted:a})=>{if(e===n.QuestionType.POLL&&r)return"correct";if(e===n.QuestionType.PREDICTION){if(t&&a)return r?i?"correct":"incorrect":i?"correct":"unset";if(r)return"correct"}return e===n.QuestionType.TRIVIA&&a?r?i?"correct":"incorrect":i?"correct":"unset":"unset"},Ot=({questionType:e,questionVoted:t,correct:i,hasCorrectAnswer:r,questionStatus:a})=>e===n.QuestionType.TRIVIA?t&&i:e===n.QuestionType.PREDICTION?t&&i&&r||a===n.QuestionStatus.RESOLVED&&i:!1,wt=e=>{var t;const{id:i,icon:r,text:a,percentageDecimal:c,onVote:l,youSelected:m,questionVoted:d,imageMode:h,answerTimeExpired:M,questionStatus:g,isLoading:I,questionType:v,correct:N,hasCorrectAnswer:o}=e,u=kt(e),p=Ot({questionType:v,questionVoted:d,correct:N,hasCorrectAnswer:o,questionStatus:g}),f=d||g===n.QuestionStatus.RESOLVED&&v===n.QuestionType.PREDICTION;return s.jsxs(ht,{value:i,"data-selected":m,"data-answerState":u,disabled:d||I||M,onClick:l,children:[f&&s.jsx(It,{"data-answerState":u,style:{width:`${c}%`}}),s.jsxs(yt,{children:[r&&h&&((t=G[h])==null?void 0:t.call(G,r)),s.jsx(Nt,{children:a}),f&&s.jsxs(At,{children:[p&&s.jsx(zt,{name:"selected"}),s.jsxs(St,{children:[c,"%"]})]})]})]})};var Z=typeof window>"u"?T.useEffect:T.useLayoutEffect,_t=({isPlaying:e,duration:t,startAt:i=0,updateInterval:r=0,onComplete:a,onUpdate:c})=>{let[l,m]=T.useState(i),d=T.useRef(0),h=T.useRef(i),M=T.useRef(i*-1e3),g=T.useRef(null),I=T.useRef(null),v=T.useRef(null),N=p=>{let f=p/1e3;if(I.current===null){I.current=f,g.current=requestAnimationFrame(N);return}let y=f-I.current,j=d.current+y;I.current=f,d.current=j;let x=h.current+(r===0?j:(j/r|0)*r),A=h.current+j,S=typeof t=="number"&&A>=t;m(S?t:x),S||(g.current=requestAnimationFrame(N))},o=()=>{g.current&&cancelAnimationFrame(g.current),v.current&&clearTimeout(v.current),I.current=null},u=T.useCallback(p=>{o(),d.current=0;let f=typeof p=="number"?p:i;h.current=f,m(f),e&&(g.current=requestAnimationFrame(N))},[e,i]);return Z(()=>{if(c==null||c(l),t&&l>=t){M.current+=t*1e3;let{shouldRepeat:p=!1,delay:f=0,newStartAt:y}=(a==null?void 0:a(M.current/1e3))||{};p&&(v.current=setTimeout(()=>u(y),f*1e3))}},[l,t]),Z(()=>(e&&(g.current=requestAnimationFrame(N)),o),[e,t,r]),{elapsedTime:l,reset:u}},Ct=(e,t,i)=>{let r=e/2,a=t/2,c=r-a,l=2*c,m=i==="clockwise"?"1,0":"0,1",d=2*Math.PI*c;return{path:`m ${r},${a} a ${c},${c} 0 ${m} 0,${l} a ${c},${c} 0 ${m} 0,-${l}`,pathLength:d}},J=(e,t)=>e===0||e===t?0:typeof t=="number"?e-t:0,bt=e=>({position:"relative",width:e,height:e}),Et={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},pe=(e,t,i,r,a)=>{if(r===0)return t;let c=(a?r-e:e)/r;return t+i*c},K=e=>{var t,i;return(i=(t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(r,a,c,l)=>`#${a}${a}${c}${c}${l}${l}`).substring(1).match(/.{2}/g))==null?void 0:t.map(r=>parseInt(r,16)))!=null?i:[]},$t=(e,t)=>{var i;let{colors:r,colorsTime:a,isSmoothColorTransition:c=!0}=e;if(typeof r=="string")return r;let l=(i=a==null?void 0:a.findIndex((I,v)=>I>=t&&t>=a[v+1]))!=null?i:-1;if(!a||l===-1)return r[0];if(!c)return r[l];let m=a[l]-t,d=a[l]-a[l+1],h=K(r[l]),M=K(r[l+1]),g=!!e.isGrowing;return`rgb(${h.map((I,v)=>pe(m,I,M[v]-I,d,g)|0).join(",")})`},Lt=e=>{let{duration:t,initialRemainingTime:i,updateInterval:r,size:a=180,strokeWidth:c=12,trailStrokeWidth:l,isPlaying:m=!1,isGrowing:d=!1,rotation:h="clockwise",onComplete:M,onUpdate:g}=e,I=T.useRef(),v=Math.max(c,l??0),{path:N,pathLength:o}=Ct(a,v,h),{elapsedTime:u}=_t({isPlaying:m,duration:t,startAt:J(t,i),updateInterval:r,onUpdate:typeof g=="function"?f=>{let y=Math.ceil(t-f);y!==I.current&&(I.current=y,g(y))}:void 0,onComplete:typeof M=="function"?f=>{var y;let{shouldRepeat:j,delay:x,newInitialRemainingTime:A}=(y=M(f))!=null?y:{};if(j)return{shouldRepeat:j,delay:x,newStartAt:J(t,A)}}:void 0}),p=t-u;return{elapsedTime:u,path:N,pathLength:o,remainingTime:Math.ceil(p),rotation:h,size:a,stroke:$t(e,p),strokeDashoffset:pe(u,0,o,t,d),strokeWidth:c}},me=e=>{let{children:t,strokeLinecap:i,trailColor:r,trailStrokeWidth:a}=e,{path:c,pathLength:l,stroke:m,strokeDashoffset:d,remainingTime:h,elapsedTime:M,size:g,strokeWidth:I}=Lt(e);return T.createElement("div",{style:bt(g)},T.createElement("svg",{viewBox:`0 0 ${g} ${g}`,width:g,height:g,xmlns:"http://www.w3.org/2000/svg"},T.createElement("path",{d:c,fill:"none",stroke:r??"#d9d9d9",strokeWidth:a??I}),T.createElement("path",{d:c,fill:"none",stroke:m,strokeLinecap:i??"round",strokeWidth:I,strokeDasharray:l,strokeDashoffset:d})),typeof t=="function"&&T.createElement("div",{style:Et},t({remainingTime:h,elapsedTime:M,color:m})))};me.displayName="CountdownCircleTimer";const Rt=[n.E.PRIMARY_GREEN1,n.E.SECONDARY_RED1,n.E.SECONDARY_RED1],Qt=[10,10,0],Ut=n.styled_default("div")({name:"RemainingTime",class:"r165427",propsAsIs:!1}),qt=n.E.SECONDARY_GREEN6,X=n.E.SECONDARY_RED3,Pt=n.E.NEUTRALS_GRAY3,Yt=({isPlaying:e=!0,duration:t=30,onTimerExpired:i})=>{const[r,a]=T.useState(t>10?qt:X),c=({remainingTime:d})=>s.jsx(Ut,{children:d}),l=T.useCallback(()=>{i==null||i(),a(Pt)},[i,a]),m=T.useCallback(d=>{d===10&&a(X)},[a]);return s.jsx(me,{isPlaying:e,duration:t,colors:Rt,colorsTime:Qt,size:32,strokeWidth:2,trailStrokeWidth:2,trailColor:r,onComplete:l,onUpdate:m,children:c})},Wt=n.styled_default("div")({name:"WinBarContainer",class:"wie6cqo",propsAsIs:!1}),Ft=n.styled_default("div")({name:"Content",class:"cgizw4u",propsAsIs:!1}),Vt=n.styled_default("div")({name:"Title",class:"t1l3ucjp",propsAsIs:!1}),Bt=()=>n.i1,Ht=n.styled_default(Bt())({name:"WinIcon",class:"wx7j799",propsAsIs:!0}),Gt=n.styled_default("div")({name:"Points",class:"p4lwuj0",propsAsIs:!1}),Zt=n.styled_default("span")({name:"PointsCount",class:"po9i64o",propsAsIs:!1}),Jt=n.styled_default("span")({name:"PointsUnits",class:"pe5g05h",propsAsIs:!1}),Kt=({title:e,points:t,isPlayingTimer:i,isTimer:r,onTimerExpired:a})=>s.jsxs(Wt,{children:[s.jsxs(Ft,{children:[e&&s.jsx(Vt,{children:e}),t!==void 0&&s.jsxs(s.Fragment,{children:[s.jsx(Ht,{name:"icon-trophy"}),s.jsxs(Gt,{children:[s.jsx(Zt,{children:t}),s.jsx(Jt,{children:"PTS"})]})]})]}),r&&s.jsx(Yt,{isPlaying:i,onTimerExpired:a})]}),Xt=({openedQuestion:e,vote:t,close:i})=>{var r;const a=e.subject,c=e.type,l=(r=e.options)==null?void 0:r.options,[m,d]=T.useState(!1),[h,M]=T.useState(!1),[g,I]=T.useState(""),v=e==null?void 0:e.id,N=T.useCallback(async j=>{if(v){const x=j.currentTarget.value;I(x),M(!0),await t(v,x),M(!1)}},[v,I,t]),o=T.useCallback(()=>{d(!0),setTimeout(i,3e3)},[i]),u=T.useMemo(()=>e==null?void 0:e.answers.find(j=>j.youVoted===!0),[e]),p=T.useMemo(()=>!!(e!=null&&e.answers.find(j=>j.correct===!0)),[e]),f=T.useMemo(()=>e?e.answers.map(j=>{var x;return{...j,questionVoted:!!u,youSelected:g===j.id,isLoading:h,hasCorrectAnswer:p,questionType:e.type,answerTimeExpired:m,questionStatus:e.status,imageMode:(x=e.appearance)==null?void 0:x.images,onVote:N}}):[],[p,m,h,e,u,N,g]),y=l&&(l.case==="trivia"||l.case==="prediction")?l.value:void 0;return s.jsx(n.r,{"data-question-header":"true",children:s.jsx(ut,{children:s.jsxs(pt,{children:[y&&s.jsx(dt,{feedbackMessages:y,questionVoted:!!u,questionVotedCorrectly:u==null?void 0:u.correct,questionType:c,hasCorrectAnswer:p,questionStatus:e.status}),s.jsx(Kt,{title:m?"Time expired":"To win",points:m?void 0:100,onTimerExpired:o,isTimer:!0}),m?s.jsx(it,{title:"More to come...",description:"Watch for additional enhanced stream interactive experience."}):s.jsxs(s.Fragment,{children:[s.jsx(mt,{children:a}),s.jsx(ft,{children:f.map(j=>s.jsx(wt,{...j},j.id))})]})]})})})},es=n.styled_default("div")({name:"Container",class:"cgn5uen",propsAsIs:!1}),ts=n.styled_default("div")({name:"Content",class:"c1px8nt6",propsAsIs:!1}),ss=n.styled_default("h3")({name:"Title",class:"t5et2jt",propsAsIs:!1}),ns=n.styled_default("div")({name:"Description",class:"d1i2kpk2",propsAsIs:!1}),is=n.styled_default("div")({name:"DateWrap",class:"dd3lh3p",propsAsIs:!1}),rs=n.styled_default("img")({name:"Image",class:"i1gfjeu5",propsAsIs:!1}),fe=({created:e,image:t,title:i,instantView:r})=>{const a=T.useMemo(()=>{if(e){const l=new Date(e);if(n.r$1(l))return{date:n.a(l),time:n.n(l)}}return null},[e]),c=(r==null?void 0:r.image)||t;return s.jsxs(es,{children:[a&&s.jsxs(is,{children:[a.date," · ",a.time]}),(r==null?void 0:r.video)&&s.jsx(n.w,{source:r.video.url,poster:r.video.thumbnailUrl}),c&&s.jsx(rs,{src:c}),s.jsxs(ts,{children:[s.jsx(ss,{children:(r==null?void 0:r.heading)||i}),s.jsx(ns,{children:r==null?void 0:r.body})]})]})},as=n.styled_default("div")({name:"Container",class:"c1euiow",propsAsIs:!1}),os=n.styled_default("a")({name:"WebLinkBtn",class:"w19zie3h",propsAsIs:!1}),ls=({instantView:e,...t})=>s.jsxs(as,{children:[s.jsx(fe,{instantView:e,...t}),(e==null?void 0:e.webLink)&&s.jsxs(os,{href:e==null?void 0:e.webLink.url,target:"_blank",children:["Explore more of the Masters History",s.jsx(n.i1,{name:"icon-external-link"})]})]}),cs=n.styled_default("div")({name:"QuestionContainer",class:"qdri6g3",propsAsIs:!1}),ds=({openedQuestion:e})=>{var t;return((t=e==null?void 0:e.attributes)==null?void 0:t.attributes.case)==="insight"?s.jsx(ls,{created:e.attributes.created,...e.attributes.attributes.value}):null},us=({extendedQuestion:e,vote:t,close:i})=>{const{loading:r,data:a}=e;return!r&&a?s.jsx(Xt,{vote:t,close:i,openedQuestion:a}):null},ps=({gamification:e})=>{var t;const i=n.useStore(e.openedQuestion.$store),r=n.useStore(e.openedQuestion.$extendedStore);if(!i)return null;const a=i.type;return s.jsxs(cs,{children:[s.jsx(ce,{close:e.closeQuestion,type:((t=i.attributes)==null?void 0:t.type)||n.QuestionType.UNSET}),a==="question"&&s.jsx(us,{vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:r}),a!=="question"&&s.jsx(ds,{openedQuestion:i})]})},ms=n.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),fs=n.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),hs=n.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),Is=n.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var E=(e=>(e.HOME="home",e.LEADERBOARD="leaderboard",e))(E||{});const ee=({title:e,active:t,onClick:i})=>s.jsx(hs,{onClick:i,"data-selected":t,children:s.jsx(Is,{children:e})}),ys=({activePage:e="home",toggleActivePage:t})=>s.jsx(ms,{children:s.jsxs(fs,{"data-position":e==="home"?"left":"right",children:[s.jsx(ee,{title:"Home",active:e==="home",onClick:()=>t("home")}),s.jsx(ee,{title:"Leader Board",active:e==="leaderboard",onClick:()=>t("leaderboard")})]})});function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},U.apply(this,arguments)}function te(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},q(e,t)}function gs(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,q(e,t)}var se=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function xs(e,t){return!!(e===t||se(e)&&se(t))}function js(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!xs(e[i],t[i]))return!1;return!0}function R(e,t){t===void 0&&(t=js);var i,r=[],a,c=!1;function l(){for(var m=[],d=0;d<arguments.length;d++)m[d]=arguments[d];return c&&i===this&&t(m,r)||(a=e.apply(this,m),c=!0,i=this,r=m),a}return l}var Ms=typeof performance=="object"&&typeof performance.now=="function",ne=Ms?function(){return performance.now()}:function(){return Date.now()};function ie(e){cancelAnimationFrame(e.id)}function vs(e,t){var i=ne();function r(){ne()-i>=t?e.call(null):a.id=requestAnimationFrame(r)}var a={id:requestAnimationFrame(r)};return a}var Q=-1;function re(e){if(e===void 0&&(e=!1),Q===-1||e){var t=document.createElement("div"),i=t.style;i.width="50px",i.height="50px",i.overflow="scroll",document.body.appendChild(t),Q=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Q}var k=null;function ae(e){if(e===void 0&&(e=!1),k===null||e){var t=document.createElement("div"),i=t.style;i.width="50px",i.height="50px",i.overflow="scroll",i.direction="rtl";var r=document.createElement("div"),a=r.style;return a.width="100px",a.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?k="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?k="negative":k="positive-ascending"),document.body.removeChild(t),k}return k}var Ts=150,Ns=function(t,i){return t};function As(e){var t,i=e.getItemOffset,r=e.getEstimatedTotalSize,a=e.getItemSize,c=e.getOffsetForIndexAndAlignment,l=e.getStartIndexForOffset,m=e.getStopIndexForStartIndex,d=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,M=e.validateProps;return t=function(g){gs(I,g);function I(N){var o;return o=g.call(this,N)||this,o._instanceProps=d(o.props,te(o)),o._outerRef=void 0,o._resetIsScrollingTimeoutId=null,o.state={instance:te(o),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof o.props.initialScrollOffset=="number"?o.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},o._callOnItemsRendered=void 0,o._callOnItemsRendered=R(function(u,p,f,y){return o.props.onItemsRendered({overscanStartIndex:u,overscanStopIndex:p,visibleStartIndex:f,visibleStopIndex:y})}),o._callOnScroll=void 0,o._callOnScroll=R(function(u,p,f){return o.props.onScroll({scrollDirection:u,scrollOffset:p,scrollUpdateWasRequested:f})}),o._getItemStyle=void 0,o._getItemStyle=function(u){var p=o.props,f=p.direction,y=p.itemSize,j=p.layout,x=o._getItemStyleCache(h&&y,h&&j,h&&f),A;if(x.hasOwnProperty(u))A=x[u];else{var S=i(o.props,u,o._instanceProps),D=a(o.props,u,o._instanceProps),z=f==="horizontal"||j==="horizontal",w=f==="rtl",_=z?S:0;x[u]=A={position:"absolute",left:w?void 0:_,right:w?_:void 0,top:z?0:S,height:z?"100%":D,width:z?D:"100%"}}return A},o._getItemStyleCache=void 0,o._getItemStyleCache=R(function(u,p,f){return{}}),o._onScrollHorizontal=function(u){var p=u.currentTarget,f=p.clientWidth,y=p.scrollLeft,j=p.scrollWidth;o.setState(function(x){if(x.scrollOffset===y)return null;var A=o.props.direction,S=y;if(A==="rtl")switch(ae()){case"negative":S=-y;break;case"positive-descending":S=j-f-y;break}return S=Math.max(0,Math.min(S,j-f)),{isScrolling:!0,scrollDirection:x.scrollOffset<y?"forward":"backward",scrollOffset:S,scrollUpdateWasRequested:!1}},o._resetIsScrollingDebounced)},o._onScrollVertical=function(u){var p=u.currentTarget,f=p.clientHeight,y=p.scrollHeight,j=p.scrollTop;o.setState(function(x){if(x.scrollOffset===j)return null;var A=Math.max(0,Math.min(j,y-f));return{isScrolling:!0,scrollDirection:x.scrollOffset<A?"forward":"backward",scrollOffset:A,scrollUpdateWasRequested:!1}},o._resetIsScrollingDebounced)},o._outerRefSetter=function(u){var p=o.props.outerRef;o._outerRef=u,typeof p=="function"?p(u):p!=null&&typeof p=="object"&&p.hasOwnProperty("current")&&(p.current=u)},o._resetIsScrollingDebounced=function(){o._resetIsScrollingTimeoutId!==null&&ie(o._resetIsScrollingTimeoutId),o._resetIsScrollingTimeoutId=vs(o._resetIsScrolling,Ts)},o._resetIsScrolling=function(){o._resetIsScrollingTimeoutId=null,o.setState({isScrolling:!1},function(){o._getItemStyleCache(-1,null)})},o}I.getDerivedStateFromProps=function(o,u){return Ss(o,u),M(o),null};var v=I.prototype;return v.scrollTo=function(o){o=Math.max(0,o),this.setState(function(u){return u.scrollOffset===o?null:{scrollDirection:u.scrollOffset<o?"forward":"backward",scrollOffset:o,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},v.scrollToItem=function(o,u){u===void 0&&(u="auto");var p=this.props,f=p.itemCount,y=p.layout,j=this.state.scrollOffset;o=Math.max(0,Math.min(o,f-1));var x=0;if(this._outerRef){var A=this._outerRef;y==="vertical"?x=A.scrollWidth>A.clientWidth?re():0:x=A.scrollHeight>A.clientHeight?re():0}this.scrollTo(c(this.props,o,u,j,this._instanceProps,x))},v.componentDidMount=function(){var o=this.props,u=o.direction,p=o.initialScrollOffset,f=o.layout;if(typeof p=="number"&&this._outerRef!=null){var y=this._outerRef;u==="horizontal"||f==="horizontal"?y.scrollLeft=p:y.scrollTop=p}this._callPropsCallbacks()},v.componentDidUpdate=function(){var o=this.props,u=o.direction,p=o.layout,f=this.state,y=f.scrollOffset,j=f.scrollUpdateWasRequested;if(j&&this._outerRef!=null){var x=this._outerRef;if(u==="horizontal"||p==="horizontal")if(u==="rtl")switch(ae()){case"negative":x.scrollLeft=-y;break;case"positive-ascending":x.scrollLeft=y;break;default:var A=x.clientWidth,S=x.scrollWidth;x.scrollLeft=S-A-y;break}else x.scrollLeft=y;else x.scrollTop=y}this._callPropsCallbacks()},v.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ie(this._resetIsScrollingTimeoutId)},v.render=function(){var o=this.props,u=o.children,p=o.className,f=o.direction,y=o.height,j=o.innerRef,x=o.innerElementType,A=o.innerTagName,S=o.itemCount,D=o.itemData,z=o.itemKey,w=z===void 0?Ns:z,_=o.layout,he=o.outerElementType,Ie=o.outerTagName,ye=o.style,ge=o.useIsScrolling,xe=o.width,P=this.state.isScrolling,$=f==="horizontal"||_==="horizontal",je=$?this._onScrollHorizontal:this._onScrollVertical,Y=this._getRangeToRender(),Me=Y[0],ve=Y[1],W=[];if(S>0)for(var O=Me;O<=ve;O++)W.push(T.createElement(u,{data:D,key:w(O,D),index:O,isScrolling:ge?P:void 0,style:this._getItemStyle(O)}));var F=r(this.props,this._instanceProps);return T.createElement(he||Ie||"div",{className:p,onScroll:je,ref:this._outerRefSetter,style:U({position:"relative",height:y,width:xe,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:f},ye)},T.createElement(x||A||"div",{children:W,ref:j,style:{height:$?"100%":F,pointerEvents:P?"none":void 0,width:$?F:"100%"}}))},v._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var o=this.props.itemCount;if(o>0){var u=this._getRangeToRender(),p=u[0],f=u[1],y=u[2],j=u[3];this._callOnItemsRendered(p,f,y,j)}}if(typeof this.props.onScroll=="function"){var x=this.state,A=x.scrollDirection,S=x.scrollOffset,D=x.scrollUpdateWasRequested;this._callOnScroll(A,S,D)}},v._getRangeToRender=function(){var o=this.props,u=o.itemCount,p=o.overscanCount,f=this.state,y=f.isScrolling,j=f.scrollDirection,x=f.scrollOffset;if(u===0)return[0,0,0,0];var A=l(this.props,x,this._instanceProps),S=m(this.props,A,x,this._instanceProps),D=!y||j==="backward"?Math.max(1,p):1,z=!y||j==="forward"?Math.max(1,p):1;return[Math.max(0,A-D),Math.max(0,Math.min(u-1,S+z)),A,S]},I}(T.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Ss=function(t,i){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,i.instance},Ds=As({getItemOffset:function(t,i){var r=t.itemSize;return i*r},getItemSize:function(t,i){var r=t.itemSize;return r},getEstimatedTotalSize:function(t){var i=t.itemCount,r=t.itemSize;return r*i},getOffsetForIndexAndAlignment:function(t,i,r,a,c,l){var m=t.direction,d=t.height,h=t.itemCount,M=t.itemSize,g=t.layout,I=t.width,v=m==="horizontal"||g==="horizontal",N=v?I:d,o=Math.max(0,h*M-N),u=Math.min(o,i*M),p=Math.max(0,i*M-N+M+l);switch(r==="smart"&&(a>=p-N&&a<=u+N?r="auto":r="center"),r){case"start":return u;case"end":return p;case"center":{var f=Math.round(p+(u-p)/2);return f<Math.ceil(N/2)?0:f>o+Math.floor(N/2)?o:f}case"auto":default:return a>=p&&a<=u?a:a<p?p:u}},getStartIndexForOffset:function(t,i){var r=t.itemCount,a=t.itemSize;return Math.max(0,Math.min(r-1,Math.floor(i/a)))},getStopIndexForStartIndex:function(t,i,r){var a=t.direction,c=t.height,l=t.itemCount,m=t.itemSize,d=t.layout,h=t.width,M=a==="horizontal"||d==="horizontal",g=i*m,I=M?h:c,v=Math.ceil((I+r-g)/m);return Math.max(0,Math.min(l-1,i+v-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});function zs(e){var t=e.lastRenderedStartIndex,i=e.lastRenderedStopIndex,r=e.startIndex,a=e.stopIndex;return!(r>i||a<t)}function ks(e){for(var t=e.isItemLoaded,i=e.itemCount,r=e.minimumBatchSize,a=e.startIndex,c=e.stopIndex,l=[],m=null,d=null,h=a;h<=c;h++){var M=t(h);M?d!==null&&(l.push(m,d),m=d=null):(d=h,m===null&&(m=h))}if(d!==null){for(var g=Math.min(Math.max(d,m+r-1),i-1),I=d+1;I<=g&&!t(I);I++)d=I;l.push(m,d)}if(l.length)for(;l[1]-l[0]+1<r&&l[0]>0;){var v=l[0]-1;if(!t(v))l[0]=v;else break}return l}var Os=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ws=function(){function e(t,i){for(var r=0;r<i.length;r++){var a=i[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),_s=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},oe=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},Cs=function(e){_s(t,e);function t(){var i,r,a,c;Os(this,t);for(var l=arguments.length,m=Array(l),d=0;d<l;d++)m[d]=arguments[d];return c=(r=(a=oe(this,(i=t.__proto__||Object.getPrototypeOf(t)).call.apply(i,[this].concat(m))),a),a._lastRenderedStartIndex=-1,a._lastRenderedStopIndex=-1,a._memoizedUnloadedRanges=[],a._onItemsRendered=function(h){var M=h.visibleStartIndex,g=h.visibleStopIndex;a._lastRenderedStartIndex=M,a._lastRenderedStopIndex=g,a._ensureRowsLoaded(M,g)},a._setRef=function(h){a._listRef=h},r),oe(a,c)}return ws(t,[{key:"resetloadMoreItemsCache",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],r&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var r=this.props.children;return r({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(r,a){var c=this.props,l=c.isItemLoaded,m=c.itemCount,d=c.minimumBatchSize,h=d===void 0?10:d,M=c.threshold,g=M===void 0?15:M,I=ks({isItemLoaded:l,itemCount:m,minimumBatchSize:h,startIndex:Math.max(0,r-g),stopIndex:Math.min(m-1,a+g)});(this._memoizedUnloadedRanges.length!==I.length||this._memoizedUnloadedRanges.some(function(v,N){return I[N]!==v}))&&(this._memoizedUnloadedRanges=I,this._loadUnloadedRanges(I))}},{key:"_loadUnloadedRanges",value:function(r){for(var a=this,c=this.props.loadMoreItems||this.props.loadMoreRows,l=function(h){var M=r[h],g=r[h+1],I=c(M,g);I!=null&&I.then(function(){if(zs({lastRenderedStartIndex:a._lastRenderedStartIndex,lastRenderedStopIndex:a._lastRenderedStopIndex,startIndex:M,stopIndex:g})){if(a._listRef==null)return;typeof a._listRef.resetAfterIndex=="function"?a._listRef.resetAfterIndex(M,!0):(typeof a._listRef._getItemStyleCache=="function"&&a._listRef._getItemStyleCache(-1),a._listRef.forceUpdate())}})},m=0;m<r.length;m+=2)l(m)}}]),t}(T.PureComponent);const bs=n.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),Es=n.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),$s=n.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),Ls=n.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),Rs=n.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),Qs=n.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),Us=n.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),qs=()=>n.i1,Ps=n.styled_default(qs())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),Ys=({rank:e,avatar:t,name:i,points:r,isCurrentUser:a,openItemDetail:c,style:l})=>s.jsxs(bs,{onClick:c,style:l,children:[s.jsx(Es,{children:e||0}),s.jsxs(Rs,{children:[t?s.jsx($s,{alt:"leaderboard-item-avatar",src:t}):s.jsx(Ls,{children:n.o$1(i||"")}),s.jsxs(Qs,{children:[s.jsx(Us,{children:i||""}),a&&s.jsx(Ps,{name:"icon-star"})]})]}),s.jsx("div",{children:n.i(r)})]}),Ws=n.styled_default("div")({name:"ScrollContainer",class:"s13d8sg6",propsAsIs:!1}),Fs=({items:e,currentUserId:t,openItemDetail:i,fetchMore:r})=>s.jsx(n.AutoSizer,{children:({width:a,height:c})=>s.jsx(Cs,{isItemLoaded:l=>l<e.length,itemCount:e.length+1,loadMoreItems:r,children:({onItemsRendered:l,ref:m})=>s.jsx(Ws,{children:s.jsx(Ds,{itemSize:56,onItemsRendered:l,ref:m,itemCount:e.length,width:a,height:c,children:({index:d,style:h})=>s.jsx(Ys,{style:{...h,maxHeight:48},...e[d],openItemDetail:()=>i(e[d].userId),isCurrentUser:!!t&&t===e[d].userId},e[d].userId)})})})}),Vs=({deepLink:e})=>{const{data:t}=n.useStore(e.$store);return s.jsx(n.O,{inviteLink:t==null?void 0:t.url,socialLinks:[{icon:"icon-facebook",link:"https://www.facebook.com/TheMasters",label:"Facebook"},{icon:"icon-twitter",link:"https://twitter.com/@TheMasters",label:"X"}],inviteCardTitle:"It’s more fun with friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})},Bs=({gamification:e})=>{const{data:t}=n.useStore(e.leaderboardList.$store);return t!=null&&t.length?s.jsx(Fs,{fetchMore:e.leaderboardList.fetchMore,items:t,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()}):s.jsx(Vs,{deepLink:e.deepLink})},Hs=n.styled_default("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),Gs=n.styled_default("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),Zs=n.styled_default("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),Js=n.styled_default("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),Ks=()=>n.i1,b=n.styled_default(Ks())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),Xs=()=>n.i1,en=n.styled_default(Xs())({name:"QuestionTypeIcon",class:"qxlt78s",propsAsIs:!0}),tn=n.styled_default("div")({name:"QuestionTypeLabel",class:"qmg0vkx",propsAsIs:!1}),sn=n.styled_default("div")({name:"QuestionContent",class:"q1uz5j1g",propsAsIs:!1}),nn=n.styled_default("button")({name:"PlayButton",class:"p1pba9p1",propsAsIs:!1}),rn={[n.PickHistoryStatus.LOST]:s.jsx(b,{name:"icon-cross"}),[n.PickHistoryStatus.WON]:s.jsx(b,{name:"icon-check"}),[n.PickHistoryStatus.UNSET]:s.jsx(b,{name:"icon-arrow"}),[n.PickHistoryStatus.DNP]:s.jsx(b,{name:"icon-arrow"})},an=({questionId:e,questionType:t,questionStatus:i,subject:r,openForVoting:a,openQuestion:c,status:l})=>{const m=n.o[t],d=rn[l];return m?s.jsxs(Hs,{onClick:()=>c==null?void 0:c(e),children:[s.jsxs(sn,{children:[s.jsxs(Gs,{children:[s.jsx(en,{name:m.iconName}),s.jsxs(tn,{children:[m.label,t===n.QuestionType.TRIVIA&&i===n.QuestionStatus.RESOLVED&&" • Expired"]})]}),s.jsx(Zs,{children:r||""})]}),s.jsx(Js,{children:a?s.jsx(nn,{children:"Play"}):d})]}):null},on=n.styled_default("div")({name:"Container",class:"cll3md7",propsAsIs:!1}),ln=n.styled_default("button")({name:"ActionBtn",class:"a10g1iik",propsAsIs:!1}),cn=({openInsight:e,questionId:t,...i})=>s.jsxs(on,{children:[s.jsx(fe,{questionId:t,...i}),e&&s.jsx(ln,{onClick:()=>e(t),children:"View Insight"})]}),dn=n.styled_default("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),un=({questions:e,openQuestion:t})=>s.jsx(dn,{children:e==null?void 0:e.map(i=>{var r,a;if(i.type==="question"&&((r=i.attributes)==null?void 0:r.attributes.case)==="question"){const c=i.attributes.attributes.value;return s.jsx(an,{openQuestion:t,...c},c.questionId)}if(i.type==="insight"&&((a=i.attributes)==null?void 0:a.attributes.case)==="insight"){const c=i.attributes.attributes.value;return s.jsx(cn,{openInsight:t,...c},c.questionId)}return null})}),pn=({store:e,openQuestion:t})=>{const i=n.useStore(e);return i!=null&&i.data?s.jsx(un,{openQuestion:t,questions:i.data}):s.jsx("div",{children:"wait questions..."})},mn=({userSummary:e})=>{var t,i;const r=n.useStore(e.getStore());return(t=r.data)!=null&&t.summary?s.jsx(de,{...r.data.summary,successRate:(i=r.data.percentage)==null?void 0:i.correct}):s.jsx("div",{children:"wait user..."})},fn=({gamification:e})=>{const[t,i]=T.useState(E.HOME);return s.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(n.a$1,{style:{paddingBottom:"4px"},children:s.jsx(ys,{activePage:t,toggleActivePage:i})}),t===E.HOME&&s.jsxs(n.r,{children:[s.jsx(n.a$1,{style:{paddingTop:"12px"},children:s.jsx(mn,{userSummary:e.userSummary})}),s.jsx(n.n$1,{children:s.jsx(pn,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),t===E.LEADERBOARD&&s.jsx("div",{className:"c1bp9dj2",children:s.jsx(Bs,{gamification:e})})]})},hn=()=>n.d,le=n.styled_default(hn())({name:"OpenedContainer",class:"oar61gl",propsAsIs:!0}),In=n.styled_default("div")({name:"UserContainer",class:"u14zaal4",propsAsIs:!1}),yn=({correct:e,incorrect:t})=>{const i=e+t;return i===0?0:Math.round(e/i*100)},gn=({gamification:e,className:t})=>{const i=n.useStore(e.openedQuestion.$store),r=n.useStore(e.openedUser);return s.jsxs(s.Fragment,{children:[i&&s.jsx(le,{className:t,children:s.jsx(ps,{gamification:e})}),r&&s.jsx(le,{className:t,children:s.jsxs(In,{children:[s.jsx(ce,{label:"Friend's Rank",close:e.closeUser}),s.jsx(n.a$1,{children:s.jsx(de,{...r,successRate:yn(r)})})]})}),s.jsx(n.r,{className:t,"data-nav":"true",children:s.jsx(fn,{gamification:e})})]})};exports.default=gn;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),n=require("./masters.js"),T=require("react"),Te=n.styled_default("div")({name:"Container",class:"c1vwopgc",propsAsIs:!1}),Ne=n.styled_default("div")({name:"QuestionTypeWrap",class:"qyktpt0",propsAsIs:!1}),Ae=()=>n.i1,Se=n.styled_default(Ae())({name:"QuestionTypeIcon",class:"q951jdx",propsAsIs:!0}),De=n.styled_default("span")({name:"QuestionTypeTitle",class:"qss5f0e",propsAsIs:!1}),ze=n.styled_default("button")({name:"CloseButton",class:"c1ao1jtv",propsAsIs:!1}),ke=()=>n.i1,Oe=n.styled_default(ke())({name:"CloseIcon",class:"cvsl7l3",propsAsIs:!0}),ce=({type:e,close:t,label:i})=>{const r=e?n.o[e]:{label:i,iconName:void 0};return s.jsxs(Te,{children:[s.jsxs(Ne,{children:[(r==null?void 0:r.iconName)&&s.jsx(Se,{name:r.iconName}),(r==null?void 0:r.label)&&s.jsx(De,{children:r.label})]}),s.jsx(ze,{onClick:t,children:s.jsx(Oe,{name:"icon-cross"})})]})},we=n.styled_default("div")({name:"Container",class:"c1zy8a",propsAsIs:!1}),_e=n.styled_default("div")({name:"Title",class:"t1vih9p5",propsAsIs:!1}),Ce=n.styled_default("div")({name:"Indicator",class:"i1fbnvpb",propsAsIs:!1}),V=({indicator:e,title:t})=>s.jsxs(we,{children:[s.jsx(_e,{children:t}),s.jsx(Ce,{children:e})]}),be=n.styled_default("div")({name:"Container",class:"ctmhwyc",propsAsIs:!1}),Ee=n.styled_default("div")({name:"Indicator",class:"i1jri200",propsAsIs:!1}),$e=n.styled_default("div")({name:"Title",class:"t8s05oq",propsAsIs:!1}),C=({indicator:e,title:t})=>s.jsxs(be,{children:[s.jsx(Ee,{children:e}),s.jsx($e,{children:t})]}),Le=n.styled_default("div")({name:"Container",class:"c1yrpn9o",propsAsIs:!1}),Re=n.styled_default("div")({name:"TopInfo",class:"t17fwahh",propsAsIs:!1}),Qe=n.styled_default("div")({name:"BottomInfo",class:"by6w7e9",propsAsIs:!1}),Ue=n.styled_default("div")({name:"User",class:"u1g7arbm",propsAsIs:!1}),qe=n.styled_default("img")({name:"Avatar",class:"a1ldeata",propsAsIs:!1}),Pe=n.styled_default("div")({name:"UserInfo",class:"u10d4koz",propsAsIs:!1}),Ye=n.styled_default("div")({name:"UserName",class:"u1q6roj0",propsAsIs:!1}),We=n.styled_default("div")({name:"UserRating",class:"ui0m425",propsAsIs:!1}),Fe=n.styled_default("img")({name:"TrophyIcon",class:"t1el3mrn",propsAsIs:!1}),Ve=n.styled_default("div")({name:"Rts",class:"r2vgnxv",propsAsIs:!1}),Be=n.styled_default("div")({name:"RtsIndicator",class:"roqn06j",propsAsIs:!1}),He=n.styled_default("div")({name:"RtsLabel",class:"r15adx7c",propsAsIs:!1}),Ge=n.styled_default("div")({name:"Divider",class:"dv59lta",propsAsIs:!1}),Ze=n.styled_default("div")({name:"Ranks",class:"r55lotb",propsAsIs:!1}),Je=n.styled_default("div")({name:"Statistics",class:"s1knfgqt",propsAsIs:!1}),Ke=n.styled_default("div")({name:"AvatarPlaceholder",class:"a1mqo824",propsAsIs:!1}),Xe=n.styled_default("button")({name:"UserAccountBtn",class:"uxareh6",propsAsIs:!1}),et="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlRyb3BoeSI+CjxwYXRoIGlkPSJDb21iaW5lZCBTaGFwZSIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjY5MTk3IDQuNjY2NjJDMy42OTE5NyA1Ljk5NzA1IDMuOTI5MTQgNy4xNzc4NyA0LjQwMzUgOC4yMDkxMkMzLjQ5OTY2IDguMDI0NTEgMi43NDQ4NyA3LjY2NDg2IDIuMTM5MSA3LjEzMDE0QzEuNTMzMzMgNi41OTU0MiAxLjIzMDQ2IDYuMDc5OCAxLjIzMDQ2IDUuNTgzMjhWNC42NjY2MkgzLjY5MTk3Wk0xNC43Njg2IDQuNjY2NjJWNS41ODMyOEMxNC43Njg2IDYuMDc5OCAxNC40NjU4IDYuNTk1NDIgMTMuODYgNy4xMzAxNEMxMy4yNTQyIDcuNjY0ODYgMTIuNDk5NCA4LjAyNDUxIDExLjU5NTYgOC4yMDkxMkMxMi4wNjk5IDcuMTc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yMDM0IDkuMzcyNDYgMTIuODYwNCA5LjEyMTAxQzEzLjUxNzUgOC44Njk1NyAxNC4wNzIgOC41NTkyNCAxNC41MjM5IDguMTkwMDNDMTQuOTc1OCA3LjgyMDgyIDE1LjMzNDggNy40MDcwNSAxNS42MDA4IDYuOTQ4NzJDMTUuODY2OCA2LjQ5MDM5IDE1Ljk5OTggNi4wMzUyNSAxNS45OTk4IDUuNTgzMjlaTTYuNzYwNDcgNy4xNzk4TDguMDUxMDkgNi40OTk5N0w5LjM0MTcgNy4xNzk4TDkuMDk1MjEgNS43Mzk4OUwxMC4xMzkzIDQuNzIwMTVMOC42OTYzOSA0LjUxMDA3TDguMDUxMDkgMy4yTDcuNDA1NzggNC41MTAwN0w1Ljk2MjgzIDQuNzIwMTVMNy4wMDY5NiA1LjczOTg5TDYuNzYwNDcgNy4xNzk4WiIgZmlsbD0iI0YyQzk0QyIvPgo8L2c+Cjwvc3ZnPgo=",de=({avatar:e,name:t,points:i,friendsRank:r,rank:a,streak:c,correct:l,incorrect:m,inTop:d,successRate:h})=>s.jsxs(Le,{children:[s.jsx(Re,{children:s.jsxs(Ue,{children:[s.jsxs(Xe,{children:[e&&s.jsx(qe,{alt:"avatar",src:e}),!e&&s.jsx(Ke,{children:n.o$1(t||"")})]}),s.jsxs(Pe,{children:[s.jsx(Ye,{children:t}),s.jsxs(We,{children:[s.jsxs(Ve,{children:[s.jsx(Fe,{alt:"rank-icon",src:et}),s.jsxs(Be,{children:[n.i(i),s.jsx(He,{children:"PTS"})]})]}),s.jsx(Ge,{}),s.jsxs("div",{children:["TOP ",d||0,"%"]})]})]})]})}),s.jsxs(Qe,{children:[s.jsxs(Ze,{children:[s.jsx(V,{indicator:r||0,title:"Friends rank"}),s.jsx(V,{indicator:a||0,title:"Global rank"})]}),s.jsxs(Je,{children:[s.jsx(C,{indicator:c||0,title:"Win streak"}),s.jsx(C,{indicator:l||0,title:"Correct"}),s.jsx(C,{indicator:m||0,title:"Incorrect"}),s.jsx(C,{indicator:`${h||0}%`,title:"Succ. rate"})]})]})]}),tt=n.styled_default("div")({name:"Container",class:"c38csyt",propsAsIs:!1}),st=n.styled_default("div")({name:"Title",class:"ty221rx",propsAsIs:!1}),nt=n.styled_default("div")({name:"Description",class:"dlaj9xp",propsAsIs:!1}),it=({title:e,description:t})=>s.jsxs(tt,{children:[s.jsx(n.i1,{name:"icon-check-circle"}),s.jsx(st,{children:e}),s.jsx(nt,{children:t})]}),rt=n.styled_default("div")({name:"Container",class:"c16sbdnm",propsAsIs:!1}),at=()=>n.i1,ot=n.styled_default(at())({name:"IconPrediction",class:"ibhorgl",propsAsIs:!0}),B=n.styled_default("div")({name:"FeedbackIconWrap",class:"f1g20ja7",propsAsIs:!1}),H=n.styled_default("div")({name:"FeedbackHeader",class:"f455ozj",propsAsIs:!1}),lt=n.styled_default("span")({name:"FeedbackTitle",class:"f1913njx",propsAsIs:!1}),L=n.styled_default("span")({name:"FeedbackDescription",class:"fzfk69z",propsAsIs:!1}),ct=n.styled_default("div")({name:"FeedbackText",class:"fx87qaj",propsAsIs:!1}),dt=({feedbackMessages:e,questionVotedCorrectly:t,questionVoted:i,questionType:r,hasCorrectAnswer:a,questionStatus:c})=>{const l=i&&(r===n.QuestionType.TRIVIA||r===n.QuestionType.PREDICTION);if(!l&&c!==n.QuestionStatus.RESOLVED)return null;const m=r===n.QuestionType.PREDICTION&&!a,d=t?"correct":"incorrect",h=t?e.correctFeedback:e.incorrectFeedback;return s.jsxs(rt,{"data-isPrediction":m,children:[c===n.QuestionStatus.RESOLVED&&r===n.QuestionType.TRIVIA&&!i&&s.jsxs(s.Fragment,{children:[s.jsx(B,{children:s.jsx(n.i1,{name:"questionExpired"})}),s.jsxs("div",{children:[s.jsx(H,{children:s.jsx(L,{children:"Question Expired"})}),s.jsx(ct,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),l&&m&&s.jsxs(s.Fragment,{children:[s.jsx(ot,{name:"icon-prediction"}),s.jsx(L,{children:"Stay tuned to see if your prediction was correct."})]}),l&&a&&s.jsxs(s.Fragment,{children:[s.jsx(B,{"data-feedbackType":d,children:s.jsx(n.i1,{name:d})}),s.jsx("div",{children:s.jsxs(H,{children:[s.jsx(lt,{"data-feedbackType":d,children:h==null?void 0:h.title}),s.jsx(L,{children:h==null?void 0:h.description})]})})]})]})},ut=n.styled_default("div")({name:"Container",class:"c14ielyq",propsAsIs:!1}),pt=n.styled_default("div")({name:"Content",class:"c1tlqx57",propsAsIs:!1}),mt=n.styled_default("div")({name:"Title",class:"t1hq58md",propsAsIs:!1}),ft=n.styled_default("div")({name:"Options",class:"o1c8nxcx",propsAsIs:!1}),ht=n.styled_default("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),It=n.styled_default("div")({name:"ButtonPct",class:"b4iik8i",propsAsIs:!1}),yt=n.styled_default("span")({name:"ButtonBody",class:"b1gq1lnf",propsAsIs:!1}),gt=n.styled_default("div")({name:"IconContainer",class:"i1j65z51",propsAsIs:!1}),xt=n.styled_default("div")({name:"IconWrap",class:"i19tpfua",propsAsIs:!1}),ue=n.styled_default("img")({name:"Icon",class:"i1tubmma",propsAsIs:!1}),jt=()=>ue,Mt=n.styled_default(jt())({name:"IconDefault",class:"i1grrgwj",propsAsIs:!0}),vt=()=>ue,Tt=n.styled_default(vt())({name:"IconCircle",class:"ibemyq8",propsAsIs:!0}),Nt=n.styled_default("span")({name:"Title",class:"t1dceht",propsAsIs:!1}),At=n.styled_default("span")({name:"Indicators",class:"i116q4vq",propsAsIs:!1}),St=n.styled_default("span")({name:"Percentage",class:"p17ajcu2",propsAsIs:!1}),Dt=()=>n.i1,zt=n.styled_default(Dt())({name:"CheckIcon",class:"cu9kmlb",propsAsIs:!0}),G={[n.QuestionImages.CENTERED]:e=>s.jsx(Mt,{alt:"option-icon",src:e}),[n.QuestionImages.TRANSPARENT]:e=>s.jsx(gt,{children:s.jsx(xt,{style:{backgroundImage:`url(${e})`}})}),[n.QuestionImages.ROUNDED]:e=>s.jsx(Tt,{alt:"option-icon",src:e}),[n.QuestionImages.NONE]:()=>null,[n.QuestionImages.UNSET]:()=>null},kt=({questionType:e,hasCorrectAnswer:t,correct:i,youVoted:r,questionVoted:a})=>{if(e===n.QuestionType.POLL&&r)return"correct";if(e===n.QuestionType.PREDICTION){if(t&&a)return r?i?"correct":"incorrect":i?"correct":"unset";if(r)return"correct"}return e===n.QuestionType.TRIVIA&&a?r?i?"correct":"incorrect":i?"correct":"unset":"unset"},Ot=({questionType:e,questionVoted:t,correct:i,hasCorrectAnswer:r,questionStatus:a})=>e===n.QuestionType.TRIVIA?t&&i:e===n.QuestionType.PREDICTION?t&&i&&r||a===n.QuestionStatus.RESOLVED&&i:!1,wt=e=>{var t;const{id:i,icon:r,text:a,percentageDecimal:c,onVote:l,youSelected:m,questionVoted:d,imageMode:h,answerTimeExpired:M,questionStatus:g,isLoading:I,questionType:v,correct:N,hasCorrectAnswer:o}=e,u=kt(e),p=Ot({questionType:v,questionVoted:d,correct:N,hasCorrectAnswer:o,questionStatus:g}),f=d||g===n.QuestionStatus.RESOLVED&&v===n.QuestionType.PREDICTION;return s.jsxs(ht,{value:i,"data-selected":m,"data-answerState":u,disabled:d||I||M,onClick:l,children:[f&&s.jsx(It,{"data-answerState":u,style:{width:`${c}%`}}),s.jsxs(yt,{children:[r&&h&&((t=G[h])==null?void 0:t.call(G,r)),s.jsx(Nt,{children:a}),f&&s.jsxs(At,{children:[p&&s.jsx(zt,{name:"selected"}),s.jsxs(St,{children:[c,"%"]})]})]})]})};var Z=typeof window>"u"?T.useEffect:T.useLayoutEffect,_t=({isPlaying:e,duration:t,startAt:i=0,updateInterval:r=0,onComplete:a,onUpdate:c})=>{let[l,m]=T.useState(i),d=T.useRef(0),h=T.useRef(i),M=T.useRef(i*-1e3),g=T.useRef(null),I=T.useRef(null),v=T.useRef(null),N=p=>{let f=p/1e3;if(I.current===null){I.current=f,g.current=requestAnimationFrame(N);return}let y=f-I.current,j=d.current+y;I.current=f,d.current=j;let x=h.current+(r===0?j:(j/r|0)*r),A=h.current+j,S=typeof t=="number"&&A>=t;m(S?t:x),S||(g.current=requestAnimationFrame(N))},o=()=>{g.current&&cancelAnimationFrame(g.current),v.current&&clearTimeout(v.current),I.current=null},u=T.useCallback(p=>{o(),d.current=0;let f=typeof p=="number"?p:i;h.current=f,m(f),e&&(g.current=requestAnimationFrame(N))},[e,i]);return Z(()=>{if(c==null||c(l),t&&l>=t){M.current+=t*1e3;let{shouldRepeat:p=!1,delay:f=0,newStartAt:y}=(a==null?void 0:a(M.current/1e3))||{};p&&(v.current=setTimeout(()=>u(y),f*1e3))}},[l,t]),Z(()=>(e&&(g.current=requestAnimationFrame(N)),o),[e,t,r]),{elapsedTime:l,reset:u}},Ct=(e,t,i)=>{let r=e/2,a=t/2,c=r-a,l=2*c,m=i==="clockwise"?"1,0":"0,1",d=2*Math.PI*c;return{path:`m ${r},${a} a ${c},${c} 0 ${m} 0,${l} a ${c},${c} 0 ${m} 0,-${l}`,pathLength:d}},J=(e,t)=>e===0||e===t?0:typeof t=="number"?e-t:0,bt=e=>({position:"relative",width:e,height:e}),Et={display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",left:0,top:0,width:"100%",height:"100%"},pe=(e,t,i,r,a)=>{if(r===0)return t;let c=(a?r-e:e)/r;return t+i*c},K=e=>{var t,i;return(i=(t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(r,a,c,l)=>`#${a}${a}${c}${c}${l}${l}`).substring(1).match(/.{2}/g))==null?void 0:t.map(r=>parseInt(r,16)))!=null?i:[]},$t=(e,t)=>{var i;let{colors:r,colorsTime:a,isSmoothColorTransition:c=!0}=e;if(typeof r=="string")return r;let l=(i=a==null?void 0:a.findIndex((I,v)=>I>=t&&t>=a[v+1]))!=null?i:-1;if(!a||l===-1)return r[0];if(!c)return r[l];let m=a[l]-t,d=a[l]-a[l+1],h=K(r[l]),M=K(r[l+1]),g=!!e.isGrowing;return`rgb(${h.map((I,v)=>pe(m,I,M[v]-I,d,g)|0).join(",")})`},Lt=e=>{let{duration:t,initialRemainingTime:i,updateInterval:r,size:a=180,strokeWidth:c=12,trailStrokeWidth:l,isPlaying:m=!1,isGrowing:d=!1,rotation:h="clockwise",onComplete:M,onUpdate:g}=e,I=T.useRef(),v=Math.max(c,l??0),{path:N,pathLength:o}=Ct(a,v,h),{elapsedTime:u}=_t({isPlaying:m,duration:t,startAt:J(t,i),updateInterval:r,onUpdate:typeof g=="function"?f=>{let y=Math.ceil(t-f);y!==I.current&&(I.current=y,g(y))}:void 0,onComplete:typeof M=="function"?f=>{var y;let{shouldRepeat:j,delay:x,newInitialRemainingTime:A}=(y=M(f))!=null?y:{};if(j)return{shouldRepeat:j,delay:x,newStartAt:J(t,A)}}:void 0}),p=t-u;return{elapsedTime:u,path:N,pathLength:o,remainingTime:Math.ceil(p),rotation:h,size:a,stroke:$t(e,p),strokeDashoffset:pe(u,0,o,t,d),strokeWidth:c}},me=e=>{let{children:t,strokeLinecap:i,trailColor:r,trailStrokeWidth:a}=e,{path:c,pathLength:l,stroke:m,strokeDashoffset:d,remainingTime:h,elapsedTime:M,size:g,strokeWidth:I}=Lt(e);return T.createElement("div",{style:bt(g)},T.createElement("svg",{viewBox:`0 0 ${g} ${g}`,width:g,height:g,xmlns:"http://www.w3.org/2000/svg"},T.createElement("path",{d:c,fill:"none",stroke:r??"#d9d9d9",strokeWidth:a??I}),T.createElement("path",{d:c,fill:"none",stroke:m,strokeLinecap:i??"round",strokeWidth:I,strokeDasharray:l,strokeDashoffset:d})),typeof t=="function"&&T.createElement("div",{style:Et},t({remainingTime:h,elapsedTime:M,color:m})))};me.displayName="CountdownCircleTimer";const Rt=[n.E.PRIMARY_GREEN1,n.E.SECONDARY_RED1,n.E.SECONDARY_RED1],Qt=[10,10,0],Ut=n.styled_default("div")({name:"RemainingTime",class:"r165427",propsAsIs:!1}),qt=n.E.SECONDARY_GREEN6,X=n.E.SECONDARY_RED3,Pt=n.E.NEUTRALS_GRAY3,Yt=({isPlaying:e=!0,duration:t=30,onTimerExpired:i})=>{const[r,a]=T.useState(t>10?qt:X),c=({remainingTime:d})=>s.jsx(Ut,{children:d}),l=T.useCallback(()=>{i==null||i(),a(Pt)},[i,a]),m=T.useCallback(d=>{d===10&&a(X)},[a]);return s.jsx(me,{isPlaying:e,duration:t,colors:Rt,colorsTime:Qt,size:32,strokeWidth:2,trailStrokeWidth:2,trailColor:r,onComplete:l,onUpdate:m,children:c})},Wt=n.styled_default("div")({name:"WinBarContainer",class:"wie6cqo",propsAsIs:!1}),Ft=n.styled_default("div")({name:"Content",class:"cgizw4u",propsAsIs:!1}),Vt=n.styled_default("div")({name:"Title",class:"t1l3ucjp",propsAsIs:!1}),Bt=()=>n.i1,Ht=n.styled_default(Bt())({name:"WinIcon",class:"wx7j799",propsAsIs:!0}),Gt=n.styled_default("div")({name:"Points",class:"p4lwuj0",propsAsIs:!1}),Zt=n.styled_default("span")({name:"PointsCount",class:"po9i64o",propsAsIs:!1}),Jt=n.styled_default("span")({name:"PointsUnits",class:"pe5g05h",propsAsIs:!1}),Kt=({title:e,points:t,isPlayingTimer:i,isTimer:r,onTimerExpired:a})=>s.jsxs(Wt,{children:[s.jsxs(Ft,{children:[e&&s.jsx(Vt,{children:e}),t!==void 0&&s.jsxs(s.Fragment,{children:[s.jsx(Ht,{name:"icon-trophy"}),s.jsxs(Gt,{children:[s.jsx(Zt,{children:t}),s.jsx(Jt,{children:"PTS"})]})]})]}),r&&s.jsx(Yt,{isPlaying:i,onTimerExpired:a})]}),Xt=({openedQuestion:e,vote:t,close:i})=>{var r;const a=e.subject,c=e.type,l=(r=e.options)==null?void 0:r.options,[m,d]=T.useState(!1),[h,M]=T.useState(!1),[g,I]=T.useState(""),v=e==null?void 0:e.id,N=T.useCallback(async j=>{if(v){const x=j.currentTarget.value;I(x),M(!0),await t(v,x),M(!1)}},[v,I,t]),o=T.useCallback(()=>{d(!0),setTimeout(i,3e3)},[i]),u=T.useMemo(()=>e==null?void 0:e.answers.find(j=>j.youVoted===!0),[e]),p=T.useMemo(()=>!!(e!=null&&e.answers.find(j=>j.correct===!0)),[e]),f=T.useMemo(()=>e?e.answers.map(j=>{var x;return{...j,questionVoted:!!u,youSelected:g===j.id,isLoading:h,hasCorrectAnswer:p,questionType:e.type,answerTimeExpired:m,questionStatus:e.status,imageMode:(x=e.appearance)==null?void 0:x.images,onVote:N}}):[],[p,m,h,e,u,N,g]),y=l&&(l.case==="trivia"||l.case==="prediction")?l.value:void 0;return s.jsx(n.r,{"data-question-header":"true",children:s.jsx(ut,{children:s.jsxs(pt,{children:[y&&s.jsx(dt,{feedbackMessages:y,questionVoted:!!u,questionVotedCorrectly:u==null?void 0:u.correct,questionType:c,hasCorrectAnswer:p,questionStatus:e.status}),e.type!==n.QuestionType.PREDICTION&&s.jsx(Kt,{title:m?"Time expired":"To win",points:m?void 0:100,onTimerExpired:o,isTimer:!0}),m?s.jsx(it,{title:"More to come...",description:"Watch for additional enhanced stream interactive experience."}):s.jsxs(s.Fragment,{children:[s.jsx(mt,{"data-isPrediction":e.type===n.QuestionType.PREDICTION,children:a}),s.jsx(ft,{children:f.map(j=>s.jsx(wt,{...j},j.id))})]})]})})})},es=n.styled_default("div")({name:"Container",class:"cgn5uen",propsAsIs:!1}),ts=n.styled_default("div")({name:"Content",class:"c1px8nt6",propsAsIs:!1}),ss=n.styled_default("h3")({name:"Title",class:"t5et2jt",propsAsIs:!1}),ns=n.styled_default("div")({name:"Description",class:"d1i2kpk2",propsAsIs:!1}),is=n.styled_default("div")({name:"DateWrap",class:"dd3lh3p",propsAsIs:!1}),rs=n.styled_default("img")({name:"Image",class:"i1gfjeu5",propsAsIs:!1}),fe=({created:e,image:t,title:i,instantView:r})=>{const a=T.useMemo(()=>{if(e){const l=new Date(e);if(n.r$1(l))return{date:n.a(l),time:n.n(l)}}return null},[e]),c=(r==null?void 0:r.image)||t;return s.jsxs(es,{children:[a&&s.jsxs(is,{children:[a.date," · ",a.time]}),(r==null?void 0:r.video)&&s.jsx(n.w,{source:r.video.url,poster:r.video.thumbnailUrl}),c&&s.jsx(rs,{src:c}),s.jsxs(ts,{children:[s.jsx(ss,{children:(r==null?void 0:r.heading)||i}),s.jsx(ns,{children:r==null?void 0:r.body})]})]})},as=n.styled_default("div")({name:"Container",class:"c1euiow",propsAsIs:!1}),os=n.styled_default("a")({name:"WebLinkBtn",class:"w19zie3h",propsAsIs:!1}),ls=({instantView:e,...t})=>s.jsxs(as,{children:[s.jsx(fe,{instantView:e,...t}),(e==null?void 0:e.webLink)&&s.jsxs(os,{href:e==null?void 0:e.webLink.url,target:"_blank",children:["Explore more of the Masters History",s.jsx(n.i1,{name:"icon-external-link"})]})]}),cs=n.styled_default("div")({name:"QuestionContainer",class:"qdri6g3",propsAsIs:!1}),ds=({openedQuestion:e})=>{var t;return((t=e==null?void 0:e.attributes)==null?void 0:t.attributes.case)==="insight"?s.jsx(ls,{created:e.attributes.created,...e.attributes.attributes.value}):null},us=({extendedQuestion:e,vote:t,close:i})=>{const{loading:r,data:a}=e;return!r&&a?s.jsx(Xt,{vote:t,close:i,openedQuestion:a}):null},ps=({gamification:e})=>{var t;const i=n.useStore(e.openedQuestion.$store),r=n.useStore(e.openedQuestion.$extendedStore);if(!i)return null;const a=i.type;return s.jsxs(cs,{children:[s.jsx(ce,{close:e.closeQuestion,type:((t=i.attributes)==null?void 0:t.type)||n.QuestionType.UNSET}),a==="question"&&s.jsx(us,{vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:r}),a!=="question"&&s.jsx(ds,{openedQuestion:i})]})},ms=n.styled_default("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),fs=n.styled_default("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),hs=n.styled_default("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),Is=n.styled_default("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var E=(e=>(e.HOME="home",e.LEADERBOARD="leaderboard",e))(E||{});const ee=({title:e,active:t,onClick:i})=>s.jsx(hs,{onClick:i,"data-selected":t,children:s.jsx(Is,{children:e})}),ys=({activePage:e="home",toggleActivePage:t})=>s.jsx(ms,{children:s.jsxs(fs,{"data-position":e==="home"?"left":"right",children:[s.jsx(ee,{title:"Home",active:e==="home",onClick:()=>t("home")}),s.jsx(ee,{title:"Leader Board",active:e==="leaderboard",onClick:()=>t("leaderboard")})]})});function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},U.apply(this,arguments)}function te(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},q(e,t)}function gs(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,q(e,t)}var se=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function xs(e,t){return!!(e===t||se(e)&&se(t))}function js(e,t){if(e.length!==t.length)return!1;for(var i=0;i<e.length;i++)if(!xs(e[i],t[i]))return!1;return!0}function R(e,t){t===void 0&&(t=js);var i,r=[],a,c=!1;function l(){for(var m=[],d=0;d<arguments.length;d++)m[d]=arguments[d];return c&&i===this&&t(m,r)||(a=e.apply(this,m),c=!0,i=this,r=m),a}return l}var Ms=typeof performance=="object"&&typeof performance.now=="function",ne=Ms?function(){return performance.now()}:function(){return Date.now()};function ie(e){cancelAnimationFrame(e.id)}function vs(e,t){var i=ne();function r(){ne()-i>=t?e.call(null):a.id=requestAnimationFrame(r)}var a={id:requestAnimationFrame(r)};return a}var Q=-1;function re(e){if(e===void 0&&(e=!1),Q===-1||e){var t=document.createElement("div"),i=t.style;i.width="50px",i.height="50px",i.overflow="scroll",document.body.appendChild(t),Q=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Q}var k=null;function ae(e){if(e===void 0&&(e=!1),k===null||e){var t=document.createElement("div"),i=t.style;i.width="50px",i.height="50px",i.overflow="scroll",i.direction="rtl";var r=document.createElement("div"),a=r.style;return a.width="100px",a.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?k="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?k="negative":k="positive-ascending"),document.body.removeChild(t),k}return k}var Ts=150,Ns=function(t,i){return t};function As(e){var t,i=e.getItemOffset,r=e.getEstimatedTotalSize,a=e.getItemSize,c=e.getOffsetForIndexAndAlignment,l=e.getStartIndexForOffset,m=e.getStopIndexForStartIndex,d=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,M=e.validateProps;return t=function(g){gs(I,g);function I(N){var o;return o=g.call(this,N)||this,o._instanceProps=d(o.props,te(o)),o._outerRef=void 0,o._resetIsScrollingTimeoutId=null,o.state={instance:te(o),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof o.props.initialScrollOffset=="number"?o.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},o._callOnItemsRendered=void 0,o._callOnItemsRendered=R(function(u,p,f,y){return o.props.onItemsRendered({overscanStartIndex:u,overscanStopIndex:p,visibleStartIndex:f,visibleStopIndex:y})}),o._callOnScroll=void 0,o._callOnScroll=R(function(u,p,f){return o.props.onScroll({scrollDirection:u,scrollOffset:p,scrollUpdateWasRequested:f})}),o._getItemStyle=void 0,o._getItemStyle=function(u){var p=o.props,f=p.direction,y=p.itemSize,j=p.layout,x=o._getItemStyleCache(h&&y,h&&j,h&&f),A;if(x.hasOwnProperty(u))A=x[u];else{var S=i(o.props,u,o._instanceProps),D=a(o.props,u,o._instanceProps),z=f==="horizontal"||j==="horizontal",w=f==="rtl",_=z?S:0;x[u]=A={position:"absolute",left:w?void 0:_,right:w?_:void 0,top:z?0:S,height:z?"100%":D,width:z?D:"100%"}}return A},o._getItemStyleCache=void 0,o._getItemStyleCache=R(function(u,p,f){return{}}),o._onScrollHorizontal=function(u){var p=u.currentTarget,f=p.clientWidth,y=p.scrollLeft,j=p.scrollWidth;o.setState(function(x){if(x.scrollOffset===y)return null;var A=o.props.direction,S=y;if(A==="rtl")switch(ae()){case"negative":S=-y;break;case"positive-descending":S=j-f-y;break}return S=Math.max(0,Math.min(S,j-f)),{isScrolling:!0,scrollDirection:x.scrollOffset<y?"forward":"backward",scrollOffset:S,scrollUpdateWasRequested:!1}},o._resetIsScrollingDebounced)},o._onScrollVertical=function(u){var p=u.currentTarget,f=p.clientHeight,y=p.scrollHeight,j=p.scrollTop;o.setState(function(x){if(x.scrollOffset===j)return null;var A=Math.max(0,Math.min(j,y-f));return{isScrolling:!0,scrollDirection:x.scrollOffset<A?"forward":"backward",scrollOffset:A,scrollUpdateWasRequested:!1}},o._resetIsScrollingDebounced)},o._outerRefSetter=function(u){var p=o.props.outerRef;o._outerRef=u,typeof p=="function"?p(u):p!=null&&typeof p=="object"&&p.hasOwnProperty("current")&&(p.current=u)},o._resetIsScrollingDebounced=function(){o._resetIsScrollingTimeoutId!==null&&ie(o._resetIsScrollingTimeoutId),o._resetIsScrollingTimeoutId=vs(o._resetIsScrolling,Ts)},o._resetIsScrolling=function(){o._resetIsScrollingTimeoutId=null,o.setState({isScrolling:!1},function(){o._getItemStyleCache(-1,null)})},o}I.getDerivedStateFromProps=function(o,u){return Ss(o,u),M(o),null};var v=I.prototype;return v.scrollTo=function(o){o=Math.max(0,o),this.setState(function(u){return u.scrollOffset===o?null:{scrollDirection:u.scrollOffset<o?"forward":"backward",scrollOffset:o,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},v.scrollToItem=function(o,u){u===void 0&&(u="auto");var p=this.props,f=p.itemCount,y=p.layout,j=this.state.scrollOffset;o=Math.max(0,Math.min(o,f-1));var x=0;if(this._outerRef){var A=this._outerRef;y==="vertical"?x=A.scrollWidth>A.clientWidth?re():0:x=A.scrollHeight>A.clientHeight?re():0}this.scrollTo(c(this.props,o,u,j,this._instanceProps,x))},v.componentDidMount=function(){var o=this.props,u=o.direction,p=o.initialScrollOffset,f=o.layout;if(typeof p=="number"&&this._outerRef!=null){var y=this._outerRef;u==="horizontal"||f==="horizontal"?y.scrollLeft=p:y.scrollTop=p}this._callPropsCallbacks()},v.componentDidUpdate=function(){var o=this.props,u=o.direction,p=o.layout,f=this.state,y=f.scrollOffset,j=f.scrollUpdateWasRequested;if(j&&this._outerRef!=null){var x=this._outerRef;if(u==="horizontal"||p==="horizontal")if(u==="rtl")switch(ae()){case"negative":x.scrollLeft=-y;break;case"positive-ascending":x.scrollLeft=y;break;default:var A=x.clientWidth,S=x.scrollWidth;x.scrollLeft=S-A-y;break}else x.scrollLeft=y;else x.scrollTop=y}this._callPropsCallbacks()},v.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ie(this._resetIsScrollingTimeoutId)},v.render=function(){var o=this.props,u=o.children,p=o.className,f=o.direction,y=o.height,j=o.innerRef,x=o.innerElementType,A=o.innerTagName,S=o.itemCount,D=o.itemData,z=o.itemKey,w=z===void 0?Ns:z,_=o.layout,he=o.outerElementType,Ie=o.outerTagName,ye=o.style,ge=o.useIsScrolling,xe=o.width,P=this.state.isScrolling,$=f==="horizontal"||_==="horizontal",je=$?this._onScrollHorizontal:this._onScrollVertical,Y=this._getRangeToRender(),Me=Y[0],ve=Y[1],W=[];if(S>0)for(var O=Me;O<=ve;O++)W.push(T.createElement(u,{data:D,key:w(O,D),index:O,isScrolling:ge?P:void 0,style:this._getItemStyle(O)}));var F=r(this.props,this._instanceProps);return T.createElement(he||Ie||"div",{className:p,onScroll:je,ref:this._outerRefSetter,style:U({position:"relative",height:y,width:xe,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:f},ye)},T.createElement(x||A||"div",{children:W,ref:j,style:{height:$?"100%":F,pointerEvents:P?"none":void 0,width:$?F:"100%"}}))},v._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var o=this.props.itemCount;if(o>0){var u=this._getRangeToRender(),p=u[0],f=u[1],y=u[2],j=u[3];this._callOnItemsRendered(p,f,y,j)}}if(typeof this.props.onScroll=="function"){var x=this.state,A=x.scrollDirection,S=x.scrollOffset,D=x.scrollUpdateWasRequested;this._callOnScroll(A,S,D)}},v._getRangeToRender=function(){var o=this.props,u=o.itemCount,p=o.overscanCount,f=this.state,y=f.isScrolling,j=f.scrollDirection,x=f.scrollOffset;if(u===0)return[0,0,0,0];var A=l(this.props,x,this._instanceProps),S=m(this.props,A,x,this._instanceProps),D=!y||j==="backward"?Math.max(1,p):1,z=!y||j==="forward"?Math.max(1,p):1;return[Math.max(0,A-D),Math.max(0,Math.min(u-1,S+z)),A,S]},I}(T.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Ss=function(t,i){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,i.instance},Ds=As({getItemOffset:function(t,i){var r=t.itemSize;return i*r},getItemSize:function(t,i){var r=t.itemSize;return r},getEstimatedTotalSize:function(t){var i=t.itemCount,r=t.itemSize;return r*i},getOffsetForIndexAndAlignment:function(t,i,r,a,c,l){var m=t.direction,d=t.height,h=t.itemCount,M=t.itemSize,g=t.layout,I=t.width,v=m==="horizontal"||g==="horizontal",N=v?I:d,o=Math.max(0,h*M-N),u=Math.min(o,i*M),p=Math.max(0,i*M-N+M+l);switch(r==="smart"&&(a>=p-N&&a<=u+N?r="auto":r="center"),r){case"start":return u;case"end":return p;case"center":{var f=Math.round(p+(u-p)/2);return f<Math.ceil(N/2)?0:f>o+Math.floor(N/2)?o:f}case"auto":default:return a>=p&&a<=u?a:a<p?p:u}},getStartIndexForOffset:function(t,i){var r=t.itemCount,a=t.itemSize;return Math.max(0,Math.min(r-1,Math.floor(i/a)))},getStopIndexForStartIndex:function(t,i,r){var a=t.direction,c=t.height,l=t.itemCount,m=t.itemSize,d=t.layout,h=t.width,M=a==="horizontal"||d==="horizontal",g=i*m,I=M?h:c,v=Math.ceil((I+r-g)/m);return Math.max(0,Math.min(l-1,i+v-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});function zs(e){var t=e.lastRenderedStartIndex,i=e.lastRenderedStopIndex,r=e.startIndex,a=e.stopIndex;return!(r>i||a<t)}function ks(e){for(var t=e.isItemLoaded,i=e.itemCount,r=e.minimumBatchSize,a=e.startIndex,c=e.stopIndex,l=[],m=null,d=null,h=a;h<=c;h++){var M=t(h);M?d!==null&&(l.push(m,d),m=d=null):(d=h,m===null&&(m=h))}if(d!==null){for(var g=Math.min(Math.max(d,m+r-1),i-1),I=d+1;I<=g&&!t(I);I++)d=I;l.push(m,d)}if(l.length)for(;l[1]-l[0]+1<r&&l[0]>0;){var v=l[0]-1;if(!t(v))l[0]=v;else break}return l}var Os=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ws=function(){function e(t,i){for(var r=0;r<i.length;r++){var a=i[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(t,i,r){return i&&e(t.prototype,i),r&&e(t,r),t}}(),_s=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},oe=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},Cs=function(e){_s(t,e);function t(){var i,r,a,c;Os(this,t);for(var l=arguments.length,m=Array(l),d=0;d<l;d++)m[d]=arguments[d];return c=(r=(a=oe(this,(i=t.__proto__||Object.getPrototypeOf(t)).call.apply(i,[this].concat(m))),a),a._lastRenderedStartIndex=-1,a._lastRenderedStopIndex=-1,a._memoizedUnloadedRanges=[],a._onItemsRendered=function(h){var M=h.visibleStartIndex,g=h.visibleStopIndex;a._lastRenderedStartIndex=M,a._lastRenderedStopIndex=g,a._ensureRowsLoaded(M,g)},a._setRef=function(h){a._listRef=h},r),oe(a,c)}return ws(t,[{key:"resetloadMoreItemsCache",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this._memoizedUnloadedRanges=[],r&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){var r=this.props.children;return r({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(r,a){var c=this.props,l=c.isItemLoaded,m=c.itemCount,d=c.minimumBatchSize,h=d===void 0?10:d,M=c.threshold,g=M===void 0?15:M,I=ks({isItemLoaded:l,itemCount:m,minimumBatchSize:h,startIndex:Math.max(0,r-g),stopIndex:Math.min(m-1,a+g)});(this._memoizedUnloadedRanges.length!==I.length||this._memoizedUnloadedRanges.some(function(v,N){return I[N]!==v}))&&(this._memoizedUnloadedRanges=I,this._loadUnloadedRanges(I))}},{key:"_loadUnloadedRanges",value:function(r){for(var a=this,c=this.props.loadMoreItems||this.props.loadMoreRows,l=function(h){var M=r[h],g=r[h+1],I=c(M,g);I!=null&&I.then(function(){if(zs({lastRenderedStartIndex:a._lastRenderedStartIndex,lastRenderedStopIndex:a._lastRenderedStopIndex,startIndex:M,stopIndex:g})){if(a._listRef==null)return;typeof a._listRef.resetAfterIndex=="function"?a._listRef.resetAfterIndex(M,!0):(typeof a._listRef._getItemStyleCache=="function"&&a._listRef._getItemStyleCache(-1),a._listRef.forceUpdate())}})},m=0;m<r.length;m+=2)l(m)}}]),t}(T.PureComponent);const bs=n.styled_default("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),Es=n.styled_default("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),$s=n.styled_default("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),Ls=n.styled_default("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),Rs=n.styled_default("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),Qs=n.styled_default("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),Us=n.styled_default("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),qs=()=>n.i1,Ps=n.styled_default(qs())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0}),Ys=({rank:e,avatar:t,name:i,points:r,isCurrentUser:a,openItemDetail:c,style:l})=>s.jsxs(bs,{onClick:c,style:l,children:[s.jsx(Es,{children:e||0}),s.jsxs(Rs,{children:[t?s.jsx($s,{alt:"leaderboard-item-avatar",src:t}):s.jsx(Ls,{children:n.o$1(i||"")}),s.jsxs(Qs,{children:[s.jsx(Us,{children:i||""}),a&&s.jsx(Ps,{name:"icon-star"})]})]}),s.jsx("div",{children:n.i(r)})]}),Ws=n.styled_default("div")({name:"ScrollContainer",class:"s13d8sg6",propsAsIs:!1}),Fs=({items:e,currentUserId:t,openItemDetail:i,fetchMore:r})=>s.jsx(n.AutoSizer,{children:({width:a,height:c})=>s.jsx(Cs,{isItemLoaded:l=>l<e.length,itemCount:e.length+1,loadMoreItems:r,children:({onItemsRendered:l,ref:m})=>s.jsx(Ws,{children:s.jsx(Ds,{itemSize:56,onItemsRendered:l,ref:m,itemCount:e.length,width:a,height:c,children:({index:d,style:h})=>s.jsx(Ys,{style:{...h,maxHeight:48},...e[d],openItemDetail:()=>i(e[d].userId),isCurrentUser:!!t&&t===e[d].userId},e[d].userId)})})})}),Vs=({deepLink:e})=>{const{data:t}=n.useStore(e.$store);return s.jsx(n.O,{inviteLink:t==null?void 0:t.url,socialLinks:[{icon:"icon-facebook",link:"https://www.facebook.com/TheMasters",label:"Facebook"},{icon:"icon-twitter",link:"https://twitter.com/@TheMasters",label:"X"}],inviteCardTitle:"It’s more fun with friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})},Bs=({gamification:e})=>{const{data:t}=n.useStore(e.leaderboardList.$store);return t!=null&&t.length?s.jsx(Fs,{fetchMore:e.leaderboardList.fetchMore,items:t,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()}):s.jsx(Vs,{deepLink:e.deepLink})},Hs=n.styled_default("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),Gs=n.styled_default("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),Zs=n.styled_default("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),Js=n.styled_default("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),Ks=()=>n.i1,b=n.styled_default(Ks())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),Xs=()=>n.i1,en=n.styled_default(Xs())({name:"QuestionTypeIcon",class:"qxlt78s",propsAsIs:!0}),tn=n.styled_default("div")({name:"QuestionTypeLabel",class:"qmg0vkx",propsAsIs:!1}),sn=n.styled_default("div")({name:"QuestionContent",class:"q1uz5j1g",propsAsIs:!1}),nn=n.styled_default("button")({name:"PlayButton",class:"p1pba9p1",propsAsIs:!1}),rn={[n.PickHistoryStatus.LOST]:s.jsx(b,{name:"icon-cross"}),[n.PickHistoryStatus.WON]:s.jsx(b,{name:"icon-check"}),[n.PickHistoryStatus.UNSET]:s.jsx(b,{name:"icon-arrow"}),[n.PickHistoryStatus.DNP]:s.jsx(b,{name:"icon-arrow"})},an=({questionId:e,questionType:t,questionStatus:i,subject:r,openForVoting:a,openQuestion:c,status:l})=>{const m=n.o[t],d=rn[l];return m?s.jsxs(Hs,{onClick:()=>c==null?void 0:c(e),children:[s.jsxs(sn,{children:[s.jsxs(Gs,{children:[s.jsx(en,{name:m.iconName}),s.jsxs(tn,{children:[m.label,t===n.QuestionType.TRIVIA&&i===n.QuestionStatus.RESOLVED&&" • Expired"]})]}),s.jsx(Zs,{children:r||""})]}),s.jsx(Js,{children:a?s.jsx(nn,{children:"Play"}):d})]}):null},on=n.styled_default("div")({name:"Container",class:"cll3md7",propsAsIs:!1}),ln=n.styled_default("button")({name:"ActionBtn",class:"a10g1iik",propsAsIs:!1}),cn=({openInsight:e,questionId:t,...i})=>s.jsxs(on,{children:[s.jsx(fe,{questionId:t,...i}),e&&s.jsx(ln,{onClick:()=>e(t),children:"View Insight"})]}),dn=n.styled_default("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),un=({questions:e,openQuestion:t})=>s.jsx(dn,{children:e==null?void 0:e.map(i=>{var r,a;if(i.type==="question"&&((r=i.attributes)==null?void 0:r.attributes.case)==="question"){const c=i.attributes.attributes.value;return s.jsx(an,{openQuestion:t,...c},c.questionId)}if(i.type==="insight"&&((a=i.attributes)==null?void 0:a.attributes.case)==="insight"){const c=i.attributes.attributes.value;return s.jsx(cn,{openInsight:t,...c},c.questionId)}return null})}),pn=({store:e,openQuestion:t})=>{const i=n.useStore(e);return i!=null&&i.data?s.jsx(un,{openQuestion:t,questions:i.data}):s.jsx("div",{children:"wait questions..."})},mn=({userSummary:e})=>{var t,i;const r=n.useStore(e.getStore());return(t=r.data)!=null&&t.summary?s.jsx(de,{...r.data.summary,successRate:(i=r.data.percentage)==null?void 0:i.correct}):s.jsx("div",{children:"wait user..."})},fn=({gamification:e})=>{const[t,i]=T.useState(E.HOME);return s.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[s.jsx(n.a$1,{style:{paddingBottom:"4px"},children:s.jsx(ys,{activePage:t,toggleActivePage:i})}),t===E.HOME&&s.jsxs(n.r,{children:[s.jsx(n.a$1,{style:{paddingTop:"12px"},children:s.jsx(mn,{userSummary:e.userSummary})}),s.jsx(n.n$1,{children:s.jsx(pn,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),t===E.LEADERBOARD&&s.jsx("div",{className:"c1bp9dj2",children:s.jsx(Bs,{gamification:e})})]})},hn=()=>n.d,le=n.styled_default(hn())({name:"OpenedContainer",class:"oar61gl",propsAsIs:!0}),In=n.styled_default("div")({name:"UserContainer",class:"u14zaal4",propsAsIs:!1}),yn=({correct:e,incorrect:t})=>{const i=e+t;return i===0?0:Math.round(e/i*100)},gn=({gamification:e,className:t})=>{const i=n.useStore(e.openedQuestion.$store),r=n.useStore(e.openedUser);return s.jsxs(s.Fragment,{children:[i&&s.jsx(le,{className:t,children:s.jsx(ps,{gamification:e})}),r&&s.jsx(le,{className:t,children:s.jsxs(In,{children:[s.jsx(ce,{label:"Friend's Rank",close:e.closeUser}),s.jsx(n.a$1,{children:s.jsx(de,{...r,successRate:yn(r)})})]})}),s.jsx(n.r,{className:t,"data-nav":"true",children:s.jsx(fn,{gamification:e})})]})};exports.default=gn;