@streamlayer/react 1.9.8 → 1.11.0

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.
Files changed (74) hide show
  1. package/lib/app/app.d.ts +3 -2
  2. package/lib/app/notification.d.ts +5 -0
  3. package/lib/app/provider.d.ts +1 -1
  4. package/lib/cjs/advertisement.js +1 -1
  5. package/lib/cjs/auth.js +1 -1
  6. package/lib/cjs/gamification-feature.js +1 -1
  7. package/lib/cjs/index.js +1 -1
  8. package/lib/cjs/insight.js +1 -1
  9. package/lib/cjs/masters.js +1 -1
  10. package/lib/cjs/masters2.js +3 -3
  11. package/lib/cjs/notification.js +1 -0
  12. package/lib/cjs/points.js +1 -1
  13. package/lib/cjs/provider.js +195 -0
  14. package/lib/cjs/useStreamLayerApp2.js +12 -12
  15. package/lib/classic/app/advertisement.d.ts +18 -0
  16. package/lib/classic/app/app.d.ts +19 -0
  17. package/lib/classic/app/auth.d.ts +4 -0
  18. package/lib/classic/app/event.d.ts +4 -0
  19. package/lib/classic/app/insight.d.ts +13 -0
  20. package/lib/classic/app/masters.d.ts +28 -0
  21. package/lib/classic/app/notification.d.ts +5 -0
  22. package/lib/classic/app/points.d.ts +3 -0
  23. package/lib/classic/app/provider.d.ts +43 -0
  24. package/lib/classic/app/useStreamLayerApp.d.ts +19 -0
  25. package/lib/classic/cjs/advertisement.js +1 -0
  26. package/lib/classic/cjs/auth.js +1 -0
  27. package/lib/classic/cjs/gamification-feature.js +1 -0
  28. package/lib/classic/cjs/gamification-feature2.js +1 -0
  29. package/lib/classic/cjs/index.js +1 -0
  30. package/lib/classic/cjs/insight.js +1 -0
  31. package/lib/classic/cjs/masters.js +1 -0
  32. package/lib/classic/cjs/masters2.js +9 -0
  33. package/lib/classic/cjs/notification.js +1 -0
  34. package/lib/classic/cjs/points.js +1 -0
  35. package/lib/classic/cjs/provider.js +195 -0
  36. package/lib/classic/cjs/useStreamLayerApp.js +1 -0
  37. package/lib/classic/cjs/useStreamLayerApp2.js +17 -0
  38. package/lib/classic/es/advertisement.js +755 -0
  39. package/lib/classic/es/auth.js +11 -0
  40. package/lib/classic/es/gamification-feature.js +4 -0
  41. package/lib/classic/es/gamification-feature2.js +4 -0
  42. package/lib/classic/es/index.js +16 -0
  43. package/lib/classic/es/insight.js +75 -0
  44. package/lib/classic/es/masters.js +8 -0
  45. package/lib/classic/es/masters2.js +1066 -0
  46. package/lib/classic/es/notification.js +468 -0
  47. package/lib/classic/es/points.js +59 -0
  48. package/lib/classic/es/provider.js +24526 -0
  49. package/lib/classic/es/useStreamLayerApp.js +5 -0
  50. package/lib/classic/es/useStreamLayerApp2.js +18023 -0
  51. package/lib/classic/index.d.ts +14 -0
  52. package/lib/classic/masters.d.ts +5 -0
  53. package/lib/classic/style.css +1 -0
  54. package/lib/dist/cjs/gamification-feature2.js +1 -1
  55. package/lib/dist/cjs/masters.js +70 -62
  56. package/lib/dist/es/gamification-feature2.js +21 -21
  57. package/lib/dist/es/index.js +3 -3
  58. package/lib/dist/es/masters.js +10484 -10391
  59. package/lib/dist/style.css +1 -1
  60. package/lib/es/advertisement.js +32 -32
  61. package/lib/es/auth.js +1 -1
  62. package/lib/es/gamification-feature.js +1 -1
  63. package/lib/es/index.js +10 -6
  64. package/lib/es/insight.js +15 -15
  65. package/lib/es/masters.js +1 -1
  66. package/lib/es/masters2.js +31 -31
  67. package/lib/es/notification.js +468 -0
  68. package/lib/es/points.js +13 -13
  69. package/lib/es/{index2.js → provider.js} +6936 -6848
  70. package/lib/es/useStreamLayerApp2.js +1106 -1078
  71. package/lib/index.d.ts +2 -1
  72. package/lib/style.css +1 -1
  73. package/package.json +54 -13
  74. package/lib/cjs/index2.js +0 -187
package/lib/app/app.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
1
+ import { StreamLayerOptions, StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
2
2
  export declare const useStreamLayer: () => StreamLayerSDK | null;
3
3
  export declare const useStreamLayerEvent: () => import('react').MutableRefObject<string> | undefined;
4
- export declare const useStreamLayerTheme: () => string | undefined;
4
+ export declare const useStreamLayerTheme: () => Pick<StreamLayerOptions, "theme" | "themeMode">;
5
5
  export declare const useStreamLayerUI: () => {
6
6
  promotionExternalAd?: boolean;
7
7
  promotionSidebar?: boolean;
@@ -14,5 +14,6 @@ export declare const useStreamLayerUI: () => {
14
14
  export declare const StreamLayerSDKReact: React.FC<{
15
15
  event?: string;
16
16
  topNavigation?: boolean;
17
+ withSidebarNotification?: boolean;
17
18
  theme?: string;
18
19
  }>;
@@ -0,0 +1,5 @@
1
+ import { StreamLayerSDKNotification as StreamLayerSDKNotificationUI } from '@streamlayer/react-ui/notification';
2
+ export { StreamLayerSDKNotificationUI };
3
+ export declare const StreamLayerSDKNotification: React.FC<{
4
+ theme?: string;
5
+ }>;
@@ -22,7 +22,6 @@ export declare const StreamLayerContext: import('react').Context<{
22
22
  status: StreamLayerStatus;
23
23
  sdk: StreamLayerSDK | null;
24
24
  event?: React.MutableRefObject<string>;
25
- theme?: string;
26
25
  }>;
27
26
  export type StreamLayerProps = {
28
27
  sdkKey: string;
@@ -37,6 +36,7 @@ export type StreamLayerProps = {
37
36
  withAdNotification?: boolean;
38
37
  withAd?: boolean;
39
38
  friendsTab?: 'enabled' | 'disabled' | 'activatedGame';
39
+ themeMode?: 'light' | 'dark';
40
40
  };
41
41
  export declare const StreamLayerProvider: React.FC<StreamLayerProps & {
42
42
  children: React.ReactNode;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),g=require("react"),t=require("./index2.js"),u=require("./useStreamLayerApp2.js"),pe=t.styled_default("div")({name:"Container",class:"c5b6wdg",propsAsIs:!1}),ye="a1rlj479",ve="s35f1di",fe="sj4471g",Ae="b12050d8",ge="b1d5ybek",Ie=e=>e==="left"||e==="right"?ve:Ae,xe=e=>e==="left"||e==="right"?fe:ge,he=e=>e==="left"?"avdxyl3":e==="right"?"a1bisd08":e==="top"?"a1u9y2aj":"a1qqaks",B=({children:e,style:s,className:l,enabled:n=!0,hiding:r,direction:a="left",onAnimationEnd:c})=>o.jsx(pe,{style:s,className:t.cx_default(l,ye,he(a),n&&!r&&Ie(a),n&&r&&xe(a)),onAnimationEnd:c,children:e}),je=t.styled_default("a")({name:"Link",class:"l1sgte8c",propsAsIs:!1}),_e=t.styled_default("div")({name:"BannerContainer",class:"b7yfc72",propsAsIs:!1}),be=()=>je,Ne=t.styled_default(be())({name:"BannerLink",class:"bejjq94",propsAsIs:!0}),Pe=({promotion:e,promotionId:s,hiding:l,direction:n="bottom"})=>{var r,a;if(!((r=e.additionalBanner)!=null&&r.imageUrl))return null;let c=(a=e.additionalBanner)==null?void 0:a.url;return c&&c.indexOf("http")!==0&&(c=`https://${c}`),o.jsx(B,{direction:n,hiding:l,children:o.jsx(_e,{className:"BannerContainer",children:o.jsx(Ne,{as:c?"a":"span",className:"BannerLink",href:c,style:{backgroundImage:`url(${e.additionalBanner.imageUrl})`,cursor:c?"pointer":"default"},"data-promo-id":s,"data-promo-type":e.type,"data-analytics":"banner",target:"_blank"})})})},Se=t.styled_default("div")({name:"NotificationContent",class:"n18wsqoo",propsAsIs:!1}),Te=t.styled_default("div")({name:"Body",class:"b1ia90c2",propsAsIs:!1}),$e=t.styled_default("div")({name:"Title",class:"tg2z08v",propsAsIs:!1}),Ee=t.styled_default("div")({name:"Text",class:"t59zdk1",propsAsIs:!1}),R=t.styled_default("div")({name:"MediaImgBottom",class:"m1ab9fq",propsAsIs:!1}),Ce=()=>R,Le=t.styled_default(Ce())({name:"MediaImgMiddle",class:"m9fsr0y",propsAsIs:!0}),Me=t.styled_default("img")({name:"CtaIcon",class:"cvi9y5q",propsAsIs:!1}),ke=t.styled_default("button")({name:"Button",class:"bgl6boa",propsAsIs:!1}),Oe=t.styled_default("div")({name:"Logo",class:"l5mq0z",propsAsIs:!1}),Be=t.styled_default("div")({name:"Footer",class:"f1mse0ft",propsAsIs:!1}),Re=t.styled_default("div")({name:"Vector",class:"v1hcloah",propsAsIs:!1}),De=t.styled_default("div")({name:"NotificationContainer",class:"n3n65jf",propsAsIs:!1}),qe={[u.NotificationPromotionImagePosition.BOTTOM]:R,[u.NotificationPromotionImagePosition.MIDDLE]:Le},we=({src:e,imagePosition:s})=>{const l=qe[s]||R;return o.jsx(l,{children:o.jsx("img",{src:e,alt:""})})},Ve=({notification:e,open:s})=>{if(!e||!e.promotion||e.enabled!==u.NotificationEnabled.NOTIFICATION_ENABLED)return null;const{title:l,body:n,image:r,promotion:a}=e,{sponsorLogo:c,sponsorLogoMode:p,imagePosition:v,ctaButton:i}=a;return o.jsxs(De,{className:"SL_Lower_Third_Notification",onClick:s,children:[o.jsxs(Se,{children:[o.jsx(we,{src:r,imagePosition:v}),o.jsxs(Te,{children:[l&&o.jsx($e,{children:l}),n&&o.jsx(Ee,{children:n})]})]}),o.jsxs(Be,{children:[p!==u.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsxs(o.Fragment,{children:[o.jsx(Oe,{children:o.jsx("img",{src:c,alt:l})}),o.jsx(Re,{})]}),o.jsxs(ke,{name:"promo-button",style:{color:i==null?void 0:i.textColor,backgroundColor:i==null?void 0:i.color},children:[(i==null?void 0:i.ctaIcon)&&(i==null?void 0:i.ctaIconMode)===u.CtaIconMode.CTA_ICON_TRANSPARENT&&o.jsx(Me,{src:i==null?void 0:i.ctaIcon,alt:"cta-icon"}),(i==null?void 0:i.label)||"Open"]})]})]})},Fe=t.styled_default("div")({name:"NotificationContent",class:"n1ku6hz",propsAsIs:!1}),Ue=t.styled_default("div")({name:"NotificationContainer",class:"nbxqmol",propsAsIs:!1}),ze=t.styled_default("div")({name:"Body",class:"b1gu3eml",propsAsIs:!1}),Ge=t.styled_default("div")({name:"Title",class:"t1u17zva",propsAsIs:!1}),Ke=t.styled_default("div")({name:"Text",class:"t10ko1g",propsAsIs:!1}),C=t.styled_default("div")({name:"Media",class:"mntc42e",propsAsIs:!1}),We=()=>C,Z=t.styled_default(We())({name:"MediaImgFit",class:"ml060eo",propsAsIs:!0}),He=()=>C,te=t.styled_default(He())({name:"MediaImgCentered",class:"m1vqlvig",propsAsIs:!0}),Ye=()=>te,Je=t.styled_default(Ye())({name:"MediaImgBottom",class:"m1e7tvi5",propsAsIs:!0}),Ze=()=>C,Qe=t.styled_default(Ze())({name:"MediaImgSolid",class:"mqvntt2",propsAsIs:!0}),Xe=()=>C,eo=t.styled_default(Xe())({name:"MediaImgMiddle",class:"m12jtj3u",propsAsIs:!0}),oo=t.styled_default("img")({name:"CtaIcon",class:"ckq1frv",propsAsIs:!1}),to=t.styled_default("button")({name:"Button",class:"bis90pl",propsAsIs:!1}),so=()=>t.h1,no=t.styled_default(so())({name:"StyledChevronRight",class:"s9mjmz3",propsAsIs:!0}),lo=t.styled_default("div")({name:"Logo",class:"l1cf50a7",propsAsIs:!1}),io={[u.NotificationPromotionImagePosition.UNSET]:Z,[u.NotificationPromotionImagePosition.FIT]:Z,[u.NotificationPromotionImagePosition.CENTERED]:te,[u.NotificationPromotionImagePosition.BOTTOM]:Je,[u.NotificationPromotionImagePosition.SOLID]:Qe,[u.NotificationPromotionImagePosition.MIDDLE]:eo},ao=({src:e,imagePosition:s})=>{const l=io[s];return o.jsx(l,{children:o.jsx("img",{src:e,alt:""})})},ro=({notification:e,open:s,promotionId:l,hiding:n,direction:r="left"})=>{if(!e||!e.promotion||e.enabled!==u.NotificationEnabled.NOTIFICATION_ENABLED)return null;if(e.promotion.mode===u.NotificationPromotionMode.LOWER_THIRD)return o.jsx(Ve,{notification:e,open:s});const{title:a,body:c,image:p,promotion:v}=e,{sponsorLogo:i,sponsorLogoMode:f,imagePosition:y,ctaButton:m}=v;return o.jsx(B,{className:"SL_Rich_Notification",direction:r,hiding:n,children:o.jsxs(Ue,{onClick:s,children:[f!==u.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsx(lo,{children:o.jsx("img",{src:i,alt:a})}),o.jsxs(Fe,{children:[o.jsx(ao,{src:p,imagePosition:y}),o.jsxs(ze,{children:[a&&o.jsx(Ge,{children:a}),c&&o.jsx(Ke,{children:c})]}),o.jsxs(to,{name:"promo-button",style:{color:m==null?void 0:m.textColor,backgroundColor:m==null?void 0:m.color},children:[(m==null?void 0:m.ctaIcon)&&(m==null?void 0:m.ctaIconMode)===u.CtaIconMode.CTA_ICON_TRANSPARENT&&o.jsx(oo,{src:m==null?void 0:m.ctaIcon,alt:"cta-icon"}),(m==null?void 0:m.label)||"Open"]}),o.jsx(no,{name:"chevronRight"})]})]})})},co=t.styled_default("div")({name:"OverlayContainer",class:"okzhq2w",propsAsIs:!1}),se=t.styled_default("div")({name:"PromoOverlay",class:"pmgz5i",propsAsIs:!1}),ne=t.styled_default("div")({name:"Header",class:"hyxi3jt",propsAsIs:!1}),le=t.styled_default("div")({name:"HeaderContent",class:"h149e3gp",propsAsIs:!1}),ie="h10toh7",Q=t.styled_default("img")({name:"SponsorLogo",class:"s1jyea6t",propsAsIs:!1}),mo=t.styled_default("div")({name:"SponsorName",class:"szpfa3h",propsAsIs:!1}),ae=t.styled_default("div")({name:"Media",class:"m1crmu01",propsAsIs:!1}),uo=t.styled_default("img")({name:"PromoImg",class:"p1l37r8s",propsAsIs:!1}),po="s1nmch9k",X=t.styled_default("div")({name:"Content",class:"c1er0ljd",propsAsIs:!1}),yo=t.styled_default("div")({name:"Description",class:"dydopmr",propsAsIs:!1}),vo=t.styled_default("div")({name:"Sponsor",class:"s1w6nt04",propsAsIs:!1}),fo=t.styled_default("div")({name:"SponsorText",class:"s1evcmtq",propsAsIs:!1}),re=t.styled_default("div")({name:"ADLogo",class:"awodx0x",propsAsIs:!1}),Ao=t.styled_default("span")({name:"SponsoredText",class:"s1q3n6oi",propsAsIs:!1}),go=t.styled_default("div")({name:"ActionBtnWrap",class:"a8d4xfk",propsAsIs:!1}),Io=t.styled_default("a")({name:"ActionButton",class:"at6oobh",propsAsIs:!1}),xo=t.styled_default("div")({name:"Title",class:"t1gyg7tt",propsAsIs:!1}),ho="h17rwbtk",jo=t.styled_default("div")({name:"Container",class:"c10m2bce",propsAsIs:!1}),ee=t.styled_default("div")({name:"Item",class:"ig23yq5",propsAsIs:!1}),_o=t.styled_default("div")({name:"Dot",class:"d1f6aqua",propsAsIs:!1}),bo=({time:e,adCount:s,adPosition:l})=>{const n=Math.floor(e/60),r=e-n*60;return n===0&&r===0&&s===l?null:o.jsxs(jo,{children:[s>1&&o.jsxs(o.Fragment,{children:[o.jsxs(ee,{children:[l," of ",s]}),o.jsx(_o,{})]}),o.jsxs(ee,{children:[n,":",r<10?`0${r}`:r]})]})},No=(e,s,{onPlay:l,onStop:n,onProgress:r})=>{const a=google.ima;let c=new a.AdDisplayContainer(e),p=new a.AdsLoader(c),v=new a.AdsRequest,i;p.addEventListener(a.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,y=>{i=y.getAdsManager(e),l&&i.addEventListener(a.AdEvent.Type.STARTED,l),n&&i.addEventListener(a.AdEvent.Type.COMPLETE,n),r&&i.addEventListener(a.AdEvent.Type.AD_PROGRESS,m=>r(m.getAdData())),i.init(e.clientWidth,e.clientHeight,a.ViewMode.NORMAL),i.start()},!1),p.addEventListener(a.AdErrorEvent.Type.AD_ERROR,()=>{console.log("ad error"),n==null||n()},!1),v.linearAdSlotWidth=e.clientWidth,v.linearAdSlotHeight=e.clientHeight,v.adTagUrl=s,p.requestAds(v);const f=()=>{i==null||i.destroy(),p==null||p.destroy(),c==null||c.destroy(),c=void 0,p=void 0,v=void 0,i=void 0};return()=>{try{c.initialize()}catch(y){n==null||n(),console.log("AdsManager could not be started",y)}return f}},Po=t.styled_default("div")({name:"Container",class:"c4q6dw1",propsAsIs:!1}),So=t.styled_default("div")({name:"ControlsContainer",class:"c1la67r",propsAsIs:!1}),To="m3guev",$o="m7099mt",Eo="mmm6o5s",Co=({promotion:e,controlVideo:s,promotionId:l,onClose:n,externalAd:r,skipAutoClose:a})=>{var c;const p=g.useRef(null),[v,i]=g.useState(!1),[f,y]=g.useState(0),[m,I]=g.useState(0),[_,A]=g.useState(0),x=g.useRef(),h=g.useCallback(()=>{y(0),I(0),A(0),i(!1),s==null||s({muted:!1})},[s]);g.useEffect(()=>{if(r!=null&&r.url&&p.current){h();const j=No(p.current,r.url,{onPlay:()=>{t.eventBus.emit("advertisement",{action:"videoPlay",payload:{id:l,type:e.type}}),s==null||s({muted:!0}),i(!0)},onStop:()=>{n==null||n(),h()},onProgress:b=>{y(Math.round(b.duration-b.currentTime)),I(b.totalAds),A(b.adPosition)}})();return x.current=j,()=>{x.current=void 0,j()}}},[r==null?void 0:r.url,s,h,l,e.type,n]);const S=((c=e.sponsor)==null?void 0:c.logo)&&e.logoMode===u.PromotionLogoMode.CENTER;return o.jsxs(se,{className:"PromoOverlay",children:[o.jsxs(ne,{children:[o.jsx(le,{className:t.cx_default(!S&&ie),children:o.jsx(re,{style:{transform:"scale(1.5)"},children:"Ad"})}),o.jsxs(So,{children:[o.jsx(bo,{time:f,adCount:m,adPosition:_}),a&&o.jsx(t.b,{className:"ClosePromoIcon",close:()=>{var j;(j=x.current)==null||j.call(x),n==null||n(),h()}})]})]}),o.jsx(ae,{className:t.cx_default(To,v&&$o,!v&&Eo),children:o.jsx(Po,{ref:p})})]})},oe=e=>{var s,l,n,r,a,c,p,v,i,f,y,m,I,_,A,x,h,S,j,b,D,q,w,V,F,U,z,G,K,W;const{promotion:d,open:H,advertisementPaused:ce,togglePause:N,controlVideo:T,skipAutoClose:me,promotionId:$,onClose:ue,markAsViewed:L,externalAd:Y}=e,M=d.type===u.PromotionType.INGAME_IAB11_LBAR||d.type===u.PromotionType.INGAME_IAB11,k=((s=d.sponsor)==null?void 0:s.logo)&&d.logoMode===u.PromotionLogoMode.CENTER,J=!!((n=(l=d.banner)==null?void 0:l.video)!=null&&n.url),E=d.autoPlayVideo===u.AutoPlayVideo.ENABLED;if(g.useEffect(()=>{N==null||N(J||E),H==null||H()},[]),g.useEffect(()=>{$&&d.type&&L&&L()},[$,d.type,L]),g.useEffect(()=>()=>{T==null||T({muted:!1})},[T]),Y)return o.jsx(Co,{...e,externalAd:Y});let P=(r=d.banner)==null?void 0:r.url;P&&P.indexOf("http")!==0&&(P=`https://${P}`);let O=!0;return J&&(!ce||!E?O=!0:O=!1),o.jsxs(se,{className:"PromoOverlay",children:[o.jsxs(ne,{children:[o.jsxs(le,{className:t.cx_default(!k&&ie),children:[((a=d.sponsor)==null?void 0:a.logo)&&d.logoMode===u.PromotionLogoMode.LEFT&&o.jsx(Q,{className:"PromoSponsorLogo",src:(c=d.sponsor)==null?void 0:c.logo,alt:"promo"}),o.jsxs(vo,{style:{paddingLeft:(p=d.sponsor)!=null&&p.logo&&d.logoMode===u.PromotionLogoMode.LEFT?"0px":"8px"},children:[((v=d.sponsor)==null?void 0:v.logo)&&d.logoMode===u.PromotionLogoMode.LEFT&&o.jsx(mo,{children:(i=d.sponsor)==null?void 0:i.name}),o.jsxs(fo,{className:"SponsorText",children:[o.jsx(re,{children:"AD"}),o.jsx(Ao,{children:"SPONSORED"})]})]})]}),o.jsx(t.b,{className:"ClosePromoIcon",close:ue,autoClose:(f=d.closeTimer)==null?void 0:f.auto,duration:me?0:(y=d.closeTimer)==null?void 0:y.seconds,isPlaying:O})]}),o.jsxs(ae,{children:[k&&o.jsx(Q,{className:po,src:(m=d.sponsor)==null?void 0:m.logo,alt:"promo"}),o.jsx(X,{children:(_=(I=d.banner)==null?void 0:I.video)!=null&&_.url?o.jsx(t.Y,{source:(x=(A=d.banner)==null?void 0:A.video)==null?void 0:x.url,poster:(S=(h=d.banner)==null?void 0:h.video)==null?void 0:S.thumbnailUrl,aspectRatio:M?"1/1":"16/9",onPause:()=>{E&&(N==null||N(!0))},onPlay:()=>{t.eventBus.emit("advertisement",{action:"videoPlay",payload:{id:$,type:d.type}}),N==null||N(!1)},controlVideo:T,autoPlay:E}):(j=d.banner)!=null&&j.imageUrl?o.jsx(uo,{style:M?{aspectRatio:"1/1"}:{},src:(b=d.banner)==null?void 0:b.imageUrl,alt:"promo"}):null}),!M&&o.jsxs(X,{children:[((D=d.banner)==null?void 0:D.title)&&o.jsx(xo,{className:t.cx_default("AdvTitle",k&&ho),children:(q=d.banner)==null?void 0:q.title}),((w=d.banner)==null?void 0:w.body)&&o.jsx(yo,{className:"AdvDescription",children:(V=d.banner)==null?void 0:V.body})]})]}),d.buttonType!==u.PromotionButtonType.NO_BUTTON&&o.jsx(go,{children:o.jsx(Io,{href:P,style:{backgroundColor:((U=(F=d.banner)==null?void 0:F.ctaButton)==null?void 0:U.color)||"#009dc4",color:((G=(z=d.banner)==null?void 0:z.ctaButton)==null?void 0:G.textColor)||"#fff"},"data-analytics":"button","data-promo-id":$,"data-promo-type":d.type,target:"_blank",children:(W=(K=d.banner)==null?void 0:K.ctaButton)==null?void 0:W.label})})]})},Lo=t.styled_default("div")({name:"SidebarContainer",class:"s1abskp8",propsAsIs:!1}),Mo=({children:e,direction:s,style:l,className:n,hiding:r})=>o.jsx(B,{direction:s,style:l,hiding:r,className:n,children:o.jsx(Lo,{children:e})}),ko=e=>(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB11_LBAR||(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB21_LBAR,Oo=e=>(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB11||(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB21,Bo=({advertisement:e,close:s,skipTypeCheck:l,skipAutoClose:n,layoutMode:r="side-by-side",sidebar:a,isNotification:c,banner:p,markAsViewed:v,open:i,externalAd:f,controlVideo:y,advertisementPaused:m,togglePause:I})=>e.promotion?c&&e.notification?o.jsx(ro,{open:()=>i==null?void 0:i({fromNotification:!0}),notification:e.notification,promotionId:e.question.id}):!a&&!p&&(l||Oo(e.promotion))?o.jsx(co,{className:"PromoOverlayContainer",children:o.jsx(oe,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,onClose:s,open:i,skipAutoClose:n,externalAd:f,controlVideo:y,advertisementPaused:m,togglePause:I})}):a&&(l||ko(e.promotion))?o.jsx(Mo,{className:"PromoSidebarContainer",direction:a,hiding:!1,children:o.jsx(oe,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,externalAd:f,onClose:s,open:i,controlVideo:y,skipAutoClose:n,advertisementPaused:m,togglePause:I})}):p?o.jsx(Pe,{promotionId:e.question.id,hiding:!1,promotion:e.promotion,direction:p}):null:null,Ro=t.styled_default("div")({name:"AdvertisementUIWrap",class:"aa6pjif",propsAsIs:!1}),Do=e=>{const s=e.target;if(s instanceof HTMLAnchorElement&&s.target==="_blank"){const l=s.getAttribute("data-promo-id")||"",n=s.getAttribute("data-promo-type")||u.PromotionType.UNSET;s.getAttribute("data-analytics")==="button"&&t.eventBus.emit("advertisement",{action:"buttonSelect",payload:{id:l,type:n}}),s.getAttribute("data-analytics")==="banner"&&t.eventBus.emit("advertisement",{action:"bannerSelect",payload:{id:l,type:n}})}},qo=({gamification:e,layoutMode:s,skipAutoClose:l,skipTypeCheck:n,sidebar:r,banner:a,notification:c,isMobileScreen:p,persistent:v,externalAd:i,controlVideo:f})=>{var y,m,I;const _=g.useRef(null),A=t.useStore(e.advertisement.$store);t.L(_,{enabled:!!A.data,event:"click",listener:Do});const x=!a&&!r;if(A.data===void 0||!v&&A.isViewed)return null;const h=((I=(m=(y=A==null?void 0:A.data)==null?void 0:y.notification)==null?void 0:m.promotion)==null?void 0:I.mode)===u.NotificationPromotionMode.LOWER_THIRD;return o.jsx(Ro,{ref:_,style:{height:x?"auto":"100%"},className:t.cx_default("SL-AdvertisementUIWrap",p&&"mobile-view",h&&"SL-AdvertisementUIWrap--lower-third"),children:o.jsx(Bo,{skipTypeCheck:n,sidebar:r,banner:a,advertisement:A.data,advertisementPaused:A.isPaused,togglePause:A.togglePause,close:A.close,externalAd:i?A.externalAd:void 0,markAsViewed:e.advertisement.markAsViewed,open:e.advertisement.open,layoutMode:s,isNotification:c,skipAutoClose:l,controlVideo:f})})},de=({sdk:e,sidebar:s,externalAd:l,banner:n,skipAutoClose:r,skipTypeCheck:a,layoutMode:c,isMobileScreen:p,persistent:v,notification:i})=>{const f=t.useStore(e.featuresList.getStore());if(g.useEffect(()=>{if(l){const m=document.createElement("script");m.async=!0,m.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",document.body.appendChild(m)}},[l]),s&&n)return o.jsx("div",{style:{color:"red"},children:"define either sidebar or banner, not both."});if(n&&l)return o.jsx("div",{style:{color:"red"},children:"externalAd is not supported with banner"});if(!f)return null;const y=e.getFeature(u.SdkOverlayType.GAMES);return y?o.jsx(qo,{gamification:y,sidebar:s,banner:n,layoutMode:c,isMobileScreen:p,persistent:v,notification:i,skipTypeCheck:a,skipAutoClose:r,externalAd:l,controlVideo:e.controlVideoPlayer}):null},wo=({event:e,sidebar:s,banner:l,isMobileScreen:n,skipAutoClose:r,persistent:a,theme:c,notification:p,skipTypeCheck:v,externalAd:i})=>{const f=t.useStreamLayer(),y=t.useStreamLayerUI(),m=t.useStreamLayerTheme();return f?i&&!y.promotionExternalAd?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):!i&&y.promotionExternalAd?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):s&&!y.promotionSidebar?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):l&&!y.promotionBanner?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):p&&!y.promotionNotification?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):!l&&!s&&!p&&!y.promotionOverlay?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):o.jsxs("div",{className:"StreamLayerSDK",children:[o.jsx(t.d,{customTheme:c??m,children:o.jsx(de,{sdk:f,sidebar:s,banner:l,isMobileScreen:n,persistent:a,notification:p,skipTypeCheck:v,skipAutoClose:r,layoutMode:"side-by-side",externalAd:i})}),e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e})]}):null};exports.StreamLayerSDKAdvertisement=wo;exports.StreamLayerSDKAdvertisementUI=de;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),g=require("react"),t=require("./provider.js"),u=require("./useStreamLayerApp2.js"),pe=t.styled_default("div")({name:"Container",class:"c5b6wdg",propsAsIs:!1}),ye="a1rlj479",ve="s35f1di",fe="sj4471g",Ae="b12050d8",ge="b1d5ybek",Ie=e=>e==="left"||e==="right"?ve:Ae,he=e=>e==="left"||e==="right"?fe:ge,xe=e=>e==="left"?"avdxyl3":e==="right"?"a1bisd08":e==="top"?"a1u9y2aj":"a1qqaks",B=({children:e,style:s,className:l,enabled:n=!0,hiding:r,direction:a="left",onAnimationEnd:c})=>o.jsx(pe,{style:s,className:t.cx_default(l,ye,xe(a),n&&!r&&Ie(a),n&&r&&he(a)),onAnimationEnd:c,children:e}),je=t.styled_default("a")({name:"Link",class:"l1sgte8c",propsAsIs:!1}),_e=t.styled_default("div")({name:"BannerContainer",class:"b7yfc72",propsAsIs:!1}),be=()=>je,Ne=t.styled_default(be())({name:"BannerLink",class:"bejjq94",propsAsIs:!0}),Pe=({promotion:e,promotionId:s,hiding:l,direction:n="bottom"})=>{var r,a;if(!((r=e.additionalBanner)!=null&&r.imageUrl))return null;let c=(a=e.additionalBanner)==null?void 0:a.url;return c&&c.indexOf("http")!==0&&(c=`https://${c}`),o.jsx(B,{direction:n,hiding:l,children:o.jsx(_e,{className:"BannerContainer",children:o.jsx(Ne,{as:c?"a":"span",className:"BannerLink",href:c,style:{backgroundImage:`url(${e.additionalBanner.imageUrl})`,cursor:c?"pointer":"default"},"data-promo-id":s,"data-promo-type":e.type,"data-analytics":"banner",target:"_blank"})})})},Se=t.styled_default("div")({name:"NotificationContent",class:"n18wsqoo",propsAsIs:!1}),Te=t.styled_default("div")({name:"Body",class:"b1ia90c2",propsAsIs:!1}),Ee=t.styled_default("div")({name:"Title",class:"tg2z08v",propsAsIs:!1}),$e=t.styled_default("div")({name:"Text",class:"t59zdk1",propsAsIs:!1}),R=t.styled_default("div")({name:"MediaImgBottom",class:"m1ab9fq",propsAsIs:!1}),Ce=()=>R,Le=t.styled_default(Ce())({name:"MediaImgMiddle",class:"m9fsr0y",propsAsIs:!0}),Me=t.styled_default("img")({name:"CtaIcon",class:"cvi9y5q",propsAsIs:!1}),ke=t.styled_default("button")({name:"Button",class:"bgl6boa",propsAsIs:!1}),Oe=t.styled_default("div")({name:"Logo",class:"l5mq0z",propsAsIs:!1}),Be=t.styled_default("div")({name:"Footer",class:"f1mse0ft",propsAsIs:!1}),Re=t.styled_default("div")({name:"Vector",class:"v1hcloah",propsAsIs:!1}),De=t.styled_default("div")({name:"NotificationContainer",class:"n3n65jf",propsAsIs:!1}),qe={[u.NotificationPromotionImagePosition.BOTTOM]:R,[u.NotificationPromotionImagePosition.MIDDLE]:Le},we=({src:e,imagePosition:s})=>{const l=qe[s]||R;return o.jsx(l,{children:o.jsx("img",{src:e,alt:""})})},Ve=({notification:e,open:s})=>{if(!e||!e.promotion||e.enabled!==u.NotificationEnabled.NOTIFICATION_ENABLED)return null;const{title:l,body:n,image:r,promotion:a}=e,{sponsorLogo:c,sponsorLogoMode:p,imagePosition:v,ctaButton:i}=a;return o.jsxs(De,{className:"SL_Lower_Third_Notification",onClick:s,children:[o.jsxs(Se,{children:[o.jsx(we,{src:r,imagePosition:v}),o.jsxs(Te,{children:[l&&o.jsx(Ee,{children:l}),n&&o.jsx($e,{children:n})]})]}),o.jsxs(Be,{children:[p!==u.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsxs(o.Fragment,{children:[o.jsx(Oe,{children:o.jsx("img",{src:c,alt:l})}),o.jsx(Re,{})]}),o.jsxs(ke,{name:"promo-button",style:{color:i==null?void 0:i.textColor,backgroundColor:i==null?void 0:i.color},children:[(i==null?void 0:i.ctaIcon)&&(i==null?void 0:i.ctaIconMode)===u.CtaIconMode.CTA_ICON_TRANSPARENT&&o.jsx(Me,{src:i==null?void 0:i.ctaIcon,alt:"cta-icon"}),(i==null?void 0:i.label)||"Open"]})]})]})},Fe=t.styled_default("div")({name:"NotificationContent",class:"n1ku6hz",propsAsIs:!1}),Ue=t.styled_default("div")({name:"NotificationContainer",class:"nbxqmol",propsAsIs:!1}),ze=t.styled_default("div")({name:"Body",class:"b1gu3eml",propsAsIs:!1}),Ge=t.styled_default("div")({name:"Title",class:"t1u17zva",propsAsIs:!1}),Ke=t.styled_default("div")({name:"Text",class:"t10ko1g",propsAsIs:!1}),C=t.styled_default("div")({name:"Media",class:"mntc42e",propsAsIs:!1}),We=()=>C,Z=t.styled_default(We())({name:"MediaImgFit",class:"ml060eo",propsAsIs:!0}),He=()=>C,te=t.styled_default(He())({name:"MediaImgCentered",class:"m1vqlvig",propsAsIs:!0}),Ye=()=>te,Je=t.styled_default(Ye())({name:"MediaImgBottom",class:"m1e7tvi5",propsAsIs:!0}),Ze=()=>C,Qe=t.styled_default(Ze())({name:"MediaImgSolid",class:"mqvntt2",propsAsIs:!0}),Xe=()=>C,eo=t.styled_default(Xe())({name:"MediaImgMiddle",class:"m12jtj3u",propsAsIs:!0}),oo=t.styled_default("img")({name:"CtaIcon",class:"ckq1frv",propsAsIs:!1}),to=t.styled_default("button")({name:"Button",class:"bis90pl",propsAsIs:!1}),so=()=>t.f1,no=t.styled_default(so())({name:"StyledChevronRight",class:"s9mjmz3",propsAsIs:!0}),lo=t.styled_default("div")({name:"Logo",class:"l1cf50a7",propsAsIs:!1}),io={[u.NotificationPromotionImagePosition.UNSET]:Z,[u.NotificationPromotionImagePosition.FIT]:Z,[u.NotificationPromotionImagePosition.CENTERED]:te,[u.NotificationPromotionImagePosition.BOTTOM]:Je,[u.NotificationPromotionImagePosition.SOLID]:Qe,[u.NotificationPromotionImagePosition.MIDDLE]:eo},ao=({src:e,imagePosition:s})=>{const l=io[s];return o.jsx(l,{children:o.jsx("img",{src:e,alt:""})})},ro=({notification:e,open:s,promotionId:l,hiding:n,direction:r="left"})=>{if(!e||!e.promotion||e.enabled!==u.NotificationEnabled.NOTIFICATION_ENABLED)return null;if(e.promotion.mode===u.NotificationPromotionMode.LOWER_THIRD)return o.jsx(Ve,{notification:e,open:s});const{title:a,body:c,image:p,promotion:v}=e,{sponsorLogo:i,sponsorLogoMode:f,imagePosition:y,ctaButton:m}=v;return o.jsx(B,{className:"SL_Rich_Notification",direction:r,hiding:n,children:o.jsxs(Ue,{onClick:s,children:[f!==u.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsx(lo,{children:o.jsx("img",{src:i,alt:a})}),o.jsxs(Fe,{children:[o.jsx(ao,{src:p,imagePosition:y}),o.jsxs(ze,{children:[a&&o.jsx(Ge,{children:a}),c&&o.jsx(Ke,{children:c})]}),o.jsxs(to,{name:"promo-button",style:{color:m==null?void 0:m.textColor,backgroundColor:m==null?void 0:m.color},children:[(m==null?void 0:m.ctaIcon)&&(m==null?void 0:m.ctaIconMode)===u.CtaIconMode.CTA_ICON_TRANSPARENT&&o.jsx(oo,{src:m==null?void 0:m.ctaIcon,alt:"cta-icon"}),(m==null?void 0:m.label)||"Open"]}),o.jsx(no,{name:"chevronRight"})]})]})})},co=t.styled_default("div")({name:"OverlayContainer",class:"okzhq2w",propsAsIs:!1}),se=t.styled_default("div")({name:"PromoOverlay",class:"pmgz5i",propsAsIs:!1}),ne=t.styled_default("div")({name:"Header",class:"hyxi3jt",propsAsIs:!1}),le=t.styled_default("div")({name:"HeaderContent",class:"h149e3gp",propsAsIs:!1}),ie="h10toh7",Q=t.styled_default("img")({name:"SponsorLogo",class:"s1jyea6t",propsAsIs:!1}),mo=t.styled_default("div")({name:"SponsorName",class:"szpfa3h",propsAsIs:!1}),ae=t.styled_default("div")({name:"Media",class:"m1crmu01",propsAsIs:!1}),uo=t.styled_default("img")({name:"PromoImg",class:"p1l37r8s",propsAsIs:!1}),po="s1nmch9k",X=t.styled_default("div")({name:"Content",class:"c1er0ljd",propsAsIs:!1}),yo=t.styled_default("div")({name:"Description",class:"dydopmr",propsAsIs:!1}),vo=t.styled_default("div")({name:"Sponsor",class:"s1w6nt04",propsAsIs:!1}),fo=t.styled_default("div")({name:"SponsorText",class:"s1evcmtq",propsAsIs:!1}),re=t.styled_default("div")({name:"ADLogo",class:"awodx0x",propsAsIs:!1}),Ao=t.styled_default("span")({name:"SponsoredText",class:"s1q3n6oi",propsAsIs:!1}),go=t.styled_default("div")({name:"ActionBtnWrap",class:"a8d4xfk",propsAsIs:!1}),Io=t.styled_default("a")({name:"ActionButton",class:"at6oobh",propsAsIs:!1}),ho=t.styled_default("div")({name:"Title",class:"t1gyg7tt",propsAsIs:!1}),xo="h17rwbtk",jo=t.styled_default("div")({name:"Container",class:"c10m2bce",propsAsIs:!1}),ee=t.styled_default("div")({name:"Item",class:"ig23yq5",propsAsIs:!1}),_o=t.styled_default("div")({name:"Dot",class:"d1f6aqua",propsAsIs:!1}),bo=({time:e,adCount:s,adPosition:l})=>{const n=Math.floor(e/60),r=e-n*60;return n===0&&r===0&&s===l?null:o.jsxs(jo,{children:[s>1&&o.jsxs(o.Fragment,{children:[o.jsxs(ee,{children:[l," of ",s]}),o.jsx(_o,{})]}),o.jsxs(ee,{children:[n,":",r<10?`0${r}`:r]})]})},No=(e,s,{onPlay:l,onStop:n,onProgress:r})=>{const a=google.ima;let c=new a.AdDisplayContainer(e),p=new a.AdsLoader(c),v=new a.AdsRequest,i;p.addEventListener(a.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,y=>{i=y.getAdsManager(e),l&&i.addEventListener(a.AdEvent.Type.STARTED,l),n&&i.addEventListener(a.AdEvent.Type.COMPLETE,n),r&&i.addEventListener(a.AdEvent.Type.AD_PROGRESS,m=>r(m.getAdData())),i.init(e.clientWidth,e.clientHeight,a.ViewMode.NORMAL),i.start()},!1),p.addEventListener(a.AdErrorEvent.Type.AD_ERROR,()=>{console.log("ad error"),n==null||n()},!1),v.linearAdSlotWidth=e.clientWidth,v.linearAdSlotHeight=e.clientHeight,v.adTagUrl=s,p.requestAds(v);const f=()=>{i==null||i.destroy(),p==null||p.destroy(),c==null||c.destroy(),c=void 0,p=void 0,v=void 0,i=void 0};return()=>{try{c.initialize()}catch(y){n==null||n(),console.log("AdsManager could not be started",y)}return f}},Po=t.styled_default("div")({name:"Container",class:"c4q6dw1",propsAsIs:!1}),So=t.styled_default("div")({name:"ControlsContainer",class:"c1la67r",propsAsIs:!1}),To="m3guev",Eo="m7099mt",$o="mmm6o5s",Co=({promotion:e,controlVideo:s,promotionId:l,onClose:n,externalAd:r,skipAutoClose:a})=>{var c;const p=g.useRef(null),[v,i]=g.useState(!1),[f,y]=g.useState(0),[m,I]=g.useState(0),[_,A]=g.useState(0),h=g.useRef(),x=g.useCallback(()=>{y(0),I(0),A(0),i(!1),s==null||s({muted:!1})},[s]);g.useEffect(()=>{if(r!=null&&r.url&&p.current){x();const j=No(p.current,r.url,{onPlay:()=>{t.eventBus.emit("advertisement",{action:"videoPlay",payload:{id:l,type:e.type}}),s==null||s({muted:!0}),i(!0)},onStop:()=>{n==null||n(),x()},onProgress:b=>{y(Math.round(b.duration-b.currentTime)),I(b.totalAds),A(b.adPosition)}})();return h.current=j,()=>{h.current=void 0,j()}}},[r==null?void 0:r.url,s,x,l,e.type,n]);const S=((c=e.sponsor)==null?void 0:c.logo)&&e.logoMode===u.PromotionLogoMode.CENTER;return o.jsxs(se,{className:"PromoOverlay",children:[o.jsxs(ne,{children:[o.jsx(le,{className:t.cx_default(!S&&ie),children:o.jsx(re,{style:{transform:"scale(1.5)"},children:"Ad"})}),o.jsxs(So,{children:[o.jsx(bo,{time:f,adCount:m,adPosition:_}),a&&o.jsx(t.b,{className:"ClosePromoIcon",close:()=>{var j;(j=h.current)==null||j.call(h),n==null||n(),x()}})]})]}),o.jsx(ae,{className:t.cx_default(To,v&&Eo,!v&&$o),children:o.jsx(Po,{ref:p})})]})},oe=e=>{var s,l,n,r,a,c,p,v,i,f,y,m,I,_,A,h,x,S,j,b,D,q,w,V,F,U,z,G,K,W;const{promotion:d,open:H,advertisementPaused:ce,togglePause:N,controlVideo:T,skipAutoClose:me,promotionId:E,onClose:ue,markAsViewed:L,externalAd:Y}=e,M=d.type===u.PromotionType.INGAME_IAB11_LBAR||d.type===u.PromotionType.INGAME_IAB11,k=((s=d.sponsor)==null?void 0:s.logo)&&d.logoMode===u.PromotionLogoMode.CENTER,J=!!((n=(l=d.banner)==null?void 0:l.video)!=null&&n.url),$=d.autoPlayVideo===u.AutoPlayVideo.ENABLED;if(g.useEffect(()=>{N==null||N(J||$),H==null||H()},[]),g.useEffect(()=>{E&&d.type&&L&&L()},[E,d.type,L]),g.useEffect(()=>()=>{T==null||T({muted:!1})},[T]),Y)return o.jsx(Co,{...e,externalAd:Y});let P=(r=d.banner)==null?void 0:r.url;P&&P.indexOf("http")!==0&&(P=`https://${P}`);let O=!0;return J&&(!ce||!$?O=!0:O=!1),o.jsxs(se,{className:"PromoOverlay",children:[o.jsxs(ne,{children:[o.jsxs(le,{className:t.cx_default(!k&&ie),children:[((a=d.sponsor)==null?void 0:a.logo)&&d.logoMode===u.PromotionLogoMode.LEFT&&o.jsx(Q,{className:"PromoSponsorLogo",src:(c=d.sponsor)==null?void 0:c.logo,alt:"promo"}),o.jsxs(vo,{style:{paddingLeft:(p=d.sponsor)!=null&&p.logo&&d.logoMode===u.PromotionLogoMode.LEFT?"0px":"8px"},children:[((v=d.sponsor)==null?void 0:v.logo)&&d.logoMode===u.PromotionLogoMode.LEFT&&o.jsx(mo,{children:(i=d.sponsor)==null?void 0:i.name}),o.jsxs(fo,{className:"SponsorText",children:[o.jsx(re,{children:"AD"}),o.jsx(Ao,{children:"SPONSORED"})]})]})]}),o.jsx(t.b,{className:"ClosePromoIcon",close:ue,autoClose:(f=d.closeTimer)==null?void 0:f.auto,duration:me?0:(y=d.closeTimer)==null?void 0:y.seconds,isPlaying:O})]}),o.jsxs(ae,{children:[k&&o.jsx(Q,{className:po,src:(m=d.sponsor)==null?void 0:m.logo,alt:"promo"}),o.jsx(X,{children:(_=(I=d.banner)==null?void 0:I.video)!=null&&_.url?o.jsx(t.Y,{source:(h=(A=d.banner)==null?void 0:A.video)==null?void 0:h.url,poster:(S=(x=d.banner)==null?void 0:x.video)==null?void 0:S.thumbnailUrl,aspectRatio:M?"1/1":"16/9",onPause:()=>{$&&(N==null||N(!0))},onPlay:()=>{t.eventBus.emit("advertisement",{action:"videoPlay",payload:{id:E,type:d.type}}),N==null||N(!1)},controlVideo:T,autoPlay:$}):(j=d.banner)!=null&&j.imageUrl?o.jsx(uo,{style:M?{aspectRatio:"1/1"}:{},src:(b=d.banner)==null?void 0:b.imageUrl,alt:"promo"}):null}),!M&&o.jsxs(X,{children:[((D=d.banner)==null?void 0:D.title)&&o.jsx(ho,{className:t.cx_default("AdvTitle",k&&xo),children:(q=d.banner)==null?void 0:q.title}),((w=d.banner)==null?void 0:w.body)&&o.jsx(yo,{className:"AdvDescription",children:(V=d.banner)==null?void 0:V.body})]})]}),d.buttonType!==u.PromotionButtonType.NO_BUTTON&&o.jsx(go,{children:o.jsx(Io,{href:P,style:{backgroundColor:((U=(F=d.banner)==null?void 0:F.ctaButton)==null?void 0:U.color)||"#009dc4",color:((G=(z=d.banner)==null?void 0:z.ctaButton)==null?void 0:G.textColor)||"#fff"},"data-analytics":"button","data-promo-id":E,"data-promo-type":d.type,target:"_blank",children:(W=(K=d.banner)==null?void 0:K.ctaButton)==null?void 0:W.label})})]})},Lo=t.styled_default("div")({name:"SidebarContainer",class:"s1abskp8",propsAsIs:!1}),Mo=({children:e,direction:s,style:l,className:n,hiding:r})=>o.jsx(B,{direction:s,style:l,hiding:r,className:n,children:o.jsx(Lo,{children:e})}),ko=e=>(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB11_LBAR||(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB21_LBAR,Oo=e=>(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB11||(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB21,Bo=({advertisement:e,close:s,skipTypeCheck:l,skipAutoClose:n,layoutMode:r="side-by-side",sidebar:a,isNotification:c,banner:p,markAsViewed:v,open:i,externalAd:f,controlVideo:y,advertisementPaused:m,togglePause:I})=>e.promotion?c&&e.notification?o.jsx(ro,{open:()=>i==null?void 0:i({fromNotification:!0}),notification:e.notification,promotionId:e.question.id}):!a&&!p&&(l||Oo(e.promotion))?o.jsx(co,{className:"PromoOverlayContainer",children:o.jsx(oe,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,onClose:s,open:i,skipAutoClose:n,externalAd:f,controlVideo:y,advertisementPaused:m,togglePause:I})}):a&&(l||ko(e.promotion))?o.jsx(Mo,{className:"PromoSidebarContainer",direction:a,hiding:!1,children:o.jsx(oe,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,externalAd:f,onClose:s,open:i,controlVideo:y,skipAutoClose:n,advertisementPaused:m,togglePause:I})}):p?o.jsx(Pe,{promotionId:e.question.id,hiding:!1,promotion:e.promotion,direction:p}):null:null,Ro=t.styled_default("div")({name:"AdvertisementUIWrap",class:"aa6pjif",propsAsIs:!1}),Do=e=>{const s=e.target;if(s instanceof HTMLAnchorElement&&s.target==="_blank"){const l=s.getAttribute("data-promo-id")||"",n=s.getAttribute("data-promo-type")||u.PromotionType.UNSET;s.getAttribute("data-analytics")==="button"&&t.eventBus.emit("advertisement",{action:"buttonSelect",payload:{id:l,type:n}}),s.getAttribute("data-analytics")==="banner"&&t.eventBus.emit("advertisement",{action:"bannerSelect",payload:{id:l,type:n}})}},qo=({gamification:e,layoutMode:s,skipAutoClose:l,skipTypeCheck:n,sidebar:r,banner:a,notification:c,isMobileScreen:p,persistent:v,externalAd:i,controlVideo:f})=>{var y,m,I;const _=g.useRef(null),A=t.useStore(e.advertisement.$store);t.L(_,{enabled:!!A.data,event:"click",listener:Do});const h=!a&&!r;if(A.data===void 0||!v&&A.isViewed)return null;const x=((I=(m=(y=A==null?void 0:A.data)==null?void 0:y.notification)==null?void 0:m.promotion)==null?void 0:I.mode)===u.NotificationPromotionMode.LOWER_THIRD;return o.jsx(Ro,{ref:_,style:{height:h?"auto":"100%"},className:t.cx_default("SL-AdvertisementUIWrap",p&&"mobile-view",x&&"SL-AdvertisementUIWrap--lower-third"),children:o.jsx(Bo,{skipTypeCheck:n,sidebar:r,banner:a,advertisement:A.data,advertisementPaused:A.isPaused,togglePause:A.togglePause,close:A.close,externalAd:i?A.externalAd:void 0,markAsViewed:e.advertisement.markAsViewed,open:e.advertisement.open,layoutMode:s,isNotification:c,skipAutoClose:l,controlVideo:f})})},de=({sdk:e,sidebar:s,externalAd:l,banner:n,skipAutoClose:r,skipTypeCheck:a,layoutMode:c,isMobileScreen:p,persistent:v,notification:i})=>{const f=t.useStore(e.featuresList.getStore());if(g.useEffect(()=>{if(l){const m=document.createElement("script");m.async=!0,m.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",document.body.appendChild(m)}},[l]),s&&n)return o.jsx("div",{style:{color:"red"},children:"define either sidebar or banner, not both."});if(n&&l)return o.jsx("div",{style:{color:"red"},children:"externalAd is not supported with banner"});if(!f)return null;const y=e.getFeature(u.SdkOverlayType.GAMES);return y?o.jsx(qo,{gamification:y,sidebar:s,banner:n,layoutMode:c,isMobileScreen:p,persistent:v,notification:i,skipTypeCheck:a,skipAutoClose:r,externalAd:l,controlVideo:e.controlVideoPlayer}):null},wo=({event:e,sidebar:s,banner:l,isMobileScreen:n,skipAutoClose:r,persistent:a,theme:c,notification:p,skipTypeCheck:v,externalAd:i})=>{const f=t.useStreamLayer(),y=t.useStreamLayerUI(),m=t.useStreamLayerTheme();return f?i&&!y.promotionExternalAd?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):!i&&y.promotionExternalAd?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):s&&!y.promotionSidebar?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):l&&!y.promotionBanner?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):p&&!y.promotionNotification?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):!l&&!s&&!p&&!y.promotionOverlay?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):o.jsxs("div",{className:"StreamLayerSDK",children:[o.jsx(t.h,{customTheme:c??m.theme,themeMode:m.themeMode,children:o.jsx(de,{sdk:f,sidebar:s,banner:l,isMobileScreen:n,persistent:a,notification:p,skipTypeCheck:v,skipAutoClose:r,layoutMode:"side-by-side",externalAd:i})}),e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e})]}):null};exports.StreamLayerSDKAdvertisement=wo;exports.StreamLayerSDKAdvertisementUI=de;
package/lib/cjs/auth.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),u=require("./index2.js"),o=({token:r,schema:t})=>{const e=u.useStreamLayer();return i.useEffect(()=>{r&&t&&e&&e.authorizationBypass(t,r),e&&(e.withAuth=!0)},[r,t,e]),null};exports.StreamLayerLogin=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),o=require("./provider.js"),u=({token:r,schema:t})=>{const e=o.useStreamLayer();return i.useEffect(()=>{r&&t&&e&&e.authorizationBypass(t,r),e&&(e.withAuth=!0)},[r,t,e]),null};exports.StreamLayerLogin=u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index2.js");exports.default=e.P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./provider.js");exports.default=e.P;
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index2.js");require("./useStreamLayerApp2.js");require("react/jsx-runtime");require("react");exports.StreamLayerProvider=e.StreamLayerProvider;exports.StreamLayerSDKEvent=e.StreamLayerSDKEvent;exports.StreamLayerSDKReact=e.StreamLayerSDKReact;exports.StreamLayerThemeProvider=e.d;exports.useStreamLayer=e.useStreamLayer;exports.useStreamLayerUI=e.useStreamLayerUI;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./provider.js");require("./useStreamLayerApp2.js");require("react/jsx-runtime");require("react");const r=require("./notification.js");exports.StreamLayerProvider=e.StreamLayerProvider;exports.StreamLayerSDKEvent=e.StreamLayerSDKEvent;exports.StreamLayerSDKReact=e.StreamLayerSDKReact;exports.StreamLayerThemeProvider=e.h;exports.useStreamLayer=e.useStreamLayer;exports.useStreamLayerTheme=e.useStreamLayerTheme;exports.useStreamLayerUI=e.useStreamLayerUI;exports.StreamLayerSDKNotification=r.StreamLayerSDKNotification;exports.StreamLayerSDKNotificationUI=r.StreamLayerSDKNotificationUI;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),l=require("react"),r=require("./index2.js"),h=require("./useStreamLayerApp2.js"),p=()=>r.z,S=r.styled_default(p())({name:"QuestionWrap",class:"q10hhsxv",propsAsIs:!0}),f=({gamification:e,persistent:n,skipAutoClose:o,hideHeader:a,insightId:s})=>{const t=l.useRef(""),c=r.useStore(e.openedQuestion.$store);return l.useEffect(()=>s?(!n||e.isOpenedQuestion(s)||(t.current=s,e.getFeedItem(s).then(i=>{var d;t.current===s&&((d=i==null?void 0:i.attributes)==null?void 0:d.attributes.case)==="insight"&&e.openQuestion(s,i)})),()=>{t.current=""}):(e.activeQuestionId.subscribe(({data:i})=>{var d;i&&((d=i.feedItem)==null?void 0:d.type)==="insight"&&(!n||e.isOpenedQuestion(i.feedItem.id)||(t.current=i.feedItem.id,e.openQuestion(i.feedItem.id,i.feedItem))),!i&&t.current&&(e.closeQuestion(t.current),t.current="")}),()=>{}),[e,n,s]),c?u.jsx(S,{skipAutoClose:o,hideHeader:a,gamification:e,hideSponsor:!0}):null},m=({sdk:e,persistent:n,skipAutoClose:o,insightId:a,hideHeader:s})=>{if(!r.useStore(e.featuresList.getStore()))return null;const t=e.getFeature(h.SdkOverlayType.GAMES);return t?u.jsx(f,{insightId:a,persistent:n,hideHeader:s,gamification:t,skipAutoClose:o}):null},g=({event:e,theme:n,hideHeader:o,skipAutoClose:a,persistent:s})=>{const t=r.useStreamLayer(),c=r.useStreamLayerTheme();return t?u.jsxs("div",{className:"StreamLayerSDK",children:[u.jsx(r.d,{customTheme:n??c,children:u.jsx(m,{skipAutoClose:a,sdk:t,hideHeader:o,persistent:s})}),e!==void 0&&u.jsx(r.StreamLayerSDKEvent,{event:e})]}):null};exports.StreamLayerSDKInsight=g;exports.StreamLayerSDKInsightUI=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),l=require("react"),i=require("./provider.js"),h=require("./useStreamLayerApp2.js"),p=()=>i.z,S=i.styled_default(p())({name:"QuestionWrap",class:"q10hhsxv",propsAsIs:!0}),f=({gamification:e,persistent:n,skipAutoClose:o,hideHeader:a,insightId:s})=>{const t=l.useRef(""),c=i.useStore(e.openedQuestion.$store);return l.useEffect(()=>s?(!n||e.isOpenedQuestion(s)||(t.current=s,e.getFeedItem(s).then(r=>{var d;t.current===s&&((d=r==null?void 0:r.attributes)==null?void 0:d.attributes.case)==="insight"&&e.openQuestion(s,r)})),()=>{t.current=""}):(e.activeQuestionId.subscribe(({data:r})=>{var d;r&&((d=r.feedItem)==null?void 0:d.type)==="insight"&&(!n||e.isOpenedQuestion(r.feedItem.id)||(t.current=r.feedItem.id,e.openQuestion(r.feedItem.id,r.feedItem))),!r&&t.current&&(e.closeQuestion(t.current),t.current="")}),()=>{}),[e,n,s]),c?u.jsx(S,{skipAutoClose:o,hideHeader:a,gamification:e,hideSponsor:!0}):null},m=({sdk:e,persistent:n,skipAutoClose:o,insightId:a,hideHeader:s})=>{if(!i.useStore(e.featuresList.getStore()))return null;const t=e.getFeature(h.SdkOverlayType.GAMES);return t?u.jsx(f,{insightId:a,persistent:n,hideHeader:s,gamification:t,skipAutoClose:o}):null},g=({event:e,theme:n,hideHeader:o,skipAutoClose:a,persistent:s})=>{const t=i.useStreamLayer(),c=i.useStreamLayerTheme();return t?u.jsxs("div",{className:"StreamLayerSDK",children:[u.jsx(i.h,{customTheme:n??c.theme,themeMode:c.themeMode,children:u.jsx(m,{skipAutoClose:a,sdk:t,hideHeader:o,persistent:s})}),e!==void 0&&u.jsx(i.StreamLayerSDKEvent,{event:e})]}):null};exports.StreamLayerSDKInsight=g;exports.StreamLayerSDKInsightUI=m;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");const e=require("./masters2.js");require("react");require("./index2.js");exports.MastersStreamLayerProvider=e.MastersStreamLayerProvider;exports.MastersStreamLayerSDKReact=e.MastersStreamLayerSDKReact;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");const e=require("./masters2.js");require("react");require("./provider.js");exports.MastersStreamLayerProvider=e.MastersStreamLayerProvider;exports.MastersStreamLayerSDKReact=e.MastersStreamLayerSDKReact;
@@ -1,9 +1,9 @@
1
- "use strict";const n=require("react/jsx-runtime"),s=require("./index2.js"),d=require("react"),k=require("./useStreamLayerApp2.js"),z=s.styled_default("div")({name:"SDKContainer",class:"s8zgqze",propsAsIs:!1}),G=s.styled_default("div")({name:"SDKScrollContainer",class:"s6t897k",propsAsIs:!1}),M=s.styled_default("div")({name:"SDKContentContainer",class:"sw7pkvp",propsAsIs:!1}),B=()=>M,A=s.styled_default(B())({name:"SDKWhiteContainer",class:"s14gkn7u",propsAsIs:!0}),q=s.styled_default("div")({name:"TabsContainer",class:"t1yxstm9",propsAsIs:!1}),W=()=>A,Z=s.styled_default(W())({name:"LeaderboardContainer",class:"ldpty1s",propsAsIs:!0}),Q=()=>A,Y=s.styled_default(Q())({name:"TabsNavContainer",class:"t136a59y",propsAsIs:!0}),K=s.styled_default("div")({name:"UserSummaryContainer",class:"u11vnm9m",propsAsIs:!1}),w=(e,t,o)=>{const r=t>=s.N.lg&&t<s.N.xl?75:52;e.current&&window.scrollTo({top:e.current.offsetTop-r,...o})},X=15,J=(e,t)=>{const o=d.useRef(null),r=d.useRef(0),[i]=d.useState(s.h({scrollPosition:0,tabsShown:!0,scrollDirection:"forward"})),l=s.useStore(t);return d.useEffect(()=>{const a=window.innerWidth<s.N.xl?window:o.current;if(!a)return()=>{};const C=s.c(p=>{var u;const c=p.target;if(!c)return;let v=0;l.screen.size<s.N.xl?v=((u=e.current)==null?void 0:u.getBoundingClientRect().y)||0:v=c.scrollTop;const h=r.current-v;if(X>Math.abs(h))return;const S=r.current<v?"forward":"backward";r.current=v,i.set({scrollPosition:Math.round(v),scrollDirection:S,tabsShown:i.get().tabsShown})},200);return a.addEventListener("scroll",C),()=>{a.removeEventListener("scroll",C)}},[i,e,l.screen]),[o,i]},I=s.styled_default("div")({name:"LoadingContainer",class:"l7wseip",propsAsIs:!1}),e2=({feature:e,sdk:t,children:o,className:r,noWait:i})=>{const l=s.useStore(e.status),a=s.useStore(t.sdkStore.slStreamId);if(!i){if(a!=null&&a.loading&&!a.data)return n.jsx(I,{className:r,children:"Event is loading..."});if(!(a!=null&&a.data))return n.jsx(I,{className:r,children:"Event is forbidden..."});if(l!==s.FeatureStatus.Ready)return n.jsx(I,{className:r,children:"Wait feature..."})}return o},O=d.createContext({sdk:null}),T=()=>d.useContext(O),s2=s.styled_default("div")({name:"QuestionContainer",class:"qwgkhsv",propsAsIs:!1}),t2=({openedQuestion:e})=>{var t,o;const{sdk:r}=T();return((t=e==null?void 0:e.attributes)==null?void 0:t.attributes.case)==="insight"?n.jsx(s.p,{...e.attributes.attributes.value,controlVideo:r==null?void 0:r.controlVideoPlayer}):((o=e==null?void 0:e.attributes)==null?void 0:o.attributes.case)==="tweet"?n.jsx(s.a,{...e.attributes.attributes.value,controlVideo:r==null?void 0:r.controlVideoPlayer}):null},n2=({extendedQuestion:e,vote:t,close:o})=>{const{loading:r,data:i}=e;return i?n.jsx(s.Nt,{vote:t,close:o,openedQuestion:i,isLoading:!!r}):n.jsx(s.kt,{})},o2=({gamification:e})=>{var t;const o=s.useStore(e.openedQuestion.$store),r=s.useStore(e.openedQuestion.$extendedStore);if(!o)return null;const i=o.type;return n.jsxs(s2,{children:[n.jsx(s.b$1,{close:e.closeQuestion,type:((t=o.attributes)==null?void 0:t.type)||k.QuestionType.UNSET}),i==="question"&&n.jsx(n2,{vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:r}),i!=="question"&&n.jsx(t2,{openedQuestion:o}),n.jsx(s.i,{mastersLogo:!0})]})},r2=s.styled_default("div")({name:"InviteFriendsContainer",class:"i1b9agwt",propsAsIs:!1}),i2=({deepLink:e})=>n.jsx(r2,{children:n.jsx(s.M,{inviteLink:e,inviteCardTitle:"It’s More Fun With Friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})}),l2=s.styled_default("div")({name:"InviteLinkContainer",class:"ij36hcn",propsAsIs:!1}),a2=({gamification:e,scrollNode:t,scrollStore:o})=>{const r=d.useRef(null),{data:i,hasMore:l,loading:a,key:C}=s.useStore(e.leaderboardList.$store),{data:p}=s.useStore(e.deepLink.$store),[u,c]=s.T(r);return!i.length&&!a?n.jsx(i2,{deepLink:p}):n.jsxs(n.Fragment,{children:[n.jsx(s.S,{items:i,scrollNode:t,scrollStore:o,fetchMore:e.leaderboardList.fetchMore,hasMore:l,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()},C),p&&n.jsx(l2,{ref:r,children:n.jsx(s.C,{onClick:()=>u(p),title:"Invite Friends",description:"Challenge them now!"})}),c]})},d2=({store:e,openQuestion:t})=>{const{sdk:o}=T(),r=s.useStore(e);return n.jsx(s.k,{openQuestion:t,questions:r.data,controlVideo:o==null?void 0:o.controlVideoPlayer})},c2=({userSummary:e})=>{var t;const[o,r]=d.useState(void 0);return d.useEffect(()=>{const i=e.$store.subscribe(l=>{l&&r(l)});return()=>{i()}},[e]),n.jsx(s.O,{loading:!(o!=null&&o.summary),...o==null?void 0:o.summary,successRate:(t=o==null?void 0:o.percentage)==null?void 0:t.correct})},u2=({gamification:e,className:t,scrollStore:o,scrollNode:r,appNode:i,style:l,responsiveStore:a})=>{const{tabsShown:C}=s.useStore(o,{keys:["tabsShown"]}),[p,u]=d.useState(s.m.HOME),[,c]=d.useTransition(),{sdkInDesktopView:v,screen:h}=s.useStore(a,{keys:["sdkInDesktopView"]}),S=g=>{c(()=>{var y;u(g),v===!1&&(((y=i.current)==null?void 0:y.getBoundingClientRect().y)||0)<0&&w(i,h.size,{behavior:"instant"})})};d.useEffect(()=>o.subscribe(g=>{if(g.scrollPosition===0){o.setKey("tabsShown",!0);return}a.get().sdkInDesktopView?o.setKey("tabsShown",g.scrollDirection==="backward"):o.setKey("tabsShown",g.scrollDirection==="forward")}),[o,a]);let f="0px";return v?f=C?"0px":"calc(8px - var(--header-height) - var(--header-offset))":f=C?"calc(var(--header-height) + var(--header-offset) - 2px)":"0px",n.jsxs(q,{className:t,style:l,children:[n.jsx(Y,{style:{top:f},children:n.jsx(s.b$2,{activePage:p,toggleActivePage:S})}),p===s.m.HOME&&n.jsxs(n.Fragment,{children:[n.jsx(A,{style:{paddingTop:"8px"},children:n.jsx(K,{children:n.jsx(c2,{userSummary:e.userSummary})})}),n.jsx(M,{style:{flex:1},children:n.jsx(d2,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),p===s.m.LEADERBOARD&&n.jsx(Z,{children:n.jsx(a2,{scrollStore:o,scrollNode:r,gamification:e})})]})},p2=()=>s.x$1,R=s.styled_default(p2())({name:"OpenedContainer",class:"o1seszvt",propsAsIs:!0}),C2=s.styled_default("div")({name:"UserContainer",class:"u1pbry50",propsAsIs:!1}),v2=({correct:e,incorrect:t})=>{const o=e+t;return o===0?0:Math.round(e/o*100)},f2=({gamification:e,scrollStore:t,className:o,appNode:r,scrollNode:i,responsiveStore:l})=>n.jsx(u2,{appNode:r,scrollStore:t,scrollNode:i,className:o,gamification:e,responsiveStore:l}),h2=({gamification:e,className:t,appNode:o,responsiveStore:r})=>{const i=s.useStore(e.openedQuestion.$store),l=s.useStore(e.openedUser),{sdkInDesktopView:a}=s.useStore(r,{keys:["sdkInDesktopView"]}),{hiding:C,onAnimationEnd:p}=s.S$1();if(!o.current||!i&&!l)return null;const u=i?n.jsx(R,{className:t,hiding:C,onAnimationEnd:p,children:n.jsx(o2,{gamification:e})}):l?n.jsx(R,{className:t,hiding:C,onAnimationEnd:p,children:n.jsxs(C2,{children:[n.jsx(s.b$1,{label:"Friend's Rank",close:e.closeUser}),n.jsx(A,{children:n.jsx(s.O,{...l,successRate:v2(l)})})]})}):null;return n.jsx(s.x,{container:o,useContainer:!a,children:u})},m2=d.lazy(()=>Promise.resolve().then(()=>require("./gamification-feature2.js"))),g2=({sdk:e,feature:t,className:o,scrollStore:r,appNode:i,scrollNode:l,responsiveStore:a})=>{const C=d.useMemo(()=>t&&t.featureConfig.get().type===k.SdkOverlayType.GAMES?n.jsx(e2,{className:o,sdk:e,feature:t,children:n.jsx(m2,{appNode:i,scrollStore:r,scrollNode:l,className:o,responsiveStore:a,gamification:t})}):null,[e,t,o,a,r,l,i]);return n.jsx(d.Suspense,{fallback:n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:C})},S2=({feature:e,className:t,appNode:o,responsiveStore:r})=>e&&e.featureConfig.get().type===k.SdkOverlayType.GAMES?n.jsx(h2,{className:t,appNode:o,responsiveStore:r,gamification:e}):null,y2=()=>s.h1,x2=s.styled_default(y2())({name:"ButtonIcon",class:"b1whzxvd",propsAsIs:!0}),x="channels",L2=e=>{var t;return n.jsx(s.I,{...e,id:"channels",label:"Channels",icon:n.jsx(x2,{name:"icon-btn-channels","data-selected":(t=e.active)==null?void 0:t.toString()})})},k2=()=>s.h1,b2=s.styled_default(k2())({name:"ButtonIcon",class:"b11des7c",propsAsIs:!0}),b="featuredGroups",N2=e=>{var t;return n.jsx(s.I,{...e,label:e.labelFull?"Featured Groups +":"FG+",id:"featuredGroups",icon:n.jsx(b2,{name:"icon-btn-feature-groups","data-selected":(t=e.active)==null?void 0:t.toString()})})},A2="leaderboard",I2=s.styled_default("div")({name:"Navigation",class:"n19lpak2",propsAsIs:!1}),j2=()=>s.i$1,E2=s.styled_default(j2())({name:"NavigationItems",class:"n1w473c2",propsAsIs:!0}),w2=d.forwardRef(({activeOverlay:e,setActiveOverlay:t,scrollToTop:o,sdkReady:r,className:i,responsiveStore:l},a)=>{const{screen:C}=s.useStore(l,{keys:["screen"]});return n.jsxs(I2,{className:i,children:[n.jsxs(E2,{children:[n.jsx(L2,{active:e===x,onClick:()=>{t(x),e!==x&&o()}}),n.jsx(N2,{active:e===b,disabled:!r,onClick:()=>{t(b),e!==b&&o()},labelFull:C.size>=s.N.md&&C.size<s.N.xl})]}),n.jsx("div",{ref:a})]})}),T2=s.styled_default("div")({name:"Container",class:"czz4rjk",propsAsIs:!1}),$2=s.styled_default("div")({name:"CloseIconWrap",class:"cxmojsy",propsAsIs:!1}),R2=()=>s.h1,_2=s.styled_default(R2())({name:"CloseIcon",class:"c1urm3yx",propsAsIs:!0}),V2=s.styled_default("div")({name:"Title",class:"tme976v",propsAsIs:!1}),F2=s.styled_default("img")({name:"SponsorLogo",class:"s1lal9yz",propsAsIs:!1}),D2=s.styled_default("div")({name:"PresentsTitle",class:"pnn1sv1",propsAsIs:!1}),H2=s.styled_default("div")({name:"Subtitle",class:"s1hjj1y8",propsAsIs:!1}),M2=s.styled_default("div")({name:"Description",class:"dz7yjzw",propsAsIs:!1}),O2=s.styled_default("button")({name:"ActionButton",class:"avpowqk",propsAsIs:!1}),_=({close:e,action:t,onboarding:o})=>{var r,i,l,a,C,p,u,c;return n.jsxs(T2,{children:[n.jsx($2,{onClick:e,children:n.jsx(_2,{name:"icon-cross"})}),((i=(r=o==null?void 0:o.titleCard)==null?void 0:r.media)==null?void 0:i.sponsorLogo)&&n.jsxs(V2,{children:[n.jsx(F2,{alt:"sponsor-logo",src:(a=(l=o==null?void 0:o.titleCard)==null?void 0:l.media)==null?void 0:a.sponsorLogo}),n.jsx(D2,{children:"PRESENTS"})]}),((C=o==null?void 0:o.titleCard)==null?void 0:C.title)&&n.jsx(H2,{children:(p=o==null?void 0:o.titleCard)==null?void 0:p.title}),((u=o==null?void 0:o.titleCard)==null?void 0:u.subtitle)&&n.jsx(M2,{children:(c=o==null?void 0:o.titleCard)==null?void 0:c.subtitle}),n.jsx(O2,{onClick:t,children:"Play Now"})]})},U2="data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200%2092%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.1701%200.953996C13.9047%200.873145%2013.6393%201.0177%2013.3739%201.1647C13.2797%201.21615%2013.2127%201.3068%2013.1904%201.4097L12.7736%203.33298C12.7588%203.40404%2012.8233%203.46774%2012.8952%203.45304C13.3342%203.35504%2013.7509%202.97528%2014.19%203.10758C14.6811%203.25703%2015.1722%202.64207%2015.6634%202.64942V0.429688C15.1698%200.432138%2014.6613%201.10345%2014.1701%200.953996Z'%20fill='%23006747'/%3e%3cpath%20d='M20.4404%206.84786C20.3362%206.77681%2020.2717%206.66166%2020.2717%206.53671V6.18635C20.2717%205.87275%2020.0138%205.61549%2019.6938%205.61549H19.4631C19.1878%205.61549%2018.9348%205.75269%2018.7859%205.98055L18.0418%207.11492C17.9674%207.22762%2017.8434%207.29377%2017.7094%207.29377H17.2084C16.9603%207.29377%2016.7321%207.42852%2016.6131%207.64412C16.4915%207.86708%2016.2757%208.02143%2016.0302%208.07288V0.181303C16.0302%200.0808513%2015.9483%200%2015.8466%200C15.7449%200%2015.663%200.0808513%2015.663%200.181303V0.426307V2.64604V8.07778C15.4175%208.02633%2015.2017%207.87198%2015.0801%207.64657C14.9636%207.43097%2014.7354%207.29622%2014.4848%207.29622H14.1475C13.8796%207.29622%2013.639%207.45057%2013.5298%207.69312L13.2496%208.31299C13.2049%208.41099%2013.1057%208.47469%2012.9965%208.47469C12.8874%208.47469%2012.7882%208.41099%2012.7435%208.31299L12.4633%207.69312C12.3541%207.45302%2012.1135%207.29622%2011.8456%207.29622H2.33802C2.26113%207.29622%202.19911%207.35747%202.19911%207.43342C2.19911%207.59512%202.06517%207.72498%201.90394%207.72498H1.49218C1.41529%207.72498%201.35328%207.78623%201.35328%207.86218V8.33504C1.35328%208.77849%201.26646%209.2097%201.09283%209.61886L0.842303%2010.2142C0.60914%2010.7655%200.5%2011.3363%200.5%2011.8974V13.2694C0.5%2013.6394%200.55457%2014.0142%200.66371%2014.3793C0.968807%2015.4034%201.66334%2016.2413%202.61831%2016.7362L4.13883%2017.5276C4.15868%2017.5374%204.181%2017.5423%204.20332%2017.5423L5.32697%2017.5521C5.5899%2017.5545%205.84787%2017.6207%206.07855%2017.7481L6.6813%2018.0813C6.70115%2018.0935%206.72595%2018.0984%206.75076%2018.0984H7.5569C7.83968%2018.0984%208.11997%2018.1744%208.36057%2018.3189C8.36057%2018.3189%208.75497%2018.5566%208.88891%2018.6326C9.10223%2018.7551%209.3602%2018.8727%209.80916%2018.8972C9.91086%2018.9021%2010.0126%2018.8653%2010.0895%2018.7943C10.1639%2018.7232%2010.2085%2018.6228%2010.2085%2018.5223V17.9882C10.2085%2017.6011%2010.4392%2017.2483%2010.7989%2017.0939L12.0317%2016.5598C12.2003%2016.4863%2012.3888%2016.4741%2012.5649%2016.528L13.0263%2016.6627C13.2223%2016.7191%2013.4306%2016.7215%2013.6266%2016.6627L14.718%2016.3418C14.8619%2016.3001%2015.0156%2016.3001%2015.162%2016.3442L15.606%2016.4667C15.8119%2016.5231%2015.9582%2016.7142%2015.9582%2016.9249V17.9931C15.9582%2018.4905%2016.3675%2018.8972%2016.871%2018.8972C17.2481%2018.8972%2017.578%2018.6595%2017.6921%2018.3042C17.8979%2017.6648%2018.0021%2016.9984%2018.0021%2016.3271V15.8714C18.0021%2015.548%2018.1385%2015.2368%2018.3767%2015.0138L18.8306%2014.59C19.1357%2014.3033%2019.3118%2013.8966%2019.3118%2013.4801V10.9468C19.3118%2010.5548%2019.4309%2010.175%2019.6591%209.85161C19.6764%209.82956%2019.6839%209.80016%2019.6839%209.77321V9.1754C19.6839%208.78584%2019.8029%208.40854%2020.0262%208.08758L20.4751%207.44322C20.4925%207.42117%2020.4999%207.39422%2020.4999%207.36482V6.96056C20.5024%206.88461%2020.4553%206.85766%2020.4404%206.84786ZM16.0302%2012.8554C16.3352%2012.9019%2016.5634%2013.0563%2016.5634%2013.2425C16.5634%2013.4287%2016.3377%2013.583%2016.0302%2013.6296V12.8554ZM2.98046%2016.6137L2.74978%2016.4937C2.12222%2016.1678%201.62117%2015.6827%201.27886%2015.0922V14.3523C1.67078%2014.9134%202.20407%2015.3912%202.85644%2015.7317L2.98046%2015.7954V16.6137ZM4.14131%2017.2189L3.52616%2016.9004V16.0821L4.13883%2016.4006H4.14131V17.2189ZM6.70115%2017.775L6.21498%2017.5055C5.94957%2017.3585%205.65191%2017.2801%205.34682%2017.2752V16.4226C5.6023%2016.4275%205.85531%2016.4937%206.07855%2016.6162L6.6813%2016.9494C6.68626%2016.9518%206.6937%2016.9518%206.70115%2016.9543V17.775ZM9.92822%2017.9882V18.4047V18.5223C9.92822%2018.5493%209.91582%2018.5762%209.89598%2018.5958C9.87613%2018.6154%209.85133%2018.6228%209.82404%2018.6228C9.43461%2018.6032%209.21137%2018.5027%209.0303%2018.3973C8.89883%2018.3214%208.50692%2018.0862%208.50444%2018.0862C8.25887%2017.9392%207.98106%2017.8583%207.69581%2017.8363V16.9788C7.92897%2017.0008%208.15718%2017.0694%208.36057%2017.1895L8.7004%2017.3904C9.07246%2017.6109%209.49662%2017.7358%209.92822%2017.7603V17.9882ZM13.2868%2016.4275C13.2272%2016.4251%2013.1652%2016.4153%2013.1057%2016.3981L12.6443%2016.2609C12.5451%2016.2315%2012.4434%2016.2217%2012.3417%2016.2217V15.3667C12.4161%2015.3667%2012.4905%2015.374%2012.5649%2015.3961L13.0263%2015.5308C13.1107%2015.5553%2013.1999%2015.5676%2013.2868%2015.5725V16.4275ZM16.1765%2016.6333C16.0872%2016.4275%2015.9111%2016.2634%2015.6854%2016.2021L15.2438%2016.0796C15.1397%2016.0478%2015.0305%2016.0355%2014.9214%2016.0355V15.1829C15.0057%2015.1804%2015.0901%2015.1902%2015.1719%2015.2172L15.5341%2015.3299C15.9185%2015.45%2016.1765%2015.7979%2016.1765%2016.1948V16.6333ZM17.449%2018.1474C17.4415%2018.1719%2017.4366%2018.1964%2017.4291%2018.2209C17.3522%2018.4611%2017.129%2018.6203%2016.876%2018.6203C16.8537%2018.6203%2016.8313%2018.6154%2016.809%2018.613V17.7628C16.8264%2017.7652%2016.8413%2017.7677%2016.8586%2017.7677C17.1067%2017.7677%2017.3324%2017.6305%2017.4515%2017.4222V18.1474H17.449ZM19.8302%207.48242C19.5524%207.87933%2019.4061%208.34484%2019.4061%208.82749V9.2489L19.1903%209.5576C18.91%209.95696%2018.7611%2010.4249%2018.7611%2010.91V13.0342C18.7611%2013.3772%2018.6173%2013.7129%2018.3643%2013.9481L17.9103%2014.3744C17.6052%2014.661%2017.4366%2015.0628%2017.449%2015.4794L17.4515%2015.5749C17.4688%2016.1262%2017.3969%2016.675%2017.2406%2017.2042C17.191%2017.3732%2017.0323%2017.4908%2016.8561%2017.4908C16.6354%2017.4908%2016.4543%2017.3144%2016.4543%2017.0939V16.1948C16.4543%2015.6754%2016.117%2015.2221%2015.6159%2015.0677L15.2538%2014.955C15.0528%2014.8938%2014.842%2014.8913%2014.6386%2014.9501L13.5472%2015.2686C13.4033%2015.3103%2013.2496%2015.3103%2013.1057%2015.2686L12.6443%2015.1339C12.4062%2015.0628%2012.1482%2015.08%2011.92%2015.178L10.9502%2015.5994C10.3301%2015.8689%209.9307%2016.4741%209.9307%2017.1429V17.4884C9.54871%2017.4663%209.17664%2017.3536%208.84674%2017.1576L8.50692%2016.9567C8.21919%2016.7877%207.89177%2016.697%207.5569%2016.697H6.78548L6.21498%2016.381C5.94461%2016.2315%205.63951%2016.1531%205.32945%2016.1507L4.23805%2016.1433L2.98542%2015.4916C1.08539%2014.5042%200.274278%2012.2821%201.10027%2010.322L1.3508%209.72666C1.53683%209.28565%201.63357%208.81769%201.63357%208.33749V8.00428H1.90394C2.17183%208.00428%202.40003%207.82053%202.46204%207.57307H11.8481C12.0044%207.57307%2012.1482%207.66372%2012.2102%207.80583L12.4905%208.42569C12.5798%208.62414%2012.7783%208.75154%2012.999%208.75154C13.2173%208.75154%2013.4182%208.62414%2013.5075%208.42569L13.7878%207.80338C13.8523%207.66127%2013.9937%207.57062%2014.15%207.57062H14.4873C14.6337%207.57062%2014.7676%207.64902%2014.837%207.77643C15.0082%208.09003%2015.3158%208.30074%2015.6655%208.35709V12.2575C15.1025%2012.3188%2014.6709%2012.6496%2014.6709%2013.0514C14.6709%2013.4973%2015.1967%2013.8574%2015.8466%2013.8574C16.4965%2013.8574%2017.0223%2013.4973%2017.0223%2013.0514C17.0223%2012.6496%2016.5907%2012.3163%2016.0277%2012.2575V8.35464C16.3774%208.29828%2016.685%208.08758%2016.8561%207.77398C16.9256%207.64657%2017.0595%207.56817%2017.2059%207.56817H17.7069C17.9376%207.56817%2018.1485%207.45302%2018.275%207.26192L19.0191%206.12755C19.1158%205.9781%2019.282%205.8899%2019.4631%205.8899H19.6938C19.8575%205.8899%2019.9914%206.0222%2019.9914%206.1839V6.53426C19.9914%206.70331%2020.0584%206.86501%2020.175%206.98506L19.8302%207.48242ZM15.663%2012.8554V13.6296C15.3579%2013.583%2015.1322%2013.4287%2015.1322%2013.2425C15.1322%2013.0563%2015.3579%2012.8995%2015.663%2012.8554Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M43.6355%2014.2212L45.783%206.63627C46.0175%205.80901%2046.629%205.14498%2047.4288%204.848L47.4874%204.60107H44.5028L39.434%2010.6989L37.4942%204.60107H34.7636L34.6978%204.848C35.1653%205.08213%2035.423%205.78176%2035.423%206.35097V6.38628C35.423%209.63469%2033.0443%2015.2183%2029.6984%2015.2183C28.3982%2015.2183%2027.7242%2014.2901%2027.7242%2013.5165C27.7242%2012.5794%2028.5003%2011.9129%2029.3191%2011.9129C30.112%2011.9129%2030.2342%2012.211%2030.6909%2012.211C30.9696%2012.211%2031.2366%2012.0667%2031.3701%2011.8195C31.5797%2011.4313%2031.4208%2010.9572%2031.0376%2010.7714L30.8283%2010.6705C28.8775%209.72228%2026.6152%2011.1582%2026.6152%2013.3453V13.3756C26.6152%2014.9675%2027.8525%2016.2989%2029.4275%2016.3545C33.4867%2016.4983%2036.2019%2010.9661%2036.6338%206.91684L36.9458%208.01243L38.5448%2012.8545H39.1504L44.1452%206.83425L42.0498%2014.229C41.8094%2015.0773%2041.1437%2015.7344%2040.2985%2015.958L40.2399%2016.2049H44.2561L44.3216%2015.958C43.7283%2015.6043%2043.4461%2014.8902%2043.6355%2014.2212Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M51.9847%2012.6335H50.0625C50.2808%2012.034%2050.4898%2011.4617%2050.5603%2011.2743C51.0465%209.97682%2051.971%209.45183%2052.8665%209.37842L52.8572%209.3862L51.9847%2012.6335ZM53.7159%208.72607H53.6817C51.8071%208.7283%2049.7916%208.91155%2048.719%2011.9903C47.8179%2014.5767%2047.5745%2015.6481%2046.8705%2015.6481C46.4204%2015.6481%2046.5297%2014.763%2045.8549%2014.763C45.5509%2014.763%2045.2332%2015.0093%2045.2104%2015.3661C45.1705%2015.9826%2045.9909%2016.3555%2046.6092%2016.3555C48.4929%2016.3555%2049.2148%2014.9671%2049.4505%2014.3203C49.481%2014.2358%2049.6473%2013.778%2049.8436%2013.2386H51.8231L51.4878%2014.4866C51.3107%2015.145%2050.9465%2015.6839%2050.3304%2015.9595L50.2772%2016.2062H53.5154L53.5755%2015.9595C53.1372%2015.5941%2052.9469%2015.0082%2053.089%2014.4627L54.3075%209.78302C54.4011%209.42403%2054.6472%209.12789%2054.9809%208.973L55.0338%208.72607H53.9785H53.7159Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M70.056%209.26026C70.1601%209.08619%2070.2595%208.82035%2070.2595%208.67186L70.2597%208.67103C70.2741%208.39018%2070.0208%208.17273%2069.7488%208.23196H69.7482C69.5304%208.27951%2069.373%208.47499%2069.3771%208.70023C69.3807%208.93436%2069.3341%209.18574%2069.2353%209.30836C69.0082%209.59116%2068.645%209.56697%2066.9717%209.08174V9.07896C66.8186%209.03363%2066.6504%208.98414%2066.4731%208.93492C66.4637%208.93241%2066.4549%208.92963%2066.4453%208.92657L66.4456%208.92741C65.6106%208.698%2064.5732%208.4875%2063.8929%208.82869C63.8874%208.83148%2063.8816%208.83453%2063.8764%208.83704C63.2118%209.17406%2062.7479%209.81223%2062.6086%2010.5502C62.5879%2010.6587%2062.5728%2010.7468%2062.5711%2010.7788V10.7799C62.5513%2011.1675%2062.9009%2011.4679%2063.2767%2011.3864L63.2773%2011.3858C63.5821%2011.3196%2063.7965%2011.0441%2063.7902%2010.7296C63.7836%2010.4117%2063.7205%209.98741%2063.8918%209.70267C64.1674%209.31059%2064.4537%209.28278%2065.7361%209.71462L64.3436%2014.4877C64.1514%2015.1456%2063.6812%2015.6848%2063.059%2015.9601L63.0001%2016.2073H66.3319L66.3977%2015.9601C65.9679%2015.595%2065.7906%2015.0088%2065.9453%2014.4635L67.1628%2010.1637C67.6969%2010.276%2068.2381%2010.305%2068.7651%2010.1531L68.9548%2010.0986C69.3787%209.97629%2069.8129%209.6668%2070.056%209.26026Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M71.3889%208.72607L71.3234%208.97328C71.736%209.26108%2071.9219%209.78079%2071.7886%2010.2671L70.5506%2014.4816C70.3584%2015.14%2069.8882%2015.6789%2069.2659%2015.9542L69.207%2016.2011H70.9696H71.1306H75.1868L75.7226%2014.2252H75.4709L75.3806%2014.4145C75.0447%2015.1206%2074.3372%2015.5699%2073.5614%2015.5699H71.8415L72.7572%2012.2623L73.4878%2012.2615C73.9807%2012.2612%2074.3512%2012.7153%2074.2568%2013.2036H74.5084L75.1094%2010.9679H74.8578C74.7122%2011.3814%2074.3253%2011.6578%2073.8904%2011.658L72.9243%2011.6592L73.5597%209.36341L75.3825%209.36202C75.9775%209.36146%2076.4229%209.9126%2076.304%2010.5015H76.5556L77.033%208.72607H71.3889Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M82.8655%2010.5324C82.6668%2011.2028%2082.0564%2011.6627%2081.3632%2011.6627L80.3076%2011.6636L80.9466%209.36726L82.0055%209.3667C82.6067%209.36642%2083.0379%209.9512%2082.8655%2010.5324ZM82.7978%208.72998H78.7711L78.7053%208.97691C79.0919%209.24636%2079.2791%209.71935%2079.1921%2010.1779L77.9311%2014.4846C77.739%2015.1431%2077.269%2015.682%2076.6465%2015.9573L76.5879%2016.2048H79.9164L79.9822%2015.9573C79.5524%2015.5922%2079.3754%2015.006%2079.5296%2014.4607L80.14%2012.2662H80.3944C80.7787%2012.2665%2081.1014%2012.5584%2081.1438%2012.9444C81.1578%2013.069%2081.3505%2014.5947%2081.5044%2015.1195C81.7059%2015.8052%2081.9705%2016.205%2082.5729%2016.205H84.0788L84.1375%2015.9578L83.9219%2015.8288C83.4966%2015.5738%2083.1885%2015.1773%2083.0508%2014.6531C82.9203%2014.1585%2082.677%2013.2372%2082.5578%2012.7495C82.4961%2012.4981%2082.1866%2012.2654%2081.8667%2012.2654L82.3741%2012.2651C83.284%2012.2645%2084.0827%2011.6525%2084.328%2010.7671C84.611%209.74382%2083.8495%208.72998%2082.7978%208.72998Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M60.6842%209.10931C60.576%209.10931%2060.3431%209.03478%2059.9858%208.88463C59.6281%208.73447%2059.2669%208.65967%2058.9027%208.65967C58.1467%208.65967%2057.5157%208.90687%2056.9997%209.4352C56.5703%209.87483%2056.3795%2010.3628%2056.3795%2010.7852C56.3795%2011.2349%2056.6399%2011.7635%2057.1616%2012.1909C57.6542%2012.5949%2058.1668%2012.982%2058.68%2013.3771C59.2196%2013.8134%2059.4897%2014.2158%2059.4897%2014.5431C59.4897%2015.2616%2059.0269%2015.6481%2058.0688%2015.6481C57.0953%2015.6481%2056.4221%2014.9276%2056.2063%2013.5782H55.9431L55.1777%2016.2045H55.4203C55.7366%2015.9807%2055.9615%2015.8366%2056.4202%2015.8366C56.858%2015.8366%2057.3257%2016.3558%2058.3229%2016.3558C59.1191%2016.3558%2059.7493%2016.189%2060.2892%2015.6434C60.7481%2015.1668%2060.9775%2014.4994%2060.9775%2013.9538C60.9775%2013.4494%2060.6644%2012.8613%2060.1174%2012.4375C59.648%2012.0741%2059.1453%2011.7496%2058.6596%2011.3948C58.1332%2010.9993%2057.87%2010.6637%2057.87%2010.2956C57.87%2010.0906%2057.9713%209.88651%2058.174%209.68213C58.43%209.42325%2058.773%209.36596%2059.232%209.36596C60.1529%209.36596%2060.7974%209.88429%2060.8516%2010.9746H61.0945L61.7368%208.65967H61.4939C61.2373%208.95971%2060.9675%209.10931%2060.6842%209.10931Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M89.1717%209.36569C90.0926%209.36569%2090.7374%209.88401%2090.7914%2010.9743H91.0345L91.6765%208.65967H91.4334C91.1771%208.95915%2090.9075%209.10903%2090.6237%209.10903C90.5158%209.10903%2090.2829%209.03423%2089.9252%208.88435C89.5676%208.73447%2089.2067%208.65967%2088.8422%208.65967C88.0864%208.65967%2087.4554%208.90687%2086.9395%209.43493C86.51%209.87455%2086.3192%2010.3628%2086.3192%2010.785C86.3192%2011.2351%2086.5796%2011.7629%2087.1014%2012.1909C87.5939%2012.5949%2088.1065%2012.9817%2088.6197%2013.3768C89.159%2013.8134%2089.4294%2014.2158%2089.4294%2014.5428C89.4294%2015.2613%2088.9666%2015.6478%2088.0085%2015.6478C87.035%2015.6478%2086.3619%2014.9274%2086.1458%2013.5782H85.8826L85.1172%2016.2045H85.3603C85.6763%2015.9807%2085.9013%2015.8366%2086.3597%2015.8366C86.7977%2015.8366%2087.2652%2016.3558%2088.2626%2016.3558C89.0588%2016.3558%2089.689%2016.1884%2090.2289%2015.6434C90.6878%2015.1662%2090.9172%2014.4991%2090.9172%2013.9538C90.9172%2013.4494%2090.6041%2012.8613%2090.0574%2012.4375C89.5877%2012.0738%2089.0853%2011.7493%2088.5996%2011.3945C88.0729%2010.9993%2087.8097%2010.6632%2087.8097%2010.295C87.8097%2010.0909%2087.911%209.88623%2088.1134%209.68185C88.3697%209.42297%2088.7128%209.36569%2089.1717%209.36569Z'%20fill='%23006747'/%3e%3c/svg%3e",E=[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_1.png",tagline:"Featured groups+ experience",headline:n.jsxs(n.Fragment,{children:["Welcome to ",n.jsx("br",{})," Featured Groups +"]})},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_2.png",headline:"Get real-time insights"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_3.png",headline:"Predictions, trivia & polls synced to match play"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_4.png",headline:"Win points for every answer you get right"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_5.png",headline:"Compete against friends on the leaderboard"}],P2=s.styled_default("div")({name:"OnboardingContainer",class:"on59ra",propsAsIs:!1}),z2=()=>s.x$1,G2=s.styled_default(z2())({name:"OnboardingNotificationContainer",class:"op1wk5d",propsAsIs:!0}),V=s.styled_default("div")({name:"InnerContainer",class:"i1i1g2vj",propsAsIs:!1}),B2=({deepLink:e,onboardingOpts:t,notification:o,gamification:r,loading:i,sdk:l})=>{var a,C,p,u,c,v,h;const S=s.useStore(r.friends.getStore()),[f,g]=d.useState(void 0),y=d.useMemo(()=>{var m,N;const $=l.getInviter();return $?(N=(m=S.data)==null?void 0:m.find(({slId:P})=>P===$))==null?void 0:N.name:""},[S.data,l]);return d.useEffect(()=>{const m=e.$store.subscribe(N=>{N&&g(N.data)});return()=>{m()}},[e.$store]),n.jsx(P2,{children:n.jsx(s.rn,{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:(a=t.rules)==null?void 0:a.buttonLabel,rulesTitle:(C=t.rules)==null?void 0:C.heading,termsTitle:"Terms and Conditions",termsText:(p=t.rules)==null?void 0:p.terms,steps:E,primaryColor:(u=t.inviteCard)==null?void 0:u.iconColor,inviteLink:f,inviteCardTitle:(c=t.inviteCard)==null?void 0:c.heading,inviteCardSubtext:(v=t.inviteCard)==null?void 0:v.subtext,inviteCardBtnLabel:(h=t.inviteCard)==null?void 0:h.buttonLabel,onClose:()=>{var m;(m=o.close)==null||m.call(o)},gamification:r,sdk:l,inviterName:y})})},q2=({sdk:e,notification:t,saveHeight:o,style:r,appNode:i,sdkInDesktopView:l,responsiveStore:a})=>{var C;const p=d.useRef(null),u=t.data.onboarding,[c,v]=d.useState(u==null?void 0:u.instantOpen),h=e.getFeature(k.SdkOverlayType.GAMES),S=d.useMemo(()=>E==null?void 0:E.map(({graphicSrc:m})=>m),[]),{screen:f}=s.useStore(a,{keys:["screen"]});(C=u==null?void 0:u.titleCard)!=null&&C.media&&(u.titleCard.media.sponsorLogo=U2),d.useLayoutEffect(()=>{var m;o(((m=p.current)==null?void 0:m.getBoundingClientRect().height)||0)},[o]);const{loading:g,throttled:y}=s.I$1(S);return c&&h&&u&&i.current&&!y?n.jsx(s.x,{container:i,useContainer:!l,children:n.jsx(B2,{notification:t,setOpened:v,gamification:h,onboardingOpts:u,deepLink:h.deepLink,loading:g,sdk:e})}):n.jsxs(n.Fragment,{children:[n.jsx(V,{ref:p,style:{position:"absolute",visibility:"hidden"},children:n.jsx(_,{close:()=>{},action:()=>{},onboarding:u})}),n.jsx(G2,{style:r,hiding:t.hiding,children:n.jsx(V,{children:n.jsx(_,{close:t.close,action:()=>{var m;v(!0),(((m=i.current)==null?void 0:m.getBoundingClientRect().y)||0)<0&&w(i,f.size,{behavior:"smooth"})},onboarding:u})})})]})},W2=()=>s.x$1,Z2=s.styled_default(W2())({name:"Container",class:"c1f0y7nw",propsAsIs:!0}),U=s.styled_default("div")({name:"InnerContainer",class:"i1qa3p7a",propsAsIs:!1}),Q2=()=>U,Y2=s.styled_default(Q2())({name:"HiddenContainer",class:"hrthymv",propsAsIs:!0}),K2=s.styled_default("div")({name:"NotificationRefreshing",class:"n13rok4i",propsAsIs:!1}),X2=()=>s.h$1,J2=s.styled_default(X2())({name:"Pill",class:"pht79xf",propsAsIs:!0}),e0=e=>{const[t,o]=d.useState(0),r=d.useRef(null),i=d.useCallback(a=>{r.current=a},[]);d.useEffect(()=>{var a;const C=(a=r.current)==null?void 0:a.getBoundingClientRect();C&&o(C.height)},[e]);const l=d.useCallback(a=>{o(a)},[]);return[i,t,l]},s0=({sdk:e,notification:t,appNode:o,responsiveStore:r})=>{var i,l;const{sdkInDesktopView:a}=s.useStore(r,{keys:["sdkInDesktopView"]}),{sdk:C}=T(),[p,u,c]=e0(t.id);return t.type===s.NotificationType.QUESTION?n.jsxs(n.Fragment,{children:[n.jsx(Y2,{ref:p,children:n.jsx(s.w,{...t})}),n.jsxs(Z2,{style:{height:t.hiding?0:u},hiding:t.hiding,children:[n.jsx(U,{style:{height:"100%"},children:n.jsx(s.w,{...t,controlVideo:C==null?void 0:C.controlVideoPlayer})}),n.jsx(K2,{},t.id)]})]}):t.type===s.NotificationType.QUESTION_RESOLVED&&(l=(i=t.data)==null?void 0:i.question)!=null&&l.predictionResult?n.jsx(s.z$1,{style:{height:t.hiding?0:u},saveHeight:c,close:t.close,hiding:t.hiding,...t.data.question,mastersApp:!0}):t.type===s.NotificationType.ONBOARDING?n.jsx(q2,{style:{height:t.hiding?0:u},saveHeight:c,sdk:e,notification:t,sdkInDesktopView:a,appNode:o,responsiveStore:r}):null},t0="p1co32q0",n0=({pill:e,setPill:t,appNode:o,headerNode:r,scrollNode:i,responsiveStore:l,scrollStore:a})=>{var C,p;const{screen:u}=s.useStore(l,{keys:["screen"]}),{tabsShown:c,scrollPosition:v}=s.useStore(a,{keys:["tabsShown","scrollPosition"]});d.useEffect(()=>{l.get().sdkInDesktopView?v<50&&t(null):v>-50&&t(null)},[v,l,t]);const h=l.get().sdkInDesktopView?o:r;return!e||!h.current?null:s.Ik.createPortal(n.jsx(J2,{title:e.type===s.NotificationType.QUESTION_RESOLVED?"Prediction result":`New ${((p=s.o[(C=e.data)==null?void 0:C.questionType])==null?void 0:p.label)||"notification"}`,onClick:()=>{var S;l.get().sdkInDesktopView?(S=i.current)==null||S.scrollTo({top:0,behavior:"smooth"}):w(o,u.size,{behavior:"smooth"}),t(null)},className:s.cx_default(c&&t0,"sl-pill-button")}),h.current)},o0=({sdk:e,headerNode:t,scrollNode:o,responsiveStore:r,appNode:i,scrollStore:l})=>{const[a]=d.useState(e.getNotificationsStore()),C=s.useStore(a),[p,u]=d.useState(null),c=d.useMemo(()=>e.getActiveNotification(),[e,C]);return d.useEffect(()=>{c&&s.eventBus.emit("notification",{action:"rendered",payload:{questionId:c.data.questionId,questionType:c.data.questionType}})},[c]),d.useEffect(()=>{c&&(r.get().sdkInDesktopView||r.get().sdkInView)&&(!r.get().sdkInDesktopView&&r.get().sdkInView&&u(c),r.get().sdkInDesktopView&&window.requestAnimationFrame(()=>{l.get().scrollPosition!==0&&u(c)}))},[c]),d.useEffect(()=>{c||u(null)},[c]),n.jsxs(n.Fragment,{children:[!p&&c&&n.jsx(s0,{headerNode:t,appNode:i,sdk:e,notification:c,responsiveStore:r}),p&&n.jsx(n0,{pill:p,setPill:u,appNode:i,notification:c,headerNode:t,scrollNode:o,scrollStore:l,responsiveStore:r})]})},r0=e=>{const t=d.useRef(""),[o,r]=d.useState(!1),i=s.useStore(e.status),l=s.useStore(e.sdkStore.slStreamId),a=s.useStore(e.userId()),C=s.useStore(e.getActiveFeature()),p=i==="ready"&&!!l.data,[u,c]=d.useState(b),v=d.useCallback((f,g)=>{c(g),f&&e.createEventSession(f),g===b?window.requestAnimationFrame(()=>{e.openFeature(k.SdkOverlayType.GAMES)}):e.closeFeature(!1)},[e]);d.useEffect(()=>{!p&&u===b&&(c(x),e.closeFeature(!0))},[p,u,e]),d.useEffect(()=>{C===k.SdkOverlayType.GAMES?c(b):C===k.SdkOverlayType.UNSET&&c(x);const f=e.getFeature(k.SdkOverlayType.GAMES);f&&(f.closeQuestion(),f.closeUser())},[C,e]);const h=d.useCallback(f=>{t.current=f,r(!0),e.initializeApp({skipOrganizationSettings:!0}).then(({enabled:g,err:y})=>{if(y){v(f,x);return}if(g){e.isUserAuthorized().then(m=>{if(m){v(f,x);return}else e.disableApp()});return}})},[v,e]),S=d.useCallback(()=>{r(!1),e.disableApp()},[e]);return d.useEffect(()=>{if(!a){p&&(c(x),e.disableApp());return}if(a&&t.current&&o){e.initializeApp({skipOrganizationSettings:!0}).then(()=>{e.createEventSession(t.current)});return}},[a]),d.useEffect(()=>()=>{r(!1),e.disableApp()},[r,e]),{sdkEnabled:o,sdkReady:p,activeOverlay:u,activateAndLoadOverlay:v,activateEventWithId:h,deactivate:S,isLogged:!!a}},F=Object.keys(s.N),j=()=>{const e=window.innerWidth;let t="sm";for(let o=F.length-1;o>0;o--){const r=F[o];if(!(e<s.N[r])&&e>=s.N[r]){t=r;break}}return{name:t,size:s.N[t]}},D=e=>{var t;return(((t=e.current)==null?void 0:t.getBoundingClientRect().y)||0)<-68},H=e=>e>=s.N.xl,i0=e=>{const[t]=d.useState(()=>{const o=j();return s.h({screen:j(),sdkInView:D(e),sdkInDesktopView:H(o.size)})});return d.useEffect(()=>{const o=s.c(()=>{t.setKey("sdkInView",D(e))},200),r=s.c(()=>{const i=j();t.setKey("screen",i),t.setKey("sdkInDesktopView",H(i.size))},200);return window.addEventListener("scroll",o),window.addEventListener("resize",r),()=>{window.removeEventListener("scroll",o),window.removeEventListener("resize",r)}},[t,e]),[t]},l0={BG_TRANSPARENT:"rgba(0,0,0, .8)",BLUE_QUESTION_ACTION_BTN:"#1589ee",WHITE:"#FFFFFF",BLUE:"#2d6ffd",GREY_PRIMARY_ONBOARDING_INAPP:"#B5B7B8",GREY_PRIMARY:"#909395",PRIMARY_1:"#107D57",PRIMARY_2:"#006747",PRIMARY_TEXT:"#006747",QUESTION_TYPE_ICON:"#107D57",SUCCESS:"#107D57",UNSUCCESS:"#DF2F3B",SECONDARY_RED1:"#DF2F3B",NEUTRALS_WHITE:"#FFFFFF",NEUTRALS_WHITE1:"#FFFFFF",NEUTRALS_GRAY1:"#F7F7F7",NEUTRALS_GRAY2:"#F2F2F1",NEUTRALS_GRAY3:"#E8E8E8",NEUTRALS_GRAY4:"#D9D9D6",NEUTRALS_GRAY5:"#B1B3B3",NEUTRALS_GRAY6:"#888B8D",NEUTRALS_GRAY7:"#6B6F73",NEUTRALS_GRAY9:"#25282A"},L={...s.A,REGULAR:"'Benton Sans', BentonSans, Arial, Helvetica, sans-serif",SERIF:"'Tiempos', 'Tiempos Text', Times New Roman, serif",COLOR:"#fff",WEIGHT_DEFAULT:"500"},a0=Object.entries(l0).reduce((e,[t,o])=>`
1
+ "use strict";const n=require("react/jsx-runtime"),s=require("./provider.js"),d=require("react"),k=require("./useStreamLayerApp2.js"),P=s.styled_default("div")({name:"SDKContainer",class:"s8zgqze",propsAsIs:!1}),G=s.styled_default("div")({name:"SDKScrollContainer",class:"s6t897k",propsAsIs:!1}),M=s.styled_default("div")({name:"SDKContentContainer",class:"sw7pkvp",propsAsIs:!1}),B=()=>M,N=s.styled_default(B())({name:"SDKWhiteContainer",class:"s14gkn7u",propsAsIs:!0}),q=s.styled_default("div")({name:"TabsContainer",class:"t1yxstm9",propsAsIs:!1}),W=()=>N,Z=s.styled_default(W())({name:"LeaderboardContainer",class:"ldpty1s",propsAsIs:!0}),Q=()=>N,Y=s.styled_default(Q())({name:"TabsNavContainer",class:"t136a59y",propsAsIs:!0}),K=s.styled_default("div")({name:"UserSummaryContainer",class:"u11vnm9m",propsAsIs:!1}),w=(e,t,o)=>{const r=t>=s.A.lg&&t<s.A.xl?75:52;e.current&&window.scrollTo({top:e.current.offsetTop-r,...o})},X=15,J=(e,t)=>{const o=d.useRef(null),r=d.useRef(0),[i]=d.useState(s.h$1({scrollPosition:0,tabsShown:!0,scrollDirection:"forward"})),l=s.useStore(t);return d.useEffect(()=>{const a=window.innerWidth<s.A.xl?window:o.current;if(!a)return()=>{};const C=s.c(p=>{var u;const c=p.target;if(!c)return;let v=0;l.screen.size<s.A.xl?v=((u=e.current)==null?void 0:u.getBoundingClientRect().y)||0:v=c.scrollTop;const h=r.current-v;if(X>Math.abs(h))return;const S=r.current<v?"forward":"backward";r.current=v,i.set({scrollPosition:Math.round(v),scrollDirection:S,tabsShown:i.get().tabsShown})},200);return a.addEventListener("scroll",C),()=>{a.removeEventListener("scroll",C)}},[i,e,l.screen]),[o,i]},I=s.styled_default("div")({name:"LoadingContainer",class:"l7wseip",propsAsIs:!1}),e2=({feature:e,sdk:t,children:o,className:r,noWait:i})=>{const l=s.useStore(e.status),a=s.useStore(t.sdkStore.slStreamId);if(!i){if(a!=null&&a.loading&&!a.data)return n.jsx(I,{className:r,children:"Event is loading..."});if(!(a!=null&&a.data))return n.jsx(I,{className:r,children:"Event is forbidden..."});if(l!==s.FeatureStatus.Ready)return n.jsx(I,{className:r,children:"Wait feature..."})}return o},O=d.createContext({sdk:null}),T=()=>d.useContext(O),s2=s.styled_default("div")({name:"QuestionContainer",class:"qwgkhsv",propsAsIs:!1}),t2=({openedQuestion:e})=>{var t,o;const{sdk:r}=T();return((t=e==null?void 0:e.attributes)==null?void 0:t.attributes.case)==="insight"?n.jsx(s.p,{...e.attributes.attributes.value,controlVideo:r==null?void 0:r.controlVideoPlayer}):((o=e==null?void 0:e.attributes)==null?void 0:o.attributes.case)==="tweet"?n.jsx(s.a,{...e.attributes.attributes.value,controlVideo:r==null?void 0:r.controlVideoPlayer}):null},n2=({extendedQuestion:e,vote:t,close:o})=>{const{loading:r,data:i}=e;return i?n.jsx(s.Nt,{vote:t,close:o,openedQuestion:i,isLoading:!!r}):n.jsx(s.kt,{})},o2=({gamification:e})=>{var t;const o=s.useStore(e.openedQuestion.$store),r=s.useStore(e.openedQuestion.$extendedStore);if(!o)return null;const i=o.type;return n.jsxs(s2,{children:[n.jsx(s.b$1,{close:e.closeQuestion,type:((t=o.attributes)==null?void 0:t.type)||k.QuestionType.UNSET}),i==="question"&&n.jsx(n2,{vote:e.submitAnswer,close:e.closeQuestion,extendedQuestion:r}),i!=="question"&&n.jsx(t2,{openedQuestion:o}),n.jsx(s.i,{mastersLogo:!0})]})},r2=s.styled_default("div")({name:"InviteFriendsContainer",class:"i1b9agwt",propsAsIs:!1}),i2=({deepLink:e})=>n.jsx(r2,{children:n.jsx(s.M,{inviteLink:e,inviteCardTitle:"It’s More Fun With Friends",inviteCardSubtext:"Invite and compete against your friends for the top spot on the leaderboard."})}),l2=s.styled_default("div")({name:"InviteLinkContainer",class:"ij36hcn",propsAsIs:!1}),a2=({gamification:e,scrollNode:t,scrollStore:o})=>{const r=d.useRef(null),{data:i,hasMore:l,loading:a,key:C}=s.useStore(e.leaderboardList.$store),{data:p}=s.useStore(e.deepLink.$store),[u,c]=s.T(r);return!i.length&&!a?n.jsx(i2,{deepLink:p}):n.jsxs(n.Fragment,{children:[n.jsx(s.S,{items:i,scrollNode:t,scrollStore:o,fetchMore:e.leaderboardList.fetchMore,hasMore:l,openItemDetail:e.openUser,currentUserId:e.currentUserId.get()},C),p&&n.jsx(l2,{ref:r,children:n.jsx(s.C,{onClick:()=>u(p),title:"Invite Friends",description:"Challenge them now!"})}),c]})},d2=({store:e,openQuestion:t})=>{const{sdk:o}=T(),r=s.useStore(e);return n.jsx(s.k,{openQuestion:t,questions:r.data,controlVideo:o==null?void 0:o.controlVideoPlayer})},c2=({userSummary:e})=>{var t;const[o,r]=d.useState(void 0);return d.useEffect(()=>{const i=e.$store.subscribe(l=>{l&&r(l)});return()=>{i()}},[e]),n.jsx(s.O,{loading:!(o!=null&&o.summary),...o==null?void 0:o.summary,successRate:(t=o==null?void 0:o.percentage)==null?void 0:t.correct})},u2=({gamification:e,className:t,scrollStore:o,scrollNode:r,appNode:i,style:l,responsiveStore:a})=>{const{tabsShown:C}=s.useStore(o,{keys:["tabsShown"]}),[p,u]=d.useState(s.m.HOME),[,c]=s.useTransition(),{sdkInDesktopView:v,screen:h}=s.useStore(a,{keys:["sdkInDesktopView"]}),S=g=>{c(()=>{var y;u(g),v===!1&&(((y=i.current)==null?void 0:y.getBoundingClientRect().y)||0)<0&&w(i,h.size,{behavior:"instant"})})};d.useEffect(()=>o.subscribe(g=>{if(g.scrollPosition===0){o.setKey("tabsShown",!0);return}a.get().sdkInDesktopView?o.setKey("tabsShown",g.scrollDirection==="backward"):o.setKey("tabsShown",g.scrollDirection==="forward")}),[o,a]);let f="0px";return v?f=C?"0px":"calc(8px - var(--header-height) - var(--header-offset))":f=C?"calc(var(--header-height) + var(--header-offset) - 2px)":"0px",n.jsxs(q,{className:t,style:l,children:[n.jsx(Y,{style:{top:f},children:n.jsx(s.b$2,{activePage:p,toggleActivePage:S})}),p===s.m.HOME&&n.jsxs(n.Fragment,{children:[n.jsx(N,{style:{paddingTop:"8px"},children:n.jsx(K,{children:n.jsx(c2,{userSummary:e.userSummary})})}),n.jsx(M,{style:{flex:1},children:n.jsx(d2,{openQuestion:e.openQuestion,store:e.feedList.getStore()})})]}),p===s.m.LEADERBOARD&&n.jsx(Z,{children:n.jsx(a2,{scrollStore:o,scrollNode:r,gamification:e})})]})},p2=()=>s.x$1,R=s.styled_default(p2())({name:"OpenedContainer",class:"o1seszvt",propsAsIs:!0}),C2=s.styled_default("div")({name:"UserContainer",class:"u1pbry50",propsAsIs:!1}),v2=({correct:e,incorrect:t})=>{const o=e+t;return o===0?0:Math.round(e/o*100)},f2=({gamification:e,scrollStore:t,className:o,appNode:r,scrollNode:i,responsiveStore:l})=>n.jsx(u2,{appNode:r,scrollStore:t,scrollNode:i,className:o,gamification:e,responsiveStore:l}),h2=({gamification:e,className:t,appNode:o,responsiveStore:r})=>{const i=s.useStore(e.openedQuestion.$store),l=s.useStore(e.openedUser),{sdkInDesktopView:a}=s.useStore(r,{keys:["sdkInDesktopView"]}),{hiding:C,onAnimationEnd:p}=s.S$1();if(!o.current||!i&&!l)return null;const u=i?n.jsx(R,{className:t,hiding:C,onAnimationEnd:p,children:n.jsx(o2,{gamification:e})}):l?n.jsx(R,{className:t,hiding:C,onAnimationEnd:p,children:n.jsxs(C2,{children:[n.jsx(s.b$1,{label:"Friend's Rank",close:e.closeUser}),n.jsx(N,{children:n.jsx(s.O,{...l,successRate:v2(l)})})]})}):null;return n.jsx(s.x,{container:o,useContainer:!a,children:u})},m2=d.lazy(()=>Promise.resolve().then(()=>require("./gamification-feature2.js"))),g2=({sdk:e,feature:t,className:o,scrollStore:r,appNode:i,scrollNode:l,responsiveStore:a})=>{const C=d.useMemo(()=>t&&t.featureConfig.get().type===k.SdkOverlayType.GAMES?n.jsx(e2,{className:o,sdk:e,feature:t,children:n.jsx(m2,{appNode:i,scrollStore:r,scrollNode:l,className:o,responsiveStore:a,gamification:t})}):null,[e,t,o,a,r,l,i]);return n.jsx(d.Suspense,{fallback:n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:C})},S2=({feature:e,className:t,appNode:o,responsiveStore:r})=>e&&e.featureConfig.get().type===k.SdkOverlayType.GAMES?n.jsx(h2,{className:t,appNode:o,responsiveStore:r,gamification:e}):null,y2=()=>s.f1,x2=s.styled_default(y2())({name:"ButtonIcon",class:"b1whzxvd",propsAsIs:!0}),x="channels",L2=e=>{var t;return n.jsx(s.I,{...e,id:"channels",label:"Channels",icon:n.jsx(x2,{name:"icon-btn-channels","data-selected":(t=e.active)==null?void 0:t.toString()})})},k2=()=>s.f1,b2=s.styled_default(k2())({name:"ButtonIcon",class:"b11des7c",propsAsIs:!0}),b="featuredGroups",A2=e=>{var t;return n.jsx(s.I,{...e,label:e.labelFull?"Featured Groups +":"FG+",id:"featuredGroups",icon:n.jsx(b2,{name:"icon-btn-feature-groups","data-selected":(t=e.active)==null?void 0:t.toString()})})},N2="leaderboard",I2=s.styled_default("div")({name:"Navigation",class:"n19lpak2",propsAsIs:!1}),j2=()=>s.i$1,E2=s.styled_default(j2())({name:"NavigationItems",class:"n1w473c2",propsAsIs:!0}),w2=d.forwardRef(({activeOverlay:e,setActiveOverlay:t,scrollToTop:o,sdkReady:r,className:i,responsiveStore:l},a)=>{const{screen:C}=s.useStore(l,{keys:["screen"]});return n.jsxs(I2,{className:i,children:[n.jsxs(E2,{children:[n.jsx(L2,{active:e===x,onClick:()=>{t(x),e!==x&&o()}}),n.jsx(A2,{active:e===b,disabled:!r,onClick:()=>{t(b),e!==b&&o()},labelFull:C.size>=s.A.md&&C.size<s.A.xl})]}),n.jsx("div",{ref:a})]})}),T2=s.styled_default("div")({name:"Container",class:"czz4rjk",propsAsIs:!1}),$2=s.styled_default("div")({name:"CloseIconWrap",class:"cxmojsy",propsAsIs:!1}),R2=()=>s.f1,_2=s.styled_default(R2())({name:"CloseIcon",class:"c1urm3yx",propsAsIs:!0}),V2=s.styled_default("div")({name:"Title",class:"tme976v",propsAsIs:!1}),F2=s.styled_default("img")({name:"SponsorLogo",class:"s1lal9yz",propsAsIs:!1}),D2=s.styled_default("div")({name:"PresentsTitle",class:"pnn1sv1",propsAsIs:!1}),H2=s.styled_default("div")({name:"Subtitle",class:"s1hjj1y8",propsAsIs:!1}),M2=s.styled_default("div")({name:"Description",class:"dz7yjzw",propsAsIs:!1}),O2=s.styled_default("button")({name:"ActionButton",class:"avpowqk",propsAsIs:!1}),_=({close:e,action:t,onboarding:o})=>{var r,i,l,a,C,p,u,c;return n.jsxs(T2,{children:[n.jsx($2,{onClick:e,children:n.jsx(_2,{name:"icon-cross"})}),((i=(r=o==null?void 0:o.titleCard)==null?void 0:r.media)==null?void 0:i.sponsorLogo)&&n.jsxs(V2,{children:[n.jsx(F2,{alt:"sponsor-logo",src:(a=(l=o==null?void 0:o.titleCard)==null?void 0:l.media)==null?void 0:a.sponsorLogo}),n.jsx(D2,{children:"PRESENTS"})]}),((C=o==null?void 0:o.titleCard)==null?void 0:C.title)&&n.jsx(H2,{children:(p=o==null?void 0:o.titleCard)==null?void 0:p.title}),((u=o==null?void 0:o.titleCard)==null?void 0:u.subtitle)&&n.jsx(M2,{children:(c=o==null?void 0:o.titleCard)==null?void 0:c.subtitle}),n.jsx(O2,{onClick:t,children:"Play Now"})]})},U2="data:image/svg+xml,%3csvg%20width='92'%20height='19'%20viewBox='0%200%2092%2019'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.1701%200.953996C13.9047%200.873145%2013.6393%201.0177%2013.3739%201.1647C13.2797%201.21615%2013.2127%201.3068%2013.1904%201.4097L12.7736%203.33298C12.7588%203.40404%2012.8233%203.46774%2012.8952%203.45304C13.3342%203.35504%2013.7509%202.97528%2014.19%203.10758C14.6811%203.25703%2015.1722%202.64207%2015.6634%202.64942V0.429688C15.1698%200.432138%2014.6613%201.10345%2014.1701%200.953996Z'%20fill='%23006747'/%3e%3cpath%20d='M20.4404%206.84786C20.3362%206.77681%2020.2717%206.66166%2020.2717%206.53671V6.18635C20.2717%205.87275%2020.0138%205.61549%2019.6938%205.61549H19.4631C19.1878%205.61549%2018.9348%205.75269%2018.7859%205.98055L18.0418%207.11492C17.9674%207.22762%2017.8434%207.29377%2017.7094%207.29377H17.2084C16.9603%207.29377%2016.7321%207.42852%2016.6131%207.64412C16.4915%207.86708%2016.2757%208.02143%2016.0302%208.07288V0.181303C16.0302%200.0808513%2015.9483%200%2015.8466%200C15.7449%200%2015.663%200.0808513%2015.663%200.181303V0.426307V2.64604V8.07778C15.4175%208.02633%2015.2017%207.87198%2015.0801%207.64657C14.9636%207.43097%2014.7354%207.29622%2014.4848%207.29622H14.1475C13.8796%207.29622%2013.639%207.45057%2013.5298%207.69312L13.2496%208.31299C13.2049%208.41099%2013.1057%208.47469%2012.9965%208.47469C12.8874%208.47469%2012.7882%208.41099%2012.7435%208.31299L12.4633%207.69312C12.3541%207.45302%2012.1135%207.29622%2011.8456%207.29622H2.33802C2.26113%207.29622%202.19911%207.35747%202.19911%207.43342C2.19911%207.59512%202.06517%207.72498%201.90394%207.72498H1.49218C1.41529%207.72498%201.35328%207.78623%201.35328%207.86218V8.33504C1.35328%208.77849%201.26646%209.2097%201.09283%209.61886L0.842303%2010.2142C0.60914%2010.7655%200.5%2011.3363%200.5%2011.8974V13.2694C0.5%2013.6394%200.55457%2014.0142%200.66371%2014.3793C0.968807%2015.4034%201.66334%2016.2413%202.61831%2016.7362L4.13883%2017.5276C4.15868%2017.5374%204.181%2017.5423%204.20332%2017.5423L5.32697%2017.5521C5.5899%2017.5545%205.84787%2017.6207%206.07855%2017.7481L6.6813%2018.0813C6.70115%2018.0935%206.72595%2018.0984%206.75076%2018.0984H7.5569C7.83968%2018.0984%208.11997%2018.1744%208.36057%2018.3189C8.36057%2018.3189%208.75497%2018.5566%208.88891%2018.6326C9.10223%2018.7551%209.3602%2018.8727%209.80916%2018.8972C9.91086%2018.9021%2010.0126%2018.8653%2010.0895%2018.7943C10.1639%2018.7232%2010.2085%2018.6228%2010.2085%2018.5223V17.9882C10.2085%2017.6011%2010.4392%2017.2483%2010.7989%2017.0939L12.0317%2016.5598C12.2003%2016.4863%2012.3888%2016.4741%2012.5649%2016.528L13.0263%2016.6627C13.2223%2016.7191%2013.4306%2016.7215%2013.6266%2016.6627L14.718%2016.3418C14.8619%2016.3001%2015.0156%2016.3001%2015.162%2016.3442L15.606%2016.4667C15.8119%2016.5231%2015.9582%2016.7142%2015.9582%2016.9249V17.9931C15.9582%2018.4905%2016.3675%2018.8972%2016.871%2018.8972C17.2481%2018.8972%2017.578%2018.6595%2017.6921%2018.3042C17.8979%2017.6648%2018.0021%2016.9984%2018.0021%2016.3271V15.8714C18.0021%2015.548%2018.1385%2015.2368%2018.3767%2015.0138L18.8306%2014.59C19.1357%2014.3033%2019.3118%2013.8966%2019.3118%2013.4801V10.9468C19.3118%2010.5548%2019.4309%2010.175%2019.6591%209.85161C19.6764%209.82956%2019.6839%209.80016%2019.6839%209.77321V9.1754C19.6839%208.78584%2019.8029%208.40854%2020.0262%208.08758L20.4751%207.44322C20.4925%207.42117%2020.4999%207.39422%2020.4999%207.36482V6.96056C20.5024%206.88461%2020.4553%206.85766%2020.4404%206.84786ZM16.0302%2012.8554C16.3352%2012.9019%2016.5634%2013.0563%2016.5634%2013.2425C16.5634%2013.4287%2016.3377%2013.583%2016.0302%2013.6296V12.8554ZM2.98046%2016.6137L2.74978%2016.4937C2.12222%2016.1678%201.62117%2015.6827%201.27886%2015.0922V14.3523C1.67078%2014.9134%202.20407%2015.3912%202.85644%2015.7317L2.98046%2015.7954V16.6137ZM4.14131%2017.2189L3.52616%2016.9004V16.0821L4.13883%2016.4006H4.14131V17.2189ZM6.70115%2017.775L6.21498%2017.5055C5.94957%2017.3585%205.65191%2017.2801%205.34682%2017.2752V16.4226C5.6023%2016.4275%205.85531%2016.4937%206.07855%2016.6162L6.6813%2016.9494C6.68626%2016.9518%206.6937%2016.9518%206.70115%2016.9543V17.775ZM9.92822%2017.9882V18.4047V18.5223C9.92822%2018.5493%209.91582%2018.5762%209.89598%2018.5958C9.87613%2018.6154%209.85133%2018.6228%209.82404%2018.6228C9.43461%2018.6032%209.21137%2018.5027%209.0303%2018.3973C8.89883%2018.3214%208.50692%2018.0862%208.50444%2018.0862C8.25887%2017.9392%207.98106%2017.8583%207.69581%2017.8363V16.9788C7.92897%2017.0008%208.15718%2017.0694%208.36057%2017.1895L8.7004%2017.3904C9.07246%2017.6109%209.49662%2017.7358%209.92822%2017.7603V17.9882ZM13.2868%2016.4275C13.2272%2016.4251%2013.1652%2016.4153%2013.1057%2016.3981L12.6443%2016.2609C12.5451%2016.2315%2012.4434%2016.2217%2012.3417%2016.2217V15.3667C12.4161%2015.3667%2012.4905%2015.374%2012.5649%2015.3961L13.0263%2015.5308C13.1107%2015.5553%2013.1999%2015.5676%2013.2868%2015.5725V16.4275ZM16.1765%2016.6333C16.0872%2016.4275%2015.9111%2016.2634%2015.6854%2016.2021L15.2438%2016.0796C15.1397%2016.0478%2015.0305%2016.0355%2014.9214%2016.0355V15.1829C15.0057%2015.1804%2015.0901%2015.1902%2015.1719%2015.2172L15.5341%2015.3299C15.9185%2015.45%2016.1765%2015.7979%2016.1765%2016.1948V16.6333ZM17.449%2018.1474C17.4415%2018.1719%2017.4366%2018.1964%2017.4291%2018.2209C17.3522%2018.4611%2017.129%2018.6203%2016.876%2018.6203C16.8537%2018.6203%2016.8313%2018.6154%2016.809%2018.613V17.7628C16.8264%2017.7652%2016.8413%2017.7677%2016.8586%2017.7677C17.1067%2017.7677%2017.3324%2017.6305%2017.4515%2017.4222V18.1474H17.449ZM19.8302%207.48242C19.5524%207.87933%2019.4061%208.34484%2019.4061%208.82749V9.2489L19.1903%209.5576C18.91%209.95696%2018.7611%2010.4249%2018.7611%2010.91V13.0342C18.7611%2013.3772%2018.6173%2013.7129%2018.3643%2013.9481L17.9103%2014.3744C17.6052%2014.661%2017.4366%2015.0628%2017.449%2015.4794L17.4515%2015.5749C17.4688%2016.1262%2017.3969%2016.675%2017.2406%2017.2042C17.191%2017.3732%2017.0323%2017.4908%2016.8561%2017.4908C16.6354%2017.4908%2016.4543%2017.3144%2016.4543%2017.0939V16.1948C16.4543%2015.6754%2016.117%2015.2221%2015.6159%2015.0677L15.2538%2014.955C15.0528%2014.8938%2014.842%2014.8913%2014.6386%2014.9501L13.5472%2015.2686C13.4033%2015.3103%2013.2496%2015.3103%2013.1057%2015.2686L12.6443%2015.1339C12.4062%2015.0628%2012.1482%2015.08%2011.92%2015.178L10.9502%2015.5994C10.3301%2015.8689%209.9307%2016.4741%209.9307%2017.1429V17.4884C9.54871%2017.4663%209.17664%2017.3536%208.84674%2017.1576L8.50692%2016.9567C8.21919%2016.7877%207.89177%2016.697%207.5569%2016.697H6.78548L6.21498%2016.381C5.94461%2016.2315%205.63951%2016.1531%205.32945%2016.1507L4.23805%2016.1433L2.98542%2015.4916C1.08539%2014.5042%200.274278%2012.2821%201.10027%2010.322L1.3508%209.72666C1.53683%209.28565%201.63357%208.81769%201.63357%208.33749V8.00428H1.90394C2.17183%208.00428%202.40003%207.82053%202.46204%207.57307H11.8481C12.0044%207.57307%2012.1482%207.66372%2012.2102%207.80583L12.4905%208.42569C12.5798%208.62414%2012.7783%208.75154%2012.999%208.75154C13.2173%208.75154%2013.4182%208.62414%2013.5075%208.42569L13.7878%207.80338C13.8523%207.66127%2013.9937%207.57062%2014.15%207.57062H14.4873C14.6337%207.57062%2014.7676%207.64902%2014.837%207.77643C15.0082%208.09003%2015.3158%208.30074%2015.6655%208.35709V12.2575C15.1025%2012.3188%2014.6709%2012.6496%2014.6709%2013.0514C14.6709%2013.4973%2015.1967%2013.8574%2015.8466%2013.8574C16.4965%2013.8574%2017.0223%2013.4973%2017.0223%2013.0514C17.0223%2012.6496%2016.5907%2012.3163%2016.0277%2012.2575V8.35464C16.3774%208.29828%2016.685%208.08758%2016.8561%207.77398C16.9256%207.64657%2017.0595%207.56817%2017.2059%207.56817H17.7069C17.9376%207.56817%2018.1485%207.45302%2018.275%207.26192L19.0191%206.12755C19.1158%205.9781%2019.282%205.8899%2019.4631%205.8899H19.6938C19.8575%205.8899%2019.9914%206.0222%2019.9914%206.1839V6.53426C19.9914%206.70331%2020.0584%206.86501%2020.175%206.98506L19.8302%207.48242ZM15.663%2012.8554V13.6296C15.3579%2013.583%2015.1322%2013.4287%2015.1322%2013.2425C15.1322%2013.0563%2015.3579%2012.8995%2015.663%2012.8554Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M43.6355%2014.2212L45.783%206.63627C46.0175%205.80901%2046.629%205.14498%2047.4288%204.848L47.4874%204.60107H44.5028L39.434%2010.6989L37.4942%204.60107H34.7636L34.6978%204.848C35.1653%205.08213%2035.423%205.78176%2035.423%206.35097V6.38628C35.423%209.63469%2033.0443%2015.2183%2029.6984%2015.2183C28.3982%2015.2183%2027.7242%2014.2901%2027.7242%2013.5165C27.7242%2012.5794%2028.5003%2011.9129%2029.3191%2011.9129C30.112%2011.9129%2030.2342%2012.211%2030.6909%2012.211C30.9696%2012.211%2031.2366%2012.0667%2031.3701%2011.8195C31.5797%2011.4313%2031.4208%2010.9572%2031.0376%2010.7714L30.8283%2010.6705C28.8775%209.72228%2026.6152%2011.1582%2026.6152%2013.3453V13.3756C26.6152%2014.9675%2027.8525%2016.2989%2029.4275%2016.3545C33.4867%2016.4983%2036.2019%2010.9661%2036.6338%206.91684L36.9458%208.01243L38.5448%2012.8545H39.1504L44.1452%206.83425L42.0498%2014.229C41.8094%2015.0773%2041.1437%2015.7344%2040.2985%2015.958L40.2399%2016.2049H44.2561L44.3216%2015.958C43.7283%2015.6043%2043.4461%2014.8902%2043.6355%2014.2212Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M51.9847%2012.6335H50.0625C50.2808%2012.034%2050.4898%2011.4617%2050.5603%2011.2743C51.0465%209.97682%2051.971%209.45183%2052.8665%209.37842L52.8572%209.3862L51.9847%2012.6335ZM53.7159%208.72607H53.6817C51.8071%208.7283%2049.7916%208.91155%2048.719%2011.9903C47.8179%2014.5767%2047.5745%2015.6481%2046.8705%2015.6481C46.4204%2015.6481%2046.5297%2014.763%2045.8549%2014.763C45.5509%2014.763%2045.2332%2015.0093%2045.2104%2015.3661C45.1705%2015.9826%2045.9909%2016.3555%2046.6092%2016.3555C48.4929%2016.3555%2049.2148%2014.9671%2049.4505%2014.3203C49.481%2014.2358%2049.6473%2013.778%2049.8436%2013.2386H51.8231L51.4878%2014.4866C51.3107%2015.145%2050.9465%2015.6839%2050.3304%2015.9595L50.2772%2016.2062H53.5154L53.5755%2015.9595C53.1372%2015.5941%2052.9469%2015.0082%2053.089%2014.4627L54.3075%209.78302C54.4011%209.42403%2054.6472%209.12789%2054.9809%208.973L55.0338%208.72607H53.9785H53.7159Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M70.056%209.26026C70.1601%209.08619%2070.2595%208.82035%2070.2595%208.67186L70.2597%208.67103C70.2741%208.39018%2070.0208%208.17273%2069.7488%208.23196H69.7482C69.5304%208.27951%2069.373%208.47499%2069.3771%208.70023C69.3807%208.93436%2069.3341%209.18574%2069.2353%209.30836C69.0082%209.59116%2068.645%209.56697%2066.9717%209.08174V9.07896C66.8186%209.03363%2066.6504%208.98414%2066.4731%208.93492C66.4637%208.93241%2066.4549%208.92963%2066.4453%208.92657L66.4456%208.92741C65.6106%208.698%2064.5732%208.4875%2063.8929%208.82869C63.8874%208.83148%2063.8816%208.83453%2063.8764%208.83704C63.2118%209.17406%2062.7479%209.81223%2062.6086%2010.5502C62.5879%2010.6587%2062.5728%2010.7468%2062.5711%2010.7788V10.7799C62.5513%2011.1675%2062.9009%2011.4679%2063.2767%2011.3864L63.2773%2011.3858C63.5821%2011.3196%2063.7965%2011.0441%2063.7902%2010.7296C63.7836%2010.4117%2063.7205%209.98741%2063.8918%209.70267C64.1674%209.31059%2064.4537%209.28278%2065.7361%209.71462L64.3436%2014.4877C64.1514%2015.1456%2063.6812%2015.6848%2063.059%2015.9601L63.0001%2016.2073H66.3319L66.3977%2015.9601C65.9679%2015.595%2065.7906%2015.0088%2065.9453%2014.4635L67.1628%2010.1637C67.6969%2010.276%2068.2381%2010.305%2068.7651%2010.1531L68.9548%2010.0986C69.3787%209.97629%2069.8129%209.6668%2070.056%209.26026Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M71.3889%208.72607L71.3234%208.97328C71.736%209.26108%2071.9219%209.78079%2071.7886%2010.2671L70.5506%2014.4816C70.3584%2015.14%2069.8882%2015.6789%2069.2659%2015.9542L69.207%2016.2011H70.9696H71.1306H75.1868L75.7226%2014.2252H75.4709L75.3806%2014.4145C75.0447%2015.1206%2074.3372%2015.5699%2073.5614%2015.5699H71.8415L72.7572%2012.2623L73.4878%2012.2615C73.9807%2012.2612%2074.3512%2012.7153%2074.2568%2013.2036H74.5084L75.1094%2010.9679H74.8578C74.7122%2011.3814%2074.3253%2011.6578%2073.8904%2011.658L72.9243%2011.6592L73.5597%209.36341L75.3825%209.36202C75.9775%209.36146%2076.4229%209.9126%2076.304%2010.5015H76.5556L77.033%208.72607H71.3889Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M82.8655%2010.5324C82.6668%2011.2028%2082.0564%2011.6627%2081.3632%2011.6627L80.3076%2011.6636L80.9466%209.36726L82.0055%209.3667C82.6067%209.36642%2083.0379%209.9512%2082.8655%2010.5324ZM82.7978%208.72998H78.7711L78.7053%208.97691C79.0919%209.24636%2079.2791%209.71935%2079.1921%2010.1779L77.9311%2014.4846C77.739%2015.1431%2077.269%2015.682%2076.6465%2015.9573L76.5879%2016.2048H79.9164L79.9822%2015.9573C79.5524%2015.5922%2079.3754%2015.006%2079.5296%2014.4607L80.14%2012.2662H80.3944C80.7787%2012.2665%2081.1014%2012.5584%2081.1438%2012.9444C81.1578%2013.069%2081.3505%2014.5947%2081.5044%2015.1195C81.7059%2015.8052%2081.9705%2016.205%2082.5729%2016.205H84.0788L84.1375%2015.9578L83.9219%2015.8288C83.4966%2015.5738%2083.1885%2015.1773%2083.0508%2014.6531C82.9203%2014.1585%2082.677%2013.2372%2082.5578%2012.7495C82.4961%2012.4981%2082.1866%2012.2654%2081.8667%2012.2654L82.3741%2012.2651C83.284%2012.2645%2084.0827%2011.6525%2084.328%2010.7671C84.611%209.74382%2083.8495%208.72998%2082.7978%208.72998Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M60.6842%209.10931C60.576%209.10931%2060.3431%209.03478%2059.9858%208.88463C59.6281%208.73447%2059.2669%208.65967%2058.9027%208.65967C58.1467%208.65967%2057.5157%208.90687%2056.9997%209.4352C56.5703%209.87483%2056.3795%2010.3628%2056.3795%2010.7852C56.3795%2011.2349%2056.6399%2011.7635%2057.1616%2012.1909C57.6542%2012.5949%2058.1668%2012.982%2058.68%2013.3771C59.2196%2013.8134%2059.4897%2014.2158%2059.4897%2014.5431C59.4897%2015.2616%2059.0269%2015.6481%2058.0688%2015.6481C57.0953%2015.6481%2056.4221%2014.9276%2056.2063%2013.5782H55.9431L55.1777%2016.2045H55.4203C55.7366%2015.9807%2055.9615%2015.8366%2056.4202%2015.8366C56.858%2015.8366%2057.3257%2016.3558%2058.3229%2016.3558C59.1191%2016.3558%2059.7493%2016.189%2060.2892%2015.6434C60.7481%2015.1668%2060.9775%2014.4994%2060.9775%2013.9538C60.9775%2013.4494%2060.6644%2012.8613%2060.1174%2012.4375C59.648%2012.0741%2059.1453%2011.7496%2058.6596%2011.3948C58.1332%2010.9993%2057.87%2010.6637%2057.87%2010.2956C57.87%2010.0906%2057.9713%209.88651%2058.174%209.68213C58.43%209.42325%2058.773%209.36596%2059.232%209.36596C60.1529%209.36596%2060.7974%209.88429%2060.8516%2010.9746H61.0945L61.7368%208.65967H61.4939C61.2373%208.95971%2060.9675%209.10931%2060.6842%209.10931Z'%20fill='%23006747'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M89.1717%209.36569C90.0926%209.36569%2090.7374%209.88401%2090.7914%2010.9743H91.0345L91.6765%208.65967H91.4334C91.1771%208.95915%2090.9075%209.10903%2090.6237%209.10903C90.5158%209.10903%2090.2829%209.03423%2089.9252%208.88435C89.5676%208.73447%2089.2067%208.65967%2088.8422%208.65967C88.0864%208.65967%2087.4554%208.90687%2086.9395%209.43493C86.51%209.87455%2086.3192%2010.3628%2086.3192%2010.785C86.3192%2011.2351%2086.5796%2011.7629%2087.1014%2012.1909C87.5939%2012.5949%2088.1065%2012.9817%2088.6197%2013.3768C89.159%2013.8134%2089.4294%2014.2158%2089.4294%2014.5428C89.4294%2015.2613%2088.9666%2015.6478%2088.0085%2015.6478C87.035%2015.6478%2086.3619%2014.9274%2086.1458%2013.5782H85.8826L85.1172%2016.2045H85.3603C85.6763%2015.9807%2085.9013%2015.8366%2086.3597%2015.8366C86.7977%2015.8366%2087.2652%2016.3558%2088.2626%2016.3558C89.0588%2016.3558%2089.689%2016.1884%2090.2289%2015.6434C90.6878%2015.1662%2090.9172%2014.4991%2090.9172%2013.9538C90.9172%2013.4494%2090.6041%2012.8613%2090.0574%2012.4375C89.5877%2012.0738%2089.0853%2011.7493%2088.5996%2011.3945C88.0729%2010.9993%2087.8097%2010.6632%2087.8097%2010.295C87.8097%2010.0909%2087.911%209.88623%2088.1134%209.68185C88.3697%209.42297%2088.7128%209.36569%2089.1717%209.36569Z'%20fill='%23006747'/%3e%3c/svg%3e",E=[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_1.png",tagline:"Featured groups+ experience",headline:n.jsxs(n.Fragment,{children:["Welcome to ",n.jsx("br",{})," Featured Groups +"]})},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_2.png",headline:"Get real-time insights"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_3.png",headline:"Predictions, trivia & polls synced to match play"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_4.png",headline:"Win points for every answer you get right"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_5.png",headline:"Compete against friends on the leaderboard"}],z2=s.styled_default("div")({name:"OnboardingContainer",class:"on59ra",propsAsIs:!1}),P2=()=>s.x$1,G2=s.styled_default(P2())({name:"OnboardingNotificationContainer",class:"op1wk5d",propsAsIs:!0}),V=s.styled_default("div")({name:"InnerContainer",class:"i1i1g2vj",propsAsIs:!1}),B2=({deepLink:e,onboardingOpts:t,notification:o,gamification:r,loading:i,sdk:l})=>{var a,C,p,u,c,v,h;const S=s.useStore(r.friends.getStore()),[f,g]=d.useState(void 0),y=d.useMemo(()=>{var m,A;const $=l.getInviter();return $?(A=(m=S.data)==null?void 0:m.find(({slId:z})=>z===$))==null?void 0:A.name:""},[S.data,l]);return d.useEffect(()=>{const m=e.$store.subscribe(A=>{A&&g(A.data)});return()=>{m()}},[e.$store]),n.jsx(z2,{children:n.jsx(s.rn,{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:(a=t.rules)==null?void 0:a.buttonLabel,rulesTitle:(C=t.rules)==null?void 0:C.heading,termsTitle:"Terms and Conditions",termsText:(p=t.rules)==null?void 0:p.terms,steps:E,primaryColor:(u=t.inviteCard)==null?void 0:u.iconColor,inviteLink:f,inviteCardTitle:(c=t.inviteCard)==null?void 0:c.heading,inviteCardSubtext:(v=t.inviteCard)==null?void 0:v.subtext,inviteCardBtnLabel:(h=t.inviteCard)==null?void 0:h.buttonLabel,onClose:()=>{var m;(m=o.close)==null||m.call(o)},gamification:r,sdk:l,inviterName:y})})},q2=({sdk:e,notification:t,saveHeight:o,style:r,appNode:i,sdkInDesktopView:l,responsiveStore:a})=>{var C;const p=d.useRef(null),u=t.data.onboarding,[c,v]=d.useState(u==null?void 0:u.instantOpen),h=e.getFeature(k.SdkOverlayType.GAMES),S=d.useMemo(()=>E==null?void 0:E.map(({graphicSrc:m})=>m),[]),{screen:f}=s.useStore(a,{keys:["screen"]});(C=u==null?void 0:u.titleCard)!=null&&C.media&&(u.titleCard.media.sponsorLogo=U2),d.useLayoutEffect(()=>{var m;o(((m=p.current)==null?void 0:m.getBoundingClientRect().height)||0)},[o]);const{loading:g,throttled:y}=s.I$1(S);return c&&h&&u&&i.current&&!y?n.jsx(s.x,{container:i,useContainer:!l,children:n.jsx(B2,{notification:t,setOpened:v,gamification:h,onboardingOpts:u,deepLink:h.deepLink,loading:g,sdk:e})}):n.jsxs(n.Fragment,{children:[n.jsx(V,{ref:p,style:{position:"absolute",visibility:"hidden"},children:n.jsx(_,{close:()=>{},action:()=>{},onboarding:u})}),n.jsx(G2,{style:r,hiding:t.hiding,children:n.jsx(V,{children:n.jsx(_,{close:t.close,action:()=>{var m;v(!0),(((m=i.current)==null?void 0:m.getBoundingClientRect().y)||0)<0&&w(i,f.size,{behavior:"smooth"})},onboarding:u})})})]})},W2=()=>s.x$1,Z2=s.styled_default(W2())({name:"Container",class:"c1f0y7nw",propsAsIs:!0}),U=s.styled_default("div")({name:"InnerContainer",class:"i1qa3p7a",propsAsIs:!1}),Q2=()=>U,Y2=s.styled_default(Q2())({name:"HiddenContainer",class:"hrthymv",propsAsIs:!0}),K2=s.styled_default("div")({name:"NotificationRefreshing",class:"n13rok4i",propsAsIs:!1}),X2=()=>s.h$2,J2=s.styled_default(X2())({name:"Pill",class:"pht79xf",propsAsIs:!0}),e0=e=>{const[t,o]=d.useState(0),r=d.useRef(null),i=d.useCallback(a=>{r.current=a},[]);d.useEffect(()=>{var a;const C=(a=r.current)==null?void 0:a.getBoundingClientRect();C&&o(C.height)},[e]);const l=d.useCallback(a=>{o(a)},[]);return[i,t,l]},s0=({sdk:e,notification:t,appNode:o,responsiveStore:r})=>{var i,l;const{sdkInDesktopView:a}=s.useStore(r,{keys:["sdkInDesktopView"]}),{sdk:C}=T(),[p,u,c]=e0(t.id);return t.type===s.NotificationType.QUESTION?n.jsxs(n.Fragment,{children:[n.jsx(Y2,{ref:p,children:n.jsx(s.w,{...t})}),n.jsxs(Z2,{style:{height:t.hiding?0:u},hiding:t.hiding,children:[n.jsx(U,{style:{height:"100%"},children:n.jsx(s.w,{...t,controlVideo:C==null?void 0:C.controlVideoPlayer})}),n.jsx(K2,{},t.id)]})]}):t.type===s.NotificationType.QUESTION_RESOLVED&&(l=(i=t.data)==null?void 0:i.question)!=null&&l.predictionResult?n.jsx(s.z$1,{style:{height:t.hiding?0:u},saveHeight:c,close:t.close,hiding:t.hiding,...t.data.question,mastersApp:!0}):t.type===s.NotificationType.ONBOARDING?n.jsx(q2,{style:{height:t.hiding?0:u},saveHeight:c,sdk:e,notification:t,sdkInDesktopView:a,appNode:o,responsiveStore:r}):null},t0="p1co32q0",n0=({pill:e,setPill:t,appNode:o,headerNode:r,scrollNode:i,responsiveStore:l,scrollStore:a})=>{var C,p;const{screen:u}=s.useStore(l,{keys:["screen"]}),{tabsShown:c,scrollPosition:v}=s.useStore(a,{keys:["tabsShown","scrollPosition"]});d.useEffect(()=>{l.get().sdkInDesktopView?v<50&&t(null):v>-50&&t(null)},[v,l,t]);const h=l.get().sdkInDesktopView?o:r;return!e||!h.current?null:s.Ik.createPortal(n.jsx(J2,{title:e.type===s.NotificationType.QUESTION_RESOLVED?"Prediction result":`New ${((p=s.e[(C=e.data)==null?void 0:C.questionType])==null?void 0:p.label)||"notification"}`,onClick:()=>{var S;l.get().sdkInDesktopView?(S=i.current)==null||S.scrollTo({top:0,behavior:"smooth"}):w(o,u.size,{behavior:"smooth"}),t(null)},className:s.cx_default(c&&t0,"sl-pill-button")}),h.current)},o0=({sdk:e,headerNode:t,scrollNode:o,responsiveStore:r,appNode:i,scrollStore:l})=>{const[a]=d.useState(e.getNotificationsStore()),C=s.useStore(a),[p,u]=d.useState(null),c=d.useMemo(()=>e.getActiveNotification(),[e,C]);return d.useEffect(()=>{c&&s.eventBus.emit("notification",{action:"rendered",payload:{questionId:c.data.questionId,questionType:c.data.questionType}})},[c]),d.useEffect(()=>{c&&(r.get().sdkInDesktopView||r.get().sdkInView)&&(!r.get().sdkInDesktopView&&r.get().sdkInView&&u(c),r.get().sdkInDesktopView&&window.requestAnimationFrame(()=>{l.get().scrollPosition!==0&&u(c)}))},[c]),d.useEffect(()=>{c||u(null)},[c]),n.jsxs(n.Fragment,{children:[!p&&c&&n.jsx(s0,{headerNode:t,appNode:i,sdk:e,notification:c,responsiveStore:r}),p&&n.jsx(n0,{pill:p,setPill:u,appNode:i,notification:c,headerNode:t,scrollNode:o,scrollStore:l,responsiveStore:r})]})},r0=e=>{const t=d.useRef(""),[o,r]=d.useState(!1),i=s.useStore(e.status),l=s.useStore(e.sdkStore.slStreamId),a=s.useStore(e.userId()),C=s.useStore(e.getActiveFeature()),p=i==="ready"&&!!l.data,[u,c]=d.useState(b),v=d.useCallback((f,g)=>{c(g),f&&e.createEventSession(f),g===b?window.requestAnimationFrame(()=>{e.openFeature(k.SdkOverlayType.GAMES)}):e.closeFeature(!1)},[e]);d.useEffect(()=>{!p&&u===b&&(c(x),e.closeFeature(!0))},[p,u,e]),d.useEffect(()=>{C===k.SdkOverlayType.GAMES?c(b):C===k.SdkOverlayType.UNSET&&c(x);const f=e.getFeature(k.SdkOverlayType.GAMES);f&&(f.closeQuestion(),f.closeUser())},[C,e]);const h=d.useCallback(f=>{t.current=f,r(!0),e.initializeApp({skipOrganizationSettings:!0}).then(({enabled:g,err:y})=>{if(y){v(f,x);return}if(g){e.isUserAuthorized().then(m=>{if(m){v(f,x);return}else e.disableApp()});return}})},[v,e]),S=d.useCallback(()=>{r(!1),e.disableApp()},[e]);return d.useEffect(()=>{if(!a){p&&(c(x),e.disableApp());return}if(a&&t.current&&o){e.initializeApp({skipOrganizationSettings:!0}).then(()=>{e.createEventSession(t.current)});return}},[a]),d.useEffect(()=>()=>{r(!1),e.disableApp()},[r,e]),{sdkEnabled:o,sdkReady:p,activeOverlay:u,activateAndLoadOverlay:v,activateEventWithId:h,deactivate:S,isLogged:!!a}},F=Object.keys(s.A),j=()=>{const e=window.innerWidth;let t="sm";for(let o=F.length-1;o>0;o--){const r=F[o];if(!(e<s.A[r])&&e>=s.A[r]){t=r;break}}return{name:t,size:s.A[t]}},D=e=>{var t;return(((t=e.current)==null?void 0:t.getBoundingClientRect().y)||0)<-68},H=e=>e>=s.A.xl,i0=e=>{const[t]=d.useState(()=>{const o=j();return s.h$1({screen:j(),sdkInView:D(e),sdkInDesktopView:H(o.size)})});return d.useEffect(()=>{const o=s.c(()=>{t.setKey("sdkInView",D(e))},200),r=s.c(()=>{const i=j();t.setKey("screen",i),t.setKey("sdkInDesktopView",H(i.size))},200);return window.addEventListener("scroll",o),window.addEventListener("resize",r),()=>{window.removeEventListener("scroll",o),window.removeEventListener("resize",r)}},[t,e]),[t]},l0={BG_TRANSPARENT:"rgba(0,0,0, .8)",BLUE_QUESTION_ACTION_BTN:"#1589ee",WHITE:"#FFFFFF",BLUE:"#2d6ffd",GREY_PRIMARY_ONBOARDING_INAPP:"#B5B7B8",GREY_PRIMARY:"#909395",PRIMARY_1:"#107D57",PRIMARY_2:"#006747",PRIMARY_TEXT:"#006747",QUESTION_TYPE_ICON:"#107D57",SUCCESS:"#107D57",UNSUCCESS:"#DF2F3B",SECONDARY_RED1:"#DF2F3B",NEUTRALS_WHITE:"#FFFFFF",NEUTRALS_WHITE1:"#FFFFFF",NEUTRALS_GRAY1:"#F7F7F7",NEUTRALS_GRAY2:"#F2F2F1",NEUTRALS_GRAY3:"#E8E8E8",NEUTRALS_GRAY4:"#D9D9D6",NEUTRALS_GRAY5:"#B1B3B3",NEUTRALS_GRAY6:"#888B8D",NEUTRALS_GRAY7:"#6B6F73",NEUTRALS_GRAY9:"#25282A"},L={...s.D,REGULAR:"'Benton Sans', BentonSans, Arial, Helvetica, sans-serif",SERIF:"'Tiempos', 'Tiempos Text', Times New Roman, serif",COLOR:"#fff",WEIGHT_DEFAULT:"500"},a0=Object.entries(l0).reduce((e,[t,o])=>`
2
2
  ${e}
3
3
  --color-${t.toLowerCase().replaceAll("_","-")}: ${o};
4
- `,"");`${a0}${L.REGULAR}${L.REGULAR}${L.COLOR}${L.SERIF}${L.WEIGHT_DEFAULT}${L.WEIGHT_DEFAULT1}${L.WEIGHT_DEFAULT2}${L.WEIGHT_DEFAULT3}${s.A.SIZE_DEFAULT}${s.A.SIZE_DEFAULT1}${s.A.SIZE_DEFAULT2}${s.A.LINE_HEIGHT}${s.A.MARGIN_TITLE_DEFAULT}${s.s.down("xl")`
4
+ `,"");`${a0}${L.REGULAR}${L.REGULAR}${L.COLOR}${L.SERIF}${L.WEIGHT_DEFAULT}${L.WEIGHT_DEFAULT1}${L.WEIGHT_DEFAULT2}${L.WEIGHT_DEFAULT3}${s.D.SIZE_DEFAULT}${s.D.SIZE_DEFAULT1}${s.D.SIZE_DEFAULT2}${s.D.LINE_HEIGHT}${s.D.MARGIN_TITLE_DEFAULT}${s.s.down("xl")`
5
5
  --header-offset: 56px;
6
6
  --watch-live-header: 46px;
7
7
  `}${s.s.intermediate("xl","lg")`
8
8
  --header-offset: 76px;
9
- `}`;const d0="m1ojpy2l",c0=({children:e,style:t})=>n.jsx("div",{className:"StreamLayerSDKTheme",children:n.jsx("div",{className:d0,style:t,children:e})}),u0=({sdk:e,className:t,scrollStore:o,appNode:r,scrollNode:i,responsiveStore:l})=>{const[,a]=s.p$1(e);return n.jsx(g2,{className:t,scrollNode:i,appNode:r,scrollStore:o,feature:a,responsiveStore:l,sdk:e})},p0=({sdk:e,className:t,appNode:o,responsiveStore:r})=>{const i=s.useStore(e.featuresList.getStore());return i?Array.from(i,l=>{const a=e.getFeature(l);return a?n.jsx(S2,{className:t,appNode:o,feature:a,responsiveStore:r,sdk:e},l):null}):null},C0=({sdk:e,overlays:t,children:o})=>{const r=d.useRef(null),i=d.useRef(null),[l]=i0(r),[a,C]=J(r,l),{sdkEnabled:p,sdkReady:u,activeOverlay:c,activateAndLoadOverlay:v,activateEventWithId:h,deactivate:S,isLogged:f}=r0(e);s.L(r,{enabled:p,event:"click",listener:s.b$3}),s.L(a,{enabled:p,event:"scrollend",listener:s.y,useDomNode:!0}),s.L(a,{enabled:p,event:"click",listener:s.w$1,useDomNode:!0});const g=d.useMemo(()=>({sdk:e}),[e]);return d.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature2.js"))},[]),n.jsx(O.Provider,{value:g,children:n.jsxs(z,{ref:r,children:[p&&n.jsx(w2,{ref:i,sdkReady:u,activeOverlay:c,className:s.f,setActiveOverlay:y=>v("",y),scrollToTop:()=>{var y;return(y=a.current)==null?void 0:y.scrollTo(0,0)},responsiveStore:l}),n.jsxs(G,{className:"sl-hide-on-modal",ref:a,"data-nav":p.toString(),children:[u&&n.jsx(o0,{sdk:e,scrollNode:a,headerNode:i,appNode:r,scrollStore:C,responsiveStore:l}),n.jsx("div",{style:!p||c===x?{}:{display:"none"},children:o&&o({activateEventWithId:h,deactivate:S})}),t&&c===A2&&t[c],u&&c===b&&n.jsx(u0,{scrollStore:C,responsiveStore:l,scrollNode:a,appNode:r,className:s.f,sdk:e}),u&&n.jsx(p0,{responsiveStore:l,appNode:r,className:s.f,sdk:e})]}),p&&!f&&n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})})},v0=({sdkKey:e,plugins:t,children:o,onDeepLinkHandled:r,videoPlayerController:i,production:l=!0})=>n.jsx(s.StreamLayerProvider,{sdkKey:e,plugins:t,production:l,autoEnable:!1,onDeepLinkHandled:r,videoPlayerController:i,children:o}),f0=({children:e,overlays:t})=>{const{sdk:o,status:r}=d.useContext(s.StreamLayerContext);return r===s.StreamLayerStatus.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),e({})):o?n.jsx("div",{className:"StreamLayerSDK",children:n.jsx(c0,{style:{height:"100%"},children:n.jsx(C0,{sdk:o,overlays:t,children:e})})}):e({})};class h0 extends d.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,o){console.error(t,o.componentStack)}render(){return this.state.hasError?this.props.children({}):n.jsx(f0,{...this.props})}}exports.MastersStreamLayerProvider=v0;exports.MastersStreamLayerSDKReact=h0;exports.z=f2;
9
+ `}`;const d0="m1ojpy2l",c0=({children:e,style:t})=>n.jsx("div",{className:"StreamLayerSDKTheme",children:n.jsx("div",{className:d0,style:t,children:e})}),u0=({sdk:e,className:t,scrollStore:o,appNode:r,scrollNode:i,responsiveStore:l})=>{const[,a]=s.p$1(e);return n.jsx(g2,{className:t,scrollNode:i,appNode:r,scrollStore:o,feature:a,responsiveStore:l,sdk:e})},p0=({sdk:e,className:t,appNode:o,responsiveStore:r})=>{const i=s.useStore(e.featuresList.getStore());return i?Array.from(i,l=>{const a=e.getFeature(l);return a?n.jsx(S2,{className:t,appNode:o,feature:a,responsiveStore:r,sdk:e},l):null}):null},C0=({sdk:e,overlays:t,children:o})=>{const r=d.useRef(null),i=d.useRef(null),[l]=i0(r),[a,C]=J(r,l),{sdkEnabled:p,sdkReady:u,activeOverlay:c,activateAndLoadOverlay:v,activateEventWithId:h,deactivate:S,isLogged:f}=r0(e);s.L(r,{enabled:p,event:"click",listener:s.b$3}),s.L(a,{enabled:p,event:"scrollend",listener:s.y,useDomNode:!0}),s.L(a,{enabled:p,event:"click",listener:s.w$1,useDomNode:!0});const g=d.useMemo(()=>({sdk:e}),[e]);return d.useEffect(()=>{Promise.resolve().then(()=>require("./gamification-feature2.js"))},[]),n.jsx(O.Provider,{value:g,children:n.jsxs(P,{ref:r,children:[p&&n.jsx(w2,{ref:i,sdkReady:u,activeOverlay:c,className:s.f,setActiveOverlay:y=>v("",y),scrollToTop:()=>{var y;return(y=a.current)==null?void 0:y.scrollTo(0,0)},responsiveStore:l}),n.jsxs(G,{className:"sl-hide-on-modal",ref:a,"data-nav":p.toString(),children:[u&&n.jsx(o0,{sdk:e,scrollNode:a,headerNode:i,appNode:r,scrollStore:C,responsiveStore:l}),n.jsx("div",{style:!p||c===x?{}:{display:"none"},children:o&&o({activateEventWithId:h,deactivate:S})}),t&&c===N2&&t[c],u&&c===b&&n.jsx(u0,{scrollStore:C,responsiveStore:l,scrollNode:a,appNode:r,className:s.f,sdk:e}),u&&n.jsx(p0,{responsiveStore:l,appNode:r,className:s.f,sdk:e})]}),p&&!f&&n.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})})},v0=({sdkKey:e,plugins:t,children:o,onDeepLinkHandled:r,videoPlayerController:i,production:l=!0})=>n.jsx(s.StreamLayerProvider,{sdkKey:e,plugins:t,production:l,autoEnable:!1,onDeepLinkHandled:r,videoPlayerController:i,children:o}),f0=({children:e,overlays:t})=>{const{sdk:o,status:r}=d.useContext(s.StreamLayerContext);return r===s.StreamLayerStatus.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),e({})):o?n.jsx("div",{className:"StreamLayerSDK",children:n.jsx(c0,{style:{height:"100%"},children:n.jsx(C0,{sdk:o,overlays:t,children:e})})}):e({})};class h0 extends d.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,o){console.error(t,o.componentStack)}render(){return this.state.hasError?this.props.children({}):n.jsx(f0,{...this.props})}}exports.MastersStreamLayerProvider=v0;exports.MastersStreamLayerSDKReact=h0;exports.z=f2;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./provider.js"),d=require("./useStreamLayerApp2.js"),s=require("react/jsx-runtime"),p=require("react"),m=e.styled_default("div")({name:"Media",class:"m1bcvojl",propsAsIs:!1}),q=()=>m,w=e.styled_default(q())({name:"MediaImgBottom",class:"m58gin0",propsAsIs:!0}),E=()=>m,v=e.styled_default(E())({name:"MediaImgSolid",class:"m1atm8do",propsAsIs:!0}),M=()=>m,Q=e.styled_default(M())({name:"MediaImgRounded",class:"myx3xoi",propsAsIs:!0}),L=()=>m,D=e.styled_default(L())({name:"MediaImgCentered",class:"m1bwv0gx",propsAsIs:!0}),O=()=>m,R=e.styled_default(O())({name:"MediaImgInsight",class:"mntjanp",propsAsIs:!0}),z=e.styled_default("div")({name:"VideoIcon",class:"v1kofb47",propsAsIs:!1}),B={[d.QuestionImages.UNSET]:v,[d.QuestionImages.NONE]:v,[d.QuestionImages.ROUNDED]:Q,[d.QuestionImages.CENTERED]:D,[d.QuestionImages.TRANSPARENT]:w},A=({src:n,imageMode:a=d.QuestionImages.UNSET,withVideo:i,fromInsight:l})=>{if(a===d.QuestionImages.NONE)return null;const t=l?R:B[a];return s.jsxs(t,{children:[s.jsx("img",{src:n,alt:""}),i&&s.jsx(z,{children:s.jsx(e.f1,{name:"icon-play"})})]})},P=e.styled_default("div")({name:"NotificationContent",class:"nuraq9m",propsAsIs:!1}),U=e.styled_default("div")({name:"NotificationContainer",class:"ns1nzpg",propsAsIs:!1}),N=e.styled_default("div")({name:"Body",class:"b1j59nzs",propsAsIs:!1}),V=e.styled_default("div")({name:"Title",class:"t9vmnpp",propsAsIs:!1}),F=e.styled_default("button")({name:"Button",class:"b14ivj5k",propsAsIs:!1}),K=()=>e.f1,W=e.styled_default(K())({name:"StyledChevronRight",class:"s1atci8n",propsAsIs:!0}),G=e.styled_default("div")({name:"QuoteWrap",class:"q4w8jgs",propsAsIs:!1}),Y=e.styled_default("blockquote")({name:"Quote",class:"qaa0kez",propsAsIs:!1}),H=e.styled_default("div")({name:"Body",class:"b1wvd52w",propsAsIs:!1}),J=e.styled_default("div")({name:"Container",class:"ccvukea",propsAsIs:!1}),X=({image:n,tweet:a,account:i,accountVerified:l,body:t,title:c})=>{var r;return s.jsxs(J,{children:[c&&s.jsx(G,{children:s.jsx(Y,{children:c})}),s.jsx(e.D$1,{image:n,name:(r=a==null?void 0:a.meta)==null?void 0:r.accountName,userName:i,verified:l,createdTweet:a==null?void 0:a.date}),s.jsx(H,{children:e.S$2(t)})]})},Z=({title:n,questionType:a,questionTypeData:i})=>s.jsxs(N,{children:[s.jsx(e.x$2,{questionTypeData:i,questionType:a,questionStatus:d.QuestionStatus.UNSET}),n&&s.jsx(V,{children:n})]}),ss=({tweet:n})=>n?s.jsx(N,{children:s.jsx(X,{...n,controlVideo:()=>{}})}):null,es=({action:n,questionType:a,inApp:i,insight:l,tweet:t})=>{var c;const r=e.e[a],o=e.o[a];if(!r||!i||!i.notification)return null;const{title:y,image:f,imageMode:I}=i.notification;let u=f;a===d.QuestionType.TWEET&&t!=null&&t.tweetMedia&&(u=t.tweetMedia.image),I===d.QuestionImages.NONE&&(u="");const j=i.useMediaFromContent&&(l==null?void 0:l.image),h=a===d.QuestionType.TWEET&&((c=t==null?void 0:t.tweetMedia)==null?void 0:c.video)||a===d.QuestionType.FACTOID&&(l==null?void 0:l.video);return s.jsx(U,{className:"SL_InApp",onClick:n,children:s.jsxs(P,{style:u?{}:{paddingLeft:"1.5rem"},children:[u&&!j&&s.jsx(A,{src:u,imageMode:I,withVideo:!!h}),j&&s.jsx(A,{src:j,fromInsight:!0,withVideo:!!h}),a===d.QuestionType.TWEET?s.jsx(ss,{tweet:t}):s.jsx(Z,{questionTypeData:r,questionType:a,title:y}),s.jsx(F,{name:"inapp-button",children:o||"Open"}),s.jsx(W,{name:"chevronRight"})]})})},ts=e.styled_default("div")({name:"NotificationContainer",class:"n11jcrxe",propsAsIs:!1}),$=e.styled_default("img")({name:"Icon",class:"i1vmpt6u",propsAsIs:!1}),ns=e.styled_default("div")({name:"IconContainer",class:"i180665s",propsAsIs:!1}),as=()=>e.f1,is=e.styled_default(as())({name:"TitleIcon",class:"t16zzzei",propsAsIs:!0}),ls=()=>e.b,os=e.styled_default(ls())({name:"Close",class:"c1sur0q2",propsAsIs:!0}),ds=e.styled_default("div")({name:"Body",class:"bai9j52",propsAsIs:!1}),cs=e.styled_default("div")({name:"Title",class:"t1bnt25p",propsAsIs:!1}),rs=e.styled_default("div")({name:"Description",class:"dmixjec",propsAsIs:!1}),us=e.styled_default("button")({name:"Button",class:"b1ubkw1q",propsAsIs:!1}),ps=({open:n,close:a,...i})=>{var l,t;return s.jsxs(ts,{onClick:()=>{n==null||n(),i&&(i.instantOpen=!0)},children:[s.jsxs(ns,{children:[s.jsx($,{className:"on-light",src:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png"}),s.jsx($,{className:"on-dark",src:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"})]}),s.jsxs(ds,{children:[s.jsxs(cs,{children:[s.jsx(is,{name:"icon-trophy-solid"}),(l=i==null?void 0:i.titleCard)==null?void 0:l.title]}),s.jsxs(rs,{children:[s.jsx("span",{children:(t=i==null?void 0:i.titleCard)==null?void 0:t.subtitle}),s.jsx(us,{name:"inapp-button",children:"Play Now"})]})]}),s.jsx(os,{close:c=>{c==null||c.stopPropagation(),a==null||a()}})]})},ms=e.styled_default("div")({name:"Container",class:"cef8huz",propsAsIs:!1}),ys=()=>e.f1,fs=e.styled_default(ys())({name:"CheckIcon",class:"c1mo15kk",propsAsIs:!0}),js=()=>e.f1,xs=e.styled_default(js())({name:"PredictionIcon",class:"p16zkqnm",propsAsIs:!0}),Is=e.styled_default("div")({name:"PredictionIconContainer",class:"pjszi7a",propsAsIs:!1}),hs=e.styled_default("div")({name:"BodyContainer",class:"bftbmo3",propsAsIs:!1}),vs=e.styled_default("div")({name:"Body",class:"barrbyu",propsAsIs:!1}),As=e.styled_default("div")({name:"Subtitle",class:"sz7237i",propsAsIs:!1}),$s=({step:n,children:a,answer:i,state:l="pending"})=>s.jsxs(ms,{children:[s.jsx(Is,{children:s.jsx(xs,{name:"icon-prediction"})}),s.jsx(hs,{children:s.jsx(vs,{children:a},n)}),s.jsx(As,{className:l,children:s.jsxs("div",{children:[s.jsx(fs,{name:"icon-check"}),"Your Pick: ",i]})})]}),_s=e.styled_default("div")({name:"Container",class:"ckyzolp",propsAsIs:!1}),x=e.styled_default("div")({name:"Line",class:"l16t1zr7",propsAsIs:!1}),gs=()=>x,Ts=e.styled_default(gs())({name:"Line1",class:"le78kvg",propsAsIs:!0}),Ns=()=>x,Cs=e.styled_default(Ns())({name:"Line2",class:"l1o7966d",propsAsIs:!0}),Ss=()=>x,bs=e.styled_default(Ss())({name:"Line3",class:"lu9lyxq",propsAsIs:!0}),ks=()=>s.jsxs(_s,{children:[s.jsx(Ts,{children:s.jsx("div",{})}),s.jsx(Cs,{children:s.jsx("div",{})}),s.jsx(bs,{children:s.jsx("div",{})})]}),qs=e.styled_default("div")({name:"Container",class:"c10jy6zf",propsAsIs:!1}),ws=()=>e.f1,Es=e.styled_default(ws())({name:"CheckIcon",class:"c1c7scay",propsAsIs:!0}),Ms=()=>s.jsxs(qs,{children:[s.jsx(Es,{name:"icon-check"})," Prediction results are in!"]}),Qs=e.styled_default("div")({name:"Container",class:"cf6k2yy",propsAsIs:!1}),Ls=e.styled_default("div")({name:"Caption",class:"c1c8xjus",propsAsIs:!1}),Ds=e.styled_default("div")({name:"Title",class:"t1d1uekn",propsAsIs:!1}),Os=({title:n})=>s.jsxs(Qs,{children:[s.jsx(Ls,{children:"Results for"}),s.jsx(Ds,{children:n})]}),C=e.styled_default("div")({name:"Container",class:"c181a1as",propsAsIs:!1}),S=e.styled_default("div")({name:"Title",class:"t1cduox6",propsAsIs:!1}),Rs=()=>e.f1,b=e.styled_default(Rs())({name:"CorrectIcon",class:"c1onrv6j",propsAsIs:!0}),zs=()=>b,Bs=e.styled_default(zs())({name:"InCorrectIcon",class:"i17n9o7e",propsAsIs:!0}),Ps=()=>s.jsxs(C,{children:[s.jsxs(S,{children:["Congratulations!",s.jsx("br",{}),"You answered correctly."]}),s.jsx(b,{name:"icon-check"})]}),Us=({title:n})=>s.jsxs(C,{children:[s.jsxs(S,{children:["Better luck next time!",s.jsx("br",{}),"Correct: ",n]}),s.jsx(Bs,{name:"icon-cross"})]}),Vs=e.styled_default("div")({name:"Container",class:"cnxgcs2",propsAsIs:!1}),Fs=e.styled_default("div")({name:"Title",class:"t903f8n",propsAsIs:!1}),Ks=()=>e.f1,Ws=e.styled_default(Ks())({name:"CheckIcon",class:"ceyu3qj",propsAsIs:!0}),Gs=({points:n})=>s.jsxs(Vs,{children:[s.jsxs(Fs,{children:["You won ",s.jsx(e.d,{delay:.5,prefix:"+",suffix:" points",value:n})]}),s.jsx(Ws,{name:"icon-trophy-solid"})]}),_=e.styled_default("div")({name:"Container",class:"cq3agu2",propsAsIs:!1}),g=e.styled_default("div")({name:"Body",class:"b16qj0do",propsAsIs:!1}),T={1:3e3,2:4e3,3:4e3,4:4e3},Ys=({close:n,action:a,setStep:i,votedAnswer:l,correct:t,correctAnswerTitle:c,questionTitle:r,step:o})=>{if(p.useEffect(()=>{if(i){const f=setTimeout(()=>{T[o+1]&&(t||o<3)?i(o+1):n==null||n()},T[o]);return()=>{f&&clearTimeout(f)}}return()=>{}},[i,o,n,t]),o===1)return s.jsx(_,{children:s.jsx(g,{children:s.jsx(Ms,{})})});let y="pending";return(o===3||o===4)&&(y=t?"correct":"incorrect"),s.jsx(_,{onClick:()=>a==null?void 0:a(),children:s.jsxs(g,{children:[o!==1&&s.jsx(ks,{},o),s.jsxs($s,{state:y,step:o,answer:(l==null?void 0:l.title)||"unknown",children:[o===2&&s.jsx(Os,{title:r||"unknown"}),o===3&&t&&s.jsx(Ps,{}),o===3&&!t&&s.jsx(Us,{title:c||"unknown"}),o===4&&s.jsx(Gs,{points:(l==null?void 0:l.points)||0})]})]})})},Hs=({close:n,action:a,votedAnswer:i,correct:l,correctAnswerTitle:t,questionTitle:c})=>{const[r,o]=p.useState(1);return s.jsx(Ys,{close:n,action:a,votedAnswer:i,correct:l,correctAnswerTitle:t,questionTitle:c,setStep:o,step:r,title:""})},Js=e.styled_default("div")({name:"NotificationContainer",class:"n1i4h28u",propsAsIs:!1}),Xs=n=>s.jsx(Js,{children:s.jsx(Hs,{...n})}),k=({sdk:n})=>{const[a]=p.useState(n.getNotificationsStore()),i=e.useStore(a),l=n.getFeature(d.SdkOverlayType.GAMES),t=p.useMemo(()=>n.getActiveNotification(),[n,i]);return p.useEffect(()=>{t&&e.eventBus.emit("notification",{action:"rendered",payload:{questionId:t.data.questionId,questionType:t.data.questionType}})},[t]),t&&t.type===e.NotificationType.QUESTION_RESOLVED?t.data.question&&t.data.questionType===d.QuestionType.PREDICTION?s.jsx(Xs,{action:t.action,close:t.close,...t.data.question}):null:t&&t.type===e.NotificationType.ONBOARDING?t.data.onboarding?s.jsx(ps,{open:l==null?void 0:l.openFeature,close:t.close,...t.data.onboarding}):null:t&&s.jsx(es,{...t.data,action:t.action})},Zs=({theme:n})=>{const a=e.useStreamLayer(),i=e.useStreamLayerTheme(),l=e.useStreamLayerUI();return a&&l.appNotification?l.app?null:s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(e.h,{customTheme:n??i.theme,themeMode:i.themeMode,children:s.jsx(k,{sdk:a})})}):null};exports.StreamLayerSDKNotification=Zs;exports.StreamLayerSDKNotificationUI=k;
package/lib/cjs/points.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("react"),s=require("./index2.js"),c=require("./useStreamLayerApp2.js"),d=s.styled_default("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),m=s.styled_default("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),p=()=>s.h1,y=s.styled_default(p())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),S=s.styled_default("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),f=s.styled_default("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),j=s.styled_default("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),x=({points:e,onClick:r})=>t.jsxs(d,{className:s.f,onClick:r,children:[t.jsx(m,{children:t.jsx(y,{name:"icon-trophy"})}),t.jsxs(S,{children:[t.jsx(f,{children:"Total points"}),t.jsx(j,{children:t.jsx(s.d$1,{value:e})})]})]}),h=({gamification:e})=>{const r=e.userSummary.$store,[n,l]=i.useState(0);return i.useEffect(()=>{const u=r.subscribe(a=>{var o;(o=a==null?void 0:a.summary)!=null&&o.points&&l(a.summary.points)});return()=>{u()}},[r]),t.jsx(x,{points:n,onClick:()=>{e.status.get()===s.FeatureStatus.Suspended?e.openFeature():e.status.get()===s.FeatureStatus.Ready&&e.closeFeature(!1)}})},v=({sdk:e})=>{if(!s.useStore(e.featuresList.getStore()))return null;const r=e.getFeature(c.SdkOverlayType.GAMES);return r?t.jsx(h,{gamification:r}):null},g=({theme:e})=>{const r=s.useStreamLayer(),n=s.useStreamLayerTheme();return r?t.jsx("div",{className:"StreamLayerSDK",children:t.jsx(s.d,{customTheme:e??n,children:t.jsx(v,{sdk:r})})}):null};exports.StreamLayerSDKPoints=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("react"),e=require("./provider.js"),c=require("./useStreamLayerApp2.js"),d=e.styled_default("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),m=e.styled_default("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),p=()=>e.f1,y=e.styled_default(p())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),S=e.styled_default("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),f=e.styled_default("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),h=e.styled_default("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),j=({points:s,onClick:r})=>t.jsxs(d,{className:e.f,onClick:r,children:[t.jsx(m,{children:t.jsx(y,{name:"icon-trophy-solid"})}),t.jsxs(S,{children:[t.jsx(f,{children:"Total points"}),t.jsx(h,{children:t.jsx(e.d,{value:s})})]})]}),v=({gamification:s})=>{const r=s.userSummary.$store,[n,l]=i.useState(0);return i.useEffect(()=>{const u=r.subscribe(a=>{var o;(o=a==null?void 0:a.summary)!=null&&o.points&&l(a.summary.points)});return()=>{u()}},[r]),t.jsx(j,{points:n,onClick:()=>{s.status.get()===e.FeatureStatus.Suspended?s.openFeature():s.status.get()===e.FeatureStatus.Ready&&s.closeFeature(!1)}})},x=({sdk:s})=>{if(!e.useStore(s.featuresList.getStore()))return null;const r=s.getFeature(c.SdkOverlayType.GAMES);return r?t.jsx(v,{gamification:r}):null},g=({theme:s})=>{const r=e.useStreamLayer(),n=e.useStreamLayerTheme();return r?t.jsx("div",{className:"StreamLayerSDK",children:t.jsx(e.h,{customTheme:s??n.theme,themeMode:n.themeMode,children:t.jsx(x,{sdk:r})})}):null};exports.StreamLayerSDKPoints=g;