'+Ft+v+w.Main_selectedChannelDisplayname+v+_w+""}),i2({chat_number:0,time:0,message:''+tl+""})),f=fw=0,p=t.length;f',Iv)&&x(c.setID,"mod")&&(d=!0);if(o.fragments)for(h=0,_=o.fragments.length;h<_;h++)(u=o.fragments[h]).emote?r+=r$(d$(u.emote.emoteID)):(r+=Hy([u.text],0,0),!n&&jv&&wb[0].test(u.text)?n=!0:!s&&Pv&&fb.test(u.text)&&(s=!0));Cv&&ck(t[f].commenter.displayName.toLowerCase(),Zv[0])?l=!0:Mv&&ck(t[f].commenter.displayName.toLowerCase(),b[0].display_name.toLowerCase())&&(s=!0),m=n||d||l?bb:s?yb:!hb&&o.userColor?'style="color: '+o.userColor+';"':'style="color: '+mw[t[f].commenter.displayName.charCodeAt(0)%gw]+';"',i=(i+=""+t[f].commenter.displayName+t2(t[f].commenter.displayName,t[f].commenter.login)+""+(o.is_action?"":":")+" ")+'"+r+"",m={chat_number:0,time:t[f].contentOffsetSeconds,message:i,atstreamer:n,atuser:s,mod:d,fromstreamer:l,hasbits:!1},g?i2(m):""!==uw&&o2(m)}g&&y[0]===a&&(xw=!1,n2(a),""!==uw)&&r2(a)}}function t2(e,a){return e&&jw.test(e)?" ("+a+")":""}function i2(e){rw.push(e)}function o2(e){cw.push(e)}function n2(e){xw||yw||y[0]!==e||w.Play_ChatForceDisable||(d2(e),nw=Ek(function(){d2(e)},1e3,nw),_)||Vw()}function s2(){o(sw),o(lw),Nk(nw),Nk(dw)}function l2(){yw=!1,s2(),y[0]=0,F4(vw[0]),F4(vw[1]),uw=null,rw=[],cw=[],Aw={},aw(bw=0),aw(1),Eb(0)}function d2(e){var a,t=rw.length;if(bw'+p+p+Xt+p+p+""}),yw=!0,Nk(nw))}function r2(e){yw||y[0]!==e||c2(e)}function c2(e){""!==uw&&GS(J7,jO,u2,V,e,0,"POST",kw.replace("%v",w.ChannelVod_vodId).replace("%c",uw))}function u2(e,a){yw||y[0]!==a||(200===e.status?a2(e.responseText,a):f2(a))}function f2(e){y[0]===e&&(lw=A(function(){c2(e,0)},2500,lw))}function p2(){l2(),_2(Ot+p+Dt),_||Mw()}function h2(){l2(),_2(ki)}function _2(e){var a=" ",a=(a+='')+e+"";(e=document.createElement("div")).className="chat_line",e.innerHTML=a,vw[0].appendChild(e),vw[1].appendChild(e.cloneNode(!0))}function m2(e){for(var a=vw[e].getElementsByClassName("chat_line_holder"),t=0,i=a.length-ww;t'+v+v+At),u("channel_content_titley_1",''+v+v+xe),u("channel_content_titley_2",''+v+v+Ka),r("dialog_hist_setting_name_0",Fn),r("dialog_hist_setting_name_2",Un),r("dialog_hist_setting_name_3",Qu),r("dialog_hist_setting_summary_3",Yu),r("dialog_hist_val_2",$n),r("dialog_opt_text",ns),r("dialog_thumb_opt_setting_name_-1",ps),r("dialog_thumb_opt_val_-1",$n),r("dialog_thumb_opt_setting_name_0",cs),r("dialog_thumb_opt_setting_name_1",rs),r("dialog_thumb_opt_setting_name_3",hp),r("dialog_thumb_opt_setting_name_4",_p),r("dialog_thumb_opt_setting_name_5",vp),r("dialog_thumb_opt_setting_name_6",ss),r("dialog_thumb_opt_setting_name_7",mi),r("dialog_thumb_opt_setting_name_8",K),u("dialog_multi_help_text",js),r("chat_send_button0",nd),r("chat_send_button1",bl),r("chat_send_button2",Bl),r("chat_send_button3",wl),r("chat_send_button4",Al),r("chat_send_button5",kl),r("chat_send_button6",Pl),r("chat_send_button7",Cl),r("chat_send_button8",yl),r("chat_send_button9",xl),r("chat_send_button10",Sl),r("chat_send_button11",jl),r("chat_result",Il),pv(),r("update_dialog_changebutton",Dc),r("update_dialog_exit",ua),u("feed_end_1",Ct),u("feed_end_3",Z),u("feed_end_4",W+v+Z),u("feed_end_5",Z+v+zn),u("feed_end_7",W+v+"VOD"),u("feed_end_8","VOD "+zn),u("icon_feed_back",v)}function vA(e,a,t,i){u(e,'
'+v+t+"
")}function t(e){bA(m(e))}function bA(e){e&&e.classList.add("hide")}function l(e){yA(m(e))}function yA(e){e&&e.classList.remove("hide")}function wA(e){return xA(m(e))}function xA(e){return!x(e?e.className:"","hide")}function h(e,a){AA(m(e),a)}function AA(e,a){e.classList.add(a)}function d(e,a){SA(m(e),a)}function SA(e,a){e&&e.classList.remove(a)}function u(e,a){kA(m(e),a)}function kA(e,a){e&&(e.innerHTML=a)}function r(e,a){jA(m(e),a)}function jA(e,a){e&&(e.textContent=a)}function CA(e){e&&e.remove()}function IA(e){var a=m(e).getElementsByClassName("emoji");if(a){for(var t=0,i=a.length;t"+p+Aa+p+p+Sa+p+p+xn+p+p+Pp+(e=x2?e:_?Bp+An+""+p+Sn+p+p:Bp+wf+""+p+xf+p+p)+Bp+ca+""),l("welcome_dialog")}function XA(){t("welcome_dialog")}function QA(){return wA("welcome_dialog")}function YA(e,a){g("keydown",e),n("keydown",a),FA(),l("dialog_controls"),Uk("Controls")}function KA(){t("dialog_controls")}function WA(){return wA("dialog_controls")}function ZA(e){return e&&(e+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")}function $A(e){return 1===e?Ie:Pe}function e4(e){return 1===e?je:Ce}function a4(e){return!x(e+"","live")}function t4(e,a,t){return null!==m(t+e+"_"+a)}function i4(e){IX()?(n("keydown",jQ),uX||FX(),HO&&G3(),kX(!0)):o4(!1,e)}function o4(e,a){zA(),w.Main_Go!==q2&&(w.Main_BeforeChannelisSet=!1),w.Main_Go!==F2&&(w.Main_BeforeAgameisSet=!1),M[w.Main_Go]?M[w.Main_Go].init_fun(a):M[1].init_fun(),e&&g("keydown",M[w.Main_Go].key_fun)}function n4(){w.Search_isSearching||(w.Main_BeforeSearch=w.Main_Go),c4(w.Main_Go),w.Main_Go=k2,zA(),NA(),MR()}function s4(){bU=UF,c4(w.Main_Go),w.Main_Go=Y2,zA(),NA(),_7()}function l4(){eA=A(d4,500,eA)}function d4(){c("Main_values",JSON.stringify(w)),c("Play_data",JSON.stringify(k))}function r4(){w=WN(w,IS("Main_values",{})),k=WN(k,IS("Play_data",{}))}function c4(e){M[e]&&M[e].exit_fun&&M[e].exit_fun(),wA("settings_holder")&&dU()}function u4(){vA("label_refresh","icon-refresh",L+":"+vt),vA("label_thumb","icon-options",_s)}function f4(){vA("label_thumb","icon-return",ue)}function p4(e){return e=new Date(e),cx?e.getDate()+" "+bt[e.getMonth()]+" "+e.getFullYear():bt[e.getMonth()]+" "+e.getDate()+" "+e.getFullYear()}function h4(e){return p4(e)+" "+(e=new Date(e)).getHours()+":"+QD(e.getMinutes())}function _4(e){var a,t,i,o,n,s;_?(t=l3(),i=v3(),o=d3(),n=r3(),Tk("Webviewversion "+i),a="Apk: "+Gx+" Web: "+c_.WebVersion+(i?" Webview: "+i:"")+" Device: "+o+" - "+t+" Sdk: "+n,s=y4(Gx),O.update_background.defaultValue||(s?b4(!(iA=!0)):e||m4()),$k(Gx,c_.WebVersion,i,t,n,o)):(a=c_.VersionBase+"."+c_.publishVersionCode+" - "+c_.WebVersion,$k(Gx,c_.WebVersion,navigator.appVersion,navigator.platform,"Browser","Browser")),u("dialog_about_text",Jp+a+p+Np+X_+""+p+''+Xp),Ax=(new Date).getTime()}function m4(e){iA&&z4()&&O.update_background.defaultValue&&!e||(x(window.location.href,"https://fgl27.github.io")?OS("https://fgl27.github.io/SmartTwitchTV/release/githubio/version/version.json",v4,g4):A(function(){oA=!1,B4(),x4()},1e3))}function g4(){z4()&&W3(Rc)}function v4(e){oA=!1,C4=xS();var a=(e=JSON.parse(e)).WebTag>c_.WebTag,t=_&&e.publishVersionCode>c_.publishVersionCode;c_.changelog=JSON.parse(JSON.stringify(e.changelog)),c_.ApkUrl=e.ApkUrl,a||t?(iA=!0,b4(nA=!t&&a)):z4()&&(B4(),W3(Fc)),x4()}function b4(e,a){u("label_update",'
'+v+(e?Hc:Uc)+Xc+"
"),z4()?B4():O.update_show.defaultValue||a?zx||1!==O.update_show.defaultValue||(a=(e?Hc:Uc)+Xc,_?W3(a):(eS()?qA:lT)(a,3e3),zx=!0):L4()}function y4(e){var a=(e=e.split("."))[0]+"."+e[1],e=parseInt(e[2]),t=parseFloat(a)"+(iA?nA?Hc:Uc:Nc)+p+(!iA&&C4?Jc+C4:v)+""+p+Bp+Lc+v+""+p,a=c_.changelog,t=(e+=Bp+a[0].title+""+p+Ep,a[0].changes.length),i=0;i")}function E4(){N4(),L4()}function N4(){oA=!0,m("update_dialog_upbutton").style.width="30%",u("update_dialog_upbutton",Gc),m4(!0)}function L4(){B4(),yk(!0,D4,!0),w4(),IX()?(jX(),TX()):_Y()&&sS()?HY(N):wz()&&QL(w.Main_Go),l("update_dialog"),I4=!0,Uk("UpdateDialog")}function q4(e){j4=0,t("update_dialog"),I4=!1,e||(yk(!1,D4),IX()?kX(!0):_Y()?VY(!0,N):eS()&&!dQ()&&M[w.Main_Go].init_fun())}function z4(){return I4}function G4(){for(var e,a,t=Bp+Oc+""+Tc+Np+"https://tinyurl.com/sttvchanges
",i=c_.changelog,o=0,n=i.length;o"+Ep,a=i[o].changes.length,e=0;e
"}u("dialog_changelod_text",t+Bp+fa+"")}function R4(e){F4(m(e))}function F4(e){if(e)for(;e.firstChild;)e.removeChild(e.firstChild)}function U4(e){S2=e}function H4(e){var a=0;return S2'+e+""}):""}function XS(e,a,t){var i;!Rm()||!a||!a[0]||"live"===e&&M[J2].histPosX[1]||"vod"===e&&M[X2].histPosX[1]||"clip"===e&&M[Q2].histPosX[1]||(-1<(i=ek(e,a[7]))?((i=f[b[0].id][e][i]).data=dk(a),i.date=t?i.date:(new Date).getTime(),i.game=a[3],i.views=a[13]):(1999a.date?1:0}),"vod"!==e&&"clip"!==e||(QS[f[b[0].id][e][0].data[7]]=0),f[b[0].id][e].shift()),f[b[0].id][e].push({data:dk(a),date:(new Date).getTime(),name:a[6]?a[6].toLowerCase():"",game:a[3],id:a[7],views:a[13],created_at:new Date(a[12]).getTime(),watched:0}),"live"===e&&f[b[0].id][e].sort(function(e,a){return e.id>a.id?-1:e.ida[t]?1:0}):e.sort(function(e,a){return e[t]>a[t]?-1:e[t] '),yA(SV),FQ=!1,gC(),DP(),JI(3),XY(),V7=!(_O=!1),(HO?(lC(XO),$O):L7?uC:iC)(),q7?-1!==dG&&(fw=dG,Iw()):p2(),L7=!1,q7?W7():(r("end_vod_name_text_2",""),u("end_vod_title_text_2",""),S[hM].setLable("")),uD(w.Main_selectedChannel_id),mT(3),S[uM].setLable(w.Main_selectedChannelDisplayname),QC(w.Main_selectedChannel_id)}function K7(){BE=!1,DE((SO=G7)[IB=0])}function W7(){w.ChannelVod_vodId&&OS(Ox+"videos?id="+w.ChannelVod_vodId,Z7,V,null,null,!0)}function Z7(e){(e=JSON.parse(e)).data&&e.data.length&&(e=e.data[0],u("end_vod_title_text_2",fG=JS(e.title)),S[hM].setLable(fG,w.Main_selectedChannelDisplayname),vC(aM,e.thumbnail_url.replace("%{width}x%{height}",ox)+Fx))}function $7(){I7=(new Date).getTime(),GS(J7,kO,eC,V,0,I7,"POST",Q7.replace("%x",iG))}function eC(e,a,t){V7&&I7===t&&(200===e.status&&(t=JSON.parse(e.responseText)).data&&t.data.clip&&t.data.clip.videoOffsetSeconds?(dG=t.data.clip.videoOffsetSeconds,zC()):qC(Pf))}function aC(){P7=(new Date).getTime(),GS(J7,kO,tC,V,0,P7,"POST",Q7.replace("%x",iG))}function tC(e,a,t){V7&&P7===t&&200===e.status&&(t=JSON.parse(e.responseText)).data&&t.data.clip&&(e=t.data.clip,-1===dG&&(e.videoOffsetSeconds?(dG=e.videoOffsetSeconds,fw=dG,Iw):p2)(),e.game&&e.game.displayName&&(u("stream_info_game",ee+e.game.displayName),eG=e.game.displayName,k.data[3]=eG,S[fM].setLable(k.data[3])),e.broadcaster)&&(u("stream_info_name",VI(e.broadcaster.displayName,e.broadcaster.roles&&e.broadcaster.roles.isPartner,2,nG)),xD(m("stream_info_icon"),e.broadcaster.profileImageURL),w.Main_selectedChannelDisplayname=e.broadcaster.displayName,w.Main_selectedChannelPartner=e.broadcaster.roles.isPartner,k.data[5]=e.broadcaster.profileImageURL)}function iC(){M7=(new Date).getTime(),GS(J7,kO,oC,V,0,M7,"POST",X7.replace("%x",iG))}function oC(e,a,t){V7&&M7===t&&(200===e.status&&(t=sC(e.responseText)).length?lC(t):nC())}function nC(){sT(),lT(cn,2e3),A(function(){WT(3)},2e3)}function sC(e){var a=[],t=JSON.parse(e);if(t&&t.hasOwnProperty("data")&&t.data.hasOwnProperty("clip")&&t.data.clip)for(var i="?sig="+encodeURIComponent(t.data.clip.playbackAccessToken.signature)+"&token="+encodeURIComponent(t.data.clip.playbackAccessToken.value),o=0,n=(t=t.data.clip.videoQualities).length;oa.values.length-1&&(a.defaultValue=a.values.length-1),a.bottomArrows(),O[e].defaultValue=a.defaultValue,c(e,a.defaultValue+1)}function dI(){(!d5[0]&&d5[1]||!l5[0]&&l5[1])&&rI(0)}function rI(e,a){d5[e]=1,l5[e]=a?D("screen_preview_volume")*WF:100,n7(),o7(),s7()}function cI(){var e,a;if(eO){for(e=zM,a=XM+1;e ')}function pI(e,a,t){l5[e]+=a*WF,l5[e]<0?l5[e]=0:100