@streamlayer/react 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cjs/advertisement.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("react"),o=require("./index2.js"),m=require("./app.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("react"),o=require("./index2.js"),m=require("./app.js"),i=require("./useStreamLayerApp2.js"),q=o.styled_default("div")({name:"Container",class:"c5b6wdg",propsAsIs:!1}),R="a1rlj479",D="s35f1di",G="sj4471g",w="b12050d8",O="b1d5ybek",U=e=>e==="left"||e==="right"?D:w,F=e=>e==="left"||e==="right"?G:O,K=e=>e==="left"?"avdxyl3":e==="right"?"a1bisd08":e==="top"?"a1u9y2aj":"a1qqaks",N=({children:e,style:t,className:a,enabled:n=!0,hiding:l,direction:d="left",onAnimationEnd:r})=>s.jsx(q,{style:t,className:o.cx_default(a,R,K(d),n&&!l&&U(d),n&&l&&F(d)),onAnimationEnd:r,children:e}),z=o.styled_default("div")({name:"BannerContainer",class:"bipmch2",propsAsIs:!1}),H=o.styled_default("img")({name:"BannerImg",class:"bpkcihp",propsAsIs:!1}),W=({promotion:e,hiding:t,direction:a="bottom"})=>{var n;return(n=e.additionalBanner)!=null&&n.imageUrl?s.jsx(N,{direction:a,hiding:t,children:s.jsx(z,{children:s.jsx(H,{src:e.additionalBanner.imageUrl,alt:"promo"})})}):null},J=o.styled_default("div")({name:"Header",class:"hkzhq2w",propsAsIs:!1}),Q=o.styled_default("div")({name:"HeaderContent",class:"hmgz5i",propsAsIs:!1}),T=o.styled_default("img")({name:"SponsorLogo",class:"syxi3jt",propsAsIs:!1}),V=o.styled_default("div")({name:"SponsorName",class:"s149e3gp",propsAsIs:!1}),X=o.styled_default("div")({name:"PromoOverlay",class:"p10toh7",propsAsIs:!1}),Y=o.styled_default("div")({name:"Media",class:"m1jyea6t",propsAsIs:!1}),Z=o.styled_default("div")({name:"Text",class:"tzpfa3h",propsAsIs:!1}),ee=o.styled_default("div")({name:"Description",class:"d1crmu01",propsAsIs:!1}),se=o.styled_default("div")({name:"SponsorText",class:"s1l37r8s",propsAsIs:!1}),oe=o.styled_default("div")({name:"ADLogo",class:"a1nmch9k",propsAsIs:!1}),ne=o.styled_default("span")({name:"SponsoredText",class:"s1er0ljd",propsAsIs:!1}),le=o.styled_default("div")({name:"CloseIconWrap",class:"cydopmr",propsAsIs:!1}),te=()=>o.c1,ae=o.styled_default(te())({name:"CloseIcon",class:"c1w6nt04",propsAsIs:!0}),de=o.styled_default("div")({name:"Content",class:"c1evcmtq",propsAsIs:!1}),ie=o.styled_default("div")({name:"ActionBtnWrap",class:"awodx0x",propsAsIs:!1}),re=o.styled_default("a")({name:"ActionButton",class:"a1q3n6oi",propsAsIs:!1}),ce=o.styled_default("img")({name:"PromoImg",class:"p8d4xfk",propsAsIs:!1}),ue=o.styled_default("div")({name:"Title",class:"tt6oobh",propsAsIs:!1}),P=({promotion:e,onClose:t,inSidebar:a})=>{var n,l,d,r,c,y,v,h,g,x,b,A,f,j,I,_,S,$,M,L,k,B,C,E;const u=e.type===i.PromotionType.INGAME_IAB11_LBAR||e.type===i.PromotionType.INGAME_IAB11;return s.jsxs(X,{className:"PromoOverlay",style:{...a?{}:{backgroundColor:"#1E3344"}},children:[s.jsxs(J,{children:[s.jsxs(Q,{children:[((n=e.sponsor)==null?void 0:n.logo)&&e.logoMode===i.PromotionLogoMode.LEFT&&s.jsx(T,{src:(l=e.sponsor)==null?void 0:l.logo,alt:"promo"}),s.jsxs("div",{style:{paddingLeft:(d=e.sponsor)!=null&&d.logo&&e.logoMode===i.PromotionLogoMode.LEFT?"0px":"8px"},children:[((r=e.sponsor)==null?void 0:r.logo)&&e.logoMode===i.PromotionLogoMode.LEFT&&s.jsx(V,{children:(c=e.sponsor)==null?void 0:c.name}),s.jsxs(se,{children:[s.jsx(oe,{children:"AD"}),s.jsx(ne,{children:"SPONSORED"})]})]})]}),s.jsx(le,{onClick:t,children:s.jsx(ae,{name:"icon-cross"})})]}),s.jsxs(Y,{children:[((y=e.sponsor)==null?void 0:y.logo)&&e.logoMode===i.PromotionLogoMode.CENTER&&s.jsx(T,{src:(v=e.sponsor)==null?void 0:v.logo,alt:"promo"}),s.jsxs(de,{children:[(g=(h=e.banner)==null?void 0:h.video)!=null&&g.url?s.jsx(o.K,{source:(b=(x=e.banner)==null?void 0:x.video)==null?void 0:b.url,poster:(f=(A=e.banner)==null?void 0:A.video)==null?void 0:f.thumbnailUrl,aspectRatio:u?"1/1":"16/9"}):(j=e.banner)!=null&&j.imageUrl?s.jsx(ce,{style:u?{width:"268px",height:"268px"}:{},src:(I=e.banner)==null?void 0:I.imageUrl,alt:"promo"}):null,!u&&s.jsxs(Z,{children:[s.jsx(ue,{children:(_=e.banner)==null?void 0:_.title}),s.jsx(ee,{children:(S=e.banner)==null?void 0:S.body})]})]}),s.jsx(ie,{children:s.jsx(re,{href:($=e.banner)==null?void 0:$.url,style:{backgroundColor:((L=(M=e.banner)==null?void 0:M.ctaButton)==null?void 0:L.color)||"#009dc4",color:((B=(k=e.banner)==null?void 0:k.ctaButton)==null?void 0:B.textColor)||"#fff"},target:"_blank",children:(E=(C=e.banner)==null?void 0:C.ctaButton)==null?void 0:E.label})})]})]})},pe=o.styled_default("div")({name:"SidebarContainer",class:"s1abskp8",propsAsIs:!1}),me=({children:e,direction:t,style:a,className:n,hiding:l})=>s.jsx(N,{direction:t,style:a,hiding:l,className:n,children:s.jsx(pe,{children:e})}),ye=e=>(e==null?void 0:e.type)===i.PromotionType.INGAME_IAB11_LBAR||(e==null?void 0:e.type)===i.PromotionType.INGAME_IAB21_LBAR,ve=e=>(e==null?void 0:e.type)===i.PromotionType.INGAME_IAB11||(e==null?void 0:e.type)===i.PromotionType.INGAME_IAB21,he=({advertisement:e,layoutMode:t="side-by-side",sidebar:a,banner:n})=>{const l=o.useStore(e.data);return!l.data&&l.loading?null:l.error?s.jsxs("div",{children:["error ",s.jsx("button",{onClick:e.close,children:"close"})]}):l.data?!a&&!n&&ve(l.data)?s.jsx(P,{promotion:l.data,onClose:e.close}):a&&ye(l.data)?s.jsx(me,{direction:a,hiding:e.hiding,children:s.jsx(P,{promotion:l.data,onClose:e.close,inSidebar:!0})}):n?s.jsx(W,{hiding:e.hiding,promotion:l.data,direction:n}):null:s.jsxs("div",{children:["empty promo ",s.jsx("button",{onClick:e.close,children:"close"})]})},ge=o.styled_default("div")({name:"AdvertisementUIWrap",class:"aa6pjif",propsAsIs:!1}),xe=e=>{const t=e.target;t instanceof HTMLAnchorElement&&t.target==="_blank"&&t.getAttribute("data-analytics")==="web-link"&&o.eventBus.emit("poll",{action:"navigated",payload:{}})},be=({gamification:e,layoutMode:t,sidebar:a,banner:n})=>{const l=p.useRef(null),d=o.useStore(e.advertisement.$list),r=p.useMemo(()=>e.advertisement.getActiveAdvertisement(),[d]);return o.L(l,{enabled:!!r,event:"click",listener:xe}),r?s.jsx(ge,{ref:l,style:{height:!n&&!a?"auto":"100%"},children:s.jsx(he,{sidebar:a,banner:n,advertisement:r,layoutMode:t})}):null},Ae=({sdk:e,sidebar:t,banner:a,event:n,layoutMode:l})=>{const{deactivate:d}=m.F(e);p.useEffect(()=>{n?e.createEventSession(n):d()},[n,d,e]);const r=o.useStore(e.featuresList.getStore());if(t&&a)return s.jsx("div",{style:{color:"red"},children:"define either sidebar or banner, not both."});if(!r)return null;const c=e.getFeature(i.SdkOverlayType.GAMES);return c?s.jsx(be,{gamification:c,sidebar:t,banner:a,layoutMode:l}):null},fe=({event:e,sidebar:t,banner:a})=>{const n=m.useStreamLayer();return n?s.jsx("div",{className:"StreamLayerSDK",children:s.jsx(m.i,{children:s.jsx(Ae,{sdk:n,event:e,sidebar:t,banner:a,layoutMode:"side-by-side"})})}):null};exports.StreamLayerSDKAdvertisement=fe;
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
`),c=`
|
|
15
15
|
`+n+(r.length?s("│"):" ")+" ";return n+o.join(c)+`
|
|
16
16
|
`+r.map(function(l,m){var u=m===r.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 t_=e_,To=Symbol("avvio.TimeTree.untrackNode"),Sa=Symbol("avvio.TimeTree.trackNode"),yo=Symbol("avvio.TimeTree.getParent"),go=Symbol("avvio.TimeTree.getNode"),fo=Symbol("avvio.TimeTree.addNode");let n_=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[Sa](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])}[To](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)}[yo](e){if(e===null)return this.root;const t=this.tableLabel.get(e);return t.id?t:t[t.length-1]}[go](e){return this.tableId.get(e)}[fo](e,t,n){if(e===null)return this.root={id:"root",label:t,start:n,nodes:[]},this[Sa](this.root),this.root.id;const a=this[yo](e),s=`${t}-${Math.random()}`,r={id:s,parent:e,start:n,label:t,nodes:[]};return a.nodes.push(r),this[Sa](r),s}start(e,t,n=Date.now()){return this[fo](e,t,n)}stop(e,t=Date.now()){const n=this[go](e);n&&(n.stop=t,n.diff=n.stop-n.start||0,this[To](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_(t)}};var a_=n_,Ms={exports:{}},Xa={exports:{}},_a,ko;function s_(){if(ko)return _a;ko=1;var e=1e3,t=e*60,n=t*60,a=n*24,s=a*7,r=a*365.25;_a=function(u,d){d=d||{};var y=typeof u;if(y==="string"&&u.length>0)return o(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 o(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*r;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 _a}function r_(e){n.debug=n,n.default=n,n.coerce=l,n.disable=r,n.enable=s,n.enabled=o,n.humanize=s_(),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 _(...v){if(!_.enabled)return;const I=_,E=Number(new Date),R=E-(d||E);I.diff=R,I.prev=d,I.curr=E,d=E,v[0]=n.coerce(v[0]),typeof v[0]!="string"&&v.unshift("%O");let O=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(N,L)=>{if(N==="%%")return"%";O++;const A=n.formatters[L];if(typeof A=="function"){const C=v[O];N=A.call(I,C),v.splice(O,1),O--}return N}),n.formatArgs.call(I,v),(I.log||n.log).apply(I,v)}return _.namespace=u,_.useColors=n.useColors(),_.color=n.selectColor(u),_.extend=a,_.destroy=n.destroy,Object.defineProperty(_,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(T!==n.namespaces&&(T=n.namespaces,f=n.enabled(u)),f),set:v=>{y=v}}),typeof n.init=="function"&&n.init(_),_}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 r(){const u=[...n.names.map(c),...n.skips.map(c).map(d=>"-"+d)].join(",");return n.enable(""),u}function o(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_=r_;(function(e,t){t.formatArgs=a,t.save=s,t.load=r,t.useColors=n,t.storage=o(),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 r(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof P<"u"&&"env"in P&&(l=P.env.DEBUG),l}function o(){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}}})(Xa,Xa.exports);var Ec=Xa.exports;const i_=Ki,c_=sc.EventEmitter,l_=jn.inherits,ce=Ec("avvio"),{AVV_ERR_READY_TIMEOUT:m_}=_c,Ea=Symbol.for("plugin-meta");function u_(e,t){return e[Ea]&&e[Ea].name?e[Ea].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 d_(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function Ut(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=u_(t,n),this.isAfter=a,this.q=i_(e,p_,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}l_(Ut,c_);Ut.prototype.exec=function(e,t){const n=this.func;let a=!1;const s=this.name;if(this.parent._error&&!this.isAfter){ce("skipping loading of plugin as parent errored and it is not an after",s),P.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(l){return ce("override errored",s),t(l)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,ce("exec",s);let r;const o=l=>{if(a){ce("loading complete",s);return}this._error=l,ce(l?"exec errored":"exec completed",s),a=!0,r&&clearTimeout(r),t(l)};this.timeout>0&&(ce("setting up timeout",s,this.timeout),r=setTimeout(function(){ce("timed out",s),r=null;const l=new m_(s);l.fn=n,o(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,o);c&&typeof c.then=="function"&&(ce("exec: resolving promise",s),c.then(()=>P.nextTick(o),l=>P.nextTick(o,l)))};Ut.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(ce("rejecting promise",this.name,n),this._promise.reject(n)):(ce("resolving promise",this.name),this._promise.resolve()),this._promise=null,P.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=d_(),t=this._promise.promise,this.server?e():this.on("start",e)),t};Ut.prototype.enqueue=function(e,t){ce("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};Ut.prototype.finish=function(e,t){ce("finish",this.name,e);const n=()=>{this.loaded||(ce("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(ce("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const s=()=>{ce("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(s,s),this._promise=null}else n();else ce("delayed",this.name),this.q.drain=()=>{ce("drain",this.name),this.q.drain=T_,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function p_(e,t){const n=this;P.nextTick(Ps.bind(n),e,t)}function Ps(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,Ps.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 T_(){}Ms.exports=Ut;Ms.exports.loadPlugin=Ps;var y_=Ms.exports;const ho=Ki,g_=sc.EventEmitter,f_=jn.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:ba,AVV_ERR_CALLBACK_NOT_FN:Yt,AVV_ERR_PLUGIN_NOT_VALID:k_,AVV_ERR_ROOT_PLG_BOOTED:h_,AVV_ERR_READY_TIMEOUT:S_}=_c,__=a_,Za=y_,Pt=Ec("avvio"),Fn=Symbol("kAvvio"),Ia=Symbol("kThenifyDoNotWrap");function E_(e,t,n){const a=t.expose||{},s=a.use||"use",r=a.after||"after",o=a.ready||"ready",c=a.onClose||"onClose",l=a.close||"close";if(e[s])throw new ba(s);if(e[r])throw new ba(r);if(e[o])throw new ba(o);e[s]=function(m,u){return n.use(m,u),this},Object.defineProperty(e,"then",{get:bc.bind(n)}),e[Fn]=!0,e[r]=function(m){return typeof m!="function"?n._loadRegistered():(n.after(Na(m,this)),this)},e[o]=function(m){if(m&&typeof m!="function")throw new Yt(o,typeof m);return n.ready(m?Na(m,this):void 0)},e[c]=function(m){if(typeof m!="function")throw new Yt(c,typeof m);return n.onClose(O_(m,this)),this},e[l]=function(m){if(m&&typeof m!="function")throw new Yt(l,typeof m);return m?(n.close(Na(m,this)),this):n.close()}}function re(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 re)){const a=new re(e,t,n);return e&&E_(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 __,this._readyQ=ho(this,Ic,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=So},this._closeQ=ho(this,v_,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=So},this._doStart=null,this._root=new Za(this,b_.bind(this),t,!1,0),this._root.once("start",(a,s,r)=>{const o=this.pluginTree.start(null,s,r);this._root.once("loaded",(c,l,m)=>{this.pluginTree.stop(o,m)})}),Za.loadPlugin.call(this,this._root,a=>{Pt("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 b_(e,t,n){this._doStart=n,t.autostart&&this.start()}f_(re,g_);re.prototype.start=function(){return this.started=!0,P.nextTick(this._doStart),this};re.prototype.override=function(e,t,n){return e};function I_(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new k_(typeof e);return e}re.prototype[Fn]=!0;re.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};re.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&P.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(re.prototype,"then",{get:bc});re.prototype._addPlugin=function(e,t,n){if(e=I_(e),t=t||{},this.booted)throw new h_;const a=this._current[0],s=new Za(this,e,t,n);if(s.once("start",(r,o,c)=>{const l=this.pluginTree.start(a.name,o,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,r=>{r&&(this._error=r)}),s};re.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,s){Ic.call(this,e,s)}return this};re.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};re.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new Yt("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),P.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};re.prototype.ready=function(e){if(e){if(typeof e!="function")throw new Yt("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(r,o,c){r?n(r):t(a),P.nextTick(c)}})};re.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};re.prototype.toJSON=function(){return this.pluginTree.toJSON()};function So(){}function bc(){if(this.booted){Pt("thenify returning null because we are already booted");return}if(this[Ia]){this[Ia]=!1;return}return Pt("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Ia]=!0,e(this._server)),t)}function Ic(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[Fn]&&typeof s.then=="function"?s.then(()=>P.nextTick(t),r=>P.nextTick(t,r)):P.nextTick(t);else if(e.length===1)s=e(a),s&&!s[Fn]&&typeof s.then=="function"?s.then(()=>P.nextTick(t),r=>P.nextTick(t,r)):P.nextTick(t);else if(this._timeout===0){const r=o=>{this._error=o,t(this._error)};e.length===2?e(a,r):e(a,n,r)}else N_.call(this,e,a,n,t)}function N_(e,t,n,a){const s=e.name;Pt("setting up ready timeout",s,this._timeout);let r=setTimeout(()=>{Pt("timed out",s),r=null;const c=new S_(s);c.fn=e,this._error=c,a(c)},this._timeout);e.length===2?e(t,o.bind(this)):e(t,n,o.bind(this));function o(c){r&&(clearTimeout(r),this._error=c,a(this._error))}}function v_(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"?(Pt("resolving close/onClose promise"),s.then(()=>P.nextTick(t),r=>P.nextTick(t,r))):P.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function O_(e,t){return n.bind(t);function n(a,s){let r;e.length===0?(r=e(),r&&r.then?r.then(function(){P.nextTick(s)},s):P.nextTick(s)):e.length===1?(r=e(this),r&&r.then?r.then(function(){P.nextTick(s)},s):P.nextTick(s)):e(this,s)}}function Na(e,t){return n.bind(t);function n(a,s){let r;e?e.length===0?(r=e(),r&&r.then?r.then(function(){P.nextTick(s,a)},s):P.nextTick(s,a)):e.length===1?(r=e(a),r&&r.then?r.then(function(){P.nextTick(s)},s):P.nextTick(s)):e.length===2?e(a,s):e(a,this,s):P.nextTick(s)}}_s.exports=re;_s.exports.express=function(e){return re(e,{expose:{use:"load"}})};var A_=_s.exports;const w_=ah(A_);(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(),r=Math.max(0,16-(s-t)),o=window.setTimeout(function(){a(s+r)},r);return t=s+r,o},window.cancelAnimationFrame=clearTimeout}})();function R_(e,t=!0,n=!0,a){const s=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",r=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",o=w_(Object.create({}),{autostart:!1});return o.use(Dk),o.use(Rk,{onDeepLinkHandled:a==null?void 0:a.onDeepLinkHandled}),o.use(Ck,{videoPlayerController:a==null?void 0:a.videoPlayerController}),o.use(Xf,{sdkKey:e,host:s,analyticsHost:r,version:a==null?void 0:a.version}),o.use(ak),o.use(Pk),o.use(Wk),o.use(Sk),o.use(nh),o.after((c,l,m)=>{if(c)throw c;l.ready(),m()}),n&&o.after(async(c,l,m)=>{if(c)throw c;await l.sdk.initializeApp(),m()}),o.onClose(()=>{console.log("close")}),o}const L_=({sdkKey:e,plugins:t,production:n,autoEnable:a,onDeepLinkHandled:s,videoPlayerController:r})=>{const[o,c]=Ds.useState(null);return Ds.useEffect(()=>{let l=!1;if(!e)return console.error("streamlayer sdk key should be provided"),c(u=>(u!==null&&typeof u.disableApp=="function"&&u.disableApp(),null)),()=>{l=!0};const m=R_(e,n,a,{version:"1.1.2",onDeepLinkHandled:s,videoPlayerController:r});if(t)for(const u of t)m.use(u);return m.ready().then(u=>{l||(c(u.sdk),typeof window<"u")}).catch(u=>console.log(u)),()=>{l=!0,m.close(function(u){if(u)throw u})}},[e,n]),o};exports.InvitationFrom=An;exports.PickHistoryStatus=Et;exports.PromotionLogoMode=Ko;exports.PromotionType=Wo;exports.QuestionImages=nt;exports.QuestionStatus=le;exports.QuestionType=F;exports.SdkOverlayType=q;exports.createContextKey=Ua;exports.global=Fa;exports.pino_1=Oo;exports.useStreamLayerApp=L_;
|
|
17
|
+
`).slice(0,2).map(n=>n.trim()).join(" -- ")}function d_(){const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e}function Ut(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=u_(t,n),this.isAfter=a,this.q=i_(e,p_,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}l_(Ut,c_);Ut.prototype.exec=function(e,t){const n=this.func;let a=!1;const s=this.name;if(this.parent._error&&!this.isAfter){ce("skipping loading of plugin as parent errored and it is not an after",s),P.nextTick(t);return}if(this.isAfter)this.server=e;else try{this.server=this.parent.override(e,n,this.opts)}catch(l){return ce("override errored",s),t(l)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,ce("exec",s);let r;const o=l=>{if(a){ce("loading complete",s);return}this._error=l,ce(l?"exec errored":"exec completed",s),a=!0,r&&clearTimeout(r),t(l)};this.timeout>0&&(ce("setting up timeout",s,this.timeout),r=setTimeout(function(){ce("timed out",s),r=null;const l=new m_(s);l.fn=n,o(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,o);c&&typeof c.then=="function"&&(ce("exec: resolving promise",s),c.then(()=>P.nextTick(o),l=>P.nextTick(o,l)))};Ut.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const e=()=>{this.server.after((n,a)=>{this._error=n,this.q.pause(),n?(ce("rejecting promise",this.name,n),this._promise.reject(n)):(ce("resolving promise",this.name),this._promise.resolve()),this._promise=null,P.nextTick(a,n)}),this.q.resume()};let t;return this._promise?t=Promise.resolve():(this._promise=d_(),t=this._promise.promise,this.server?e():this.on("start",e)),t};Ut.prototype.enqueue=function(e,t){ce("enqueue",this.name,e.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(e,t)};Ut.prototype.finish=function(e,t){ce("finish",this.name,e);const n=()=>{this.loaded||(ce("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(ce("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const s=()=>{ce("wrap"),queueMicrotask(a)};this._promise.resolve(),this._promise.promise.then(s,s),this._promise=null}else n();else ce("delayed",this.name),this.q.drain=()=>{ce("drain",this.name),this.q.drain=T_,queueMicrotask(a)}};queueMicrotask(a),this.q.resume()};function p_(e,t){const n=this;P.nextTick(Ps.bind(n),e,t)}function Ps(e,t){if(typeof e.func.then=="function"){e.func.then(a=>{typeof a.default=="function"&&(a=a.default),e.func=a,Ps.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 T_(){}Ms.exports=Ut;Ms.exports.loadPlugin=Ps;var y_=Ms.exports;const ho=Ki,g_=sc.EventEmitter,f_=jn.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:ba,AVV_ERR_CALLBACK_NOT_FN:Yt,AVV_ERR_PLUGIN_NOT_VALID:k_,AVV_ERR_ROOT_PLG_BOOTED:h_,AVV_ERR_READY_TIMEOUT:S_}=_c,__=a_,Za=y_,Pt=Ec("avvio"),Fn=Symbol("kAvvio"),Ia=Symbol("kThenifyDoNotWrap");function E_(e,t,n){const a=t.expose||{},s=a.use||"use",r=a.after||"after",o=a.ready||"ready",c=a.onClose||"onClose",l=a.close||"close";if(e[s])throw new ba(s);if(e[r])throw new ba(r);if(e[o])throw new ba(o);e[s]=function(m,u){return n.use(m,u),this},Object.defineProperty(e,"then",{get:bc.bind(n)}),e[Fn]=!0,e[r]=function(m){return typeof m!="function"?n._loadRegistered():(n.after(Na(m,this)),this)},e[o]=function(m){if(m&&typeof m!="function")throw new Yt(o,typeof m);return n.ready(m?Na(m,this):void 0)},e[c]=function(m){if(typeof m!="function")throw new Yt(c,typeof m);return n.onClose(O_(m,this)),this},e[l]=function(m){if(m&&typeof m!="function")throw new Yt(l,typeof m);return m?(n.close(Na(m,this)),this):n.close()}}function re(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 re)){const a=new re(e,t,n);return e&&E_(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 __,this._readyQ=ho(this,Ic,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=So},this._closeQ=ho(this,v_,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=So},this._doStart=null,this._root=new Za(this,b_.bind(this),t,!1,0),this._root.once("start",(a,s,r)=>{const o=this.pluginTree.start(null,s,r);this._root.once("loaded",(c,l,m)=>{this.pluginTree.stop(o,m)})}),Za.loadPlugin.call(this,this._root,a=>{Pt("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 b_(e,t,n){this._doStart=n,t.autostart&&this.start()}f_(re,g_);re.prototype.start=function(){return this.started=!0,P.nextTick(this._doStart),this};re.prototype.override=function(e,t,n){return e};function I_(e){if(e&&typeof e=="object"&&typeof e.default=="function"&&(e=e.default),!(e&&(typeof e=="function"||typeof e.then=="function")))throw new k_(typeof e);return e}re.prototype[Fn]=!0;re.prototype.use=function(e,t){return this._lastUsed=this._addPlugin(e,t,!1),this};re.prototype._loadRegistered=function(){const e=this._current[0];return!this.started&&!this.booted&&P.nextTick(()=>this._root.q.resume()),e?e.loadedSoFar():Promise.resolve()};Object.defineProperty(re.prototype,"then",{get:bc});re.prototype._addPlugin=function(e,t,n){if(e=I_(e),t=t||{},this.booted)throw new h_;const a=this._current[0],s=new Za(this,e,t,n);if(s.once("start",(r,o,c)=>{const l=this.pluginTree.start(a.name,o,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,r=>{r&&(this._error=r)}),s};re.prototype.after=function(e){if(!e)return this._loadRegistered();this._addPlugin(t.bind(this),{},!0);function t(n,a,s){Ic.call(this,e,s)}return this};re.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};re.prototype.close=function(e){let t;if(e){if(typeof e!="function")throw new Yt("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),P.nextTick(this._closeQ.resume.bind(this._closeQ))}),t};re.prototype.ready=function(e){if(e){if(typeof e!="function")throw new Yt("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(r,o,c){r?n(r):t(a),P.nextTick(c)}})};re.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};re.prototype.toJSON=function(){return this.pluginTree.toJSON()};function So(){}function bc(){if(this.booted){Pt("thenify returning null because we are already booted");return}if(this[Ia]){this[Ia]=!1;return}return Pt("thenify"),(e,t)=>this._loadRegistered().then(()=>(this[Ia]=!0,e(this._server)),t)}function Ic(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[Fn]&&typeof s.then=="function"?s.then(()=>P.nextTick(t),r=>P.nextTick(t,r)):P.nextTick(t);else if(e.length===1)s=e(a),s&&!s[Fn]&&typeof s.then=="function"?s.then(()=>P.nextTick(t),r=>P.nextTick(t,r)):P.nextTick(t);else if(this._timeout===0){const r=o=>{this._error=o,t(this._error)};e.length===2?e(a,r):e(a,n,r)}else N_.call(this,e,a,n,t)}function N_(e,t,n,a){const s=e.name;Pt("setting up ready timeout",s,this._timeout);let r=setTimeout(()=>{Pt("timed out",s),r=null;const c=new S_(s);c.fn=e,this._error=c,a(c)},this._timeout);e.length===2?e(t,o.bind(this)):e(t,n,o.bind(this));function o(c){r&&(clearTimeout(r),this._error=c,a(this._error))}}function v_(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"?(Pt("resolving close/onClose promise"),s.then(()=>P.nextTick(t),r=>P.nextTick(t,r))):P.nextTick(t)}else e.length===2?e(a?n:this._error,t):a?e(n,t):e(this._error,n,t)}function O_(e,t){return n.bind(t);function n(a,s){let r;e.length===0?(r=e(),r&&r.then?r.then(function(){P.nextTick(s)},s):P.nextTick(s)):e.length===1?(r=e(this),r&&r.then?r.then(function(){P.nextTick(s)},s):P.nextTick(s)):e(this,s)}}function Na(e,t){return n.bind(t);function n(a,s){let r;e?e.length===0?(r=e(),r&&r.then?r.then(function(){P.nextTick(s,a)},s):P.nextTick(s,a)):e.length===1?(r=e(a),r&&r.then?r.then(function(){P.nextTick(s)},s):P.nextTick(s)):e.length===2?e(a,s):e(a,this,s):P.nextTick(s)}}_s.exports=re;_s.exports.express=function(e){return re(e,{expose:{use:"load"}})};var A_=_s.exports;const w_=ah(A_);(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(),r=Math.max(0,16-(s-t)),o=window.setTimeout(function(){a(s+r)},r);return t=s+r,o},window.cancelAnimationFrame=clearTimeout}})();function R_(e,t=!0,n=!0,a){const s=t?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",r=t?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",o=w_(Object.create({}),{autostart:!1});return o.use(Dk),o.use(Rk,{onDeepLinkHandled:a==null?void 0:a.onDeepLinkHandled}),o.use(Ck,{videoPlayerController:a==null?void 0:a.videoPlayerController}),o.use(Xf,{sdkKey:e,host:s,analyticsHost:r,version:a==null?void 0:a.version}),o.use(ak),o.use(Pk),o.use(Wk),o.use(Sk),o.use(nh),o.after((c,l,m)=>{if(c)throw c;l.ready(),m()}),n&&o.after(async(c,l,m)=>{if(c)throw c;await l.sdk.initializeApp(),m()}),o.onClose(()=>{console.log("close")}),o}const L_=({sdkKey:e,plugins:t,production:n,autoEnable:a,onDeepLinkHandled:s,videoPlayerController:r})=>{const[o,c]=Ds.useState(null);return Ds.useEffect(()=>{let l=!1;if(!e)return console.error("streamlayer sdk key should be provided"),c(u=>(u!==null&&typeof u.disableApp=="function"&&u.disableApp(),null)),()=>{l=!0};const m=R_(e,n,a,{version:"1.1.3",onDeepLinkHandled:s,videoPlayerController:r});if(t)for(const u of t)m.use(u);return m.ready().then(u=>{l||(c(u.sdk),typeof window<"u")}).catch(u=>console.log(u)),()=>{l=!0,m.close(function(u){if(u)throw u})}},[e,n]),o};exports.InvitationFrom=An;exports.PickHistoryStatus=Et;exports.PromotionLogoMode=Ko;exports.PromotionType=Wo;exports.QuestionImages=nt;exports.QuestionStatus=le;exports.QuestionType=F;exports.SdkOverlayType=q;exports.createContextKey=Ua;exports.global=Fa;exports.pino_1=Oo;exports.useStreamLayerApp=L_;
|
package/lib/dist/cjs/masters.js
CHANGED
|
@@ -209,4 +209,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
209
209
|
`),y=`
|
|
210
210
|
`+o+(p.length?c("│"):" ")+" ";return o+m.join(y)+`
|
|
211
211
|
`+p.map(function(T,C){var _=C===p.length-1,N=T.nodes&&T.nodes.length,L=o+(_?" ":c("│"))+" ";return o+c(_?"└":"├")+c("─")+c(N?"┬":"─")+" "+n(T,L,l).slice(o.length+2)}).join("")};const uee=lee,DS=Symbol("avvio.TimeTree.untrackNode"),G5=Symbol("avvio.TimeTree.trackNode"),US=Symbol("avvio.TimeTree.getParent"),FS=Symbol("avvio.TimeTree.getNode"),VS=Symbol("avvio.TimeTree.addNode");let cee=class{constructor(){this.root=null,this.tableId=new Map,this.tableLabel=new Map}[G5](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])}[DS](n){this.tableId.delete(n.id);const r=this.tableLabel.get(n.label);if(r.id){this.tableLabel.delete(n.label);return}r.pop(),r.length===0&&this.tableLabel.delete(n.label)}[US](n){if(n===null)return this.root;const r=this.tableLabel.get(n);return r.id?r:r[r.length-1]}[FS](n){return this.tableId.get(n)}[VS](n,r,o){if(n===null)return this.root={id:"root",label:r,start:o,nodes:[]},this[G5](this.root),this.root.id;const l=this[US](n),c=`${r}-${Math.random()}`,p={id:c,parent:n,start:o,label:r,nodes:[]};return l.nodes.push(p),this[G5](p),c}start(n,r,o=Date.now()){return this[VS](n,r,o)}stop(n,r=Date.now()){const o=this[FS](n);o&&(o.stop=r,o.diff=o.stop-o.start||0,this[DS](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),r=n(this.toJSON());return uee(r)}};var dee=cee,ky={exports:{}},O9={exports:{}},W5,jS;function fee(){if(jS)return W5;jS=1;var n=1e3,r=n*60,o=r*60,l=o*24,c=l*7,p=l*365.25;W5=function(_,N){N=N||{};var L=typeof _;if(L==="string"&&_.length>0)return m(_);if(L==="number"&&isFinite(_))return N.long?T(_):y(_);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(_))};function m(_){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 L=parseFloat(N[1]),O=(N[2]||"ms").toLowerCase();switch(O){case"years":case"year":case"yrs":case"yr":case"y":return L*p;case"weeks":case"week":case"w":return L*c;case"days":case"day":case"d":return L*l;case"hours":case"hour":case"hrs":case"hr":case"h":return L*o;case"minutes":case"minute":case"mins":case"min":case"m":return L*r;case"seconds":case"second":case"secs":case"sec":case"s":return L*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return L;default:return}}}}function y(_){var N=Math.abs(_);return N>=l?Math.round(_/l)+"d":N>=o?Math.round(_/o)+"h":N>=r?Math.round(_/r)+"m":N>=n?Math.round(_/n)+"s":_+"ms"}function T(_){var N=Math.abs(_);return N>=l?C(_,N,l,"day"):N>=o?C(_,N,o,"hour"):N>=r?C(_,N,r,"minute"):N>=n?C(_,N,n,"second"):_+" ms"}function C(_,N,L,O){var D=N>=L*1.5;return Math.round(_/L)+" "+O+(D?"s":"")}return W5}function mee(n){o.debug=o,o.default=o,o.coerce=T,o.disable=p,o.enable=c,o.enabled=m,o.humanize=fee(),o.destroy=C,Object.keys(n).forEach(_=>{o[_]=n[_]}),o.names=[],o.skips=[],o.formatters={};function r(_){let N=0;for(let L=0;L<_.length;L++)N=(N<<5)-N+_.charCodeAt(L),N|=0;return o.colors[Math.abs(N)%o.colors.length]}o.selectColor=r;function o(_){let N,L=null,O,D;function F(...B){if(!F.enabled)return;const W=F,G=Number(new Date),te=G-(N||G);W.diff=te,W.prev=N,W.curr=G,N=G,B[0]=o.coerce(B[0]),typeof B[0]!="string"&&B.unshift("%O");let ne=0;B[0]=B[0].replace(/%([a-zA-Z%])/g,(ee,ce)=>{if(ee==="%%")return"%";ne++;const se=o.formatters[ce];if(typeof se=="function"){const Ne=B[ne];ee=se.call(W,Ne),B.splice(ne,1),ne--}return ee}),o.formatArgs.call(W,B),(W.log||o.log).apply(W,B)}return F.namespace=_,F.useColors=o.useColors(),F.color=o.selectColor(_),F.extend=l,F.destroy=o.destroy,Object.defineProperty(F,"enabled",{enumerable:!0,configurable:!1,get:()=>L!==null?L:(O!==o.namespaces&&(O=o.namespaces,D=o.enabled(_)),D),set:B=>{L=B}}),typeof o.init=="function"&&o.init(F),F}function l(_,N){const L=o(this.namespace+(typeof N>"u"?":":N)+_);return L.log=this.log,L}function c(_){o.save(_),o.namespaces=_,o.names=[],o.skips=[];let N;const L=(typeof _=="string"?_:"").split(/[\s,]+/),O=L.length;for(N=0;N<O;N++)L[N]&&(_=L[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 m(_){if(_[_.length-1]==="*")return!0;let N,L;for(N=0,L=o.skips.length;N<L;N++)if(o.skips[N].test(_))return!1;for(N=0,L=o.names.length;N<L;N++)if(o.names[N].test(_))return!0;return!1}function y(_){return _.toString().substring(2,_.toString().length-2).replace(/\.\*\?$/,"*")}function T(_){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 pee=mee;(function(n,r){r.formatArgs=l,r.save=c,r.load=p,r.useColors=o,r.storage=m(),r.destroy=(()=>{let T=!1;return()=>{T||(T=!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`."))}})(),r.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(T){if(T[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+T[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const C="color: "+this.color;T.splice(1,0,C,"color: inherit");let _=0,N=0;T[0].replace(/%[a-zA-Z%]/g,L=>{L!=="%%"&&(_++,L==="%c"&&(N=_))}),T.splice(N,0,C)}r.log=console.debug||console.log||(()=>{});function c(T){try{T?r.storage.setItem("debug",T):r.storage.removeItem("debug")}catch{}}function p(){let T;try{T=r.storage.getItem("debug")}catch{}return!T&&typeof St<"u"&&"env"in St&&(T=St.env.DEBUG),T}function m(){try{return localStorage}catch{}}n.exports=pee(r);const{formatters:y}=n.exports;y.j=function(T){try{return JSON.stringify(T)}catch(C){return"[UnexpectedJSONParseError]: "+C.message}}})(O9,O9.exports);var ME=O9.exports;const hee=lE,gee=yE.EventEmitter,yee=R6.inherits,Ma=ME("avvio"),{AVV_ERR_READY_TIMEOUT:vee}=PE,Q5=Symbol.for("plugin-meta");function bee(n,r){return n[Q5]&&n[Q5].name?n[Q5].name:typeof r<"u"&&typeof r!="function"&&r.name?r.name:n.name?n.name:n.toString().split(`
|
|
212
|
-
`).slice(0,2).map(o=>o.trim()).join(" -- ")}function Tee(){const n={};return n.promise=new Promise((r,o)=>{n.resolve=r,n.reject=o}),n}function T0(n,r,o,l,c){this.started=!1,this.func=r,this.opts=o,this.onFinish=null,this.parent=n,this.timeout=c===void 0?n._timeout:c,this.name=bee(r,o),this.isAfter=l,this.q=hee(n,kee,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}yee(T0,gee);T0.prototype.exec=function(n,r){const o=this.func;let l=!1;const c=this.name;if(this.parent._error&&!this.isAfter){Ma("skipping loading of plugin as parent errored and it is not an after",c),St.nextTick(r);return}if(this.isAfter)this.server=n;else try{this.server=this.parent.override(n,o,this.opts)}catch(T){return Ma("override errored",c),r(T)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Ma("exec",c);let p;const m=T=>{if(l){Ma("loading complete",c);return}this._error=T,Ma(T?"exec errored":"exec completed",c),l=!0,p&&clearTimeout(p),r(T)};this.timeout>0&&(Ma("setting up timeout",c,this.timeout),p=setTimeout(function(){Ma("timed out",c),p=null;const T=new vee(c);T.fn=o,m(T)},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,m);y&&typeof y.then=="function"&&(Ma("exec: resolving promise",c),y.then(()=>St.nextTick(m),T=>St.nextTick(m,T)))};T0.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const n=()=>{this.server.after((o,l)=>{this._error=o,this.q.pause(),o?(Ma("rejecting promise",this.name,o),this._promise.reject(o)):(Ma("resolving promise",this.name),this._promise.resolve()),this._promise=null,St.nextTick(l,o)}),this.q.resume()};let r;return this._promise?r=Promise.resolve():(this._promise=Tee(),r=this._promise.promise,this.server?n():this.on("start",n)),r};T0.prototype.enqueue=function(n,r){Ma("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,r)};T0.prototype.finish=function(n,r){Ma("finish",this.name,n);const o=()=>{this.loaded||(Ma("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,r(n))};if(n){this._promise&&(this._promise.reject(n),this._promise=null),o();return}const l=()=>{if(Ma("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const c=()=>{Ma("wrap"),queueMicrotask(l)};this._promise.resolve(),this._promise.promise.then(c,c),this._promise=null}else o();else Ma("delayed",this.name),this.q.drain=()=>{Ma("drain",this.name),this.q.drain=See,queueMicrotask(l)}};queueMicrotask(l),this.q.resume()};function kee(n,r){const o=this;St.nextTick(Sy.bind(o),n,r)}function Sy(n,r){if(typeof n.func.then=="function"){n.func.then(l=>{typeof l.default=="function"&&(l=l.default),n.func=l,Sy.call(this,n,r)},r);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(),r(c)})})}function See(){}ky.exports=T0;ky.exports.loadPlugin=Sy;var wee=ky.exports;const BS=lE,Cee=yE.EventEmitter,Eee=R6.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Y5,AVV_ERR_CALLBACK_NOT_FN:nm,AVV_ERR_PLUGIN_NOT_VALID:_ee,AVV_ERR_ROOT_PLG_BOOTED:Iee,AVV_ERR_READY_TIMEOUT:Nee}=PE,Ree=dee,x9=wee,p0=ME("avvio"),y6=Symbol("kAvvio"),K5=Symbol("kThenifyDoNotWrap");function Lee(n,r,o){const l=r.expose||{},c=l.use||"use",p=l.after||"after",m=l.ready||"ready",y=l.onClose||"onClose",T=l.close||"close";if(n[c])throw new Y5(c);if(n[p])throw new Y5(p);if(n[m])throw new Y5(m);n[c]=function(C,_){return o.use(C,_),this},Object.defineProperty(n,"then",{get:DE.bind(o)}),n[y6]=!0,n[p]=function(C){return typeof C!="function"?o._loadRegistered():(o.after(Z5(C,this)),this)},n[m]=function(C){if(C&&typeof C!="function")throw new nm(m,typeof C);return o.ready(C?Z5(C,this):void 0)},n[y]=function(C){if(typeof C!="function")throw new nm(y,typeof C);return o.onClose(Mee(C,this)),this},n[T]=function(C){if(C&&typeof C!="function")throw new nm(T,typeof C);return C?(o.close(Z5(C,this)),this):o.close()}}function Ta(n,r,o){if(typeof n=="function"&&arguments.length===1&&(o=n,r={},n=null),typeof r=="function"&&(o=r,r={}),r=r||{},!(this instanceof Ta)){const l=new Ta(n,r,o);return n&&Lee(n,r,l),l}r.autostart!==!1&&(r.autostart=!0),n=n||this,this._timeout=Number(r.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 Ree,this._readyQ=BS(this,UE,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=$S},this._closeQ=BS(this,Pee,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=$S},this._doStart=null,this._root=new x9(this,Oee.bind(this),r,!1,0),this._root.once("start",(l,c,p)=>{const m=this.pluginTree.start(null,c,p);this._root.once("loaded",(y,T,C)=>{this.pluginTree.stop(m,C)})}),x9.loadPlugin.call(this,this._root,l=>{p0("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 Oee(n,r,o){this._doStart=o,r.autostart&&this.start()}Eee(Ta,Cee);Ta.prototype.start=function(){return this.started=!0,St.nextTick(this._doStart),this};Ta.prototype.override=function(n,r,o){return n};function xee(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new _ee(typeof n);return n}Ta.prototype[y6]=!0;Ta.prototype.use=function(n,r){return this._lastUsed=this._addPlugin(n,r,!1),this};Ta.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(Ta.prototype,"then",{get:DE});Ta.prototype._addPlugin=function(n,r,o){if(n=xee(n),r=r||{},this.booted)throw new Iee;const l=this._current[0],c=new x9(this,n,r,o);if(c.once("start",(p,m,y)=>{const T=this.pluginTree.start(l.name,m,y);c.once("loaded",(C,_,N)=>{this.pluginTree.stop(T,N)})}),l.loaded)throw new Error(c.name,l.name);return l.enqueue(c,p=>{p&&(this._error=p)}),c};Ta.prototype.after=function(n){if(!n)return this._loadRegistered();this._addPlugin(r.bind(this),{},!0);function r(o,l,c){UE.call(this,n,c)}return this};Ta.prototype.onClose=function(n){if(typeof n!="function")throw new Error("not a function");n[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(n,r.bind(this));function r(o){o&&(this._error=o)}return this};Ta.prototype.close=function(n){let r;if(n){if(typeof n!="function")throw new nm("close",typeof n)}else r=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))}),r};Ta.prototype.ready=function(n){if(n){if(typeof n!="function")throw new nm("ready",typeof n);this._readyQ.push(n),queueMicrotask(this.start.bind(this));return}return new Promise((r,o)=>{this._readyQ.push(c),this.start();const l=this._current[0].server;function c(p,m,y){p?o(p):r(l),St.nextTick(y)}})};Ta.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};Ta.prototype.toJSON=function(){return this.pluginTree.toJSON()};function $S(){}function DE(){if(this.booted){p0("thenify returning null because we are already booted");return}if(this[K5]){this[K5]=!1;return}return p0("thenify"),(n,r)=>this._loadRegistered().then(()=>(this[K5]=!0,n(this._server)),r)}function UE(n,r){const o=this._server,l=this._error;let c;if(this._error=null,n.length===0)this._error=l,c=n(),c&&!c[y6]&&typeof c.then=="function"?c.then(()=>St.nextTick(r),p=>St.nextTick(r,p)):St.nextTick(r);else if(n.length===1)c=n(l),c&&!c[y6]&&typeof c.then=="function"?c.then(()=>St.nextTick(r),p=>St.nextTick(r,p)):St.nextTick(r);else if(this._timeout===0){const p=m=>{this._error=m,r(this._error)};n.length===2?n(l,p):n(l,o,p)}else Aee.call(this,n,l,o,r)}function Aee(n,r,o,l){const c=n.name;p0("setting up ready timeout",c,this._timeout);let p=setTimeout(()=>{p0("timed out",c),p=null;const y=new Nee(c);y.fn=n,this._error=y,l(y)},this._timeout);n.length===2?n(r,m.bind(this)):n(r,o,m.bind(this));function m(y){p&&(clearTimeout(p),this._error=y,l(this._error))}}function Pee(n,r){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"?(p0("resolving close/onClose promise"),c.then(()=>St.nextTick(r),p=>St.nextTick(r,p))):St.nextTick(r)}else n.length===2?n(l?o:this._error,r):l?n(o,r):n(this._error,o,r)}function Mee(n,r){return o.bind(r);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 Z5(n,r){return o.bind(r);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)}}cy.exports=Ta;cy.exports.express=function(n){return Ta(n,{expose:{use:"load"}})};var Dee=cy.exports;const Uee=dX(Dee);(function(){if(window.requestAnimationFrame&&window.cancelAnimationFrame)return;const n=["webkit","moz","ms","o"];for(const r of n)window.requestAnimationFrame=window.requestAnimationFrame||window[`${r}RequestAnimationFrame`],window.cancelAnimationFrame=window.cancelAnimationFrame||window[`${r}CancelAnimationFrame`]||window[`${r}CancelRequestAnimationFrame`];if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){let r=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-r)),m=window.setTimeout(function(){l(c+p)},p);return r=c+p,m},window.cancelAnimationFrame=clearTimeout}})();function Fee(n,r=!0,o=!0,l){const c=r?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",p=r?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",m=Uee(Object.create({}),{autostart:!1});return m.use(zZ),m.use(FZ,{onDeepLinkHandled:l==null?void 0:l.onDeepLinkHandled}),m.use($Z,{videoPlayerController:l==null?void 0:l.videoPlayerController}),m.use(sZ,{sdkKey:n,host:c,analyticsHost:p,version:l==null?void 0:l.version}),m.use(dZ),m.use(BZ),m.use(nX),m.use(NZ),m.use(cX),m.after((y,T,C)=>{if(y)throw y;T.ready(),C()}),o&&m.after(async(y,T,C)=>{if(y)throw y;await T.sdk.initializeApp(),C()}),m.onClose(()=>{console.log("close")}),m}const Vee=({sdkKey:n,plugins:r,production:o,autoEnable:l,onDeepLinkHandled:c,videoPlayerController:p})=>{const[m,y]=Q.useState(null);return Q.useEffect(()=>{let T=!1;if(!n)return console.error("streamlayer sdk key should be provided"),y(_=>(_!==null&&typeof _.disableApp=="function"&&_.disableApp(),null)),()=>{T=!0};const C=Fee(n,o,l,{version:"1.1.2",onDeepLinkHandled:c,videoPlayerController:p});if(r)for(const _ of r)C.use(_);return C.ready().then(_=>{T||(y(_.sdk),typeof window<"u")}).catch(_=>console.log(_)),()=>{T=!0,C.close(function(_){if(_)throw _})}},[n,o]),m};var FE=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(FE||{});const wy=Q.createContext({status:0,sdk:null}),jee=({sdkKey:n,plugins:r,children:o,production:l=!0,autoEnable:c=!0,onDeepLinkHandled:p,videoPlayerController:m})=>{const y=Vee({sdkKey:n,plugins:r,production:l,autoEnable:c,onDeepLinkHandled:p,videoPlayerController:m}),T=Q.useMemo(()=>y?{sdk:y,status:2}:{status:1,sdk:null},[y]);return Q.useEffect(()=>()=>{p&&(y==null||y.removeDeepLinkHandler(p)),m&&(y==null||y.removeVideoPlayerController(m))},[y]),Q.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!n,onDeepLinkHandled:!!p,videoPlayerController:!!m})},[n,p,m]),w.jsx(wy.Provider,{value:T,children:o})},VE=()=>{const{sdk:n}=Q.useContext(wy);return n},Bee=({sdkKey:n,plugins:r,children:o,onDeepLinkHandled:l,videoPlayerController:c,production:p=!0})=>w.jsx(jee,{sdkKey:n,plugins:r,production:p,autoEnable:!1,onDeepLinkHandled:l,videoPlayerController:c,children:o}),$ee=({children:n,overlays:r})=>{const{sdk:o,status:l}=Q.useContext(wy);return l===FE.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),n({})):o?w.jsx("div",{className:"StreamLayerSDK",children:w.jsx(IC,{style:{height:"100%"},children:w.jsx(xq,{sdk:o,overlays:r,children:n})})}):n({})};class zee extends Q.Component{constructor(r){super(r),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,o){console.error(r,o.componentStack)}render(){return this.state.hasError?this.props.children({}):w.jsx($ee,{...this.props})}}const Hee=({token:n,schema:r})=>{const o=VE();return Q.useEffect(()=>{n&&r&&o&&o.authorizationBypass(r,n)},[n,r,o]),null},qee=()=>{const n=VE();return n?w.jsx("div",{className:"StreamLayerSDK",children:w.jsx(IC,{children:w.jsx($q,{sdk:n})})}):null};exports.C=vC;exports.C$1=YS;exports.C$2=T6;exports.M=ay;exports.MastersStreamLayerProvider=Bee;exports.MastersStreamLayerSDKReact=zee;exports.O=K9;exports.S=SC;exports.StreamLayerLogin=Hee;exports.StreamLayerSDKPoints=qee;exports.T=ny;exports.a=P9;exports.b=yC;exports.k=wC;exports.l=WS;exports.m=X2;exports.m$1=KS;exports.n=cm;exports.p=Hq;exports.p$1=QS;exports.styled_default=P;exports.useStore=Ut;exports.z=L$;
|
|
212
|
+
`).slice(0,2).map(o=>o.trim()).join(" -- ")}function Tee(){const n={};return n.promise=new Promise((r,o)=>{n.resolve=r,n.reject=o}),n}function T0(n,r,o,l,c){this.started=!1,this.func=r,this.opts=o,this.onFinish=null,this.parent=n,this.timeout=c===void 0?n._timeout:c,this.name=bee(r,o),this.isAfter=l,this.q=hee(n,kee,1),this.q.pause(),this._error=null,this.loaded=!1,this._promise=null}yee(T0,gee);T0.prototype.exec=function(n,r){const o=this.func;let l=!1;const c=this.name;if(this.parent._error&&!this.isAfter){Ma("skipping loading of plugin as parent errored and it is not an after",c),St.nextTick(r);return}if(this.isAfter)this.server=n;else try{this.server=this.parent.override(n,o,this.opts)}catch(T){return Ma("override errored",c),r(T)}this.opts=typeof this.opts=="function"?this.opts(this.server):this.opts,Ma("exec",c);let p;const m=T=>{if(l){Ma("loading complete",c);return}this._error=T,Ma(T?"exec errored":"exec completed",c),l=!0,p&&clearTimeout(p),r(T)};this.timeout>0&&(Ma("setting up timeout",c,this.timeout),p=setTimeout(function(){Ma("timed out",c),p=null;const T=new vee(c);T.fn=o,m(T)},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,m);y&&typeof y.then=="function"&&(Ma("exec: resolving promise",c),y.then(()=>St.nextTick(m),T=>St.nextTick(m,T)))};T0.prototype.loadedSoFar=function(){if(this.loaded)return Promise.resolve();const n=()=>{this.server.after((o,l)=>{this._error=o,this.q.pause(),o?(Ma("rejecting promise",this.name,o),this._promise.reject(o)):(Ma("resolving promise",this.name),this._promise.resolve()),this._promise=null,St.nextTick(l,o)}),this.q.resume()};let r;return this._promise?r=Promise.resolve():(this._promise=Tee(),r=this._promise.promise,this.server?n():this.on("start",n)),r};T0.prototype.enqueue=function(n,r){Ma("enqueue",this.name,n.name),this.emit("enqueue",this.server?this.server.name:null,this.name,Date.now()),this.q.push(n,r)};T0.prototype.finish=function(n,r){Ma("finish",this.name,n);const o=()=>{this.loaded||(Ma("loaded",this.name),this.emit("loaded",this.server?this.server.name:null,this.name,Date.now()),this.loaded=!0,r(n))};if(n){this._promise&&(this._promise.reject(n),this._promise=null),o();return}const l=()=>{if(Ma("check",this.name,this.q.length(),this.q.running(),this._promise),this.q.length()===0&&this.q.running()===0)if(this._promise){const c=()=>{Ma("wrap"),queueMicrotask(l)};this._promise.resolve(),this._promise.promise.then(c,c),this._promise=null}else o();else Ma("delayed",this.name),this.q.drain=()=>{Ma("drain",this.name),this.q.drain=See,queueMicrotask(l)}};queueMicrotask(l),this.q.resume()};function kee(n,r){const o=this;St.nextTick(Sy.bind(o),n,r)}function Sy(n,r){if(typeof n.func.then=="function"){n.func.then(l=>{typeof l.default=="function"&&(l=l.default),n.func=l,Sy.call(this,n,r)},r);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(),r(c)})})}function See(){}ky.exports=T0;ky.exports.loadPlugin=Sy;var wee=ky.exports;const BS=lE,Cee=yE.EventEmitter,Eee=R6.inherits,{AVV_ERR_EXPOSE_ALREADY_DEFINED:Y5,AVV_ERR_CALLBACK_NOT_FN:nm,AVV_ERR_PLUGIN_NOT_VALID:_ee,AVV_ERR_ROOT_PLG_BOOTED:Iee,AVV_ERR_READY_TIMEOUT:Nee}=PE,Ree=dee,x9=wee,p0=ME("avvio"),y6=Symbol("kAvvio"),K5=Symbol("kThenifyDoNotWrap");function Lee(n,r,o){const l=r.expose||{},c=l.use||"use",p=l.after||"after",m=l.ready||"ready",y=l.onClose||"onClose",T=l.close||"close";if(n[c])throw new Y5(c);if(n[p])throw new Y5(p);if(n[m])throw new Y5(m);n[c]=function(C,_){return o.use(C,_),this},Object.defineProperty(n,"then",{get:DE.bind(o)}),n[y6]=!0,n[p]=function(C){return typeof C!="function"?o._loadRegistered():(o.after(Z5(C,this)),this)},n[m]=function(C){if(C&&typeof C!="function")throw new nm(m,typeof C);return o.ready(C?Z5(C,this):void 0)},n[y]=function(C){if(typeof C!="function")throw new nm(y,typeof C);return o.onClose(Mee(C,this)),this},n[T]=function(C){if(C&&typeof C!="function")throw new nm(T,typeof C);return C?(o.close(Z5(C,this)),this):o.close()}}function Ta(n,r,o){if(typeof n=="function"&&arguments.length===1&&(o=n,r={},n=null),typeof r=="function"&&(o=r,r={}),r=r||{},!(this instanceof Ta)){const l=new Ta(n,r,o);return n&&Lee(n,r,l),l}r.autostart!==!1&&(r.autostart=!0),n=n||this,this._timeout=Number(r.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 Ree,this._readyQ=BS(this,UE,1),this._readyQ.pause(),this._readyQ.drain=()=>{this.emit("start"),this._readyQ.drain=$S},this._closeQ=BS(this,Pee,1),this._closeQ.pause(),this._closeQ.drain=()=>{this.emit("close"),this._closeQ.drain=$S},this._doStart=null,this._root=new x9(this,Oee.bind(this),r,!1,0),this._root.once("start",(l,c,p)=>{const m=this.pluginTree.start(null,c,p);this._root.once("loaded",(y,T,C)=>{this.pluginTree.stop(m,C)})}),x9.loadPlugin.call(this,this._root,l=>{p0("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 Oee(n,r,o){this._doStart=o,r.autostart&&this.start()}Eee(Ta,Cee);Ta.prototype.start=function(){return this.started=!0,St.nextTick(this._doStart),this};Ta.prototype.override=function(n,r,o){return n};function xee(n){if(n&&typeof n=="object"&&typeof n.default=="function"&&(n=n.default),!(n&&(typeof n=="function"||typeof n.then=="function")))throw new _ee(typeof n);return n}Ta.prototype[y6]=!0;Ta.prototype.use=function(n,r){return this._lastUsed=this._addPlugin(n,r,!1),this};Ta.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(Ta.prototype,"then",{get:DE});Ta.prototype._addPlugin=function(n,r,o){if(n=xee(n),r=r||{},this.booted)throw new Iee;const l=this._current[0],c=new x9(this,n,r,o);if(c.once("start",(p,m,y)=>{const T=this.pluginTree.start(l.name,m,y);c.once("loaded",(C,_,N)=>{this.pluginTree.stop(T,N)})}),l.loaded)throw new Error(c.name,l.name);return l.enqueue(c,p=>{p&&(this._error=p)}),c};Ta.prototype.after=function(n){if(!n)return this._loadRegistered();this._addPlugin(r.bind(this),{},!0);function r(o,l,c){UE.call(this,n,c)}return this};Ta.prototype.onClose=function(n){if(typeof n!="function")throw new Error("not a function");n[this._isOnCloseHandlerKey]=!0,this._closeQ.unshift(n,r.bind(this));function r(o){o&&(this._error=o)}return this};Ta.prototype.close=function(n){let r;if(n){if(typeof n!="function")throw new nm("close",typeof n)}else r=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))}),r};Ta.prototype.ready=function(n){if(n){if(typeof n!="function")throw new nm("ready",typeof n);this._readyQ.push(n),queueMicrotask(this.start.bind(this));return}return new Promise((r,o)=>{this._readyQ.push(c),this.start();const l=this._current[0].server;function c(p,m,y){p?o(p):r(l),St.nextTick(y)}})};Ta.prototype.prettyPrint=function(){return this.pluginTree.prittyPrint()};Ta.prototype.toJSON=function(){return this.pluginTree.toJSON()};function $S(){}function DE(){if(this.booted){p0("thenify returning null because we are already booted");return}if(this[K5]){this[K5]=!1;return}return p0("thenify"),(n,r)=>this._loadRegistered().then(()=>(this[K5]=!0,n(this._server)),r)}function UE(n,r){const o=this._server,l=this._error;let c;if(this._error=null,n.length===0)this._error=l,c=n(),c&&!c[y6]&&typeof c.then=="function"?c.then(()=>St.nextTick(r),p=>St.nextTick(r,p)):St.nextTick(r);else if(n.length===1)c=n(l),c&&!c[y6]&&typeof c.then=="function"?c.then(()=>St.nextTick(r),p=>St.nextTick(r,p)):St.nextTick(r);else if(this._timeout===0){const p=m=>{this._error=m,r(this._error)};n.length===2?n(l,p):n(l,o,p)}else Aee.call(this,n,l,o,r)}function Aee(n,r,o,l){const c=n.name;p0("setting up ready timeout",c,this._timeout);let p=setTimeout(()=>{p0("timed out",c),p=null;const y=new Nee(c);y.fn=n,this._error=y,l(y)},this._timeout);n.length===2?n(r,m.bind(this)):n(r,o,m.bind(this));function m(y){p&&(clearTimeout(p),this._error=y,l(this._error))}}function Pee(n,r){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"?(p0("resolving close/onClose promise"),c.then(()=>St.nextTick(r),p=>St.nextTick(r,p))):St.nextTick(r)}else n.length===2?n(l?o:this._error,r):l?n(o,r):n(this._error,o,r)}function Mee(n,r){return o.bind(r);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 Z5(n,r){return o.bind(r);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)}}cy.exports=Ta;cy.exports.express=function(n){return Ta(n,{expose:{use:"load"}})};var Dee=cy.exports;const Uee=dX(Dee);(function(){if(window.requestAnimationFrame&&window.cancelAnimationFrame)return;const n=["webkit","moz","ms","o"];for(const r of n)window.requestAnimationFrame=window.requestAnimationFrame||window[`${r}RequestAnimationFrame`],window.cancelAnimationFrame=window.cancelAnimationFrame||window[`${r}CancelAnimationFrame`]||window[`${r}CancelRequestAnimationFrame`];if(/iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent)||!window.requestAnimationFrame||!window.cancelAnimationFrame){let r=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-r)),m=window.setTimeout(function(){l(c+p)},p);return r=c+p,m},window.cancelAnimationFrame=clearTimeout}})();function Fee(n,r=!0,o=!0,l){const c=r?"https://grpc-sdk.streamlayer.io:443":"https://grpc-sdk.next.streamlayer.io:443",p=r?"https://grpc.streamlayer.io:443":"https://grpc.next.streamlayer.io:443",m=Uee(Object.create({}),{autostart:!1});return m.use(zZ),m.use(FZ,{onDeepLinkHandled:l==null?void 0:l.onDeepLinkHandled}),m.use($Z,{videoPlayerController:l==null?void 0:l.videoPlayerController}),m.use(sZ,{sdkKey:n,host:c,analyticsHost:p,version:l==null?void 0:l.version}),m.use(dZ),m.use(BZ),m.use(nX),m.use(NZ),m.use(cX),m.after((y,T,C)=>{if(y)throw y;T.ready(),C()}),o&&m.after(async(y,T,C)=>{if(y)throw y;await T.sdk.initializeApp(),C()}),m.onClose(()=>{console.log("close")}),m}const Vee=({sdkKey:n,plugins:r,production:o,autoEnable:l,onDeepLinkHandled:c,videoPlayerController:p})=>{const[m,y]=Q.useState(null);return Q.useEffect(()=>{let T=!1;if(!n)return console.error("streamlayer sdk key should be provided"),y(_=>(_!==null&&typeof _.disableApp=="function"&&_.disableApp(),null)),()=>{T=!0};const C=Fee(n,o,l,{version:"1.1.3",onDeepLinkHandled:c,videoPlayerController:p});if(r)for(const _ of r)C.use(_);return C.ready().then(_=>{T||(y(_.sdk),typeof window<"u")}).catch(_=>console.log(_)),()=>{T=!0,C.close(function(_){if(_)throw _})}},[n,o]),m};var FE=(n=>(n[n.UNSET=0]="UNSET",n[n.CONNECTED=1]="CONNECTED",n[n.READY=2]="READY",n))(FE||{});const wy=Q.createContext({status:0,sdk:null}),jee=({sdkKey:n,plugins:r,children:o,production:l=!0,autoEnable:c=!0,onDeepLinkHandled:p,videoPlayerController:m})=>{const y=Vee({sdkKey:n,plugins:r,production:l,autoEnable:c,onDeepLinkHandled:p,videoPlayerController:m}),T=Q.useMemo(()=>y?{sdk:y,status:2}:{status:1,sdk:null},[y]);return Q.useEffect(()=>()=>{p&&(y==null||y.removeDeepLinkHandler(p)),m&&(y==null||y.removeVideoPlayerController(m))},[y]),Q.useEffect(()=>{localStorage.getItem("SL_DEBUG")&&console.log("StreamLayerProvider mounted with props:",{sdkKey:!!n,onDeepLinkHandled:!!p,videoPlayerController:!!m})},[n,p,m]),w.jsx(wy.Provider,{value:T,children:o})},VE=()=>{const{sdk:n}=Q.useContext(wy);return n},Bee=({sdkKey:n,plugins:r,children:o,onDeepLinkHandled:l,videoPlayerController:c,production:p=!0})=>w.jsx(jee,{sdkKey:n,plugins:r,production:p,autoEnable:!1,onDeepLinkHandled:l,videoPlayerController:c,children:o}),$ee=({children:n,overlays:r})=>{const{sdk:o,status:l}=Q.useContext(wy);return l===FE.UNSET?(console.error("Wrap app in `StreamLayerProvider`"),n({})):o?w.jsx("div",{className:"StreamLayerSDK",children:w.jsx(IC,{style:{height:"100%"},children:w.jsx(xq,{sdk:o,overlays:r,children:n})})}):n({})};class zee extends Q.Component{constructor(r){super(r),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r,o){console.error(r,o.componentStack)}render(){return this.state.hasError?this.props.children({}):w.jsx($ee,{...this.props})}}const Hee=({token:n,schema:r})=>{const o=VE();return Q.useEffect(()=>{n&&r&&o&&o.authorizationBypass(r,n)},[n,r,o]),null},qee=()=>{const n=VE();return n?w.jsx("div",{className:"StreamLayerSDK",children:w.jsx(IC,{children:w.jsx($q,{sdk:n})})}):null};exports.C=vC;exports.C$1=YS;exports.C$2=T6;exports.M=ay;exports.MastersStreamLayerProvider=Bee;exports.MastersStreamLayerSDKReact=zee;exports.O=K9;exports.S=SC;exports.StreamLayerLogin=Hee;exports.StreamLayerSDKPoints=qee;exports.T=ny;exports.a=P9;exports.b=yC;exports.k=wC;exports.l=WS;exports.m=X2;exports.m$1=KS;exports.n=cm;exports.p=Hq;exports.p$1=QS;exports.styled_default=P;exports.useStore=Ut;exports.z=L$;
|
package/lib/dist/es/masters.js
CHANGED
|
@@ -41595,7 +41595,7 @@ const ete = ({
|
|
|
41595
41595
|
T = !0;
|
|
41596
41596
|
};
|
|
41597
41597
|
const w = Jee(n, o, l, {
|
|
41598
|
-
version: "1.1.
|
|
41598
|
+
version: "1.1.3",
|
|
41599
41599
|
onDeepLinkHandled: c,
|
|
41600
41600
|
videoPlayerController: p
|
|
41601
41601
|
});
|
package/lib/es/advertisement.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as n, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as R, useRef as w, useMemo as D } from "react";
|
|
3
|
-
import { a as U, s
|
|
3
|
+
import { a as U, s, c as q, K as F, u as v, L as K, e as O } from "./index2.js";
|
|
4
4
|
import { F as z, u as H, i as W } from "./app.js";
|
|
5
5
|
import { P as c, a as m, S as J } from "./useStreamLayerApp2.js";
|
|
6
|
-
const Q = /* @__PURE__ */
|
|
6
|
+
const Q = /* @__PURE__ */ s("div")({
|
|
7
7
|
name: "Container",
|
|
8
8
|
class: "c5b6wdg",
|
|
9
9
|
propsAsIs: !1
|
|
@@ -12,19 +12,19 @@ const Q = /* @__PURE__ */ l("div")({
|
|
|
12
12
|
style: a,
|
|
13
13
|
className: i,
|
|
14
14
|
enabled: e = !0,
|
|
15
|
-
hiding:
|
|
15
|
+
hiding: l,
|
|
16
16
|
direction: r = "left",
|
|
17
17
|
onAnimationEnd: t
|
|
18
18
|
}) => /* @__PURE__ */ n(Q, {
|
|
19
19
|
style: a,
|
|
20
|
-
className: U(i, V, so(r), e && !
|
|
20
|
+
className: U(i, V, so(r), e && !l && no(r), e && l && eo(r)),
|
|
21
21
|
onAnimationEnd: t,
|
|
22
22
|
children: o
|
|
23
|
-
}), lo = /* @__PURE__ */
|
|
23
|
+
}), lo = /* @__PURE__ */ s("div")({
|
|
24
24
|
name: "BannerContainer",
|
|
25
25
|
class: "bipmch2",
|
|
26
26
|
propsAsIs: !1
|
|
27
|
-
}), ao = /* @__PURE__ */
|
|
27
|
+
}), ao = /* @__PURE__ */ s("img")({
|
|
28
28
|
name: "BannerImg",
|
|
29
29
|
class: "bpkcihp",
|
|
30
30
|
propsAsIs: !1
|
|
@@ -44,75 +44,75 @@ const Q = /* @__PURE__ */ l("div")({
|
|
|
44
44
|
})
|
|
45
45
|
})
|
|
46
46
|
}) : null;
|
|
47
|
-
}, ro = /* @__PURE__ */
|
|
47
|
+
}, ro = /* @__PURE__ */ s("div")({
|
|
48
48
|
name: "Header",
|
|
49
49
|
class: "hkzhq2w",
|
|
50
50
|
propsAsIs: !1
|
|
51
|
-
}), to = /* @__PURE__ */
|
|
51
|
+
}), to = /* @__PURE__ */ s("div")({
|
|
52
52
|
name: "HeaderContent",
|
|
53
53
|
class: "hmgz5i",
|
|
54
54
|
propsAsIs: !1
|
|
55
|
-
}), j = /* @__PURE__ */
|
|
55
|
+
}), j = /* @__PURE__ */ s("img")({
|
|
56
56
|
name: "SponsorLogo",
|
|
57
57
|
class: "syxi3jt",
|
|
58
58
|
propsAsIs: !1
|
|
59
|
-
}), co = /* @__PURE__ */
|
|
59
|
+
}), co = /* @__PURE__ */ s("div")({
|
|
60
60
|
name: "SponsorName",
|
|
61
61
|
class: "s149e3gp",
|
|
62
62
|
propsAsIs: !1
|
|
63
|
-
}), po = /* @__PURE__ */
|
|
63
|
+
}), po = /* @__PURE__ */ s("div")({
|
|
64
64
|
name: "PromoOverlay",
|
|
65
65
|
class: "p10toh7",
|
|
66
66
|
propsAsIs: !1
|
|
67
|
-
}), mo = /* @__PURE__ */
|
|
67
|
+
}), mo = /* @__PURE__ */ s("div")({
|
|
68
68
|
name: "Media",
|
|
69
69
|
class: "m1jyea6t",
|
|
70
70
|
propsAsIs: !1
|
|
71
|
-
}), uo = /* @__PURE__ */
|
|
71
|
+
}), uo = /* @__PURE__ */ s("div")({
|
|
72
72
|
name: "Text",
|
|
73
73
|
class: "tzpfa3h",
|
|
74
74
|
propsAsIs: !1
|
|
75
|
-
}), vo = /* @__PURE__ */
|
|
75
|
+
}), vo = /* @__PURE__ */ s("div")({
|
|
76
76
|
name: "Description",
|
|
77
77
|
class: "d1crmu01",
|
|
78
78
|
propsAsIs: !1
|
|
79
|
-
}), ho = /* @__PURE__ */
|
|
79
|
+
}), ho = /* @__PURE__ */ s("div")({
|
|
80
80
|
name: "SponsorText",
|
|
81
81
|
class: "s1l37r8s",
|
|
82
82
|
propsAsIs: !1
|
|
83
|
-
}), go = /* @__PURE__ */
|
|
83
|
+
}), go = /* @__PURE__ */ s("div")({
|
|
84
84
|
name: "ADLogo",
|
|
85
85
|
class: "a1nmch9k",
|
|
86
86
|
propsAsIs: !1
|
|
87
|
-
}), bo = /* @__PURE__ */
|
|
87
|
+
}), bo = /* @__PURE__ */ s("span")({
|
|
88
88
|
name: "SponsoredText",
|
|
89
89
|
class: "s1er0ljd",
|
|
90
90
|
propsAsIs: !1
|
|
91
|
-
}), Ao = /* @__PURE__ */
|
|
91
|
+
}), Ao = /* @__PURE__ */ s("div")({
|
|
92
92
|
name: "CloseIconWrap",
|
|
93
93
|
class: "cydopmr",
|
|
94
94
|
propsAsIs: !1
|
|
95
|
-
}), yo = () => q, Io = /* @__PURE__ */
|
|
95
|
+
}), yo = () => q, Io = /* @__PURE__ */ s(yo())({
|
|
96
96
|
name: "CloseIcon",
|
|
97
97
|
class: "c1w6nt04",
|
|
98
98
|
propsAsIs: !0
|
|
99
|
-
}), fo = /* @__PURE__ */
|
|
99
|
+
}), fo = /* @__PURE__ */ s("div")({
|
|
100
100
|
name: "Content",
|
|
101
101
|
class: "c1evcmtq",
|
|
102
102
|
propsAsIs: !1
|
|
103
|
-
}), $o = /* @__PURE__ */
|
|
103
|
+
}), $o = /* @__PURE__ */ s("div")({
|
|
104
104
|
name: "ActionBtnWrap",
|
|
105
105
|
class: "awodx0x",
|
|
106
106
|
propsAsIs: !1
|
|
107
|
-
}), Mo = /* @__PURE__ */
|
|
107
|
+
}), Mo = /* @__PURE__ */ s("a")({
|
|
108
108
|
name: "ActionButton",
|
|
109
109
|
class: "a1q3n6oi",
|
|
110
110
|
propsAsIs: !1
|
|
111
|
-
}), So = /* @__PURE__ */
|
|
111
|
+
}), So = /* @__PURE__ */ s("img")({
|
|
112
112
|
name: "PromoImg",
|
|
113
113
|
class: "p8d4xfk",
|
|
114
114
|
propsAsIs: !1
|
|
115
|
-
}), ko = /* @__PURE__ */
|
|
115
|
+
}), ko = /* @__PURE__ */ s("div")({
|
|
116
116
|
name: "Title",
|
|
117
117
|
class: "tt6oobh",
|
|
118
118
|
propsAsIs: !1
|
|
@@ -121,12 +121,12 @@ const Q = /* @__PURE__ */ l("div")({
|
|
|
121
121
|
onClose: a,
|
|
122
122
|
inSidebar: i
|
|
123
123
|
}) => {
|
|
124
|
-
var e,
|
|
124
|
+
var e, l, r, t, p, h, g, b, A, y, I, f, $, M, S, k, B, C, E, x, L, N, T, _;
|
|
125
125
|
const u = o.type === c.INGAME_IAB11_LBAR || o.type === c.INGAME_IAB11;
|
|
126
126
|
return /* @__PURE__ */ d(po, { className: "PromoOverlay", style: { ...i ? {} : { backgroundColor: "#1E3344" } }, children: [
|
|
127
127
|
/* @__PURE__ */ d(ro, { children: [
|
|
128
128
|
/* @__PURE__ */ d(to, { children: [
|
|
129
|
-
((e = o.sponsor) == null ? void 0 : e.logo) && o.logoMode === m.LEFT && /* @__PURE__ */ n(j, { src: (
|
|
129
|
+
((e = o.sponsor) == null ? void 0 : e.logo) && o.logoMode === m.LEFT && /* @__PURE__ */ n(j, { src: (l = o.sponsor) == null ? void 0 : l.logo, alt: "promo" }),
|
|
130
130
|
/* @__PURE__ */ d(
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
@@ -182,7 +182,7 @@ const Q = /* @__PURE__ */ l("div")({
|
|
|
182
182
|
) })
|
|
183
183
|
] })
|
|
184
184
|
] });
|
|
185
|
-
}, Bo = /* @__PURE__ */
|
|
185
|
+
}, Bo = /* @__PURE__ */ s("div")({
|
|
186
186
|
name: "SidebarContainer",
|
|
187
187
|
class: "s1abskp8",
|
|
188
188
|
propsAsIs: !1
|
|
@@ -191,25 +191,25 @@ const Q = /* @__PURE__ */ l("div")({
|
|
|
191
191
|
direction: a,
|
|
192
192
|
style: i,
|
|
193
193
|
className: e,
|
|
194
|
-
hiding:
|
|
194
|
+
hiding: l
|
|
195
195
|
}) => /* @__PURE__ */ n(G, {
|
|
196
196
|
direction: a,
|
|
197
197
|
style: i,
|
|
198
|
-
hiding:
|
|
198
|
+
hiding: l,
|
|
199
199
|
className: e,
|
|
200
200
|
children: /* @__PURE__ */ n(Bo, {
|
|
201
201
|
children: o
|
|
202
202
|
})
|
|
203
203
|
}), Eo = (o) => (o == null ? void 0 : o.type) === c.INGAME_IAB11_LBAR || (o == null ? void 0 : o.type) === c.INGAME_IAB21_LBAR, xo = (o) => (o == null ? void 0 : o.type) === c.INGAME_IAB11 || (o == null ? void 0 : o.type) === c.INGAME_IAB21, Lo = ({ advertisement: o, layoutMode: a = "side-by-side", sidebar: i, banner: e }) => {
|
|
204
|
-
const
|
|
205
|
-
return !
|
|
204
|
+
const l = v(o.data);
|
|
205
|
+
return !l.data && l.loading ? null : l.error ? /* @__PURE__ */ d("div", { children: [
|
|
206
206
|
"error ",
|
|
207
207
|
/* @__PURE__ */ n("button", { onClick: o.close, children: "close" })
|
|
208
|
-
] }) :
|
|
208
|
+
] }) : l.data ? !i && !e && xo(l.data) ? /* @__PURE__ */ n(P, { promotion: l.data, onClose: o.close }) : i && Eo(l.data) ? /* @__PURE__ */ n(Co, { direction: i, hiding: o.hiding, children: /* @__PURE__ */ n(P, { promotion: l.data, onClose: o.close, inSidebar: !0 }) }) : e ? /* @__PURE__ */ n(io, { hiding: o.hiding, promotion: l.data, direction: e }) : null : /* @__PURE__ */ d("div", { children: [
|
|
209
209
|
"empty promo ",
|
|
210
210
|
/* @__PURE__ */ n("button", { onClick: o.close, children: "close" })
|
|
211
211
|
] });
|
|
212
|
-
}, No = /* @__PURE__ */
|
|
212
|
+
}, No = /* @__PURE__ */ s("div")({
|
|
213
213
|
name: "AdvertisementUIWrap",
|
|
214
214
|
class: "aa6pjif",
|
|
215
215
|
propsAsIs: !1
|
|
@@ -225,18 +225,18 @@ const Q = /* @__PURE__ */ l("div")({
|
|
|
225
225
|
sidebar: i,
|
|
226
226
|
banner: e
|
|
227
227
|
}) => {
|
|
228
|
-
const
|
|
228
|
+
const l = w(null), r = v(o.advertisement.$list), t = D(
|
|
229
229
|
() => o.advertisement.getActiveAdvertisement(),
|
|
230
230
|
// fire getActiveNotification when notifications were updated
|
|
231
231
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
232
232
|
[r]
|
|
233
233
|
);
|
|
234
|
-
return K(
|
|
234
|
+
return K(l, {
|
|
235
235
|
enabled: !!t,
|
|
236
236
|
event: "click",
|
|
237
237
|
listener: To
|
|
238
238
|
}), t ? /* @__PURE__ */ n(No, {
|
|
239
|
-
ref:
|
|
239
|
+
ref: l,
|
|
240
240
|
style: {
|
|
241
241
|
height: !e && !i ? "auto" : "100%"
|
|
242
242
|
},
|
|
@@ -252,7 +252,7 @@ const Q = /* @__PURE__ */ l("div")({
|
|
|
252
252
|
sidebar: a,
|
|
253
253
|
banner: i,
|
|
254
254
|
event: e,
|
|
255
|
-
layoutMode:
|
|
255
|
+
layoutMode: l
|
|
256
256
|
}) => {
|
|
257
257
|
const {
|
|
258
258
|
deactivate: r
|
|
@@ -268,13 +268,6 @@ const Q = /* @__PURE__ */ l("div")({
|
|
|
268
268
|
},
|
|
269
269
|
children: "define either sidebar or banner, not both."
|
|
270
270
|
});
|
|
271
|
-
if (!a && !i && s)
|
|
272
|
-
return /* @__PURE__ */ n("div", {
|
|
273
|
-
style: {
|
|
274
|
-
color: "red"
|
|
275
|
-
},
|
|
276
|
-
children: "layoutMode property unavailable for the overlay mode."
|
|
277
|
-
});
|
|
278
271
|
if (!t)
|
|
279
272
|
return null;
|
|
280
273
|
const p = o.getFeature(J.GAMES);
|
|
@@ -282,7 +275,7 @@ const Q = /* @__PURE__ */ l("div")({
|
|
|
282
275
|
gamification: p,
|
|
283
276
|
sidebar: a,
|
|
284
277
|
banner: i,
|
|
285
|
-
layoutMode:
|
|
278
|
+
layoutMode: l
|
|
286
279
|
}) : null;
|
|
287
280
|
}, Uo = ({ event: o, sidebar: a, banner: i }) => {
|
|
288
281
|
const e = H();
|
|
@@ -17357,7 +17357,7 @@ const C_ = ({
|
|
|
17357
17357
|
l = !0;
|
|
17358
17358
|
};
|
|
17359
17359
|
const m = M_(e, n, a, {
|
|
17360
|
-
version: "1.1.
|
|
17360
|
+
version: "1.1.3",
|
|
17361
17361
|
onDeepLinkHandled: s,
|
|
17362
17362
|
videoPlayerController: r
|
|
17363
17363
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "StreamLayer, Inc (https://streamlayer.io)",
|
|
6
6
|
"maintainers": [
|
|
@@ -78,17 +78,17 @@
|
|
|
78
78
|
}
|
|
79
79
|
],
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@streamlayer/feature-gamification": "^1.2.
|
|
82
|
-
"@streamlayer/sdk-web": "^1.0.
|
|
83
|
-
"@streamlayer/sdk-web-analytics": "^1.0.
|
|
84
|
-
"@streamlayer/sdk-web-api": "^1.1.
|
|
85
|
-
"@streamlayer/sdk-web-core": "^1.0.
|
|
86
|
-
"@streamlayer/sdk-web-features": "^1.0.
|
|
87
|
-
"@streamlayer/sdk-web-interfaces": "^1.0.
|
|
88
|
-
"@streamlayer/sdk-web-logger": "^1.0.
|
|
89
|
-
"@streamlayer/sdk-web-notifications": "^1.0.
|
|
90
|
-
"@streamlayer/sdk-web-storage": "^1.0.
|
|
91
|
-
"@streamlayer/sdk-web-types": "^1.1.
|
|
81
|
+
"@streamlayer/feature-gamification": "^1.2.2",
|
|
82
|
+
"@streamlayer/sdk-web": "^1.0.4",
|
|
83
|
+
"@streamlayer/sdk-web-analytics": "^1.0.4",
|
|
84
|
+
"@streamlayer/sdk-web-api": "^1.1.3",
|
|
85
|
+
"@streamlayer/sdk-web-core": "^1.0.4",
|
|
86
|
+
"@streamlayer/sdk-web-features": "^1.0.4",
|
|
87
|
+
"@streamlayer/sdk-web-interfaces": "^1.0.4",
|
|
88
|
+
"@streamlayer/sdk-web-logger": "^1.0.4",
|
|
89
|
+
"@streamlayer/sdk-web-notifications": "^1.0.4",
|
|
90
|
+
"@streamlayer/sdk-web-storage": "^1.0.4",
|
|
91
|
+
"@streamlayer/sdk-web-types": "^1.1.3"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@bufbuild/protobuf": "^1.10.0",
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
"size-limit": "^11.1.4",
|
|
145
145
|
"url-loader": "^4.1.1",
|
|
146
146
|
"vite-plugin-dts": "^3.9.1",
|
|
147
|
-
"@streamlayer/react-ui": "^1.2.
|
|
147
|
+
"@streamlayer/react-ui": "^1.2.2"
|
|
148
148
|
},
|
|
149
149
|
"scripts": {
|
|
150
150
|
"size-limit": "size-limit"
|