@streamlayer/react 1.9.1 → 1.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),g=require("react"),t=require("./index2.js"),u=require("./useStreamLayerApp2.js"),me=t.styled_default("div")({name:"Container",class:"c5b6wdg",propsAsIs:!1}),ue="a1rlj479",pe="s35f1di",ye="sj4471g",ve="b12050d8",fe="b1d5ybek",Ae=e=>e==="left"||e==="right"?pe:ve,ge=e=>e==="left"||e==="right"?ye:fe,Ie=e=>e==="left"?"avdxyl3":e==="right"?"a1bisd08":e==="top"?"a1u9y2aj":"a1qqaks",O=({children:e,style:s,className:l,enabled:n=!0,hiding:r,direction:a="left",onAnimationEnd:c})=>o.jsx(me,{style:s,className:t.cx_default(l,ue,Ie(a),n&&!r&&Ae(a),n&&r&&ge(a)),onAnimationEnd:c,children:e}),xe=t.styled_default("a")({name:"Link",class:"l1sgte8c",propsAsIs:!1}),he=t.styled_default("div")({name:"BannerContainer",class:"b7yfc72",propsAsIs:!1}),je=()=>xe,be=t.styled_default(je())({name:"BannerLink",class:"bejjq94",propsAsIs:!0}),_e=({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.banner)==null?void 0:a.url;return c&&c.indexOf("http")!==0&&(c=`https://${c}`),o.jsx(O,{direction:n,hiding:l,children:o.jsx(he,{className:"BannerContainer",children:o.jsx(be,{className:"BannerLink",href:c,style:{backgroundImage:`url(${e.additionalBanner.imageUrl})`},"data-promo-id":s,"data-promo-type":e.type,"data-analytics":"banner",target:"_blank"})})})},Ne=t.styled_default("div")({name:"NotificationContent",class:"n18wsqoo",propsAsIs:!1}),Se=t.styled_default("div")({name:"Body",class:"b1ia90c2",propsAsIs:!1}),Pe=t.styled_default("div")({name:"Title",class:"tg2z08v",propsAsIs:!1}),Te=t.styled_default("div")({name:"Text",class:"t59zdk1",propsAsIs:!1}),B=t.styled_default("div")({name:"MediaImgBottom",class:"m1ab9fq",propsAsIs:!1}),Ee=()=>B,$e=t.styled_default(Ee())({name:"MediaImgMiddle",class:"m9fsr0y",propsAsIs:!0}),Ce=t.styled_default("img")({name:"CtaIcon",class:"cvi9y5q",propsAsIs:!1}),Le=t.styled_default("button")({name:"Button",class:"bgl6boa",propsAsIs:!1}),Me=t.styled_default("div")({name:"Logo",class:"l5mq0z",propsAsIs:!1}),ke=t.styled_default("div")({name:"Footer",class:"f1mse0ft",propsAsIs:!1}),Oe=t.styled_default("div")({name:"Vector",class:"v1hcloah",propsAsIs:!1}),Be=t.styled_default("div")({name:"NotificationContainer",class:"n3n65jf",propsAsIs:!1}),De={[u.NotificationPromotionImagePosition.BOTTOM]:B,[u.NotificationPromotionImagePosition.MIDDLE]:$e},Re=({src:e,imagePosition:s})=>{const l=De[s]||B;return o.jsx(l,{children:o.jsx("img",{src:e,alt:""})})},qe=({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(Be,{className:"SL_Lower_Third_Notification",onClick:s,children:[o.jsxs(Ne,{children:[o.jsx(Re,{src:r,imagePosition:v}),o.jsxs(Se,{children:[l&&o.jsx(Pe,{children:l}),n&&o.jsx(Te,{children:n})]})]}),o.jsxs(ke,{children:[p!==u.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsxs(o.Fragment,{children:[o.jsx(Me,{children:o.jsx("img",{src:c,alt:l})}),o.jsx(Oe,{})]}),o.jsxs(Le,{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(Ce,{src:i==null?void 0:i.ctaIcon,alt:"cta-icon"}),(i==null?void 0:i.label)||"Open"]})]})]})},we=t.styled_default("div")({name:"NotificationContent",class:"n1ku6hz",propsAsIs:!1}),Ve=t.styled_default("div")({name:"NotificationContainer",class:"nbxqmol",propsAsIs:!1}),Fe=t.styled_default("div")({name:"Body",class:"b1gu3eml",propsAsIs:!1}),Ue=t.styled_default("div")({name:"Title",class:"t1u17zva",propsAsIs:!1}),Ke=t.styled_default("div")({name:"Text",class:"t10ko1g",propsAsIs:!1}),$=t.styled_default("div")({name:"Media",class:"mntc42e",propsAsIs:!1}),ze=()=>$,H=t.styled_default(ze())({name:"MediaImgFit",class:"ml060eo",propsAsIs:!0}),Ge=()=>$,Z=t.styled_default(Ge())({name:"MediaImgCentered",class:"m1vqlvig",propsAsIs:!0}),We=()=>Z,He=t.styled_default(We())({name:"MediaImgBottom",class:"m1e7tvi5",propsAsIs:!0}),Ye=()=>$,Je=t.styled_default(Ye())({name:"MediaImgSolid",class:"mqvntt2",propsAsIs:!0}),Qe=()=>$,Xe=t.styled_default(Qe())({name:"MediaImgMiddle",class:"m12jtj3u",propsAsIs:!0}),Ze=t.styled_default("img")({name:"CtaIcon",class:"ckq1frv",propsAsIs:!1}),eo=t.styled_default("button")({name:"Button",class:"bis90pl",propsAsIs:!1}),oo=()=>t.h1,to=t.styled_default(oo())({name:"StyledChevronRight",class:"s9mjmz3",propsAsIs:!0}),so=t.styled_default("div")({name:"Logo",class:"l1cf50a7",propsAsIs:!1}),no={[u.NotificationPromotionImagePosition.UNSET]:H,[u.NotificationPromotionImagePosition.FIT]:H,[u.NotificationPromotionImagePosition.CENTERED]:Z,[u.NotificationPromotionImagePosition.BOTTOM]:He,[u.NotificationPromotionImagePosition.SOLID]:Je,[u.NotificationPromotionImagePosition.MIDDLE]:Xe},lo=({src:e,imagePosition:s})=>{const l=no[s];return o.jsx(l,{children:o.jsx("img",{src:e,alt:""})})},io=({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(qe,{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(O,{className:"SL_Rich_Notification",direction:r,hiding:n,children:o.jsxs(Ve,{onClick:s,children:[f!==u.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsx(so,{children:o.jsx("img",{src:i,alt:a})}),o.jsxs(we,{children:[o.jsx(lo,{src:p,imagePosition:y}),o.jsxs(Fe,{children:[a&&o.jsx(Ue,{children:a}),c&&o.jsx(Ke,{children:c})]}),o.jsxs(eo,{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(Ze,{src:m==null?void 0:m.ctaIcon,alt:"cta-icon"}),(m==null?void 0:m.label)||"Open"]}),o.jsx(to,{name:"chevronRight"})]})]})})},ao=t.styled_default("div")({name:"OverlayContainer",class:"okzhq2w",propsAsIs:!1}),ee=t.styled_default("div")({name:"PromoOverlay",class:"pmgz5i",propsAsIs:!1}),oe=t.styled_default("div")({name:"Header",class:"hyxi3jt",propsAsIs:!1}),te=t.styled_default("div")({name:"HeaderContent",class:"h149e3gp",propsAsIs:!1}),se="h10toh7",Y=t.styled_default("img")({name:"SponsorLogo",class:"s1jyea6t",propsAsIs:!1}),ro=t.styled_default("div")({name:"SponsorName",class:"szpfa3h",propsAsIs:!1}),ne=t.styled_default("div")({name:"Media",class:"m1crmu01",propsAsIs:!1}),co=t.styled_default("img")({name:"PromoImg",class:"p1l37r8s",propsAsIs:!1}),mo="s1nmch9k",J=t.styled_default("div")({name:"Content",class:"c1er0ljd",propsAsIs:!1}),uo=t.styled_default("div")({name:"Description",class:"dydopmr",propsAsIs:!1}),po=t.styled_default("div")({name:"Sponsor",class:"s1w6nt04",propsAsIs:!1}),yo=t.styled_default("div")({name:"SponsorText",class:"s1evcmtq",propsAsIs:!1}),le=t.styled_default("div")({name:"ADLogo",class:"awodx0x",propsAsIs:!1}),vo=t.styled_default("span")({name:"SponsoredText",class:"s1q3n6oi",propsAsIs:!1}),fo=t.styled_default("div")({name:"ActionBtnWrap",class:"a8d4xfk",propsAsIs:!1}),Ao=t.styled_default("a")({name:"ActionButton",class:"at6oobh",propsAsIs:!1}),go=t.styled_default("div")({name:"Title",class:"t1gyg7tt",propsAsIs:!1}),Io="h17rwbtk",xo=t.styled_default("div")({name:"Container",class:"c10m2bce",propsAsIs:!1}),Q=t.styled_default("div")({name:"Item",class:"ig23yq5",propsAsIs:!1}),ho=t.styled_default("div")({name:"Dot",class:"d1f6aqua",propsAsIs:!1}),jo=({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(xo,{children:[s>1&&o.jsxs(o.Fragment,{children:[o.jsxs(Q,{children:[l," of ",s]}),o.jsx(ho,{})]}),o.jsxs(Q,{children:[n,":",r<10?`0${r}`:r]})]})},bo=(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}},_o=t.styled_default("div")({name:"Container",class:"c4q6dw1",propsAsIs:!1}),No=t.styled_default("div")({name:"ControlsContainer",class:"c1la67r",propsAsIs:!1}),So="m3guev",Po="m7099mt",To="mmm6o5s",Eo=({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),[b,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=bo(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:_=>{y(Math.round(_.duration-_.currentTime)),I(_.totalAds),A(_.adPosition)}})();return x.current=j,()=>{x.current=void 0,j()}}},[r==null?void 0:r.url,s,h,l,e.type,n]);const P=((c=e.sponsor)==null?void 0:c.logo)&&e.logoMode===u.PromotionLogoMode.CENTER;return o.jsxs(ee,{className:"PromoOverlay",children:[o.jsxs(oe,{children:[o.jsx(te,{className:t.cx_default(!P&&se),children:o.jsx(le,{style:{transform:"scale(1.5)"},children:"Ad"})}),o.jsxs(No,{children:[o.jsx(jo,{time:f,adCount:m,adPosition:b}),a&&o.jsx(t.b,{className:"ClosePromoIcon",close:()=>{var j;(j=x.current)==null||j.call(x),n==null||n(),h()}})]})]}),o.jsx(ne,{className:t.cx_default(So,v&&Po,!v&&To),children:o.jsx(_o,{ref:p})})]})},X=e=>{var s,l,n,r,a,c,p,v,i,f,y,m,I,b,A,x,h,P,j,_,D,R,q,w,V,F,U,K,z,G;const{promotion:d,advertisementPaused:ae,togglePause:N,controlVideo:T,skipAutoClose:re,promotionId:E,onClose:de,markAsViewed:C,externalAd:W}=e,L=d.type===u.PromotionType.INGAME_IAB11_LBAR||d.type===u.PromotionType.INGAME_IAB11,M=((s=d.sponsor)==null?void 0:s.logo)&&d.logoMode===u.PromotionLogoMode.CENTER,ce=!!((n=(l=d.banner)==null?void 0:l.video)!=null&&n.url),k=d.autoPlayVideo===u.AutoPlayVideo.ENABLED;if(g.useEffect(()=>{N==null||N(ce||k)},[]),g.useEffect(()=>{E&&d.type&&C&&C()},[E,d.type,C]),g.useEffect(()=>()=>{T==null||T({muted:!1})},[T]),W)return o.jsx(Eo,{...e,externalAd:W});let S=(r=d.banner)==null?void 0:r.url;return S&&S.indexOf("http")!==0&&(S=`https://${S}`),o.jsxs(ee,{className:"PromoOverlay",children:[o.jsxs(oe,{children:[o.jsxs(te,{className:t.cx_default(!M&&se),children:[((a=d.sponsor)==null?void 0:a.logo)&&d.logoMode===u.PromotionLogoMode.LEFT&&o.jsx(Y,{src:(c=d.sponsor)==null?void 0:c.logo,alt:"promo"}),o.jsxs(po,{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(ro,{children:(i=d.sponsor)==null?void 0:i.name}),o.jsxs(yo,{className:"SponsorText",children:[o.jsx(le,{children:"AD"}),o.jsx(vo,{children:"SPONSORED"})]})]})]}),o.jsx(t.b,{className:"ClosePromoIcon",close:de,autoClose:(f=d.closeTimer)==null?void 0:f.auto,duration:re?0:(y=d.closeTimer)==null?void 0:y.seconds,isPlaying:!ae})]}),o.jsxs(ne,{children:[M&&o.jsx(Y,{className:mo,src:(m=d.sponsor)==null?void 0:m.logo,alt:"promo"}),o.jsx(J,{children:(b=(I=d.banner)==null?void 0:I.video)!=null&&b.url?o.jsx(t.Y,{source:(x=(A=d.banner)==null?void 0:A.video)==null?void 0:x.url,poster:(P=(h=d.banner)==null?void 0:h.video)==null?void 0:P.thumbnailUrl,aspectRatio:L?"1/1":"16/9",onPause:()=>{k&&(N==null||N(!0))},onPlay:()=>{t.eventBus.emit("advertisement",{action:"videoPlay",payload:{id:E,type:d.type}}),N==null||N(!1)},controlVideo:T,autoPlay:k}):(j=d.banner)!=null&&j.imageUrl?o.jsx(co,{style:L?{aspectRatio:"1/1"}:{},src:(_=d.banner)==null?void 0:_.imageUrl,alt:"promo"}):null}),!L&&o.jsxs(J,{children:[((D=d.banner)==null?void 0:D.title)&&o.jsx(go,{className:t.cx_default("AdvTitle",M&&Io),children:(R=d.banner)==null?void 0:R.title}),((q=d.banner)==null?void 0:q.body)&&o.jsx(uo,{className:"AdvDescription",children:(w=d.banner)==null?void 0:w.body})]})]}),d.buttonType!==u.PromotionButtonType.NO_BUTTON&&o.jsx(fo,{children:o.jsx(Ao,{href:S,style:{backgroundColor:((F=(V=d.banner)==null?void 0:V.ctaButton)==null?void 0:F.color)||"#009dc4",color:((K=(U=d.banner)==null?void 0:U.ctaButton)==null?void 0:K.textColor)||"#fff"},"data-analytics":"button","data-promo-id":E,"data-promo-type":d.type,target:"_blank",children:(G=(z=d.banner)==null?void 0:z.ctaButton)==null?void 0:G.label})})]})},$o=t.styled_default("div")({name:"SidebarContainer",class:"s1abskp8",propsAsIs:!1}),Co=({children:e,direction:s,style:l,className:n,hiding:r})=>o.jsx(O,{direction:s,style:l,hiding:r,className:n,children:o.jsx($o,{children:e})}),Lo=e=>(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB11_LBAR||(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB21_LBAR,Mo=e=>(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB11||(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB21,ko=({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(io,{open:i,notification:e.notification,promotionId:e.question.id}):!a&&!p&&(l||Mo(e.promotion))?o.jsx(ao,{className:"PromoOverlayContainer",children:o.jsx(X,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,onClose:s,skipAutoClose:n,externalAd:f,controlVideo:y,advertisementPaused:m,togglePause:I})}):a&&(l||Lo(e.promotion))?o.jsx(Co,{className:"PromoSidebarContainer",direction:a,hiding:!1,children:o.jsx(X,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,externalAd:f,onClose:s,controlVideo:y,skipAutoClose:n,advertisementPaused:m,togglePause:I})}):p?o.jsx(_e,{promotionId:e.question.id,hiding:!1,promotion:e.promotion,direction:p}):null:null,Oo=t.styled_default("div")({name:"AdvertisementUIWrap",class:"aa6pjif",propsAsIs:!1}),Bo=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}})}},Do=({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 b=g.useRef(null),A=t.useStore(e.advertisement.$store);t.L(b,{enabled:!!A.data,event:"click",listener:Bo});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(Oo,{ref:b,style:{height:x?"auto":"100%"},className:t.cx_default("SL-AdvertisementUIWrap",p&&"mobile-view",h&&"SL-AdvertisementUIWrap--lower-third"),children:o.jsx(ko,{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})})},ie=({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(Do,{gamification:y,sidebar:s,banner:n,layoutMode:c,isMobileScreen:p,persistent:v,notification:i,skipTypeCheck:a,skipAutoClose:r,externalAd:l,controlVideo:e.controlVideoPlayer}):null},Ro=({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(ie,{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=Ro;exports.StreamLayerSDKAdvertisementUI=ie;
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"),ue=t.styled_default("div")({name:"Container",class:"c5b6wdg",propsAsIs:!1}),pe="a1rlj479",ye="s35f1di",ve="sj4471g",fe="b12050d8",Ae="b1d5ybek",ge=e=>e==="left"||e==="right"?ye:fe,xe=e=>e==="left"||e==="right"?ve:Ae,Ie=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(ue,{style:s,className:t.cx_default(l,pe,Ie(a),n&&!r&&ge(a),n&&r&&xe(a)),onAnimationEnd:c,children:e}),he=t.styled_default("a")({name:"Link",class:"l1sgte8c",propsAsIs:!1}),je=t.styled_default("div")({name:"BannerContainer",class:"b7yfc72",propsAsIs:!1}),be=()=>he,_e=t.styled_default(be())({name:"BannerLink",class:"bejjq94",propsAsIs:!0}),Ne=({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.banner)==null?void 0:a.url;return c&&c.indexOf("http")!==0&&(c=`https://${c}`),o.jsx(B,{direction:n,hiding:l,children:o.jsx(je,{className:"BannerContainer",children:o.jsx(_e,{className:"BannerLink",href:c,style:{backgroundImage:`url(${e.additionalBanner.imageUrl})`},"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}),Pe=t.styled_default("div")({name:"Body",class:"b1ia90c2",propsAsIs:!1}),$e=t.styled_default("div")({name:"Title",class:"tg2z08v",propsAsIs:!1}),Te=t.styled_default("div")({name:"Text",class:"t59zdk1",propsAsIs:!1}),D=t.styled_default("div")({name:"MediaImgBottom",class:"m1ab9fq",propsAsIs:!1}),Ee=()=>D,Ce=t.styled_default(Ee())({name:"MediaImgMiddle",class:"m9fsr0y",propsAsIs:!0}),Le=t.styled_default("img")({name:"CtaIcon",class:"cvi9y5q",propsAsIs:!1}),Me=t.styled_default("button")({name:"Button",class:"bgl6boa",propsAsIs:!1}),ke=t.styled_default("div")({name:"Logo",class:"l5mq0z",propsAsIs:!1}),Oe=t.styled_default("div")({name:"Footer",class:"f1mse0ft",propsAsIs:!1}),Be=t.styled_default("div")({name:"Vector",class:"v1hcloah",propsAsIs:!1}),De=t.styled_default("div")({name:"NotificationContainer",class:"n3n65jf",propsAsIs:!1}),Re={[u.NotificationPromotionImagePosition.BOTTOM]:D,[u.NotificationPromotionImagePosition.MIDDLE]:Ce},qe=({src:e,imagePosition:s})=>{const l=Re[s]||D;return o.jsx(l,{children:o.jsx("img",{src:e,alt:""})})},we=({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(qe,{src:r,imagePosition:v}),o.jsxs(Pe,{children:[l&&o.jsx($e,{children:l}),n&&o.jsx(Te,{children:n})]})]}),o.jsxs(Oe,{children:[p!==u.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsxs(o.Fragment,{children:[o.jsx(ke,{children:o.jsx("img",{src:c,alt:l})}),o.jsx(Be,{})]}),o.jsxs(Me,{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(Le,{src:i==null?void 0:i.ctaIcon,alt:"cta-icon"}),(i==null?void 0:i.label)||"Open"]})]})]})},Ve=t.styled_default("div")({name:"NotificationContent",class:"n1ku6hz",propsAsIs:!1}),Fe=t.styled_default("div")({name:"NotificationContainer",class:"nbxqmol",propsAsIs:!1}),Ue=t.styled_default("div")({name:"Body",class:"b1gu3eml",propsAsIs:!1}),ze=t.styled_default("div")({name:"Title",class:"t1u17zva",propsAsIs:!1}),Ge=t.styled_default("div")({name:"Text",class:"t10ko1g",propsAsIs:!1}),C=t.styled_default("div")({name:"Media",class:"mntc42e",propsAsIs:!1}),Ke=()=>C,J=t.styled_default(Ke())({name:"MediaImgFit",class:"ml060eo",propsAsIs:!0}),We=()=>C,oe=t.styled_default(We())({name:"MediaImgCentered",class:"m1vqlvig",propsAsIs:!0}),He=()=>oe,Ye=t.styled_default(He())({name:"MediaImgBottom",class:"m1e7tvi5",propsAsIs:!0}),Je=()=>C,Xe=t.styled_default(Je())({name:"MediaImgSolid",class:"mqvntt2",propsAsIs:!0}),Ze=()=>C,Qe=t.styled_default(Ze())({name:"MediaImgMiddle",class:"m12jtj3u",propsAsIs:!0}),eo=t.styled_default("img")({name:"CtaIcon",class:"ckq1frv",propsAsIs:!1}),oo=t.styled_default("button")({name:"Button",class:"bis90pl",propsAsIs:!1}),to=()=>t.h1,so=t.styled_default(to())({name:"StyledChevronRight",class:"s9mjmz3",propsAsIs:!0}),no=t.styled_default("div")({name:"Logo",class:"l1cf50a7",propsAsIs:!1}),lo={[u.NotificationPromotionImagePosition.UNSET]:J,[u.NotificationPromotionImagePosition.FIT]:J,[u.NotificationPromotionImagePosition.CENTERED]:oe,[u.NotificationPromotionImagePosition.BOTTOM]:Ye,[u.NotificationPromotionImagePosition.SOLID]:Xe,[u.NotificationPromotionImagePosition.MIDDLE]:Qe},io=({src:e,imagePosition:s})=>{const l=lo[s];return o.jsx(l,{children:o.jsx("img",{src:e,alt:""})})},ao=({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(we,{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(Fe,{onClick:s,children:[f!==u.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsx(no,{children:o.jsx("img",{src:i,alt:a})}),o.jsxs(Ve,{children:[o.jsx(io,{src:p,imagePosition:y}),o.jsxs(Ue,{children:[a&&o.jsx(ze,{children:a}),c&&o.jsx(Ge,{children:c})]}),o.jsxs(oo,{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(eo,{src:m==null?void 0:m.ctaIcon,alt:"cta-icon"}),(m==null?void 0:m.label)||"Open"]}),o.jsx(so,{name:"chevronRight"})]})]})})},ro=t.styled_default("div")({name:"OverlayContainer",class:"okzhq2w",propsAsIs:!1}),te=t.styled_default("div")({name:"PromoOverlay",class:"pmgz5i",propsAsIs:!1}),se=t.styled_default("div")({name:"Header",class:"hyxi3jt",propsAsIs:!1}),ne=t.styled_default("div")({name:"HeaderContent",class:"h149e3gp",propsAsIs:!1}),le="h10toh7",X=t.styled_default("img")({name:"SponsorLogo",class:"s1jyea6t",propsAsIs:!1}),co=t.styled_default("div")({name:"SponsorName",class:"szpfa3h",propsAsIs:!1}),ie=t.styled_default("div")({name:"Media",class:"m1crmu01",propsAsIs:!1}),mo=t.styled_default("img")({name:"PromoImg",class:"p1l37r8s",propsAsIs:!1}),uo="s1nmch9k",Z=t.styled_default("div")({name:"Content",class:"c1er0ljd",propsAsIs:!1}),po=t.styled_default("div")({name:"Description",class:"dydopmr",propsAsIs:!1}),yo=t.styled_default("div")({name:"Sponsor",class:"s1w6nt04",propsAsIs:!1}),vo=t.styled_default("div")({name:"SponsorText",class:"s1evcmtq",propsAsIs:!1}),ae=t.styled_default("div")({name:"ADLogo",class:"awodx0x",propsAsIs:!1}),fo=t.styled_default("span")({name:"SponsoredText",class:"s1q3n6oi",propsAsIs:!1}),Ao=t.styled_default("div")({name:"ActionBtnWrap",class:"a8d4xfk",propsAsIs:!1}),go=t.styled_default("a")({name:"ActionButton",class:"at6oobh",propsAsIs:!1}),xo=t.styled_default("div")({name:"Title",class:"t1gyg7tt",propsAsIs:!1}),Io="h17rwbtk",ho=t.styled_default("div")({name:"Container",class:"c10m2bce",propsAsIs:!1}),Q=t.styled_default("div")({name:"Item",class:"ig23yq5",propsAsIs:!1}),jo=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(ho,{children:[s>1&&o.jsxs(o.Fragment,{children:[o.jsxs(Q,{children:[l," of ",s]}),o.jsx(jo,{})]}),o.jsxs(Q,{children:[n,":",r<10?`0${r}`:r]})]})},_o=(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}},No=t.styled_default("div")({name:"Container",class:"c4q6dw1",propsAsIs:!1}),So=t.styled_default("div")({name:"ControlsContainer",class:"c1la67r",propsAsIs:!1}),Po="m3guev",$o="m7099mt",To="mmm6o5s",Eo=({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,x]=g.useState(0),[b,A]=g.useState(0),I=g.useRef(),h=g.useCallback(()=>{y(0),x(0),A(0),i(!1),s==null||s({muted:!1})},[s]);g.useEffect(()=>{if(r!=null&&r.url&&p.current){h();const j=_o(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:_=>{y(Math.round(_.duration-_.currentTime)),x(_.totalAds),A(_.adPosition)}})();return I.current=j,()=>{I.current=void 0,j()}}},[r==null?void 0:r.url,s,h,l,e.type,n]);const P=((c=e.sponsor)==null?void 0:c.logo)&&e.logoMode===u.PromotionLogoMode.CENTER;return o.jsxs(te,{className:"PromoOverlay",children:[o.jsxs(se,{children:[o.jsx(ne,{className:t.cx_default(!P&&le),children:o.jsx(ae,{style:{transform:"scale(1.5)"},children:"Ad"})}),o.jsxs(So,{children:[o.jsx(bo,{time:f,adCount:m,adPosition:b}),a&&o.jsx(t.b,{className:"ClosePromoIcon",close:()=>{var j;(j=I.current)==null||j.call(I),n==null||n(),h()}})]})]}),o.jsx(ie,{className:t.cx_default(Po,v&&$o,!v&&To),children:o.jsx(No,{ref:p})})]})},ee=e=>{var s,l,n,r,a,c,p,v,i,f,y,m,x,b,A,I,h,P,j,_,R,q,w,V,F,U,z,G,K,W;const{promotion:d,advertisementPaused:de,togglePause:N,controlVideo:$,skipAutoClose:ce,promotionId:T,onClose:me,markAsViewed:L,externalAd:H}=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,Y=!!((n=(l=d.banner)==null?void 0:l.video)!=null&&n.url),E=d.autoPlayVideo===u.AutoPlayVideo.ENABLED;if(g.useEffect(()=>{N==null||N(Y||E)},[]),g.useEffect(()=>{T&&d.type&&L&&L()},[T,d.type,L]),g.useEffect(()=>()=>{$==null||$({muted:!1})},[$]),H)return o.jsx(Eo,{...e,externalAd:H});let S=(r=d.banner)==null?void 0:r.url;S&&S.indexOf("http")!==0&&(S=`https://${S}`);let O=!0;return Y&&(!de||!E?O=!0:O=!1),o.jsxs(te,{className:"PromoOverlay",children:[o.jsxs(se,{children:[o.jsxs(ne,{className:t.cx_default(!k&&le),children:[((a=d.sponsor)==null?void 0:a.logo)&&d.logoMode===u.PromotionLogoMode.LEFT&&o.jsx(X,{src:(c=d.sponsor)==null?void 0:c.logo,alt:"promo"}),o.jsxs(yo,{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(co,{children:(i=d.sponsor)==null?void 0:i.name}),o.jsxs(vo,{className:"SponsorText",children:[o.jsx(ae,{children:"AD"}),o.jsx(fo,{children:"SPONSORED"})]})]})]}),o.jsx(t.b,{className:"ClosePromoIcon",close:me,autoClose:(f=d.closeTimer)==null?void 0:f.auto,duration:ce?0:(y=d.closeTimer)==null?void 0:y.seconds,isPlaying:O})]}),o.jsxs(ie,{children:[k&&o.jsx(X,{className:uo,src:(m=d.sponsor)==null?void 0:m.logo,alt:"promo"}),o.jsx(Z,{children:(b=(x=d.banner)==null?void 0:x.video)!=null&&b.url?o.jsx(t.Y,{source:(I=(A=d.banner)==null?void 0:A.video)==null?void 0:I.url,poster:(P=(h=d.banner)==null?void 0:h.video)==null?void 0:P.thumbnailUrl,aspectRatio:M?"1/1":"16/9",onPause:()=>{E&&(N==null||N(!0))},onPlay:()=>{t.eventBus.emit("advertisement",{action:"videoPlay",payload:{id:T,type:d.type}}),N==null||N(!1)},controlVideo:$,autoPlay:E}):(j=d.banner)!=null&&j.imageUrl?o.jsx(mo,{style:M?{aspectRatio:"1/1"}:{},src:(_=d.banner)==null?void 0:_.imageUrl,alt:"promo"}):null}),!M&&o.jsxs(Z,{children:[((R=d.banner)==null?void 0:R.title)&&o.jsx(xo,{className:t.cx_default("AdvTitle",k&&Io),children:(q=d.banner)==null?void 0:q.title}),((w=d.banner)==null?void 0:w.body)&&o.jsx(po,{className:"AdvDescription",children:(V=d.banner)==null?void 0:V.body})]})]}),d.buttonType!==u.PromotionButtonType.NO_BUTTON&&o.jsx(Ao,{children:o.jsx(go,{href:S,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":T,"data-promo-type":d.type,target:"_blank",children:(W=(K=d.banner)==null?void 0:K.ctaButton)==null?void 0:W.label})})]})},Co=t.styled_default("div")({name:"SidebarContainer",class:"s1abskp8",propsAsIs:!1}),Lo=({children:e,direction:s,style:l,className:n,hiding:r})=>o.jsx(B,{direction:s,style:l,hiding:r,className:n,children:o.jsx(Co,{children:e})}),Mo=e=>(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB11_LBAR||(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB21_LBAR,ko=e=>(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB11||(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB21,Oo=({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:x})=>e.promotion?c&&e.notification?o.jsx(ao,{open:i,notification:e.notification,promotionId:e.question.id}):!a&&!p&&(l||ko(e.promotion))?o.jsx(ro,{className:"PromoOverlayContainer",children:o.jsx(ee,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,onClose:s,skipAutoClose:n,externalAd:f,controlVideo:y,advertisementPaused:m,togglePause:x})}):a&&(l||Mo(e.promotion))?o.jsx(Lo,{className:"PromoSidebarContainer",direction:a,hiding:!1,children:o.jsx(ee,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,externalAd:f,onClose:s,controlVideo:y,skipAutoClose:n,advertisementPaused:m,togglePause:x})}):p?o.jsx(Ne,{promotionId:e.question.id,hiding:!1,promotion:e.promotion,direction:p}):null:null,Bo=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}})}},Ro=({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,x;const b=g.useRef(null),A=t.useStore(e.advertisement.$store);t.L(b,{enabled:!!A.data,event:"click",listener:Do});const I=!a&&!r;if(A.data===void 0||!v&&A.isViewed)return null;const h=((x=(m=(y=A==null?void 0:A.data)==null?void 0:y.notification)==null?void 0:m.promotion)==null?void 0:x.mode)===u.NotificationPromotionMode.LOWER_THIRD;return o.jsx(Bo,{ref:b,style:{height:I?"auto":"100%"},className:t.cx_default("SL-AdvertisementUIWrap",p&&"mobile-view",h&&"SL-AdvertisementUIWrap--lower-third"),children:o.jsx(Oo,{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})})},re=({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(Ro,{gamification:y,sidebar:s,banner:n,layoutMode:c,isMobileScreen:p,persistent:v,notification:i,skipTypeCheck:a,skipAutoClose:r,externalAd:l,controlVideo:e.controlVideoPlayer}):null},qo=({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(re,{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=qo;exports.StreamLayerSDKAdvertisementUI=re;
@@ -14,4 +14,4 @@
14
14
  `),c=`
15
15
  `+n+(o.length?s("│"):" ")+" ";return n+r.join(c)+`
16
16
  `+o.map(function(l,m){var u=m===o.length-1,d=l.nodes&&l.nodes.length,y=n+(u?" ":s("│"))+" ";return n+s(u?"└":"├")+s("─")+s(d?"┬":"─")+" "+e(l,y,a).slice(n.length+2)}).join("")};const __=S_,Er=Symbol("avvio.TimeTree.untrackNode"),va=Symbol("avvio.TimeTree.trackNode"),br=Symbol("avvio.TimeTree.getParent"),Nr=Symbol("avvio.TimeTree.getNode"),Ir=Symbol("avvio.TimeTree.addNode");let E_=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[va](e){this.tableId.set(e.id,e),this.tableLabel.has(e.label)?this.tableLabel.get(e.label).push(e):this.tableLabel.set(e.label,[e])}[Er](e){this.tableId.delete(e.id);const t=this.tableLabel.get(e.label);if(t.id){this.tableLabel.delete(e.label);return}t.pop(),t.length===0&&this.tableLabel.delete(e.label)}[br](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[Nr](e){return this.tableId.get(e)}[Ir](e,t,n){if(e===null)return this.root={id:"root",label:t,start:n,nodes:[]},this[va](this.root),this.root.id;const a=this[br](e),s=`${t}-${Math.random()}`,o={id:s,parent:e,start:n,label:t,nodes:[]};return a.nodes.push(o),this[va](o),s}start(e,t,n=Date.now()){return this[Ir](e,t,n)}stop(e,t=Date.now()){const n=this[Nr](e);n&&(n.stop=t,n.diff=n.stop-n.start||0,this[Er](n))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const e=n=>(n.label=`${n.label} ${n.diff} ms`,n.nodes.length>0&&(n.nodes=n.nodes.map(a=>e(a))),n),t=e(this.toJSON());return __(t)}};var b_=E_,Bs={exports:{}},os={exports:{}},Aa,Or;function N_(){if(Or)return Aa;Or=1;var e=1e3,t=e*60,n=t*60,a=n*24,s=a*7,o=a*365.25;Aa=function(u,d){d=d||{};var y=typeof u;if(y==="string"&&u.length>0)return r(u);if(y==="number"&&isFinite(u))return d.long?l(u):c(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function r(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var y=parseFloat(d[1]),T=(d[2]||"ms").toLowerCase();switch(T){case"years":case"year":case"yrs":case"yr":case"y":return y*o;case"weeks":case"week":case"w":return y*s;case"days":case"day":case"d":return y*a;case"hours":case"hour":case"hrs":case"hr":case"h":return y*n;case"minutes":case"minute":case"mins":case"min":case"m":return y*t;case"seconds":case"second":case"secs":case"sec":case"s":return y*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return y;default:return}}}}function c(u){var d=Math.abs(u);return d>=a?Math.round(u/a)+"d":d>=n?Math.round(u/n)+"h":d>=t?Math.round(u/t)+"m":d>=e?Math.round(u/e)+"s":u+"ms"}function l(u){var d=Math.abs(u);return d>=a?m(u,d,a,"day"):d>=n?m(u,d,n,"hour"):d>=t?m(u,d,t,"minute"):d>=e?m(u,d,e,"second"):u+" ms"}function m(u,d,y,T){var f=d>=y*1.5;return Math.round(u/y)+" "+T+(f?"s":"")}return Aa}function I_(e){n.debug=n,n.default=n,n.coerce=l,n.disable=o,n.enable=s,n.enabled=r,n.humanize=N_(),n.destroy=m,Object.keys(e).forEach(u=>{n[u]=e[u]}),n.names=[],n.skips=[],n.formatters={};function t(u){let d=0;for(let y=0;y<u.length;y++)d=(d<<5)-d+u.charCodeAt(y),d|=0;return n.colors[Math.abs(d)%n.colors.length]}n.selectColor=t;function n(u){let d,y=null,T,f;function k(...N){if(!k.enabled)return;const h=k,A=Number(new Date),w=A-(d||A);h.diff=w,h.prev=d,h.curr=A,d=A,N[0]=n.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let b=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(v,R)=>{if(v==="%%")return"%";b++;const I=n.formatters[R];if(typeof I=="function"){const M=N[b];v=I.call(h,M),N.splice(b,1),b--}return v}),n.formatArgs.call(h,N),(h.log||n.log).apply(h,N)}return k.namespace=u,k.useColors=n.useColors(),k.color=n.selectColor(u),k.extend=a,k.destroy=n.destroy,Object.defineProperty(k,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(T!==n.namespaces&&(T=n.namespaces,f=n.enabled(u)),f),set:N=>{y=N}}),typeof n.init=="function"&&n.init(k),k}function a(u,d){const y=n(this.namespace+(typeof d>"u"?":":d)+u);return y.log=this.log,y}function s(u){n.save(u),n.namespaces=u,n.names=[],n.skips=[];let d;const y=(typeof u=="string"?u:"").split(/[\s,]+/),T=y.length;for(d=0;d<T;d++)y[d]&&(u=y[d].replace(/\*/g,".*?"),u[0]==="-"?n.skips.push(new RegExp("^"+u.slice(1)+"$")):n.names.push(new RegExp("^"+u+"$")))}function o(){const u=[...n.names.map(c),...n.skips.map(c).map(d=>"-"+d)].join(",");return n.enable(""),u}function r(u){if(u[u.length-1]==="*")return!0;let d,y;for(d=0,y=n.skips.length;d<y;d++)if(n.skips[d].test(u))return!1;for(d=0,y=n.names.length;d<y;d++)if(n.names[d].test(u))return!0;return!1}function c(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function l(u){return u instanceof Error?u.stack||u.message:u}function m(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}var O_=I_;(function(e,t){t.formatArgs=a,t.save=s,t.load=o,t.useColors=n,t.storage=r(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function a(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const m="color: "+this.color;l.splice(1,0,m,"color: inherit");let u=0,d=0;l[0].replace(/%[a-zA-Z%]/g,y=>{y!=="%%"&&(u++,y==="%c"&&(d=u))}),l.splice(d,0,m)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function o(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof D<"u"&&"env"in D&&(l=D.env.DEBUG),l}function r(){try{return localStorage}catch{}}e.exports=O_(t);const{formatters:c}=e.exports;c.j=function(l){try{return JSON.stringify(l)}catch(m){return"[UnexpectedJSONParseError]: "+m.message}}})(os,os.exports);var Dc=os.exports;const v_=cc,A_=gc.EventEmitter,w_=Zn.inherits,ue=Dc("avvio"),{AVV_ERR_READY_TIMEOUT:R_}=Cc,wa=Symbol.for("plugin-meta");function L_(e,t){return e[wa]&&e[wa].name?e[wa].name:typeof t<"u"&&typeof t!="function"&&t.name?t.name:e.name?e.name:e.toString().split(`
17
- `).slice(0,2).map(n=>n.trim()).join(" -- ")}function M_(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function Vt(e,t,n,a,s){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=s===void 0?e._timeout:s,this.name=L_(t,n),this.isAfter=a,this.q=v_(e,P_,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}w_(Vt,A_);Vt.prototype.exec=function(e,t){const n=this.func;let a=!1;const s=this.name;if(this.parent._error&&!this.isAfter){ue("skipping loading of plugin as parent errored and it is not an after",s),D.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(l){return ue("override errored",s),t(l)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,ue("exec",s);let o;const r=l=>{if(a){ue("loading complete",s);return}this._error=l,ue(l?"exec errored":"exec completed",s),a=!0,o&&clearTimeout(o),t(l)};this.timeout>0&&(ue("setting up timeout",s,this.timeout),o=setTimeout(function(){ue("timed out",s),o=null;const l=new R_(s);l.fn=n,r(l)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const c=n(this.server,this.opts,r);c&&typeof c.then=="function"&&(ue("exec: resolving promise",s),c.then(()=>D.nextTick(r),l=>D.nextTick(r,l)))};Vt.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(ue("rejecting promise",this.name,n),this._promise.reject(n)):(ue("resolving promise",this.name),this._promise.resolve()),this._promise=null,D.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=M_(),t=this._promise.promise,this.server?e():this.on("start",e)),t};Vt.prototype.enqueue=function(e,t){ue("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};Vt.prototype.finish=function(e,t){ue("finish",this.name,e);const n=()=>{this.loaded||(ue("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e){this._promise&&(this._promise.reject(e),this._promise=null),n();return}const a=()=>{if(ue("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const s=()=>{ue("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(s,s),this._promise=null}else n();else ue("delayed",this.name),this.q.drain=()=>{ue("drain",this.name),this.q.drain=C_,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function P_(e,t){const n=this;D.nextTick(Vs.bind(n),e,t)}function Vs(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,Vs.call(this,e,t)},t);return}const n=this._current[0];this._current.unshift(e),e.exec(n&&n.server||this._server,a=>{e.finish(a,s=>{this._current.shift(),t(s)})})}function C_(){}Bs.exports=Vt;Bs.exports.loadPlugin=Vs;var D_=Bs.exports;const vr=cc,U_=gc.EventEmitter,F_=Zn.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ra,AVV_ERR_CALLBACK_NOT_FN:Wt,AVV_ERR_PLUGIN_NOT_VALID:G_,AVV_ERR_ROOT_PLG_BOOTED:B_,AVV_ERR_READY_TIMEOUT:V_}=Cc,q_=b_,rs=D_,Ft=Dc("avvio"),qn=Symbol("kAvvio"),La=Symbol("kThenifyDoNotWrap");function x_(e,t,n){const a=t.expose||{},s=a.use||"use",o=a.after||"after",r=a.ready||"ready",c=a.onClose||"onClose",l=a.close||"close";if(e[s])throw new Ra(s);if(e[o])throw new Ra(o);if(e[r])throw new Ra(r);e[s]=function(m,u){return n.use(m,u),this},Object.defineProperty(e,"then",{get:Uc.bind(n)}),e[qn]=!0,e[o]=function(m){return typeof m!="function"?n._loadRegistered():(n.after(Ma(m,this)),this)},e[r]=function(m){if(m&&typeof m!="function")throw new Wt(r,typeof m);return n.ready(m?Ma(m,this):void 0)},e[c]=function(m){if(typeof m!="function")throw new Wt(c,typeof m);return n.onClose($_(m,this)),this},e[l]=function(m){if(m&&typeof m!="function")throw new Wt(l,typeof m);return m?(n.close(Ma(m,this)),this):n.close()}}function ce(e,t,n){if(typeof e=="function"&&arguments.length===1&&(n=e,t={},e=null),typeof t=="function"&&(n=t,t={}),t=t||{},!(this instanceof ce)){const a=new ce(e,t,n);return e&&x_(e,t,a),a}t.autostart!==!1&&(t.autostart=!0),e=e||this,this._timeout=Number(t.timeout)||0,this._server=e,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new q_,this._readyQ=vr(this,Fc,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=Ar},this._closeQ=vr(this,j_,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=Ar},this._doStart=null,this._root=new rs(this,H_.bind(this),t,!1,0),this._root.once("start",(a,s,o)=>{const r=this.pluginTree.start(null,s,o);this._root.once("loaded",(c,l,m)=>{this.pluginTree.stop(r,m)})}),rs.loadPlugin.call(this,this._root,a=>{Ft("root plugin ready");try{this.emit("preReady"),this._root=null}catch(s){a=a||this._error||s}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function H_(e,t,n){this._doStart=n,t.autostart&&this.start()}F_(ce,U_);ce.prototype.start=function(){return this.started=!0,D.nextTick(this._doStart),this};ce.prototype.override=function(e,t,n){return e};function Q_(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new G_(typeof e);return e}ce.prototype[qn]=!0;ce.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};ce.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&D.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(ce.prototype,"then",{get:Uc});ce.prototype._addPlugin=function(e,t,n){if(e=Q_(e),t=t||{},this.booted)throw new B_;const a=this._current[0],s=new rs(this,e,t,n);if(s.once("start",(o,r,c)=>{const l=this.pluginTree.start(a.name,r,c);s.once("loaded",(m,u,d)=>{this.pluginTree.stop(l,d)})}),a.loaded)throw new Error(s.name,a.name);return a.enqueue(s,o=>{o&&(this._error=o)}),s};ce.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,s){Fc.call(this,e,s)}return this};ce.prototype.onClose=function(e){if(typeof e!="function")throw new Error("not a function");e[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(e,t.bind(this));function t(n){n&&(this._error=n)}return this};ce.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new Wt("close",typeof e)}else t=new Promise(function(n,a){e=function(s){if(s)return a(s);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),D.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};ce.prototype.ready=function(e){if(e){if(typeof e!="function")throw new Wt("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(s),this.start();const a=this._current[0].server;function s(o,r,c){o?n(o):t(a),D.nextTick(c)}})};ce.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};ce.prototype.toJSON=function(){return this.pluginTree.toJSON()};function Ar(){}function Uc(){if(this.booted){Ft("thenify returning null because we are already booted");return}if(this[La]){this[La]=!1;return}return Ft("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[La]=!0,e(this._server)),t)}function Fc(e,t){const n=this._server,a=this._error;let s;if(this._error=null,e.length===0)this._error=a,s=e(),s&&!s[qn]&&typeof s.then=="function"?s.then(()=>D.nextTick(t),o=>D.nextTick(t,o)):D.nextTick(t);else if(e.length===1)s=e(a),s&&!s[qn]&&typeof s.then=="function"?s.then(()=>D.nextTick(t),o=>D.nextTick(t,o)):D.nextTick(t);else if(this._timeout===0){const o=r=>{this._error=r,t(this._error)};e.length===2?e(a,o):e(a,n,o)}else Y_.call(this,e,a,n,t)}function Y_(e,t,n,a){const s=e.name;Ft("setting up ready timeout",s,this._timeout);let o=setTimeout(()=>{Ft("timed out",s),o=null;const c=new V_(s);c.fn=e,this._error=c,a(c)},this._timeout);e.length===2?e(t,r.bind(this)):e(t,n,r.bind(this));function r(c){o&&(clearTimeout(o),this._error=c,a(this._error))}}function j_(e,t){const n=this._server,a=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let s;a?s=e(n):s=e(this._error),s&&typeof s.then=="function"?(Ft("resolving close/onClose promise"),s.then(()=>D.nextTick(t),o=>D.nextTick(t,o))):D.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function $_(e,t){return n.bind(t);function n(a,s){let o;e.length===0?(o=e(),o&&o.then?o.then(function(){D.nextTick(s)},s):D.nextTick(s)):e.length===1?(o=e(this),o&&o.then?o.then(function(){D.nextTick(s)},s):D.nextTick(s)):e(this,s)}}function Ma(e,t){return n.bind(t);function n(a,s){let o;e?e.length===0?(o=e(),o&&o.then?o.then(function(){D.nextTick(s,a)},s):D.nextTick(s,a)):e.length===1?(o=e(a),o&&o.then?o.then(function(){D.nextTick(s)},s):D.nextTick(s)):e.length===2?e(a,s):e(a,this,s):D.nextTick(s)}}As.exports=ce;As.exports.express=function(e){return ce(e,{expose:{use:"load"}})};var K_=As.exports;const W_=bh(K_);(function(){if(window.requestAnimationFrame&&window.cancelAnimationFrame)return;const e=["webkit","moz","ms","o"];for(const t of e)window.requestAnimationFrame=window.requestAnimationFrame||window[`${t}RequestAnimationFrame`],window.cancelAnimationFrame=window.cancelAnimationFrame||window[`${t}CancelAnimationFrame`]||window[`${t}CancelRequestAnimationFrame`];if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){let t=0;const n=!!(window.performance&&window.performance.now);window.requestAnimationFrame=function(a){const s=n?window.performance.now():new Date().getTime(),o=Math.max(0,16-(s-t)),r=window.setTimeout(function(){a(s+o)},o);return t=s+o,r},window.cancelAnimationFrame=clearTimeout}})();function z_(e,t=!0,n=!0,a={friendsTab:"enabled"}){const s=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",o=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",r=W_(Object.create({}),{autostart:!1});return r.use(Zk,{friendsTab:a.friendsTab}),r.use(jk,{onDeepLinkHandled:a==null?void 0:a.onDeepLinkHandled}),r.use(zk,{videoPlayerController:a==null?void 0:a.videoPlayerController}),r.use(Xk,{onContentActivate:a==null?void 0:a.onContentActivate,withAd:a==null?void 0:a.withAd,withAdNotification:a==null?void 0:a.withAdNotification}),r.use(uk,{sdkKey:e,host:s,analyticsHost:o,version:a==null?void 0:a.version}),r.use(fk),r.use(Wk),r.use(dh),r.use(Uk),r.use(Eh),r.after((c,l,m)=>{if(c)throw c;l.ready(),m()}),n&&r.after(async(c,l,m)=>{if(c)throw c;await l.sdk.initializeApp(),m()}),r.onClose(()=>{console.log("close")}),r}const J_=({sdkKey:e,plugins:t,production:n,autoEnable:a,onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,withAdNotification:c,withAd:l,friendsTab:m})=>{const[u,d]=xs.useState(null);return xs.useEffect(()=>{let y=!1;if(!e)return console.error("streamlayer sdk key should be provided"),d(f=>(f!==null&&typeof f.disableApp=="function"&&f.disableApp(),null)),()=>{y=!0};const T=z_(e,n,a,{version:"1.9.1",onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,withAdNotification:c,withAd:l,friendsTab:m});if(t)for(const f of t)T.use(f);return T.ready().then(f=>{y||(d(f.sdk),typeof window<"u")}).catch(f=>console.log(f)),()=>{y=!0,T.close(function(f){if(f)throw f})}},[e,n]),u};exports.AutoPlayVideo=Hn;exports.CloseTimerAuto=ci;exports.CtaIconMode=ai;exports.InvitationFrom=Mn;exports.NotificationEnabled=Rn;exports.NotificationPromotionImagePosition=ti;exports.NotificationPromotionMode=ei;exports.NotificationSponsorLogoMode=ni;exports.PickHistoryStatus=Nt;exports.PromotionButtonType=oi;exports.PromotionLogoMode=ri;exports.PromotionType=he;exports.QuestionImages=ot;exports.QuestionStatus=re;exports.QuestionType=C;exports.SdkOverlayType=Q;exports.createContextKey=Ha;exports.global=Qa;exports.pino_1=Dr;exports.useStreamLayerApp=J_;
17
+ `).slice(0,2).map(n=>n.trim()).join(" -- ")}function M_(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function Vt(e,t,n,a,s){this.started=!1,this.func=t,this.opts=n,this.onFinish=null,this.parent=e,this.timeout=s===void 0?e._timeout:s,this.name=L_(t,n),this.isAfter=a,this.q=v_(e,P_,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}w_(Vt,A_);Vt.prototype.exec=function(e,t){const n=this.func;let a=!1;const s=this.name;if(this.parent._error&&!this.isAfter){ue("skipping loading of plugin as parent errored and it is not an after",s),D.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(l){return ue("override errored",s),t(l)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,ue("exec",s);let o;const r=l=>{if(a){ue("loading complete",s);return}this._error=l,ue(l?"exec errored":"exec completed",s),a=!0,o&&clearTimeout(o),t(l)};this.timeout>0&&(ue("setting up timeout",s,this.timeout),o=setTimeout(function(){ue("timed out",s),o=null;const l=new R_(s);l.fn=n,r(l)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const c=n(this.server,this.opts,r);c&&typeof c.then=="function"&&(ue("exec: resolving promise",s),c.then(()=>D.nextTick(r),l=>D.nextTick(r,l)))};Vt.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(ue("rejecting promise",this.name,n),this._promise.reject(n)):(ue("resolving promise",this.name),this._promise.resolve()),this._promise=null,D.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=M_(),t=this._promise.promise,this.server?e():this.on("start",e)),t};Vt.prototype.enqueue=function(e,t){ue("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};Vt.prototype.finish=function(e,t){ue("finish",this.name,e);const n=()=>{this.loaded||(ue("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,t(e))};if(e){this._promise&&(this._promise.reject(e),this._promise=null),n();return}const a=()=>{if(ue("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const s=()=>{ue("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(s,s),this._promise=null}else n();else ue("delayed",this.name),this.q.drain=()=>{ue("drain",this.name),this.q.drain=C_,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function P_(e,t){const n=this;D.nextTick(Vs.bind(n),e,t)}function Vs(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,Vs.call(this,e,t)},t);return}const n=this._current[0];this._current.unshift(e),e.exec(n&&n.server||this._server,a=>{e.finish(a,s=>{this._current.shift(),t(s)})})}function C_(){}Bs.exports=Vt;Bs.exports.loadPlugin=Vs;var D_=Bs.exports;const vr=cc,U_=gc.EventEmitter,F_=Zn.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Ra,AVV_ERR_CALLBACK_NOT_FN:Wt,AVV_ERR_PLUGIN_NOT_VALID:G_,AVV_ERR_ROOT_PLG_BOOTED:B_,AVV_ERR_READY_TIMEOUT:V_}=Cc,q_=b_,rs=D_,Ft=Dc("avvio"),qn=Symbol("kAvvio"),La=Symbol("kThenifyDoNotWrap");function x_(e,t,n){const a=t.expose||{},s=a.use||"use",o=a.after||"after",r=a.ready||"ready",c=a.onClose||"onClose",l=a.close||"close";if(e[s])throw new Ra(s);if(e[o])throw new Ra(o);if(e[r])throw new Ra(r);e[s]=function(m,u){return n.use(m,u),this},Object.defineProperty(e,"then",{get:Uc.bind(n)}),e[qn]=!0,e[o]=function(m){return typeof m!="function"?n._loadRegistered():(n.after(Ma(m,this)),this)},e[r]=function(m){if(m&&typeof m!="function")throw new Wt(r,typeof m);return n.ready(m?Ma(m,this):void 0)},e[c]=function(m){if(typeof m!="function")throw new Wt(c,typeof m);return n.onClose($_(m,this)),this},e[l]=function(m){if(m&&typeof m!="function")throw new Wt(l,typeof m);return m?(n.close(Ma(m,this)),this):n.close()}}function ce(e,t,n){if(typeof e=="function"&&arguments.length===1&&(n=e,t={},e=null),typeof t=="function"&&(n=t,t={}),t=t||{},!(this instanceof ce)){const a=new ce(e,t,n);return e&&x_(e,t,a),a}t.autostart!==!1&&(t.autostart=!0),e=e||this,this._timeout=Number(t.timeout)||0,this._server=e,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),n&&this.once("start",n),this.started=!1,this.booted=!1,this.pluginTree=new q_,this._readyQ=vr(this,Fc,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=Ar},this._closeQ=vr(this,j_,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=Ar},this._doStart=null,this._root=new rs(this,H_.bind(this),t,!1,0),this._root.once("start",(a,s,o)=>{const r=this.pluginTree.start(null,s,o);this._root.once("loaded",(c,l,m)=>{this.pluginTree.stop(r,m)})}),rs.loadPlugin.call(this,this._root,a=>{Ft("root plugin ready");try{this.emit("preReady"),this._root=null}catch(s){a=a||this._error||s}if(a){if(this._error=a,this._readyQ.length()===0)throw a}else this.booted=!0;this._readyQ.resume()})}function H_(e,t,n){this._doStart=n,t.autostart&&this.start()}F_(ce,U_);ce.prototype.start=function(){return this.started=!0,D.nextTick(this._doStart),this};ce.prototype.override=function(e,t,n){return e};function Q_(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new G_(typeof e);return e}ce.prototype[qn]=!0;ce.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};ce.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&D.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(ce.prototype,"then",{get:Uc});ce.prototype._addPlugin=function(e,t,n){if(e=Q_(e),t=t||{},this.booted)throw new B_;const a=this._current[0],s=new rs(this,e,t,n);if(s.once("start",(o,r,c)=>{const l=this.pluginTree.start(a.name,r,c);s.once("loaded",(m,u,d)=>{this.pluginTree.stop(l,d)})}),a.loaded)throw new Error(s.name,a.name);return a.enqueue(s,o=>{o&&(this._error=o)}),s};ce.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,s){Fc.call(this,e,s)}return this};ce.prototype.onClose=function(e){if(typeof e!="function")throw new Error("not a function");e[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(e,t.bind(this));function t(n){n&&(this._error=n)}return this};ce.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new Wt("close",typeof e)}else t=new Promise(function(n,a){e=function(s){if(s)return a(s);n()}});return this.ready(()=>{this._error=null,this._closeQ.push(e),D.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};ce.prototype.ready=function(e){if(e){if(typeof e!="function")throw new Wt("ready",typeof e);this._readyQ.push(e),queueMicrotask(this.start.bind(this));return}return new Promise((t,n)=>{this._readyQ.push(s),this.start();const a=this._current[0].server;function s(o,r,c){o?n(o):t(a),D.nextTick(c)}})};ce.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};ce.prototype.toJSON=function(){return this.pluginTree.toJSON()};function Ar(){}function Uc(){if(this.booted){Ft("thenify returning null because we are already booted");return}if(this[La]){this[La]=!1;return}return Ft("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[La]=!0,e(this._server)),t)}function Fc(e,t){const n=this._server,a=this._error;let s;if(this._error=null,e.length===0)this._error=a,s=e(),s&&!s[qn]&&typeof s.then=="function"?s.then(()=>D.nextTick(t),o=>D.nextTick(t,o)):D.nextTick(t);else if(e.length===1)s=e(a),s&&!s[qn]&&typeof s.then=="function"?s.then(()=>D.nextTick(t),o=>D.nextTick(t,o)):D.nextTick(t);else if(this._timeout===0){const o=r=>{this._error=r,t(this._error)};e.length===2?e(a,o):e(a,n,o)}else Y_.call(this,e,a,n,t)}function Y_(e,t,n,a){const s=e.name;Ft("setting up ready timeout",s,this._timeout);let o=setTimeout(()=>{Ft("timed out",s),o=null;const c=new V_(s);c.fn=e,this._error=c,a(c)},this._timeout);e.length===2?e(t,r.bind(this)):e(t,n,r.bind(this));function r(c){o&&(clearTimeout(o),this._error=c,a(this._error))}}function j_(e,t){const n=this._server,a=e[this._isOnCloseHandlerKey];if(e.length===0||e.length===1){let s;a?s=e(n):s=e(this._error),s&&typeof s.then=="function"?(Ft("resolving close/onClose promise"),s.then(()=>D.nextTick(t),o=>D.nextTick(t,o))):D.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function $_(e,t){return n.bind(t);function n(a,s){let o;e.length===0?(o=e(),o&&o.then?o.then(function(){D.nextTick(s)},s):D.nextTick(s)):e.length===1?(o=e(this),o&&o.then?o.then(function(){D.nextTick(s)},s):D.nextTick(s)):e(this,s)}}function Ma(e,t){return n.bind(t);function n(a,s){let o;e?e.length===0?(o=e(),o&&o.then?o.then(function(){D.nextTick(s,a)},s):D.nextTick(s,a)):e.length===1?(o=e(a),o&&o.then?o.then(function(){D.nextTick(s)},s):D.nextTick(s)):e.length===2?e(a,s):e(a,this,s):D.nextTick(s)}}As.exports=ce;As.exports.express=function(e){return ce(e,{expose:{use:"load"}})};var K_=As.exports;const W_=bh(K_);(function(){if(window.requestAnimationFrame&&window.cancelAnimationFrame)return;const e=["webkit","moz","ms","o"];for(const t of e)window.requestAnimationFrame=window.requestAnimationFrame||window[`${t}RequestAnimationFrame`],window.cancelAnimationFrame=window.cancelAnimationFrame||window[`${t}CancelAnimationFrame`]||window[`${t}CancelRequestAnimationFrame`];if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){let t=0;const n=!!(window.performance&&window.performance.now);window.requestAnimationFrame=function(a){const s=n?window.performance.now():new Date().getTime(),o=Math.max(0,16-(s-t)),r=window.setTimeout(function(){a(s+o)},o);return t=s+o,r},window.cancelAnimationFrame=clearTimeout}})();function z_(e,t=!0,n=!0,a={friendsTab:"enabled"}){const s=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",o=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",r=W_(Object.create({}),{autostart:!1});return r.use(Zk,{friendsTab:a.friendsTab}),r.use(jk,{onDeepLinkHandled:a==null?void 0:a.onDeepLinkHandled}),r.use(zk,{videoPlayerController:a==null?void 0:a.videoPlayerController}),r.use(Xk,{onContentActivate:a==null?void 0:a.onContentActivate,withAd:a==null?void 0:a.withAd,withAdNotification:a==null?void 0:a.withAdNotification}),r.use(uk,{sdkKey:e,host:s,analyticsHost:o,version:a==null?void 0:a.version}),r.use(fk),r.use(Wk),r.use(dh),r.use(Uk),r.use(Eh),r.after((c,l,m)=>{if(c)throw c;l.ready(),m()}),n&&r.after(async(c,l,m)=>{if(c)throw c;await l.sdk.initializeApp(),m()}),r.onClose(()=>{console.log("close")}),r}const J_=({sdkKey:e,plugins:t,production:n,autoEnable:a,onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,withAdNotification:c,withAd:l,friendsTab:m})=>{const[u,d]=xs.useState(null);return xs.useEffect(()=>{let y=!1;if(!e)return console.error("streamlayer sdk key should be provided"),d(f=>(f!==null&&typeof f.disableApp=="function"&&f.disableApp(),null)),()=>{y=!0};const T=z_(e,n,a,{version:"1.9.2",onDeepLinkHandled:s,videoPlayerController:o,onContentActivate:r,withAdNotification:c,withAd:l,friendsTab:m});if(t)for(const f of t)T.use(f);return T.ready().then(f=>{y||(d(f.sdk),typeof window<"u")}).catch(f=>console.log(f)),()=>{y=!0,T.close(function(f){if(f)throw f})}},[e,n]),u};exports.AutoPlayVideo=Hn;exports.CloseTimerAuto=ci;exports.CtaIconMode=ai;exports.InvitationFrom=Mn;exports.NotificationEnabled=Rn;exports.NotificationPromotionImagePosition=ti;exports.NotificationPromotionMode=ei;exports.NotificationSponsorLogoMode=ni;exports.PickHistoryStatus=Nt;exports.PromotionButtonType=oi;exports.PromotionLogoMode=ri;exports.PromotionType=he;exports.QuestionImages=ot;exports.QuestionStatus=re;exports.QuestionType=C;exports.SdkOverlayType=Q;exports.createContextKey=Ha;exports.global=Qa;exports.pino_1=Dr;exports.useStreamLayerApp=J_;
@@ -208,4 +208,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
208
208
  `),y=`
209
209
  `+o+(p.length?c("│"):" ")+" ";return o+f.join(y)+`
210
210
  `+p.map(function(b,C){var _=C===p.length-1,N=b.nodes&&b.nodes.length,O=o+(_?" ":c("│"))+" ";return o+c(_?"└":"├")+c("─")+c(N?"┬":"─")+" "+n(b,O,l).slice(o.length+2)}).join("")};const bte=Tte,WS=Symbol("avvio.TimeTree.untrackNode"),K5=Symbol("avvio.TimeTree.trackNode"),QS=Symbol("avvio.TimeTree.getParent"),YS=Symbol("avvio.TimeTree.getNode"),KS=Symbol("avvio.TimeTree.addNode");let kte=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[K5](n){this.tableId.set(n.id,n),this.tableLabel.has(n.label)?this.tableLabel.get(n.label).push(n):this.tableLabel.set(n.label,[n])}[WS](n){this.tableId.delete(n.id);const a=this.tableLabel.get(n.label);if(a.id){this.tableLabel.delete(n.label);return}a.pop(),a.length===0&&this.tableLabel.delete(n.label)}[QS](n){if(n===null)return this.root;const a=this.tableLabel.get(n);return a.id?a:a[a.length-1]}[YS](n){return this.tableId.get(n)}[KS](n,a,o){if(n===null)return this.root={id:"root",label:a,start:o,nodes:[]},this[K5](this.root),this.root.id;const l=this[QS](n),c=`${a}-${Math.random()}`,p={id:c,parent:n,start:o,label:a,nodes:[]};return l.nodes.push(p),this[K5](p),c}start(n,a,o=Date.now()){return this[KS](n,a,o)}stop(n,a=Date.now()){const o=this[YS](n);o&&(o.stop=a,o.diff=o.stop-o.start||0,this[WS](o))}toJSON(){return Object.assign({},this.root)}prittyPrint(){const n=o=>(o.label=`${o.label} ${o.diff} ms`,o.nodes.length>0&&(o.nodes=o.nodes.map(l=>n(l))),o),a=n(this.toJSON());return bte(a)}};var Ste=kte,Oy={exports:{}},U9={exports:{}},Z5,ZS;function wte(){if(ZS)return Z5;ZS=1;var n=1e3,a=n*60,o=a*60,l=o*24,c=l*7,p=l*365.25;Z5=function(_,N){N=N||{};var O=typeof _;if(O==="string"&&_.length>0)return f(_);if(O==="number"&&isFinite(_))return N.long?b(_):y(_);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(_))};function f(_){if(_=String(_),!(_.length>100)){var N=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(_);if(N){var O=parseFloat(N[1]),L=(N[2]||"ms").toLowerCase();switch(L){case"years":case"year":case"yrs":case"yr":case"y":return O*p;case"weeks":case"week":case"w":return O*c;case"days":case"day":case"d":return O*l;case"hours":case"hour":case"hrs":case"hr":case"h":return O*o;case"minutes":case"minute":case"mins":case"min":case"m":return O*a;case"seconds":case"second":case"secs":case"sec":case"s":return O*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return O;default:return}}}}function y(_){var N=Math.abs(_);return N>=l?Math.round(_/l)+"d":N>=o?Math.round(_/o)+"h":N>=a?Math.round(_/a)+"m":N>=n?Math.round(_/n)+"s":_+"ms"}function b(_){var N=Math.abs(_);return N>=l?C(_,N,l,"day"):N>=o?C(_,N,o,"hour"):N>=a?C(_,N,a,"minute"):N>=n?C(_,N,n,"second"):_+" ms"}function C(_,N,O,L){var P=N>=O*1.5;return Math.round(_/O)+" "+L+(P?"s":"")}return Z5}function Cte(n){o.debug=o,o.default=o,o.coerce=b,o.disable=p,o.enable=c,o.enabled=f,o.humanize=wte(),o.destroy=C,Object.keys(n).forEach(_=>{o[_]=n[_]}),o.names=[],o.skips=[],o.formatters={};function a(_){let N=0;for(let O=0;O<_.length;O++)N=(N<<5)-N+_.charCodeAt(O),N|=0;return o.colors[Math.abs(N)%o.colors.length]}o.selectColor=a;function o(_){let N,O=null,L,P;function U(...j){if(!U.enabled)return;const V=U,Y=Number(new Date),Z=Y-(N||Y);V.diff=Z,V.prev=N,V.curr=Y,N=Y,j[0]=o.coerce(j[0]),typeof j[0]!="string"&&j.unshift("%O");let Q=0;j[0]=j[0].replace(/%([a-zA-Z%])/g,(te,le)=>{if(te==="%%")return"%";Q++;const ae=o.formatters[le];if(typeof ae=="function"){const we=j[Q];te=ae.call(V,we),j.splice(Q,1),Q--}return te}),o.formatArgs.call(V,j),(V.log||o.log).apply(V,j)}return U.namespace=_,U.useColors=o.useColors(),U.color=o.selectColor(_),U.extend=l,U.destroy=o.destroy,Object.defineProperty(U,"enabled",{enumerable:!0,configurable:!1,get:()=>O!==null?O:(L!==o.namespaces&&(L=o.namespaces,P=o.enabled(_)),P),set:j=>{O=j}}),typeof o.init=="function"&&o.init(U),U}function l(_,N){const O=o(this.namespace+(typeof N>"u"?":":N)+_);return O.log=this.log,O}function c(_){o.save(_),o.namespaces=_,o.names=[],o.skips=[];let N;const O=(typeof _=="string"?_:"").split(/[\s,]+/),L=O.length;for(N=0;N<L;N++)O[N]&&(_=O[N].replace(/\*/g,".*?"),_[0]==="-"?o.skips.push(new RegExp("^"+_.slice(1)+"$")):o.names.push(new RegExp("^"+_+"$")))}function p(){const _=[...o.names.map(y),...o.skips.map(y).map(N=>"-"+N)].join(",");return o.enable(""),_}function f(_){if(_[_.length-1]==="*")return!0;let N,O;for(N=0,O=o.skips.length;N<O;N++)if(o.skips[N].test(_))return!1;for(N=0,O=o.names.length;N<O;N++)if(o.names[N].test(_))return!0;return!1}function y(_){return _.toString().substring(2,_.toString().length-2).replace(/\.\*\?$/,"*")}function b(_){return _ instanceof Error?_.stack||_.message:_}function C(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o.enable(o.load()),o}var Ete=Cte;(function(n,a){a.formatArgs=l,a.save=c,a.load=p,a.useColors=o,a.storage=f(),a.destroy=(()=>{let b=!1;return()=>{b||(b=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function o(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function l(b){if(b[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+b[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const C="color: "+this.color;b.splice(1,0,C,"color: inherit");let _=0,N=0;b[0].replace(/%[a-zA-Z%]/g,O=>{O!=="%%"&&(_++,O==="%c"&&(N=_))}),b.splice(N,0,C)}a.log=console.debug||console.log||(()=>{});function c(b){try{b?a.storage.setItem("debug",b):a.storage.removeItem("debug")}catch{}}function p(){let b;try{b=a.storage.getItem("debug")}catch{}return!b&&typeof St<"u"&&"env"in St&&(b=St.env.DEBUG),b}function f(){try{return localStorage}catch{}}n.exports=Ete(a);const{formatters:y}=n.exports;y.j=function(b){try{return JSON.stringify(b)}catch(C){return"[UnexpectedJSONParseError]: "+C.message}}})(U9,U9.exports);var GE=U9.exports;const _te=vE,Ite=IE.EventEmitter,Nte=x6.inherits,Fa=GE("avvio"),{AVV_ERR_READY_TIMEOUT:Rte}=HE,X5=Symbol.for("plugin-meta");function Ote(n,a){return n[X5]&&n[X5].name?n[X5].name:typeof a<"u"&&typeof a!="function"&&a.name?a.name:n.name?n.name:n.toString().split(`
211
- `).slice(0,2).map(o=>o.trim()).join(" -- ")}function Lte(){const n={};return n.promise=new Promise((a,o)=>{n.resolve=a,n.reject=o}),n}function Im(n,a,o,l,c){this.started=!1,this.func=a,this.opts=o,this.onFinish=null,this.parent=n,this.timeout=c===void 0?n._timeout:c,this.name=Ote(a,o),this.isAfter=l,this.q=_te(n,Ate,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}Nte(Im,Ite);Im.prototype.exec=function(n,a){const o=this.func;let l=!1;const c=this.name;if(this.parent._error&&!this.isAfter){Fa("skipping loading of plugin as parent errored and it is not an after",c),St.nextTick(a);return}if(this.isAfter)this.server=n;else try{this.server=this.parent.override(n,o,this.opts)}catch(b){return Fa("override errored",c),a(b)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Fa("exec",c);let p;const f=b=>{if(l){Fa("loading complete",c);return}this._error=b,Fa(b?"exec errored":"exec completed",c),l=!0,p&&clearTimeout(p),a(b)};this.timeout>0&&(Fa("setting up timeout",c,this.timeout),p=setTimeout(function(){Fa("timed out",c),p=null;const b=new Rte(c);b.fn=o,f(b)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const y=o(this.server,this.opts,f);y&&typeof y.then=="function"&&(Fa("exec: resolving promise",c),y.then(()=>St.nextTick(f),b=>St.nextTick(f,b)))};Im.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const n=()=>{this.server.after((o,l)=>{this._error=o,this.q.pause(),o?(Fa("rejecting promise",this.name,o),this._promise.reject(o)):(Fa("resolving promise",this.name),this._promise.resolve()),this._promise=null,St.nextTick(l,o)}),this.q.resume()};let a;return this._promise?a=Promise.resolve():(this._promise=Lte(),a=this._promise.promise,this.server?n():this.on("start",n)),a};Im.prototype.enqueue=function(n,a){Fa("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,a)};Im.prototype.finish=function(n,a){Fa("finish",this.name,n);const o=()=>{this.loaded||(Fa("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,a(n))};if(n){this._promise&&(this._promise.reject(n),this._promise=null),o();return}const l=()=>{if(Fa("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const c=()=>{Fa("wrap"),queueMicrotask(l)};this._promise.resolve(),this._promise.promise.then(c,c),this._promise=null}else o();else Fa("delayed",this.name),this.q.drain=()=>{Fa("drain",this.name),this.q.drain=xte,queueMicrotask(l)}};queueMicrotask(l),this.q.resume()};function Ate(n,a){const o=this;St.nextTick(Ly.bind(o),n,a)}function Ly(n,a){if(typeof n.func.then=="function"){n.func.then(l=>{typeof l.default=="function"&&(l=l.default),n.func=l,Ly.call(this,n,a)},a);return}const o=this._current[0];this._current.unshift(n),n.exec(o&&o.server||this._server,l=>{n.finish(l,c=>{this._current.shift(),a(c)})})}function xte(){}Oy.exports=Im;Oy.exports.loadPlugin=Ly;var Pte=Oy.exports;const XS=vE,Mte=IE.EventEmitter,Dte=x6.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:J5,AVV_ERR_CALLBACK_NOT_FN:o2,AVV_ERR_PLUGIN_NOT_VALID:Ute,AVV_ERR_ROOT_PLG_BOOTED:Fte,AVV_ERR_READY_TIMEOUT:Vte}=HE,jte=Ste,F9=Pte,km=GE("avvio"),v6=Symbol("kAvvio"),e9=Symbol("kThenifyDoNotWrap");function Bte(n,a,o){const l=a.expose||{},c=l.use||"use",p=l.after||"after",f=l.ready||"ready",y=l.onClose||"onClose",b=l.close||"close";if(n[c])throw new J5(c);if(n[p])throw new J5(p);if(n[f])throw new J5(f);n[c]=function(C,_){return o.use(C,_),this},Object.defineProperty(n,"then",{get:qE.bind(o)}),n[v6]=!0,n[p]=function(C){return typeof C!="function"?o._loadRegistered():(o.after(t9(C,this)),this)},n[f]=function(C){if(C&&typeof C!="function")throw new o2(f,typeof C);return o.ready(C?t9(C,this):void 0)},n[y]=function(C){if(typeof C!="function")throw new o2(y,typeof C);return o.onClose(qte(C,this)),this},n[b]=function(C){if(C&&typeof C!="function")throw new o2(b,typeof C);return C?(o.close(t9(C,this)),this):o.close()}}function wa(n,a,o){if(typeof n=="function"&&arguments.length===1&&(o=n,a={},n=null),typeof a=="function"&&(o=a,a={}),a=a||{},!(this instanceof wa)){const l=new wa(n,a,o);return n&&Bte(n,a,l),l}a.autostart!==!1&&(a.autostart=!0),n=n||this,this._timeout=Number(a.timeout)||0,this._server=n,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),o&&this.once("start",o),this.started=!1,this.booted=!1,this.pluginTree=new jte,this._readyQ=XS(this,WE,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=JS},this._closeQ=XS(this,Gte,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=JS},this._doStart=null,this._root=new F9(this,$te.bind(this),a,!1,0),this._root.once("start",(l,c,p)=>{const f=this.pluginTree.start(null,c,p);this._root.once("loaded",(y,b,C)=>{this.pluginTree.stop(f,C)})}),F9.loadPlugin.call(this,this._root,l=>{km("root plugin ready");try{this.emit("preReady"),this._root=null}catch(c){l=l||this._error||c}if(l){if(this._error=l,this._readyQ.length()===0)throw l}else this.booted=!0;this._readyQ.resume()})}function $te(n,a,o){this._doStart=o,a.autostart&&this.start()}Dte(wa,Mte);wa.prototype.start=function(){return this.started=!0,St.nextTick(this._doStart),this};wa.prototype.override=function(n,a,o){return n};function zte(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new Ute(typeof n);return n}wa.prototype[v6]=!0;wa.prototype.use=function(n,a){return this._lastUsed=this._addPlugin(n,a,!1),this};wa.prototype._loadRegistered=function(){const n=this._current[0];return!this.started&&!this.booted&&St.nextTick(()=>this._root.q.resume()),n?n.loadedSoFar():Promise.resolve()};Object.defineProperty(wa.prototype,"then",{get:qE});wa.prototype._addPlugin=function(n,a,o){if(n=zte(n),a=a||{},this.booted)throw new Fte;const l=this._current[0],c=new F9(this,n,a,o);if(c.once("start",(p,f,y)=>{const b=this.pluginTree.start(l.name,f,y);c.once("loaded",(C,_,N)=>{this.pluginTree.stop(b,N)})}),l.loaded)throw new Error(c.name,l.name);return l.enqueue(c,p=>{p&&(this._error=p)}),c};wa.prototype.after=function(n){if(!n)return this._loadRegistered();this._addPlugin(a.bind(this),{},!0);function a(o,l,c){WE.call(this,n,c)}return this};wa.prototype.onClose=function(n){if(typeof n!="function")throw new Error("not a function");n[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(n,a.bind(this));function a(o){o&&(this._error=o)}return this};wa.prototype.close=function(n){let a;if(n){if(typeof n!="function")throw new o2("close",typeof n)}else a=new Promise(function(o,l){n=function(c){if(c)return l(c);o()}});return this.ready(()=>{this._error=null,this._closeQ.push(n),St.nextTick(this._closeQ.resume.bind(this._closeQ))}),a};wa.prototype.ready=function(n){if(n){if(typeof n!="function")throw new o2("ready",typeof n);this._readyQ.push(n),queueMicrotask(this.start.bind(this));return}return new Promise((a,o)=>{this._readyQ.push(c),this.start();const l=this._current[0].server;function c(p,f,y){p?o(p):a(l),St.nextTick(y)}})};wa.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};wa.prototype.toJSON=function(){return this.pluginTree.toJSON()};function JS(){}function qE(){if(this.booted){km("thenify returning null because we are already booted");return}if(this[e9]){this[e9]=!1;return}return km("thenify"),(n,a)=>this._loadRegistered().then(()=>(this[e9]=!0,n(this._server)),a)}function WE(n,a){const o=this._server,l=this._error;let c;if(this._error=null,n.length===0)this._error=l,c=n(),c&&!c[v6]&&typeof c.then=="function"?c.then(()=>St.nextTick(a),p=>St.nextTick(a,p)):St.nextTick(a);else if(n.length===1)c=n(l),c&&!c[v6]&&typeof c.then=="function"?c.then(()=>St.nextTick(a),p=>St.nextTick(a,p)):St.nextTick(a);else if(this._timeout===0){const p=f=>{this._error=f,a(this._error)};n.length===2?n(l,p):n(l,o,p)}else Hte.call(this,n,l,o,a)}function Hte(n,a,o,l){const c=n.name;km("setting up ready timeout",c,this._timeout);let p=setTimeout(()=>{km("timed out",c),p=null;const y=new Vte(c);y.fn=n,this._error=y,l(y)},this._timeout);n.length===2?n(a,f.bind(this)):n(a,o,f.bind(this));function f(y){p&&(clearTimeout(p),this._error=y,l(this._error))}}function Gte(n,a){const o=this._server,l=n[this._isOnCloseHandlerKey];if(n.length===0||n.length===1){let c;l?c=n(o):c=n(this._error),c&&typeof c.then=="function"?(km("resolving close/onClose promise"),c.then(()=>St.nextTick(a),p=>St.nextTick(a,p))):St.nextTick(a)}else n.length===2?n(l?o:this._error,a):l?n(o,a):n(this._error,o,a)}function qte(n,a){return o.bind(a);function o(l,c){let p;n.length===0?(p=n(),p&&p.then?p.then(function(){St.nextTick(c)},c):St.nextTick(c)):n.length===1?(p=n(this),p&&p.then?p.then(function(){St.nextTick(c)},c):St.nextTick(c)):n(this,c)}}function t9(n,a){return o.bind(a);function o(l,c){let p;n?n.length===0?(p=n(),p&&p.then?p.then(function(){St.nextTick(c,l)},c):St.nextTick(c,l)):n.length===1?(p=n(l),p&&p.then?p.then(function(){St.nextTick(c)},c):St.nextTick(c)):n.length===2?n(l,c):n(l,this,c):St.nextTick(c)}}Ty.exports=wa;Ty.exports.express=function(n){return wa(n,{expose:{use:"load"}})};var Wte=Ty.exports;const Qte=SJ(Wte);(function(){if(window.requestAnimationFrame&&window.cancelAnimationFrame)return;const n=["webkit","moz","ms","o"];for(const a of n)window.requestAnimationFrame=window.requestAnimationFrame||window[`${a}RequestAnimationFrame`],window.cancelAnimationFrame=window.cancelAnimationFrame||window[`${a}CancelAnimationFrame`]||window[`${a}CancelRequestAnimationFrame`];if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){let a=0;const o=!!(window.performance&&window.performance.now);window.requestAnimationFrame=function(l){const c=o?window.performance.now():new Date().getTime(),p=Math.max(0,16-(c-a)),f=window.setTimeout(function(){l(c+p)},p);return a=c+p,f},window.cancelAnimationFrame=clearTimeout}})();function Yte(n,a=!0,o=!0,l={friendsTab:"enabled"}){const c=a?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",p=a?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",f=Qte(Object.create({}),{autostart:!1});return f.use(XX,{friendsTab:l.friendsTab}),f.use(GX,{onDeepLinkHandled:l==null?void 0:l.onDeepLinkHandled}),f.use(YX,{videoPlayerController:l==null?void 0:l.videoPlayerController}),f.use(ZX,{onContentActivate:l==null?void 0:l.onContentActivate,withAd:l==null?void 0:l.withAd,withAdNotification:l==null?void 0:l.withAdNotification}),f.use(cX,{sdkKey:n,host:c,analyticsHost:p,version:l==null?void 0:l.version}),f.use(hX),f.use(QX),f.use(dJ),f.use(MX),f.use(kJ),f.after((y,b,C)=>{if(y)throw y;b.ready(),C()}),o&&f.after(async(y,b,C)=>{if(y)throw y;await b.sdk.initializeApp(),C()}),f.onClose(()=>{console.log("close")}),f}const Kte=({sdkKey:n,plugins:a,production:o,autoEnable:l,onDeepLinkHandled:c,videoPlayerController:p,onContentActivate:f,withAdNotification:y,withAd:b,friendsTab:C})=>{const[_,N]=W.useState(null);return W.useEffect(()=>{let O=!1;if(!n)return console.error("streamlayer sdk key should be provided"),N(P=>(P!==null&&typeof P.disableApp=="function"&&P.disableApp(),null)),()=>{O=!0};const L=Yte(n,o,l,{version:"1.9.1",onDeepLinkHandled:c,videoPlayerController:p,onContentActivate:f,withAdNotification:y,withAd:b,friendsTab:C});if(a)for(const P of a)L.use(P);return L.ready().then(P=>{O||(N(P.sdk),typeof window<"u")}).catch(P=>console.log(P)),()=>{O=!0,L.close(function(P){if(P)throw P})}},[n,o]),_},Zte=({event:n})=>{const a=Ay(),o=ene();return W.useEffect(()=>(a&&(n&&(a.createEventSession(n),o&&(o.current=n)),!n&&(o!=null&&o.current)&&(a.createEventSession(""),o.current="")),()=>{a&&a.disableApp()}),[n,o,a]),null};var QE=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(QE||{});const Xte={status:0,sdk:null},F6=W.createContext(Xte),Jte=({sdkKey:n,theme:a,plugins:o,children:l,event:c,production:p=!0,autoEnable:f=!0,withAdNotification:y,withAd:b=!0,friendsTab:C="enabled",onDeepLinkHandled:_,videoPlayerController:N,onContentActivate:O})=>{const L=Kte({sdkKey:n,plugins:o,production:p,autoEnable:f,onDeepLinkHandled:_,videoPlayerController:N,onContentActivate:O,withAdNotification:y,withAd:b,friendsTab:C}),P=W.useRef(""),U=W.useMemo(()=>L?{sdk:L,status:2,event:P,theme:a}:{status:1,sdk:null,event:P,theme:a},[L]);return W.useEffect(()=>{L&&L.options.setKey("friendsTab",C)},[L,C]),W.useEffect(()=>()=>{_&&(L==null||L.removeDeepLinkHandler(_)),N&&(L==null||L.removeVideoPlayerController(N))},[L]),W.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!n,onDeepLinkHandled:!!_,videoPlayerController:!!N})},[n,_,N]),w.jsxs(F6.Provider,{value:U,children:[c!==void 0&&w.jsx(Zte,{event:c}),l]})},Ay=()=>{const{sdk:n}=W.useContext(F6);return n},ene=()=>{const{event:n}=W.useContext(F6);return n},tne=({sdkKey:n,plugins:a,children:o,onDeepLinkHandled:l,videoPlayerController:c,production:p=!0})=>w.jsx(Jte,{sdkKey:n,plugins:a,production:p,autoEnable:!1,onDeepLinkHandled:l,videoPlayerController:c,children:o}),nne=({children:n,overlays:a})=>{const{sdk:o,status:l}=W.useContext(F6);return l===QE.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),n({})):o?w.jsx("div",{className:"StreamLayerSDK",children:w.jsx(PC,{style:{height:"100%"},children:w.jsx(Nq,{sdk:o,overlays:a,children:n})})}):n({})};class ane extends W.Component{constructor(a){super(a),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(a,o){console.error(a,o.componentStack)}render(){return this.state.hasError?this.props.children({}):w.jsx(nne,{...this.props})}}const rne=({token:n,schema:a})=>{const o=Ay();return W.useEffect(()=>{n&&a&&o&&o.authorizationBypass(a,n),o&&(o.withAuth=!0)},[n,a,o]),null},one=()=>{const n=Ay();return n?w.jsx("div",{className:"StreamLayerSDK",children:w.jsx(PC,{children:w.jsx(Fq,{sdk:n})})}):null};exports.C=CC;exports.C$1=HV;exports.M=dy;exports.MastersStreamLayerProvider=tne;exports.MastersStreamLayerSDKReact=ane;exports.N=la;exports.O=ay;exports.S=NC;exports.S$1=qV;exports.StreamLayerLogin=rne;exports.StreamLayerSDKPoints=one;exports.T=cy;exports.b=wC;exports.cx_default=Su;exports.d=WV;exports.k=OC;exports.l=$V;exports.m=n2;exports.m$1=BV;exports.n=oy;exports.p=jq;exports.styled_default=x;exports.useStore=Ut;exports.z=kz;
211
+ `).slice(0,2).map(o=>o.trim()).join(" -- ")}function Lte(){const n={};return n.promise=new Promise((a,o)=>{n.resolve=a,n.reject=o}),n}function Im(n,a,o,l,c){this.started=!1,this.func=a,this.opts=o,this.onFinish=null,this.parent=n,this.timeout=c===void 0?n._timeout:c,this.name=Ote(a,o),this.isAfter=l,this.q=_te(n,Ate,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}Nte(Im,Ite);Im.prototype.exec=function(n,a){const o=this.func;let l=!1;const c=this.name;if(this.parent._error&&!this.isAfter){Fa("skipping loading of plugin as parent errored and it is not an after",c),St.nextTick(a);return}if(this.isAfter)this.server=n;else try{this.server=this.parent.override(n,o,this.opts)}catch(b){return Fa("override errored",c),a(b)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Fa("exec",c);let p;const f=b=>{if(l){Fa("loading complete",c);return}this._error=b,Fa(b?"exec errored":"exec completed",c),l=!0,p&&clearTimeout(p),a(b)};this.timeout>0&&(Fa("setting up timeout",c,this.timeout),p=setTimeout(function(){Fa("timed out",c),p=null;const b=new Rte(c);b.fn=o,f(b)},this.timeout)),this.started=!0,this.emit("start",this.server?this.server.name:null,this.name,Date.now());const y=o(this.server,this.opts,f);y&&typeof y.then=="function"&&(Fa("exec: resolving promise",c),y.then(()=>St.nextTick(f),b=>St.nextTick(f,b)))};Im.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const n=()=>{this.server.after((o,l)=>{this._error=o,this.q.pause(),o?(Fa("rejecting promise",this.name,o),this._promise.reject(o)):(Fa("resolving promise",this.name),this._promise.resolve()),this._promise=null,St.nextTick(l,o)}),this.q.resume()};let a;return this._promise?a=Promise.resolve():(this._promise=Lte(),a=this._promise.promise,this.server?n():this.on("start",n)),a};Im.prototype.enqueue=function(n,a){Fa("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,a)};Im.prototype.finish=function(n,a){Fa("finish",this.name,n);const o=()=>{this.loaded||(Fa("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,a(n))};if(n){this._promise&&(this._promise.reject(n),this._promise=null),o();return}const l=()=>{if(Fa("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const c=()=>{Fa("wrap"),queueMicrotask(l)};this._promise.resolve(),this._promise.promise.then(c,c),this._promise=null}else o();else Fa("delayed",this.name),this.q.drain=()=>{Fa("drain",this.name),this.q.drain=xte,queueMicrotask(l)}};queueMicrotask(l),this.q.resume()};function Ate(n,a){const o=this;St.nextTick(Ly.bind(o),n,a)}function Ly(n,a){if(typeof n.func.then=="function"){n.func.then(l=>{typeof l.default=="function"&&(l=l.default),n.func=l,Ly.call(this,n,a)},a);return}const o=this._current[0];this._current.unshift(n),n.exec(o&&o.server||this._server,l=>{n.finish(l,c=>{this._current.shift(),a(c)})})}function xte(){}Oy.exports=Im;Oy.exports.loadPlugin=Ly;var Pte=Oy.exports;const XS=vE,Mte=IE.EventEmitter,Dte=x6.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:J5,AVV_ERR_CALLBACK_NOT_FN:o2,AVV_ERR_PLUGIN_NOT_VALID:Ute,AVV_ERR_ROOT_PLG_BOOTED:Fte,AVV_ERR_READY_TIMEOUT:Vte}=HE,jte=Ste,F9=Pte,km=GE("avvio"),v6=Symbol("kAvvio"),e9=Symbol("kThenifyDoNotWrap");function Bte(n,a,o){const l=a.expose||{},c=l.use||"use",p=l.after||"after",f=l.ready||"ready",y=l.onClose||"onClose",b=l.close||"close";if(n[c])throw new J5(c);if(n[p])throw new J5(p);if(n[f])throw new J5(f);n[c]=function(C,_){return o.use(C,_),this},Object.defineProperty(n,"then",{get:qE.bind(o)}),n[v6]=!0,n[p]=function(C){return typeof C!="function"?o._loadRegistered():(o.after(t9(C,this)),this)},n[f]=function(C){if(C&&typeof C!="function")throw new o2(f,typeof C);return o.ready(C?t9(C,this):void 0)},n[y]=function(C){if(typeof C!="function")throw new o2(y,typeof C);return o.onClose(qte(C,this)),this},n[b]=function(C){if(C&&typeof C!="function")throw new o2(b,typeof C);return C?(o.close(t9(C,this)),this):o.close()}}function wa(n,a,o){if(typeof n=="function"&&arguments.length===1&&(o=n,a={},n=null),typeof a=="function"&&(o=a,a={}),a=a||{},!(this instanceof wa)){const l=new wa(n,a,o);return n&&Bte(n,a,l),l}a.autostart!==!1&&(a.autostart=!0),n=n||this,this._timeout=Number(a.timeout)||0,this._server=n,this._current=[],this._error=null,this._isOnCloseHandlerKey=Symbol("isOnCloseHandler"),this._lastUsed=null,this.setMaxListeners(0),o&&this.once("start",o),this.started=!1,this.booted=!1,this.pluginTree=new jte,this._readyQ=XS(this,WE,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=JS},this._closeQ=XS(this,Gte,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=JS},this._doStart=null,this._root=new F9(this,$te.bind(this),a,!1,0),this._root.once("start",(l,c,p)=>{const f=this.pluginTree.start(null,c,p);this._root.once("loaded",(y,b,C)=>{this.pluginTree.stop(f,C)})}),F9.loadPlugin.call(this,this._root,l=>{km("root plugin ready");try{this.emit("preReady"),this._root=null}catch(c){l=l||this._error||c}if(l){if(this._error=l,this._readyQ.length()===0)throw l}else this.booted=!0;this._readyQ.resume()})}function $te(n,a,o){this._doStart=o,a.autostart&&this.start()}Dte(wa,Mte);wa.prototype.start=function(){return this.started=!0,St.nextTick(this._doStart),this};wa.prototype.override=function(n,a,o){return n};function zte(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new Ute(typeof n);return n}wa.prototype[v6]=!0;wa.prototype.use=function(n,a){return this._lastUsed=this._addPlugin(n,a,!1),this};wa.prototype._loadRegistered=function(){const n=this._current[0];return!this.started&&!this.booted&&St.nextTick(()=>this._root.q.resume()),n?n.loadedSoFar():Promise.resolve()};Object.defineProperty(wa.prototype,"then",{get:qE});wa.prototype._addPlugin=function(n,a,o){if(n=zte(n),a=a||{},this.booted)throw new Fte;const l=this._current[0],c=new F9(this,n,a,o);if(c.once("start",(p,f,y)=>{const b=this.pluginTree.start(l.name,f,y);c.once("loaded",(C,_,N)=>{this.pluginTree.stop(b,N)})}),l.loaded)throw new Error(c.name,l.name);return l.enqueue(c,p=>{p&&(this._error=p)}),c};wa.prototype.after=function(n){if(!n)return this._loadRegistered();this._addPlugin(a.bind(this),{},!0);function a(o,l,c){WE.call(this,n,c)}return this};wa.prototype.onClose=function(n){if(typeof n!="function")throw new Error("not a function");n[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(n,a.bind(this));function a(o){o&&(this._error=o)}return this};wa.prototype.close=function(n){let a;if(n){if(typeof n!="function")throw new o2("close",typeof n)}else a=new Promise(function(o,l){n=function(c){if(c)return l(c);o()}});return this.ready(()=>{this._error=null,this._closeQ.push(n),St.nextTick(this._closeQ.resume.bind(this._closeQ))}),a};wa.prototype.ready=function(n){if(n){if(typeof n!="function")throw new o2("ready",typeof n);this._readyQ.push(n),queueMicrotask(this.start.bind(this));return}return new Promise((a,o)=>{this._readyQ.push(c),this.start();const l=this._current[0].server;function c(p,f,y){p?o(p):a(l),St.nextTick(y)}})};wa.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};wa.prototype.toJSON=function(){return this.pluginTree.toJSON()};function JS(){}function qE(){if(this.booted){km("thenify returning null because we are already booted");return}if(this[e9]){this[e9]=!1;return}return km("thenify"),(n,a)=>this._loadRegistered().then(()=>(this[e9]=!0,n(this._server)),a)}function WE(n,a){const o=this._server,l=this._error;let c;if(this._error=null,n.length===0)this._error=l,c=n(),c&&!c[v6]&&typeof c.then=="function"?c.then(()=>St.nextTick(a),p=>St.nextTick(a,p)):St.nextTick(a);else if(n.length===1)c=n(l),c&&!c[v6]&&typeof c.then=="function"?c.then(()=>St.nextTick(a),p=>St.nextTick(a,p)):St.nextTick(a);else if(this._timeout===0){const p=f=>{this._error=f,a(this._error)};n.length===2?n(l,p):n(l,o,p)}else Hte.call(this,n,l,o,a)}function Hte(n,a,o,l){const c=n.name;km("setting up ready timeout",c,this._timeout);let p=setTimeout(()=>{km("timed out",c),p=null;const y=new Vte(c);y.fn=n,this._error=y,l(y)},this._timeout);n.length===2?n(a,f.bind(this)):n(a,o,f.bind(this));function f(y){p&&(clearTimeout(p),this._error=y,l(this._error))}}function Gte(n,a){const o=this._server,l=n[this._isOnCloseHandlerKey];if(n.length===0||n.length===1){let c;l?c=n(o):c=n(this._error),c&&typeof c.then=="function"?(km("resolving close/onClose promise"),c.then(()=>St.nextTick(a),p=>St.nextTick(a,p))):St.nextTick(a)}else n.length===2?n(l?o:this._error,a):l?n(o,a):n(this._error,o,a)}function qte(n,a){return o.bind(a);function o(l,c){let p;n.length===0?(p=n(),p&&p.then?p.then(function(){St.nextTick(c)},c):St.nextTick(c)):n.length===1?(p=n(this),p&&p.then?p.then(function(){St.nextTick(c)},c):St.nextTick(c)):n(this,c)}}function t9(n,a){return o.bind(a);function o(l,c){let p;n?n.length===0?(p=n(),p&&p.then?p.then(function(){St.nextTick(c,l)},c):St.nextTick(c,l)):n.length===1?(p=n(l),p&&p.then?p.then(function(){St.nextTick(c)},c):St.nextTick(c)):n.length===2?n(l,c):n(l,this,c):St.nextTick(c)}}Ty.exports=wa;Ty.exports.express=function(n){return wa(n,{expose:{use:"load"}})};var Wte=Ty.exports;const Qte=SJ(Wte);(function(){if(window.requestAnimationFrame&&window.cancelAnimationFrame)return;const n=["webkit","moz","ms","o"];for(const a of n)window.requestAnimationFrame=window.requestAnimationFrame||window[`${a}RequestAnimationFrame`],window.cancelAnimationFrame=window.cancelAnimationFrame||window[`${a}CancelAnimationFrame`]||window[`${a}CancelRequestAnimationFrame`];if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){let a=0;const o=!!(window.performance&&window.performance.now);window.requestAnimationFrame=function(l){const c=o?window.performance.now():new Date().getTime(),p=Math.max(0,16-(c-a)),f=window.setTimeout(function(){l(c+p)},p);return a=c+p,f},window.cancelAnimationFrame=clearTimeout}})();function Yte(n,a=!0,o=!0,l={friendsTab:"enabled"}){const c=a?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",p=a?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",f=Qte(Object.create({}),{autostart:!1});return f.use(XX,{friendsTab:l.friendsTab}),f.use(GX,{onDeepLinkHandled:l==null?void 0:l.onDeepLinkHandled}),f.use(YX,{videoPlayerController:l==null?void 0:l.videoPlayerController}),f.use(ZX,{onContentActivate:l==null?void 0:l.onContentActivate,withAd:l==null?void 0:l.withAd,withAdNotification:l==null?void 0:l.withAdNotification}),f.use(cX,{sdkKey:n,host:c,analyticsHost:p,version:l==null?void 0:l.version}),f.use(hX),f.use(QX),f.use(dJ),f.use(MX),f.use(kJ),f.after((y,b,C)=>{if(y)throw y;b.ready(),C()}),o&&f.after(async(y,b,C)=>{if(y)throw y;await b.sdk.initializeApp(),C()}),f.onClose(()=>{console.log("close")}),f}const Kte=({sdkKey:n,plugins:a,production:o,autoEnable:l,onDeepLinkHandled:c,videoPlayerController:p,onContentActivate:f,withAdNotification:y,withAd:b,friendsTab:C})=>{const[_,N]=W.useState(null);return W.useEffect(()=>{let O=!1;if(!n)return console.error("streamlayer sdk key should be provided"),N(P=>(P!==null&&typeof P.disableApp=="function"&&P.disableApp(),null)),()=>{O=!0};const L=Yte(n,o,l,{version:"1.9.2",onDeepLinkHandled:c,videoPlayerController:p,onContentActivate:f,withAdNotification:y,withAd:b,friendsTab:C});if(a)for(const P of a)L.use(P);return L.ready().then(P=>{O||(N(P.sdk),typeof window<"u")}).catch(P=>console.log(P)),()=>{O=!0,L.close(function(P){if(P)throw P})}},[n,o]),_},Zte=({event:n})=>{const a=Ay(),o=ene();return W.useEffect(()=>(a&&(n&&(a.createEventSession(n),o&&(o.current=n)),!n&&(o!=null&&o.current)&&(a.createEventSession(""),o.current="")),()=>{a&&a.disableApp()}),[n,o,a]),null};var QE=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(QE||{});const Xte={status:0,sdk:null},F6=W.createContext(Xte),Jte=({sdkKey:n,theme:a,plugins:o,children:l,event:c,production:p=!0,autoEnable:f=!0,withAdNotification:y,withAd:b=!0,friendsTab:C="enabled",onDeepLinkHandled:_,videoPlayerController:N,onContentActivate:O})=>{const L=Kte({sdkKey:n,plugins:o,production:p,autoEnable:f,onDeepLinkHandled:_,videoPlayerController:N,onContentActivate:O,withAdNotification:y,withAd:b,friendsTab:C}),P=W.useRef(""),U=W.useMemo(()=>L?{sdk:L,status:2,event:P,theme:a}:{status:1,sdk:null,event:P,theme:a},[L]);return W.useEffect(()=>{L&&L.options.setKey("friendsTab",C)},[L,C]),W.useEffect(()=>()=>{_&&(L==null||L.removeDeepLinkHandler(_)),N&&(L==null||L.removeVideoPlayerController(N))},[L]),W.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!n,onDeepLinkHandled:!!_,videoPlayerController:!!N})},[n,_,N]),w.jsxs(F6.Provider,{value:U,children:[c!==void 0&&w.jsx(Zte,{event:c}),l]})},Ay=()=>{const{sdk:n}=W.useContext(F6);return n},ene=()=>{const{event:n}=W.useContext(F6);return n},tne=({sdkKey:n,plugins:a,children:o,onDeepLinkHandled:l,videoPlayerController:c,production:p=!0})=>w.jsx(Jte,{sdkKey:n,plugins:a,production:p,autoEnable:!1,onDeepLinkHandled:l,videoPlayerController:c,children:o}),nne=({children:n,overlays:a})=>{const{sdk:o,status:l}=W.useContext(F6);return l===QE.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),n({})):o?w.jsx("div",{className:"StreamLayerSDK",children:w.jsx(PC,{style:{height:"100%"},children:w.jsx(Nq,{sdk:o,overlays:a,children:n})})}):n({})};class ane extends W.Component{constructor(a){super(a),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(a,o){console.error(a,o.componentStack)}render(){return this.state.hasError?this.props.children({}):w.jsx(nne,{...this.props})}}const rne=({token:n,schema:a})=>{const o=Ay();return W.useEffect(()=>{n&&a&&o&&o.authorizationBypass(a,n),o&&(o.withAuth=!0)},[n,a,o]),null},one=()=>{const n=Ay();return n?w.jsx("div",{className:"StreamLayerSDK",children:w.jsx(PC,{children:w.jsx(Fq,{sdk:n})})}):null};exports.C=CC;exports.C$1=HV;exports.M=dy;exports.MastersStreamLayerProvider=tne;exports.MastersStreamLayerSDKReact=ane;exports.N=la;exports.O=ay;exports.S=NC;exports.S$1=qV;exports.StreamLayerLogin=rne;exports.StreamLayerSDKPoints=one;exports.T=cy;exports.b=wC;exports.cx_default=Su;exports.d=WV;exports.k=OC;exports.l=$V;exports.m=n2;exports.m$1=BV;exports.n=oy;exports.p=jq;exports.styled_default=x;exports.useStore=Ut;exports.z=kz;
@@ -42393,7 +42393,7 @@ const ine = ({
42393
42393
  O = !0;
42394
42394
  };
42395
42395
  const L = one(n, o, l, {
42396
- version: "1.9.1",
42396
+ version: "1.9.2",
42397
42397
  onDeepLinkHandled: c,
42398
42398
  videoPlayerController: p,
42399
42399
  onContentActivate: f,
@@ -1,12 +1,12 @@
1
- import { jsx as e, jsxs as v, Fragment as ro } from "react/jsx-runtime";
2
- import { useRef as U, useState as x, useCallback as So, useEffect as P } from "react";
3
- import { e as k, s as n, h as Eo, g as lo, i as R, Y as ko, a as co, L as Lo, u as Mo, j as Po, b as Oo, S as T, d as _o } from "./index2.js";
4
- import { N, a as po, b as mo, C as uo, c as vo, P as M, d as S, A as Bo, e as xo, S as Ro } from "./useStreamLayerApp2.js";
5
- const Do = /* @__PURE__ */ n("div")({
1
+ import { jsx as e, jsxs as v, Fragment as co } from "react/jsx-runtime";
2
+ import { useRef as F, useState as R, useCallback as Eo, useEffect as P } from "react";
3
+ import { e as k, s as n, h as ko, g as po, i as D, Y as Lo, a as mo, L as Mo, u as Po, j as Oo, b as _o, S as T, d as Bo } from "./index2.js";
4
+ import { N, a as uo, b as vo, C as Ao, c as go, P as M, d as S, A as xo, e as Ro, S as Do } from "./useStreamLayerApp2.js";
5
+ const qo = /* @__PURE__ */ n("div")({
6
6
  name: "Container",
7
7
  class: "c5b6wdg",
8
8
  propsAsIs: !1
9
- }), wo = "a1rlj479", qo = "s35f1di", Vo = "sj4471g", jo = "b12050d8", Uo = "b1d5ybek", Fo = (o) => o === "left" || o === "right" ? qo : jo, zo = (o) => o === "left" || o === "right" ? Vo : Uo, Go = (o) => o === "left" ? "avdxyl3" : o === "right" ? "a1bisd08" : o === "top" ? "a1u9y2aj" : "a1qqaks", F = ({
9
+ }), wo = "a1rlj479", Vo = "s35f1di", jo = "sj4471g", Uo = "b12050d8", Fo = "b1d5ybek", zo = (o) => o === "left" || o === "right" ? Vo : Uo, Go = (o) => o === "left" || o === "right" ? jo : Fo, Wo = (o) => o === "left" ? "avdxyl3" : o === "right" ? "a1bisd08" : o === "top" ? "a1u9y2aj" : "a1qqaks", z = ({
10
10
  children: o,
11
11
  style: s,
12
12
  className: i,
@@ -14,30 +14,30 @@ const Do = /* @__PURE__ */ n("div")({
14
14
  hiding: l,
15
15
  direction: r = "left",
16
16
  onAnimationEnd: c
17
- }) => /* @__PURE__ */ e(Do, {
17
+ }) => /* @__PURE__ */ e(qo, {
18
18
  style: s,
19
- className: k(i, wo, Go(r), t && !l && Fo(r), t && l && zo(r)),
19
+ className: k(i, wo, Wo(r), t && !l && zo(r), t && l && Go(r)),
20
20
  onAnimationEnd: c,
21
21
  children: o
22
- }), Wo = /* @__PURE__ */ n("a")({
22
+ }), Ho = /* @__PURE__ */ n("a")({
23
23
  name: "Link",
24
24
  class: "l1sgte8c",
25
25
  propsAsIs: !1
26
- }), Ho = /* @__PURE__ */ n("div")({
26
+ }), Ko = /* @__PURE__ */ n("div")({
27
27
  name: "BannerContainer",
28
28
  class: "b7yfc72",
29
29
  propsAsIs: !1
30
- }), Ko = () => Wo, Yo = /* @__PURE__ */ n(Ko())({
30
+ }), Yo = () => Ho, Jo = /* @__PURE__ */ n(Yo())({
31
31
  name: "BannerLink",
32
32
  class: "bejjq94",
33
33
  propsAsIs: !0
34
- }), Jo = ({ promotion: o, promotionId: s, hiding: i, direction: t = "bottom" }) => {
34
+ }), Xo = ({ promotion: o, promotionId: s, hiding: i, direction: t = "bottom" }) => {
35
35
  var l, r;
36
36
  if (!((l = o.additionalBanner) != null && l.imageUrl))
37
37
  return null;
38
38
  let c = (r = o.banner) == null ? void 0 : r.url;
39
- return c && c.indexOf("http") !== 0 && (c = `https://${c}`), /* @__PURE__ */ e(F, { direction: t, hiding: i, children: /* @__PURE__ */ e(Ho, { className: "BannerContainer", children: /* @__PURE__ */ e(
40
- Yo,
39
+ return c && c.indexOf("http") !== 0 && (c = `https://${c}`), /* @__PURE__ */ e(z, { direction: t, hiding: i, children: /* @__PURE__ */ e(Ko, { className: "BannerContainer", children: /* @__PURE__ */ e(
40
+ Jo,
41
41
  {
42
42
  className: "BannerLink",
43
43
  href: c,
@@ -48,211 +48,211 @@ const Do = /* @__PURE__ */ n("div")({
48
48
  target: "_blank"
49
49
  }
50
50
  ) }) });
51
- }, Qo = /* @__PURE__ */ n("div")({
51
+ }, Zo = /* @__PURE__ */ n("div")({
52
52
  name: "NotificationContent",
53
53
  class: "n18wsqoo",
54
54
  propsAsIs: !1
55
- }), Xo = /* @__PURE__ */ n("div")({
55
+ }), Qo = /* @__PURE__ */ n("div")({
56
56
  name: "Body",
57
57
  class: "b1ia90c2",
58
58
  propsAsIs: !1
59
- }), Zo = /* @__PURE__ */ n("div")({
59
+ }), oe = /* @__PURE__ */ n("div")({
60
60
  name: "Title",
61
61
  class: "tg2z08v",
62
62
  propsAsIs: !1
63
- }), oe = /* @__PURE__ */ n("div")({
63
+ }), ee = /* @__PURE__ */ n("div")({
64
64
  name: "Text",
65
65
  class: "t59zdk1",
66
66
  propsAsIs: !1
67
- }), z = /* @__PURE__ */ n("div")({
67
+ }), G = /* @__PURE__ */ n("div")({
68
68
  name: "MediaImgBottom",
69
69
  class: "m1ab9fq",
70
70
  propsAsIs: !1
71
- }), ee = () => z, ne = /* @__PURE__ */ n(ee())({
71
+ }), ne = () => G, se = /* @__PURE__ */ n(ne())({
72
72
  name: "MediaImgMiddle",
73
73
  class: "m9fsr0y",
74
74
  propsAsIs: !0
75
- }), se = /* @__PURE__ */ n("img")({
75
+ }), te = /* @__PURE__ */ n("img")({
76
76
  name: "CtaIcon",
77
77
  class: "cvi9y5q",
78
78
  propsAsIs: !1
79
- }), te = /* @__PURE__ */ n("button")({
79
+ }), ie = /* @__PURE__ */ n("button")({
80
80
  name: "Button",
81
81
  class: "bgl6boa",
82
82
  propsAsIs: !1
83
- }), ie = /* @__PURE__ */ n("div")({
83
+ }), ae = /* @__PURE__ */ n("div")({
84
84
  name: "Logo",
85
85
  class: "l5mq0z",
86
86
  propsAsIs: !1
87
- }), ae = /* @__PURE__ */ n("div")({
87
+ }), re = /* @__PURE__ */ n("div")({
88
88
  name: "Footer",
89
89
  class: "f1mse0ft",
90
90
  propsAsIs: !1
91
- }), re = /* @__PURE__ */ n("div")({
91
+ }), le = /* @__PURE__ */ n("div")({
92
92
  name: "Vector",
93
93
  class: "v1hcloah",
94
94
  propsAsIs: !1
95
- }), le = /* @__PURE__ */ n("div")({
95
+ }), de = /* @__PURE__ */ n("div")({
96
96
  name: "NotificationContainer",
97
97
  class: "n3n65jf",
98
98
  propsAsIs: !1
99
- }), de = {
100
- [N.BOTTOM]: z,
101
- [N.MIDDLE]: ne
102
- }, ce = ({ src: o, imagePosition: s }) => {
103
- const i = de[s] || z;
99
+ }), ce = {
100
+ [N.BOTTOM]: G,
101
+ [N.MIDDLE]: se
102
+ }, pe = ({ src: o, imagePosition: s }) => {
103
+ const i = ce[s] || G;
104
104
  return /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("img", { src: o, alt: "" }) });
105
- }, pe = ({ notification: o, open: s }) => {
106
- if (!o || !o.promotion || o.enabled !== po.NOTIFICATION_ENABLED)
105
+ }, me = ({ notification: o, open: s }) => {
106
+ if (!o || !o.promotion || o.enabled !== uo.NOTIFICATION_ENABLED)
107
107
  return null;
108
108
  const { title: i, body: t, image: l, promotion: r } = o, { sponsorLogo: c, sponsorLogoMode: m, imagePosition: A, ctaButton: a } = r;
109
- return /* @__PURE__ */ v(le, { className: "SL_Lower_Third_Notification", onClick: s, children: [
110
- /* @__PURE__ */ v(Qo, { children: [
111
- /* @__PURE__ */ e(ce, { src: l, imagePosition: A }),
112
- /* @__PURE__ */ v(Xo, { children: [
113
- i && /* @__PURE__ */ e(Zo, { children: i }),
114
- t && /* @__PURE__ */ e(oe, { children: t })
109
+ return /* @__PURE__ */ v(de, { className: "SL_Lower_Third_Notification", onClick: s, children: [
110
+ /* @__PURE__ */ v(Zo, { children: [
111
+ /* @__PURE__ */ e(pe, { src: l, imagePosition: A }),
112
+ /* @__PURE__ */ v(Qo, { children: [
113
+ i && /* @__PURE__ */ e(oe, { children: i }),
114
+ t && /* @__PURE__ */ e(ee, { children: t })
115
115
  ] })
116
116
  ] }),
117
- /* @__PURE__ */ v(ae, { children: [
118
- m !== mo.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ v(ro, { children: [
119
- /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ e("img", { src: c, alt: i }) }),
120
- /* @__PURE__ */ e(re, {})
117
+ /* @__PURE__ */ v(re, { children: [
118
+ m !== vo.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ v(co, { children: [
119
+ /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e("img", { src: c, alt: i }) }),
120
+ /* @__PURE__ */ e(le, {})
121
121
  ] }),
122
- /* @__PURE__ */ v(te, { name: "promo-button", style: { color: a == null ? void 0 : a.textColor, backgroundColor: a == null ? void 0 : a.color }, children: [
123
- (a == null ? void 0 : a.ctaIcon) && (a == null ? void 0 : a.ctaIconMode) === uo.CTA_ICON_TRANSPARENT && /* @__PURE__ */ e(se, { src: a == null ? void 0 : a.ctaIcon, alt: "cta-icon" }),
122
+ /* @__PURE__ */ v(ie, { name: "promo-button", style: { color: a == null ? void 0 : a.textColor, backgroundColor: a == null ? void 0 : a.color }, children: [
123
+ (a == null ? void 0 : a.ctaIcon) && (a == null ? void 0 : a.ctaIconMode) === Ao.CTA_ICON_TRANSPARENT && /* @__PURE__ */ e(te, { src: a == null ? void 0 : a.ctaIcon, alt: "cta-icon" }),
124
124
  (a == null ? void 0 : a.label) || "Open"
125
125
  ] })
126
126
  ] })
127
127
  ] });
128
- }, me = /* @__PURE__ */ n("div")({
128
+ }, ue = /* @__PURE__ */ n("div")({
129
129
  name: "NotificationContent",
130
130
  class: "n1ku6hz",
131
131
  propsAsIs: !1
132
- }), ue = /* @__PURE__ */ n("div")({
132
+ }), ve = /* @__PURE__ */ n("div")({
133
133
  name: "NotificationContainer",
134
134
  class: "nbxqmol",
135
135
  propsAsIs: !1
136
- }), ve = /* @__PURE__ */ n("div")({
136
+ }), Ae = /* @__PURE__ */ n("div")({
137
137
  name: "Body",
138
138
  class: "b1gu3eml",
139
139
  propsAsIs: !1
140
- }), Ae = /* @__PURE__ */ n("div")({
140
+ }), ge = /* @__PURE__ */ n("div")({
141
141
  name: "Title",
142
142
  class: "t1u17zva",
143
143
  propsAsIs: !1
144
- }), ge = /* @__PURE__ */ n("div")({
144
+ }), he = /* @__PURE__ */ n("div")({
145
145
  name: "Text",
146
146
  class: "t10ko1g",
147
147
  propsAsIs: !1
148
- }), D = /* @__PURE__ */ n("div")({
148
+ }), q = /* @__PURE__ */ n("div")({
149
149
  name: "Media",
150
150
  class: "mntc42e",
151
151
  propsAsIs: !1
152
- }), he = () => D, no = /* @__PURE__ */ n(he())({
152
+ }), Ie = () => q, to = /* @__PURE__ */ n(Ie())({
153
153
  name: "MediaImgFit",
154
154
  class: "ml060eo",
155
155
  propsAsIs: !0
156
- }), Ie = () => D, Ao = /* @__PURE__ */ n(Ie())({
156
+ }), ye = () => q, ho = /* @__PURE__ */ n(ye())({
157
157
  name: "MediaImgCentered",
158
158
  class: "m1vqlvig",
159
159
  propsAsIs: !0
160
- }), ye = () => Ao, be = /* @__PURE__ */ n(ye())({
160
+ }), be = () => ho, fe = /* @__PURE__ */ n(be())({
161
161
  name: "MediaImgBottom",
162
162
  class: "m1e7tvi5",
163
163
  propsAsIs: !0
164
- }), fe = () => D, Ne = /* @__PURE__ */ n(fe())({
164
+ }), Ne = () => q, $e = /* @__PURE__ */ n(Ne())({
165
165
  name: "MediaImgSolid",
166
166
  class: "mqvntt2",
167
167
  propsAsIs: !0
168
- }), $e = () => D, Ce = /* @__PURE__ */ n($e())({
168
+ }), Ce = () => q, Te = /* @__PURE__ */ n(Ce())({
169
169
  name: "MediaImgMiddle",
170
170
  class: "m12jtj3u",
171
171
  propsAsIs: !0
172
- }), Te = /* @__PURE__ */ n("img")({
172
+ }), Se = /* @__PURE__ */ n("img")({
173
173
  name: "CtaIcon",
174
174
  class: "ckq1frv",
175
175
  propsAsIs: !1
176
- }), Se = /* @__PURE__ */ n("button")({
176
+ }), Ee = /* @__PURE__ */ n("button")({
177
177
  name: "Button",
178
178
  class: "bis90pl",
179
179
  propsAsIs: !1
180
- }), Ee = () => Eo, ke = /* @__PURE__ */ n(Ee())({
180
+ }), ke = () => ko, Le = /* @__PURE__ */ n(ke())({
181
181
  name: "StyledChevronRight",
182
182
  class: "s9mjmz3",
183
183
  propsAsIs: !0
184
- }), Le = /* @__PURE__ */ n("div")({
184
+ }), Me = /* @__PURE__ */ n("div")({
185
185
  name: "Logo",
186
186
  class: "l1cf50a7",
187
187
  propsAsIs: !1
188
- }), Me = {
189
- [N.UNSET]: no,
190
- [N.FIT]: no,
191
- [N.CENTERED]: Ao,
192
- [N.BOTTOM]: be,
193
- [N.SOLID]: Ne,
194
- [N.MIDDLE]: Ce
195
- }, Pe = ({ src: o, imagePosition: s }) => {
196
- const i = Me[s];
188
+ }), Pe = {
189
+ [N.UNSET]: to,
190
+ [N.FIT]: to,
191
+ [N.CENTERED]: ho,
192
+ [N.BOTTOM]: fe,
193
+ [N.SOLID]: $e,
194
+ [N.MIDDLE]: Te
195
+ }, Oe = ({ src: o, imagePosition: s }) => {
196
+ const i = Pe[s];
197
197
  return /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e("img", { src: o, alt: "" }) });
198
- }, Oe = ({ notification: o, open: s, promotionId: i, hiding: t, direction: l = "left" }) => {
199
- if (!o || !o.promotion || o.enabled !== po.NOTIFICATION_ENABLED)
198
+ }, _e = ({ notification: o, open: s, promotionId: i, hiding: t, direction: l = "left" }) => {
199
+ if (!o || !o.promotion || o.enabled !== uo.NOTIFICATION_ENABLED)
200
200
  return null;
201
- if (o.promotion.mode === vo.LOWER_THIRD)
202
- return /* @__PURE__ */ e(pe, { notification: o, open: s });
201
+ if (o.promotion.mode === go.LOWER_THIRD)
202
+ return /* @__PURE__ */ e(me, { notification: o, open: s });
203
203
  const { title: r, body: c, image: m, promotion: A } = o, { sponsorLogo: a, sponsorLogoMode: g, imagePosition: u, ctaButton: p } = A;
204
- return /* @__PURE__ */ e(F, { className: "SL_Rich_Notification", direction: l, hiding: t, children: /* @__PURE__ */ v(ue, { onClick: s, children: [
205
- g !== mo.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ e(Le, { children: /* @__PURE__ */ e("img", { src: a, alt: r }) }),
206
- /* @__PURE__ */ v(me, { children: [
207
- /* @__PURE__ */ e(Pe, { src: m, imagePosition: u }),
208
- /* @__PURE__ */ v(ve, { children: [
209
- r && /* @__PURE__ */ e(Ae, { children: r }),
210
- c && /* @__PURE__ */ e(ge, { children: c })
204
+ return /* @__PURE__ */ e(z, { className: "SL_Rich_Notification", direction: l, hiding: t, children: /* @__PURE__ */ v(ve, { onClick: s, children: [
205
+ g !== vo.NOTIFICATION_SPONSOR_LOGO_NONE && /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e("img", { src: a, alt: r }) }),
206
+ /* @__PURE__ */ v(ue, { children: [
207
+ /* @__PURE__ */ e(Oe, { src: m, imagePosition: u }),
208
+ /* @__PURE__ */ v(Ae, { children: [
209
+ r && /* @__PURE__ */ e(ge, { children: r }),
210
+ c && /* @__PURE__ */ e(he, { children: c })
211
211
  ] }),
212
- /* @__PURE__ */ v(Se, { name: "promo-button", style: { color: p == null ? void 0 : p.textColor, backgroundColor: p == null ? void 0 : p.color }, children: [
213
- (p == null ? void 0 : p.ctaIcon) && (p == null ? void 0 : p.ctaIconMode) === uo.CTA_ICON_TRANSPARENT && /* @__PURE__ */ e(Te, { src: p == null ? void 0 : p.ctaIcon, alt: "cta-icon" }),
212
+ /* @__PURE__ */ v(Ee, { name: "promo-button", style: { color: p == null ? void 0 : p.textColor, backgroundColor: p == null ? void 0 : p.color }, children: [
213
+ (p == null ? void 0 : p.ctaIcon) && (p == null ? void 0 : p.ctaIconMode) === Ao.CTA_ICON_TRANSPARENT && /* @__PURE__ */ e(Se, { src: p == null ? void 0 : p.ctaIcon, alt: "cta-icon" }),
214
214
  (p == null ? void 0 : p.label) || "Open"
215
215
  ] }),
216
- /* @__PURE__ */ e(ke, { name: "chevronRight" })
216
+ /* @__PURE__ */ e(Le, { name: "chevronRight" })
217
217
  ] })
218
218
  ] }) });
219
- }, _e = /* @__PURE__ */ n("div")({
219
+ }, Be = /* @__PURE__ */ n("div")({
220
220
  name: "OverlayContainer",
221
221
  class: "okzhq2w",
222
222
  propsAsIs: !1
223
- }), go = /* @__PURE__ */ n("div")({
223
+ }), Io = /* @__PURE__ */ n("div")({
224
224
  name: "PromoOverlay",
225
225
  class: "pmgz5i",
226
226
  propsAsIs: !1
227
- }), ho = /* @__PURE__ */ n("div")({
227
+ }), yo = /* @__PURE__ */ n("div")({
228
228
  name: "Header",
229
229
  class: "hyxi3jt",
230
230
  propsAsIs: !1
231
- }), Io = /* @__PURE__ */ n("div")({
231
+ }), bo = /* @__PURE__ */ n("div")({
232
232
  name: "HeaderContent",
233
233
  class: "h149e3gp",
234
234
  propsAsIs: !1
235
- }), yo = "h10toh7", so = /* @__PURE__ */ n("img")({
235
+ }), fo = "h10toh7", io = /* @__PURE__ */ n("img")({
236
236
  name: "SponsorLogo",
237
237
  class: "s1jyea6t",
238
238
  propsAsIs: !1
239
- }), Be = /* @__PURE__ */ n("div")({
239
+ }), xe = /* @__PURE__ */ n("div")({
240
240
  name: "SponsorName",
241
241
  class: "szpfa3h",
242
242
  propsAsIs: !1
243
- }), bo = /* @__PURE__ */ n("div")({
243
+ }), No = /* @__PURE__ */ n("div")({
244
244
  name: "Media",
245
245
  class: "m1crmu01",
246
246
  propsAsIs: !1
247
- }), xe = /* @__PURE__ */ n("img")({
247
+ }), Re = /* @__PURE__ */ n("img")({
248
248
  name: "PromoImg",
249
249
  class: "p1l37r8s",
250
250
  propsAsIs: !1
251
- }), Re = "s1nmch9k", to = /* @__PURE__ */ n("div")({
251
+ }), De = "s1nmch9k", ao = /* @__PURE__ */ n("div")({
252
252
  name: "Content",
253
253
  class: "c1er0ljd",
254
254
  propsAsIs: !1
255
- }), De = /* @__PURE__ */ n("div")({
255
+ }), qe = /* @__PURE__ */ n("div")({
256
256
  name: "Description",
257
257
  class: "dydopmr",
258
258
  propsAsIs: !1
@@ -260,58 +260,58 @@ const Do = /* @__PURE__ */ n("div")({
260
260
  name: "Sponsor",
261
261
  class: "s1w6nt04",
262
262
  propsAsIs: !1
263
- }), qe = /* @__PURE__ */ n("div")({
263
+ }), Ve = /* @__PURE__ */ n("div")({
264
264
  name: "SponsorText",
265
265
  class: "s1evcmtq",
266
266
  propsAsIs: !1
267
- }), fo = /* @__PURE__ */ n("div")({
267
+ }), $o = /* @__PURE__ */ n("div")({
268
268
  name: "ADLogo",
269
269
  class: "awodx0x",
270
270
  propsAsIs: !1
271
- }), Ve = /* @__PURE__ */ n("span")({
271
+ }), je = /* @__PURE__ */ n("span")({
272
272
  name: "SponsoredText",
273
273
  class: "s1q3n6oi",
274
274
  propsAsIs: !1
275
- }), je = /* @__PURE__ */ n("div")({
275
+ }), Ue = /* @__PURE__ */ n("div")({
276
276
  name: "ActionBtnWrap",
277
277
  class: "a8d4xfk",
278
278
  propsAsIs: !1
279
- }), Ue = /* @__PURE__ */ n("a")({
279
+ }), Fe = /* @__PURE__ */ n("a")({
280
280
  name: "ActionButton",
281
281
  class: "at6oobh",
282
282
  propsAsIs: !1
283
- }), Fe = /* @__PURE__ */ n("div")({
283
+ }), ze = /* @__PURE__ */ n("div")({
284
284
  name: "Title",
285
285
  class: "t1gyg7tt",
286
286
  propsAsIs: !1
287
- }), ze = "h17rwbtk", Ge = /* @__PURE__ */ n("div")({
287
+ }), Ge = "h17rwbtk", We = /* @__PURE__ */ n("div")({
288
288
  name: "Container",
289
289
  class: "c10m2bce",
290
290
  propsAsIs: !1
291
- }), io = /* @__PURE__ */ n("div")({
291
+ }), ro = /* @__PURE__ */ n("div")({
292
292
  name: "Item",
293
293
  class: "ig23yq5",
294
294
  propsAsIs: !1
295
- }), We = /* @__PURE__ */ n("div")({
295
+ }), He = /* @__PURE__ */ n("div")({
296
296
  name: "Dot",
297
297
  class: "d1f6aqua",
298
298
  propsAsIs: !1
299
- }), He = ({
299
+ }), Ke = ({
300
300
  time: o,
301
301
  adCount: s,
302
302
  adPosition: i
303
303
  }) => {
304
304
  const t = Math.floor(o / 60), l = o - t * 60;
305
- return t === 0 && l === 0 && s === i ? null : /* @__PURE__ */ v(Ge, {
306
- children: [s > 1 && /* @__PURE__ */ v(ro, {
307
- children: [/* @__PURE__ */ v(io, {
305
+ return t === 0 && l === 0 && s === i ? null : /* @__PURE__ */ v(We, {
306
+ children: [s > 1 && /* @__PURE__ */ v(co, {
307
+ children: [/* @__PURE__ */ v(ro, {
308
308
  children: [i, " of ", s]
309
- }), /* @__PURE__ */ e(We, {})]
310
- }), /* @__PURE__ */ v(io, {
309
+ }), /* @__PURE__ */ e(He, {})]
310
+ }), /* @__PURE__ */ v(ro, {
311
311
  children: [t, ":", l < 10 ? `0${l}` : l]
312
312
  })]
313
313
  });
314
- }, Ke = (o, s, { onPlay: i, onStop: t, onProgress: l }) => {
314
+ }, Ye = (o, s, { onPlay: i, onStop: t, onProgress: l }) => {
315
315
  const r = google.ima;
316
316
  let c = new r.AdDisplayContainer(o), m = new r.AdsLoader(c), A = new r.AdsRequest(), a;
317
317
  m.addEventListener(
@@ -338,15 +338,15 @@ const Do = /* @__PURE__ */ n("div")({
338
338
  }
339
339
  return g;
340
340
  };
341
- }, Ye = /* @__PURE__ */ n("div")({
341
+ }, Je = /* @__PURE__ */ n("div")({
342
342
  name: "Container",
343
343
  class: "c4q6dw1",
344
344
  propsAsIs: !1
345
- }), Je = /* @__PURE__ */ n("div")({
345
+ }), Xe = /* @__PURE__ */ n("div")({
346
346
  name: "ControlsContainer",
347
347
  class: "c1la67r",
348
348
  propsAsIs: !1
349
- }), Qe = "m3guev", Xe = "m7099mt", Ze = "mmm6o5s", on = ({
349
+ }), Ze = "m3guev", Qe = "m7099mt", on = "mmm6o5s", en = ({
350
350
  promotion: o,
351
351
  controlVideo: s,
352
352
  promotionId: i,
@@ -355,7 +355,7 @@ const Do = /* @__PURE__ */ n("div")({
355
355
  skipAutoClose: r
356
356
  }) => {
357
357
  var c;
358
- const m = U(null), [A, a] = x(!1), [g, u] = x(0), [p, I] = x(0), [$, h] = x(0), y = U(), b = So(() => {
358
+ const m = F(null), [A, a] = R(!1), [g, u] = R(0), [p, I] = R(0), [$, h] = R(0), y = F(), b = Eo(() => {
359
359
  u(0), I(0), h(0), a(!1), s == null || s({
360
360
  muted: !1
361
361
  });
@@ -363,9 +363,9 @@ const Do = /* @__PURE__ */ n("div")({
363
363
  P(() => {
364
364
  if (l != null && l.url && m.current) {
365
365
  b();
366
- const f = Ke(m.current, l.url, {
366
+ const f = Ye(m.current, l.url, {
367
367
  onPlay: () => {
368
- R.emit("advertisement", {
368
+ D.emit("advertisement", {
369
369
  action: "videoPlay",
370
370
  payload: {
371
371
  id: i,
@@ -388,23 +388,23 @@ const Do = /* @__PURE__ */ n("div")({
388
388
  }
389
389
  }, [l == null ? void 0 : l.url, s, b, i, o.type, t]);
390
390
  const O = ((c = o.sponsor) == null ? void 0 : c.logo) && o.logoMode === M.CENTER;
391
- return /* @__PURE__ */ v(go, {
391
+ return /* @__PURE__ */ v(Io, {
392
392
  className: "PromoOverlay",
393
- children: [/* @__PURE__ */ v(ho, {
394
- children: [/* @__PURE__ */ e(Io, {
395
- className: k(!O && yo),
396
- children: /* @__PURE__ */ e(fo, {
393
+ children: [/* @__PURE__ */ v(yo, {
394
+ children: [/* @__PURE__ */ e(bo, {
395
+ className: k(!O && fo),
396
+ children: /* @__PURE__ */ e($o, {
397
397
  style: {
398
398
  transform: "scale(1.5)"
399
399
  },
400
400
  children: "Ad"
401
401
  })
402
- }), /* @__PURE__ */ v(Je, {
403
- children: [/* @__PURE__ */ e(He, {
402
+ }), /* @__PURE__ */ v(Xe, {
403
+ children: [/* @__PURE__ */ e(Ke, {
404
404
  time: g,
405
405
  adCount: p,
406
406
  adPosition: $
407
- }), r && /* @__PURE__ */ e(lo, {
407
+ }), r && /* @__PURE__ */ e(po, {
408
408
  className: "ClosePromoIcon",
409
409
  close: () => {
410
410
  var f;
@@ -412,39 +412,41 @@ const Do = /* @__PURE__ */ n("div")({
412
412
  }
413
413
  })]
414
414
  })]
415
- }), /* @__PURE__ */ e(bo, {
416
- className: k(Qe, A && Xe, !A && Ze),
417
- children: /* @__PURE__ */ e(Ye, {
415
+ }), /* @__PURE__ */ e(No, {
416
+ className: k(Ze, A && Qe, !A && on),
417
+ children: /* @__PURE__ */ e(Je, {
418
418
  ref: m
419
419
  })
420
420
  })]
421
421
  });
422
- }, ao = (o) => {
423
- var s, i, t, l, r, c, m, A, a, g, u, p, I, $, h, y, b, O, f, C, G, W, H, K, Y, J, Q, X, Z, oo;
422
+ }, lo = (o) => {
423
+ var s, i, t, l, r, c, m, A, a, g, u, p, I, $, h, y, b, O, f, C, W, H, K, Y, J, X, Z, Q, oo, eo;
424
424
  const {
425
425
  promotion: d,
426
- advertisementPaused: No,
426
+ advertisementPaused: Co,
427
427
  togglePause: E,
428
428
  controlVideo: _,
429
- skipAutoClose: $o,
429
+ skipAutoClose: To,
430
430
  promotionId: B,
431
- onClose: Co,
431
+ onClose: So,
432
432
  markAsViewed: w,
433
- externalAd: eo
434
- } = o, q = d.type === S.INGAME_IAB11_LBAR || d.type === S.INGAME_IAB11, V = ((s = d.sponsor) == null ? void 0 : s.logo) && d.logoMode === M.CENTER, To = !!((t = (i = d.banner) == null ? void 0 : i.video) != null && t.url), j = d.autoPlayVideo === Bo.ENABLED;
433
+ externalAd: no
434
+ } = o, V = d.type === S.INGAME_IAB11_LBAR || d.type === S.INGAME_IAB11, j = ((s = d.sponsor) == null ? void 0 : s.logo) && d.logoMode === M.CENTER, so = !!((t = (i = d.banner) == null ? void 0 : i.video) != null && t.url), x = d.autoPlayVideo === xo.ENABLED;
435
435
  if (P(() => {
436
- E == null || E(To || j);
436
+ E == null || E(so || x);
437
437
  }, []), P(() => {
438
438
  B && d.type && w && w();
439
439
  }, [B, d.type, w]), P(() => () => {
440
440
  _ == null || _({ muted: !1 });
441
- }, [_]), eo)
442
- return /* @__PURE__ */ e(on, { ...o, externalAd: eo });
441
+ }, [_]), no)
442
+ return /* @__PURE__ */ e(en, { ...o, externalAd: no });
443
443
  let L = (l = d.banner) == null ? void 0 : l.url;
444
- return L && L.indexOf("http") !== 0 && (L = `https://${L}`), /* @__PURE__ */ v(go, { className: "PromoOverlay", children: [
445
- /* @__PURE__ */ v(ho, { children: [
446
- /* @__PURE__ */ v(Io, { className: k(!V && yo), children: [
447
- ((r = d.sponsor) == null ? void 0 : r.logo) && d.logoMode === M.LEFT && /* @__PURE__ */ e(so, { src: (c = d.sponsor) == null ? void 0 : c.logo, alt: "promo" }),
444
+ L && L.indexOf("http") !== 0 && (L = `https://${L}`);
445
+ let U = !0;
446
+ return so && (!Co || !x ? U = !0 : U = !1), /* @__PURE__ */ v(Io, { className: "PromoOverlay", children: [
447
+ /* @__PURE__ */ v(yo, { children: [
448
+ /* @__PURE__ */ v(bo, { className: k(!j && fo), children: [
449
+ ((r = d.sponsor) == null ? void 0 : r.logo) && d.logoMode === M.LEFT && /* @__PURE__ */ e(io, { src: (c = d.sponsor) == null ? void 0 : c.logo, alt: "promo" }),
448
450
  /* @__PURE__ */ v(
449
451
  we,
450
452
  {
@@ -452,39 +454,39 @@ const Do = /* @__PURE__ */ n("div")({
452
454
  paddingLeft: (m = d.sponsor) != null && m.logo && d.logoMode === M.LEFT ? "0px" : "8px"
453
455
  },
454
456
  children: [
455
- ((A = d.sponsor) == null ? void 0 : A.logo) && d.logoMode === M.LEFT && /* @__PURE__ */ e(Be, { children: (a = d.sponsor) == null ? void 0 : a.name }),
456
- /* @__PURE__ */ v(qe, { className: "SponsorText", children: [
457
- /* @__PURE__ */ e(fo, { children: "AD" }),
458
- /* @__PURE__ */ e(Ve, { children: "SPONSORED" })
457
+ ((A = d.sponsor) == null ? void 0 : A.logo) && d.logoMode === M.LEFT && /* @__PURE__ */ e(xe, { children: (a = d.sponsor) == null ? void 0 : a.name }),
458
+ /* @__PURE__ */ v(Ve, { className: "SponsorText", children: [
459
+ /* @__PURE__ */ e($o, { children: "AD" }),
460
+ /* @__PURE__ */ e(je, { children: "SPONSORED" })
459
461
  ] })
460
462
  ]
461
463
  }
462
464
  )
463
465
  ] }),
464
466
  /* @__PURE__ */ e(
465
- lo,
467
+ po,
466
468
  {
467
469
  className: "ClosePromoIcon",
468
- close: Co,
470
+ close: So,
469
471
  autoClose: (g = d.closeTimer) == null ? void 0 : g.auto,
470
- duration: $o ? 0 : (u = d.closeTimer) == null ? void 0 : u.seconds,
471
- isPlaying: !No
472
+ duration: To ? 0 : (u = d.closeTimer) == null ? void 0 : u.seconds,
473
+ isPlaying: U
472
474
  }
473
475
  )
474
476
  ] }),
475
- /* @__PURE__ */ v(bo, { children: [
476
- V && /* @__PURE__ */ e(so, { className: Re, src: (p = d.sponsor) == null ? void 0 : p.logo, alt: "promo" }),
477
- /* @__PURE__ */ e(to, { children: ($ = (I = d.banner) == null ? void 0 : I.video) != null && $.url ? /* @__PURE__ */ e(
478
- ko,
477
+ /* @__PURE__ */ v(No, { children: [
478
+ j && /* @__PURE__ */ e(io, { className: De, src: (p = d.sponsor) == null ? void 0 : p.logo, alt: "promo" }),
479
+ /* @__PURE__ */ e(ao, { children: ($ = (I = d.banner) == null ? void 0 : I.video) != null && $.url ? /* @__PURE__ */ e(
480
+ Lo,
479
481
  {
480
482
  source: (y = (h = d.banner) == null ? void 0 : h.video) == null ? void 0 : y.url,
481
483
  poster: (O = (b = d.banner) == null ? void 0 : b.video) == null ? void 0 : O.thumbnailUrl,
482
- aspectRatio: q ? "1/1" : "16/9",
484
+ aspectRatio: V ? "1/1" : "16/9",
483
485
  onPause: () => {
484
- j && (E == null || E(!0));
486
+ x && (E == null || E(!0));
485
487
  },
486
488
  onPlay: () => {
487
- R.emit("advertisement", {
489
+ D.emit("advertisement", {
488
490
  action: "videoPlay",
489
491
  payload: {
490
492
  id: B,
@@ -493,49 +495,49 @@ const Do = /* @__PURE__ */ n("div")({
493
495
  }), E == null || E(!1);
494
496
  },
495
497
  controlVideo: _,
496
- autoPlay: j
498
+ autoPlay: x
497
499
  }
498
- ) : (f = d.banner) != null && f.imageUrl ? /* @__PURE__ */ e(xe, { style: q ? { aspectRatio: "1/1" } : {}, src: (C = d.banner) == null ? void 0 : C.imageUrl, alt: "promo" }) : null }),
499
- !q && /* @__PURE__ */ v(to, { children: [
500
- ((G = d.banner) == null ? void 0 : G.title) && /* @__PURE__ */ e(Fe, { className: k("AdvTitle", V && ze), children: (W = d.banner) == null ? void 0 : W.title }),
501
- ((H = d.banner) == null ? void 0 : H.body) && /* @__PURE__ */ e(De, { className: "AdvDescription", children: (K = d.banner) == null ? void 0 : K.body })
500
+ ) : (f = d.banner) != null && f.imageUrl ? /* @__PURE__ */ e(Re, { style: V ? { aspectRatio: "1/1" } : {}, src: (C = d.banner) == null ? void 0 : C.imageUrl, alt: "promo" }) : null }),
501
+ !V && /* @__PURE__ */ v(ao, { children: [
502
+ ((W = d.banner) == null ? void 0 : W.title) && /* @__PURE__ */ e(ze, { className: k("AdvTitle", j && Ge), children: (H = d.banner) == null ? void 0 : H.title }),
503
+ ((K = d.banner) == null ? void 0 : K.body) && /* @__PURE__ */ e(qe, { className: "AdvDescription", children: (Y = d.banner) == null ? void 0 : Y.body })
502
504
  ] })
503
505
  ] }),
504
- d.buttonType !== xo.NO_BUTTON && /* @__PURE__ */ e(je, { children: /* @__PURE__ */ e(
505
- Ue,
506
+ d.buttonType !== Ro.NO_BUTTON && /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(
507
+ Fe,
506
508
  {
507
509
  href: L,
508
510
  style: {
509
- backgroundColor: ((J = (Y = d.banner) == null ? void 0 : Y.ctaButton) == null ? void 0 : J.color) || "#009dc4",
510
- color: ((X = (Q = d.banner) == null ? void 0 : Q.ctaButton) == null ? void 0 : X.textColor) || "#fff"
511
+ backgroundColor: ((X = (J = d.banner) == null ? void 0 : J.ctaButton) == null ? void 0 : X.color) || "#009dc4",
512
+ color: ((Q = (Z = d.banner) == null ? void 0 : Z.ctaButton) == null ? void 0 : Q.textColor) || "#fff"
511
513
  },
512
514
  "data-analytics": "button",
513
515
  "data-promo-id": B,
514
516
  "data-promo-type": d.type,
515
517
  target: "_blank",
516
- children: (oo = (Z = d.banner) == null ? void 0 : Z.ctaButton) == null ? void 0 : oo.label
518
+ children: (eo = (oo = d.banner) == null ? void 0 : oo.ctaButton) == null ? void 0 : eo.label
517
519
  }
518
520
  ) })
519
521
  ] });
520
- }, en = /* @__PURE__ */ n("div")({
522
+ }, nn = /* @__PURE__ */ n("div")({
521
523
  name: "SidebarContainer",
522
524
  class: "s1abskp8",
523
525
  propsAsIs: !1
524
- }), nn = ({
526
+ }), sn = ({
525
527
  children: o,
526
528
  direction: s,
527
529
  style: i,
528
530
  className: t,
529
531
  hiding: l
530
- }) => /* @__PURE__ */ e(F, {
532
+ }) => /* @__PURE__ */ e(z, {
531
533
  direction: s,
532
534
  style: i,
533
535
  hiding: l,
534
536
  className: t,
535
- children: /* @__PURE__ */ e(en, {
537
+ children: /* @__PURE__ */ e(nn, {
536
538
  children: o
537
539
  })
538
- }), sn = (o) => (o == null ? void 0 : o.type) === S.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === S.INGAME_IAB21_LBAR, tn = (o) => (o == null ? void 0 : o.type) === S.INGAME_IAB11 || (o == null ? void 0 : o.type) === S.INGAME_IAB21, an = ({
540
+ }), tn = (o) => (o == null ? void 0 : o.type) === S.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === S.INGAME_IAB21_LBAR, an = (o) => (o == null ? void 0 : o.type) === S.INGAME_IAB11 || (o == null ? void 0 : o.type) === S.INGAME_IAB21, rn = ({
539
541
  advertisement: o,
540
542
  close: s,
541
543
  skipTypeCheck: i,
@@ -550,8 +552,8 @@ const Do = /* @__PURE__ */ n("div")({
550
552
  controlVideo: u,
551
553
  advertisementPaused: p,
552
554
  togglePause: I
553
- }) => o.promotion ? c && o.notification ? /* @__PURE__ */ e(Oe, { open: a, notification: o.notification, promotionId: o.question.id }) : !r && !m && (i || tn(o.promotion)) ? /* @__PURE__ */ e(_e, { className: "PromoOverlayContainer", children: /* @__PURE__ */ e(
554
- ao,
555
+ }) => o.promotion ? c && o.notification ? /* @__PURE__ */ e(_e, { open: a, notification: o.notification, promotionId: o.question.id }) : !r && !m && (i || an(o.promotion)) ? /* @__PURE__ */ e(Be, { className: "PromoOverlayContainer", children: /* @__PURE__ */ e(
556
+ lo,
555
557
  {
556
558
  markAsViewed: A,
557
559
  promotionId: o.question.id,
@@ -563,8 +565,8 @@ const Do = /* @__PURE__ */ n("div")({
563
565
  advertisementPaused: p,
564
566
  togglePause: I
565
567
  }
566
- ) }) : r && (i || sn(o.promotion)) ? /* @__PURE__ */ e(nn, { className: "PromoSidebarContainer", direction: r, hiding: !1, children: /* @__PURE__ */ e(
567
- ao,
568
+ ) }) : r && (i || tn(o.promotion)) ? /* @__PURE__ */ e(sn, { className: "PromoSidebarContainer", direction: r, hiding: !1, children: /* @__PURE__ */ e(
569
+ lo,
568
570
  {
569
571
  markAsViewed: A,
570
572
  promotionId: o.question.id,
@@ -577,28 +579,28 @@ const Do = /* @__PURE__ */ n("div")({
577
579
  togglePause: I
578
580
  }
579
581
  ) }) : m ? /* @__PURE__ */ e(
580
- Jo,
582
+ Xo,
581
583
  {
582
584
  promotionId: o.question.id,
583
585
  hiding: !1,
584
586
  promotion: o.promotion,
585
587
  direction: m
586
588
  }
587
- ) : null : null, rn = /* @__PURE__ */ n("div")({
589
+ ) : null : null, ln = /* @__PURE__ */ n("div")({
588
590
  name: "AdvertisementUIWrap",
589
591
  class: "aa6pjif",
590
592
  propsAsIs: !1
591
- }), ln = (o) => {
593
+ }), dn = (o) => {
592
594
  const s = o.target;
593
595
  if (s instanceof HTMLAnchorElement && s.target === "_blank") {
594
596
  const i = s.getAttribute("data-promo-id") || "", t = s.getAttribute("data-promo-type") || S.UNSET;
595
- s.getAttribute("data-analytics") === "button" && R.emit("advertisement", {
597
+ s.getAttribute("data-analytics") === "button" && D.emit("advertisement", {
596
598
  action: "buttonSelect",
597
599
  payload: {
598
600
  id: i,
599
601
  type: t
600
602
  }
601
- }), s.getAttribute("data-analytics") === "banner" && R.emit("advertisement", {
603
+ }), s.getAttribute("data-analytics") === "banner" && D.emit("advertisement", {
602
604
  action: "bannerSelect",
603
605
  payload: {
604
606
  id: i,
@@ -606,7 +608,7 @@ const Do = /* @__PURE__ */ n("div")({
606
608
  }
607
609
  });
608
610
  }
609
- }, dn = ({
611
+ }, cn = ({
610
612
  gamification: o,
611
613
  layoutMode: s,
612
614
  skipAutoClose: i,
@@ -620,23 +622,23 @@ const Do = /* @__PURE__ */ n("div")({
620
622
  controlVideo: g
621
623
  }) => {
622
624
  var u, p, I;
623
- const $ = U(null), h = co(o.advertisement.$store);
624
- Lo($, {
625
+ const $ = F(null), h = mo(o.advertisement.$store);
626
+ Mo($, {
625
627
  enabled: !!h.data,
626
628
  event: "click",
627
- listener: ln
629
+ listener: dn
628
630
  });
629
631
  const y = !r && !l;
630
632
  if (h.data === void 0 || !A && h.isViewed)
631
633
  return null;
632
- const b = ((I = (p = (u = h == null ? void 0 : h.data) == null ? void 0 : u.notification) == null ? void 0 : p.promotion) == null ? void 0 : I.mode) === vo.LOWER_THIRD;
633
- return /* @__PURE__ */ e(rn, {
634
+ const b = ((I = (p = (u = h == null ? void 0 : h.data) == null ? void 0 : u.notification) == null ? void 0 : p.promotion) == null ? void 0 : I.mode) === go.LOWER_THIRD;
635
+ return /* @__PURE__ */ e(ln, {
634
636
  ref: $,
635
637
  style: {
636
638
  height: y ? "auto" : "100%"
637
639
  },
638
640
  className: k("SL-AdvertisementUIWrap", m && "mobile-view", b && "SL-AdvertisementUIWrap--lower-third"),
639
- children: /* @__PURE__ */ e(an, {
641
+ children: /* @__PURE__ */ e(rn, {
640
642
  skipTypeCheck: t,
641
643
  sidebar: l,
642
644
  banner: r,
@@ -653,7 +655,7 @@ const Do = /* @__PURE__ */ n("div")({
653
655
  controlVideo: g
654
656
  })
655
657
  });
656
- }, cn = ({
658
+ }, pn = ({
657
659
  sdk: o,
658
660
  sidebar: s,
659
661
  externalAd: i,
@@ -665,7 +667,7 @@ const Do = /* @__PURE__ */ n("div")({
665
667
  persistent: A,
666
668
  notification: a
667
669
  }) => {
668
- const g = co(o.featuresList.getStore());
670
+ const g = mo(o.featuresList.getStore());
669
671
  if (P(() => {
670
672
  if (i) {
671
673
  const p = document.createElement("script");
@@ -687,8 +689,8 @@ const Do = /* @__PURE__ */ n("div")({
687
689
  });
688
690
  if (!g)
689
691
  return null;
690
- const u = o.getFeature(Ro.GAMES);
691
- return u ? /* @__PURE__ */ e(dn, {
692
+ const u = o.getFeature(Do.GAMES);
693
+ return u ? /* @__PURE__ */ e(cn, {
692
694
  gamification: u,
693
695
  sidebar: s,
694
696
  banner: t,
@@ -701,7 +703,7 @@ const Do = /* @__PURE__ */ n("div")({
701
703
  externalAd: i,
702
704
  controlVideo: o.controlVideoPlayer
703
705
  }) : null;
704
- }, An = ({
706
+ }, gn = ({
705
707
  event: o,
706
708
  sidebar: s,
707
709
  banner: i,
@@ -713,10 +715,10 @@ const Do = /* @__PURE__ */ n("div")({
713
715
  skipTypeCheck: A,
714
716
  externalAd: a
715
717
  }) => {
716
- const g = Mo(), u = Po(), p = Oo();
718
+ const g = Po(), u = Oo(), p = _o();
717
719
  return g ? a && !u.promotionExternalAd ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : !a && u.promotionExternalAd ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : s && !u.promotionSidebar ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : i && !u.promotionBanner ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : m && !u.promotionNotification ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : !i && !s && !m && !u.promotionOverlay ? o !== void 0 && /* @__PURE__ */ e(T, { event: o }) : /* @__PURE__ */ v("div", { className: "StreamLayerSDK", children: [
718
- /* @__PURE__ */ e(_o, { customTheme: c ?? p, children: /* @__PURE__ */ e(
719
- cn,
720
+ /* @__PURE__ */ e(Bo, { customTheme: c ?? p, children: /* @__PURE__ */ e(
721
+ pn,
720
722
  {
721
723
  sdk: g,
722
724
  sidebar: s,
@@ -734,6 +736,6 @@ const Do = /* @__PURE__ */ n("div")({
734
736
  ] }) : null;
735
737
  };
736
738
  export {
737
- An as StreamLayerSDKAdvertisement,
738
- cn as StreamLayerSDKAdvertisementUI
739
+ gn as StreamLayerSDKAdvertisement,
740
+ pn as StreamLayerSDKAdvertisementUI
739
741
  };
@@ -17883,7 +17883,7 @@ const tE = ({
17883
17883
  y = !0;
17884
17884
  };
17885
17885
  const T = X_(e, n, a, {
17886
- version: "1.9.1",
17886
+ version: "1.9.2",
17887
17887
  onDeepLinkHandled: s,
17888
17888
  videoPlayerController: o,
17889
17889
  onContentActivate: r,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react",
3
- "version": "1.9.1",
3
+ "version": "1.9.2",
4
4
  "type": "module",
5
5
  "author": "StreamLayer, Inc (https://streamlayer.io)",
6
6
  "maintainers": [
@@ -83,17 +83,17 @@
83
83
  }
84
84
  ],
85
85
  "dependencies": {
86
- "@streamlayer/feature-gamification": "^1.10.0",
87
- "@streamlayer/sdk-web": "^1.6.1",
88
- "@streamlayer/sdk-web-analytics": "^1.4.9",
89
- "@streamlayer/sdk-web-api": "^1.6.9",
90
- "@streamlayer/sdk-web-core": "^1.7.1",
91
- "@streamlayer/sdk-web-features": "^1.0.30",
92
- "@streamlayer/sdk-web-interfaces": "^1.2.9",
93
- "@streamlayer/sdk-web-logger": "^1.0.30",
94
- "@streamlayer/sdk-web-notifications": "^1.2.9",
95
- "@streamlayer/sdk-web-storage": "^1.0.30",
96
- "@streamlayer/sdk-web-types": "^1.8.3"
86
+ "@streamlayer/feature-gamification": "^1.10.1",
87
+ "@streamlayer/sdk-web": "^1.6.2",
88
+ "@streamlayer/sdk-web-analytics": "^1.4.10",
89
+ "@streamlayer/sdk-web-api": "^1.6.10",
90
+ "@streamlayer/sdk-web-core": "^1.7.2",
91
+ "@streamlayer/sdk-web-features": "^1.0.31",
92
+ "@streamlayer/sdk-web-interfaces": "^1.2.10",
93
+ "@streamlayer/sdk-web-logger": "^1.0.31",
94
+ "@streamlayer/sdk-web-notifications": "^1.2.10",
95
+ "@streamlayer/sdk-web-storage": "^1.0.31",
96
+ "@streamlayer/sdk-web-types": "^1.8.4"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "@bufbuild/protobuf": "^1.10.0",
@@ -149,7 +149,7 @@
149
149
  "size-limit": "^11.1.6",
150
150
  "url-loader": "^4.1.1",
151
151
  "vite-plugin-dts": "^4.2.3",
152
- "@streamlayer/react-ui": "^1.13.1"
152
+ "@streamlayer/react-ui": "^1.13.2"
153
153
  },
154
154
  "scripts": {
155
155
  "size-limit": "size-limit"