ckplayer-plus 1.0.7 → 1.1.0

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.
@@ -1,2 +1,2 @@
1
- (function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):(e=e||self,e.ckplayer=t())})(this,function(){"use strict";var language={play:"%E6%92%AD%E6%94%BE",pause:"%E6%9A%82%E5%81%9C",refresh:"%E9%87%8D%E6%92%AD",full:"%E5%85%A8%E5%B1%8F",exitFull:"%E9%80%80%E5%87%BA%E5%85%A8%E5%B1%8F",webFull:"%E9%A1%B5%E9%9D%A2%E5%85%A8%E5%B1%8F",exitWebFull:"%E9%80%80%E5%87%BA%E9%A1%B5%E9%9D%A2%E5%85%A8%E5%B1%8F",theatre:"%E5%89%A7%E5%9C%BA%E6%A8%A1%E5%BC%8F",exitTheatre:"%E9%80%80%E5%87%BA%E5%89%A7%E5%9C%BA%E6%A8%A1%E5%BC%8F",volume:"%E9%9F%B3%E9%87%8F%EF%BC%9A",muted:"%E9%9D%99%E9%9F%B3",exitmuted:"%E6%81%A2%E5%A4%8D%E9%9F%B3%E9%87%8F",seek:"seek%EF%BC%9A",waiting:"%E7%BC%93%E5%86%B2",live:"%E7%9B%B4%E6%92%AD%E4%B8%AD",backLive:"%E8%BF%94%E5%9B%9E%E7%9B%B4%E6%92%AD",lookBack:"%E5%9B%9E%E7%9C%8B%EF%BC%9A",next:"%E4%B8%8B%E4%B8%80%E9%9B%86",screenshot:"%E8%A7%86%E9%A2%91%E6%88%AA%E5%9B%BE",smallwindows:"%E5%B0%8F%E7%AA%97%E5%8F%A3%E6%92%AD%E6%94%BE%E5%8A%9F%E8%83%BD",playbackrate:"%E5%80%8D%E9%80%9F",playbackrateSuffix:"%E5%80%8D",track:"%E5%AD%97%E5%B9%95",noTrack:"%E6%97%A0%E5%AD%97%E5%B9%95",definition:"%E6%B8%85%E6%99%B0%E5%BA%A6",switchTo:"%E5%88%87%E6%8D%A2%E6%88%90%EF%BC%9A",closeTime:"%7Bseconds%7D%E7%A7%92%E5%90%8E%E5%8F%AF%E5%85%B3%E9%97%AD%E5%B9%BF%E5%91%8A",closeAd:"%E5%85%B3%E9%97%AD%E5%B9%BF%E5%91%8A",second:"%E7%A7%92",details:"%E6%9F%A5%E7%9C%8B%E8%AF%A6%E6%83%85",copy:"%E5%A4%8D%E5%88%B6",copySucceeded:"%E5%A4%8D%E5%88%B6%E6%88%90%E5%8A%9F%EF%BC%8C%E5%8F%AF%E8%B4%B4%E7%B2%98%EF%BC%81",smallwindowsOpen:"%E5%B0%8F%E7%AA%97%E5%8F%A3%E5%8A%9F%E8%83%BD%E5%B7%B2%E5%BC%80%E5%90%AF",smallwindowsClose:"%E5%B0%8F%E7%AA%97%E5%8F%A3%E5%8A%9F%E8%83%BD%E5%B7%B2%E5%85%B3%E9%97%AD",screenshotStart:"%E6%88%AA%E5%9B%BE%E4%B8%AD%EF%BC%8C%E8%AF%B7%E7%A8%8D%E5%80%99...",screenshotClose:"%E6%88%AA%E5%9B%BE%E5%8A%9F%E8%83%BD%E5%B7%B2%E5%85%B3%E9%97%AD",loopOpen:"%E5%BE%AA%E7%8E%AF%E6%92%AD%E6%94%BE",loopClose:"%E5%B7%B2%E5%85%B3%E9%97%AD%E5%BE%AA%E7%8E%AF%E6%92%AD%E6%94%BE",close:"%E5%85%B3%E9%97%AD",down:"%E4%B8%8B%E8%BD%BD",p50:"50%25",p75:"75%25",p100:"100%25",timeScheduleAdjust:{prohibit:"%E8%A7%86%E9%A2%91%E7%A6%81%E6%AD%A2%E6%8B%96%E5%8A%A8",prohibitBackOff:"%E8%A7%86%E9%A2%91%E7%A6%81%E6%AD%A2%E9%87%8D%E5%A4%8D%E8%A7%82%E7%9C%8B",prohibitForward:"%E8%A7%86%E9%A2%91%E7%A6%81%E6%AD%A2%E5%BF%AB%E8%BF%9B",prohibitLookBack:"%E8%A7%86%E9%A2%91%E7%A6%81%E6%AD%A2%E6%92%AD%E6%94%BE%E9%83%A8%E5%88%86%E5%86%85%E5%AE%B9",prohibitForwardNotViewed:"%E8%A7%86%E9%A2%91%E7%A6%81%E6%AD%A2%E6%92%AD%E6%94%BE%E6%9C%AA%E8%A7%82%E7%9C%8B%E7%9A%84%E9%83%A8%E5%88%86"},error:{noMessage:"%E6%9C%AA%E7%9F%A5%E9%94%99%E8%AF%AF",supportVideoError:"%E8%AF%A5%E6%B5%8F%E8%A7%88%E5%99%A8%E7%89%88%E6%9C%AC%E5%A4%AA%E4%BD%8E%EF%BC%8C%E5%BB%BA%E8%AE%AE%E6%9B%B4%E6%8D%A2%E6%88%90%E5%85%B6%E5%AE%83%E6%B5%8F%E8%A7%88%E5%99%A8",videoTypeError:"%E8%AF%A5%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%8D%E6%94%AF%E6%8C%81%E6%92%AD%E6%94%BE%E8%AF%A5%E8%A7%86%E9%A2%91%EF%BC%8C%E5%BB%BA%E8%AE%AE%E6%9B%B4%E6%8D%A2%E6%88%90%E5%85%B6%E5%AE%83%E6%B5%8F%E8%A7%88%E5%99%A8",loadingFailed:"%E5%8A%A0%E8%BD%BD%E5%A4%B1%E8%B4%A5",emptied:"%E8%A7%86%E9%A2%91%E6%96%87%E4%BB%B6%E5%8A%A0%E8%BD%BD%E8%BF%87%E7%A8%8B%E4%B8%AD%E5%87%BA%E7%8E%B0%E9%94%99%E8%AF%AF",screenshot:"%E8%A7%86%E9%A2%91%E6%88%AA%E5%9B%BE%E5%A4%B1%E8%B4%A5",ajax:"Ajax%E6%95%B0%E6%8D%AE%E8%AF%B7%E6%B1%82%E9%94%99%E8%AF%AF",noVideoContainer:"%E6%9C%AA%E6%89%BE%E5%88%B0%E6%94%BE%E7%BD%AE%E8%A7%86%E9%A2%91%E7%9A%84%E5%AE%B9%E5%99%A8"}},videoObjectDefault={container:"",volume:.8,poster:"",autoplay:!1,loop:!1,live:!1,rotate:0,zoom:0,ad:null,backLive:!1,seek:0,next:null,loaded:"",plug:"",duration:0,preview:null,prompt:null,crossOrigin:"",video:null,type:"",playbackrate:1,ended:null,webFull:!1,theatre:null,controls:!1,rightBar:null,smallWindows:null,smallWindowsDrag:!0,screenshot:!1,timeScheduleAdjust:1,logo:"",menu:null,information:{"Load:":"{loadTime} second","Duration:":"{duration} second","Size:":"{videoWidth}x{videoHeight}","Volume:":"{volume}%","Fps:":"{fps}fps","Sudio decoded:":"{audioDecodedByteCount} Byte","Video decoded:":"{videoDecodedByteCount} Byte"},track:null,title:"",language:"",barHideTime:1500,playbackrateOpen:!0,playbackrateList:[.75,1,1.25,1.5,2,4],cookie:null,domain:null,cookiePath:"/",documentFocusPause:!1,mouseWheelVolume:2,keyVolume:2,errorShow:!0,pluginPath:"",autoPlug:!0,preferBuiltinPlug:!0,cdnFallback:!0},ckplayerPlusDefaultCdn="https://cdn.jsdelivr.net/npm/ckplayer-plus@1.0.7/dist/";function ckplayerEmbed(videoObj){var rightMenu=[{title:"ckplayer",link:"http://www.ckplayer.com"},{title:"version:X3",underline:!0},{title:"about",click:"aboutShow"}],vars={},varsTemp={},video=null,duration=0,mutedState="",recoveryVolume=!1,waited=!0,paused=!0,loadTime=0,seekTime=0,seekRetryTimer=null,seekRetryCount=0,seekApplyLock=!1,decodeRecoverCount=0,hlsStartPositionUsed=!1,oldTime=0,playTime=0,firstSeekTime=-1,maxSeeTime=0,isChangeDef=!0,playType="",msgSetTime=null,tipSetTime=null,mouseSetTime=null,adFrontSetTime=null,adPauseSetTime=null,closeTipFun=null,closeTipMouseOut=null,waitingMessage=!0,hidePreviewSetTime=null,pSliderMouseDown=!1,playbackTime=0,loadedmetadataNum=0,screenshotImg=null,ad=null,frontAdPlay=!1,pauseAdPlay=!1,barShow=!0,rightBarShow=!0,EventTarget=null,newEvent=null,eventTargetList=null,loadedTrack=!1,C={},CT=null,CK=null,CM=null,CV=null,pugPlayer=null,hls=null,loadMeta=!0,app="",nowRotate=0,nowZoom=100,smallWindowsState=!1,isDrag=!1,ckplayerCookie="ckplayer-player-cookie",cookieName="",cookieTime=0,cookieArray=[],focusPause=!0,existenceObj=!1,into=function(e){if(isUndefined(e))return player.add=player.into=into,player;language=decodeURIString(language),isUndefined(window.ckplayerLanguage)||(language=mergeObj(language,window.ckplayerLanguage)),eventTarget(),documentHidden(function(r){eventTarget("visibilityState",r)}),app=getApp(),varsTemp={};for(var t in videoObjectDefault)varsTemp[t]=videoObjectDefault[t];if(valType(e)=="string"&&(e.substr(0,8)=="website:"||e.substr(0,4)=="url:")){var n="";e.substr(0,8)=="website:"&&(n=e.substring(8)),e.substr(0,4)=="url:"&&(n=e.substring(4)),ajax({url:n,success:function(r){return r?into(r):(showWindowsError(language.error.ajax+",url:"+n),null)}})}else return valType(e)=="object"?(varsTemp=standardization(varsTemp,e),!isUndefined(e.container)&&e.container?(CT=$(e.container),CT?loadLanguage(e):bodyReady(e)):bodyReady(e)):(showWindowsError(language.error.noVideoContainer),null)},bodyReady=function(e){return documentReady(function(){return isUndefined(e.container)?ajaxWebsite(e):(CT=$(e.container),CT?loadLanguage(e):(showWindowsError(language.error.noVideoContainer),null))}),null},ajaxWebsite=function(e){if(valType(e.video)=="string"&&(e.video.substr(0,8)=="website:"||e.video.substr(0,4)=="url:")){varsTemp=standardization(varsTemp,e);var t="";e.video.substr(0,8)=="website:"&&(t=e.video.substring(8)),e.video.substr(0,4)=="url:"&&(t=e.video.substring(4)),ajax({url:t,success:function(n){return n?into(n):(showWindowsError(language.error.ajax+",url:"+t),null)}})}else return showWindowsError(language.error.noVideoContainer),null},loadLanguage=function(e){if(vars=standardization(varsTemp,e),vars.language){if(!isUndefined(window.ckplayerLanguage))return language=mergeObj(language,window.ckplayerLanguage),embed(e);var t=resolveAssetPath("language",vars.language+".js");loadJs(t,function(){return isUndefined(window.ckplayerLanguage)||(language=mergeObj(language,window.ckplayerLanguage)),embed(e)})}else return embed(e)},isUnreliablePluginBase=function(e){return!e||valType(e)!="string"?!0:/\/(?:assets|\.vite\/deps|_next\/static|chunks?)\/?$/i.test(e)},resolveAssetPath=function(e,t){var n="";if(vars&&vars.pluginPath?n=vars.pluginPath:typeof window!="undefined"&&window.ckplayerBasePath&&(n=window.ckplayerBasePath),n&&isUnreliablePluginBase(n)&&(n=""),n)return n.slice(-1)!=="/"&&(n+="/"),n+e+"/"+t;var r=getPath(e)+t;if(r&&r.indexOf(e+"/")>-1&&r.indexOf("undefined")===-1&&!isUnreliablePluginBase(getPath()))return r;var o=!vars||vars.cdnFallback!==!1,s=typeof window!="undefined"&&window.ckplayerPlusCdn?window.ckplayerPlusCdn:ckplayerPlusDefaultCdn;return!o||!s||s.indexOf("1.0.7")>-1?e+"/"+t:(s.slice(-1)!=="/"&&(s+="/"),s+e+"/"+t)},guessPlug=function(e){var t="";if(valType(e)=="string"?t=e:valType(e)=="array"&&e.length?valType(e[0])=="array"&&e[0].length?t=e[0][0]:valType(e[0])=="string"&&(t=e[0]):valType(e)=="object"&&e&&(t=e.url||e.file||""),!t||valType(t)!="string"||t.substr(0,8)=="website:"||t.substr(0,4)=="url:")return"";var n=t.split("?")[0].split("#")[0].toLowerCase();return n.indexOf(".m3u8")>-1?"hls.js":n.indexOf(".flv")>-1?"flv.js":n.indexOf(".m2ts")>-1||n.indexOf(".mts")>-1||n.length>3&&n.substring(n.length-3)===".ts"?"mpegts.js":""},ensureAutoPlug=function(e){if(vars.autoPlug!==!1&&!vars.plug){var t=guessPlug(e);t&&(vars.plug=t)}},embed=function(e){if(mutedState=!(vars.volume>0),!isUndefined(CT)&&CT!=null)valType(CT)=="htmlarray"&&(CT=CT.eq(0));else return null;calculationFps(),existenceObj=valType(vars.video)=="string"&&(vars.video.substr(0,1)=="."&&vars.video.indexOf("/")==-1||vars.video.substr(0,1)=="#"),existenceObj&&(CK=CT.find(".ckplayer-ckplayer")?CT.find(".ckplayer-ckplayer").eq(0):null,CK&&(CM=CK.find(".ck-main")?CK.find(".ck-main").eq(0):null),CM&&(CV=CM.find(".ck-video")?CM.find(".ck-video").eq(0):null)),(!CK||!CM||!CV)&&(CT.htm(""),CK=createlDiv("ckplayer-ckplayer"),CT.append(CK),CM=createlDiv("ck-main"),CK.append(CM),CV=createlDiv("ck-video"),CM.append(CV)),video&&(video.remove(),video=null),existenceObj&&(video=$(vars.video)?$(vars.video).eq(0):null),video||(video=createlVideo(),video.attr("width","100%").attr("height","100%"),CV.append(video)),video.volume=vars.volume,vars.autoplay?(player.volume(0),player.muted(),recoveryVolume=!0,video.attr("autoplay","autoplay"),paused=!1):video.attr("preload","metadata"),CT.loop=vars.loop,CT.loop&&video.attr("loop","loop"),vars.controls?video.controls=!0:video.controls=!1;try{existenceObj||(video.attr("controlslist","nodownload"),video.attr("x-webkit-airplay","true"),video.attr("x5-video-orientation","portraint"),video.attr("playsinline","true"),video.attr("webkit-playsinline","true"),video.attr("x5-playsinline","true")),vars.crossOrigin&&(video.useCORS=!0,video.crossOrigin=vars.crossOrigin)}catch(t){}if(CT.smallWindows=!0,CT.webFull=!1,CT.theatre=!1,loadFace(),vars.rotate>0&&player.rotate(vars.rotate),vars.zoom>0&&player.zoom(vars.zoom),isUndefined(video.canPlayType))return CT.error={code:5,message:language.error.supportVideoError},eventTarget("error",CT.error),showError(),player;if(addAllListener(),!isUndefined(vars.loaded))if(valType(vars.loaded)=="function")try{vars.loaded(player)}catch(t){}else valType(vars.loaded)=="string"&&typeof console!="undefined"&&console.warn&&console.warn("[ckplayer] vars.loaded as string is ignored for security. Pass a function instead.");return changeVideo(existenceObj?video.attr("src"):vars.video),player},parseResumeSeekFromVars=function(){if(isUndefined(vars.seek))return 0;if(valType(vars.seek)=="number"&&vars.seek>0)return vars.seek;if(valType(vars.seek)=="string"&&vars.seek=="cookie"&&cookieName){var e=player.cookie(cookieName);return e&&e.time?e.time:0}return valType(vars.seek)=="string"&&vars.seek!==""&&!isNaN(parseFloat(vars.seek))?parseFloat(vars.seek):0},applyResumeSeekState=function(e){!e||e<=0||(seekTime=e,maxSeeTime=Math.max(maxSeeTime,e),firstSeekTime<0&&(firstSeekTime=e))},prepareCookieAndSeek=function(){vars.cookie&&(valType(vars.cookie)=="array"&&vars.cookie.length>=2&&(vars.cookie[0]&&valType(vars.cookie[0])=="string"&&(cookieName=vars.cookie[0]),vars.cookie[1]&&valType(vars.cookie[1])=="number"&&(cookieTime=vars.cookie[1])),valType(vars.cookie)=="object"&&!isUndefined(vars.cookie.name)&&(cookieName=vars.cookie.name,!isUndefined(vars.cookie.hour)&&valType(vars.cookie.hour)=="number"&&(cookieTime=vars.cookie.hour)),valType(vars.cookie)=="string"&&(cookieName=vars.cookie),cookieName&&(cookieName=cookieName.replace(/[ ]*,[ ]*|[ ]+/g,"").replace(/[ ]*;[ ]*|[ ]+/g,""))),seekTime||applyResumeSeekState(parseResumeSeekFromVars())},destroyStreamPlayers=function(){if(clearSeekRetry(),seekApplyLock=!1,hlsStartPositionUsed=!1,decodeRecoverCount=0,hls){try{hls.destroy()}catch(e){}hls=null}if(pugPlayer){try{pugPlayer.pause(),pugPlayer.unload(),pugPlayer.detachMediaElement(),pugPlayer.destroy()}catch(e){}pugPlayer=null}},changeVideo=function(e){var t=0;if(ensureAutoPlug(e),prepareCookieAndSeek(),destroyStreamPlayers(),(video.attr("src")||video.htm())&&player.pause(),video.attr("src")&&!existenceObj&&(video.attr("src",""),video.removeAttr("src")),!isUndefined(video.textTracks)&&video.textTracks.length>0)for(t=video.find("track").length-1;t>-1;t--)video.find("track").eq(t).remove();existenceObj||video.htm(""),isUndefined(vars.ad)||(ad=vars.ad);var n="";if(valType(e)=="string")if(e.substr(0,8)=="website:"||e.substr(0,4)=="url:"){var r="";e.substr(0,8)=="website:"&&(r=e.substring(8)),e.substr(0,4)=="url:"&&(r=e.substring(4)),ajax({url:r,success:function(s){s!=null?(vars=standardization(varsTemp,s),changeVideo(vars.video)):(CT.error={code:8,message:language.error.ajax},eventTarget("error",CT.error),showError())}});return}else vars.plug&&!canPlay(e)?plugPlayer(e):existenceObj||video.attr("src",e),loadTrack();else if(valType(e)=="array"){for(t=0;t<e.length;t++)if(valType(e[t])=="array")if(vars.plug&&!canPlay(e[t][0]))plugPlayer(e[t][0]);else{var o=' type="'+e[t][1]+'"';e[t].length>1&&(n+='<source src="'+decodeURIComponent(e[t][0])+'"'+o+">")}n&&video.htm(n),loadTrack()}else valType(e)=="object"&&(vars.plug?plugPlayer(e):(CT.error={code:10,message:language.error.emptied},eventTarget("error",CT.error),showError()),loadTrack());!isUndefined(video.find("source"))&&video.find("source").length>0&&video.find("source").eq(video.find("source").length-1).addListener("error",videoHandler.error),checkBar(),loadLogo(),isChangeDef&&checkDefinition()},plugPlayer=function(e){switch(vars.plug){case"hls.js":hlsPlayer(e);break;case"flv.js":flvPlayer(e);break;case"mpegts.js":mpegtsPlayer(e);break;case"dash.js":CT.error={code:10,message:language.error.emptied},eventTarget("error",CT.error),showError();break;default:valType(vars.plug)=="function"?vars.plug(video,e):(CT.error={code:10,message:language.error.emptied},eventTarget("error",CT.error),showError());break}},hlsPlayer=function(e){var t=function(){if(typeof Hls!="undefined"&&!isUndefined(Hls)&&Hls.isSupported()){if(hls){try{hls.destroy()}catch(o){}hls=null}var n={maxBufferLength:30,maxMaxBufferLength:60},r=seekTime;r||(r=parseResumeSeekFromVars()),r&&r>0&&(isUndefined(vars.live)||!vars.live)&&(n.startPosition=r,maxSeeTime=Math.max(maxSeeTime,r),firstSeekTime<0&&(firstSeekTime=r),seekTime=0,hlsStartPositionUsed=!0,clearSeekRetry()),hls=new Hls(n),hls.loadSource(e),hls.attachMedia(video),hls.on(Hls.Events.MANIFEST_PARSED,function(){hlsStartPositionUsed||applyPendingSeek()}),hls.on(Hls.Events.ERROR,function(o,s){var g=9,d=language.error.loadingFailed,u=s.fatal;if(isUndefined(s.response)||(isUndefined(s.response.code)||(g=s.response.code),!isUndefined(s.response.text)&&s.response.text?d=s.response.text:isUndefined(o)||(d=o)),u&&s.type===Hls.ErrorTypes.MEDIA_ERROR&&hls&&typeof hls.recoverMediaError=="function")try{hls.recoverMediaError(),u=!1}catch(c){}CT.error={code:g,message:d},eventTarget("error",CT.error),u&&showError()})}else canPlay(e)&&video.attr("src",e)};if(typeof Hls!="undefined"&&!isUndefined(Hls)&&!vars.preferBuiltinPlug){t();return}loadJs(resolveAssetPath("hls.js","hls.min.js"),t)},flvPlayer=function(e){var t=function(){if(typeof flvjs!="undefined"&&!isUndefined(flvjs)&&flvjs.isSupported()){var n={type:"flv",url:e};valType(e)=="object"&&(n=e),vars.live&&(n.isLive=!0),pugPlayer&&(pugPlayer.pause(),pugPlayer.unload(),pugPlayer.detachMediaElement(),pugPlayer.destroy(),pugPlayer=null),pugPlayer=flvjs.createPlayer(n),pugPlayer.attachMediaElement(video),pugPlayer.load(),pugPlayer.on(flvjs.Events.METADATA_ARRIVED,function(r){videoHandler.loadedMetaData()}),pugPlayer.on(flvjs.Events.ERROR,function(r,o,s){CT.error={code:s.code,message:s.msg},eventTarget("error",CT.error),showError()})}};if(typeof flvjs!="undefined"&&!isUndefined(flvjs)&&!vars.preferBuiltinPlug){t();return}loadJs(resolveAssetPath("flv.js","flv.min.js"),t)},mpegtsPlayer=function(e){var t=function(){if(typeof mpegts!="undefined"&&!isUndefined(mpegts)&&mpegts.getFeatureList().mseLivePlayback){var n={type:"mse",url:e};valType(e)=="object"&&(n=e),vars.live&&(n.isLive=!0),pugPlayer&&(pugPlayer.pause(),pugPlayer.unload(),pugPlayer.detachMediaElement(),pugPlayer.destroy(),pugPlayer=null),pugPlayer=mpegts.createPlayer(n),pugPlayer.attachMediaElement(video),pugPlayer.load(),pugPlayer.on(mpegts.Events.METADATA_ARRIVED,function(r){videoHandler.loadedMetaData()}),pugPlayer.on(mpegts.Events.ERROR,function(r,o,s){CT.error={code:s.code,message:s.msg},eventTarget("error",CT.error),showError()})}};if(typeof mpegts!="undefined"&&!isUndefined(mpegts)&&!vars.preferBuiltinPlug){t();return}loadJs(resolveAssetPath("mpegts.js","mpegts.min.js"),t)},canPlay=function(e,t){var n=[{vidType:"video/ogg",codType:"theora, vorbis"},{vidType:"video/mp4",codType:"avc1.4D401E, mp4a.40.2"},{vidType:"video/mp4",codType:"avc1"},{vidType:"video/mp4",codType:"hevc"},{vidType:"video/webm",codType:"vp8.0, vorbis"},{vidType:"video/webm",codType:"vp9"},{vidType:"",codType:"application/x-mpegURL"},{vidType:"",codType:"application/vnd.apple.mpegurl"}],r={ogg:n[0],mp4:[n[1],n[2],n[3]],webm:[n[4],n[5]],m3u8:[n[6],n[7]]},o=[],s="",g=function(p){var y=p.vidType,E="";y?E=y+'; codecs="'+p.codType+'"':E=p.codType;var x=video.canPlayType(E);return x==""&&(x="no"),x},d=function(p){return p.replace(/.+\./,"")};if(isUndefined(t)){if(valType(e)=="string"){if(vars.type)for(s in n)n[s].vidType==vars.type&&o.push(n[s]);else if(d(e)&&d(e)in r){var u=r[d(e)];if(valType(u)=="array")for(var c=0;c<u.length;c++)o.push(u[c]);else o.push(u)}}}else o.push(n[t]);var b=!1;if(o.length>0)for(var c=0;c<o.length;c++)g(o[c])!="no"&&(b=!0);return!b&&!vars.plug&&(CT.error={code:6,message:language.error.videoTypeError},eventTarget("error",CT.error),showError()),b},loadFace=function(){C.loading=createlDiv("ck-loading"),CM.append(C.loading),C.bar=createlDiv("ck-bar"),CM.append(C.bar),C.rightBar=createlDiv("ck-right-bar ck-right-bar-hide"),CM.append(C.rightBar),C.topBar=createlDiv("ck-top-bar ck-top-bar-hide"),CM.append(C.topBar),C.bar.pbox=createlDiv("ck-bar-progress"),C.bar.pbox.bg=createlDiv("ck-bar-progress-bg"),C.bar.pbox.load=createlDiv("ck-bar-progress-load"),C.bar.pbox.bg.append(C.bar.pbox.load),C.bar.pbox.play=createlDiv("ck-bar-progress-play"),C.bar.pbox.bg.append(C.bar.pbox.play),C.bar.pbox.mouseLine=createlDiv("ck-bar-progress-mouseline"),C.bar.pbox.bg.append(C.bar.pbox.mouseLine),C.bar.pbox.slider=createlDiv("ck-bar-progress-slider"),C.bar.pbox.append(C.bar.pbox.bg).append(C.bar.pbox.slider),C.bar.append(C.bar.pbox),C.bar.mouseout(barMouseOut).mouseover(barMouseOver),valType(vars.live)=="number"&&(C.bar.pbox.play.css({width:"100%"}),C.bar.pbox.slider.css({left:100-C.bar.pbox.slider.getWidth()*100/C.bar.pbox.bg.getWidth()+"%"})),C.bar.playAndPause=createlDiv("ck-bar-playandpause"),C.bar.append(C.bar.playAndPause),C.bar.playAndPause.play=createlButton("ck-bar-btn ck-btn-play"),C.bar.playAndPause.play.click(player.play),C.bar.playAndPause.play.mouseover(function(){tip(this,language.play)}),C.bar.playAndPause.append(C.bar.playAndPause.play),C.bar.playAndPause.pause=createlButton("ck-bar-btn ck-btn-pause"),C.bar.playAndPause.pause.click(player.pause),C.bar.playAndPause.pause.mouseover(function(){tip(this,language.pause)}),C.bar.playAndPause.append(C.bar.playAndPause.pause),C.bar.playAndPause.pause.hide(),C.bar.playAndPause.refresh=createlButton("ck-bar-btn ck-btn-refresh"),C.bar.playAndPause.refresh.click(player.play),C.bar.playAndPause.refresh.mouseover(function(){tip(this,language.refresh)}),C.bar.playAndPause.append(C.bar.playAndPause.refresh),C.bar.nextEpisode=createlDiv("ck-bar-btn ck-bar-next"),C.bar.append(C.bar.nextEpisode),C.bar.nextEpisode.click(nextClick).mouseover(showNextEpisode).mouseout(function(){isUndefined(C.next)||player.closeLayer(C.next)}),isUndefined(vars.next)&&C.bar.nextEpisode.hide();var e=formatSeconds(player.time())+"/"+formatSeconds(duration);vars.live&&(e=language.live),C.time=createlDiv("ck-bar-time",e),C.bar.append(C.time),C.bar.backLive=createlButton("ck-btn-backlive",language.backLive),C.bar.append(C.bar.backLive),C.bar.backLive.mouseover(function(){tip(this,language.backLive)}).click(function(){eventTarget("backLive")}),C.bar.backLive.hide(),C.bar.fullAndExit=createlDiv("ck-bar-fullandexit"),C.bar.append(C.bar.fullAndExit),C.bar.fullAndExit.full=createlButton("ck-bar-btn ck-btn-full"),C.bar.fullAndExit.full.click(player.fullOrExit),C.bar.fullAndExit.full.mouseover(function(){tip(this,language.full)}),C.bar.fullAndExit.append(C.bar.fullAndExit.full),C.bar.fullAndExit.exitFull=createlButton("ck-bar-btn ck-btn-exitfull"),C.bar.fullAndExit.exitFull.click(player.fullOrExit),C.bar.fullAndExit.exitFull.mouseover(function(){tip(this,language.exitFull)}),C.bar.fullAndExit.append(C.bar.fullAndExit.exitFull),C.bar.webFullAndExit=createlDiv("ck-bar-webfullandexit"),C.bar.append(C.bar.webFullAndExit),C.bar.webFullAndExit.webFull=createlButton("ck-bar-btn ck-btn-webfull"),C.bar.webFullAndExit.webFull.click(player.webFull),C.bar.webFullAndExit.webFull.mouseover(function(){tip(this,language.webFull)}),C.bar.webFullAndExit.append(C.bar.webFullAndExit.webFull),C.bar.webFullAndExit.exitWebFull=createlButton("ck-bar-btn ck-btn-exitwebfull"),C.bar.webFullAndExit.exitWebFull.click(player.exitWebFull),C.bar.webFullAndExit.exitWebFull.mouseover(function(){tip(this,language.exitWebFull)}),C.bar.webFullAndExit.append(C.bar.webFullAndExit.exitWebFull),vars.webFull||C.bar.webFullAndExit.hide(),C.bar.theatreAndExit=createlDiv("ck-bar-theatreandexit"),C.bar.append(C.bar.theatreAndExit),C.bar.theatreAndExit.theatre=createlButton("ck-bar-btn ck-btn-theatre"),C.bar.theatreAndExit.theatre.click(player.theatre),C.bar.theatreAndExit.theatre.mouseover(function(){tip(this,language.theatre)}),C.bar.theatreAndExit.append(C.bar.theatreAndExit.theatre),C.bar.theatreAndExit.exitTheatre=createlButton("ck-bar-btn ck-btn-exittheatre"),C.bar.theatreAndExit.exitTheatre.click(player.exitTheatre),C.bar.theatreAndExit.exitTheatre.mouseover(function(){tip(this,language.exitTheatre)}),C.bar.theatreAndExit.append(C.bar.theatreAndExit.exitTheatre),vars.theatre||C.bar.theatreAndExit.hide(),C.bar.vbox=createlDiv("ck-bar-volumebox"),C.bar.append(C.bar.vbox),C.bar.vbox.muted=createlButton("ck-bar-btn ck-btn-muted"),C.bar.vbox.muted.click(player.muted),C.bar.vbox.append(C.bar.vbox.muted),C.bar.vbox.exitMuted=createlButton("ck-bar-btn ck-btn-exitmuted"),C.bar.vbox.exitMuted.click(player.exitMuted),C.bar.vbox.append(C.bar.vbox.exitMuted),C.bar.vbox.volume=createlDiv("ck-bar-volume"),C.bar.vbox.append(C.bar.vbox.volume),C.bar.vbox.volume.box=createlDiv("ck-bar-volumex"),C.bar.vbox.volume.append(C.bar.vbox.volume.box),C.bar.vbox.volume.txt=createlDiv("ck-bar-volume-txt","0"),C.bar.vbox.volume.box.append(C.bar.vbox.volume.txt),C.bar.vbox.volume.bg=createlDiv("ck-bar-volume-bg"),C.bar.vbox.volume.box.append(C.bar.vbox.volume.bg),C.bar.vbox.volume.pp=createlDiv("ck-bar-volume-pp"),C.bar.vbox.volume.bg.append(C.bar.vbox.volume.pp),C.bar.vbox.volume.slider=createlDiv("ck-bar-volume-slider"),C.bar.vbox.volume.box.append(C.bar.vbox.volume.slider),C.bar.vbox.mouseDown=!1,C.bar.vbox.volume.show(),changeVolumeSlider(vars.volume),volumeDragY(),C.bar.vbox.volume.attr("style",""),C.bar.vbox.mouseover(function(){changeVolumeSlider(video.muted?0:video.volume)}),C.bar.playbackrate=createlDiv("ck-bar-playbackrate-box"),C.bar.append(C.bar.playbackrate),C.bar.playbackrate.button=createlDiv("ck-bar-playbackrate",language.playbackrate),C.bar.playbackrate.append(C.bar.playbackrate.button),C.bar.playbackrate.bgbox=createlDiv("ck-bar-playbackrate-bg-box ck-list-bg-box"),C.bar.playbackrate.append(C.bar.playbackrate.bgbox),checkPlaybackrate(),C.bar.track=createlDiv("ck-bar-track-box"),C.bar.append(C.bar.track),C.bar.track.button=createlDiv("ck-bar-track",language.track),C.bar.track.append(C.bar.track.button),C.bar.track.bgbox=createlDiv("ck-bar-track-bg-box ck-list-bg-box"),C.bar.track.append(C.bar.track.bgbox),C.bar.track.hide(),C.bar.definition=createlDiv("ck-bar-definition-box"),C.bar.append(C.bar.definition),C.bar.definition.button=createlDiv("ck-bar-definition",language.definition),C.bar.definition.append(C.bar.definition.button),C.bar.definition.bgbox=createlDiv("ck-bar-definition-bg-box ck-list-bg-box"),C.bar.definition.append(C.bar.definition.bgbox),C.bar.definition.hide(),C.rightBar.screenshot=createlButton("ck-bar-btn ck-btn-screenshot"),C.rightBar.append(C.rightBar.screenshot),C.rightBar.screenshot.mouseover(function(){tip(this,language.screenshot,null,"left")}),C.rightBar.screenshot.click(player.screenshot),C.rightBar.smallwindows=createlDiv("ck-right-bar-smallwindows"),C.rightBar.append(C.rightBar.smallwindows),C.rightBar.smallwindows.open=createlButton("ck-bar-btn ck-btn-smallwindows-open"),C.rightBar.smallwindows.open.click(function(){tip(this,language.smallwindowsClose,null,"left"),player.smallWindows(!1)}),C.rightBar.smallwindows.open.mouseover(function(){tip(this,language.smallwindowsOpen,null,"left")}),C.rightBar.smallwindows.append(C.rightBar.smallwindows.open),C.rightBar.smallwindows.close=createlButton("ck-bar-btn ck-btn-smallwindows-close"),C.rightBar.smallwindows.close.click(function(){tip(this,language.smallwindowsOpen,null,"left"),player.smallWindows(!0)}),C.rightBar.smallwindows.close.mouseover(function(){tip(this,language.smallwindowsClose,null,"left")}),C.rightBar.smallwindows.append(C.rightBar.smallwindows.close),C.rightBar.loop=createlDiv("ck-right-bar-loop"),C.rightBar.append(C.rightBar.loop),C.rightBar.loop.open=createlButton("ck-bar-btn ck-btn-loop-open"),C.rightBar.loop.open.click(function(){tip(this,language.loopClose,null,"left"),player.loop(!1)}),C.rightBar.loop.open.mouseover(function(){tip(this,language.loopOpen,null,"left")}),C.rightBar.loop.append(C.rightBar.loop.open),C.rightBar.loop.close=createlButton("ck-bar-btn ck-btn-loop-close"),C.rightBar.loop.close.click(function(){tip(this,language.loopOpen,null,"left"),player.loop(!0)}),C.rightBar.loop.close.mouseover(function(){tip(this,language.loopClose,null,"left")}),C.rightBar.loop.append(C.rightBar.loop.close),C.rightBar.mouseout(rightBarMouseOut).mouseover(rightBarMouseOver),C.screenshot=createlDiv("ck-screenshot"),CM.append(C.screenshot),C.screenshot.img=createlDiv("ck-screenshot-img"),C.screenshot.append(C.screenshot.img),C.screenshot.bar=createlDiv("ck-screenshot-bar"),C.screenshot.append(C.screenshot.bar),C.screenshot.bar.down=createlA(language.down,"","ck-screenshot-btn ck-screenshot-down"),C.screenshot.bar.append(C.screenshot.bar.down),C.screenshot.bar.close=createlButton("ck-screenshot-btn ck-screenshot-close",language.close),C.screenshot.bar.close.click(player.closeScreenshot),C.screenshot.bar.append(C.screenshot.bar.close),C.topBar.zoomEle=createlDiv("ck-top-bar-zoom"),C.topBar.zoomEle.zoom50=createlDiv("ck-top-bar-zoom-container"),C.topBar.zoomEle.append(C.topBar.zoomEle.zoom50),C.topBar.zoomEle.zoom50.left=createlDiv("ck-top-bar-zoom-left"),C.topBar.zoomEle.zoom50.append(C.topBar.zoomEle.zoom50.left),C.topBar.zoomEle.zoom50.left.button=createlDiv("ck-top-bar-zoom-button-50"),C.topBar.zoomEle.zoom50.left.append(C.topBar.zoomEle.zoom50.left.button),C.topBar.zoomEle.zoom50.right=createlDiv("ck-top-bar-zoom-right",language.p50),C.topBar.zoomEle.zoom50.append(C.topBar.zoomEle.zoom50.right),C.topBar.zoomEle.zoom50.click(function(){player.zoom(50)}),C.topBar.zoomEle.zoom75=createlDiv("ck-top-bar-zoom-container"),C.topBar.zoomEle.append(C.topBar.zoomEle.zoom75),C.topBar.zoomEle.zoom75.left=createlDiv("ck-top-bar-zoom-left"),C.topBar.zoomEle.zoom75.append(C.topBar.zoomEle.zoom75.left),C.topBar.zoomEle.zoom75.left.button=createlDiv("ck-top-bar-zoom-button-75"),C.topBar.zoomEle.zoom75.left.append(C.topBar.zoomEle.zoom75.left.button),C.topBar.zoomEle.zoom75.right=createlDiv("ck-top-bar-zoom-right",language.p75),C.topBar.zoomEle.zoom75.append(C.topBar.zoomEle.zoom75.right),C.topBar.zoomEle.zoom75.click(function(){player.zoom(75)}),C.topBar.zoomEle.zoom100=createlDiv("ck-top-bar-zoom-container"),C.topBar.zoomEle.append(C.topBar.zoomEle.zoom100),C.topBar.zoomEle.zoom100.left=createlDiv("ck-top-bar-zoom-left"),C.topBar.zoomEle.zoom100.append(C.topBar.zoomEle.zoom100.left),C.topBar.zoomEle.zoom100.left.button=createlDiv("ck-top-bar-zoom-button-100"),C.topBar.zoomEle.zoom100.left.append(C.topBar.zoomEle.zoom100.left.button),C.topBar.zoomEle.zoom100.right=createlDiv("ck-top-bar-zoom-right",language.p100),C.topBar.zoomEle.zoom100.append(C.topBar.zoomEle.zoom100.right),C.topBar.zoomEle.zoom100.click(function(){player.zoom(100)}),C.topBar.append(C.topBar.zoomEle),C.topBar.titleEle=createlDiv("ck-top-bar-title",vars.title),C.topBar.append(C.topBar.titleEle),C.topBar.timeEle=createlDiv("ck-top-bar-time"),C.topBar.append(C.topBar.timeEle),C.centerPlay=createlDiv("ck-center-play"),C.centerPlay.click(player.play),CM.append(C.centerPlay),C.buffer=createlDiv("ck-buffer"),CM.append(C.buffer),C.message=createlDiv("ck-message"),CM.append(C.message),C.tip=createlDiv("ck-tip"),CM.append(C.tip),C.tip.content=createlDiv("ck-content ck-content-float-auto"),C.tip.append(C.tip.content),C.tip.triangle=createlDiv("ck-triangle ck-triangle-auto"),C.tip.append(C.tip.triangle),tip(video,"ckplayer"),C.tip.minHeight=C.tip.getHeight(),tip(),C.ad=createlDiv("ck-yytf"),CM.append(C.ad),C.ad.link=createlDiv("ck-yytf-front-link"),C.ad.append(C.ad.link),C.ad.link.click(frontVideoClickHandler),C.ad.picture=createlDiv("ck-yytf-front-picture"),C.ad.append(C.ad.picture),C.ad.top=createlDiv("ck-yytf-top"),C.ad.append(C.ad.top),C.ad.top.countDown=createlDiv("ck-yytf-countdown"),C.ad.top.append(C.ad.top.countDown),C.ad.top.closeTime=createlDiv("ck-yytf-closetime"),C.ad.top.append(C.ad.top.closeTime),C.ad.top.closeAd=createlDiv("ck-yytf-closead",language.closeAd),C.ad.top.append(C.ad.top.closeAd),C.ad.top.closeAd.click(closeFrontAd),C.ad.bottom=createlDiv("ck-yytf-bottom"),C.ad.append(C.ad.bottom),C.ad.bottom.fullAndExit=createlDiv("ck-yytf-fullandexit"),C.ad.bottom.append(C.ad.bottom.fullAndExit),C.ad.bottom.fullAndExit.full=createlButton("ck-yytf-btn ck-yytf-fullandexit-full"),C.ad.bottom.fullAndExit.full.click(player.full),C.ad.bottom.fullAndExit.append(C.ad.bottom.fullAndExit.full),C.ad.bottom.fullAndExit.exitFull=createlButton("ck-yytf-btn ck-yytf-fullandexit-exitfull"),C.ad.bottom.fullAndExit.append(C.ad.bottom.fullAndExit.exitFull),C.ad.bottom.fullAndExit.exitFull.click(player.exitFull),C.ad.bottom.mutedAndExit=createlDiv("ck-yytf-mutedandexit"),C.ad.bottom.append(C.ad.bottom.mutedAndExit),C.ad.bottom.mutedAndExit.muted=createlButton("ck-yytf-btn ck-yytf-mutedandexit-muted"),C.ad.bottom.mutedAndExit.append(C.ad.bottom.mutedAndExit.muted),C.ad.bottom.mutedAndExit.muted.click(player.muted),C.ad.bottom.mutedAndExit.exitMuted=createlButton("ck-yytf-btn ck-yytf-mutedandexit-exitmuted"),C.ad.bottom.mutedAndExit.append(C.ad.bottom.mutedAndExit.exitMuted),C.ad.bottom.mutedAndExit.exitMuted.click(player.exitMuted),C.ad.bottom.details=createlDiv("ck-yytf-details",language.details),C.ad.bottom.append(C.ad.bottom.details),C.ad.hide(),C.adPause=createlDiv("ck-pause-yytf"),CM.append(C.adPause),C.about=createlDiv("ck-about"),CM.append(C.about),C.about.bar=createlDiv("ck-about-bar"),C.about.append(C.about.bar),C.about.bar.copy=createlButton("ck-bar-btn ck-btn-about-copy"),C.about.bar.append(C.about.bar.copy),C.about.bar.copy.click(aboutCopy),C.about.bar.copy.mouseover(function(){tip(this,language.copy,null,"left")}),C.about.bar.close=createlButton("ck-bar-btn ck-btn-about-close"),C.about.bar.close.click(aboutHide),C.about.bar.close.mouseover(function(){tip(this,language.close,null,"left")}),C.about.bar.append(C.about.bar.close),C.tempTime=createlDiv("ck-tempTime"),CM.append(C.tempTime),C.bar.playAndPause.refresh.hide(),vars.controls?(player.bar(!1),player.rightBar(!1),C.loading.hide(),C.centerPlay.hide()):(loadLogo(),loadAbout(),loadMenu()),app=="iphone"&&C.loading.hide(),changeTopTime(),CK.mouseout(function(){paused||hideBar()}).mouseover(function(){C.bar.hasClass("ck-bar-out")||(C.bar.removeClass("ck-bar-out"),CM.removeClass("ck-nocursor")),C.rightBar.css("display")=="block"&&C.rightBar.removeClass("ck-right-bar-hide"),C.topBar.css("display")=="block"&&C.topBar.removeClass("ck-top-bar-hide")}).mousemove(function(){C.bar.hasClass("ck-bar-out")&&(C.bar.removeClass("ck-bar-out"),eventTarget("mouseActive",!0),CM.removeClass("ck-nocursor"),hideBar()),C.rightBar.css("display")=="block"&&C.rightBar.removeClass("ck-right-bar-hide"),C.topBar.css("display")=="block"&&C.topBar.removeClass("ck-top-bar-hide")})},addAllListener=function(){video.addListener("stalled",videoHandler.stalled),video.addListener("suspend",videoHandler.suspend),video.addListener("loadeddata",videoHandler.loadedData),video.addListener("loadstart",videoHandler.loadStart),video.addListener("loadedmetadata",videoHandler.loadedMetaData),video.addListener("canplay",videoHandler.canPlay),video.addListener("timeupdate",videoHandler.timeUpDate),video.addListener("seeking",videoHandler.seeking),video.addListener("seeked",videoHandler.seeked),video.addListener("waiting",videoHandler.waiting),video.addListener("play",videoHandler.play),video.addListener("pause",videoHandler.pause),video.addListener("volumechange",videoHandler.volumeChange),video.addListener("ended",videoHandler.ended),video.addListener("error",videoHandler.error),isUndefined(video.emptied)||video.addListener("emptied",videoHandler.emptied),CV.singleClick(function(){isDrag?isDrag=!1:player.playOrPause()}),CM.doubleClick(player.fullOrExit),$(document).addListener("keydown",videoHandler.keydown),addListener(window,"resize",videoHandler.resize),isUndefined(vars.smallWindows)||valType(vars.smallWindows)=="boolean"&&vars.smallWindows&&addListener(window,"scroll",windowScroll),CT.mouseWheel(videoHandler.mouseWheel)},eventTarget=function(e,t){try{EventTarget!=null?(isUndefined(t)&&(t=null),newEvent.dispatchEvent(e,t)):(EventTarget=function(){this.listeners={}},EventTarget.prototype.listeners=null,EventTarget.prototype.addEventListener=function(n,r){n in this.listeners||(this.listeners[n]=[]),this.listeners[n].push(r),eventTargetList=this.listeners},EventTarget.prototype.removeEventListener=function(n,r){if(n in this.listeners){for(var o=this.listeners[n],s=0,g=o.length;s<g;s++)if(o[s]===r)return o.splice(s,1),this.removeEventListener(n,r);eventTargetList=o}},EventTarget.prototype.dispatchEvent=function(n,r){if(n in this.listeners)for(var o=this.listeners[n],s=0,g=o.length;s<g;s++)o[s].call(this,r)},newEvent=new EventTarget)}catch(n){console.error(n)}},changeCookie=function(e){var t=[],n=cookie(ckplayerCookie),r=0,o=0,s=Math.floor(Date.now()*.001);if(e=Math.floor(e*100),e=e*.01,cookieTime||(cookieTime=365*24),!n)t.push([cookieName,e,s+cookieTime*3600]);else{t=stringToArray(n);var g=!1,d=[[cookieName,e,s+cookieTime*3600]];for(r=0;r<t.length;r++)t[r][2]>s&&t[r][0]!=cookieName&&o<19&&(d.push(t[r]),o++);t=d}t.length>0&&(cookie(ckplayerCookie,"delete",vars.domain,vars.cookiePath),cookie(ckplayerCookie,arrayToString(t),vars.domain,vars.cookiePath)),cookieArray=t},loadTrack=function(){if(!isUndefined(video.textTracks)){var e=0;if(!isUndefined(vars.track)&&valType(vars.track)=="array"&&!video.find("track")){var t="",n=vars.track;for(C.bar.track.show(),e=0;e<n.length;e++){var r="";!r&&!isUndefined(n[e].default)&&n[e].default&&(r=" default"),t+='<track src="'+n[e].src+'" srclang="'+n[e].srclang+'" kind="'+n[e].kind+'" label="'+n[e].label+'"'+r+">"}if(video){var o=video.htm()+t;video.htm(o)}video.find("track")&&!loadedTrack&&(loadedTrack=!0,checkTrack())}}},timeInBuffered=function(e){if(!video||isUndefined(video.buffered))return!1;try{for(var t=video.buffered,n=0;n<t.length;n++)if(e>=t.start(n)-.35&&e<=t.end(n)+.15)return!0}catch(r){}return!1},clearSeekRetry=function(){seekRetryTimer&&(clearTimeout(seekRetryTimer),seekRetryTimer=null),seekRetryCount=0},applyPendingSeek=function(e){if(!(!seekTime||!video||seekApplyLock)&&!(!isUndefined(vars.live)&&(valType(vars.live)=="boolean"&&vars.live||valType(vars.live)=="number"))){var t=seekTime,n=duration||video.duration||0;if(n&&isFinite(n)&&n>0&&t>=n&&(t=Math.max(0,n-.3)),t<=0){seekTime=0,clearSeekRetry();return}if(t>0&&(maxSeeTime=Math.max(maxSeeTime,t),firstSeekTime<0&&(firstSeekTime=t)),hls&&typeof hls.startLoad=="function"){clearSeekRetry(),seekTime=0;try{hls.startLoad(t)}catch(s){seekTime=t}return}var r=!isUndefined(video.readyState)&&video.readyState>=2,o=timeInBuffered(t);if(!e&&!o&&(!r||video.readyState<3)&&(seekRetryCount++,seekRetryCount<=50)){seekRetryTimer&&clearTimeout(seekRetryTimer),seekRetryTimer=setTimeout(function(){applyPendingSeek(!1)},200);return}clearSeekRetry(),seekApplyLock=!0,seekTime=0;try{video.currentTime=t}catch(s){seekTime=t,seekApplyLock=!1}setTimeout(function(){seekApplyLock=!1},800)}},recoverDecodeError=function(){if(decodeRecoverCount>=2)return!1;decodeRecoverCount++;var e=playTime>0?playTime:vars.seek?parseFloat(vars.seek):0;(isNaN(e)||e<0)&&(e=0);try{if(hls&&typeof hls.recoverMediaError=="function")return hls.recoverMediaError(),e>0&&(seekTime=e,seekApplyLock=!1,setTimeout(function(){applyPendingSeek(!0)},300)),!0}catch(n){}try{var t=Math.max(0,e-1.5);return seekTime=e,seekApplyLock=!1,video&&(video.currentTime=t),setTimeout(function(){if(applyPendingSeek(!0),video&&video.paused&&vars.autoplay)try{video.play()}catch(n){}},400),!0}catch(n){}return!1},loadedMetaData=function(){eventTarget("loadedMetaData",{width:CK.getWidth(),height:CK.getHeight(),videoWidth:CT.videoWidth,videoHeight:CT.videoHeight,duration,volume:CT.volume}),eventTarget("duration",duration),"error"in C&&C.error.hide(),replaceInformation("videoWidth",CT.videoWidth),replaceInformation("videoHeight",CT.videoHeight),replaceInformation("volume",parseInt(CT.volume*100)),replaceInformation("duration",parseInt(duration)),documentHidden(function(e){vars.documentFocusPause&&(e=="show"?!focusPause&&paused&&player.play():(focusPause=paused,player.pause()))})},videoHandler={loadStart:function(){!vars.controls&&app!="iphone"&&C.loading.show(),C.centerPlay.hide(),eventTarget("loadstart")},canPlay:function(){C.loading.hide(),eventTarget("canplay"),applyPendingSeek()},loadedData:function(){eventTarget("loadeddata")},loadedMetaData:function(){duration=this.duration,!isUndefined(this.duration)&&vars.duration&&(duration=vars.duration),vars.live||(C.time.htm(formatSeconds(this.currentTime)+"/"+formatSeconds(duration)),C.tempTime.htm(formatSeconds(this.currentTime)+"/"+formatSeconds(duration))),C.loading.hide(),vars.poster&&video.attr("poster",vars.poster),!vars.autoplay&&!vars.controls&&(C.centerPlay.show(),C.buffer.hide()),CT.duration=duration,CT.videoWidth=this.videoWidth,CT.videoHeight=this.videoHeight,CT.volume=this.volume,(CT.videoWidth||CT.videoHeight||duration)&&loadedMetaData(),applyPendingSeek();var e=0;isUndefined(this.buffered)||(e=this.buffered.length),e>0&&changeLoad(),vars.live?changePreview():changePreview(vars.preview),!isUndefined(vars.prompt)&&valType(vars.prompt)=="array"&&!vars.live?changePrompt():deletePrompt(),isChangeDef&&(checkDefinition(),isChangeDef=!1),pSliderMouseDown=!1,loadedmetadataNum++,!isUndefined(ad)&&!isUndefined(ad.frontPlay)&&ad.frontPlay&&loadedmetadataNum>1&&(player.play(),calculationAdFrontTime(duration)),!isUndefined(ad)&&!isUndefined(ad.frontPlay)&&!ad.frontPlay&&(player.volume(vars.volume),player.play()),!vars.autoplay&&loadMeta&&(loadMeta=!1,player.pause(),setTimeout(player.pause,300))},timeUpDate:function(){waited||(waited=!0,C.buffer.hide(),eventTarget("buffer","end"));var e=this.buffered.length;e>0&&changeLoad(),!duration&&this.duration&&(duration=this.duration,CT.duration=duration,CT.videoWidth=this.videoWidth,CT.videoHeight=this.videoHeight,(CT.videoWidth||CT.videoHeight||duration)&&loadedMetaData(),applyPendingSeek()),oldTime=playTime,playTime=this.currentTime,maxSeeTime<oldTime&&(maxSeeTime=oldTime),changeProgress(playTime),eventTarget("time",playTime),vars.live||(C.time.htm(formatSeconds(playTime)+"/"+formatSeconds(duration)),C.tempTime.htm(formatSeconds(playTime)+"/"+formatSeconds(duration))),!isUndefined(ad)&&!isUndefined(ad.frontPlay)&&ad.frontPlay&&loadedmetadataNum>1&&calculationAdFrontTime(duration-playTime),!isUndefined(C.error)&&C.error.css("display")=="block"&&C.error.hide(),cookieName&&changeCookie(playTime),replaceInformation("audioDecodedByteCount",this.webkitAudioDecodedByteCount||this.audioDecodedByteCount||0),replaceInformation("videoDecodedByteCount",this.webkitVideoDecodedByteCount||this.videoDecodedByteCount||0)},ended:function(){!isUndefined(ad)&&!isUndefined(ad.frontPlay)&&ad.frontPlay?adFrontEnded():(C.bar.playAndPause.pause.hide(),C.bar.playAndPause.play.hide(),C.bar.playAndPause.refresh.show(),eventTarget("ended"),showEnded(),message())},error:function(e){if(!isUndefined(e.type)){var t=this.error,n=function(){var r=12,o=language.error.loadingFailed;if(isUndefined(t))CT.error={code:r,message:o},e.target.attr("src")&&showError();else{if(isUndefined(t.code)||(r=t.code),isUndefined(t.message)||(o=t.message),r===3&&recoverDecodeError()){CT.error={code:r,message:o},eventTarget("error",CT.error);return}CT.error={code:r,message:o},showError()}eventTarget("error",CT.error)};if(e.type=="error")try{video.currentSrc?ajax({url:video.currentSrc,error:function(r){r&&valType(r)=="object"&&"code"in r&&r.code?(CT.error=r,eventTarget("error",CT.error),showError()):n()},success:function(r){r||n()}}):n()}catch(r){n()}}},stalled:function(){eventTarget("stalled"),CT.error={code:13,message:"load:stalled"},eventTarget("error",CT.error)},suspend:function(){eventTarget("suspend")},emptied:function(){eventTarget("emptied"),CT.error={code:7,message:language.error.emptied},eventTarget("error",CT.error)},seeked:function(){seekApplyLock=!1,decodeRecoverCount=0,paused&&player.play(),pSliderMouseDown=!1,eventTarget("seek",{time:this.currentTime,state:"seeked"}),eventTarget("seeked")},seeking:function(){paused&&player.play();var e=this.currentTime;switch(firstSeekTime==-1&&(firstSeekTime=e),vars.timeScheduleAdjust){case 0:if(oldTime!=e){waitingMessage=!1,player.seek(oldTime),message(language.timeScheduleAdjust.prohibit);return}break;case 2:if(e<oldTime){waitingMessage=!1,player.seek(oldTime),message(language.timeScheduleAdjust.prohibitBackOff);return}break;case 3:if(e>oldTime){waitingMessage=!1,player.seek(oldTime),message(language.timeScheduleAdjust.prohibitForward);return}break;case 4:if(e<firstSeekTime){waitingMessage=!1,player.seek(firstSeekTime),message(language.timeScheduleAdjust.prohibitLookBack);return}break;case 5:if(e>maxSeeTime){waitingMessage=!1,player.seek(maxSeeTime),message(language.timeScheduleAdjust.prohibitForwardNotViewed);return}break}eventTarget("seek",{time:e,state:"seeking"}),eventTarget("seeking"),vars.live||(C.time.htm(formatSeconds(e)+"/"+formatSeconds(duration)),C.tempTime.htm(formatSeconds(e)+"/"+formatSeconds(duration)))},waiting:function(){waited=!1,eventTarget("buffer","start"),C.centerPlay.hide(),vars.controls||C.buffer.show(),waitingMessage?message(language.waiting):waitingMessage=!0},play:function(){if(paused=!1,C.bar.playAndPause.play.hide(),C.bar.playAndPause.pause.show(),C.bar.playAndPause.refresh.hide(),C.centerPlay.hide(),playType=="button"?C.bar.pbox.removeClass("ck-bar-progress-out"):C.bar.pbox.addClass("ck-bar-progress-out"),recoveryVolume&&(recoveryVolume=!1,player.exitMuted()),hideBar(),closePauseAd(),playType="",isUndefined(C.ended)||player.closeLayer(C.ended),"error"in C&&C.error.hide(),eventTarget("play"),!isUndefined(ad)&&!isUndefined(ad.front)&&isUndefined(ad.frontPlay)){ad.frontPlayI=0,ad.frontPlay=!0,player.pause(),adFrontPlay();return}seekTime&&(isUndefined(vars.live)||!isUndefined(vars.live)&&valType(vars.live)=="boolean"&&!vars.live)&&applyPendingSeek()},pause:function(){paused=!0,(isUndefined(ad)||isUndefined(ad.frontPlay)||!isUndefined(ad.frontPlay)&&!ad.frontPlay)&&!isUndefined(ad)&&!isUndefined(ad.pause)?(isUndefined(ad.pausePlayI)&&(ad.pausePlayI=0),adPausePlay()):vars.controls||(C.centerPlay.show(),C.buffer.hide()),C.bar.playAndPause.pause.hide(),C.bar.playAndPause.play.show(),C.bar.playAndPause.refresh.hide(),C.bar.pbox.removeClass("ck-bar-progress-out"),checkProgressSlider(),eventTarget("pause"),C.bar.removeClass("ck-bar-out"),CM.removeClass("ck-nocursor")},volumeChange:function(){if(this.volume==0&&!mutedState&&(this.muted=!0),this.volume>0&&mutedState&&(this.muted=!1),mutedState!=this.muted&&(mutedState=this.muted,changeMuted(this.muted),CT.muted=this.muted,eventTarget("muted",CT.muted)),CT.volume=this.volume,eventTarget("volume",this.volume),!isUndefined(C.bar.vbox)){var e=parseInt(this.volume*100);C.bar.vbox.volume.txt.htm(e),C.bar.vbox.mouseDown||changeVolumeSlider(this.muted?0:this.volume),this.muted||message(language.volume+e+"%")}replaceInformation("volume",parseInt(this.volume*100))},resize:function(){var e=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement;e?(C.bar.fullAndExit.exitFull.show(),C.bar.fullAndExit.full.hide(),C.ad.bottom.fullAndExit.exitFull.show(),C.ad.bottom.fullAndExit.full.hide(),CM.hasClass("ck-main-full")||CM.addClass("ck-main-full"),message(language.full),C.bar.webFullAndExit.hide(),C.bar.theatreAndExit.hide(),isUndefined(C.menu)||CM.append(C.menu)):(e=!1,C.bar.fullAndExit.full.show(),C.bar.fullAndExit.exitFull.hide(),C.ad.bottom.fullAndExit.full.show(),C.ad.bottom.fullAndExit.exitFull.hide(),CM.hasClass("ck-main-full")&&CM.removeClass("ck-main-full"),!isUndefined(vars.webFull)&&vars.webFull&&C.bar.webFullAndExit.show(),!isUndefined(vars.theatre)&&!CT.webFull&&C.bar.theatreAndExit.show(),isUndefined(C.menu)||$("body").append(C.menu),CV.css("width")!=CM.css("width")&&player.zoom(100)),CT.full!=e&&(CT.full=e,eventTarget("full",e)),checkVideoRotate(),changeProgress(player.time())},keydown:function(e){e=window.event||e;var t=e.keyCode||e.which,n=player.volume(),r=function(){e.preventDefault?e.preventDefault():e.returnValue=!1};switch(t){case 32:r(),player.playOrPause();break;case 37:player.fastBack();break;case 39:player.fastNext();break;case 38:valType(vars.keyVolume)=="number"&&(vars.keyVolume==1||vars.keyVolume==2&&CT.full)&&(r(),player.volume(n+.1<1?n+=.1:1));break;case 40:valType(vars.keyVolume)=="number"&&(vars.keyVolume==1||vars.keyVolume==2&&CT.full)&&(r(),player.volume(n-.1>0?n-=.1:0));break;default:break}},mouseWheel:function(e){if(valType(vars.mouseWheelVolume)=="number"&&(vars.mouseWheelVolume==1||vars.mouseWheelVolume==2&&CT.full)){e=window.event||e;var t=player.volume();e.preventDefault?e.preventDefault():e.returnValue=!1,e.wheelDelta?(e.wheelDelta>0&&player.volume(t+.1<1?t+=.1:1),e.wheelDelta<0&&player.volume(t-.1>0?t-=.1:0)):e.detail&&(e.detail>0&&player.volume(t-.1>0?t-=.1:0),e.detail<0&&player.volume(t+.1<1?t+=.1:1))}}},adFrontPlay=function(){if(ad.frontPlayI==0&&(allBarHide(!1),C.ad.show(),ad.front.video=!1,isUndefined(ad.front.closeTime)||(ad.front.closeTime>0?(C.ad.top.closeTime.show(),adFrontCloseTime()):C.ad.top.closeAd.show())),!isUndefined(ad.front.node)&&ad.front.node!=null&&(CM.append(ad.front.node),player.closeLayer(ad.front.node),ad.front.node=null),C.ad.picture.htm(""),C.ad.picture.hide(),C.ad.link.hide(),!isUndefined(ad.front.list[ad.frontPlayI])){var e=ad.front.list[ad.frontPlayI];frontAdPlay=!0,eventTarget("frontAd",e),e.type=="picture"?adPicturePlay(e):e.type=="node"?adNode(e):(C.ad.link.attr("data-link",e.link),adVideoPlay(e.file)),isUndefined(e.link)?C.ad.bottom.details.hide():(C.ad.bottom.details.show(),C.ad.bottom.details.htm('<a href="'+e.link+'" target="blank">'+language.details+"</a>"))}},adFrontCloseTime=function(){isUndefined(ad.front.closeSetTime)||(clearTimeout(ad.front.closeSetTime),ad.front.closeSetTime=null),C.ad.top.closeTime.htmReplace("{seconds}",ad.front.closeTime,language.closeTime),ad.front.closeTime--,ad.front.closeTime>0?ad.front.closeSetTime=setTimeout(adFrontCloseTime,1e3):(C.ad.top.closeAd.show(),C.ad.top.closeTime.hide())},calculationAdFrontTime=function(e){isUndefined(e)||(ad.front.list[ad.frontPlayI].time=e),ad.front.countDown=0;for(var t=ad.frontPlayI;t<ad.front.list.length;t++)ad.front.countDown+=parseInt(ad.front.list[t].time);C.ad.top.countDown.htm(ad.front.countDown+language.second)},clearAdFrontSetTime=function(){adFrontSetTime&&(clearTimeout(adFrontSetTime),adFrontSetTime=null)},adFrontCountDown=function(){clearAdFrontSetTime();var e=ad.front.list[ad.frontPlayI];e.time>0?(e.time--,ad.front.countDown--,C.ad.top.countDown.htm(ad.front.countDown+language.second),adFrontSetTime=setTimeout(adFrontCountDown,1e3)):adFrontEnded()},adFrontEnded=function(){ad.frontPlayI<ad.front.list.length-1?(ad.frontPlayI++,adFrontPlay()):(!isUndefined(ad.front.node)&&ad.front.node!=null&&(CM.append(ad.front.node),player.closeLayer(ad.front.node),ad.front.node=null),C.ad.picture.htm(""),C.ad.picture.hide(),ad.frontPlay=!1,C.ad.hide(),allBarShow(),seekTime=0,applyResumeSeekState(parseResumeSeekFromVars()),ad.front.video?changeVideo(vars.video):player.play(),eventTarget("frontAdEnded",!0),frontAdPlay=!1)},adVideoPlay=function(e){if(!isUndefined(e)){if(C.ad.picture.hide(),seekTime=0,(video.attr("src")||video.htm())&&player.pause(),video.attr("src")&&(video.attr("src",""),video.removeAttr("src")),video.htm(""),vars.plug&&!canPlay(e))switch(vars.plug){case"hls.js":hlsPlayer(e);break;case"flv.js":flvPlayer(e);break;case"mpegts.js":mpegtsPlayer(e);break;default:CT.error={code:10,message:language.error.emptied},eventTarget("error",CT.error),showError();break}else video.attr("src",e);ad.front.video=!0,C.ad.link.show(),C.ad.bottom.mutedAndExit.show()}},adPicturePlay=function(e){if(!isUndefined(e.file)){var t=null,n=0,r=function(){C.ad.picture.show(),C.ad.picture.htm(""),t=createlImg(e.file),C.ad.picture.append(t),t.addListener("load",function(){var o=this.getWidth(),s=this.getHeight();if(o>0||s>0){if(e.link){var g=createlA("",e.link);g.append(this),C.ad.picture.append(g)}else C.ad.picture.append(this);t.unbind(),t.click(function(){eventTarget("frontAdClick",e)})}else n<10&&(n++,r())})};r(),calculationAdFrontTime(),adFrontCountDown(),C.ad.bottom.mutedAndExit.hide()}},adNode=function(e){isUndefined(e.content)||(ad.front.node=player.layer(e),ad.front.node.css({"z-index":1}),C.ad.append(ad.front.node),ad.front.node.unbind(),ad.front.node.click(function(){eventTarget("frontAdClick",e)}),calculationAdFrontTime(),adFrontCountDown(),C.ad.bottom.mutedAndExit.hide())},frontVideoClickHandler=function(){var e=C.ad.link.attr("data-link");window.open(e,"_blank")},closeFrontAd=function(){if(!isUndefined(ad)&&!isUndefined(ad.front)&&!isUndefined(ad.front.closeButtonClick)){if(valType(ad.front.closeButtonClick)=="function")try{ad.front.closeButtonClick()}catch(e){console.error(e)}else if(valType(ad.front.closeButtonClick)=="string")try{eval(ad.front.closeButtonClick+"()")}catch(e){console.error(e)}}else player.closeFrontAd()},adPausePlay=function(){if(closePauseAd(),!isUndefined(ad)&&!isUndefined(ad.pause)&&!isUndefined(ad.pause.list)&&ad.pause.list.length-1>=ad.pausePlayI){var e=ad.pause.list[ad.pausePlayI];if(!isUndefined(ad.pause.close)&&ad.pause.close&&(ad.pauseClose=createlButton("ck-pause-close"),ad.pauseClose.click(function(){C.centerPlay.show(),C.buffer.hide(),closePauseAd()})),isUndefined(e.file))isUndefined(e.content)||(ad.pause.node=player.layer(e),ad.pauseClose&&ad.pause.node.append(ad.pauseClose),ad.pause.node.click(function(){eventTarget("pauseAdClick",e)}));else{var t=null,n=0,r=function(){t=createlImg(e.file),C.adPause.show(),C.adPause.htm(""),C.adPause.append(t),t.addListener("load",function(){var o=this.getWidth(),s=this.getHeight();if(o>0||s>0){if(C.adPause.htm(""),e.link){var g=createlA("",e.link);g.append(this),C.adPause.append(g)}else C.adPause.append(this);C.adPause.css({width:o+"px",height:s+"px"}),ad.pauseClose&&C.adPause.append(ad.pauseClose),t.click(function(){eventTarget("pauseAdClick",e)})}else n<10&&(n++,r())})};r()}eventTarget("pauseAd",e),!isUndefined(e.time)&&e.time>0&&(adPauseSetTime=setTimeout(function(){ad.pausePlayI++,ad.pausePlayI>ad.pause.list.length-1&&(ad.pausePlayI=0),adPausePlay()},e.time*1e3))}},closePauseAd=function(){adPauseSetTime&&(clearTimeout(adPauseSetTime),adPauseSetTime=null),C.adPause.hide(),!isUndefined(ad)&&!isUndefined(ad.pauseClose)&&ad.pauseClose!=null&&(ad.pauseClose.remove(),ad.pauseClose=null),!isUndefined(ad)&&!isUndefined(ad.pause)&&!isUndefined(ad.pause.node)&&ad.pause.node&&(ad.pause.node.unbind(),player.closeLayer(ad.pause.node),eventTarget("pauseAdClose"))},player={width:function(e){return isUndefined(e)||(valType(e)=="number"&&(e+="px"),CT.css({width:e}),checkVideoRotate()),CK.getWidth()},height:function(e){return isUndefined(e)||(valType(e)=="number"&&(e+="px"),CT.css({height:e}),checkVideoRotate()),CK.getHeight()},videoWidth:function(){return video?video.videoWidth:null},videoHeight:function(){return video?video.videoHeight:null},zoom:function(e){if(!isUndefined(e)&&(valType(e)=="function"&&newEvent.addEventListener("zoom",e),valType(e)=="number")){for(var t=[C.topBar.zoomEle.zoom50,C.topBar.zoomEle.zoom75,C.topBar.zoomEle.zoom100],n=0;n<t.length;n++)t[n].removeClass("ck-top-bar-zoom-container-focus");switch(e){case 50:t[0].addClass("ck-top-bar-zoom-container-focus");break;case 75:t[1].addClass("ck-top-bar-zoom-container-focus");break;case 100:t[2].addClass("ck-top-bar-zoom-container-focus");break}(e==50||e==75||e==100)&&(nowZoom=e,checkVideoRotate(),eventTarget("zoom",e))}return player},rotate:function(e){if(!isUndefined(e)&&(valType(e)=="function"&&newEvent.addEventListener("rotate",e),valType(e)=="number")){var t=[0,90,180,270],n=0;t.length>e&&e>0?n=t[e]:t.indexOf(e)>-1&&(n=e),n!=nowRotate&&(eventTarget("rotate",n),nowRotate=n,checkVideoRotate())}},vars:function(e,t){if(!isUndefined(e)){if(valType(e)=="string"&&!isUndefined(t)){var n={};n[e]=t,e=n}var r=!1;for(var o in e)if(o in vars&&e[o]!=vars[o]){r=!0;break}r&&(vars=standardization(vars,e)),isUndefined(e.video)||(isChangeDef=!0,changeVideo(vars.video)),isUndefined(e.title)||C.topBar.titleEle.htm(e.title)}},loadstart:function(e){!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("loadstart",e)},loadeddata:function(e){!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("loadeddata",e)},loadedMetaData:function(e){!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("loadedMetaData",e)},canplay:function(e){!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("canplay",e)},play:function(e){if(valType(e)=="object"&&(e.target==C.bar.playAndPause.play||e.target==C.bar.playAndPause.refresh)&&(playType="button"),!isUndefined(e)&&valType(e)=="function")newEvent.addEventListener("play",e);else if(loadedmetadataNum>0&&video)try{video.play()}catch(t){console.error(t)}return player},pause:function(e){if(!isUndefined(e)&&valType(e)=="function")newEvent.addEventListener("pause",e);else if(loadedmetadataNum>0&&video)try{video.pause()}catch(t){console.error(t)}return player},playOrPause:function(){return paused?player.play():player.pause(),player},volume:function(e){if(!isUndefined(e))valType(e)=="function"?newEvent.addEventListener("volume",e):valType(e)=="number"&&video&&(e<0&&(e=0),e>1&&(e=1),video.muted&&(video.volume=e*.5),video.volume=e);else if(video)return video.volume;return player},muted:function(e){return!isUndefined(e)&&valType(e)=="function"?newEvent.addEventListener("muted",e):video&&(video.muted=!0),player},exitMuted:function(){return video&&(video.muted=!1,video.volume==0&&player.volume(vars.volume>0?vars.volume:.8)),player},time:function(e){if(!isUndefined(e)&&valType(e)=="function")newEvent.addEventListener("time",e);else if(video)return video.currentTime||0},seek:function(e){if(!isUndefined(e))if(valType(e)=="function")newEvent.addEventListener("seek",e);else{var t=null;if(valType(e)=="number"&&!isNaN(e)?t=e:valType(e)=="string"&&e!==""&&e!=="cookie"&&!isNaN(parseFloat(e))&&(t=parseFloat(e)),t!==null&&video){switch(t>0&&(seekTime&&Math.abs(seekTime-t)<.5||vars.seek&&parseFloat(vars.seek)>0&&Math.abs(parseFloat(vars.seek)-t)<.5)&&(maxSeeTime=Math.max(maxSeeTime,t),firstSeekTime<0&&(firstSeekTime=t)),vars.timeScheduleAdjust){case 0:return message(language.timeScheduleAdjust.prohibit),player;case 1:break;case 2:if(t<oldTime)return message(language.timeScheduleAdjust.prohibitBackOff),player;break;case 3:if(t>oldTime)return message(language.timeScheduleAdjust.prohibitForward),player;break;case 4:if(t<firstSeekTime){waitingMessage=!1;try{video.currentTime=firstSeekTime}catch(r){}return message(language.timeScheduleAdjust.prohibitLookBack),player}break;case 5:if(t>maxSeeTime){waitingMessage=!1;try{video.currentTime=maxSeeTime}catch(r){}return message(language.timeScheduleAdjust.prohibitForwardNotViewed),player}break}pSliderMouseDown=!1;var n=video.readyState>=2||duration&&isFinite(duration)&&duration>0;if(!n)return seekTime=t,t>0&&(maxSeeTime=Math.max(maxSeeTime,t),firstSeekTime<0&&(firstSeekTime=t)),player;if(duration&&isFinite(duration)&&duration>0&&t>duration&&(t=Math.max(0,duration-.3)),t<0&&(t=0),vars.timeScheduleAdjust==5&&t>maxSeeTime&&seekTime&&Math.abs(seekTime-t)<.5&&(maxSeeTime=Math.max(maxSeeTime,t)),t>.5&&!timeInBuffered(t)&&video.readyState<3&&!hls)return seekTime=t,applyPendingSeek(!1),player;if(hls&&typeof hls.startLoad=="function"){seekTime=0;try{hls.startLoad(t)}catch(r){seekTime=t}return player}try{video.currentTime=t,seekTime=0,t>maxSeeTime&&vars.timeScheduleAdjust!=5&&(maxSeeTime=t)}catch(r){seekTime=t}}}return player},buffer:function(e){return!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("buffer",e),player},ended:function(e){return!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("ended",e),player},next:function(e){return!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("next",e),player},error:function(e){return!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("error",e),player},emptied:function(e){return!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("emptied",e),player},duration:function(e){if(!isUndefined(e)&&valType(e)=="function")newEvent.addEventListener("duration",e);else return duration||0},playbackRate:function(e){if(!isUndefined(e))valType(e)=="function"?newEvent.addEventListener("playbackRate",e):valType(e)=="number"&&video&&(video.playbackRate=e,CT.playbackRate=e,eventTarget("playbackRate",e),changePlaybackrateVal(e));else return video.playbackRate},track:function(e){if(isUndefined(e))return CT.track;if(valType(e)=="function")newEvent.addEventListener("track",e);else if(valType(e)=="number"&&video){var t=null;if(isUndefined(video.textTracks)||(t=video.textTracks),t&&valType(t)=="texttracklist"){for(var n=vars.track,r=t.length-1;r>-1;r--)video.find("track").eq(r).remove();for(var r=0;r<n.length;r++){var o="";n[r].default=!1,r==e&&(o=" default",n[r].default=!0),t+='<track src="'+n[r].src+'" srclang="'+n[r].srclang+'" kind="'+n[r].kind+'" label="'+n[r].label+'"'+o+">"}if(video){var s=video.htm()+t;video.htm(s)}changeTrackVal(e)}}},fastBack:function(e){if(duration!=0){(isUndefined(e)||valType(e)!="number")&&(e=20);var t=player.time();return t-e>0?t-=e:t=0,player.seek(t),player}},fastNext:function(e){if(duration!=0){(isUndefined(e)||valType(e)!="number")&&(e=20);var t=player.time();return t+e<duration?t+=e:t=duration,player.seek(t),player}},definition:function(e){return isUndefined(e)||(valType(e)=="function"&&newEvent.addEventListener("definition",e),valType(e)=="number"&&changeDefinition(e)),player},fps:function(e){return!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("fps",e),CT.fps},playback:function(e){if(!isUndefined(e))valType(e)=="function"&&newEvent.addEventListener("playback",e);else return playbackTime;return player},backLive:function(e){return isUndefined(e)||(valType(e)=="function"&&newEvent.addEventListener("backLive",e),valType(e)=="boolean"&&(bool?C.bar.backLive.show():C.bar.backLive.hide())),player},full:function(e){if(!isUndefined(e)&&valType(e)=="function")newEvent.addEventListener("full",e);else{if(smallWindowsState)return;CT.theatre&&player.exitTheatre(),CT.webFull&&player.exitWebFull();var t=CK.requestFullScreen||CK.webkitRequestFullScreen||CK.mozRequestFullScreen||CK.oRequestFullscreen||CK.msRequestFullscreen;if(!isUndefined(t))t.call(CK);else if(isUndefined(window.ActiveXObject)){if(!isUndefined(video.webkitEnterFullscreen)||!isUndefined(video.webkitEnterFullScreen)){var r=video.webkitEnterFullscreen||video.webkitEnterFullScreen;r.call(video)}}else{var n=new ActiveXObject("WScript.Shell");n!==null&&n.SendKeys("{F11}")}player.zoom(100)}return player},exitFull:function(){var e=document.exitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.oCancelFullScreen||document.msExitFullscreen;if(!isUndefined(e))e.call(document);else if(!isUndefined(window.ActiveXObject)){var t=new ActiveXObject("WScript.Shell");t!==null&&t.SendKeys("{F11}")}return player},fullOrExit:function(){var e=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement;return e?player.exitFull():player.full(),player},webFull:function(e){return!isUndefined(e)&&valType(e)=="function"?newEvent.addEventListener("webfull",e):(exitSmallWindows(),isUndefined(vars.theatre)||C.bar.theatreAndExit.hide(),CK.css({position:"fixed",top:0,left:0,height:"100%","z-index":getMaxZIndex()+1}),C.bar.webFullAndExit.webFull.hide(),C.bar.webFullAndExit.exitWebFull.show(),CT.webFull=!0,eventTarget("webfull",!0),checkVideoRotate()),player},exitWebFull:function(){return CK.css({position:"relative"}),C.bar.webFullAndExit.webFull.show(),C.bar.webFullAndExit.exitWebFull.hide(),isUndefined(vars.theatre)||(C.bar.theatreAndExit.show(),C.bar.theatreAndExit.theatre.show(),C.bar.theatreAndExit.exitTheatre.hide()),CK.attr("style",""),CT.webFull=!1,eventTarget("webfull",!1),checkVideoRotate(),player},theatre:function(fn){if(!isUndefined(fn)&&valType(fn)=="function")newEvent.addEventListener("theatre",fn);else{if(valType(vars.theatre)=="array"&&vars.theatre.length==2){var fun=vars.theatre[0];valType(fun)=="function"&&fun(),valType(fun)=="string"&&eval(fun+"()")}else exitSmallWindows(),CK.css({position:"absolute",top:CT.offset().top,left:0,height:CT.getHeight()+"px","z-index":getMaxZIndex()+1}),C.bar.theatreAndExit.theatre.hide(),C.bar.theatreAndExit.exitTheatre.show();CT.theatre=!0,eventTarget("theatre",!0),checkVideoRotate()}return player},exitTheatre:function(){if(valType(vars.theatre)=="array"&&vars.theatre.length==2){var fun=vars.theatre[1];valType(fun)=="function"&&fun(),valType(fun)=="string"&&eval(fun+"()")}else CK.css({position:"relative"}),C.bar.theatreAndExit.theatre.show(),C.bar.theatreAndExit.exitTheatre.hide(),CK.attr("style",""),CT.theatre=!1;return eventTarget("theatre",!1),checkVideoRotate(),player},smallWindows:function(e){return isUndefined(e)||(valType(e)=="function"&&newEvent.addEventListener("smallWindows",e),valType(e)=="boolean"&&(e?(C.rightBar.smallwindows.open.show(),C.rightBar.smallwindows.close.hide(),CT.smallWindows=!0):(C.rightBar.smallwindows.open.hide(),C.rightBar.smallwindows.close.show(),CT.smallWindows=!1),eventTarget("smallWindows",CT.smallWindows),checkVideoRotate())),CT.smallWindows},loop:function(e){return isUndefined(e)||(valType(e)=="function"&&newEvent.addEventListener("loop",e),valType(e)=="boolean"&&video&&(e?(C.rightBar.loop.open.show(),C.rightBar.loop.close.hide(),CT.loop=!0,video.attr("loop","loop"),eventTarget("loop",!0)):(C.rightBar.loop.open.hide(),C.rightBar.loop.close.show(),CT.loop=!1,video.attr("loop",!1),video.removeAttr("loop"),eventTarget("loop",!1)))),CT.loop},screenshot:function(e){if(!isUndefined(e)&&valType(e)=="function")newEvent.addEventListener("screenshot",e);else if(!isUndefined(vars.screenshot)&&vars.screenshot&&video)try{message(language.screenshotStart,!0);var t=$(document.createElement("canvas"));t.width=video.videoWidth,t.height=video.videoHeight,t.getContext("2d").drawImage(video,0,0,video.videoWidth,video.videoHeight);var n=t.toDataURL("image/png");eventTarget("screenshot",n),screenshotImg&&(screenshotImg.remove(),screenshotImg=null),screenshotImg=createlImg(n),screenshotImg.addListener("load",function(){C.screenshot.img.append(screenshotImg),C.screenshot.show().css({width:this.getWidth()+"px"})});var r=dataURLtoBlob(n),o=URL.createObjectURL(r),s="video";return vars.title&&(s=vars.title),C.screenshot.bar.down.attr("href",o).attr("download",s),n}catch(g){message(language.error.screenshot,!0)}else message(language.screenshotClose,!0);return player},closeScreenshot:function(e){return!isUndefined(e)&&valType(e)=="boolean"&&!e?C.screenshot.show():C.screenshot.hide(),player},layer:function(e,t){if(isUndefined(e))return null;var n=!1;isUndefined(t)||(n=t);var r=null;if(valType(e)=="object"&&("class"in e&&"content"in e?(r=createlDiv(e.class),r.htm(e.content)):"content"in e&&(e=e.content)),valType(e)=="string"&&(e.substr(0,1)=="."||e.substr(0,1)=="#"?r=getElement(e):(r=createlDiv("ck-layer"),r.htm(e))),r){var o=r.css("z-index");o=="auto"&&(o=101),o<101&&(o=101),o>200&&(o=200),isUndefined(r.cssDisplay)&&(r.cssPosition=r.css("position"),r.cssDisplay=r.css("display")),r.css({position:"absolute","z-index":o}),n?C.bar.append(r):CM.append(r),r.CK=CK,r.show()}return r},closeLayer:function(e){if(valType(e)=="string"){var t=$(e);isUndefined(t)||t.length>0&&(e=t.eq(0))}if(!isUndefined(e)&&valType(e)=="htmlobject"){if(isUndefined(e.captureParentNode))e.remove();else{var n=e.captureParentNode;if(e.nextElement)try{n.insertBefore(e,e.nextElement)}catch(r){n.append(e)}else if(e.prevElement)try{n.insertAfter(e,e.prevElement)}catch(r){n.append(e)}else n.append(e);e.css({display:e.cssDisplay})}isUndefined(e.cssDisplay)||e.css({display:e.cssDisplay,position:e.cssPosition})}return player},message:function(e){return message(e),player},closeFrontAd:function(){return frontAdPlay&&!isUndefined(ad)&&!isUndefined(ad.front)&&!isUndefined(ad.front.list)&&(ad.frontPlayI=ad.front.list.length-1,adFrontEnded(),clearAdFrontSetTime()),player},addListener:function(e,t){newEvent.addEventListener(e,t)},removeListener:function(e,t){newEvent.removeEventListener(e,t)},bar:function(e){barShow=e,e?C.bar.show():C.bar.hide()},rightBar:function(e){rightBarShow=e,e?C.rightBar.show():C.rightBar.hide()},mouseActive:function(e){return!isUndefined(e)&&valType(e)=="function"&&newEvent.addEventListener("mouseActive",e),this},cookie:function(e){if(e=="delete")return cookie(ckplayerCookie,"delete",vars.domain),null;!isUndefined(e)&&e&&(e=e.replace(/[ ]*,[ ]*|[ ]+/g,"").replace(/[ ]*;[ ]*|[ ]+/g,""));var t=cookie(ckplayerCookie);if(t){var n=stringToArray(t),r=[],o=parseInt(Date.now()*.001);for(s=0;s<n.length;s++)parseInt(n[s][2])>o&&r.push(n[s]);if(n=r,n.length>0){cookie(ckplayerCookie,"delete",vars.domain,vars.cookiePath),cookie(ckplayerCookie,arrayToString(n),vars.domain,vars.cookiePath);for(var s=0;s<n.length;s++)if(n[s]={name:n[s][0],time:n[s][1],expirationTime:date("Y-m-d H:i:s",n[s][2]),expirationTimeStamp:n[s][2]},!isUndefined(e)&&e==n[s].name)return n[s];return n}else cookie(ckplayerCookie,"delete",vars.domain,vars.cookiePath)}return null},visibilityState:function(e){return!isUndefined(e)&&valType(e)=="function"&&(isUndefined(document.visibilityState)||e(document.visibilityState==="visible"?"show":"hidden"),newEvent.addEventListener("visibilityState",e)),this},remove:function(){var e={};if(eventTargetList!=null){for(var t in eventTargetList)e[t]=eventTargetList[t];for(var t in e){var n=e[t];if(n)for(var r=0;r<n.length;r++){var o=n[r];newEvent.removeEventListener(t,o)}}}return frontAdPlay&&this.closeFrontAd(),pugPlayer&&(pugPlayer.pause(),pugPlayer.unload(),pugPlayer.detachMediaElement(),pugPlayer.destroy(),pugPlayer=null),hls&&(hls.stopLoad(),hls.detachMedia()),loadedmetadataNum=0,loadedTrack=!1,isChangeDef=!0,video&&(video.unbind(),video.remove(),video=null),isUndefined(C.menu)||C.menu.remove(),CT&&(CT.unbind(),CT.htm("")),null}},checkBar=function(){vars.autoplay?(C.bar.playAndPause.play.hide(),C.bar.playAndPause.pause.show()):(C.bar.playAndPause.play.show(),C.bar.playAndPause.pause.hide()),mutedState?C.bar.vbox.muted.hide():C.bar.vbox.exitMuted.hide(),isUndefined(vars.next)?C.bar.nextEpisode.hide():C.bar.nextEpisode.show(),!isUndefined(vars.webFull)&&vars.webFull&&!CT.full?C.bar.webFullAndExit.show():C.bar.webFullAndExit.hide(),!isUndefined(vars.theatre)&&!CT.full&&!CT.webFull?C.bar.theatreAndExit.show():C.bar.theatreAndExit.hide(),!isUndefined(vars.rightBar)&&vars.rightBar?C.rightBar.show():C.rightBar.hide(),(!vars.live||valType(vars.live)=="number")&&(pSliderMouseDown=!1,progressDragX()),(vars.live||valType(vars.live)=="number")&&(C.time.htm(language.live),C.tempTime.htm(language.live)),valType(vars.smallWindows)=="boolean"&&!vars.smallWindows&&(CT.smallWindows=!1,C.rightBar.smallwindows.open.hide(),C.rightBar.smallwindows.close.show()),CT.loop?(C.rightBar.loop.open.show(),C.rightBar.loop.close.hide()):(C.rightBar.loop.open.hide(),C.rightBar.loop.close.show()),!isUndefined(vars.backLive)&&vars.backLive&&C.bar.backLive.show(),vars.volume==0&&player.muted()},loadLogo=function(){!isUndefined(vars.logo)&&isUndefined(C.logo)&&(C.logo=createlDiv("ck-logo"),createlImg(vars.logo).addListener("load",function(){CM.append(C.logo),C.logo.append(this)}).addListener("error",function(){C.logo.remove()}))},loadAbout=function(){if(!isUndefined(vars.information)&&!isUndefined(C.about)&&valType(vars.information)=="object"){var e=vars.information,t="",n=$(document.createElement("ul")),r="";for(t in e){var o=createlDiv("div").attr("class","ck-about-title"),s=createlDiv("div").attr("class","ck-about-content"),g=$(document.createElement("li"));o.htm(t),s.htm(e[t]),g.append(o),g.append(s),n.append(g),r+=t+":"+e[t]+`
2
- `}C.about.append(n),C.about.textareaText=r,C.about.textareaEle=$(document.createElement("textarea")),CM.append(C.about.textareaEle),C.about.textareaEle.hide()}},loadMenu=function(){!isUndefined(vars.menu)&&vars.menu&&(rightMenu=vars.menu),C.menu=createlDiv("ckplayer-ckplayer-menu");for(var i=0;i<rightMenu.length;i++){var m=rightMenu[i],li=createlDiv("ck-li");if(isUndefined(m.underline)||li.addClass("ck-underline"),!isUndefined(m.link)&&!isUndefined(m.title))li.append(createlA(m.title,m.link)),C.menu.append(li);else if(!isUndefined(m.javascript)&&!isUndefined(m.title))li.append(createlJsLink(m.title,m.javascript)),C.menu.append(li);else if(!isUndefined(m.click)&&!isUndefined(m.title)){var a=createlJsLink(m.title);a.attr("data-click",m.click.toString()),a.click(function(){eval($(this).attr("data-click")+"()"),C.menu.hide()}),li.append(a),C.menu.append(li)}else isUndefined(m.title)||(li.htm(m.title),C.menu.append(li))}$("body").append(C.menu),CM.oncontextmenu=function(e){var t=e||window.event,n=getClient(t);if(t.button==2){t.returnvalue=!1;var r=n.x-2,o=n.y-2;return C.menu.show(),C.menu.css({left:r+"px",top:o+"px"}),!1}return!0};var menuSetTimeOut=null,clearTime=function(){menuSetTimeOut&&(clearTimeout(menuSetTimeOut),menuSetTimeOut=null)},menuMouseOut=function(){clearTime(),menuSetTimeOut=setTimeout(function(){C.menu.hide()},200)};C.menu.mouseout(menuMouseOut),C.menu.mouseover(clearTime)},aboutShow=function(){C.about.show(),C.menu.hide()},aboutHide=function(){C.about.hide()},aboutCopy=function(){C.about.textareaEle.show(),C.about.textareaEle.select(),document.execCommand("Copy"),C.about.textareaEle.hide(),message(language.copySucceeded,!0)},getBarHeight=function(){var e=C.bar.getHeight();return parseFloat(C.bar.pbox.css("top"))<0&&(e-=parseInt(C.bar.pbox.css("top"))),e},hideBar=function(){mouseSetTime&&(clearTimeout(mouseSetTime),mouseSetTime=null),mouseSetTime=setTimeout(function(){paused||(C.bar.addClass("ck-bar-out"),eventTarget("mouseActive",!1),CT.full&&CM.addClass("ck-nocursor"),C.rightBar.css("display")=="block"&&C.rightBar.addClass("ck-right-bar-hide"),C.topBar.css("display")=="block"&&C.topBar.addClass("ck-top-bar-hide")),mouseSetTime=null},vars.barHideTime)},barMouseOut=function(){paused||(C.bar.pbox.addClass("ck-bar-progress-out"),hideBar())},barMouseOver=function(){paused||(C.bar.pbox.removeClass("ck-bar-progress-out"),mouseSetTime&&(clearTimeout(mouseSetTime),mouseSetTime=null))},rightBarMouseOut=function(){paused||hideBar()},rightBarMouseOver=function(){paused||mouseSetTime&&(clearTimeout(mouseSetTime),mouseSetTime=null)},checkPlaybackrate=function(){var e=vars.playbackrateList,t=vars.playbackrate;C.bar.playbackrate.bg=createlDiv("ck-list-bg"),C.bar.playbackrate.bgbox.append(C.bar.playbackrate.bg),C.bar.playbackrate.bg.p=[];for(var n=e.length-1;n>-1;n--){var r=createlButton("ck-list-p",e[n]+language.playbackrateSuffix);r.attr("data-i",n).attr("data-val",e[n]),C.bar.playbackrate.bg.p.push(r),C.bar.playbackrate.bg.append(r),r.click(playbackrateClick)}if(C.bar.playbackrate.hide(),!isUndefined(vars.playbackrateOpen)&&vars.playbackrateOpen){C.bar.playbackrate.show(),C.bar.playbackrate.bgbox.show();var o=C.bar.playbackrate.bg.getWidth(),s=C.bar.playbackrate.bg.getHeight(),g=C.bar.playbackrate.button.getWidth();C.bar.playbackrate.bg.css({width:o+10+"px"}),o=C.bar.playbackrate.bg.getWidth(),getBarHeight()>C.bar.getHeight()&&(s+=getBarHeight()-C.bar.getHeight()),C.bar.playbackrate.bgbox.attr("style",""),C.bar.playbackrate.bgbox.css({width:o+"px",height:s+2+"px",left:-(o-g)*.5+"px"}),C.bar.playbackrate.button.mouseover(function(){o=C.bar.playbackrate.bg.getWidth(),g=C.bar.playbackrate.button.getWidth(),C.bar.playbackrate.bgbox.css({left:-(o-g)*.5+"px"})}),changePlaybackrateVal(t)}},playbackrateClick=function(e){C.bar.playbackrate.bgbox.hide(),setTimeout(function(){C.bar.playbackrate.bgbox.removeCss("display")},300),message(language.switchTo+$(this).htm()),player.playbackRate(parseFloat($(this).attr("data-val")))},changePlaybackrateVal=function(e){C.bar.playbackrate.bg.find("button").each(function(t,n){var r=parseFloat(n.attr("data-val"));n.removeClass("ck-list-p-focus"),e==r?(n.addClass("ck-list-p-focus"),e!=1?C.bar.playbackrate.button.htm(n.htm()):C.bar.playbackrate.button.htm(language.playbackrate)):n.removeClass("ck-list-p-focus")})},checkTrack=function(){var e=vars.track,t=-1;C.bar.track.bgbox.htm(""),C.bar.track.bg=createlDiv("ck-list-bg"),C.bar.track.bgbox.append(C.bar.track.bg),C.bar.track.bg.p=[];for(var n=null,r=e.length-1;r>-1;r--)n=createlButton("ck-list-p",e[r].label),n.attr("data-i",r).attr("data-title",e[r].label),C.bar.track.bg.p.push(n),C.bar.track.bg.append(n),!isUndefined(e[r].default)&&e[r].default&&(t=r),n.click(trackClick);n=createlButton("ck-list-p",language.noTrack),n.attr("data-i",-1).attr("data-title",language.noTrack),C.bar.track.bg.p.push(n),C.bar.track.bg.append(n),n.click(trackClick),C.bar.track.hide(),C.bar.track.show(),C.bar.track.bgbox.show();var o=C.bar.track.bg.getWidth(),s=C.bar.track.bg.getHeight(),g=C.bar.track.button.getWidth();C.bar.track.bg.css({width:o+10+"px"}),o=C.bar.track.bg.getWidth(),getBarHeight()>C.bar.getHeight()&&(s+=getBarHeight()-C.bar.getHeight()),C.bar.track.bgbox.attr("style",""),C.bar.track.bgbox.css({width:o+"px",height:s+2+"px",left:-(o-g)*.5+"px"}),C.bar.track.button.mouseover(function(){o=C.bar.track.bg.getWidth(),g=C.bar.track.button.getWidth(),C.bar.track.bgbox.css({left:-(o-g)*.5+"px"})}),changeTrackVal(t)},trackClick=function(e){C.bar.track.bgbox.hide(),setTimeout(function(){C.bar.track.bgbox.removeCss("display")},300),message(language.switchTo+$(this).attr("data-title")),player.track(parseFloat($(this).attr("data-i")))},changeTrackVal=function(e){C.bar.track.bg.find("button").each(function(t,n){var r=parseInt(n.attr("data-i"));e==r?(C.bar.track.button.htm(n.attr("data-title")),r>-1?(CT.track=vars.track[r],eventTarget("track",vars.track[r])):(CT.track=null,eventTarget("track",null)),n.addClass("ck-list-p-focus")):n.removeClass("ck-list-p-focus")})},checkDefinition=function(){var e=-1,t=video.currentSrc;if(isUndefined(C.bar.definition.bg)||(C.bar.definition.bgbox.htm(""),C.bar.definition.bgbox.attr("style",""),C.bar.definition.button.htm(language.definition)),valType(vars.video)=="array"){var n=vars.video;C.bar.definition.bg=createlDiv("ck-list-bg"),C.bar.definition.bgbox.append(C.bar.definition.bg),C.bar.definition.bg.p=[];for(var r=n.length-1;r>-1;r--){var o=createlButton("ck-list-p",n[r][2]);o.attr("data-i",r).attr("data-video",n[r][0]).attr("data-type",n[r][1]).attr("data-title",n[r][2]),C.bar.definition.bg.p.push(o),C.bar.definition.bg.append(o),t&&t.indexOf(n[r][0])>-1&&(e=r),o.click(definitionClick)}C.bar.definition.show(),C.bar.definition.bgbox.show();var s=C.bar.definition.bg.getWidth(),g=C.bar.definition.bg.getHeight(),d=C.bar.definition.button.getWidth();C.bar.definition.bg.css({width:s+10+"px"}),s=C.bar.definition.bg.getWidth(),getBarHeight()>C.bar.getHeight()&&(g+=getBarHeight()-C.bar.getHeight()),C.bar.definition.bgbox.attr("style",""),C.bar.definition.bgbox.css({width:s+"px",height:g+2+"px",left:-(s-d)*.5+"px"}),C.bar.definition.button.mouseover(function(){s=C.bar.definition.bg.getWidth(),d=C.bar.definition.button.getWidth(),C.bar.definition.bgbox.css({left:-(s-d)*.5+"px"})})}e>-1&&C.bar.definition.bg.find("button").each(function(u,c){var b=parseInt(c.attr("data-i"));e==b?c.addClass("ck-list-p-focus"):c.removeClass("ck-list-p-focus")})},definitionClick=function(e){C.bar.definition.bgbox.hide(),setTimeout(function(){C.bar.definition.bgbox.removeCss("display")},300),changeDefinition(parseInt($(this).attr("data-i")))},changeDefinition=function(e){C.bar.definition.bg.find("button").each(function(t,n){var r=parseInt(n.attr("data-i"));if(e==r){if(!isUndefined(video.textTracks)&&video.textTracks.length>0)for(var o=video.find("track").length-1;o>-1;o--)video.find("track").eq(o).remove();seekTime=player.time(),video.attr("autoplay","autoplay"),changeVideo(n.attr("data-video")),message(language.switchTo+n.htm()),C.bar.definition.button.htm(n.htm()),n.addClass("ck-list-p-focus"),eventTarget("definition",{id:r,video:n.attr("data-video"),title:n.attr("data-title")})}else n.removeClass("ck-list-p-focus")})},deletePrompt=function(){var e=0;if(!isUndefined(C.prompt)&&valType(C.prompt)=="array"){for(e=C.prompt.length;e>-1;e--)isUndefined(C.prompt[e])||C.prompt[e].remove();C.prompt=null}C.prompt=[]},changePrompt=function(){deletePrompt();for(var e=0;e<vars.prompt.length;e++){var t=vars.prompt[e];if(!isUndefined(t)&&"words"in t&&"time"in t&&!isUndefined(t.time)&&!isUndefined(t.words)&&valType(t.time)=="number"){var n=createlDiv("ck-bar-progress-prompt");n.attr("data-words",t.words).attr("data-time",t.time),C.bar.pbox.bg.append(n);var r=n.getWidth()*.5/C.bar.pbox.bg.getWidth()*50,o=t.time/duration*100-r;o<0&&(o=0),o>100&&(o=100),n.css({left:o+"%"}),n.mouseover(function(){this.attr("data-words")&&showPromptWords(this)}),n.mouseout(function(){this.attr("data-words")&&showPromptWords()}),C.prompt.push(n)}}},showPromptWords=function(e){if(isUndefined(C.promptWords)&&(C.promptWords=createlDiv("ck-prompt-words"),CM.append(C.promptWords),C.promptWords.content=createlDiv("ck-prompt-content"),C.promptWords.append(C.promptWords.content)),isUndefined(e)){C.promptWords.content.htm(""),C.promptWords.hide();return}C.promptWords.content.htm(e.attr("data-words")),C.promptWords.show();var t=C.promptWords.getWidth(),n=C.promptWords.getHeight(),r=C.bar.pbox.bg,o=parseFloat(e.attr("data-time")),s=CK.getHeight()-getBarHeight(),g=e.offset().left-CK.offset().left+e.getWidth()*.5-t*.5;isUndefined(C.preview)?(s=CK.getHeight()-parseFloat(getBarHeight()+C.tip.minHeight+parseInt(C.tip.css("margin-bottom"))),s-=getBarHeight()-C.bar.getHeight()):s=CK.getHeight()-parseFloat(getBarHeight()+C.preview.smallHight+parseInt(C.preview.css("margin-bottom"))),s-=parseFloat(C.promptWords.css("margin-bottom")),s-=n,g-=parseFloat(C.promptWords.css("margin-right")),g<0&&(g=0),g>CK.getWidth()-t&&(g=CK.getWidth()-t),C.promptWords.css({top:s+"px",left:g+"px"})},changePreview=function(e){if(isUndefined(C.preview)||(C.preview.remove(),C.preview=null),!isUndefined(e)){C.preview=createlDiv("ck-preview"),CM.append(C.preview),isUndefined(vars.preview.type)&&(vars.preview.type=0),vars.preview.type==1&&(C.preview.bg=createlDiv("ck-preview-bg"),C.preview.append(C.preview.bg));var t=[],n=function(s,g,d,u){if(vars.preview.type==1){C.preview.bg.img=[];for(var c=0;c<t.length;c++)for(var b=0;b<g/u;b++){var p=createlDiv("ck-preview-img");p.attr("data-img",t[c]).attr("data-i",b),p.css({width:s+"px",height:u+"px","background-position":"left "+-(b*u)+"px"}),C.preview.bg.append(p),C.preview.bg.img.push(p)}C.preview.bg.css({width:s*(g/u)*(t.length+1)+"px",height:u+"px"})}C.preview.bigWidth=s,C.preview.bigHight=g,C.preview.smallWidth=d,C.preview.smallHight=u,vars.preview.type==1&&(C.preview.frame=createlDiv("ck-preview-frame"),C.preview.append(C.preview.frame),C.preview.frame.css({width:d+"px",height:u-parseFloat(C.preview.frame.css("border-width"))*2+"px"}))};if(valType(vars.preview)=="object")if(valType(vars.preview.file)=="array"){t=vars.preview.file;var r=[10,10];if(valType(vars.preview.thumbnail)=="array"&&vars.preview.thumbnail.length>1&&(valType(vars.preview.thumbnail[0])=="number"&&(r[0]=vars.preview.thumbnail[0]),valType(vars.preview.thumbnail[1])=="number"&&(r[1]=vars.preview.thumbnail[1]),vars.preview.thumbnail=r),t[0]){var o=createlImg(t[0],"ck-preview-load-img").addListener("load",function(){n(this.getWidth(),this.getHeight(),this.getWidth()/r[0],this.getHeight()/r[1]),this.remove()});CM.append(o)}}else C.preview.removeChild(),C.preview=null;else C.preview.removeChild(),C.preview=null}},showPreview=function(e){if(hidePreviewSetTime&&(clearTimeout(hidePreviewSetTime),hidePreviewSetTime=null),e<0&&!isUndefined(C.preview)){hidePreviewSetTime=setTimeout(function(){C.preview.hide(),hidePreviewSetTime=null},200);return}if(!isUndefined(C.preview)&&!isUndefined(vars.preview.thumbnail)&&duration>0){isUndefined(vars.preview.type)&&(vars.preview.type=0);var t=2,n=vars.preview.thumbnail;isUndefined(vars.preview.scale)||(t=vars.preview.scale);var r=0,o=0,s=0,g=0,d=0,u=C.preview.smallWidth,c=C.preview.smallHight,b=e*C.bar.pbox.bg.getWidth()/duration+(C.bar.pbox.bg.offset().left-CK.offset().left);if(C.preview.css("display")=="none"&&C.preview.show(),C.preview.css({height:c+"px"}),vars.preview.type==1){r=parseInt(e/(t*n[0])),o=parseInt(e/t);var p=r-5,y=r+5;p<0&&(p=0),y>C.preview.bg.img.length-1&&(y=C.preview.bg.img.length-1);for(var E=p;E<y;E++)if(C.preview.bg.img[E].attr("data-img")){var x=C.preview.bg.img[E].css("background-position");C.preview.bg.img[E].css({background:"url("+C.preview.bg.img[E].attr("data-img")+") no-repeat"}),C.preview.bg.img[E].attr("data-img",""),C.preview.bg.img[E].css("background-position",x)}if(d=C.preview.frame.getWidth(),g=b-d*.5,s=-(o*u+u*.5)+b,g<0&&(g=0,b=(d-u)*.5,s=-(o*u)+b),g>C.preview.getWidth()-C.preview.frame.getWidth()){var S=g-(C.preview.getWidth()-C.preview.frame.getWidth());g=C.preview.getWidth()-C.preview.frame.getWidth(),s-=S}C.preview.bg.css({left:s+"px"}),C.preview.frame.css({left:g+"px"})}else{var A=e/t/(n[0]*n[1]);o=parseInt(A);var U=parseInt((A-o)*100),M=parseInt(U/n[0]),T=U%n[0],P=vars.preview.file;s=b-u*.5,s<0&&(s=0),s>CK.getWidth()-u&&(s=CK.getWidth()-u),C.preview.css({width:C.preview.smallWidth+"px",background:"url("+P[o]+") no-repeat","background-position":"-"+T*u+"px -"+M*c+"px",left:s+"px"})}}},showError=function(){if(C.loading.hide(),!(vars.controls||!vars.errorShow)){isUndefined(C.error)&&(C.error=createlDiv("ck-error"),CM.append(C.error));var e=CT.error.message;e||(e=language.error.noMessage);var t=e+"(code:"+CT.error.code+")";C.error.htm(t),C.error.show()}},showWindowsError=function(e){var t=createlDiv("ckplayer-error",e);$("body").append(t)},showNextEpisode=function(){if(!isUndefined(vars.next)){if(valType(vars.next)=="object"){if("content"in vars.next){C.next=player.layer(vars.next);return}if("title"in vars.next){tip(C.bar.nextEpisode,vars.next.title);return}}tip(C.bar.nextEpisode,language.next)}},nextClick=function(){valType(vars.next)=="object"&&("click"in vars.next&&(valType(vars.next.click)=="function"?vars.next.click():valType(vars.next.click)=="string"&&eval(vars.next.click+"()")),"link"in vars.next&&(window.location.href=vars.next.link),eventTarget("next"))},showEnded=function(){if(!CT.loop&&!isUndefined(vars.ended)){closePauseAd(),C.ended=player.layer(vars.ended),C.ended&&C.centerPlay.hide();return}},windowScroll=function(){if(CT.smallWindows){if(CT.webFull||CT.theatre||CT.full){exitSmallWindows();return}var e=document.documentElement.scrollTop||document.body.scrollTop;e>CT.offset().top+CT.getHeight()?CK.hasClass("ckplayer-ckplayer-smallwindow")||(CK.addClass("ckplayer-ckplayer-smallwindow"),eventTarget("smallWindows",!0),smallWindowsState=!0,vars.smallWindowsDrag&&drag(!0),allBarHide(),checkVideoRotate()):exitSmallWindows()}},exitSmallWindows=function(){CK.hasClass("ckplayer-ckplayer-smallwindow")&&(CK.removeClass("ckplayer-ckplayer-smallwindow"),vars.smallWindowsDrag&&drag(),eventTarget("smallWindows",!1),smallWindowsState=!1,allBarShow(),checkVideoRotate())},drag=function(e){var t=$(document),n=0,r=0,o=0,s=0,g=!1;isUndefined(e)||(g=e);var d=function(b){b.preventDefault&&b.preventDefault(),b=b||window.event;var p=getClient(b);o=p.x,s=p.y,t.mousemove(u),t.mouseup(c),CK.css({cursor:"move"})},u=function(b){b=b||window.event;var p=getClient(b),y=CK.offset();r=p.y-s,n=p.x-o,o=p.x,s=p.y;var E=y.left+n,x=y.top+r;CK.css({left:E+"px",top:x+"px"}),CK.css("position")!="fixed"&&CK.css({position:"fixed"}),isDrag=!0},c=function(){t.removeListener("mousemove",u),t.removeListener("mouseup",c),CK.css({cursor:"default"})};g?CK.mousedown(d):CK.unbind("mousedown")},checkVideoRotate=function(){var e=CK.getWidth()*nowZoom*.01,t=CK.getHeight()*nowZoom*.01,n=CV.getWidth(),r=CV.getHeight();if(CV.css({transform:"rotate("+nowRotate+"deg)","-ms-transform":"rotate("+nowRotate+"deg)","-moz-transform":"rotate("+nowRotate+"deg)","-webkit-transform":"rotate("+nowRotate+"deg)","-o-transform":"rotate("+nowRotate+"deg)",width:nowZoom+"%",height:nowZoom+"%"}),nowRotate!=0&&nowRotate!=180){if(r>e&&n>t){r/e>n/t?CV.css({height:nowZoom+"%",width:t+"px"}):CV.css({width:nowZoom+"%",height:e+"px"});return}if(r<e&&n<t){e>t?CV.css({height:nowZoom+"%",width:t+"px"}):r/n>=e/t?CV.css({width:nowZoom+"%",height:e+"px"}):CV.css({height:nowZoom+"%",width:t+"px"});return}if(r>=e&&n<=t){CV.css({width:nowZoom+"%",height:e+"px"});return}n>=t&&r<e&&CV.css({height:nowZoom+"%",width:t+"px"})}},allBarShow=function(){barShow&&(C.bar.show(),C.topBar.show()),rightBarShow&&C.rightBar.show(),C.tempTime.hide(),isUndefined(C.logo)||C.logo.show()},allBarHide=function(e){isUndefined(e)&&(e=!0),C.bar.hide(),C.topBar.hide(),C.rightBar.hide(),e&&C.tempTime.show(),isUndefined(C.logo)||C.logo.hide()},message=function(e,t){C.message.htm("");var n=function(){C.message.removeClass("ck-message-right").removeClass("ck-animate-bouncein").removeClass("ck-animate"),C.message.hide()};e?(C.message.htm(e),C.message.show(),C.message.hasClass("ck-animate")||C.message.addClass("ck-animate ck-animate-bouncein"),!isUndefined(t)&&t&&(C.message.hasClass("ck-message-right")||C.message.addClass("ck-message-right")),msgSetTime&&(clearTimeout(msgSetTime),msgSetTime=null),msgSetTime=setTimeout(function(){n(),msgSetTime=null},1500)):n()},tip=function(e,t,n,r){C.tip.content.htm(""),t?(C.tip.content.htm(t),C.tip.show(),C.tip.hasClass("ck-animate")||C.tip.addClass("ck-animate ck-animate-bouncein"),isUndefined(r)&&(r="auto"),r=="left"?(C.tip.content.removeClass("ck-content-float-auto").addClass("ck-content-float-left"),C.tip.triangle.removeClass("ck-triangle-auto").addClass("ck-triangle-left")):(C.tip.content.removeClass("ck-content-float-left").addClass("ck-content-float-auto"),C.tip.triangle.removeClass("ck-triangle-left").addClass("ck-triangle-auto")),tipResize(e,n,r),isUndefined(closeTipFun)&&(closeTipFun=function(){tipSetTime&&(clearTimeout(tipSetTime),tipSetTime=null)},closeTipMouseOut=function(o){closeTipFun(),tipSetTime=setTimeout(function(){tip(),tipSetTime=null},100),o&&o.removeListener("mouseout",closeTipMouseOut)}),closeTipFun(),e.mouseout(function(){closeTipMouseOut(e)})):(C.tip.hide(),C.tip.removeClass("ck-animate"),C.tip.removeClass("ck-animate-bouncein"))},tipResize=function(e,t,n){var r=e.offset(),o=CK.offset(),s=C.tip.getWidth(),g=C.tip.getHeight(),d=e.getWidth(),u=0,c=r.top-o.top-g;getBarHeight()>C.bar.getHeight()&&(c-=getBarHeight()-C.bar.getHeight()),s>d?u=r.left-o.left-(s-d)*.5:u=r.left-o.left+(d-s)*.5,n=="left"&&(u=r.left-o.left-s,c=r.top-o.top),isUndefined(t)||(u=t.x-o.left-s*.5),u<0&&(u=0),c<0&&(c=0),u>CM.getWidth()-s&&(u=CM.getWidth()-s),c>CM.getHeight()-g&&(c=CM.getHeight()-g),C.tip.css({left:u+"px",top:c-parseInt(C.tip.css("margin-bottom"))+"px"})},progressDragX=function(){var e=C.bar.pbox.bg,t=C.bar.pbox.play,n=C.bar.pbox.slider,r=C.bar.pbox.mouseLine;n.unbind(),e.unbind();var o=0,s=0,g=$(document),d=0,u=function(T){if(T.preventDefault&&T.preventDefault(),!!vars.timeScheduleAdjust){T=T||window.event;var P=n.offset(),L=e.offset(),B=getClient(T);pSliderMouseDown=!0,s=B.x;var w=P.left-L.left;d=w*duration/(e.getWidth()-n.getWidth()),n.removeListener("mousedown",u),n.removeListener("touchstart",u),g.mousemove(c),g.mouseup(b),n.touchmove(c),n.touchend(b),noScrolling(!0)}},c=function(T){T=T||window.event;var P=n.offset(),L=e.offset(),B=getClient(T);pSliderMouseDown=!0,o=s-B.x,s=B.x;var w=P.left-o-L.left;w<0&&(w=0),w>e.getWidth()-n.getWidth()&&(w=e.getWidth()-n.getWidth()),C.bar.pbox.addClass("ck-bar-progress-slider-move");var F="";if(vars.live)F=formatLiveTime(w*getLiveTime()/(e.getWidth()-n.getWidth()));else{switch(F=w*duration/(e.getWidth()-n.getWidth()),vars.timeScheduleAdjust){case 2:F<d&&(w=-1e3,message(language.timeScheduleAdjust.prohibitBackOff));break;case 3:if(F>d){w=-1e3,message(language.timeScheduleAdjust.prohibitForward);return}break;case 4:if(F<firstSeekTime){w=-1e3,player.seek(firstSeekTime),message(language.timeScheduleAdjust.prohibitLookBack);return}break;case 5:if(F>maxSeeTime){w=-1e3,player.seek(maxSeeTime),message(language.timeScheduleAdjust.prohibitForwardNotViewed);return}break}F=formatSeconds(F)}tip(n,F),w>=0?(n.css({left:w+"px"}),t.css({width:w+n.getWidth()*.5+"px"})):pSliderMouseDown=!1},b=function(){if(noScrolling(),g.removeListener("mousemove",c),g.removeListener("mouseup",b),n.removeListener("touchmove",c),n.removeListener("touchend",b),n.mousedown(u),n.touchstart(u),vars.live){var P=parseInt(vars.live+t.getWidth()*getLiveTime()/(e.getWidth()-n.getWidth()*.5));eventTarget("playback",{time:P,date:date("Y-m-d H:i:s",P)}),eventTarget("seek",{time:P,state:"seeking",date:date("Y-m-d H:i:s",P)})}else{var T=t.getWidth()*duration/(e.getWidth()-n.getWidth()*.5);T>duration&&(T=duration),seekTime=0,player.seek(T)}C.bar.pbox.removeClass("ck-bar-progress-slider-move"),p&&tip()},p=!0,y=function(){var T="";vars.live?T=language.live:T=formatSeconds(parseInt(n.css("left"))*duration/(e.getWidth()-n.getWidth())),p=!1,tip(n,T)},E=function(){p=!0};n.mousedown(u),n.mouseover(y),n.mouseleave(E),n.touchstart(u);var x=function(T){T=T||window.event;var P=getClient(T),L=e.offset(),B=P.x-L.left;if(CT.full&&(B+=CK.offset().left),vars.live){var F=parseInt(vars.live+getLiveTime()*B/e.getWidth());eventTarget("playback",{time:F,date:date("Y-m-d H:i:s",F)}),eventTarget("seek",{time:F,state:"seeking",date:date("Y-m-d H:i:s",F)})}else{var w=duration*B/e.getWidth();switch(vars.timeScheduleAdjust){case 0:message(language.timeScheduleAdjust.prohibit);return;case 2:if(w<oldTime){message(language.timeScheduleAdjust.prohibitBackOff);return}break;case 3:if(w>oldTime){message(language.timeScheduleAdjust.prohibitForward);return}break;case 4:if(w<firstSeekTime){message(language.timeScheduleAdjust.prohibitLookBack);return}break;case 5:if(w>maxSeeTime){message(language.timeScheduleAdjust.prohibitForwardNotViewed);return}break}seekTime=0,player.seek(w)}B>e.getWidth()-n.getWidth()*.5&&(B=e.getWidth()-n.getWidth()*.5),B<n.getWidth()*.5&&(B=n.getWidth()*.5),pSliderMouseDown=!0,t.css({width:B+"px"}),n.css({left:B-n.getWidth()*.5+"px"})},A=null,S=function(T){T=T||window.event;var P=getClient(T),L=e.offset(),B=P.x-L.left;U(),CT.full&&(B+=CK.offset().left);var w=0;vars.live?w=formatLiveTime(getLiveTime()*B/e.getWidth()):(w=duration*B/e.getWidth(),showPreview(w),w=formatSeconds(w)),tip(e,w,P),r.css({left:B-C.bar.pbox.mouseLine.getWidth()*.5+"px"})},A=null,U=function(){A&&(clearTimeout(A),A=null),closeTipFun()},M=function(T){U(),A=setTimeout(function(){showPreview(-1)},30)};e.mousedown(x),e.mousemove(S),e.mouseout(M),r.mouseover(U)},volumeDragY=function(){var e=C.bar.vbox.volume.box,t=C.bar.vbox.volume.bg,n=C.bar.vbox.volume.pp,r=C.bar.vbox.volume.slider,o=$(document),s=0,g=0,d=function(p){p.preventDefault&&p.preventDefault(),noScrolling(!0),p=p||window.event;var y=getClient(p);g=y.y,r.removeListener("mousedown",d),r.removeListener("touchstart",d),C.bar.vbox.mouseDown=!0,o.mousemove(u),o.mouseup(c),r.touchmove(u),r.touchend(c)},u=function(p){p=p||window.event;var y=getClient(p),E=r.offset(),x=e.offset(),S=t.offset();s=y.y-g,g=y.y;var A=E.top-x.top+s,U=S.top-x.top,M=S.top+t.getHeight()-x.top-r.getHeight();A<U&&(A=U),A>M&&(A=M),r.css({top:A+"px"});var T=A-U+r.getHeight()*.5;n.css({"margin-top":T+"px"});var P=(t.getHeight()-T-r.getHeight()*.5)/(t.getHeight()-r.getHeight());player.volume(P)},c=function(){noScrolling(),o.removeListener("mousemove",u),o.removeListener("mouseup",c),r.removeListener("touchmove",u),r.removeListener("touchend",c),r.mousedown(d),r.touchstart(d),C.bar.vbox.mouseDown=!1};r.mousedown(d),r.touchstart(d);var b=function(p){p=p||window.event;var y=getClient(p),E=t.offset(),x=y.y-E.top,S=t.getHeight(),A=1-x/S;player.volume(A)};t.mousedown(b)},changeProgress=function(e){if(!(valType(vars.live)=="boolean"&&vars.live)&&!pSliderMouseDown){var t=C.bar.pbox.bg,n=C.bar.pbox.slider,r=e/duration*100;valType(vars.live)=="number"&&(r="100"),C.bar.pbox.play.css({width:r+"%"});var o=n.getWidth()/t.getWidth()*100,s=r-o*.5;s<0&&(s=0),s>100-o&&(s=100-o),C.bar.pbox.slider.css({left:s+"%"}),checkProgressSlider()}},checkProgressSlider=function(){var e=C.bar.pbox.bg,t=C.bar.pbox.slider,n=0;C.bar.pbox.css("transition-duration")&&(n=parseFloat(C.bar.pbox.css("transition-duration"))*1e3+20);var r=function(){var o=parseInt(C.bar.pbox.slider.css("left"));o<0&&(o=0,C.bar.pbox.slider.css({left:o+"px"})),o>e.getWidth()-t.getWidth()&&(o=e.getWidth()-t.getWidth(),C.bar.pbox.slider.css({left:o+"px"}))};setTimeout(r,n)},changeTopTime=function(){C.topBar.timeEle.htm(date("H:i:s")),setTimeout(changeTopTime,1e3)},changeVolumeSlider=function(e){if(!isUndefined(C.bar.vbox)){var t=C.bar.vbox.volume.box,n=C.bar.vbox.volume.bg,r=C.bar.vbox.volume.pp,o=C.bar.vbox.volume.slider;C.bar.vbox.volume.txt.htm(parseInt(e*100));var s=n.getHeight();if(s){var g=s-e*s;r.css({"margin-top":g+"px"});var d=n.offset().top-t.offset().top+g-o.getHeight()*.5;o.css({top:d+"px"})}}},changeLoad=function(){if(video){var e=video.buffered.length;if(e>0){var t=video.buffered.end(e-1);loadTime<t&&(loadTime=t),replaceInformation("loadTime",parseInt(loadTime*100)*.01),C.bar.pbox.load.css("width",loadTime/duration*100+"%")}}},changeMuted=function(e){e?(C.bar.vbox.muted.hide(),C.bar.vbox.exitMuted.show(),C.ad.bottom.mutedAndExit.muted.hide(),C.ad.bottom.mutedAndExit.exitMuted.show(),message(language.muted)):(C.bar.vbox.muted.show(),C.bar.vbox.exitMuted.hide(),C.ad.bottom.mutedAndExit.muted.show(),C.ad.bottom.mutedAndExit.exitMuted.hide())},replaceInformation=function(e,t){if(isUndefined(C.about.sourceData)&&!isUndefined(C.about.find("ul"))){C.about.sourceData=C.about.find("ul").eq(0).htm(),C.about.objData={};for(var n=/{(.*?)}/g,r=C.about.sourceData.match(n);r=n.exec(C.about.sourceData);)C.about.objData[r[1]]="0"}if(!isUndefined(C.about.find("ul"))){var n=null,o=C.about.sourceData,s=C.about.textareaText;if(C.about.objData){for(var g in C.about.objData)if(e!=g){n=new RegExp("{"+g+"}","g");var d=C.about.objData[g];isUndefined(d)&&(d="0"),o=o.replace(n,d),s=s.replace(n,d)}}return n=new RegExp("{"+e+"}","g"),o=o.replace(n,t||""),s=s.replace(n,t||""),C.about.textareaEle.htm(s),C.about.objData[e]=t,C.about.find("ul").eq(0).htm(o)}},calculationFps=function(){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(c){window.setTimeout(c,16.666666666666668)},t,n,r,o,s,g;o=0,s=Date.now();var d=function(){g=Date.now()-s,o+=1,g>=1e3&&(s+=g,u(o),o=0),e(d)},u=function(c){c!=CT.fps&&(CT.fps=c,replaceInformation("fps",c),eventTarget("fps",c))};isUndefined(CT.fps)&&(CT.fps=0),d()},getElement=function(e){var t=$(e);if(!isUndefined(t))return valType(t)=="htmlarray"&&(t=t[0]),isUndefined(t.captureParentNode)&&(t.captureParentNode=t.parentNode,t.prevElement=t.prev(),t.nextElement=t.next()),t},$=function(e,t){var n=null;document&&(n=document),isUndefined(t)||(n=t);var r=[];if(e)if(valType(e)=="htmlobject"||valType(e)=="object"){if(r=e,!isUndefined(r.ckplayer))return r}else if(valType(e)=="string"&&e!="")switch(e.substr(0,1)){case".":if(e=e.substr(1,e.length),n.getElementsByClassName){if(r=n.getElementsByClassName(e),!r.length)return null}else if(!n&&document.getElementsByClassName){if(r=document.getElementsByClassName(e),!r.length)return null}else{var g=new RegExp(" "+e+" ","i"),o=null;n.getElementsByTagName?o=n.getElementsByTagName("*"):o=document.getElementsByTagName("*");for(var s=0;s<o.length;s++)g.test(" "+o[s].className+" ")&&r.push(o[s])}r&&r.length===0&&(r=null);break;case"#":e=e.substr(1,e.length),n.getElementById?r=n.getElementById(e):r=document.getElementById(e);break;default:var g=new RegExp(" "+e+" ","i");n.getElementsByTagName?r=n.getElementsByTagName(e):r=document.getElementsByTagName(e),r?e=="body"||e=="document"||e=="html"?r=r[0]:r.length===0&&(r=null):r=null;break}else r=e;else r=document;if(r)if(valType(r)=="htmlobject"||valType(r)=="object"||valType(r)=="document")r.ckplayer="Thanks for using",r.find=function(d){return $(d,this)},r.attr=function(d,u){return isUndefined(u)?this.getAttribute(d):(this.setAttribute(d,u),this)},r.removeAttr=function(d){return this.removeAttribute(d),this},r.css=function(d,u){var c=function(x){if(x.indexOf("-")!=-1){var S=x.split("-"),A=S[0],U="",M="";return S.length>1&&(U=S[1].substr(0,1).toLocaleUpperCase()+S[1].substr(1,S[1].length-1)),S.length>2&&(U=S[2].substr(0,1).toLocaleUpperCase()+S[2].substr(1,S[2].length-1)),A+U+M}return x};if(isUndefined(u)){if(!isUndefined(d)&&valType(d)=="string")return this.currentStyle?this.currentStyle[d]:document.defaultView.getComputedStyle(this,null)[d];if(isUndefined(d))return this.currentStyle?this.currentStyle:document.defaultView.getComputedStyle(this,null)}if(valType(d)!="object"){var b=c(d);if(this.length>1)for(var p=0;p<this.length;p++)this[p].style[b]=u;else this.style[b]=u}else for(var y in d){var E=c(y);if(valType(this)=="htmlarray")for(var p=0;p<this.length;p++)this[p].style[E]=d[y];else this.style[E]=d[y]}return this},r.hasClass=function(d){if(isUndefined(d))return!1;var u=new RegExp("(\\s|^)"+d+"(\\s|$)");return!!(this.className&&this.className.match(u))},r.addClass=function(d){return this.hasClass(d)||(this.className&&this.className.substr(this.className.length-1,1)!=" "&&(this.className+=" "),this.className+=d),this},r.removeClass=function(d){return this.hasClass(d)&&(this.className=this.className.replace(new RegExp("(\\s|^)"+d+"(\\s|$)")," "),this.className.substr(this.className.length-1,1)==" "&&(this.className=this.className.substr(0,this.className.length-1)),this.className||this.removeAttribute("class")),this},r.searchClass=function(d){for(var u=this.className.split(" "),c=0;c<u.length;c++)if(u[c].substr(0,d.length)==d)return u[c];return this},r.removeCss=function(d){var u=this.attr("style");if(u){for(var c=u.split(";"),b={},p=0;p<c.length;p++){var y=c[p].split(":");y.length==2&&y[0]&&y[0].trim()!=d&&(b[y[0].trim()]=y[1].trim())}this.attr("style",""),this.css(b)}},r.addListener=function(d,u,c){return addListener(this,d,u,c)},r.removeListener=function(d,u,c){return removeListener(this,d,u,c)},r.prev=function(){return prev(this)},r.next=function(){return next(this)},r.append=function(d){return this.appendChild(d),this},r.remove=function(){return isUndefined(this.parentNode)||this.parentNode.removeChild(this),null},r.bind=function(d,u,c){return addListener(this,d,u,c)},r.unbind=function(d,u){var c=0,b=[];if(!isUndefined(u))r.removeListener(d,u);else if(isUndefined(d)){if(!isUndefined(this.listenerList))for(b=this.listenerList,c=0;c<b.length;c++)r.removeListener(b[c][0],b[c][1])}else if(!isUndefined(this.listenerList))for(b=this.listenerList,c=0;c<b.length;c++)b[c][0]==d&&r.removeListener(d,b[c][1])},r.htm=function(d){if(!isUndefined(d))r.innerHTML=d;else return r.innerHTML},r.htmReplace=function(d,u,c){if(!isUndefined(u)&&!isUndefined(d)){isUndefined(this.attr("data-htm"))&&this.attr("data-htm",c);var b=this.attr("data-htm"),p=new RegExp(d,"g");b=b.replace(p,u),this.htm(b)}},r.offset=function(){for(var d=this.offsetParent,u=this.offsetLeft,c=this.offsetTop;d&&d.tagName!=="BODY";)/MSIE 8\.0/.test(navigator.userAgent)||(u+=d.clientLeft,c+=d.clientTop),u+=d.offsetLeft,c+=d.offsetTop,d=d.offsetParent;return{top:c,left:u}},r.fixed=function(){return this.css("position")=="fixed"?!0:isUndefined(this.offsetParent)?!1:$(this.offsetParent).fixed()},r.getWidth=function(){return this.offsetWidth},r.getHeight=function(){return this.offsetHeight},isUndefined(r.width)&&(r.width=function(){return this.offsetWidth}),isUndefined(r.height)&&(r.height=function(){return this.offsetWidth}),r.resize=function(d){addListener(window,"resize",d)},r.click=function(d){return addListener(this,"click",d),this},r.singleClick=function(d){return isUndefined(this.dbClick)&&(doubleClickEvent(this),this.dbClick=!0),this.addListener("sigClick",d),this},r.doubleClick=function(d){return isUndefined(this.dbClick)&&(doubleClickEvent(this),this.dbClick=!0),this.addListener("dobClick",d),this},r.mouseover=function(d){return addListener(this,"mouseover",d),this},r.mouseout=function(d){return addListener(this,"mouseout",d),this},r.mousedown=function(d){return addListener(this,"mousedown",d),this},r.mouseup=function(d){return addListener(this,"mouseup",d),this},r.mousemove=function(d){return addListener(this,"mousemove",d),this},r.mouseWheel=function(d){return addListener(this,"mousewheel",d),addListener(this,"DOMMouseScroll",d,!1),this},r.mouseleave=function(d){return addListener(this,"mouseleave",d),this},r.touchstart=function(d){return addListener(this,"touchstart",d),this},r.touchmove=function(d){return addListener(this,"touchmove",d),this},r.touchend=function(d){return addListener(this,"touchend",d),this},r.show=function(){return this.css("display","block"),this},r.hide=function(){return this.css("display","none"),this},r.animate=function(d,u,c,b){if(isUndefined(this.CK))return r;var p=this,y=this.CK,E=y.getWidth(),x=y.getHeight(),S=10;if(this.timerTween=null,this.tweenPlay=!0,isUndefined(d))return this;(isUndefined(u)||u==0)&&(u=1e3),(isUndefined(c)||c=="")&&(c="None.easeIn");var A=c.split("."),U={None:{easeIn:function(l,f,v,h){return v*l/h+f},easeOut:function(l,f,v,h){return v*l/h+f},easeInOut:function(l,f,v,h){return v*l/h+f}},Quadratic:{easeIn:function(l,f,v,h){return v*(l/=h)*l+f},easeOut:function(l,f,v,h){return-v*(l/=h)*(l-2)+f},easeInOut:function(l,f,v,h){return(l/=h/2)<1?v/2*l*l+f:-v/2*(--l*(l-2)-1)+f}},Cubic:{easeIn:function(l,f,v,h){return v*(l/=h)*l*l+f},easeOut:function(l,f,v,h){return v*((l=l/h-1)*l*l+1)+f},easeInOut:function(l,f,v,h){return(l/=h/2)<1?v/2*l*l*l+f:v/2*((l-=2)*l*l+2)+f}},Quartic:{easeIn:function(l,f,v,h){return v*(l/=h)*l*l*l+f},easeOut:function(l,f,v,h){return-v*((l=l/h-1)*l*l*l-1)+f},easeInOut:function(l,f,v,h){return(l/=h/2)<1?v/2*l*l*l*l+f:-v/2*((l-=2)*l*l*l-2)+f}},Quintic:{easeIn:function(l,f,v,h){return v*(l/=h)*l*l*l*l+f},easeOut:function(l,f,v,h){return v*((l=l/h-1)*l*l*l*l+1)+f},easeInOut:function(l,f,v,h){return(l/=h/2)<1?v/2*l*l*l*l*l+f:v/2*((l-=2)*l*l*l*l+2)+f}},Sine:{easeIn:function(l,f,v,h){return-v*Math.cos(l/h*(Math.PI/2))+v+f},easeOut:function(l,f,v,h){return v*Math.sin(l/h*(Math.PI/2))+f},easeInOut:function(l,f,v,h){return-v/2*(Math.cos(Math.PI*l/h)-1)+f}},Exponential:{easeIn:function(l,f,v,h){return l==0?f:v*Math.pow(2,10*(l/h-1))+f},easeOut:function(l,f,v,h){return l==h?f+v:v*(-Math.pow(2,-10*l/h)+1)+f},easeInOut:function(l,f,v,h){return l==0?f:l==h?f+v:(l/=h/2)<1?v/2*Math.pow(2,10*(l-1))+f:v/2*(-Math.pow(2,-10*--l)+2)+f}},Circular:{easeIn:function(l,f,v,h){return-v*(Math.sqrt(1-(l/=h)*l)-1)+f},easeOut:function(l,f,v,h){return v*Math.sqrt(1-(l=l/h-1)*l)+f},easeInOut:function(l,f,v,h){return(l/=h/2)<1?-v/2*(Math.sqrt(1-l*l)-1)+f:v/2*(Math.sqrt(1-(l-=2)*l)+1)+f}},Elastic:{easeIn:function(l,f,v,h,k,D){if(l==0)return f;if((l/=h)==1)return f+v;if(D||(D=h*.3),!k||k<Math.abs(v)){k=v;var W=D/4}else var W=D/(2*Math.PI)*Math.asin(v/k);return-(k*Math.pow(2,10*(l-=1))*Math.sin((l*h-W)*(2*Math.PI)/D))+f},easeOut:function(l,f,v,h,k,D){if(l==0)return f;if((l/=h)==1)return f+v;if(D||(D=h*.3),!k||k<Math.abs(v)){k=v;var W=D/4}else var W=D/(2*Math.PI)*Math.asin(v/k);return k*Math.pow(2,-10*l)*Math.sin((l*h-W)*(2*Math.PI)/D)+v+f},easeInOut:function(l,f,v,h,k,D){if(l==0)return f;if((l/=h/2)==2)return f+v;if(D||(D=h*(.3*1.5)),!k||k<Math.abs(v)){k=v;var W=D/4}else var W=D/(2*Math.PI)*Math.asin(v/k);return l<1?-.5*(k*Math.pow(2,10*(l-=1))*Math.sin((l*h-W)*(2*Math.PI)/D))+f:k*Math.pow(2,-10*(l-=1))*Math.sin((l*h-W)*(2*Math.PI)/D)*.5+v+f}},Back:{easeIn:function(l,f,v,h,k){return k==null&&(k=1.70158),v*(l/=h)*l*((k+1)*l-k)+f},easeOut:function(l,f,v,h,k){return k==null&&(k=1.70158),v*((l=l/h-1)*l*((k+1)*l+k)+1)+f},easeInOut:function(l,f,v,h,k){return k==null&&(k=1.70158),(l/=h/2)<1?v/2*(l*l*(((k*=1.525)+1)*l-k))+f:v/2*((l-=2)*l*(((k*=1.525)+1)*l+k)+2)+f}},Bounce:{easeIn:function(l,f,v,h){return v-U.Bounce.easeOut(h-l,0,v,h)+f},easeOut:function(l,f,v,h){return(l/=h)<1/2.75?v*(7.5625*l*l)+f:l<2/2.75?v*(7.5625*(l-=1.5/2.75)*l+.75)+f:l<2.5/2.75?v*(7.5625*(l-=2.25/2.75)*l+.9375)+f:v*(7.5625*(l-=2.625/2.75)*l+.984375)+f},easeInOut:function(l,f,v,h){return l<h/2?U.Bounce.easeIn(l*2,0,v,h)*.5+f:U.Bounce.easeOut(l*2-h,0,v,h)*.5+v*.5+f}}};if(A.length!=2||!(A[0]in U)||!(A[1]in U[A[0]]))return null;var M=U[A[0]][A[1]],T=function(l){var f=l[1],v=0,h=0;switch(l[0]){case"width":v=p.getWidth(),f.substring(f.length-1,f.length)=="%"?h=parseInt(f)*x*.01:h=parseInt(f);break;case"height":v=p.getHeight(),f.substring(f.length-1,f.length)=="%"?h=parseInt(f)*x*.01:h=parseInt(f);break;case"left":isUndefined(p.css("left"))?v=p.offset().left-y.offset().left:v=parseInt(p.css("left")),f.substring(f.length-1,f.length)=="%"?h=parseInt(f)*E*.01:h=parseInt(f),p.css("right","auto");break;case"right":isUndefined(p.css("right"))?v=y.getWidth()-(p.offset().left-y.offset().left+p.getWidth()):v=parseInt(p.css("right")),f.substring(f.length-1,f.length)=="%"?h=parseInt(f)*E*.01:h=parseInt(f),p.css("left","auto");break;case"top":isUndefined(p.css("top"))?v=p.offset().top-y.offset().top:v=parseInt(p.css("top")),f.substring(f.length-1,f.length)=="%"?h=parseInt(f)*x*.01:h=parseInt(f),p.css("bottom","auto");break;case"bottom":isUndefined(p.css("bottom"))?v=y.getHeight()-(p.offset().top-y.offset().top+p.getHeight()):v=parseInt(p.css("bottom")),f.substring(f.length-1,f.length)=="%"?h=parseInt(f)*x*.01:h=parseInt(f),p.css("top","auto");break;case"alpha":!isUndefined(p.css("filter"))&&p.css("filter")!="none"?v=Number(p.css("filter"))*100:!isUndefined(p.css("opacity"))&&p.css("opacity")!="none"?v=p.css("opacity")*100:v=100,f.substring(f.length-1,f.length)=="%"?h=parseInt(f):h=f*100;break}return h-=v,v!=h?{type:l[0],current:v,result:h}:null},P=function(){p.timerTween!=null&&(clearInterval(p.timerTween),p.timerTween=null)};d=d.replace(/[ ]*,[ ]*|[ ]+/g,";");for(var L=[],B=d.split(";"),w=0;w<B.length;w++){var F=B[w].split(":");if(F.length==2){var H=T(F);H&&L.push(H)}}var O=0,z=function(){var l={};if(p.tweenPlay)if(O<u){O+=S;for(var f=0;f<L.length;f++){var v=L[f],h=Math.ceil(M(O,v.current,v.result,u));switch(v.type){case"width":l.width=h+"px",l.overflow="hidden";break;case"height":l.height=h+"px",l.overflow="hidden";break;case"left":l.left=h+"px";break;case"right":l.right=h+"px";break;case"top":l.top=h+"px";break;case"bottom":l.bottom=h+"px";break;case"alpha":l.filter="alpha(opacity:"+h*.01+")",l.opacity=h*.01;break}}p.css(l)}else P(),isUndefined(b)||b(p)};return P(),this.timerTween=setInterval(z,S),this},r.animatePlay=function(){return isUndefined(this.timerTween)||(this.tweenPlay=!0),this},r.animatePause=function(){return isUndefined(this.timerTween)||(this.tweenPlay=!1),this};else{r.each=function(d){for(var u in this)if(this.hasOwnProperty(u))if(valType(this[u])=="htmlobject")d(u,this[u]);else try{this[0].nodeName||d(u,this[u])}catch(c){d(u,this[u])}},r.eq=function(d){return valType(this)=="htmlarray"&&this.length>=d+1?this[d]:null};for(var s=0;s<r.length;s++)if($)try{r[s]=$(r[s])}catch(u){}}return r},createlDiv=function(e,t){var n=document.createElement("div"),r=$(n);return e&&r.addClass(e),t&&r.htm(t),r},createlVideo=function(){var e=document.createElement("video"),t=$(e);return t},createlButton=function(e,t){var n=document.createElement("button"),r=$(n);return r.attr("type","button"),e&&r.addClass(e),t&&r.htm(t),r},createlA=function(e,t,n){var r=document.createElement("a"),o=$(r);return e&&o.htm(e),!isUndefined(t)&&t&&(o.attr("href",t),o.attr("target","_blank")),n&&o.addClass(n),o},createlJsLink=function(e,t){var n=document.createElement("a"),r=$(n);return e&&r.htm(e),!isUndefined(t)&&t?r.attr("href","javascript:"+t+"()"):r.attr("href","javascript:;"),r},createlImg=function(e,t){var n=document.createElement("img"),r=$(n);return t&&(n.className=t),e&&(n.src=e),r},getClient=function(e){var t=e||window.event;isUndefined(t)&&(t={clientX:0,clientY:0});var n=t.clientX+(document.documentElement.scrollLeft||$("body").scrollLeft),r=t.clientY+(document.documentElement.scrollTop||$("body").scrollTop);return(isUndefined(n.toString())||n.toString()=="NaN")&&(n=t.touches[0].clientX),(isUndefined(r.toString())||r.toString()=="NaN")&&(r=t.touches[0].clientY),n.toString()=="NaN"&&(n=0),r.toString()=="NaN"&&(r=0),{x:n,y:r}},getLiveTime=function(){var e=Date.now(),t=vars.live;return t.toString().length<13&&(t=t*1e3),e-t},formatLiveTime=function(e){var t=vars.live;return t.toString().length<13&&(t=t*1e3),t+=e,language.lookBack+date("H:i:s",t)},loadJs=function(e,t,n){var r=function(){};if(isUndefined(t)||(r=t),checkJs(e)){r();return}var o=document.createElement("script");o.type="text/javascript";var s=!1,g=null,d=function(){g&&clearInterval(g),!s&&(s=!0,valType(r)=="function"&&r())},u=function(){g=setInterval(function(){try{!isUndefined(o.readyState)&&o.readyState=="complete"&&d()}catch(y){}},10)},c=function(){try{o.parentNode&&o.parentNode.removeChild(o)}catch(y){}},b=function(){removeListener(o,"load",b),removeListener(o,"error",p),d()},p=function(){if(removeListener(o,"load",b),removeListener(o,"error",p),c(),!n&&(!vars||vars.cdnFallback!==!1)){var y=typeof window!="undefined"&&window.ckplayerPlusCdn?window.ckplayerPlusCdn:ckplayerPlusDefaultCdn,E=String(e).match(/\/(hls\.js|flv\.js|mpegts\.js|language)\/([^/?#]+)(?:[?#].*)?$/i);if(y&&y.indexOf("1.0.7")===-1&&E){y.slice(-1)!=="/"&&(y+="/");var x=y+E[1]+"/"+E[2];if(x!==e){loadJs(x,t,!0);return}}}};try{addListener(o,"load",b),addListener(o,"error",p)}catch(y){u()}o.src=e,$("head").eq(0).append(o)},doubleClickEvent=function(e){var t=null,n=0;e=$(e),e.click(function(){if(t||(t=setTimeout(function(){try{e.dispatchEvent(new Event("sigClick"))}catch(s){var o=document.createEvent("HTMLEvents");o.initEvent("sigClick",!1,!0),e.dispatchEvent(o)}n=0,t=null},260)),!n)n=new Date().getTime();else if(new Date().getTime()-n<230){try{e.dispatchEvent(new Event("dobClick"))}catch(o){var r=document.createEvent("HTMLEvents");r.initEvent("dobClick",!1,!0),e.dispatchEvent(r)}clearTimeout(t),n=0,t=null}})},noScrolling=function(e){isUndefined(e)&&(e=!1);var t=function(n){n.preventDefault()};e?$("body").addListener("touchmove",t,{passive:!1}):$("body").removeListener("touchmove",t,{passive:!1})};return into(videoObj)}function ajax(cObj){var callback=null,obj={method:"get",dataType:"json",charset:"utf-8",async:!0,url:"",data:null,success:null,error:null};if(obj=standardization(obj,cObj),!isUndefined(obj.url)){var errorFun=function(e){!isUndefined(obj.error)&&valType(obj.error)=="function"?obj.error(e):obj.success(null)},successFun=function(e){!isUndefined(obj.success)&&valType(obj.success)=="function"&&obj.success(e)},createXHR=function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}}},formatParams=function(e){var t=[];for(var n in e)t.push(encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t.join("&")};if(valType(cObj)!="object"){isUndefined(obj.error)||obj.error(event);return}if(obj.dataType==="json"||obj.dataType==="text"||obj.dataType==="html"||obj.dataType==="xml"){var xhr=createXHR();if(callback=function(){if(xhr.status===200)if(obj.dataType==="json")try{successFun(eval("("+xhr.responseText+")"))}catch(e){successFun(null)}else successFun(xhr.responseText);else errorFun({code:xhr.status,message:xhr.statusText})},obj.data=formatParams(obj.data),obj.method==="get"&&!isUndefined(obj.data)&&obj.data!=""&&(obj.url.indexOf("?")==-1?obj.url+="?"+obj.data:obj.url+="&"+obj.data),obj.async===!0&&addListener(xhr,"readystatechange",function(e){this.readyState===4&&callback!=null&&callback()}),xhr.open(obj.method,obj.url,obj.async),obj.method==="post")try{xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xhr.setRequestHeader("charset",obj.charset),xhr.send(obj.data)}catch(e){callback()}else try{xhr.send(null)}catch(e){callback()}obj.async===!1&&callback()}else if(obj.dataType==="jsonp"){var oHead=document.getElementsByTagName("head")[0],oScript=document.createElement("script"),callbackName="callback"+new Date().getTime(),params=formatParams(obj.data)+"&callback="+callbackName;oScript.src=obj.url.split("?")+"?"+params,oHead.insertBefore(oScript,oHead.firstChild),window[callbackName]=function(e){!isUndefined(obj.success)&&valType(obj.success)==="function"&&obj.success(e),oHead.removeChild(oScript)}}}}function documentReady(e){var t=!1,n=null,r=function(){n&&clearInterval(n),!t&&(t=!0,valType(e)=="function"&&e())},o=function(){n=setInterval(function(){try{!isUndefined(document.readyState)&&document.readyState=="complete"&&r()}catch(g){}},10)},s=function(){valType(e)=="function"&&e(),removeListener(window,"load",s)};if(!isUndefined(document.body))valType(e)=="function"&&e();else try{addListener(window,"load",s)}catch(g){o()}}function getPath(e){if(typeof window!="undefined"&&window.ckplayerBasePath){var t=window.ckplayerBasePath;if(/\/(?:assets|\.vite\/deps|_next\/static|chunks?)\/?$/i.test(t)&&(t=""),t)return t.slice(-1)!=="/"&&(t+="/"),isUndefined(e)?t:t+e+"/"}for(var n=document.scripts||[],r=n.length?n[n.length-1].src:"",o=0;o<n.length;o++){var s=n[o].getAttribute("name")||n[o].getAttribute("data-name"),g=n[o].src.slice(n[o].src.lastIndexOf("/")+1,n[o].src.lastIndexOf("."));if(s&&(s=="ckplayer"||s=="ckplayer.min"||s=="ckplayer-plus")||n[o].src&&(g=="ckplayer"||g=="ckplayer.min"||g.indexOf("ckplayer")===0)){r=n[o].src;break}}var d="";return r&&r.lastIndexOf("/js/")>-1?d=r.substring(0,r.lastIndexOf("/js/")+1):r&&r.lastIndexOf("/")>-1&&(d=r.substring(0,r.lastIndexOf("/")+1)),isUndefined(e)||(d+=e+"/"),d}function checkJs(e){for(var t=document.scripts,n=0;n<t.length;n++)if(t[n].src==e)return t[n];return!1}function getMaxZIndex(){for(var e=document.all||document.querySelectorAll("*"),t=-1,n=0;n<e.length;n++){var r=null;try{r=window.getComputedStyle(e[n],null).zIndex}catch(o){e[n].style&&(r=e[n].style.zIndex)}r!="auto"&&parseInt(r)>t&&(t=parseInt(r))}return t}function getWindowSize(){return{width:window.innerWidth,height:window.innerHeight}}function standardization(e,t){var n={},r;for(r in e)n[r]=e[r];for(r in t)r in n&&(n[r]=t[r]);return n}function mergeObj(e,t){var n={},r;for(r in e)n[r]=e[r];for(r in t)r in n&&(valType(n[r])==="object"?valType(t[r])=="object"&&(n[r]=mergeObj(n[r],t[r])):valType(n[r])==valType(t[r])&&(n[r]=t[r]));return n}function valType(e){if(typeof e=="undefined")return"undefined";var t=Object.prototype.toString.call(e).split(" ")[1].replace("]","").toLowerCase();return t.substr(0,4)=="html"&&(t.substr(-7)=="element"||t.substr(-8)=="document"||t=="window")&&(t="htmlobject"),(t=="htmlcollection"||t=="nodelist")&&(t="htmlarray"),t}function isUndefined(e){try{return valType(e)==="undefined"||e===void 0||e===null||valType(e)==="number"&&isNaN(e)}catch(t){return!0}return!1}function prev(e){var t=e.previousSibling;if(t==null)return null;if(t.nodeType==3){var n=prev(t);if(n&&n.nodeType==1)return n}else return t.nodeType==1?t:!1}function next(e){var t=e.nextSibling;if(t==null)return null;if(t.nodeType==3){var n=next(t);if(n&&n.nodeType==1)return n}else return t.nodeType==1?t:!1}function addListener(e,t,n,r){if(isUndefined(r)&&(r=!1),e.addEventListener)try{e.addEventListener(t,n,r)}catch(o){}else if(e.attachEvent)try{e.attachEvent("on"+t,n)}catch(o){}else e["on"+t]=n;return isUndefined(e.listenerList)&&(e.listenerList=[]),e.listenerList.push([t,n]),e}function removeListener(e,t,n,r){if(isUndefined(r)&&(r=!1),e.removeEventListener)try{e.removeEventListener(t,n,r)}catch(g){}else if(e.detachEvent)try{e.detachEvent("on"+t,n)}catch(g){}else e["on"+t]=null;if(!isUndefined(e.listenerList)){for(var o=[],s=0;s<e.listenerList.length;s++)(e.listenerList[s][0]!=t||e.listenerList[s][1]!=n)&&o.push(e.listenerList[s]);e.listenerList=o}return e}function formatSeconds(e){isUndefined(e)&&(e=0);var t=parseInt(e);isUndefined(t)&&(t=0),t<0&&(t=0);var n=Math.floor(t/3600)<10?"0"+Math.floor(t/3600):Math.floor(t/3600),r=Math.floor(t/60%60)<10?"0"+Math.floor(t/60%60):Math.floor(t/60%60),o=Math.floor(t%60)<10?"0"+Math.floor(t%60):Math.floor(t%60),s="";return n!=="00"&&(s+=n+":"),s+=r+":"+o,s}function date(e,t){isUndefined(t)&&(t=new Date),t.toString().length<13&&(t=t*1e3);var n,r=t?new Date(t):new Date,o=function(c,b){return(c=c+"").length<b?new Array(++b-c.length).join("0")+c:c},s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],g={1:"st",2:"nd",3:"rd",21:"st",22:"nd",23:"rd",31:"st"},d=["","January","February","March","April","May","June","July","August","September","October","November","December"],u={d:function(){return o(u.j(),2)},D:function(){return u.l().substr(0,3)},j:function(){return r.getDate()},l:function(){return s[u.w()]},N:function(){return u.w()+1},S:function(){return g[u.j()]?g[u.j()]:"th"},w:function(){return r.getDay()},z:function(){return(r-new Date(r.getFullYear()+"/1/1"))/864e5>>0},W:function(){var c=u.z(),b=364+u.L()-c,p,y=(new Date(r.getFullYear()+"/1/1").getDay()||7)-1;return b<=2&&(r.getDay()||7)-1<=2-b?1:c<=2&&y>=4&&c>=6-y?(p=new Date(r.getFullYear()-1+"/12/31"),date("W",Math.round(p.getTime()/1e3))):1+(y<=3?(c+y)/7:(c-(7-y))/7)>>0},F:function(){return d[u.n()]},m:function(){return o(u.n(),2)},M:function(){return u.F().substr(0,3)},n:function(){return r.getMonth()+1},t:function(){var c;return(c=r.getMonth()+1)==2?28+u.L():c&1&&c<8||!(c&1)&&c>7?31:30},L:function(){var c=u.Y();return!(c&3)&&(c%100||!(c%400))?1:0},Y:function(){return r.getFullYear()},y:function(){return(r.getFullYear()+"").slice(2)},a:function(){return r.getHours()>11?"pm":"am"},A:function(){return u.a().toUpperCase()},B:function(){var c=(r.getTimezoneOffset()+60)*60,b=r.getHours()*3600+r.getMinutes()*60+r.getSeconds()+c,p=Math.floor(b/86.4);return p>1e3&&(p-=1e3),p<0&&(p+=1e3),String(p).length==1&&(p="00"+p),String(p).length==2&&(p="0"+p),p},g:function(){return r.getHours()%12||12},G:function(){return r.getHours()},h:function(){return o(u.g(),2)},H:function(){return o(r.getHours(),2)},i:function(){return o(r.getMinutes(),2)},s:function(){return o(r.getSeconds(),2)},O:function(){var c=o(Math.abs(r.getTimezoneOffset()/60*100),4);return r.getTimezoneOffset()>0?c="-"+c:c="+"+c,c},P:function(){var c=u.O();return c.substr(0,3)+":"+c.substr(3,2)},c:function(){return u.Y()+"-"+u.m()+"-"+u.d()+"T"+u.h()+":"+u.i()+":"+u.s()+u.P()},U:function(){return Math.round(r.getTime()/1e3)}};return e.replace(/([a-zA-Z])/g,function(c,b){var p="";return c!=b?p=b:u[b]?p=u[b]():p=b,p})}function dataURLtoBlob(e){for(var t=e.split(","),n=t[0].match(/:(.*?);/)[1],r=atob(t[1]),o=r.length,s=new Uint8Array(o);o--;)s[o]=r.charCodeAt(o);return new Blob([s],{type:n})}function decodeURIString(e){for(var t in e){if(valType(e[t])=="string"&&e[t])try{e[t]=decodeURI(e[t])}catch(n){}valType(e[t])=="object"&&(e[t]=decodeURIString(e[t]))}return e}function getApp(){var e=navigator.userAgent.toLowerCase();if(e.indexOf("iphone")>-1)return"iphone"}function cookie(e,t,n,r){isUndefined(n)&&(n=""),isUndefined(r)&&(r="/");var o=";domain="+n+";path="+r;location.protocol=="https"&&(o+=";SameSite=None;Secure=true");var s=function(u,c){var b=31104e6,p=new Date;p.setTime(p.getTime()+b);try{document.cookie=u+"="+escape(c)+";expires="+p.toGMTString()+o}catch(y){console.error(y)}},g=function(u){var c,b=new RegExp("(^| )"+u+"=([^;]*)(;|$)");return(c=document.cookie.match(b))?unescape(c[2]):null},d=function(u){var c=new Date;c.setTime(c.getTime()-1);var b=g(u);b!=null&&(document.cookie=u+"="+b+";expires="+c.toGMTString()+o)};if(!isUndefined(e)&&!isUndefined(t))return t=="delete"?(d(e),null):(s(e,t),g(e));if(!isUndefined(e)&&isUndefined(t))return g(e);isUndefined(e)}function arrayToString(e){var t="";if(!isUndefined(e))for(var n=0;n<e.length;n++){var r=e[n];n>0&&(t+=",");for(var o=0;o<r.length;o++)o>0&&(t+=";"),valType(r[o])=="number"?t+=parseInt(r[o]*100):t+=r[o]}return t}function stringToArray(e){var t=[];if(!isUndefined(e))for(var n=e.split(","),r=0;r<n.length;r++){var o=n[r].split(";");o[1]=parseInt(o[1])*.01,o[2]=parseInt(o[2])*.01,t.push(o)}return t}function documentHidden(e){isUndefined(document.visibilityState)||(e(document.visibilityState==="visible"?"show":"hidden"),addListener(document,"visibilitychange",function(){e(document.visibilityState==="visible"?"show":"hidden")}))}return ckplayerEmbed});
1
+ (function(b,h){typeof exports=="object"&&typeof module!="undefined"?module.exports=h():typeof define=="function"&&define.amd?define(h):(b=b||self,b.ckplayer=h())})(this,function(){"use strict";var language={play:"%E6%92%AD%E6%94%BE",pause:"%E6%9A%82%E5%81%9C",refresh:"%E9%87%8D%E6%92%AD",full:"%E5%85%A8%E5%B1%8F",exitFull:"%E9%80%80%E5%87%BA%E5%85%A8%E5%B1%8F",webFull:"%E9%A1%B5%E9%9D%A2%E5%85%A8%E5%B1%8F",exitWebFull:"%E9%80%80%E5%87%BA%E9%A1%B5%E9%9D%A2%E5%85%A8%E5%B1%8F",theatre:"%E5%89%A7%E5%9C%BA%E6%A8%A1%E5%BC%8F",exitTheatre:"%E9%80%80%E5%87%BA%E5%89%A7%E5%9C%BA%E6%A8%A1%E5%BC%8F",volume:"%E9%9F%B3%E9%87%8F%EF%BC%9A",muted:"%E9%9D%99%E9%9F%B3",exitmuted:"%E6%81%A2%E5%A4%8D%E9%9F%B3%E9%87%8F",seek:"seek%EF%BC%9A",waiting:"%E7%BC%93%E5%86%B2",live:"%E7%9B%B4%E6%92%AD%E4%B8%AD",backLive:"%E8%BF%94%E5%9B%9E%E7%9B%B4%E6%92%AD",lookBack:"%E5%9B%9E%E7%9C%8B%EF%BC%9A",next:"%E4%B8%8B%E4%B8%80%E9%9B%86",screenshot:"%E8%A7%86%E9%A2%91%E6%88%AA%E5%9B%BE",smallwindows:"%E5%B0%8F%E7%AA%97%E5%8F%A3%E6%92%AD%E6%94%BE%E5%8A%9F%E8%83%BD",playbackrate:"%E5%80%8D%E9%80%9F",playbackrateSuffix:"%E5%80%8D",track:"%E5%AD%97%E5%B9%95",noTrack:"%E6%97%A0%E5%AD%97%E5%B9%95",definition:"%E6%B8%85%E6%99%B0%E5%BA%A6",switchTo:"%E5%88%87%E6%8D%A2%E6%88%90%EF%BC%9A",closeTime:"%7Bseconds%7D%E7%A7%92%E5%90%8E%E5%8F%AF%E5%85%B3%E9%97%AD%E5%B9%BF%E5%91%8A",closeAd:"%E5%85%B3%E9%97%AD%E5%B9%BF%E5%91%8A",second:"%E7%A7%92",details:"%E6%9F%A5%E7%9C%8B%E8%AF%A6%E6%83%85",copy:"%E5%A4%8D%E5%88%B6",copySucceeded:"%E5%A4%8D%E5%88%B6%E6%88%90%E5%8A%9F%EF%BC%8C%E5%8F%AF%E8%B4%B4%E7%B2%98%EF%BC%81",smallwindowsOpen:"%E5%B0%8F%E7%AA%97%E5%8F%A3%E5%8A%9F%E8%83%BD%E5%B7%B2%E5%BC%80%E5%90%AF",smallwindowsClose:"%E5%B0%8F%E7%AA%97%E5%8F%A3%E5%8A%9F%E8%83%BD%E5%B7%B2%E5%85%B3%E9%97%AD",screenshotStart:"%E6%88%AA%E5%9B%BE%E4%B8%AD%EF%BC%8C%E8%AF%B7%E7%A8%8D%E5%80%99...",screenshotClose:"%E6%88%AA%E5%9B%BE%E5%8A%9F%E8%83%BD%E5%B7%B2%E5%85%B3%E9%97%AD",loopOpen:"%E5%BE%AA%E7%8E%AF%E6%92%AD%E6%94%BE",loopClose:"%E5%B7%B2%E5%85%B3%E9%97%AD%E5%BE%AA%E7%8E%AF%E6%92%AD%E6%94%BE",close:"%E5%85%B3%E9%97%AD",down:"%E4%B8%8B%E8%BD%BD",p50:"50%25",p75:"75%25",p100:"100%25",timeScheduleAdjust:{prohibit:"%E8%A7%86%E9%A2%91%E7%A6%81%E6%AD%A2%E6%8B%96%E5%8A%A8",prohibitBackOff:"%E8%A7%86%E9%A2%91%E7%A6%81%E6%AD%A2%E9%87%8D%E5%A4%8D%E8%A7%82%E7%9C%8B",prohibitForward:"%E8%A7%86%E9%A2%91%E7%A6%81%E6%AD%A2%E5%BF%AB%E8%BF%9B",prohibitLookBack:"%E8%A7%86%E9%A2%91%E7%A6%81%E6%AD%A2%E6%92%AD%E6%94%BE%E9%83%A8%E5%88%86%E5%86%85%E5%AE%B9",prohibitForwardNotViewed:"%E8%A7%86%E9%A2%91%E7%A6%81%E6%AD%A2%E6%92%AD%E6%94%BE%E6%9C%AA%E8%A7%82%E7%9C%8B%E7%9A%84%E9%83%A8%E5%88%86"},error:{noMessage:"%E6%9C%AA%E7%9F%A5%E9%94%99%E8%AF%AF",supportVideoError:"%E8%AF%A5%E6%B5%8F%E8%A7%88%E5%99%A8%E7%89%88%E6%9C%AC%E5%A4%AA%E4%BD%8E%EF%BC%8C%E5%BB%BA%E8%AE%AE%E6%9B%B4%E6%8D%A2%E6%88%90%E5%85%B6%E5%AE%83%E6%B5%8F%E8%A7%88%E5%99%A8",videoTypeError:"%E8%AF%A5%E6%B5%8F%E8%A7%88%E5%99%A8%E4%B8%8D%E6%94%AF%E6%8C%81%E6%92%AD%E6%94%BE%E8%AF%A5%E8%A7%86%E9%A2%91%EF%BC%8C%E5%BB%BA%E8%AE%AE%E6%9B%B4%E6%8D%A2%E6%88%90%E5%85%B6%E5%AE%83%E6%B5%8F%E8%A7%88%E5%99%A8",loadingFailed:"%E5%8A%A0%E8%BD%BD%E5%A4%B1%E8%B4%A5",emptied:"%E8%A7%86%E9%A2%91%E6%96%87%E4%BB%B6%E5%8A%A0%E8%BD%BD%E8%BF%87%E7%A8%8B%E4%B8%AD%E5%87%BA%E7%8E%B0%E9%94%99%E8%AF%AF",screenshot:"%E8%A7%86%E9%A2%91%E6%88%AA%E5%9B%BE%E5%A4%B1%E8%B4%A5",ajax:"Ajax%E6%95%B0%E6%8D%AE%E8%AF%B7%E6%B1%82%E9%94%99%E8%AF%AF",noVideoContainer:"%E6%9C%AA%E6%89%BE%E5%88%B0%E6%94%BE%E7%BD%AE%E8%A7%86%E9%A2%91%E7%9A%84%E5%AE%B9%E5%99%A8"}},videoObjectDefault={container:"",volume:.8,poster:"",autoplay:!1,loop:!1,live:!1,rotate:0,zoom:0,ad:null,backLive:!1,seek:0,next:null,loaded:"",plug:"",duration:0,preview:null,prompt:null,crossOrigin:"",video:null,type:"",playbackrate:1,ended:null,webFull:!1,theatre:null,controls:!1,rightBar:null,smallWindows:null,smallWindowsDrag:!0,screenshot:!1,timeScheduleAdjust:1,logo:"",menu:null,information:{"Load:":"{loadTime} second","Duration:":"{duration} second","Size:":"{videoWidth}x{videoHeight}","Volume:":"{volume}%","Fps:":"{fps}fps","Sudio decoded:":"{audioDecodedByteCount} Byte","Video decoded:":"{videoDecodedByteCount} Byte"},track:null,title:"",language:"",barHideTime:1500,playbackrateOpen:!0,playbackrateList:[.75,1,1.25,1.5,2,4],cookie:null,domain:null,cookiePath:"/",documentFocusPause:!1,mouseWheelVolume:2,keyVolume:2,errorShow:!0,pluginPath:"",autoPlug:!0,preferBuiltinPlug:!0,cdnFallback:!0},ckplayerPlusDefaultCdn="https://cdn.jsdelivr.net/npm/ckplayer-plus@1.1.0/dist/";function ckplayerEmbed(b){var h=[{title:"ckplayer",link:"http://www.ckplayer.com"},{title:"version:X3",underline:!0},{title:"about",click:"aboutShow"}],a={},k={},o=null,T=0,G="",le=!1,M=!0,F=!0,X=0,L=0,ae=null,st=0,Te=!1,Xe=0,lt=!1,ge=-1,De=-1,_e=0,oe=0,ve=0,te=-1,$=0,Me=!0,dt="",We=null,ze=null,pe=null,$e=null,Je=null,Oe=null,ut=null,ye=!0,Ie=null,ke=!1,si=0,Ce=0,Le=null,v=null,Ze=!1,Ji=!1,xt=!0,At=!0,Fe=null,W=null,He=null,ft=!1,e={},p=null,C=null,S=null,ne=null,O=null,_=null,Tt=!0,ct="",we=0,de=100,pt=!1,ht=!1,Be="ckplayer-player-cookie",ue="",Se=0,li=[],Bt=!0,Ue=!1;function Re(t){if(typeof t=="string"){var i=t.replace(/\(\s*\)\s*;?\s*$/,"").trim();if(/^[A-Za-z_$][\w$]*(\.[A-Za-z_$][\w$]*)*$/.test(i)){for(var n=i.split("."),r=typeof window!="undefined"?window:this,s=r,d=0;d<n.length;d++){if(s==null)return;r=s,s=s[n[d]]}if(typeof s=="function")return s.call(r)}}}var Ge=function(t){if(isUndefined(t))return f.add=f.into=Ge,f;language=decodeURIString(language),isUndefined(window.ckplayerLanguage)||(language=mergeObj(language,window.ckplayerLanguage)),B(),documentHidden(function(r){B("visibilityState",r)}),ct=getApp(),k={};for(var i in videoObjectDefault)k[i]=videoObjectDefault[i];if(valType(t)=="string"&&(t.substr(0,8)=="website:"||t.substr(0,4)=="url:")){var n="";t.substr(0,8)=="website:"&&(n=t.substring(8)),t.substr(0,4)=="url:"&&(n=t.substring(4)),ajax({url:n,success:function(r){return r?Ge(r):(Ve(language.error.ajax+",url:"+n),null)}})}else return valType(t)=="object"?(k=standardization(k,t),!isUndefined(t.container)&&t.container?(p=D(t.container),p?Ft(t):Ut(t)):Ut(t)):(Ve(language.error.noVideoContainer),null)},Ut=function(t){return documentReady(function(){return isUndefined(t.container)?di(t):(p=D(t.container),p?Ft(t):(Ve(language.error.noVideoContainer),null))}),null},di=function(t){if(valType(t.video)=="string"&&(t.video.substr(0,8)=="website:"||t.video.substr(0,4)=="url:")){k=standardization(k,t);var i="";t.video.substr(0,8)=="website:"&&(i=t.video.substring(8)),t.video.substr(0,4)=="url:"&&(i=t.video.substring(4)),ajax({url:i,success:function(n){return n?Ge(n):(Ve(language.error.ajax+",url:"+i),null)}})}else return Ve(language.error.noVideoContainer),null},Ft=function(t){if(a=standardization(k,t),a.language){if(!isUndefined(window.ckplayerLanguage))return language=mergeObj(language,window.ckplayerLanguage),vt(t);var i=Ke("language",a.language+".js");Ye(i,function(){return isUndefined(window.ckplayerLanguage)||(language=mergeObj(language,window.ckplayerLanguage)),vt(t)})}else return vt(t)},Ct=function(t){return!t||valType(t)!="string"?!0:/\/(?:assets|\.vite\/deps|_next\/static|chunks?)\/?$/i.test(t)},Ke=function(t,i){var n="";if(a&&a.pluginPath?n=a.pluginPath:typeof window!="undefined"&&window.ckplayerBasePath&&(n=window.ckplayerBasePath),n&&Ct(n)&&(n=""),n)return n.slice(-1)!=="/"&&(n+="/"),n+t+"/"+i;var r=getPath(t)+i;if(r&&r.indexOf(t+"/")>-1&&r.indexOf("undefined")===-1&&!Ct(getPath()))return r;var s=!a||a.cdnFallback!==!1,d=typeof window!="undefined"&&window.ckplayerPlusCdn?window.ckplayerPlusCdn:ckplayerPlusDefaultCdn;return!s||!d||d.indexOf("1.1.0")>-1?t+"/"+i:(d.slice(-1)!=="/"&&(d+="/"),d+t+"/"+i)},ui=function(t){var i="";if(valType(t)=="string"?i=t:valType(t)=="array"&&t.length?valType(t[0])=="array"&&t[0].length?i=t[0][0]:valType(t[0])=="string"&&(i=t[0]):valType(t)=="object"&&t&&(i=t.url||t.file||""),!i||valType(i)!="string"||i.substr(0,8)=="website:"||i.substr(0,4)=="url:")return"";var n=i.split("?")[0].split("#")[0].toLowerCase();return n.indexOf(".m3u8")>-1?"hls.js":n.indexOf(".flv")>-1?"flv.js":n.indexOf(".m2ts")>-1||n.indexOf(".mts")>-1||n.length>3&&n.substring(n.length-3)===".ts"?"mpegts.js":""},fi=function(t){if(a.autoPlug!==!1&&!a.plug){var i=ui(t);i&&(a.plug=i)}},vt=function(t){if(G=!(a.volume>0),!isUndefined(p)&&p!=null)valType(p)=="htmlarray"&&(p=p.eq(0));else return null;Yi(),Ue=valType(a.video)=="string"&&(a.video.substr(0,1)=="."&&a.video.indexOf("/")==-1||a.video.substr(0,1)=="#"),Ue&&(C=p.find(".ckplayer-ckplayer")?p.find(".ckplayer-ckplayer").eq(0):null,C&&(S=C.find(".ck-main")?C.find(".ck-main").eq(0):null),S&&(ne=S.find(".ck-video")?S.find(".ck-video").eq(0):null)),(!C||!S||!ne)&&(p.htm(""),C=w("ckplayer-ckplayer"),p.append(C),S=w("ck-main"),C.append(S),ne=w("ck-video"),S.append(ne)),o&&(o.remove(),o=null),Ue&&(o=D(a.video)?D(a.video).eq(0):null),o||(o=_i(),o.attr("width","100%").attr("height","100%"),ne.append(o)),o.volume=a.volume,a.autoplay?(f.volume(0),f.muted(),le=!0,o.attr("autoplay","autoplay"),F=!1):o.attr("preload","metadata"),p.loop=a.loop,p.loop&&o.attr("loop","loop"),a.controls?o.controls=!0:o.controls=!1;try{Ue||(o.attr("controlslist","nodownload"),o.attr("x-webkit-airplay","true"),o.attr("x5-video-orientation","portraint"),o.attr("playsinline","true"),o.attr("webkit-playsinline","true"),o.attr("x5-playsinline","true")),a.crossOrigin&&(o.useCORS=!0,o.crossOrigin=a.crossOrigin)}catch(i){}if(p.smallWindows=!0,p.webFull=!1,p.theatre=!1,hi(),a.rotate>0&&f.rotate(a.rotate),a.zoom>0&&f.zoom(a.zoom),isUndefined(o.canPlayType))return p.error={code:5,message:language.error.supportVideoError},B("error",p.error),se(),f;if(vi(),!isUndefined(a.loaded))if(valType(a.loaded)=="function")try{a.loaded(f)}catch(i){}else valType(a.loaded)=="string"&&typeof console!="undefined"&&console.warn&&console.warn("[ckplayer] vars.loaded as string is ignored for security. Pass a function instead.");return Pe(Ue?o.attr("src"):a.video),f},bt=function(){if(isUndefined(a.seek))return 0;if(valType(a.seek)=="number"&&a.seek>0)return a.seek;if(valType(a.seek)=="string"&&a.seek=="cookie"&&ue){var t=f.cookie(ue);return t&&t.time?t.time:0}return valType(a.seek)=="string"&&a.seek!==""&&!isNaN(parseFloat(a.seek))?parseFloat(a.seek):0},Lt=function(t){!t||t<=0||(L=t,$=Math.max($,t),te<0&&(te=t))},ci=function(){a.cookie&&(valType(a.cookie)=="array"&&a.cookie.length>=2&&(a.cookie[0]&&valType(a.cookie[0])=="string"&&(ue=a.cookie[0]),a.cookie[1]&&valType(a.cookie[1])=="number"&&(Se=a.cookie[1])),valType(a.cookie)=="object"&&!isUndefined(a.cookie.name)&&(ue=a.cookie.name,!isUndefined(a.cookie.hour)&&valType(a.cookie.hour)=="number"&&(Se=a.cookie.hour)),valType(a.cookie)=="string"&&(ue=a.cookie),ue&&(ue=ue.replace(/[ ]*,[ ]*|[ ]+/g,"").replace(/[ ]*;[ ]*|[ ]+/g,""))),L||Lt(bt())},St=function(t,i){if(!_||typeof _.startLoad!="function"||!o)return!1;(isNaN(t)||t<0)&&(t=0);var n=o.currentTime||0;if(!i){if(ge>=0&&Math.abs(ge-t)<1.5&&et(t)&&Math.abs(n-t)<2.5)return!0;if(et(t)&&Math.abs(n-t)<1.5)return ge=t,!0;if(De>=0&&Math.abs(De-t)<1.5&&Date.now()-_e<4e3)return!0}De=t,_e=Date.now(),ge=t;try{_.startLoad(t)}catch(r){return!1}return!0},pi=function(){if(je(),Te=!1,lt=!1,ge=-1,De=-1,_e=0,Xe=0,_){try{_.destroy()}catch(t){}_=null}if(O){try{O.pause(),O.unload(),O.detachMediaElement(),O.destroy()}catch(t){}O=null}},Pe=function(t){var i=0;if(fi(t),ci(),pi(),(o.attr("src")||o.htm())&&f.pause(),o.attr("src")&&!Ue&&(o.attr("src",""),o.removeAttr("src")),!isUndefined(o.textTracks)&&o.textTracks.length>0)for(i=o.find("track").length-1;i>-1;i--)o.find("track").eq(i).remove();Ue||o.htm(""),isUndefined(a.ad)||(v=a.ad);var n="";if(valType(t)=="string")if(t.substr(0,8)=="website:"||t.substr(0,4)=="url:"){var r="";t.substr(0,8)=="website:"&&(r=t.substring(8)),t.substr(0,4)=="url:"&&(r=t.substring(4)),ajax({url:r,success:function(d){d!=null?(a=standardization(k,d),Pe(a.video)):(p.error={code:8,message:language.error.ajax},B("error",p.error),se())}});return}else a.plug&&!Qe(t)?mt(t):Ue||o.attr("src",t),gt();else if(valType(t)=="array"){for(i=0;i<t.length;i++)if(valType(t[i])=="array")if(a.plug&&!Qe(t[i][0]))mt(t[i][0]);else{var s=' type="'+t[i][1]+'"';t[i].length>1&&(n+='<source src="'+decodeURIComponent(t[i][0])+'"'+s+">")}n&&o.htm(n),gt()}else valType(t)=="object"&&(a.plug?mt(t):(p.error={code:10,message:language.error.emptied},B("error",p.error),se()),gt());!isUndefined(o.find("source"))&&o.find("source").length>0&&o.find("source").eq(o.find("source").length-1).addListener("error",J.error),xi(),Rt(),Me&&qt()},mt=function(t){switch(a.plug){case"hls.js":Pt(t);break;case"flv.js":Dt(t);break;case"mpegts.js":Mt(t);break;case"dash.js":p.error={code:10,message:language.error.emptied},B("error",p.error),se();break;default:valType(a.plug)=="function"?a.plug(o,t):(p.error={code:10,message:language.error.emptied},B("error",p.error),se());break}},Pt=function(t){var i=function(){if(typeof Hls!="undefined"&&!isUndefined(Hls)&&Hls.isSupported()){if(_){try{_.destroy()}catch(s){}_=null}var n={maxBufferLength:30,maxMaxBufferLength:60},r=L;r||(r=bt()),r&&r>0&&(isUndefined(a.live)||!a.live)&&(n.startPosition=r,$=Math.max($,r),te<0&&(te=r),ge=r,De=r,_e=Date.now(),L=0,lt=!0,je()),_=new Hls(n),_.loadSource(t),_.attachMedia(o),_.on(Hls.Events.MANIFEST_PARSED,function(){lt||Ee()}),_.on(Hls.Events.FRAG_BUFFERED,function(s,d){if(!(ge<=0||!d||!d.frag)){var A=d.frag.start,u=A+d.frag.duration;ge>=A-.5&&ge<=u+.5&&(M||(M=!0,e.buffer&&e.buffer.hide()))}}),_.on(Hls.Events.ERROR,function(s,d){var A=9,u=language.error.loadingFailed,g=d.fatal;if(isUndefined(d.response)||(isUndefined(d.response.code)||(A=d.response.code),!isUndefined(d.response.text)&&d.response.text?u=d.response.text:isUndefined(s)||(u=s)),g&&d.type===Hls.ErrorTypes.MEDIA_ERROR&&_&&typeof _.recoverMediaError=="function")try{_.recoverMediaError(),g=!1}catch(x){}p.error={code:A,message:u},B("error",p.error),g&&se()})}else Qe(t)&&o.attr("src",t)};if(typeof Hls!="undefined"&&!isUndefined(Hls)&&!a.preferBuiltinPlug){i();return}Ye(Ke("hls.js","hls.min.js"),i)},Dt=function(t){var i=function(){if(typeof flvjs!="undefined"&&!isUndefined(flvjs)&&flvjs.isSupported()){var n={type:"flv",url:t};valType(t)=="object"&&(n=t),a.live&&(n.isLive=!0),O&&(O.pause(),O.unload(),O.detachMediaElement(),O.destroy(),O=null),O=flvjs.createPlayer(n),O.attachMediaElement(o),O.load(),O.on(flvjs.Events.METADATA_ARRIVED,function(r){J.loadedMetaData()}),O.on(flvjs.Events.ERROR,function(r,s,d){p.error={code:d.code,message:d.msg},B("error",p.error),se()})}};if(typeof flvjs!="undefined"&&!isUndefined(flvjs)&&!a.preferBuiltinPlug){i();return}Ye(Ke("flv.js","flv.min.js"),i)},Mt=function(t){var i=function(){if(typeof mpegts!="undefined"&&!isUndefined(mpegts)&&mpegts.getFeatureList().mseLivePlayback){var n={type:"mse",url:t};valType(t)=="object"&&(n=t),a.live&&(n.isLive=!0),O&&(O.pause(),O.unload(),O.detachMediaElement(),O.destroy(),O=null),O=mpegts.createPlayer(n),O.attachMediaElement(o),O.load(),O.on(mpegts.Events.METADATA_ARRIVED,function(r){J.loadedMetaData()}),O.on(mpegts.Events.ERROR,function(r,s,d){p.error={code:d.code,message:d.msg},B("error",p.error),se()})}};if(typeof mpegts!="undefined"&&!isUndefined(mpegts)&&!a.preferBuiltinPlug){i();return}Ye(Ke("mpegts.js","mpegts.min.js"),i)},Qe=function(t,i){var n=[{vidType:"video/ogg",codType:"theora, vorbis"},{vidType:"video/mp4",codType:"avc1.4D401E, mp4a.40.2"},{vidType:"video/mp4",codType:"avc1"},{vidType:"video/mp4",codType:"hevc"},{vidType:"video/webm",codType:"vp8.0, vorbis"},{vidType:"video/webm",codType:"vp9"},{vidType:"",codType:"application/x-mpegURL"},{vidType:"",codType:"application/vnd.apple.mpegurl"}],r={ogg:n[0],mp4:[n[1],n[2],n[3]],webm:[n[4],n[5]],m3u8:[n[6],n[7]]},s=[],d="",A=function(E){var P=E.vidType,N="";P?N=P+'; codecs="'+E.codType+'"':N=E.codType;var q=o.canPlayType(N);return q==""&&(q="no"),q},u=function(E){return E.replace(/.+\./,"")};if(isUndefined(i)){if(valType(t)=="string"){if(a.type)for(d in n)n[d].vidType==a.type&&s.push(n[d]);else if(u(t)&&u(t)in r){var g=r[u(t)];if(valType(g)=="array")for(var x=0;x<g.length;x++)s.push(g[x]);else s.push(g)}}}else s.push(n[i]);var U=!1;if(s.length>0)for(var x=0;x<s.length;x++)A(s[x])!="no"&&(U=!0);return!U&&!a.plug&&(p.error={code:6,message:language.error.videoTypeError},B("error",p.error),se()),U},hi=function(){e.loading=w("ck-loading"),S.append(e.loading),e.bar=w("ck-bar"),S.append(e.bar),e.rightBar=w("ck-right-bar ck-right-bar-hide"),S.append(e.rightBar),e.topBar=w("ck-top-bar ck-top-bar-hide"),S.append(e.topBar),e.bar.pbox=w("ck-bar-progress"),e.bar.pbox.bg=w("ck-bar-progress-bg"),e.bar.pbox.load=w("ck-bar-progress-load"),e.bar.pbox.bg.append(e.bar.pbox.load),e.bar.pbox.play=w("ck-bar-progress-play"),e.bar.pbox.bg.append(e.bar.pbox.play),e.bar.pbox.mouseLine=w("ck-bar-progress-mouseline"),e.bar.pbox.bg.append(e.bar.pbox.mouseLine),e.bar.pbox.slider=w("ck-bar-progress-slider"),e.bar.pbox.append(e.bar.pbox.bg).append(e.bar.pbox.slider),e.bar.append(e.bar.pbox),e.bar.mouseout(Fi).mouseover(Ci),valType(a.live)=="number"&&(e.bar.pbox.play.css({width:"100%"}),e.bar.pbox.slider.css({left:100-e.bar.pbox.slider.getWidth()*100/e.bar.pbox.bg.getWidth()+"%"})),e.bar.playAndPause=w("ck-bar-playandpause"),e.bar.append(e.bar.playAndPause),e.bar.playAndPause.play=V("ck-bar-btn ck-btn-play"),e.bar.playAndPause.play.click(f.play),e.bar.playAndPause.play.mouseover(function(){j(this,language.play)}),e.bar.playAndPause.append(e.bar.playAndPause.play),e.bar.playAndPause.pause=V("ck-bar-btn ck-btn-pause"),e.bar.playAndPause.pause.click(f.pause),e.bar.playAndPause.pause.mouseover(function(){j(this,language.pause)}),e.bar.playAndPause.append(e.bar.playAndPause.pause),e.bar.playAndPause.pause.hide(),e.bar.playAndPause.refresh=V("ck-bar-btn ck-btn-refresh"),e.bar.playAndPause.refresh.click(f.play),e.bar.playAndPause.refresh.mouseover(function(){j(this,language.refresh)}),e.bar.playAndPause.append(e.bar.playAndPause.refresh),e.bar.nextEpisode=w("ck-bar-btn ck-bar-next"),e.bar.append(e.bar.nextEpisode),e.bar.nextEpisode.click(Ii).mouseover(Oi).mouseout(function(){isUndefined(e.next)||f.closeLayer(e.next)}),isUndefined(a.next)&&e.bar.nextEpisode.hide();var t=formatSeconds(f.time())+"/"+formatSeconds(T);a.live&&(t=language.live),e.time=w("ck-bar-time",t),e.bar.append(e.time),e.bar.backLive=V("ck-btn-backlive",language.backLive),e.bar.append(e.bar.backLive),e.bar.backLive.mouseover(function(){j(this,language.backLive)}).click(function(){B("backLive")}),e.bar.backLive.hide(),e.bar.fullAndExit=w("ck-bar-fullandexit"),e.bar.append(e.bar.fullAndExit),e.bar.fullAndExit.full=V("ck-bar-btn ck-btn-full"),e.bar.fullAndExit.full.click(f.fullOrExit),e.bar.fullAndExit.full.mouseover(function(){j(this,language.full)}),e.bar.fullAndExit.append(e.bar.fullAndExit.full),e.bar.fullAndExit.exitFull=V("ck-bar-btn ck-btn-exitfull"),e.bar.fullAndExit.exitFull.click(f.fullOrExit),e.bar.fullAndExit.exitFull.mouseover(function(){j(this,language.exitFull)}),e.bar.fullAndExit.append(e.bar.fullAndExit.exitFull),e.bar.webFullAndExit=w("ck-bar-webfullandexit"),e.bar.append(e.bar.webFullAndExit),e.bar.webFullAndExit.webFull=V("ck-bar-btn ck-btn-webfull"),e.bar.webFullAndExit.webFull.click(f.webFull),e.bar.webFullAndExit.webFull.mouseover(function(){j(this,language.webFull)}),e.bar.webFullAndExit.append(e.bar.webFullAndExit.webFull),e.bar.webFullAndExit.exitWebFull=V("ck-bar-btn ck-btn-exitwebfull"),e.bar.webFullAndExit.exitWebFull.click(f.exitWebFull),e.bar.webFullAndExit.exitWebFull.mouseover(function(){j(this,language.exitWebFull)}),e.bar.webFullAndExit.append(e.bar.webFullAndExit.exitWebFull),a.webFull||e.bar.webFullAndExit.hide(),e.bar.theatreAndExit=w("ck-bar-theatreandexit"),e.bar.append(e.bar.theatreAndExit),e.bar.theatreAndExit.theatre=V("ck-bar-btn ck-btn-theatre"),e.bar.theatreAndExit.theatre.click(f.theatre),e.bar.theatreAndExit.theatre.mouseover(function(){j(this,language.theatre)}),e.bar.theatreAndExit.append(e.bar.theatreAndExit.theatre),e.bar.theatreAndExit.exitTheatre=V("ck-bar-btn ck-btn-exittheatre"),e.bar.theatreAndExit.exitTheatre.click(f.exitTheatre),e.bar.theatreAndExit.exitTheatre.mouseover(function(){j(this,language.exitTheatre)}),e.bar.theatreAndExit.append(e.bar.theatreAndExit.exitTheatre),a.theatre||e.bar.theatreAndExit.hide(),e.bar.vbox=w("ck-bar-volumebox"),e.bar.append(e.bar.vbox),e.bar.vbox.muted=V("ck-bar-btn ck-btn-muted"),e.bar.vbox.muted.click(f.muted),e.bar.vbox.append(e.bar.vbox.muted),e.bar.vbox.exitMuted=V("ck-bar-btn ck-btn-exitmuted"),e.bar.vbox.exitMuted.click(f.exitMuted),e.bar.vbox.append(e.bar.vbox.exitMuted),e.bar.vbox.volume=w("ck-bar-volume"),e.bar.vbox.append(e.bar.vbox.volume),e.bar.vbox.volume.box=w("ck-bar-volumex"),e.bar.vbox.volume.append(e.bar.vbox.volume.box),e.bar.vbox.volume.txt=w("ck-bar-volume-txt","0"),e.bar.vbox.volume.box.append(e.bar.vbox.volume.txt),e.bar.vbox.volume.bg=w("ck-bar-volume-bg"),e.bar.vbox.volume.box.append(e.bar.vbox.volume.bg),e.bar.vbox.volume.pp=w("ck-bar-volume-pp"),e.bar.vbox.volume.bg.append(e.bar.vbox.volume.pp),e.bar.vbox.volume.slider=w("ck-bar-volume-slider"),e.bar.vbox.volume.box.append(e.bar.vbox.volume.slider),e.bar.vbox.mouseDown=!1,e.bar.vbox.volume.show(),wt(a.volume),Vi(),e.bar.vbox.volume.attr("style",""),e.bar.vbox.mouseover(function(){wt(o.muted?0:o.volume)}),e.bar.playbackrate=w("ck-bar-playbackrate-box"),e.bar.append(e.bar.playbackrate),e.bar.playbackrate.button=w("ck-bar-playbackrate",language.playbackrate),e.bar.playbackrate.append(e.bar.playbackrate.button),e.bar.playbackrate.bgbox=w("ck-bar-playbackrate-bg-box ck-list-bg-box"),e.bar.playbackrate.append(e.bar.playbackrate.bgbox),Pi(),e.bar.track=w("ck-bar-track-box"),e.bar.append(e.bar.track),e.bar.track.button=w("ck-bar-track",language.track),e.bar.track.append(e.bar.track.button),e.bar.track.bgbox=w("ck-bar-track-bg-box ck-list-bg-box"),e.bar.track.append(e.bar.track.bgbox),e.bar.track.hide(),e.bar.definition=w("ck-bar-definition-box"),e.bar.append(e.bar.definition),e.bar.definition.button=w("ck-bar-definition",language.definition),e.bar.definition.append(e.bar.definition.button),e.bar.definition.bgbox=w("ck-bar-definition-bg-box ck-list-bg-box"),e.bar.definition.append(e.bar.definition.bgbox),e.bar.definition.hide(),e.rightBar.screenshot=V("ck-bar-btn ck-btn-screenshot"),e.rightBar.append(e.rightBar.screenshot),e.rightBar.screenshot.mouseover(function(){j(this,language.screenshot,null,"left")}),e.rightBar.screenshot.click(f.screenshot),e.rightBar.smallwindows=w("ck-right-bar-smallwindows"),e.rightBar.append(e.rightBar.smallwindows),e.rightBar.smallwindows.open=V("ck-bar-btn ck-btn-smallwindows-open"),e.rightBar.smallwindows.open.click(function(){j(this,language.smallwindowsClose,null,"left"),f.smallWindows(!1)}),e.rightBar.smallwindows.open.mouseover(function(){j(this,language.smallwindowsOpen,null,"left")}),e.rightBar.smallwindows.append(e.rightBar.smallwindows.open),e.rightBar.smallwindows.close=V("ck-bar-btn ck-btn-smallwindows-close"),e.rightBar.smallwindows.close.click(function(){j(this,language.smallwindowsOpen,null,"left"),f.smallWindows(!0)}),e.rightBar.smallwindows.close.mouseover(function(){j(this,language.smallwindowsClose,null,"left")}),e.rightBar.smallwindows.append(e.rightBar.smallwindows.close),e.rightBar.loop=w("ck-right-bar-loop"),e.rightBar.append(e.rightBar.loop),e.rightBar.loop.open=V("ck-bar-btn ck-btn-loop-open"),e.rightBar.loop.open.click(function(){j(this,language.loopClose,null,"left"),f.loop(!1)}),e.rightBar.loop.open.mouseover(function(){j(this,language.loopOpen,null,"left")}),e.rightBar.loop.append(e.rightBar.loop.open),e.rightBar.loop.close=V("ck-bar-btn ck-btn-loop-close"),e.rightBar.loop.close.click(function(){j(this,language.loopOpen,null,"left"),f.loop(!0)}),e.rightBar.loop.close.mouseover(function(){j(this,language.loopClose,null,"left")}),e.rightBar.loop.append(e.rightBar.loop.close),e.rightBar.mouseout(Li).mouseover(Si),e.screenshot=w("ck-screenshot"),S.append(e.screenshot),e.screenshot.img=w("ck-screenshot-img"),e.screenshot.append(e.screenshot.img),e.screenshot.bar=w("ck-screenshot-bar"),e.screenshot.append(e.screenshot.bar),e.screenshot.bar.down=rt(language.down,"","ck-screenshot-btn ck-screenshot-down"),e.screenshot.bar.append(e.screenshot.bar.down),e.screenshot.bar.close=V("ck-screenshot-btn ck-screenshot-close",language.close),e.screenshot.bar.close.click(f.closeScreenshot),e.screenshot.bar.append(e.screenshot.bar.close),e.topBar.zoomEle=w("ck-top-bar-zoom"),e.topBar.zoomEle.zoom50=w("ck-top-bar-zoom-container"),e.topBar.zoomEle.append(e.topBar.zoomEle.zoom50),e.topBar.zoomEle.zoom50.left=w("ck-top-bar-zoom-left"),e.topBar.zoomEle.zoom50.append(e.topBar.zoomEle.zoom50.left),e.topBar.zoomEle.zoom50.left.button=w("ck-top-bar-zoom-button-50"),e.topBar.zoomEle.zoom50.left.append(e.topBar.zoomEle.zoom50.left.button),e.topBar.zoomEle.zoom50.right=w("ck-top-bar-zoom-right",language.p50),e.topBar.zoomEle.zoom50.append(e.topBar.zoomEle.zoom50.right),e.topBar.zoomEle.zoom50.click(function(){f.zoom(50)}),e.topBar.zoomEle.zoom75=w("ck-top-bar-zoom-container"),e.topBar.zoomEle.append(e.topBar.zoomEle.zoom75),e.topBar.zoomEle.zoom75.left=w("ck-top-bar-zoom-left"),e.topBar.zoomEle.zoom75.append(e.topBar.zoomEle.zoom75.left),e.topBar.zoomEle.zoom75.left.button=w("ck-top-bar-zoom-button-75"),e.topBar.zoomEle.zoom75.left.append(e.topBar.zoomEle.zoom75.left.button),e.topBar.zoomEle.zoom75.right=w("ck-top-bar-zoom-right",language.p75),e.topBar.zoomEle.zoom75.append(e.topBar.zoomEle.zoom75.right),e.topBar.zoomEle.zoom75.click(function(){f.zoom(75)}),e.topBar.zoomEle.zoom100=w("ck-top-bar-zoom-container"),e.topBar.zoomEle.append(e.topBar.zoomEle.zoom100),e.topBar.zoomEle.zoom100.left=w("ck-top-bar-zoom-left"),e.topBar.zoomEle.zoom100.append(e.topBar.zoomEle.zoom100.left),e.topBar.zoomEle.zoom100.left.button=w("ck-top-bar-zoom-button-100"),e.topBar.zoomEle.zoom100.left.append(e.topBar.zoomEle.zoom100.left.button),e.topBar.zoomEle.zoom100.right=w("ck-top-bar-zoom-right",language.p100),e.topBar.zoomEle.zoom100.append(e.topBar.zoomEle.zoom100.right),e.topBar.zoomEle.zoom100.click(function(){f.zoom(100)}),e.topBar.append(e.topBar.zoomEle),e.topBar.titleEle=w("ck-top-bar-title",a.title),e.topBar.append(e.topBar.titleEle),e.topBar.timeEle=w("ck-top-bar-time"),e.topBar.append(e.topBar.timeEle),e.centerPlay=w("ck-center-play"),e.centerPlay.click(f.play),S.append(e.centerPlay),e.buffer=w("ck-buffer"),S.append(e.buffer),e.message=w("ck-message"),S.append(e.message),e.tip=w("ck-tip"),S.append(e.tip),e.tip.content=w("ck-content ck-content-float-auto"),e.tip.append(e.tip.content),e.tip.triangle=w("ck-triangle ck-triangle-auto"),e.tip.append(e.tip.triangle),j(o,"ckplayer"),e.tip.minHeight=e.tip.getHeight(),j(),e.ad=w("ck-yytf"),S.append(e.ad),e.ad.link=w("ck-yytf-front-link"),e.ad.append(e.ad.link),e.ad.link.click(wi),e.ad.picture=w("ck-yytf-front-picture"),e.ad.append(e.ad.picture),e.ad.top=w("ck-yytf-top"),e.ad.append(e.ad.top),e.ad.top.countDown=w("ck-yytf-countdown"),e.ad.top.append(e.ad.top.countDown),e.ad.top.closeTime=w("ck-yytf-closetime"),e.ad.top.append(e.ad.top.closeTime),e.ad.top.closeAd=w("ck-yytf-closead",language.closeAd),e.ad.top.append(e.ad.top.closeAd),e.ad.top.closeAd.click(Ei),e.ad.bottom=w("ck-yytf-bottom"),e.ad.append(e.ad.bottom),e.ad.bottom.fullAndExit=w("ck-yytf-fullandexit"),e.ad.bottom.append(e.ad.bottom.fullAndExit),e.ad.bottom.fullAndExit.full=V("ck-yytf-btn ck-yytf-fullandexit-full"),e.ad.bottom.fullAndExit.full.click(f.full),e.ad.bottom.fullAndExit.append(e.ad.bottom.fullAndExit.full),e.ad.bottom.fullAndExit.exitFull=V("ck-yytf-btn ck-yytf-fullandexit-exitfull"),e.ad.bottom.fullAndExit.append(e.ad.bottom.fullAndExit.exitFull),e.ad.bottom.fullAndExit.exitFull.click(f.exitFull),e.ad.bottom.mutedAndExit=w("ck-yytf-mutedandexit"),e.ad.bottom.append(e.ad.bottom.mutedAndExit),e.ad.bottom.mutedAndExit.muted=V("ck-yytf-btn ck-yytf-mutedandexit-muted"),e.ad.bottom.mutedAndExit.append(e.ad.bottom.mutedAndExit.muted),e.ad.bottom.mutedAndExit.muted.click(f.muted),e.ad.bottom.mutedAndExit.exitMuted=V("ck-yytf-btn ck-yytf-mutedandexit-exitmuted"),e.ad.bottom.mutedAndExit.append(e.ad.bottom.mutedAndExit.exitMuted),e.ad.bottom.mutedAndExit.exitMuted.click(f.exitMuted),e.ad.bottom.details=w("ck-yytf-details",language.details),e.ad.bottom.append(e.ad.bottom.details),e.ad.hide(),e.adPause=w("ck-pause-yytf"),S.append(e.adPause),e.about=w("ck-about"),S.append(e.about),e.about.bar=w("ck-about-bar"),e.about.append(e.about.bar),e.about.bar.copy=V("ck-bar-btn ck-btn-about-copy"),e.about.bar.append(e.about.bar.copy),e.about.bar.copy.click(Ui),e.about.bar.copy.mouseover(function(){j(this,language.copy,null,"left")}),e.about.bar.close=V("ck-bar-btn ck-btn-about-close"),e.about.bar.close.click(Bi),e.about.bar.close.mouseover(function(){j(this,language.close,null,"left")}),e.about.bar.append(e.about.bar.close),e.tempTime=w("ck-tempTime"),S.append(e.tempTime),e.bar.playAndPause.refresh.hide(),a.controls?(f.bar(!1),f.rightBar(!1),e.loading.hide(),e.centerPlay.hide()):(Rt(),Ai(),Ti()),ct=="iphone"&&e.loading.hide(),ti(),C.mouseout(function(){F||Ne()}).mouseover(function(){e.bar.hasClass("ck-bar-out")||(e.bar.removeClass("ck-bar-out"),S.removeClass("ck-nocursor")),e.rightBar.css("display")=="block"&&e.rightBar.removeClass("ck-right-bar-hide"),e.topBar.css("display")=="block"&&e.topBar.removeClass("ck-top-bar-hide")}).mousemove(function(){e.bar.hasClass("ck-bar-out")&&(e.bar.removeClass("ck-bar-out"),B("mouseActive",!0),S.removeClass("ck-nocursor"),Ne()),e.rightBar.css("display")=="block"&&e.rightBar.removeClass("ck-right-bar-hide"),e.topBar.css("display")=="block"&&e.topBar.removeClass("ck-top-bar-hide")})},vi=function(){o.addListener("stalled",J.stalled),o.addListener("suspend",J.suspend),o.addListener("loadeddata",J.loadedData),o.addListener("loadstart",J.loadStart),o.addListener("loadedmetadata",J.loadedMetaData),o.addListener("canplay",J.canPlay),o.addListener("timeupdate",J.timeUpDate),o.addListener("seeking",J.seeking),o.addListener("seeked",J.seeked),o.addListener("waiting",J.waiting),o.addListener("play",J.play),o.addListener("pause",J.pause),o.addListener("volumechange",J.volumeChange),o.addListener("ended",J.ended),o.addListener("error",J.error),isUndefined(o.emptied)||o.addListener("emptied",J.emptied),ne.singleClick(function(){ht?ht=!1:f.playOrPause()}),S.doubleClick(f.fullOrExit),D(document).addListener("keydown",J.keydown),addListener(window,"resize",J.resize),isUndefined(a.smallWindows)||valType(a.smallWindows)=="boolean"&&a.smallWindows&&addListener(window,"scroll",Ri),p.mouseWheel(J.mouseWheel)},B=function(t,i){try{Fe!=null?(isUndefined(i)&&(i=null),W.dispatchEvent(t,i)):(Fe=function(){this.listeners={}},Fe.prototype.listeners=null,Fe.prototype.addEventListener=function(n,r){n in this.listeners||(this.listeners[n]=[]),this.listeners[n].push(r),He=this.listeners},Fe.prototype.removeEventListener=function(n,r){if(n in this.listeners){for(var s=this.listeners[n],d=0,A=s.length;d<A;d++)if(s[d]===r)return s.splice(d,1),this.removeEventListener(n,r);He=s}},Fe.prototype.dispatchEvent=function(n,r){if(n in this.listeners)for(var s=this.listeners[n],d=0,A=s.length;d<A;d++)s[d].call(this,r)},W=new Fe)}catch(n){console.error(n)}},bi=function(t){var i=[],n=cookie(Be),r=0,s=0,d=Math.floor(Date.now()*.001);if(t=Math.floor(t*100),t=t*.01,Se||(Se=365*24),!n)i.push([ue,t,d+Se*3600]);else{i=stringToArray(n);var A=!1,u=[[ue,t,d+Se*3600]];for(r=0;r<i.length;r++)i[r][2]>d&&i[r][0]!=ue&&s<19&&(u.push(i[r]),s++);i=u}i.length>0&&(cookie(Be,"delete",a.domain,a.cookiePath),cookie(Be,arrayToString(i),a.domain,a.cookiePath)),li=i},gt=function(){if(!isUndefined(o.textTracks)){var t=0;if(!isUndefined(a.track)&&valType(a.track)=="array"&&!o.find("track")){var i="",n=a.track;for(e.bar.track.show(),t=0;t<n.length;t++){var r="";!r&&!isUndefined(n[t].default)&&n[t].default&&(r=" default"),i+='<track src="'+n[t].src+'" srclang="'+n[t].srclang+'" kind="'+n[t].kind+'" label="'+n[t].label+'"'+r+">"}if(o){var s=o.htm()+i;o.htm(s)}o.find("track")&&!ft&&(ft=!0,Mi())}}},et=function(t){if(!o||isUndefined(o.buffered))return!1;try{for(var i=o.buffered,n=0;n<i.length;n++)if(t>=i.start(n)-.35&&t<=i.end(n)+.15)return!0}catch(r){}return!1},je=function(){ae&&(clearTimeout(ae),ae=null),st=0},Ee=function(t){if(!(!L||!o||Te)&&!(!isUndefined(a.live)&&(valType(a.live)=="boolean"&&a.live||valType(a.live)=="number"))){var i=L,n=T||o.duration||0;if(n&&isFinite(n)&&n>0&&i>=n&&(i=Math.max(0,n-.3)),i<=0){L=0,je();return}if(i>0&&($=Math.max($,i),te<0&&(te=i)),St(i,!!t)){je(),L=0;return}var r=!isUndefined(o.readyState)&&o.readyState>=2,s=et(i);if(!t&&!s&&(!r||o.readyState<3)&&(st++,st<=50)){ae&&clearTimeout(ae),ae=setTimeout(function(){Ee(!1)},200);return}je(),Te=!0,L=0;try{o.currentTime=i}catch(d){L=i,Te=!1}setTimeout(function(){Te=!1},800)}},mi=function(){if(Xe>=2)return!1;Xe++;var t=ve>0?ve:a.seek?parseFloat(a.seek):0;(isNaN(t)||t<0)&&(t=0);try{if(_&&typeof _.recoverMediaError=="function")return _.recoverMediaError(),t>0&&(L=t,Te=!1,setTimeout(function(){Ee(!0)},300)),!0}catch(n){}try{var i=Math.max(0,t-1.5);return L=t,Te=!1,o&&(o.currentTime=i),setTimeout(function(){if(Ee(!0),o&&o.paused&&a.autoplay)try{o.play()}catch(n){}},400),!0}catch(n){}return!1},Wt=function(){B("loadedMetaData",{width:C.getWidth(),height:C.getHeight(),videoWidth:p.videoWidth,videoHeight:p.videoHeight,duration:T,volume:p.volume}),B("duration",T),"error"in e&&e.error.hide(),xe("videoWidth",p.videoWidth),xe("videoHeight",p.videoHeight),xe("volume",parseInt(p.volume*100)),xe("duration",parseInt(T)),documentHidden(function(t){a.documentFocusPause&&(t=="show"?!Bt&&F&&f.play():(Bt=F,f.pause()))})},J={loadStart:function(){!a.controls&&ct!="iphone"&&e.loading.show(),e.centerPlay.hide(),B("loadstart")},canPlay:function(){e.loading.hide(),B("canplay"),Ee()},loadedData:function(){B("loadeddata")},loadedMetaData:function(){T=this.duration,!isUndefined(this.duration)&&a.duration&&(T=a.duration),a.live||(e.time.htm(formatSeconds(this.currentTime)+"/"+formatSeconds(T)),e.tempTime.htm(formatSeconds(this.currentTime)+"/"+formatSeconds(T))),e.loading.hide(),a.poster&&o.attr("poster",a.poster),!a.autoplay&&!a.controls&&(e.centerPlay.show(),e.buffer.hide()),p.duration=T,p.videoWidth=this.videoWidth,p.videoHeight=this.videoHeight,p.volume=this.volume,(p.videoWidth||p.videoHeight||T)&&Wt(),Ee();var t=0;isUndefined(this.buffered)||(t=this.buffered.length),t>0&&ii(),a.live?$t():$t(a.preview),!isUndefined(a.prompt)&&valType(a.prompt)=="array"&&!a.live?zi():Xt(),Me&&(qt(),Me=!1),ke=!1,Ce++,!isUndefined(v)&&!isUndefined(v.frontPlay)&&v.frontPlay&&Ce>1&&(f.play(),tt(T)),!isUndefined(v)&&!isUndefined(v.frontPlay)&&!v.frontPlay&&(f.volume(a.volume),f.play()),!a.autoplay&&Tt&&(Tt=!1,f.pause(),setTimeout(f.pause,300))},timeUpDate:function(){M||(M=!0,e.buffer.hide(),B("buffer","end"));var t=this.buffered.length;t>0&&ii(),!T&&this.duration&&(T=this.duration,p.duration=T,p.videoWidth=this.videoWidth,p.videoHeight=this.videoHeight,(p.videoWidth||p.videoHeight||T)&&Wt(),Ee()),oe=ve,ve=this.currentTime,$<oe&&($=oe),Qt(ve),B("time",ve),a.live||(e.time.htm(formatSeconds(ve)+"/"+formatSeconds(T)),e.tempTime.htm(formatSeconds(ve)+"/"+formatSeconds(T))),!isUndefined(v)&&!isUndefined(v.frontPlay)&&v.frontPlay&&Ce>1&&tt(T-ve),!isUndefined(e.error)&&e.error.css("display")=="block"&&e.error.hide(),ue&&bi(ve),xe("audioDecodedByteCount",this.webkitAudioDecodedByteCount||this.audioDecodedByteCount||0),xe("videoDecodedByteCount",this.webkitVideoDecodedByteCount||this.videoDecodedByteCount||0)},ended:function(){!isUndefined(v)&&!isUndefined(v.frontPlay)&&v.frontPlay?kt():(e.bar.playAndPause.pause.hide(),e.bar.playAndPause.play.hide(),e.bar.playAndPause.refresh.show(),B("ended"),Hi(),H())},error:function(t){if(!isUndefined(t.type)){var i=this.error,n=function(){var r=12,s=language.error.loadingFailed;if(isUndefined(i))p.error={code:r,message:s},t.target.attr("src")&&se();else{if(isUndefined(i.code)||(r=i.code),isUndefined(i.message)||(s=i.message),r===3&&mi()){p.error={code:r,message:s},B("error",p.error);return}p.error={code:r,message:s},se()}B("error",p.error)};if(t.type=="error")try{o.currentSrc?ajax({url:o.currentSrc,error:function(r){r&&valType(r)=="object"&&"code"in r&&r.code?(p.error=r,B("error",p.error),se()):n()},success:function(r){r||n()}}):n()}catch(r){n()}}},stalled:function(){B("stalled"),p.error={code:13,message:"load:stalled"},B("error",p.error)},suspend:function(){B("suspend")},emptied:function(){B("emptied"),p.error={code:7,message:language.error.emptied},B("error",p.error)},seeked:function(){Te=!1,Xe=0,F&&f.play(),ke=!1,B("seek",{time:this.currentTime,state:"seeked"}),B("seeked")},seeking:function(){F&&f.play();var t=this.currentTime;switch(te==-1&&(te=t),a.timeScheduleAdjust){case 0:if(oe!=t){ye=!1,f.seek(oe),H(language.timeScheduleAdjust.prohibit);return}break;case 2:if(t<oe){ye=!1,f.seek(oe),H(language.timeScheduleAdjust.prohibitBackOff);return}break;case 3:if(t>oe){ye=!1,f.seek(oe),H(language.timeScheduleAdjust.prohibitForward);return}break;case 4:if(t<te){ye=!1,f.seek(te),H(language.timeScheduleAdjust.prohibitLookBack);return}break;case 5:if(t>$){ye=!1,f.seek($),H(language.timeScheduleAdjust.prohibitForwardNotViewed);return}break}B("seek",{time:t,state:"seeking"}),B("seeking"),a.live||(e.time.htm(formatSeconds(t)+"/"+formatSeconds(T)),e.tempTime.htm(formatSeconds(t)+"/"+formatSeconds(T)))},waiting:function(){M=!1,B("buffer","start"),e.centerPlay.hide(),a.controls||e.buffer.show(),ye?H(language.waiting):ye=!0},play:function(){if(F=!1,e.bar.playAndPause.play.hide(),e.bar.playAndPause.pause.show(),e.bar.playAndPause.refresh.hide(),e.centerPlay.hide(),dt=="button"?e.bar.pbox.removeClass("ck-bar-progress-out"):e.bar.pbox.addClass("ck-bar-progress-out"),le&&(le=!1,f.exitMuted()),Ne(),it(),dt="",isUndefined(e.ended)||f.closeLayer(e.ended),"error"in e&&e.error.hide(),B("play"),!isUndefined(v)&&!isUndefined(v.front)&&isUndefined(v.frontPlay)){v.frontPlayI=0,v.frontPlay=!0,f.pause(),zt();return}L&&(isUndefined(a.live)||!isUndefined(a.live)&&valType(a.live)=="boolean"&&!a.live)&&Ee()},pause:function(){F=!0,(isUndefined(v)||isUndefined(v.frontPlay)||!isUndefined(v.frontPlay)&&!v.frontPlay)&&!isUndefined(v)&&!isUndefined(v.pause)?(isUndefined(v.pausePlayI)&&(v.pausePlayI=0),Ht()):a.controls||(e.centerPlay.show(),e.buffer.hide()),e.bar.playAndPause.pause.hide(),e.bar.playAndPause.play.show(),e.bar.playAndPause.refresh.hide(),e.bar.pbox.removeClass("ck-bar-progress-out"),ei(),B("pause"),e.bar.removeClass("ck-bar-out"),S.removeClass("ck-nocursor")},volumeChange:function(){if(this.volume==0&&!G&&(this.muted=!0),this.volume>0&&G&&(this.muted=!1),G!=this.muted&&(G=this.muted,qi(this.muted),p.muted=this.muted,B("muted",p.muted)),p.volume=this.volume,B("volume",this.volume),!isUndefined(e.bar.vbox)){var t=parseInt(this.volume*100);e.bar.vbox.volume.txt.htm(t),e.bar.vbox.mouseDown||wt(this.muted?0:this.volume),this.muted||H(language.volume+t+"%")}xe("volume",parseInt(this.volume*100))},resize:function(){var t=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement;t?(e.bar.fullAndExit.exitFull.show(),e.bar.fullAndExit.full.hide(),e.ad.bottom.fullAndExit.exitFull.show(),e.ad.bottom.fullAndExit.full.hide(),S.hasClass("ck-main-full")||S.addClass("ck-main-full"),H(language.full),e.bar.webFullAndExit.hide(),e.bar.theatreAndExit.hide(),isUndefined(e.menu)||S.append(e.menu)):(t=!1,e.bar.fullAndExit.full.show(),e.bar.fullAndExit.exitFull.hide(),e.ad.bottom.fullAndExit.full.show(),e.ad.bottom.fullAndExit.exitFull.hide(),S.hasClass("ck-main-full")&&S.removeClass("ck-main-full"),!isUndefined(a.webFull)&&a.webFull&&e.bar.webFullAndExit.show(),!isUndefined(a.theatre)&&!p.webFull&&e.bar.theatreAndExit.show(),isUndefined(e.menu)||D("body").append(e.menu),ne.css("width")!=S.css("width")&&f.zoom(100)),p.full!=t&&(p.full=t,B("full",t)),ce(),Qt(f.time())},keydown:function(t){t=window.event||t;var i=t.keyCode||t.which,n=f.volume(),r=function(){t.preventDefault?t.preventDefault():t.returnValue=!1};switch(i){case 32:r(),f.playOrPause();break;case 37:f.fastBack();break;case 39:f.fastNext();break;case 38:valType(a.keyVolume)=="number"&&(a.keyVolume==1||a.keyVolume==2&&p.full)&&(r(),f.volume(n+.1<1?n+=.1:1));break;case 40:valType(a.keyVolume)=="number"&&(a.keyVolume==1||a.keyVolume==2&&p.full)&&(r(),f.volume(n-.1>0?n-=.1:0));break;default:break}},mouseWheel:function(t){if(valType(a.mouseWheelVolume)=="number"&&(a.mouseWheelVolume==1||a.mouseWheelVolume==2&&p.full)){t=window.event||t;var i=f.volume();t.preventDefault?t.preventDefault():t.returnValue=!1,t.wheelDelta?(t.wheelDelta>0&&f.volume(i+.1<1?i+=.1:1),t.wheelDelta<0&&f.volume(i-.1>0?i-=.1:0)):t.detail&&(t.detail>0&&f.volume(i-.1>0?i-=.1:0),t.detail<0&&f.volume(i+.1<1?i+=.1:1))}}},zt=function(){if(v.frontPlayI==0&&(Kt(!1),e.ad.show(),v.front.video=!1,isUndefined(v.front.closeTime)||(v.front.closeTime>0?(e.ad.top.closeTime.show(),Ot()):e.ad.top.closeAd.show())),!isUndefined(v.front.node)&&v.front.node!=null&&(S.append(v.front.node),f.closeLayer(v.front.node),v.front.node=null),e.ad.picture.htm(""),e.ad.picture.hide(),e.ad.link.hide(),!isUndefined(v.front.list[v.frontPlayI])){var t=v.front.list[v.frontPlayI];Ze=!0,B("frontAd",t),t.type=="picture"?yi(t):t.type=="node"?ki(t):(e.ad.link.attr("data-link",t.link),gi(t.file)),isUndefined(t.link)?e.ad.bottom.details.hide():(e.ad.bottom.details.show(),e.ad.bottom.details.htm('<a href="'+t.link+'" target="blank">'+language.details+"</a>"))}},Ot=function(){isUndefined(v.front.closeSetTime)||(clearTimeout(v.front.closeSetTime),v.front.closeSetTime=null),e.ad.top.closeTime.htmReplace("{seconds}",v.front.closeTime,language.closeTime),v.front.closeTime--,v.front.closeTime>0?v.front.closeSetTime=setTimeout(Ot,1e3):(e.ad.top.closeAd.show(),e.ad.top.closeTime.hide())},tt=function(t){isUndefined(t)||(v.front.list[v.frontPlayI].time=t),v.front.countDown=0;for(var i=v.frontPlayI;i<v.front.list.length;i++)v.front.countDown+=parseInt(v.front.list[i].time);e.ad.top.countDown.htm(v.front.countDown+language.second)},It=function(){$e&&(clearTimeout($e),$e=null)},yt=function(){It();var t=v.front.list[v.frontPlayI];t.time>0?(t.time--,v.front.countDown--,e.ad.top.countDown.htm(v.front.countDown+language.second),$e=setTimeout(yt,1e3)):kt()},kt=function(){v.frontPlayI<v.front.list.length-1?(v.frontPlayI++,zt()):(!isUndefined(v.front.node)&&v.front.node!=null&&(S.append(v.front.node),f.closeLayer(v.front.node),v.front.node=null),e.ad.picture.htm(""),e.ad.picture.hide(),v.frontPlay=!1,e.ad.hide(),Gt(),L=0,Lt(bt()),v.front.video?Pe(a.video):f.play(),B("frontAdEnded",!0),Ze=!1)},gi=function(t){if(!isUndefined(t)){if(e.ad.picture.hide(),L=0,(o.attr("src")||o.htm())&&f.pause(),o.attr("src")&&(o.attr("src",""),o.removeAttr("src")),o.htm(""),a.plug&&!Qe(t))switch(a.plug){case"hls.js":Pt(t);break;case"flv.js":Dt(t);break;case"mpegts.js":Mt(t);break;default:p.error={code:10,message:language.error.emptied},B("error",p.error),se();break}else o.attr("src",t);v.front.video=!0,e.ad.link.show(),e.ad.bottom.mutedAndExit.show()}},yi=function(t){if(!isUndefined(t.file)){var i=null,n=0,r=function(){e.ad.picture.show(),e.ad.picture.htm(""),i=qe(t.file),e.ad.picture.append(i),i.addListener("load",function(){var s=this.getWidth(),d=this.getHeight();if(s>0||d>0){if(t.link){var A=rt("",t.link);A.append(this),e.ad.picture.append(A)}else e.ad.picture.append(this);i.unbind(),i.click(function(){B("frontAdClick",t)})}else n<10&&(n++,r())})};r(),tt(),yt(),e.ad.bottom.mutedAndExit.hide()}},ki=function(t){isUndefined(t.content)||(v.front.node=f.layer(t),v.front.node.css({"z-index":1}),e.ad.append(v.front.node),v.front.node.unbind(),v.front.node.click(function(){B("frontAdClick",t)}),tt(),yt(),e.ad.bottom.mutedAndExit.hide())},wi=function(){var t=e.ad.link.attr("data-link");window.open(t,"_blank")},Ei=function(){if(!isUndefined(v)&&!isUndefined(v.front)&&!isUndefined(v.front.closeButtonClick)){if(valType(v.front.closeButtonClick)=="function")try{v.front.closeButtonClick()}catch(t){console.error(t)}else if(valType(v.front.closeButtonClick)=="string")try{Re(v.front.closeButtonClick)}catch(t){console.error(t)}}else f.closeFrontAd()},Ht=function(){if(it(),!isUndefined(v)&&!isUndefined(v.pause)&&!isUndefined(v.pause.list)&&v.pause.list.length-1>=v.pausePlayI){var t=v.pause.list[v.pausePlayI];if(!isUndefined(v.pause.close)&&v.pause.close&&(v.pauseClose=V("ck-pause-close"),v.pauseClose.click(function(){e.centerPlay.show(),e.buffer.hide(),it()})),isUndefined(t.file))isUndefined(t.content)||(v.pause.node=f.layer(t),v.pauseClose&&v.pause.node.append(v.pauseClose),v.pause.node.click(function(){B("pauseAdClick",t)}));else{var i=null,n=0,r=function(){i=qe(t.file),e.adPause.show(),e.adPause.htm(""),e.adPause.append(i),i.addListener("load",function(){var s=this.getWidth(),d=this.getHeight();if(s>0||d>0){if(e.adPause.htm(""),t.link){var A=rt("",t.link);A.append(this),e.adPause.append(A)}else e.adPause.append(this);e.adPause.css({width:s+"px",height:d+"px"}),v.pauseClose&&e.adPause.append(v.pauseClose),i.click(function(){B("pauseAdClick",t)})}else n<10&&(n++,r())})};r()}B("pauseAd",t),!isUndefined(t.time)&&t.time>0&&(Je=setTimeout(function(){v.pausePlayI++,v.pausePlayI>v.pause.list.length-1&&(v.pausePlayI=0),Ht()},t.time*1e3))}},it=function(){Je&&(clearTimeout(Je),Je=null),e.adPause.hide(),!isUndefined(v)&&!isUndefined(v.pauseClose)&&v.pauseClose!=null&&(v.pauseClose.remove(),v.pauseClose=null),!isUndefined(v)&&!isUndefined(v.pause)&&!isUndefined(v.pause.node)&&v.pause.node&&(v.pause.node.unbind(),f.closeLayer(v.pause.node),B("pauseAdClose"))},f={width:function(t){return isUndefined(t)||(valType(t)=="number"&&(t+="px"),p.css({width:t}),ce()),C.getWidth()},height:function(t){return isUndefined(t)||(valType(t)=="number"&&(t+="px"),p.css({height:t}),ce()),C.getHeight()},videoWidth:function(){return o?o.videoWidth:null},videoHeight:function(){return o?o.videoHeight:null},zoom:function(t){if(!isUndefined(t)&&(valType(t)=="function"&&W.addEventListener("zoom",t),valType(t)=="number")){for(var i=[e.topBar.zoomEle.zoom50,e.topBar.zoomEle.zoom75,e.topBar.zoomEle.zoom100],n=0;n<i.length;n++)i[n].removeClass("ck-top-bar-zoom-container-focus");switch(t){case 50:i[0].addClass("ck-top-bar-zoom-container-focus");break;case 75:i[1].addClass("ck-top-bar-zoom-container-focus");break;case 100:i[2].addClass("ck-top-bar-zoom-container-focus");break}(t==50||t==75||t==100)&&(de=t,ce(),B("zoom",t))}return f},rotate:function(t){if(!isUndefined(t)&&(valType(t)=="function"&&W.addEventListener("rotate",t),valType(t)=="number")){var i=[0,90,180,270],n=0;i.length>t&&t>0?n=i[t]:i.indexOf(t)>-1&&(n=t),n!=we&&(B("rotate",n),we=n,ce())}},vars:function(t,i){if(!isUndefined(t)){if(valType(t)=="string"&&!isUndefined(i)){var n={};n[t]=i,t=n}var r=!1;for(var s in t)if(s in a&&t[s]!=a[s]){r=!0;break}r&&(a=standardization(a,t)),isUndefined(t.video)||(Me=!0,Pe(a.video)),isUndefined(t.title)||e.topBar.titleEle.htm(t.title)}},loadstart:function(t){!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("loadstart",t)},loadeddata:function(t){!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("loadeddata",t)},loadedMetaData:function(t){!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("loadedMetaData",t)},canplay:function(t){!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("canplay",t)},play:function(t){if(valType(t)=="object"&&(t.target==e.bar.playAndPause.play||t.target==e.bar.playAndPause.refresh)&&(dt="button"),!isUndefined(t)&&valType(t)=="function")W.addEventListener("play",t);else if(Ce>0&&o)try{o.play()}catch(i){console.error(i)}return f},pause:function(t){if(!isUndefined(t)&&valType(t)=="function")W.addEventListener("pause",t);else if(Ce>0&&o)try{o.pause()}catch(i){console.error(i)}return f},playOrPause:function(){return F?f.play():f.pause(),f},volume:function(t){if(!isUndefined(t))valType(t)=="function"?W.addEventListener("volume",t):valType(t)=="number"&&o&&(t<0&&(t=0),t>1&&(t=1),o.muted&&(o.volume=t*.5),o.volume=t);else if(o)return o.volume;return f},muted:function(t){return!isUndefined(t)&&valType(t)=="function"?W.addEventListener("muted",t):o&&(o.muted=!0),f},exitMuted:function(){return o&&(o.muted=!1,o.volume==0&&f.volume(a.volume>0?a.volume:.8)),f},time:function(t){if(!isUndefined(t)&&valType(t)=="function")W.addEventListener("time",t);else if(o)return o.currentTime||0},seek:function(t){if(!isUndefined(t))if(valType(t)=="function")W.addEventListener("seek",t);else{var i=null;if(valType(t)=="number"&&!isNaN(t)?i=t:valType(t)=="string"&&t!==""&&t!=="cookie"&&!isNaN(parseFloat(t))&&(i=parseFloat(t)),i!==null&&o){switch(i>0&&(L&&Math.abs(L-i)<.5||a.seek&&parseFloat(a.seek)>0&&Math.abs(parseFloat(a.seek)-i)<.5)&&($=Math.max($,i),te<0&&(te=i)),a.timeScheduleAdjust){case 0:return H(language.timeScheduleAdjust.prohibit),f;case 1:break;case 2:if(i<oe)return H(language.timeScheduleAdjust.prohibitBackOff),f;break;case 3:if(i>oe)return H(language.timeScheduleAdjust.prohibitForward),f;break;case 4:if(i<te){ye=!1;try{o.currentTime=te}catch(r){}return H(language.timeScheduleAdjust.prohibitLookBack),f}break;case 5:if(i>$){ye=!1;try{o.currentTime=$}catch(r){}return H(language.timeScheduleAdjust.prohibitForwardNotViewed),f}break}ke=!1;var n=o.readyState>=2||T&&isFinite(T)&&T>0;if(!n)return L=i,i>0&&($=Math.max($,i),te<0&&(te=i)),f;if(T&&isFinite(T)&&T>0&&i>T&&(i=Math.max(0,T-.3)),i<0&&(i=0),a.timeScheduleAdjust==5&&i>$&&L&&Math.abs(L-i)<.5&&($=Math.max($,i)),i>.5&&!et(i)&&o.readyState<3&&!_)return L=i,Ee(!1),f;if(St(i,!1))return L=0,f;try{o.currentTime=i,L=0,i>$&&a.timeScheduleAdjust!=5&&($=i)}catch(r){L=i}}}return f},buffer:function(t){return!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("buffer",t),f},ended:function(t){return!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("ended",t),f},next:function(t){return!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("next",t),f},error:function(t){return!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("error",t),f},emptied:function(t){return!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("emptied",t),f},duration:function(t){if(!isUndefined(t)&&valType(t)=="function")W.addEventListener("duration",t);else return T||0},playbackRate:function(t){if(!isUndefined(t))valType(t)=="function"?W.addEventListener("playbackRate",t):valType(t)=="number"&&o&&(o.playbackRate=t,p.playbackRate=t,B("playbackRate",t),jt(t));else return o.playbackRate},track:function(t){if(isUndefined(t))return p.track;if(valType(t)=="function")W.addEventListener("track",t);else if(valType(t)=="number"&&o){var i=null;if(isUndefined(o.textTracks)||(i=o.textTracks),i&&valType(i)=="texttracklist"){for(var n=a.track,r=i.length-1;r>-1;r--)o.find("track").eq(r).remove();for(var r=0;r<n.length;r++){var s="";n[r].default=!1,r==t&&(s=" default",n[r].default=!0),i+='<track src="'+n[r].src+'" srclang="'+n[r].srclang+'" kind="'+n[r].kind+'" label="'+n[r].label+'"'+s+">"}if(o){var d=o.htm()+i;o.htm(d)}Vt(t)}}},fastBack:function(t){if(T!=0){(isUndefined(t)||valType(t)!="number")&&(t=20);var i=f.time();return i-t>0?i-=t:i=0,f.seek(i),f}},fastNext:function(t){if(T!=0){(isUndefined(t)||valType(t)!="number")&&(t=20);var i=f.time();return i+t<T?i+=t:i=T,f.seek(i),f}},definition:function(t){return isUndefined(t)||(valType(t)=="function"&&W.addEventListener("definition",t),valType(t)=="number"&&Yt(t)),f},fps:function(t){return!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("fps",t),p.fps},playback:function(t){if(!isUndefined(t))valType(t)=="function"&&W.addEventListener("playback",t);else return si;return f},backLive:function(t){return isUndefined(t)||(valType(t)=="function"&&W.addEventListener("backLive",t),valType(t)=="boolean"&&(bool?e.bar.backLive.show():e.bar.backLive.hide())),f},full:function(t){if(!isUndefined(t)&&valType(t)=="function")W.addEventListener("full",t);else{if(pt)return;p.theatre&&f.exitTheatre(),p.webFull&&f.exitWebFull();var i=C.requestFullScreen||C.webkitRequestFullScreen||C.mozRequestFullScreen||C.oRequestFullscreen||C.msRequestFullscreen;if(!isUndefined(i))i.call(C);else if(isUndefined(window.ActiveXObject)){if(!isUndefined(o.webkitEnterFullscreen)||!isUndefined(o.webkitEnterFullScreen)){var r=o.webkitEnterFullscreen||o.webkitEnterFullScreen;r.call(o)}}else{var n=new ActiveXObject("WScript.Shell");n!==null&&n.SendKeys("{F11}")}f.zoom(100)}return f},exitFull:function(){var t=document.exitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen||document.oCancelFullScreen||document.msExitFullscreen;if(!isUndefined(t))t.call(document);else if(!isUndefined(window.ActiveXObject)){var i=new ActiveXObject("WScript.Shell");i!==null&&i.SendKeys("{F11}")}return f},fullOrExit:function(){var t=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen||document.msFullscreenElement;return t?f.exitFull():f.full(),f},webFull:function(t){return!isUndefined(t)&&valType(t)=="function"?W.addEventListener("webfull",t):(nt(),isUndefined(a.theatre)||e.bar.theatreAndExit.hide(),C.css({position:"fixed",top:0,left:0,height:"100%","z-index":getMaxZIndex()+1}),e.bar.webFullAndExit.webFull.hide(),e.bar.webFullAndExit.exitWebFull.show(),p.webFull=!0,B("webfull",!0),ce()),f},exitWebFull:function(){return C.css({position:"relative"}),e.bar.webFullAndExit.webFull.show(),e.bar.webFullAndExit.exitWebFull.hide(),isUndefined(a.theatre)||(e.bar.theatreAndExit.show(),e.bar.theatreAndExit.theatre.show(),e.bar.theatreAndExit.exitTheatre.hide()),C.attr("style",""),p.webFull=!1,B("webfull",!1),ce(),f},theatre:function(t){if(!isUndefined(t)&&valType(t)=="function")W.addEventListener("theatre",t);else{if(valType(a.theatre)=="array"&&a.theatre.length==2){var i=a.theatre[0];valType(i)=="function"&&i(),valType(i)=="string"&&Re(i)}else nt(),C.css({position:"absolute",top:p.offset().top,left:0,height:p.getHeight()+"px","z-index":getMaxZIndex()+1}),e.bar.theatreAndExit.theatre.hide(),e.bar.theatreAndExit.exitTheatre.show();p.theatre=!0,B("theatre",!0),ce()}return f},exitTheatre:function(){if(valType(a.theatre)=="array"&&a.theatre.length==2){var t=a.theatre[1];valType(t)=="function"&&t(),valType(t)=="string"&&Re(t)}else C.css({position:"relative"}),e.bar.theatreAndExit.theatre.show(),e.bar.theatreAndExit.exitTheatre.hide(),C.attr("style",""),p.theatre=!1;return B("theatre",!1),ce(),f},smallWindows:function(t){return isUndefined(t)||(valType(t)=="function"&&W.addEventListener("smallWindows",t),valType(t)=="boolean"&&(t?(e.rightBar.smallwindows.open.show(),e.rightBar.smallwindows.close.hide(),p.smallWindows=!0):(e.rightBar.smallwindows.open.hide(),e.rightBar.smallwindows.close.show(),p.smallWindows=!1),B("smallWindows",p.smallWindows),ce())),p.smallWindows},loop:function(t){return isUndefined(t)||(valType(t)=="function"&&W.addEventListener("loop",t),valType(t)=="boolean"&&o&&(t?(e.rightBar.loop.open.show(),e.rightBar.loop.close.hide(),p.loop=!0,o.attr("loop","loop"),B("loop",!0)):(e.rightBar.loop.open.hide(),e.rightBar.loop.close.show(),p.loop=!1,o.attr("loop",!1),o.removeAttr("loop"),B("loop",!1)))),p.loop},screenshot:function(t){if(!isUndefined(t)&&valType(t)=="function")W.addEventListener("screenshot",t);else if(!isUndefined(a.screenshot)&&a.screenshot&&o)try{H(language.screenshotStart,!0);var i=D(document.createElement("canvas"));i.width=o.videoWidth,i.height=o.videoHeight,i.getContext("2d").drawImage(o,0,0,o.videoWidth,o.videoHeight);var n=i.toDataURL("image/png");B("screenshot",n),Le&&(Le.remove(),Le=null),Le=qe(n),Le.addListener("load",function(){e.screenshot.img.append(Le),e.screenshot.show().css({width:this.getWidth()+"px"})});var r=dataURLtoBlob(n),s=URL.createObjectURL(r),d="video";return a.title&&(d=a.title),e.screenshot.bar.down.attr("href",s).attr("download",d),n}catch(A){H(language.error.screenshot,!0)}else H(language.screenshotClose,!0);return f},closeScreenshot:function(t){return!isUndefined(t)&&valType(t)=="boolean"&&!t?e.screenshot.show():e.screenshot.hide(),f},layer:function(t,i){if(isUndefined(t))return null;var n=!1;isUndefined(i)||(n=i);var r=null;if(valType(t)=="object"&&("class"in t&&"content"in t?(r=w(t.class),r.htm(t.content)):"content"in t&&(t=t.content)),valType(t)=="string"&&(t.substr(0,1)=="."||t.substr(0,1)=="#"?r=Xi(t):(r=w("ck-layer"),r.htm(t))),r){var s=r.css("z-index");s=="auto"&&(s=101),s<101&&(s=101),s>200&&(s=200),isUndefined(r.cssDisplay)&&(r.cssPosition=r.css("position"),r.cssDisplay=r.css("display")),r.css({position:"absolute","z-index":s}),n?e.bar.append(r):S.append(r),r.CK=C,r.show()}return r},closeLayer:function(t){if(valType(t)=="string"){var i=D(t);isUndefined(i)||i.length>0&&(t=i.eq(0))}if(!isUndefined(t)&&valType(t)=="htmlobject"){if(isUndefined(t.captureParentNode))t.remove();else{var n=t.captureParentNode;if(t.nextElement)try{n.insertBefore(t,t.nextElement)}catch(r){n.append(t)}else if(t.prevElement)try{n.insertAfter(t,t.prevElement)}catch(r){n.append(t)}else n.append(t);t.css({display:t.cssDisplay})}isUndefined(t.cssDisplay)||t.css({display:t.cssDisplay,position:t.cssPosition})}return f},message:function(t){return H(t),f},closeFrontAd:function(){return Ze&&!isUndefined(v)&&!isUndefined(v.front)&&!isUndefined(v.front.list)&&(v.frontPlayI=v.front.list.length-1,kt(),It()),f},addListener:function(t,i){W.addEventListener(t,i)},removeListener:function(t,i){W.removeEventListener(t,i)},bar:function(t){xt=t,t?e.bar.show():e.bar.hide()},rightBar:function(t){At=t,t?e.rightBar.show():e.rightBar.hide()},mouseActive:function(t){return!isUndefined(t)&&valType(t)=="function"&&W.addEventListener("mouseActive",t),this},cookie:function(t){if(t=="delete")return cookie(Be,"delete",a.domain),null;!isUndefined(t)&&t&&(t=t.replace(/[ ]*,[ ]*|[ ]+/g,"").replace(/[ ]*;[ ]*|[ ]+/g,""));var i=cookie(Be);if(i){var n=stringToArray(i),r=[],s=parseInt(Date.now()*.001);for(d=0;d<n.length;d++)parseInt(n[d][2])>s&&r.push(n[d]);if(n=r,n.length>0){cookie(Be,"delete",a.domain,a.cookiePath),cookie(Be,arrayToString(n),a.domain,a.cookiePath);for(var d=0;d<n.length;d++)if(n[d]={name:n[d][0],time:n[d][1],expirationTime:date("Y-m-d H:i:s",n[d][2]),expirationTimeStamp:n[d][2]},!isUndefined(t)&&t==n[d].name)return n[d];return n}else cookie(Be,"delete",a.domain,a.cookiePath)}return null},visibilityState:function(t){return!isUndefined(t)&&valType(t)=="function"&&(isUndefined(document.visibilityState)||t(document.visibilityState==="visible"?"show":"hidden"),W.addEventListener("visibilityState",t)),this},remove:function(){var t={};if(He!=null){for(var i in He)t[i]=He[i];for(var i in t){var n=t[i];if(n)for(var r=0;r<n.length;r++){var s=n[r];W.removeEventListener(i,s)}}}return Ze&&this.closeFrontAd(),O&&(O.pause(),O.unload(),O.detachMediaElement(),O.destroy(),O=null),_&&(_.stopLoad(),_.detachMedia()),Ce=0,ft=!1,Me=!0,o&&(o.unbind(),o.remove(),o=null),isUndefined(e.menu)||e.menu.remove(),p&&(p.unbind(),p.htm("")),null}},xi=function(){a.autoplay?(e.bar.playAndPause.play.hide(),e.bar.playAndPause.pause.show()):(e.bar.playAndPause.play.show(),e.bar.playAndPause.pause.hide()),G?e.bar.vbox.muted.hide():e.bar.vbox.exitMuted.hide(),isUndefined(a.next)?e.bar.nextEpisode.hide():e.bar.nextEpisode.show(),!isUndefined(a.webFull)&&a.webFull&&!p.full?e.bar.webFullAndExit.show():e.bar.webFullAndExit.hide(),!isUndefined(a.theatre)&&!p.full&&!p.webFull?e.bar.theatreAndExit.show():e.bar.theatreAndExit.hide(),!isUndefined(a.rightBar)&&a.rightBar?e.rightBar.show():e.rightBar.hide(),(!a.live||valType(a.live)=="number")&&(ke=!1,Ni()),(a.live||valType(a.live)=="number")&&(e.time.htm(language.live),e.tempTime.htm(language.live)),valType(a.smallWindows)=="boolean"&&!a.smallWindows&&(p.smallWindows=!1,e.rightBar.smallwindows.open.hide(),e.rightBar.smallwindows.close.show()),p.loop?(e.rightBar.loop.open.show(),e.rightBar.loop.close.hide()):(e.rightBar.loop.open.hide(),e.rightBar.loop.close.show()),!isUndefined(a.backLive)&&a.backLive&&e.bar.backLive.show(),a.volume==0&&f.muted()},Rt=function(){!isUndefined(a.logo)&&isUndefined(e.logo)&&(e.logo=w("ck-logo"),qe(a.logo).addListener("load",function(){S.append(e.logo),e.logo.append(this)}).addListener("error",function(){e.logo.remove()}))},Ai=function(){if(!isUndefined(a.information)&&!isUndefined(e.about)&&valType(a.information)=="object"){var t=a.information,i="",n=D(document.createElement("ul")),r="";for(i in t){var s=w("div").attr("class","ck-about-title"),d=w("div").attr("class","ck-about-content"),A=D(document.createElement("li"));s.htm(i),d.htm(t[i]),A.append(s),A.append(d),n.append(A),r+=i+":"+t[i]+`
2
+ `}e.about.append(n),e.about.textareaText=r,e.about.textareaEle=D(document.createElement("textarea")),S.append(e.about.textareaEle),e.about.textareaEle.hide()}},Ti=function(){!isUndefined(a.menu)&&a.menu&&(h=a.menu),e.menu=w("ckplayer-ckplayer-menu");for(var t=0;t<h.length;t++){var i=h[t],n=w("ck-li");if(isUndefined(i.underline)||n.addClass("ck-underline"),!isUndefined(i.link)&&!isUndefined(i.title))n.append(rt(i.title,i.link)),e.menu.append(n);else if(!isUndefined(i.javascript)&&!isUndefined(i.title))n.append(ni(i.title,i.javascript)),e.menu.append(n);else if(!isUndefined(i.click)&&!isUndefined(i.title)){var r=ni(i.title);r.attr("data-click",i.click.toString()),r.click(function(){Re(D(this).attr("data-click")),e.menu.hide()}),n.append(r),e.menu.append(n)}else isUndefined(i.title)||(n.htm(i.title),e.menu.append(n))}D("body").append(e.menu),S.oncontextmenu=function(u){var g=u||window.event,x=be(g);if(g.button==2){g.returnvalue=!1;var U=x.x-2,E=x.y-2;return e.menu.show(),e.menu.css({left:U+"px",top:E+"px"}),!1}return!0};var s=null,d=function(){s&&(clearTimeout(s),s=null)},A=function(){d(),s=setTimeout(function(){e.menu.hide()},200)};e.menu.mouseout(A),e.menu.mouseover(d)},Zi=function(){e.about.show(),e.menu.hide()},Bi=function(){e.about.hide()},Ui=function(){e.about.textareaEle.show(),e.about.textareaEle.select(),document.execCommand("Copy"),e.about.textareaEle.hide(),H(language.copySucceeded,!0)},fe=function(){var t=e.bar.getHeight();return parseFloat(e.bar.pbox.css("top"))<0&&(t-=parseInt(e.bar.pbox.css("top"))),t},Ne=function(){pe&&(clearTimeout(pe),pe=null),pe=setTimeout(function(){F||(e.bar.addClass("ck-bar-out"),B("mouseActive",!1),p.full&&S.addClass("ck-nocursor"),e.rightBar.css("display")=="block"&&e.rightBar.addClass("ck-right-bar-hide"),e.topBar.css("display")=="block"&&e.topBar.addClass("ck-top-bar-hide")),pe=null},a.barHideTime)},Fi=function(){F||(e.bar.pbox.addClass("ck-bar-progress-out"),Ne())},Ci=function(){F||(e.bar.pbox.removeClass("ck-bar-progress-out"),pe&&(clearTimeout(pe),pe=null))},Li=function(){F||Ne()},Si=function(){F||pe&&(clearTimeout(pe),pe=null)},Pi=function(){var t=a.playbackrateList,i=a.playbackrate;e.bar.playbackrate.bg=w("ck-list-bg"),e.bar.playbackrate.bgbox.append(e.bar.playbackrate.bg),e.bar.playbackrate.bg.p=[];for(var n=t.length-1;n>-1;n--){var r=V("ck-list-p",t[n]+language.playbackrateSuffix);r.attr("data-i",n).attr("data-val",t[n]),e.bar.playbackrate.bg.p.push(r),e.bar.playbackrate.bg.append(r),r.click(Di)}if(e.bar.playbackrate.hide(),!isUndefined(a.playbackrateOpen)&&a.playbackrateOpen){e.bar.playbackrate.show(),e.bar.playbackrate.bgbox.show();var s=e.bar.playbackrate.bg.getWidth(),d=e.bar.playbackrate.bg.getHeight(),A=e.bar.playbackrate.button.getWidth();e.bar.playbackrate.bg.css({width:s+10+"px"}),s=e.bar.playbackrate.bg.getWidth(),fe()>e.bar.getHeight()&&(d+=fe()-e.bar.getHeight()),e.bar.playbackrate.bgbox.attr("style",""),e.bar.playbackrate.bgbox.css({width:s+"px",height:d+2+"px",left:-(s-A)*.5+"px"}),e.bar.playbackrate.button.mouseover(function(){s=e.bar.playbackrate.bg.getWidth(),A=e.bar.playbackrate.button.getWidth(),e.bar.playbackrate.bgbox.css({left:-(s-A)*.5+"px"})}),jt(i)}},Di=function(t){e.bar.playbackrate.bgbox.hide(),setTimeout(function(){e.bar.playbackrate.bgbox.removeCss("display")},300),H(language.switchTo+D(this).htm()),f.playbackRate(parseFloat(D(this).attr("data-val")))},jt=function(t){e.bar.playbackrate.bg.find("button").each(function(i,n){var r=parseFloat(n.attr("data-val"));n.removeClass("ck-list-p-focus"),t==r?(n.addClass("ck-list-p-focus"),t!=1?e.bar.playbackrate.button.htm(n.htm()):e.bar.playbackrate.button.htm(language.playbackrate)):n.removeClass("ck-list-p-focus")})},Mi=function(){var t=a.track,i=-1;e.bar.track.bgbox.htm(""),e.bar.track.bg=w("ck-list-bg"),e.bar.track.bgbox.append(e.bar.track.bg),e.bar.track.bg.p=[];for(var n=null,r=t.length-1;r>-1;r--)n=V("ck-list-p",t[r].label),n.attr("data-i",r).attr("data-title",t[r].label),e.bar.track.bg.p.push(n),e.bar.track.bg.append(n),!isUndefined(t[r].default)&&t[r].default&&(i=r),n.click(Nt);n=V("ck-list-p",language.noTrack),n.attr("data-i",-1).attr("data-title",language.noTrack),e.bar.track.bg.p.push(n),e.bar.track.bg.append(n),n.click(Nt),e.bar.track.hide(),e.bar.track.show(),e.bar.track.bgbox.show();var s=e.bar.track.bg.getWidth(),d=e.bar.track.bg.getHeight(),A=e.bar.track.button.getWidth();e.bar.track.bg.css({width:s+10+"px"}),s=e.bar.track.bg.getWidth(),fe()>e.bar.getHeight()&&(d+=fe()-e.bar.getHeight()),e.bar.track.bgbox.attr("style",""),e.bar.track.bgbox.css({width:s+"px",height:d+2+"px",left:-(s-A)*.5+"px"}),e.bar.track.button.mouseover(function(){s=e.bar.track.bg.getWidth(),A=e.bar.track.button.getWidth(),e.bar.track.bgbox.css({left:-(s-A)*.5+"px"})}),Vt(i)},Nt=function(t){e.bar.track.bgbox.hide(),setTimeout(function(){e.bar.track.bgbox.removeCss("display")},300),H(language.switchTo+D(this).attr("data-title")),f.track(parseFloat(D(this).attr("data-i")))},Vt=function(t){e.bar.track.bg.find("button").each(function(i,n){var r=parseInt(n.attr("data-i"));t==r?(e.bar.track.button.htm(n.attr("data-title")),r>-1?(p.track=a.track[r],B("track",a.track[r])):(p.track=null,B("track",null)),n.addClass("ck-list-p-focus")):n.removeClass("ck-list-p-focus")})},qt=function(){var t=-1,i=o.currentSrc;if(isUndefined(e.bar.definition.bg)||(e.bar.definition.bgbox.htm(""),e.bar.definition.bgbox.attr("style",""),e.bar.definition.button.htm(language.definition)),valType(a.video)=="array"){var n=a.video;e.bar.definition.bg=w("ck-list-bg"),e.bar.definition.bgbox.append(e.bar.definition.bg),e.bar.definition.bg.p=[];for(var r=n.length-1;r>-1;r--){var s=V("ck-list-p",n[r][2]);s.attr("data-i",r).attr("data-video",n[r][0]).attr("data-type",n[r][1]).attr("data-title",n[r][2]),e.bar.definition.bg.p.push(s),e.bar.definition.bg.append(s),i&&i.indexOf(n[r][0])>-1&&(t=r),s.click(Wi)}e.bar.definition.show(),e.bar.definition.bgbox.show();var d=e.bar.definition.bg.getWidth(),A=e.bar.definition.bg.getHeight(),u=e.bar.definition.button.getWidth();e.bar.definition.bg.css({width:d+10+"px"}),d=e.bar.definition.bg.getWidth(),fe()>e.bar.getHeight()&&(A+=fe()-e.bar.getHeight()),e.bar.definition.bgbox.attr("style",""),e.bar.definition.bgbox.css({width:d+"px",height:A+2+"px",left:-(d-u)*.5+"px"}),e.bar.definition.button.mouseover(function(){d=e.bar.definition.bg.getWidth(),u=e.bar.definition.button.getWidth(),e.bar.definition.bgbox.css({left:-(d-u)*.5+"px"})})}t>-1&&e.bar.definition.bg.find("button").each(function(g,x){var U=parseInt(x.attr("data-i"));t==U?x.addClass("ck-list-p-focus"):x.removeClass("ck-list-p-focus")})},Wi=function(t){e.bar.definition.bgbox.hide(),setTimeout(function(){e.bar.definition.bgbox.removeCss("display")},300),Yt(parseInt(D(this).attr("data-i")))},Yt=function(t){e.bar.definition.bg.find("button").each(function(i,n){var r=parseInt(n.attr("data-i"));if(t==r){if(!isUndefined(o.textTracks)&&o.textTracks.length>0)for(var s=o.find("track").length-1;s>-1;s--)o.find("track").eq(s).remove();L=f.time(),o.attr("autoplay","autoplay"),Pe(n.attr("data-video")),H(language.switchTo+n.htm()),e.bar.definition.button.htm(n.htm()),n.addClass("ck-list-p-focus"),B("definition",{id:r,video:n.attr("data-video"),title:n.attr("data-title")})}else n.removeClass("ck-list-p-focus")})},Xt=function(){var t=0;if(!isUndefined(e.prompt)&&valType(e.prompt)=="array"){for(t=e.prompt.length;t>-1;t--)isUndefined(e.prompt[t])||e.prompt[t].remove();e.prompt=null}e.prompt=[]},zi=function(){Xt();for(var t=0;t<a.prompt.length;t++){var i=a.prompt[t];if(!isUndefined(i)&&"words"in i&&"time"in i&&!isUndefined(i.time)&&!isUndefined(i.words)&&valType(i.time)=="number"){var n=w("ck-bar-progress-prompt");n.attr("data-words",i.words).attr("data-time",i.time),e.bar.pbox.bg.append(n);var r=n.getWidth()*.5/e.bar.pbox.bg.getWidth()*50,s=i.time/T*100-r;s<0&&(s=0),s>100&&(s=100),n.css({left:s+"%"}),n.mouseover(function(){this.attr("data-words")&&_t(this)}),n.mouseout(function(){this.attr("data-words")&&_t()}),e.prompt.push(n)}}},_t=function(t){if(isUndefined(e.promptWords)&&(e.promptWords=w("ck-prompt-words"),S.append(e.promptWords),e.promptWords.content=w("ck-prompt-content"),e.promptWords.append(e.promptWords.content)),isUndefined(t)){e.promptWords.content.htm(""),e.promptWords.hide();return}e.promptWords.content.htm(t.attr("data-words")),e.promptWords.show();var i=e.promptWords.getWidth(),n=e.promptWords.getHeight(),r=e.bar.pbox.bg,s=parseFloat(t.attr("data-time")),d=C.getHeight()-fe(),A=t.offset().left-C.offset().left+t.getWidth()*.5-i*.5;isUndefined(e.preview)?(d=C.getHeight()-parseFloat(fe()+e.tip.minHeight+parseInt(e.tip.css("margin-bottom"))),d-=fe()-e.bar.getHeight()):d=C.getHeight()-parseFloat(fe()+e.preview.smallHight+parseInt(e.preview.css("margin-bottom"))),d-=parseFloat(e.promptWords.css("margin-bottom")),d-=n,A-=parseFloat(e.promptWords.css("margin-right")),A<0&&(A=0),A>C.getWidth()-i&&(A=C.getWidth()-i),e.promptWords.css({top:d+"px",left:A+"px"})},$t=function(t){if(isUndefined(e.preview)||(e.preview.remove(),e.preview=null),!isUndefined(t)){e.preview=w("ck-preview"),S.append(e.preview),isUndefined(a.preview.type)&&(a.preview.type=0),a.preview.type==1&&(e.preview.bg=w("ck-preview-bg"),e.preview.append(e.preview.bg));var i=[],n=function(d,A,u,g){if(a.preview.type==1){e.preview.bg.img=[];for(var x=0;x<i.length;x++)for(var U=0;U<A/g;U++){var E=w("ck-preview-img");E.attr("data-img",i[x]).attr("data-i",U),E.css({width:d+"px",height:g+"px","background-position":"left "+-(U*g)+"px"}),e.preview.bg.append(E),e.preview.bg.img.push(E)}e.preview.bg.css({width:d*(A/g)*(i.length+1)+"px",height:g+"px"})}e.preview.bigWidth=d,e.preview.bigHight=A,e.preview.smallWidth=u,e.preview.smallHight=g,a.preview.type==1&&(e.preview.frame=w("ck-preview-frame"),e.preview.append(e.preview.frame),e.preview.frame.css({width:u+"px",height:g-parseFloat(e.preview.frame.css("border-width"))*2+"px"}))};if(valType(a.preview)=="object")if(valType(a.preview.file)=="array"){i=a.preview.file;var r=[10,10];if(valType(a.preview.thumbnail)=="array"&&a.preview.thumbnail.length>1&&(valType(a.preview.thumbnail[0])=="number"&&(r[0]=a.preview.thumbnail[0]),valType(a.preview.thumbnail[1])=="number"&&(r[1]=a.preview.thumbnail[1]),a.preview.thumbnail=r),i[0]){var s=qe(i[0],"ck-preview-load-img").addListener("load",function(){n(this.getWidth(),this.getHeight(),this.getWidth()/r[0],this.getHeight()/r[1]),this.remove()});S.append(s)}}else e.preview.removeChild(),e.preview=null;else e.preview.removeChild(),e.preview=null}},Jt=function(t){if(Ie&&(clearTimeout(Ie),Ie=null),t<0&&!isUndefined(e.preview)){Ie=setTimeout(function(){e.preview.hide(),Ie=null},200);return}if(!isUndefined(e.preview)&&!isUndefined(a.preview.thumbnail)&&T>0){isUndefined(a.preview.type)&&(a.preview.type=0);var i=2,n=a.preview.thumbnail;isUndefined(a.preview.scale)||(i=a.preview.scale);var r=0,s=0,d=0,A=0,u=0,g=e.preview.smallWidth,x=e.preview.smallHight,U=t*e.bar.pbox.bg.getWidth()/T+(e.bar.pbox.bg.offset().left-C.offset().left);if(e.preview.css("display")=="none"&&e.preview.show(),e.preview.css({height:x+"px"}),a.preview.type==1){r=parseInt(t/(i*n[0])),s=parseInt(t/i);var E=r-5,P=r+5;E<0&&(E=0),P>e.preview.bg.img.length-1&&(P=e.preview.bg.img.length-1);for(var N=E;N<P;N++)if(e.preview.bg.img[N].attr("data-img")){var q=e.preview.bg.img[N].css("background-position");e.preview.bg.img[N].css({background:"url("+e.preview.bg.img[N].attr("data-img")+") no-repeat"}),e.preview.bg.img[N].attr("data-img",""),e.preview.bg.img[N].css("background-position",q)}if(u=e.preview.frame.getWidth(),A=U-u*.5,d=-(s*g+g*.5)+U,A<0&&(A=0,U=(u-g)*.5,d=-(s*g)+U),A>e.preview.getWidth()-e.preview.frame.getWidth()){var K=A-(e.preview.getWidth()-e.preview.frame.getWidth());A=e.preview.getWidth()-e.preview.frame.getWidth(),d-=K}e.preview.bg.css({left:d+"px"}),e.preview.frame.css({left:A+"px"})}else{var Y=t/i/(n[0]*n[1]);s=parseInt(Y);var Q=parseInt((Y-s)*100),me=parseInt(Q/n[0]),I=Q%n[0],ee=a.preview.file;d=U-g*.5,d<0&&(d=0),d>C.getWidth()-g&&(d=C.getWidth()-g),e.preview.css({width:e.preview.smallWidth+"px",background:"url("+ee[s]+") no-repeat","background-position":"-"+I*g+"px -"+me*x+"px",left:d+"px"})}}},se=function(){if(e.loading.hide(),!(a.controls||!a.errorShow)){isUndefined(e.error)&&(e.error=w("ck-error"),S.append(e.error));var t=p.error.message;t||(t=language.error.noMessage);var i=t+"(code:"+p.error.code+")";e.error.htm(i),e.error.show()}},Ve=function(t){var i=w("ckplayer-error",t);D("body").append(i)},Oi=function(){if(!isUndefined(a.next)){if(valType(a.next)=="object"){if("content"in a.next){e.next=f.layer(a.next);return}if("title"in a.next){j(e.bar.nextEpisode,a.next.title);return}}j(e.bar.nextEpisode,language.next)}},Ii=function(){valType(a.next)=="object"&&("click"in a.next&&(valType(a.next.click)=="function"?a.next.click():valType(a.next.click)=="string"&&Re(a.next.click)),"link"in a.next&&(window.location.href=a.next.link),B("next"))},Hi=function(){if(!p.loop&&!isUndefined(a.ended)){it(),e.ended=f.layer(a.ended),e.ended&&e.centerPlay.hide();return}},Ri=function(){if(p.smallWindows){if(p.webFull||p.theatre||p.full){nt();return}var t=document.documentElement.scrollTop||document.body.scrollTop;t>p.offset().top+p.getHeight()?C.hasClass("ckplayer-ckplayer-smallwindow")||(C.addClass("ckplayer-ckplayer-smallwindow"),B("smallWindows",!0),pt=!0,a.smallWindowsDrag&&Zt(!0),Kt(),ce()):nt()}},nt=function(){C.hasClass("ckplayer-ckplayer-smallwindow")&&(C.removeClass("ckplayer-ckplayer-smallwindow"),a.smallWindowsDrag&&Zt(),B("smallWindows",!1),pt=!1,Gt(),ce())},Zt=function(t){var i=D(document),n=0,r=0,s=0,d=0,A=!1;isUndefined(t)||(A=t);var u=function(U){U.preventDefault&&U.preventDefault(),U=U||window.event;var E=be(U);s=E.x,d=E.y,i.mousemove(g),i.mouseup(x),C.css({cursor:"move"})},g=function(U){U=U||window.event;var E=be(U),P=C.offset();r=E.y-d,n=E.x-s,s=E.x,d=E.y;var N=P.left+n,q=P.top+r;C.css({left:N+"px",top:q+"px"}),C.css("position")!="fixed"&&C.css({position:"fixed"}),ht=!0},x=function(){i.removeListener("mousemove",g),i.removeListener("mouseup",x),C.css({cursor:"default"})};A?C.mousedown(u):C.unbind("mousedown")},ce=function(){var t=C.getWidth()*de*.01,i=C.getHeight()*de*.01,n=ne.getWidth(),r=ne.getHeight();if(ne.css({transform:"rotate("+we+"deg)","-ms-transform":"rotate("+we+"deg)","-moz-transform":"rotate("+we+"deg)","-webkit-transform":"rotate("+we+"deg)","-o-transform":"rotate("+we+"deg)",width:de+"%",height:de+"%"}),we!=0&&we!=180){if(r>t&&n>i){r/t>n/i?ne.css({height:de+"%",width:i+"px"}):ne.css({width:de+"%",height:t+"px"});return}if(r<t&&n<i){t>i?ne.css({height:de+"%",width:i+"px"}):r/n>=t/i?ne.css({width:de+"%",height:t+"px"}):ne.css({height:de+"%",width:i+"px"});return}if(r>=t&&n<=i){ne.css({width:de+"%",height:t+"px"});return}n>=i&&r<t&&ne.css({height:de+"%",width:i+"px"})}},Gt=function(){xt&&(e.bar.show(),e.topBar.show()),At&&e.rightBar.show(),e.tempTime.hide(),isUndefined(e.logo)||e.logo.show()},Kt=function(t){isUndefined(t)&&(t=!0),e.bar.hide(),e.topBar.hide(),e.rightBar.hide(),t&&e.tempTime.show(),isUndefined(e.logo)||e.logo.hide()},H=function(t,i){e.message.htm("");var n=function(){e.message.removeClass("ck-message-right").removeClass("ck-animate-bouncein").removeClass("ck-animate"),e.message.hide()};t?(e.message.htm(t),e.message.show(),e.message.hasClass("ck-animate")||e.message.addClass("ck-animate ck-animate-bouncein"),!isUndefined(i)&&i&&(e.message.hasClass("ck-message-right")||e.message.addClass("ck-message-right")),We&&(clearTimeout(We),We=null),We=setTimeout(function(){n(),We=null},1500)):n()},j=function(t,i,n,r){e.tip.content.htm(""),i?(e.tip.content.htm(i),e.tip.show(),e.tip.hasClass("ck-animate")||e.tip.addClass("ck-animate ck-animate-bouncein"),isUndefined(r)&&(r="auto"),r=="left"?(e.tip.content.removeClass("ck-content-float-auto").addClass("ck-content-float-left"),e.tip.triangle.removeClass("ck-triangle-auto").addClass("ck-triangle-left")):(e.tip.content.removeClass("ck-content-float-left").addClass("ck-content-float-auto"),e.tip.triangle.removeClass("ck-triangle-left").addClass("ck-triangle-auto")),ji(t,n,r),isUndefined(Oe)&&(Oe=function(){ze&&(clearTimeout(ze),ze=null)},ut=function(s){Oe(),ze=setTimeout(function(){j(),ze=null},100),s&&s.removeListener("mouseout",ut)}),Oe(),t.mouseout(function(){ut(t)})):(e.tip.hide(),e.tip.removeClass("ck-animate"),e.tip.removeClass("ck-animate-bouncein"))},ji=function(t,i,n){var r=t.offset(),s=C.offset(),d=e.tip.getWidth(),A=e.tip.getHeight(),u=t.getWidth(),g=0,x=r.top-s.top-A;fe()>e.bar.getHeight()&&(x-=fe()-e.bar.getHeight()),d>u?g=r.left-s.left-(d-u)*.5:g=r.left-s.left+(u-d)*.5,n=="left"&&(g=r.left-s.left-d,x=r.top-s.top),isUndefined(i)||(g=i.x-s.left-d*.5),g<0&&(g=0),x<0&&(x=0),g>S.getWidth()-d&&(g=S.getWidth()-d),x>S.getHeight()-A&&(x=S.getHeight()-A),e.tip.css({left:g+"px",top:x-parseInt(e.tip.css("margin-bottom"))+"px"})},Ni=function(){var t=e.bar.pbox.bg,i=e.bar.pbox.play,n=e.bar.pbox.slider,r=e.bar.pbox.mouseLine;n.unbind(),t.unbind();var s=0,d=0,A=D(document),u=0,g=function(I){if(I.preventDefault&&I.preventDefault(),!!a.timeScheduleAdjust){I=I||window.event;var ee=n.offset(),he=t.offset(),Z=be(I);ke=!0,d=Z.x;var R=ee.left-he.left;u=R*T/(t.getWidth()-n.getWidth()),n.removeListener("mousedown",g),n.removeListener("touchstart",g),A.mousemove(x),A.mouseup(U),n.touchmove(x),n.touchend(U),ot(!0)}},x=function(I){I=I||window.event;var ee=n.offset(),he=t.offset(),Z=be(I);ke=!0,s=d-Z.x,d=Z.x;var R=ee.left-s-he.left;R<0&&(R=0),R>t.getWidth()-n.getWidth()&&(R=t.getWidth()-n.getWidth()),e.bar.pbox.addClass("ck-bar-progress-slider-move");var re="";if(a.live)re=ri(R*at()/(t.getWidth()-n.getWidth()));else{switch(re=R*T/(t.getWidth()-n.getWidth()),a.timeScheduleAdjust){case 2:re<u&&(R=-1e3,H(language.timeScheduleAdjust.prohibitBackOff));break;case 3:if(re>u){R=-1e3,H(language.timeScheduleAdjust.prohibitForward);return}break;case 4:if(re<te){R=-1e3,f.seek(te),H(language.timeScheduleAdjust.prohibitLookBack);return}break;case 5:if(re>$){R=-1e3,f.seek($),H(language.timeScheduleAdjust.prohibitForwardNotViewed);return}break}re=formatSeconds(re)}j(n,re),R>=0?(n.css({left:R+"px"}),i.css({width:R+n.getWidth()*.5+"px"})):ke=!1},U=function(){if(ot(),A.removeListener("mousemove",x),A.removeListener("mouseup",U),n.removeListener("touchmove",x),n.removeListener("touchend",U),n.mousedown(g),n.touchstart(g),a.live){var ee=parseInt(a.live+i.getWidth()*at()/(t.getWidth()-n.getWidth()*.5));B("playback",{time:ee,date:date("Y-m-d H:i:s",ee)}),B("seek",{time:ee,state:"seeking",date:date("Y-m-d H:i:s",ee)})}else{var I=i.getWidth()*T/(t.getWidth()-n.getWidth()*.5);I>T&&(I=T),L=0,f.seek(I)}e.bar.pbox.removeClass("ck-bar-progress-slider-move"),E&&j()},E=!0,P=function(){var I="";a.live?I=language.live:I=formatSeconds(parseInt(n.css("left"))*T/(t.getWidth()-n.getWidth())),E=!1,j(n,I)},N=function(){E=!0};n.mousedown(g),n.mouseover(P),n.mouseleave(N),n.touchstart(g);var q=function(I){I=I||window.event;var ee=be(I),he=t.offset(),Z=ee.x-he.left;if(p.full&&(Z+=C.offset().left),a.live){var re=parseInt(a.live+at()*Z/t.getWidth());B("playback",{time:re,date:date("Y-m-d H:i:s",re)}),B("seek",{time:re,state:"seeking",date:date("Y-m-d H:i:s",re)})}else{var R=T*Z/t.getWidth();switch(a.timeScheduleAdjust){case 0:H(language.timeScheduleAdjust.prohibit);return;case 2:if(R<oe){H(language.timeScheduleAdjust.prohibitBackOff);return}break;case 3:if(R>oe){H(language.timeScheduleAdjust.prohibitForward);return}break;case 4:if(R<te){H(language.timeScheduleAdjust.prohibitLookBack);return}break;case 5:if(R>$){H(language.timeScheduleAdjust.prohibitForwardNotViewed);return}break}L=0,f.seek(R)}Z>t.getWidth()-n.getWidth()*.5&&(Z=t.getWidth()-n.getWidth()*.5),Z<n.getWidth()*.5&&(Z=n.getWidth()*.5),ke=!0,i.css({width:Z+"px"}),n.css({left:Z-n.getWidth()*.5+"px"})},Y=null,K=function(I){I=I||window.event;var ee=be(I),he=t.offset(),Z=ee.x-he.left;Q(),p.full&&(Z+=C.offset().left);var R=0;a.live?R=ri(at()*Z/t.getWidth()):(R=T*Z/t.getWidth(),Jt(R),R=formatSeconds(R)),j(t,R,ee),r.css({left:Z-e.bar.pbox.mouseLine.getWidth()*.5+"px"})},Y=null,Q=function(){Y&&(clearTimeout(Y),Y=null),Oe()},me=function(I){Q(),Y=setTimeout(function(){Jt(-1)},30)};t.mousedown(q),t.mousemove(K),t.mouseout(me),r.mouseover(Q)},Vi=function(){var t=e.bar.vbox.volume.box,i=e.bar.vbox.volume.bg,n=e.bar.vbox.volume.pp,r=e.bar.vbox.volume.slider,s=D(document),d=0,A=0,u=function(E){E.preventDefault&&E.preventDefault(),ot(!0),E=E||window.event;var P=be(E);A=P.y,r.removeListener("mousedown",u),r.removeListener("touchstart",u),e.bar.vbox.mouseDown=!0,s.mousemove(g),s.mouseup(x),r.touchmove(g),r.touchend(x)},g=function(E){E=E||window.event;var P=be(E),N=r.offset(),q=t.offset(),K=i.offset();d=P.y-A,A=P.y;var Y=N.top-q.top+d,Q=K.top-q.top,me=K.top+i.getHeight()-q.top-r.getHeight();Y<Q&&(Y=Q),Y>me&&(Y=me),r.css({top:Y+"px"});var I=Y-Q+r.getHeight()*.5;n.css({"margin-top":I+"px"});var ee=(i.getHeight()-I-r.getHeight()*.5)/(i.getHeight()-r.getHeight());f.volume(ee)},x=function(){ot(),s.removeListener("mousemove",g),s.removeListener("mouseup",x),r.removeListener("touchmove",g),r.removeListener("touchend",x),r.mousedown(u),r.touchstart(u),e.bar.vbox.mouseDown=!1};r.mousedown(u),r.touchstart(u);var U=function(E){E=E||window.event;var P=be(E),N=i.offset(),q=P.y-N.top,K=i.getHeight(),Y=1-q/K;f.volume(Y)};i.mousedown(U)},Qt=function(t){if(!(valType(a.live)=="boolean"&&a.live)&&!ke){var i=e.bar.pbox.bg,n=e.bar.pbox.slider,r=t/T*100;valType(a.live)=="number"&&(r="100"),e.bar.pbox.play.css({width:r+"%"});var s=n.getWidth()/i.getWidth()*100,d=r-s*.5;d<0&&(d=0),d>100-s&&(d=100-s),e.bar.pbox.slider.css({left:d+"%"}),ei()}},ei=function(){var t=e.bar.pbox.bg,i=e.bar.pbox.slider,n=0;e.bar.pbox.css("transition-duration")&&(n=parseFloat(e.bar.pbox.css("transition-duration"))*1e3+20);var r=function(){var s=parseInt(e.bar.pbox.slider.css("left"));s<0&&(s=0,e.bar.pbox.slider.css({left:s+"px"})),s>t.getWidth()-i.getWidth()&&(s=t.getWidth()-i.getWidth(),e.bar.pbox.slider.css({left:s+"px"}))};setTimeout(r,n)},ti=function(){e.topBar.timeEle.htm(date("H:i:s")),setTimeout(ti,1e3)},wt=function(t){if(!isUndefined(e.bar.vbox)){var i=e.bar.vbox.volume.box,n=e.bar.vbox.volume.bg,r=e.bar.vbox.volume.pp,s=e.bar.vbox.volume.slider;e.bar.vbox.volume.txt.htm(parseInt(t*100));var d=n.getHeight();if(d){var A=d-t*d;r.css({"margin-top":A+"px"});var u=n.offset().top-i.offset().top+A-s.getHeight()*.5;s.css({top:u+"px"})}}},ii=function(){if(o){var t=o.buffered.length;if(t>0){var i=o.buffered.end(t-1);X<i&&(X=i),xe("loadTime",parseInt(X*100)*.01),e.bar.pbox.load.css("width",X/T*100+"%")}}},qi=function(t){t?(e.bar.vbox.muted.hide(),e.bar.vbox.exitMuted.show(),e.ad.bottom.mutedAndExit.muted.hide(),e.ad.bottom.mutedAndExit.exitMuted.show(),H(language.muted)):(e.bar.vbox.muted.show(),e.bar.vbox.exitMuted.hide(),e.ad.bottom.mutedAndExit.muted.show(),e.ad.bottom.mutedAndExit.exitMuted.hide())},xe=function(t,i){if(isUndefined(e.about.sourceData)&&!isUndefined(e.about.find("ul"))){e.about.sourceData=e.about.find("ul").eq(0).htm(),e.about.objData={};for(var n=/{(.*?)}/g,r=e.about.sourceData.match(n);r=n.exec(e.about.sourceData);)e.about.objData[r[1]]="0"}if(!isUndefined(e.about.find("ul"))){var n=null,s=e.about.sourceData,d=e.about.textareaText;if(e.about.objData){for(var A in e.about.objData)if(t!=A){n=new RegExp("{"+A+"}","g");var u=e.about.objData[A];isUndefined(u)&&(u="0"),s=s.replace(n,u),d=d.replace(n,u)}}return n=new RegExp("{"+t+"}","g"),s=s.replace(n,i||""),d=d.replace(n,i||""),e.about.textareaEle.htm(d),e.about.objData[t]=i,e.about.find("ul").eq(0).htm(s)}},Yi=function(){var t=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(x){window.setTimeout(x,16.666666666666668)},i,n,r,s,d,A;s=0,d=Date.now();var u=function(){A=Date.now()-d,s+=1,A>=1e3&&(d+=A,g(s),s=0),t(u)},g=function(x){x!=p.fps&&(p.fps=x,xe("fps",x),B("fps",x))};isUndefined(p.fps)&&(p.fps=0),u()},Xi=function(t){var i=D(t);if(!isUndefined(i))return valType(i)=="htmlarray"&&(i=i[0]),isUndefined(i.captureParentNode)&&(i.captureParentNode=i.parentNode,i.prevElement=i.prev(),i.nextElement=i.next()),i},D=function(t,i){var n=null;document&&(n=document),isUndefined(i)||(n=i);var r=[];if(t)if(valType(t)=="htmlobject"||valType(t)=="object"){if(r=t,!isUndefined(r.ckplayer))return r}else if(valType(t)=="string"&&t!="")switch(t.substr(0,1)){case".":if(t=t.substr(1,t.length),n.getElementsByClassName){if(r=n.getElementsByClassName(t),!r.length)return null}else if(!n&&document.getElementsByClassName){if(r=document.getElementsByClassName(t),!r.length)return null}else{var A=new RegExp(" "+t+" ","i"),s=null;n.getElementsByTagName?s=n.getElementsByTagName("*"):s=document.getElementsByTagName("*");for(var d=0;d<s.length;d++)A.test(" "+s[d].className+" ")&&r.push(s[d])}r&&r.length===0&&(r=null);break;case"#":t=t.substr(1,t.length),n.getElementById?r=n.getElementById(t):r=document.getElementById(t);break;default:var A=new RegExp(" "+t+" ","i");n.getElementsByTagName?r=n.getElementsByTagName(t):r=document.getElementsByTagName(t),r?t=="body"||t=="document"||t=="html"?r=r[0]:r.length===0&&(r=null):r=null;break}else r=t;else r=document;if(r)if(valType(r)=="htmlobject"||valType(r)=="object"||valType(r)=="document")r.ckplayer="Thanks for using",r.find=function(u){return D(u,this)},r.attr=function(u,g){return isUndefined(g)?this.getAttribute(u):(this.setAttribute(u,g),this)},r.removeAttr=function(u){return this.removeAttribute(u),this},r.css=function(u,g){var x=function(q){if(q.indexOf("-")!=-1){var K=q.split("-"),Y=K[0],Q="",me="";return K.length>1&&(Q=K[1].substr(0,1).toLocaleUpperCase()+K[1].substr(1,K[1].length-1)),K.length>2&&(Q=K[2].substr(0,1).toLocaleUpperCase()+K[2].substr(1,K[2].length-1)),Y+Q+me}return q};if(isUndefined(g)){if(!isUndefined(u)&&valType(u)=="string")return this.currentStyle?this.currentStyle[u]:document.defaultView.getComputedStyle(this,null)[u];if(isUndefined(u))return this.currentStyle?this.currentStyle:document.defaultView.getComputedStyle(this,null)}if(valType(u)!="object"){var U=x(u);if(this.length>1)for(var E=0;E<this.length;E++)this[E].style[U]=g;else this.style[U]=g}else for(var P in u){var N=x(P);if(valType(this)=="htmlarray")for(var E=0;E<this.length;E++)this[E].style[N]=u[P];else this.style[N]=u[P]}return this},r.hasClass=function(u){if(isUndefined(u))return!1;var g=new RegExp("(\\s|^)"+u+"(\\s|$)");return!!(this.className&&this.className.match(g))},r.addClass=function(u){return this.hasClass(u)||(this.className&&this.className.substr(this.className.length-1,1)!=" "&&(this.className+=" "),this.className+=u),this},r.removeClass=function(u){return this.hasClass(u)&&(this.className=this.className.replace(new RegExp("(\\s|^)"+u+"(\\s|$)")," "),this.className.substr(this.className.length-1,1)==" "&&(this.className=this.className.substr(0,this.className.length-1)),this.className||this.removeAttribute("class")),this},r.searchClass=function(u){for(var g=this.className.split(" "),x=0;x<g.length;x++)if(g[x].substr(0,u.length)==u)return g[x];return this},r.removeCss=function(u){var g=this.attr("style");if(g){for(var x=g.split(";"),U={},E=0;E<x.length;E++){var P=x[E].split(":");P.length==2&&P[0]&&P[0].trim()!=u&&(U[P[0].trim()]=P[1].trim())}this.attr("style",""),this.css(U)}},r.addListener=function(u,g,x){return addListener(this,u,g,x)},r.removeListener=function(u,g,x){return removeListener(this,u,g,x)},r.prev=function(){return prev(this)},r.next=function(){return next(this)},r.append=function(u){return this.appendChild(u),this},r.remove=function(){return isUndefined(this.parentNode)||this.parentNode.removeChild(this),null},r.bind=function(u,g,x){return addListener(this,u,g,x)},r.unbind=function(u,g){var x=0,U=[];if(!isUndefined(g))r.removeListener(u,g);else if(isUndefined(u)){if(!isUndefined(this.listenerList))for(U=this.listenerList,x=0;x<U.length;x++)r.removeListener(U[x][0],U[x][1])}else if(!isUndefined(this.listenerList))for(U=this.listenerList,x=0;x<U.length;x++)U[x][0]==u&&r.removeListener(u,U[x][1])},r.htm=function(u){if(!isUndefined(u))r.innerHTML=u;else return r.innerHTML},r.htmReplace=function(u,g,x){if(!isUndefined(g)&&!isUndefined(u)){isUndefined(this.attr("data-htm"))&&this.attr("data-htm",x);var U=this.attr("data-htm"),E=new RegExp(u,"g");U=U.replace(E,g),this.htm(U)}},r.offset=function(){for(var u=this.offsetParent,g=this.offsetLeft,x=this.offsetTop;u&&u.tagName!=="BODY";)/MSIE 8\.0/.test(navigator.userAgent)||(g+=u.clientLeft,x+=u.clientTop),g+=u.offsetLeft,x+=u.offsetTop,u=u.offsetParent;return{top:x,left:g}},r.fixed=function(){return this.css("position")=="fixed"?!0:isUndefined(this.offsetParent)?!1:D(this.offsetParent).fixed()},r.getWidth=function(){return this.offsetWidth},r.getHeight=function(){return this.offsetHeight},isUndefined(r.width)&&(r.width=function(){return this.offsetWidth}),isUndefined(r.height)&&(r.height=function(){return this.offsetWidth}),r.resize=function(u){addListener(window,"resize",u)},r.click=function(u){return addListener(this,"click",u),this},r.singleClick=function(u){return isUndefined(this.dbClick)&&(ai(this),this.dbClick=!0),this.addListener("sigClick",u),this},r.doubleClick=function(u){return isUndefined(this.dbClick)&&(ai(this),this.dbClick=!0),this.addListener("dobClick",u),this},r.mouseover=function(u){return addListener(this,"mouseover",u),this},r.mouseout=function(u){return addListener(this,"mouseout",u),this},r.mousedown=function(u){return addListener(this,"mousedown",u),this},r.mouseup=function(u){return addListener(this,"mouseup",u),this},r.mousemove=function(u){return addListener(this,"mousemove",u),this},r.mouseWheel=function(u){return addListener(this,"mousewheel",u),addListener(this,"DOMMouseScroll",u,!1),this},r.mouseleave=function(u){return addListener(this,"mouseleave",u),this},r.touchstart=function(u){return addListener(this,"touchstart",u),this},r.touchmove=function(u){return addListener(this,"touchmove",u),this},r.touchend=function(u){return addListener(this,"touchend",u),this},r.show=function(){return this.css("display","block"),this},r.hide=function(){return this.css("display","none"),this},r.animate=function(u,g,x,U){if(isUndefined(this.CK))return r;var E=this,P=this.CK,N=P.getWidth(),q=P.getHeight(),K=10;if(this.timerTween=null,this.tweenPlay=!0,isUndefined(u))return this;(isUndefined(g)||g==0)&&(g=1e3),(isUndefined(x)||x=="")&&(x="None.easeIn");var Y=x.split("."),Q={None:{easeIn:function(l,c,m,y){return m*l/y+c},easeOut:function(l,c,m,y){return m*l/y+c},easeInOut:function(l,c,m,y){return m*l/y+c}},Quadratic:{easeIn:function(l,c,m,y){return m*(l/=y)*l+c},easeOut:function(l,c,m,y){return-m*(l/=y)*(l-2)+c},easeInOut:function(l,c,m,y){return(l/=y/2)<1?m/2*l*l+c:-m/2*(--l*(l-2)-1)+c}},Cubic:{easeIn:function(l,c,m,y){return m*(l/=y)*l*l+c},easeOut:function(l,c,m,y){return m*((l=l/y-1)*l*l+1)+c},easeInOut:function(l,c,m,y){return(l/=y/2)<1?m/2*l*l*l+c:m/2*((l-=2)*l*l+2)+c}},Quartic:{easeIn:function(l,c,m,y){return m*(l/=y)*l*l*l+c},easeOut:function(l,c,m,y){return-m*((l=l/y-1)*l*l*l-1)+c},easeInOut:function(l,c,m,y){return(l/=y/2)<1?m/2*l*l*l*l+c:-m/2*((l-=2)*l*l*l-2)+c}},Quintic:{easeIn:function(l,c,m,y){return m*(l/=y)*l*l*l*l+c},easeOut:function(l,c,m,y){return m*((l=l/y-1)*l*l*l*l+1)+c},easeInOut:function(l,c,m,y){return(l/=y/2)<1?m/2*l*l*l*l*l+c:m/2*((l-=2)*l*l*l*l+2)+c}},Sine:{easeIn:function(l,c,m,y){return-m*Math.cos(l/y*(Math.PI/2))+m+c},easeOut:function(l,c,m,y){return m*Math.sin(l/y*(Math.PI/2))+c},easeInOut:function(l,c,m,y){return-m/2*(Math.cos(Math.PI*l/y)-1)+c}},Exponential:{easeIn:function(l,c,m,y){return l==0?c:m*Math.pow(2,10*(l/y-1))+c},easeOut:function(l,c,m,y){return l==y?c+m:m*(-Math.pow(2,-10*l/y)+1)+c},easeInOut:function(l,c,m,y){return l==0?c:l==y?c+m:(l/=y/2)<1?m/2*Math.pow(2,10*(l-1))+c:m/2*(-Math.pow(2,-10*--l)+2)+c}},Circular:{easeIn:function(l,c,m,y){return-m*(Math.sqrt(1-(l/=y)*l)-1)+c},easeOut:function(l,c,m,y){return m*Math.sqrt(1-(l=l/y-1)*l)+c},easeInOut:function(l,c,m,y){return(l/=y/2)<1?-m/2*(Math.sqrt(1-l*l)-1)+c:m/2*(Math.sqrt(1-(l-=2)*l)+1)+c}},Elastic:{easeIn:function(l,c,m,y,z,ie){if(l==0)return c;if((l/=y)==1)return c+m;if(ie||(ie=y*.3),!z||z<Math.abs(m)){z=m;var Ae=ie/4}else var Ae=ie/(2*Math.PI)*Math.asin(m/z);return-(z*Math.pow(2,10*(l-=1))*Math.sin((l*y-Ae)*(2*Math.PI)/ie))+c},easeOut:function(l,c,m,y,z,ie){if(l==0)return c;if((l/=y)==1)return c+m;if(ie||(ie=y*.3),!z||z<Math.abs(m)){z=m;var Ae=ie/4}else var Ae=ie/(2*Math.PI)*Math.asin(m/z);return z*Math.pow(2,-10*l)*Math.sin((l*y-Ae)*(2*Math.PI)/ie)+m+c},easeInOut:function(l,c,m,y,z,ie){if(l==0)return c;if((l/=y/2)==2)return c+m;if(ie||(ie=y*(.3*1.5)),!z||z<Math.abs(m)){z=m;var Ae=ie/4}else var Ae=ie/(2*Math.PI)*Math.asin(m/z);return l<1?-.5*(z*Math.pow(2,10*(l-=1))*Math.sin((l*y-Ae)*(2*Math.PI)/ie))+c:z*Math.pow(2,-10*(l-=1))*Math.sin((l*y-Ae)*(2*Math.PI)/ie)*.5+m+c}},Back:{easeIn:function(l,c,m,y,z){return z==null&&(z=1.70158),m*(l/=y)*l*((z+1)*l-z)+c},easeOut:function(l,c,m,y,z){return z==null&&(z=1.70158),m*((l=l/y-1)*l*((z+1)*l+z)+1)+c},easeInOut:function(l,c,m,y,z){return z==null&&(z=1.70158),(l/=y/2)<1?m/2*(l*l*(((z*=1.525)+1)*l-z))+c:m/2*((l-=2)*l*(((z*=1.525)+1)*l+z)+2)+c}},Bounce:{easeIn:function(l,c,m,y){return m-Q.Bounce.easeOut(y-l,0,m,y)+c},easeOut:function(l,c,m,y){return(l/=y)<1/2.75?m*(7.5625*l*l)+c:l<2/2.75?m*(7.5625*(l-=1.5/2.75)*l+.75)+c:l<2.5/2.75?m*(7.5625*(l-=2.25/2.75)*l+.9375)+c:m*(7.5625*(l-=2.625/2.75)*l+.984375)+c},easeInOut:function(l,c,m,y){return l<y/2?Q.Bounce.easeIn(l*2,0,m,y)*.5+c:Q.Bounce.easeOut(l*2-y,0,m,y)*.5+m*.5+c}}};if(Y.length!=2||!(Y[0]in Q)||!(Y[1]in Q[Y[0]]))return null;var me=Q[Y[0]][Y[1]],I=function(l){var c=l[1],m=0,y=0;switch(l[0]){case"width":m=E.getWidth(),c.substring(c.length-1,c.length)=="%"?y=parseInt(c)*q*.01:y=parseInt(c);break;case"height":m=E.getHeight(),c.substring(c.length-1,c.length)=="%"?y=parseInt(c)*q*.01:y=parseInt(c);break;case"left":isUndefined(E.css("left"))?m=E.offset().left-P.offset().left:m=parseInt(E.css("left")),c.substring(c.length-1,c.length)=="%"?y=parseInt(c)*N*.01:y=parseInt(c),E.css("right","auto");break;case"right":isUndefined(E.css("right"))?m=P.getWidth()-(E.offset().left-P.offset().left+E.getWidth()):m=parseInt(E.css("right")),c.substring(c.length-1,c.length)=="%"?y=parseInt(c)*N*.01:y=parseInt(c),E.css("left","auto");break;case"top":isUndefined(E.css("top"))?m=E.offset().top-P.offset().top:m=parseInt(E.css("top")),c.substring(c.length-1,c.length)=="%"?y=parseInt(c)*q*.01:y=parseInt(c),E.css("bottom","auto");break;case"bottom":isUndefined(E.css("bottom"))?m=P.getHeight()-(E.offset().top-P.offset().top+E.getHeight()):m=parseInt(E.css("bottom")),c.substring(c.length-1,c.length)=="%"?y=parseInt(c)*q*.01:y=parseInt(c),E.css("top","auto");break;case"alpha":!isUndefined(E.css("filter"))&&E.css("filter")!="none"?m=Number(E.css("filter"))*100:!isUndefined(E.css("opacity"))&&E.css("opacity")!="none"?m=E.css("opacity")*100:m=100,c.substring(c.length-1,c.length)=="%"?y=parseInt(c):y=c*100;break}return y-=m,m!=y?{type:l[0],current:m,result:y}:null},ee=function(){E.timerTween!=null&&(clearInterval(E.timerTween),E.timerTween=null)};u=u.replace(/[ ]*,[ ]*|[ ]+/g,";");for(var he=[],Z=u.split(";"),R=0;R<Z.length;R++){var re=Z[R].split(":");if(re.length==2){var oi=I(re);oi&&he.push(oi)}}var Et=0,$i=function(){var l={};if(E.tweenPlay)if(Et<g){Et+=K;for(var c=0;c<he.length;c++){var m=he[c],y=Math.ceil(me(Et,m.current,m.result,g));switch(m.type){case"width":l.width=y+"px",l.overflow="hidden";break;case"height":l.height=y+"px",l.overflow="hidden";break;case"left":l.left=y+"px";break;case"right":l.right=y+"px";break;case"top":l.top=y+"px";break;case"bottom":l.bottom=y+"px";break;case"alpha":l.filter="alpha(opacity:"+y*.01+")",l.opacity=y*.01;break}}E.css(l)}else ee(),isUndefined(U)||U(E)};return ee(),this.timerTween=setInterval($i,K),this},r.animatePlay=function(){return isUndefined(this.timerTween)||(this.tweenPlay=!0),this},r.animatePause=function(){return isUndefined(this.timerTween)||(this.tweenPlay=!1),this};else{r.each=function(u){for(var g in this)if(this.hasOwnProperty(g))if(valType(this[g])=="htmlobject")u(g,this[g]);else try{this[0].nodeName||u(g,this[g])}catch(x){u(g,this[g])}},r.eq=function(u){return valType(this)=="htmlarray"&&this.length>=u+1?this[u]:null};for(var d=0;d<r.length;d++)if(D)try{r[d]=D(r[d])}catch(g){}}return r},w=function(t,i){var n=document.createElement("div"),r=D(n);return t&&r.addClass(t),i&&r.htm(i),r},_i=function(){var t=document.createElement("video"),i=D(t);return i},V=function(t,i){var n=document.createElement("button"),r=D(n);return r.attr("type","button"),t&&r.addClass(t),i&&r.htm(i),r},rt=function(t,i,n){var r=document.createElement("a"),s=D(r);return t&&s.htm(t),!isUndefined(i)&&i&&(s.attr("href",i),s.attr("target","_blank")),n&&s.addClass(n),s},ni=function(t,i){var n=document.createElement("a"),r=D(n);return t&&r.htm(t),!isUndefined(i)&&i?r.attr("href","javascript:"+i+"()"):r.attr("href","javascript:;"),r},qe=function(t,i){var n=document.createElement("img"),r=D(n);return i&&(n.className=i),t&&(n.src=t),r},be=function(t){var i=t||window.event;isUndefined(i)&&(i={clientX:0,clientY:0});var n=i.clientX+(document.documentElement.scrollLeft||D("body").scrollLeft),r=i.clientY+(document.documentElement.scrollTop||D("body").scrollTop);return(isUndefined(n.toString())||n.toString()=="NaN")&&(n=i.touches[0].clientX),(isUndefined(r.toString())||r.toString()=="NaN")&&(r=i.touches[0].clientY),n.toString()=="NaN"&&(n=0),r.toString()=="NaN"&&(r=0),{x:n,y:r}},at=function(){var t=Date.now(),i=a.live;return i.toString().length<13&&(i=i*1e3),t-i},ri=function(t){var i=a.live;return i.toString().length<13&&(i=i*1e3),i+=t,language.lookBack+date("H:i:s",i)},Ye=function(t,i,n){var r=function(){};if(isUndefined(i)||(r=i),checkJs(t)){r();return}var s=document.createElement("script");s.type="text/javascript";var d=!1,A=null,u=function(){A&&clearInterval(A),!d&&(d=!0,valType(r)=="function"&&r())},g=function(){A=setInterval(function(){try{!isUndefined(s.readyState)&&s.readyState=="complete"&&u()}catch(P){}},10)},x=function(){try{s.parentNode&&s.parentNode.removeChild(s)}catch(P){}},U=function(){removeListener(s,"load",U),removeListener(s,"error",E),u()},E=function(){if(removeListener(s,"load",U),removeListener(s,"error",E),x(),!n&&(!a||a.cdnFallback!==!1)){var P=typeof window!="undefined"&&window.ckplayerPlusCdn?window.ckplayerPlusCdn:ckplayerPlusDefaultCdn,N=String(t).match(/\/(hls\.js|flv\.js|mpegts\.js|language)\/([^/?#]+)(?:[?#].*)?$/i);if(P&&P.indexOf("1.1.0")===-1&&N){P.slice(-1)!=="/"&&(P+="/");var q=P+N[1]+"/"+N[2];if(q!==t){Ye(q,i,!0);return}}}};try{addListener(s,"load",U),addListener(s,"error",E)}catch(P){g()}s.src=t,D("head").eq(0).append(s)},ai=function(t){var i=null,n=0;t=D(t),t.click(function(){if(i||(i=setTimeout(function(){try{t.dispatchEvent(new Event("sigClick"))}catch(d){var s=document.createEvent("HTMLEvents");s.initEvent("sigClick",!1,!0),t.dispatchEvent(s)}n=0,i=null},260)),!n)n=new Date().getTime();else if(new Date().getTime()-n<230){try{t.dispatchEvent(new Event("dobClick"))}catch(s){var r=document.createEvent("HTMLEvents");r.initEvent("dobClick",!1,!0),t.dispatchEvent(r)}clearTimeout(i),n=0,i=null}})},ot=function(t){isUndefined(t)&&(t=!1);var i=function(n){n.preventDefault()};t?D("body").addListener("touchmove",i,{passive:!1}):D("body").removeListener("touchmove",i,{passive:!1})};return Ge(b)}function ajax(cObj){var callback=null,obj={method:"get",dataType:"json",charset:"utf-8",async:!0,url:"",data:null,success:null,error:null};if(obj=standardization(obj,cObj),!isUndefined(obj.url)){var errorFun=function(b){!isUndefined(obj.error)&&valType(obj.error)=="function"?obj.error(b):obj.success(null)},successFun=function(b){!isUndefined(obj.success)&&valType(obj.success)=="function"&&obj.success(b)},createXHR=function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(b){try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(h){}}},formatParams=function(b){var h=[];for(var a in b)h.push(encodeURIComponent(a)+"="+encodeURIComponent(b[a]));return h.join("&")};if(valType(cObj)!="object"){isUndefined(obj.error)||obj.error(event);return}if(obj.dataType==="json"||obj.dataType==="text"||obj.dataType==="html"||obj.dataType==="xml"){var xhr=createXHR();if(callback=function(){if(xhr.status===200)if(obj.dataType==="json")try{var jsonData;try{jsonData=JSON.parse(xhr.responseText)}catch(parseErr){jsonData=eval("("+xhr.responseText+")")}successFun(jsonData)}catch(b){successFun(null)}else successFun(xhr.responseText);else errorFun({code:xhr.status,message:xhr.statusText})},obj.data=formatParams(obj.data),obj.method==="get"&&!isUndefined(obj.data)&&obj.data!=""&&(obj.url.indexOf("?")==-1?obj.url+="?"+obj.data:obj.url+="&"+obj.data),obj.async===!0&&addListener(xhr,"readystatechange",function(b){this.readyState===4&&callback!=null&&callback()}),xhr.open(obj.method,obj.url,obj.async),obj.method==="post")try{xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),xhr.setRequestHeader("charset",obj.charset),xhr.send(obj.data)}catch(b){callback()}else try{xhr.send(null)}catch(b){callback()}obj.async===!1&&callback()}else if(obj.dataType==="jsonp"){var oHead=document.getElementsByTagName("head")[0],oScript=document.createElement("script"),callbackName="callback"+new Date().getTime(),params=formatParams(obj.data)+"&callback="+callbackName;oScript.src=obj.url.split("?")+"?"+params,oHead.insertBefore(oScript,oHead.firstChild),window[callbackName]=function(b){!isUndefined(obj.success)&&valType(obj.success)==="function"&&obj.success(b),oHead.removeChild(oScript)}}}}function documentReady(b){var h=!1,a=null,k=function(){a&&clearInterval(a),!h&&(h=!0,valType(b)=="function"&&b())},o=function(){a=setInterval(function(){try{!isUndefined(document.readyState)&&document.readyState=="complete"&&k()}catch(G){}},10)},T=function(){valType(b)=="function"&&b(),removeListener(window,"load",T)};if(!isUndefined(document.body))valType(b)=="function"&&b();else try{addListener(window,"load",T)}catch(G){o()}}function getPath(b){if(typeof window!="undefined"&&window.ckplayerBasePath){var h=window.ckplayerBasePath;if(/\/(?:assets|\.vite\/deps|_next\/static|chunks?)\/?$/i.test(h)&&(h=""),h)return h.slice(-1)!=="/"&&(h+="/"),isUndefined(b)?h:h+b+"/"}for(var a=document.scripts||[],k=a.length?a[a.length-1].src:"",o=0;o<a.length;o++){var T=a[o].getAttribute("name")||a[o].getAttribute("data-name"),G=a[o].src.slice(a[o].src.lastIndexOf("/")+1,a[o].src.lastIndexOf("."));if(T&&(T=="ckplayer"||T=="ckplayer.min"||T=="ckplayer-plus")||a[o].src&&(G=="ckplayer"||G=="ckplayer.min"||G.indexOf("ckplayer")===0)){k=a[o].src;break}}var le="";return k&&k.lastIndexOf("/js/")>-1?le=k.substring(0,k.lastIndexOf("/js/")+1):k&&k.lastIndexOf("/")>-1&&(le=k.substring(0,k.lastIndexOf("/")+1)),isUndefined(b)||(le+=b+"/"),le}function checkJs(b){for(var h=document.scripts,a=0;a<h.length;a++)if(h[a].src==b)return h[a];return!1}function getMaxZIndex(){for(var b=document.all||document.querySelectorAll("*"),h=-1,a=0;a<b.length;a++){var k=null;try{k=window.getComputedStyle(b[a],null).zIndex}catch(o){b[a].style&&(k=b[a].style.zIndex)}k!="auto"&&parseInt(k)>h&&(h=parseInt(k))}return h}function getWindowSize(){return{width:window.innerWidth,height:window.innerHeight}}function standardization(b,h){var a={},k;for(k in b)a[k]=b[k];for(k in h)k in a&&(a[k]=h[k]);return a}function mergeObj(b,h){var a={},k;for(k in b)a[k]=b[k];for(k in h)if(k in a)switch(valType(a[k])){case"object":valType(h[k])=="object"&&(a[k]=mergeObj(a[k],h[k]));break;default:valType(a[k])==valType(h[k])&&(a[k]=h[k]);break}return a}function valType(b){if(typeof b=="undefined")return"undefined";var h=Object.prototype.toString.call(b).split(" ")[1].replace("]","").toLowerCase();return h.substr(0,4)=="html"&&(h.substr(-7)=="element"||h.substr(-8)=="document"||h=="window")&&(h="htmlobject"),(h=="htmlcollection"||h=="nodelist")&&(h="htmlarray"),h}function isUndefined(b){try{return valType(b)==="undefined"||b===void 0||b===null||valType(b)==="number"&&isNaN(b)}catch(h){return!0}return!1}function prev(b){var h=b.previousSibling;if(h==null)return null;if(h.nodeType==3){var a=prev(h);if(a&&a.nodeType==1)return a}else return h.nodeType==1?h:!1}function next(b){var h=b.nextSibling;if(h==null)return null;if(h.nodeType==3){var a=next(h);if(a&&a.nodeType==1)return a}else return h.nodeType==1?h:!1}function addListener(b,h,a,k){if(isUndefined(k)&&(k=!1),b.addEventListener)try{b.addEventListener(h,a,k)}catch(o){}else if(b.attachEvent)try{b.attachEvent("on"+h,a)}catch(o){}else b["on"+h]=a;return isUndefined(b.listenerList)&&(b.listenerList=[]),b.listenerList.push([h,a]),b}function removeListener(b,h,a,k){if(isUndefined(k)&&(k=!1),b.removeEventListener)try{b.removeEventListener(h,a,k)}catch(G){}else if(b.detachEvent)try{b.detachEvent("on"+h,a)}catch(G){}else b["on"+h]=null;if(!isUndefined(b.listenerList)){for(var o=[],T=0;T<b.listenerList.length;T++)(b.listenerList[T][0]!=h||b.listenerList[T][1]!=a)&&o.push(b.listenerList[T]);b.listenerList=o}return b}function formatSeconds(b){isUndefined(b)&&(b=0);var h=parseInt(b);isUndefined(h)&&(h=0),h<0&&(h=0);var a=Math.floor(h/3600)<10?"0"+Math.floor(h/3600):Math.floor(h/3600),k=Math.floor(h/60%60)<10?"0"+Math.floor(h/60%60):Math.floor(h/60%60),o=Math.floor(h%60)<10?"0"+Math.floor(h%60):Math.floor(h%60),T="";return a!=="00"&&(T+=a+":"),T+=k+":"+o,T}function date(b,h){isUndefined(h)&&(h=new Date),h.toString().length<13&&(h=h*1e3);var a,k=h?new Date(h):new Date,o=function(F,X){return(F=F+"").length<X?new Array(++X-F.length).join("0")+F:F},T=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],G={1:"st",2:"nd",3:"rd",21:"st",22:"nd",23:"rd",31:"st"},le=["","January","February","March","April","May","June","July","August","September","October","November","December"],M={d:function(){return o(M.j(),2)},D:function(){return M.l().substr(0,3)},j:function(){return k.getDate()},l:function(){return T[M.w()]},N:function(){return M.w()+1},S:function(){return G[M.j()]?G[M.j()]:"th"},w:function(){return k.getDay()},z:function(){return(k-new Date(k.getFullYear()+"/1/1"))/864e5>>0},W:function(){var F=M.z(),X=364+M.L()-F,L,ae=(new Date(k.getFullYear()+"/1/1").getDay()||7)-1;return X<=2&&(k.getDay()||7)-1<=2-X?1:F<=2&&ae>=4&&F>=6-ae?(L=new Date(k.getFullYear()-1+"/12/31"),date("W",Math.round(L.getTime()/1e3))):1+(ae<=3?(F+ae)/7:(F-(7-ae))/7)>>0},F:function(){return le[M.n()]},m:function(){return o(M.n(),2)},M:function(){return M.F().substr(0,3)},n:function(){return k.getMonth()+1},t:function(){var F;return(F=k.getMonth()+1)==2?28+M.L():F&1&&F<8||!(F&1)&&F>7?31:30},L:function(){var F=M.Y();return!(F&3)&&(F%100||!(F%400))?1:0},Y:function(){return k.getFullYear()},y:function(){return(k.getFullYear()+"").slice(2)},a:function(){return k.getHours()>11?"pm":"am"},A:function(){return M.a().toUpperCase()},B:function(){var F=(k.getTimezoneOffset()+60)*60,X=k.getHours()*3600+k.getMinutes()*60+k.getSeconds()+F,L=Math.floor(X/86.4);return L>1e3&&(L-=1e3),L<0&&(L+=1e3),String(L).length==1&&(L="00"+L),String(L).length==2&&(L="0"+L),L},g:function(){return k.getHours()%12||12},G:function(){return k.getHours()},h:function(){return o(M.g(),2)},H:function(){return o(k.getHours(),2)},i:function(){return o(k.getMinutes(),2)},s:function(){return o(k.getSeconds(),2)},O:function(){var F=o(Math.abs(k.getTimezoneOffset()/60*100),4);return k.getTimezoneOffset()>0?F="-"+F:F="+"+F,F},P:function(){var F=M.O();return F.substr(0,3)+":"+F.substr(3,2)},c:function(){return M.Y()+"-"+M.m()+"-"+M.d()+"T"+M.h()+":"+M.i()+":"+M.s()+M.P()},U:function(){return Math.round(k.getTime()/1e3)}};return b.replace(/([a-zA-Z])/g,function(F,X){var L="";return F!=X?L=X:M[X]?L=M[X]():L=X,L})}function dataURLtoBlob(b){for(var h=b.split(","),a=h[0].match(/:(.*?);/)[1],k=atob(h[1]),o=k.length,T=new Uint8Array(o);o--;)T[o]=k.charCodeAt(o);return new Blob([T],{type:a})}function decodeURIString(b){for(var h in b){if(valType(b[h])=="string"&&b[h])try{b[h]=decodeURI(b[h])}catch(a){}valType(b[h])=="object"&&(b[h]=decodeURIString(b[h]))}return b}function getApp(){var b=navigator.userAgent.toLowerCase();if(b.indexOf("iphone")>-1)return"iphone"}function cookie(b,h,a,k){isUndefined(a)&&(a=""),isUndefined(k)&&(k="/");var o=";domain="+a+";path="+k;location.protocol=="https"&&(o+=";SameSite=None;Secure=true");var T=function(M,F){var X=31104e6,L=new Date;L.setTime(L.getTime()+X);try{document.cookie=M+"="+escape(F)+";expires="+L.toGMTString()+o}catch(ae){console.error(ae)}},G=function(M){var F,X=new RegExp("(^| )"+M+"=([^;]*)(;|$)");return(F=document.cookie.match(X))?unescape(F[2]):null},le=function(M){var F=new Date;F.setTime(F.getTime()-1);var X=G(M);X!=null&&(document.cookie=M+"="+X+";expires="+F.toGMTString()+o)};if(!isUndefined(b)&&!isUndefined(h))return h=="delete"?(le(b),null):(T(b,h),G(b));if(!isUndefined(b)&&isUndefined(h))return G(b);isUndefined(b)}function arrayToString(b){var h="";if(!isUndefined(b))for(var a=0;a<b.length;a++){var k=b[a];a>0&&(h+=",");for(var o=0;o<k.length;o++)o>0&&(h+=";"),valType(k[o])=="number"?h+=parseInt(k[o]*100):h+=k[o]}return h}function stringToArray(b){var h=[];if(!isUndefined(b))for(var a=b.split(","),k=0;k<a.length;k++){var o=a[k].split(";");o[1]=parseInt(o[1])*.01,o[2]=parseInt(o[2])*.01,h.push(o)}return h}function documentHidden(b){isUndefined(document.visibilityState)||(b(document.visibilityState==="visible"?"show":"hidden"),addListener(document,"visibilitychange",function(){b(document.visibilityState==="visible"?"show":"hidden")}))}return ckplayerEmbed});