@streamlayer/react 0.30.0 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/lib/cjs/app.js +1 -0
  2. package/lib/cjs/auth.js +1 -1
  3. package/lib/cjs/gamification-feature.js +1 -0
  4. package/lib/cjs/index.js +1 -1
  5. package/lib/cjs/index2.js +4 -0
  6. package/lib/cjs/masters.js +1 -1
  7. package/lib/cjs/masters2.js +6 -0
  8. package/lib/cjs/points.js +1 -1
  9. package/lib/dist/cjs/gamification-feature.js +1 -0
  10. package/lib/dist/cjs/index.js +1 -0
  11. package/lib/dist/cjs/masters.js +297 -1
  12. package/lib/dist/{index-bcabe854.js → es/gamification-feature.js} +522 -523
  13. package/lib/dist/es/index.js +9 -0
  14. package/lib/dist/es/masters.js +26797 -7
  15. package/lib/dist/index.d.ts +6 -5
  16. package/lib/dist/style.css +1 -1
  17. package/lib/{app-c53bb384.js → es/app.js} +1 -1
  18. package/lib/es/auth.js +2 -2
  19. package/lib/{index-e26b3493.js → es/gamification-feature.js} +542 -543
  20. package/lib/es/index.js +2 -2
  21. package/lib/{index-89366251.js → es/index2.js} +12 -12
  22. package/lib/es/masters.js +3 -3
  23. package/lib/es/masters2.js +2433 -0
  24. package/lib/es/points.js +45 -36
  25. package/lib/style.css +1 -1
  26. package/package.json +10 -10
  27. package/lib/app-36051bbe.cjs +0 -1
  28. package/lib/dist/index-f504e8d3.cjs +0 -1
  29. package/lib/dist/masters-3c9c6ffe.js +0 -26765
  30. package/lib/dist/masters-fe5f1486.cjs +0 -297
  31. package/lib/index-af5c5738.cjs +0 -1
  32. package/lib/index-dd93a61a.cjs +0 -4
  33. package/lib/masters-bf25c11c.js +0 -2415
  34. package/lib/masters-f135002d.cjs +0 -6
  35. /package/lib/{common-f34b9d88.cjs → cjs/common.js} +0 -0
  36. /package/lib/{index-565f26fb.cjs → cjs/index3.js} +0 -0
  37. /package/lib/{common-2d2a3ba3.js → es/common.js} +0 -0
  38. /package/lib/{index-15f61ac8.js → es/index3.js} +0 -0
@@ -1,6 +0,0 @@
1
- "use strict";const r=require("react/jsx-runtime"),ae=require("./index-dd93a61a.cjs"),F=require("react"),U=require("@streamlayer/sdk-web-types"),J=require("@nanostores/react"),ue=require("@streamlayer/sdk-web-interfaces"),d=require("./index-565f26fb.cjs"),fe=require("@streamlayer/sdk-web-notifications"),zt=require("@lottiefiles/react-lottie-player"),Ot=({feature:a,sdk:l,children:c,className:h})=>{const y=J.useStore(a.status),{slStreamId:m}=J.useStore(l.sdkStore);return m!=null&&m.loading?r.jsx("div",{className:h,children:"event is loading..."}):m!=null&&m.data?y!==ue.FeatureStatus.Ready?r.jsx("div",{className:h,children:"wait feature..."}):c:r.jsx("div",{className:h,children:"event is forbidden..."})},Dt=F.lazy(()=>Promise.resolve().then(()=>require("./index-af5c5738.cjs"))),Pt=({sdk:a,feature:l,className:c})=>{const h=F.useMemo(()=>l&&l.featureConfig.get().type===U.FeatureType.GAMES?r.jsx(Ot,{className:c,sdk:a,feature:l,children:r.jsx(Dt,{className:c,gamification:l,sdk:a})}):null,[a,l,c]);return r.jsx(F.Suspense,{fallback:r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"page loading..."}),children:h})},Gt=d.styled_default("button")({name:"SButton",class:"SButton_sxxa0c",propsAsIs:!1}),Mt=d.styled_default("span")({name:"ButtonIcon",class:"ButtonIcon_b193dcyu",propsAsIs:!1}),qt=d.styled_default("span")({name:"ButtonLabel",class:"ButtonLabel_b40tuix",propsAsIs:!1}),Le=({disabled:a,active:l,onClick:c,label:h,icon:y})=>r.jsx(Gt,{onClick:c,disabled:a,"data-selected":l,children:r.jsxs(r.Fragment,{children:[y&&r.jsx(Mt,{children:y}),r.jsx(qt,{children:h})]})}),Wt=()=>d.i1,Ht=d.styled_default(Wt())({name:"ButtonIcon",class:"ButtonIcon_b1whzxvd",propsAsIs:!0}),he="channels",Qt=a=>{var l;return r.jsx(Le,{...a,id:"channels",label:"Channels",icon:r.jsx(Ht,{name:"icon-btn-channels","data-selected":(l=a.active)==null?void 0:l.toString()})})},Yt=()=>d.i1,Kt=d.styled_default(Yt())({name:"ButtonIcon",class:"ButtonIcon_b11des7c",propsAsIs:!0}),X="featuredGroups",Vt=a=>{var l;return r.jsx(Le,{...a,label:"FG+",id:"featuredGroups",icon:r.jsx(Kt,{name:"icon-btn-feature-groups","data-selected":(l=a.active)==null?void 0:l.toString()})})},Xt=()=>d.i1,Jt=d.styled_default(Xt())({name:"ButtonIcon",class:"ButtonIcon_b180jd7l",propsAsIs:!0}),xe="leaderboard",Zt=a=>{var l;return r.jsx(Le,{...a,label:"Leader Board",id:"leaderboard",icon:r.jsx(Jt,{name:"icon-btn-leaderboard","data-selected":(l=a.active)==null?void 0:l.toString()})})},en=d.styled_default("div")({name:"Buttons",class:"Buttons_b6tbwuy",propsAsIs:!1}),tn=({children:a,className:l})=>r.jsx(en,{className:l,children:a}),nn=()=>tn,rn=d.styled_default(nn())({name:"Navigation",class:"Navigation_n19lpak2",propsAsIs:!0}),sn=({activeOverlay:a,setActiveOverlay:l,sdkReady:c,className:h})=>r.jsxs(rn,{className:h,children:[r.jsx(Qt,{active:a===he,onClick:()=>l(he)}),r.jsx(Vt,{active:a===X,disabled:!c,onClick:()=>{l(X)}}),r.jsx(Zt,{active:a===xe,onClick:()=>l(xe)})]}),lt={[U.QuestionType.TWEET]:{label:"Insight",iconName:"icon-insight"},[U.QuestionType.PROMOTION]:{label:"Insight",iconName:"icon-insight"},[U.QuestionType.UNSET]:void 0,[U.QuestionType.FACTOID]:{label:"Insight",iconName:"icon-insight"},[U.QuestionType.POLL]:{label:"Poll",iconName:"icon-poll"},[U.QuestionType.TRIVIA]:{label:"Trivia",iconName:"icon-trivia"},[U.QuestionType.PREDICTION]:{label:"Prediction",iconName:"icon-prediction"}},on=d.styled_default("div")({name:"Container",class:"Container_c1bgb86j",propsAsIs:!1}),an=d.styled_default("video")({name:"Player",class:"Player_p6703cq",propsAsIs:!1}),ln=d.styled_default("img")({name:"Poster",class:"Poster_p12ow7zo",propsAsIs:!1}),cn=d.styled_default("div")({name:"Control",class:"Control_cdpal9o",propsAsIs:!1}),ct=({poster:a,source:l})=>{const c=F.useRef(null),[h,y]=F.useState(!1),[m,f]=F.useState(!0);return r.jsxs(on,{onClick:()=>{const s=c==null?void 0:c.current;s&&y(_=>_?(s.pause(),!1):(s.play(),f(!1),!0))},children:[r.jsx(an,{ref:c,src:l,onEnded:()=>{var s;(s=c==null?void 0:c.current)==null||s.load(),y(!1),f(!0)},style:{visibility:m?"hidden":"visible"}}),r.jsx(ln,{src:a,style:{visibility:m?"visible":"hidden"}}),r.jsx(cn,{children:!h&&r.jsx(d.i1,{name:"icon-play"})})]})},un=d.styled_default("div")({name:"InsightContainer",class:"InsightContainer_i1pqqgpo",propsAsIs:!1}),dn=d.styled_default("div")({name:"InsightContent",class:"InsightContent_igj7luu",propsAsIs:!1}),hn=d.styled_default("h3")({name:"Title",class:"Title_t1qne9g6",propsAsIs:!1}),pn=d.styled_default("div")({name:"Description",class:"Description_dtpr98r",propsAsIs:!1}),fn=d.styled_default("button")({name:"ActionBtn",class:"ActionBtn_a17iaqp8",propsAsIs:!1}),mn=({video:a,heading:l,body:c,action:h})=>r.jsxs(un,{children:[(a==null?void 0:a.url)&&r.jsx(ct,{source:a.url,poster:a.thumbnailUrl}),r.jsxs(dn,{children:[r.jsx(hn,{children:l}),r.jsx(pn,{children:c}),h&&r.jsx(fn,{onClick:h,children:"View Insight"})]})]}),ne=d.styled_default("div")({name:"BGWrap",class:"BGWrap_b1dqe0sz",propsAsIs:!1}),O=d.styled_default("div")({name:"BGLineBase",class:"BGLineBase_b1v6w7ni",propsAsIs:!1}),yn=()=>O,xn=d.styled_default(yn())({name:"BGOneLineOne",class:"BGOneLineOne_b2nqb1p",propsAsIs:!0}),_n=()=>O,gn=d.styled_default(_n())({name:"BGOneLineTwo",class:"BGOneLineTwo_b1xxgmbk",propsAsIs:!0}),wn=()=>O,In=d.styled_default(wn())({name:"BGOneLineThree",class:"BGOneLineThree_b63lwcb",propsAsIs:!0}),An=()=>O,Ye=d.styled_default(An())({name:"BGTwoLineOne",class:"BGTwoLineOne_b2iah4",propsAsIs:!0}),Bn=()=>O,Ke=d.styled_default(Bn())({name:"BGTwoLineTwo",class:"BGTwoLineTwo_b1xezvf6",propsAsIs:!0}),bn=()=>O,Ve=d.styled_default(bn())({name:"BGTwoLineThree",class:"BGTwoLineThree_b1jz1hg0",propsAsIs:!0}),En=()=>O,Xe=d.styled_default(En())({name:"BGThreeLineOne",class:"BGThreeLineOne_b18ho1tk",propsAsIs:!0}),jn=()=>O,Je=d.styled_default(jn())({name:"BGThreeLineTwo",class:"BGThreeLineTwo_b14uvjfm",propsAsIs:!0}),vn=()=>O,Ze=d.styled_default(vn())({name:"BGThreeLineThree",class:"BGThreeLineThree_b11c3ns7",propsAsIs:!0}),Cn=()=>O,et=d.styled_default(Cn())({name:"BGThreeLineFour",class:"BGThreeLineFour_b1bqhhet",propsAsIs:!0}),Tn=()=>O,Fn=d.styled_default(Tn())({name:"BGFourLineOne",class:"BGFourLineOne_b1xyzi7o",propsAsIs:!0}),Sn=()=>O,Ln=d.styled_default(Sn())({name:"BGFourLineTwo",class:"BGFourLineTwo_byo0rup",propsAsIs:!0}),$n=()=>O,kn=d.styled_default($n())({name:"BGFourLineThree",class:"BGFourLineThree_b1oyiqgv",propsAsIs:!0}),Nn=()=>O,Rn=d.styled_default(Nn())({name:"BGFourLineFour",class:"BGFourLineFour_bx3ddqw",propsAsIs:!0}),Un=({step:a,correct:l})=>r.jsxs(r.Fragment,{children:[r.jsxs(ne,{"data-active":a===1,"data-first-screen":"true",children:[r.jsx(xn,{}),r.jsx(gn,{}),r.jsx(In,{})]}),r.jsxs(ne,{"data-active":a===2,children:[r.jsx(Ye,{}),r.jsx(Ke,{}),r.jsx(Ve,{})]}),r.jsxs(ne,{"data-active":a===3,children:[r.jsx(Ye,{}),r.jsx(Ke,{}),r.jsx(Ve,{})]}),l?r.jsxs(r.Fragment,{children:[r.jsxs(ne,{"data-active":a===4,"data-correct":"false",children:[r.jsx(Xe,{}),r.jsx(Je,{}),r.jsx(Ze,{}),r.jsx(et,{})]}),r.jsxs(ne,{"data-active":a===5,"data-correct":"false","data-last-screen":"true",children:[r.jsx(Xe,{}),r.jsx(Je,{}),r.jsx(Ze,{}),r.jsx(et,{})]})]}):r.jsxs(ne,{"data-active":a===4,"data-correct":"false","data-last-screen":"true",children:[r.jsx(Fn,{}),r.jsx(Ln,{}),r.jsx(kn,{}),r.jsx(Rn,{})]})]}),zn=d.styled_default("div")({name:"Container",class:"Container_c10131zw",propsAsIs:!1}),On=d.styled_default("div")({name:"AnimateContent",class:"AnimateContent_ar6k2eo",propsAsIs:!1}),ie=d.styled_default("div")({name:"Content",class:"Content_c1hwoq9l",propsAsIs:!1}),re=d.styled_default("div")({name:"Title",class:"Title_t4ujo4g",propsAsIs:!1}),de=d.styled_default("div")({name:"Subtitle",class:"Subtitle_s1pjil1h",propsAsIs:!1}),Dn=()=>de,tt=d.styled_default(Dn())({name:"SubtitleFG",class:"SubtitleFG_s1iorwr9",propsAsIs:!0}),me=d.styled_default("div")({name:"AnswerText",class:"AnswerText_a51sv9d",propsAsIs:!1}),Pn=()=>d.i1,Ae=d.styled_default(Pn())({name:"FeedbackIcon",class:"FeedbackIcon_f1lbk2ye",propsAsIs:!0}),nt=d.styled_default("button")({name:"CloseButton",class:"CloseButton_crcvk3t",propsAsIs:!1}),Gn=()=>d.i1,it=d.styled_default(Gn())({name:"CloseIcon",class:"CloseIcon_c33p82r",propsAsIs:!0}),Mn=({close:a,votedAnswer:l,correct:c,correctAnswerTitle:h})=>{const[y,m]=F.useState(1);return F.useEffect(()=>{const f=setInterval(()=>{m(s=>c&&s>4||!c&&s>3?s:++s)},6e3);return()=>clearInterval(f)},[c]),r.jsxs(zn,{"data-bg-color-white":y>3,children:[r.jsx(Un,{step:y,correct:c}),r.jsxs(On,{"data-active-number":y,children:[r.jsxs(ie,{children:[r.jsx(re,{children:"Master"}),r.jsx(tt,{children:"FEATURED GROUPS +"})]}),r.jsxs(ie,{children:[r.jsx(re,{children:"Prediction results are in!"}),r.jsx(tt,{children:"FEATURED GROUPS +"})]}),r.jsxs(ie,{children:[r.jsx(re,{children:"Who holds the most birdies in golf?"}),r.jsxs(de,{children:["Your Pick: ",r.jsx(me,{children:l==null?void 0:l.title})]})]}),c?r.jsxs(r.Fragment,{children:[r.jsxs(ie,{"data-color-green":"true",children:[r.jsx(re,{children:"Congratulations! You answered correctly."}),r.jsxs(de,{children:[r.jsx(Ae,{name:"selected"}),"Your Pick: ",r.jsx(me,{children:l==null?void 0:l.title})]})]}),r.jsxs(ie,{"data-color-green":"true",children:[r.jsx(nt,{onClick:a,children:r.jsx(it,{name:"icon-cross"})}),r.jsxs(re,{children:["+",l==null?void 0:l.points," points"]}),r.jsxs(de,{children:[r.jsx(Ae,{name:"selected"}),"Your Pick: ",r.jsx(me,{children:l==null?void 0:l.title})]})]})]}):r.jsxs(ie,{children:[r.jsx(nt,{onClick:a,children:r.jsx(it,{name:"icon-cross"})}),r.jsxs(re,{"data-incorrect":"true",children:["Better luck next time! Correct: ",h,"."]}),r.jsxs(de,{"data-incorrect":"true",children:[r.jsx(Ae,{name:"circleClose"}),"Your Pick: ",r.jsx(me,{children:l==null?void 0:l.title})]})]})]})]})},qn=d.styled_default("div")({name:"Container",class:"Container_c1eptrjd",propsAsIs:!1}),Wn=d.styled_default("div")({name:"CloseIconWrap",class:"CloseIconWrap_crylm65",propsAsIs:!1}),Hn=()=>d.i1,Qn=d.styled_default(Hn())({name:"CloseIcon",class:"CloseIcon_c9mrcz7",propsAsIs:!0}),Yn=d.styled_default("div")({name:"Header",class:"Header_hw3lzv4",propsAsIs:!1}),Kn=()=>d.i1,Vn=d.styled_default(Kn())({name:"TypeIcon",class:"TypeIcon_t1rrb3kf",propsAsIs:!0}),Xn=d.styled_default("span")({name:"TypeName",class:"TypeName_t1ydnjov",propsAsIs:!1}),Jn=d.styled_default("div")({name:"Question",class:"Question_qlf90cl",propsAsIs:!1}),Zn=d.styled_default("button")({name:"AnswerButton",class:"AnswerButton_a1e0nhcl",propsAsIs:!1}),ei=d.styled_default("div")({name:"Container",class:"Container_cjq447q",propsAsIs:!1}),ti=d.styled_default("div")({name:"ImageContainer",class:"ImageContainer_i14egogb",propsAsIs:!1}),ni=d.styled_default("img")({name:"Image",class:"Image_i2g9g4l",propsAsIs:!1}),ii=d.styled_default("div")({name:"Details",class:"Details_d1c454nm",propsAsIs:!1}),ri=d.styled_default("div")({name:"Name",class:"Name_n11nigc3",propsAsIs:!1}),si=d.styled_default("div")({name:"UserName",class:"UserName_urxa4k8",propsAsIs:!1}),oi=({image:a,name:l,userName:c,verified:h})=>r.jsxs(ei,{children:[r.jsx(ti,{children:r.jsx(ni,{src:a})}),r.jsxs(ii,{children:[r.jsxs(ri,{children:[l," ",h&&r.jsx(d.i1,{name:"icon-twitter-verified"})]}),r.jsx(si,{children:c})]})]}),ai=d.styled_default("div")({name:"Container",class:"Container_c1t4f0x4",propsAsIs:!1}),li=d.styled_default("button")({name:"ActionBtn",class:"ActionBtn_a16w1nl6",propsAsIs:!1}),ci=d.styled_default("div")({name:"Body",class:"Body_b14u54rf",propsAsIs:!1}),ui=d.styled_default("img")({name:"Image",class:"Image_i1hxm6zo",propsAsIs:!1}),di=d.styled_default("div")({name:"Details",class:"Details_d1s19yop",propsAsIs:!1}),hi=d.styled_default("div")({name:"QuoteWrap",class:"QuoteWrap_q1qyx94r",propsAsIs:!1}),pi=d.styled_default("blockquote")({name:"Quote",class:"Quote_qs97clu",propsAsIs:!1}),fi=({account:a,body:l,image:c,title:h,action:y})=>r.jsxs(ai,{children:[r.jsx(hi,{children:r.jsx(pi,{children:h})}),r.jsxs(di,{children:[r.jsx(oi,{...a}),r.jsx(ci,{children:l}),c&&r.jsx(ui,{src:c})]}),y&&r.jsx(li,{onClick:y,children:"View Tweet"})]}),rt=({close:a,action:l,data:{questionType:c,question:h,insight:y,tweet:m}})=>{const f=lt[c];return f?h!=null&&h.predictionResult?r.jsx(Mn,{close:a,...h}):r.jsxs(qn,{children:[r.jsx(Wn,{onClick:a,children:r.jsx(Qn,{name:"icon-cross"})}),c!==U.QuestionType.TWEET&&r.jsxs(Yn,{children:[r.jsx(Vn,{name:f.iconName}),r.jsx(Xn,{children:f.label})]}),c===U.QuestionType.FACTOID&&r.jsx(mn,{...y,action:l}),c===U.QuestionType.TWEET&&r.jsx(fi,{...m,action:l}),c!==U.QuestionType.FACTOID&&c!==U.QuestionType.TWEET&&r.jsxs(r.Fragment,{children:[r.jsx(Jn,{children:h==null?void 0:h.title}),r.jsx(Zn,{onClick:l,children:"Answer"})]})]}):null};var ut={},dt={},_e={};_e.byteLength=xi;_e.toByteArray=gi;_e.fromByteArray=Ai;var H=[],P=[],mi=typeof Uint8Array<"u"?Uint8Array:Array,Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var se=0,yi=Be.length;se<yi;++se)H[se]=Be[se],P[Be.charCodeAt(se)]=se;P["-".charCodeAt(0)]=62;P["_".charCodeAt(0)]=63;function ht(a){var l=a.length;if(l%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=a.indexOf("=");c===-1&&(c=l);var h=c===l?0:4-c%4;return[c,h]}function xi(a){var l=ht(a),c=l[0],h=l[1];return(c+h)*3/4-h}function _i(a,l,c){return(l+c)*3/4-c}function gi(a){var l,c=ht(a),h=c[0],y=c[1],m=new mi(_i(a,h,y)),f=0,s=y>0?h-4:h,_;for(_=0;_<s;_+=4)l=P[a.charCodeAt(_)]<<18|P[a.charCodeAt(_+1)]<<12|P[a.charCodeAt(_+2)]<<6|P[a.charCodeAt(_+3)],m[f++]=l>>16&255,m[f++]=l>>8&255,m[f++]=l&255;return y===2&&(l=P[a.charCodeAt(_)]<<2|P[a.charCodeAt(_+1)]>>4,m[f++]=l&255),y===1&&(l=P[a.charCodeAt(_)]<<10|P[a.charCodeAt(_+1)]<<4|P[a.charCodeAt(_+2)]>>2,m[f++]=l>>8&255,m[f++]=l&255),m}function wi(a){return H[a>>18&63]+H[a>>12&63]+H[a>>6&63]+H[a&63]}function Ii(a,l,c){for(var h,y=[],m=l;m<c;m+=3)h=(a[m]<<16&16711680)+(a[m+1]<<8&65280)+(a[m+2]&255),y.push(wi(h));return y.join("")}function Ai(a){for(var l,c=a.length,h=c%3,y=[],m=16383,f=0,s=c-h;f<s;f+=m)y.push(Ii(a,f,f+m>s?s:f+m));return h===1?(l=a[c-1],y.push(H[l>>2]+H[l<<4&63]+"==")):h===2&&(l=(a[c-2]<<8)+a[c-1],y.push(H[l>>10]+H[l>>4&63]+H[l<<2&63]+"=")),y.join("")}var $e={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */$e.read=function(a,l,c,h,y){var m,f,s=y*8-h-1,_=(1<<s)-1,A=_>>1,g=-7,j=c?y-1:0,x=c?-1:1,w=a[l+j];for(j+=x,m=w&(1<<-g)-1,w>>=-g,g+=s;g>0;m=m*256+a[l+j],j+=x,g-=8);for(f=m&(1<<-g)-1,m>>=-g,g+=h;g>0;f=f*256+a[l+j],j+=x,g-=8);if(m===0)m=1-A;else{if(m===_)return f?NaN:(w?-1:1)*(1/0);f=f+Math.pow(2,h),m=m-A}return(w?-1:1)*f*Math.pow(2,m-h)};$e.write=function(a,l,c,h,y,m){var f,s,_,A=m*8-y-1,g=(1<<A)-1,j=g>>1,x=y===23?Math.pow(2,-24)-Math.pow(2,-77):0,w=h?0:m-1,B=h?1:-1,b=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(s=isNaN(l)?1:0,f=g):(f=Math.floor(Math.log(l)/Math.LN2),l*(_=Math.pow(2,-f))<1&&(f--,_*=2),f+j>=1?l+=x/_:l+=x*Math.pow(2,1-j),l*_>=2&&(f++,_/=2),f+j>=g?(s=0,f=g):f+j>=1?(s=(l*_-1)*Math.pow(2,y),f=f+j):(s=l*Math.pow(2,j-1)*Math.pow(2,y),f=0));y>=8;a[c+w]=s&255,w+=B,s/=256,y-=8);for(f=f<<y|s,A+=y;A>0;a[c+w]=f&255,w+=B,f/=256,A-=8);a[c+w-B]|=b*128};/*!
2
- * The buffer module from node.js, for the browser.
3
- *
4
- * @author Feross Aboukhadijeh <https://feross.org>
5
- * @license MIT
6
- */(function(a){const l=_e,c=$e,h=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=s,a.SlowBuffer=C,a.INSPECT_MAX_BYTES=50;const y=2147483647;a.kMaxLength=y,s.TYPED_ARRAY_SUPPORT=m(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function m(){try{const n=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(n,e),n.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function f(n){if(n>y)throw new RangeError('The value "'+n+'" is invalid for option "size"');const e=new Uint8Array(n);return Object.setPrototypeOf(e,s.prototype),e}function s(n,e,t){if(typeof n=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return j(n)}return _(n,e,t)}s.poolSize=8192;function _(n,e,t){if(typeof n=="string")return x(n,e);if(ArrayBuffer.isView(n))return B(n);if(n==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(M(n,ArrayBuffer)||n&&M(n.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(M(n,SharedArrayBuffer)||n&&M(n.buffer,SharedArrayBuffer)))return b(n,e,t);if(typeof n=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const i=n.valueOf&&n.valueOf();if(i!=null&&i!==n)return s.from(i,e,t);const o=k(n);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof n[Symbol.toPrimitive]=="function")return s.from(n[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}s.from=function(n,e,t){return _(n,e,t)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function A(n){if(typeof n!="number")throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function g(n,e,t){return A(n),n<=0?f(n):e!==void 0?typeof t=="string"?f(n).fill(e,t):f(n).fill(e):f(n)}s.alloc=function(n,e,t){return g(n,e,t)};function j(n){return A(n),f(n<0?0:E(n)|0)}s.allocUnsafe=function(n){return j(n)},s.allocUnsafeSlow=function(n){return j(n)};function x(n,e){if((typeof e!="string"||e==="")&&(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const t=R(n,e)|0;let i=f(t);const o=i.write(n,e);return o!==t&&(i=i.slice(0,o)),i}function w(n){const e=n.length<0?0:E(n.length)|0,t=f(e);for(let i=0;i<e;i+=1)t[i]=n[i]&255;return t}function B(n){if(M(n,Uint8Array)){const e=new Uint8Array(n);return b(e.buffer,e.byteOffset,e.byteLength)}return w(n)}function b(n,e,t){if(e<0||n.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(n.byteLength<e+(t||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&t===void 0?i=new Uint8Array(n):t===void 0?i=new Uint8Array(n,e):i=new Uint8Array(n,e,t),Object.setPrototypeOf(i,s.prototype),i}function k(n){if(s.isBuffer(n)){const e=E(n.length)|0,t=f(e);return t.length===0||n.copy(t,0,0,e),t}if(n.length!==void 0)return typeof n.length!="number"||Ie(n.length)?f(0):w(n);if(n.type==="Buffer"&&Array.isArray(n.data))return w(n.data)}function E(n){if(n>=y)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+y.toString(16)+" bytes");return n|0}function C(n){return+n!=n&&(n=0),s.alloc(+n)}s.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==s.prototype},s.compare=function(e,t){if(M(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),M(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let i=e.length,o=t.length;for(let u=0,p=Math.min(i,o);u<p;++u)if(e[u]!==t[u]){i=e[u],o=t[u];break}return i<o?-1:o<i?1:0},s.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return s.alloc(0);let i;if(t===void 0)for(t=0,i=0;i<e.length;++i)t+=e[i].length;const o=s.allocUnsafe(t);let u=0;for(i=0;i<e.length;++i){let p=e[i];if(M(p,Uint8Array))u+p.length>o.length?(s.isBuffer(p)||(p=s.from(p)),p.copy(o,u)):Uint8Array.prototype.set.call(o,p,u);else if(s.isBuffer(p))p.copy(o,u);else throw new TypeError('"list" argument must be an Array of Buffers');u+=p.length}return o};function R(n,e){if(s.isBuffer(n))return n.length;if(ArrayBuffer.isView(n)||M(n,ArrayBuffer))return n.byteLength;if(typeof n!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof n);const t=n.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&t===0)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return we(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Qe(n).length;default:if(o)return i?-1:we(n).length;e=(""+e).toLowerCase(),o=!0}}s.byteLength=R;function Q(n,e,t){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(n||(n="utf8");;)switch(n){case"hex":return Tt(this,e,t);case"utf8":case"utf-8":return ze(this,e,t);case"ascii":return vt(this,e,t);case"latin1":case"binary":return Ct(this,e,t);case"base64":return Et(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ft(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),i=!0}}s.prototype._isBuffer=!0;function D(n,e,t){const i=n[e];n[e]=n[t],n[t]=i}s.prototype.swap16=function(){const e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)D(this,t,t+1);return this},s.prototype.swap32=function(){const e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)D(this,t,t+3),D(this,t+1,t+2);return this},s.prototype.swap64=function(){const e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)D(this,t,t+7),D(this,t+1,t+6),D(this,t+2,t+5),D(this,t+3,t+4);return this},s.prototype.toString=function(){const e=this.length;return e===0?"":arguments.length===0?ze(this,0,e):Q.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(e){if(!s.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:s.compare(this,e)===0},s.prototype.inspect=function(){let e="";const t=a.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},h&&(s.prototype[h]=s.prototype.inspect),s.prototype.compare=function(e,t,i,o,u){if(M(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),i===void 0&&(i=e?e.length:0),o===void 0&&(o=0),u===void 0&&(u=this.length),t<0||i>e.length||o<0||u>this.length)throw new RangeError("out of range index");if(o>=u&&t>=i)return 0;if(o>=u)return-1;if(t>=i)return 1;if(t>>>=0,i>>>=0,o>>>=0,u>>>=0,this===e)return 0;let p=u-o,I=i-t;const S=Math.min(p,I),T=this.slice(o,u),L=e.slice(t,i);for(let v=0;v<S;++v)if(T[v]!==L[v]){p=T[v],I=L[v];break}return p<I?-1:I<p?1:0};function Re(n,e,t,i,o){if(n.length===0)return-1;if(typeof t=="string"?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,Ie(t)&&(t=o?0:n.length-1),t<0&&(t=n.length+t),t>=n.length){if(o)return-1;t=n.length-1}else if(t<0)if(o)t=0;else return-1;if(typeof e=="string"&&(e=s.from(e,i)),s.isBuffer(e))return e.length===0?-1:Ue(n,e,t,i,o);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(n,e,t):Uint8Array.prototype.lastIndexOf.call(n,e,t):Ue(n,[e],t,i,o);throw new TypeError("val must be string, number or Buffer")}function Ue(n,e,t,i,o){let u=1,p=n.length,I=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(n.length<2||e.length<2)return-1;u=2,p/=2,I/=2,t/=2}function S(L,v){return u===1?L[v]:L.readUInt16BE(v*u)}let T;if(o){let L=-1;for(T=t;T<p;T++)if(S(n,T)===S(e,L===-1?0:T-L)){if(L===-1&&(L=T),T-L+1===I)return L*u}else L!==-1&&(T-=T-L),L=-1}else for(t+I>p&&(t=p-I),T=t;T>=0;T--){let L=!0;for(let v=0;v<I;v++)if(S(n,T+v)!==S(e,v)){L=!1;break}if(L)return T}return-1}s.prototype.includes=function(e,t,i){return this.indexOf(e,t,i)!==-1},s.prototype.indexOf=function(e,t,i){return Re(this,e,t,i,!0)},s.prototype.lastIndexOf=function(e,t,i){return Re(this,e,t,i,!1)};function wt(n,e,t,i){t=Number(t)||0;const o=n.length-t;i?(i=Number(i),i>o&&(i=o)):i=o;const u=e.length;i>u/2&&(i=u/2);let p;for(p=0;p<i;++p){const I=parseInt(e.substr(p*2,2),16);if(Ie(I))return p;n[t+p]=I}return p}function It(n,e,t,i){return pe(we(e,n.length-t),n,t,i)}function At(n,e,t,i){return pe(kt(e),n,t,i)}function Bt(n,e,t,i){return pe(Qe(e),n,t,i)}function bt(n,e,t,i){return pe(Nt(e,n.length-t),n,t,i)}s.prototype.write=function(e,t,i,o){if(t===void 0)o="utf8",i=this.length,t=0;else if(i===void 0&&typeof t=="string")o=t,i=this.length,t=0;else if(isFinite(t))t=t>>>0,isFinite(i)?(i=i>>>0,o===void 0&&(o="utf8")):(o=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const u=this.length-t;if((i===void 0||i>u)&&(i=u),e.length>0&&(i<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let p=!1;for(;;)switch(o){case"hex":return wt(this,e,t,i);case"utf8":case"utf-8":return It(this,e,t,i);case"ascii":case"latin1":case"binary":return At(this,e,t,i);case"base64":return Bt(this,e,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bt(this,e,t,i);default:if(p)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),p=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Et(n,e,t){return e===0&&t===n.length?l.fromByteArray(n):l.fromByteArray(n.slice(e,t))}function ze(n,e,t){t=Math.min(n.length,t);const i=[];let o=e;for(;o<t;){const u=n[o];let p=null,I=u>239?4:u>223?3:u>191?2:1;if(o+I<=t){let S,T,L,v;switch(I){case 1:u<128&&(p=u);break;case 2:S=n[o+1],(S&192)===128&&(v=(u&31)<<6|S&63,v>127&&(p=v));break;case 3:S=n[o+1],T=n[o+2],(S&192)===128&&(T&192)===128&&(v=(u&15)<<12|(S&63)<<6|T&63,v>2047&&(v<55296||v>57343)&&(p=v));break;case 4:S=n[o+1],T=n[o+2],L=n[o+3],(S&192)===128&&(T&192)===128&&(L&192)===128&&(v=(u&15)<<18|(S&63)<<12|(T&63)<<6|L&63,v>65535&&v<1114112&&(p=v))}}p===null?(p=65533,I=1):p>65535&&(p-=65536,i.push(p>>>10&1023|55296),p=56320|p&1023),i.push(p),o+=I}return jt(i)}const Oe=4096;function jt(n){const e=n.length;if(e<=Oe)return String.fromCharCode.apply(String,n);let t="",i=0;for(;i<e;)t+=String.fromCharCode.apply(String,n.slice(i,i+=Oe));return t}function vt(n,e,t){let i="";t=Math.min(n.length,t);for(let o=e;o<t;++o)i+=String.fromCharCode(n[o]&127);return i}function Ct(n,e,t){let i="";t=Math.min(n.length,t);for(let o=e;o<t;++o)i+=String.fromCharCode(n[o]);return i}function Tt(n,e,t){const i=n.length;(!e||e<0)&&(e=0),(!t||t<0||t>i)&&(t=i);let o="";for(let u=e;u<t;++u)o+=Rt[n[u]];return o}function Ft(n,e,t){const i=n.slice(e,t);let o="";for(let u=0;u<i.length-1;u+=2)o+=String.fromCharCode(i[u]+i[u+1]*256);return o}s.prototype.slice=function(e,t){const i=this.length;e=~~e,t=t===void 0?i:~~t,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),t<0?(t+=i,t<0&&(t=0)):t>i&&(t=i),t<e&&(t=e);const o=this.subarray(e,t);return Object.setPrototypeOf(o,s.prototype),o};function N(n,e,t){if(n%1!==0||n<0)throw new RangeError("offset is not uint");if(n+e>t)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||N(e,t,this.length);let o=this[e],u=1,p=0;for(;++p<t&&(u*=256);)o+=this[e+p]*u;return o},s.prototype.readUintBE=s.prototype.readUIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||N(e,t,this.length);let o=this[e+--t],u=1;for(;t>0&&(u*=256);)o+=this[e+--t]*u;return o},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e=e>>>0,t||N(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||N(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||N(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||N(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=V(function(e){e=e>>>0,te(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&ce(e,this.length-8);const o=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,u=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(o)+(BigInt(u)<<BigInt(32))}),s.prototype.readBigUInt64BE=V(function(e){e=e>>>0,te(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&ce(e,this.length-8);const o=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],u=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(o)<<BigInt(32))+BigInt(u)}),s.prototype.readIntLE=function(e,t,i){e=e>>>0,t=t>>>0,i||N(e,t,this.length);let o=this[e],u=1,p=0;for(;++p<t&&(u*=256);)o+=this[e+p]*u;return u*=128,o>=u&&(o-=Math.pow(2,8*t)),o},s.prototype.readIntBE=function(e,t,i){e=e>>>0,t=t>>>0,i||N(e,t,this.length);let o=t,u=1,p=this[e+--o];for(;o>0&&(u*=256);)p+=this[e+--o]*u;return u*=128,p>=u&&(p-=Math.pow(2,8*t)),p},s.prototype.readInt8=function(e,t){return e=e>>>0,t||N(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},s.prototype.readInt16LE=function(e,t){e=e>>>0,t||N(e,2,this.length);const i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i},s.prototype.readInt16BE=function(e,t){e=e>>>0,t||N(e,2,this.length);const i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i},s.prototype.readInt32LE=function(e,t){return e=e>>>0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e=e>>>0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=V(function(e){e=e>>>0,te(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&ce(e,this.length-8);const o=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(o)<<BigInt(32))+BigInt(t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)}),s.prototype.readBigInt64BE=V(function(e){e=e>>>0,te(e,"offset");const t=this[e],i=this[e+7];(t===void 0||i===void 0)&&ce(e,this.length-8);const o=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(o)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)}),s.prototype.readFloatLE=function(e,t){return e=e>>>0,t||N(e,4,this.length),c.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e=e>>>0,t||N(e,4,this.length),c.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||N(e,8,this.length),c.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||N(e,8,this.length),c.read(this,e,!1,52,8)};function z(n,e,t,i,o,u){if(!s.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<u)throw new RangeError('"value" argument is out of bounds');if(t+i>n.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,i,o){if(e=+e,t=t>>>0,i=i>>>0,!o){const I=Math.pow(2,8*i)-1;z(this,e,t,i,I,0)}let u=1,p=0;for(this[t]=e&255;++p<i&&(u*=256);)this[t+p]=e/u&255;return t+i},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(e,t,i,o){if(e=+e,t=t>>>0,i=i>>>0,!o){const I=Math.pow(2,8*i)-1;z(this,e,t,i,I,0)}let u=i-1,p=1;for(this[t+u]=e&255;--u>=0&&(p*=256);)this[t+u]=e/p&255;return t+i},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,1,255,0),this[t]=e&255,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function De(n,e,t,i,o){He(e,i,o,n,t,7);let u=Number(e&BigInt(4294967295));n[t++]=u,u=u>>8,n[t++]=u,u=u>>8,n[t++]=u,u=u>>8,n[t++]=u;let p=Number(e>>BigInt(32)&BigInt(4294967295));return n[t++]=p,p=p>>8,n[t++]=p,p=p>>8,n[t++]=p,p=p>>8,n[t++]=p,t}function Pe(n,e,t,i,o){He(e,i,o,n,t,7);let u=Number(e&BigInt(4294967295));n[t+7]=u,u=u>>8,n[t+6]=u,u=u>>8,n[t+5]=u,u=u>>8,n[t+4]=u;let p=Number(e>>BigInt(32)&BigInt(4294967295));return n[t+3]=p,p=p>>8,n[t+2]=p,p=p>>8,n[t+1]=p,p=p>>8,n[t]=p,t+8}s.prototype.writeBigUInt64LE=V(function(e,t=0){return De(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=V(function(e,t=0){return Pe(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,i,o){if(e=+e,t=t>>>0,!o){const S=Math.pow(2,8*i-1);z(this,e,t,i,S-1,-S)}let u=0,p=1,I=0;for(this[t]=e&255;++u<i&&(p*=256);)e<0&&I===0&&this[t+u-1]!==0&&(I=1),this[t+u]=(e/p>>0)-I&255;return t+i},s.prototype.writeIntBE=function(e,t,i,o){if(e=+e,t=t>>>0,!o){const S=Math.pow(2,8*i-1);z(this,e,t,i,S-1,-S)}let u=i-1,p=1,I=0;for(this[t+u]=e&255;--u>=0&&(p*=256);)e<0&&I===0&&this[t+u+1]!==0&&(I=1),this[t+u]=(e/p>>0)-I&255;return t+i},s.prototype.writeInt8=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},s.prototype.writeInt16LE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},s.prototype.writeInt32LE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,i){return e=+e,t=t>>>0,i||z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},s.prototype.writeBigInt64LE=V(function(e,t=0){return De(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=V(function(e,t=0){return Pe(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ge(n,e,t,i,o,u){if(t+i>n.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Me(n,e,t,i,o){return e=+e,t=t>>>0,o||Ge(n,e,t,4),c.write(n,e,t,i,23,4),t+4}s.prototype.writeFloatLE=function(e,t,i){return Me(this,e,t,!0,i)},s.prototype.writeFloatBE=function(e,t,i){return Me(this,e,t,!1,i)};function qe(n,e,t,i,o){return e=+e,t=t>>>0,o||Ge(n,e,t,8),c.write(n,e,t,i,52,8),t+8}s.prototype.writeDoubleLE=function(e,t,i){return qe(this,e,t,!0,i)},s.prototype.writeDoubleBE=function(e,t,i){return qe(this,e,t,!1,i)},s.prototype.copy=function(e,t,i,o){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!o&&o!==0&&(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o<i&&(o=i),o===i||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t<o-i&&(o=e.length-t+i);const u=o-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(t,i,o):Uint8Array.prototype.set.call(e,this.subarray(i,o),t),u},s.prototype.fill=function(e,t,i,o){if(typeof e=="string"){if(typeof t=="string"?(o=t,t=0,i=this.length):typeof i=="string"&&(o=i,i=this.length),o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");if(typeof o=="string"&&!s.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(e.length===1){const p=e.charCodeAt(0);(o==="utf8"&&p<128||o==="latin1")&&(e=p)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw new RangeError("Out of range index");if(i<=t)return this;t=t>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let u;if(typeof e=="number")for(u=t;u<i;++u)this[u]=e;else{const p=s.isBuffer(e)?e:s.from(e,o),I=p.length;if(I===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(u=0;u<i-t;++u)this[u+t]=p[u%I]}return this};const ee={};function ge(n,e,t){ee[n]=class extends t{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${n}]`,this.stack,delete this.name}get code(){return n}set code(o){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:o,writable:!0})}toString(){return`${this.name} [${n}]: ${this.message}`}}}ge("ERR_BUFFER_OUT_OF_BOUNDS",function(n){return n?`${n} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ge("ERR_INVALID_ARG_TYPE",function(n,e){return`The "${n}" argument must be of type number. Received type ${typeof e}`},TypeError),ge("ERR_OUT_OF_RANGE",function(n,e,t){let i=`The value of "${n}" is out of range.`,o=t;return Number.isInteger(t)&&Math.abs(t)>2**32?o=We(String(t)):typeof t=="bigint"&&(o=String(t),(t>BigInt(2)**BigInt(32)||t<-(BigInt(2)**BigInt(32)))&&(o=We(o)),o+="n"),i+=` It must be ${e}. Received ${o}`,i},RangeError);function We(n){let e="",t=n.length;const i=n[0]==="-"?1:0;for(;t>=i+4;t-=3)e=`_${n.slice(t-3,t)}${e}`;return`${n.slice(0,t)}${e}`}function St(n,e,t){te(e,"offset"),(n[e]===void 0||n[e+t]===void 0)&&ce(e,n.length-(t+1))}function He(n,e,t,i,o,u){if(n>t||n<e){const p=typeof e=="bigint"?"n":"";let I;throw u>3?e===0||e===BigInt(0)?I=`>= 0${p} and < 2${p} ** ${(u+1)*8}${p}`:I=`>= -(2${p} ** ${(u+1)*8-1}${p}) and < 2 ** ${(u+1)*8-1}${p}`:I=`>= ${e}${p} and <= ${t}${p}`,new ee.ERR_OUT_OF_RANGE("value",I,n)}St(i,o,u)}function te(n,e){if(typeof n!="number")throw new ee.ERR_INVALID_ARG_TYPE(e,"number",n)}function ce(n,e,t){throw Math.floor(n)!==n?(te(n,t),new ee.ERR_OUT_OF_RANGE(t||"offset","an integer",n)):e<0?new ee.ERR_BUFFER_OUT_OF_BOUNDS:new ee.ERR_OUT_OF_RANGE(t||"offset",`>= ${t?1:0} and <= ${e}`,n)}const Lt=/[^+/0-9A-Za-z-_]/g;function $t(n){if(n=n.split("=")[0],n=n.trim().replace(Lt,""),n.length<2)return"";for(;n.length%4!==0;)n=n+"=";return n}function we(n,e){e=e||1/0;let t;const i=n.length;let o=null;const u=[];for(let p=0;p<i;++p){if(t=n.charCodeAt(p),t>55295&&t<57344){if(!o){if(t>56319){(e-=3)>-1&&u.push(239,191,189);continue}else if(p+1===i){(e-=3)>-1&&u.push(239,191,189);continue}o=t;continue}if(t<56320){(e-=3)>-1&&u.push(239,191,189),o=t;continue}t=(o-55296<<10|t-56320)+65536}else o&&(e-=3)>-1&&u.push(239,191,189);if(o=null,t<128){if((e-=1)<0)break;u.push(t)}else if(t<2048){if((e-=2)<0)break;u.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;u.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;u.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return u}function kt(n){const e=[];for(let t=0;t<n.length;++t)e.push(n.charCodeAt(t)&255);return e}function Nt(n,e){let t,i,o;const u=[];for(let p=0;p<n.length&&!((e-=2)<0);++p)t=n.charCodeAt(p),i=t>>8,o=t%256,u.push(o),u.push(i);return u}function Qe(n){return l.toByteArray($t(n))}function pe(n,e,t,i){let o;for(o=0;o<i&&!(o+t>=e.length||o>=n.length);++o)e[o+t]=n[o];return o}function M(n,e){return n instanceof e||n!=null&&n.constructor!=null&&n.constructor.name!=null&&n.constructor.name===e.name}function Ie(n){return n!==n}const Rt=function(){const n="0123456789abcdef",e=new Array(256);for(let t=0;t<16;++t){const i=t*16;for(let o=0;o<16;++o)e[i+o]=n[t]+n[o]}return e}();function V(n){return typeof BigInt>"u"?Ut:n}function Ut(){throw new Error("BigInt not supported")}})(dt);var pt={exports:{}},$=pt.exports={},q,W;function ve(){throw new Error("setTimeout has not been defined")}function Ce(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?q=setTimeout:q=ve}catch{q=ve}try{typeof clearTimeout=="function"?W=clearTimeout:W=Ce}catch{W=Ce}})();function ft(a){if(q===setTimeout)return setTimeout(a,0);if((q===ve||!q)&&setTimeout)return q=setTimeout,setTimeout(a,0);try{return q(a,0)}catch{try{return q.call(null,a,0)}catch{return q.call(this,a,0)}}}function Bi(a){if(W===clearTimeout)return clearTimeout(a);if((W===Ce||!W)&&clearTimeout)return W=clearTimeout,clearTimeout(a);try{return W(a)}catch{try{return W.call(null,a)}catch{return W.call(this,a)}}}var Y=[],le=!1,Z,ye=-1;function bi(){!le||!Z||(le=!1,Z.length?Y=Z.concat(Y):ye=-1,Y.length&&mt())}function mt(){if(!le){var a=ft(bi);le=!0;for(var l=Y.length;l;){for(Z=Y,Y=[];++ye<l;)Z&&Z[ye].run();ye=-1,l=Y.length}Z=null,le=!1,Bi(a)}}$.nextTick=function(a){var l=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)l[c-1]=arguments[c];Y.push(new yt(a,l)),Y.length===1&&!le&&ft(mt)};function yt(a,l){this.fun=a,this.array=l}yt.prototype.run=function(){this.fun.apply(null,this.array)};$.title="browser";$.browser=!0;$.env={};$.argv=[];$.version="";$.versions={};function K(){}$.on=K;$.addListener=K;$.once=K;$.off=K;$.removeListener=K;$.removeAllListeners=K;$.emit=K;$.prependListener=K;$.prependOnceListener=K;$.listeners=function(a){return[]};$.binding=function(a){throw new Error("process.binding is not supported")};$.cwd=function(){return"/"};$.chdir=function(a){throw new Error("process.chdir is not supported")};$.umask=function(){return 0};var Ei=pt.exports;(function(a){Object.defineProperty(a,Symbol.toStringTag,{value:"Module"});const l=dt,c=Ei,h=f=>f&&f.__esModule?f:{default:f},y=h(c),m=globalThis||void 0||self;Object.defineProperty(a,"Buffer",{enumerable:!0,get:()=>l.Buffer}),Object.defineProperty(a,"process",{enumerable:!0,get:()=>y.default}),a.global=m})(ut);let G;typeof window<"u"?G=window:typeof self<"u"?G=self:G=ut.global;let Te=null,Fe=null;const st=20,be=G.clearTimeout,ot=G.setTimeout,Ee=G.cancelAnimationFrame||G.mozCancelAnimationFrame||G.webkitCancelAnimationFrame,at=G.requestAnimationFrame||G.mozRequestAnimationFrame||G.webkitRequestAnimationFrame;Ee==null||at==null?(Te=be,Fe=function(l){return ot(l,st)}):(Te=function([l,c]){Ee(l),be(c)},Fe=function(l){const c=at(function(){be(h),l()}),h=ot(function(){Ee(c),l()},st);return[c,h]});function ji(a){let l,c,h,y,m,f,s;const _=typeof document<"u"&&document.attachEvent;if(!_){f=function(E){const C=E.__resizeTriggers__,R=C.firstElementChild,Q=C.lastElementChild,D=R.firstElementChild;Q.scrollLeft=Q.scrollWidth,Q.scrollTop=Q.scrollHeight,D.style.width=R.offsetWidth+1+"px",D.style.height=R.offsetHeight+1+"px",R.scrollLeft=R.scrollWidth,R.scrollTop=R.scrollHeight},m=function(E){return E.offsetWidth!==E.__resizeLast__.width||E.offsetHeight!==E.__resizeLast__.height},s=function(E){if(E.target.className&&typeof E.target.className.indexOf=="function"&&E.target.className.indexOf("contract-trigger")<0&&E.target.className.indexOf("expand-trigger")<0)return;const C=this;f(this),this.__resizeRAF__&&Te(this.__resizeRAF__),this.__resizeRAF__=Fe(function(){m(C)&&(C.__resizeLast__.width=C.offsetWidth,C.__resizeLast__.height=C.offsetHeight,C.__resizeListeners__.forEach(function(D){D.call(C,E)}))})};let x=!1,w="";h="animationstart";const B="Webkit Moz O ms".split(" ");let b="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),k="";{const E=document.createElement("fakeelement");if(E.style.animationName!==void 0&&(x=!0),x===!1){for(let C=0;C<B.length;C++)if(E.style[B[C]+"AnimationName"]!==void 0){k=B[C],w="-"+k.toLowerCase()+"-",h=b[C],x=!0;break}}}c="resizeanim",l="@"+w+"keyframes "+c+" { from { opacity: 0; } to { opacity: 0; } } ",y=w+"animation: 1ms "+c+"; "}const A=function(x){if(!x.getElementById("detectElementResize")){const w=(l||"")+".resize-triggers { "+(y||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',B=x.head||x.getElementsByTagName("head")[0],b=x.createElement("style");b.id="detectElementResize",b.type="text/css",a!=null&&b.setAttribute("nonce",a),b.styleSheet?b.styleSheet.cssText=w:b.appendChild(x.createTextNode(w)),B.appendChild(b)}};return{addResizeListener:function(x,w){if(_)x.attachEvent("onresize",w);else{if(!x.__resizeTriggers__){const B=x.ownerDocument,b=G.getComputedStyle(x);b&&b.position==="static"&&(x.style.position="relative"),A(B),x.__resizeLast__={},x.__resizeListeners__=[],(x.__resizeTriggers__=B.createElement("div")).className="resize-triggers";const k=B.createElement("div");k.className="expand-trigger",k.appendChild(B.createElement("div"));const E=B.createElement("div");E.className="contract-trigger",x.__resizeTriggers__.appendChild(k),x.__resizeTriggers__.appendChild(E),x.appendChild(x.__resizeTriggers__),f(x),x.addEventListener("scroll",s,!0),h&&(x.__resizeTriggers__.__animationListener__=function(R){R.animationName===c&&f(x)},x.__resizeTriggers__.addEventListener(h,x.__resizeTriggers__.__animationListener__))}x.__resizeListeners__.push(w)}},removeResizeListener:function(x,w){if(_)x.detachEvent("onresize",w);else if(x.__resizeListeners__.splice(x.__resizeListeners__.indexOf(w),1),!x.__resizeListeners__.length){x.removeEventListener("scroll",s,!0),x.__resizeTriggers__.__animationListener__&&(x.__resizeTriggers__.removeEventListener(h,x.__resizeTriggers__.__animationListener__),x.__resizeTriggers__.__animationListener__=null);try{x.__resizeTriggers__=!x.removeChild(x.__resizeTriggers__)}catch{}}}}}class ke extends F.Component{constructor(...l){super(...l),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:c,disableWidth:h,onResize:y}=this.props;if(this._parentNode){var m,f,s,_;const A=window.getComputedStyle(this._parentNode)||{},g=parseFloat((m=A.paddingLeft)!==null&&m!==void 0?m:"0"),j=parseFloat((f=A.paddingRight)!==null&&f!==void 0?f:"0"),x=parseFloat((s=A.paddingTop)!==null&&s!==void 0?s:"0"),w=parseFloat((_=A.paddingBottom)!==null&&_!==void 0?_:"0"),B=this._parentNode.getBoundingClientRect(),b=B.height-x-w,k=B.width-g-j,E=this._parentNode.offsetHeight-x-w,C=this._parentNode.offsetWidth-g-j;(!c&&(this.state.height!==E||this.state.scaledHeight!==b)||!h&&(this.state.width!==C||this.state.scaledWidth!==k))&&(this.setState({height:E,width:C,scaledHeight:b,scaledWidth:k}),typeof y=="function"&&y({height:E,scaledHeight:b,scaledWidth:k,width:C}))}},this._setRef=c=>{this._autoSizer=c}}componentDidMount(){const{nonce:l}=this.props;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._parentNode!=null&&(typeof ResizeObserver<"u"?(this._resizeObserver=new ResizeObserver(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(this._parentNode)):(this._detectElementResize=ji(l),this._detectElementResize.addResizeListener(this._parentNode,this._onResize)),this._onResize()))}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&(this._resizeObserver.observe(this._parentNode),this._resizeObserver.disconnect()))}render(){const{children:l,defaultHeight:c,defaultWidth:h,disableHeight:y=!1,disableWidth:m=!1,nonce:f,onResize:s,style:_={},tagName:A="div",...g}=this.props,{height:j,scaledHeight:x,scaledWidth:w,width:B}=this.state,b={overflow:"visible"},k={};let E=!1;return y||(j===0&&(E=!0),b.height=0,k.height=j,k.scaledHeight=x),m||(B===0&&(E=!0),b.width=0,k.width=B,k.scaledWidth=w),F.createElement(A,{ref:this._setRef,style:{...b,..._},...g},!E&&l(k))}}const vi=({src:a,className:l,style:c})=>r.jsx(ke,{className:l,style:c,children:({height:h,width:y})=>r.jsx(zt.Player,{autoplay:!0,loop:!1,controls:!1,src:`https://url-proxy.streamlayer.io?${a}`,style:{height:h,width:y}})}),Ci=d.styled_default("div")({name:"Container",class:"Container_c1htq1lb",propsAsIs:!1}),Ti=d.styled_default("div")({name:"Content",class:"Content_cjyzpp7",propsAsIs:!1}),Fi=d.styled_default("div")({name:"Graphic",class:"Graphic_g16mldgz",propsAsIs:!1}),Si=d.styled_default("div")({name:"Headline",class:"Headline_h69js65",propsAsIs:!1}),Li=d.styled_default("div")({name:"StepsContainer",class:"StepsContainer_smm7qmo",propsAsIs:!1}),$i=d.styled_default("span")({name:"StepIndicator",class:"StepIndicator_s17knuw2",propsAsIs:!1}),ki=({graphicSrc:a,headline:l,stepsCount:c,currentStep:h})=>r.jsxs(Ci,{children:[r.jsxs(Ti,{children:[r.jsx(Fi,{children:r.jsx(vi,{src:a})}),l&&r.jsx(Si,{children:l})]}),r.jsx(Li,{children:Array.from({length:c}).map((y,m)=>r.jsx($i,{"data-active":h===m},m))})]}),Ni=d.styled_default("div")({name:"Container",class:"Container_c1itm4k7",propsAsIs:!1}),Ri=d.styled_default("div")({name:"IconContainer",class:"IconContainer_i1w4fsni",propsAsIs:!1}),Ui=()=>d.i1,zi=d.styled_default(Ui())({name:"InviteGameIcon",class:"InviteGameIcon_i19m85r1",propsAsIs:!0}),Oi=d.styled_default("div")({name:"Content",class:"Content_c1mbu204",propsAsIs:!1}),Di=d.styled_default("div")({name:"Heading",class:"Heading_h1amdqtv",propsAsIs:!1}),Pi=d.styled_default("div")({name:"Subtext",class:"Subtext_s1lhlj9j",propsAsIs:!1}),Gi=d.styled_default("div")({name:"LinkContainer",class:"LinkContainer_l1wot35e",propsAsIs:!1}),Mi=d.styled_default("div")({name:"LinkInfo",class:"LinkInfo_l1jdw39q",propsAsIs:!1}),qi=d.styled_default("span")({name:"LinkTitle",class:"LinkTitle_l1cr5mk",propsAsIs:!1}),Wi=d.styled_default("span")({name:"LinkAddress",class:"LinkAddress_lvi87q4",propsAsIs:!1}),Hi=()=>d.i1,Qi=d.styled_default(Hi())({name:"LinkIcon",class:"LinkIcon_l1pqlvw3",propsAsIs:!0}),Yi=d.styled_default("div")({name:"SocialLinksContainer",class:"SocialLinksContainer_s1n7kzeh",propsAsIs:!1}),Ki=d.styled_default("a")({name:"SocialLink",class:"SocialLink_s2m9o9y",propsAsIs:!1}),Vi=d.styled_default("span")({name:"SocialLinkLabel",class:"SocialLinkLabel_sewjbbn",propsAsIs:!1}),xt=({inviteLink:a,socialLinks:l,inviteCardTitle:c,inviteCardSubtext:h,primaryColor:y,className:m})=>r.jsxs(Ni,{className:m,children:[r.jsx(Ri,{style:{backgroundColor:y},children:r.jsx(zi,{name:"invite-game-icon"})}),r.jsxs(Oi,{children:[r.jsx(Di,{children:c||""}),r.jsx(Pi,{children:h||""})]}),a&&r.jsxs(Gi,{onClick:async()=>{if(a)try{await navigator.clipboard.writeText(a)}catch(f){console.error("Unable to copy to clipboard",f)}},children:[r.jsxs(Mi,{children:[r.jsx(qi,{children:"Invite link"}),r.jsx(Wi,{children:a})]}),r.jsx(Qi,{name:"icon-copy"})]}),l&&l.length>0&&r.jsx(Yi,{children:l.map(({icon:f,link:s,label:_})=>r.jsxs(Ki,{href:s,target:"_blank",children:[r.jsx(d.i1,{name:f}),r.jsx(Vi,{children:_})]},s))})]}),Xi=d.styled_default("div")({name:"Container",class:"Container_cm0bev",propsAsIs:!1}),Ji=d.styled_default("div")({name:"Content",class:"Content_ce7x737",propsAsIs:!1}),Zi=d.styled_default("div")({name:"Title",class:"Title_tc2tor6",propsAsIs:!1}),er=d.styled_default("div")({name:"RulesList",class:"RulesList_r1k5klql",propsAsIs:!1}),tr=d.styled_default("div")({name:"RulesItem",class:"RulesItem_r1tf3ft2",propsAsIs:!1}),nr=d.styled_default("div")({name:"RuleIcon",class:"RuleIcon_rwpvg1k",propsAsIs:!1}),ir=d.styled_default("div")({name:"RuleText",class:"RuleText_rbxiag0",propsAsIs:!1}),rr=d.styled_default("button")({name:"TermsButton",class:"TermsButton_t6cyrry",propsAsIs:!1}),sr=({rules:a,rulesTitle:l,primaryColor:c})=>r.jsxs(Xi,{children:[r.jsxs(Ji,{children:[r.jsx(Zi,{children:l}),r.jsx(er,{children:a==null?void 0:a.map(({label:h,icon:y},m)=>r.jsxs(tr,{children:[y&&r.jsx(nr,{style:{backgroundColor:c},children:r.jsx(d.i1,{name:y,"data-icon":y})}),r.jsx(ir,{children:h})]},m))})]}),r.jsx(rr,{children:"See Terms and Conditions"})]}),or=d.styled_default("button")({name:"SButton",class:"SButton_s1nve60q",propsAsIs:!1}),ar=d.styled_default("span")({name:"ButtonLabel",class:"ButtonLabel_b1xoswwx",propsAsIs:!1}),_t=({disabled:a,variant:l="primary",onClick:c,children:h,...y})=>r.jsx(or,{onClick:c,disabled:a,"data-variant":l,...y,children:r.jsx(ar,{children:h})}),lr=d.styled_default("div")({name:"Container",class:"Container_c18uddbs",propsAsIs:!1}),cr=d.styled_default("div")({name:"Content",class:"Content_cvcfjf6",propsAsIs:!1}),ur=d.styled_default("div")({name:"OnboardingHeader",class:"OnboardingHeader_o1ie27lw",propsAsIs:!1}),dr=d.styled_default("button")({name:"CloseBtn",class:"CloseBtn_c15cjkwi",propsAsIs:!1}),hr=()=>d.i1,pr=d.styled_default(hr())({name:"IconClose",class:"IconClose_i1mavjt2",propsAsIs:!0}),fr=d.styled_default("div")({name:"OnboardingFooter",class:"OnboardingFooter_o1x0dyzv",propsAsIs:!1}),mr=()=>_t,yr=d.styled_default(mr())({name:"OnboardingActionBtn",class:"OnboardingActionBtn_o1jfi9c3",propsAsIs:!0}),oe={steps:!1,rules:!1,inviteCard:!1},xr=({gamification:a,steps:l,rules:c,rulesBtnLabel:h,rulesTitle:y,primaryColor:m,inviteLink:f,socialLinks:s,inviteCardTitle:_,inviteCardSubtext:A,inviteCardBtnLabel:g,onClose:j})=>{const[x,w]=F.useState(0),[B,b]=F.useState(oe);F.useEffect(()=>{l!=null&&l.length?b({...oe,steps:!0}):c!=null&&c.length?b({...oe,rules:!0}):b({...oe,inviteCard:!0})},[]);const k=F.useMemo(()=>B.steps&&x===0?"Continue":B.rules?h||"Got it":B.inviteCard?g||"Play Now":"Next",[B,x,h,g]),E=F.useCallback(()=>{l!=null&&l.length&&x<l.length-1?w(R=>++R):c!=null&&c.length&&B.steps?b({...oe,rules:!0}):B.rules&&b({...oe,inviteCard:!0})},[x,l==null?void 0:l.length,c==null?void 0:c.length,B,w,b]),C=async()=>{await a.onboardingStatus.submitInplay()};return r.jsx(ke,{children:({width:R,height:Q})=>r.jsxs(lr,{style:{width:R,height:Q},children:[r.jsx(ur,{children:r.jsx(dr,{onClick:j,children:r.jsx(pr,{name:"icon-close-btn-gray"})})}),r.jsxs(cr,{children:[B.steps&&(l==null?void 0:l.length)&&r.jsx(ki,{stepsCount:l.length,currentStep:x,...l[x]}),B.rules&&r.jsx(sr,{rules:c,rulesTitle:y,primaryColor:m}),B.inviteCard&&r.jsx(xt,{inviteLink:f,inviteCardTitle:_,inviteCardSubtext:A,primaryColor:m,socialLinks:s})]}),r.jsx(fr,{children:r.jsx(yr,{onClick:B.inviteCard?C:E,children:k})})]})})},_r=d.styled_default("div")({name:"Container",class:"Container_c1pgyo67",propsAsIs:!1}),gr="HidingAnimation_hx17qu6",Ne=({children:a,style:l,className:c,hiding:h})=>r.jsx(_r,{style:l,className:d.cx_default(c,h&&gr),children:a}),wr=d.styled_default("div")({name:"Container",class:"Container_cocfo2g",propsAsIs:!1}),Ir=d.styled_default("div")({name:"CloseIconWrap",class:"CloseIconWrap_c1pdhxdk",propsAsIs:!1}),Ar=()=>d.i1,Br=d.styled_default(Ar())({name:"CloseIcon",class:"CloseIcon_c1funj3r",propsAsIs:!0}),br=d.styled_default("div")({name:"Title",class:"Title_t1okg06y",propsAsIs:!1}),Er=d.styled_default("img")({name:"SponsorLogo",class:"SponsorLogo_sb1n923",propsAsIs:!1}),jr=d.styled_default("div")({name:"PresentsTitle",class:"PresentsTitle_p1stllxd",propsAsIs:!1}),vr=d.styled_default("div")({name:"Subtitle",class:"Subtitle_s13kvdzw",propsAsIs:!1}),Cr=d.styled_default("div")({name:"Description",class:"Description_dfvmv3t",propsAsIs:!1}),Tr=d.styled_default("button")({name:"ActionButton",class:"ActionButton_ay8e3j9",propsAsIs:!1}),Fr=({close:a,action:l,onboarding:c})=>{var h,y,m,f,s,_,A,g;return r.jsxs(wr,{children:[r.jsx(Ir,{onClick:a,children:r.jsx(Br,{name:"icon-cross"})}),((y=(h=c==null?void 0:c.titleCard)==null?void 0:h.media)==null?void 0:y.sponsorLogo)&&r.jsxs(br,{children:[r.jsx(Er,{alt:"sponsor-logo",src:(f=(m=c==null?void 0:c.titleCard)==null?void 0:m.media)==null?void 0:f.sponsorLogo}),r.jsx(jr,{children:"PRESENTS"})]}),((s=c==null?void 0:c.titleCard)==null?void 0:s.title)&&r.jsx(vr,{children:(_=c==null?void 0:c.titleCard)==null?void 0:_.title}),((A=c==null?void 0:c.titleCard)==null?void 0:A.subtitle)&&r.jsx(Cr,{children:(g=c==null?void 0:c.titleCard)==null?void 0:g.subtitle}),r.jsx(Tr,{onClick:l,children:"Play Now"})]})},Sr=()=>Ne,Lr=d.styled_default(Sr())({name:"OnboardingContainer",class:"OnboardingContainer_o9squag",propsAsIs:!0}),$r=({hiding:a,deepLink:l,onboardingOpts:c,setOpened:h,notification:y,gamification:m})=>{var f,s,_,A,g,j;const{data:x}=J.useStore(l.$store);return r.jsx(Lr,{hiding:a,children:r.jsx(xr,{rules:[{label:"Answer as many questions as you like.",icon:"icon-btn-feature-groups"},{label:"Win points for each correct trivia or prediction answer.",icon:"icon-thumb-up"},{label:"Top the leader board and best your friends.",icon:"icon-trophy"}],rulesBtnLabel:(f=c.rules)==null?void 0:f.buttonLabel,rulesTitle:(s=c.rules)==null?void 0:s.heading,steps:[{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_01.json",headline:"Welcome to the Featured Groups +"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_02.json",headline:"Get real-time insights"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_03.json",headline:"Predictions, trivia & polls synced to match play"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_04.json",headline:"Win points for every answer you get right"},{graphicSrc:"https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/step_05.json",headline:"Compete against friends on the leaderboard"}],primaryColor:(_=c.inviteCard)==null?void 0:_.iconColor,inviteLink:x==null?void 0:x.url,inviteCardTitle:(A=c.inviteCard)==null?void 0:A.heading,inviteCardSubtext:(g=c.inviteCard)==null?void 0:g.subtext,inviteCardBtnLabel:(j=c.inviteCard)==null?void 0:j.buttonLabel,onClose:()=>{var w;h(!1),(w=y.close)==null||w.call(y)},socialLinks:[{icon:"icon-facebook",link:"https://www.facebook.com/TheMasters",label:"Facebook"},{icon:"icon-twitter",link:"https://twitter.com/@TheMasters",label:"X"}],gamification:m})})},kr=({sdk:a,hiding:l,notification:c,NotificationContainer:h})=>{const[y,m]=F.useState(!1),f=a.getFeature(U.FeatureType.GAMES),s=c.data.onboarding;return y&&f&&s?r.jsx($r,{notification:c,setOpened:m,gamification:f,onboardingOpts:s,deepLink:f.deepLink}):r.jsx(h,{hiding:l,children:r.jsx("div",{children:r.jsx(Fr,{close:c.close,action:()=>m(!0),onboarding:s})})})},Nr=()=>Ne,je=d.styled_default(Nr())({name:"Container",class:"Container_ctckejh",propsAsIs:!0}),Rr=({sdk:a})=>{const l=a.getNotificationsStore(),c=J.useStore(l),h=F.useMemo(()=>{if(!(c!=null&&c.size))return null;for(const y of c.values())if(y.type===fe.NotificationType.ONBOARDING)return y;return c.values().next().value},[c]);return(h==null?void 0:h.type)===fe.NotificationType.QUESTION?r.jsx(je,{hiding:h.hiding,children:r.jsx("div",{children:r.jsx(rt,{...h})})}):(h==null?void 0:h.type)===fe.NotificationType.QUESTION_RESOLVED?r.jsx(je,{hiding:h.hiding,children:r.jsx("div",{children:r.jsx(rt,{...h})})}):(h==null?void 0:h.type)===fe.NotificationType.ONBOARDING?r.jsx(kr,{NotificationContainer:je,sdk:a,notification:h,hiding:h.hiding}):null},Ur=d.styled_default("div")({name:"SDKContainer",class:"SDKContainer_stu11h7",propsAsIs:!1}),Se=d.styled_default("div")({name:"SDKScrollContainer",class:"SDKScrollContainer_s1ucohr1",propsAsIs:!1}),gt=d.styled_default("div")({name:"SDKContentContainer",class:"SDKContentContainer_s1el4wvm",propsAsIs:!1}),zr=()=>gt,Or=d.styled_default(zr())({name:"SDKWhiteContainer",class:"SDKWhiteContainer_s1oe3036",propsAsIs:!0}),Dr=a=>{const[l,c]=F.useState(!1),h=J.useStore(a.status),{data:y}=J.useStore(a.getUserStore()),m=h==="ready",[f,s]=F.useState(X),_=F.useCallback((A,g)=>{s(g),g===X?(A&&a.createEventSession(A),a.openFeature(U.FeatureType.GAMES)):a.closeFeature()},[a]);return F.useEffect(()=>{!m&&f===X&&(s(he),a.closeFeature())},[m,f,a]),{sdkEnabled:l,sdkReady:m,activeOverlay:f,activateAndLoadOverlay:_,enableSdk:A=>{a.initializeApp().then(({enabled:g,err:j})=>{if(c(!0),j){_(A,he);return}if(g){_(A,X);return}})},disableSdk:()=>{c(!1),a.disableApp()},isLogged:!!y}},Pr=a=>{const l=J.useStore(a.getActiveFeature()),c=J.useStore(a.streamStore()),[h,y]=F.useState(null);return F.useEffect(()=>{const m=a.getFeatures();if(l)for(const[f,s]of m)f===l?s.status.get()===ue.FeatureStatus.Suspended&&(s.enable(),y(s)):s.status.get()===ue.FeatureStatus.Ready&&s.disable();else{for(const[,f]of m)f.status.get()===ue.FeatureStatus.Ready&&f.disable();y(null)}return()=>{for(const[,f]of m)f.status.get()===ue.FeatureStatus.Ready&&f.disable()}},[l,a,c]),[l,h]},Gr=({sdk:a,className:l})=>{const[,c]=Pr(a);return r.jsx(Pt,{className:l,feature:c,sdk:a})},Mr=({sdk:a,overlays:l,children:c})=>{const{sdkEnabled:h,sdkReady:y,activeOverlay:m,activateAndLoadOverlay:f,enableSdk:s,disableSdk:_,isLogged:A}=Dr(a);return r.jsxs(Ur,{children:[h&&r.jsx(sn,{sdkReady:y,activeOverlay:m,className:ae.c,setActiveOverlay:g=>f("",g)}),h&&r.jsx(Rr,{sdk:a}),r.jsx(Se,{"data-nav":h.toString(),style:{display:!h||m===he?"block":"none"},children:c&&c({enableSdk:s,disableSdk:_})}),r.jsx(Se,{"data-nav":h.toString(),style:{display:m===xe?"block":"none"},children:l&&m===xe&&l[m]}),A&&h&&m===X&&r.jsx(Gr,{className:ae.c,sdk:a}),!A&&h&&m===X&&r.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"},children:"You are not logged in."})]})};const qr=({sdkKey:a,plugins:l,children:c,production:h=!0})=>r.jsx(ae.StreamLayerProvider,{sdkKey:a,plugins:l,production:h,autoEnable:!1,children:c}),Wr=({children:a,overlays:l})=>{const{sdk:c,status:h}=F.useContext(ae.StreamLayerContext);if(h===ae.StreamLayerStatus.UNSET)throw new Error("Wrap app in `StreamLayerProvider`");return c?r.jsx("div",{className:"StreamLayerSDK",children:r.jsx(ae.s,{style:{height:"100%"},children:r.jsx(Mr,{sdk:c,overlays:l,children:a})})}):a({})};exports.AutoSizer=ke;exports.MastersStreamLayerProvider=qr;exports.MastersStreamLayerSDKReact=Wr;exports.O=xt;exports.a=Or;exports.c=_t;exports.o=lt;exports.r=Se;exports.s=gt;exports.w=ct;exports.x=Ne;
File without changes
File without changes
File without changes
File without changes