@streamlayer/react 1.16.0 → 1.17.1
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.
- package/lib/cjs/advertisement.js +30 -30
- package/lib/cjs/masters2.js +4 -4
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/provider.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/cjs/advertisement.js +30 -30
- package/lib/classic/cjs/bet-pack.js +5 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/provider.js +14 -30
- package/lib/classic/cjs/useStreamLayerApp2.js +12 -12
- package/lib/classic/es/advertisement.js +2064 -2062
- package/lib/classic/es/bet-pack.js +3431 -12
- package/lib/classic/es/index.js +1 -1
- package/lib/classic/es/notification.js +19 -19
- package/lib/classic/es/points.js +3 -3
- package/lib/classic/es/provider.js +3662 -3739
- package/lib/classic/es/useStreamLayerApp2.js +2688 -2688
- package/lib/classic/index.d.ts +1 -1
- package/lib/dist/cjs/masters.js +30 -30
- package/lib/dist/es/masters.js +7747 -7747
- package/lib/dist/style.css +1 -1
- package/lib/es/advertisement.js +2064 -2062
- package/lib/es/index2.js +1 -1
- package/lib/es/masters2.js +24 -24
- package/lib/es/points.js +3 -3
- package/lib/es/provider.js +7 -7
- package/lib/es/useStreamLayerApp2.js +2688 -2688
- package/lib/index.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +16 -16
- package/lib/classic/cjs/gamification-feature2.js +0 -1
- package/lib/classic/cjs/index2.js +0 -5
- package/lib/classic/cjs/masters.js +0 -1
- package/lib/classic/cjs/masters2.js +0 -13
- package/lib/classic/es/gamification-feature2.js +0 -4
- package/lib/classic/es/index2.js +0 -3426
- package/lib/classic/es/masters.js +0 -9
- package/lib/classic/es/masters2.js +0 -868
- package/lib/classic/style.css +0 -1
package/lib/cjs/provider.js
CHANGED
|
@@ -62,4 +62,4 @@ Error generating stack: `+a.message+`
|
|
|
62
62
|
display: none !important;
|
|
63
63
|
}
|
|
64
64
|
`,jo=()=>window.innerWidth>=ve.md&&window.innerWidth<ve.lg?76:53,Rl=e=>{var t;const n=jo();return Math.round((((t=e.current)==null?void 0:t.getBoundingClientRect().y)||0)-n)<=0},X0=({children:e,container:t,useContainer:n,staticStyles:r})=>{const[i]=w.useState(()=>Rl(t)),[a,l]=w.useState(!1);return w.useEffect(()=>{if(!t.current||!i)return l(!0),()=>{};const o=window.scrollY;return l(!0),()=>{Rl(t)&&window.scrollTo({top:o,behavior:"instant"})}},[]),w.useEffect(()=>{if(a&&t.current&&i){const o=jo();window.scrollTo({top:t.current.offsetTop-o,behavior:"instant"})}},[a]),!t.current||!a?null:n?V2.createPortal(s.jsxs(ic,{className:"StaticContainer",children:[e,s.jsx("style",{children:ac}),s.jsx("style",{children:lc})]}),t.current,"modal-node"):V2.createPortal(s.jsxs(s.Fragment,{children:[e,s.jsx("style",{children:r})]}),t.current,"modal-node")},sc=d("div")({name:"Container",class:"c1pgyo67",propsAsIs:!1}),oc="sx17qu6",cc="h1692c5m",ot=({children:e,style:t,className:n,enabled:r=!0,hiding:i,onAnimationEnd:a})=>s.jsx(sc,{style:t,className:we(n,r&&oc,r&&i&&cc),onAnimationEnd:a,children:e}),uc=()=>ot,dc=d(uc())({name:"GrowingContainer",class:"gck55ev",propsAsIs:!0}),Ao=({children:e,style:t,enabled:n,animate:r,...i})=>{const a=w.useRef(null);return s.jsx(dc,{...i,enabled:n&&r,style:{...t,...(()=>{const l=a==null?void 0:a.current,o=l&&window.getComputedStyle(l),c=o==null?void 0:o.getPropertyValue("height");return n?{height:r?c:0}:{}})()},children:s.jsx("div",{ref:a,children:e})})},_l=d("div")({name:"SponsorLogoWrap",class:"s8p5v5z",propsAsIs:!1}),pc=()=>O,Vl=d(pc())({name:"SponsorLogo",class:"s755yti",propsAsIs:!0}),$o=({mastersApp:e})=>e?s.jsx(_l,{children:s.jsx(Vl,{name:"mastersLogo"})}):s.jsx(_l,{children:s.jsx(Vl,{name:"streamLayerLogo"})}),fc=d("div")({name:"Container",class:"c1gcvmcj",propsAsIs:!1}),hc=d("div")({name:"Title",class:"tnr592a",propsAsIs:!1}),mc=d("div")({name:"Description",class:"d1e8jqpv",propsAsIs:!1}),Cc=()=>O,gc=d(Cc())({name:"Icon",class:"i1vs651k",propsAsIs:!0}),vc=({icon:e,title:t,description:n})=>s.jsxs(fc,{children:[s.jsx(gc,{name:e}),s.jsx(hc,{children:t}),s.jsx(mc,{children:n})]}),yc=()=>Ao,wc=d(yc())({name:"ShowInContainer",class:"s16sbdnm",propsAsIs:!0}),U1=d("div")({name:"FeedbackContainer",class:"fbhorgl",propsAsIs:!1}),Nl="s1g20ja7",bc=d("div")({name:"Container",class:"c455ozj",propsAsIs:!1}),xc=()=>O,Ml=d(xc())({name:"IconPrediction",class:"i1913njx",propsAsIs:!0}),Jt=d("div")({name:"FeedbackIconWrap",class:"fzfk69z",propsAsIs:!1}),sn=d("div")({name:"FeedbackHeader",class:"fx87qaj",propsAsIs:!1}),Ec=d("span")({name:"FeedbackTitle",class:"fvek9ew",propsAsIs:!1}),W1=d("span")({name:"FeedbackDescription",class:"f1kbtp09",propsAsIs:!1}),Lc=d("div")({name:"FeedbackTitleWrap",class:"f4i8rro",propsAsIs:!1}),kc=d("div")({name:"FeedbackResultDescriptionWrap",class:"fqyssr",propsAsIs:!1}),Sc=()=>W1,Ic=d(Sc())({name:"FeedbackDynamicDescription",class:"fyv794i",propsAsIs:!0}),Tc=()=>W1,jc=d(Tc())({name:"FeedbackResultDescription",class:"f1jkj9vx",propsAsIs:!0}),Gr=d("div")({name:"FeedbackText",class:"f1pxh3a6",propsAsIs:!1}),Ac=d("span")({name:"DynamicWrap",class:"d1afvufn",propsAsIs:!1}),$c=d("div")({name:"EarlyFeedbackDescription",class:"eq8u24d",propsAsIs:!1}),Ol=({feedbackMessages:e,questionVotedCorrectly:t,questionVoted:n,questionType:r,hasCorrectAnswer:i,showExpiredNotification:a,showClosedNotificationTrivia:l,votedInCurrentRender:o,votedAfterQuestionClosed:c,voteErrorMessage:u,enteredAnActiveQuestion:g,marketClosed:C,percentsAnimated:p,votedAnswer:y,isEarlyPrediction:x,correctAnswer:E,onAnimationEnd:L})=>{const m=n&&(r===k.QuestionType.TRIVIA||r===k.QuestionType.PREDICTION),f=r===k.QuestionType.PREDICTION&&!i,v=C&&r===k.QuestionType.PREDICTION&&!n||r===k.QuestionType.PREDICTION&&c&&o&&g,b=m&&f,S=m&&i,I=r===k.QuestionType.PREDICTION&&n&&o&&i,j=n&&r===k.QuestionType.POLL&&o,A=t?"correct":"incorrect",V=t?e==null?void 0:e.correctFeedback:e==null?void 0:e.incorrectFeedback;return a||l||b||S||v||j||I||u?s.jsx(wc,{enabled:o,animate:!u&&a?!0:p,onAnimationEnd:L,children:s.jsxs(bc,{"data-prediction":f,children:[u&&!v&&s.jsxs(U1,{children:[!x&&s.jsx(Ml,{name:"questionExpired"}),s.jsx(W1,{children:u})]}),!u&&a&&s.jsxs(U1,{children:[!x&&s.jsx(Jt,{children:s.jsx(O,{name:"questionExpired"})}),s.jsxs("div",{children:[s.jsx(sn,{children:s.jsx(W1,{children:"Question Expired"})}),s.jsx(Gr,{children:"You can still answer to see if you're correct, but no points are awarded for expired questions."})]})]}),!u&&l&&s.jsxs(U1,{className:we(Nl),children:[s.jsx(Jt,{children:s.jsx(O,{name:"questionExpired"})}),s.jsxs("div",{children:[s.jsx(sn,{children:s.jsx(W1,{children:"Question Closed"})}),s.jsx(Gr,{children:"This question was answered after the moderator closed the question. So the points for this answer won’t tally."})]})]}),v&&s.jsxs(U1,{children:[!x&&s.jsx(Jt,{children:s.jsx(O,{name:"questionExpired"})}),s.jsxs("div",{children:[s.jsx(sn,{children:s.jsx(W1,{children:x?i?"The results are already in!":"Question is Closed":"Question Closed"})}),s.jsx(Gr,{children:x?s.jsx($c,{children:i?`Correct: ${E==null?void 0:E.text}`:"Event affecting the outcome has occurred."}):"This event has already taken place, so the ability to make a prediction on its outcome is no longer available."})]})]}),!u&&b&&s.jsxs(U1,{children:[!x&&s.jsx(Ml,{name:"icon-prediction"}),s.jsxs(Ic,{children:["Your pick has been recorded. ",s.jsx(Ac,{children:"We’ll notify you of the result."})]})]}),!u&&j&&s.jsxs(U1,{children:[!x&&s.jsx(Jt,{"data-feedback-type":"correct",children:s.jsx(O,{name:"correct"})}),s.jsx(W1,{children:"Thanks for answering. Please stay tuned for the next question."})]}),!u&&(S||I)&&s.jsxs(U1,{className:we(l&&Nl),children:[!x&&s.jsx(Jt,{"data-feedback-type":A,children:s.jsx(O,{name:A})}),s.jsx("div",{children:s.jsxs(sn,{children:[x?s.jsx(Lc,{children:A==="incorrect"?s.jsxs(s.Fragment,{children:[s.jsx("div",{children:"So close!"}),s.jsx("div",{children:"Better luck next time"})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{children:"That’s correct!"}),s.jsx("div",{children:"You chose wisely."})]})}):s.jsx(Ec,{"data-feedback-type":A,children:V==null?void 0:V.title}),x?s.jsxs(kc,{children:[s.jsxs("div",{children:["Your pick: ",y==null?void 0:y.text]}),s.jsx("div",{children:A==="incorrect"?`Correct: ${E==null?void 0:E.text}`:""})]}):s.jsx(jc,{children:V==null?void 0:V.description})]})})]})]})}):null},Ro=d("div")({name:"Container",class:"c14ielyq",propsAsIs:!1}),Rc=()=>fs,_c=d(Rc())({name:"QuestionScrollContainer",class:"q1tlqx57",propsAsIs:!0}),Vc=d("div")({name:"TopShadow",class:"t1hq58md",propsAsIs:!1}),Nc=d("div")({name:"BottomShadow",class:"b1c8nxcx",propsAsIs:!1}),Mc=d("div")({name:"SponsorLogo",class:"siozuc3",propsAsIs:!1}),_o=d("div")({name:"Content",class:"cpnc44r",propsAsIs:!1}),Oc=d("div")({name:"Title",class:"tq7p3w0",propsAsIs:!1}),Pc=d("div")({name:"OptionsWrap",class:"o1jlfj9g",propsAsIs:!1}),Vo=d("div")({name:"Options",class:"o84pmnd",propsAsIs:!1}),Hc=()=>ot,Fc=d(Hc())({name:"AlertContainer",class:"a1dybjw9",propsAsIs:!0}),Dc=d("div")({name:"EarlyPrediction",class:"e1l05ict",propsAsIs:!1}),zc=()=>O,Bc=d(zc())({name:"EarlyPredictionIcon",class:"ez9juex",propsAsIs:!0}),Uc=()=>O,Zc=d(Uc())({name:"SponsorIcon",class:"s8p4aob",propsAsIs:!0});var J0={},Gn=function(){return Gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Gn.apply(this,arguments)},qc=function(){function e(t,n,r){var i=this;this.endVal=n,this.options=r,this.version="2.8.0",this.defaults={startVal:0,decimalPlaces:0,duration:2,useEasing:!0,useGrouping:!0,useIndianSeparators:!1,smartEasingThreshold:999,smartEasingAmount:333,separator:",",decimal:".",prefix:"",suffix:"",enableScrollSpy:!1,scrollSpyDelay:200,scrollSpyOnce:!1},this.finalEndVal=null,this.useEasing=!0,this.countDown=!1,this.error="",this.startVal=0,this.paused=!0,this.once=!1,this.count=function(a){i.startTime||(i.startTime=a);var l=a-i.startTime;i.remaining=i.duration-l,i.useEasing?i.countDown?i.frameVal=i.startVal-i.easingFn(l,0,i.startVal-i.endVal,i.duration):i.frameVal=i.easingFn(l,i.startVal,i.endVal-i.startVal,i.duration):i.frameVal=i.startVal+(i.endVal-i.startVal)*(l/i.duration);var o=i.countDown?i.frameVal<i.endVal:i.frameVal>i.endVal;i.frameVal=o?i.endVal:i.frameVal,i.frameVal=Number(i.frameVal.toFixed(i.options.decimalPlaces)),i.printValue(i.frameVal),l<i.duration?i.rAF=requestAnimationFrame(i.count):i.finalEndVal!==null?i.update(i.finalEndVal):i.options.onCompleteCallback&&i.options.onCompleteCallback()},this.formatNumber=function(a){var l,o,c,u,g=a<0?"-":"";l=Math.abs(a).toFixed(i.options.decimalPlaces);var C=(l+="").split(".");if(o=C[0],c=C.length>1?i.options.decimal+C[1]:"",i.options.useGrouping){u="";for(var p=3,y=0,x=0,E=o.length;x<E;++x)i.options.useIndianSeparators&&x===4&&(p=2,y=1),x!==0&&y%p==0&&(u=i.options.separator+u),y++,u=o[E-x-1]+u;o=u}return i.options.numerals&&i.options.numerals.length&&(o=o.replace(/[0-9]/g,function(L){return i.options.numerals[+L]}),c=c.replace(/[0-9]/g,function(L){return i.options.numerals[+L]})),g+i.options.prefix+o+c+i.options.suffix},this.easeOutExpo=function(a,l,o,c){return o*(1-Math.pow(2,-10*a/c))*1024/1023+l},this.options=Gn(Gn({},this.defaults),r),this.formattingFn=this.options.formattingFn?this.options.formattingFn:this.formatNumber,this.easingFn=this.options.easingFn?this.options.easingFn:this.easeOutExpo,this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.endVal=this.validateValue(n),this.options.decimalPlaces=Math.max(this.options.decimalPlaces),this.resetDuration(),this.options.separator=String(this.options.separator),this.useEasing=this.options.useEasing,this.options.separator===""&&(this.options.useGrouping=!1),this.el=typeof t=="string"?document.getElementById(t):t,this.el?this.printValue(this.startVal):this.error="[CountUp] target is null or undefined",typeof window<"u"&&this.options.enableScrollSpy&&(this.error?console.error(this.error,t):(window.onScrollFns=window.onScrollFns||[],window.onScrollFns.push(function(){return i.handleScroll(i)}),window.onscroll=function(){window.onScrollFns.forEach(function(a){return a()})},this.handleScroll(this)))}return e.prototype.handleScroll=function(t){if(t&&window&&!t.once){var n=window.innerHeight+window.scrollY,r=t.el.getBoundingClientRect(),i=r.top+window.pageYOffset,a=r.top+r.height+window.pageYOffset;a<n&&a>window.scrollY&&t.paused?(t.paused=!1,setTimeout(function(){return t.start()},t.options.scrollSpyDelay),t.options.scrollSpyOnce&&(t.once=!0)):(window.scrollY>a||i>n)&&!t.paused&&t.reset()}},e.prototype.determineDirectionAndSmartEasing=function(){var t=this.finalEndVal?this.finalEndVal:this.endVal;this.countDown=this.startVal>t;var n=t-this.startVal;if(Math.abs(n)>this.options.smartEasingThreshold&&this.options.useEasing){this.finalEndVal=t;var r=this.countDown?1:-1;this.endVal=t+r*this.options.smartEasingAmount,this.duration=this.duration/2}else this.endVal=t,this.finalEndVal=null;this.finalEndVal!==null?this.useEasing=!1:this.useEasing=this.options.useEasing},e.prototype.start=function(t){this.error||(this.options.onStartCallback&&this.options.onStartCallback(),t&&(this.options.onCompleteCallback=t),this.duration>0?(this.determineDirectionAndSmartEasing(),this.paused=!1,this.rAF=requestAnimationFrame(this.count)):this.printValue(this.endVal))},e.prototype.pauseResume=function(){this.paused?(this.startTime=null,this.duration=this.remaining,this.startVal=this.frameVal,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count)):cancelAnimationFrame(this.rAF),this.paused=!this.paused},e.prototype.reset=function(){cancelAnimationFrame(this.rAF),this.paused=!0,this.resetDuration(),this.startVal=this.validateValue(this.options.startVal),this.frameVal=this.startVal,this.printValue(this.startVal)},e.prototype.update=function(t){cancelAnimationFrame(this.rAF),this.startTime=null,this.endVal=this.validateValue(t),this.endVal!==this.frameVal&&(this.startVal=this.frameVal,this.finalEndVal==null&&this.resetDuration(),this.finalEndVal=null,this.determineDirectionAndSmartEasing(),this.rAF=requestAnimationFrame(this.count))},e.prototype.printValue=function(t){var n;if(this.el){var r=this.formattingFn(t);!((n=this.options.plugin)===null||n===void 0)&&n.render?this.options.plugin.render(this.el,r):this.el.tagName==="INPUT"?this.el.value=r:this.el.tagName==="text"||this.el.tagName==="tspan"?this.el.textContent=r:this.el.innerHTML=r}},e.prototype.ensureNumber=function(t){return typeof t=="number"&&!isNaN(t)},e.prototype.validateValue=function(t){var n=Number(t);return this.ensureNumber(n)?n:(this.error="[CountUp] invalid start or end value: ".concat(t),null)},e.prototype.resetDuration=function(){this.startTime=null,this.duration=1e3*Number(this.options.duration),this.remaining=this.duration},e}();const Qc=Object.freeze(Object.defineProperty({__proto__:null,CountUp:qc},Symbol.toStringTag,{value:"Module"})),Wc=L4(Qc);Object.defineProperty(J0,"__esModule",{value:!0});var oe=w,Gc=Wc;function Kc(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,l,o=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);c=!0);}catch(g){u=!0,i=g}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw i}}return o}}function Pl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Kn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Pl(Object(n),!0).forEach(function(r){Jc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pl(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yc(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xc(e){var t=Yc(e,"string");return typeof t=="symbol"?t:String(t)}function Jc(e,t,n){return t=Xc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qi(){return Qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qi.apply(this,arguments)}function eu(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function No(e,t){if(e==null)return{};var n=eu(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tu(e,t){return nu(e)||Kc(e,t)||ru(e,t)||iu()}function nu(e){if(Array.isArray(e))return e}function ru(e,t){if(e){if(typeof e=="string")return Hl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Hl(e,t)}}function Hl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function iu(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
65
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var au=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?oe.useLayoutEffect:oe.useEffect;function Ge(e){var t=oe.useRef(e);return au(function(){t.current=e}),oe.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var lu=function(t,n){var r=n.decimal,i=n.decimals,a=n.duration,l=n.easingFn,o=n.end,c=n.formattingFn,u=n.numerals,g=n.prefix,C=n.separator,p=n.start,y=n.suffix,x=n.useEasing,E=n.useGrouping,L=n.useIndianSeparators,m=n.enableScrollSpy,f=n.scrollSpyDelay,v=n.scrollSpyOnce,b=n.plugin;return new Gc.CountUp(t,o,{startVal:p,duration:a,decimal:r,decimalPlaces:i,easingFn:l,formattingFn:c,numerals:u,separator:C,prefix:g,suffix:y,plugin:b,useEasing:x,useIndianSeparators:L,useGrouping:E,enableScrollSpy:m,scrollSpyDelay:f,scrollSpyOnce:v})},su=["ref","startOnMount","enableReinitialize","delay","onEnd","onStart","onPauseResume","onReset","onUpdate"],ou={decimal:".",separator:",",delay:null,prefix:"",suffix:"",duration:2,start:0,decimals:0,startOnMount:!0,enableReinitialize:!0,useEasing:!0,useGrouping:!0,useIndianSeparators:!1},Mo=function(t){var n=Object.fromEntries(Object.entries(t).filter(function(V){var _=tu(V,2),J=_[1];return J!==void 0})),r=oe.useMemo(function(){return Kn(Kn({},ou),n)},[t]),i=r.ref,a=r.startOnMount,l=r.enableReinitialize,o=r.delay,c=r.onEnd,u=r.onStart,g=r.onPauseResume,C=r.onReset,p=r.onUpdate,y=No(r,su),x=oe.useRef(),E=oe.useRef(),L=oe.useRef(!1),m=Ge(function(){return lu(typeof i=="string"?i:i.current,y)}),f=Ge(function(V){var _=x.current;if(_&&!V)return _;var J=m();return x.current=J,J}),v=Ge(function(){var V=function(){return f(!0).start(function(){c==null||c({pauseResume:b,reset:S,start:j,update:I})})};o&&o>0?E.current=setTimeout(V,o*1e3):V(),u==null||u({pauseResume:b,reset:S,update:I})}),b=Ge(function(){f().pauseResume(),g==null||g({reset:S,start:j,update:I})}),S=Ge(function(){f().el&&(E.current&&clearTimeout(E.current),f().reset(),C==null||C({pauseResume:b,start:j,update:I}))}),I=Ge(function(V){f().update(V),p==null||p({pauseResume:b,reset:S,start:j})}),j=Ge(function(){S(),v()}),A=Ge(function(V){a&&(V&&S(),v())});return oe.useEffect(function(){L.current?l&&A(!0):(L.current=!0,A())},[l,L,A,o,t.start,t.suffix,t.prefix,t.duration,t.separator,t.decimals,t.decimal,t.formattingFn]),oe.useEffect(function(){return function(){S()}},[S]),{start:j,pauseResume:b,reset:S,update:I,getCountUp:f}},cu=["className","redraw","containerProps","children","style"],uu=function(t){var n=t.className,r=t.redraw,i=t.containerProps,a=t.children,l=t.style,o=No(t,cu),c=oe.useRef(null),u=oe.useRef(!1),g=Mo(Kn(Kn({},o),{},{ref:c,startOnMount:typeof a!="function"||t.delay===0,enableReinitialize:!1})),C=g.start,p=g.reset,y=g.update,x=g.pauseResume,E=g.getCountUp,L=Ge(function(){C()}),m=Ge(function(b){t.preserveValue||p(),y(b)}),f=Ge(function(){if(typeof t.children=="function"&&!(c.current instanceof Element)){console.error(`Couldn't find attached element to hook the CountUp instance into! Try to attach "containerRef" from the render prop to a an Element, eg. <span ref={containerRef} />.`);return}E()});oe.useEffect(function(){f()},[f]),oe.useEffect(function(){u.current&&m(t.end)},[t.end,m]);var v=r&&t;return oe.useEffect(function(){r&&u.current&&L()},[L,r,v]),oe.useEffect(function(){!r&&u.current&&L()},[L,r,t.start,t.suffix,t.prefix,t.duration,t.separator,t.decimals,t.decimal,t.className,t.formattingFn]),oe.useEffect(function(){u.current=!0},[]),typeof a=="function"?a({countUpRef:c,start:C,reset:p,update:y,pauseResume:x,getCountUp:E}):oe.createElement("span",Qi({className:n,ref:c,style:l},i),typeof t.start<"u"?E().formattingFn(t.start):"")},du=J0.default=uu;J0.useCountUp=Mo;const hr=({value:e=0,decimals:t,duration:n=1,preserveValue:r=!0,...i})=>{const[,a]=e.toString().split("."),l=t??((a==null?void 0:a.length)||0);return s.jsx(du,{end:e,...i,duration:n,decimals:l,enableScrollSpy:!1,preserveValue:r})},pu=d("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),fu=d("div")({name:"ButtonPctWrap",class:"b4iik8i",propsAsIs:!1}),hu=d("div")({name:"ButtonPct",class:"b1gq1lnf",propsAsIs:!1}),mu=d("span")({name:"ButtonBody",class:"b1j65z51",propsAsIs:!1}),Cu=d("div")({name:"IconContainer",class:"i19tpfua",propsAsIs:!1}),gu=d("div")({name:"IconWrap",class:"i1tubmma",propsAsIs:!1}),Oo=d("img")({name:"Icon",class:"i1grrgwj",propsAsIs:!1}),vu=()=>Oo,yu=d(vu())({name:"IconDefault",class:"ibemyq8",propsAsIs:!0}),wu=()=>Oo,bu=d(wu())({name:"IconCircle",class:"i1dceht",propsAsIs:!0}),xu=d("span")({name:"Title",class:"t116q4vq",propsAsIs:!1}),Eu=d("span")({name:"Indicators",class:"i17ajcu2",propsAsIs:!1}),Lu=d("div")({name:"PtsWrap",class:"pu9kmlb",propsAsIs:!1}),ku=d("span")({name:"Pts",class:"p1j2j0s0",propsAsIs:!1}),Su=d("span")({name:"Percentage",class:"p1mzj1sj",propsAsIs:!1}),Iu=()=>O,Tu=d(Iu())({name:"CheckIcon",class:"cichgz8",propsAsIs:!0}),Fl={[k.QuestionImages.CENTERED]:e=>s.jsx(yu,{"data-testid":"vote-icon",alt:"option-icon",src:e}),[k.QuestionImages.TRANSPARENT]:e=>s.jsx(Cu,{"data-testid":"vote-icon",children:s.jsx(gu,{style:{backgroundImage:`url(${e})`}})}),[k.QuestionImages.ROUNDED]:e=>s.jsx(bu,{"data-testid":"vote-icon",alt:"option-icon",src:e}),[k.QuestionImages.NONE]:()=>null,[k.QuestionImages.UNSET]:()=>null},ju=({questionType:e,hasCorrectAnswer:t,correct:n,youVoted:r,questionVoted:i})=>{if(e===k.QuestionType.POLL&&r)return"voted";if(e===k.QuestionType.PREDICTION){if(!t&&i)return r?"voted":"unset";if(t&&i)return r?n?"correct":"incorrect":"unset";if(r)return"correct"}return e===k.QuestionType.TRIVIA&&i&&r?n?"correct":"incorrect":"unset"},Au=({questionType:e,questionVoted:t,correct:n,hasCorrectAnswer:r,questionStatus:i})=>e===k.QuestionType.TRIVIA?t&&n:e===k.QuestionType.PREDICTION?t&&n&&r||i===k.QuestionStatus.RESOLVED&&n:!1,$u=e=>{var t;const{id:n,icon:r,text:i,percentageDecimal:a,points:l,onVote:o,markThatVoted:c,onPercentsAnimated:u,youSelected:g,youVoted:C,questionVoted:p,imageMode:y,answerTimeExpired:x,questionStatus:E,isLoading:L,questionType:m,correct:f,hasCorrectAnswer:v,marketClosed:b,isEarlyPrediction:S}=e,[I,j]=w.useState(0),A=ju(e),V=Au({questionType:m,questionVoted:p,correct:f,hasCorrectAnswer:v,questionStatus:E}),_=b&&m===k.QuestionType.PREDICTION,J=p||_,Oe=m===k.QuestionType.PREDICTION&&!p&&!b,Ze=p&&!g&&A!=="incorrect"&&!C;return w.useLayoutEffect(()=>{j(0),requestAnimationFrame(()=>{j(a)})},[a]),s.jsxs(pu,{value:n,"data-selected":g,"data-answer-state":A,disabled:p||L||x||_,"data-is-not-checked":Ze,"data-a":"intr",onClick:ct=>{c(m===k.QuestionType.PREDICTION?b:E===k.QuestionStatus.RESOLVED),o(ct)},children:[s.jsx(fu,{children:s.jsx(hu,{"data-answer-state":A,"data-is-not-checked":Ze,style:{width:`${J?I:0}%`},onTransitionEnd:()=>{_||u==null||u()}})}),s.jsxs(mu,{"data-a":"intr",children:[r&&y&&((t=Fl[y])==null?void 0:t.call(Fl,r)),s.jsx(xu,{"data-a":"intr",children:i}),Oe&&s.jsxs(Lu,{children:[l,s.jsx(ku,{children:"pts"})]}),J&&s.jsxs(Eu,{children:[V&&s.jsx(Tu,{name:S?"selectedBetPack":"selected"}),s.jsx(Su,{children:s.jsx(hr,{value:a,suffix:"%"})})]})]})]})},Ru=()=>Ao,_u=d(Ru())({name:"ShowInContainer",class:"sie6cqo",propsAsIs:!0}),Vu=d("div")({name:"WinBarContainer",class:"wgizw4u",propsAsIs:!1}),Nu=d("div")({name:"Content",class:"c1l3ucjp",propsAsIs:!1}),Mu=d("div")({name:"Title",class:"tx7j799",propsAsIs:!1}),Ou=()=>O,Pu=d(Ou())({name:"WinIcon",class:"w4lwuj0",propsAsIs:!0}),Hu=d("div")({name:"Points",class:"po9i64o",propsAsIs:!1}),Fu=d("span")({name:"PointsCount",class:"pe5g05h",propsAsIs:!1}),Du=d("span")({name:"PointsUnits",class:"p1hdtpmb",propsAsIs:!1}),zu=({title:e,points:t,isPlayingTimer:n,isTimer:r,animatePoints:i,questionType:a,timerDuration:l,votedInCurrentRender:o,percentsAnimated:c,onTimerExpired:u})=>s.jsx(_u,{enabled:a===k.QuestionType.PREDICTION&&o,animate:c,children:s.jsxs(Vu,{style:{justifyContent:a===k.QuestionType.PREDICTION?"center":"space-between"},children:[s.jsxs(Nu,{children:[e&&s.jsx(Mu,{children:e}),t!==void 0&&a!==k.QuestionType.POLL&&s.jsxs(s.Fragment,{children:[s.jsx(Pu,{name:"icon-trophy"}),s.jsxs(Hu,{children:[s.jsx(Fu,{children:i?s.jsx(hr,{value:t,delay:.3}):t}),s.jsx(Du,{children:"PTS"})]})]})]}),r&&a!==k.QuestionType.PREDICTION&&s.jsx(m7,{isPlaying:n,onTimerExpired:u,duration:l})]})}),Bu=(e,t)=>{switch(e){case"already_voted":return t===k.QuestionType.POLL?"You’ve already answered this question on another device.":"You’ve already answered this question on another device. So the points for this answer won't tally.";default:return"Something went wrong, please try again"}},Po=()=>s.jsx(Ro,{children:s.jsxs(_o,{children:[s.jsx($e,{loading:!0,style:{height:"40px",borderRadius:"100px"}}),s.jsx($e,{loading:!0,style:{height:"24px",margin:"16px 0"}}),s.jsx(Vo,{children:Array.from({length:5}).map((e,t)=>s.jsx($e,{loading:!0,style:{height:"44px"}},t))})]})}),Ho=({openedQuestion:e,isLoading:t,vote:n,close:r,isEarlyPrediction:i})=>{var a,l;const o=e.subject,c=e.type,u=e.status,g=(a=e.options)==null?void 0:a.options,C=e.marketClosed,p=e.id,y=w.useRef(),[x,E]=w.useState(!1),[L,m]=w.useState(!1),[f,v]=w.useState(!0),[b,S]=w.useState(!1),[I,j]=w.useState(!1),[A,V]=w.useState(""),[_,J]=w.useState(""),[Oe,Ze]=w.useState(!1),[ct,Cr]=w.useState(!1),{runAnimation:v1,finished:ut}=r0();w.useEffect(()=>{ut&&r()},[r,ut]),w.useEffect(()=>{c===k.QuestionType.PREDICTION?C&&v(!1):u===k.QuestionStatus.RESOLVED&&v(!1)},[]);const $=w.useCallback(re=>{m(re),E(!0)},[]),N=w.useCallback(()=>{i&&E(!1)},[i]),M=w.useRef(!1),Z=w.useCallback(async re=>{if(!M.current&&(M.current=!0,p)){const l1=re.currentTarget.value;V(l1);try{await n(p,l1)}catch(F2){J(Bu(F2.message,c)),V(""),console.error("Error while voting",F2),M.current=!1}}},[c,p,V,n]),te=w.useCallback(()=>{S(!0),v1({delay:3500})},[v1]),dt=w.useCallback(()=>{j(!0),v1({delay:3500})},[v1]),P=e==null?void 0:e.answers.find(re=>re.youVoted===!0),le=w.useMemo(()=>!!(e!=null&&e.answers.find(re=>re.correct===!0)),[e]),Y=w.useMemo(()=>e==null?void 0:e.answers.find(re=>re.correct===!0),[e]);w.useEffect(()=>{P&&x&&!ct&&(y.current=setTimeout(dt,1e4),Cr(!0))},[P]),w.useEffect(()=>()=>{clearTimeout(y.current)},[]);const y1=w.useMemo(()=>e?e.answers.map(re=>{var l1;return{...re,questionVoted:!!P,youSelected:A===re.id,isLoading:t,hasCorrectAnswer:le,questionType:e.type,answerTimeExpired:b,questionStatus:u,imageMode:(l1=e.appearance)==null?void 0:l1.images,onVote:Z}}):[],[le,b,t,e,P,u,Z,A]);w.useEffect(()=>{const re=y1.some(({percentageDecimal:F2})=>F2!==0),l1=P&&c===k.QuestionType.PREDICTION;_&&(i||!re||C&&l1)&&Ze(!0)},[y1,_,i,C,c,P]);const ra=g&&(g.case==="trivia"||g.case==="prediction")?g.value:void 0,B1=u===k.QuestionStatus.RESOLVED&&c===k.QuestionType.TRIVIA&&!P&&!f,gr=c===k.QuestionType.TRIVIA&&L,vr=w.useMemo(()=>c===k.QuestionType.PREDICTION?i?!1:!!(P&&!le||P&&le&&Y!=null&&Y.youVoted):!0,[c,P,le,Y,i]),C4=w.useMemo(()=>{if(c===k.QuestionType.PREDICTION&&P&&(!le||le&&Y!=null&&Y.youVoted))return P.points;if(!(B1||b))return P?P.correct?P.pointsEarned:0:Y==null?void 0:Y.points},[b,P,Y,B1,c,le]),g4=w.useMemo(()=>c===k.QuestionType.PREDICTION&&P?le?le&&Y!=null&&Y.youVoted?"You won":"":"To win":B1||b?"Time expired":c===k.QuestionType.POLL?"Time remaining":P?"You won":"To win",[b,c,P,B1,le,Y]),v4=!vr||vr&&c===k.QuestionType.PREDICTION&&x&&!Oe,y4=(c===k.QuestionType.TRIVIA||c===k.QuestionType.PREDICTION)&&P&&le&&(Y==null?void 0:Y.youVoted),w4=P||B1||gr||c===k.QuestionType.TRIVIA&&u===k.QuestionStatus.RESOLVED&&f;return s.jsxs(_c,{children:[i&&s.jsx(Vc,{}),s.jsx(Ro,{style:i?{marginTop:"-40px"}:{},children:s.jsxs(_o,{children:[!i&&s.jsx(Ol,{feedbackMessages:ra,questionVoted:!!P,questionVotedCorrectly:P==null?void 0:P.correct,questionType:c,hasCorrectAnswer:le,showExpiredNotification:B1,showClosedNotificationTrivia:gr,votedInCurrentRender:x,votedAfterQuestionClosed:L,enteredAnActiveQuestion:f,marketClosed:C,percentsAnimated:Oe,voteErrorMessage:_,votedAnswer:P}),vr&&s.jsx(zu,{title:g4,points:C4,onTimerExpired:te,questionType:e.type,isTimer:!t,isPlayingTimer:!P,animatePoints:y4,timerDuration:w4?0:Number(((l=e==null?void 0:e.appearance)==null?void 0:l.autoHideInterval)||"30"),votedInCurrentRender:x,percentsAnimated:Oe}),!i&&(b||I)?s.jsx(Fc,{children:s.jsx(vc,{icon:"icon-check-circle",title:"More to come...",description:I?s.jsxs(s.Fragment,{children:["Stay tuned for more questions ",s.jsx("br",{})," and insights."]}):s.jsxs(s.Fragment,{children:["Watch for additional enhanced stream ",s.jsx("br",{})," interactive experience."]})})}):s.jsxs(s.Fragment,{children:[i&&s.jsxs(Dc,{children:[s.jsx(Bc,{name:"iconEarlyPrediction"}),"EARLY PREDICTION"]}),s.jsx(Oc,{style:v4?{marginTop:0}:{},children:o}),i&&s.jsx(Ol,{feedbackMessages:ra,questionVoted:!!P,questionVotedCorrectly:P==null?void 0:P.correct,questionType:c,hasCorrectAnswer:le,showExpiredNotification:B1,showClosedNotificationTrivia:gr,votedInCurrentRender:x,votedAfterQuestionClosed:L,enteredAnActiveQuestion:f,marketClosed:C,percentsAnimated:Oe,voteErrorMessage:_,isEarlyPrediction:i,correctAnswer:Y,votedAnswer:P,onAnimationEnd:N}),s.jsxs(Pc,{children:[s.jsx(Vo,{children:y1.sort((re,l1)=>re.id>l1.id?1:-1).map(re=>s.jsx($u,{...re,markThatVoted:$,onPercentsAnimated:()=>Ze(!0),votedAfterQuestionClosed:L,enteredAnActiveQuestion:f,marketClosed:C,isEarlyPrediction:i},re.id))}),i&&s.jsxs(s.Fragment,{children:[s.jsx(Nc,{}),s.jsx(Mc,{children:s.jsx(Zc,{name:"mastersLogoWhite"})})]})]})]})]})})]})},Fo=({height:e="37px",width:t="37px"})=>s.jsx("div",{style:{height:e,width:t},children:s.jsx(O,{name:"loader"})}),Uu=d("div")({name:"Container",class:"c1bgb86j",propsAsIs:!1}),Zu=d("video")({name:"Player",class:"p6703cq",propsAsIs:!1}),qu=d("img")({name:"Poster",class:"p12ow7zo",propsAsIs:!1}),Dl=d("div")({name:"Control",class:"cdpal9o",propsAsIs:!1}),Qu="t1xke4ml",Wu="h1yzxv57",Gu=e=>{for(const t of e)t.isIntersecting?t.target instanceof HTMLVideoElement&&t.target.autoplay&&t.target.play():t.target instanceof HTMLVideoElement&&!t.target.paused&&t.target.pause()},Do=new IntersectionObserver(Gu,{threshold:.5}),ea=new Set,Ku=e=>{Do.observe(e),ea.add(e)},Yu=e=>{Do.unobserve(e),ea.delete(e)},zo=()=>{for(const e of ea)e instanceof HTMLVideoElement&&!e.paused&&e.pause()},mr=({poster:e,source:t,aspectRatio:n,controlVideo:r,onPlay:i,onPause:a,autoPlay:l,hideControls:o,className:c})=>{const u=w.useRef(null),[g,C]=w.useState(!1),[p,y]=w.useState(!1),[x,E]=w.useState(!0),L=w.useCallback(()=>{r==null||r({muted:!0})},[r]),m=w.useCallback(()=>{r==null||r({muted:!1})},[r]),f=b=>{b.stopPropagation();const S=u==null?void 0:u.current;if(S){if(g)S.pause();else{const I=u==null?void 0:u.current;if(!I)return;zo(),I.play().catch(j=>console.log(j)),E(!1)}_t.emit("interactions",{action:"tap",payload:{}})}},v=()=>{var b;(b=u==null?void 0:u.current)==null||b.load(),E(!0)};return w.useEffect(()=>{const b=u==null?void 0:u.current;return()=>{b&&(b.paused||m())}},[m]),w.useEffect(()=>{const b=u.current;return b?(Ku(b),()=>Yu(b)):()=>{}},[]),s.jsxs(Uu,{onClick:o?void 0:f,"data-a":"intr",className:we(g&&Qu,o&&Wu,c),style:n?{aspectRatio:n}:{},children:[s.jsx(Zu,{ref:u,src:t,autoPlay:l,onPlay:()=>{L(),C(!0),E(!1),i==null||i()},onError:async b=>{try{if(b.target instanceof HTMLVideoElement){y(!0);const S=await(await fetch(b.target.src)).blob(),I=URL.createObjectURL(S);b.target.src=I}}catch(S){console.error("video fallback fetch failed",S),C(!0),E(!0)}finally{y(!1)}},onPause:()=>{m(),C(!1),a==null||a()},onEnded:()=>{m(),C(!1),v()},style:{visibility:x?"hidden":"visible"},controls:!1,playsInline:!0}),s.jsx(qu,{src:e,style:{visibility:x?"visible":"hidden"}}),!o&&!p&&s.jsx(Dl,{children:g?s.jsx(O,{name:"icon-pause"}):s.jsx(O,{name:"icon-play"})}),p&&s.jsx(Dl,{children:s.jsx(Fo,{})})]})},Xu=d("div")({name:"Container",class:"cgn5uen",propsAsIs:!1}),zl="c1px8nt6",Ju=d("div")({name:"Content",class:"c5et2jt",propsAsIs:!1}),ed=d("h3")({name:"Title",class:"t1i2kpk2",propsAsIs:!1}),td=d("div")({name:"Description",class:"dd3lh3p",propsAsIs:!1}),nd=d("img")({name:"Image",class:"i1gfjeu5",propsAsIs:!1}),rd=d("div")({name:"ImageContainer",class:"i58y999",propsAsIs:!1}),Bo=({instantView:e,isDetail:t,notification:n,controlVideo:r})=>{const i=e==null?void 0:e.heading,a=e==null?void 0:e.body,l=i||a,o=n==null?void 0:n.title,c=n==null?void 0:n.body;return s.jsxs(Xu,{children:[(e==null?void 0:e.video)&&s.jsx(mr,{className:zl,source:e.video.url,poster:e.video.thumbnailUrl,controlVideo:r,autoPlay:t&&e.autoPlayVideo===k.AutoPlayVideo.ENABLED}),(e==null?void 0:e.image)&&!(e!=null&&e.video)&&s.jsx(rd,{className:zl,"data-rounded":e.imageMode===k.QuestionImages.ROUNDED,children:s.jsx(nd,{src:e==null?void 0:e.image})}),s.jsxs(Ju,{children:[s.jsx(ed,{children:t&&l?i:o}),s.jsx(td,{children:t&&l?a:c})]})]})},id=d("div")({name:"Container",class:"c1euiow",propsAsIs:!1}),ad=d("a")({name:"WebLinkBtn",class:"w19zie3h",propsAsIs:!1}),ld=()=>O,sd=d(ld())({name:"WebLinkIcon",class:"wyg5v7z",propsAsIs:!0}),Uo=({instantView:e,...t})=>s.jsxs(id,{children:[s.jsx(Bo,{instantView:e,...t,isDetail:!0}),(e==null?void 0:e.webLink)&&s.jsxs(ad,{href:e==null?void 0:e.webLink.url,target:"_blank","data-a":"web-link",children:[e==null?void 0:e.webLink.label,s.jsx(sd,{name:"icon-external-link"})]})]}),od=d("div")({name:"Container",class:"cjq447q",propsAsIs:!1}),cd=d("div")({name:"ImageContainer",class:"i14egogb",propsAsIs:!1}),ud=d("img")({name:"Image",class:"i2g9g4l",propsAsIs:!1}),dd=()=>O,pd=d(dd())({name:"TwitterIcon",class:"t1c454nm",propsAsIs:!0}),fd=d("div")({name:"Details",class:"d11nigc3",propsAsIs:!1}),hd=d("div")({name:"Name",class:"nrxa4k8",propsAsIs:!1}),md=d("div")({name:"UserNameAndDate",class:"u1p051g3",propsAsIs:!1}),Zo=({image:e,name:t,userName:n,verified:r,createdTweet:i})=>{const a=i&&j7(i);return s.jsxs(od,{children:[e&&s.jsxs(cd,{children:[s.jsx(ud,{className:"SL_AccountImage",src:e}),s.jsx(pd,{name:"twitter"})]}),s.jsxs(fd,{children:[t&&s.jsxs(hd,{className:"SL_TweetAccountName",children:[t," ",r&&s.jsx(O,{name:"icon-twitter-verified"})]}),n&&s.jsxs(md,{className:"SL_TweetAccountUserName",children:["@",n," ",a&&`・ ${a}`]})]})]})},Cd=d("div")({name:"Container",class:"c1kzqw87",propsAsIs:!1}),gd=d("div")({name:"Details",class:"d9r1hf9",propsAsIs:!1}),vd=d("div")({name:"Body",class:"bezygt5",propsAsIs:!1}),e2=d("div")({name:"ImagesContainer",class:"i1y8f7ym",propsAsIs:!1}),Kr=d("div")({name:"ImagesBlock",class:"i18gwonx",propsAsIs:!1}),qo=d("img")({name:"Image",class:"i3g0xjd",propsAsIs:!1}),yd=()=>qo,x1=d(yd())({name:"ImageFullSize",class:"io8rt7p",propsAsIs:!0}),wd=()=>qo,Yr=d(wd())({name:"ImageHalfSize",class:"i4hn3ox",propsAsIs:!0}),bd=new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"),Qo=e=>e==null?void 0:e.replace(bd,""),ta=w.memo(({image:e,body:t,account:n,accountVerified:r,tweet:i,isDetail:a,controlVideo:l})=>{var o,c,u,g,C;const p=(c=(o=i==null?void 0:i.meta)==null?void 0:o.extendedEntities)==null?void 0:c.media,y=p==null?void 0:p.find(({type:E})=>E==="photo"),x=w.useMemo(()=>{var E,L,m,f;return(f=(m=(L=(E=p==null?void 0:p[0])==null?void 0:E.videoInfo)==null?void 0:L.variants)==null?void 0:m.findLast(({contentType:v})=>v==="video/mp4"))==null?void 0:f.url},[p]);return s.jsxs(Cd,{children:[s.jsxs(gd,{children:[s.jsx(Zo,{image:e,name:(u=i==null?void 0:i.meta)==null?void 0:u.accountName,userName:n,verified:r,createdTweet:i==null?void 0:i.date}),s.jsx(vd,{children:Qo(t)}),!a&&y&&s.jsx(e2,{children:s.jsx(x1,{src:p==null?void 0:p[0].mediaUrlHttps})}),a&&y&&s.jsxs(s.Fragment,{children:[(p==null?void 0:p.length)===1&&s.jsx(e2,{children:s.jsx(x1,{src:p[0].mediaUrlHttps})}),(p==null?void 0:p.length)===2&&s.jsxs(e2,{children:[s.jsx(Yr,{src:p[0].mediaUrlHttps}),s.jsx(Yr,{src:p[1].mediaUrlHttps})]}),(p==null?void 0:p.length)===3&&s.jsxs(e2,{children:[s.jsx(Yr,{src:p[0].mediaUrlHttps}),s.jsxs(Kr,{children:[s.jsx(x1,{src:p[1].mediaUrlHttps}),s.jsx(x1,{src:p[2].mediaUrlHttps})]})]}),(p==null?void 0:p.length)===4&&s.jsxs(e2,{children:[s.jsxs(Kr,{children:[s.jsx(x1,{src:p[0].mediaUrlHttps}),s.jsx(x1,{src:p[1].mediaUrlHttps})]}),s.jsxs(Kr,{children:[s.jsx(x1,{src:p[2].mediaUrlHttps}),s.jsx(x1,{src:p[3].mediaUrlHttps})]})]})]})]}),!y&&(((g=p==null?void 0:p[0])==null?void 0:g.type)==="video"||((C=p==null?void 0:p[0])==null?void 0:C.type)==="animated_gif")&&x&&s.jsx(mr,{source:x,poster:p[0].mediaUrlHttps,controlVideo:l})]})}),xd=d("div")({name:"Container",class:"c1dcxmvf",propsAsIs:!1}),Ed=d("blockquote")({name:"Quote",class:"qb4q22c",propsAsIs:!1}),Wo=e=>s.jsxs(xd,{children:[e.title&&s.jsx(Ed,{children:e.title}),s.jsx(ta,{...e,isDetail:!0})]}),Ld=d("div")({name:"QuestionContainer",class:"q14ckf9e",propsAsIs:!1}),kd=({openedQuestion:e})=>{var t,n;const{sdk:r}=Xn();return((t=e==null?void 0:e.attributes)==null?void 0:t.attributes.case)==="insight"?s.jsx(Uo,{...e.attributes.attributes.value,controlVideo:r==null?void 0:r.controlVideoPlayer}):((n=e==null?void 0:e.attributes)==null?void 0:n.attributes.case)==="tweet"?s.jsx(Wo,{...e.attributes.attributes.value,controlVideo:r==null?void 0:r.controlVideoPlayer}):null},Sd=({extendedQuestion:e,vote:t,close:n})=>{const{loading:r,data:i}=e;return i?s.jsx(Ho,{vote:t,close:n,openedQuestion:i,isLoading:!!r}):s.jsx(Po,{})},Go=({gamification:e,skipAutoClose:t,hideSponsor:n,className:r,hideHeader:i})=>{var a,l,o,c,u;const g=F(e.openedQuestion.$store),C=F(e.openedQuestion.$extendedStore);if(!g)return null;const p=g.type,y=((l=(a=C.data)==null?void 0:a.options)==null?void 0:l.options.case)==="factoid"?C.data.options.options.value.closeTimer:void 0;return s.jsxs(Ld,{className:r,children:[!i&&s.jsx(a0,{closeTimer:t?void 0:y,close:e.closeQuestion,type:((o=g.attributes)==null?void 0:o.type)||k.QuestionType.UNSET}),p==="question"&&s.jsx(Sd,{vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:C}),p!=="question"&&s.jsx(kd,{openedQuestion:g}),!n&&s.jsx($o,{sponsorLogo:(u=(c=C.data)==null?void 0:c.sponsorship)==null?void 0:u.logo})]})},Id=d("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),Td=d("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),jd=d("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),Ad=d("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var l2=(e=>(e.HOME="home",e.LEADERBOARD="leaderboard",e))(l2||{});const Bl=({title:e,active:t,onClick:n})=>s.jsx(jd,{"data-a":"intr",onClick:n,"data-selected":t,children:s.jsx(Ad,{"data-a":"intr",children:e})}),$d=({activePage:e="home",toggleActivePage:t})=>s.jsx(Id,{children:s.jsxs(Td,{"data-position":e==="home"?"left":"right",children:[s.jsx(Bl,{title:"Home",active:e==="home",onClick:()=>t("home")}),s.jsx(Bl,{title:"Friends",active:e==="leaderboard",onClick:()=>t("leaderboard")})]})}),Rd=d("button")({name:"Container",class:"cpjnajb",propsAsIs:!1}),_d=d("div")({name:"Content",class:"c4m6kaz",propsAsIs:!1}),Vd=d("span")({name:"Title",class:"t1h8t9cc",propsAsIs:!1}),Nd=()=>s.jsx(Rd,{children:s.jsxs(_d,{children:[s.jsx(O,{name:"iconCopySuccess"}),s.jsx(Vd,{children:"Link Copied to Clipboard"})]})}),Ko=e=>{const t=w.useRef(),[n,r]=w.useState(null),i=w.useCallback(async a=>{var l;if(a&&(l=navigator==null?void 0:navigator.clipboard)!=null&&l.writeText){t.current&&(clearTimeout(t.current),r(null));try{await navigator.clipboard.writeText(a),e.current&&(r(V2.createPortal(s.jsx(Nd,{}),e.current)),t.current=setTimeout(()=>{r(null)},1e3))}catch(o){console.error("Unable to copy to clipboard",o)}}},[e]);return w.useEffect(()=>()=>{clearTimeout(t.current)},[]),[i,n]},Md=d("div")({name:"Container",class:"c1ux29ft",propsAsIs:!1}),Od=()=>O,Pd=d(Od())({name:"FriendsIcon",class:"f10ncfg2",propsAsIs:!0}),Hd=d("div")({name:"Content",class:"c1yc07bd",propsAsIs:!1}),Fd=d("div")({name:"Title",class:"tj6cq7w",propsAsIs:!1}),Dd=d("div")({name:"Description",class:"d1ag78xo",propsAsIs:!1}),zd=()=>O,Bd=d(zd())({name:"ArrowInviteIcon",class:"awohrz6",propsAsIs:!0}),Ud=({title:e,description:t,onClick:n,className:r})=>{const[i]=vs({type:"invitation",action:"sent",payload:{from:k.InvitationFrom.TITLE_CARD}});return s.jsxs(Md,{"data-a":"intr",onClick:i(n),className:r,children:[s.jsx(Pd,{name:"icon-friends"}),s.jsxs(Hd,{children:[s.jsx(Fd,{children:e}),s.jsx(Dd,{children:t})]}),s.jsx(Bd,{name:"icon-copy"})]})};let ze;typeof window<"u"?ze=window:typeof self<"u"?ze=self:ze=k.global;let Wi=null,Gi=null;const Ul=20,Xr=ze.clearTimeout,Zl=ze.setTimeout,Jr=ze.cancelAnimationFrame||ze.mozCancelAnimationFrame||ze.webkitCancelAnimationFrame,ql=ze.requestAnimationFrame||ze.mozRequestAnimationFrame||ze.webkitRequestAnimationFrame;Jr==null||ql==null?(Wi=Xr,Gi=function(t){return Zl(t,Ul)}):(Wi=function([t,n]){Jr(t),Xr(n)},Gi=function(t){const n=ql(function(){Xr(r),t()}),r=Zl(function(){Jr(n),t()},Ul);return[n,r]});function Zd(e){let t,n,r,i,a,l,o;const c=typeof document<"u"&&document.attachEvent;if(!c){l=function(m){const f=m.__resizeTriggers__,v=f.firstElementChild,b=f.lastElementChild,S=v.firstElementChild;b.scrollLeft=b.scrollWidth,b.scrollTop=b.scrollHeight,S.style.width=v.offsetWidth+1+"px",S.style.height=v.offsetHeight+1+"px",v.scrollLeft=v.scrollWidth,v.scrollTop=v.scrollHeight},a=function(m){return m.offsetWidth!==m.__resizeLast__.width||m.offsetHeight!==m.__resizeLast__.height},o=function(m){if(m.target.className&&typeof m.target.className.indexOf=="function"&&m.target.className.indexOf("contract-trigger")<0&&m.target.className.indexOf("expand-trigger")<0)return;const f=this;l(this),this.__resizeRAF__&&Wi(this.__resizeRAF__),this.__resizeRAF__=Gi(function(){a(f)&&(f.__resizeLast__.width=f.offsetWidth,f.__resizeLast__.height=f.offsetHeight,f.__resizeListeners__.forEach(function(S){S.call(f,m)}))})};let p=!1,y="";r="animationstart";const x="Webkit Moz O ms".split(" ");let E="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),L="";{const m=document.createElement("fakeelement");if(m.style.animationName!==void 0&&(p=!0),p===!1){for(let f=0;f<x.length;f++)if(m.style[x[f]+"AnimationName"]!==void 0){L=x[f],y="-"+L.toLowerCase()+"-",r=E[f],p=!0;break}}}n="resizeanim",t="@"+y+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",i=y+"animation: 1ms "+n+"; "}const u=function(p){if(!p.getElementById("detectElementResize")){const y=(t||"")+".resize-triggers { "+(i||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',x=p.head||p.getElementsByTagName("head")[0],E=p.createElement("style");E.id="detectElementResize",E.type="text/css",e!=null&&E.setAttribute("nonce",e),E.styleSheet?E.styleSheet.cssText=y:E.appendChild(p.createTextNode(y)),x.appendChild(E)}};return{addResizeListener:function(p,y){if(c)p.attachEvent("onresize",y);else{if(!p.__resizeTriggers__){const x=p.ownerDocument,E=ze.getComputedStyle(p);E&&E.position==="static"&&(p.style.position="relative"),u(x),p.__resizeLast__={},p.__resizeListeners__=[],(p.__resizeTriggers__=x.createElement("div")).className="resize-triggers";const L=x.createElement("div");L.className="expand-trigger",L.appendChild(x.createElement("div"));const m=x.createElement("div");m.className="contract-trigger",p.__resizeTriggers__.appendChild(L),p.__resizeTriggers__.appendChild(m),p.appendChild(p.__resizeTriggers__),l(p),p.addEventListener("scroll",o,!0),r&&(p.__resizeTriggers__.__animationListener__=function(v){v.animationName===n&&l(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(y)}},removeResizeListener:function(p,y){if(c)p.detachEvent("onresize",y);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(y),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",o,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class qd extends w.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){const a=window.getComputedStyle(this._parentNode)||{},l=parseFloat(a.paddingLeft||"0"),o=parseFloat(a.paddingRight||"0"),c=parseFloat(a.paddingTop||"0"),u=parseFloat(a.paddingBottom||"0"),g=this._parentNode.getBoundingClientRect(),C=g.height-c-u,p=g.width-l-o,y=this._parentNode.offsetHeight-c-u,x=this._parentNode.offsetWidth-l-o;(!n&&(this.state.height!==y||this.state.scaledHeight!==C)||!r&&(this.state.width!==x||this.state.scaledWidth!==p))&&(this.setState({height:y,width:x,scaledHeight:C,scaledWidth:p}),typeof i=="function"&&i({height:y,scaledHeight:C,scaledWidth:p,width:x}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props,n=this._autoSizer?this._autoSizer.parentNode:null;if(n!=null&&n.ownerDocument&&n.ownerDocument.defaultView&&n instanceof n.ownerDocument.defaultView.HTMLElement){this._parentNode=n;const r=n.ownerDocument.defaultView.ResizeObserver;r!=null?(this._resizeObserver=new r(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(n)):(this._detectElementResize=Zd(t),this._detectElementResize.addResizeListener(n,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:a=!1,doNotBailOutOnEmptyChildren:l=!1,nonce:o,onResize:c,style:u={},tagName:g="div",...C}=this.props,{height:p,scaledHeight:y,scaledWidth:x,width:E}=this.state,L={overflow:"visible"},m={};let f=!1;return i||(p===0&&(f=!0),L.height=0,m.height=p,m.scaledHeight=y),a||(E===0&&(f=!0),L.width=0,m.width=E,m.scaledWidth=x),l&&(f=!1),w.createElement(g,{ref:this._setRef,style:{...L,...u},...C},!f&&t(m))}}function Qd(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,i=e.stopIndex;return!(r>n||i<t)}function Wd(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,i=e.startIndex,a=e.stopIndex,l=[],o=null,c=null,u=i;u<=a;u++){var g=t(u);g?c!==null&&(l.push(o,c),o=c=null):(c=u,o===null&&(o=u))}if(c!==null){for(var C=Math.min(Math.max(c,o+r-1),n-1),p=c+1;p<=C&&!t(p);p++)c=p;l.push(o,c)}if(l.length)for(;l[1]-l[0]+1<r&&l[0]>0;){var y=l[0]-1;if(!t(y))l[0]=y;else break}return l}var Gd=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Kd=function(){function e(t,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Yd=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)},Ql=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};(function(e){Yd(t,e);function t(){var n,r,i,a;Gd(this,t);for(var l=arguments.length,o=Array(l),c=0;c<l;c++)o[c]=arguments[c];return a=(r=(i=Ql(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(o))),i),i._lastRenderedStartIndex=-1,i._lastRenderedStopIndex=-1,i._memoizedUnloadedRanges=[],i._onItemsRendered=function(u){var g=u.visibleStartIndex,C=u.visibleStopIndex;i._lastRenderedStartIndex=g,i._lastRenderedStopIndex=C,i._ensureRowsLoaded(g,C)},i._setRef=function(u){i._listRef=u},r),Ql(i,a)}return Kd(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,i){var a=this.props,l=a.isItemLoaded,o=a.itemCount,c=a.minimumBatchSize,u=c===void 0?10:c,g=a.threshold,C=g===void 0?15:g,p=Wd({isItemLoaded:l,itemCount:o,minimumBatchSize:u,startIndex:Math.max(0,r-C),stopIndex:Math.min(o-1,i+C)});(this._memoizedUnloadedRanges.length!==p.length||this._memoizedUnloadedRanges.some(function(y,x){return p[x]!==y}))&&(this._memoizedUnloadedRanges=p,this._loadUnloadedRanges(p))}},{key:"_loadUnloadedRanges",value:function(r){for(var i=this,a=this.props.loadMoreItems||this.props.loadMoreRows,l=function(u){var g=r[u],C=r[u+1],p=a(g,C);p!=null&&p.then(function(){if(Qd({lastRenderedStartIndex:i._lastRenderedStartIndex,lastRenderedStopIndex:i._lastRenderedStopIndex,startIndex:g,stopIndex:C})){if(i._listRef==null)return;typeof i._listRef.resetAfterIndex=="function"?i._listRef.resetAfterIndex(g,!0):(typeof i._listRef._getItemStyleCache=="function"&&i._listRef._getItemStyleCache(-1),i._listRef.forceUpdate())}})},o=0;o<r.length;o+=2)l(o)}}]),t})(w.PureComponent);const Xd=d("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),Jd=d("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),ep=d("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),tp=d("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),np=d("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),rp=d("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),ip=d("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),ap=()=>O,lp=d(ap())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0});var Yo={exports:{}},sp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",op=sp,cp=op;function Xo(){}function Jo(){}Jo.resetWarningCache=Xo;var up=function(){function e(r,i,a,l,o,c){if(c!==cp){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Jo,resetWarningCache:Xo};return n.PropTypes=n,n};Yo.exports=up();var dp=Yo.exports;const je=ds(dp);class Ki extends w.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const n={get passive(){t=!0}};try{document.addEventListener("test",null,n),document.removeEventListener("test",null,n)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const n=this.props.getScrollParent&&this.props.getScrollParent();return n??(t&&t.parentNode)}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let n=window;this.props.useWindow===!1&&(n=t),n.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),n.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),n.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,n=window,r=this.getParentElement(t);let i;if(this.props.useWindow){const a=document.documentElement||document.body.parentNode||document.body,l=n.pageYOffset!==void 0?n.pageYOffset:a.scrollTop;this.props.isReverse?i=l:i=this.calculateOffset(t,l)}else this.props.isReverse?i=r.scrollTop:i=t.scrollHeight-r.scrollTop-r.clientHeight;i<Number(this.props.threshold)&&t&&t.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=r.scrollHeight,this.beforeScrollTop=r.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}calculateOffset(t,n){return t?this.calculateTopPosition(t)+(t.offsetHeight-n-window.innerHeight):0}calculateTopPosition(t){return t?t.offsetTop+this.calculateTopPosition(t.offsetParent):0}render(){const t=this.filterProps(this.props),{children:n,element:r,hasMore:i,initialLoad:a,isReverse:l,loader:o,loadMore:c,pageStart:u,ref:g,threshold:C,useCapture:p,useWindow:y,getScrollParent:x,...E}=t;E.ref=m=>{this.scrollComponent=m,g&&g(m)};const L=[n];return i&&(o?l?L.unshift(o):L.push(o):this.defaultLoader&&(l?L.unshift(this.defaultLoader):L.push(this.defaultLoader))),w.createElement(r,E,L)}}Q(Ki,"propTypes",{children:je.node.isRequired,element:je.node,hasMore:je.bool,initialLoad:je.bool,isReverse:je.bool,loader:je.node,loadMore:je.func.isRequired,pageStart:je.number,ref:je.func,getScrollParent:je.func,threshold:je.number,useCapture:je.bool,useWindow:je.bool}),Q(Ki,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});const pp=({friendsRank:e,avatar:t,name:n,userId:r,points:i,isCurrentUser:a,style:l})=>s.jsxs(Xd,{"data-name":r,style:l,children:[s.jsx(Jd,{children:e||0}),s.jsxs(np,{children:[t?s.jsx(ep,{alt:"leaderboard-item-avatar",src:t}):s.jsx(tp,{children:l0(n||"")}),s.jsxs(rp,{children:[s.jsx(ip,{children:n||""}),a&&s.jsx(lp,{name:"icon-star"})]})]}),s.jsx("div",{children:ks(i)})]}),fp=d("div")({name:"Container",class:"c16btbfp",propsAsIs:!1}),hp=({items:e,currentUserId:t,openItemDetail:n,fetchMore:r,scrollNode:i,hasMore:a})=>{const l=w.useCallback(o=>{const c=o.target.getAttribute("data-name");c&&n(c)},[n]);return s.jsx(Ki,{loadMore:r,initialLoad:!1,hasMore:a,useWindow:!1,getScrollParent:()=>i.current,children:s.jsx(fp,{"data-a":"intr",onClick:l,children:e.map(o=>s.jsx(pp,{...o,isCurrentUser:!!t&&t===o.userId},o.userId))})})},mp=d("div")({name:"Container",class:"c1itm4k7",propsAsIs:!1}),Cp=d("div")({name:"IconContainer",class:"i1w4fsni",propsAsIs:!1}),gp=()=>O,vp=d(gp())({name:"InviteGameIcon",class:"i19m85r1",propsAsIs:!0}),yp=d("div")({name:"Content",class:"c1mbu204",propsAsIs:!1}),wp=d("div")({name:"Heading",class:"h1amdqtv",propsAsIs:!1}),bp=d("div")({name:"Subtext",class:"s1lhlj9j",propsAsIs:!1}),xp=d("div")({name:"LinkContainer",class:"l1wot35e",propsAsIs:!1}),Ep=d("div")({name:"LinkInfo",class:"l1jdw39q",propsAsIs:!1}),Lp=d("span")({name:"LinkTitle",class:"l1cr5mk",propsAsIs:!1}),kp=d("span")({name:"LinkAddress",class:"lvi87q4",propsAsIs:!1}),Sp=()=>O,Ip=d(Sp())({name:"LinkIcon",class:"l1pqlvw3",propsAsIs:!0}),e4=({inviteLink:e,inviteCardTitle:t,inviteCardSubtext:n,primaryColor:r,className:i})=>{const a=w.useRef(null),[l,o]=Ko(a),[c]=vs({type:"invitation",action:"sent",payload:{from:k.InvitationFrom.MENU}});return s.jsxs(mp,{className:i,children:[s.jsx(Cp,{style:{backgroundColor:r},children:s.jsx(vp,{name:"invite-game-icon"})}),s.jsxs(yp,{children:[s.jsx(wp,{children:t||""}),s.jsx(bp,{children:n||""})]}),e&&s.jsxs(xp,{ref:a,"data-a":"intr",onClick:c(()=>l(e)),children:[s.jsxs(Ep,{children:[s.jsx(Lp,{children:"Invite link"}),s.jsx(kp,{children:e})]}),s.jsx(Ip,{name:"icon-copy"})]}),o]})},Tp=d("div")({name:"InviteFriendsContainer",class:"i1c9dygq",propsAsIs:!1}),jp=({deepLink:e})=>s.jsx(Tp,{children:s.jsx(e4,{inviteLink:e,inviteCardTitle:"It’s More Fun With Friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})}),Ap=d("div")({name:"InviteLinkContainer",class:"i1odbhm4",propsAsIs:!1}),$p=({gamification:e,scrollNode:t,scrollStore:n})=>{const r=w.useRef(null),{data:i,hasMore:a,loading:l,key:o}=F(e.leaderboardList.$store),{data:c}=F(e.deepLink.$store),[u,g]=Ko(r);return!i.length&&!l?s.jsx(jp,{deepLink:c}):s.jsxs(s.Fragment,{children:[s.jsx(hp,{items:i,scrollNode:t,scrollStore:n,fetchMore:e.leaderboardList.fetchMore,hasMore:a,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()},o),c&&s.jsx(Ap,{ref:r,children:s.jsx(Ud,{"data-a":"intr",onClick:()=>u(c),title:"Invite Friends",description:"Challenge them now!"})}),g]})},na=d("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),Rp=d("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),_p=d("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),Vp=d("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),Np=()=>O,bn=d(Np())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),Mp=()=>bn,Op=d(Mp())({name:"QuestionCheckIcon",class:"qxlt78s",propsAsIs:!0}),Pp=()=>O,Hp=d(Pp())({name:"QuestionTypeIcon",class:"qmg0vkx",propsAsIs:!0}),Fp=d("div")({name:"QuestionTypeLabel",class:"q1uz5j1g",propsAsIs:!1}),Dp=d("div")({name:"QuestionContent",class:"qc3icwa",propsAsIs:!1}),t4=d("button")({name:"PlayButton",class:"p169lohr",propsAsIs:!1}),zp=d("div")({name:"SkeletonContainer",class:"s1f43z3r",propsAsIs:!1}),Bp=()=>Ls,Up=d(Bp())({name:"SkeletonButton",class:"s16k8geu",propsAsIs:!0}),Zp={[k.PickHistoryStatus.LOST]:s.jsx(bn,{name:"incorrectVoted"}),[k.PickHistoryStatus.WON]:s.jsx(Op,{name:"icon-check"}),[k.PickHistoryStatus.UNSET]:s.jsx(bn,{name:"icon-arrow"}),[k.PickHistoryStatus.DNP]:s.jsx(bn,{name:"icon-arrow"})},qp=()=>s.jsxs(zp,{children:[s.jsx($e,{loading:!0,style:{width:"35%"}}),s.jsx($e,{loading:!0,style:{width:"70%"}}),s.jsx(Up,{})]}),n4=({questionTypeData:e,questionType:t,questionStatus:n})=>s.jsxs(Rp,{className:"SL_QuestionCaption",children:[s.jsx(Hp,{className:"SL_QuestionTypeIcon","data-testid":"question-type-icon","data-type-trivia":t===k.QuestionType.TRIVIA,"data-type-poll":t===k.QuestionType.POLL,name:e.iconName}),s.jsxs(Fp,{className:"SL_QuestionTypeLabel",children:[e.label,t===k.QuestionType.TRIVIA&&n===k.QuestionStatus.RESOLVED&&" • Expired"]})]}),Qp=({questionId:e,questionType:t,questionStatus:n,subject:r,openForVoting:i,status:a})=>{const l=N2[t],o=Zp[a];return l?s.jsxs(na,{"data-a":"intr","data-name":e,children:[s.jsxs(Dp,{children:[s.jsx(n4,{questionTypeData:l,questionType:t,questionStatus:n}),s.jsx(_p,{children:r||""})]}),s.jsx(Vp,{children:i?s.jsx(t4,{"data-a":"intr","data-name":e,children:"Play"}):o})]}):null},Wp=()=>na,Gp=d(Wp())({name:"Container",class:"cll3md7",propsAsIs:!0}),Kp=()=>t4,Yp=d(Kp())({name:"ActionBtn",class:"a10g1iik",propsAsIs:!0}),Xp=({questionId:e,...t})=>s.jsxs(Gp,{"data-a":"intr","data-name":e,children:[s.jsx(Bo,{questionId:e,...t}),s.jsx(Yp,{"data-a":"intr","data-name":e,children:"View Insight"})]}),Jp=()=>na,ef=d(Jp())({name:"Container",class:"cl56x6b",propsAsIs:!0}),tf=d("button")({name:"ActionButton",class:"a11pzf92",propsAsIs:!1}),nf=d("blockquote")({name:"Quote",class:"q1hbaleq",propsAsIs:!1}),rf=({...e})=>s.jsxs(ef,{"data-a":"intr","data-name":e.tweetId,children:[e.title&&s.jsx(nf,{children:e.title}),s.jsx(ta,{...e}),s.jsx(tf,{"data-a":"intr","data-name":e.tweetId,children:"View Insight"})]}),Wl=d("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),r4=({questions:e,openQuestion:t,controlVideo:n})=>{const r=i=>{const a=i.target.getAttribute("data-name");a&&(zo(),t(a,{openedFrom:"list"}))};return e?s.jsx(Wl,{"data-a":"intr",onClick:r,children:e==null?void 0:e.map(i=>{var a,l,o;if(i.type==="question"&&((a=i.attributes)==null?void 0:a.attributes.case)==="question"){const c=i.attributes.attributes.value;return s.jsx(Qp,{...c},c.questionId)}if(i.type==="insight"&&((l=i.attributes)==null?void 0:l.attributes.case)==="insight"){const c=i.attributes.attributes.value;return s.jsx(Xp,{controlVideo:n,...c},c.questionId)}if(i.type==="tweet"&&((o=i.attributes)==null?void 0:o.attributes.case)==="tweet"){const c=i.attributes.attributes.value,u=i.attributes.id;return s.jsx(rf,{controlVideo:n,...c,tweetId:u},u)}return null})}):s.jsx(Wl,{children:Array.from({length:5}).map((i,a)=>s.jsx(qp,{},a))})},af=({store:e,openQuestion:t})=>{const{sdk:n}=Xn(),r=F(e);return s.jsx(r4,{openQuestion:t,questions:r.data,controlVideo:n==null?void 0:n.controlVideoPlayer})},lf=({userSummary:e})=>{var t;const[n,r]=w.useState(void 0);return w.useEffect(()=>{const i=e.$store.subscribe(a=>{a&&r(a)});return()=>{i()}},[e]),s.jsx(s0,{loading:!(n!=null&&n.summary),...n==null?void 0:n.summary,successRate:(t=n==null?void 0:n.percentage)==null?void 0:t.correct})},sf=({gamification:e,className:t,scrollStore:n,scrollNode:r,appNode:i,style:a,responsiveStore:l})=>{const{tabsShown:o}=F(n,{keys:["tabsShown"]}),c=F(e.friendsTabEnabled),[u,g]=w.useState(l2.HOME),[,C]=c6(),{sdkInDesktopView:p,screen:y}=F(l,{keys:["sdkInDesktopView"]}),x=L=>{C(()=>{var m;g(L),p===!1&&(((m=i.current)==null?void 0:m.getBoundingClientRect().y)||0)<0&&n0(i,y.size,{behavior:"instant"})})};w.useEffect(()=>n.subscribe(L=>{if(L.scrollPosition===0){n.setKey("tabsShown",!0);return}l.get().sdkInDesktopView?n.setKey("tabsShown",L.scrollDirection==="backward"):n.setKey("tabsShown",L.scrollDirection==="forward")}),[n,l]),w.useEffect(()=>{c||g(l2.HOME)},[c]);let E="0px";return p?E=o?"0px":"calc(0px - var(--header-height))":E=o?"var(--header-height)":"0px",s.jsxs(q4,{className:we(t,"SL-Tabs"),style:a,children:[c&&s.jsx(K4,{style:{top:E},children:s.jsx($d,{activePage:u,toggleActivePage:x})}),u===l2.HOME&&s.jsxs(s.Fragment,{children:[s.jsx(Z4,{children:s.jsx(Y4,{children:s.jsx(lf,{userSummary:e.userSummary})})}),s.jsx(Ji,{style:{flex:1},children:s.jsx(af,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),u===l2.LEADERBOARD&&s.jsx(W4,{children:s.jsx($p,{scrollStore:n,scrollNode:r,gamification:e})})]})},of=()=>ot,Gl=d(of())({name:"OpenedContainer",class:"ouvguos",propsAsIs:!0}),Kl="t1eu4lbg",cf=d("div")({name:"UserContainer",class:"uuv2xqo",propsAsIs:!1}),uf=({correct:e,incorrect:t})=>{const n=e+t;return n===0?0:Math.round(e/n*100)},df=({gamification:e,scrollStore:t,className:n,appNode:r,scrollNode:i,responsiveStore:a})=>s.jsx(sf,{appNode:r,scrollStore:t,scrollNode:i,className:n,gamification:e,responsiveStore:a}),pf=({gamification:e,className:t,appNode:n,responsiveStore:r})=>{const{topNavigation:i}=Xn(),a=F(e.openedQuestion.$store),l=F(e.openedUser),{sdkInDesktopView:o}=F(r,{keys:["sdkInDesktopView"]}),{hiding:c,onAnimationEnd:u}=r0();if(!n.current||!a&&!l)return null;const g=a?s.jsx(Gl,{className:we(t,!i&&Kl),hiding:c,onAnimationEnd:u,children:s.jsx(Go,{gamification:e})}):l?s.jsx(Gl,{className:we(t,!i&&Kl),hiding:c,onAnimationEnd:u,children:s.jsxs(cf,{children:[s.jsx(a0,{label:"Friend's Rank",close:e.closeUser}),s.jsx(e0,{children:s.jsx(s0,{...l,successRate:uf(l)})})]})}):null;return s.jsx(X0,{container:n,useContainer:!o,children:g})},ff=w.lazy(()=>Promise.resolve().then(()=>require("./gamification-feature.js"))),hf=({sdk:e,feature:t,className:n,scrollStore:r,appNode:i,scrollNode:a,responsiveStore:l})=>{const o=w.useMemo(()=>t&&t.featureConfig.get().type===k.SdkOverlayType.GAMES?s.jsx(D6,{className:n,sdk:e,feature:t,children:s.jsx(ff,{appNode:i,scrollStore:r,scrollNode:a,className:n,responsiveStore:l,gamification:t})}):null,[e,t,n,l,r,a,i]);return s.jsx(w.Suspense,{fallback:s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:o})},mf=({feature:e,className:t,appNode:n,responsiveStore:r})=>e&&e.featureConfig.get().type===k.SdkOverlayType.GAMES?s.jsx(pf,{className:t,appNode:n,responsiveStore:r,gamification:e}):null,Cf=d("div")({name:"Buttons",class:"b5o8qbl",propsAsIs:!1}),gf=({children:e,className:t})=>s.jsx(Cf,{className:t,children:e}),i4=d("div")({name:"Navigation",class:"n6tbwuy",propsAsIs:!1}),vf=()=>gf,Yl=d(vf())({name:"NavigationItems",class:"n1up4z7v",propsAsIs:!0}),yf=d("button")({name:"SButton",class:"sxxa0c",propsAsIs:!1}),wf=d("span")({name:"ButtonIcon",class:"b193dcyu",propsAsIs:!1}),bf=d("span")({name:"ButtonLabel",class:"b40tuix",propsAsIs:!1}),xf="s14xk0af",Ef="ha3mg7c",Lf="h103yr45",on=({disabled:e,active:t,onClick:n,label:r,icon:i,id:a})=>s.jsx(yf,{onClick:n,"data-a":"intr",disabled:e,className:we(t&&xf,!t&&(a==="channels"||a==="featuredGroups")&&Ef,!t&&a==="leaderboard"&&Lf),children:s.jsxs(s.Fragment,{children:[i&&s.jsx(wf,{children:i}),s.jsx(bf,{children:r})]})}),kf=()=>O,Sf=d(kf())({name:"ButtonIcon",class:"b11wpe79",propsAsIs:!0}),If=d("div")({name:"Container",class:"calnblm",propsAsIs:!1}),Tf=d("div")({name:"Title",class:"t1438p52",propsAsIs:!1}),jf=d("div")({name:"CloseIconWrap",class:"c17srj38",propsAsIs:!1}),Af=()=>O,$f=d(Af())({name:"CloseIcon",class:"clqia8k",propsAsIs:!0}),Rf=()=>O,_f=d(Rf())({name:"DashboardIcon",class:"df5w958",propsAsIs:!0}),Vf="h12x6aiv",Nf=w.forwardRef(({sdk:e,className:t},n)=>{const r=()=>{e.closeFeature()};return s.jsxs(i4,{className:we(t,Vf),children:[s.jsxs(If,{children:[s.jsxs(Tf,{children:[s.jsx(_f,{name:"dashboard"}),"Dashboard"]}),s.jsx(jf,{"data-a":"intr",onClick:r,children:s.jsx($f,{name:"icon-cross"})})]}),s.jsx("div",{ref:n})]})}),Mf=w.forwardRef(({sdk:e,className:t},n)=>{const r=F(e.sdkStore.organizationSettings),i=F(e.sdkStore.streamSettings),a=F(e.getActiveFeature()),l=w.useMemo(()=>{const c=(i==null?void 0:i.data)||(r==null?void 0:r.data);return c!=null&&c.overlays?c.overlays:[]},[r,i]),o=w.useMemo(()=>[...l.filter(({enableSdkButton:c,type:u})=>u===k.SdkOverlayType.GAMES||c).map(c=>({id:c.type,onClick:()=>e.openFeature(c.type),disabled:!(c.type in _4),label:c.name,icon:s.jsx("img",{src:c.icon,alt:""}),position:c.position*10}))].sort((c,u)=>c.position-u.position),[l,e]);return s.jsxs(i4,{className:t,children:[o.length!==0&&s.jsx(Yl,{children:[s.jsx(on,{id:"Channels",onClick:()=>e.closeFeature(),label:"Channels",active:a===0},"Channels"),...o.map(c=>c.id===k.SdkOverlayType.GAMES?s.jsx(on,{...c,active:c.id===a,label:"StreamLayer +",id:"featuredGroups",icon:s.jsx(Sf,{name:"icon-btn-feature-groups","data-selected":c.id===a})},c.id):s.jsx(on,{...c,icon:void 0,active:c.id===a},c.id))]}),!o.length&&s.jsx(Yl,{children:[s.jsx(on,{id:"empty",label:"No Features...",active:!1,disabled:!0},"empty")]}),s.jsx("div",{ref:n})]})}),Of=d("div")({name:"InsightContainer",class:"i1pqqgpo",propsAsIs:!1}),Pf=d("img")({name:"Image",class:"igj7luu",propsAsIs:!1}),Hf=d("div")({name:"ImageContainer",class:"i1qne9g6",propsAsIs:!1}),Ff=d("div")({name:"InsightContent",class:"itpr98r",propsAsIs:!1}),Df=d("h3")({name:"Title",class:"t17iaqp8",propsAsIs:!1}),zf=d("div")({name:"Description",class:"d16t3y7s",propsAsIs:!1}),Bf=d("button")({name:"ActionBtn",class:"a12495er",propsAsIs:!1}),Uf=({video:e,image:t,imageMode:n,heading:r,body:i,action:a,controlVideo:l})=>s.jsxs(Of,{children:[(e==null?void 0:e.url)&&s.jsx(mr,{source:e.url,poster:e.thumbnailUrl,controlVideo:l}),t&&!(e!=null&&e.url)&&s.jsx(Hf,{"data-rounded":n===k.QuestionImages.ROUNDED,children:s.jsx(Pf,{src:t,alt:r})}),s.jsxs(Ff,{children:[s.jsx(Df,{children:r}),s.jsx(zf,{children:i}),a&&s.jsx(Bf,{onClick:a,children:"View Insight"})]})]}),Zf=d("div")({name:"Container",class:"c1eptrjd",propsAsIs:!1}),qf=d("div")({name:"CloseIconWrap",class:"crylm65",propsAsIs:!1}),Qf=()=>O,Wf=d(Qf())({name:"CloseIcon",class:"c9mrcz7",propsAsIs:!0}),Gf=d("div")({name:"Header",class:"hw3lzv4",propsAsIs:!1}),Kf=()=>O,Yf=d(Kf())({name:"TypeIcon",class:"t1rrb3kf",propsAsIs:!0}),Xf=d("span")({name:"TypeName",class:"t1ydnjov",propsAsIs:!1}),Jf=d("div")({name:"Question",class:"qlf90cl",propsAsIs:!1}),eh=d("button")({name:"AnswerButton",class:"a1e0nhcl",propsAsIs:!1}),th=d("div")({name:"Container",class:"c1t4f0x4",propsAsIs:!1}),nh=d("button")({name:"ActionBtn",class:"a16w1nl6",propsAsIs:!1}),rh=d("div")({name:"QuoteWrap",class:"q14u54rf",propsAsIs:!1}),ih=d("blockquote")({name:"Quote",class:"q1hxm6zo",propsAsIs:!1}),ah=({action:e,...t})=>s.jsxs(th,{children:[t.title&&s.jsx(rh,{children:s.jsx(ih,{children:t.title})}),s.jsx(ta,{...t}),e&&s.jsx(nh,{onClick:e,children:"View Insight"})]}),Yi=({close:e,action:t,controlVideo:n,data:{questionType:r,question:i,insight:a,tweet:l}})=>{const o=N2[r];return o?s.jsxs(Zf,{onClick:t,style:r===k.QuestionType.TWEET?{paddingTop:"12px"}:{},children:[s.jsx(qf,{"data-a":"intr",onClick:c=>{c.stopPropagation(),e&&e(c)},children:s.jsx(Wf,{name:"icon-cross"})}),r!==k.QuestionType.TWEET&&s.jsxs(Gf,{children:[s.jsx(Yf,{"data-type-trivia":r===k.QuestionType.TRIVIA,"data-type-poll":r===k.QuestionType.POLL,name:o.iconName}),s.jsx(Xf,{children:o.label})]}),r===k.QuestionType.FACTOID&&a&&s.jsx(Uf,{...a,action:t,controlVideo:n}),r===k.QuestionType.TWEET&&l&&s.jsx(ah,{...l,action:t,controlVideo:n}),r!==k.QuestionType.FACTOID&&r!==k.QuestionType.TWEET&&s.jsxs(s.Fragment,{children:[s.jsx(Jf,{children:i==null?void 0:i.title}),s.jsx(eh,{children:"Answer"})]})]}):null},ft=d("div")({name:"BGWrap",class:"b1dqe0sz",propsAsIs:!1}),Te=d("div")({name:"BGLineBase",class:"b1v6w7ni",propsAsIs:!1}),lh=()=>Te,sh=d(lh())({name:"BGOneLineOne",class:"b2nqb1p",propsAsIs:!0}),oh=()=>Te,ch=d(oh())({name:"BGOneLineTwo",class:"b1xxgmbk",propsAsIs:!0}),uh=()=>Te,dh=d(uh())({name:"BGOneLineThree",class:"b63lwcb",propsAsIs:!0}),ph=()=>Te,Xl=d(ph())({name:"BGTwoLineOne",class:"b2iah4",propsAsIs:!0}),fh=()=>Te,Jl=d(fh())({name:"BGTwoLineTwo",class:"b1xezvf6",propsAsIs:!0}),hh=()=>Te,es=d(hh())({name:"BGTwoLineThree",class:"b1jz1hg0",propsAsIs:!0}),mh=()=>Te,ts=d(mh())({name:"BGThreeLineOne",class:"b18ho1tk",propsAsIs:!0}),Ch=()=>Te,ns=d(Ch())({name:"BGThreeLineTwo",class:"b14uvjfm",propsAsIs:!0}),gh=()=>Te,rs=d(gh())({name:"BGThreeLineThree",class:"b11c3ns7",propsAsIs:!0}),vh=()=>Te,is=d(vh())({name:"BGThreeLineFour",class:"b1bqhhet",propsAsIs:!0}),yh=()=>Te,wh=d(yh())({name:"BGFourLineOne",class:"b1xyzi7o",propsAsIs:!0}),bh=()=>Te,xh=d(bh())({name:"BGFourLineTwo",class:"byo0rup",propsAsIs:!0}),Eh=()=>Te,Lh=d(Eh())({name:"BGFourLineThree",class:"b1oyiqgv",propsAsIs:!0}),kh=()=>Te,Sh=d(kh())({name:"BGFourLineFour",class:"bx3ddqw",propsAsIs:!0}),Ih=({step:e,correct:t})=>s.jsxs(s.Fragment,{children:[s.jsxs(ft,{"data-active":e===1,"data-first-screen":"true",children:[s.jsx(sh,{}),s.jsx(ch,{}),s.jsx(dh,{})]}),s.jsxs(ft,{"data-active":e===2,children:[s.jsx(Xl,{}),s.jsx(Jl,{}),s.jsx(es,{})]}),s.jsxs(ft,{"data-active":e===3,children:[s.jsx(Xl,{}),s.jsx(Jl,{}),s.jsx(es,{})]}),t?s.jsxs(s.Fragment,{children:[s.jsxs(ft,{"data-active":e===4,"data-correct":"true",children:[s.jsx(ts,{}),s.jsx(ns,{}),s.jsx(rs,{}),s.jsx(is,{})]}),s.jsxs(ft,{"data-active":e===5,"data-correct":"true",children:[s.jsx(ts,{}),s.jsx(ns,{}),s.jsx(rs,{}),s.jsx(is,{})]})]}):s.jsxs(ft,{"data-active":e===4,"data-correct":"false",children:[s.jsx(wh,{}),s.jsx(xh,{}),s.jsx(Lh,{}),s.jsx(Sh,{})]})]}),Th=118,jh=()=>ot,Ah=d(jh())({name:"Container",class:"c10131zw",propsAsIs:!0}),$h=d("div")({name:"InnerContainer",class:"ir6k2eo",propsAsIs:!1}),Z1=d("div")({name:"Content",class:"c1hwoq9l",propsAsIs:!1}),s2=d("div")({name:"Title",class:"t4ujo4g",propsAsIs:!1}),Rh=()=>s2,_h=d(Rh())({name:"PointsTitle",class:"p1pjil1h",propsAsIs:!0}),cn=d("div")({name:"Subtitle",class:"s1iorwr9",propsAsIs:!1}),as=d("div")({name:"SubtitleFG",class:"s51sv9d",propsAsIs:!1}),un=d("div")({name:"AnswerText",class:"a1lbk2ye",propsAsIs:!1}),Vh=()=>O,a4=d(Vh())({name:"FeedbackIcon",class:"frcvk3t",propsAsIs:!0}),Nh=()=>a4,ls=d(Nh())({name:"FeedbackIconCorrect",class:"f33p82r",propsAsIs:!0}),Mh=()=>a4,Oh=d(Mh())({name:"FeedbackIconIncorrect",class:"f12r9net",propsAsIs:!0}),ss=d("div")({name:"CloseIconWrap",class:"c1fw6699",propsAsIs:!1}),Ph=()=>O,os=d(Ph())({name:"CloseIcon",class:"c115o126",propsAsIs:!0}),Hh="data:image/svg+xml,%3csvg%20width='154'%20height='37'%20viewBox='0%200%20154%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M70.9776%2030.8796L74.668%2018.1381C75.0696%2016.7473%2076.1186%2015.6318%2077.4936%2015.1371L77.5928%2014.7217H72.466L63.7623%2024.9662L60.431%2014.7217H55.7389L55.6255%2015.1371C56.4288%2015.5291%2056.8683%2016.7052%2056.8683%2017.662V17.7227C56.8683%2023.1787%2052.781%2032.5598%2047.0352%2032.5598C44.8002%2032.5598%2043.6425%2031.0009%2043.6425%2029.7035C43.6425%2028.1306%2044.975%2027.0105%2046.3831%2027.0105C47.744%2027.0105%2047.9519%2027.5099%2048.741%2027.5099C49.2182%2027.5099%2049.6766%2027.2672%2049.9081%2026.8518C50.2672%2026.1984%2049.9931%2025.4049%2049.3363%2025.0922L48.9772%2024.9242C45.6271%2023.3327%2041.7383%2025.7457%2041.7383%2029.4188V29.4701C41.7383%2032.1444%2043.8646%2034.38%2046.5674%2034.4733C53.5417%2034.716%2058.2055%2025.4236%2058.9473%2018.6188L59.486%2020.4577L62.2313%2028.5927H63.2709L71.8518%2018.4741L68.2512%2030.8936C67.8401%2032.3171%2066.6966%2033.4232%2065.2412%2033.7966L65.142%2034.212H72.0408L72.1542%2033.7966C71.1383%2033.2039%2070.6516%2032.0044%2070.9776%2030.8796Z'%20fill='white'/%3e%3cpath%20d='M88.2952%2021.6521H88.2385C85.016%2021.6568%2081.5571%2021.9648%2079.7143%2027.1361C78.1692%2031.4813%2077.7487%2033.2828%2076.539%2033.2828C75.7641%2033.2828%2075.9531%2031.794%2074.7954%2031.794C74.2709%2031.794%2073.7275%2032.2094%2073.6897%2032.8068C73.6236%2033.8429%2075.0317%2034.4683%2076.0949%2034.4683C79.3316%2034.4683%2080.5696%2032.1347%2080.9759%2031.0472C81.0279%2030.9072%2081.3162%2030.1371%2081.6517%2029.2317H85.0538L84.4773%2031.3273C84.1749%2032.4334%2083.5464%2033.3388%2082.488%2033.8009L82.3982%2034.2163H87.9597L88.0637%2033.8009C87.3124%2033.1848%2086.9816%2032.2%2087.2273%2031.2853L89.3206%2023.4257C89.4812%2022.8236%2089.9018%2022.3242%2090.4783%2022.0628L90.568%2021.6475H88.7536H88.2952V21.6521ZM85.3231%2028.2189H82.0202C82.3935%2027.2108%2082.7526%2026.2493%2082.8755%2025.9366C83.7118%2023.757%2085.2995%2022.8749%2086.8399%2022.7536L86.8257%2022.7676L85.3231%2028.2189Z'%20fill='white'/%3e%3cpath%20d='M116.358%2022.5486C116.538%2022.2545%20116.708%2021.8112%20116.708%2021.5591C116.732%2021.0877%20116.297%2020.7237%20115.829%2020.8217C115.456%2020.9011%20115.187%2021.2324%20115.191%2021.6058C115.196%2021.9978%20115.12%2022.4226%20114.95%2022.6279C114.558%2023.104%20113.934%2023.062%20111.062%2022.2452V22.2405C110.797%2022.1659%20110.509%2022.0819%20110.206%2021.9978C110.187%2021.9932%20110.173%2021.9885%20110.159%2021.9838C108.723%2021.6011%20106.941%2021.2464%20105.774%2021.8205C105.765%2021.8252%20105.755%2021.8298%20105.746%2021.8345C104.602%2022.3992%20103.808%2023.4727%20103.567%2024.7142C103.53%2024.8962%20103.506%2025.0455%20103.501%2025.0969C103.468%2025.7456%20104.068%2026.2544%20104.711%2026.1143C105.235%2026.0023%20105.604%2025.5403%20105.59%2025.0129C105.58%2024.4808%20105.472%2023.7667%20105.765%2023.286C106.237%2022.6279%20106.729%2022.5812%20108.935%2023.3047L106.544%2031.323C106.214%2032.4291%20105.406%2033.3345%20104.338%2033.7966L104.238%2034.212H109.961L110.074%2033.7966C109.337%2033.1852%20109.03%2032.1957%20109.299%2031.2809L111.392%2024.0561C112.309%2024.2428%20113.24%2024.2941%20114.147%2024.0374L114.473%2023.9441C115.196%2023.7527%20115.943%2023.2347%20116.358%2022.5486Z'%20fill='white'/%3e%3cpath%20d='M118.649%2021.6523L118.536%2022.0677C119.245%2022.5531%20119.561%2023.4259%20119.335%2024.2427L117.208%2031.3228C116.877%2032.429%20116.069%2033.3344%20115.002%2033.7964L114.902%2034.2118H117.931H118.21H125.18L126.101%2030.8934H125.666L125.51%2031.2108C124.934%2032.3963%20123.72%2033.1524%20122.382%2033.1524H119.429L121.003%2027.5937H122.259C123.105%2027.5937%20123.743%2028.3545%20123.582%2029.1759H124.012L125.043%2025.4188H124.613C124.362%2026.1142%20123.696%2026.5763%20122.949%2026.5809H121.291L122.382%2022.7258L125.515%2022.7211C126.536%2022.7211%20127.301%2023.6452%20127.098%2024.6347H127.528L128.35%2021.6523H118.649Z'%20fill='white'/%3e%3cpath%20d='M138.251%2021.6582H131.333L131.22%2022.0736C131.881%2022.5263%20132.207%2023.3197%20132.056%2024.0898L129.892%2031.324C129.561%2032.4301%20128.753%2033.3356%20127.685%2033.7976L127.586%2034.213H133.303L133.417%2033.7976C132.68%2033.1862%20132.373%2032.2014%20132.637%2031.282L133.686%2027.5949H134.126C134.787%2027.5949%20135.34%2028.085%20135.416%2028.7337C135.439%2028.9437%20135.77%2031.506%20136.035%2032.3881C136.379%2033.5409%20136.833%2034.213%20137.868%2034.213H140.453L140.552%2033.7976L140.183%2033.5829C139.451%2033.1536%20138.922%2032.4908%20138.685%2031.6087C138.463%2030.7779%20138.043%2029.2284%20137.84%2028.4117C137.736%2027.9916%20137.202%2027.5996%20136.654%2027.5996H137.523C139.087%2027.5996%20140.457%2026.5681%20140.878%2025.0839C141.365%2023.3617%20140.056%2021.6582%20138.251%2021.6582ZM138.369%2024.6872C138.029%2025.812%20136.98%2026.5868%20135.789%2026.5868H133.974L135.071%2022.7317H136.89C137.925%2022.727%20138.662%2023.7118%20138.369%2024.6872Z'%20fill='white'/%3e%3cpath%20d='M100.265%2022.2961C100.081%2022.2961%2099.6794%2022.1701%2099.0651%2021.9181C98.4508%2021.6661%2097.8318%2021.54%2097.2034%2021.54C95.904%2021.54%2094.8219%2021.9554%2093.9336%2022.8422C93.1964%2023.5796%2092.8704%2024.401%2092.8704%2025.1105C92.8704%2025.8665%2093.3193%2026.7533%2094.2124%2027.4721C95.0582%2028.1488%2095.937%2028.8022%2096.8206%2029.465C97.7468%2030.1977%2098.2098%2030.8745%2098.2098%2031.4252C98.2098%2032.634%2097.416%2033.2828%2095.7669%2033.2828C94.0942%2033.2828%2092.9366%2032.074%2092.568%2029.8057H92.1144L90.8008%2034.2162H91.226C91.7694%2033.8382%2092.1569%2033.6001%2092.946%2033.6001C93.6973%2033.6001%2094.5006%2034.4729%2096.2158%2034.4729C97.5814%2034.4729%2098.6682%2034.1929%2099.5943%2033.2781C100.383%2032.4753%20100.776%2031.3552%20100.776%2030.4404C100.776%2029.591%20100.237%2028.6062%2099.2966%2027.8921C98.4886%2027.2807%2097.6286%2026.7347%2096.7923%2026.1419C95.8898%2025.4792%2095.4362%2024.9144%2095.4362%2024.2937C95.4362%2023.9483%2095.611%2023.6076%2095.9559%2023.2622C96.3954%2022.8282%2096.986%2022.7302%2097.7751%2022.7302C99.3581%2022.7302%20100.464%2023.5983%20100.558%2025.4325H100.974L102.08%2021.5447H101.664C101.215%2022.0441%20100.752%2022.2961%20100.265%2022.2961Z'%20fill='white'/%3e%3cpath%20d='M149.201%2022.7304C150.784%2022.7304%20151.89%2023.6032%20151.984%2025.4327H152.4L153.501%2021.5449H153.085C152.646%2022.049%20152.182%2022.301%20151.696%2022.301C151.512%2022.301%20151.11%2022.175%20150.496%2021.923C149.881%2021.6709%20149.262%2021.5449%20148.634%2021.5449C147.334%2021.5449%20146.252%2021.9603%20145.364%2022.8471C144.627%2023.5845%20144.296%2024.4059%20144.296%2025.1153C144.296%2025.8714%20144.745%2026.7582%20145.638%2027.477C146.484%2028.1537%20147.363%2028.8071%20148.246%2029.4699C149.173%2030.2026%20149.636%2030.8794%20149.636%2031.4301C149.636%2032.6389%20148.842%2033.2876%20147.193%2033.2876C145.52%2033.2876%20144.362%2032.0788%20143.994%2029.8106H143.54L142.227%2034.2211H142.642C143.186%2033.843%20143.573%2033.605%20144.358%2033.605C145.109%2033.605%20145.912%2034.4778%20147.627%2034.4778C148.993%2034.4778%20150.075%2034.1978%20151.006%2033.283C151.795%2032.4802%20152.187%2031.3601%20152.187%2030.4453C152.187%2029.6005%20151.649%2028.6111%20150.708%2027.897C149.9%2027.2856%20149.04%2026.7395%20148.204%2026.1468C147.301%2025.4841%20146.848%2024.9193%20146.848%2024.2986C146.848%2023.9532%20147.023%2023.6125%20147.368%2023.2671C147.826%2022.8237%20148.412%2022.7304%20149.201%2022.7304Z'%20fill='white'/%3e%3cpath%20d='M26.5433%202.60035C26.0377%202.44633%2025.5321%202.72169%2025.0265%203.00173C24.8469%203.09974%2024.7194%203.27243%2024.6768%203.46845L23.883%207.13222C23.8547%207.26757%2023.9775%207.38891%2024.1145%207.36091C24.9509%207.17422%2025.7447%206.4508%2026.5811%206.70283C27.5167%206.98753%2028.4522%205.81606%2029.3878%205.83006V1.60156C28.4475%201.60623%2027.4789%202.88505%2026.5433%202.60035Z'%20fill='white'/%3e%3cpath%20d='M38.4856%2013.8398C38.2871%2013.7044%2038.1643%2013.4851%2038.1643%2013.2471V12.5796C38.1643%2011.9822%2037.6729%2011.4922%2037.0633%2011.4922H36.6239C36.0994%2011.4922%2035.6174%2011.7536%2035.3339%2012.1876L33.9164%2014.3485C33.7746%2014.5632%2033.5383%2014.6892%2033.2832%2014.6892H32.3287C31.8562%2014.6892%2031.4215%2014.9459%2031.1947%2015.3566C30.9631%2015.7814%2030.552%2016.0754%2030.0843%2016.1734V1.1403C30.0843%200.94894%2029.9283%200.794922%2029.7346%200.794922C29.5409%200.794922%2029.3849%200.94894%2029.3849%201.1403V1.60702V5.83552V16.1827C28.9171%2016.0847%2028.506%2015.7907%2028.2745%2015.3613C28.0524%2014.9506%2027.6177%2014.6939%2027.1405%2014.6939H26.4979C25.9875%2014.6939%2025.5292%2014.9879%2025.3213%2015.45L24.7873%2016.6308C24.7023%2016.8175%2024.5133%2016.9388%2024.3054%2016.9388C24.0975%2016.9388%2023.9085%2016.8175%2023.8234%2016.6308L23.2895%2015.45C23.0816%2014.9926%2022.6232%2014.6939%2022.1129%2014.6939H4.00135C3.85487%2014.6939%203.73674%2014.8106%203.73674%2014.9553C3.73674%2015.2633%203.48158%2015.5107%203.17444%2015.5107H2.39007C2.24359%2015.5107%202.12546%2015.6273%202.12546%2015.772V16.6728C2.12546%2017.5176%201.96008%2018.339%201.62931%2019.1184L1.15207%2020.2526C0.707907%2021.3027%200.5%2022.3901%200.5%2023.4589V26.0726C0.5%2026.7773%200.603954%2027.4914%200.811861%2028.1868C1.39306%2030.1377%202.7161%2031.7339%204.53529%2032.6767L7.43182%2034.1842C7.46962%2034.2029%207.51214%2034.2122%207.55467%2034.2122L9.69517%2034.2309C10.196%2034.2355%2010.6875%2034.3616%2011.1269%2034.6043L12.2751%2035.239C12.3129%2035.2623%2012.3602%2035.2717%2012.4074%2035.2717H13.9431C14.4818%2035.2717%2015.0157%2035.4163%2015.474%2035.6917C15.474%2035.6917%2016.2253%2036.1444%2016.4805%2036.2891C16.8869%2036.5225%2017.3783%2036.7465%2018.2335%2036.7932C18.4273%2036.8025%2018.621%2036.7325%2018.7675%2036.5972C18.9092%2036.4618%2018.9943%2036.2704%2018.9943%2036.0791V35.0616C18.9943%2034.3242%2019.4337%2033.6521%2020.1189%2033.3581L22.4673%2032.3406C22.7886%2032.2006%2023.1477%2032.1773%2023.4832%2032.28L24.3621%2032.5367C24.7354%2032.644%2025.1323%2032.6487%2025.5056%2032.5367L27.5846%2031.9253C27.8587%2031.8459%2028.1517%2031.8459%2028.4304%2031.9299L29.2763%2032.1633C29.6684%2032.2706%2029.9472%2032.6347%2029.9472%2033.0361V35.071C29.9472%2036.0184%2030.7269%2036.7932%2031.6861%2036.7932C32.4043%2036.7932%2033.0328%2036.3405%2033.2501%2035.6637C33.6423%2034.4456%2033.8408%2033.1761%2033.8408%2031.8973V31.0292C33.8408%2030.4131%2034.1006%2029.8204%2034.5543%2029.3956L35.419%2028.5882C36.0002%2028.0421%2036.3356%2027.2674%2036.3356%2026.474V21.6481C36.3356%2020.9013%2036.5625%2020.1779%2036.9972%2019.5618C37.0302%2019.5198%2037.0444%2019.4638%2037.0444%2019.4125V18.2737C37.0444%2017.5316%2037.2712%2016.8128%2037.6965%2016.2014L38.5517%2014.9739C38.5848%2014.9319%2038.599%2014.8806%2038.599%2014.8246V14.0545C38.6037%2013.9098%2038.5139%2013.8585%2038.4856%2013.8398ZM30.0843%2025.2838C30.6654%2025.3725%2031.1002%2025.6665%2031.1002%2026.0212C31.1002%2026.3759%2030.6702%2026.67%2030.0843%2026.7587V25.2838ZM5.22516%2032.4433L4.78572%2032.2146C3.59026%2031.5939%202.63577%2030.6698%201.9837%2029.545V28.1355C2.73028%2029.2043%203.74619%2030.1144%204.98891%2030.7631L5.22516%2030.8845V32.4433ZM7.43654%2033.5961L6.2647%2032.9894V31.4305L7.43182%2032.0373H7.43654V33.5961ZM12.3129%2034.6556L11.3868%2034.1422C10.8812%2033.8622%2010.3142%2033.7128%209.73297%2033.7035V32.0793C10.2197%2032.0886%2010.7016%2032.2146%2011.1269%2032.448L12.2751%2033.0827C12.2846%2033.0874%2012.2987%2033.0874%2012.3129%2033.0921V34.6556ZM18.4603%2035.0616V35.8551V36.0791C18.4603%2036.1304%2018.4367%2036.1818%2018.3989%2036.2191C18.3611%2036.2564%2018.3139%2036.2705%2018.2619%2036.2705C17.52%2036.2331%2017.0948%2036.0418%2016.7498%2035.8411C16.4994%2035.6964%2015.7528%2035.2483%2015.7481%2035.2483C15.2803%2034.9683%2014.7511%2034.8143%2014.2077%2034.7723V33.1387C14.6519%2033.1808%2015.0866%2033.3114%2015.474%2033.5401L16.1214%2033.9228C16.8302%2034.3429%2017.6382%2034.5809%2018.4603%2034.6276V35.0616ZM24.8582%2032.0886C24.7448%2032.084%2024.6267%2032.0653%2024.5133%2032.0326L23.6344%2031.7713C23.4454%2031.7152%2023.2517%2031.6966%2023.0579%2031.6966V30.0677C23.1997%2030.0677%2023.3414%2030.0817%2023.4832%2030.1237L24.3621%2030.3804C24.5227%2030.4271%2024.6928%2030.4504%2024.8582%2030.4598V32.0886ZM30.363%2032.4807C30.1929%2032.0886%2029.8574%2031.7759%2029.4275%2031.6592L28.5864%2031.4259C28.3879%2031.3652%2028.18%2031.3419%2027.9721%2031.3419V29.7177C28.1328%2029.713%2028.2934%2029.7317%2028.4493%2029.783L29.1392%2029.9977C29.8716%2030.2264%2030.363%2030.8891%2030.363%2031.6452V32.4807ZM32.787%2035.365C32.7729%2035.4117%2032.7634%2035.4584%2032.7492%2035.505C32.6028%2035.9624%2032.1775%2036.2658%2031.6955%2036.2658C31.653%2036.2658%2031.6105%2036.2564%2031.568%2036.2518V34.6323C31.601%2034.6369%2031.6294%2034.6416%2031.6625%2034.6416C32.135%2034.6416%2032.565%2034.3802%2032.7918%2033.9835V35.365H32.787ZM37.3232%2015.0486C36.794%2015.8047%2036.5152%2016.6915%2036.5152%2017.6109V18.4137L36.1041%2019.0017C35.5702%2019.7625%2035.2867%2020.6539%2035.2867%2021.578V25.6245C35.2867%2026.2779%2035.0126%2026.9173%2034.5306%2027.3654L33.6659%2028.1775C33.0847%2028.7236%2032.7634%2029.489%2032.787%2030.2824L32.7918%2030.4644C32.8248%2031.5146%2032.6878%2032.56%2032.3901%2033.5681C32.2956%2033.8902%2031.9932%2034.1142%2031.6577%2034.1142C31.2372%2034.1142%2030.8923%2033.7782%2030.8923%2033.3581V31.6452C30.8923%2030.6558%2030.2496%2029.7923%2029.2952%2029.4983L28.6053%2029.2836C28.2225%2029.1669%2027.8209%2029.1623%2027.4334%2029.2743L25.3544%2029.881C25.0803%2029.9604%2024.7873%2029.9604%2024.5133%2029.881L23.6344%2029.6243C23.1808%2029.489%2022.6894%2029.5217%2022.2547%2029.7083L20.4071%2030.5111C19.2258%2031.0245%2018.4651%2032.1773%2018.4651%2033.4515V34.1095C17.7374%2034.0675%2017.0286%2033.8528%2016.4002%2033.4795L15.7528%2033.0967C15.2047%2032.7747%2014.581%2032.602%2013.9431%2032.602H12.4736L11.3868%2031.9999C10.8717%2031.7152%2010.2905%2031.5659%209.69989%2031.5612L7.62082%2031.5472L5.23461%2030.3057C1.61514%2028.4249%200.0700101%2024.1917%201.64349%2020.4579L2.12073%2019.3238C2.47512%2018.4837%202.6594%2017.5922%202.6594%2016.6775V16.0427H3.17444C3.68476%2016.0427%204.11948%2015.6927%204.2376%2015.2213H22.1176C22.4153%2015.2213%2022.6894%2015.394%2022.8075%2015.6647L23.3414%2016.8455C23.5115%2017.2235%2023.8896%2017.4662%2024.3101%2017.4662C24.7259%2017.4662%2025.1087%2017.2235%2025.2788%2016.8455L25.8127%2015.66C25.9356%2015.3893%2026.2049%2015.2166%2026.5026%2015.2166H27.1452C27.424%2015.2166%2027.6791%2015.366%2027.8114%2015.6087C28.1375%2016.2061%2028.7234%2016.6075%2029.3897%2016.7148V24.145C28.317%2024.2617%2027.4949%2024.8918%2027.4949%2025.6572C27.4949%2026.5066%2028.4966%2027.1927%2029.7346%2027.1927C30.9726%2027.1927%2031.9743%2026.5066%2031.9743%2025.6572C31.9743%2024.8918%2031.1521%2024.257%2030.0795%2024.145V16.7101C30.7458%2016.6028%2031.3317%2016.2014%2031.6577%2015.604C31.79%2015.3613%2032.0452%2015.212%2032.324%2015.212H33.2785C33.7179%2015.212%2034.1195%2014.9926%2034.3605%2014.6286L35.7781%2012.4676C35.9624%2012.1829%2036.2789%2012.0149%2036.6239%2012.0149H37.0633C37.3752%2012.0149%2037.6303%2012.2669%2037.6303%2012.575V13.2424C37.6303%2013.5644%2037.7579%2013.8725%2037.98%2014.1012L37.3232%2015.0486ZM29.3849%2025.2838V26.7587C28.8037%2026.67%2028.3737%2026.3759%2028.3737%2026.0212C28.3737%2025.6665%2028.8037%2025.3678%2029.3849%2025.2838Z'%20fill='white'/%3e%3c/svg%3e",Fh="data:image/svg+xml,%3csvg%20width='159'%20height='28'%20viewBox='0%200%20159%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6919_71839)'%3e%3cpath%20d='M4.13243%2025.9198C5.34921%2026.9052%207.05161%2027.0267%208.39597%2026.224L22.9838%2017.5138C25.4013%2016.0703%2025.4117%2012.5721%2023.0028%2011.1144L17.4686%207.76522C15.4767%206.55981%2012.8918%207.10053%2011.5501%209.00325L3.27399%2020.7399C2.14132%2022.3462%202.44805%2024.5556%203.97544%2025.7926L4.13243%2025.9198Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M4.11673%202.57147C5.33939%201.58127%207.0516%201.46387%208.39797%202.27791L22.9843%2011.0971C25.3835%2012.5477%2025.3874%2016.0265%2022.9914%2017.4824L17.5405%2020.7946C15.5485%2022.005%2012.9594%2021.4661%2011.6157%2019.5615L3.27518%207.7386C2.142%206.1323%202.44856%203.92248%203.97619%202.68529L4.11673%202.57147Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M49.8088%2020.0063C47.924%2020.0063%2046.7521%2018.7437%2046.7521%2016.6748V13.1359H50.1977V10.9296H46.7521V7.34668L44.2736%209.18483V10.9271H42.8892V13.1333H44.2736V16.6515C44.2736%2020.2137%2046.3632%2022.4174%2049.8321%2022.4174H50.361V20.0063H49.8088Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M30.4704%2019.5631L32.6818%2017.8339C33.6722%2019.4231%2035.01%2020.2761%2036.7159%2020.2761C38.5826%2020.2761%2039.757%2019.0783%2039.757%2017.5798C39.757%2015.8505%2037.9137%2015.2983%2035.977%2014.6761C33.6956%2013.9398%2031.23%2013.0168%2031.23%209.92907C31.23%207.37018%2033.5115%205.34277%2036.6226%205.34277C39.1815%205.34277%2040.7707%206.33314%2042.0618%207.83166L40.0111%209.35351C39.2515%208.17907%2038.1211%207.55685%2036.6226%207.55685C34.9167%207.55685%2033.8096%208.57055%2033.8096%209.88499C33.8096%2011.4976%2035.5856%2012.0291%2037.5196%2012.6746C39.8244%2013.4576%2042.3367%2014.4506%2042.3367%2017.585C42.3367%2020.1672%2040.2159%2022.6328%2036.7367%2022.6328C33.8563%2022.6328%2031.8963%2021.4117%2030.4678%2019.5683L30.4704%2019.5631Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M58.9189%2016.7007C58.9189%2013.3225%2061.5141%2010.6807%2064.8923%2010.6807C68.2704%2010.6807%2070.7982%2013.1384%2070.7982%2016.5399V17.5044H61.286C61.6075%2019.2725%2062.9867%2020.4444%2064.9856%2020.4444C66.5489%2020.4444%2067.7441%2019.6173%2068.3404%2018.3755L70.3627%2019.5007C69.3515%2021.3855%2067.5367%2022.6247%2064.9856%2022.6247C61.356%2022.6247%2058.9189%2020.0296%2058.9189%2016.6981V16.7007ZM61.4001%2015.4147H68.2938C67.9256%2013.7607%2066.663%2012.8403%2064.8923%2012.8403C63.1215%2012.8403%2061.8589%2013.8981%2061.4001%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M51.8955%2016.6752C51.8955%2013.113%2053.9851%2010.9326%2057.454%2010.9326H58.5559V13.323H57.4307C55.5459%2013.323%2054.33%2014.6322%2054.3533%2016.7011V22.423H51.8955V16.6804V16.6752Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M72.0138%2016.6774C72.0138%2013.3226%2074.6557%2010.7041%2077.9638%2010.7041C81.272%2010.7041%2083.8672%2013.3226%2083.8672%2016.6774V22.42H81.456V20.9267C80.6523%2022.0052%2079.4105%2022.6274%2077.8938%2022.6274C74.609%2022.6274%2072.0112%2020.0556%2072.0112%2016.6774H72.0138ZM81.5027%2016.6774C81.5027%2014.6319%2079.9394%2013.0011%2077.9638%2013.0011C75.9883%2013.0011%2074.4249%2014.6319%2074.4249%2016.6774C74.4249%2018.723%2075.9649%2020.3537%2077.9638%2020.3537C79.9627%2020.3537%2081.5027%2018.6997%2081.5027%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M85.4155%2015.978C85.4155%2012.9214%2087.5052%2010.6943%2090.6085%2010.6943C92.3766%2010.6943%2093.8026%2011.4073%2094.697%2012.6025C95.5474%2011.4073%2096.9266%2010.6943%2098.6948%2010.6943C101.819%2010.6943%20104.002%2012.8773%20104.002%2015.978V22.4103H101.544V16.0014C101.544%2014.2566%20100.372%2013.038%2098.6948%2013.038C97.0174%2013.038%2095.9155%2014.2799%2095.9389%2015.934V22.4129H93.4811V16.004C93.4811%2014.2592%2092.2859%2013.0406%2090.6085%2013.0406C88.9311%2013.0406%2087.8526%2014.2825%2087.8733%2015.9366V22.4154H85.4155V15.9832V15.978Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M105.578%205.6416H108.082V20.0227H114.859V22.4131H105.578V5.6416Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M138.483%2016.7007C138.483%2013.3225%20141.078%2010.6807%20144.456%2010.6807C147.834%2010.6807%20150.362%2013.1384%20150.362%2016.5399V17.5044H140.85C141.171%2019.2725%20142.551%2020.4444%20144.55%2020.4444C146.113%2020.4444%20147.308%2019.6173%20147.904%2018.3755L149.927%2019.5007C148.916%2021.3855%20147.101%2022.6247%20144.55%2022.6247C140.92%2022.6247%20138.483%2020.0296%20138.483%2016.6981V16.7007ZM140.964%2015.4147H147.858C147.49%2013.7607%20146.227%2012.8403%20144.456%2012.8403C142.685%2012.8403%20141.423%2013.8981%20140.964%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M115.269%2016.6774C115.269%2013.3226%20117.911%2010.7041%20121.219%2010.7041C124.527%2010.7041%20127.122%2013.3226%20127.122%2016.6774V22.42H124.711V20.9267C123.907%2022.0052%20122.665%2022.6274%20121.149%2022.6274C117.864%2022.6274%20115.266%2020.0556%20115.266%2016.6774H115.269ZM124.758%2016.6774C124.758%2014.6319%20123.194%2013.0011%20121.219%2013.0011C119.243%2013.0011%20117.68%2014.6319%20117.68%2016.6774C117.68%2018.723%20119.22%2020.3537%20121.219%2020.3537C123.218%2020.3537%20124.758%2018.6997%20124.758%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M131.67%2021.8547L126.915%2010.9658H129.557L132.912%2018.938L136.082%2010.9658H138.678L131.74%2027.7606H129.212L131.67%2021.8573V21.8547Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M151.897%2016.6674C151.897%2013.1052%20153.987%2010.9248%20157.455%2010.9248H158.557V13.3152H157.432C155.547%2013.3152%20154.331%2014.6244%20154.355%2016.6933V22.4152H151.897V16.6726V16.6674Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6919_71839'%3e%3crect%20width='158.12'%20height='28'%20fill='white'%20style='fill:white;fill-opacity:1;'%20transform='translate(0.44043)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Dh=(e,t,n)=>e===t?"translateY(0px)":e>t?`translateY(${n}px)`:"translateY(-100%)",l4=({close:e,votedAnswer:t,mastersApp:n,correct:r,correctAnswerTitle:i,questionTitle:a,saveHeight:l,style:o,hiding:c})=>{const[u,g]=w.useState(1),C=w.useRef({});w.useEffect(()=>{const E=setInterval(()=>{g(L=>r&&L>4||!r&&L>3?L:++L)},3e3);return()=>clearInterval(E)},[r]),w.useEffect(()=>{var E,L;C.current[u]&&l(((L=(E=C.current[u])==null?void 0:E.getBoundingClientRect())==null?void 0:L.height)||Th)},[u,l]);const p=E=>L=>{C.current&&(C.current[E]=L)},y=E=>({transform:Dh(E,u,o.height)}),x={...o};return n&&x.height&&typeof x.height=="number"&&(x.height+=32),s.jsx(Ah,{style:o.height?x:{...o,paddingTop:0,paddingBottom:0},hiding:c,children:s.jsxs($h,{style:{height:o.height,minHeight:o.height,backgroundColor:u>3?r?"var(--color-sdk-prediction-result-success-bg)":"var(--color-sdk-prediction-result-incorrect-bg)":"var(--color-primary-1)"},children:[s.jsx(Ih,{step:u,correct:r}),n&&s.jsxs(Z1,{ref:p(1),style:y(1),children:[s.jsx("img",{alt:"sponsor-logo",src:Hh}),s.jsx(as,{children:"Featured Groups +"})]}),!n&&s.jsx(Z1,{ref:p(1),style:y(1),children:s.jsx("img",{alt:"sponsor-logo",src:Fh})}),s.jsxs(Z1,{ref:p(2),style:y(2),children:[s.jsx(s2,{children:"Prediction results are in!"}),n&&s.jsx(as,{children:"Featured Groups +"})]}),s.jsxs(Z1,{ref:p(3),style:y(3),children:[s.jsx(s2,{children:a}),s.jsx(cn,{children:s.jsxs(un,{children:[s.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})})]}),r?s.jsxs(s.Fragment,{children:[s.jsxs(Z1,{ref:p(4),style:{...y(4),color:"var(--color-sdk-prediction-result-success-text)"},children:[s.jsxs(s2,{children:["Congratulations!",s.jsx("br",{}),"You answered correctly."]}),s.jsxs(cn,{children:[s.jsx(ls,{name:"selected"}),s.jsxs(un,{children:[s.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]})]}),s.jsxs(Z1,{ref:p(5),style:{...y(5),color:"var(--color-sdk-prediction-result-success-text)"},children:[s.jsx(_h,{children:u===5&&s.jsx(hr,{delay:.5,prefix:"+",suffix:" points",value:t==null?void 0:t.points})}),s.jsxs(cn,{children:[s.jsx(ls,{name:"selected"}),s.jsxs(un,{children:[s.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]}),s.jsx(ss,{"data-a":"intr",onClick:e,children:s.jsx(os,{name:"icon-cross"})})]})]}):s.jsxs(Z1,{ref:p(4),style:y(4),children:[s.jsxs(s2,{style:{color:"var(--color-sdk-prediction-result-error-title)"},children:["Better luck next time!",s.jsx("br",{}),"Correct: ",i,"."]}),s.jsxs(cn,{style:{color:"var(--color-sdk-prediction-result-error-subtitle)"},children:[s.jsx(Oh,{name:"circleClose"}),s.jsxs(un,{children:[s.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]}),s.jsx(ss,{"data-a":"intr",onClick:e,children:s.jsx(os,{name:"icon-cross"})})]})]})})},s4=e=>{const[t,n]=w.useState(!1),[r,i]=w.useState(!1),a=w.useRef(null),l=w.useCallback(()=>{i(!0),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{i(!1)},1e3)},[]),o=w.useCallback(async c=>{n(!0);const u=c.map(g=>new Promise((C,p)=>{const y=new Image;y.onload=()=>C(g),y.onerror=()=>p(),y.src=g}));await Promise.allSettled(u),n(!1)},[]);return w.useEffect(()=>{e&&(l(),o(e))},[e,l,o]),{loading:t,throttled:r}},zh=d("div")({name:"Container",class:"cl51m2q",propsAsIs:!1}),Bh=d("img")({name:"Avatar",class:"a2yhhhr",propsAsIs:!1}),Uh=d("div")({name:"AvatarPlaceholder",class:"a1dtxxlr",propsAsIs:!1}),Zh=d("div")({name:"Content",class:"c12clm3w",propsAsIs:!1}),qh=d("span")({name:"Name",class:"n14lctn7",propsAsIs:!1}),Qh=({avatar:e,name:t})=>s.jsxs(zh,{children:[e&&s.jsx(Bh,{src:e}),!e&&s.jsx(Uh,{children:l0(t||"")}),s.jsxs(Zh,{children:[s.jsxs(qh,{children:[t," "]}),"is waiting for you!"]})]}),Wh=d("div")({name:"Container",class:"c1htq1lb",propsAsIs:!1}),Gh=d("div")({name:"Graphic",class:"gjyzpp7",propsAsIs:!1}),Kh=d("img")({name:"GraphicImage",class:"g16mldgz",propsAsIs:!1}),Yh=d("div")({name:"Headline",class:"h69js65",propsAsIs:!1}),Xh=d("div")({name:"TaglineContainer",class:"tmm7qmo",propsAsIs:!1}),Jh=d("div")({name:"Tagline",class:"t17knuw2",propsAsIs:!1}),em=d("div")({name:"Content",class:"c1b74psg",propsAsIs:!1}),tm=d("div")({name:"StepsContainer",class:"s1y99ug7",propsAsIs:!1}),nm=d("span")({name:"StepIndicator",class:"sgf3v5n",propsAsIs:!1}),rm=d("div")({name:"InvitingUserWrap",class:"i1sj6gn8",propsAsIs:!1}),im=({loading:e,steps:t,currentStep:n,inviterName:r})=>{const{headline:i,tagline:a}=t[n];return s.jsxs(Wh,{children:[a&&s.jsx(Xh,{children:s.jsx($e,{loading:e,children:s.jsx(Jh,{children:a})})}),s.jsxs(em,{"data-welcome-screen":n===0,children:[s.jsx(Gh,{children:s.jsx($e,{loading:e,children:t.map(({graphicSrc:l},o)=>s.jsx(Kh,{src:l,"data-active":n===o}))})}),i&&s.jsx($e,{loading:e,children:s.jsx(Yh,{children:i})})]}),r&&n===0&&s.jsx(rm,{children:s.jsx(Qh,{name:r})}),s.jsx(tm,{style:e?{visibility:"hidden"}:{},children:Array.from({length:t.length}).map((l,o)=>s.jsx(nm,{"data-active":n===o},o))})]})},am=d("div")({name:"Container",class:"cm0bev",propsAsIs:!1}),lm=d("div")({name:"Content",class:"ce7x737",propsAsIs:!1}),sm=d("div")({name:"Title",class:"tc2tor6",propsAsIs:!1}),om=d("div")({name:"RulesList",class:"r1k5klql",propsAsIs:!1}),cm=d("div")({name:"RulesItem",class:"r1tf3ft2",propsAsIs:!1}),um=d("div")({name:"RuleIcon",class:"rwpvg1k",propsAsIs:!1}),dm=d("div")({name:"RuleText",class:"rbxiag0",propsAsIs:!1}),pm=d("button")({name:"TermsButton",class:"t6cyrry",propsAsIs:!1}),fm=({rules:e,rulesTitle:t,termsText:n,primaryColor:r,openTerms:i})=>s.jsxs(am,{children:[s.jsxs(lm,{children:[s.jsx(sm,{children:t}),s.jsx(om,{children:e==null?void 0:e.map(({label:a,icon:l},o)=>s.jsxs(cm,{children:[l&&s.jsx(um,{style:{backgroundColor:r},children:s.jsx(O,{name:l,"data-icon":l})}),s.jsx(dm,{children:a})]},o))})]}),n&&s.jsx(pm,{"data-a":"intr",onClick:i,children:"See Terms and Conditions"})]}),hm=d("div")({name:"Container",class:"cj0g35h",propsAsIs:!1}),mm=d("div")({name:"Content",class:"c1xkhrbn",propsAsIs:!1}),Cm=d("div")({name:"Title",class:"tifzb8b",propsAsIs:!1}),gm=d("div")({name:"ScrollingText",class:"stduw5c",propsAsIs:!1}),vm=({termsTitle:e,termsText:t})=>s.jsx(hm,{children:s.jsxs(mm,{children:[s.jsx(Cm,{children:e}),s.jsx(gm,{children:t})]})}),ym=d("button")({name:"SButton",class:"s1nve60q",propsAsIs:!1}),wm=d("span")({name:"ButtonLabel",class:"b1xoswwx",propsAsIs:!1}),bm=({disabled:e,variant:t="primary",onClick:n,children:r,...i})=>s.jsx(ym,{"data-a":"intr",onClick:n,disabled:e,"data-variant":t,...i,children:s.jsx(wm,{children:r})}),xm=d("div")({name:"Container",class:"c18uddbs",propsAsIs:!1}),Em=d("div")({name:"Content",class:"cvcfjf6",propsAsIs:!1}),Lm=d("div")({name:"OnboardingHeader",class:"o1ie27lw",propsAsIs:!1}),km=d("button")({name:"CloseBtn",class:"c15cjkwi",propsAsIs:!1}),Sm=()=>O,Im=d(Sm())({name:"IconClose",class:"i1mavjt2",propsAsIs:!0}),Tm=d("div")({name:"OnboardingFooter",class:"o1x0dyzv",propsAsIs:!1}),jm=()=>bm,Am=d(jm())({name:"OnboardingActionBtn",class:"o1jfi9c3",propsAsIs:!0}),ht={steps:!1,rules:!1,inviteCard:!1},o4=({gamification:e,steps:t,rules:n,rulesBtnLabel:r,rulesTitle:i,termsTitle:a,termsText:l,primaryColor:o,inviteLink:c,inviteCardTitle:u,inviteCardSubtext:g,inviteCardBtnLabel:C,loading:p,inviterName:y,sdk:x,onClose:E})=>{const[L,m]=w.useState(0),[f,v]=w.useState(!1),[b,S]=w.useState(ht);w.useEffect(()=>{t!=null&&t.length?S({...ht,steps:!0}):n!=null&&n.length?S({...ht,rules:!0}):S({...ht,inviteCard:!0})},[]);const I=w.useMemo(()=>b.steps&&L===0?"Continue":b.rules?f||!r?"Got it":r:b.inviteCard?C||"Play Now":"Next",[b,L,f,r,C]),j=w.useCallback(()=>{t!=null&&t.length&&L<t.length-1?m(V=>++V):n!=null&&n.length&&b.steps?S({...ht,rules:!0}):b.rules&&S({...ht,inviteCard:!0})},[L,t==null?void 0:t.length,n==null?void 0:n.length,b,m,S]),A=async()=>{b.inviteCard?await e.onboardingStatus.submitInplay():b.rules&&f?v(!1):j()};return w.useEffect(()=>{!p&&y&&x.inviteDisplayed()},[p,y,x]),s.jsx(qd,{children:({width:V,height:_})=>s.jsxs(xm,{style:{width:V,height:_,maxHeight:_},children:[s.jsx(Lm,{children:s.jsx(km,{"data-a":"intr",onClick:E,children:s.jsx(Im,{name:"icon-close-btn-gray"})})}),s.jsxs(Em,{children:[b.steps&&(t==null?void 0:t.length)&&s.jsx(im,{loading:p,steps:t,currentStep:L,inviterName:y}),b.rules&&!f&&s.jsx(fm,{rules:n,rulesTitle:i,termsText:l,primaryColor:o,openTerms:()=>v(!0)}),b.rules&&f&&s.jsx(vm,{termsTitle:a,termsText:l}),b.inviteCard&&s.jsx(e4,{inviteLink:c,inviteCardTitle:u,inviteCardSubtext:g,primaryColor:o})]}),s.jsx(Tm,{children:s.jsx($e,{loading:p,style:{width:"100%"},children:s.jsx(Am,{"data-a":"intr",onClick:A,children:I})})})]})})},$m=d("div")({name:"Container",class:"c1qjj4d4",propsAsIs:!1}),Rm=d("div")({name:"CloseIconWrap",class:"c1lg6b8a",propsAsIs:!1}),_m=()=>O,Vm=d(_m())({name:"CloseIcon",class:"c159el66",propsAsIs:!0}),Nm=d("div")({name:"Title",class:"t16xmufv",propsAsIs:!1}),Mm=d("img")({name:"SponsorLogo",class:"s83lc21",propsAsIs:!1}),Om=d("div")({name:"PresentsTitle",class:"p1p7igia",propsAsIs:!1}),Pm=d("div")({name:"Subtitle",class:"s1eftsbu",propsAsIs:!1}),Hm=d("div")({name:"Description",class:"d8uezec",propsAsIs:!1}),Fm=d("button")({name:"ActionButton",class:"a1h1bk90",propsAsIs:!1}),cs=({close:e,action:t,onboarding:n})=>{var r,i,a,l,o,c,u,g;return s.jsxs($m,{children:[s.jsx(Rm,{"data-a":"intr",onClick:e,children:s.jsx(Vm,{name:"icon-cross"})}),((i=(r=n==null?void 0:n.titleCard)==null?void 0:r.media)==null?void 0:i.sponsorLogo)&&s.jsxs(Nm,{children:[s.jsx(Mm,{alt:"sponsor-logo",src:(l=(a=n==null?void 0:n.titleCard)==null?void 0:a.media)==null?void 0:l.sponsorLogo}),s.jsx(Om,{children:"PRESENTS"})]}),((o=n==null?void 0:n.titleCard)==null?void 0:o.title)&&s.jsx(Pm,{children:(c=n==null?void 0:n.titleCard)==null?void 0:c.title}),((u=n==null?void 0:n.titleCard)==null?void 0:u.subtitle)&&s.jsx(Hm,{children:(g=n==null?void 0:n.titleCard)==null?void 0:g.subtitle}),s.jsx(Fm,{"data-a":"intr",onClick:t,children:"Play Now"})]})},Xi=[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",tagline:"",headline:s.jsxs(s.Fragment,{children:["Welcome to ",s.jsx("br",{})," Live Challenge"]})},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",headline:"Live insights, polls, trivia and predictions."},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",headline:"Win points and play against friends."}],Dm=d("div")({name:"OnboardingContainer",class:"o1xni1kr",propsAsIs:!1}),zm=()=>ot,Bm=d(zm())({name:"OnboardingNotificationContainer",class:"o1vnouv7",propsAsIs:!0}),us=d("div")({name:"InnerContainer",class:"i59uefw",propsAsIs:!1}),Um=d("div")({name:"OnboardingOverlap",class:"ovnr8ov",propsAsIs:!1}),Zm=({deepLink:e,onboardingOpts:t,notification:n,gamification:r,loading:i,sdk:a,throttled:l})=>{var o,c,u,g,C,p,y;const x=F(r.friends.getStore()),[E,L]=w.useState(void 0),m=w.useMemo(()=>{var f,v;const b=a.getInviter();return b?(v=(f=x.data)==null?void 0:f.find(({slId:S})=>S===b))==null?void 0:v.name:""},[x.data,a]);return w.useEffect(()=>{const f=e.$store.subscribe(v=>{v&&L(v.data)});return()=>{f()}},[e.$store]),s.jsxs(Dm,{children:[s.jsx(o4,{loading:i,rules:[{label:"Answer as many questions as you like.",icon:"icon-btn-feature-groups"},{label:"Win points for each correct trivia or prediction answer.",icon:"icon-thumb-up"},{label:"Top the leader board and best your friends.",icon:"icon-trophy"}],rulesBtnLabel:(o=t.rules)==null?void 0:o.buttonLabel,rulesTitle:(c=t.rules)==null?void 0:c.heading,termsTitle:"Terms and Conditions",termsText:(u=t.rules)==null?void 0:u.terms,steps:Xi,primaryColor:(g=t.inviteCard)==null?void 0:g.iconColor,inviteLink:E,inviteCardTitle:(C=t.inviteCard)==null?void 0:C.heading,inviteCardSubtext:(p=t.inviteCard)==null?void 0:p.subtext,inviteCardBtnLabel:(y=t.inviteCard)==null?void 0:y.buttonLabel,onClose:()=>{var f;(f=n.close)==null||f.call(n)},gamification:r,sdk:a,inviterName:m}),l&&s.jsx(Um,{})]})},qm=({sdk:e,notification:t,saveHeight:n,style:r,appNode:i,sdkInDesktopView:a,responsiveStore:l})=>{const o=w.useRef(null),c=t.data.onboarding,[u,g]=w.useState(c==null?void 0:c.instantOpen),C=e.getFeature(k.SdkOverlayType.GAMES),p=w.useMemo(()=>Xi==null?void 0:Xi.map(({graphicSrc:L})=>L),[]),{screen:y}=F(l,{keys:["screen"]});w.useLayoutEffect(()=>{var L;n(((L=o.current)==null?void 0:L.getBoundingClientRect().height)||0)},[n]);const{loading:x,throttled:E}=s4(p);return u&&C&&c&&i.current?s.jsx(X0,{container:i,useContainer:!a,children:s.jsx(Zm,{throttled:E,notification:t,setOpened:g,gamification:C,onboardingOpts:c,deepLink:C.deepLink,loading:x,renderToNode:i,sdk:e})}):s.jsxs(s.Fragment,{children:[s.jsx(us,{ref:o,style:{position:"absolute",visibility:"hidden"},children:s.jsx(cs,{close:()=>{},action:()=>{},onboarding:c})}),s.jsx(Bm,{style:r,hiding:t.hiding,children:s.jsx(us,{children:s.jsx(cs,{close:t.close,action:()=>{var L;g(!0),(((L=i.current)==null?void 0:L.getBoundingClientRect().y)||0)<0&&n0(i,y.size,{behavior:"smooth"})},onboarding:c})})})]})},Qm=d("button")({name:"Container",class:"crkmfw1",propsAsIs:!1}),Wm=d("div")({name:"Content",class:"c11awpy4",propsAsIs:!1}),Gm=d("span")({name:"Title",class:"t154z7mh",propsAsIs:!1}),c4=({title:e,onClick:t,className:n,style:r})=>s.jsx(Qm,{"data-a":"intr",onClick:t,className:n,style:r,children:s.jsxs(Wm,{"data-a":"intr",children:[s.jsx(O,{"data-a":"intr",name:"iconUp"}),e&&s.jsx(Gm,{"data-a":"intr",children:e})]})}),Km=()=>ot,Ym=d(Km())({name:"Container",class:"c8ol1ve",propsAsIs:!0}),u4=d("div")({name:"InnerContainer",class:"iqfywam",propsAsIs:!1}),Xm=()=>u4,Jm=d(Xm())({name:"HiddenContainer",class:"hokmtod",propsAsIs:!0}),eC=d("div")({name:"NotificationRefreshing",class:"n192d1q8",propsAsIs:!1}),tC=()=>c4,nC=d(tC())({name:"Pill",class:"p1lha68t",propsAsIs:!0}),rC=e=>{const[t,n]=w.useState(0),r=w.useRef(null),i=w.useMemo(()=>new ResizeObserver(o=>{window.requestAnimationFrame(()=>{var c;if(Array.isArray(o)){for(const u of o)if(u.contentBoxSize){const g=(c=r.current)==null?void 0:c.getBoundingClientRect();g&&n(g.height)}}})}),[]),a=w.useCallback(o=>{r.current=o},[]),l=w.useCallback(o=>{n(o)},[]);return w.useEffect(()=>{const o=r.current;return o?(i.observe(o),()=>{i.unobserve(o)}):()=>{}},[e]),w.useEffect(()=>()=>{i.disconnect()}),[a,t,l]},iC=({sdk:e,notification:t,appNode:n,responsiveStore:r,hasActiveFeature:i})=>{var a,l;const{sdkInDesktopView:o}=F(r,{keys:["sdkInDesktopView"]}),{sdk:c}=Xn(),[u,g,C]=rC(t.id);let p=g;return i||(p="auto"),t.type===exports.NotificationType.QUESTION?s.jsxs(s.Fragment,{children:[s.jsx(Jm,{ref:u,children:s.jsx(Yi,{...t})}),s.jsxs(Ym,{style:{height:t.hiding?0:p},hiding:t.hiding,children:[s.jsx(u4,{style:{height:"100%"},children:s.jsx(Yi,{...t,controlVideo:c==null?void 0:c.controlVideoPlayer})}),s.jsx(eC,{},t.id)]})]}):t.type===exports.NotificationType.QUESTION_RESOLVED&&(l=(a=t.data)==null?void 0:a.question)!=null&&l.predictionResult?s.jsx(l4,{style:{height:t.hiding?0:g},saveHeight:C,close:t.close,hiding:t.hiding,...t.data.question}):t.type===exports.NotificationType.ONBOARDING?s.jsx(qm,{style:{height:t.hiding?0:p},saveHeight:C,sdk:e,notification:t,sdkInDesktopView:o,appNode:n,responsiveStore:r}):null},aC="p7vfi6t",lC=({pill:e,setPill:t,appNode:n,headerNode:r,scrollNode:i,responsiveStore:a,scrollStore:l})=>{var o,c;const{screen:u}=F(a,{keys:["screen"]}),{tabsShown:g,scrollPosition:C}=F(l,{keys:["tabsShown","scrollPosition"]});w.useEffect(()=>{a.get().sdkInDesktopView?C<50&&t(null):C>-50&&t(null)},[C,a,t]);const p=a.get().sdkInDesktopView?n:r;return!e||!p.current?null:V2.createPortal(s.jsx(nC,{title:e.type===exports.NotificationType.QUESTION_RESOLVED?"Prediction result":`New ${((c=N2[(o=e.data)==null?void 0:o.questionType])==null?void 0:c.label)||"notification"}`,"data-a":"intr",onClick:()=>{var y;a.get().sdkInDesktopView?(y=i.current)==null||y.scrollTo({top:0,behavior:"smooth"}):n0(n,u.size,{behavior:"smooth"}),t(null)},className:we(g&&aC,"sl-pill-button")}),p.current)},sC=({sdk:e,headerNode:t,scrollNode:n,responsiveStore:r,appNode:i,scrollStore:a,hasActiveFeature:l})=>{const[o]=w.useState(e.getNotificationsStore()),c=F(o),[u,g]=w.useState(null),C=w.useMemo(()=>e.getActiveNotification(),[e,c]);return w.useEffect(()=>{C&&_t.emit("notification",{action:"rendered",payload:{questionId:C.data.questionId,questionType:C.data.questionType}})},[C]),w.useEffect(()=>{const{sdkInDesktopView:p,sdkInView:y}=r.get();C&&(p||y)&&(!p&&y&&g(C),p&&window.requestAnimationFrame(()=>{a.get().scrollPosition!==0&&g(C)}))},[C]),w.useEffect(()=>{C||g(null)},[C]),s.jsxs(s.Fragment,{children:[!u&&C&&s.jsx(iC,{appNode:i,sdk:e,hasActiveFeature:l,notification:C,responsiveStore:r}),u&&s.jsx(lC,{pill:u,setPill:g,appNode:i,notification:C,headerNode:t,scrollNode:n,scrollStore:a,responsiveStore:r})]})},oC=e=>{const t=F(e.status),n=F(e.sdkStore.slStreamId),r=F(e.userId()),i=F(e.getActiveFeature()),a=t==="ready"&&!!n.data;return w.useEffect(()=>{const l=e.getFeature(k.SdkOverlayType.GAMES);l&&i!==k.SdkOverlayType.GAMES&&(l.closeQuestion(),l.closeUser()),l==null||l.openedQuestionId.subscribe(o=>{o&&i!==k.SdkOverlayType.GAMES&&e.openFeature(k.SdkOverlayType.GAMES)})},[i,e]),{sdkReady:a,activeFeature:i,isLogged:!!r}},cC=({sdk:e,className:t,scrollStore:n,appNode:r,scrollNode:i,responsiveStore:a})=>{const[,l]=hs(e);return s.jsx(hf,{className:t,scrollNode:i,appNode:r,scrollStore:n,feature:l,responsiveStore:a,sdk:e})},uC=({sdk:e,className:t,appNode:n,responsiveStore:r})=>{const i=F(e.featuresList.getStore());return i?Array.from(i,a=>{const l=e.getFeature(a);return l?s.jsx(mf,{className:t,appNode:n,feature:l,responsiveStore:r,sdk:e},a):null}):null},dC=({sdk:e,topNavigation:t})=>{const n=w.useRef(null),r=w.useRef(null),[i]=N6(n),[a,l]=O6(n,i),{sdkReady:o,activeFeature:c,isLogged:u}=oC(e),g=!!o;ws(n,{enabled:g,event:"click",listener:ys});const C=w.useMemo(()=>({sdk:e,topNavigation:t}),[e,t]);return w.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature.js"))},[]),s.jsx(bs.Provider,{value:C,children:s.jsxs(z4,{ref:n,className:t?"":"c10llmat",children:[g&&t&&s.jsx(Mf,{className:t2,sdk:e,ref:r}),g&&!t&&!!c&&s.jsx(Nf,{className:we(t2,"sl-hide-on-modal"),sdk:e,ref:r}),s.jsxs(fs,{className:"sl-hide-on-modal",ref:a,"data-nav":(!!c&&g).toString(),children:[g&&s.jsx(sC,{sdk:e,scrollNode:a,headerNode:r,appNode:n,scrollStore:l,responsiveStore:i,hasActiveFeature:!!c}),g&&s.jsx(cC,{scrollStore:l,responsiveStore:i,scrollNode:a,appNode:n,className:t2,sdk:e}),g&&s.jsx(uC,{responsiveStore:i,appNode:n,className:t2,sdk:e})]}),g&&!u&&s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})})},d4=({children:e,customTheme:t,themeMode:n,style:r})=>s.jsx("div",{className:"StreamLayerSDKTheme",children:s.jsx("div",{className:we(F6,n,t),style:r,children:e})}),p4=()=>{const{sdk:e}=w.useContext(H1);return e},pC=()=>{const{event:e}=w.useContext(H1);return e},f4=()=>{const{sdk:e}=w.useContext(H1),[t,n]=w.useState({});return w.useEffect(()=>{var r;return e!=null&&e.options?(r=e==null?void 0:e.options)==null?void 0:r.subscribe(i=>{n({theme:i.theme,themeMode:i.themeMode})}):()=>{}},[e==null?void 0:e.options]),t},h4=()=>{const{sdk:e}=w.useContext(H1),[t,n]=w.useState({});return w.useEffect(()=>e!=null&&e.uiState?e==null?void 0:e.uiState.subscribe(r=>{n({...r})}):()=>{},[e==null?void 0:e.uiState]),t},fC=({event:e,topNavigation:t,theme:n,withSidebarNotification:r=!0})=>{const{sdk:i,status:a}=w.useContext(H1),l=h4(),o=f4(),{event:c}=w.useContext(H1);if(a===Yn.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return a===Yn.CONNECTED?s.jsx("div",{className:"StreamLayerSDK",children:"wait"}):i===null?s.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):!l.app&&!l.appNotification||!l.app&&l.appNotification&&!r?null:s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(d4,{customTheme:n??o.theme,themeMode:o.themeMode,children:s.jsx(dC,{sdk:i,event:(c==null?void 0:c.current)||e,topNavigation:t})})})},m4=({event:e,internal:t})=>{const n=p4(),r=pC();return w.useEffect(()=>(n&&(e&&(n.createEventSession(e,t),r&&(r.current=e)),!e&&(r!=null&&r.current)&&(n.createEventSession("",t),r.current="")),()=>{n&&n.disableApp()}),[e,t,r,n]),null};var Yn=(e=>(e[e.UNSET=0]="UNSET",e[e.CONNECTED=1]="CONNECTED",e[e.READY=2]="READY",e))(Yn||{});const hC={status:0,sdk:null},H1=w.createContext(hC),mC=({sdkKey:e,theme:t,themeMode:n,plugins:r,children:i,event:a,production:l=!0,autoEnable:o=!0,withAdNotification:c,withAd:u=!0,betPack:g=!1,hideFriends:C,skipOnboarding:p,friendsTab:y="enabled",onDeepLinkHandled:x,videoPlayerController:E,onContentActivate:L})=>{const m=k.useStreamLayerApp({sdkKey:e,plugins:r,production:l,autoEnable:o,onDeepLinkHandled:x,videoPlayerController:E,onContentActivate:L,hideFriends:C,skipOnboarding:p,withAdNotification:c,withAd:u,friendsTab:y,betPack:g}),f=w.useRef(""),v=w.useMemo(()=>m?{sdk:m,status:2,event:f}:{status:1,sdk:null,event:f},[m]);return w.useEffect(()=>{m&&(m.options.setKey("friendsTab",y),m.options.setKey("theme",t),m.options.setKey("themeMode",n),m.options.setKey("skipOnboarding",p),m.options.setKey("betPack",g))},[m,y,t,n,p,g]),w.useEffect(()=>()=>{x&&(m==null||m.removeDeepLinkHandler(x)),E&&(m==null||m.removeVideoPlayerController(E))},[m]),w.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!e,onDeepLinkHandled:!!x,videoPlayerController:!!E})},[e,x,E]),s.jsxs(H1.Provider,{value:v,children:[a!==void 0&&s.jsx(m4,{event:a}),i]})};exports.A=ve;exports.A$1=ys;exports.A$2=Qo;exports.D=l4;exports.D$1=xe;exports.D$2=Zo;exports.Df=V2;exports.Ft=Ho;exports.Ht=Po;exports.I=s4;exports.P=df;exports.R=Cs;exports.R$1=mr;exports.S=r0;exports.StreamLayerContext=H1;exports.StreamLayerProvider=mC;exports.StreamLayerSDKEvent=m4;exports.StreamLayerSDKReact=fC;exports.StreamLayerStatus=Yn;exports.a=Wo;exports.a$1=gs;exports.b=a0;exports.b$1=ws;exports.c=En;exports.c$1=ei;exports.createLogger=at;exports.cx_default=we;exports.d=hr;exports.d$1=Fo;exports.e=N2;exports.eventBus=_t;exports.f=ot;exports.f$1=c4;exports.h=d4;exports.h$1=t2;exports.i=t0;exports.i$1=$o;exports.k=r4;exports.k1=O;exports.o=w7;exports.p=Uo;exports.p$1=hs;exports.styled_default=d;exports.tn=o4;exports.useStore=F;exports.useStreamLayer=p4;exports.useStreamLayerTheme=f4;exports.useStreamLayerUI=h4;exports.w=Yi;exports.x=X0;exports.x$1=n4;exports.y=Es;exports.z=Go;exports.z$1=s0;
|
|
65
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var au=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?oe.useLayoutEffect:oe.useEffect;function Ge(e){var t=oe.useRef(e);return au(function(){t.current=e}),oe.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current.apply(void 0,r)},[])}var lu=function(t,n){var r=n.decimal,i=n.decimals,a=n.duration,l=n.easingFn,o=n.end,c=n.formattingFn,u=n.numerals,g=n.prefix,C=n.separator,p=n.start,y=n.suffix,x=n.useEasing,E=n.useGrouping,L=n.useIndianSeparators,m=n.enableScrollSpy,f=n.scrollSpyDelay,v=n.scrollSpyOnce,b=n.plugin;return new Gc.CountUp(t,o,{startVal:p,duration:a,decimal:r,decimalPlaces:i,easingFn:l,formattingFn:c,numerals:u,separator:C,prefix:g,suffix:y,plugin:b,useEasing:x,useIndianSeparators:L,useGrouping:E,enableScrollSpy:m,scrollSpyDelay:f,scrollSpyOnce:v})},su=["ref","startOnMount","enableReinitialize","delay","onEnd","onStart","onPauseResume","onReset","onUpdate"],ou={decimal:".",separator:",",delay:null,prefix:"",suffix:"",duration:2,start:0,decimals:0,startOnMount:!0,enableReinitialize:!0,useEasing:!0,useGrouping:!0,useIndianSeparators:!1},Mo=function(t){var n=Object.fromEntries(Object.entries(t).filter(function(V){var _=tu(V,2),J=_[1];return J!==void 0})),r=oe.useMemo(function(){return Kn(Kn({},ou),n)},[t]),i=r.ref,a=r.startOnMount,l=r.enableReinitialize,o=r.delay,c=r.onEnd,u=r.onStart,g=r.onPauseResume,C=r.onReset,p=r.onUpdate,y=No(r,su),x=oe.useRef(),E=oe.useRef(),L=oe.useRef(!1),m=Ge(function(){return lu(typeof i=="string"?i:i.current,y)}),f=Ge(function(V){var _=x.current;if(_&&!V)return _;var J=m();return x.current=J,J}),v=Ge(function(){var V=function(){return f(!0).start(function(){c==null||c({pauseResume:b,reset:S,start:j,update:I})})};o&&o>0?E.current=setTimeout(V,o*1e3):V(),u==null||u({pauseResume:b,reset:S,update:I})}),b=Ge(function(){f().pauseResume(),g==null||g({reset:S,start:j,update:I})}),S=Ge(function(){f().el&&(E.current&&clearTimeout(E.current),f().reset(),C==null||C({pauseResume:b,start:j,update:I}))}),I=Ge(function(V){f().update(V),p==null||p({pauseResume:b,reset:S,start:j})}),j=Ge(function(){S(),v()}),A=Ge(function(V){a&&(V&&S(),v())});return oe.useEffect(function(){L.current?l&&A(!0):(L.current=!0,A())},[l,L,A,o,t.start,t.suffix,t.prefix,t.duration,t.separator,t.decimals,t.decimal,t.formattingFn]),oe.useEffect(function(){return function(){S()}},[S]),{start:j,pauseResume:b,reset:S,update:I,getCountUp:f}},cu=["className","redraw","containerProps","children","style"],uu=function(t){var n=t.className,r=t.redraw,i=t.containerProps,a=t.children,l=t.style,o=No(t,cu),c=oe.useRef(null),u=oe.useRef(!1),g=Mo(Kn(Kn({},o),{},{ref:c,startOnMount:typeof a!="function"||t.delay===0,enableReinitialize:!1})),C=g.start,p=g.reset,y=g.update,x=g.pauseResume,E=g.getCountUp,L=Ge(function(){C()}),m=Ge(function(b){t.preserveValue||p(),y(b)}),f=Ge(function(){if(typeof t.children=="function"&&!(c.current instanceof Element)){console.error(`Couldn't find attached element to hook the CountUp instance into! Try to attach "containerRef" from the render prop to a an Element, eg. <span ref={containerRef} />.`);return}E()});oe.useEffect(function(){f()},[f]),oe.useEffect(function(){u.current&&m(t.end)},[t.end,m]);var v=r&&t;return oe.useEffect(function(){r&&u.current&&L()},[L,r,v]),oe.useEffect(function(){!r&&u.current&&L()},[L,r,t.start,t.suffix,t.prefix,t.duration,t.separator,t.decimals,t.decimal,t.className,t.formattingFn]),oe.useEffect(function(){u.current=!0},[]),typeof a=="function"?a({countUpRef:c,start:C,reset:p,update:y,pauseResume:x,getCountUp:E}):oe.createElement("span",Qi({className:n,ref:c,style:l},i),typeof t.start<"u"?E().formattingFn(t.start):"")},du=J0.default=uu;J0.useCountUp=Mo;const hr=({value:e=0,decimals:t,duration:n=1,preserveValue:r=!0,...i})=>{const[,a]=e.toString().split("."),l=t??((a==null?void 0:a.length)||0);return s.jsx(du,{end:e,...i,duration:n,decimals:l,enableScrollSpy:!1,preserveValue:r})},pu=d("button")({name:"ButtonContainer",class:"b1b6dl8t",propsAsIs:!1}),fu=d("div")({name:"ButtonPctWrap",class:"b4iik8i",propsAsIs:!1}),hu=d("div")({name:"ButtonPct",class:"b1gq1lnf",propsAsIs:!1}),mu=d("span")({name:"ButtonBody",class:"b1j65z51",propsAsIs:!1}),Cu=d("div")({name:"IconContainer",class:"i19tpfua",propsAsIs:!1}),gu=d("div")({name:"IconWrap",class:"i1tubmma",propsAsIs:!1}),Oo=d("img")({name:"Icon",class:"i1grrgwj",propsAsIs:!1}),vu=()=>Oo,yu=d(vu())({name:"IconDefault",class:"ibemyq8",propsAsIs:!0}),wu=()=>Oo,bu=d(wu())({name:"IconCircle",class:"i1dceht",propsAsIs:!0}),xu=d("span")({name:"Title",class:"t116q4vq",propsAsIs:!1}),Eu=d("span")({name:"Indicators",class:"i17ajcu2",propsAsIs:!1}),Lu=d("div")({name:"PtsWrap",class:"pu9kmlb",propsAsIs:!1}),ku=d("span")({name:"Pts",class:"p1j2j0s0",propsAsIs:!1}),Su=d("span")({name:"Percentage",class:"p1mzj1sj",propsAsIs:!1}),Iu=()=>O,Tu=d(Iu())({name:"CheckIcon",class:"cichgz8",propsAsIs:!0}),Fl={[k.QuestionImages.CENTERED]:e=>s.jsx(yu,{"data-testid":"vote-icon",alt:"option-icon",src:e}),[k.QuestionImages.TRANSPARENT]:e=>s.jsx(Cu,{"data-testid":"vote-icon",children:s.jsx(gu,{style:{backgroundImage:`url(${e})`}})}),[k.QuestionImages.ROUNDED]:e=>s.jsx(bu,{"data-testid":"vote-icon",alt:"option-icon",src:e}),[k.QuestionImages.NONE]:()=>null,[k.QuestionImages.UNSET]:()=>null},ju=({questionType:e,hasCorrectAnswer:t,correct:n,youVoted:r,questionVoted:i})=>{if(e===k.QuestionType.POLL&&r)return"voted";if(e===k.QuestionType.PREDICTION){if(!t&&i)return r?"voted":"unset";if(t&&i)return r?n?"correct":"incorrect":"unset";if(r)return"correct"}return e===k.QuestionType.TRIVIA&&i&&r?n?"correct":"incorrect":"unset"},Au=({questionType:e,questionVoted:t,correct:n,hasCorrectAnswer:r,questionStatus:i})=>e===k.QuestionType.TRIVIA?t&&n:e===k.QuestionType.PREDICTION?t&&n&&r||i===k.QuestionStatus.RESOLVED&&n:!1,$u=e=>{var t;const{id:n,icon:r,text:i,percentageDecimal:a,points:l,onVote:o,markThatVoted:c,onPercentsAnimated:u,youSelected:g,youVoted:C,questionVoted:p,imageMode:y,answerTimeExpired:x,questionStatus:E,isLoading:L,questionType:m,correct:f,hasCorrectAnswer:v,marketClosed:b,isEarlyPrediction:S}=e,[I,j]=w.useState(0),A=ju(e),V=Au({questionType:m,questionVoted:p,correct:f,hasCorrectAnswer:v,questionStatus:E}),_=b&&m===k.QuestionType.PREDICTION,J=p||_,Oe=m===k.QuestionType.PREDICTION&&!p&&!b,Ze=p&&!g&&A!=="incorrect"&&!C;return w.useLayoutEffect(()=>{j(0),requestAnimationFrame(()=>{j(a)})},[a]),s.jsxs(pu,{value:n,"data-selected":g,"data-answer-state":A,disabled:p||L||x||_,"data-is-not-checked":Ze,"data-a":"intr",onClick:ct=>{c(m===k.QuestionType.PREDICTION?b:E===k.QuestionStatus.RESOLVED),o(ct)},children:[s.jsx(fu,{children:s.jsx(hu,{"data-answer-state":A,"data-is-not-checked":Ze,style:{width:`${J?I:0}%`},onTransitionEnd:()=>{_||u==null||u()}})}),s.jsxs(mu,{"data-a":"intr",children:[r&&y&&((t=Fl[y])==null?void 0:t.call(Fl,r)),s.jsx(xu,{"data-a":"intr",children:i}),Oe&&s.jsxs(Lu,{children:[l,s.jsx(ku,{children:"pts"})]}),J&&s.jsxs(Eu,{children:[V&&s.jsx(Tu,{name:S?"selectedBetPack":"selected"}),s.jsx(Su,{children:s.jsx(hr,{value:a,suffix:"%"})})]})]})]})},Ru=()=>Ao,_u=d(Ru())({name:"ShowInContainer",class:"sie6cqo",propsAsIs:!0}),Vu=d("div")({name:"WinBarContainer",class:"wgizw4u",propsAsIs:!1}),Nu=d("div")({name:"Content",class:"c1l3ucjp",propsAsIs:!1}),Mu=d("div")({name:"Title",class:"tx7j799",propsAsIs:!1}),Ou=()=>O,Pu=d(Ou())({name:"WinIcon",class:"w4lwuj0",propsAsIs:!0}),Hu=d("div")({name:"Points",class:"po9i64o",propsAsIs:!1}),Fu=d("span")({name:"PointsCount",class:"pe5g05h",propsAsIs:!1}),Du=d("span")({name:"PointsUnits",class:"p1hdtpmb",propsAsIs:!1}),zu=({title:e,points:t,isPlayingTimer:n,isTimer:r,animatePoints:i,questionType:a,timerDuration:l,votedInCurrentRender:o,percentsAnimated:c,onTimerExpired:u})=>s.jsx(_u,{enabled:a===k.QuestionType.PREDICTION&&o,animate:c,children:s.jsxs(Vu,{style:{justifyContent:a===k.QuestionType.PREDICTION?"center":"space-between"},children:[s.jsxs(Nu,{children:[e&&s.jsx(Mu,{children:e}),t!==void 0&&a!==k.QuestionType.POLL&&s.jsxs(s.Fragment,{children:[s.jsx(Pu,{name:"icon-trophy"}),s.jsxs(Hu,{children:[s.jsx(Fu,{children:i?s.jsx(hr,{value:t,delay:.3}):t}),s.jsx(Du,{children:"PTS"})]})]})]}),r&&a!==k.QuestionType.PREDICTION&&s.jsx(m7,{isPlaying:n,onTimerExpired:u,duration:l})]})}),Bu=(e,t)=>{switch(e){case"already_voted":return t===k.QuestionType.POLL?"You’ve already answered this question on another device.":"You’ve already answered this question on another device. So the points for this answer won't tally.";default:return"Something went wrong, please try again"}},Po=()=>s.jsx(Ro,{children:s.jsxs(_o,{children:[s.jsx($e,{loading:!0,style:{height:"40px",borderRadius:"100px"}}),s.jsx($e,{loading:!0,style:{height:"24px",margin:"16px 0"}}),s.jsx(Vo,{children:Array.from({length:5}).map((e,t)=>s.jsx($e,{loading:!0,style:{height:"44px"}},t))})]})}),Ho=({openedQuestion:e,isLoading:t,vote:n,close:r,isEarlyPrediction:i})=>{var a,l;const o=e.subject,c=e.type,u=e.status,g=(a=e.options)==null?void 0:a.options,C=e.marketClosed,p=e.id,y=w.useRef(),[x,E]=w.useState(!1),[L,m]=w.useState(!1),[f,v]=w.useState(!0),[b,S]=w.useState(!1),[I,j]=w.useState(!1),[A,V]=w.useState(""),[_,J]=w.useState(""),[Oe,Ze]=w.useState(!1),[ct,Cr]=w.useState(!1),{runAnimation:v1,finished:ut}=r0();w.useEffect(()=>{ut&&r()},[r,ut]),w.useEffect(()=>{c===k.QuestionType.PREDICTION?C&&v(!1):u===k.QuestionStatus.RESOLVED&&v(!1)},[]);const $=w.useCallback(re=>{m(re),E(!0)},[]),N=w.useCallback(()=>{i&&E(!1)},[i]),M=w.useRef(!1),Z=w.useCallback(async re=>{if(!M.current&&(M.current=!0,p)){const l1=re.currentTarget.value;V(l1);try{await n(p,l1)}catch(F2){J(Bu(F2.message,c)),V(""),console.error("Error while voting",F2),M.current=!1}}},[c,p,V,n]),te=w.useCallback(()=>{S(!0),v1({delay:3500})},[v1]),dt=w.useCallback(()=>{j(!0),v1({delay:3500})},[v1]),P=e==null?void 0:e.answers.find(re=>re.youVoted===!0),le=w.useMemo(()=>!!(e!=null&&e.answers.find(re=>re.correct===!0)),[e]),Y=w.useMemo(()=>e==null?void 0:e.answers.find(re=>re.correct===!0),[e]);w.useEffect(()=>{P&&x&&!ct&&(y.current=setTimeout(dt,1e4),Cr(!0))},[P]),w.useEffect(()=>()=>{clearTimeout(y.current)},[]);const y1=w.useMemo(()=>e?e.answers.map(re=>{var l1;return{...re,questionVoted:!!P,youSelected:A===re.id,isLoading:t,hasCorrectAnswer:le,questionType:e.type,answerTimeExpired:b,questionStatus:u,imageMode:(l1=e.appearance)==null?void 0:l1.images,onVote:Z}}):[],[le,b,t,e,P,u,Z,A]);w.useEffect(()=>{const re=y1.some(({percentageDecimal:F2})=>F2!==0),l1=P&&c===k.QuestionType.PREDICTION;_&&(i||!re||C&&l1)&&Ze(!0)},[y1,_,i,C,c,P]);const ra=g&&(g.case==="trivia"||g.case==="prediction")?g.value:void 0,B1=u===k.QuestionStatus.RESOLVED&&c===k.QuestionType.TRIVIA&&!P&&!f,gr=c===k.QuestionType.TRIVIA&&L,vr=w.useMemo(()=>c===k.QuestionType.PREDICTION?i?!1:!!(P&&!le||P&&le&&Y!=null&&Y.youVoted):!0,[c,P,le,Y,i]),C4=w.useMemo(()=>{if(c===k.QuestionType.PREDICTION&&P&&(!le||le&&Y!=null&&Y.youVoted))return P.points;if(!(B1||b))return P?P.correct?P.pointsEarned:0:Y==null?void 0:Y.points},[b,P,Y,B1,c,le]),g4=w.useMemo(()=>c===k.QuestionType.PREDICTION&&P?le?le&&Y!=null&&Y.youVoted?"You won":"":"To win":B1||b?"Time expired":c===k.QuestionType.POLL?"Time remaining":P?"You won":"To win",[b,c,P,B1,le,Y]),v4=!vr||vr&&c===k.QuestionType.PREDICTION&&x&&!Oe,y4=(c===k.QuestionType.TRIVIA||c===k.QuestionType.PREDICTION)&&P&&le&&(Y==null?void 0:Y.youVoted),w4=P||B1||gr||c===k.QuestionType.TRIVIA&&u===k.QuestionStatus.RESOLVED&&f;return s.jsxs(_c,{children:[i&&s.jsx(Vc,{}),s.jsx(Ro,{style:i?{marginTop:"-40px"}:{},children:s.jsxs(_o,{children:[!i&&s.jsx(Ol,{feedbackMessages:ra,questionVoted:!!P,questionVotedCorrectly:P==null?void 0:P.correct,questionType:c,hasCorrectAnswer:le,showExpiredNotification:B1,showClosedNotificationTrivia:gr,votedInCurrentRender:x,votedAfterQuestionClosed:L,enteredAnActiveQuestion:f,marketClosed:C,percentsAnimated:Oe,voteErrorMessage:_,votedAnswer:P}),vr&&s.jsx(zu,{title:g4,points:C4,onTimerExpired:te,questionType:e.type,isTimer:!t,isPlayingTimer:!P,animatePoints:y4,timerDuration:w4?0:Number(((l=e==null?void 0:e.appearance)==null?void 0:l.autoHideInterval)||"30"),votedInCurrentRender:x,percentsAnimated:Oe}),!i&&(b||I)?s.jsx(Fc,{children:s.jsx(vc,{icon:"icon-check-circle",title:"More to come...",description:I?s.jsxs(s.Fragment,{children:["Stay tuned for more questions ",s.jsx("br",{})," and insights."]}):s.jsxs(s.Fragment,{children:["Watch for additional enhanced stream ",s.jsx("br",{})," interactive experience."]})})}):s.jsxs(s.Fragment,{children:[i&&s.jsxs(Dc,{children:[s.jsx(Bc,{name:"iconEarlyPrediction"}),"EARLY PREDICTION"]}),s.jsx(Oc,{style:v4?{marginTop:0}:{},children:o}),i&&s.jsx(Ol,{feedbackMessages:ra,questionVoted:!!P,questionVotedCorrectly:P==null?void 0:P.correct,questionType:c,hasCorrectAnswer:le,showExpiredNotification:B1,showClosedNotificationTrivia:gr,votedInCurrentRender:x,votedAfterQuestionClosed:L,enteredAnActiveQuestion:f,marketClosed:C,percentsAnimated:Oe,voteErrorMessage:_,isEarlyPrediction:i,correctAnswer:Y,votedAnswer:P,onAnimationEnd:N}),s.jsxs(Pc,{children:[s.jsx(Vo,{children:y1.sort((re,l1)=>re.id>l1.id?1:-1).map(re=>s.jsx($u,{...re,markThatVoted:$,onPercentsAnimated:()=>Ze(!0),votedAfterQuestionClosed:L,enteredAnActiveQuestion:f,marketClosed:C,isEarlyPrediction:i},re.id))}),i&&s.jsxs(s.Fragment,{children:[s.jsx(Nc,{}),s.jsx(Mc,{children:s.jsx(Zc,{name:"mastersLogoWhite"})})]})]})]})]})})]})},Fo=({height:e="37px",width:t="37px"})=>s.jsx("div",{style:{height:e,width:t},children:s.jsx(O,{name:"loader"})}),Uu=d("div")({name:"Container",class:"c1bgb86j",propsAsIs:!1}),Zu=d("video")({name:"Player",class:"p6703cq",propsAsIs:!1}),qu=d("img")({name:"Poster",class:"p12ow7zo",propsAsIs:!1}),Dl=d("div")({name:"Control",class:"cdpal9o",propsAsIs:!1}),Qu="t1xke4ml",Wu="h1yzxv57",Gu=e=>{for(const t of e)t.isIntersecting?t.target instanceof HTMLVideoElement&&t.target.autoplay&&t.target.play():t.target instanceof HTMLVideoElement&&!t.target.paused&&t.target.pause()},Do=new IntersectionObserver(Gu,{threshold:.5}),ea=new Set,Ku=e=>{Do.observe(e),ea.add(e)},Yu=e=>{Do.unobserve(e),ea.delete(e)},zo=()=>{for(const e of ea)e instanceof HTMLVideoElement&&!e.paused&&e.pause()},mr=({poster:e,source:t,aspectRatio:n,controlVideo:r,onPlay:i,onPause:a,autoPlay:l,hideControls:o,className:c})=>{const u=w.useRef(null),[g,C]=w.useState(!1),[p,y]=w.useState(!1),[x,E]=w.useState(!0),L=w.useCallback(()=>{r==null||r({muted:!0})},[r]),m=w.useCallback(()=>{r==null||r({muted:!1})},[r]),f=b=>{b.stopPropagation();const S=u==null?void 0:u.current;if(S){if(g)S.pause();else{const I=u==null?void 0:u.current;if(!I)return;zo(),I.play().catch(j=>console.log(j)),E(!1)}_t.emit("interactions",{action:"tap",payload:{}})}},v=()=>{var b;(b=u==null?void 0:u.current)==null||b.load(),E(!0)};return w.useEffect(()=>{const b=u==null?void 0:u.current;return()=>{b&&(b.paused||m())}},[m]),w.useEffect(()=>{const b=u.current;return b?(Ku(b),()=>Yu(b)):()=>{}},[]),s.jsxs(Uu,{onClick:o?void 0:f,"data-a":"intr",className:we(g&&Qu,o&&Wu,c),style:n?{aspectRatio:n}:{},children:[s.jsx(Zu,{ref:u,src:t,autoPlay:l,onPlay:()=>{L(),C(!0),E(!1),i==null||i()},onError:async b=>{try{if(b.target instanceof HTMLVideoElement){y(!0);const S=await(await fetch(b.target.src)).blob(),I=URL.createObjectURL(S);b.target.src=I}}catch(S){console.error("video fallback fetch failed",S),C(!0),E(!0)}finally{y(!1)}},onPause:()=>{m(),C(!1),a==null||a()},onEnded:()=>{m(),C(!1),v()},style:{visibility:x?"hidden":"visible"},controls:!1,playsInline:!0}),s.jsx(qu,{src:e,style:{visibility:x?"visible":"hidden"}}),!o&&!p&&s.jsx(Dl,{children:g?s.jsx(O,{name:"icon-pause"}):s.jsx(O,{name:"icon-play"})}),p&&s.jsx(Dl,{children:s.jsx(Fo,{})})]})},Xu=d("div")({name:"Container",class:"cgn5uen",propsAsIs:!1}),zl="c1px8nt6",Ju=d("div")({name:"Content",class:"c5et2jt",propsAsIs:!1}),ed=d("h3")({name:"Title",class:"t1i2kpk2",propsAsIs:!1}),td=d("div")({name:"Description",class:"dd3lh3p",propsAsIs:!1}),nd=d("img")({name:"Image",class:"i1gfjeu5",propsAsIs:!1}),rd=d("div")({name:"ImageContainer",class:"i58y999",propsAsIs:!1}),Bo=({instantView:e,isDetail:t,notification:n,controlVideo:r})=>{const i=e==null?void 0:e.heading,a=e==null?void 0:e.body,l=i||a,o=n==null?void 0:n.title,c=n==null?void 0:n.body;return s.jsxs(Xu,{children:[(e==null?void 0:e.video)&&s.jsx(mr,{className:zl,source:e.video.url,poster:e.video.thumbnailUrl,controlVideo:r,autoPlay:t&&e.autoPlayVideo===k.AutoPlayVideo.ENABLED}),(e==null?void 0:e.image)&&!(e!=null&&e.video)&&s.jsx(rd,{className:zl,"data-rounded":e.imageMode===k.QuestionImages.ROUNDED,children:s.jsx(nd,{src:e==null?void 0:e.image})}),s.jsxs(Ju,{children:[s.jsx(ed,{children:t&&l?i:o}),s.jsx(td,{children:t&&l?a:c})]})]})},id=d("div")({name:"Container",class:"c1euiow",propsAsIs:!1}),ad=d("a")({name:"WebLinkBtn",class:"w19zie3h",propsAsIs:!1}),ld=()=>O,sd=d(ld())({name:"WebLinkIcon",class:"wyg5v7z",propsAsIs:!0}),Uo=({instantView:e,...t})=>s.jsxs(id,{children:[s.jsx(Bo,{instantView:e,...t,isDetail:!0}),(e==null?void 0:e.webLink)&&s.jsxs(ad,{href:e==null?void 0:e.webLink.url,target:"_blank","data-a":"web-link",children:[e==null?void 0:e.webLink.label,s.jsx(sd,{name:"icon-external-link"})]})]}),od=d("div")({name:"Container",class:"cjq447q",propsAsIs:!1}),cd=d("div")({name:"ImageContainer",class:"i14egogb",propsAsIs:!1}),ud=d("img")({name:"Image",class:"i2g9g4l",propsAsIs:!1}),dd=()=>O,pd=d(dd())({name:"TwitterIcon",class:"t1c454nm",propsAsIs:!0}),fd=d("div")({name:"Details",class:"d11nigc3",propsAsIs:!1}),hd=d("div")({name:"Name",class:"nrxa4k8",propsAsIs:!1}),md=d("div")({name:"UserNameAndDate",class:"u1p051g3",propsAsIs:!1}),Zo=({image:e,name:t,userName:n,verified:r,createdTweet:i})=>{const a=i&&j7(i);return s.jsxs(od,{children:[e&&s.jsxs(cd,{children:[s.jsx(ud,{className:"SL_AccountImage",src:e}),s.jsx(pd,{name:"twitter"})]}),s.jsxs(fd,{children:[t&&s.jsxs(hd,{className:"SL_TweetAccountName",children:[t," ",r&&s.jsx(O,{name:"icon-twitter-verified"})]}),n&&s.jsxs(md,{className:"SL_TweetAccountUserName",children:["@",n," ",a&&`・ ${a}`]})]})]})},Cd=d("div")({name:"Container",class:"c1kzqw87",propsAsIs:!1}),gd=d("div")({name:"Details",class:"d9r1hf9",propsAsIs:!1}),vd=d("div")({name:"Body",class:"bezygt5",propsAsIs:!1}),e2=d("div")({name:"ImagesContainer",class:"i1y8f7ym",propsAsIs:!1}),Kr=d("div")({name:"ImagesBlock",class:"i18gwonx",propsAsIs:!1}),qo=d("img")({name:"Image",class:"i3g0xjd",propsAsIs:!1}),yd=()=>qo,x1=d(yd())({name:"ImageFullSize",class:"io8rt7p",propsAsIs:!0}),wd=()=>qo,Yr=d(wd())({name:"ImageHalfSize",class:"i4hn3ox",propsAsIs:!0}),bd=new RegExp("\\s?https?://t.co[^\\s]+(\\s+)?$"),Qo=e=>e==null?void 0:e.replace(bd,""),ta=w.memo(({image:e,body:t,account:n,accountVerified:r,tweet:i,isDetail:a,controlVideo:l})=>{var o,c,u,g,C;const p=(c=(o=i==null?void 0:i.meta)==null?void 0:o.extendedEntities)==null?void 0:c.media,y=p==null?void 0:p.find(({type:E})=>E==="photo"),x=w.useMemo(()=>{var E,L,m,f;return(f=(m=(L=(E=p==null?void 0:p[0])==null?void 0:E.videoInfo)==null?void 0:L.variants)==null?void 0:m.findLast(({contentType:v})=>v==="video/mp4"))==null?void 0:f.url},[p]);return s.jsxs(Cd,{children:[s.jsxs(gd,{children:[s.jsx(Zo,{image:e,name:(u=i==null?void 0:i.meta)==null?void 0:u.accountName,userName:n,verified:r,createdTweet:i==null?void 0:i.date}),s.jsx(vd,{children:Qo(t)}),!a&&y&&s.jsx(e2,{children:s.jsx(x1,{src:p==null?void 0:p[0].mediaUrlHttps})}),a&&y&&s.jsxs(s.Fragment,{children:[(p==null?void 0:p.length)===1&&s.jsx(e2,{children:s.jsx(x1,{src:p[0].mediaUrlHttps})}),(p==null?void 0:p.length)===2&&s.jsxs(e2,{children:[s.jsx(Yr,{src:p[0].mediaUrlHttps}),s.jsx(Yr,{src:p[1].mediaUrlHttps})]}),(p==null?void 0:p.length)===3&&s.jsxs(e2,{children:[s.jsx(Yr,{src:p[0].mediaUrlHttps}),s.jsxs(Kr,{children:[s.jsx(x1,{src:p[1].mediaUrlHttps}),s.jsx(x1,{src:p[2].mediaUrlHttps})]})]}),(p==null?void 0:p.length)===4&&s.jsxs(e2,{children:[s.jsxs(Kr,{children:[s.jsx(x1,{src:p[0].mediaUrlHttps}),s.jsx(x1,{src:p[1].mediaUrlHttps})]}),s.jsxs(Kr,{children:[s.jsx(x1,{src:p[2].mediaUrlHttps}),s.jsx(x1,{src:p[3].mediaUrlHttps})]})]})]})]}),!y&&(((g=p==null?void 0:p[0])==null?void 0:g.type)==="video"||((C=p==null?void 0:p[0])==null?void 0:C.type)==="animated_gif")&&x&&s.jsx(mr,{source:x,poster:p[0].mediaUrlHttps,controlVideo:l})]})}),xd=d("div")({name:"Container",class:"c1dcxmvf",propsAsIs:!1}),Ed=d("blockquote")({name:"Quote",class:"qb4q22c",propsAsIs:!1}),Wo=e=>s.jsxs(xd,{children:[e.title&&s.jsx(Ed,{children:e.title}),s.jsx(ta,{...e,isDetail:!0})]}),Ld=d("div")({name:"QuestionContainer",class:"q14ckf9e",propsAsIs:!1}),kd=({openedQuestion:e})=>{var t,n;const{sdk:r}=Xn();return((t=e==null?void 0:e.attributes)==null?void 0:t.attributes.case)==="insight"?s.jsx(Uo,{...e.attributes.attributes.value,controlVideo:r==null?void 0:r.controlVideoPlayer}):((n=e==null?void 0:e.attributes)==null?void 0:n.attributes.case)==="tweet"?s.jsx(Wo,{...e.attributes.attributes.value,controlVideo:r==null?void 0:r.controlVideoPlayer}):null},Sd=({extendedQuestion:e,vote:t,close:n})=>{const{loading:r,data:i}=e;return i?s.jsx(Ho,{vote:t,close:n,openedQuestion:i,isLoading:!!r}):s.jsx(Po,{})},Go=({gamification:e,skipAutoClose:t,hideSponsor:n,className:r,hideHeader:i})=>{var a,l,o,c,u;const g=F(e.openedQuestion.$store),C=F(e.openedQuestion.$extendedStore);if(!g)return null;const p=g.type,y=((l=(a=C.data)==null?void 0:a.options)==null?void 0:l.options.case)==="factoid"?C.data.options.options.value.closeTimer:void 0;return s.jsxs(Ld,{className:r,children:[!i&&s.jsx(a0,{closeTimer:t?void 0:y,close:e.closeQuestion,type:((o=g.attributes)==null?void 0:o.type)||k.QuestionType.UNSET}),p==="question"&&s.jsx(Sd,{vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:C}),p!=="question"&&s.jsx(kd,{openedQuestion:g}),!n&&s.jsx($o,{sponsorLogo:(u=(c=C.data)==null?void 0:c.sponsorship)==null?void 0:u.logo})]})},Id=d("div")({name:"Container",class:"c115qtkr",propsAsIs:!1}),Td=d("div")({name:"STabs",class:"sxnslc8",propsAsIs:!1}),jd=d("button")({name:"Button",class:"b1umzux0",propsAsIs:!1}),Ad=d("span")({name:"Title",class:"tspsaas",propsAsIs:!1});var l2=(e=>(e.HOME="home",e.LEADERBOARD="leaderboard",e))(l2||{});const Bl=({title:e,active:t,onClick:n})=>s.jsx(jd,{"data-a":"intr",onClick:n,"data-selected":t,children:s.jsx(Ad,{"data-a":"intr",children:e})}),$d=({activePage:e="home",toggleActivePage:t})=>s.jsx(Id,{children:s.jsxs(Td,{"data-position":e==="home"?"left":"right",children:[s.jsx(Bl,{title:"Home",active:e==="home",onClick:()=>t("home")}),s.jsx(Bl,{title:"Friends",active:e==="leaderboard",onClick:()=>t("leaderboard")})]})}),Rd=d("button")({name:"Container",class:"cpjnajb",propsAsIs:!1}),_d=d("div")({name:"Content",class:"c4m6kaz",propsAsIs:!1}),Vd=d("span")({name:"Title",class:"t1h8t9cc",propsAsIs:!1}),Nd=()=>s.jsx(Rd,{children:s.jsxs(_d,{children:[s.jsx(O,{name:"iconCopySuccess"}),s.jsx(Vd,{children:"Link Copied to Clipboard"})]})}),Ko=e=>{const t=w.useRef(),[n,r]=w.useState(null),i=w.useCallback(async a=>{var l;if(a&&(l=navigator==null?void 0:navigator.clipboard)!=null&&l.writeText){t.current&&(clearTimeout(t.current),r(null));try{await navigator.clipboard.writeText(a),e.current&&(r(V2.createPortal(s.jsx(Nd,{}),e.current)),t.current=setTimeout(()=>{r(null)},1e3))}catch(o){console.error("Unable to copy to clipboard",o)}}},[e]);return w.useEffect(()=>()=>{clearTimeout(t.current)},[]),[i,n]},Md=d("div")({name:"Container",class:"c1ux29ft",propsAsIs:!1}),Od=()=>O,Pd=d(Od())({name:"FriendsIcon",class:"f10ncfg2",propsAsIs:!0}),Hd=d("div")({name:"Content",class:"c1yc07bd",propsAsIs:!1}),Fd=d("div")({name:"Title",class:"tj6cq7w",propsAsIs:!1}),Dd=d("div")({name:"Description",class:"d1ag78xo",propsAsIs:!1}),zd=()=>O,Bd=d(zd())({name:"ArrowInviteIcon",class:"awohrz6",propsAsIs:!0}),Ud=({title:e,description:t,onClick:n,className:r})=>{const[i]=vs({type:"invitation",action:"sent",payload:{from:k.InvitationFrom.TITLE_CARD}});return s.jsxs(Md,{"data-a":"intr",onClick:i(n),className:r,children:[s.jsx(Pd,{name:"icon-friends"}),s.jsxs(Hd,{children:[s.jsx(Fd,{children:e}),s.jsx(Dd,{children:t})]}),s.jsx(Bd,{name:"icon-copy"})]})};let ze;typeof window<"u"?ze=window:typeof self<"u"?ze=self:ze=k.global;let Wi=null,Gi=null;const Ul=20,Xr=ze.clearTimeout,Zl=ze.setTimeout,Jr=ze.cancelAnimationFrame||ze.mozCancelAnimationFrame||ze.webkitCancelAnimationFrame,ql=ze.requestAnimationFrame||ze.mozRequestAnimationFrame||ze.webkitRequestAnimationFrame;Jr==null||ql==null?(Wi=Xr,Gi=function(t){return Zl(t,Ul)}):(Wi=function([t,n]){Jr(t),Xr(n)},Gi=function(t){const n=ql(function(){Xr(r),t()}),r=Zl(function(){Jr(n),t()},Ul);return[n,r]});function Zd(e){let t,n,r,i,a,l,o;const c=typeof document<"u"&&document.attachEvent;if(!c){l=function(m){const f=m.__resizeTriggers__,v=f.firstElementChild,b=f.lastElementChild,S=v.firstElementChild;b.scrollLeft=b.scrollWidth,b.scrollTop=b.scrollHeight,S.style.width=v.offsetWidth+1+"px",S.style.height=v.offsetHeight+1+"px",v.scrollLeft=v.scrollWidth,v.scrollTop=v.scrollHeight},a=function(m){return m.offsetWidth!==m.__resizeLast__.width||m.offsetHeight!==m.__resizeLast__.height},o=function(m){if(m.target.className&&typeof m.target.className.indexOf=="function"&&m.target.className.indexOf("contract-trigger")<0&&m.target.className.indexOf("expand-trigger")<0)return;const f=this;l(this),this.__resizeRAF__&&Wi(this.__resizeRAF__),this.__resizeRAF__=Gi(function(){a(f)&&(f.__resizeLast__.width=f.offsetWidth,f.__resizeLast__.height=f.offsetHeight,f.__resizeListeners__.forEach(function(S){S.call(f,m)}))})};let p=!1,y="";r="animationstart";const x="Webkit Moz O ms".split(" ");let E="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),L="";{const m=document.createElement("fakeelement");if(m.style.animationName!==void 0&&(p=!0),p===!1){for(let f=0;f<x.length;f++)if(m.style[x[f]+"AnimationName"]!==void 0){L=x[f],y="-"+L.toLowerCase()+"-",r=E[f],p=!0;break}}}n="resizeanim",t="@"+y+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",i=y+"animation: 1ms "+n+"; "}const u=function(p){if(!p.getElementById("detectElementResize")){const y=(t||"")+".resize-triggers { "+(i||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',x=p.head||p.getElementsByTagName("head")[0],E=p.createElement("style");E.id="detectElementResize",E.type="text/css",e!=null&&E.setAttribute("nonce",e),E.styleSheet?E.styleSheet.cssText=y:E.appendChild(p.createTextNode(y)),x.appendChild(E)}};return{addResizeListener:function(p,y){if(c)p.attachEvent("onresize",y);else{if(!p.__resizeTriggers__){const x=p.ownerDocument,E=ze.getComputedStyle(p);E&&E.position==="static"&&(p.style.position="relative"),u(x),p.__resizeLast__={},p.__resizeListeners__=[],(p.__resizeTriggers__=x.createElement("div")).className="resize-triggers";const L=x.createElement("div");L.className="expand-trigger",L.appendChild(x.createElement("div"));const m=x.createElement("div");m.className="contract-trigger",p.__resizeTriggers__.appendChild(L),p.__resizeTriggers__.appendChild(m),p.appendChild(p.__resizeTriggers__),l(p),p.addEventListener("scroll",o,!0),r&&(p.__resizeTriggers__.__animationListener__=function(v){v.animationName===n&&l(p)},p.__resizeTriggers__.addEventListener(r,p.__resizeTriggers__.__animationListener__))}p.__resizeListeners__.push(y)}},removeResizeListener:function(p,y){if(c)p.detachEvent("onresize",y);else if(p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(y),1),!p.__resizeListeners__.length){p.removeEventListener("scroll",o,!0),p.__resizeTriggers__.__animationListener__&&(p.__resizeTriggers__.removeEventListener(r,p.__resizeTriggers__.__animationListener__),p.__resizeTriggers__.__animationListener__=null);try{p.__resizeTriggers__=!p.removeChild(p.__resizeTriggers__)}catch{}}}}}class qd extends w.Component{constructor(...t){super(...t),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:n,disableWidth:r,onResize:i}=this.props;if(this._parentNode){const a=window.getComputedStyle(this._parentNode)||{},l=parseFloat(a.paddingLeft||"0"),o=parseFloat(a.paddingRight||"0"),c=parseFloat(a.paddingTop||"0"),u=parseFloat(a.paddingBottom||"0"),g=this._parentNode.getBoundingClientRect(),C=g.height-c-u,p=g.width-l-o,y=this._parentNode.offsetHeight-c-u,x=this._parentNode.offsetWidth-l-o;(!n&&(this.state.height!==y||this.state.scaledHeight!==C)||!r&&(this.state.width!==x||this.state.scaledWidth!==p))&&(this.setState({height:y,width:x,scaledHeight:C,scaledWidth:p}),typeof i=="function"&&i({height:y,scaledHeight:C,scaledWidth:p,width:x}))}},this._setRef=n=>{this._autoSizer=n}}componentDidMount(){const{nonce:t}=this.props,n=this._autoSizer?this._autoSizer.parentNode:null;if(n!=null&&n.ownerDocument&&n.ownerDocument.defaultView&&n instanceof n.ownerDocument.defaultView.HTMLElement){this._parentNode=n;const r=n.ownerDocument.defaultView.ResizeObserver;r!=null?(this._resizeObserver=new r(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(n)):(this._detectElementResize=Zd(t),this._detectElementResize.addResizeListener(n,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:t,defaultHeight:n,defaultWidth:r,disableHeight:i=!1,disableWidth:a=!1,doNotBailOutOnEmptyChildren:l=!1,nonce:o,onResize:c,style:u={},tagName:g="div",...C}=this.props,{height:p,scaledHeight:y,scaledWidth:x,width:E}=this.state,L={overflow:"visible"},m={};let f=!1;return i||(p===0&&(f=!0),L.height=0,m.height=p,m.scaledHeight=y),a||(E===0&&(f=!0),L.width=0,m.width=E,m.scaledWidth=x),l&&(f=!1),w.createElement(g,{ref:this._setRef,style:{...L,...u},...C},!f&&t(m))}}function Qd(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,i=e.stopIndex;return!(r>n||i<t)}function Wd(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,i=e.startIndex,a=e.stopIndex,l=[],o=null,c=null,u=i;u<=a;u++){var g=t(u);g?c!==null&&(l.push(o,c),o=c=null):(c=u,o===null&&(o=u))}if(c!==null){for(var C=Math.min(Math.max(c,o+r-1),n-1),p=c+1;p<=C&&!t(p);p++)c=p;l.push(o,c)}if(l.length)for(;l[1]-l[0]+1<r&&l[0]>0;){var y=l[0]-1;if(!t(y))l[0]=y;else break}return l}var Gd=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Kd=function(){function e(t,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),Yd=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)},Ql=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};(function(e){Yd(t,e);function t(){var n,r,i,a;Gd(this,t);for(var l=arguments.length,o=Array(l),c=0;c<l;c++)o[c]=arguments[c];return a=(r=(i=Ql(this,(n=t.__proto__||Object.getPrototypeOf(t)).call.apply(n,[this].concat(o))),i),i._lastRenderedStartIndex=-1,i._lastRenderedStopIndex=-1,i._memoizedUnloadedRanges=[],i._onItemsRendered=function(u){var g=u.visibleStartIndex,C=u.visibleStopIndex;i._lastRenderedStartIndex=g,i._lastRenderedStopIndex=C,i._ensureRowsLoaded(g,C)},i._setRef=function(u){i._listRef=u},r),Ql(i,a)}return Kd(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,i){var a=this.props,l=a.isItemLoaded,o=a.itemCount,c=a.minimumBatchSize,u=c===void 0?10:c,g=a.threshold,C=g===void 0?15:g,p=Wd({isItemLoaded:l,itemCount:o,minimumBatchSize:u,startIndex:Math.max(0,r-C),stopIndex:Math.min(o-1,i+C)});(this._memoizedUnloadedRanges.length!==p.length||this._memoizedUnloadedRanges.some(function(y,x){return p[x]!==y}))&&(this._memoizedUnloadedRanges=p,this._loadUnloadedRanges(p))}},{key:"_loadUnloadedRanges",value:function(r){for(var i=this,a=this.props.loadMoreItems||this.props.loadMoreRows,l=function(u){var g=r[u],C=r[u+1],p=a(g,C);p!=null&&p.then(function(){if(Qd({lastRenderedStartIndex:i._lastRenderedStartIndex,lastRenderedStopIndex:i._lastRenderedStopIndex,startIndex:g,stopIndex:C})){if(i._listRef==null)return;typeof i._listRef.resetAfterIndex=="function"?i._listRef.resetAfterIndex(g,!0):(typeof i._listRef._getItemStyleCache=="function"&&i._listRef._getItemStyleCache(-1),i._listRef.forceUpdate())}})},o=0;o<r.length;o+=2)l(o)}}]),t})(w.PureComponent);const Xd=d("div")({name:"Container",class:"culdu4a",propsAsIs:!1}),Jd=d("div")({name:"Position",class:"pwf8e69",propsAsIs:!1}),ep=d("img")({name:"Avatar",class:"atf4yh4",propsAsIs:!1}),tp=d("div")({name:"AvatarPlaceholder",class:"a1dg29ja",propsAsIs:!1}),np=d("div")({name:"Content",class:"c10a68rc",propsAsIs:!1}),rp=d("div")({name:"NameContainer",class:"nc4kck5",propsAsIs:!1}),ip=d("span")({name:"Name",class:"njsrqgr",propsAsIs:!1}),ap=()=>O,lp=d(ap())({name:"CurrentUserBadge",class:"c17uc4zr",propsAsIs:!0});var Yo={exports:{}},sp="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",op=sp,cp=op;function Xo(){}function Jo(){}Jo.resetWarningCache=Xo;var up=function(){function e(r,i,a,l,o,c){if(c!==cp){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Jo,resetWarningCache:Xo};return n.PropTypes=n,n};Yo.exports=up();var dp=Yo.exports;const je=ds(dp);class Ki extends w.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const n={get passive(){t=!0}};try{document.addEventListener("test",null,n),document.removeEventListener("test",null,n)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const n=this.props.getScrollParent&&this.props.getScrollParent();return n??(t&&t.parentNode)}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let n=window;this.props.useWindow===!1&&(n=t),n.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),n.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),n.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,n=window,r=this.getParentElement(t);let i;if(this.props.useWindow){const a=document.documentElement||document.body.parentNode||document.body,l=n.pageYOffset!==void 0?n.pageYOffset:a.scrollTop;this.props.isReverse?i=l:i=this.calculateOffset(t,l)}else this.props.isReverse?i=r.scrollTop:i=t.scrollHeight-r.scrollTop-r.clientHeight;i<Number(this.props.threshold)&&t&&t.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=r.scrollHeight,this.beforeScrollTop=r.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}calculateOffset(t,n){return t?this.calculateTopPosition(t)+(t.offsetHeight-n-window.innerHeight):0}calculateTopPosition(t){return t?t.offsetTop+this.calculateTopPosition(t.offsetParent):0}render(){const t=this.filterProps(this.props),{children:n,element:r,hasMore:i,initialLoad:a,isReverse:l,loader:o,loadMore:c,pageStart:u,ref:g,threshold:C,useCapture:p,useWindow:y,getScrollParent:x,...E}=t;E.ref=m=>{this.scrollComponent=m,g&&g(m)};const L=[n];return i&&(o?l?L.unshift(o):L.push(o):this.defaultLoader&&(l?L.unshift(this.defaultLoader):L.push(this.defaultLoader))),w.createElement(r,E,L)}}Q(Ki,"propTypes",{children:je.node.isRequired,element:je.node,hasMore:je.bool,initialLoad:je.bool,isReverse:je.bool,loader:je.node,loadMore:je.func.isRequired,pageStart:je.number,ref:je.func,getScrollParent:je.func,threshold:je.number,useCapture:je.bool,useWindow:je.bool}),Q(Ki,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});const pp=({friendsRank:e,avatar:t,name:n,userId:r,points:i,isCurrentUser:a,style:l})=>s.jsxs(Xd,{"data-name":r,style:l,children:[s.jsx(Jd,{children:e||0}),s.jsxs(np,{children:[t?s.jsx(ep,{alt:"leaderboard-item-avatar",src:t}):s.jsx(tp,{children:l0(n||"")}),s.jsxs(rp,{children:[s.jsx(ip,{children:n||""}),a&&s.jsx(lp,{name:"icon-star"})]})]}),s.jsx("div",{children:ks(i)})]}),fp=d("div")({name:"Container",class:"c16btbfp",propsAsIs:!1}),hp=({items:e,currentUserId:t,openItemDetail:n,fetchMore:r,scrollNode:i,hasMore:a})=>{const l=w.useCallback(o=>{const c=o.target.getAttribute("data-name");c&&n(c)},[n]);return s.jsx(Ki,{loadMore:r,initialLoad:!1,hasMore:a,useWindow:!1,getScrollParent:()=>i.current,children:s.jsx(fp,{"data-a":"intr",onClick:l,children:e.map(o=>s.jsx(pp,{...o,isCurrentUser:!!t&&t===o.userId},o.userId))})})},mp=d("div")({name:"Container",class:"c1itm4k7",propsAsIs:!1}),Cp=d("div")({name:"IconContainer",class:"i1w4fsni",propsAsIs:!1}),gp=()=>O,vp=d(gp())({name:"InviteGameIcon",class:"i19m85r1",propsAsIs:!0}),yp=d("div")({name:"Content",class:"c1mbu204",propsAsIs:!1}),wp=d("div")({name:"Heading",class:"h1amdqtv",propsAsIs:!1}),bp=d("div")({name:"Subtext",class:"s1lhlj9j",propsAsIs:!1}),xp=d("div")({name:"LinkContainer",class:"l1wot35e",propsAsIs:!1}),Ep=d("div")({name:"LinkInfo",class:"l1jdw39q",propsAsIs:!1}),Lp=d("span")({name:"LinkTitle",class:"l1cr5mk",propsAsIs:!1}),kp=d("span")({name:"LinkAddress",class:"lvi87q4",propsAsIs:!1}),Sp=()=>O,Ip=d(Sp())({name:"LinkIcon",class:"l1pqlvw3",propsAsIs:!0}),e4=({inviteLink:e,inviteCardTitle:t,inviteCardSubtext:n,primaryColor:r,className:i})=>{const a=w.useRef(null),[l,o]=Ko(a),[c]=vs({type:"invitation",action:"sent",payload:{from:k.InvitationFrom.MENU}});return s.jsxs(mp,{className:i,children:[s.jsx(Cp,{style:{backgroundColor:r},children:s.jsx(vp,{name:"invite-game-icon"})}),s.jsxs(yp,{children:[s.jsx(wp,{children:t||""}),s.jsx(bp,{children:n||""})]}),e&&s.jsxs(xp,{ref:a,"data-a":"intr",onClick:c(()=>l(e)),children:[s.jsxs(Ep,{children:[s.jsx(Lp,{children:"Invite link"}),s.jsx(kp,{children:e})]}),s.jsx(Ip,{name:"icon-copy"})]}),o]})},Tp=d("div")({name:"InviteFriendsContainer",class:"i1c9dygq",propsAsIs:!1}),jp=({deepLink:e})=>s.jsx(Tp,{children:s.jsx(e4,{inviteLink:e,inviteCardTitle:"It’s More Fun With Friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})}),Ap=d("div")({name:"InviteLinkContainer",class:"i1odbhm4",propsAsIs:!1}),$p=({gamification:e,scrollNode:t,scrollStore:n})=>{const r=w.useRef(null),{data:i,hasMore:a,loading:l,key:o}=F(e.leaderboardList.$store),{data:c}=F(e.deepLink.$store),[u,g]=Ko(r);return!i.length&&!l?s.jsx(jp,{deepLink:c}):s.jsxs(s.Fragment,{children:[s.jsx(hp,{items:i,scrollNode:t,scrollStore:n,fetchMore:e.leaderboardList.fetchMore,hasMore:a,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()},o),c&&s.jsx(Ap,{ref:r,children:s.jsx(Ud,{"data-a":"intr",onClick:()=>u(c),title:"Invite Friends",description:"Challenge them now!"})}),g]})},na=d("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),Rp=d("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),_p=d("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),Vp=d("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),Np=()=>O,bn=d(Np())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),Mp=()=>bn,Op=d(Mp())({name:"QuestionCheckIcon",class:"qxlt78s",propsAsIs:!0}),Pp=()=>O,Hp=d(Pp())({name:"QuestionTypeIcon",class:"qmg0vkx",propsAsIs:!0}),Fp=d("div")({name:"QuestionTypeLabel",class:"q1uz5j1g",propsAsIs:!1}),Dp=d("div")({name:"QuestionContent",class:"qc3icwa",propsAsIs:!1}),t4=d("button")({name:"PlayButton",class:"p169lohr",propsAsIs:!1}),zp=d("div")({name:"SkeletonContainer",class:"s1f43z3r",propsAsIs:!1}),Bp=()=>Ls,Up=d(Bp())({name:"SkeletonButton",class:"s16k8geu",propsAsIs:!0}),Zp={[k.PickHistoryStatus.LOST]:s.jsx(bn,{name:"incorrectVoted"}),[k.PickHistoryStatus.WON]:s.jsx(Op,{name:"icon-check"}),[k.PickHistoryStatus.UNSET]:s.jsx(bn,{name:"icon-arrow"}),[k.PickHistoryStatus.DNP]:s.jsx(bn,{name:"icon-arrow"})},qp=()=>s.jsxs(zp,{children:[s.jsx($e,{loading:!0,style:{width:"35%"}}),s.jsx($e,{loading:!0,style:{width:"70%"}}),s.jsx(Up,{})]}),n4=({questionTypeData:e,questionType:t,questionStatus:n})=>s.jsxs(Rp,{className:"SL_QuestionCaption",children:[s.jsx(Hp,{className:"SL_QuestionTypeIcon","data-testid":"question-type-icon","data-type-trivia":t===k.QuestionType.TRIVIA,"data-type-poll":t===k.QuestionType.POLL,name:e.iconName}),s.jsxs(Fp,{className:"SL_QuestionTypeLabel",children:[e.label,t===k.QuestionType.TRIVIA&&n===k.QuestionStatus.RESOLVED&&" • Expired"]})]}),Qp=({questionId:e,questionType:t,questionStatus:n,subject:r,openForVoting:i,status:a})=>{const l=N2[t],o=Zp[a];return l?s.jsxs(na,{"data-a":"intr","data-name":e,children:[s.jsxs(Dp,{children:[s.jsx(n4,{questionTypeData:l,questionType:t,questionStatus:n}),s.jsx(_p,{children:r||""})]}),s.jsx(Vp,{children:i?s.jsx(t4,{"data-a":"intr","data-name":e,children:"Play"}):o})]}):null},Wp=()=>na,Gp=d(Wp())({name:"Container",class:"cll3md7",propsAsIs:!0}),Kp=()=>t4,Yp=d(Kp())({name:"ActionBtn",class:"a10g1iik",propsAsIs:!0}),Xp=({questionId:e,...t})=>s.jsxs(Gp,{"data-a":"intr","data-name":e,children:[s.jsx(Bo,{questionId:e,...t}),s.jsx(Yp,{"data-a":"intr","data-name":e,children:"View Insight"})]}),Jp=()=>na,ef=d(Jp())({name:"Container",class:"cl56x6b",propsAsIs:!0}),tf=d("button")({name:"ActionButton",class:"a11pzf92",propsAsIs:!1}),nf=d("blockquote")({name:"Quote",class:"q1hbaleq",propsAsIs:!1}),rf=({...e})=>s.jsxs(ef,{"data-a":"intr","data-name":e.tweetId,children:[e.title&&s.jsx(nf,{children:e.title}),s.jsx(ta,{...e}),s.jsx(tf,{"data-a":"intr","data-name":e.tweetId,children:"View Insight"})]}),Wl=d("div")({name:"QuestionsContainer",class:"qvghv3l",propsAsIs:!1}),r4=({questions:e,openQuestion:t,controlVideo:n})=>{const r=i=>{const a=i.target.getAttribute("data-name");a&&(zo(),t(a,{openedFrom:"list"}))};return e?s.jsx(Wl,{"data-a":"intr",onClick:r,children:e==null?void 0:e.map(i=>{var a,l,o;if(i.type==="question"&&((a=i.attributes)==null?void 0:a.attributes.case)==="question"){const c=i.attributes.attributes.value;return s.jsx(Qp,{...c},c.questionId)}if(i.type==="insight"&&((l=i.attributes)==null?void 0:l.attributes.case)==="insight"){const c=i.attributes.attributes.value;return s.jsx(Xp,{controlVideo:n,...c},c.questionId)}if(i.type==="tweet"&&((o=i.attributes)==null?void 0:o.attributes.case)==="tweet"){const c=i.attributes.attributes.value,u=i.attributes.id;return s.jsx(rf,{controlVideo:n,...c,tweetId:u},u)}return null})}):s.jsx(Wl,{children:Array.from({length:5}).map((i,a)=>s.jsx(qp,{},a))})},af=({store:e,openQuestion:t})=>{const{sdk:n}=Xn(),r=F(e);return s.jsx(r4,{openQuestion:t,questions:r.data,controlVideo:n==null?void 0:n.controlVideoPlayer})},lf=({userSummary:e})=>{var t;const[n,r]=w.useState(void 0);return w.useEffect(()=>{const i=e.$store.subscribe(a=>{a&&r(a)});return()=>{i()}},[e]),s.jsx(s0,{loading:!(n!=null&&n.summary),...n==null?void 0:n.summary,successRate:(t=n==null?void 0:n.percentage)==null?void 0:t.correct})},sf=({gamification:e,className:t,scrollStore:n,scrollNode:r,appNode:i,style:a,responsiveStore:l})=>{const{tabsShown:o}=F(n,{keys:["tabsShown"]}),c=F(e.friendsTabEnabled),[u,g]=w.useState(l2.HOME),[,C]=c6(),{sdkInDesktopView:p,screen:y}=F(l,{keys:["sdkInDesktopView"]}),x=L=>{C(()=>{var m;g(L),p===!1&&(((m=i.current)==null?void 0:m.getBoundingClientRect().y)||0)<0&&n0(i,y.size,{behavior:"instant"})})};w.useEffect(()=>n.subscribe(L=>{if(L.scrollPosition===0){n.setKey("tabsShown",!0);return}l.get().sdkInDesktopView?n.setKey("tabsShown",L.scrollDirection==="backward"):n.setKey("tabsShown",L.scrollDirection==="forward")}),[n,l]),w.useEffect(()=>{c||g(l2.HOME)},[c]);let E="0px";return p?E=o?"0px":"calc(0px - var(--header-height))":E=o?"var(--header-height)":"0px",s.jsxs(q4,{className:we(t,"SL-Tabs"),style:a,children:[c&&s.jsx(K4,{style:{top:E},children:s.jsx($d,{activePage:u,toggleActivePage:x})}),u===l2.HOME&&s.jsxs(s.Fragment,{children:[s.jsx(Z4,{children:s.jsx(Y4,{children:s.jsx(lf,{userSummary:e.userSummary})})}),s.jsx(Ji,{style:{flex:1},children:s.jsx(af,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),u===l2.LEADERBOARD&&s.jsx(W4,{children:s.jsx($p,{scrollStore:n,scrollNode:r,gamification:e})})]})},of=()=>ot,Gl=d(of())({name:"OpenedContainer",class:"ouvguos",propsAsIs:!0}),Kl="t1eu4lbg",cf=d("div")({name:"UserContainer",class:"uuv2xqo",propsAsIs:!1}),uf=({correct:e,incorrect:t})=>{const n=e+t;return n===0?0:Math.round(e/n*100)},df=({gamification:e,scrollStore:t,className:n,appNode:r,scrollNode:i,responsiveStore:a})=>s.jsx(sf,{appNode:r,scrollStore:t,scrollNode:i,className:n,gamification:e,responsiveStore:a}),pf=({gamification:e,className:t,appNode:n,responsiveStore:r})=>{const{topNavigation:i}=Xn(),a=F(e.openedQuestion.$store),l=F(e.openedUser),{sdkInDesktopView:o}=F(r,{keys:["sdkInDesktopView"]}),{hiding:c,onAnimationEnd:u}=r0();if(!n.current||!a&&!l)return null;const g=a?s.jsx(Gl,{className:we(t,!i&&Kl),hiding:c,onAnimationEnd:u,children:s.jsx(Go,{gamification:e})}):l?s.jsx(Gl,{className:we(t,!i&&Kl),hiding:c,onAnimationEnd:u,children:s.jsxs(cf,{children:[s.jsx(a0,{label:"Friend's Rank",close:e.closeUser}),s.jsx(e0,{children:s.jsx(s0,{...l,successRate:uf(l)})})]})}):null;return s.jsx(X0,{container:n,useContainer:!o,children:g})},ff=w.lazy(()=>Promise.resolve().then(()=>require("./gamification-feature.js"))),hf=({sdk:e,feature:t,className:n,scrollStore:r,appNode:i,scrollNode:a,responsiveStore:l})=>{const o=w.useMemo(()=>t&&t.featureConfig.get().type===k.SdkOverlayType.GAMES?s.jsx(D6,{className:n,sdk:e,feature:t,children:s.jsx(ff,{appNode:i,scrollStore:r,scrollNode:a,className:n,responsiveStore:l,gamification:t})}):null,[e,t,n,l,r,a,i]);return s.jsx(w.Suspense,{fallback:s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:o})},mf=({feature:e,className:t,appNode:n,responsiveStore:r})=>e&&e.featureConfig.get().type===k.SdkOverlayType.GAMES?s.jsx(pf,{className:t,appNode:n,responsiveStore:r,gamification:e}):null,Cf=d("div")({name:"Buttons",class:"b5o8qbl",propsAsIs:!1}),gf=({children:e,className:t})=>s.jsx(Cf,{className:t,children:e}),i4=d("div")({name:"Navigation",class:"n6tbwuy",propsAsIs:!1}),vf=()=>gf,Yl=d(vf())({name:"NavigationItems",class:"n1up4z7v",propsAsIs:!0}),yf=d("button")({name:"SButton",class:"sxxa0c",propsAsIs:!1}),wf=d("span")({name:"ButtonIcon",class:"b193dcyu",propsAsIs:!1}),bf=d("span")({name:"ButtonLabel",class:"b40tuix",propsAsIs:!1}),xf="s14xk0af",Ef="ha3mg7c",Lf="h103yr45",on=({disabled:e,active:t,onClick:n,label:r,icon:i,id:a})=>s.jsx(yf,{onClick:n,"data-a":"intr",disabled:e,className:we(t&&xf,!t&&(a==="channels"||a==="featuredGroups")&&Ef,!t&&a==="leaderboard"&&Lf),children:s.jsxs(s.Fragment,{children:[i&&s.jsx(wf,{children:i}),s.jsx(bf,{children:r})]})}),kf=()=>O,Sf=d(kf())({name:"ButtonIcon",class:"b11wpe79",propsAsIs:!0}),If=d("div")({name:"Container",class:"calnblm",propsAsIs:!1}),Tf=d("div")({name:"Title",class:"t1438p52",propsAsIs:!1}),jf=d("div")({name:"CloseIconWrap",class:"c17srj38",propsAsIs:!1}),Af=()=>O,$f=d(Af())({name:"CloseIcon",class:"clqia8k",propsAsIs:!0}),Rf=()=>O,_f=d(Rf())({name:"DashboardIcon",class:"df5w958",propsAsIs:!0}),Vf="h12x6aiv",Nf=w.forwardRef(({sdk:e,className:t},n)=>{const r=()=>{e.closeFeature()};return s.jsxs(i4,{className:we(t,Vf),children:[s.jsxs(If,{children:[s.jsxs(Tf,{children:[s.jsx(_f,{name:"dashboard"}),"Dashboard"]}),s.jsx(jf,{"data-a":"intr",onClick:r,children:s.jsx($f,{name:"icon-cross"})})]}),s.jsx("div",{ref:n})]})}),Mf=w.forwardRef(({sdk:e,className:t},n)=>{const r=F(e.sdkStore.organizationSettings),i=F(e.sdkStore.streamSettings),a=F(e.getActiveFeature()),l=w.useMemo(()=>{const c=(i==null?void 0:i.data)||(r==null?void 0:r.data);return c!=null&&c.overlays?c.overlays:[]},[r,i]),o=w.useMemo(()=>[...l.filter(({enableSdkButton:c,type:u})=>u===k.SdkOverlayType.GAMES||c).map(c=>({id:c.type,onClick:()=>e.openFeature(c.type),disabled:!(c.type in _4),label:c.name,icon:s.jsx("img",{src:c.icon,alt:""}),position:c.position*10}))].sort((c,u)=>c.position-u.position),[l,e]);return s.jsxs(i4,{className:t,children:[o.length!==0&&s.jsx(Yl,{children:[s.jsx(on,{id:"Channels",onClick:()=>e.closeFeature(),label:"Channels",active:a===0},"Channels"),...o.map(c=>c.id===k.SdkOverlayType.GAMES?s.jsx(on,{...c,active:c.id===a,label:"StreamLayer +",id:"featuredGroups",icon:s.jsx(Sf,{name:"icon-btn-feature-groups","data-selected":c.id===a})},c.id):s.jsx(on,{...c,icon:void 0,active:c.id===a},c.id))]}),!o.length&&s.jsx(Yl,{children:[s.jsx(on,{id:"empty",label:"No Features...",active:!1,disabled:!0},"empty")]}),s.jsx("div",{ref:n})]})}),Of=d("div")({name:"InsightContainer",class:"i1pqqgpo",propsAsIs:!1}),Pf=d("img")({name:"Image",class:"igj7luu",propsAsIs:!1}),Hf=d("div")({name:"ImageContainer",class:"i1qne9g6",propsAsIs:!1}),Ff=d("div")({name:"InsightContent",class:"itpr98r",propsAsIs:!1}),Df=d("h3")({name:"Title",class:"t17iaqp8",propsAsIs:!1}),zf=d("div")({name:"Description",class:"d16t3y7s",propsAsIs:!1}),Bf=d("button")({name:"ActionBtn",class:"a12495er",propsAsIs:!1}),Uf=({video:e,image:t,imageMode:n,heading:r,body:i,action:a,controlVideo:l})=>s.jsxs(Of,{children:[(e==null?void 0:e.url)&&s.jsx(mr,{source:e.url,poster:e.thumbnailUrl,controlVideo:l}),t&&!(e!=null&&e.url)&&s.jsx(Hf,{"data-rounded":n===k.QuestionImages.ROUNDED,children:s.jsx(Pf,{src:t,alt:r})}),s.jsxs(Ff,{children:[s.jsx(Df,{children:r}),s.jsx(zf,{children:i}),a&&s.jsx(Bf,{onClick:a,children:"View Insight"})]})]}),Zf=d("div")({name:"Container",class:"c1eptrjd",propsAsIs:!1}),qf=d("div")({name:"CloseIconWrap",class:"crylm65",propsAsIs:!1}),Qf=()=>O,Wf=d(Qf())({name:"CloseIcon",class:"c9mrcz7",propsAsIs:!0}),Gf=d("div")({name:"Header",class:"hw3lzv4",propsAsIs:!1}),Kf=()=>O,Yf=d(Kf())({name:"TypeIcon",class:"t1rrb3kf",propsAsIs:!0}),Xf=d("span")({name:"TypeName",class:"t1ydnjov",propsAsIs:!1}),Jf=d("div")({name:"Question",class:"qlf90cl",propsAsIs:!1}),eh=d("button")({name:"AnswerButton",class:"a1e0nhcl",propsAsIs:!1}),th=d("div")({name:"Container",class:"c1t4f0x4",propsAsIs:!1}),nh=d("button")({name:"ActionBtn",class:"a16w1nl6",propsAsIs:!1}),rh=d("div")({name:"QuoteWrap",class:"q14u54rf",propsAsIs:!1}),ih=d("blockquote")({name:"Quote",class:"q1hxm6zo",propsAsIs:!1}),ah=({action:e,...t})=>s.jsxs(th,{children:[t.title&&s.jsx(rh,{children:s.jsx(ih,{children:t.title})}),s.jsx(ta,{...t}),e&&s.jsx(nh,{onClick:e,children:"View Insight"})]}),Yi=({close:e,action:t,controlVideo:n,data:{questionType:r,question:i,insight:a,tweet:l}})=>{const o=N2[r];return o?s.jsxs(Zf,{onClick:t,style:r===k.QuestionType.TWEET?{paddingTop:"12px"}:{},children:[s.jsx(qf,{"data-a":"intr",onClick:c=>{c.stopPropagation(),e&&e(c)},children:s.jsx(Wf,{name:"icon-cross"})}),r!==k.QuestionType.TWEET&&s.jsxs(Gf,{children:[s.jsx(Yf,{"data-type-trivia":r===k.QuestionType.TRIVIA,"data-type-poll":r===k.QuestionType.POLL,name:o.iconName}),s.jsx(Xf,{children:o.label})]}),r===k.QuestionType.FACTOID&&a&&s.jsx(Uf,{...a,action:t,controlVideo:n}),r===k.QuestionType.TWEET&&l&&s.jsx(ah,{...l,action:t,controlVideo:n}),r!==k.QuestionType.FACTOID&&r!==k.QuestionType.TWEET&&s.jsxs(s.Fragment,{children:[s.jsx(Jf,{children:i==null?void 0:i.title}),s.jsx(eh,{children:"Answer"})]})]}):null},ft=d("div")({name:"BGWrap",class:"b1dqe0sz",propsAsIs:!1}),Te=d("div")({name:"BGLineBase",class:"b1v6w7ni",propsAsIs:!1}),lh=()=>Te,sh=d(lh())({name:"BGOneLineOne",class:"b2nqb1p",propsAsIs:!0}),oh=()=>Te,ch=d(oh())({name:"BGOneLineTwo",class:"b1xxgmbk",propsAsIs:!0}),uh=()=>Te,dh=d(uh())({name:"BGOneLineThree",class:"b63lwcb",propsAsIs:!0}),ph=()=>Te,Xl=d(ph())({name:"BGTwoLineOne",class:"b2iah4",propsAsIs:!0}),fh=()=>Te,Jl=d(fh())({name:"BGTwoLineTwo",class:"b1xezvf6",propsAsIs:!0}),hh=()=>Te,es=d(hh())({name:"BGTwoLineThree",class:"b1jz1hg0",propsAsIs:!0}),mh=()=>Te,ts=d(mh())({name:"BGThreeLineOne",class:"b18ho1tk",propsAsIs:!0}),Ch=()=>Te,ns=d(Ch())({name:"BGThreeLineTwo",class:"b14uvjfm",propsAsIs:!0}),gh=()=>Te,rs=d(gh())({name:"BGThreeLineThree",class:"b11c3ns7",propsAsIs:!0}),vh=()=>Te,is=d(vh())({name:"BGThreeLineFour",class:"b1bqhhet",propsAsIs:!0}),yh=()=>Te,wh=d(yh())({name:"BGFourLineOne",class:"b1xyzi7o",propsAsIs:!0}),bh=()=>Te,xh=d(bh())({name:"BGFourLineTwo",class:"byo0rup",propsAsIs:!0}),Eh=()=>Te,Lh=d(Eh())({name:"BGFourLineThree",class:"b1oyiqgv",propsAsIs:!0}),kh=()=>Te,Sh=d(kh())({name:"BGFourLineFour",class:"bx3ddqw",propsAsIs:!0}),Ih=({step:e,correct:t})=>s.jsxs(s.Fragment,{children:[s.jsxs(ft,{"data-active":e===1,"data-first-screen":"true",children:[s.jsx(sh,{}),s.jsx(ch,{}),s.jsx(dh,{})]}),s.jsxs(ft,{"data-active":e===2,children:[s.jsx(Xl,{}),s.jsx(Jl,{}),s.jsx(es,{})]}),s.jsxs(ft,{"data-active":e===3,children:[s.jsx(Xl,{}),s.jsx(Jl,{}),s.jsx(es,{})]}),t?s.jsxs(s.Fragment,{children:[s.jsxs(ft,{"data-active":e===4,"data-correct":"true",children:[s.jsx(ts,{}),s.jsx(ns,{}),s.jsx(rs,{}),s.jsx(is,{})]}),s.jsxs(ft,{"data-active":e===5,"data-correct":"true",children:[s.jsx(ts,{}),s.jsx(ns,{}),s.jsx(rs,{}),s.jsx(is,{})]})]}):s.jsxs(ft,{"data-active":e===4,"data-correct":"false",children:[s.jsx(wh,{}),s.jsx(xh,{}),s.jsx(Lh,{}),s.jsx(Sh,{})]})]}),Th=118,jh=()=>ot,Ah=d(jh())({name:"Container",class:"c10131zw",propsAsIs:!0}),$h=d("div")({name:"InnerContainer",class:"ir6k2eo",propsAsIs:!1}),Z1=d("div")({name:"Content",class:"c1hwoq9l",propsAsIs:!1}),s2=d("div")({name:"Title",class:"t4ujo4g",propsAsIs:!1}),Rh=()=>s2,_h=d(Rh())({name:"PointsTitle",class:"p1pjil1h",propsAsIs:!0}),cn=d("div")({name:"Subtitle",class:"s1iorwr9",propsAsIs:!1}),as=d("div")({name:"SubtitleFG",class:"s51sv9d",propsAsIs:!1}),un=d("div")({name:"AnswerText",class:"a1lbk2ye",propsAsIs:!1}),Vh=()=>O,a4=d(Vh())({name:"FeedbackIcon",class:"frcvk3t",propsAsIs:!0}),Nh=()=>a4,ls=d(Nh())({name:"FeedbackIconCorrect",class:"f33p82r",propsAsIs:!0}),Mh=()=>a4,Oh=d(Mh())({name:"FeedbackIconIncorrect",class:"f12r9net",propsAsIs:!0}),ss=d("div")({name:"CloseIconWrap",class:"c1fw6699",propsAsIs:!1}),Ph=()=>O,os=d(Ph())({name:"CloseIcon",class:"c115o126",propsAsIs:!0}),Hh="data:image/svg+xml,%3csvg%20width='154'%20height='37'%20viewBox='0%200%20154%2037'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M70.9776%2030.8796L74.668%2018.1381C75.0696%2016.7473%2076.1186%2015.6318%2077.4936%2015.1371L77.5928%2014.7217H72.466L63.7623%2024.9662L60.431%2014.7217H55.7389L55.6255%2015.1371C56.4288%2015.5291%2056.8683%2016.7052%2056.8683%2017.662V17.7227C56.8683%2023.1787%2052.781%2032.5598%2047.0352%2032.5598C44.8002%2032.5598%2043.6425%2031.0009%2043.6425%2029.7035C43.6425%2028.1306%2044.975%2027.0105%2046.3831%2027.0105C47.744%2027.0105%2047.9519%2027.5099%2048.741%2027.5099C49.2182%2027.5099%2049.6766%2027.2672%2049.9081%2026.8518C50.2672%2026.1984%2049.9931%2025.4049%2049.3363%2025.0922L48.9772%2024.9242C45.6271%2023.3327%2041.7383%2025.7457%2041.7383%2029.4188V29.4701C41.7383%2032.1444%2043.8646%2034.38%2046.5674%2034.4733C53.5417%2034.716%2058.2055%2025.4236%2058.9473%2018.6188L59.486%2020.4577L62.2313%2028.5927H63.2709L71.8518%2018.4741L68.2512%2030.8936C67.8401%2032.3171%2066.6966%2033.4232%2065.2412%2033.7966L65.142%2034.212H72.0408L72.1542%2033.7966C71.1383%2033.2039%2070.6516%2032.0044%2070.9776%2030.8796Z'%20fill='white'/%3e%3cpath%20d='M88.2952%2021.6521H88.2385C85.016%2021.6568%2081.5571%2021.9648%2079.7143%2027.1361C78.1692%2031.4813%2077.7487%2033.2828%2076.539%2033.2828C75.7641%2033.2828%2075.9531%2031.794%2074.7954%2031.794C74.2709%2031.794%2073.7275%2032.2094%2073.6897%2032.8068C73.6236%2033.8429%2075.0317%2034.4683%2076.0949%2034.4683C79.3316%2034.4683%2080.5696%2032.1347%2080.9759%2031.0472C81.0279%2030.9072%2081.3162%2030.1371%2081.6517%2029.2317H85.0538L84.4773%2031.3273C84.1749%2032.4334%2083.5464%2033.3388%2082.488%2033.8009L82.3982%2034.2163H87.9597L88.0637%2033.8009C87.3124%2033.1848%2086.9816%2032.2%2087.2273%2031.2853L89.3206%2023.4257C89.4812%2022.8236%2089.9018%2022.3242%2090.4783%2022.0628L90.568%2021.6475H88.7536H88.2952V21.6521ZM85.3231%2028.2189H82.0202C82.3935%2027.2108%2082.7526%2026.2493%2082.8755%2025.9366C83.7118%2023.757%2085.2995%2022.8749%2086.8399%2022.7536L86.8257%2022.7676L85.3231%2028.2189Z'%20fill='white'/%3e%3cpath%20d='M116.358%2022.5486C116.538%2022.2545%20116.708%2021.8112%20116.708%2021.5591C116.732%2021.0877%20116.297%2020.7237%20115.829%2020.8217C115.456%2020.9011%20115.187%2021.2324%20115.191%2021.6058C115.196%2021.9978%20115.12%2022.4226%20114.95%2022.6279C114.558%2023.104%20113.934%2023.062%20111.062%2022.2452V22.2405C110.797%2022.1659%20110.509%2022.0819%20110.206%2021.9978C110.187%2021.9932%20110.173%2021.9885%20110.159%2021.9838C108.723%2021.6011%20106.941%2021.2464%20105.774%2021.8205C105.765%2021.8252%20105.755%2021.8298%20105.746%2021.8345C104.602%2022.3992%20103.808%2023.4727%20103.567%2024.7142C103.53%2024.8962%20103.506%2025.0455%20103.501%2025.0969C103.468%2025.7456%20104.068%2026.2544%20104.711%2026.1143C105.235%2026.0023%20105.604%2025.5403%20105.59%2025.0129C105.58%2024.4808%20105.472%2023.7667%20105.765%2023.286C106.237%2022.6279%20106.729%2022.5812%20108.935%2023.3047L106.544%2031.323C106.214%2032.4291%20105.406%2033.3345%20104.338%2033.7966L104.238%2034.212H109.961L110.074%2033.7966C109.337%2033.1852%20109.03%2032.1957%20109.299%2031.2809L111.392%2024.0561C112.309%2024.2428%20113.24%2024.2941%20114.147%2024.0374L114.473%2023.9441C115.196%2023.7527%20115.943%2023.2347%20116.358%2022.5486Z'%20fill='white'/%3e%3cpath%20d='M118.649%2021.6523L118.536%2022.0677C119.245%2022.5531%20119.561%2023.4259%20119.335%2024.2427L117.208%2031.3228C116.877%2032.429%20116.069%2033.3344%20115.002%2033.7964L114.902%2034.2118H117.931H118.21H125.18L126.101%2030.8934H125.666L125.51%2031.2108C124.934%2032.3963%20123.72%2033.1524%20122.382%2033.1524H119.429L121.003%2027.5937H122.259C123.105%2027.5937%20123.743%2028.3545%20123.582%2029.1759H124.012L125.043%2025.4188H124.613C124.362%2026.1142%20123.696%2026.5763%20122.949%2026.5809H121.291L122.382%2022.7258L125.515%2022.7211C126.536%2022.7211%20127.301%2023.6452%20127.098%2024.6347H127.528L128.35%2021.6523H118.649Z'%20fill='white'/%3e%3cpath%20d='M138.251%2021.6582H131.333L131.22%2022.0736C131.881%2022.5263%20132.207%2023.3197%20132.056%2024.0898L129.892%2031.324C129.561%2032.4301%20128.753%2033.3356%20127.685%2033.7976L127.586%2034.213H133.303L133.417%2033.7976C132.68%2033.1862%20132.373%2032.2014%20132.637%2031.282L133.686%2027.5949H134.126C134.787%2027.5949%20135.34%2028.085%20135.416%2028.7337C135.439%2028.9437%20135.77%2031.506%20136.035%2032.3881C136.379%2033.5409%20136.833%2034.213%20137.868%2034.213H140.453L140.552%2033.7976L140.183%2033.5829C139.451%2033.1536%20138.922%2032.4908%20138.685%2031.6087C138.463%2030.7779%20138.043%2029.2284%20137.84%2028.4117C137.736%2027.9916%20137.202%2027.5996%20136.654%2027.5996H137.523C139.087%2027.5996%20140.457%2026.5681%20140.878%2025.0839C141.365%2023.3617%20140.056%2021.6582%20138.251%2021.6582ZM138.369%2024.6872C138.029%2025.812%20136.98%2026.5868%20135.789%2026.5868H133.974L135.071%2022.7317H136.89C137.925%2022.727%20138.662%2023.7118%20138.369%2024.6872Z'%20fill='white'/%3e%3cpath%20d='M100.265%2022.2961C100.081%2022.2961%2099.6794%2022.1701%2099.0651%2021.9181C98.4508%2021.6661%2097.8318%2021.54%2097.2034%2021.54C95.904%2021.54%2094.8219%2021.9554%2093.9336%2022.8422C93.1964%2023.5796%2092.8704%2024.401%2092.8704%2025.1105C92.8704%2025.8665%2093.3193%2026.7533%2094.2124%2027.4721C95.0582%2028.1488%2095.937%2028.8022%2096.8206%2029.465C97.7468%2030.1977%2098.2098%2030.8745%2098.2098%2031.4252C98.2098%2032.634%2097.416%2033.2828%2095.7669%2033.2828C94.0942%2033.2828%2092.9366%2032.074%2092.568%2029.8057H92.1144L90.8008%2034.2162H91.226C91.7694%2033.8382%2092.1569%2033.6001%2092.946%2033.6001C93.6973%2033.6001%2094.5006%2034.4729%2096.2158%2034.4729C97.5814%2034.4729%2098.6682%2034.1929%2099.5943%2033.2781C100.383%2032.4753%20100.776%2031.3552%20100.776%2030.4404C100.776%2029.591%20100.237%2028.6062%2099.2966%2027.8921C98.4886%2027.2807%2097.6286%2026.7347%2096.7923%2026.1419C95.8898%2025.4792%2095.4362%2024.9144%2095.4362%2024.2937C95.4362%2023.9483%2095.611%2023.6076%2095.9559%2023.2622C96.3954%2022.8282%2096.986%2022.7302%2097.7751%2022.7302C99.3581%2022.7302%20100.464%2023.5983%20100.558%2025.4325H100.974L102.08%2021.5447H101.664C101.215%2022.0441%20100.752%2022.2961%20100.265%2022.2961Z'%20fill='white'/%3e%3cpath%20d='M149.201%2022.7304C150.784%2022.7304%20151.89%2023.6032%20151.984%2025.4327H152.4L153.501%2021.5449H153.085C152.646%2022.049%20152.182%2022.301%20151.696%2022.301C151.512%2022.301%20151.11%2022.175%20150.496%2021.923C149.881%2021.6709%20149.262%2021.5449%20148.634%2021.5449C147.334%2021.5449%20146.252%2021.9603%20145.364%2022.8471C144.627%2023.5845%20144.296%2024.4059%20144.296%2025.1153C144.296%2025.8714%20144.745%2026.7582%20145.638%2027.477C146.484%2028.1537%20147.363%2028.8071%20148.246%2029.4699C149.173%2030.2026%20149.636%2030.8794%20149.636%2031.4301C149.636%2032.6389%20148.842%2033.2876%20147.193%2033.2876C145.52%2033.2876%20144.362%2032.0788%20143.994%2029.8106H143.54L142.227%2034.2211H142.642C143.186%2033.843%20143.573%2033.605%20144.358%2033.605C145.109%2033.605%20145.912%2034.4778%20147.627%2034.4778C148.993%2034.4778%20150.075%2034.1978%20151.006%2033.283C151.795%2032.4802%20152.187%2031.3601%20152.187%2030.4453C152.187%2029.6005%20151.649%2028.6111%20150.708%2027.897C149.9%2027.2856%20149.04%2026.7395%20148.204%2026.1468C147.301%2025.4841%20146.848%2024.9193%20146.848%2024.2986C146.848%2023.9532%20147.023%2023.6125%20147.368%2023.2671C147.826%2022.8237%20148.412%2022.7304%20149.201%2022.7304Z'%20fill='white'/%3e%3cpath%20d='M26.5433%202.60035C26.0377%202.44633%2025.5321%202.72169%2025.0265%203.00173C24.8469%203.09974%2024.7194%203.27243%2024.6768%203.46845L23.883%207.13222C23.8547%207.26757%2023.9775%207.38891%2024.1145%207.36091C24.9509%207.17422%2025.7447%206.4508%2026.5811%206.70283C27.5167%206.98753%2028.4522%205.81606%2029.3878%205.83006V1.60156C28.4475%201.60623%2027.4789%202.88505%2026.5433%202.60035Z'%20fill='white'/%3e%3cpath%20d='M38.4856%2013.8398C38.2871%2013.7044%2038.1643%2013.4851%2038.1643%2013.2471V12.5796C38.1643%2011.9822%2037.6729%2011.4922%2037.0633%2011.4922H36.6239C36.0994%2011.4922%2035.6174%2011.7536%2035.3339%2012.1876L33.9164%2014.3485C33.7746%2014.5632%2033.5383%2014.6892%2033.2832%2014.6892H32.3287C31.8562%2014.6892%2031.4215%2014.9459%2031.1947%2015.3566C30.9631%2015.7814%2030.552%2016.0754%2030.0843%2016.1734V1.1403C30.0843%200.94894%2029.9283%200.794922%2029.7346%200.794922C29.5409%200.794922%2029.3849%200.94894%2029.3849%201.1403V1.60702V5.83552V16.1827C28.9171%2016.0847%2028.506%2015.7907%2028.2745%2015.3613C28.0524%2014.9506%2027.6177%2014.6939%2027.1405%2014.6939H26.4979C25.9875%2014.6939%2025.5292%2014.9879%2025.3213%2015.45L24.7873%2016.6308C24.7023%2016.8175%2024.5133%2016.9388%2024.3054%2016.9388C24.0975%2016.9388%2023.9085%2016.8175%2023.8234%2016.6308L23.2895%2015.45C23.0816%2014.9926%2022.6232%2014.6939%2022.1129%2014.6939H4.00135C3.85487%2014.6939%203.73674%2014.8106%203.73674%2014.9553C3.73674%2015.2633%203.48158%2015.5107%203.17444%2015.5107H2.39007C2.24359%2015.5107%202.12546%2015.6273%202.12546%2015.772V16.6728C2.12546%2017.5176%201.96008%2018.339%201.62931%2019.1184L1.15207%2020.2526C0.707907%2021.3027%200.5%2022.3901%200.5%2023.4589V26.0726C0.5%2026.7773%200.603954%2027.4914%200.811861%2028.1868C1.39306%2030.1377%202.7161%2031.7339%204.53529%2032.6767L7.43182%2034.1842C7.46962%2034.2029%207.51214%2034.2122%207.55467%2034.2122L9.69517%2034.2309C10.196%2034.2355%2010.6875%2034.3616%2011.1269%2034.6043L12.2751%2035.239C12.3129%2035.2623%2012.3602%2035.2717%2012.4074%2035.2717H13.9431C14.4818%2035.2717%2015.0157%2035.4163%2015.474%2035.6917C15.474%2035.6917%2016.2253%2036.1444%2016.4805%2036.2891C16.8869%2036.5225%2017.3783%2036.7465%2018.2335%2036.7932C18.4273%2036.8025%2018.621%2036.7325%2018.7675%2036.5972C18.9092%2036.4618%2018.9943%2036.2704%2018.9943%2036.0791V35.0616C18.9943%2034.3242%2019.4337%2033.6521%2020.1189%2033.3581L22.4673%2032.3406C22.7886%2032.2006%2023.1477%2032.1773%2023.4832%2032.28L24.3621%2032.5367C24.7354%2032.644%2025.1323%2032.6487%2025.5056%2032.5367L27.5846%2031.9253C27.8587%2031.8459%2028.1517%2031.8459%2028.4304%2031.9299L29.2763%2032.1633C29.6684%2032.2706%2029.9472%2032.6347%2029.9472%2033.0361V35.071C29.9472%2036.0184%2030.7269%2036.7932%2031.6861%2036.7932C32.4043%2036.7932%2033.0328%2036.3405%2033.2501%2035.6637C33.6423%2034.4456%2033.8408%2033.1761%2033.8408%2031.8973V31.0292C33.8408%2030.4131%2034.1006%2029.8204%2034.5543%2029.3956L35.419%2028.5882C36.0002%2028.0421%2036.3356%2027.2674%2036.3356%2026.474V21.6481C36.3356%2020.9013%2036.5625%2020.1779%2036.9972%2019.5618C37.0302%2019.5198%2037.0444%2019.4638%2037.0444%2019.4125V18.2737C37.0444%2017.5316%2037.2712%2016.8128%2037.6965%2016.2014L38.5517%2014.9739C38.5848%2014.9319%2038.599%2014.8806%2038.599%2014.8246V14.0545C38.6037%2013.9098%2038.5139%2013.8585%2038.4856%2013.8398ZM30.0843%2025.2838C30.6654%2025.3725%2031.1002%2025.6665%2031.1002%2026.0212C31.1002%2026.3759%2030.6702%2026.67%2030.0843%2026.7587V25.2838ZM5.22516%2032.4433L4.78572%2032.2146C3.59026%2031.5939%202.63577%2030.6698%201.9837%2029.545V28.1355C2.73028%2029.2043%203.74619%2030.1144%204.98891%2030.7631L5.22516%2030.8845V32.4433ZM7.43654%2033.5961L6.2647%2032.9894V31.4305L7.43182%2032.0373H7.43654V33.5961ZM12.3129%2034.6556L11.3868%2034.1422C10.8812%2033.8622%2010.3142%2033.7128%209.73297%2033.7035V32.0793C10.2197%2032.0886%2010.7016%2032.2146%2011.1269%2032.448L12.2751%2033.0827C12.2846%2033.0874%2012.2987%2033.0874%2012.3129%2033.0921V34.6556ZM18.4603%2035.0616V35.8551V36.0791C18.4603%2036.1304%2018.4367%2036.1818%2018.3989%2036.2191C18.3611%2036.2564%2018.3139%2036.2705%2018.2619%2036.2705C17.52%2036.2331%2017.0948%2036.0418%2016.7498%2035.8411C16.4994%2035.6964%2015.7528%2035.2483%2015.7481%2035.2483C15.2803%2034.9683%2014.7511%2034.8143%2014.2077%2034.7723V33.1387C14.6519%2033.1808%2015.0866%2033.3114%2015.474%2033.5401L16.1214%2033.9228C16.8302%2034.3429%2017.6382%2034.5809%2018.4603%2034.6276V35.0616ZM24.8582%2032.0886C24.7448%2032.084%2024.6267%2032.0653%2024.5133%2032.0326L23.6344%2031.7713C23.4454%2031.7152%2023.2517%2031.6966%2023.0579%2031.6966V30.0677C23.1997%2030.0677%2023.3414%2030.0817%2023.4832%2030.1237L24.3621%2030.3804C24.5227%2030.4271%2024.6928%2030.4504%2024.8582%2030.4598V32.0886ZM30.363%2032.4807C30.1929%2032.0886%2029.8574%2031.7759%2029.4275%2031.6592L28.5864%2031.4259C28.3879%2031.3652%2028.18%2031.3419%2027.9721%2031.3419V29.7177C28.1328%2029.713%2028.2934%2029.7317%2028.4493%2029.783L29.1392%2029.9977C29.8716%2030.2264%2030.363%2030.8891%2030.363%2031.6452V32.4807ZM32.787%2035.365C32.7729%2035.4117%2032.7634%2035.4584%2032.7492%2035.505C32.6028%2035.9624%2032.1775%2036.2658%2031.6955%2036.2658C31.653%2036.2658%2031.6105%2036.2564%2031.568%2036.2518V34.6323C31.601%2034.6369%2031.6294%2034.6416%2031.6625%2034.6416C32.135%2034.6416%2032.565%2034.3802%2032.7918%2033.9835V35.365H32.787ZM37.3232%2015.0486C36.794%2015.8047%2036.5152%2016.6915%2036.5152%2017.6109V18.4137L36.1041%2019.0017C35.5702%2019.7625%2035.2867%2020.6539%2035.2867%2021.578V25.6245C35.2867%2026.2779%2035.0126%2026.9173%2034.5306%2027.3654L33.6659%2028.1775C33.0847%2028.7236%2032.7634%2029.489%2032.787%2030.2824L32.7918%2030.4644C32.8248%2031.5146%2032.6878%2032.56%2032.3901%2033.5681C32.2956%2033.8902%2031.9932%2034.1142%2031.6577%2034.1142C31.2372%2034.1142%2030.8923%2033.7782%2030.8923%2033.3581V31.6452C30.8923%2030.6558%2030.2496%2029.7923%2029.2952%2029.4983L28.6053%2029.2836C28.2225%2029.1669%2027.8209%2029.1623%2027.4334%2029.2743L25.3544%2029.881C25.0803%2029.9604%2024.7873%2029.9604%2024.5133%2029.881L23.6344%2029.6243C23.1808%2029.489%2022.6894%2029.5217%2022.2547%2029.7083L20.4071%2030.5111C19.2258%2031.0245%2018.4651%2032.1773%2018.4651%2033.4515V34.1095C17.7374%2034.0675%2017.0286%2033.8528%2016.4002%2033.4795L15.7528%2033.0967C15.2047%2032.7747%2014.581%2032.602%2013.9431%2032.602H12.4736L11.3868%2031.9999C10.8717%2031.7152%2010.2905%2031.5659%209.69989%2031.5612L7.62082%2031.5472L5.23461%2030.3057C1.61514%2028.4249%200.0700101%2024.1917%201.64349%2020.4579L2.12073%2019.3238C2.47512%2018.4837%202.6594%2017.5922%202.6594%2016.6775V16.0427H3.17444C3.68476%2016.0427%204.11948%2015.6927%204.2376%2015.2213H22.1176C22.4153%2015.2213%2022.6894%2015.394%2022.8075%2015.6647L23.3414%2016.8455C23.5115%2017.2235%2023.8896%2017.4662%2024.3101%2017.4662C24.7259%2017.4662%2025.1087%2017.2235%2025.2788%2016.8455L25.8127%2015.66C25.9356%2015.3893%2026.2049%2015.2166%2026.5026%2015.2166H27.1452C27.424%2015.2166%2027.6791%2015.366%2027.8114%2015.6087C28.1375%2016.2061%2028.7234%2016.6075%2029.3897%2016.7148V24.145C28.317%2024.2617%2027.4949%2024.8918%2027.4949%2025.6572C27.4949%2026.5066%2028.4966%2027.1927%2029.7346%2027.1927C30.9726%2027.1927%2031.9743%2026.5066%2031.9743%2025.6572C31.9743%2024.8918%2031.1521%2024.257%2030.0795%2024.145V16.7101C30.7458%2016.6028%2031.3317%2016.2014%2031.6577%2015.604C31.79%2015.3613%2032.0452%2015.212%2032.324%2015.212H33.2785C33.7179%2015.212%2034.1195%2014.9926%2034.3605%2014.6286L35.7781%2012.4676C35.9624%2012.1829%2036.2789%2012.0149%2036.6239%2012.0149H37.0633C37.3752%2012.0149%2037.6303%2012.2669%2037.6303%2012.575V13.2424C37.6303%2013.5644%2037.7579%2013.8725%2037.98%2014.1012L37.3232%2015.0486ZM29.3849%2025.2838V26.7587C28.8037%2026.67%2028.3737%2026.3759%2028.3737%2026.0212C28.3737%2025.6665%2028.8037%2025.3678%2029.3849%2025.2838Z'%20fill='white'/%3e%3c/svg%3e",Fh="data:image/svg+xml,%3csvg%20width='159'%20height='28'%20viewBox='0%200%20159%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_6919_71839)'%3e%3cpath%20d='M4.13243%2025.9198C5.34921%2026.9052%207.05161%2027.0267%208.39597%2026.224L22.9838%2017.5138C25.4013%2016.0703%2025.4117%2012.5721%2023.0028%2011.1144L17.4686%207.76522C15.4767%206.55981%2012.8918%207.10053%2011.5501%209.00325L3.27399%2020.7399C2.14132%2022.3462%202.44805%2024.5556%203.97544%2025.7926L4.13243%2025.9198Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M4.11673%202.57147C5.33939%201.58127%207.0516%201.46387%208.39797%202.27791L22.9843%2011.0971C25.3835%2012.5477%2025.3874%2016.0265%2022.9914%2017.4824L17.5405%2020.7946C15.5485%2022.005%2012.9594%2021.4661%2011.6157%2019.5615L3.27518%207.7386C2.142%206.1323%202.44856%203.92248%203.97619%202.68529L4.11673%202.57147Z'%20stroke='white'%20style='stroke:white;stroke-opacity:1;'%20stroke-width='2.33333'/%3e%3cpath%20d='M49.8088%2020.0063C47.924%2020.0063%2046.7521%2018.7437%2046.7521%2016.6748V13.1359H50.1977V10.9296H46.7521V7.34668L44.2736%209.18483V10.9271H42.8892V13.1333H44.2736V16.6515C44.2736%2020.2137%2046.3632%2022.4174%2049.8321%2022.4174H50.361V20.0063H49.8088Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M30.4704%2019.5631L32.6818%2017.8339C33.6722%2019.4231%2035.01%2020.2761%2036.7159%2020.2761C38.5826%2020.2761%2039.757%2019.0783%2039.757%2017.5798C39.757%2015.8505%2037.9137%2015.2983%2035.977%2014.6761C33.6956%2013.9398%2031.23%2013.0168%2031.23%209.92907C31.23%207.37018%2033.5115%205.34277%2036.6226%205.34277C39.1815%205.34277%2040.7707%206.33314%2042.0618%207.83166L40.0111%209.35351C39.2515%208.17907%2038.1211%207.55685%2036.6226%207.55685C34.9167%207.55685%2033.8096%208.57055%2033.8096%209.88499C33.8096%2011.4976%2035.5856%2012.0291%2037.5196%2012.6746C39.8244%2013.4576%2042.3367%2014.4506%2042.3367%2017.585C42.3367%2020.1672%2040.2159%2022.6328%2036.7367%2022.6328C33.8563%2022.6328%2031.8963%2021.4117%2030.4678%2019.5683L30.4704%2019.5631Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M58.9189%2016.7007C58.9189%2013.3225%2061.5141%2010.6807%2064.8923%2010.6807C68.2704%2010.6807%2070.7982%2013.1384%2070.7982%2016.5399V17.5044H61.286C61.6075%2019.2725%2062.9867%2020.4444%2064.9856%2020.4444C66.5489%2020.4444%2067.7441%2019.6173%2068.3404%2018.3755L70.3627%2019.5007C69.3515%2021.3855%2067.5367%2022.6247%2064.9856%2022.6247C61.356%2022.6247%2058.9189%2020.0296%2058.9189%2016.6981V16.7007ZM61.4001%2015.4147H68.2938C67.9256%2013.7607%2066.663%2012.8403%2064.8923%2012.8403C63.1215%2012.8403%2061.8589%2013.8981%2061.4001%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M51.8955%2016.6752C51.8955%2013.113%2053.9851%2010.9326%2057.454%2010.9326H58.5559V13.323H57.4307C55.5459%2013.323%2054.33%2014.6322%2054.3533%2016.7011V22.423H51.8955V16.6804V16.6752Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M72.0138%2016.6774C72.0138%2013.3226%2074.6557%2010.7041%2077.9638%2010.7041C81.272%2010.7041%2083.8672%2013.3226%2083.8672%2016.6774V22.42H81.456V20.9267C80.6523%2022.0052%2079.4105%2022.6274%2077.8938%2022.6274C74.609%2022.6274%2072.0112%2020.0556%2072.0112%2016.6774H72.0138ZM81.5027%2016.6774C81.5027%2014.6319%2079.9394%2013.0011%2077.9638%2013.0011C75.9883%2013.0011%2074.4249%2014.6319%2074.4249%2016.6774C74.4249%2018.723%2075.9649%2020.3537%2077.9638%2020.3537C79.9627%2020.3537%2081.5027%2018.6997%2081.5027%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M85.4155%2015.978C85.4155%2012.9214%2087.5052%2010.6943%2090.6085%2010.6943C92.3766%2010.6943%2093.8026%2011.4073%2094.697%2012.6025C95.5474%2011.4073%2096.9266%2010.6943%2098.6948%2010.6943C101.819%2010.6943%20104.002%2012.8773%20104.002%2015.978V22.4103H101.544V16.0014C101.544%2014.2566%20100.372%2013.038%2098.6948%2013.038C97.0174%2013.038%2095.9155%2014.2799%2095.9389%2015.934V22.4129H93.4811V16.004C93.4811%2014.2592%2092.2859%2013.0406%2090.6085%2013.0406C88.9311%2013.0406%2087.8526%2014.2825%2087.8733%2015.9366V22.4154H85.4155V15.9832V15.978Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M105.578%205.6416H108.082V20.0227H114.859V22.4131H105.578V5.6416Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M138.483%2016.7007C138.483%2013.3225%20141.078%2010.6807%20144.456%2010.6807C147.834%2010.6807%20150.362%2013.1384%20150.362%2016.5399V17.5044H140.85C141.171%2019.2725%20142.551%2020.4444%20144.55%2020.4444C146.113%2020.4444%20147.308%2019.6173%20147.904%2018.3755L149.927%2019.5007C148.916%2021.3855%20147.101%2022.6247%20144.55%2022.6247C140.92%2022.6247%20138.483%2020.0296%20138.483%2016.6981V16.7007ZM140.964%2015.4147H147.858C147.49%2013.7607%20146.227%2012.8403%20144.456%2012.8403C142.685%2012.8403%20141.423%2013.8981%20140.964%2015.4147Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M115.269%2016.6774C115.269%2013.3226%20117.911%2010.7041%20121.219%2010.7041C124.527%2010.7041%20127.122%2013.3226%20127.122%2016.6774V22.42H124.711V20.9267C123.907%2022.0052%20122.665%2022.6274%20121.149%2022.6274C117.864%2022.6274%20115.266%2020.0556%20115.266%2016.6774H115.269ZM124.758%2016.6774C124.758%2014.6319%20123.194%2013.0011%20121.219%2013.0011C119.243%2013.0011%20117.68%2014.6319%20117.68%2016.6774C117.68%2018.723%20119.22%2020.3537%20121.219%2020.3537C123.218%2020.3537%20124.758%2018.6997%20124.758%2016.6774Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M131.67%2021.8547L126.915%2010.9658H129.557L132.912%2018.938L136.082%2010.9658H138.678L131.74%2027.7606H129.212L131.67%2021.8573V21.8547Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3cpath%20d='M151.897%2016.6674C151.897%2013.1052%20153.987%2010.9248%20157.455%2010.9248H158.557V13.3152H157.432C155.547%2013.3152%20154.331%2014.6244%20154.355%2016.6933V22.4152H151.897V16.6726V16.6674Z'%20fill='white'%20style='fill:white;fill-opacity:1;'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_6919_71839'%3e%3crect%20width='158.12'%20height='28'%20fill='white'%20style='fill:white;fill-opacity:1;'%20transform='translate(0.44043)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Dh=(e,t,n)=>e===t?"translateY(0px)":e>t?`translateY(${n}px)`:"translateY(-100%)",l4=({close:e,votedAnswer:t,mastersApp:n,correct:r,correctAnswerTitle:i,questionTitle:a,saveHeight:l,style:o,hiding:c})=>{const[u,g]=w.useState(1),C=w.useRef({});w.useEffect(()=>{const E=setInterval(()=>{g(L=>r&&L>4||!r&&L>3?L:++L)},3e3);return()=>clearInterval(E)},[r]),w.useEffect(()=>{var E,L;C.current[u]&&l(((L=(E=C.current[u])==null?void 0:E.getBoundingClientRect())==null?void 0:L.height)||Th)},[u,l]);const p=E=>L=>{C.current&&(C.current[E]=L)},y=E=>({transform:Dh(E,u,o.height)}),x={...o};return n&&x.height&&typeof x.height=="number"&&(x.height+=32),s.jsx(Ah,{style:o.height?x:{...o,paddingTop:0,paddingBottom:0},hiding:c,children:s.jsxs($h,{style:{height:o.height,minHeight:o.height,backgroundColor:u>3?r?"var(--color-sdk-prediction-result-success-bg)":"var(--color-sdk-prediction-result-incorrect-bg)":"var(--color-primary-1)"},children:[s.jsx(Ih,{step:u,correct:r}),n&&s.jsxs(Z1,{ref:p(1),style:y(1),children:[s.jsx("img",{alt:"sponsor-logo",src:Hh}),s.jsx(as,{children:"Featured Groups +"})]}),!n&&s.jsx(Z1,{ref:p(1),style:y(1),children:s.jsx("img",{alt:"sponsor-logo",src:Fh})}),s.jsxs(Z1,{ref:p(2),style:y(2),children:[s.jsx(s2,{children:"Prediction results are in!"}),n&&s.jsx(as,{children:"Featured Groups +"})]}),s.jsxs(Z1,{ref:p(3),style:y(3),children:[s.jsx(s2,{children:a}),s.jsx(cn,{children:s.jsxs(un,{children:[s.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})})]}),r?s.jsxs(s.Fragment,{children:[s.jsxs(Z1,{ref:p(4),style:{...y(4),color:"var(--color-sdk-prediction-result-success-text)"},children:[s.jsxs(s2,{children:["Congratulations!",s.jsx("br",{}),"You answered correctly."]}),s.jsxs(cn,{children:[s.jsx(ls,{name:"selected"}),s.jsxs(un,{children:[s.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]})]}),s.jsxs(Z1,{ref:p(5),style:{...y(5),color:"var(--color-sdk-prediction-result-success-text)"},children:[s.jsx(_h,{children:u===5&&s.jsx(hr,{delay:.5,prefix:"+",suffix:" points",value:t==null?void 0:t.points})}),s.jsxs(cn,{children:[s.jsx(ls,{name:"selected"}),s.jsxs(un,{children:[s.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]}),s.jsx(ss,{"data-a":"intr",onClick:e,children:s.jsx(os,{name:"icon-cross"})})]})]}):s.jsxs(Z1,{ref:p(4),style:y(4),children:[s.jsxs(s2,{style:{color:"var(--color-sdk-prediction-result-error-title)"},children:["Better luck next time!",s.jsx("br",{}),"Correct: ",i,"."]}),s.jsxs(cn,{style:{color:"var(--color-sdk-prediction-result-error-subtitle)"},children:[s.jsx(Oh,{name:"circleClose"}),s.jsxs(un,{children:[s.jsx("span",{children:"Your Pick:"})," ",t==null?void 0:t.title]})]}),s.jsx(ss,{"data-a":"intr",onClick:e,children:s.jsx(os,{name:"icon-cross"})})]})]})})},s4=e=>{const[t,n]=w.useState(!1),[r,i]=w.useState(!1),a=w.useRef(null),l=w.useCallback(()=>{i(!0),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{i(!1)},1e3)},[]),o=w.useCallback(async c=>{n(!0);const u=c.map(g=>new Promise((C,p)=>{const y=new Image;y.onload=()=>C(g),y.onerror=()=>p(),y.src=g}));await Promise.allSettled(u),n(!1)},[]);return w.useEffect(()=>{e&&(l(),o(e))},[e,l,o]),{loading:t,throttled:r}},zh=d("div")({name:"Container",class:"cl51m2q",propsAsIs:!1}),Bh=d("img")({name:"Avatar",class:"a2yhhhr",propsAsIs:!1}),Uh=d("div")({name:"AvatarPlaceholder",class:"a1dtxxlr",propsAsIs:!1}),Zh=d("div")({name:"Content",class:"c12clm3w",propsAsIs:!1}),qh=d("span")({name:"Name",class:"n14lctn7",propsAsIs:!1}),Qh=({avatar:e,name:t})=>s.jsxs(zh,{children:[e&&s.jsx(Bh,{src:e}),!e&&s.jsx(Uh,{children:l0(t||"")}),s.jsxs(Zh,{children:[s.jsxs(qh,{children:[t," "]}),"is waiting for you!"]})]}),Wh=d("div")({name:"Container",class:"c1htq1lb",propsAsIs:!1}),Gh=d("div")({name:"Graphic",class:"gjyzpp7",propsAsIs:!1}),Kh=d("img")({name:"GraphicImage",class:"g16mldgz",propsAsIs:!1}),Yh=d("div")({name:"Headline",class:"h69js65",propsAsIs:!1}),Xh=d("div")({name:"TaglineContainer",class:"tmm7qmo",propsAsIs:!1}),Jh=d("div")({name:"Tagline",class:"t17knuw2",propsAsIs:!1}),em=d("div")({name:"Content",class:"c1b74psg",propsAsIs:!1}),tm=d("div")({name:"StepsContainer",class:"s1y99ug7",propsAsIs:!1}),nm=d("span")({name:"StepIndicator",class:"sgf3v5n",propsAsIs:!1}),rm=d("div")({name:"InvitingUserWrap",class:"i1sj6gn8",propsAsIs:!1}),im=({loading:e,steps:t,currentStep:n,inviterName:r})=>{const{headline:i,tagline:a}=t[n];return s.jsxs(Wh,{children:[a&&s.jsx(Xh,{children:s.jsx($e,{loading:e,children:s.jsx(Jh,{children:a})})}),s.jsxs(em,{"data-welcome-screen":n===0,children:[s.jsx(Gh,{children:s.jsx($e,{loading:e,children:t.map(({graphicSrc:l},o)=>s.jsx(Kh,{src:l,"data-active":n===o}))})}),i&&s.jsx($e,{loading:e,children:s.jsx(Yh,{children:i})})]}),r&&n===0&&s.jsx(rm,{children:s.jsx(Qh,{name:r})}),s.jsx(tm,{style:e?{visibility:"hidden"}:{},children:Array.from({length:t.length}).map((l,o)=>s.jsx(nm,{"data-active":n===o},o))})]})},am=d("div")({name:"Container",class:"cm0bev",propsAsIs:!1}),lm=d("div")({name:"Content",class:"ce7x737",propsAsIs:!1}),sm=d("div")({name:"Title",class:"tc2tor6",propsAsIs:!1}),om=d("div")({name:"RulesList",class:"r1k5klql",propsAsIs:!1}),cm=d("div")({name:"RulesItem",class:"r1tf3ft2",propsAsIs:!1}),um=d("div")({name:"RuleIcon",class:"rwpvg1k",propsAsIs:!1}),dm=d("div")({name:"RuleText",class:"rbxiag0",propsAsIs:!1}),pm=d("button")({name:"TermsButton",class:"t6cyrry",propsAsIs:!1}),fm=({rules:e,rulesTitle:t,termsText:n,primaryColor:r,openTerms:i})=>s.jsxs(am,{children:[s.jsxs(lm,{children:[s.jsx(sm,{children:t}),s.jsx(om,{children:e==null?void 0:e.map(({label:a,icon:l},o)=>s.jsxs(cm,{children:[l&&s.jsx(um,{style:{backgroundColor:r},children:s.jsx(O,{name:l,"data-icon":l})}),s.jsx(dm,{children:a})]},o))})]}),n&&s.jsx(pm,{"data-a":"intr",onClick:i,children:"See Terms and Conditions"})]}),hm=d("div")({name:"Container",class:"cj0g35h",propsAsIs:!1}),mm=d("div")({name:"Content",class:"c1xkhrbn",propsAsIs:!1}),Cm=d("div")({name:"Title",class:"tifzb8b",propsAsIs:!1}),gm=d("div")({name:"ScrollingText",class:"stduw5c",propsAsIs:!1}),vm=({termsTitle:e,termsText:t})=>s.jsx(hm,{children:s.jsxs(mm,{children:[s.jsx(Cm,{children:e}),s.jsx(gm,{children:t})]})}),ym=d("button")({name:"SButton",class:"s1nve60q",propsAsIs:!1}),wm=d("span")({name:"ButtonLabel",class:"b1xoswwx",propsAsIs:!1}),bm=({disabled:e,variant:t="primary",onClick:n,children:r,...i})=>s.jsx(ym,{"data-a":"intr",onClick:n,disabled:e,"data-variant":t,...i,children:s.jsx(wm,{children:r})}),xm=d("div")({name:"Container",class:"c18uddbs",propsAsIs:!1}),Em=d("div")({name:"Content",class:"cvcfjf6",propsAsIs:!1}),Lm=d("div")({name:"OnboardingHeader",class:"o1ie27lw",propsAsIs:!1}),km=d("button")({name:"CloseBtn",class:"c15cjkwi",propsAsIs:!1}),Sm=()=>O,Im=d(Sm())({name:"IconClose",class:"i1mavjt2",propsAsIs:!0}),Tm=d("div")({name:"OnboardingFooter",class:"o1x0dyzv",propsAsIs:!1}),jm=()=>bm,Am=d(jm())({name:"OnboardingActionBtn",class:"o1jfi9c3",propsAsIs:!0}),ht={steps:!1,rules:!1,inviteCard:!1},o4=({gamification:e,steps:t,rules:n,rulesBtnLabel:r,rulesTitle:i,termsTitle:a,termsText:l,primaryColor:o,inviteLink:c,inviteCardTitle:u,inviteCardSubtext:g,inviteCardBtnLabel:C,loading:p,inviterName:y,sdk:x,onClose:E})=>{const[L,m]=w.useState(0),[f,v]=w.useState(!1),[b,S]=w.useState(ht);w.useEffect(()=>{t!=null&&t.length?S({...ht,steps:!0}):n!=null&&n.length?S({...ht,rules:!0}):S({...ht,inviteCard:!0})},[]);const I=w.useMemo(()=>b.steps&&L===0?"Continue":b.rules?f||!r?"Got it":r:b.inviteCard?C||"Play Now":"Next",[b,L,f,r,C]),j=w.useCallback(()=>{t!=null&&t.length&&L<t.length-1?m(V=>++V):n!=null&&n.length&&b.steps?S({...ht,rules:!0}):b.rules&&S({...ht,inviteCard:!0})},[L,t==null?void 0:t.length,n==null?void 0:n.length,b,m,S]),A=async()=>{b.inviteCard?await e.onboardingStatus.submitInplay():b.rules&&f?v(!1):j()};return w.useEffect(()=>{!p&&y&&x.inviteDisplayed()},[p,y,x]),s.jsx(qd,{children:({width:V,height:_})=>s.jsxs(xm,{style:{width:V,height:_,maxHeight:_},children:[s.jsx(Lm,{children:s.jsx(km,{"data-a":"intr",onClick:E,children:s.jsx(Im,{name:"icon-close-btn-gray"})})}),s.jsxs(Em,{children:[b.steps&&(t==null?void 0:t.length)&&s.jsx(im,{loading:p,steps:t,currentStep:L,inviterName:y}),b.rules&&!f&&s.jsx(fm,{rules:n,rulesTitle:i,termsText:l,primaryColor:o,openTerms:()=>v(!0)}),b.rules&&f&&s.jsx(vm,{termsTitle:a,termsText:l}),b.inviteCard&&s.jsx(e4,{inviteLink:c,inviteCardTitle:u,inviteCardSubtext:g,primaryColor:o})]}),s.jsx(Tm,{children:s.jsx($e,{loading:p,style:{width:"100%"},children:s.jsx(Am,{"data-a":"intr",onClick:A,children:I})})})]})})},$m=d("div")({name:"Container",class:"c1qjj4d4",propsAsIs:!1}),Rm=d("div")({name:"CloseIconWrap",class:"c1lg6b8a",propsAsIs:!1}),_m=()=>O,Vm=d(_m())({name:"CloseIcon",class:"c159el66",propsAsIs:!0}),Nm=d("div")({name:"Title",class:"t16xmufv",propsAsIs:!1}),Mm=d("img")({name:"SponsorLogo",class:"s83lc21",propsAsIs:!1}),Om=d("div")({name:"PresentsTitle",class:"p1p7igia",propsAsIs:!1}),Pm=d("div")({name:"Subtitle",class:"s1eftsbu",propsAsIs:!1}),Hm=d("div")({name:"Description",class:"d8uezec",propsAsIs:!1}),Fm=d("button")({name:"ActionButton",class:"a1h1bk90",propsAsIs:!1}),cs=({close:e,action:t,onboarding:n})=>{var r,i,a,l,o,c,u,g;return s.jsxs($m,{children:[s.jsx(Rm,{"data-a":"intr",onClick:e,children:s.jsx(Vm,{name:"icon-cross"})}),((i=(r=n==null?void 0:n.titleCard)==null?void 0:r.media)==null?void 0:i.sponsorLogo)&&s.jsxs(Nm,{children:[s.jsx(Mm,{alt:"sponsor-logo",src:(l=(a=n==null?void 0:n.titleCard)==null?void 0:a.media)==null?void 0:l.sponsorLogo}),s.jsx(Om,{children:"PRESENTS"})]}),((o=n==null?void 0:n.titleCard)==null?void 0:o.title)&&s.jsx(Pm,{children:(c=n==null?void 0:n.titleCard)==null?void 0:c.title}),((u=n==null?void 0:n.titleCard)==null?void 0:u.subtitle)&&s.jsx(Hm,{children:(g=n==null?void 0:n.titleCard)==null?void 0:g.subtitle}),s.jsx(Fm,{"data-a":"intr",onClick:t,children:"Play Now"})]})},Xi=[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_1.png",tagline:"",headline:s.jsxs(s.Fragment,{children:["Welcome to ",s.jsx("br",{})," Live Challenge"]})},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_2.png",headline:"Live insights, polls, trivia and predictions."},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/dark/step_3.png",headline:"Win points and play against friends."}],Dm=d("div")({name:"OnboardingContainer",class:"o1xni1kr",propsAsIs:!1}),zm=()=>ot,Bm=d(zm())({name:"OnboardingNotificationContainer",class:"o1vnouv7",propsAsIs:!0}),us=d("div")({name:"InnerContainer",class:"i59uefw",propsAsIs:!1}),Um=d("div")({name:"OnboardingOverlap",class:"ovnr8ov",propsAsIs:!1}),Zm=({deepLink:e,onboardingOpts:t,notification:n,gamification:r,loading:i,sdk:a,throttled:l})=>{var o,c,u,g,C,p,y;const x=F(r.friends.getStore()),[E,L]=w.useState(void 0),m=w.useMemo(()=>{var f,v;const b=a.getInviter();return b?(v=(f=x.data)==null?void 0:f.find(({slId:S})=>S===b))==null?void 0:v.name:""},[x.data,a]);return w.useEffect(()=>{const f=e.$store.subscribe(v=>{v&&L(v.data)});return()=>{f()}},[e.$store]),s.jsxs(Dm,{children:[s.jsx(o4,{loading:i,rules:[{label:"Answer as many questions as you like.",icon:"icon-btn-feature-groups"},{label:"Win points for each correct trivia or prediction answer.",icon:"icon-thumb-up"},{label:"Top the leader board and best your friends.",icon:"icon-trophy"}],rulesBtnLabel:(o=t.rules)==null?void 0:o.buttonLabel,rulesTitle:(c=t.rules)==null?void 0:c.heading,termsTitle:"Terms and Conditions",termsText:(u=t.rules)==null?void 0:u.terms,steps:Xi,primaryColor:(g=t.inviteCard)==null?void 0:g.iconColor,inviteLink:E,inviteCardTitle:(C=t.inviteCard)==null?void 0:C.heading,inviteCardSubtext:(p=t.inviteCard)==null?void 0:p.subtext,inviteCardBtnLabel:(y=t.inviteCard)==null?void 0:y.buttonLabel,onClose:()=>{var f;(f=n.close)==null||f.call(n)},gamification:r,sdk:a,inviterName:m}),l&&s.jsx(Um,{})]})},qm=({sdk:e,notification:t,saveHeight:n,style:r,appNode:i,sdkInDesktopView:a,responsiveStore:l})=>{const o=w.useRef(null),c=t.data.onboarding,[u,g]=w.useState(c==null?void 0:c.instantOpen),C=e.getFeature(k.SdkOverlayType.GAMES),p=w.useMemo(()=>Xi==null?void 0:Xi.map(({graphicSrc:L})=>L),[]),{screen:y}=F(l,{keys:["screen"]});w.useLayoutEffect(()=>{var L;n(((L=o.current)==null?void 0:L.getBoundingClientRect().height)||0)},[n]);const{loading:x,throttled:E}=s4(p);return u&&C&&c&&i.current?s.jsx(X0,{container:i,useContainer:!a,children:s.jsx(Zm,{throttled:E,notification:t,setOpened:g,gamification:C,onboardingOpts:c,deepLink:C.deepLink,loading:x,renderToNode:i,sdk:e})}):s.jsxs(s.Fragment,{children:[s.jsx(us,{ref:o,style:{position:"absolute",visibility:"hidden"},children:s.jsx(cs,{close:()=>{},action:()=>{},onboarding:c})}),s.jsx(Bm,{style:r,hiding:t.hiding,children:s.jsx(us,{children:s.jsx(cs,{close:t.close,action:()=>{var L;g(!0),(((L=i.current)==null?void 0:L.getBoundingClientRect().y)||0)<0&&n0(i,y.size,{behavior:"smooth"})},onboarding:c})})})]})},Qm=d("button")({name:"Container",class:"crkmfw1",propsAsIs:!1}),Wm=d("div")({name:"Content",class:"c11awpy4",propsAsIs:!1}),Gm=d("span")({name:"Title",class:"t154z7mh",propsAsIs:!1}),c4=({title:e,onClick:t,className:n,style:r})=>s.jsx(Qm,{"data-a":"intr",onClick:t,className:n,style:r,children:s.jsxs(Wm,{"data-a":"intr",children:[s.jsx(O,{"data-a":"intr",name:"iconUp"}),e&&s.jsx(Gm,{"data-a":"intr",children:e})]})}),Km=()=>ot,Ym=d(Km())({name:"Container",class:"c8ol1ve",propsAsIs:!0}),u4=d("div")({name:"InnerContainer",class:"iqfywam",propsAsIs:!1}),Xm=()=>u4,Jm=d(Xm())({name:"HiddenContainer",class:"hokmtod",propsAsIs:!0}),eC=d("div")({name:"NotificationRefreshing",class:"n192d1q8",propsAsIs:!1}),tC=()=>c4,nC=d(tC())({name:"Pill",class:"p1lha68t",propsAsIs:!0}),rC=e=>{const[t,n]=w.useState(0),r=w.useRef(null),i=w.useMemo(()=>new ResizeObserver(o=>{window.requestAnimationFrame(()=>{var c;if(Array.isArray(o)){for(const u of o)if(u.contentBoxSize){const g=(c=r.current)==null?void 0:c.getBoundingClientRect();g&&n(g.height)}}})}),[]),a=w.useCallback(o=>{r.current=o},[]),l=w.useCallback(o=>{n(o)},[]);return w.useEffect(()=>{const o=r.current;return o?(i.observe(o),()=>{i.unobserve(o)}):()=>{}},[e]),w.useEffect(()=>()=>{i.disconnect()}),[a,t,l]},iC=({sdk:e,notification:t,appNode:n,responsiveStore:r,hasActiveFeature:i})=>{var a,l;const{sdkInDesktopView:o}=F(r,{keys:["sdkInDesktopView"]}),{sdk:c}=Xn(),[u,g,C]=rC(t.id);let p=g;return i||(p="auto"),t.type===exports.NotificationType.QUESTION?s.jsxs(s.Fragment,{children:[s.jsx(Jm,{ref:u,children:s.jsx(Yi,{...t})}),s.jsxs(Ym,{style:{height:t.hiding?0:p},hiding:t.hiding,children:[s.jsx(u4,{style:{height:"100%"},children:s.jsx(Yi,{...t,controlVideo:c==null?void 0:c.controlVideoPlayer})}),s.jsx(eC,{},t.id)]})]}):t.type===exports.NotificationType.QUESTION_RESOLVED&&(l=(a=t.data)==null?void 0:a.question)!=null&&l.predictionResult?s.jsx(l4,{style:{height:t.hiding?0:g},saveHeight:C,close:t.close,hiding:t.hiding,...t.data.question}):t.type===exports.NotificationType.ONBOARDING?s.jsx(qm,{style:{height:t.hiding?0:p},saveHeight:C,sdk:e,notification:t,sdkInDesktopView:o,appNode:n,responsiveStore:r}):null},aC="p7vfi6t",lC=({pill:e,setPill:t,appNode:n,headerNode:r,scrollNode:i,responsiveStore:a,scrollStore:l})=>{var o,c;const{screen:u}=F(a,{keys:["screen"]}),{tabsShown:g,scrollPosition:C}=F(l,{keys:["tabsShown","scrollPosition"]});w.useEffect(()=>{a.get().sdkInDesktopView?C<50&&t(null):C>-50&&t(null)},[C,a,t]);const p=a.get().sdkInDesktopView?n:r;return!e||!p.current?null:V2.createPortal(s.jsx(nC,{title:e.type===exports.NotificationType.QUESTION_RESOLVED?"Prediction result":`New ${((c=N2[(o=e.data)==null?void 0:o.questionType])==null?void 0:c.label)||"notification"}`,"data-a":"intr",onClick:()=>{var y;a.get().sdkInDesktopView?(y=i.current)==null||y.scrollTo({top:0,behavior:"smooth"}):n0(n,u.size,{behavior:"smooth"}),t(null)},className:we(g&&aC,"sl-pill-button")}),p.current)},sC=({sdk:e,headerNode:t,scrollNode:n,responsiveStore:r,appNode:i,scrollStore:a,hasActiveFeature:l})=>{const[o]=w.useState(e.getNotificationsStore()),c=F(o),[u,g]=w.useState(null),C=w.useMemo(()=>e.getActiveNotification(),[e,c]);return w.useEffect(()=>{C&&_t.emit("notification",{action:"rendered",payload:{questionId:C.data.questionId,questionType:C.data.questionType}})},[C]),w.useEffect(()=>{const{sdkInDesktopView:p,sdkInView:y}=r.get();C&&(p||y)&&(!p&&y&&g(C),p&&window.requestAnimationFrame(()=>{a.get().scrollPosition!==0&&g(C)}))},[C]),w.useEffect(()=>{C||g(null)},[C]),s.jsxs(s.Fragment,{children:[!u&&C&&s.jsx(iC,{appNode:i,sdk:e,hasActiveFeature:l,notification:C,responsiveStore:r}),u&&s.jsx(lC,{pill:u,setPill:g,appNode:i,notification:C,headerNode:t,scrollNode:n,scrollStore:a,responsiveStore:r})]})},oC=e=>{const t=F(e.status),n=F(e.sdkStore.slStreamId),r=F(e.userId()),i=F(e.getActiveFeature()),a=t==="ready"&&!!n.data;return w.useEffect(()=>{const l=e.getFeature(k.SdkOverlayType.GAMES);l&&i!==k.SdkOverlayType.GAMES&&(l.closeQuestion(),l.closeUser()),l==null||l.openedQuestionId.subscribe(o=>{o&&i!==k.SdkOverlayType.GAMES&&e.openFeature(k.SdkOverlayType.GAMES)})},[i,e]),{sdkReady:a,activeFeature:i,isLogged:!!r}},cC=({sdk:e,className:t,scrollStore:n,appNode:r,scrollNode:i,responsiveStore:a})=>{const[,l]=hs(e);return s.jsx(hf,{className:t,scrollNode:i,appNode:r,scrollStore:n,feature:l,responsiveStore:a,sdk:e})},uC=({sdk:e,className:t,appNode:n,responsiveStore:r})=>{const i=F(e.featuresList.getStore());return i?Array.from(i,a=>{const l=e.getFeature(a);return l?s.jsx(mf,{className:t,appNode:n,feature:l,responsiveStore:r,sdk:e},a):null}):null},dC=({sdk:e,topNavigation:t})=>{const n=w.useRef(null),r=w.useRef(null),[i]=N6(n),[a,l]=O6(n,i),{sdkReady:o,activeFeature:c,isLogged:u}=oC(e),g=!!o;ws(n,{enabled:g,event:"click",listener:ys});const C=w.useMemo(()=>({sdk:e,topNavigation:t}),[e,t]);return w.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature.js"))},[]),s.jsx(bs.Provider,{value:C,children:s.jsxs(z4,{ref:n,className:t?"":"c10llmat",children:[g&&t&&s.jsx(Mf,{className:t2,sdk:e,ref:r}),g&&!t&&!!c&&s.jsx(Nf,{className:we(t2,"sl-hide-on-modal"),sdk:e,ref:r}),s.jsxs(fs,{className:"sl-hide-on-modal",ref:a,"data-nav":(!!c&&g).toString(),children:[g&&s.jsx(sC,{sdk:e,scrollNode:a,headerNode:r,appNode:n,scrollStore:l,responsiveStore:i,hasActiveFeature:!!c}),g&&s.jsx(cC,{scrollStore:l,responsiveStore:i,scrollNode:a,appNode:n,className:t2,sdk:e}),g&&s.jsx(uC,{responsiveStore:i,appNode:n,className:t2,sdk:e})]}),g&&!u&&s.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})})},d4=({children:e,customTheme:t,themeMode:n,style:r})=>s.jsx("div",{className:"StreamLayerSDKTheme",children:s.jsx("div",{className:we(F6,n,t),style:r,children:e})}),p4=()=>{const{sdk:e}=w.useContext(H1);return e},pC=()=>{const{event:e}=w.useContext(H1);return e},f4=()=>{const{sdk:e}=w.useContext(H1),[t,n]=w.useState({});return w.useEffect(()=>{var r;return e!=null&&e.options?(r=e==null?void 0:e.options)==null?void 0:r.subscribe(i=>{n({theme:i.theme,themeMode:i.themeMode})}):()=>{}},[e==null?void 0:e.options]),t},h4=()=>{const{sdk:e}=w.useContext(H1),[t,n]=w.useState({});return w.useEffect(()=>e!=null&&e.uiState?e==null?void 0:e.uiState.subscribe(r=>{n({...r})}):()=>{},[e==null?void 0:e.uiState]),t},fC=({event:e,topNavigation:t,theme:n,withSidebarNotification:r=!0})=>{const{sdk:i,status:a}=w.useContext(H1),l=h4(),o=f4(),{event:c}=w.useContext(H1);if(a===Yn.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return a===Yn.CONNECTED?s.jsx("div",{className:"StreamLayerSDK",children:"wait"}):i===null?s.jsx("div",{className:"StreamLayerSDK",children:"sdk not initialized"}):!l.app&&!l.appNotification||!l.app&&l.appNotification&&!r?null:s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(d4,{customTheme:n??o.theme,themeMode:o.themeMode,children:s.jsx(dC,{sdk:i,event:(c==null?void 0:c.current)||e,topNavigation:t})})})},m4=({event:e,internal:t})=>{const n=p4(),r=pC();return w.useEffect(()=>(n&&(e&&(n.createEventSession(e,t),r&&(r.current=e)),!e&&(r!=null&&r.current)&&(n.createEventSession("",t),r.current="")),()=>{n&&n.disableApp()}),[e,t,r,n]),null};var Yn=(e=>(e[e.UNSET=0]="UNSET",e[e.CONNECTED=1]="CONNECTED",e[e.READY=2]="READY",e))(Yn||{});const hC={status:0,sdk:null},H1=w.createContext(hC),mC=({sdkKey:e,theme:t,themeMode:n,plugins:r,children:i,event:a,production:l=!0,autoEnable:o=!0,withAdNotification:c,withAd:u=!0,betPack:g=!1,hideFriends:C,skipOnboarding:p,friendsTab:y="enabled",onDeepLinkHandled:x,videoPlayerController:E,onContentActivate:L})=>{const m=k.useStreamLayerApp({sdkKey:e,plugins:r,production:l,autoEnable:o,onDeepLinkHandled:x,videoPlayerController:E,onContentActivate:L,hideFriends:C,skipOnboarding:p,withAdNotification:c,withAd:u,friendsTab:y,betPack:g}),f=w.useRef(""),v=w.useMemo(()=>m?{sdk:m,status:2,event:f}:{status:1,sdk:null,event:f},[m]);return w.useEffect(()=>{m&&(m.options.setKey("friendsTab",y),m.options.setKey("theme",t),m.options.setKey("themeMode",n),m.options.setKey("skipOnboarding",p),m.options.setKey("betPack",g))},[m,y,t,n,p,g]),w.useEffect(()=>()=>{x&&(m==null||m.removeDeepLinkHandler(x)),E&&(m==null||m.removeVideoPlayerController(E))},[m]),w.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!e,onDeepLinkHandled:!!x,videoPlayerController:!!E})},[e,x,E]),s.jsxs(H1.Provider,{value:v,children:[a!==void 0&&s.jsx(m4,{event:a}),i]})};exports.A=ve;exports.A$1=ys;exports.A$2=Qo;exports.D=l4;exports.D$1=xe;exports.D$2=Zo;exports.Df=V2;exports.Ft=Ho;exports.Ht=Po;exports.I=s4;exports.P=df;exports.R=Cs;exports.R$1=mr;exports.S=r0;exports.StreamLayerContext=H1;exports.StreamLayerProvider=mC;exports.StreamLayerSDKEvent=m4;exports.StreamLayerSDKReact=fC;exports.StreamLayerStatus=Yn;exports.a=Wo;exports.a$1=gs;exports.b=a0;exports.b$1=ws;exports.c=En;exports.c$1=ei;exports.createLogger=at;exports.cx_default=we;exports.d=hr;exports.d$1=Fo;exports.e=N2;exports.eventBus=_t;exports.f=ot;exports.f$1=c4;exports.h=d4;exports.i=t0;exports.i$1=$o;exports.k=r4;exports.k1=O;exports.m=t2;exports.o=w7;exports.p=Uo;exports.p$1=hs;exports.styled_default=d;exports.tn=o4;exports.useStore=F;exports.useStreamLayer=p4;exports.useStreamLayerTheme=f4;exports.useStreamLayerUI=h4;exports.w=Yi;exports.x=X0;exports.x$1=n4;exports.y=Es;exports.z=Go;exports.z$1=s0;
|