File Manager
Viewing File: 264.js
(window.webpackJsonp=window.webpackJsonp||[]).push([[264],{"34Bw":function(t,e,n){"use strict";n.d(e,"f",(function(){return a})),n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return d})),n.d(e,"l",(function(){return s})),n.d(e,"e",(function(){return h})),n.d(e,"v",(function(){return p})),n.d(e,"q",(function(){return v})),n.d(e,"r",(function(){return E})),n.d(e,"s",(function(){return j})),n.d(e,"p",(function(){return g})),n.d(e,"t",(function(){return _})),n.d(e,"u",(function(){return R})),n.d(e,"k",(function(){return L})),n.d(e,"m",(function(){return A})),n.d(e,"h",(function(){return b})),n.d(e,"w",(function(){return I})),n.d(e,"j",(function(){return T})),n.d(e,"d",(function(){return y})),n.d(e,"o",(function(){return w})),n.d(e,"i",(function(){return O})),n.d(e,"c",(function(){return U})),n.d(e,"g",(function(){return D})),n.d(e,"z",(function(){return F})),n.d(e,"y",(function(){return G})),n.d(e,"x",(function(){return B})),n.d(e,"n",(function(){return N}));var r,i,u,o;n("bSeV");!function(t){t.America="NA",t.Europe="EU",t.Asia="AS"}(o||(o={}));var a="/streams",c="/api/v1/streams",d="",s="",f=((r={})[o.America]="",r[o.Europe]="",r[o.Asia]="",r),m="",l="",S="",h="";function p(t){s=t.tvLiveUrl,d=t.antUrl,m=t.tvLiveMediaUrl,f=t.antMediaUrls,h=t.recordMediaUrl,l=m+"/previews/",S="https://"+s+"/graphql"}function v(){return S}function E(t){return void 0===t&&(t=o.America),g(t)+"/WebRTCAppEE/previews/"}function j(){return l}function g(t){return void 0===t&&(t=o.America),f[t]}function _(t){return t.domain?"rtmp://"+t.domain+"/WebRTCAppEE/":"rtmp://"+d+"/WebRTCAppEE/"}function R(t){return!!t&&Date.now()<new Date(t).getTime()+5184e6}var A,b,L="apply-common-tooltip";!function(t){t.Live="Live",t.Recent="Recent",t.Upcoming="Upcoming"}(A||(A={})),function(t){t.General="General",t.Stream="Stream",t.Source="Source",t.Advanced="Advanced"}(b||(b={}));var T,y,w,O,U,P,D,I=[b.General,b.Stream];!function(t){t.Live="live",t.Ended="ended",t.Scheduled="scheduled"}(T||(T={})),function(t){t.Browser="browser",t.External="external"}(y||(y={})),function(t){t.Public="public",t.Private="private"}(w||(w={})),function(t){t.Now="now",t.Scheduled="scheduled"}(O||(O={})),function(t){t.LiveTrading="Live trading",t.Education="Education",t.Analysis="Analysis",t.OffTopic="Off-topic"}(U||(U={})),function(t){t.Stream="stream",t.List="list",t.Settings="settings"}(P||(P={})),function(t){t.YouTube="youtube",t.Twitch="twitch"}(D||(D={}));var N,F=[{content:U.LiveTrading,value:U.LiveTrading},{content:U.Education,value:U.Education},{content:U.Analysis,value:U.Analysis},{content:U.OffTopic,value:U.OffTopic}],G=((i={})[A.Live]=T.Live,i[A.Recent]=T.Ended,i[A.Upcoming]=T.Scheduled,i),B=((u={})[T.Live]=A.Live,u[T.Scheduled]=A.Upcoming,u[T.Ended]=A.Recent,u);!function(t){t.InternalServerError="INTERNAL_SERVER_ERROR",t.MediaServerError="MEDIA_SERVER_ERROR",t.RecorderError="RECORDER_ERROR",t.ForbiddenError="FORBIDDEN",t.UserInputError="BAD_USER_INPUT",t.ValidationError="GRAPHQL_VALIDATION_FAILED",t.AuthenticationError="UNAUTHENTICATED",
t.SyntaxError="GRAPHQL_PARSE_FAILED",t.HostsMappingError="HOSTS_MAPPING_ERROR",t.YoutubeError="YOUTUBE_ERROR"}(N||(N={}))},"4Hmh":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n("mrSG"),i=n("34Bw"),u={default:null,widget:null},o=function(){function t(t){var e,n=this;this.isFilled=!1,this.pageSize=10,this._paginationPages=((e={})[i.j.Live]=1,e[i.j.Scheduled]=1,e[i.j.Ended]=1,e),this.getStreamsByTab=function(t,e){var u=i.y[t];return e?Object(r.f)([],n._getStreams(u).filter((function(t){return t.visibility===i.o.Private}))):Object(r.f)([],n._getStreams(u))},this.findStream=function(t){return n._streamsArray.find((function(e){return e.url===t}))},this.getAuthor=function(t){var e=n._streamsArray.find((function(e){return e.author.id===t}));return null==e?void 0:e.author},this.addStream=function(t){var e=t.state;return n._setStreams(e,Object(r.f)([t],n._getStreams(e))),n._getStreams(e)},this.addStreamsBatch=function(t,e){return n._setStreams(e,Object(r.f)(Object(r.f)([],t),n._getStreams(e))),n._getStreams(e)},this.deleteStream=function(t){var e=n.findStream(t);if(e){var r=n._getStreams(e.state),i=r.findIndex((function(e){return e.url===t}));-1!==i&&(r.splice(i,1),n._setStreams(e.state,r))}},t?(this[i.j.Live]=t[i.j.Live]||[],this[i.j.Scheduled]=t[i.j.Scheduled]||[],this[i.j.Ended]=t[i.j.Ended]||[]):(this[i.j.Live]=[],this[i.j.Scheduled]=[],this[i.j.Ended]=[])}return Object.defineProperty(t.prototype,"_streamsArray",{get:function(){return Object(r.f)(Object(r.f)(Object(r.f)([],this._getStreams(i.j.Live)),this._getStreams(i.j.Scheduled)),this._getStreams(i.j.Ended))},enumerable:!1,configurable:!0}),t.prototype.setGqlStreamsTree=function(t,e){var n=function(t){return Object(r.a)(Object(r.a)({},t),{author:e})};this._setStreams(i.j.Live,(t[i.j.Live]||[]).map(n)),this._setStreams(i.j.Scheduled,(t[i.j.Scheduled]||[]).map(n)),this._setStreams(i.j.Ended,(t[i.j.Ended]||[]).map(n)),this.isFilled=!0},t.prototype.setStreamsTree=function(t){this._setStreams(i.j.Live,t[i.j.Live]||[]),this._setStreams(i.j.Scheduled,t[i.j.Scheduled]||[]),this._setStreams(i.j.Ended,t[i.j.Ended]||[]),this.isFilled=!0},t.prototype.find=function(t){return this._streamsArray.find(t)},t.prototype.changeStream=function(t,e){this.deleteStream(t),this.addStream(e)},t.prototype.createStream=function(t,e){var n=Object(r.a)(Object(r.a)({},t),{author:e});return this.addStream(n),n},t.prototype.getProfileStreams=function(){return Object(r.f)(Object(r.f)([],this[i.j.Live]),this[i.j.Scheduled])},t.prototype.getWidgetStreams=function(){var t;return(t={})[i.j.Live]=this[i.j.Live],t[i.j.Ended]=this[i.j.Ended],t},t.prototype.getPage=function(t){return this._paginationPages[t]},t.prototype.setPage=function(t,e){this._paginationPages[t]=e},t.getInstance=function(e){return void 0===e&&(e="default"),null===u[e]&&(u[e]=new t),u[e]},t.prototype._getStreams=function(t){return this[t]},t.prototype._setStreams=function(t,e){this[t]=this._sortStreams(t,e)},t.prototype._sortStreams=function(t,e){return e.sort(this._getSortedFunc(t))},
t.prototype._getSortedFunc=function(t){switch(t){case i.j.Live:return function(t,e){return t.viewersCount-e.viewersCount};case i.j.Scheduled:return function(t,e){return new Date(t.plannedTime).getTime()-new Date(e.plannedTime).getTime()};case i.j.Ended:return function(t,e){return e.startTime&&t.startTime?new Date(e.startTime).getTime()-new Date(t.startTime).getTime():1}}},t}();i.j.Live,i.j.Scheduled,i.j.Ended},R1a7:function(t,e,n){"use strict";function r(t){return n.e("notification-tools").then(n.bind(null,"6USG")).then((function(e){return new e.StreamNotificationTools(t)}))}n.d(e,"a",(function(){return r}))}}]);