@streamlayer/react 1.22.3 → 1.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/lib/app/pause-ad.d.ts +2 -4
  2. package/lib/app/polymarket.d.ts +7 -0
  3. package/lib/cjs/Question.js +1 -1
  4. package/lib/cjs/advertisement.js +44 -40
  5. package/lib/cjs/analytics.js +1 -1
  6. package/lib/cjs/auth.js +1 -1
  7. package/lib/cjs/bet-pack.js +1 -1
  8. package/lib/cjs/feature.js +1 -0
  9. package/lib/cjs/hooks-WfHlJH12.js +1 -0
  10. package/lib/cjs/index-eShKGO10.js +5 -0
  11. package/lib/cjs/index.js +1 -1
  12. package/lib/cjs/index10.js +1 -1
  13. package/lib/cjs/index16.js +2 -2
  14. package/lib/cjs/index2.js +1 -1
  15. package/lib/cjs/index3.js +1 -1
  16. package/lib/cjs/index4.js +1 -1
  17. package/lib/cjs/index7.js +1 -5
  18. package/lib/cjs/insight.js +1 -1
  19. package/lib/cjs/masters.js +1 -1
  20. package/lib/cjs/masters2.js +5 -5
  21. package/lib/cjs/notification.js +1 -1
  22. package/lib/cjs/pause-ad.js +1 -1
  23. package/lib/cjs/points.js +1 -1
  24. package/lib/cjs/polymarket.js +19 -0
  25. package/lib/cjs/useStreamLayerApp2.js +17 -17
  26. package/lib/classic/app/pause-ad.d.ts +2 -4
  27. package/lib/classic/app/polymarket.d.ts +7 -0
  28. package/lib/classic/cjs/Question.js +1 -1
  29. package/lib/classic/cjs/advertisement.js +44 -40
  30. package/lib/classic/cjs/analytics.js +1 -1
  31. package/lib/classic/cjs/auth.js +1 -1
  32. package/lib/classic/cjs/bet-pack.js +3 -3
  33. package/lib/classic/cjs/feature.js +1 -0
  34. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
  35. package/lib/classic/cjs/index-eShKGO10.js +5 -0
  36. package/lib/classic/cjs/index.js +1 -1
  37. package/lib/classic/cjs/index10.js +1 -1
  38. package/lib/classic/cjs/index11.js +1 -1
  39. package/lib/classic/cjs/index12.js +1 -1
  40. package/lib/classic/cjs/index13.js +1 -1
  41. package/lib/classic/cjs/index2.js +2 -2
  42. package/lib/classic/cjs/index3.js +1 -1
  43. package/lib/classic/cjs/index4.js +1 -1
  44. package/lib/classic/cjs/index5.js +1 -1
  45. package/lib/classic/cjs/index6.js +1 -5
  46. package/lib/classic/cjs/index9.js +1 -1
  47. package/lib/classic/cjs/insight.js +1 -1
  48. package/lib/classic/cjs/notification.js +1 -1
  49. package/lib/classic/cjs/notification2.js +1 -1
  50. package/lib/classic/cjs/pause-ad.js +1 -1
  51. package/lib/classic/cjs/points.js +1 -1
  52. package/lib/classic/cjs/polymarket.js +19 -0
  53. package/lib/classic/cjs/useStreamLayerApp2.js +17 -17
  54. package/lib/classic/es/Question.js +50 -50
  55. package/lib/classic/es/advertisement.js +15547 -10742
  56. package/lib/classic/es/analytics.js +74 -18
  57. package/lib/classic/es/auth.js +1 -1
  58. package/lib/classic/es/bet-pack.js +19 -18
  59. package/lib/classic/es/feature.js +63 -0
  60. package/lib/classic/es/hooks-WfHlJH12.js +98 -0
  61. package/lib/classic/es/index-eShKGO10.js +3757 -0
  62. package/lib/classic/es/index.js +1 -1
  63. package/lib/classic/es/index10.js +1 -1
  64. package/lib/classic/es/index11.js +767 -755
  65. package/lib/classic/es/index12.js +1 -1
  66. package/lib/classic/es/index13.js +2 -2
  67. package/lib/classic/es/index2.js +125 -125
  68. package/lib/classic/es/index3.js +16 -61
  69. package/lib/classic/es/index4.js +282 -16
  70. package/lib/classic/es/index5.js +4 -283
  71. package/lib/classic/es/index6.js +5 -3758
  72. package/lib/classic/es/index9.js +1 -1
  73. package/lib/classic/es/insight.js +1 -1
  74. package/lib/classic/es/notification.js +1 -1
  75. package/lib/classic/es/notification2.js +476 -451
  76. package/lib/classic/es/pause-ad.js +174 -208
  77. package/lib/classic/es/points.js +16 -15
  78. package/lib/classic/es/polymarket.js +6670 -0
  79. package/lib/classic/es/useStreamLayerApp2.js +5088 -4030
  80. package/lib/dist/cjs/index-eShKGO10.js +5 -0
  81. package/lib/dist/cjs/masters.js +36 -36
  82. package/lib/dist/es/index-eShKGO10.js +3757 -0
  83. package/lib/dist/es/masters.js +9243 -8192
  84. package/lib/dist/index.d.ts +30 -7
  85. package/lib/dist/style.css +1 -1
  86. package/lib/es/Question.js +3 -3
  87. package/lib/es/advertisement.js +15547 -10742
  88. package/lib/es/analytics.js +74 -18
  89. package/lib/es/auth.js +1 -1
  90. package/lib/es/bet-pack.js +1 -1
  91. package/lib/es/feature.js +63 -0
  92. package/lib/es/hooks-WfHlJH12.js +98 -0
  93. package/lib/es/index-eShKGO10.js +3757 -0
  94. package/lib/es/index.js +1 -1
  95. package/lib/es/index10.js +9 -9
  96. package/lib/es/index16.js +2 -2
  97. package/lib/es/index2.js +118 -118
  98. package/lib/es/index3.js +3 -61
  99. package/lib/es/index4.js +1 -1
  100. package/lib/es/index7.js +5 -3758
  101. package/lib/es/insight.js +1 -1
  102. package/lib/es/masters.js +1 -1
  103. package/lib/es/masters2.js +23 -23
  104. package/lib/es/notification.js +450 -425
  105. package/lib/es/pause-ad.js +174 -208
  106. package/lib/es/points.js +5 -4
  107. package/lib/es/polymarket.js +6670 -0
  108. package/lib/es/useStreamLayerApp2.js +5088 -4030
  109. package/lib/style.css +1 -1
  110. package/package.json +27 -17
  111. package/lib/cjs/hooks-B0Qttldg.js +0 -1
  112. package/lib/cjs/index-DSi8Qgfs.js +0 -1
  113. package/lib/cjs/vast-client.min.js +0 -1
  114. package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
  115. package/lib/classic/cjs/index-DSi8Qgfs.js +0 -1
  116. package/lib/classic/cjs/vast-client.min.js +0 -1
  117. package/lib/classic/es/hooks-B0Qttldg.js +0 -98
  118. package/lib/classic/es/index-DSi8Qgfs.js +0 -65
  119. package/lib/classic/es/vast-client.min.js +0 -1060
  120. package/lib/es/hooks-B0Qttldg.js +0 -98
  121. package/lib/es/index-DSi8Qgfs.js +0 -65
  122. package/lib/es/vast-client.min.js +0 -1060
@@ -1 +1 @@
1
- "use strict";const s=require("react/jsx-runtime"),xs=require("./index7.js"),y=require("react"),e=require("./sl-types.js"),Is=require("./index3.js"),A=require("./index12.js"),k=require("./index8.js"),x=require("./index5.js"),d=require("./useStreamLayerApp2.js"),S=require("./index10.js"),Y=require("./index9.js"),fs=require("./index4.js"),C=require("./hooks-B0Qttldg.js"),K=e.styled_default("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),js=e.styled_default("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),vs=e.styled_default("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),As=e.styled_default("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),hs=()=>x.B1,g=e.styled_default(hs())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),$s=()=>g,gs=e.styled_default($s())({name:"QuestionCheckIcon",class:"qxlt78s",propsAsIs:!0}),_s=()=>x.B1,Ts=e.styled_default(_s())({name:"QuestionTypeIcon",class:"qmg0vkx",propsAsIs:!0}),ws=e.styled_default("div")({name:"QuestionTypeLabel",class:"q1uz5j1g",propsAsIs:!1}),bs=e.styled_default("div")({name:"QuestionContent",class:"qc3icwa",propsAsIs:!1}),H=e.styled_default("button")({name:"PlayButton",class:"p169lohr",propsAsIs:!1}),Cs=e.styled_default("div")({name:"SkeletonContainer",class:"s1f43z3r",propsAsIs:!1}),qs=()=>k.e,ks=e.styled_default(qs())({name:"SkeletonButton",class:"s16k8geu",propsAsIs:!0}),Ns={[d.PickHistoryStatus.LOST]:s.jsx(g,{name:"incorrectVoted"}),[d.PickHistoryStatus.WON]:s.jsx(gs,{name:"icon-check"}),[d.PickHistoryStatus.UNSET]:s.jsx(g,{name:"icon-arrow"}),[d.PickHistoryStatus.DNP]:s.jsx(g,{name:"icon-arrow"})},Ss=()=>s.jsxs(Cs,{children:[s.jsx(k.i,{loading:!0,style:{width:"35%"}}),s.jsx(k.i,{loading:!0,style:{width:"70%"}}),s.jsx(ks,{})]}),E=({questionTypeData:t,questionType:o,questionStatus:i})=>s.jsxs(js,{className:"SL_QuestionCaption",children:[s.jsx(Ts,{className:"SL_QuestionTypeIcon","data-testid":"question-type-icon","data-type-trivia":o===d.QuestionType.TRIVIA,"data-type-poll":o===d.QuestionType.POLL,name:t.iconName}),s.jsxs(ws,{className:"SL_QuestionTypeLabel",children:[t.label,o===d.QuestionType.TRIVIA&&i===d.QuestionStatus.RESOLVED&&" • Expired"]})]}),Es=({questionId:t,questionType:o,questionStatus:i,subject:n,openForVoting:a,status:u})=>{const c=A.e[o],l=Ns[u];return c?s.jsxs(K,{"data-a":"intr","data-name":t,children:[s.jsxs(bs,{children:[s.jsx(E,{questionTypeData:c,questionType:o,questionStatus:i}),s.jsx(vs,{children:n||""})]}),s.jsx(As,{children:a?s.jsx(H,{"data-a":"intr","data-name":t,children:"Play"}):l})]}):null};var D;(function(t){t.OPENED="opened"})(D||(D={}));const h=e.styled_default("div")({name:"Media",class:"m1bcvojl",propsAsIs:!1}),Ls=()=>h,Qs=e.styled_default(Ls())({name:"MediaImgBottom",class:"m58gin0",propsAsIs:!0}),Ds=()=>h,q=e.styled_default(Ds())({name:"MediaImgSolid",class:"m1atm8do",propsAsIs:!0}),Bs=()=>h,Ms=e.styled_default(Bs())({name:"MediaImgRounded",class:"myx3xoi",propsAsIs:!0}),Rs=()=>h,Os=e.styled_default(Rs())({name:"MediaImgCentered",class:"m1bwv0gx",propsAsIs:!0}),Ps=()=>h,zs=e.styled_default(Ps())({name:"MediaImgInsight",class:"mntjanp",propsAsIs:!0}),Us=e.styled_default("div")({name:"VideoIcon",class:"v1kofb47",propsAsIs:!1}),Vs={[d.QuestionImages.UNSET]:q,[d.QuestionImages.NONE]:q,[d.QuestionImages.ROUNDED]:Ms,[d.QuestionImages.CENTERED]:Os,[d.QuestionImages.TRANSPARENT]:Qs,[d.QuestionImages.SOLID]:q},B=({src:t,imageMode:o=d.QuestionImages.UNSET,withVideo:i,fromInsight:n})=>{if(o===d.QuestionImages.NONE)return null;const a=n?zs:Vs[o];return s.jsxs(a,{children:[s.jsx("img",{src:t,alt:""}),i&&s.jsx(Us,{children:s.jsx(x.B1,{name:"icon-play"})})]})},Fs=e.styled_default("div")({name:"NotificationContent",class:"nuraq9m",propsAsIs:!1}),Ws=e.styled_default("div")({name:"NotificationContainer",class:"ns1nzpg",propsAsIs:!1}),G=e.styled_default("div")({name:"Body",class:"b1j59nzs",propsAsIs:!1}),Ys=e.styled_default("div")({name:"Title",class:"t9vmnpp",propsAsIs:!1}),Ks=e.styled_default("button")({name:"Button",class:"b14ivj5k",propsAsIs:!1}),Hs=()=>x.B1,Gs=e.styled_default(Hs())({name:"StyledChevronRight",class:"s1atci8n",propsAsIs:!0}),Xs=e.styled_default("div")({name:"QuoteWrap",class:"q4w8jgs",propsAsIs:!1}),Js=e.styled_default("blockquote")({name:"Quote",class:"qaa0kez",propsAsIs:!1}),Zs=e.styled_default("div")({name:"Body",class:"b1wvd52w",propsAsIs:!1}),se=e.styled_default("div")({name:"Container",class:"ccvukea",propsAsIs:!1}),ee=({image:t,tweet:o,account:i,accountVerified:n,body:a,title:u})=>{var c;return s.jsxs(se,{children:[u&&s.jsx(Xs,{children:s.jsx(Js,{children:u})}),s.jsx(A.D,{image:t,name:(c=o==null?void 0:o.meta)==null?void 0:c.accountName,userName:i,verified:n,createdTweet:o==null?void 0:o.date}),s.jsx(Zs,{children:A.D$1(a)})]})},te=({title:t,questionType:o,questionTypeData:i})=>s.jsxs(G,{children:[s.jsx(E,{questionTypeData:i,questionType:o,questionStatus:d.QuestionStatus.UNSET}),t&&s.jsx(Ys,{children:t})]}),ne=({tweet:t})=>t?s.jsx(G,{children:s.jsx(ee,{...t,controlVideo:()=>{}})}):null,oe=({action:t,questionType:o,inApp:i,insight:n,tweet:a})=>{var u;const c=A.e[o],l=A.o[o];if(!c||!i||!i.notification)return null;const{title:p,image:m,imageMode:f}=i.notification;let I=m;o===d.QuestionType.TWEET&&a!=null&&a.tweetMedia&&(I=a.tweetMedia.image),f===d.QuestionImages.NONE&&(I="");const j=i.useMediaFromContent&&(n==null?void 0:n.image),r=o===d.QuestionType.TWEET&&((u=a==null?void 0:a.tweetMedia)==null?void 0:u.video)||o===d.QuestionType.FACTOID&&(n==null?void 0:n.video);return s.jsx(Ws,{"data-a":"intr",className:"SL_InApp",onClick:t,children:s.jsxs(Fs,{style:I?{}:{paddingLeft:"1.5rem"},children:[I&&!j&&s.jsx(B,{src:I,imageMode:f,withVideo:!!r}),j&&s.jsx(B,{src:j,fromInsight:!0,withVideo:!!r}),o===d.QuestionType.TWEET?s.jsx(ne,{tweet:a}):s.jsx(te,{questionTypeData:c,questionType:o,title:p}),s.jsx(Ks,{name:"inapp-button",children:l||"Open"}),s.jsx(Gs,{name:"chevronRight"})]})})},ie=()=>({color:t})=>t||"transparent",M=e.styled_default("div")({name:"MediaComponentWrap",class:"mek728j",propsAsIs:!1,vars:{"mek728j-0":[ie()]}}),v=e.styled_default("div")({name:"Media",class:"m461t56",propsAsIs:!1}),ae=()=>v,le=e.styled_default(ae())({name:"MediaImgBottom",class:"m22bh04",propsAsIs:!0}),de=()=>v,re=e.styled_default(de())({name:"MediaVideo",class:"m17u1e34",propsAsIs:!0}),ce=()=>v,ue=e.styled_default(ce())({name:"MediaImgContentMedia",class:"m4j3eds",propsAsIs:!0}),pe=()=>v,me=e.styled_default(pe())({name:"MediaImgSolid",class:"m1lp3swr",propsAsIs:!0}),ye=()=>v,xe=e.styled_default(ye())({name:"MediaImgRounded",class:"mc7lij",propsAsIs:!0}),Ie=()=>v,fe=e.styled_default(Ie())({name:"MediaImgCentered",class:"mwwaw7o",propsAsIs:!0}),je=()=>v,N=e.styled_default(je())({name:"MediaNone",class:"mqfzyyr",propsAsIs:!0}),ve="v170mtgf",Ae={[d.QuestionImages.UNSET]:N,[d.QuestionImages.NONE]:N,[d.QuestionImages.ROUNDED]:xe,[d.QuestionImages.CENTERED]:fe,[d.QuestionImages.TRANSPARENT]:le,[d.QuestionImages.SOLID]:me},R=({src:t,imageMode:o=d.QuestionImages.UNSET,withVideo:i,color:n,useContentMedia:a,thumbnailUrl:u})=>{if(!t)return s.jsx(M,{color:n,children:s.jsx(N,{})});const c=a===d.NotificationUseContentMedia.ENABLED?ue:Ae[o];return s.jsx(M,{color:n,children:i?s.jsx(re,{children:s.jsx(Y.Et,{className:ve,source:t,poster:u||""})}):s.jsx(c,{children:s.jsx("img",{src:t,alt:""})})})},he=()=>({withoutPadding:t})=>t?"0px":"1rem",X=e.styled_default("div")({name:"NotificationContent",class:"n1p3bk1c",propsAsIs:!1,vars:{"n1p3bk1c-0":[he()]}}),$e=e.styled_default("div")({name:"MainContent",class:"m1g211mu",propsAsIs:!1}),ge=()=>x.B1,_e=e.styled_default(ge())({name:"StyledChevronRight",class:"sx1hq4c",propsAsIs:!0}),J=e.styled_default("div")({name:"NotificationContainer",class:"n1fcriet",propsAsIs:!1}),Te=()=>({questionType:t})=>t===d.QuestionType.FACTOID?"7.3rem":"4.5rem",we=()=>({webos:t})=>t?"11px 0px 8px 0px":"11px 0px",be=()=>({imageMode:t,webos:o})=>o?"330px":t===d.QuestionImages.SOLID?"310px":t===d.QuestionImages.CENTERED||t===d.QuestionImages.ROUNDED||t===d.QuestionImages.TRANSPARENT?"370px":"430px",Ce=e.styled_default("div")({name:"Body",class:"b1byyovs",propsAsIs:!1,vars:{"b1byyovs-0":[Te()],"b1byyovs-1":[we()],"b1byyovs-2":[be()]}}),qe=()=>({webos:t})=>t?"0.85rem":"1.033rem",ke=()=>({webos:t})=>t?"0.95rem":"1.25rem",Ne=()=>({webos:t})=>t?"4.7rem":"2.25rem",Se=()=>({webos:t})=>t?"pre-wrap":"nowrap",Ee=e.styled_default("div")({name:"Title",class:"t1y5k5id",propsAsIs:!1,vars:{"t1y5k5id-0":[qe()],"t1y5k5id-1":[ke()],"t1y5k5id-2":[Ne()],"t1y5k5id-3":[Se()]}}),Le=e.styled_default("div")({name:"Description",class:"dw9eb7l",propsAsIs:!1}),Qe=e.styled_default("div")({name:"LogoImgContainer",class:"ldu8wgy",propsAsIs:!1}),Z=e.styled_default("img")({name:"LogoImg",class:"ln4a3eh",propsAsIs:!1}),De=()=>J,Be=e.styled_default(De())({name:"NotificationInterstitialContainer",class:"no2k63v",propsAsIs:!0}),Me=e.styled_default("div")({name:"TVButtons",class:"th9nn6a",propsAsIs:!1}),ss=e.styled_default("button")({name:"TVButton",class:"t1eee77p",propsAsIs:!1}),Re=()=>ss,Oe=e.styled_default(Re())({name:"DismissButton",class:"ds000hw",propsAsIs:!0}),Pe=()=>ss,ze=e.styled_default(Pe())({name:"AnswerButton",class:"a1nz9hoe",propsAsIs:!0}),Ue=({title:t,questionType:o,questionTypeData:i,description:n,imageMode:a,webos:u})=>s.jsxs(Ce,{imageMode:a,questionType:o,webos:u,children:[s.jsx(E,{questionTypeData:i,questionType:o,questionStatus:d.QuestionStatus.UNSET}),t&&s.jsx(Ee,{webos:u,children:t}),n&&s.jsx(Le,{children:n})]}),Ve=S.O(Be),Fe=S.O(Oe),We=S.O(ze),Ye=({sponsorLogo:t,onClick:o,webos:i})=>s.jsx(Ve,{autoFocus:!0,webos:i,onClick:o,"data-webos":i,children:s.jsx(X,{withoutPadding:!0,children:s.jsx(Z,{src:t})})}),Ke=({action:t,close:o,questionType:i,inApp:n,insight:a,color:u,webos:c})=>{var l,p,m;const[f,I]=y.useState(!1),j=y.useRef();y.useEffect(()=>(n!=null&&n.sponsorLogo&&(I(!0),j.current=setTimeout(()=>{I(!1)},5e3)),()=>clearTimeout(j.current)),[n==null?void 0:n.sponsorLogo]);const r=A.e[i];if(!r||!n||!n.notification)return null;const{title:cs,image:us,imageMode:_,useContentMedia:T}=n.notification,ps=i===d.QuestionType.FACTOID?a==null?void 0:a.heading:cs,ms=i===d.QuestionType.FACTOID?a==null?void 0:a.body:"",ys=us,w=i===d.QuestionType.FACTOID&&((l=a==null?void 0:a.video)==null?void 0:l.url)&&(n==null?void 0:n.isVideo)&&T===d.NotificationUseContentMedia.ENABLED,b=T===d.NotificationUseContentMedia.ENABLED?w?(p=a==null?void 0:a.video)==null?void 0:p.url:a==null?void 0:a.image:"";return n!=null&&n.sponsorLogo&&f?s.jsx(Ye,{sponsorLogo:n==null?void 0:n.sponsorLogo,webos:c,onClick:()=>I(!1)}):s.jsxs(J,{"data-a":"intr",className:"SL_InApp",onClick:$=>{c||t==null||t($)},"data-is-insight":i===d.QuestionType.FACTOID,"data-webos":c,children:[(n==null?void 0:n.sponsorLogo)&&s.jsx(Qe,{children:s.jsx(Z,{src:n==null?void 0:n.sponsorLogo})}),s.jsxs(X,{children:[s.jsxs($e,{children:[!b&&s.jsx(R,{src:ys,imageMode:_,withVideo:!!w,color:u}),b&&s.jsx(R,{src:b,imageMode:_,withVideo:!!w,color:u,useContentMedia:T,thumbnailUrl:(m=a==null?void 0:a.video)==null?void 0:m.thumbnailUrl}),s.jsx(Ue,{questionTypeData:r,questionType:i,title:ps,description:ms,imageMode:_,webos:c})]}),!c&&s.jsx(_e,{name:"chevronRight"}),c&&s.jsxs(Me,{children:[s.jsx(Fe,{webos:!0,"data-close-btn":"true",onClick:$=>{$.stopPropagation(),o==null||o($)},children:"Dismiss"}),s.jsx(We,{webos:!0,autoFocus:!0,onClick:t,children:"Answer"})]})]})]})},He=e.styled_default("div")({name:"NotificationContainer",class:"n11jcrxe",propsAsIs:!1}),O=e.styled_default("img")({name:"Icon",class:"i1vmpt6u",propsAsIs:!1}),Ge=e.styled_default("div")({name:"IconContainer",class:"i180665s",propsAsIs:!1}),Xe=()=>x.B1,Je=e.styled_default(Xe())({name:"TitleIcon",class:"t16zzzei",propsAsIs:!0}),Ze=()=>Y.y,st=e.styled_default(Ze())({name:"Close",class:"c1sur0q2",propsAsIs:!0}),et=e.styled_default("div")({name:"Body",class:"bai9j52",propsAsIs:!1}),tt=e.styled_default("div")({name:"Title",class:"t1bnt25p",propsAsIs:!1}),nt=e.styled_default("div")({name:"Description",class:"dmixjec",propsAsIs:!1}),ot=e.styled_default("button")({name:"Button",class:"b1ubkw1q",propsAsIs:!1}),it=({open:t,close:o,...i})=>{var n,a;return s.jsxs(He,{"data-a":"intr",onClick:()=>{t==null||t(),i&&i.markIstantOpen()},children:[s.jsxs(Ge,{children:[s.jsx(O,{className:"on-light",src:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png"}),s.jsx(O,{className:"on-dark",src:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"})]}),s.jsxs(et,{children:[s.jsxs(tt,{children:[s.jsx(Je,{name:"icon-trophy-solid"}),(n=i==null?void 0:i.titleCard)==null?void 0:n.title]}),s.jsxs(nt,{children:[s.jsx("span",{children:(a=i==null?void 0:i.titleCard)==null?void 0:a.subtitle}),s.jsx(ot,{name:"inapp-button",children:"Play Now"})]})]}),s.jsx(st,{close:u=>{u==null||u.stopPropagation(),o==null||o()}})]})},at=e.styled_default("div")({name:"Container",class:"cef8huz",propsAsIs:!1}),lt=()=>x.B1,dt=e.styled_default(lt())({name:"CheckIcon",class:"c1mo15kk",propsAsIs:!0}),rt=()=>x.B1,ct=e.styled_default(rt())({name:"PredictionIcon",class:"p16zkqnm",propsAsIs:!0}),ut=e.styled_default("div")({name:"PredictionIconContainer",class:"pjszi7a",propsAsIs:!1}),pt=e.styled_default("div")({name:"BodyContainer",class:"bftbmo3",propsAsIs:!1}),mt=e.styled_default("div")({name:"Body",class:"barrbyu",propsAsIs:!1}),yt=e.styled_default("div")({name:"Subtitle",class:"sz7237i",propsAsIs:!1}),xt=({step:t,children:o,answer:i,state:n="pending"})=>{const[a,u]=y.useState(0),[c]=y.useState(()=>new ResizeObserver(p=>{window.requestAnimationFrame(()=>{var m,f;u(((f=(m=p==null?void 0:p[0])==null?void 0:m.contentRect)==null?void 0:f.width)??0)})})),l=y.useCallback(p=>{p?c.observe(p):c.disconnect()},[c]);return y.useEffect(()=>()=>{c.disconnect()},[c]),s.jsxs(at,{children:[s.jsx(ut,{children:s.jsx(ct,{name:"icon-prediction"})}),s.jsx(pt,{style:{minWidth:`${a}px`},children:s.jsx(mt,{children:o},t)}),s.jsx(yt,{ref:l,className:n,children:s.jsxs("div",{children:[s.jsx(dt,{name:"icon-check"}),"Your Pick: ",i]})})]})},It=e.styled_default("div")({name:"Container",class:"ckyzolp",propsAsIs:!1}),L=e.styled_default("div")({name:"Line",class:"l16t1zr7",propsAsIs:!1}),ft=()=>L,jt=e.styled_default(ft())({name:"Line1",class:"le78kvg",propsAsIs:!0}),vt=()=>L,At=e.styled_default(vt())({name:"Line2",class:"l1o7966d",propsAsIs:!0}),ht=()=>L,$t=e.styled_default(ht())({name:"Line3",class:"lu9lyxq",propsAsIs:!0}),gt=()=>s.jsxs(It,{children:[s.jsx(jt,{children:s.jsx("div",{})}),s.jsx(At,{children:s.jsx("div",{})}),s.jsx($t,{children:s.jsx("div",{})})]}),_t=e.styled_default("div")({name:"Container",class:"c10jy6zf",propsAsIs:!1}),Tt=()=>x.B1,wt=e.styled_default(Tt())({name:"CheckIcon",class:"c1c7scay",propsAsIs:!0}),bt=()=>s.jsxs(_t,{children:[s.jsx(wt,{name:"icon-check"})," Prediction results are in!"]}),Ct=e.styled_default("div")({name:"Container",class:"cf6k2yy",propsAsIs:!1}),qt=e.styled_default("div")({name:"Caption",class:"c1c8xjus",propsAsIs:!1}),kt=e.styled_default("div")({name:"Title",class:"t1d1uekn",propsAsIs:!1}),Nt=({title:t})=>s.jsxs(Ct,{children:[s.jsx(qt,{children:"Results for"}),s.jsx(kt,{children:t})]}),es=e.styled_default("div")({name:"Container",class:"c181a1as",propsAsIs:!1}),ts=e.styled_default("div")({name:"Title",class:"t1cduox6",propsAsIs:!1}),St=()=>x.B1,ns=e.styled_default(St())({name:"CorrectIcon",class:"c1onrv6j",propsAsIs:!0}),Et=()=>ns,Lt=e.styled_default(Et())({name:"InCorrectIcon",class:"i17n9o7e",propsAsIs:!0}),Qt=()=>s.jsxs(es,{children:[s.jsxs(ts,{children:["Congratulations!",s.jsx("br",{}),"You answered correctly."]}),s.jsx(ns,{name:"icon-check"})]}),Dt=({title:t})=>s.jsxs(es,{children:[s.jsxs(ts,{children:["Better luck next time!",s.jsx("br",{}),"Correct: ",t]}),s.jsx(Lt,{name:"icon-cross"})]}),Bt=e.styled_default("div")({name:"Container",class:"cnxgcs2",propsAsIs:!1}),Mt=e.styled_default("div")({name:"Title",class:"t903f8n",propsAsIs:!1}),Rt=()=>x.B1,Ot=e.styled_default(Rt())({name:"CheckIcon",class:"ceyu3qj",propsAsIs:!0}),Pt=({points:t})=>s.jsxs(Bt,{children:[s.jsxs(Mt,{children:["You won ",s.jsx(fs.d,{delay:.5,prefix:"+",suffix:" points",value:t})]}),s.jsx(Ot,{name:"icon-trophy-solid"})]}),P=e.styled_default("div")({name:"Container",class:"cq3agu2",propsAsIs:!1}),z=e.styled_default("div")({name:"Body",class:"b16qj0do",propsAsIs:!1}),U={1:3e3,2:4e3,3:4e3,4:4e3},zt=({close:t,action:o,setStep:i,votedAnswer:n,correct:a,correctAnswerTitle:u,questionTitle:c,step:l})=>{if(y.useEffect(()=>{if(i){const m=setTimeout(()=>{U[l+1]&&(a||l<3)?i(l+1):t==null||t()},U[l]);return()=>{m&&clearTimeout(m)}}return()=>{}},[i,l,t,a]),l===1)return s.jsx(P,{children:s.jsx(z,{children:s.jsx(bt,{})})});let p="pending";return(l===3||l===4)&&(p=a?"correct":"incorrect"),s.jsx(P,{"data-a":"intr",onClick:()=>o==null?void 0:o(),children:s.jsxs(z,{children:[l!==1&&s.jsx(gt,{},l),s.jsxs(xt,{state:p,step:l,answer:(n==null?void 0:n.title)||"unknown",children:[l===2&&s.jsx(Nt,{title:c||"unknown"}),l===3&&a&&s.jsx(Qt,{}),l===3&&!a&&s.jsx(Dt,{title:u||"unknown"}),l===4&&s.jsx(Pt,{points:(n==null?void 0:n.points)||0})]})]})})},Ut=({close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:a,questionTitle:u})=>{const[c,l]=y.useState(1);return s.jsx(zt,{close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:a,questionTitle:u,setStep:l,step:c,title:""})},Vt=e.styled_default("div")({name:"NotificationContainer",class:"n1i4h28u",propsAsIs:!1}),Ft=t=>s.jsx(Vt,{children:s.jsx(Ut,{...t})}),Wt=e.styled_default("div")({name:"Container",class:"cwa9tgs",propsAsIs:!1}),Yt=e.styled_default("div")({name:"BodyContainer",class:"b1xx7swj",propsAsIs:!1}),Kt=e.styled_default("div")({name:"Body",class:"b1a21en",propsAsIs:!1}),Ht=({step:t,children:o,state:i="pending"})=>{const[n,a]=y.useState(0);return y.useEffect(()=>{const u=new ResizeObserver(c=>{window.requestAnimationFrame(()=>{var l,p;const m=((p=(l=c==null?void 0:c[0])==null?void 0:l.contentRect)==null?void 0:p.width)??0;a(m)})});return()=>{u.disconnect()}},[]),s.jsx(Wt,{style:{padding:`${t===3&&i==="incorrect"||t===1?"5px 100px":"5px 40px"}`},children:s.jsx(Yt,{style:{minWidth:`${n}px`},children:s.jsx(Kt,{children:o},t)})})},Gt=e.styled_default("div")({name:"Container",class:"c1nd5cu8",propsAsIs:!1}),Q=e.styled_default("div")({name:"Line",class:"lgbipw0",propsAsIs:!1}),Xt=()=>Q,Jt=e.styled_default(Xt())({name:"Line1",class:"l1anth16",propsAsIs:!0}),Zt=()=>Q,sn=e.styled_default(Zt())({name:"Line2",class:"l193yd7v",propsAsIs:!0}),en=()=>Q,tn=e.styled_default(en())({name:"Line3",class:"lhbflsp",propsAsIs:!0}),nn=()=>s.jsxs(Gt,{children:[s.jsx(Jt,{children:s.jsx("div",{})}),s.jsx(sn,{children:s.jsx("div",{})}),s.jsx(tn,{children:s.jsx("div",{})})]}),on=e.styled_default("div")({name:"Container",class:"c1lvd429",propsAsIs:!1}),an=()=>x.B1,ln=e.styled_default(an())({name:"PredictionIcon",class:"p1n4m87t",propsAsIs:!0}),dn=()=>s.jsxs(on,{children:[s.jsx(ln,{name:"icon-prediction"})," Prediction results are in!"]}),rn=()=>x.B1,cn=e.styled_default(rn())({name:"CheckIcon",class:"c126r8f9",propsAsIs:!0}),un=e.styled_default("div")({name:"Answer",class:"a1o2rpgl",propsAsIs:!1}),pn=e.styled_default("div")({name:"Container",class:"cej6ci1",propsAsIs:!1}),mn=e.styled_default("div")({name:"Title",class:"tob24mr",propsAsIs:!1}),yn=({title:t,answer:o})=>s.jsxs(pn,{children:[s.jsx(mn,{children:t}),s.jsxs(un,{children:[s.jsx(cn,{name:"icon-prediction"}),"Your Pick: ",o]})]}),os=e.styled_default("div")({name:"Container",class:"c1lesal4",propsAsIs:!1}),is=e.styled_default("div")({name:"Title",class:"tv66n4w",propsAsIs:!1}),xn=()=>x.B1,In=e.styled_default(xn())({name:"CorrectIcon",class:"cx0vlv2",propsAsIs:!0}),as=e.styled_default("div")({name:"Answer",class:"akfh4v5",propsAsIs:!1}),fn=({answer:t})=>s.jsxs(os,{children:[s.jsx(is,{children:"Congratulations! You answered correctly."}),s.jsxs(as,{children:[s.jsx(In,{name:"icon-correct"}),"Your Pick: ",t]})]}),jn=({title:t,answer:o})=>s.jsxs(os,{children:[s.jsxs(is,{children:["Better luck next time!",s.jsx("br",{}),"Correct: ",t]}),s.jsxs(as,{children:["Your Pick: ",o]})]}),V=e.styled_default("div")({name:"Container",class:"cmox3ot",propsAsIs:!1}),F=e.styled_default("div")({name:"Body",class:"bqq1ix4",propsAsIs:!1}),W={1:3e3,2:4e3,3:4e3},vn=({close:t,action:o,setStep:i,votedAnswer:n,correct:a,correctAnswerTitle:u,questionTitle:c,step:l})=>{if(y.useEffect(()=>{if(i){const m=setTimeout(()=>{W[l+1]&&(a||l<3)?i(l+1):t==null||t()},W[l]);return()=>{m&&clearTimeout(m)}}return()=>{}},[i,l,t,a]),l===1)return s.jsx(V,{children:s.jsx(F,{children:s.jsx(dn,{})})});let p="pending";return l===3&&(p=a?"correct":"incorrect"),s.jsx(V,{"data-a":"intr",onClick:()=>o==null?void 0:o(),children:s.jsxs(F,{children:[l!==1&&s.jsx(nn,{},l),s.jsxs(Ht,{state:p,step:l,children:[l===2&&s.jsx(yn,{title:c||"unknown",answer:(n==null?void 0:n.title)||"unknown"}),l===3&&a&&s.jsx(fn,{answer:(n==null?void 0:n.title)||"unknown"}),l===3&&!a&&s.jsx(jn,{title:u||"unknown",answer:(n==null?void 0:n.title)||"unknown"})]})]})})},An=({close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:a,questionTitle:u})=>{const[c,l]=y.useState(1);return s.jsx(vn,{close:t,action:o,votedAnswer:i,correct:n,correctAnswerTitle:a,questionTitle:u,setStep:l,step:c,title:""})},ls=e.styled_default("div")({name:"NotificationContainer",class:"nn0nqh6",propsAsIs:!1}),hn=()=>({withoutPadding:t})=>t?"0px":"1rem",$n=e.styled_default("div")({name:"NotificationContent",class:"n1bcdf3j",propsAsIs:!1,vars:{"n1bcdf3j-0":[hn()]}}),ds=e.styled_default("img")({name:"LogoImg",class:"l8jorbq",propsAsIs:!1}),gn=()=>ls,_n=e.styled_default(gn())({name:"NotificationInterstitialContainer",class:"nf920y3",propsAsIs:!0}),Tn=e.styled_default("div")({name:"LogoImgContainer",class:"lzsmehn",propsAsIs:!1}),wn=({sponsorLogo:t,onClick:o})=>s.jsx(_n,{onClick:o,children:s.jsx($n,{withoutPadding:!0,children:s.jsx(ds,{src:t})})}),bn=t=>{var o,i,n,a,u;const[c,l]=y.useState(!1),p=y.useRef();return y.useEffect(()=>{var m;return(m=t==null?void 0:t.inApp)!=null&&m.sponsorLogo&&(l(!0),p.current=setTimeout(()=>{l(!1)},5e3)),()=>clearTimeout(p.current)},[(o=t==null?void 0:t.inApp)==null?void 0:o.sponsorLogo]),(i=t==null?void 0:t.inApp)!=null&&i.sponsorLogo&&c?s.jsx(wn,{sponsorLogo:(n=t.inApp)==null?void 0:n.sponsorLogo,onClick:()=>l(!1)}):s.jsx(ls,{children:s.jsxs("div",{children:[((a=t==null?void 0:t.inApp)==null?void 0:a.sponsorLogo)&&s.jsx(Tn,{children:s.jsx(ds,{src:(u=t==null?void 0:t.inApp)==null?void 0:u.sponsorLogo})}),s.jsx(An,{...t})]})})},rs=({sdk:t,webos:o})=>{var i,n,a,u,c,l,p,m;const[f]=y.useState(t.getNotificationsStore()),I=e.useStore(f),j=t.getFeature(d.SdkOverlayType.GAMES),r=y.useMemo(()=>t.getActiveNotification(),[t,I]);return y.useEffect(()=>{r&&Is.eventBus.emit("notification",{action:"rendered",payload:{questionId:r.data.questionId,questionType:r.data.questionType}})},[r]),r&&r.type===e.NotificationType.QUESTION_RESOLVED?r.data.question&&r.data.questionType===d.QuestionType.PREDICTION?r&&((i=r.data.inApp)==null?void 0:i.adUnit)===d.AdUnit.STANDART?s.jsx(bn,{action:r.action,close:r.close,...r.data.question,inApp:r.data.inApp}):s.jsx(Ft,{action:r.action,close:r.close,...r.data.question}):null:r&&r.type===e.NotificationType.ONBOARDING?r.data.onboarding?s.jsx(it,{open:j==null?void 0:j.openOnboarding,close:r.close,...r.data.onboarding}):null:r&&((n=r.data.inApp)==null?void 0:n.adUnit)===d.AdUnit.STANDART?s.jsx(Ke,{...r.data,action:r.action,close:r.close,color:((c=(u=(a=r==null?void 0:r.data)==null?void 0:a.inApp)==null?void 0:u.notification)==null?void 0:c.indicatorColor)||((m=(p=(l=r==null?void 0:r.data)==null?void 0:l.inApp)==null?void 0:p.appearance)==null?void 0:m.primaryColor),webos:o}):r&&s.jsx(oe,{...r.data,action:r.action})},Cn=({theme:t})=>{const o=C.B(),i=C.z(),n=C.F();return o&&(n.appNotification||n.onboardingNotification)?n.app&&!n.onboardingNotification?null:s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(xs.h,{customTheme:t??i.theme,themeMode:i.themeMode,children:s.jsx(rs,{sdk:o})})}):null};exports.D=Ss;exports.K=rs;exports.R=Es;exports.S=H;exports.StreamLayerSDKNotification=Cn;exports.r=K;
1
+ "use strict";const s=require("react/jsx-runtime"),fs=require("./index7.js"),y=require("react"),e=require("./sl-types.js"),Is=require("./index5.js");require("./feature.js");const A=require("./index12.js"),q=require("./index8.js"),x=require("./index4.js"),d=require("./useStreamLayerApp2.js"),S=require("./index10.js"),H=require("./index9.js"),js=require("./index3.js"),C=require("./hooks-WfHlJH12.js"),K=e.styled_default("div")({name:"QuestionItem",class:"q1w97g3p",propsAsIs:!1}),vs=e.styled_default("div")({name:"QuestionCaption",class:"q2sl39u",propsAsIs:!1}),As=e.styled_default("div")({name:"QuestionBody",class:"qd5h0uc",propsAsIs:!1}),hs=e.styled_default("div")({name:"QuestionAction",class:"q105uluy",propsAsIs:!1}),$s=()=>x.B1,g=e.styled_default($s())({name:"QuestionActionIcon",class:"q1fa0b9h",propsAsIs:!0}),gs=()=>g,_s=e.styled_default(gs())({name:"QuestionCheckIcon",class:"qxlt78s",propsAsIs:!0}),Ts=()=>x.B1,ws=e.styled_default(Ts())({name:"QuestionTypeIcon",class:"qmg0vkx",propsAsIs:!0}),bs=e.styled_default("div")({name:"QuestionTypeLabel",class:"q1uz5j1g",propsAsIs:!1}),Cs=e.styled_default("div")({name:"QuestionContent",class:"qc3icwa",propsAsIs:!1}),G=e.styled_default("button")({name:"PlayButton",class:"p169lohr",propsAsIs:!1}),Ns=e.styled_default("div")({name:"SkeletonContainer",class:"s1f43z3r",propsAsIs:!1}),qs=()=>q.e,ks=e.styled_default(qs())({name:"SkeletonButton",class:"s16k8geu",propsAsIs:!0}),Ss={[d.PickHistoryStatus.LOST]:s.jsx(g,{name:"incorrectVoted"}),[d.PickHistoryStatus.WON]:s.jsx(_s,{name:"icon-check"}),[d.PickHistoryStatus.UNSET]:s.jsx(g,{name:"icon-arrow"}),[d.PickHistoryStatus.DNP]:s.jsx(g,{name:"icon-arrow"})},Es=()=>s.jsxs(Ns,{children:[s.jsx(q.i,{loading:!0,style:{width:"35%"}}),s.jsx(q.i,{loading:!0,style:{width:"70%"}}),s.jsx(ks,{})]}),E=({questionTypeData:t,questionType:n,questionStatus:i})=>s.jsxs(vs,{className:"SL_QuestionCaption",children:[s.jsx(ws,{className:"SL_QuestionTypeIcon","data-testid":"question-type-icon","data-type-trivia":n===d.QuestionType.TRIVIA,"data-type-poll":n===d.QuestionType.POLL,name:t.iconName}),s.jsxs(bs,{className:"SL_QuestionTypeLabel",children:[t.label,n===d.QuestionType.TRIVIA&&i===d.QuestionStatus.RESOLVED&&" • Expired"]})]}),Ls=({questionId:t,questionType:n,questionStatus:i,subject:o,openForVoting:a,status:u})=>{const c=A.e[n],l=Ss[u];return c?s.jsxs(K,{"data-a":"intr","data-name":t,children:[s.jsxs(Cs,{children:[s.jsx(E,{questionTypeData:c,questionType:n,questionStatus:i}),s.jsx(As,{children:o||""})]}),s.jsx(hs,{children:a?s.jsx(G,{"data-a":"intr","data-name":t,children:"Play"}):l})]}):null};var M;(function(t){t.OPENED="opened"})(M||(M={}));const h=e.styled_default("div")({name:"Media",class:"m1bcvojl",propsAsIs:!1}),Qs=()=>h,Ds=e.styled_default(Qs())({name:"MediaImgBottom",class:"m58gin0",propsAsIs:!0}),Ms=()=>h,N=e.styled_default(Ms())({name:"MediaImgSolid",class:"m1atm8do",propsAsIs:!0}),Bs=()=>h,Rs=e.styled_default(Bs())({name:"MediaImgRounded",class:"myx3xoi",propsAsIs:!0}),Os=()=>h,Ps=e.styled_default(Os())({name:"MediaImgCentered",class:"m1bwv0gx",propsAsIs:!0}),zs=()=>h,Us=e.styled_default(zs())({name:"MediaImgInsight",class:"mntjanp",propsAsIs:!0}),Vs=e.styled_default("div")({name:"VideoIcon",class:"v1kofb47",propsAsIs:!1}),Fs={[d.QuestionImages.UNSET]:N,[d.QuestionImages.NONE]:N,[d.QuestionImages.ROUNDED]:Rs,[d.QuestionImages.CENTERED]:Ps,[d.QuestionImages.TRANSPARENT]:Ds,[d.QuestionImages.SOLID]:N},B=({src:t,imageMode:n=d.QuestionImages.UNSET,withVideo:i,fromInsight:o})=>{if(n===d.QuestionImages.NONE)return null;const a=o?Us:Fs[n];return s.jsxs(a,{children:[s.jsx("img",{src:t,alt:""}),i&&s.jsx(Vs,{children:s.jsx(x.B1,{name:"icon-play"})})]})},Ws=e.styled_default("div")({name:"NotificationContent",class:"nuraq9m",propsAsIs:!1}),Ys=e.styled_default("div")({name:"NotificationContainer",class:"ns1nzpg",propsAsIs:!1}),J=e.styled_default("div")({name:"Body",class:"b1j59nzs",propsAsIs:!1}),Hs=e.styled_default("div")({name:"Title",class:"t9vmnpp",propsAsIs:!1}),Ks=e.styled_default("button")({name:"Button",class:"b14ivj5k",propsAsIs:!1}),Gs=()=>x.B1,Js=e.styled_default(Gs())({name:"StyledChevronRight",class:"s1atci8n",propsAsIs:!0}),Xs=e.styled_default("div")({name:"QuoteWrap",class:"q4w8jgs",propsAsIs:!1}),Zs=e.styled_default("blockquote")({name:"Quote",class:"qaa0kez",propsAsIs:!1}),se=e.styled_default("div")({name:"Body",class:"b1wvd52w",propsAsIs:!1}),ee=e.styled_default("div")({name:"Container",class:"ccvukea",propsAsIs:!1}),te=({image:t,tweet:n,account:i,accountVerified:o,body:a,title:u})=>{var c;return s.jsxs(ee,{children:[u&&s.jsx(Xs,{children:s.jsx(Zs,{children:u})}),s.jsx(A.D,{image:t,name:(c=n==null?void 0:n.meta)==null?void 0:c.accountName,userName:i,verified:o,createdTweet:n==null?void 0:n.date}),s.jsx(se,{children:A.D$1(a)})]})},ne=({title:t,questionType:n,questionTypeData:i})=>s.jsxs(J,{children:[s.jsx(E,{questionTypeData:i,questionType:n,questionStatus:d.QuestionStatus.UNSET}),t&&s.jsx(Hs,{children:t})]}),oe=({tweet:t})=>t?s.jsx(J,{children:s.jsx(te,{...t,controlVideo:()=>{}})}):null,ie=({action:t,questionType:n,inApp:i,insight:o,tweet:a})=>{var u;const c=A.e[n],l=A.o[n];if(!c||!i||!i.notification)return null;const{title:p,image:m,imageMode:f}=i.notification;let j=m;n===d.QuestionType.TWEET&&a!=null&&a.tweetMedia&&(j=a.tweetMedia.image),f===d.QuestionImages.NONE&&(j="");const I=i.useMediaFromContent&&(o==null?void 0:o.image),r=n===d.QuestionType.TWEET&&((u=a==null?void 0:a.tweetMedia)==null?void 0:u.video)||n===d.QuestionType.FACTOID&&(o==null?void 0:o.video);return s.jsx(Ys,{"data-a":"intr",className:"SL_InApp",onClick:t,children:s.jsxs(Ws,{style:j?{}:{paddingLeft:"1.5rem"},children:[j&&!I&&s.jsx(B,{src:j,imageMode:f,withVideo:!!r}),I&&s.jsx(B,{src:I,fromInsight:!0,withVideo:!!r}),n===d.QuestionType.TWEET?s.jsx(oe,{tweet:a}):s.jsx(ne,{questionTypeData:c,questionType:n,title:p}),s.jsx(Ks,{name:"inapp-button",children:l||"Open"}),s.jsx(Js,{name:"chevronRight"})]})})},ae=()=>({color:t})=>t||"transparent",R=e.styled_default("div")({name:"MediaComponentWrap",class:"mek728j",propsAsIs:!1,vars:{"mek728j-0":[ae()]}}),v=e.styled_default("div")({name:"Media",class:"m461t56",propsAsIs:!1}),le=()=>v,de=e.styled_default(le())({name:"MediaImgBottom",class:"m22bh04",propsAsIs:!0}),ce=()=>v,re=e.styled_default(ce())({name:"MediaVideo",class:"m17u1e34",propsAsIs:!0}),ue=()=>v,pe=e.styled_default(ue())({name:"MediaImgContentMedia",class:"m4j3eds",propsAsIs:!0}),me=()=>v,ye=e.styled_default(me())({name:"MediaImgSolid",class:"m1lp3swr",propsAsIs:!0}),xe=()=>v,fe=e.styled_default(xe())({name:"MediaImgRounded",class:"mc7lij",propsAsIs:!0}),Ie=()=>v,je=e.styled_default(Ie())({name:"MediaImgCentered",class:"mwwaw7o",propsAsIs:!0}),ve=()=>v,k=e.styled_default(ve())({name:"MediaNone",class:"mqfzyyr",propsAsIs:!0}),Ae="v170mtgf",he={[d.QuestionImages.UNSET]:k,[d.QuestionImages.NONE]:k,[d.QuestionImages.ROUNDED]:fe,[d.QuestionImages.CENTERED]:je,[d.QuestionImages.TRANSPARENT]:de,[d.QuestionImages.SOLID]:ye},O=({src:t,imageMode:n=d.QuestionImages.UNSET,withVideo:i,color:o,useContentMedia:a,thumbnailUrl:u})=>{if(!t)return s.jsx(R,{color:o,children:s.jsx(k,{})});const c=a===d.NotificationUseContentMedia.ENABLED?pe:he[n];return s.jsx(R,{color:o,children:i?s.jsx(re,{children:s.jsx(H.Et,{className:Ae,source:t,poster:u||""})}):s.jsx(c,{children:s.jsx("img",{src:t,alt:""})})})},$e=()=>({withoutPadding:t})=>t?"0px":"1rem",X=e.styled_default("div")({name:"NotificationContent",class:"n1p3bk1c",propsAsIs:!1,vars:{"n1p3bk1c-0":[$e()]}}),ge=e.styled_default("div")({name:"MainContent",class:"m1g211mu",propsAsIs:!1}),_e=()=>x.B1,Te=e.styled_default(_e())({name:"StyledChevronRight",class:"sx1hq4c",propsAsIs:!0}),Z=e.styled_default("div")({name:"NotificationContainer",class:"n1fcriet",propsAsIs:!1}),we=()=>({questionType:t})=>t===d.QuestionType.FACTOID?"7.3rem":"4.5rem",be=()=>({webos:t})=>t?"11px 0px 8px 0px":"11px 0px",Ce=()=>({imageMode:t,webos:n})=>n?"330px":t===d.QuestionImages.SOLID?"310px":t===d.QuestionImages.CENTERED||t===d.QuestionImages.ROUNDED||t===d.QuestionImages.TRANSPARENT?"370px":"430px",Ne=e.styled_default("div")({name:"Body",class:"b1byyovs",propsAsIs:!1,vars:{"b1byyovs-0":[we()],"b1byyovs-1":[be()],"b1byyovs-2":[Ce()]}}),qe=()=>({webos:t})=>t?"0.85rem":"1.033rem",ke=()=>({webos:t})=>t?"0.95rem":"1.25rem",Se=()=>({webos:t})=>t?"4.7rem":"2.25rem",Ee=()=>({webos:t})=>t?"pre-wrap":"nowrap",Le=e.styled_default("div")({name:"Title",class:"t1y5k5id",propsAsIs:!1,vars:{"t1y5k5id-0":[qe()],"t1y5k5id-1":[ke()],"t1y5k5id-2":[Se()],"t1y5k5id-3":[Ee()]}}),Qe=e.styled_default("div")({name:"Description",class:"dw9eb7l",propsAsIs:!1}),De=e.styled_default("div")({name:"LogoImgContainer",class:"ldu8wgy",propsAsIs:!1}),ss=e.styled_default("img")({name:"LogoImg",class:"ln4a3eh",propsAsIs:!1}),Me=()=>Z,Be=e.styled_default(Me())({name:"NotificationInterstitialContainer",class:"no2k63v",propsAsIs:!0}),Re=e.styled_default("div")({name:"TVButtons",class:"th9nn6a",propsAsIs:!1}),es=e.styled_default("button")({name:"TVButton",class:"t1eee77p",propsAsIs:!1}),Oe=()=>es,Pe=e.styled_default(Oe())({name:"DismissButton",class:"ds000hw",propsAsIs:!0}),ze=()=>es,Ue=e.styled_default(ze())({name:"AnswerButton",class:"a1nz9hoe",propsAsIs:!0}),Ve=({title:t,questionType:n,questionTypeData:i,description:o,imageMode:a,webos:u})=>s.jsxs(Ne,{imageMode:a,questionType:n,webos:u,children:[s.jsx(E,{questionTypeData:i,questionType:n,questionStatus:d.QuestionStatus.UNSET}),t&&s.jsx(Le,{webos:u,children:t}),o&&s.jsx(Qe,{children:o})]}),Fe=S.O(Be),We=S.O(Pe),Ye=S.O(Ue),He=({className:t,sponsorLogo:n,onClick:i,webos:o})=>s.jsx(Fe,{className:t,autoFocus:!0,webos:o,onClick:i,"data-webos":o,children:s.jsx(X,{withoutPadding:!0,children:s.jsx(ss,{src:n})})}),Ke=({action:t,close:n,questionType:i,inApp:o,insight:a,color:u,webos:c,className:l})=>{var p,m,f;const[j,I]=y.useState(!1),r=y.useRef();y.useEffect(()=>(o!=null&&o.sponsorLogo&&(I(!0),r.current=setTimeout(()=>{I(!1)},5e3)),()=>clearTimeout(r.current)),[o==null?void 0:o.sponsorLogo]);const D=A.e[i];if(!D||!o||!o.notification)return null;const{title:us,image:ps,imageMode:_,useContentMedia:T}=o.notification,ms=i===d.QuestionType.FACTOID?a==null?void 0:a.heading:us,ys=i===d.QuestionType.FACTOID?a==null?void 0:a.body:"",xs=ps,w=i===d.QuestionType.FACTOID&&((p=a==null?void 0:a.video)==null?void 0:p.url)&&(o==null?void 0:o.isVideo)&&T===d.NotificationUseContentMedia.ENABLED,b=T===d.NotificationUseContentMedia.ENABLED?w?(m=a==null?void 0:a.video)==null?void 0:m.url:a==null?void 0:a.image:"";return o!=null&&o.sponsorLogo&&j?s.jsx(He,{className:l,sponsorLogo:o==null?void 0:o.sponsorLogo,webos:c,onClick:()=>I(!1)}):s.jsxs(Z,{"data-a":"intr",className:e.cx_default("SL_InApp",l),onClick:$=>{c||t==null||t($)},"data-is-insight":i===d.QuestionType.FACTOID,"data-webos":c,children:[(o==null?void 0:o.sponsorLogo)&&s.jsx(De,{children:s.jsx(ss,{src:o==null?void 0:o.sponsorLogo})}),s.jsxs(X,{children:[s.jsxs(ge,{children:[!b&&s.jsx(O,{src:xs,imageMode:_,withVideo:!!w,color:u}),b&&s.jsx(O,{src:b,imageMode:_,withVideo:!!w,color:u,useContentMedia:T,thumbnailUrl:(f=a==null?void 0:a.video)==null?void 0:f.thumbnailUrl}),s.jsx(Ve,{questionTypeData:D,questionType:i,title:ms,description:ys,imageMode:_,webos:c})]}),!c&&s.jsx(Te,{name:"chevronRight"}),c&&s.jsxs(Re,{children:[s.jsx(We,{webos:!0,"data-close-btn":"true",onClick:$=>{$.stopPropagation(),n==null||n($)},children:"Dismiss"}),s.jsx(Ye,{webos:!0,autoFocus:!0,onClick:t,children:"Answer"})]})]})]})},Ge=e.styled_default("div")({name:"NotificationContainer",class:"n11jcrxe",propsAsIs:!1}),P=e.styled_default("img")({name:"Icon",class:"i1vmpt6u",propsAsIs:!1}),Je=e.styled_default("div")({name:"IconContainer",class:"i180665s",propsAsIs:!1}),Xe=()=>x.B1,Ze=e.styled_default(Xe())({name:"TitleIcon",class:"t16zzzei",propsAsIs:!0}),st=()=>H.y,et=e.styled_default(st())({name:"Close",class:"c1sur0q2",propsAsIs:!0}),tt=e.styled_default("div")({name:"Body",class:"bai9j52",propsAsIs:!1}),nt=e.styled_default("div")({name:"Title",class:"t1bnt25p",propsAsIs:!1}),ot=e.styled_default("div")({name:"Description",class:"dmixjec",propsAsIs:!1}),it=e.styled_default("button")({name:"Button",class:"b1ubkw1q",propsAsIs:!1}),at=({open:t,close:n,...i})=>{var o,a;return s.jsxs(Ge,{"data-a":"intr",onClick:()=>{t==null||t(),i&&i.markIstantOpen()},children:[s.jsxs(Je,{children:[s.jsx(P,{className:"on-light",src:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification.png"}),s.jsx(P,{className:"on-dark",src:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/notification-dark.png"})]}),s.jsxs(tt,{children:[s.jsxs(nt,{children:[s.jsx(Ze,{name:"icon-trophy-solid"}),(o=i==null?void 0:i.titleCard)==null?void 0:o.title]}),s.jsxs(ot,{children:[s.jsx("span",{children:(a=i==null?void 0:i.titleCard)==null?void 0:a.subtitle}),s.jsx(it,{name:"inapp-button",children:"Play Now"})]})]}),s.jsx(et,{close:u=>{u==null||u.stopPropagation(),n==null||n()}})]})},lt=e.styled_default("div")({name:"Container",class:"cef8huz",propsAsIs:!1}),dt=()=>x.B1,ct=e.styled_default(dt())({name:"CheckIcon",class:"c1mo15kk",propsAsIs:!0}),rt=()=>x.B1,ut=e.styled_default(rt())({name:"PredictionIcon",class:"p16zkqnm",propsAsIs:!0}),pt=e.styled_default("div")({name:"PredictionIconContainer",class:"pjszi7a",propsAsIs:!1}),mt=e.styled_default("div")({name:"BodyContainer",class:"bftbmo3",propsAsIs:!1}),yt=e.styled_default("div")({name:"Body",class:"barrbyu",propsAsIs:!1}),xt=e.styled_default("div")({name:"Subtitle",class:"sz7237i",propsAsIs:!1}),ft=({step:t,children:n,answer:i,state:o="pending"})=>{const[a,u]=y.useState(0),[c]=y.useState(()=>new ResizeObserver(p=>{window.requestAnimationFrame(()=>{var m,f;u(((f=(m=p==null?void 0:p[0])==null?void 0:m.contentRect)==null?void 0:f.width)??0)})})),l=y.useCallback(p=>{p?c.observe(p):c.disconnect()},[c]);return y.useEffect(()=>()=>{c.disconnect()},[c]),s.jsxs(lt,{children:[s.jsx(pt,{children:s.jsx(ut,{name:"icon-prediction"})}),s.jsx(mt,{style:{minWidth:`${a}px`},children:s.jsx(yt,{children:n},t)}),s.jsx(xt,{ref:l,className:o,children:s.jsxs("div",{children:[s.jsx(ct,{name:"icon-check"}),"Your Pick: ",i]})})]})},It=e.styled_default("div")({name:"Container",class:"ckyzolp",propsAsIs:!1}),L=e.styled_default("div")({name:"Line",class:"l16t1zr7",propsAsIs:!1}),jt=()=>L,vt=e.styled_default(jt())({name:"Line1",class:"le78kvg",propsAsIs:!0}),At=()=>L,ht=e.styled_default(At())({name:"Line2",class:"l1o7966d",propsAsIs:!0}),$t=()=>L,gt=e.styled_default($t())({name:"Line3",class:"lu9lyxq",propsAsIs:!0}),_t=()=>s.jsxs(It,{children:[s.jsx(vt,{children:s.jsx("div",{})}),s.jsx(ht,{children:s.jsx("div",{})}),s.jsx(gt,{children:s.jsx("div",{})})]}),Tt=e.styled_default("div")({name:"Container",class:"c10jy6zf",propsAsIs:!1}),wt=()=>x.B1,bt=e.styled_default(wt())({name:"CheckIcon",class:"c1c7scay",propsAsIs:!0}),Ct=()=>s.jsxs(Tt,{children:[s.jsx(bt,{name:"icon-check"})," Prediction results are in!"]}),Nt=e.styled_default("div")({name:"Container",class:"cf6k2yy",propsAsIs:!1}),qt=e.styled_default("div")({name:"Caption",class:"c1c8xjus",propsAsIs:!1}),kt=e.styled_default("div")({name:"Title",class:"t1d1uekn",propsAsIs:!1}),St=({title:t})=>s.jsxs(Nt,{children:[s.jsx(qt,{children:"Results for"}),s.jsx(kt,{children:t})]}),ts=e.styled_default("div")({name:"Container",class:"c181a1as",propsAsIs:!1}),ns=e.styled_default("div")({name:"Title",class:"t1cduox6",propsAsIs:!1}),Et=()=>x.B1,os=e.styled_default(Et())({name:"CorrectIcon",class:"c1onrv6j",propsAsIs:!0}),Lt=()=>os,Qt=e.styled_default(Lt())({name:"InCorrectIcon",class:"i17n9o7e",propsAsIs:!0}),Dt=()=>s.jsxs(ts,{children:[s.jsxs(ns,{children:["Congratulations!",s.jsx("br",{}),"You answered correctly."]}),s.jsx(os,{name:"icon-check"})]}),Mt=({title:t})=>s.jsxs(ts,{children:[s.jsxs(ns,{children:["Better luck next time!",s.jsx("br",{}),"Correct: ",t]}),s.jsx(Qt,{name:"icon-cross"})]}),Bt=e.styled_default("div")({name:"Container",class:"cnxgcs2",propsAsIs:!1}),Rt=e.styled_default("div")({name:"Title",class:"t903f8n",propsAsIs:!1}),Ot=()=>x.B1,Pt=e.styled_default(Ot())({name:"CheckIcon",class:"ceyu3qj",propsAsIs:!0}),zt=({points:t})=>s.jsxs(Bt,{children:[s.jsxs(Rt,{children:["You won ",s.jsx(js.d,{delay:.5,prefix:"+",suffix:" points",value:t})]}),s.jsx(Pt,{name:"icon-trophy-solid"})]}),z=e.styled_default("div")({name:"Container",class:"cq3agu2",propsAsIs:!1}),U=e.styled_default("div")({name:"Body",class:"b16qj0do",propsAsIs:!1}),V={1:3e3,2:4e3,3:4e3,4:4e3},Ut=({close:t,action:n,setStep:i,votedAnswer:o,correct:a,correctAnswerTitle:u,questionTitle:c,step:l})=>{if(y.useEffect(()=>{if(i){const m=setTimeout(()=>{V[l+1]&&(a||l<3)?i(l+1):t==null||t()},V[l]);return()=>{m&&clearTimeout(m)}}return()=>{}},[i,l,t,a]),l===1)return s.jsx(z,{children:s.jsx(U,{children:s.jsx(Ct,{})})});let p="pending";return(l===3||l===4)&&(p=a?"correct":"incorrect"),s.jsx(z,{"data-a":"intr",onClick:()=>n==null?void 0:n(),children:s.jsxs(U,{children:[l!==1&&s.jsx(_t,{},l),s.jsxs(ft,{state:p,step:l,answer:(o==null?void 0:o.title)||"unknown",children:[l===2&&s.jsx(St,{title:c||"unknown"}),l===3&&a&&s.jsx(Dt,{}),l===3&&!a&&s.jsx(Mt,{title:u||"unknown"}),l===4&&s.jsx(zt,{points:(o==null?void 0:o.points)||0})]})]})})},Vt=({close:t,action:n,votedAnswer:i,correct:o,correctAnswerTitle:a,questionTitle:u})=>{const[c,l]=y.useState(1);return s.jsx(Ut,{close:t,action:n,votedAnswer:i,correct:o,correctAnswerTitle:a,questionTitle:u,setStep:l,step:c,title:""})},Ft=e.styled_default("div")({name:"NotificationContainer",class:"n1i4h28u",propsAsIs:!1}),Wt=({className:t,...n})=>s.jsx(Ft,{className:t,children:s.jsx(Vt,{...n})}),Yt=e.styled_default("div")({name:"Container",class:"cwa9tgs",propsAsIs:!1}),Ht=e.styled_default("div")({name:"BodyContainer",class:"b1xx7swj",propsAsIs:!1}),Kt=e.styled_default("div")({name:"Body",class:"b1a21en",propsAsIs:!1}),Gt=({step:t,children:n,state:i="pending"})=>{const[o,a]=y.useState(0);return y.useEffect(()=>{const u=new ResizeObserver(c=>{window.requestAnimationFrame(()=>{var l,p;const m=((p=(l=c==null?void 0:c[0])==null?void 0:l.contentRect)==null?void 0:p.width)??0;a(m)})});return()=>{u.disconnect()}},[]),s.jsx(Yt,{style:{padding:`${t===3&&i==="incorrect"||t===1?"5px 100px":"5px 40px"}`},children:s.jsx(Ht,{style:{minWidth:`${o}px`},children:s.jsx(Kt,{children:n},t)})})},Jt=e.styled_default("div")({name:"Container",class:"c1nd5cu8",propsAsIs:!1}),Q=e.styled_default("div")({name:"Line",class:"lgbipw0",propsAsIs:!1}),Xt=()=>Q,Zt=e.styled_default(Xt())({name:"Line1",class:"l1anth16",propsAsIs:!0}),sn=()=>Q,en=e.styled_default(sn())({name:"Line2",class:"l193yd7v",propsAsIs:!0}),tn=()=>Q,nn=e.styled_default(tn())({name:"Line3",class:"lhbflsp",propsAsIs:!0}),on=()=>s.jsxs(Jt,{children:[s.jsx(Zt,{children:s.jsx("div",{})}),s.jsx(en,{children:s.jsx("div",{})}),s.jsx(nn,{children:s.jsx("div",{})})]}),an=e.styled_default("div")({name:"Container",class:"c1lvd429",propsAsIs:!1}),ln=()=>x.B1,dn=e.styled_default(ln())({name:"PredictionIcon",class:"p1n4m87t",propsAsIs:!0}),cn=()=>s.jsxs(an,{children:[s.jsx(dn,{name:"icon-prediction"})," Prediction results are in!"]}),rn=()=>x.B1,un=e.styled_default(rn())({name:"CheckIcon",class:"c126r8f9",propsAsIs:!0}),pn=e.styled_default("div")({name:"Answer",class:"a1o2rpgl",propsAsIs:!1}),mn=e.styled_default("div")({name:"Container",class:"cej6ci1",propsAsIs:!1}),yn=e.styled_default("div")({name:"Title",class:"tob24mr",propsAsIs:!1}),xn=({title:t,answer:n})=>s.jsxs(mn,{children:[s.jsx(yn,{children:t}),s.jsxs(pn,{children:[s.jsx(un,{name:"icon-prediction"}),"Your Pick: ",n]})]}),is=e.styled_default("div")({name:"Container",class:"c1lesal4",propsAsIs:!1}),as=e.styled_default("div")({name:"Title",class:"tv66n4w",propsAsIs:!1}),fn=()=>x.B1,In=e.styled_default(fn())({name:"CorrectIcon",class:"cx0vlv2",propsAsIs:!0}),ls=e.styled_default("div")({name:"Answer",class:"akfh4v5",propsAsIs:!1}),jn=({answer:t})=>s.jsxs(is,{children:[s.jsx(as,{children:"Congratulations! You answered correctly."}),s.jsxs(ls,{children:[s.jsx(In,{name:"icon-correct"}),"Your Pick: ",t]})]}),vn=({title:t,answer:n})=>s.jsxs(is,{children:[s.jsxs(as,{children:["Better luck next time!",s.jsx("br",{}),"Correct: ",t]}),s.jsxs(ls,{children:["Your Pick: ",n]})]}),F=e.styled_default("div")({name:"Container",class:"cmox3ot",propsAsIs:!1}),W=e.styled_default("div")({name:"Body",class:"bqq1ix4",propsAsIs:!1}),Y={1:3e3,2:4e3,3:4e3},An=({close:t,action:n,setStep:i,votedAnswer:o,correct:a,correctAnswerTitle:u,questionTitle:c,step:l})=>{if(y.useEffect(()=>{if(i){const m=setTimeout(()=>{Y[l+1]&&(a||l<3)?i(l+1):t==null||t()},Y[l]);return()=>{m&&clearTimeout(m)}}return()=>{}},[i,l,t,a]),l===1)return s.jsx(F,{children:s.jsx(W,{children:s.jsx(cn,{})})});let p="pending";return l===3&&(p=a?"correct":"incorrect"),s.jsx(F,{"data-a":"intr",onClick:()=>n==null?void 0:n(),children:s.jsxs(W,{children:[l!==1&&s.jsx(on,{},l),s.jsxs(Gt,{state:p,step:l,children:[l===2&&s.jsx(xn,{title:c||"unknown",answer:(o==null?void 0:o.title)||"unknown"}),l===3&&a&&s.jsx(jn,{answer:(o==null?void 0:o.title)||"unknown"}),l===3&&!a&&s.jsx(vn,{title:u||"unknown",answer:(o==null?void 0:o.title)||"unknown"})]})]})})},hn=({close:t,action:n,votedAnswer:i,correct:o,correctAnswerTitle:a,questionTitle:u})=>{const[c,l]=y.useState(1);return s.jsx(An,{close:t,action:n,votedAnswer:i,correct:o,correctAnswerTitle:a,questionTitle:u,setStep:l,step:c,title:""})},ds=e.styled_default("div")({name:"NotificationContainer",class:"nn0nqh6",propsAsIs:!1}),$n=()=>({withoutPadding:t})=>t?"0px":"1rem",gn=e.styled_default("div")({name:"NotificationContent",class:"n1bcdf3j",propsAsIs:!1,vars:{"n1bcdf3j-0":[$n()]}}),cs=e.styled_default("img")({name:"LogoImg",class:"l8jorbq",propsAsIs:!1}),_n=()=>ds,Tn=e.styled_default(_n())({name:"NotificationInterstitialContainer",class:"nf920y3",propsAsIs:!0}),wn=e.styled_default("div")({name:"LogoImgContainer",class:"lzsmehn",propsAsIs:!1}),bn=({className:t,sponsorLogo:n,onClick:i})=>s.jsx(Tn,{className:t,onClick:i,children:s.jsx(gn,{withoutPadding:!0,children:s.jsx(cs,{src:n})})}),Cn=({className:t,...n})=>{var i,o,a,u,c;const[l,p]=y.useState(!1),m=y.useRef();return y.useEffect(()=>{var f;return(f=n==null?void 0:n.inApp)!=null&&f.sponsorLogo&&(p(!0),m.current=setTimeout(()=>{p(!1)},5e3)),()=>clearTimeout(m.current)},[(i=n==null?void 0:n.inApp)==null?void 0:i.sponsorLogo]),(o=n==null?void 0:n.inApp)!=null&&o.sponsorLogo&&l?s.jsx(bn,{className:t,sponsorLogo:(a=n.inApp)==null?void 0:a.sponsorLogo,onClick:()=>p(!1)}):s.jsx(ds,{className:t,children:s.jsxs("div",{children:[((u=n==null?void 0:n.inApp)==null?void 0:u.sponsorLogo)&&s.jsx(wn,{children:s.jsx(cs,{src:(c=n==null?void 0:n.inApp)==null?void 0:c.sponsorLogo})}),s.jsx(hn,{...n})]})})},rs=({sdk:t,webos:n})=>{var i,o,a,u,c,l,p,m;const[f]=y.useState(t.getNotificationsStore()),j=e.useStore(f),I=t.getFeature(d.SdkOverlayType.GAMES),r=y.useMemo(()=>t.getActiveNotification(),[t,j]);return y.useEffect(()=>{r&&Is.eventBus.emit("notification",{action:"rendered",payload:{questionId:r.data.questionId,questionType:r.data.questionType}})},[r]),r&&r.type===e.NotificationType.QUESTION_RESOLVED?r.data.question&&r.data.questionType===d.QuestionType.PREDICTION?r&&((i=r.data.inApp)==null?void 0:i.adUnit)===d.AdUnit.STANDART?s.jsx(Cn,{action:r.action,close:r.close,...r.data.question,inApp:r.data.inApp}):s.jsx(Wt,{action:r.action,close:r.close,...r.data.question}):null:r&&r.type===e.NotificationType.ONBOARDING?r.data.onboarding?s.jsx(at,{open:I==null?void 0:I.openOnboarding,close:r.close,...r.data.onboarding}):null:r&&((o=r.data.inApp)==null?void 0:o.adUnit)===d.AdUnit.STANDART?s.jsx(Ke,{...r.data,action:r.action,close:r.close,color:((c=(u=(a=r==null?void 0:r.data)==null?void 0:a.inApp)==null?void 0:u.notification)==null?void 0:c.indicatorColor)||((m=(p=(l=r==null?void 0:r.data)==null?void 0:l.inApp)==null?void 0:p.appearance)==null?void 0:m.primaryColor),webos:n}):r&&s.jsx(ie,{...r.data,action:r.action})},Nn=({theme:t})=>{const n=C.B(),i=C.z(),o=C.F();return n&&(o.appNotification||o.onboardingNotification)?o.app&&!o.onboardingNotification?null:s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(fs.h,{customTheme:t??i.theme,themeMode:i.themeMode,children:s.jsx(rs,{sdk:n})})}):null};exports.D=Es;exports.K=rs;exports.R=Ls;exports.S=G;exports.StreamLayerSDKNotification=Nn;exports.r=K;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),L=require("./index7.js"),v=require("./sl-types.js"),I=require("./index11.js"),n=require("react"),P=require("./index3.js"),q=require("./vast-client.min.js"),U=require("./index-DSi8Qgfs.js"),R=require("./hooks-B0Qttldg.js"),K={},F=new q._,T=U.i(K),C=P.createLogger("ui:gam-static"),_=e=>new Promise((s,a)=>{const i=new Image;i.onload=()=>s(e),i.onerror=()=>a(),i.src=e}),D=()=>{const e=n.useRef(0);return[n.useCallback(async s=>{var a,i,t,p,d,l,h,u,A,S,g;if((a=T.get()[s])!=null&&a.imageSrc)return{success:!0};const y=Date.now();e.current=y,T.setKey(s,{id:"",url:s});try{P.eventBus.emit("exposedPauseAd",{action:"load",payload:{}});const m=await F.get(s);if(C.debug(m,"parsedVAST"),e.current===y&&T.get()[s].url){const o=m.ads.find(f=>f.creatives.length>0);if(o){C.debug(o,"validAd");const f=o.creatives.find(c=>c.type==="nonlinear");if(f){C.debug(f,"nonlinear");const c=(t=(i=f.variations)==null?void 0:i[0])==null?void 0:t.staticResource,E=(d=(p=f.variations)==null?void 0:p[0])==null?void 0:d.nonlinearClickThroughURLTemplate;if(c)return await _(c),T.setKey(s,{id:o.id||"",url:s,imageSrc:c,adUrl:E}),P.eventBus.emit("exposedPauseAd",{action:"loaded",payload:{id:o.id||""}}),{success:!0}}const x=o.creatives.find(c=>c.type==="companion");C.debug(x,"companion");const k=(A=(u=(h=(l=x==null?void 0:x.variations)==null?void 0:l[0])==null?void 0:h.staticResources)==null?void 0:u[0])==null?void 0:A.url,j=(g=(S=x==null?void 0:x.variations)==null?void 0:S[0])==null?void 0:g.companionClickThroughURLTemplate;if(k)return await _(k),T.setKey(s,{id:o.id||"",url:s,imageSrc:k,adUrl:j}),P.eventBus.emit("exposedPauseAd",{action:"loaded",payload:{id:o.id||""}}),{success:!0}}}}catch(m){console.error("Error parsing VAST",m)}return{success:!1}},[]),T]},M=v.styled_default("div")({name:"PauseAdOverlay",class:"pw9gih8",propsAsIs:!1}),V=v.styled_default("div")({name:"PauseAdContent",class:"p8lpomy",propsAsIs:!1}),N=v.styled_default("div")({name:"PauseAdTopLeft",class:"pv7u167",propsAsIs:!1}),O=v.styled_default("h2")({name:"PauseAdTitle",class:"p1kh2yb0",propsAsIs:!1}),Q=v.styled_default("p")({name:"PauseAdCaption",class:"pl8f94x",propsAsIs:!1}),$=v.styled_default("div")({name:"PauseAdBottomLeft",class:"p1m6zmrt",propsAsIs:!1}),z=v.styled_default("button")({name:"PauseAdPlayButton",class:"pm3vwfa",propsAsIs:!1}),G=v.styled_default("div")({name:"PauseAdSidebarGradient",class:"p1tibuhw",propsAsIs:!1}),W=v.styled_default("div")({name:"PauseAdSidebar",class:"ptqqrqd",propsAsIs:!1}),H=v.styled_default("span")({name:"PauseAdTitleDescription",class:"p14estxv",propsAsIs:!1}),B=v.styled_default("img")({name:"ExternalAdContainer",class:"e1dpvfl1",propsAsIs:!1}),J=({vastUrl:e,isDesktop:s})=>{var a;const[,i]=D(),t=v.useStore(i,{keys:[e]});return n.useEffect(()=>{t&&t[e]&&t[e].imageSrc&&t[e].id&&P.eventBus.emit("exposedPauseAd",{action:"rendered",payload:{id:t[e].id}})},[t,e]),(a=t==null?void 0:t[e])!=null&&a.imageSrc?!t[e].adUrl||!s?r.jsx(B,{src:t[e].imageSrc}):r.jsx("a",{onClick:()=>{P.eventBus.emit("exposedPauseAd",{action:"navigated",payload:{id:t[e].id}})},href:t[e].adUrl,target:"_blank",rel:"noopener noreferrer",children:r.jsx(B,{src:t[e].imageSrc})}):null},X=({isClosing:e,title:s,caption:a,onPlay:i,onClose:t,vastUrl:p,options:d,isDesktop:l})=>{const h=(d==null?void 0:d.showPauseButton)??!0,{ref:u,focusSelf:A}=I.distExports.useFocusable({focusKey:"sl-pause-ad-play",onEnterRelease:i,isFocusBoundary:!0,forceFocus:!0});return n.useEffect(()=>{u.current&&A()},[u,A]),n.useEffect(()=>{if(!t)return()=>{};const S=g=>{const y=g.keyCode;if(y===461||y===10009||y===27||y===8){g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation(),t();return}};return window.addEventListener("keydown",S,{capture:!0}),()=>window.removeEventListener("keydown",S,{capture:!0})},[t]),r.jsx(M,{className:v.cx_default("SL_PauseAdOverlay",e&&"pause-ad-closing"),children:r.jsxs(V,{children:[r.jsxs(N,{children:[r.jsx(O,{children:s}),r.jsx(Q,{children:a})]}),h&&r.jsx($,{children:r.jsx(z,{ref:u,onClick:i,onMouseEnter:()=>u.current.focus(),"aria-label":"Resume playback"})}),r.jsx(G,{className:"SL_PauseAdSidebar",children:r.jsxs(W,{children:[p&&r.jsx(J,{isDesktop:l,vastUrl:p}),r.jsx(H,{children:"ADVERTISEMENT"})]})})]})})},Y=({showPauseAd:e,vastUrls:s,title:a,caption:i,sdk:t,onClose:p,onRender:d,options:l,isDesktop:h})=>{const u=(l==null?void 0:l.pauseAdDelay)??5e3,[A,S]=n.useState(!1),[g,y]=n.useState(!1),m=n.useRef(),o=s==null?void 0:s[0].url,f=n.useRef(o),x=n.useRef("");f.current=o;const[k,j]=D(),c=n.useCallback(()=>{p&&(x.current=f.current,P.eventBus.emit("exposedPauseAd",{action:"closed",payload:{}}),p())},[p]),E=n.useCallback(()=>{t.controlVideoPlayer({play:!0})},[t]);return n.useEffect(()=>{if(e&&o){P.eventBus.emit("exposedPauseAd",{action:"enabled",payload:{}}),k(o).then(b=>{f.current===o&&(b==null?void 0:b.success)!==!0&&(clearTimeout(m.current),c==null||c())}).catch(()=>{f.current===o&&(clearTimeout(m.current),c==null||c())});const w=()=>{const b=j.get()[f.current];b!=null&&b.imageSrc?(clearTimeout(m.current),y(!1),S(!0)):m.current=setTimeout(()=>{w()},200)};m.current=setTimeout(()=>{w()},u)}else x.current!==f.current&&(x.current="",P.eventBus.emit("exposedPauseAd",{action:"disabled",payload:{}})),y(!0),m.current=setTimeout(()=>{S(!1)},400);return()=>{m.current&&clearTimeout(m.current)}},[j,k,c,u,e,o]),n.useEffect(()=>{d==null||d({rendered:A})},[A,d]),n.useEffect(()=>()=>{d==null||d({rendered:!1})},[d]),A?r.jsx(X,{onClose:c,isClosing:g,title:a,caption:i,onPlay:E,vastUrl:o,options:l,isDesktop:h}):null},Z=({showPauseAd:e,pauseAdVastUrl:s,videoPlayerController:a,onRenderPauseAd:i,onClosePauseAd:t,children:p,options:d})=>{const l=R.B(),h=R.z(),u=n.useRef();return n.useEffect(()=>l?(a&&(u.current=a,l.addVideoPlayerController(u.current)),()=>{u.current&&l.removeVideoPlayerController(u.current)}):()=>{},[l,a]),l?r.jsx("div",{className:"StreamLayerSDK",children:r.jsxs(L.h,{style:p?{position:"relative"}:{},customTheme:h.theme,themeMode:h.themeMode,children:[p,s&&r.jsx(Y,{sdk:l,showPauseAd:e,vastUrls:s,onClose:t,onRender:i,options:d,isDesktop:!0})]})}):p};class ee extends n.Component{constructor(s){super(s),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(s,a){console.error(s,a.componentStack)}render(){return this.state.hasError?this.props.children:r.jsx(Z,{...this.props})}}exports.StreamLayerPauseAd=ee;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),q=require("./index7.js"),l=require("./sl-types.js"),B=require("./index11.js"),s=require("react"),j=require("./index5.js"),R=require("./hooks-WfHlJH12.js"),U=l.styled_default("div")({name:"PauseAdOverlay",class:"pw9gih8",propsAsIs:!1}),M=l.styled_default("div")({name:"PauseAdContent",class:"p8lpomy",propsAsIs:!1}),F=l.styled_default("div")({name:"PauseAdTopLeft",class:"pv7u167",propsAsIs:!1}),N=l.styled_default("h2")({name:"PauseAdTitle",class:"p1kh2yb0",propsAsIs:!1}),V=l.styled_default("p")({name:"PauseAdCaption",class:"pl8f94x",propsAsIs:!1}),z=l.styled_default("div")({name:"PauseAdBottomLeft",class:"p1m6zmrt",propsAsIs:!1}),H=l.styled_default("button")({name:"PauseAdPlayButton",class:"pm3vwfa",propsAsIs:!1}),K=l.styled_default("div")({name:"PauseAdSidebarGradient",class:"p1tibuhw",propsAsIs:!1}),O=l.styled_default("div")({name:"PauseAdSidebar",class:"ptqqrqd",propsAsIs:!1}),W=l.styled_default("span")({name:"PauseAdTitleDescription",class:"p14estxv",propsAsIs:!1}),w=l.styled_default("img")({name:"ExternalAdContainer",class:"e1dpvfl1",propsAsIs:!1}),G=({vastUrl:i,isDesktop:a,content:e})=>(s.useEffect(()=>{e.imageSrc&&e.id&&j.eventBus.emit("exposedPauseAd",{action:"rendered",payload:{id:e.id,parentId:e.parentId}})},[e,i]),e!=null&&e.imageSrc?!e.adUrl||!a?r.jsx(w,{src:e.imageSrc}):r.jsx("a",{onClick:()=>{j.eventBus.emit("exposedPauseAd",{action:"navigated",payload:{id:e.id,parentId:e.parentId}})},href:e.adUrl,target:"_blank",rel:"noopener noreferrer",children:r.jsx(w,{src:e.imageSrc})}):null),J=({isClosing:i,content:a,externalPauseAdStore:e,title:y,caption:m,onPlay:c,onClose:u,vastUrl:n,options:v,isDesktop:d})=>{const k=(v==null?void 0:v.showPauseButton)??!0,{ref:p,focusSelf:P}=B.distExports.useFocusable({focusKey:"sl-pause-ad-play",onEnterRelease:c,isFocusBoundary:!0,forceFocus:!0});return s.useEffect(()=>()=>{e.revalidate()},[e]),s.useEffect(()=>{p.current&&P()},[p,P]),s.useEffect(()=>{if(!u)return()=>{};const b=A=>{const o=A.keyCode;if(o===461||o===10009||o===27||o===8){A.preventDefault(),A.stopPropagation(),A.stopImmediatePropagation(),u();return}};return window.addEventListener("keydown",b,{capture:!0}),()=>window.removeEventListener("keydown",b,{capture:!0})},[u]),r.jsx(U,{className:l.cx_default("SL_PauseAd",i&&"pause-ad-closing"),children:r.jsxs(M,{children:[r.jsxs(F,{children:[r.jsx(N,{children:y}),r.jsx(V,{children:m})]}),k&&r.jsx(z,{children:r.jsx(H,{ref:p,onClick:c,onMouseEnter:()=>p.current.focus(),"aria-label":"Resume playback"})}),r.jsx(K,{className:"SL_PauseAdSidebar",children:r.jsxs(O,{children:[n&&r.jsx(G,{content:a,isDesktop:d,vastUrl:n}),r.jsx(W,{children:"ADVERTISEMENT"})]})})]})})},X=({showPauseAd:i,vastUrls:a,title:e,caption:y,sdk:m,onClose:c,onRender:u,options:n,isDesktop:v})=>{const d=(n==null?void 0:n.pauseAdDelay)??0,k=(n==null?void 0:n.pauseAdRefetchInterval)??1e3*60*50,[p,P]=s.useState(!1),[b,A]=s.useState(!1),o=s.useRef(),h=a==null?void 0:a[0].url,x=s.useRef(h),g=s.useRef(""),I=s.useRef("");x.current=h;const[f,_]=m.advertisement.getExternalPauseAd(h,{refetchInterval:k,$enabled:d===0||!!i,prefetch:d===0&&k>0}),S=l.useStore(f),E=s.useCallback(()=>{if(c){I.current=x.current;const t=f.get().data;j.eventBus.emit("exposedPauseAd",{action:"closed",payload:(t==null?void 0:t.url)===I.current?{id:t==null?void 0:t.id,parentId:t==null?void 0:t.parentId}:{}}),c()}},[c,f]),L=s.useCallback(()=>{m.controlVideoPlayer({play:!0})},[m]);return s.useEffect(()=>{_===x.current&&S.error&&(console.log("error",S.error),clearTimeout(o.current),E==null||E())},[S,E,_]),s.useEffect(()=>{if(i&&h){g.current=x.current,I.current="";const t=f.get().data;j.eventBus.emit("exposedPauseAd",{action:"enabled",payload:(t==null?void 0:t.url)===g.current?{id:t==null?void 0:t.id,parentId:t==null?void 0:t.parentId}:{}});const D=()=>{const T=f.get(),C=T.data;(C==null?void 0:C.url)===x.current&&(!T.loading&&C!=null&&C.imageSrc?(clearTimeout(o.current),A(!1),P(!0)):T.loading&&(o.current=setTimeout(()=>{console.log("checkAndAllowRender timeout"),D()},200)))};clearTimeout(o.current),o.current=setTimeout(()=>{D()},d)}else{if(I.current!==x.current){const t=f.get().data;I.current="",g.current!==""&&(j.eventBus.emit("exposedPauseAd",{action:"disabled",payload:g.current===(t==null?void 0:t.url)?{id:t==null?void 0:t.id,parentId:t==null?void 0:t.parentId}:{}}),g.current="")}A(!0),o.current=setTimeout(()=>{P(!1)},400)}return()=>{o.current&&clearTimeout(o.current)}},[f,E,d,i,h]),s.useEffect(()=>{u==null||u({rendered:p})},[p,u]),s.useEffect(()=>()=>{u==null||u({rendered:!1})},[u]),!p||!S.data?null:r.jsx(J,{onClose:E,isClosing:b,title:e,caption:y,onPlay:L,vastUrl:h,options:n,isDesktop:v,externalPauseAdStore:f,content:S.data})},$=({showPauseAd:i,pauseAdVastUrl:a,videoPlayerController:e,onRenderPauseAd:y,onClosePauseAd:m,children:c,options:u})=>{const n=R.B(),v=R.z(),d=s.useRef();return s.useEffect(()=>n?(e&&(d.current=e,n.addVideoPlayerController(d.current)),()=>{d.current&&n.removeVideoPlayerController(d.current)}):()=>{},[n,e]),n?r.jsx("div",{className:"StreamLayerSDK",children:r.jsxs(q.h,{style:c?{position:"relative"}:{},customTheme:v.theme,themeMode:v.themeMode,children:[c,a&&r.jsx(X,{sdk:n,showPauseAd:i,vastUrls:a,onClose:m,onRender:y,options:u,isDesktop:!0})]})}):c};class Q extends s.Component{constructor(a){super(a),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(a,e){console.error(a,e.componentStack)}render(){return this.state.hasError?this.props.children:r.jsx($,{...this.props})}}exports.StreamLayerPauseAd=Q;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("./index7.js"),u=require("react"),n=require("./sl-types.js"),r=require("./index3.js"),m=require("./index4.js"),y=require("./index5.js"),S=require("./useStreamLayerApp2.js"),c=require("./hooks-B0Qttldg.js"),x=n.styled_default("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),h=n.styled_default("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),v=()=>y.B1,f=n.styled_default(v())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),j=n.styled_default("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),g=n.styled_default("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),q=n.styled_default("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),P=({points:s,onClick:t})=>e.jsxs(x,{className:d.m,onClick:t,children:[e.jsx(h,{children:e.jsx(f,{name:"icon-trophy-solid"})}),e.jsxs(j,{children:[e.jsx(g,{children:"Total points"}),e.jsx(q,{children:e.jsx(m.d,{value:s})})]})]}),b=({gamification:s})=>{const t=s.userSummary.$store,[a,p]=u.useState(0);return u.useEffect(()=>{const o=t.subscribe(i=>{var l;(l=i==null?void 0:i.summary)!=null&&l.points&&p(i.summary.points)});return()=>{o()}},[t]),e.jsx(P,{points:a,onClick:()=>{const o=s.status.get();o===r.FeatureStatus.Suspended?(s.openFeature(),r.eventBus.emit("app",{action:"open",payload:{}}),r.eventBus.emit("interactions",{action:"tap",payload:{}})):o===r.FeatureStatus.Ready&&(s.closeFeature(!1),r.eventBus.emit("app",{action:"close",payload:{}}),r.eventBus.emit("interactions",{action:"tap",payload:{}}))}})},k=({sdk:s})=>{if(!n.useStore(s.featuresList.getStore()))return null;const t=s.getFeature(S.SdkOverlayType.GAMES);return t?e.jsx(b,{gamification:t}):null},A=({theme:s})=>{const t=c.B(),a=c.z();return t?e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(d.h,{customTheme:s??a.theme,themeMode:a.themeMode,children:e.jsx(k,{sdk:t})})}):null};exports.StreamLayerSDKPoints=A;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("./index7.js"),u=require("react"),n=require("./sl-types.js"),o=require("./index5.js"),y=require("./index3.js"),S=require("./index4.js"),c=require("./feature.js"),x=require("./useStreamLayerApp2.js"),d=require("./hooks-WfHlJH12.js"),f=n.styled_default("div")({name:"PointsContainer",class:"psiob9b",propsAsIs:!1}),h=n.styled_default("div")({name:"PointsIcon",class:"p1gqe4lh",propsAsIs:!1}),v=()=>S.B1,j=n.styled_default(v())({name:"PointsSvg",class:"p15syg2y",propsAsIs:!0}),q=n.styled_default("div")({name:"PointsBody",class:"p12n4f2h",propsAsIs:!1}),g=n.styled_default("div")({name:"PointsTitle",class:"poqmx89",propsAsIs:!1}),P=n.styled_default("div")({name:"PointsValue",class:"prj9b3v",propsAsIs:!1}),b=({points:s,onClick:t})=>e.jsxs(f,{className:p.m,onClick:t,children:[e.jsx(h,{children:e.jsx(j,{name:"icon-trophy-solid"})}),e.jsxs(q,{children:[e.jsx(g,{children:"Total points"}),e.jsx(P,{children:e.jsx(y.d,{value:s})})]})]}),k=({gamification:s})=>{const t=s.userSummary.$store,[r,m]=u.useState(0);return u.useEffect(()=>{const a=t.subscribe(i=>{var l;(l=i==null?void 0:i.summary)!=null&&l.points&&m(i.summary.points)});return()=>{a()}},[t]),e.jsx(b,{points:r,onClick:()=>{const a=s.status.get();a===c.FeatureStatus.Suspended?(s.openFeature(),o.eventBus.emit("app",{action:"open",payload:{}}),o.eventBus.emit("interactions",{action:"tap",payload:{}})):a===c.FeatureStatus.Ready&&(s.closeFeature(!1),o.eventBus.emit("app",{action:"close",payload:{}}),o.eventBus.emit("interactions",{action:"tap",payload:{}}))}})},A=({sdk:s})=>{if(!n.useStore(s.featuresList.getStore()))return null;const t=s.getFeature(x.SdkOverlayType.GAMES);return t?e.jsx(k,{gamification:t}):null},B=({theme:s})=>{const t=d.B(),r=d.z();return t?e.jsx("div",{className:"StreamLayerSDK",children:e.jsx(p.h,{customTheme:s??r.theme,themeMode:r.themeMode,children:e.jsx(A,{sdk:t})})}):null};exports.StreamLayerSDKPoints=B;