'+il+""}),f=Ew=0,p=t.length;f',Fv)&&y(c.setID,"mod")&&(d=!0);if(o.fragments)for(h=0,m=o.fragments.length;h"+t[f].commenter.displayName+C2(t[f].commenter.displayName,t[f].commenter.login)+""+(o.is_action?"":":")+" ")+'"+r+"",_={chat_number:0,time:t[f].contentOffsetSeconds,message:i,atstreamer:n,atuser:s,mod:d,fromstreamer:l,hasbits:!1},g?I2(_):""!==Dw&&P2(_)}g&&b[0]===a&&(Hw=!1,M2(a),""!==Dw)&&D2(a)}}function C2(e,a){return e&&Kw.test(e)?" ("+a+")":""}function I2(e){Ow.push(e)}function P2(e){Tw.push(e)}function M2(e){Hw||Uw||b[0]!==e||r.Play_ChatForceDisable||(T2(e),Iw=m3(function(){T2(e)},1e3,Iw),m)||a2()}function V2(){o(Pw),o(Mw),_3(Iw),_3(Vw)}function O2(){Uw=!1,V2(),b[0]=0,bS(zw[0]),bS(zw[1]),Dw=null,Ow=[],Tw=[],Jw={},Sw(Rw=0),Sw(1),Zb(0)}function T2(e){var a,t=Ow.length;if(Rw'+u+u+Yt+u+u+""}),Uw=!0,_3(Iw))}function D2(e){Uw||b[0]!==e||E2(e)}function E2(e){""!==Dw&&gk(IC,yT,B2,V,e,0,"POST",Qw.replace("%v",r.ChannelVod_vodId).replace("%c",Dw))}function B2(e,a){Uw||b[0]!==a||(200===e.status?j2(e.responseText,a):N2(a))}function N2(e){b[0]===e&&(Mw=A(function(){E2(e,0)},2500,Mw))}function L2(){O2(),G2(Ot+u+Tt),m||e2()}function q2(){O2(),G2(ji)}function G2(e){var a=" ",a=(a+='')+e+"";(e=document.createElement("div")).className="chat_line",e.innerHTML=a,zw[0].appendChild(e),zw[1].appendChild(e.cloneNode(!0))}function z2(e){for(var a=zw[e].getElementsByClassName("chat_line_holder"),t=0,i=a.length-Fw;t'+f+f+At),d("channel_content_titley_1",''+f+f+xe),d("channel_content_titley_2",''+f+f+Ka),c("dialog_hist_setting_name_0",Fn),c("dialog_hist_setting_name_2",Hn),c("dialog_hist_setting_name_3",Ku),c("dialog_hist_setting_summary_3",Wu),c("dialog_hist_val_2",es),c("dialog_opt_text",ss),c("dialog_thumb_opt_setting_name_-1",hs),c("dialog_thumb_opt_val_-1",es),c("dialog_thumb_opt_setting_name_0",us),c("dialog_thumb_opt_setting_name_1",cs),c("dialog_thumb_opt_setting_name_3",_p),c("dialog_thumb_opt_setting_name_4",gp),c("dialog_thumb_opt_setting_name_5",yp),c("dialog_thumb_opt_setting_name_6",ls),c("dialog_thumb_opt_setting_name_7",gi),c("dialog_thumb_opt_setting_name_8",K),d("dialog_multi_help_text",Cs),c("chat_send_button0",sd),c("chat_send_button1",yl),c("chat_send_button2",Bl),c("chat_send_button3",xl),c("chat_send_button4",Sl),c("chat_send_button5",jl),c("chat_send_button6",Ml),c("chat_send_button7",Il),c("chat_send_button8",wl),c("chat_send_button9",Al),c("chat_send_button10",kl),c("chat_send_button11",Cl),c("chat_result",Pl),Pv(),c("update_dialog_changebutton",Dc),c("update_dialog_exit",ua),d("feed_end_1",Ct),d("feed_end_3",Z),d("feed_end_4",W+f+Z),d("feed_end_5",Z+f+zn),d("feed_end_7",W+f+"VOD"),d("feed_end_8","VOD "+zn),d("icon_feed_back",f)}function zA(e,a,t,i){d(e,'
'+f+t+"
")}function t(e){RA(_(e))}function RA(e){e&&e.classList.add("hide")}function l(e){UA(_(e))}function UA(e){e&&e.classList.remove("hide")}function FA(e){return HA(_(e))}function HA(e){return!y(e?e.className:"","hide")}function h(e,a){JA(_(e),a)}function JA(e,a){e.classList.add(a)}function n(e,a){XA(_(e),a)}function XA(e,a){e&&e.classList.remove(a)}function d(e,a){YA(_(e),a)}function YA(e,a){e&&(e.innerHTML=a)}function c(e,a){QA(_(e),a)}function QA(e,a){e&&(e.textContent=a)}function KA(e){e&&e.remove()}function WA(e){var a=_(e).getElementsByClassName("emoji");if(a){for(var t=0,i=a.length;t"+u+Aa+u+u+Sa+u+u+An+u+u+Xp+(e=X2?e:m?eh+Sn+""+u+kn+u+u:eh+Af+""+u+Sf+u+u)+eh+ca+""),l("welcome_dialog")}function _4(){t("welcome_dialog")}function g4(){return FA("welcome_dialog")}function v4(e,a){x("keydown",e),w("keydown",a),f4(),l("dialog_controls"),A3("Controls")}function b4(){t("dialog_controls")}function y4(){return FA("dialog_controls")}function w4(e){return e&&(e+"").replace(/\B(?=(\d{3})+(?!\d))/g,",")}function x4(e){return 1===e?Ie:Pe}function A4(e){return 1===e?je:Ce}function S4(e){return!y(e+"","live")}function k4(e,a,t){return null!==_(t+e+"_"+a)}function j4(e){rQ()?(w("keydown",lK),JY||SQ(),UT&&x7(),sQ(!0)):C4(!1,e)}function C4(e,a){r4(),r.Main_Go!==cx&&(r.Main_BeforeChannelisSet=!1),r.Main_Go!==hx&&(r.Main_BeforeAgameisSet=!1),M[r.Main_Go]?M[r.Main_Go].init_fun(a):M[1].init_fun(),e&&x("keydown",M[r.Main_Go].key_fun)}function I4(){SA=r.Search_isSearching?r.Main_Go:(r.Main_BeforeSearch=r.Main_Go,null),T4(r.Main_Go),r.Main_Go=K2,r4(),s4(),ZU()}function P4(){HH=hH,T4(r.Main_Go),r.Main_Go=yx,r4(),s4(),K7()}function M4(){kA=A(V4,500,kA)}function V4(){g("Main_values",JSON.stringify(r)),g("Play_data",JSON.stringify(k))}function O4(){r=c9(r,ok("Main_values",{})),k=c9(k,ok("Play_data",{}))}function T4(e){M[e]&&M[e].exit_fun&&M[e].exit_fun(),FA("settings_holder")&&DH()}function D4(){zA("label_refresh","icon-refresh",L+":"+vt),zA("label_thumb","icon-options",_s)}function E4(){zA("label_thumb","icon-return",ue)}function B4(e){return e=new Date(e),Bx?e.getDate()+" "+bt[e.getMonth()]+" "+e.getFullYear():bt[e.getMonth()]+" "+e.getDate()+" "+e.getFullYear()}function N4(e){return B4(e)+" "+(e=new Date(e)).getHours()+":"+K8(e.getMinutes())}var L4=!0,q4,G4,z4,R4,U4,F4;function H4(e){var a,t,i,o,n,s;L4&&(m?(t=Rj(),i=$j(),o=Uj(),n=Fj(),p3("Webviewversion "+i),a="Apk: "+uA+" Web: "+Pm.WebVersion+(i?" Webview: "+i:"")+" Device: "+o+" - "+t+" Sdk: "+n,s=K4(uA),O.update_background.defaultValue||(s?Q4(!(z4=!0)):e||J4()),O3(uA,Pm.WebVersion,i,t,n,o)):(a=Pm.VersionBase+"."+Pm.publishVersionCode+" - "+Pm.WebVersion,O3(uA,Pm.WebVersion,navigator.appVersion,navigator.platform,"Browser","Browser")),d("dialog_about_text",uh+a+u+th+n_+""+u+''+fh),Jx=(new Date).getTime())}function J4(e){!L4||z4&&_S()&&O.update_background.defaultValue&&!e||(y(window.location.href,"https://fgl27.github.io")?dk("https://fgl27.github.io/SmartTwitchTV/release/githubio/version/version.json",Y4,X4):A(function(){R4=!1,uS(),Z4()},1e3))}function X4(){_S()&&O7(Uc)}function Y4(e){R4=!1,iS=ZS();var a=(e=JSON.parse(e)).WebTag>Pm.WebTag,t=m&&Pm.publishVersionCode'+f+(e?Jc:Hc)+Yc+"
"),_S()?uS():O.update_show.defaultValue||a?cA||1!==O.update_show.defaultValue||(a=(e?Jc:Hc)+Yc,m?O7(a):(MS()?d4:rD)(a,3e3),cA=!0):hS()}function K4(e){var a=(e=e.split("."))[0]+"."+e[1],e=parseInt(e[2]),t=parseFloat(a)"+(z4?U4?Jc:Hc:Lc)+u+(!z4&&iS?Xc+iS:f)+""+u+eh+qc+f+""+u,a=Pm.changelog,t=(e+=eh+a[0].title+""+u+ah,a[0].changes.length),i=0;i")}function fS(){pS(),hS()}function pS(){R4=!0,_("update_dialog_upbutton").style.width="30%",d("update_dialog_upbutton",Rc),J4(!0)}function hS(){uS(),$k(!0,rS,!0),W4(),rQ()?(lQ(),mQ()):KK()&&BS()?jW(N):Dz()&&lq(r.Main_Go),l("update_dialog"),oS=!0,A3("UpdateDialog")}function mS(e){tS=0,t("update_dialog"),oS=!1,e||($k(!1,rS),rQ()?sQ(!0):KK()?fW(!0,N):MS()&&!UQ()&&M[r.Main_Go].init_fun())}function _S(){return oS}function gS(){for(var e,a,t=eh+Tc+""+Ec+th+"https://tinyurl.com/sttvchanges
",i=Pm.changelog,o=0,n=i.length;o"+ah,a=i[o].changes.length,e=0;e
"}d("dialog_changelod_text",t+eh+fa+"")}function vS(e){bS(_(e))}function bS(e){if(e)for(;e.firstChild;)e.removeChild(e.firstChild)}function yS(e){Q2=e}function wS(e){var a=0;return Q2'+e+""}):""}function Ak(e,a,t){var i;!e0()||!a||!a[0]||"live"===e&&M[gx].histPosX[1]||"vod"===e&&M[vx].histPosX[1]||"clip"===e&&M[bx].histPosX[1]||((i=Vk(e,a[7]))?(i.data=zk(a),i.date=t?i.date:(new Date).getTime(),i.game=a[3],i.views=a[13]):(1999a.id?-1:e.ida[t]?-1:e[t] '),UA(sV),SK=!1,$C(),mM(),IP(3),IW(),pC=!(dT=!1),(UT?(UC(HT),WT):yC?XC:qC)(),wC?-1!==wR&&(Ew=wR,Zw()):L2(),yC=!1,wC?TC():(c("end_vod_name_text_2",""),d("end_vod_title_text_2",""),S[KM].setLabel("")),r8(r.Main_selectedChannel_id),vD(3),S[XM].setLabel(r.Main_selectedChannelDisplayname),MI(r.Main_selectedChannel_id)}function OC(){YN=!1,JN((vT=AC)[qB=0])}function TC(){r.ChannelVod_vodId&&dk(tA+"videos?id="+r.ChannelVod_vodId,DC,V,null,null,!0)}function DC(e){(e=JSON.parse(e)).data&&e.data.length&&(e=e.data[0],d("end_vod_title_text_2",kR=xk(e.title)),S[KM].setLabel(kR,r.Main_selectedChannelDisplayname),eI(NM,e.thumbnail_url.replace("%{width}x%{height}",Mx)+pA))}function EC(){cC=(new Date).getTime(),gk(IC,bT,BC,V,0,cC,"POST",MC.replace("%x",_R))}function BC(e,a,t){pC&&cC===t&&(200===e.status&&(t=JSON.parse(e.responseText)).data&&t.data.clip&&(t.data.clip.videoOffsetSeconds||0===t.data.clip.videoOffsetSeconds)?(wR=t.data.clip.videoOffsetSeconds||1,xI()):wI(Vf))}function NC(){uC=(new Date).getTime(),gk(IC,bT,LC,V,0,uC,"POST",MC.replace("%x",_R))}function LC(e,a,t){pC&&uC===t&&200===e.status&&(t=JSON.parse(e.responseText)).data&&t.data.clip&&(e=t.data.clip,-1===wR&&(e.videoOffsetSeconds?(Ew=wR=e.videoOffsetSeconds,Zw):L2)(),e.game&&e.game.displayName&&(d("stream_info_game",ee+e.game.displayName),pR=e.game.displayName,k.data[3]=pR,S[YM].setLabel(k.data[3])),e.broadcaster)&&(d("stream_info_name",pP(e.broadcaster.displayName,e.broadcaster.roles&&e.broadcaster.roles.isPartner,2,vR)),x8(_("stream_info_icon"),e.broadcaster.profileImageURL),r.Main_selectedChannelDisplayname=e.broadcaster.displayName,r.Main_selectedChannelPartner=e.broadcaster.roles.isPartner,k.data[5]=e.broadcaster.profileImageURL)}function qC(){fC=(new Date).getTime(),gk(IC,bT,GC,V,0,fC,"POST",PC.replace("%x",_R))}function GC(e,a,t){pC&&fC===t&&(200===e.status&&(t=RC(e.responseText)).length?UC(t):zC())}function zC(){dD(),rD(fn,2e3),A(function(){$D(3)},2e3)}function RC(e){var a,t=[],i=JSON.parse(e);if(i&&i.hasOwnProperty("data")&&i.data.hasOwnProperty("clip")&&i.data.clip){a="?sig="+encodeURIComponent(i.data.clip.playbackAccessToken.signature)+"&token="+encodeURIComponent(i.data.clip.playbackAccessToken.value),(i=i.data.clip.videoQualities).sort(function(e,a){return a.quality-e.quality});for(var o=0,n=i.length;oa.values.length-1&&(a.defaultValue=a.values.length-1),a.bottomArrows(),O[e].defaultValue=a.defaultValue,g(e,a.defaultValue+1)}function FI(){(!FV[0]&&FV[1]||!UV[0]&&UV[1])&&HI(0)}function HI(e,a){FV[e]=1,UV[e]=a?T("screen_preview_volume")*wH:100,G7(),q7(),z7()}function JI(){var e,a;if(YO){for(e=x6,a=P6+1;e
')}function QI(e,a,t){UV[e]+=a*wH,UV[e]<0?UV[e]=0:100