zwplayer-vue2x 1.0.23 → 1.0.29

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,429 +1,435 @@
1
- (function(L){function Na(){return document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||!1}function bb(p,B,u){var y=new Date;y.setTime(y.getTime()+864E5*u);u="expires="+y.toGMTString();document.cookie=p+"="+B+"; "+u}function Ga(p,B,u){if(p){var y=parseInt(p.style.opacity)||1;y*=100;B=parseInt(B/50);0===B&&(B=1);var F=y/B;5>F&&(F=5);var J=setInterval(function(){0<y?(y-=F,0>y&&(y=0),p.style.opacity=y/100):(clearInterval(J),"function"==
2
- typeof u&&u(p))},50);return J}return null}function Pa(p,B,u){if(p){var y=p.style.opacity;y*=100;B=parseInt(B/50);0===B&&(B=1);var F=(100-y)/B;5>F&&(F=5);var J=null;return J=setInterval(function(){100>y?(y+=F,100<y&&(y=100),p.style.opacity=y/100):(clearInterval(J),"function"==typeof u&&u(p))},50)}return null}function Qa(p,B){if(!p)return!1;if(p==B)return!0;var u=p.indexOf(B);if(0>u)return!1;if(0<u){if(" "==p.charAt(u-1)&&(p.length-u==B.length||" "==p.charAt(u+B.length)))return!0}else if(" "==p.charAt(B.length))return!0;
3
- return!1}function Ra(p,B,u){var y=new XMLHttpRequest;y.onreadystatechange=function(){4===y.readyState&&(200<=y.status&&300>y.status||304===y.status?B(y.response):"function"===typeof u&&u(y))};y.open("GET",p,!0);y.send(null)}function cb(p){const B=function(J,w,H){for(var K=H.length,N=0;N<K;N++)J.setUint8(w+N,H.charCodeAt(N))};var u=function(){var J=new ArrayBuffer(364);let w=new DataView(J);B(w,0,"RIFF");w.setUint32(4,204,!0);B(w,8,"WAVE");B(w,12,"fmt ");w.setUint32(16,16,!0);w.setUint16(20,1,!0);
4
- w.setUint16(22,1,!0);w.setUint32(24,16E3,!0);w.setUint32(28,32E3,!0);w.setUint16(32,4,!0);w.setUint16(34,16,!0);B(w,36,"data");w.setUint32(40,320,!0);let H=44;for(let K=0;160>K;K++)w.setInt16(H,15,!0),H+=2;J=new Uint8Array(J);return"data:audio/x-wav;base64,"+btoa(String.fromCharCode.apply(null,J))}(),y=new Audio(u),F=L.setTimeout(function(){F=0;"function"===typeof p&&p(!1)},500);y.play().then(function(){F&&L.clearTimeout(F);y.pause();p(!0)}).catch(function(J){F&&L.clearTimeout(F);"function"===typeof p&&
5
- p(!1)})}async function db(p){navigator.clipboard&&navigator.clipboard.write([new ClipboardItem({[p.type]:p})]).then(()=>{console.info("[setClipboard] clipboard suc")}).catch(B=>{console.error("[setClipboard] clipboard err",B)})}function eb(){var p=new Date,B=p.getMonth()+1;10>B&&(B="0"+B);var u=p.getDate();10>u&&(u="0"+u);var y=p.getHours();10>y&&(y="0"+y);var F=p.getMinutes();10>F&&(F="0"+F);var J=p.getSeconds();10>J&&(J="0"+J);var w=p.getMilliseconds();10>w?w="00"+w:100>w&&(w="0"+w);return""+p.getFullYear()+
6
- B+u+y+F+J+w}function fb(p){var B={font_size:.4,font_color:"#FFFFFF",background_alpha:.5,background_color:"#9C27B0",Stroke:"none",body:[]},u=function(w){w=w.split(":");if(3!==w.length)return 0;var H=3600*parseInt(w[0],10),K=60*parseInt(w[1],10),N=parseInt(w[2],10),P=w[2].indexOf(","),Z=0;0<P&&(Z=parseInt(w[2].substr(P+1))/1E3);return H+K+N+Z};p=p.replace(/\r/g,"");p=p.split("\n");for(var y=0;y<p.length-2;){var F={},J=p[y].trim();if(J){F.id=parseInt(J);J=p[y+1].split(" --\x3e ");if(2!==J.length)break;
7
- F.from=u(J[0].trim());F.to=u(J[1].trim());F.location=2;F.content=p[y+2].trim();B.body.push(F);y+=3}else y++}return B}function Sa(p){var B={font_size:.4,font_color:"#FFFFFF",background_alpha:.5,background_color:"#9C27B0",Stroke:"none",body:[]},u=function(w){w=w.split(":");var H=0,K=0;if(3===w.length){H=3600*parseInt(w[0],10);K=60*parseInt(w[1],10);var N=parseInt(w[2],10)}else if(2===w.length)K=60*parseInt(w[0],10),N=parseInt(w[1],10);else if(1===w.length)N=parseInt(w[0],10);else return 0;var P=w.length-
8
- 1,Z=w[P].indexOf("."),ba=0;0<Z&&(ba=parseInt(w[P].substr(Z+1))/1E3);return H+K+N+ba};p=p.replace(/\r/g,"");p=p.split("\n");if(2>p.length||"WEBVTT"!==p[0].substr(0,6)||0!==p[1].trim().length)return null;for(var y=2;y<=p.length-2;){var F={};if(!p[y].startsWith("NOTE")&&""!==p[y].trim()){var J=p[y].split(" --\x3e ");if(2!==J.length&&(J=p[y].trim(),F.id=parseInt(J),y++,J=p[y].split(" --\x3e "),2!==J.length)){y++;continue}F.from=u(J[0].trim());F.to=u(J[1].trim());F.location=2;y++;F.content=p[y].trim();
9
- for(y++;y<p.length;){J=p[y].trim();if(!J)break;F.content+="<br/>"+J;y++}B.body.push(F)}y++}return B}function Ta(p){return!(!p.width()&&!p.height())&&"none"!==p.css("display")}function gb(p,B){var u="smilesFaces-view",y=Da.path+"widgets/smiles/p",F=$$(p);if(!F.hasClass("disabled")){u=F.attr("data-viewid");if(!F.attr("data-viewinit")&&0>=$$("#"+u).length){var J=F.closest(".zwp-barrage_form");p='<div id="'+u+'" style="position:absolute;display:none;z-index:1138;" class="zwp-smileview"><table border="0" cellspacing="0" cellpadding="0"><tr>';
10
- for(var w=1;40>=w;w++){var H="[sm-"+w+"]";p+='<td><img src="'+y+w+'.png" onclick="insertSmile(this,\''+H+"');\" /></td>";0==w%8&&(p+="</tr><tr>")}J.append(p+"</tr></table></div>");F.attr("data-viewinit","1");$$(document).click(function(){$$("#"+u).hide()});$$(L).on("resize",function(){var P=$$("#"+u);Ta(P)&&(F.offset(),P.outerHeight(!1),F.outerWidth(!1),P.outerWidth(!1))})}var K=$$("#"+u);if(Ta(K))K.hide();else{F.offset();K[0].style.opacity=0;K[0].style.display="block";K.outerHeight(!1);F.outerWidth(!1);
11
- K.outerWidth(!1);y=F.parent().children("DIV.zwp-barrage_inp").children(".barrage_inp_text");K.get(0).inputbox=y.get(0);K.css({bottom:"36px",right:"26px"}).show();var N=function(){var P=parseFloat(K[0].style.opacity);1>=P&&(P+=.1,1<P&&(P=1),K[0].style.opacity=P,setTimeout(N,50))};setTimeout(N,50)}if(B=B||L.event)B.preventDefault?(B.preventDefault(),B.stopPropagation()):(L.event.cancelBubble=!0,L.event.returnValue=!1)}}function hb(p,B){if(p.dragableWinInited)"object"===typeof p.zwpDragable&&("oldX"in
12
- p.zwpDragable&&(p.style.left=p.zwpDragable.oldX+"px"),"oldY"in p.zwpDragable&&(p.style.top=p.zwpDragable.oldY+"px"),"oldWidth"in p.zwpDragable&&(p.style.width=p.zwpDragable.oldWidth+"px"),"oldHeight"in p.zwpDragable&&(p.style.height=p.zwpDragable.oldHeight+"px"));else{var u='<div class="zwp-captionbar"><button class="closeBtn" title="'+(qa("closeSmallWindow","Close small window")+'"><i class="xicon xicon-close"></i></button></div><div class="zwp-gripper-right"></div><div class="zwp-gripper-bottom"></div><div class="zwp-gripper-bottom-right"></div>');
13
- p.insertAdjacentHTML("beforeend",u);var y=function(N){N.stopPropagation();N.preventDefault();var P=parseInt(p.offsetLeft),Z=parseInt(p.offsetTop),ba=N.pageX,aa=N.pageY,fa=L.innerWidth-p.offsetWidth-20,ma=L.innerHeight-p.offsetHeight-20,Y=function(ia){var na=P+ia.pageX-ba;ia=Z+ia.pageY-aa;0>na&&(na=0);0>ia&&(ia=0);na>fa&&(na=fa);ia>ma&&(ia=ma);p.style.left=na+"px";p.style.top=ia+"px";"object"===typeof p.zwpDragable&&(p.zwpDragable.oldX=na,p.zwpDragable.oldY=ia)},ka=function(ia){document.removeEventListener("mousemove",
14
- Y);document.removeEventListener("mouseup",ka)};document.addEventListener("mousemove",Y);document.addEventListener("mouseup",ka)};u=function(N){N.stopPropagation();N.preventDefault();var P=p.offsetWidth,Z=N.pageX,ba=function(fa){fa=P+fa.pageX-Z;200>fa&&(fa=200);p.style.width=fa+"px";"object"===typeof p.zwpDragable&&(p.zwpDragable.oldWidth=fa)},aa=function(fa){document.removeEventListener("mousemove",ba);document.removeEventListener("mouseup",aa)};document.addEventListener("mousemove",ba);document.addEventListener("mouseup",
15
- aa)};var F=function(N){N.stopPropagation();N.preventDefault();var P=p.offsetHeight,Z=N.pageY,ba=function(fa){fa=P+fa.pageY-Z;180>fa&&(fa=180);p.style.height=fa+"px";"object"===typeof p.zwpDragable&&(p.zwpDragable.oldHeight=fa)},aa=function(fa){document.removeEventListener("mousemove",ba);document.removeEventListener("mouseup",aa)};document.addEventListener("mousemove",ba);document.addEventListener("mouseup",aa)},J=function(N){N.stopPropagation();N.preventDefault();var P=p.offsetWidth,Z=p.offsetHeight,
16
- ba=N.pageX,aa=N.pageY,fa=function(Y){var ka=P+Y.pageX-ba;200>ka&&(ka=200);Y=Z+Y.pageY-aa;180>Y&&(Y=180);p.style.width=ka+"px";p.style.height=Y+"px";"object"===typeof p.zwpDragable&&(p.zwpDragable.oldWidth=ka,p.zwpDragable.oldHeight=Y)},ma=function(Y){document.removeEventListener("mousemove",fa);document.removeEventListener("mouseup",ma)};document.addEventListener("mousemove",fa);document.addEventListener("mouseup",ma)};p.zwpDragable={};var w=p.querySelector(".zwp-captionbar");if(w){var H=w.querySelector(".closeBtn");
17
- if(H){var K=B||function(){};H.addEventListener("click",function(N){N.preventDefault();N.stopPropagation();K(p)})}w.addEventListener("mousedown",y);p.zwpDragable.doc_mousedown=y}B=p.querySelector(".zwp-gripper-right");y=p.querySelector(".zwp-gripper-bottom");w=p.querySelector(".zwp-gripper-bottom-right");B&&(B.addEventListener("mousedown",u),p.zwpDragable.gripperR_mousedown=u);y&&(y.addEventListener("mousedown",F),p.zwpDragable.gripperB_mousedown=F);w&&(w.addEventListener("mousedown",J),p.zwpDragable.gripperBR_mousedown=
18
- J);p.dragableWinInited=!0}}(function(p){var B=!1,u=!1,y=0,F=2E3,J=0,w=document,H=p(L),K=[],N=L.requestAnimationFrame||L.webkitRequestAnimationFrame||L.mozRequestAnimationFrame||!1,P=L.cancelAnimationFrame||L.webkitCancelAnimationFrame||L.mozCancelAnimationFrame||!1;if(N)L.cancelAnimationFrame||(P=function(e){});else{var Z=0;N=function(e,n){var m=(new Date).getTime(),c=Math.max(0,16-(m-Z));n=L.setTimeout(function(){e(m+c)},c);Z=m+c;return n};P=function(e){L.clearTimeout(e)}}var ba=L.MutationObserver||
19
- L.WebKitMutationObserver||!1,aa=Date.now||function(){return(new Date).getTime()},fa={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,
1
+ (function(K){function Na(){return document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||!1}function bb(n,B,v){var y=new Date;y.setTime(y.getTime()+v*24*60*60*1E3);v="expires="+y.toGMTString();document.cookie=n+"="+B+"; "+v}function Ga(n,B,v){if(n){var y=parseInt(n.style.opacity)||1;y*=100;B=parseInt(B/50);B===0&&(B=1);var F=y/B;F<5&&(F=5);var J=setInterval(function(){y>0?(y-=F,y<0&&(y=0),n.style.opacity=y/100):(clearInterval(J),
2
+ typeof v=="function"&&v(n))},50);return J}return null}function Pa(n,B,v){if(n){var y=n.style.opacity;y*=100;B=parseInt(B/50);B===0&&(B=1);var F=(100-y)/B;F<5&&(F=5);var J=null;return J=setInterval(function(){y<100?(y+=F,y>100&&(y=100),n.style.opacity=y/100):(clearInterval(J),typeof v=="function"&&v(n))},50)}return null}function Qa(n,B){if(!n)return!1;if(n==B)return!0;var v=n.indexOf(B);if(v<0)return!1;if(v>0){if(n.charAt(v-1)==" "&&(n.length-v==B.length||n.charAt(v+B.length)==" "))return!0}else if(n.charAt(B.length)==
3
+ " ")return!0;return!1}function Ra(n,B,v){var y=new XMLHttpRequest;y.onreadystatechange=function(){y.readyState===4&&(y.status>=200&&y.status<300||y.status===304?B(y.response):typeof v==="function"&&v(y))};y.open("GET",n,!0);y.send(null)}function cb(n){const B=function(J,x,I){for(var L=I.length,N=0;N<L;N++)J.setUint8(x+N,I.charCodeAt(N))};var v=function(){var J=new ArrayBuffer(364);let x=new DataView(J);B(x,0,"RIFF");x.setUint32(4,204,!0);B(x,8,"WAVE");B(x,12,"fmt ");x.setUint32(16,16,!0);x.setUint16(20,
4
+ 1,!0);x.setUint16(22,1,!0);x.setUint32(24,16E3,!0);x.setUint32(28,32E3,!0);x.setUint16(32,4,!0);x.setUint16(34,16,!0);B(x,36,"data");x.setUint32(40,320,!0);let I=44;for(let L=0;L<160;L++)x.setInt16(I,15,!0),I+=2;J=new Uint8Array(J);return"data:audio/x-wav;base64,"+btoa(String.fromCharCode.apply(null,J))}(),y=new Audio(v),F=K.setTimeout(function(){F=0;typeof n==="function"&&n(!1)},500);y.play().then(function(){F&&K.clearTimeout(F);y.pause();n(!0)}).catch(function(J){F&&K.clearTimeout(F);typeof n===
5
+ "function"&&n(!1)})}async function db(n){navigator.clipboard&&navigator.clipboard.write([new ClipboardItem({[n.type]:n})]).then(()=>{console.info("[setClipboard] clipboard suc")}).catch(B=>{console.error("[setClipboard] clipboard err",B)})}function eb(){var n=new Date,B=n.getMonth()+1;B<10&&(B="0"+B);var v=n.getDate();v<10&&(v="0"+v);var y=n.getHours();y<10&&(y="0"+y);var F=n.getMinutes();F<10&&(F="0"+F);var J=n.getSeconds();J<10&&(J="0"+J);var x=n.getMilliseconds();x<10?x="00"+x:x<100&&(x="0"+x);
6
+ return""+n.getFullYear()+B+v+y+F+J+x}function fb(n){var B={font_size:.4,font_color:"#FFFFFF",background_alpha:.5,background_color:"#9C27B0",Stroke:"none",body:[]},v=function(x){x=x.split(":");if(x.length!==3)return 0;var I=parseInt(x[0],10)*3600,L=parseInt(x[1],10)*60,N=parseInt(x[2],10),Q=x[2].indexOf(","),Z=0;Q>0&&(Z=parseInt(x[2].substr(Q+1))/1E3);return I+L+N+Z};n=n.replace(/\r/g,"");n=n.split("\n");for(var y=0;y<n.length-2;){var F={},J=n[y].trim();if(J){F.id=parseInt(J);J=n[y+1].split(" --\x3e ");
7
+ if(J.length!==2)break;F.from=v(J[0].trim());F.to=v(J[1].trim());F.location=2;F.content=n[y+2].trim();B.body.push(F);y+=3}else y++}return B}function Sa(n){var B={font_size:.4,font_color:"#FFFFFF",background_alpha:.5,background_color:"#9C27B0",Stroke:"none",body:[]},v=function(x){x=x.split(":");var I=0,L=0;if(x.length===3){I=parseInt(x[0],10)*3600;L=parseInt(x[1],10)*60;var N=parseInt(x[2],10)}else if(x.length===2)L=parseInt(x[0],10)*60,N=parseInt(x[1],10);else if(x.length===1)N=parseInt(x[0],10);else return 0;
8
+ var Q=x.length-1,Z=x[Q].indexOf("."),ca=0;Z>0&&(ca=parseInt(x[Q].substr(Z+1))/1E3);return I+L+N+ca};n=n.replace(/\r/g,"");n=n.split("\n");if(n.length<2||n[0].substr(0,6)!=="WEBVTT"||n[1].trim().length!==0)return null;for(var y=2;y<=n.length-2;){var F={};if(!n[y].startsWith("NOTE")&&n[y].trim()!==""){var J=n[y].split(" --\x3e ");if(J.length!==2&&(J=n[y].trim(),F.id=parseInt(J),y++,J=n[y].split(" --\x3e "),J.length!==2)){y++;continue}F.from=v(J[0].trim());F.to=v(J[1].trim());F.location=2;y++;F.content=
9
+ n[y].trim();for(y++;y<n.length;){J=n[y].trim();if(!J)break;F.content+="<br/>"+J;y++}B.body.push(F)}y++}return B}function Ta(n){return!(!n.width()&&!n.height())&&n.css("display")!=="none"}function gb(n,B){var v="smilesFaces-view",y=Da.path+"widgets/smiles/p",F=$$(n);if(!F.hasClass("disabled")){v=F.attr("data-viewid");if(!F.attr("data-viewinit")&&$$("#"+v).length<=0){var J=F.closest(".zwp-barrage_form");n='<div id="'+v+'" style="position:absolute;display:none;z-index:1138;" class="zwp-smileview"><table border="0" cellspacing="0" cellpadding="0"><tr>';
10
+ for(var x=1;x<=40;x++){var I="[sm-"+x+"]";n+='<td><img src="'+y+x+'.png" onclick="insertSmile(this,\''+I+"');\" /></td>";x%8==0&&(n+="</tr><tr>")}J.append(n+"</tr></table></div>");F.attr("data-viewinit","1");$$(document).click(function(){$$("#"+v).hide()});$$(K).on("resize",function(){var Q=$$("#"+v);Ta(Q)&&(F.offset(),Q.outerHeight(!1),F.outerWidth(!1),Q.outerWidth(!1))})}var L=$$("#"+v);if(Ta(L))L.hide();else{F.offset();L[0].style.opacity=0;L[0].style.display="block";L.outerHeight(!1);F.outerWidth(!1);
11
+ L.outerWidth(!1);y=F.parent().children("DIV.zwp-barrage_inp").children(".barrage_inp_text");L.get(0).inputbox=y.get(0);L.css({bottom:"36px",right:"26px"}).show();var N=function(){var Q=parseFloat(L[0].style.opacity);Q<=1&&(Q+=.1,Q>1&&(Q=1),L[0].style.opacity=Q,setTimeout(N,50))};setTimeout(N,50)}if(B=B||K.event)B.preventDefault?(B.preventDefault(),B.stopPropagation()):(K.event.cancelBubble=!0,K.event.returnValue=!1)}}function hb(n,B){if(n.dragableWinInited)typeof n.zwpDragable==="object"&&("oldX"in
12
+ n.zwpDragable&&(n.style.left=n.zwpDragable.oldX+"px"),"oldY"in n.zwpDragable&&(n.style.top=n.zwpDragable.oldY+"px"),"oldWidth"in n.zwpDragable&&(n.style.width=n.zwpDragable.oldWidth+"px"),"oldHeight"in n.zwpDragable&&(n.style.height=n.zwpDragable.oldHeight+"px"));else{var v='<div class="zwp-captionbar"><button class="closeBtn" title="'+(pa("closeSmallWindow","Close small window")+'"><i class="xicon xicon-close"></i></button></div><div class="zwp-gripper-right"></div><div class="zwp-gripper-bottom"></div><div class="zwp-gripper-bottom-right"></div>');
13
+ n.insertAdjacentHTML("beforeend",v);var y=function(N){N.stopPropagation();N.preventDefault();var Q=parseInt(n.offsetLeft),Z=parseInt(n.offsetTop),ca=N.pageX,aa=N.pageY,ha=K.innerWidth-n.offsetWidth-20,ma=K.innerHeight-n.offsetHeight-20,W=function(ia){var qa=Q+ia.pageX-ca;ia=Z+ia.pageY-aa;qa<0&&(qa=0);ia<0&&(ia=0);qa>ha&&(qa=ha);ia>ma&&(ia=ma);n.style.left=qa+"px";n.style.top=ia+"px";typeof n.zwpDragable==="object"&&(n.zwpDragable.oldX=qa,n.zwpDragable.oldY=ia)},ka=function(ia){document.removeEventListener("mousemove",
14
+ W);document.removeEventListener("mouseup",ka)};document.addEventListener("mousemove",W);document.addEventListener("mouseup",ka)};v=function(N){N.stopPropagation();N.preventDefault();var Q=n.offsetWidth,Z=N.pageX,ca=function(ha){ha=Q+ha.pageX-Z;ha<200&&(ha=200);n.style.width=ha+"px";typeof n.zwpDragable==="object"&&(n.zwpDragable.oldWidth=ha)},aa=function(ha){document.removeEventListener("mousemove",ca);document.removeEventListener("mouseup",aa)};document.addEventListener("mousemove",ca);document.addEventListener("mouseup",
15
+ aa)};var F=function(N){N.stopPropagation();N.preventDefault();var Q=n.offsetHeight,Z=N.pageY,ca=function(ha){ha=Q+ha.pageY-Z;ha<180&&(ha=180);n.style.height=ha+"px";typeof n.zwpDragable==="object"&&(n.zwpDragable.oldHeight=ha)},aa=function(ha){document.removeEventListener("mousemove",ca);document.removeEventListener("mouseup",aa)};document.addEventListener("mousemove",ca);document.addEventListener("mouseup",aa)},J=function(N){N.stopPropagation();N.preventDefault();var Q=n.offsetWidth,Z=n.offsetHeight,
16
+ ca=N.pageX,aa=N.pageY,ha=function(W){var ka=Q+W.pageX-ca;ka<200&&(ka=200);W=Z+W.pageY-aa;W<180&&(W=180);n.style.width=ka+"px";n.style.height=W+"px";typeof n.zwpDragable==="object"&&(n.zwpDragable.oldWidth=ka,n.zwpDragable.oldHeight=W)},ma=function(W){document.removeEventListener("mousemove",ha);document.removeEventListener("mouseup",ma)};document.addEventListener("mousemove",ha);document.addEventListener("mouseup",ma)};n.zwpDragable={};var x=n.querySelector(".zwp-captionbar");if(x){var I=x.querySelector(".closeBtn");
17
+ if(I){var L=B||function(){};I.addEventListener("click",function(N){N.preventDefault();N.stopPropagation();L(n)})}x.addEventListener("mousedown",y);n.zwpDragable.doc_mousedown=y}B=n.querySelector(".zwp-gripper-right");y=n.querySelector(".zwp-gripper-bottom");x=n.querySelector(".zwp-gripper-bottom-right");B&&(B.addEventListener("mousedown",v),n.zwpDragable.gripperR_mousedown=v);y&&(y.addEventListener("mousedown",F),n.zwpDragable.gripperB_mousedown=F);x&&(x.addEventListener("mousedown",J),n.zwpDragable.gripperBR_mousedown=
18
+ J);n.dragableWinInited=!0}}(function(n){var B=!1,v=!1,y=0,F=2E3,J=0,x=document,I=n(K),L=[],N=K.requestAnimationFrame||K.webkitRequestAnimationFrame||K.mozRequestAnimationFrame||!1,Q=K.cancelAnimationFrame||K.webkitCancelAnimationFrame||K.mozCancelAnimationFrame||!1;if(N)K.cancelAnimationFrame||(Q=function(T){});else{var Z=0;N=function(T,e){var l=(new Date).getTime(),m=Math.max(0,16-(l-Z));e=K.setTimeout(function(){T(l+m)},m);Z=l+m;return e};Q=function(T){K.clearTimeout(T)}}var ca=K.MutationObserver||
19
+ K.WebKitMutationObserver||!1,aa=Date.now||function(){return(new Date).getTime()},ha={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,
20
20
  railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,rightdock:0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",
21
- scriptpath:function(){var e;(e=w.currentScript)||(e=w.getElementsByTagName("script"),e=e.length?e[e.length-1]:!1);e=e?e.src.split("?")[0]:"";return 0<e.split("/").length?e.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1,scrollCLass:!1},ma=!1,Y=function(){if(ma)return ma;var e=w.createElement("DIV"),n=e.style,m=navigator.userAgent,c=navigator.platform,l={};l.haspointerlock="pointerLockElement"in w||"webkitPointerLockElement"in
22
- w||"mozPointerLockElement"in w;l.isopera="opera"in L;l.isopera12=l.isopera&&"getUserMedia"in navigator;l.isoperamini="[object OperaMini]"===Object.prototype.toString.call(L.operamini);l.isie="all"in w&&"attachEvent"in e&&!l.isopera;l.isieold=l.isie&&!("msInterpolationMode"in n);l.isie7=l.isie&&!l.isieold&&(!("documentMode"in w)||7===w.documentMode);l.isie8=l.isie&&"documentMode"in w&&8===w.documentMode;l.isie9=l.isie&&"performance"in L&&9===w.documentMode;l.isie10=l.isie&&"performance"in L&&10===
23
- w.documentMode;l.isie11="msRequestFullscreen"in e&&11<=w.documentMode;l.ismsedge="msCredentials"in L;l.ismozilla="MozAppearance"in n;l.iswebkit=!l.ismsedge&&"WebkitAppearance"in n;l.ischrome=l.iswebkit&&"chrome"in L;l.ischrome38=l.ischrome&&"touchAction"in n;l.ischrome22=!l.ischrome38&&l.ischrome&&l.haspointerlock;l.ischrome26=!l.ischrome38&&l.ischrome&&"transition"in n;l.cantouch="ontouchstart"in w.documentElement||"ontouchstart"in L;l.hasw3ctouch=(L.PointerEvent||!1)&&(0<navigator.maxTouchPoints||
24
- 0<navigator.msMaxTouchPoints);l.hasmstouch=!l.hasw3ctouch&&(L.MSPointerEvent||!1);l.ismac=/^mac$/i.test(c);l.isios=l.cantouch&&/iphone|ipad|ipod/i.test(c);l.isios4=l.isios&&!("seal"in Object);l.isios7=l.isios&&"webkitHidden"in w;l.isios8=l.isios&&"hidden"in w;l.isios10=l.isios&&L.Proxy;l.isandroid=/android/i.test(m);l.haseventlistener="addEventListener"in e;l.trstyle=!1;l.hastransform=!1;l.hastranslate3d=!1;l.transitionstyle=!1;l.hastransition=!1;l.transitionend=!1;l.trstyle="transform";l.hastransform=
25
- "transform"in n||function(){for(var v=["msTransform","webkitTransform","MozTransform","OTransform"],A=0,M=v.length;A<M;A++)if(void 0!==n[v[A]]){l.trstyle=v[A];break}l.hastransform=!!l.trstyle}();l.hastransform&&(n[l.trstyle]="translate3d(1px,2px,3px)",l.hastranslate3d=/translate3d/.test(n[l.trstyle]));l.transitionstyle="transition";l.prefixstyle="";l.transitionend="transitionend";l.hastransition="transition"in n||function(){l.transitionend=!1;for(var v="webkitTransition msTransition MozTransition OTransition OTransition KhtmlTransition".split(" "),
26
- A="-webkit- -ms- -moz- -o- -o -khtml-".split(" "),M="webkitTransitionEnd msTransitionEnd transitionend otransitionend oTransitionEnd KhtmlTransitionEnd".split(" "),b=0,Q=v.length;b<Q;b++)if(v[b]in n){l.transitionstyle=v[b];l.prefixstyle=A[b];l.transitionend=M[b];break}l.ischrome26&&(l.prefixstyle=A[1]);l.hastransition=l.transitionstyle}();l.cursorgrabvalue=function(){var v=["grab","-webkit-grab","-moz-grab"];if(l.ischrome&&!l.ischrome38||l.isie)v=[];for(var A=0,M=v.length;A<M;A++){var b=v[A];n.cursor=
27
- b;if(n.cursor==b)return b}return"url("+(fa.scriptpath+"css/openhand.cur),n-resize")}();l.hasmousecapture="setCapture"in e;l.hasMutationObserver=!1!==ba;e=null;return ma=l},ka=function(e,n){function m(){var g=b.doc.css(I.trstyle);return g&&"matrix"==g.substr(0,6)?g.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}function c(){var g=b.win;if("zIndex"in g)return g.zIndex();for(;0<g.length&&9!=g[0].nodeType;){var t=g.css("zIndex");if(!isNaN(t)&&0!==t)return parseInt(t);g=g.parent()}return!1}
28
- function l(g,t,x){t=g.css(t);g=parseFloat(t);return isNaN(g)?(g=h[t]||0,x=3==g?x?b.win.outerHeight()-b.win.innerHeight():b.win.outerWidth()-b.win.innerWidth():1,b.isie8&&g&&(g+=1),x?g:0):g}function v(g,t,x,f){b._bind(g,t,function(r){r=r||L.event;var D={original:r,target:r.target||r.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==r.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){r.preventDefault?r.preventDefault():r.returnValue=!1;return!1},stopImmediatePropagation:function(){r.stopImmediatePropagation?
29
- r.stopImmediatePropagation():r.cancelBubble=!0}};"mousewheel"==t?(r.wheelDeltaX&&(D.deltaX=-.025*r.wheelDeltaX),r.wheelDeltaY&&(D.deltaY=-.025*r.wheelDeltaY),D.deltaY||D.deltaX||(D.deltaY=-.025*r.wheelDelta)):D.deltaY=r.detail;return x.call(g,D)},f)}function A(g,t,x,f){b.scrollrunning||(b.newscrolly=b.getScrollTop(),b.newscrollx=b.getScrollLeft(),S=aa());var r=aa()-S;S=aa();T=350<r?1:T+(2-T)/10;g=g*T|0;t=t*T|0;if(g){if(f)if(0>g){if(b.getScrollLeft()>=b.page.maxw)return!0}else if(0>=b.getScrollLeft())return!0;
30
- f=0<g?1:-1;U!==f&&(b.scrollmom&&b.scrollmom.stop(),b.newscrollx=b.getScrollLeft(),U=f);b.lastdeltax-=g}if(t){if(function(){var D=b.getScrollTop();if(0>t){if(D>=b.page.maxh)return!0}else if(0>=D)return!0}()){if(z.nativeparentscrolling&&x&&!b.ispage&&!b.zoomactive)return!0;x=b.view.h>>1;b.newscrolly<-x?(b.newscrolly=-x,t=-1):b.newscrolly>b.page.maxh+x?(b.newscrolly=b.page.maxh+x,t=1):t=0}x=0<t?1:-1;O!==x&&(b.scrollmom&&b.scrollmom.stop(),b.newscrolly=b.getScrollTop(),O=x);b.lastdeltay-=t}(t||g)&&b.synched("relativexy",
31
- function(){var D=b.lastdeltay+b.newscrolly;b.lastdeltay=0;var R=b.lastdeltax+b.newscrollx;b.lastdeltax=0;b.rail.drag||b.doScrollPos(R,D)})}function M(g,t,x){if(!x&&V)return!0;if(0===g.deltaMode){var f=-(z.mousescrollstep/54*g.deltaX)|0;var r=-(z.mousescrollstep/54*g.deltaY)|0}else 1===g.deltaMode&&(f=-(g.deltaX*z.mousescrollstep*50/80)|0,r=-(g.deltaY*z.mousescrollstep*50/80)|0);t&&z.oneaxismousemode&&0===f&&r&&(f=r,r=0,x&&(0>f?b.getScrollLeft()>=b.page.maxw:0>=b.getScrollLeft())&&(r=f,f=0));b.isrtlmode&&
32
- (f=-f);if(A(f,r,x,!0))x&&(V=!0);else return V=!1,g.stopImmediatePropagation(),g.preventDefault()}var b=this;this.version="3.7.6";this.name="nicescroll";this.me=n;var Q=p("body"),z=this.opt={doc:Q,win:!1};p.extend(z,fa);z.snapbackspeed=80;if(e)for(var la in z)void 0!==e[la]&&(z[la]=e[la]);z.disablemutationobserver&&(ba=!1);this.iddoc=(this.doc=z.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/^BODY|HTML/.test(z.win?z.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=!1!==z.win;this.win=z.win||
33
- (this.ispage?H:this.doc);this.docscroll=this.ispage&&!this.haswrapper?H:this.win;this.body=Q;this.iframe=this.isfixed=this.viewport=!1;this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName;this.istextarea="TEXTAREA"==this.win[0].nodeName;this.forcescreen=!1;this.canshowonmouseevent="scroll"!=z.autohidemode;this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=this.onmousewheel=
34
- this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;"auto"==z.rtlmode?(e=this.win[0]==L?this.body:this.win,n=e.css("writing-mode")||e.css("-webkit-writing-mode")||e.css("-ms-writing-mode")||e.css("-moz-writing-mode"),"horizontal-tb"==n||"lr-tb"==n||""===n?(this.isrtlmode="rtl"==e.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==n||"tb"==n||"tb-rl"==n||"rl-tb"==n,this.isvertical="vertical-rl"==
35
- n||"tb"==n||"tb-rl"==n)):(this.isrtlmode=!0===z.rtlmode,this.isvertical=!1);this.observerbody=this.observerremover=this.observer=this.scrollmom=this.scrollrunning=!1;if(!1!==z.scrollbarid)this.id=z.scrollbarid;else{do this.id="ascrail"+F++;while(w.getElementById(this.id))}this.hidden=this.locked=this.railslocked=this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1;this.cursoractive=!0;this.wheelprevented=!1;this.overflowx=z.overflowx;
36
- this.overflowy=z.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=Y();var I=p.extend({},this.detected);this.ishwscroll=(this.canhwscroll=I.hastransform&&z.hwacceleration)&&b.haswrapper;this.hasreversehr=this.isrtlmode?this.isvertical?!(I.iswebkit||I.isie||I.isie11):!(I.iswebkit||I.isie&&!I.isie10&&!I.isie11):!1;this.istouchcapable=!1;I.cantouch||!I.hasw3ctouch&&!I.hasmstouch?!I.cantouch||
37
- I.isios||I.isandroid||!I.iswebkit&&!I.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0;z.enablemouselockapi||(I.hasmousecapture=!1,I.haspointerlock=!1);this.debounced=function(g,t,x){b&&(b.delaylist[g]||(b.delaylist[g]={h:N(function(){b.delaylist[g].fn.call(b);b.delaylist[g]=!1},x)},t.call(b)),b.delaylist[g].fn=t)};this.synched=function(g,t){b.synclist[g]?b.synclist[g]=t:(b.synclist[g]=t,N(function(){b&&(b.synclist[g]&&b.synclist[g].call(b),b.synclist[g]=null)}))};this.unsynched=function(g){b.synclist[g]&&
38
- (b.synclist[g]=!1)};this.css=function(g,t){for(var x in t)b.saved.css.push([g,x,g.css(x)]),g.css(x,t[x])};this.scrollTop=function(g){return void 0===g?b.getScrollTop():b.setScrollTop(g)};this.scrollLeft=function(g){return void 0===g?b.getScrollLeft():b.setScrollLeft(g)};var ja=function(g,t,x,f,r,D,R){this.st=g;this.ed=t;this.spd=x;this.p1=f||0;this.p2=r||1;this.p3=D||0;this.p4=R||1;this.ts=aa();this.df=t-g};ja.prototype={B2:function(g){return 3*(1-g)*(1-g)*g},B3:function(g){return 3*(1-g)*g*g},B4:function(g){return g*
39
- g*g},getPos:function(){return(aa()-this.ts)/this.spd},getNow:function(){var g=(aa()-this.ts)/this.spd,t=this.B2(g)+this.B3(g)+this.B4(g);return 1<=g?this.ed:this.st+this.df*t|0},update:function(g,t){this.st=this.getNow();this.ed=g;this.spd=t;this.ts=aa();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};I.hastranslate3d&&I.isios&&this.doc.css("-webkit-backface-visibility","hidden");this.getScrollTop=function(g){if(!g){if(g=m())return 16==g.length?
40
- -g[13]:-g[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y};this.getScrollLeft=function(g){if(!g){if(g=m())return 16==g.length?-g[12]:-g[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x};this.notifyScrollEvent=function(g){var t=w.createEvent("UIEvents");t.initUIEvent("scroll",!1,!1,L,1);t.niceevent=!0;g.dispatchEvent(t)};var d=this.isrtlmode?1:-1;I.hastranslate3d&&z.enabletranslate3d?(this.setScrollTop=function(g,
41
- t){b.doc.translate.y=g;b.doc.translate.ty=-1*g+"px";b.doc.css(I.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)");t||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(g,t){b.doc.translate.x=g;b.doc.translate.tx=g*d+"px";b.doc.css(I.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)");t||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(g,t){b.doc.translate.y=g;b.doc.translate.ty=-1*g+"px";b.doc.css(I.trstyle,"translate("+b.doc.translate.tx+
42
- ","+b.doc.translate.ty+")");t||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(g,t){b.doc.translate.x=g;b.doc.translate.tx=g*d+"px";b.doc.css(I.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");t||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=function(){return b.docscroll.scrollTop()},this.setScrollTop=function(g){b.docscroll.scrollTop(g)},this.getScrollLeft=function(){return b.hasreversehr?b.detected.ismozilla?b.page.maxw-Math.abs(b.docscroll.scrollLeft()):b.page.maxw-
43
- b.docscroll.scrollLeft():b.docscroll.scrollLeft()},this.setScrollLeft=function(g){return setTimeout(function(){if(b)return b.hasreversehr&&(g=b.detected.ismozilla?-(b.page.maxw-g):b.page.maxw-g),b.docscroll.scrollLeft(g)},1)};this.getTarget=function(g){return g?g.target?g.target:g.srcElement?g.srcElement:!1:!1};this.hasParent=function(g,t){if(!g)return!1;for(g=g.target||g.srcElement||g||!1;g&&g.id!=t;)g=g.parentNode||!1;return!1!==g};var h={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:L.pageYOffset||
44
- w.documentElement.scrollTop,left:L.pageXOffset||w.documentElement.scrollLeft}};this.getOffset=function(){if(b.isfixed){var g=b.win.offset(),t=b.getDocumentScrollOffset();g.top-=t.top;g.left-=t.left;return g}g=b.win.offset();if(!b.viewport)return g;t=b.viewport.offset();return{top:g.top-t.top,left:g.left-t.left}};this.updateScrollBar=function(g){var t;if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()-(z.railpadding.top+z.railpadding.bottom)}),b.railh&&b.railh.css({width:b.win.innerWidth()-(z.railpadding.left+
45
- z.railpadding.right)});else{var x=b.getOffset();var f=x.top;var r=x.left-(z.railpadding.left+z.railpadding.right);f+=l(b.win,"border-top-width",!0);r+=b.rail.align?b.win.outerWidth()-l(b.win,"border-right-width")-b.rail.width:l(b.win,"border-left-width");if(t=z.railoffset)t.top&&(f+=t.top),t.left&&(r+=t.left);g=(g?g.h:b.win.innerHeight())-(z.railpadding.top+z.railpadding.bottom);t="left";var D=r;"number"===typeof z.rightdock&&(t="right",D=z.rightdock);b.railslocked||b.rail.css({top:f,[t]:D,height:g});
46
- b.zoom&&b.zoom.css({top:f+1,left:1==b.rail.align?r-20:r+b.rail.width+4});if(b.railh&&!b.railslocked){f=x.top;r=x.left;if(t=z.railhoffset)t.top&&(f+=t.top),t.left&&(r+=t.left);f=b.railh.align?f+l(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:f+l(b.win,"border-top-width",!0);r+=l(b.win,"border-left-width");b.railh.css({top:f-(z.railpadding.top+z.railpadding.bottom),left:r,width:b.railh.width})}}};this.doRailClick=function(g,t,x){if(!b.railslocked)if(b.cancelEvent(g),"pageY"in g||(g.pageX=
47
- g.clientX+w.documentElement.scrollLeft,g.pageY=g.clientY+w.documentElement.scrollTop),t){t=x?b.doScrollLeft:b.doScrollTop;var f=x?(g.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(g.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y;b.unsynched("relativexy");t(f|0)}else t=x?b.doScrollLeftBy:b.doScrollBy,f=x?b.scroll.x:b.scroll.y,g=x?g.pageX-b.railh.offset().left:g.pageY-b.rail.offset().top,x=x?b.view.w:b.view.h,t(f>=g?x:-x)};b.newscrolly=b.newscrollx=0;b.hasanimationframe=
48
- "requestAnimationFrame"in L;b.hascancelanimationframe="cancelAnimationFrame"in L;b.hasborderbox=!1;this.init=function(){b.saved.css=[];if(I.isoperamini||I.isandroid&&!("hidden"in w))return!0;z.emulatetouch=z.emulatetouch||z.touchbehavior;b.hasborderbox=L.getComputedStyle&&"border-box"===L.getComputedStyle(w.body)["box-sizing"];var g={"overflow-y":"hidden"};if(I.isie11||I.isie10)g["-ms-overflow-style"]="none";b.ishwscroll&&(this.doc.css(I.transitionstyle,I.prefixstyle+"transform 0ms ease-out"),I.transitionend&&
49
- b.bind(b.doc,I.transitionend,b.onScrollTransitionEnd,!1));b.zindex="auto";b.zindex=b.ispage||"auto"!=z.zindex?z.zindex:c()||"auto";!b.ispage&&"auto"!=b.zindex&&b.zindex>J&&(J=b.zindex);b.isie&&0===b.zindex&&"auto"==z.zindex&&(b.zindex="auto");if(!b.ispage||!I.isieold){var t=b.docscroll;b.ispage&&(t=b.haswrapper?b.win:b.doc);b.css(t,g);b.ispage&&(I.isie11||I.isie)&&b.css(p("html"),g);!I.isios||b.ispage||b.haswrapper||b.css(Q,{"-webkit-overflow-scrolling":"touch"});var x=p(w.createElement("div"));x.css({position:"relative",
50
- top:0,"float":"right",width:z.cursorwidth,height:0,"background-color":z.cursorcolor,border:z.cursorborder,"background-clip":"padding-box","-webkit-border-radius":z.cursorborderradius,"-moz-border-radius":z.cursorborderradius,"border-radius":z.cursorborderradius});x.addClass("nicescroll-cursors");b.cursor=x;var f=p(w.createElement("div"));f.attr("id",b.id);f.addClass("nicescroll-rails nicescroll-rails-vr");z.scrollCLass&&f.addClass(z.scrollCLass);var r,D=["left","right","top","bottom"],R;for(R in D){var ea=
51
- D[R];(r=z.railpadding[ea]||0)&&f.css("padding-"+ea,r+"px")}f.append(x);f.width=Math.max(parseFloat(z.cursorwidth),x.outerWidth());f.css({width:f.width+"px",zIndex:b.zindex,background:z.background,cursor:"default"});f.visibility=!0;f.scrollable=!0;f.align="left"==z.railalign?0:1;b.rail=f;x=b.rail.drag=!1;!z.boxzoom||b.ispage||I.isieold||(x=w.createElement("div"),b.bind(x,"click",b.doZoom),b.bind(x,"mouseenter",function(){b.zoom.css("opacity",z.cursoropacitymax)}),b.bind(x,"mouseleave",function(){b.zoom.css("opacity",
52
- z.cursoropacitymin)}),b.zoom=p(x),b.zoom.css({cursor:"pointer",zIndex:b.zindex,backgroundImage:"url("+z.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),z.dblclickzoom&&b.bind(b.win,"dblclick",b.doZoom),I.cantouch&&z.gesturezoom&&(b.ongesturezoom=function(E){1.5<E.scale&&b.doZoomIn(E);.8>E.scale&&b.doZoomOut(E);return b.cancelEvent(E)},b.bind(b.win,"gestureend",b.ongesturezoom)));b.railh=!1;if(z.horizrailenabled){b.css(t,{overflowX:"hidden"});x=p(w.createElement("div"));x.css({position:"absolute",
53
- top:0,height:z.cursorwidth,width:0,backgroundColor:z.cursorcolor,border:z.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":z.cursorborderradius,"-moz-border-radius":z.cursorborderradius,"border-radius":z.cursorborderradius});I.isieold&&x.css("overflow","hidden");x.addClass("nicescroll-cursors");b.cursorh=x;var da=p(w.createElement("div"));da.attr("id",b.id+"-hr");da.addClass("nicescroll-rails nicescroll-rails-hr");z.scrollCLass&&da.addClass(z.scrollCLass);da.height=Math.max(parseFloat(z.cursorwidth),
54
- x.outerHeight());da.css({height:da.height+"px",zIndex:b.zindex,background:z.background});da.append(x);da.visibility=!0;da.scrollable=!0;da.align="top"==z.railvalign?0:1;b.railh=da;b.railh.drag=!1}b.ispage?(f.css({position:"fixed",top:0,height:"100%"}),f.css(f.align?{right:0}:{left:0}),b.body.append(f),b.railh&&(da.css({position:"fixed",left:0,width:"100%"}),da.css(da.align?{bottom:0}:{top:0}),b.body.append(da))):(b.ishwscroll?("static"==b.win.css("position")&&b.css(b.win,{position:"relative"}),t=
55
- "HTML"==b.win[0].nodeName?b.body:b.win,p(t).scrollTop(0).scrollLeft(0),b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":f.width+4}),t.append(b.zoom)),f.css({position:"absolute",top:0}),f.css(f.align?{right:0}:{left:0}),t.append(f),da&&(da.css({position:"absolute",left:0,bottom:0}),da.css(da.align?{bottom:0}:{top:0}),t.append(da))):(b.isfixed="fixed"==b.win.css("position"),t=b.isfixed?"fixed":"absolute",b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,
56
- /fixed|absolute/.test(b.viewport.css("position"))||b.css(b.viewport,{position:"relative"})),f.css({position:t}),b.zoom&&b.zoom.css({position:t}),b.updateScrollBar(),b.body.append(f),b.zoom&&b.body.append(b.zoom),b.railh&&(da.css({position:t}),b.body.append(da))),I.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),z.disableoutline&&(I.isie&&b.win.attr("hideFocus","true"),I.iswebkit&&b.win.css("outline","none")));!1===z.autohidemode?(b.autohidedom=!1,
57
- b.rail.css({opacity:z.cursoropacitymax}),b.railh&&b.railh.css({opacity:z.cursoropacitymax})):!0===z.autohidemode||"leave"===z.autohidemode?(b.autohidedom=p().add(b.rail),I.isie8&&(b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&I.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"scroll"==z.autohidemode?(b.autohidedom=p().add(b.rail),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh))):"cursor"==z.autohidemode?(b.autohidedom=p().add(b.cursor),
58
- b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):"hidden"==z.autohidemode&&(b.autohidedom=!1,b.hide(),b.railslocked=!1);if(I.cantouch||b.istouchcapable||z.emulatetouch||I.hasmstouch){b.scrollmom=new ia(b);b.ontouchstart=function(E){if(b.locked||E.pointerType&&("mouse"===E.pointerType||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!1;b.hasmoving=!1;b.scrollmom.timer&&(b.triggerScrollEnd(),b.scrollmom.stop());if(!b.railslocked){var X=b.getTarget(E);if(X&&/INPUT/i.test(X.nodeName)&&/range/i.test(X.type))return b.stopPropagation(E);
59
- var pa="mousedown"===E.type;!("clientX"in E)&&"changedTouches"in E&&(E.clientX=E.changedTouches[0].clientX,E.clientY=E.changedTouches[0].clientY);if(b.forcescreen){var ra=E;E={original:E.original?E.original:E};E.clientX=ra.screenX;E.clientY=ra.screenY}b.rail.drag={x:E.clientX,y:E.clientY,sx:b.scroll.x,sy:b.scroll.y,st:b.getScrollTop(),sl:b.getScrollLeft(),pt:2,dl:!1,tg:X};if(b.ispage||!z.directionlockdeadzone)b.rail.drag.dl="f";else{ra=H.width();var sa=H.height(),Ea=b.getContentSize();sa=Ea.h-sa;
60
- ra=Ea.w-ra;b.rail.drag.ck=b.rail.scrollable&&!b.railh.scrollable?0<sa?"v":!1:!b.rail.scrollable&&b.railh.scrollable?0<ra?"h":!1:!1}z.emulatetouch&&b.isiframe&&I.isie&&(ra=b.win.position(),b.rail.drag.x+=ra.left,b.rail.drag.y+=ra.top);b.hasmoving=!1;b.lastmouseup=!1;b.scrollmom.reset(E.clientX,E.clientY);if(X&&pa){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(X.nodeName))return I.hasmousecapture&&X.setCapture(),z.emulatetouch?(X.onclick&&!X._onclick&&(X._onclick=X.onclick,X.onclick=function(va){if(b.hasmoving)return!1;
61
- X._onclick.call(this,va)}),b.cancelEvent(E)):b.stopPropagation(E);/SUBMIT|CANCEL|BUTTON/i.test(p(X).attr("type"))&&(b.preventclick={tg:X,click:!1})}}};b.ontouchend=function(E){if(!b||!b.rail.drag)return!0;if(2==b.rail.drag.pt){if(E.pointerType&&("mouse"===E.pointerType||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!1;b.rail.drag=!1;var X="mouseup"===E.type;if(b.hasmoving&&(b.scrollmom.doMomentum(),b.lastmouseup=!0,b.hideCursor(),I.hasmousecapture&&w.releaseCapture(),X))return b.cancelEvent(E)}else if(1==
62
- b.rail.drag.pt)return b.onmouseup(E)};var wa=z.emulatetouch&&b.isiframe&&!I.hasmousecapture,ta=.3*z.directionlockdeadzone|0;b.ontouchmove=function(E,X){if(!b||!b.rail.drag||E.targetTouches&&z.preventmultitouchscrolling&&1<E.targetTouches.length||E.pointerType&&("mouse"===E.pointerType||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!0;if(2==b.rail.drag.pt){"changedTouches"in E&&(E.clientX=E.changedTouches[0].clientX,E.clientY=E.changedTouches[0].clientY);var pa;var ra=pa=0;wa&&!X&&(X=b.win.position(),
63
- ra=-X.left,pa=-X.top);var sa=E.clientY+pa;X=sa-b.rail.drag.y;var Ea=E.clientX+ra;pa=Ea-b.rail.drag.x;var va=b.rail.drag.st-X;if(b.ishwscroll&&z.bouncescroll)0>va?va=Math.round(va/2):va>b.page.maxh&&(va=b.page.maxh+Math.round((va-b.page.maxh)/2));else if(0>va?sa=va=0:va>b.page.maxh&&(va=b.page.maxh,sa=0),0===sa&&!b.hasmoving)return b.ispage||(b.rail.drag=!1),!0;var xa=b.getScrollLeft();b.railh&&b.railh.scrollable&&(xa=b.isrtlmode?pa-b.rail.drag.sl:b.rail.drag.sl-pa,b.ishwscroll&&z.bouncescroll?0>xa?
64
- xa=Math.round(xa/2):xa>b.page.maxw&&(xa=b.page.maxw+Math.round((xa-b.page.maxw)/2)):(0>xa&&(Ea=xa=0),xa>b.page.maxw&&(xa=b.page.maxw,Ea=0)));if(!b.hasmoving){if(b.rail.drag.y===E.clientY&&b.rail.drag.x===E.clientX)return b.cancelEvent(E);ra=Math.abs(X);X=Math.abs(pa);pa=z.directionlockdeadzone;b.rail.drag.ck?"v"==b.rail.drag.ck?X>pa&&ra<=ta?b.rail.drag=!1:ra>pa&&(b.rail.drag.dl="v"):"h"==b.rail.drag.ck&&(ra>pa&&X<=ta?b.rail.drag=!1:X>pa&&(b.rail.drag.dl="h")):ra>pa&&X>pa?b.rail.drag.dl="f":ra>pa?
65
- b.rail.drag.dl=X>ta?"f":"v":X>pa&&(b.rail.drag.dl=ra>ta?"f":"h");if(!b.rail.drag.dl)return b.cancelEvent(E);b.triggerScrollStart(E.clientX,E.clientY,0,0,0);b.hasmoving=!0}b.preventclick&&!b.preventclick.click&&(b.preventclick.click=b.preventclick.tg.onclick||!1,b.preventclick.tg.onclick=b.onpreventclick);b.rail.drag.dl&&("v"==b.rail.drag.dl?xa=b.rail.drag.sl:"h"==b.rail.drag.dl&&(va=b.rail.drag.st));b.synched("touchmove",function(){b.rail.drag&&2==b.rail.drag.pt&&(b.prepareTransition&&b.resetTransition(),
66
- b.rail.scrollable&&b.setScrollTop(va),b.scrollmom.update(Ea,sa),b.railh&&b.railh.scrollable?(b.setScrollLeft(xa),b.showCursor(va,xa)):b.showCursor(va),I.isie10&&w.selection.clear())});return b.cancelEvent(E)}if(1==b.rail.drag.pt)return b.onmousemove(E)};b.ontouchstartCursor=function(E,X){if(!b.rail.drag||3==b.rail.drag.pt){if(b.locked)return b.cancelEvent(E);b.cancelScroll();b.rail.drag={x:E.touches[0].clientX,y:E.touches[0].clientY,sx:b.scroll.x,sy:b.scroll.y,pt:3,hr:!!X};X=b.getTarget(E);!b.ispage&&
67
- I.hasmousecapture&&X.setCapture();b.isiframe&&!I.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));return b.cancelEvent(E)}};b.ontouchendCursor=function(E){if(b.rail.drag&&(I.hasmousecapture&&w.releaseCapture(),b.isiframe&&!I.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),3==b.rail.drag.pt))return b.rail.drag=!1,b.cancelEvent(E)};b.ontouchmoveCursor=function(E){if(b.rail.drag&&3==b.rail.drag.pt){b.cursorfreezed=!0;
68
- if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(E.touches[0].clientX-b.rail.drag.x);0>b.scroll.x&&(b.scroll.x=0);var X=b.scrollvaluemaxw;b.scroll.x>X&&(b.scroll.x=X)}else b.scroll.y=b.rail.drag.sy+(E.touches[0].clientY-b.rail.drag.y),0>b.scroll.y&&(b.scroll.y=0),X=b.scrollvaluemax,b.scroll.y>X&&(b.scroll.y=X);b.synched("touchmove",function(){b.rail.drag&&3==b.rail.drag.pt&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*b.scrollratio.x),z.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*
69
- b.scrollratio.y),z.cursordragspeed))});return b.cancelEvent(E)}}}b.onmousedown=function(E,X){if(!b.rail.drag||1==b.rail.drag.pt){if(b.railslocked)return b.cancelEvent(E);b.cancelScroll();b.rail.drag={x:E.clientX,y:E.clientY,sx:b.scroll.x,sy:b.scroll.y,pt:1,hr:X||!1};X=b.getTarget(E);I.hasmousecapture&&X.setCapture();b.isiframe&&!I.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));b.hasmoving=!1;return b.cancelEvent(E)}};b.onmouseup=function(E){if(b.rail.drag){if(1!=
70
- b.rail.drag.pt)return!0;I.hasmousecapture&&w.releaseCapture();b.isiframe&&!I.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents);b.rail.drag=!1;b.cursorfreezed=!1;b.hasmoving&&b.triggerScrollEnd();return b.cancelEvent(E)}};b.onmousemove=function(E){if(b.rail.drag){if(1===b.rail.drag.pt){if(I.ischrome&&0===E.which)return b.onmouseup(E);b.cursorfreezed=!0;b.hasmoving||b.triggerScrollStart(E.clientX,E.clientY,0,0,0);b.hasmoving=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(E.clientX-
71
- b.rail.drag.x);0>b.scroll.x&&(b.scroll.x=0);var X=b.scrollvaluemaxw;b.scroll.x>X&&(b.scroll.x=X)}else b.scroll.y=b.rail.drag.sy+(E.clientY-b.rail.drag.y),0>b.scroll.y&&(b.scroll.y=0),X=b.scrollvaluemax,b.scroll.y>X&&(b.scroll.y=X);b.synched("mousemove",function(){b.cursorfreezed&&(b.showCursor(),b.rail.drag.hr?b.scrollLeft(Math.round(b.scroll.x*b.scrollratio.x)):b.scrollTop(Math.round(b.scroll.y*b.scrollratio.y)))});return b.cancelEvent(E)}}else b.checkarea=0};if(I.cantouch||z.emulatetouch)b.onpreventclick=
72
- function(E){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(E)},b.onclick=I.isios?!1:function(E){return b.lastmouseup?(b.lastmouseup=!1,b.cancelEvent(E)):!0},z.grabcursorenabled&&I.cursorgrabvalue&&(b.css(b.ispage?b.doc:b.win,{cursor:I.cursorgrabvalue}),b.css(b.rail,{cursor:I.cursorgrabvalue}));else{var ua=function(E){if(b.selectiondrag){if(E){var X=b.win.outerHeight();E=E.pageY-b.selectiondrag.top;0<E&&E<X&&(E=0);E>=X&&(E-=X);b.selectiondrag.df=
73
- E}0!==b.selectiondrag.df&&(b.doScrollBy(-(2*b.selectiondrag.df/6)|0),b.debounced("doselectionscroll",function(){ua()},50))}};b.hasTextSelected="getSelection"in w?function(){return 0<w.getSelection().rangeCount}:"selection"in w?function(){return"None"!=w.selection.type}:function(){return!1};b.onselectionstart=function(E){b.ispage||(b.selectiondrag=b.win.offset())};b.onselectionend=function(E){b.selectiondrag=!1};b.onselectiondrag=function(E){b.selectiondrag&&b.hasTextSelected()&&b.debounced("selectionscroll",
74
- function(){ua(E)},250)}}I.hasw3ctouch?(b.css(b.ispage?p("html"):b.win,{"touch-action":"none"}),b.css(b.rail,{"touch-action":"none"}),b.css(b.cursor,{"touch-action":"none"}),b.bind(b.win,"pointerdown",b.ontouchstart),b.bind(w,"pointerup",b.ontouchend),b.delegate(w,"pointermove",b.ontouchmove)):I.hasmstouch?(b.css(b.ispage?p("html"):b.win,{"-ms-touch-action":"none"}),b.css(b.rail,{"-ms-touch-action":"none"}),b.css(b.cursor,{"-ms-touch-action":"none"}),b.bind(b.win,"MSPointerDown",b.ontouchstart),b.bind(w,
75
- "MSPointerUp",b.ontouchend),b.delegate(w,"MSPointerMove",b.ontouchmove),b.bind(b.cursor,"MSGestureHold",function(E){E.preventDefault()}),b.bind(b.cursor,"contextmenu",function(E){E.preventDefault()})):I.cantouch&&(b.bind(b.win,"touchstart",b.ontouchstart,!1,!0),b.bind(w,"touchend",b.ontouchend,!1,!0),b.bind(w,"touchcancel",b.ontouchend,!1,!0),b.delegate(w,"touchmove",b.ontouchmove,!1,!0));z.emulatetouch&&(b.bind(b.win,"mousedown",b.ontouchstart,!1,!0),b.bind(w,"mouseup",b.ontouchend,!1,!0),b.bind(w,
76
- "mousemove",b.ontouchmove,!1,!0));if(z.cursordragontouch||!I.cantouch&&!z.emulatetouch)b.rail.css({cursor:"default"}),b.railh&&b.railh.css({cursor:"default"}),b.jqbind(b.rail,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.rail,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),z.sensitiverail&&(b.bind(b.rail,"click",function(E){b.doRailClick(E,!1,!1)}),b.bind(b.rail,"dblclick",function(E){b.doRailClick(E,
77
- !0,!1)}),b.bind(b.cursor,"click",function(E){b.cancelEvent(E)}),b.bind(b.cursor,"dblclick",function(E){b.cancelEvent(E)})),b.railh&&(b.jqbind(b.railh,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.railh,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),z.sensitiverail&&(b.bind(b.railh,"click",function(E){b.doRailClick(E,!1,!0)}),b.bind(b.railh,"dblclick",function(E){b.doRailClick(E,!0,!0)}),
78
- b.bind(b.cursorh,"click",function(E){b.cancelEvent(E)}),b.bind(b.cursorh,"dblclick",function(E){b.cancelEvent(E)})));z.cursordragontouch&&(this.istouchcapable||I.cantouch)&&(b.bind(b.cursor,"touchstart",b.ontouchstartCursor),b.bind(b.cursor,"touchmove",b.ontouchmoveCursor),b.bind(b.cursor,"touchend",b.ontouchendCursor),b.cursorh&&b.bind(b.cursorh,"touchstart",function(E){b.ontouchstartCursor(E,!0)}),b.cursorh&&b.bind(b.cursorh,"touchmove",b.ontouchmoveCursor),b.cursorh&&b.bind(b.cursorh,"touchend",
79
- b.ontouchendCursor));z.emulatetouch||I.isandroid||I.isios?(b.bind(I.hasmousecapture?b.win:w,"mouseup",b.ontouchend),b.onclick&&b.bind(w,"click",b.onclick),z.cursordragontouch?(b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.cursorh&&b.bind(b.cursorh,"mousedown",function(E){b.onmousedown(E,!0)}),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onmouseup)):(b.bind(b.rail,"mousedown",function(E){E.preventDefault()}),b.railh&&b.bind(b.railh,"mousedown",function(E){E.preventDefault()}))):
80
- (b.bind(I.hasmousecapture?b.win:w,"mouseup",b.onmouseup),b.bind(w,"mousemove",b.onmousemove),b.onclick&&b.bind(w,"click",b.onclick),b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.railh&&(b.bind(b.cursorh,"mousedown",function(E){b.onmousedown(E,!0)}),b.bind(b.cursorh,"mouseup",b.onmouseup)),!b.ispage&&z.enablescrollonselection&&(b.bind(b.win[0],"mousedown",b.onselectionstart),b.bind(w,"mouseup",b.onselectionend),b.bind(b.cursor,"mouseup",b.onselectionend),b.cursorh&&
81
- b.bind(b.cursorh,"mouseup",b.onselectionend),b.bind(w,"mousemove",b.onselectiondrag)),b.zoom&&(b.jqbind(b.zoom,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.zoom,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()})));z.enablemousewheel&&(b.isiframe||b.mousewheel(I.isie&&b.ispage?w:b.win,b.onmousewheel),b.mousewheel(b.rail,b.onmousewheel),b.railh&&b.mousewheel(b.railh,b.onmousewheelhr));b.ispage||I.cantouch||/HTML|^BODY/.test(b.win[0].nodeName)||
82
- (b.win.attr("tabindex")||b.win.attr({tabindex:++y}),b.bind(b.win,"focus",function(E){B=b.getTarget(E).id||b.getTarget(E)||!1;b.hasfocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"blur",function(E){B=!1;b.hasfocus=!1}),b.bind(b.win,"mouseenter",function(E){u=b.getTarget(E).id||b.getTarget(E)||!1;b.hasmousefocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"mouseleave",function(E){u=!1;b.hasmousefocus=!1;b.rail.drag||b.hideCursor()}));b.onkeypress=function(E){if(b.railslocked&&
83
- 0===b.page.maxh)return!0;E=E||L.event;var X=b.getTarget(E);if(X&&/INPUT|TEXTAREA|SELECT|OPTION/.test(X.nodeName)&&(!X.getAttribute("type")&&!X.type||!/submit|button|cancel/i.tp)||p(X).attr("contenteditable"))return!0;if(b.hasfocus||b.hasmousefocus&&!B||b.ispage&&!B&&!u){X=E.keyCode;if(b.railslocked&&27!=X)return b.cancelEvent(E);var pa=E.ctrlKey||!1,ra=E.shiftKey||!1,sa=!1;switch(X){case 38:case 63233:b.doScrollBy(72);sa=!0;break;case 40:case 63235:b.doScrollBy(-72);sa=!0;break;case 37:case 63232:b.railh&&
84
- (pa?b.doScrollLeft(0):b.doScrollLeftBy(72),sa=!0);break;case 39:case 63234:b.railh&&(pa?b.doScrollLeft(b.page.maxw):b.doScrollLeftBy(-72),sa=!0);break;case 33:case 63276:b.doScrollBy(b.view.h);sa=!0;break;case 34:case 63277:b.doScrollBy(-b.view.h);sa=!0;break;case 36:case 63273:b.railh&&pa?b.doScrollPos(0,0):b.doScrollTo(0);sa=!0;break;case 35:case 63275:b.railh&&pa?b.doScrollPos(b.page.maxw,b.page.maxh):b.doScrollTo(b.page.maxh);sa=!0;break;case 32:z.spacebarenabled&&(ra?b.doScrollBy(b.view.h):b.doScrollBy(-b.view.h),
85
- sa=!0);break;case 27:b.zoomactive&&(b.doZoom(),sa=!0)}if(sa)return b.cancelEvent(E)}};z.enablekeyboard&&b.bind(w,I.isopera&&!I.isopera12?"keypress":"keydown",b.onkeypress);b.bind(w,"keydown",function(E){E.ctrlKey&&(b.wheelprevented=!0)});b.bind(w,"keyup",function(E){E.ctrlKey||(b.wheelprevented=!1)});b.bind(L,"blur",function(E){b.wheelprevented=!1});b.bind(L,"resize",b.onscreenresize);b.bind(L,"orientationchange",b.onscreenresize);b.bind(L,"load",b.lazyResize);if(I.ischrome&&!b.ispage&&!b.haswrapper){var Aa=
86
- b.win.attr("style");f=parseFloat(b.win.css("width"))+1;b.win.css("width",f);b.synched("chromefix",function(){b.win.attr("style",Aa)})}b.onAttributeChange=function(E){b.lazyResize(b.isieold?250:30)};if(z.enableobserver&&(b.isie11||!1===ba||(b.observerbody=new ba(function(E){E.forEach(function(X){if("attributes"==X.type)return Q.hasClass("modal-open")&&Q.hasClass("modal-dialog")&&!p.contains(p(".modal-dialog")[0],b.doc[0])?b.hide():b.show()});if(b.me.clientWidth!=b.page.width||b.me.clientHeight!=b.page.height)return b.lazyResize(30)}),
87
- b.observerbody.observe(w.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!b.ispage&&!b.haswrapper)){var ya=b.win[0];!1!==ba?(b.observer=new ba(function(E){E.forEach(b.onAttributeChange)}),b.observer.observe(ya,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),b.observerremover=new ba(function(E){E.forEach(function(X){if(0<X.removedNodes.length)for(var pa in X.removedNodes)if(b&&X.removedNodes[pa]===ya)return b.remove()})}),b.observerremover.observe(ya.parentNode,
88
- {childList:!0,characterData:!1,attributes:!1,subtree:!1})):(b.bind(ya,I.isie&&!I.isie9?"propertychange":"DOMAttrModified",b.onAttributeChange),I.isie9&&ya.attachEvent("onpropertychange",b.onAttributeChange),b.bind(ya,"DOMNodeRemoved",function(E){E.target===ya&&b.remove()}))}!b.ispage&&z.boxzoom&&b.bind(L,"resize",b.resizeZoom);b.istextarea&&(b.bind(b.win,"keydown",b.lazyResize),b.bind(b.win,"mouseup",b.lazyResize));b.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var za=function(){b.iframexd=!1;
89
- try{var E="contentDocument"in this?this.contentDocument:this.contentWindow._doc}catch(pa){b.iframexd=!0,E=!1}if(b.iframexd)return"console"in L&&console.log("NiceScroll error: policy restriced iframe"),!0;b.forcescreen=!0;b.isiframe&&(b.iframe={doc:p(E),html:b.doc.contents().find("html")[0],body:b.doc.contents().find("body")[0]},b.getContentSize=function(){return{w:Math.max(b.iframe.html.scrollWidth,b.iframe.body.scrollWidth),h:Math.max(b.iframe.html.scrollHeight,b.iframe.body.scrollHeight)}},b.docscroll=
90
- p(b.iframe.body));if(!I.isios&&z.iframeautoresize&&!b.isiframe){b.win.scrollTop(0);b.doc.height("");var X=Math.max(E.getElementsByTagName("html")[0].scrollHeight,E.body.scrollHeight);b.doc.height(X)}b.lazyResize(30);b.css(p(b.iframe.body),g);I.isios&&b.haswrapper&&b.css(p(E.body),{"-webkit-transform":"translate3d(0,0,0)"});"contentWindow"in this?b.bind(this.contentWindow,"scroll",b.onscroll):b.bind(E,"scroll",b.onscroll);z.enablemousewheel&&b.mousewheel(E,b.onmousewheel);z.enablekeyboard&&b.bind(E,
91
- I.isopera?"keypress":"keydown",b.onkeypress);I.cantouch?(b.bind(E,"touchstart",b.ontouchstart),b.bind(E,"touchmove",b.ontouchmove)):z.emulatetouch&&(b.bind(E,"mousedown",b.ontouchstart),b.bind(E,"mousemove",function(pa){return b.ontouchmove(pa,!0)}),z.grabcursorenabled&&I.cursorgrabvalue&&b.css(p(E.body),{cursor:I.cursorgrabvalue}));b.bind(E,"mouseup",b.ontouchend);b.zoom&&(z.dblclickzoom&&b.bind(E,"dblclick",b.doZoom),b.ongesturezoom&&b.bind(E,"gestureend",b.ongesturezoom))};this.doc[0].readyState&&
92
- "complete"===this.doc[0].readyState&&setTimeout(function(){za.call(b.doc[0],!1)},500);b.bind(this.doc,"load",za)}};this.showCursor=function(g,t){b.cursortimeout&&(clearTimeout(b.cursortimeout),b.cursortimeout=0);b.rail&&(b.autohidedom&&(b.autohidedom.stop().css({opacity:z.cursoropacitymax}),b.cursoractive=!0),b.rail.drag&&1==b.rail.drag.pt||(void 0!==g&&!1!==g&&(b.scroll.y=g/b.scrollratio.y|0),void 0!==t&&(b.scroll.x=t/b.scrollratio.x|0)),b.cursor.css({height:b.cursorheight,top:b.scroll.y}),b.cursorh&&
93
- (g=b.hasreversehr?b.scrollvaluemaxw-b.scroll.x:b.scroll.x,b.cursorh.css({width:b.cursorwidth,left:!b.rail.align&&b.rail.visibility?g+b.rail.width:g}),b.cursoractive=!0),b.zoom&&b.zoom.stop().css({opacity:z.cursoropacitymax}))};this.hideCursor=function(g){b.cursortimeout||!b.rail||!b.autohidedom||b.hasmousefocus&&"leave"===z.autohidemode||(b.cursortimeout=setTimeout(function(){b.rail.active&&b.showonmouseevent||(b.autohidedom.stop().animate({opacity:z.cursoropacitymin}),b.zoom&&b.zoom.stop().animate({opacity:z.cursoropacitymin}),
94
- b.cursoractive=!1);b.cursortimeout=0},g||z.hidecursordelay))};this.noticeCursor=function(g,t,x){b.showCursor(t,x);b.rail.active||b.hideCursor(g)};this.getContentSize=b.ispage?function(){return{w:Math.max(w.body.scrollWidth,w.documentElement.scrollWidth),h:Math.max(w.body.scrollHeight,w.documentElement.scrollHeight)}}:b.haswrapper?function(){return{w:b.doc[0].offsetWidth,h:b.doc[0].offsetHeight}}:function(){return{w:b.docscroll[0].scrollWidth,h:b.docscroll[0].scrollHeight}};this.onResize=function(g,
95
- t){if(!b||!b.win)return!1;g=b.page.maxh;var x=b.page.maxw,f=b.view.h,r=b.view.w;b.view={w:b.ispage?b.win.width():b.win[0].clientWidth,h:b.ispage?b.win.height():b.win[0].clientHeight};b.page=t?t:b.getContentSize();b.page.maxh=Math.max(0,b.page.h-b.view.h);b.page.maxw=Math.max(0,b.page.w-b.view.w);if(b.page.maxh==g&&b.page.maxw==x&&b.view.w==r&&b.view.h==f){if(b.ispage)return b;t=b.win.offset();if(b.lastposition&&(g=b.lastposition,g.top==t.top&&g.left==t.left))return b;b.lastposition=t}0===b.page.maxh?
96
- (b.hideRail(),b.scrollvaluemax=0,b.scroll.y=0,b.scrollratio.y=0,b.cursorheight=0,b.setScrollTop(0),b.rail&&(b.rail.scrollable=!1)):(b.page.maxh-=z.railpadding.top+z.railpadding.bottom,b.rail.scrollable=!0);0===b.page.maxw?(b.hideRailHr(),b.scrollvaluemaxw=0,b.scroll.x=0,b.scrollratio.x=0,b.cursorwidth=0,b.setScrollLeft(0),b.railh&&(b.railh.scrollable=!1)):(b.page.maxw-=z.railpadding.left+z.railpadding.right,b.railh&&(b.railh.scrollable=z.horizrailenabled));b.railslocked=b.locked||0===b.page.maxh&&
97
- 0===b.page.maxw;if(b.railslocked)return b.ispage||b.updateScrollBar(b.view),!1;b.hidden||(b.rail.visibility||b.showRail(),b.railh&&!b.railh.visibility&&b.showRailHr());b.istextarea&&b.win.css("resize")&&"none"!=b.win.css("resize")&&(b.view.h-=20);b.cursorheight=Math.min(b.view.h,Math.round(b.view.h/b.page.h*b.view.h));b.cursorheight=z.cursorfixedheight?z.cursorfixedheight:Math.max(z.cursorminheight,b.cursorheight);b.cursorwidth=Math.min(b.view.w,Math.round(b.view.w/b.page.w*b.view.w));b.cursorwidth=
98
- z.cursorfixedheight?z.cursorfixedheight:Math.max(z.cursorminheight,b.cursorwidth);b.scrollvaluemax=b.view.h-b.cursorheight-(z.railpadding.top+z.railpadding.bottom);b.hasborderbox||(b.scrollvaluemax-=b.cursor[0].offsetHeight-b.cursor[0].clientHeight);b.railh&&(b.railh.width=0<b.page.maxh?b.view.w-b.rail.width:b.view.w,b.scrollvaluemaxw=b.railh.width-b.cursorwidth-(z.railpadding.left+z.railpadding.right));b.ispage||b.updateScrollBar(b.view);b.scrollratio={x:b.page.maxw/b.scrollvaluemaxw,y:b.page.maxh/
99
- b.scrollvaluemax};b.getScrollTop()>b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=b.getScrollTop()/b.scrollratio.y|0,b.scroll.x=b.getScrollLeft()/b.scrollratio.x|0,b.cursoractive&&b.noticeCursor());b.scroll.y&&0===b.getScrollTop()&&b.doScrollTo(b.scroll.y*b.scrollratio.y|0);return b};this.resize=b.onResize;var q=0;this.onscreenresize=function(g){clearTimeout(q);var t=!b.ispage&&!b.haswrapper;t&&b.hideRails();q=setTimeout(function(){b&&(t&&b.showRails(),b.resize());q=0},120)};this.lazyResize=function(g){clearTimeout(q);
100
- g=isNaN(g)?240:g;q=setTimeout(function(){b&&b.resize();q=0},g);return b};this.jqbind=function(g,t,x){b.events.push({e:g,n:t,f:x,q:!0});p(g).on(t,x)};this.mousewheel=function(g,t,x){g="jquery"in g?g[0]:g;if("onwheel"in w.createElement("div"))b._bind(g,"wheel",t,x||!1);else{var f=void 0!==w.onmousewheel?"mousewheel":"DOMMouseScroll";v(g,f,t,x||!1);"DOMMouseScroll"==f&&v(g,"MozMousePixelScroll",t,x||!1)}};var C=!1;if(I.haseventlistener){try{var G=Object.defineProperty({},"passive",{get:function(){C=
101
- !0}});L.addEventListener("test",null,G)}catch(g){}this.stopPropagation=function(g){if(!g)return!1;g=g.original?g.original:g;g.stopPropagation();return!1};this.cancelEvent=function(g){g.cancelable&&g.preventDefault();g.stopImmediatePropagation();g.preventManipulation&&g.preventManipulation();return!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},L.constructor.prototype.addEventListener=w.constructor.prototype.addEventListener=
102
- Element.prototype.addEventListener=function(g,t,x){this.attachEvent("on"+g,t)},L.constructor.prototype.removeEventListener=w.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(g,t,x){this.detachEvent("on"+g,t)},this.cancelEvent=function(g){if(g=g||L.event)g.cancelBubble=!0,g.cancel=!0,g.returnValue=!1;return!1},this.stopPropagation=function(g){if(g=g||L.event)g.cancelBubble=!0;return!1};this.delegate=function(g,t,x,f,r){var D=K[t]||!1;D?b.events.push({e:g,n:t,
103
- f:x,b:f,q:!1}):(D={a:[],l:[],f:function(R){for(var ea=D.l,da=!1,wa=ea.length-1;0<=wa;wa--)if(da=ea[wa].call(R.target,R),!1===da)return!1;return da}},b.bind(g,t,D.f,f,r),K[t]=D);b.ispage?(D.a=[b.id].concat(D.a),D.l=[x].concat(D.l)):(D.a.push(b.id),D.l.push(x))};this.undelegate=function(g,t,x,f,r){if((x=K[t]||!1)&&x.l)for(f=0,r=x.l.length;f<r;f++)x.a[f]===b.id&&(x.a.splice(f),x.l.splice(f),0===x.a.length&&(b._unbind(g,t,x.l.f),K[t]=null))};this.bind=function(g,t,x,f,r){b._bind("jquery"in g?g[0]:g,t,
104
- x,f||!1,r||!1)};this._bind=function(g,t,x,f,r){b.events.push({e:g,n:t,f:x,b:f,q:!1});C&&(r||g==L.document||g==L.document.body||g==L)?g.addEventListener(t,x,{passive:!1,capture:f}):g.addEventListener(t,x,f||!1)};this._unbind=function(g,t,x,f){K[t]?b.undelegate(g,t,x,f):g.removeEventListener(t,x,f)};this.unbindAll=function(){for(var g=0;g<b.events.length;g++){var t=b.events[g];t.q?t.e.unbind(t.n,t.f):b._unbind(t.e,t.n,t.f,t.b)}};this.showRails=function(){return b.showRail().showRailHr()};this.showRail=
105
- function(){0===b.page.maxh||!b.ispage&&"none"==b.win.css("display")||(b.rail.visibility=!0,b.rail.css("display","block"));return b};this.showRailHr=function(){b.railh&&0!==b.page.maxw&&(b.ispage||"none"!=b.win.css("display"))&&(b.railh.visibility=!0,b.railh.css("display","block"));return b};this.hideRails=function(){return b.hideRail().hideRailHr()};this.hideRail=function(){b.rail.visibility=!1;b.rail.css("display","none");return b};this.hideRailHr=function(){b.railh&&(b.railh.visibility=!1,b.railh.css("display",
106
- "none"));return b};this.show=function(){b.hidden=!1;b.railslocked=!1;return b.showRails()};this.hide=function(){b.hidden=!0;b.railslocked=!0;return b.hideRails()};this.toggle=function(){return b.hidden?b.show():b.hide()};this.remove=function(){b.stop();b.cursortimeout&&clearTimeout(b.cursortimeout);for(var g in b.delaylist)b.delaylist[g]&&P(b.delaylist[g].h);b.doZoomOut();I.hasw3ctouch?b.undelegate(w,"pointermove",b.ontouchmove):I.hasmstouch?b.undelegate(w,"MSPointerMove",b.ontouchmove):I.cantouch&&
107
- b.undelegate(w,"touchmove",b.ontouchmove,!1,!0);b.unbindAll();I.isie9&&b.win[0].detachEvent("onpropertychange",b.onAttributeChange);!1!==b.observer&&b.observer.disconnect();!1!==b.observerremover&&b.observerremover.disconnect();!1!==b.observerbody&&b.observerbody.disconnect();b.events=null;b.cursor&&b.cursor.remove();b.cursorh&&b.cursorh.remove();b.rail&&b.rail.remove();b.railh&&b.railh.remove();b.zoom&&b.zoom.remove();for(g=0;g<b.saved.css.length;g++){var t=b.saved.css[g];t[0].css(t[1],void 0===
108
- t[2]?"":t[2])}b.saved=!1;b.me.data("__nicescroll","");var x=p.nicescroll;x.each(function(r){if(this&&this.id===b.id){delete x[r];for(var D=++r;D<x.length;D++,r++)x[r]=x[D];x.length--;x.length&&delete x[x.length]}});for(var f in b)b[f]=null,delete b[f];b=null};this.scrollstart=function(g){this.onscrollstart=g;return b};this.scrollend=function(g){this.onscrollend=g;return b};this.scrollcancel=function(g){this.onscrollcancel=g;return b};this.zoomin=function(g){this.onzoomin=g;return b};this.zoomout=
109
- function(g){this.onzoomout=g;return b};this.isScrollable=function(g){g=g.target?g.target:g;if("OPTION"==g.nodeName)return!0;for(;g&&1==g.nodeType&&g!==this.me[0]&&!/^BODY|HTML/.test(g.nodeName);){var t=p(g);t=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(t))return g.clientHeight!=g.scrollHeight;g=g.parentNode?g.parentNode:!1}return!1};this.getViewport=function(g){for(g=g&&g.parentNode?g.parentNode:!1;g&&1==g.nodeType&&!/^BODY|HTML/.test(g.nodeName);){var t=p(g);
110
- if(/fixed|absolute/.test(t.css("position")))return t;var x=t.css("overflowY")||t.css("overflowX")||t.css("overflow")||"";if(/scroll|auto/.test(x)&&g.clientHeight!=g.scrollHeight||0<t.getNiceScroll().length)return t;g=g.parentNode?g.parentNode:!1}return!1};this.triggerScrollStart=function(g,t,x,f,r){b.onscrollstart&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:g,y:t},request:{x,y:f},end:{x:b.newscrollx,y:b.newscrolly},speed:r})};this.triggerScrollEnd=function(){if(b.onscrollend){var g=b.getScrollLeft(),
111
- t=b.getScrollTop();b.onscrollend.call(b,{type:"scrollend",current:{x:g,y:t},end:{x:g,y:t}})}};var O=0,U=0,S=0,T=1,V=!1;this.onmousewheel=function(g){if(b.wheelprevented||b.locked)return!1;if(b.railslocked)return b.debounced("checkunlock",b.resize,250),!1;if(b.rail.drag)return b.cancelEvent(g);"auto"===z.oneaxismousemode&&0!==g.deltaX&&(z.oneaxismousemode=!1);if(z.oneaxismousemode&&0===g.deltaX&&!b.rail.scrollable)return b.railh&&b.railh.scrollable?b.onmousewheelhr(g):!0;var t=aa(),x=!1;z.preservenativescrolling&&
112
- b.checkarea+600<t&&(b.nativescrollingarea=b.isScrollable(g),x=!0);b.checkarea=t;if(b.nativescrollingarea)return!0;if(g=M(g,!1,x))b.checkarea=0;return g};this.onmousewheelhr=function(g){if(!b.wheelprevented){if(b.railslocked||!b.railh.scrollable)return!0;if(b.rail.drag)return b.cancelEvent(g);var t=aa(),x=!1;z.preservenativescrolling&&b.checkarea+600<t&&(b.nativescrollingarea=b.isScrollable(g),x=!0);b.checkarea=t;return b.nativescrollingarea?!0:b.railslocked?b.cancelEvent(g):M(g,!0,x)}};this.stop=
113
- function(){b.cancelScroll();b.scrollmon&&b.scrollmon.stop();b.cursorfreezed=!1;b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y));b.noticeCursor();return b};this.getTransitionSpeed=function(g){return 80+g/72*z.scrollspeed|0};if(z.smoothscroll)if(b.ishwscroll&&I.hastransition&&z.usetransition&&z.smoothscroll){var W="";this.resetTransition=function(){W="";b.doc.css(I.prefixstyle+"transition-duration","0ms")};this.prepareTransition=function(g,t){g=t?g:b.getTransitionSpeed(g);t=g+"ms";W!==t&&
114
- (W=t,b.doc.css(I.prefixstyle+"transition-duration",t));return g};this.doScrollLeft=function(g,t){var x=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(g,x,t)};this.doScrollTop=function(g,t){var x=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(x,g,t)};this.cursorupdate={running:!1,start:function(){var g=this;if(!g.running){g.running=!0;var t=function(){g.running&&N(t);b.showCursor(b.getScrollTop(),b.getScrollLeft());b.notifyScrollEvent(b.win[0])};N(t)}},stop:function(){this.running=
115
- !1}};this.doScrollPos=function(g,t,x){x=b.getScrollTop();var f=b.getScrollLeft();(0>(b.newscrolly-x)*(t-x)||0>(b.newscrollx-f)*(g-f))&&b.cancelScroll();z.bouncescroll?(0>t?t=t/2|0:t>b.page.maxh&&(t=b.page.maxh+(t-b.page.maxh)/2|0),0>g?g=g/2|0:g>b.page.maxw&&(g=b.page.maxw+(g-b.page.maxw)/2|0)):(0>t?t=0:t>b.page.maxh&&(t=b.page.maxh),0>g?g=0:g>b.page.maxw&&(g=b.page.maxw));if(b.scrollrunning&&g==b.newscrollx&&t==b.newscrolly)return!1;b.newscrolly=t;b.newscrollx=g;x=b.getScrollTop();f=b.getScrollLeft();
116
- var r=g-f;var D=t-x;r=b.prepareTransition(Math.sqrt(r*r+D*D)|0);b.scrollrunning||(b.scrollrunning=!0,b.triggerScrollStart(f,x,g,t,r),b.cursorupdate.start());b.scrollendtrapped=!0;I.transitionend||(b.scrollendtrapped&&clearTimeout(b.scrollendtrapped),b.scrollendtrapped=setTimeout(b.onScrollTransitionEnd,r));b.setScrollTop(b.newscrolly);b.setScrollLeft(b.newscrollx)};this.cancelScroll=function(){if(!b.scrollendtrapped)return!0;var g=b.getScrollTop(),t=b.getScrollLeft();b.scrollrunning=!1;I.transitionend||
117
- clearTimeout(I.transitionend);b.scrollendtrapped=!1;b.resetTransition();b.setScrollTop(g);b.railh&&b.setScrollLeft(t);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);b.timerscroll=!1;b.cursorfreezed=!1;b.cursorupdate.stop();b.showCursor(g,t);return b};this.onScrollTransitionEnd=function(){if(b.scrollendtrapped){var g=b.getScrollTop(),t=b.getScrollLeft();0>g?g=0:g>b.page.maxh&&(g=b.page.maxh);0>t?t=0:t>b.page.maxw&&(t=b.page.maxw);if(g!=b.newscrolly||t!=b.newscrollx)return b.doScrollPos(t,
118
- g,z.snapbackspeed);b.scrollrunning&&b.triggerScrollEnd();b.scrollrunning=!1;b.scrollendtrapped=!1;b.resetTransition();b.timerscroll=!1;b.setScrollTop(g);b.railh&&b.setScrollLeft(t);b.cursorupdate.stop();b.noticeCursor(!1,g,t);b.cursorfreezed=!1}}}else this.doScrollLeft=function(g,t){var x=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(g,x,t)},this.doScrollTop=function(g,t){var x=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(x,g,t)},this.doScrollPos=function(g,t,x){x=b.getScrollTop();
119
- var f=b.getScrollLeft();(0>(b.newscrolly-x)*(t-x)||0>(b.newscrollx-f)*(g-f))&&b.cancelScroll();var r=!1;b.bouncescroll&&b.rail.visibility||(0>t?(t=0,r=!0):t>b.page.maxh&&(t=b.page.maxh,r=!0));b.bouncescroll&&b.railh.visibility||(0>g?(g=0,r=!0):g>b.page.maxw&&(g=b.page.maxw,r=!0));if(b.scrollrunning&&b.newscrolly===t&&b.newscrollx===g)return!0;b.newscrolly=t;b.newscrollx=g;b.dst={};b.dst.x=g-f;b.dst.y=t-x;b.dst.px=f;b.dst.py=x;var D=b.getTransitionSpeed(Math.sqrt(b.dst.x*b.dst.x+b.dst.y*b.dst.y)|0);
120
- b.bzscroll={};r=r?1:.58;b.bzscroll.x=new ja(f,b.newscrollx,D,0,0,r,1);b.bzscroll.y=new ja(x,b.newscrolly,D,0,0,r,1);aa();var R=function(){if(b.scrollrunning){var ea=b.bzscroll.y.getPos();b.setScrollLeft(b.bzscroll.x.getNow());b.setScrollTop(b.bzscroll.y.getNow());1>=ea?b.timer=N(R):(b.scrollrunning=!1,b.timer=0,b.triggerScrollEnd())}};b.scrollrunning||(b.triggerScrollStart(f,x,g,t,D),b.scrollrunning=!0,b.timer=N(R))},this.cancelScroll=function(){b.timer&&P(b.timer);b.timer=0;b.bzscroll=!1;b.scrollrunning=
121
- !1;return b};else this.doScrollLeft=function(g,t){var x=b.getScrollTop();b.doScrollPos(g,x,t)},this.doScrollTop=function(g,t){var x=b.getScrollLeft();b.doScrollPos(x,g,t)},this.doScrollPos=function(g,t,x){var f=g>b.page.maxw?b.page.maxw:g;0>f&&(f=0);var r=t>b.page.maxh?b.page.maxh:t;0>r&&(r=0);b.synched("scroll",function(){b.setScrollTop(r);b.setScrollLeft(f)})},this.cancelScroll=function(){};this.doScrollBy=function(g,t){A(0,g)};this.doScrollLeftBy=function(g,t){A(g,0)};this.doScrollTo=function(g,
122
- t){b.cursorfreezed=!1;b.doScrollTop(g)};this.checkContentSize=function(){var g=b.getContentSize();g.h==b.page.h&&g.w==b.page.w||b.resize(!1,g)};b.onscroll=function(g){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()/b.scrollratio.y);b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()/b.scrollratio.x));b.noticeCursor()})};b.bind(b.docscroll,"scroll",b.onscroll);this.doZoomIn=function(g){if(!b.zoomactive){b.zoomactive=!0;b.zoomrestore={style:{}};var t=
123
- "position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),x=b.win[0].style,f;for(f in t){var r=t[f];b.zoomrestore.style[r]=void 0!==x[r]?x[r]:""}b.zoomrestore.style.width=b.win.css("width");b.zoomrestore.style.height=b.win.css("height");b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-b.win.height()};I.isios4&&(b.zoomrestore.scrollTop=H.scrollTop(),H.scrollTop(0));b.win.css({position:I.isios4?"absolute":"fixed",top:0,left:0,
124
- zIndex:J+100,margin:0});t=b.win.css("backgroundColor");(""===t||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(t))&&b.win.css("backgroundColor","#fff");b.rail.css({zIndex:J+101});b.zoom.css({zIndex:J+102});b.zoom.css("backgroundPosition","0 -18px");b.resizeZoom();b.onzoomin&&b.onzoomin.call(b);return b.cancelEvent(g)}};this.doZoomOut=function(g){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",""),b.win.css(b.zoomrestore.style),I.isios4&&H.scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),
125
- b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0 0"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(g)};this.doZoom=function(g){return b.zoomactive?b.doZoomOut(g):b.doZoomIn(g)};this.resizeZoom=function(){if(b.zoomactive){var g=b.getScrollTop();b.win.css({width:H.width()-b.zoomrestore.padding.w+"px",height:H.height()-b.zoomrestore.padding.h+"px"});b.onResize();b.setScrollTop(Math.min(b.page.maxh,g))}};this.init();p.nicescroll.push(this)},ia=function(e){var n=
126
- this;this.nc=e;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.reset=function(m,c){n.stop();n.steptime=0;n.lasttime=aa();n.speedx=0;n.speedy=0;n.lastx=m;n.lasty=c;n.lastscrollx=-1;n.lastscrolly=-1};this.update=function(m,c){var l=aa();n.steptime=l-n.lasttime;n.lasttime=l;l=c-n.lasty;var v=m-n.lastx,A=n.nc.getScrollTop(),M=n.nc.getScrollLeft();A+=
127
- l;M+=v;n.snapx=0>M||M>n.nc.page.maxw;n.snapy=0>A||A>n.nc.page.maxh;n.speedx=v;n.speedy=l;n.lastx=m;n.lasty=c};this.stop=function(){n.nc.unsynched("domomentum2d");n.timer&&clearTimeout(n.timer);n.timer=0;n.lastscrollx=-1;n.lastscrolly=-1};this.doSnapy=function(m,c){var l=!1;0>c?(c=0,l=!0):c>n.nc.page.maxh&&(c=n.nc.page.maxh,l=!0);0>m?(m=0,l=!0):m>n.nc.page.maxw&&(m=n.nc.page.maxw,l=!0);l?n.nc.doScrollPos(m,c,n.nc.opt.snapbackspeed):n.nc.triggerScrollEnd()};this.doMomentum=function(m){var c=aa(),l=
128
- m?c+m:n.lasttime;m=n.nc.getScrollLeft();var v=n.nc.getScrollTop(),A=n.nc.page.maxh,M=n.nc.page.maxw;n.speedx=0<M?Math.min(60,n.speedx):0;n.speedy=0<A?Math.min(60,n.speedy):0;l=l&&60>=c-l;if(0>v||v>A||0>m||m>M)l=!1;m=n.speedx&&l?n.speedx:!1;if(n.speedy&&l&&n.speedy||m){var b=Math.max(16,n.steptime);50<b&&(m=b/50,n.speedx*=m,n.speedy*=m,b=50);n.demulxy=0;n.lastscrollx=n.nc.getScrollLeft();n.chkx=n.lastscrollx;n.lastscrolly=n.nc.getScrollTop();n.chky=n.lastscrolly;var Q=n.lastscrollx,z=n.lastscrolly,
129
- la=function(){var I=600<aa()-c?.04:.02;n.speedx&&(Q=Math.floor(n.lastscrollx-n.speedx*(1-n.demulxy)),n.lastscrollx=Q,0>Q||Q>M)&&(I=.1);n.speedy&&(z=Math.floor(n.lastscrolly-n.speedy*(1-n.demulxy)),n.lastscrolly=z,0>z||z>A)&&(I=.1);n.demulxy=Math.min(1,n.demulxy+I);n.nc.synched("domomentum2d",function(){n.speedx&&(n.nc.getScrollLeft(),n.chkx=Q,n.nc.setScrollLeft(Q));n.speedy&&(n.nc.getScrollTop(),n.chky=z,n.nc.setScrollTop(z));n.timer||(n.nc.hideCursor(),n.doSnapy(Q,z))});1>n.demulxy?n.timer=setTimeout(la,
130
- b):(n.stop(),n.nc.hideCursor(),n.doSnapy(Q,z))};la()}else n.doSnapy(n.nc.getScrollLeft(),n.nc.getScrollTop())}},na=p.fn.scrollTop;"object"===typeof p.cssHooks&&(p.cssHooks.pageYOffset={get:function(e,n,m){return(n=p.data(e,"__nicescroll")||!1)&&n.ishwscroll?n.getScrollTop():na.call(e)},set:function(e,n){var m=p.data(e,"__nicescroll")||!1;m&&m.ishwscroll?m.setScrollTop(parseInt(n)):na.call(e,n);return this}});p.fn.scrollTop=function(e){if(void 0===e){var n=this[0]?p.data(this[0],"__nicescroll")||!1:
131
- !1;return n&&n.ishwscroll?n.getScrollTop():na.call(this)}return this.each(function(){var m=p.data(this,"__nicescroll")||!1;m&&m.ishwscroll?m.setScrollTop(parseInt(e)):na.call(p(this),e)})};var ha=p.fn.scrollLeft;"object"===typeof p.cssHooks&&(p.cssHooks.pageXOffset={get:function(e,n,m){return(n=p.data(e,"__nicescroll")||!1)&&n.ishwscroll?n.getScrollLeft():ha.call(e)},set:function(e,n){var m=p.data(e,"__nicescroll")||!1;m&&m.ishwscroll?m.setScrollLeft(parseInt(n)):ha.call(e,n);return this}});p.fn.scrollLeft=
132
- function(e){if(void 0===e){var n=this[0]?p.data(this[0],"__nicescroll")||!1:!1;return n&&n.ishwscroll?n.getScrollLeft():ha.call(this)}return this.each(function(){var m=p.data(this,"__nicescroll")||!1;m&&m.ishwscroll?m.setScrollLeft(parseInt(e)):ha.call(p(this),e)})};var ca=function(e){var n=this;this.length=0;this.name="nicescrollarray";this.each=function(l){p.each(n,l);return n};this.push=function(l){n[n.length]=l;n.length++};this.eq=function(l){return n[l]};if(e)for(var m=0;m<e.length;m++){var c=
133
- p.data(e[m],"__nicescroll")||!1;c&&(this[this.length]=c,this.length++)}return this};(function(e,n,m){for(var c=0,l=n.length;c<l;c++)m(e,n[c])})(ca.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(e,n){e[n]=function(){var m=arguments;return this.each(function(){this[n].apply(this,m)})}});p.fn.getNiceScroll=function(e){return void 0===e?new ca(this):this[e]&&p.data(this[e],"__nicescroll")||!1};if("object"===typeof p.expr){var oa=p.expr.pseudos||p.expr[":"];oa&&
134
- (oa.nicescroll=function(e){return void 0!==p.data(e,"__nicescroll")})}p.fn.niceScroll=function(e,n){void 0!==n||"object"!=typeof e||"jquery"in e||(n=e,e=!1);var m=new ca;this.each(function(){var c=p(this),l=p.extend({},n);if(e){var v=p(e);l.doc=1<v.length?p(e,c):v;l.win=c}"doc"in l&&!("win"in l)&&(l.win=c);v=c.data("__nicescroll")||!1;v||(l.doc=l.doc||c,v=new ka(l,c),c.data("__nicescroll",v));m.push(v)});return 1===m.length?m[0]:m};L.NiceScroll={getjQuery:function(){return p}};p.nicescroll||(p.nicescroll=
135
- new ca,p.nicescroll.options=fa)})(function(p){var B=function(){function u(f){return null==f?String(f):O[U.call(f)]||"object"}function y(f){return"function"==u(f)}function F(f){return null!=f&&f==f.window}function J(f){return"object"==u(f)}function w(f){return J(f)&&!F(f)&&Object.getPrototypeOf(f)==Object.prototype}function H(f){var r=!!f&&"length"in f&&f.length,D=x.type(f);return"function"!=D&&!F(f)&&("array"==D||0===r||"number"==typeof r&&0<r&&r-1 in f)}function K(f){return m.call(f,function(r){return null!=
136
- r})}function N(f){return f.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function P(f){return f in A?A[f]:A[f]=new RegExp("(^|\\s)"+f+"(\\s|$)")}function Z(f,r){return"number"!=typeof r||M[N(f)]?r:r+"px"}function ba(f){return"children"in f?c.call(f.children):x.map(f.childNodes,function(r){if(1==r.nodeType)return r})}function aa(f,r){var D,R=f?f.length:0;for(D=0;D<R;D++)this[D]=f[D];this.length=R;this.selector=r||""}
137
- function fa(f,r,D){for(ca in r)D&&(w(r[ca])||W(r[ca]))?(w(r[ca])&&!w(f[ca])&&(f[ca]={}),W(r[ca])&&!W(f[ca])&&(f[ca]=[]),fa(f[ca],r[ca],D)):r[ca]!==ha&&(f[ca]=r[ca])}function ma(f,r){return null==r?x(f):x(f).filter(r)}function Y(f,r,D,R){return y(r)?r.call(f,D,R):r}function ka(f,r){var D=f.className||"",R=D&&D.baseVal!==ha;if(r===ha)return R?D.baseVal:D;R?D.baseVal=r:f.className=r}function ia(f){try{return f?"true"==f||("false"==f?!1:"null"==f?null:+f+""==f?+f:/^[\[\{]/.test(f)?x.parseJSON(f):f):f}catch(r){return f}}
138
- function na(f,r){r(f);for(var D=0,R=f.childNodes.length;D<R;D++)na(f.childNodes[D],r)}var ha,ca,oa,e=[],n=e.concat,m=e.filter,c=e.slice,l=p.document,v={},A={},M={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},b=/^\s*<(\w+|!)[^>]*>/,Q=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,la=/^(?:body|html)$/i,I=/([A-Z])/g,ja="val css html text data width height offset".split(" "),d=l.createElement("table"),
139
- h=l.createElement("tr"),q={tr:l.createElement("tbody"),tbody:d,thead:d,tfoot:d,td:h,th:h,"*":l.createElement("div")},C=/complete|loaded|interactive/,G=/^[\w-]*$/,O={},U=O.toString,S={},T=l.createElement("div"),V={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},W=Array.isArray||function(f){return f instanceof
140
- Array};S.matches=function(f,r){if(!r||!f||1!==f.nodeType)return!1;var D=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.matchesSelector;if(D)return D.call(f,r);var R=f.parentNode;(D=!R)&&(R=T).appendChild(f);r=~S.qsa(R,r).indexOf(f);D&&T.removeChild(f);return r};var g=function(f){return f.replace(/-+(.)?/g,function(r,D){return D?D.toUpperCase():""})};var t=function(f){return m.call(f,function(r,D){return f.indexOf(r)==D})};S.fragment=function(f,r,D){var R;Q.test(f)&&
141
- (R=x(l.createElement(RegExp.$1)));if(!R){f.replace&&(f=f.replace(z,"<$1></$2>"));r===ha&&(r=b.test(f)&&RegExp.$1);r in q||(r="*");var ea=q[r];ea.innerHTML=""+f;R=x.each(c.call(ea.childNodes),function(){ea.removeChild(this)})}if(w(D)){var da=x(R);x.each(D,function(wa,ta){if(-1<ja.indexOf(wa))da[wa](ta);else da.attr(wa,ta)})}return R};S.Z=function(f,r){return new aa(f,r)};S.isZ=function(f){return f instanceof S.Z};S.init=function(f,r){if(f)if("string"==typeof f)if(f=f.trim(),"<"==f[0]&&b.test(f))r=
142
- S.fragment(f,RegExp.$1,r),f=null;else{if(r!==ha)return x(r).find(f);r=S.qsa(l,f)}else{if(y(f))return x(l).ready(f);if(S.isZ(f))return f;if(W(f))r=K(f);else if(J(f))r=[f],f=null;else if(b.test(f))r=S.fragment(f.trim(),RegExp.$1,r),f=null;else{if(r!==ha)return x(r).find(f);r=S.qsa(l,f)}}else return S.Z();return S.Z(r,f)};var x=function(f,r){return S.init(f,r)};x.extend=function(f){var r=c.call(arguments,1);if("boolean"==typeof f){var D=f;f=r.shift()}r.forEach(function(R){fa(f,R,D)});return f};S.qsa=
143
- function(f,r){var D,R="#"==r[0],ea=!R&&"."==r[0],da=R||ea?r.slice(1):r,wa=G.test(da);return f.getElementById&&wa&&R?(D=f.getElementById(da))?[D]:[]:1!==f.nodeType&&9!==f.nodeType&&11!==f.nodeType?[]:c.call(wa&&!R&&f.getElementsByClassName?ea?f.getElementsByClassName(da):f.getElementsByTagName(r):f.querySelectorAll(r))};x.contains=l.documentElement.contains?function(f,r){return f!==r&&f.contains(r)}:function(f,r){for(;r&&=r.parentNode;)if(r===f)return!0;return!1};x.type=u;x.isFunction=y;x.isWindow=
144
- F;x.isArray=W;x.isPlainObject=w;x.isEmptyObject=function(f){for(var r in f)return!1;return!0};x.isNumeric=function(f){var r=Number(f),D=typeof f;return null!=f&&"boolean"!=D&&("string"!=D||f.length)&&!isNaN(r)&&isFinite(r)||!1};x.inArray=function(f,r,D){return e.indexOf.call(r,f,D)};x.camelCase=g;x.trim=function(f){return null==f?"":String.prototype.trim.call(f)};x.uuid=0;x.support={};x.expr={};x.noop=function(){};x.map=function(f,r){var D=[],R;if(H(f))for(R=0;R<f.length;R++){var ea=r(f[R],R);null!=
145
- ea&&D.push(ea)}else for(R in f)ea=r(f[R],R),null!=ea&&D.push(ea);return 0<D.length?x.fn.concat.apply([],D):D};x.each=function(f,r){var D;if(H(f))for(D=0;D<f.length&&!1!==r.call(f[D],D,f[D]);D++);else for(D in f)if(!1===r.call(f[D],D,f[D]))break;return f};x.grep=function(f,r){return m.call(f,r)};p.JSON&&(x.parseJSON=JSON.parse);x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(f,r){O["[object "+r+"]"]=r.toLowerCase()});x.data=function(f,r,D){if(D===ha)return"undefined"!==
146
- typeof f[r]?f[r]:ha;null===D?delete f[r]:f[r]=D};x.fn={jquery:"1.2.0",constructor:S.Z,length:0,forEach:e.forEach,reduce:e.reduce,push:e.push,sort:e.sort,splice:e.splice,indexOf:e.indexOf,concat:function(){var f,r=[];for(f=0;f<arguments.length;f++){var D=arguments[f];r[f]=S.isZ(D)?D.toArray():D}return n.apply(S.isZ(this)?this.toArray():this,r)},map:function(f){return x(x.map(this,function(r,D){return f.call(r,D,r)}))},slice:function(){return x(c.apply(this,arguments))},ready:function(f){C.test(l.readyState)&&
147
- l.body?f(x):l.addEventListener("DOMContentLoaded",function(){f(x)},!1);return this},get:function(f){return f===ha?c.call(this):this[0<=f?f:f+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(f){e.every.call(this,function(r,D){return!1!==f.call(r,D,r)});return this},filter:function(f){return y(f)?this.not(this.not(f)):x(m.call(this,function(r){return S.matches(r,
148
- f)}))},add:function(f,r){return x(t(this.concat(x(f,r))))},is:function(f){return":visible"===f?0<this.length?"none"!==this.css("display"):!1:J(f)?this[0]===f?!0:!1:0<this.length&&S.matches(this[0],f)},not:function(f){var r=[];if(y(f)&&f.call!==ha)this.each(function(R){f.call(this,R)||r.push(this)});else{var D="string"==typeof f?this.filter(f):H(f)&&y(f.item)?c.call(f):x(f);this.forEach(function(R){0>D.indexOf(R)&&r.push(R)})}return x(r)},has:function(f){return this.filter(function(){return J(f)?x.contains(this,
149
- f):x(this).find(f).size()})},eq:function(f){return-1===f?this.slice(f):this.slice(f,+f+1)},first:function(){var f=this[0];return f&&!J(f)?f:x(f)},last:function(){var f=this[this.length-1];return f&&!J(f)?f:x(f)},find:function(f){var r=this;return f?"object"==typeof f?x(f).filter(function(){var D=this;return e.some.call(r,function(R){return x.contains(R,D)})}):1==this.length?x(S.qsa(this[0],f)):this.map(function(){return S.qsa(this,f)}):x()},closest:function(f,r){var D=[],R="object"==typeof f&&x(f);
150
- this.each(function(ea,da){for(;da&&!(R?0<=R.indexOf(da):S.matches(da,f));)da=da!==r&&!(null!=da&&da.nodeType==da.DOCUMENT_NODE)&&da.parentNode;da&&0>D.indexOf(da)&&D.push(da)});return x(D)},parents:function(f){for(var r=[],D=this;0<D.length;)D=x.map(D,function(R){if((R=R.parentNode)&&(null==R||R.nodeType!=R.DOCUMENT_NODE)&&0>r.indexOf(R))return r.push(R),R});return ma(r,f)},parent:function(f){return ma(t(this.pluck("parentNode")),f)},children:function(f){return ma(this.map(function(){return ba(this)}),
151
- f)},contents:function(){return this.map(function(){return this.contentDocument||c.call(this.childNodes)})},siblings:function(f){return ma(this.map(function(r,D){return m.call(ba(D.parentNode),function(R){return R!==D})}),f)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(f){return x.map(this,function(r){return r[f]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display="");if("none"==getComputedStyle(this,"").getPropertyValue("display")){var f=
152
- this.style,r=this.nodeName;if(!v[r]){var D=l.createElement(r);l.body.appendChild(D);var R=getComputedStyle(D,"").getPropertyValue("display");D.parentNode.removeChild(D);"none"==R&&(R="block");v[r]=R}f.display=v[r]}})},replaceWith:function(f){return this.before(f).remove()},wrap:function(f){var r=y(f);if(this[0]&&!r)var D=x(f).get(0),R=D.parentNode||1<this.length;return this.each(function(ea){x(this).wrapAll(r?f.call(this,ea):R?D.cloneNode(!0):D)})},wrapAll:function(f){if(this[0]){x(this[0]).before(f=
153
- x(f));for(var r;(r=f.children()).length;)f=r.first();x(f).append(this)}return this},wrapInner:function(f){var r=y(f);return this.each(function(D){var R=x(this),ea=R.contents();D=r?f.call(this,D):f;ea.length?ea.wrapAll(D):R.append(D)})},unwrap:function(){this.parent().each(function(){x(this).replaceWith(x(this).children())});return this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(f){return this.each(function(){var r=
154
- x(this);(f===ha?"none"==r.css("display"):f)?r.show():r.hide()})},prev:function(f){return x(this.pluck("previousElementSibling")).filter(f||"*")},next:function(f){return x(this.pluck("nextElementSibling")).filter(f||"*")},html:function(f){return 0 in arguments?this.each(function(r){var D=this.innerHTML;x(this).empty().append(Y(this,f,r,D))}):0 in this?this[0].innerHTML:null},text:function(f){return 0 in arguments?this.each(function(r){r=Y(this,f,r,this.textContent);this.textContent=null==r?"":""+r}):
155
- 0 in this?this.pluck("textContent").join(""):null},attr:function(f,r){var D;return"string"!=typeof f||1 in arguments?this.each(function(R){if(1===this.nodeType)if(J(f))for(ca in f){var ea=ca;R=f[ca];null==R?this.removeAttribute(ea):this.setAttribute(ea,R)}else ea=f,R=Y(this,r,R,this.getAttribute(f)),null==R?this.removeAttribute(ea):this.setAttribute(ea,R)}):0 in this&&1==this[0].nodeType&&null!=(D=this[0].getAttribute(f))?D:ha},removeAttr:function(f){return this.each(function(){1===this.nodeType&&
156
- f.split(" ").forEach(function(r){this.removeAttribute(r)},this)})},prop:function(f,r){f=V[f]||f;return 1 in arguments?this.each(function(D){this[f]=Y(this,r,D,this[f])}):this[0]&&this[0][f]},removeProp:function(f){f=V[f]||f;return this.each(function(){delete this[f]})},data:function(f,r){if("object"===typeof r)this.length&&(this[0][f]=r);else{if("undefined"===typeof r){if(this.length&&"undefined"!==typeof this[0][f])return this[0][f]}else this.length&&("undefined"!==typeof this[0][f]&&delete this[0][f],
157
- r&&(this[0][f]=r));var D="data-"+f.replace(I,"-$1").toLowerCase();D=1 in arguments?this.attr(D,r):this.attr(D);return null!==D?ia(D):ha}},val:function(f){return 0 in arguments?(null==f&&(f=""),this.each(function(r){this.value=Y(this,f,r,this.value)})):this[0]&&(this[0].multiple?x(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(f){if(f)return this.each(function(D){var R=x(this);D=Y(this,f,D,R.offset());var ea=R.offsetParent().offset();
158
- D={top:D.top-ea.top,left:D.left-ea.left};"static"==R.css("position")&&(D.position="relative");R.css(D)});if(!this.length)return null;if(l.documentElement!==this[0]&&!x.contains(l.documentElement,this[0]))return{top:0,left:0};var r=this[0].getBoundingClientRect();return{left:r.left+p.pageXOffset,top:r.top+p.pageYOffset,width:Math.round(r.width),height:Math.round(r.height)}},css:function(f,r){if(2>arguments.length){var D=this[0];if("string"==typeof f)return D?D.style[g(f)]||getComputedStyle(D,"").getPropertyValue(f):
159
- void 0;if(W(f)){if(!D)return;var R={},ea=getComputedStyle(D,"");x.each(f,function(wa,ta){R[ta]=D.style[g(ta)]||ea.getPropertyValue(ta)});return R}}var da="";if("string"==u(f))r||0===r?da=N(f)+":"+Z(f,r):this.each(function(){this.style.removeProperty(N(f))});else for(ca in f)f[ca]||0===f[ca]?da+=N(ca)+":"+Z(ca,f[ca])+";":this.each(function(){this.style.removeProperty(N(ca))});return this.each(function(){this.style.cssText+=";"+da})},index:function(f){return f?this.indexOf(x(f)[0]):this.parent().children().indexOf(this[0])},
160
- hasClass:function(f){return f?e.some.call(this,function(r){return this.test(ka(r))},P(f)):!1},addClass:function(f){return f?this.each(function(r){if("className"in this){oa=[];var D=ka(this);Y(this,f,r,D).split(/\s+/g).forEach(function(R){x(this).hasClass(R)||oa.push(R)},this);oa.length&&ka(this,D+(D?" ":"")+oa.join(" "))}}):this},removeClass:function(f){return this.each(function(r){if("className"in this){if(f===ha)return ka(this,"");oa=ka(this);Y(this,f,r,oa).split(/\s+/g).forEach(function(D){oa=
161
- oa.replace(P(D)," ")});ka(this,oa.trim())}})},toggleClass:function(f,r){return f?this.each(function(D){var R=x(this);Y(this,f,D,ka(this)).split(/\s+/g).forEach(function(ea){(r===ha?!R.hasClass(ea):r)?R.addClass(ea):R.removeClass(ea)})}):this},scrollTop:function(f){if(this.length){var r="scrollTop"in this[0];return f===ha?r?this[0].scrollTop:this[0].pageYOffset:this.each(r?function(){this.scrollTop=f}:function(){this.scrollTo(this.scrollX,f)})}},scrollLeft:function(f){if(this.length){var r="scrollLeft"in
162
- this[0];return f===ha?r?this[0].scrollLeft:this[0].pageXOffset:this.each(r?function(){this.scrollLeft=f}:function(){this.scrollTo(f,this.scrollY)})}},position:function(){if(this.length){var f=this[0],r=this.offsetParent(),D=this.offset(),R=la.test(r[0].nodeName)?{top:0,left:0}:r.offset();D.top-=parseFloat(x(f).css("margin-top"))||0;D.left-=parseFloat(x(f).css("margin-left"))||0;R.top+=parseFloat(x(r[0]).css("border-top-width"))||0;R.left+=parseFloat(x(r[0]).css("border-left-width"))||0;return{top:D.top-
163
- R.top,left:D.left-R.left}}},offsetParent:function(){return this.map(function(){for(var f=this.offsetParent||l.body;f&&!la.test(f.nodeName)&&"static"==x(f).css("position");)f=f.offsetParent;return f})}};x.fn.detach=x.fn.remove;["width","height"].forEach(function(f){var r=f.replace(/./,function(D){return D[0].toUpperCase()});x.fn[f]=function(D){var R,ea=this[0];return D===ha?F(ea)?ea["inner"+r]:null!=ea&&ea.nodeType==ea.DOCUMENT_NODE?ea.documentElement["scroll"+r]:(R=this.offset())&&R[f]:this.each(function(da){ea=
164
- x(this);ea.css(f,Y(this,D,da,ea[f]()))})}});x.fn.innerWidth=function(){return this.width()};x.fn.innerHeight=function(){return this.height()};["after","prepend","before","append"].forEach(function(f,r){var D=r%2;x.fn[f]=function(){var R,ea=x.map(arguments,function(ta){var ua=[];R=u(ta);return"array"==R?(ta.forEach(function(Aa){if(Aa.nodeType!==ha)return ua.push(Aa);if(x.zepto.isZ(Aa))return ua=ua.concat(Aa.get());ua=ua.concat(S.fragment(Aa))}),ua):"object"==R||null==ta?ta:S.fragment(ta)}),da,wa=1<
165
- this.length;return 1>ea.length?this:this.each(function(ta,ua){da=D?ua:ua.parentNode;ua=0==r?ua.nextSibling:1==r?ua.firstChild:2==r?ua:null;var Aa=x.contains(l.documentElement,da);ea.forEach(function(ya){if(wa)ya=ya.cloneNode(!0);else if(!da)return x(ya).remove();da.insertBefore(ya,ua);Aa&&na(ya,function(za){if(!(null==za.nodeName||"SCRIPT"!==za.nodeName.toUpperCase()||za.type&&"text/javascript"!==za.type||za.src)){var E=za.ownerDocument?za.ownerDocument.defaultView:p;E.eval.call(E,za.innerHTML)}})})})};
166
- x.fn[D?f+"To":"insert"+(r?"Before":"After")]=function(R){x(R)[f](this);return this}});S.Z.prototype=aa.prototype=x.fn;S.uniq=t;S.deserializeValue=ia;x.zepto=S;return x}();p.mQuery=B;void 0===p.$$&&(p.$$=B);(function(u){function y(m){return m._zid||(m._zid=Z++)}function F(m,c,l,v){c=J(c);if(c.ns)var A=new RegExp("(?:^| )"+c.ns.replace(" "," .* ?")+"(?: |$)");return(Y[y(m)]||[]).filter(function(M){return M&&(!c.e||M.e==c.e)&&(!c.ns||A.test(M.ns))&&(!l||y(M.fn)===y(l))&&(!v||M.sel==v)})}function J(m){m=
167
- (""+m).split(".");return{e:m[0],ns:m.slice(1).sort().join(" ")}}function w(m){return ha[m]||ia&&na[m]||m}function H(m,c,l,v,A,M,b){var Q=y(m),z=Y[Q]||(Y[Q]=[]);c.split(/\s/).forEach(function(la){if("ready"==la)return u(document).ready(l);var I=J(la);I.fn=l;I.sel=A;I.e in ha&&(l=function(d){var h=d.relatedTarget;if(!h||h!==this&&!u.contains(this,h))return I.fn.apply(this,arguments)});var ja=(I.del=M)||l;I.proxy=function(d){d=N(d);if(!d.isImmediatePropagationStopped()){d.data=v;var h=ja.apply(m,d._args==
168
- ba?[d]:[d].concat(d._args));!1===h&&(d.preventDefault(),d.stopPropagation());return h}};I.i=z.length;z.push(I);"addEventListener"in m&&m.addEventListener(w(I.e),I.proxy,I.del&&!ia&&I.e in na||!!b)})}function K(m,c,l,v,A){var M=y(m);(c||"").split(/\s/).forEach(function(b){F(m,b,l,v).forEach(function(Q){delete Y[M][Q.i];"removeEventListener"in m&&m.removeEventListener(w(Q.e),Q.proxy,Q.del&&!ia&&Q.e in na||!!A)})})}function N(m,c){if(c||!m.isDefaultPrevented)if(c||=m,u.each(n,function(l,v){var A=c[l];
169
- m[l]=function(){this[v]=ca;return A&&A.apply(c,arguments)};m[v]=oa}),m.timeStamp||(m.timeStamp=Date.now()),c.defaultPrevented!==ba?c.defaultPrevented:"returnValue"in c?!1===c.returnValue:c.getPreventDefault&&c.getPreventDefault())m.isDefaultPrevented=ca;return m}function P(m){var c,l={originalEvent:m};for(c in m)e.test(c)||m[c]===ba||(l[c]=m[c]);return N(l,m)}var Z=1,ba,aa=Array.prototype.slice,fa=u.isFunction,ma=function(m){return"string"==typeof m},Y={},ka={},ia="onfocusin"in p,na={focus:"focusin",
170
- blur:"focusout"},ha={mouseenter:"mouseover",mouseleave:"mouseout"};ka.click=ka.mousedown=ka.mouseup=ka.mousemove="MouseEvents";u.event={add:H,remove:K};u.proxy=function(m,c){var l=2 in arguments&&aa.call(arguments,2);if(fa(m)){var v=function(){return m.apply(c,l?l.concat(aa.call(arguments)):arguments)};v._zid=y(m);return v}if(ma(c))return l?(l.unshift(m[c],m),u.proxy.apply(null,l)):u.proxy(m[c],m);throw new TypeError("expected function");};u.fn.bind=function(m,c,l){return this.on(m,c,l)};u.fn.unbind=
171
- function(m,c){return this.off(m,c)};u.fn.one=function(m,c,l,v){return this.on(m,c,l,v,1)};var ca=function(){return!0},oa=function(){return!1},e=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,n={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};u.fn.delegate=function(m,c,l){return this.on(c,m,l)};u.fn.undelegate=function(m,c,l){return this.off(c,m,l)};u.fn.live=function(m,c){u(document.body).delegate(this.selector,
172
- m,c);return this};u.fn.die=function(m,c){u(document.body).undelegate(this.selector,m,c);return this};u.fn.on=function(m,c,l,v,A){var M,b,Q=this;if(m&&!ma(m))return u.each(m,function(z,la){Q.on(z,c,l,la,A)}),Q;ma(c)||fa(v)||!1===v||(v=l,l=c,c=ba);if(v===ba||!1===l)v=l,l=ba;!1===v&&(v=oa);return Q.each(function(z,la){A&&(M=function(I){K(la,I.type,v);return v.apply(this,arguments)});c&&(b=function(I){var ja=u(I.target).closest(c,la).get(0);if(ja&&ja!==la){var d=u.extend(P(I),{currentTarget:ja,liveFired:la});
173
- return(M||v).apply(ja,[d].concat(aa.call(arguments,1)))}});H(la,m,v,l,c,b||M)})};u.fn.off=function(m,c,l){var v=this;if(m&&!ma(m))return u.each(m,function(A,M){v.off(A,c,M)}),v;ma(c)||fa(l)||!1===l||(l=c,c=ba);!1===l&&(l=oa);return v.each(function(){K(this,m,l,c)})};u.fn.trigger=function(m,c){m=ma(m)||u.isPlainObject(m)?u.Event(m):N(m);m._args=c;return this.each(function(){if(m.type in na&&"function"==typeof this[m.type])this[m.type]();else"dispatchEvent"in this?this.dispatchEvent(m):u(this).triggerHandler(m,
174
- c)})};u.fn.triggerHandler=function(m,c){var l,v;this.each(function(A,M){l=P(ma(m)?u.Event(m):m);l._args=c;l.target=M;u.each(F(M,m.type||m),function(b,Q){v=Q.proxy(l);if(l.isImmediatePropagationStopped())return!1})});return v};"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(m){u.fn[m]=function(c){return 0 in arguments?this.bind(m,c):this.trigger(m)}});
175
- u.Event=function(m,c){ma(m)||(c=m,m=c.type);var l=document.createEvent(ka[m]||"Events"),v=!0;if(c)for(var A in c)"bubbles"==A?v=!!c[A]:l[A]=c[A];l.initEvent(m,v,!0);return N(l)}})(B);(function(u){["width","height"].forEach(function(y){var F=y.replace(/./,function(J){return J[0].toUpperCase()});u.fn["outer"+F]=function(J){var w=this;if(w){var H=w[y]();({width:["left","right"],height:["top","bottom"]})[y].forEach(function(K){J&&(H+=parseInt(w.css("margin-"+K),10))});return H}return null}})})(B);(function(u){function y(m,
176
- c,l,v){if(m.global)return m=c||Y,l=u.Event(l),u(m).trigger(l,v),!l.isDefaultPrevented()}function F(m){m.global&&0===u.active++&&y(m,null,"ajaxStart")}function J(m,c){var l=c.context;if(!1===c.beforeSend.call(l,m,c)||!1===y(c,l,"ajaxBeforeSend",[m,c]))return!1;y(c,l,"ajaxSend",[m,c])}function w(m,c,l,v){var A=l.context;l.success.call(A,m,"success",c);v&&v.resolveWith(A,[m,"success",c]);y(l,A,"ajaxSuccess",[c,l,m]);K("success",c,l)}function H(m,c,l,v,A){var M=v.context;v.error.call(M,l,c,m);A&&A.rejectWith(M,
177
- [l,c,m]);y(v,M,"ajaxError",[l,v,m||c]);K(c,l,v)}function K(m,c,l){var v=l.context;l.complete.call(v,c,m);y(l,v,"ajaxComplete",[c,l]);l.global&&!--u.active&&y(l,null,"ajaxStop")}function N(){}function P(m){m&&=m.split(";",2)[0];return m&&("text/html"==m?"html":"application/json"==m?"json":ha.test(m)?"script":ca.test(m)&&"xml")||"text"}function Z(m,c){return""==c?m:(m+"&"+c).replace(/[&?]{1,2}/,"?")}function ba(m){m.processData&&m.data&&"string"!=u.type(m.data)&&(m.data=u.param(m.data,m.traditional));
178
- !m.data||m.type&&"GET"!=m.type.toUpperCase()&&"jsonp"!=m.dataType||(m.url=Z(m.url,m.data),m.data=void 0)}function aa(m,c,l,v){u.isFunction(c)&&(v=l,l=c,c=void 0);u.isFunction(l)||(v=l,l=void 0);return{url:m,data:c,success:l,dataType:v}}function fa(m,c,l,v){var A,M=u.isArray(c),b=u.isPlainObject(c);u.each(c,function(Q,z){A=u.type(z);v&&(Q=l?v:v+"["+(b||"object"==A||"array"==A?Q:"")+"]");!v&&M?m.add(z.name,z.value):"array"==A||!l&&"object"==A?fa(m,z,l,Q):m.add(Q,z)})}var ma=+new Date,Y=p.document,ka,
179
- ia,na=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,ha=/^(?:text|application)\/javascript/i,ca=/^(?:text|application)\/xml/i,oa=/^\s*$/,e=Y.createElement("a");e.href=p.location.href;u.active=0;u.ajaxJSONP=function(m,c){if(!("type"in m))return u.ajax(m);var l=m.jsonpCallback,v=(u.isFunction(l)?l():l)||"Zepto"+ma++,A=Y.createElement("script"),M=p[v],b,Q=function(I){u(A).triggerHandler("error",I||"abort")},z={abort:Q},la;c&&c.promise(z);u(A).on("load error",function(I,ja){clearTimeout(la);u(A).off().remove();
180
- "error"!=I.type&&b?w(b[0],z,m,c):H(null,ja||"error",z,m,c);p[v]=M;b&&u.isFunction(M)&&M(b[0]);M=b=void 0});if(!1===J(z,m))return Q("abort"),z;p[v]=function(){b=arguments};A.src=m.url.replace(/\?(.+)=\?/,"?$1="+v);Y.head.appendChild(A);0<m.timeout&&(la=setTimeout(function(){Q("timeout")},m.timeout));return z};u.ajaxSettings={type:"GET",beforeSend:N,success:N,error:N,complete:N,context:null,global:!0,xhr:function(){return new p.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",
181
- json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:N};u.ajax=function(m){var c=u.extend({},m||{}),l=u.Deferred&&u.Deferred();for(ka in u.ajaxSettings)void 0===c[ka]&&(c[ka]=u.ajaxSettings[ka]);F(c);if(!c.crossDomain){var v=Y.createElement("a");v.href=c.url;v.href=v.href;c.crossDomain=e.protocol+"//"+e.host!==v.protocol+"//"+v.host}c.url||(c.url=p.location.toString());-1<(v=c.url.indexOf("#"))&&(c.url=
182
- c.url.slice(0,v));ba(c);var A=c.dataType;(v=/\?.+=\?/.test(c.url))&&(A="jsonp");!1!==c.cache&&(m&&!0===m.cache||"script"!=A&&"jsonp"!=A)||(c.url=Z(c.url,"_="+Date.now()));if("jsonp"==A)return v||(c.url=Z(c.url,c.jsonp?c.jsonp+"=?":!1===c.jsonp?"":"callback=?")),u.ajaxJSONP(c,l);m=c.accepts[A];var M={};v=function(I,ja){M[I.toLowerCase()]=[I,ja]};var b=/^([\w-]+:)\/\//.test(c.url)?RegExp.$1:p.location.protocol,Q=c.xhr(),z=Q.setRequestHeader,la;l&&l.promise(Q);c.crossDomain||v("X-Requested-With","XMLHttpRequest");
183
- v("Accept",m||"*/*");if(m=c.mimeType||m)-1<m.indexOf(",")&&(m=m.split(",",2)[0]),Q.overrideMimeType&&Q.overrideMimeType(m);(c.contentType||!1!==c.contentType&&c.data&&"GET"!=c.type.toUpperCase())&&v("Content-Type",c.contentType||"application/x-www-form-urlencoded");if(c.headers)for(ia in c.headers)v(ia,c.headers[ia]);Q.setRequestHeader=v;Q.onreadystatechange=function(){if(4==Q.readyState){Q.onreadystatechange=N;clearTimeout(la);var I=!1;if(200<=Q.status&&300>Q.status||304==Q.status||0==Q.status&&
184
- "file:"==b){A=A||P(c.mimeType||Q.getResponseHeader("content-type"));if("arraybuffer"==Q.responseType||"blob"==Q.responseType)var ja=Q.response;else{ja=Q.responseText;try{ja=c.dataFilter==N?ja:c.dataFilter.call(c.context,ja,A),"script"==A?(0,eval)(ja):"xml"==A?ja=Q.responseXML:"json"==A&&(ja=oa.test(ja)?null:u.parseJSON(ja))}catch(d){I=d}if(I)return H(I,"parsererror",Q,c,l)}w(ja,Q,c,l)}else H(Q.statusText||null,Q.status?"error":"abort",Q,c,l)}};if(!1===J(Q,c))return Q.abort(),H(null,"abort",Q,c,l),
185
- Q;Q.open(c.type,c.url,"async"in c?c.async:!0,c.username,c.password);if(c.xhrFields)for(ia in c.xhrFields)Q[ia]=c.xhrFields[ia];for(ia in M)z.apply(Q,M[ia]);0<c.timeout&&(la=setTimeout(function(){Q.onreadystatechange=N;Q.abort();H(null,"timeout",Q,c,l)},c.timeout));Q.send(c.data?c.data:null);return Q};u.get=function(){return u.ajax(aa.apply(null,arguments))};u.post=function(){var m=aa.apply(null,arguments);m.type="POST";return u.ajax(m)};u.getJSON=function(){var m=aa.apply(null,arguments);m.dataType=
186
- "json";return u.ajax(m)};u.fn.load=function(m,c,l){if(!this.length)return this;var v=this,A=m.split(/\s/);m=aa(m,c,l);var M=m.success;if(1<A.length){m.url=A[0];var b=A[1]}m.success=function(Q){v.html(b?u("<div>").html(Q.replace(na,"")).find(b):Q);M&&M.apply(v,arguments)};u.ajax(m);return this};var n=encodeURIComponent;u.param=function(m,c){var l=[];l.add=function(v,A){u.isFunction(A)&&(A=A());null==A&&(A="");this.push(n(v)+"="+n(A))};fa(l,m,c);return l.join("&").replace(/%20/g,"+")}})(B);(function(u){u.fn.serializeArray=
187
- function(){var y,F,J=[],w=function(H){if(H.forEach)return H.forEach(w);J.push({name:y,value:H})};this[0]&&u.each(this[0].elements,function(H,K){F=K.type;(y=K.name)&&"fieldset"!=K.nodeName.toLowerCase()&&!K.disabled&&"submit"!=F&&"reset"!=F&&"button"!=F&&"file"!=F&&("radio"!=F&&"checkbox"!=F||K.checked)&&w(u(K).val())});return J};u.fn.serialize=function(){var y=[];this.serializeArray().forEach(function(F){y.push(encodeURIComponent(F.name)+"="+encodeURIComponent(F.value))});return y.join("&")};u.fn.submit=
188
- function(y){if(0 in arguments)this.bind("submit",y);else if(this.length){var F=u.Event("submit");this.eq(0).trigger(F);F.isDefaultPrevented()||this.get(0).submit()}return this}})(B);(function(u,y){function F(ha){return w?w+ha:ha.toLowerCase()}var J="",w,H={Webkit:"webkit",Moz:"",O:"o"},K=document.createElement("div"),N=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,P,Z,ba,aa,fa,ma,Y,ka,ia={};K.style.transform===y&&u.each(H,function(ha,ca){if(K.style[ha+"TransitionProperty"]!==
189
- y)return J="-"+ha.toLowerCase()+"-",w=ca,!1});var na=J+"transform";ia[P=J+"transition-property"]=ia[Z=J+"transition-duration"]=ia[aa=J+"transition-delay"]=ia[ba=J+"transition-timing-function"]=ia[fa=J+"animation-name"]=ia[ma=J+"animation-duration"]=ia[ka=J+"animation-delay"]=ia[Y=J+"animation-timing-function"]="";u.fx={off:w===y&&K.style.transitionProperty===y,speeds:{_default:400,fast:200,slow:600},cssPrefix:J,transitionEnd:F("TransitionEnd"),animationEnd:F("AnimationEnd")};u.fn.animate=function(ha,
190
- ca,oa,e,n){u.isFunction(ca)&&(e=ca,ca=oa=y);u.isFunction(oa)&&(e=oa,oa=y);u.isPlainObject(ca)&&(oa=ca.easing,e=ca.complete,n=ca.delay,ca=ca.duration);ca&&=("number"==typeof ca?ca:u.fx.speeds[ca]||u.fx.speeds._default)/1E3;n&&=parseFloat(n)/1E3;return this.anim(ha,ca,oa,e,n)};u.fn.anim=function(ha,ca,oa,e,n){var m,c={},l="",v=this,A=u.fx.transitionEnd,M=!1;ca===y&&(ca=u.fx.speeds._default/1E3);n===y&&(n=0);u.fx.off&&(ca=0);if("string"==typeof ha)c[fa]=ha,c[ma]=ca+"s",c[ka]=n+"s",c[Y]=oa||"linear",
191
- A=u.fx.animationEnd;else{var b=[];for(m in ha)N.test(m)?l+=m+"("+ha[m]+") ":(c[m]=ha[m],b.push(m.replace(/([A-Z])/g,"-$1").toLowerCase()));l&&(c[na]=l,b.push(na));0<ca&&"object"===typeof ha&&(c[P]=b.join(", "),c[Z]=ca+"s",c[aa]=n+"s",c[ba]=oa||"linear")}var Q=function(z){if("undefined"!==typeof z){if(z.target!==z.currentTarget)return;u(z.target).unbind(A,Q)}else u(this).unbind(A,Q);M=!0;u(this).css(ia);e&&e.call(this)};0<ca&&(this.bind(A,Q),setTimeout(function(){M||Q.call(v)},1E3*(ca+n)+25));this.size()&&
192
- this.get(0).clientLeft;this.css(c);0>=ca&&setTimeout(function(){v.each(function(){Q.call(this)})},0);return this};u.fn.stop=function(ha,ca){return this};K=null})(B);(function(){try{getComputedStyle(void 0)}catch(y){var u=getComputedStyle;p.getComputedStyle=function(F,J){try{return u(F,J)}catch(w){return null}}}})();return B}(L));var Da=function(){if(document.currentScript)var p=document.currentScript.src;else{p=document.scripts;for(var B=p.length-1,u,y=B;0<y;y--)if("interactive"===p[y].readyState){u=
193
- p[y].src;break}p=u||p[B].src}B=p.indexOf("v=");B=0<B?p.substr(B+2):2023;p=p.substring(0,p.lastIndexOf("/")+1);p.endsWith("zwplayer/")||(p+="js/");return{path:p,v:B}}(),Ia=Da.path+"plugins/",Ja=function(p,B,u){var y=document.getElementsByTagName("head");if(0==y.length){y=document.createElement("head");var F=document.getElementsByTagName("body");if(0<F.length)F=F[0],document.insertBefore(y,F);else return alert("Invalid html document: no HEAD tag"),!1}else{y=y[0];F=y.childNodes;for(var J=0;J<F.length;J++){var w=
194
- F[J];if("SCRIPT"===w.nodeName.toUpperCase()&&w.id&&w.id==p){if("true"!=w.getAttribute("loadstate")){var H=function(){"true"!=w.getAttribute("loadstate")?setTimeout(H,50):"function"==typeof u&&u(p)};setTimeout(H,50);return!1}"function"==typeof u&&u(p);return!0}}}var K=document.createElement("script");K.type="text/javascript";K.readyState?K.onreadystatechange=function(){if("loaded"==K.readyState||"complete"==K.readyState)K.onreadystatechange=null,K.setAttribute("loadstate","true"),"function"==typeof u&&
195
- u(p)}:K.onload=function(){K.setAttribute("loadstate","true");"function"==typeof u&&u(p)};K.id=p;K.src=B;y.appendChild(K);return!1};(function(p,B,u){var y=document.getElementsByTagName("head");if(0==y.length){y=document.createElement("head");var F=document.getElementsByTagName("body");if(0<F.length)F=F[0],document.insertBefore(y,F);else return alert("Invalid html document: no HEAD tag found"),!1}else{y=y[0];F=y.childNodes;for(var J=0;J<F.length;J++){var w=F[J];if("link"===w.nodeName.toUpperCase()&&
196
- w.id&&w.id==p){if("true"!==w.getAttribute("loadstate")){var H=function(){"true"!==w.getAttribute("loadstate")?setTimeout(H,50):"function"===typeof u&&u(p)};setTimeout(H,50);return!1}"function"===typeof u&&u(p);return!0}}}var K=document.createElement("link");K.type="text/css";K.setAttribute("rel","stylesheet");K.readyState?K.onreadystatechange=function(){if("loaded"==K.readyState||"complete"==K.readyState)K.onreadystatechange=null,K.setAttribute("loadstate","true"),"function"==typeof u&&u(p)}:K.onload=
197
- function(){K.setAttribute("loadstate","true");"function"==typeof u&&u(p)};K.id=p;K.href=B;y.appendChild(K);return!1})("zwplayer-css",Da.path+"css/zwplayer.css?v="+Da.v,function(p){console.log("zwplayer.css["+p+"] is loaded")});var Ua=function(p){return"object"===typeof HTMLElement?p instanceof HTMLElement:!(!p||"object"!==typeof p||1!==p.nodeType&&9!==p.nodeType||"string"!==typeof p.nodeName)};Array.isArray||(Array.isArray=function(p){return"[object Array]"===Object.prototype.toString.call(p)});var Va=
198
- /iPhone|iPad|iPod/.test(navigator.userAgent);(function(p){p+="=";for(var B=document.cookie.split(";"),u=0;u<B.length;u++){var y=B[u].trim();if(0==y.indexOf(p))return y.substring(p.length,y.length)}return""})("ZWPlayer")||bb("ZWPlayer","V1.0",365);var ib=function(p){for(var B=navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language],u=0;u<p.length;u++)for(var y=0;y<B.length;y++)if(p[u].lang&&B[y]&&-1<B[y].indexOf(p[u].lang))return p[u].text;return 1===p.length?p[0].text:
199
- null};HUAYI={};HUAYI.Danmu=function(){var p={playerObj:null,opacity:70,onInit:null,onClose:null,onResize:null};return{create:function(B){var u={};for(k in p)u[k]=p[k];for(k in B)u[k]=B[k];"undefined"==typeof u.playerId&&(u.playerId="video-body");return new function(y){y=y.playerId;this.rows=[];this.timerId=this.rowCount=0;this.frameDuration=40;this.Danmulayer=null;this.danmuMargin=50;this.speedX=100;this.hasTransition=!0;this.rowHeight=28;this.topMargin=10;this.layerHeight=this.layerWidth=0;this.fontSize=
200
- "25px";if("string"==typeof y)this.vPlayer=document.getElementById(y);else if("object"==typeof y)this.vPlayer=y;else return;this.vPlayer||(this.vPlayer=document.getElementById("video-body"));if(this.vPlayer&&(y=this.vPlayer.childNodes,0<y.length))for(var F=0;F<y.length;F++){var J=y[F];if("DIV"==J.nodeName&&Qa(J.className,"danmuplayer")){this.wrapObj=J;break}}if(this.wrapObj){if(y=this.wrapObj.childNodes,0<y.length)for(F=0;F<y.length;F++)if(J=y[F],"DIV"==J.nodeName&&Qa(J.className,"danmu-layer")){this.Danmulayer=
201
- J;break}}else this.wrapObj=document.createElement("div"),this.wrapObj.className="danmuplayer",this.vPlayer.appendChild(this.wrapObj),this.Danmulayer=document.createElement("div"),this.Danmulayer.className="danmu-layer",this.wrapObj.appendChild(this.Danmulayer),Ka.ie&&9>Ka.ver&&(this.wrapObj.style.height=this.vPlayer.offsetHeight-45+"px");if(this.Danmulayer){this.hasTransition="undefined"!=typeof this.Danmulayer.style.transition;this.rowCount=Math.floor(Math.floor(2*(this.Danmulayer.offsetHeight-this.topMargin)/
202
- 3)/this.rowHeight);if(0<this.rowCount)for(F=0;F<this.rowCount;F++)this.rows.push({top:this.topMargin+this.rowHeight*F,count:0,last:null,idx:F});this.layerWidth=this.Danmulayer.offsetWidth;this.layerHeight=this.Danmulayer.offsetHeight;Ba.addElement(this.Danmulayer);this.Danmulayer.addEventListener("resize",function(w){this.reCalcLayout()}.bind(this))}this.start=function(w){this.timerId&&(clearInterval(this.timerId),this.timerId=0);if(!this.hasTransition){var H=this;this.timerId=setInterval(function(){var K=
203
- H.Danmulayer,N=K.childNodes;if(0<N.length){for(var P=[],Z=0;Z<N.length;Z++){var ba=N[Z];if("DIV"==ba.tagName){var aa=parseFloat(ba.style.left);0>aa+ba.offsetWidth?P.push(ba):ba.style.left=aa-4.5+"px"}}if(0<P.length){for(Z=0;Z<P.length;Z++)N=P[Z],N.rowIdx&&(H.rows[N.rowIdx].last==this&&(H.rows[N.rowIdx].last=null),H.rows[N.rowIdx].count--),K.removeChild(P[Z]);P.splice(0,P.length)}}},this.frameDuration)}};this.stop=function(){this.timerId&&(clearInterval(this.timerId),this.timerId=0);var w=this.Danmulayer.childNodes;
204
- if(0<w.length)for(var H=0;H<w.length;H++)w[H].style.display="none";this.Danmulayer.style.display="none"};this.destroy=function(){this.Danmulayer&&(Ba.removeElement(this.Danmulayer),delete this.Danmulayer);this.timerId&&(clearInterval(this.timerId),this.timerId=0);this.wrapObj&&this.vPlayer&&this.vPlayer.removeChild(this.wrapObj)};this.addDanmu=function(w,H){H||={};var K=document.createElement("div");K.className="danmu";"undefined"==typeof w.color||H.isFilterColorFont||(K.style.color=w.color);"undefined"!=
205
- typeof w.border&&(K.style.border="1px solid #666");K.style.fontSize=H.forcedFontSizeValue?parseInt(25*H.forcedFontSizeValue/100)+"px":"25px";this.fontSize!=K.style.fontSize&&(this.rowHeight=parseInt(K.style.fontSize)+3,this.layerHeight=0,this.reCalcLayout(),this.fontSize=K.style.fontSize);w.outlineColor&&(K.style.outlineStyle="solid",K.style.outlineWidth="2px",K.style.outlineColor=w.outlineColor);K.style.opacity=H.opacityValue?H.opacityValue/100:"0.9";K.innerHTML="function"==typeof L.replaceSmileDanmu?
206
- L.replaceSmileDanmu(w.text,this.rowHeight,H):w.text;var N=w=0,P=999999;this.rowCount>this.rows.length&&(this.rowCount=this.rows.length);for(;w<this.rowCount;w++)if(0==this.rows[w].count){N=w;P=this.layerWidth;break}else if(this.rows[w].last){var Z=this.rows[w].last;Z=Z.getBoundingClientRect().left+Z.offsetWidth+this.danmuMargin;if(Z<P&&(N=w,P=Z,P<this.layerWidth))break}P<this.layerWidth&&(P=this.layerWidth);K.style.fontFamily='SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif';K.style.textShadow=
207
- "rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px";K.style.cursor="pointer";K.style.left=P+"px";K.style.top=this.rows[N].top+"px";K.rowIdx=N;this.rows[N].last=K;this.rows[N].count++;this.Danmulayer.appendChild(K);var ba=this;K.onmouseover=function(aa){this.pause||(this.pause=!0)};K.onmouseout=function(aa){this.pause&&(this.pause=!1)};this.hasTransition&&(K.addEventListener("transitionend",function(){"number"==typeof this.rowIdx&&(ba.rows[this.rowIdx].last==
208
- this&&(ba.rows[this.rowIdx].last=null),ba.rows[this.rowIdx].count--);ba.Danmulayer.removeChild(this)}),w=P+K.offsetWidth,H.speedValue?(H=parseInt(this.speedX*parseFloat(H.speedValue)),0==H&&(H=1),H=w/H+4*Math.random()):H=w/this.speedX+4*Math.random(),K.style.transition="transform "+H+"s linear",K.style.transform="translateX(-"+w+"px)")};this.reCalcLayout=function(){if(this.Danmulayer){Ka.ie&&9>Ka.ver&&(this.wrapObj.style.height=this.vPlayer.offsetHeight-45+"px");var w=this.Danmulayer.offsetHeight;
209
- if(w!=this.layerHeight){this.rowCount=Math.floor(Math.floor(2*(w-this.topMargin)/3)/this.rowHeight);if(0<this.rowCount)if(this.rowCount>this.rows.length)for(var H=this.rows.length;H<this.rowCount;H++)this.rows.push({top:this.topMargin+this.rowHeight*H,count:0,last:null,idx:H});else for(H=0;H<this.rowCount;H++)this.rows[H].top=this.topMargin+this.rowHeight*H;this.layerHeight=w}if(this.Danmulayer.offsetWidth!=this.layerWidth){w=this.Danmulayer.childNodes;if(0<w.length)for(H=0;H<w.length;H++);this.layerWidth=
210
- this.Danmulayer.offsetWidth}}};this.hasTransition||this.start()}(u)}}}();var Ba={_onResize:function(p){var B=p.target||p.srcElement;if(B=B.__resizeTrigger__?B.__resizeTrigger__:B){var u=B.__z_resizeListeners;if(u)for(var y=u.length,F=0;F<y;F++){var J=u[F],w=J.handler;(J=J.context)||(J=B);if(w)w.apply(J,[p]);else if("resize"===p.type||"[object ResizeObserverEntry]"===Object.prototype.toString.call(p))w=document.createEvent("Event"),w.initEvent("resize",!1,!1),B.dispatchEvent(w)}}},addElement:function(p,
211
- B,u){var y=p.__z_resizeListeners;if(!y)if(y=[],p.__z_resizeListeners=y,"function"===typeof L.ResizeObserver)this.resizeObserver||(this.resizeObserver=new ResizeObserver(function(J){for(var w=0;w<J.length;w++)this._onResize(J[w])}.bind(this))),this.resizeObserver.observe(p);else{"static"===getComputedStyle(p,null).position&&(p.style.position="relative");var F=document.createElement("object");F.resizer=this;F.__resizeElement__=p;F.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; opacity: 0; pointer-events: none; z-index: -9999;");
212
- F.type="text/html";F.data="about:blank";F.onload=function(J){this.contentDocument.defaultView.__resizeTrigger__=this.__resizeElement__;this.contentDocument.defaultView.addEventListener("resize",this.resizer._onResize)};p.appendChild(F);p.__resizeDetector__=F}y.push({handler:B,context:u})},removeElement:function(p,B,u){var y=p.__z_resizeListeners;if(y){for(var F=y.length,J=0;J<F;J++){var w=y[J];if(w.handler===B&&w.context===u){y.splice(J,1);break}}if(0===y.length){if(B=p.__resizeDetector__)B.contentDocument.defaultView.removeEventListener("resize",
213
- this._onResize),p.removeChild(B),delete p.__resizeDetector__;delete p.__z_resizeListeners;this.resizeObserver&&this.resizeObserver.unobserve(p)}}}},Ka=function(){var p,B,u,y,F,J,w=navigator.userAgent.toLowerCase(),H;(H=w.match(/chrome\/([\d.]+)/),H)?p=H[1]:(H=w.match(/firefox\/([\d.]+)/),H)?B=H[1]:(H=w.match(/edge\/([\d.]+)/),H)?u=H[1]:(H=w.match(/rv:([\d.]+)\) like gecko/),H)?y=H[1]:(H=w.match(/msie ([\d.]+)/),H)?y=H[1]:(H=w.match(/opera.([\d.]+)/),H)?F=H[1]:(H=w.match(/version\/([\d.]+).*safari/),
214
- H)?J=H[1]:J=!1;return p?{broswer:"Chrome",version:p,chrome:!0,ver:parseInt(p)}:B?{broswer:"Firefox",version:B,firefox:!0,ver:parseInt(B)}:J?{broswer:"Safari",version:J,ver:parseInt(J)}:u?{broswer:"Edge",version:u,edge:!0,ver:parseInt(u)}:y?{broswer:"IE",version:y,ie:!0,ver:parseInt(y)}:F?{broswer:"Opera",version:F,opera:!0,ver:parseInt(F)}:{broswer:"",version:"0",ver:0}}(),Fa={about:"\u5173\u4e8e",current:"\u5f53\u524d","qs-auto":"\u81ea\u52a8\u5207\u6362",enterFullScreen:"\u8fdb\u5165\u5168\u5c4f",
21
+ scriptpath:function(){var T;(T=x.currentScript)||(T=x.getElementsByTagName("script"),T=T.length?T[T.length-1]:!1);T=T?T.src.split("?")[0]:"";return T.split("/").length>0?T.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1,scrollCLass:!1},ma=!1,W=function(){if(ma)return ma;var T=x.createElement("DIV"),e=T.style,l=navigator.userAgent,m=navigator.platform,c={};c.haspointerlock="pointerLockElement"in x||"webkitPointerLockElement"in
22
+ x||"mozPointerLockElement"in x;c.isopera="opera"in K;c.isopera12=c.isopera&&"getUserMedia"in navigator;c.isoperamini=Object.prototype.toString.call(K.operamini)==="[object OperaMini]";c.isie="all"in x&&"attachEvent"in T&&!c.isopera;c.isieold=c.isie&&!("msInterpolationMode"in e);c.isie7=c.isie&&!c.isieold&&(!("documentMode"in x)||x.documentMode===7);c.isie8=c.isie&&"documentMode"in x&&x.documentMode===8;c.isie9=c.isie&&"performance"in K&&x.documentMode===9;c.isie10=c.isie&&"performance"in K&&x.documentMode===
23
+ 10;c.isie11="msRequestFullscreen"in T&&x.documentMode>=11;c.ismsedge="msCredentials"in K;c.ismozilla="MozAppearance"in e;c.iswebkit=!c.ismsedge&&"WebkitAppearance"in e;c.ischrome=c.iswebkit&&"chrome"in K;c.ischrome38=c.ischrome&&"touchAction"in e;c.ischrome22=!c.ischrome38&&c.ischrome&&c.haspointerlock;c.ischrome26=!c.ischrome38&&c.ischrome&&"transition"in e;c.cantouch="ontouchstart"in x.documentElement||"ontouchstart"in K;c.hasw3ctouch=(K.PointerEvent||!1)&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>
24
+ 0);c.hasmstouch=!c.hasw3ctouch&&(K.MSPointerEvent||!1);c.ismac=/^mac$/i.test(m);c.isios=c.cantouch&&/iphone|ipad|ipod/i.test(m);c.isios4=c.isios&&!("seal"in Object);c.isios7=c.isios&&"webkitHidden"in x;c.isios8=c.isios&&"hidden"in x;c.isios10=c.isios&&K.Proxy;c.isandroid=/android/i.test(l);c.haseventlistener="addEventListener"in T;c.trstyle=!1;c.hastransform=!1;c.hastranslate3d=!1;c.transitionstyle=!1;c.hastransition=!1;c.transitionend=!1;c.trstyle="transform";c.hastransform="transform"in e||function(){for(var u=
25
+ ["msTransform","webkitTransform","MozTransform","OTransform"],A=0,z=u.length;A<z;A++)if(e[u[A]]!==void 0){c.trstyle=u[A];break}c.hastransform=!!c.trstyle}();c.hastransform&&(e[c.trstyle]="translate3d(1px,2px,3px)",c.hastranslate3d=/translate3d/.test(e[c.trstyle]));c.transitionstyle="transition";c.prefixstyle="";c.transitionend="transitionend";c.hastransition="transition"in e||function(){c.transitionend=!1;for(var u="webkitTransition msTransition MozTransition OTransition OTransition KhtmlTransition".split(" "),
26
+ A="-webkit- -ms- -moz- -o- -o -khtml-".split(" "),z="webkitTransitionEnd msTransitionEnd transitionend otransitionend oTransitionEnd KhtmlTransitionEnd".split(" "),b=0,M=u.length;b<M;b++)if(u[b]in e){c.transitionstyle=u[b];c.prefixstyle=A[b];c.transitionend=z[b];break}c.ischrome26&&(c.prefixstyle=A[1]);c.hastransition=c.transitionstyle}();c.cursorgrabvalue=function(){var u=["grab","-webkit-grab","-moz-grab"];if(c.ischrome&&!c.ischrome38||c.isie)u=[];for(var A=0,z=u.length;A<z;A++){var b=u[A];e.cursor=
27
+ b;if(e.cursor==b)return b}return"url("+(ha.scriptpath+"css/openhand.cur),n-resize")}();c.hasmousecapture="setCapture"in T;c.hasMutationObserver=ca!==!1;T=null;return ma=c},ka=function(T,e){function l(){var g=b.doc.css(G.trstyle);return g&&g.substr(0,6)=="matrix"?g.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/):!1}function m(){var g=b.win;if("zIndex"in g)return g.zIndex();for(;g.length>0&&g[0].nodeType!=9;){var r=g.css("zIndex");if(!isNaN(r)&&r!==0)return parseInt(r);g=g.parent()}return!1}
28
+ function c(g,r,t){r=g.css(r);g=parseFloat(r);return isNaN(g)?(g=d[r]||0,t=g==3?t?b.win.outerHeight()-b.win.innerHeight():b.win.outerWidth()-b.win.innerWidth():1,b.isie8&&g&&(g+=1),t?g:0):g}function u(g,r,t,f){b._bind(g,r,function(p){p=p||K.event;var D={original:p,target:p.target||p.srcElement,type:"wheel",deltaMode:p.type=="MozMousePixelScroll"?0:1,deltaX:0,deltaZ:0,preventDefault:function(){p.preventDefault?p.preventDefault():p.returnValue=!1;return!1},stopImmediatePropagation:function(){p.stopImmediatePropagation?
29
+ p.stopImmediatePropagation():p.cancelBubble=!0}};r=="mousewheel"?(p.wheelDeltaX&&(D.deltaX=-.025*p.wheelDeltaX),p.wheelDeltaY&&(D.deltaY=-.025*p.wheelDeltaY),D.deltaY||D.deltaX||(D.deltaY=-.025*p.wheelDelta)):D.deltaY=p.detail;return t.call(g,D)},f)}function A(g,r,t,f){b.scrollrunning||(b.newscrolly=b.getScrollTop(),b.newscrollx=b.getScrollLeft(),O=aa());var p=aa()-O;O=aa();V=p>350?1:V+(2-V)/10;g=g*V|0;r=r*V|0;if(g){if(f)if(g<0){if(b.getScrollLeft()>=b.page.maxw)return!0}else if(b.getScrollLeft()<=
30
+ 0)return!0;f=g>0?1:-1;P!==f&&(b.scrollmom&&b.scrollmom.stop(),b.newscrollx=b.getScrollLeft(),P=f);b.lastdeltax-=g}if(r){if(function(){var D=b.getScrollTop();if(r<0){if(D>=b.page.maxh)return!0}else if(D<=0)return!0}()){if(w.nativeparentscrolling&&t&&!b.ispage&&!b.zoomactive)return!0;t=b.view.h>>1;b.newscrolly<-t?(b.newscrolly=-t,r=-1):b.newscrolly>b.page.maxh+t?(b.newscrolly=b.page.maxh+t,r=1):r=0}t=r>0?1:-1;H!==t&&(b.scrollmom&&b.scrollmom.stop(),b.newscrolly=b.getScrollTop(),H=t);b.lastdeltay-=r}(r||
31
+ g)&&b.synched("relativexy",function(){var D=b.lastdeltay+b.newscrolly;b.lastdeltay=0;var R=b.lastdeltax+b.newscrollx;b.lastdeltax=0;b.rail.drag||b.doScrollPos(R,D)})}function z(g,r,t){if(!t&&S)return!0;if(g.deltaMode===0){var f=-(w.mousescrollstep/54*g.deltaX)|0;var p=-(w.mousescrollstep/54*g.deltaY)|0}else g.deltaMode===1&&(f=-(g.deltaX*w.mousescrollstep*50/80)|0,p=-(g.deltaY*w.mousescrollstep*50/80)|0);r&&w.oneaxismousemode&&f===0&&p&&(f=p,p=0,t&&(f<0?b.getScrollLeft()>=b.page.maxw:b.getScrollLeft()<=
32
+ 0)&&(p=f,f=0));b.isrtlmode&&(f=-f);if(A(f,p,t,!0))t&&(S=!0);else return S=!1,g.stopImmediatePropagation(),g.preventDefault()}var b=this;this.version="3.7.6";this.name="nicescroll";this.me=e;var M=n("body"),w=this.opt={doc:M,win:!1};n.extend(w,ha);w.snapbackspeed=80;if(T)for(var Y in w)T[Y]!==void 0&&(w[Y]=T[Y]);w.disablemutationobserver&&(ca=!1);this.iddoc=(this.doc=w.doc)&&this.doc[0]?this.doc[0].id||"":"";this.ispage=/^BODY|HTML/.test(w.win?w.win[0].nodeName:this.doc[0].nodeName);this.haswrapper=
33
+ w.win!==!1;this.win=w.win||(this.ispage?I:this.doc);this.docscroll=this.ispage&&!this.haswrapper?I:this.win;this.body=M;this.iframe=this.isfixed=this.viewport=!1;this.isiframe=this.doc[0].nodeName=="IFRAME"&&this.win[0].nodeName=="IFRAME";this.istextarea=this.win[0].nodeName=="TEXTAREA";this.forcescreen=!1;this.canshowonmouseevent=w.autohidemode!="scroll";this.page=this.view=this.onzoomout=this.onzoomin=this.onscrollcancel=this.onscrollend=this.onscrollstart=this.onclick=this.ongesturezoom=this.onkeypress=
34
+ this.onmousewheel=this.onmousemove=this.onmouseup=this.onmousedown=!1;this.scroll={x:0,y:0};this.scrollratio={x:0,y:0};this.cursorheight=20;this.scrollvaluemax=0;w.rtlmode=="auto"?(T=this.win[0]==K?this.body:this.win,e=T.css("writing-mode")||T.css("-webkit-writing-mode")||T.css("-ms-writing-mode")||T.css("-moz-writing-mode"),e=="horizontal-tb"||e=="lr-tb"||e===""?(this.isrtlmode=T.css("direction")=="rtl",this.isvertical=!1):(this.isrtlmode=e=="vertical-rl"||e=="tb"||e=="tb-rl"||e=="rl-tb",this.isvertical=
35
+ e=="vertical-rl"||e=="tb"||e=="tb-rl")):(this.isrtlmode=w.rtlmode===!0,this.isvertical=!1);this.observerbody=this.observerremover=this.observer=this.scrollmom=this.scrollrunning=!1;if(w.scrollbarid!==!1)this.id=w.scrollbarid;else{do this.id="ascrail"+F++;while(x.getElementById(this.id))}this.hidden=this.locked=this.railslocked=this.hasmousefocus=this.hasfocus=this.zoomactive=this.zoom=this.selectiondrag=this.cursorfreezed=this.cursor=this.rail=!1;this.cursoractive=!0;this.wheelprevented=!1;this.overflowx=
36
+ w.overflowx;this.overflowy=w.overflowy;this.nativescrollingarea=!1;this.checkarea=0;this.events=[];this.saved={};this.delaylist={};this.synclist={};this.lastdeltay=this.lastdeltax=0;this.detected=W();var G=n.extend({},this.detected);this.ishwscroll=(this.canhwscroll=G.hastransform&&w.hwacceleration)&&b.haswrapper;this.hasreversehr=this.isrtlmode?this.isvertical?!(G.iswebkit||G.isie||G.isie11):!(G.iswebkit||G.isie&&!G.isie10&&!G.isie11):!1;this.istouchcapable=!1;G.cantouch||!G.hasw3ctouch&&!G.hasmstouch?
37
+ !G.cantouch||G.isios||G.isandroid||!G.iswebkit&&!G.ismozilla||(this.istouchcapable=!0):this.istouchcapable=!0;w.enablemouselockapi||(G.hasmousecapture=!1,G.haspointerlock=!1);this.debounced=function(g,r,t){b&&(b.delaylist[g]||(b.delaylist[g]={h:N(function(){b.delaylist[g].fn.call(b);b.delaylist[g]=!1},t)},r.call(b)),b.delaylist[g].fn=r)};this.synched=function(g,r){b.synclist[g]?b.synclist[g]=r:(b.synclist[g]=r,N(function(){b&&(b.synclist[g]&&b.synclist[g].call(b),b.synclist[g]=null)}))};this.unsynched=
38
+ function(g){b.synclist[g]&&(b.synclist[g]=!1)};this.css=function(g,r){for(var t in r)b.saved.css.push([g,t,g.css(t)]),g.css(t,r[t])};this.scrollTop=function(g){return g===void 0?b.getScrollTop():b.setScrollTop(g)};this.scrollLeft=function(g){return g===void 0?b.getScrollLeft():b.setScrollLeft(g)};var ja=function(g,r,t,f,p,D,R){this.st=g;this.ed=r;this.spd=t;this.p1=f||0;this.p2=p||1;this.p3=D||0;this.p4=R||1;this.ts=aa();this.df=r-g};ja.prototype={B2:function(g){return 3*(1-g)*(1-g)*g},B3:function(g){return 3*
39
+ (1-g)*g*g},B4:function(g){return g*g*g},getPos:function(){return(aa()-this.ts)/this.spd},getNow:function(){var g=(aa()-this.ts)/this.spd,r=this.B2(g)+this.B3(g)+this.B4(g);return g>=1?this.ed:this.st+this.df*r|0},update:function(g,r){this.st=this.getNow();this.ed=g;this.spd=r;this.ts=aa();this.df=this.ed-this.st;return this}};if(this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"};G.hastranslate3d&&G.isios&&this.doc.css("-webkit-backface-visibility","hidden");this.getScrollTop=function(g){if(!g){if(g=
40
+ l())return g.length==16?-g[13]:-g[5];if(b.timerscroll&&b.timerscroll.bz)return b.timerscroll.bz.getNow()}return b.doc.translate.y};this.getScrollLeft=function(g){if(!g){if(g=l())return g.length==16?-g[12]:-g[4];if(b.timerscroll&&b.timerscroll.bh)return b.timerscroll.bh.getNow()}return b.doc.translate.x};this.notifyScrollEvent=function(g){var r=x.createEvent("UIEvents");r.initUIEvent("scroll",!1,!1,K,1);r.niceevent=!0;g.dispatchEvent(r)};var la=this.isrtlmode?1:-1;G.hastranslate3d&&w.enabletranslate3d?
41
+ (this.setScrollTop=function(g,r){b.doc.translate.y=g;b.doc.translate.ty=g*-1+"px";b.doc.css(G.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)");r||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(g,r){b.doc.translate.x=g;b.doc.translate.tx=g*la+"px";b.doc.css(G.trstyle,"translate3d("+b.doc.translate.tx+","+b.doc.translate.ty+",0)");r||b.notifyScrollEvent(b.win[0])}):(this.setScrollTop=function(g,r){b.doc.translate.y=g;b.doc.translate.ty=g*-1+"px";b.doc.css(G.trstyle,
42
+ "translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");r||b.notifyScrollEvent(b.win[0])},this.setScrollLeft=function(g,r){b.doc.translate.x=g;b.doc.translate.tx=g*la+"px";b.doc.css(G.trstyle,"translate("+b.doc.translate.tx+","+b.doc.translate.ty+")");r||b.notifyScrollEvent(b.win[0])})}else this.getScrollTop=function(){return b.docscroll.scrollTop()},this.setScrollTop=function(g){b.docscroll.scrollTop(g)},this.getScrollLeft=function(){return b.hasreversehr?b.detected.ismozilla?b.page.maxw-Math.abs(b.docscroll.scrollLeft()):
43
+ b.page.maxw-b.docscroll.scrollLeft():b.docscroll.scrollLeft()},this.setScrollLeft=function(g){return setTimeout(function(){if(b)return b.hasreversehr&&(g=b.detected.ismozilla?-(b.page.maxw-g):b.page.maxw-g),b.docscroll.scrollLeft(g)},1)};this.getTarget=function(g){return g?g.target?g.target:g.srcElement?g.srcElement:!1:!1};this.hasParent=function(g,r){if(!g)return!1;for(g=g.target||g.srcElement||g||!1;g&&g.id!=r;)g=g.parentNode||!1;return g!==!1};var d={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=
44
+ function(){return{top:K.pageYOffset||x.documentElement.scrollTop,left:K.pageXOffset||x.documentElement.scrollLeft}};this.getOffset=function(){if(b.isfixed){var g=b.win.offset(),r=b.getDocumentScrollOffset();g.top-=r.top;g.left-=r.left;return g}g=b.win.offset();if(!b.viewport)return g;r=b.viewport.offset();return{top:g.top-r.top,left:g.left-r.left}};this.updateScrollBar=function(g){var r;if(b.ishwscroll)b.rail.css({height:b.win.innerHeight()-(w.railpadding.top+w.railpadding.bottom)}),b.railh&&b.railh.css({width:b.win.innerWidth()-
45
+ (w.railpadding.left+w.railpadding.right)});else{var t=b.getOffset();var f=t.top;var p=t.left-(w.railpadding.left+w.railpadding.right);f+=c(b.win,"border-top-width",!0);p+=b.rail.align?b.win.outerWidth()-c(b.win,"border-right-width")-b.rail.width:c(b.win,"border-left-width");if(r=w.railoffset)r.top&&(f+=r.top),r.left&&(p+=r.left);g=(g?g.h:b.win.innerHeight())-(w.railpadding.top+w.railpadding.bottom);r="left";var D=p;typeof w.rightdock==="number"&&(r="right",D=w.rightdock);b.railslocked||b.rail.css({top:f,
46
+ [r]:D,height:g});b.zoom&&b.zoom.css({top:f+1,left:b.rail.align==1?p-20:p+b.rail.width+4});if(b.railh&&!b.railslocked){f=t.top;p=t.left;if(r=w.railhoffset)r.top&&(f+=r.top),r.left&&(p+=r.left);f=b.railh.align?f+c(b.win,"border-top-width",!0)+b.win.innerHeight()-b.railh.height:f+c(b.win,"border-top-width",!0);p+=c(b.win,"border-left-width");b.railh.css({top:f-(w.railpadding.top+w.railpadding.bottom),left:p,width:b.railh.width})}}};this.doRailClick=function(g,r,t){if(!b.railslocked)if(b.cancelEvent(g),
47
+ "pageY"in g||(g.pageX=g.clientX+x.documentElement.scrollLeft,g.pageY=g.clientY+x.documentElement.scrollTop),r){r=t?b.doScrollLeft:b.doScrollTop;var f=t?(g.pageX-b.railh.offset().left-b.cursorwidth/2)*b.scrollratio.x:(g.pageY-b.rail.offset().top-b.cursorheight/2)*b.scrollratio.y;b.unsynched("relativexy");r(f|0)}else r=t?b.doScrollLeftBy:b.doScrollBy,f=t?b.scroll.x:b.scroll.y,g=t?g.pageX-b.railh.offset().left:g.pageY-b.rail.offset().top,t=t?b.view.w:b.view.h,r(f>=g?t:-t)};b.newscrolly=b.newscrollx=
48
+ 0;b.hasanimationframe="requestAnimationFrame"in K;b.hascancelanimationframe="cancelAnimationFrame"in K;b.hasborderbox=!1;this.init=function(){b.saved.css=[];if(G.isoperamini||G.isandroid&&!("hidden"in x))return!0;w.emulatetouch=w.emulatetouch||w.touchbehavior;b.hasborderbox=K.getComputedStyle&&K.getComputedStyle(x.body)["box-sizing"]==="border-box";var g={"overflow-y":"hidden"};if(G.isie11||G.isie10)g["-ms-overflow-style"]="none";b.ishwscroll&&(this.doc.css(G.transitionstyle,G.prefixstyle+"transform 0ms ease-out"),
49
+ G.transitionend&&b.bind(b.doc,G.transitionend,b.onScrollTransitionEnd,!1));b.zindex="auto";b.zindex=b.ispage||w.zindex!="auto"?w.zindex:m()||"auto";!b.ispage&&b.zindex!="auto"&&b.zindex>J&&(J=b.zindex);b.isie&&b.zindex===0&&w.zindex=="auto"&&(b.zindex="auto");if(!b.ispage||!G.isieold){var r=b.docscroll;b.ispage&&(r=b.haswrapper?b.win:b.doc);b.css(r,g);b.ispage&&(G.isie11||G.isie)&&b.css(n("html"),g);!G.isios||b.ispage||b.haswrapper||b.css(M,{"-webkit-overflow-scrolling":"touch"});var t=n(x.createElement("div"));
50
+ t.css({position:"relative",top:0,"float":"right",width:w.cursorwidth,height:0,"background-color":w.cursorcolor,border:w.cursorborder,"background-clip":"padding-box","-webkit-border-radius":w.cursorborderradius,"-moz-border-radius":w.cursorborderradius,"border-radius":w.cursorborderradius});t.addClass("nicescroll-cursors");b.cursor=t;var f=n(x.createElement("div"));f.attr("id",b.id);f.addClass("nicescroll-rails nicescroll-rails-vr");w.scrollCLass&&f.addClass(w.scrollCLass);var p,D=["left","right",
51
+ "top","bottom"],R;for(R in D){var ea=D[R];(p=w.railpadding[ea]||0)&&f.css("padding-"+ea,p+"px")}f.append(t);f.width=Math.max(parseFloat(w.cursorwidth),t.outerWidth());f.css({width:f.width+"px",zIndex:b.zindex,background:w.background,cursor:"default"});f.visibility=!0;f.scrollable=!0;f.align=w.railalign=="left"?0:1;b.rail=f;t=b.rail.drag=!1;!w.boxzoom||b.ispage||G.isieold||(t=x.createElement("div"),b.bind(t,"click",b.doZoom),b.bind(t,"mouseenter",function(){b.zoom.css("opacity",w.cursoropacitymax)}),
52
+ b.bind(t,"mouseleave",function(){b.zoom.css("opacity",w.cursoropacitymin)}),b.zoom=n(t),b.zoom.css({cursor:"pointer",zIndex:b.zindex,backgroundImage:"url("+w.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),w.dblclickzoom&&b.bind(b.win,"dblclick",b.doZoom),G.cantouch&&w.gesturezoom&&(b.ongesturezoom=function(E){E.scale>1.5&&b.doZoomIn(E);E.scale<.8&&b.doZoomOut(E);return b.cancelEvent(E)},b.bind(b.win,"gestureend",b.ongesturezoom)));b.railh=!1;if(w.horizrailenabled){b.css(r,
53
+ {overflowX:"hidden"});t=n(x.createElement("div"));t.css({position:"absolute",top:0,height:w.cursorwidth,width:0,backgroundColor:w.cursorcolor,border:w.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":w.cursorborderradius,"-moz-border-radius":w.cursorborderradius,"border-radius":w.cursorborderradius});G.isieold&&t.css("overflow","hidden");t.addClass("nicescroll-cursors");b.cursorh=t;var da=n(x.createElement("div"));da.attr("id",b.id+"-hr");da.addClass("nicescroll-rails nicescroll-rails-hr");
54
+ w.scrollCLass&&da.addClass(w.scrollCLass);da.height=Math.max(parseFloat(w.cursorwidth),t.outerHeight());da.css({height:da.height+"px",zIndex:b.zindex,background:w.background});da.append(t);da.visibility=!0;da.scrollable=!0;da.align=w.railvalign=="top"?0:1;b.railh=da;b.railh.drag=!1}b.ispage?(f.css({position:"fixed",top:0,height:"100%"}),f.css(f.align?{right:0}:{left:0}),b.body.append(f),b.railh&&(da.css({position:"fixed",left:0,width:"100%"}),da.css(da.align?{bottom:0}:{top:0}),b.body.append(da))):
55
+ (b.ishwscroll?(b.win.css("position")=="static"&&b.css(b.win,{position:"relative"}),r=b.win[0].nodeName=="HTML"?b.body:b.win,n(r).scrollTop(0).scrollLeft(0),b.zoom&&(b.zoom.css({position:"absolute",top:1,right:0,"margin-right":f.width+4}),r.append(b.zoom)),f.css({position:"absolute",top:0}),f.css(f.align?{right:0}:{left:0}),r.append(f),da&&(da.css({position:"absolute",left:0,bottom:0}),da.css(da.align?{bottom:0}:{top:0}),r.append(da))):(b.isfixed=b.win.css("position")=="fixed",r=b.isfixed?"fixed":
56
+ "absolute",b.isfixed||(b.viewport=b.getViewport(b.win[0])),b.viewport&&(b.body=b.viewport,/fixed|absolute/.test(b.viewport.css("position"))||b.css(b.viewport,{position:"relative"})),f.css({position:r}),b.zoom&&b.zoom.css({position:r}),b.updateScrollBar(),b.body.append(f),b.zoom&&b.body.append(b.zoom),b.railh&&(da.css({position:r}),b.body.append(da))),G.isios&&b.css(b.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),w.disableoutline&&(G.isie&&b.win.attr("hideFocus",
57
+ "true"),G.iswebkit&&b.win.css("outline","none")));w.autohidemode===!1?(b.autohidedom=!1,b.rail.css({opacity:w.cursoropacitymax}),b.railh&&b.railh.css({opacity:w.cursoropacitymax})):w.autohidemode===!0||w.autohidemode==="leave"?(b.autohidedom=n().add(b.rail),G.isie8&&(b.autohidedom=b.autohidedom.add(b.cursor)),b.railh&&(b.autohidedom=b.autohidedom.add(b.railh)),b.railh&&G.isie8&&(b.autohidedom=b.autohidedom.add(b.cursorh))):w.autohidemode=="scroll"?(b.autohidedom=n().add(b.rail),b.railh&&(b.autohidedom=
58
+ b.autohidedom.add(b.railh))):w.autohidemode=="cursor"?(b.autohidedom=n().add(b.cursor),b.railh&&(b.autohidedom=b.autohidedom.add(b.cursorh))):w.autohidemode=="hidden"&&(b.autohidedom=!1,b.hide(),b.railslocked=!1);if(G.cantouch||b.istouchcapable||w.emulatetouch||G.hasmstouch){b.scrollmom=new ia(b);b.ontouchstart=function(E){if(b.locked||E.pointerType&&(E.pointerType==="mouse"||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!1;b.hasmoving=!1;b.scrollmom.timer&&(b.triggerScrollEnd(),b.scrollmom.stop());
59
+ if(!b.railslocked){var X=b.getTarget(E);if(X&&/INPUT/i.test(X.nodeName)&&/range/i.test(X.type))return b.stopPropagation(E);var oa=E.type==="mousedown";!("clientX"in E)&&"changedTouches"in E&&(E.clientX=E.changedTouches[0].clientX,E.clientY=E.changedTouches[0].clientY);if(b.forcescreen){var ra=E;E={original:E.original?E.original:E};E.clientX=ra.screenX;E.clientY=ra.screenY}b.rail.drag={x:E.clientX,y:E.clientY,sx:b.scroll.x,sy:b.scroll.y,st:b.getScrollTop(),sl:b.getScrollLeft(),pt:2,dl:!1,tg:X};if(b.ispage||
60
+ !w.directionlockdeadzone)b.rail.drag.dl="f";else{ra=I.width();var sa=I.height(),Ea=b.getContentSize();sa=Ea.h-sa;ra=Ea.w-ra;b.rail.drag.ck=b.rail.scrollable&&!b.railh.scrollable?sa>0?"v":!1:!b.rail.scrollable&&b.railh.scrollable?ra>0?"h":!1:!1}w.emulatetouch&&b.isiframe&&G.isie&&(ra=b.win.position(),b.rail.drag.x+=ra.left,b.rail.drag.y+=ra.top);b.hasmoving=!1;b.lastmouseup=!1;b.scrollmom.reset(E.clientX,E.clientY);if(X&&oa){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(X.nodeName))return G.hasmousecapture&&
61
+ X.setCapture(),w.emulatetouch?(X.onclick&&!X._onclick&&(X._onclick=X.onclick,X.onclick=function(va){if(b.hasmoving)return!1;X._onclick.call(this,va)}),b.cancelEvent(E)):b.stopPropagation(E);/SUBMIT|CANCEL|BUTTON/i.test(n(X).attr("type"))&&(b.preventclick={tg:X,click:!1})}}};b.ontouchend=function(E){if(!b||!b.rail.drag)return!0;if(b.rail.drag.pt==2){if(E.pointerType&&(E.pointerType==="mouse"||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!1;b.rail.drag=!1;var X=E.type==="mouseup";if(b.hasmoving&&(b.scrollmom.doMomentum(),
62
+ b.lastmouseup=!0,b.hideCursor(),G.hasmousecapture&&x.releaseCapture(),X))return b.cancelEvent(E)}else if(b.rail.drag.pt==1)return b.onmouseup(E)};var wa=w.emulatetouch&&b.isiframe&&!G.hasmousecapture,ta=w.directionlockdeadzone*.3|0;b.ontouchmove=function(E,X){if(!b||!b.rail.drag||E.targetTouches&&w.preventmultitouchscrolling&&E.targetTouches.length>1||E.pointerType&&(E.pointerType==="mouse"||E.pointerType===E.MSPOINTER_TYPE_MOUSE))return!0;if(b.rail.drag.pt==2){"changedTouches"in E&&(E.clientX=E.changedTouches[0].clientX,
63
+ E.clientY=E.changedTouches[0].clientY);var oa;var ra=oa=0;wa&&!X&&(X=b.win.position(),ra=-X.left,oa=-X.top);var sa=E.clientY+oa;X=sa-b.rail.drag.y;var Ea=E.clientX+ra;oa=Ea-b.rail.drag.x;var va=b.rail.drag.st-X;if(b.ishwscroll&&w.bouncescroll)va<0?va=Math.round(va/2):va>b.page.maxh&&(va=b.page.maxh+Math.round((va-b.page.maxh)/2));else if(va<0?sa=va=0:va>b.page.maxh&&(va=b.page.maxh,sa=0),sa===0&&!b.hasmoving)return b.ispage||(b.rail.drag=!1),!0;var xa=b.getScrollLeft();b.railh&&b.railh.scrollable&&
64
+ (xa=b.isrtlmode?oa-b.rail.drag.sl:b.rail.drag.sl-oa,b.ishwscroll&&w.bouncescroll?xa<0?xa=Math.round(xa/2):xa>b.page.maxw&&(xa=b.page.maxw+Math.round((xa-b.page.maxw)/2)):(xa<0&&(Ea=xa=0),xa>b.page.maxw&&(xa=b.page.maxw,Ea=0)));if(!b.hasmoving){if(b.rail.drag.y===E.clientY&&b.rail.drag.x===E.clientX)return b.cancelEvent(E);ra=Math.abs(X);X=Math.abs(oa);oa=w.directionlockdeadzone;b.rail.drag.ck?b.rail.drag.ck=="v"?X>oa&&ra<=ta?b.rail.drag=!1:ra>oa&&(b.rail.drag.dl="v"):b.rail.drag.ck=="h"&&(ra>oa&&
65
+ X<=ta?b.rail.drag=!1:X>oa&&(b.rail.drag.dl="h")):ra>oa&&X>oa?b.rail.drag.dl="f":ra>oa?b.rail.drag.dl=X>ta?"f":"v":X>oa&&(b.rail.drag.dl=ra>ta?"f":"h");if(!b.rail.drag.dl)return b.cancelEvent(E);b.triggerScrollStart(E.clientX,E.clientY,0,0,0);b.hasmoving=!0}b.preventclick&&!b.preventclick.click&&(b.preventclick.click=b.preventclick.tg.onclick||!1,b.preventclick.tg.onclick=b.onpreventclick);b.rail.drag.dl&&(b.rail.drag.dl=="v"?xa=b.rail.drag.sl:b.rail.drag.dl=="h"&&(va=b.rail.drag.st));b.synched("touchmove",
66
+ function(){b.rail.drag&&b.rail.drag.pt==2&&(b.prepareTransition&&b.resetTransition(),b.rail.scrollable&&b.setScrollTop(va),b.scrollmom.update(Ea,sa),b.railh&&b.railh.scrollable?(b.setScrollLeft(xa),b.showCursor(va,xa)):b.showCursor(va),G.isie10&&x.selection.clear())});return b.cancelEvent(E)}if(b.rail.drag.pt==1)return b.onmousemove(E)};b.ontouchstartCursor=function(E,X){if(!b.rail.drag||b.rail.drag.pt==3){if(b.locked)return b.cancelEvent(E);b.cancelScroll();b.rail.drag={x:E.touches[0].clientX,y:E.touches[0].clientY,
67
+ sx:b.scroll.x,sy:b.scroll.y,pt:3,hr:!!X};X=b.getTarget(E);!b.ispage&&G.hasmousecapture&&X.setCapture();b.isiframe&&!G.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));return b.cancelEvent(E)}};b.ontouchendCursor=function(E){if(b.rail.drag&&(G.hasmousecapture&&x.releaseCapture(),b.isiframe&&!G.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents),b.rail.drag.pt==3))return b.rail.drag=!1,b.cancelEvent(E)};b.ontouchmoveCursor=
68
+ function(E){if(b.rail.drag&&b.rail.drag.pt==3){b.cursorfreezed=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(E.touches[0].clientX-b.rail.drag.x);b.scroll.x<0&&(b.scroll.x=0);var X=b.scrollvaluemaxw;b.scroll.x>X&&(b.scroll.x=X)}else b.scroll.y=b.rail.drag.sy+(E.touches[0].clientY-b.rail.drag.y),b.scroll.y<0&&(b.scroll.y=0),X=b.scrollvaluemax,b.scroll.y>X&&(b.scroll.y=X);b.synched("touchmove",function(){b.rail.drag&&b.rail.drag.pt==3&&(b.showCursor(),b.rail.drag.hr?b.doScrollLeft(Math.round(b.scroll.x*
69
+ b.scrollratio.x),w.cursordragspeed):b.doScrollTop(Math.round(b.scroll.y*b.scrollratio.y),w.cursordragspeed))});return b.cancelEvent(E)}}}b.onmousedown=function(E,X){if(!b.rail.drag||b.rail.drag.pt==1){if(b.railslocked)return b.cancelEvent(E);b.cancelScroll();b.rail.drag={x:E.clientX,y:E.clientY,sx:b.scroll.x,sy:b.scroll.y,pt:1,hr:X||!1};X=b.getTarget(E);G.hasmousecapture&&X.setCapture();b.isiframe&&!G.hasmousecapture&&(b.saved.csspointerevents=b.doc.css("pointer-events"),b.css(b.doc,{"pointer-events":"none"}));
70
+ b.hasmoving=!1;return b.cancelEvent(E)}};b.onmouseup=function(E){if(b.rail.drag){if(b.rail.drag.pt!=1)return!0;G.hasmousecapture&&x.releaseCapture();b.isiframe&&!G.hasmousecapture&&b.doc.css("pointer-events",b.saved.csspointerevents);b.rail.drag=!1;b.cursorfreezed=!1;b.hasmoving&&b.triggerScrollEnd();return b.cancelEvent(E)}};b.onmousemove=function(E){if(b.rail.drag){if(b.rail.drag.pt===1){if(G.ischrome&&E.which===0)return b.onmouseup(E);b.cursorfreezed=!0;b.hasmoving||b.triggerScrollStart(E.clientX,
71
+ E.clientY,0,0,0);b.hasmoving=!0;if(b.rail.drag.hr){b.scroll.x=b.rail.drag.sx+(E.clientX-b.rail.drag.x);b.scroll.x<0&&(b.scroll.x=0);var X=b.scrollvaluemaxw;b.scroll.x>X&&(b.scroll.x=X)}else b.scroll.y=b.rail.drag.sy+(E.clientY-b.rail.drag.y),b.scroll.y<0&&(b.scroll.y=0),X=b.scrollvaluemax,b.scroll.y>X&&(b.scroll.y=X);b.synched("mousemove",function(){b.cursorfreezed&&(b.showCursor(),b.rail.drag.hr?b.scrollLeft(Math.round(b.scroll.x*b.scrollratio.x)):b.scrollTop(Math.round(b.scroll.y*b.scrollratio.y)))});
72
+ return b.cancelEvent(E)}}else b.checkarea=0};if(G.cantouch||w.emulatetouch)b.onpreventclick=function(E){if(b.preventclick)return b.preventclick.tg.onclick=b.preventclick.click,b.preventclick=!1,b.cancelEvent(E)},b.onclick=G.isios?!1:function(E){return b.lastmouseup?(b.lastmouseup=!1,b.cancelEvent(E)):!0},w.grabcursorenabled&&G.cursorgrabvalue&&(b.css(b.ispage?b.doc:b.win,{cursor:G.cursorgrabvalue}),b.css(b.rail,{cursor:G.cursorgrabvalue}));else{var ua=function(E){if(b.selectiondrag){if(E){var X=b.win.outerHeight();
73
+ E=E.pageY-b.selectiondrag.top;E>0&&E<X&&(E=0);E>=X&&(E-=X);b.selectiondrag.df=E}b.selectiondrag.df!==0&&(b.doScrollBy(-(b.selectiondrag.df*2/6)|0),b.debounced("doselectionscroll",function(){ua()},50))}};b.hasTextSelected="getSelection"in x?function(){return x.getSelection().rangeCount>0}:"selection"in x?function(){return x.selection.type!="None"}:function(){return!1};b.onselectionstart=function(E){b.ispage||(b.selectiondrag=b.win.offset())};b.onselectionend=function(E){b.selectiondrag=!1};b.onselectiondrag=
74
+ function(E){b.selectiondrag&&b.hasTextSelected()&&b.debounced("selectionscroll",function(){ua(E)},250)}}G.hasw3ctouch?(b.css(b.ispage?n("html"):b.win,{"touch-action":"none"}),b.css(b.rail,{"touch-action":"none"}),b.css(b.cursor,{"touch-action":"none"}),b.bind(b.win,"pointerdown",b.ontouchstart),b.bind(x,"pointerup",b.ontouchend),b.delegate(x,"pointermove",b.ontouchmove)):G.hasmstouch?(b.css(b.ispage?n("html"):b.win,{"-ms-touch-action":"none"}),b.css(b.rail,{"-ms-touch-action":"none"}),b.css(b.cursor,
75
+ {"-ms-touch-action":"none"}),b.bind(b.win,"MSPointerDown",b.ontouchstart),b.bind(x,"MSPointerUp",b.ontouchend),b.delegate(x,"MSPointerMove",b.ontouchmove),b.bind(b.cursor,"MSGestureHold",function(E){E.preventDefault()}),b.bind(b.cursor,"contextmenu",function(E){E.preventDefault()})):G.cantouch&&(b.bind(b.win,"touchstart",b.ontouchstart,!1,!0),b.bind(x,"touchend",b.ontouchend,!1,!0),b.bind(x,"touchcancel",b.ontouchend,!1,!0),b.delegate(x,"touchmove",b.ontouchmove,!1,!0));w.emulatetouch&&(b.bind(b.win,
76
+ "mousedown",b.ontouchstart,!1,!0),b.bind(x,"mouseup",b.ontouchend,!1,!0),b.bind(x,"mousemove",b.ontouchmove,!1,!0));if(w.cursordragontouch||!G.cantouch&&!w.emulatetouch)b.rail.css({cursor:"default"}),b.railh&&b.railh.css({cursor:"default"}),b.jqbind(b.rail,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.rail,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),w.sensitiverail&&(b.bind(b.rail,
77
+ "click",function(E){b.doRailClick(E,!1,!1)}),b.bind(b.rail,"dblclick",function(E){b.doRailClick(E,!0,!1)}),b.bind(b.cursor,"click",function(E){b.cancelEvent(E)}),b.bind(b.cursor,"dblclick",function(E){b.cancelEvent(E)})),b.railh&&(b.jqbind(b.railh,"mouseenter",function(){if(!b.ispage&&!b.win.is(":visible"))return!1;b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.railh,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()}),w.sensitiverail&&(b.bind(b.railh,"click",
78
+ function(E){b.doRailClick(E,!1,!0)}),b.bind(b.railh,"dblclick",function(E){b.doRailClick(E,!0,!0)}),b.bind(b.cursorh,"click",function(E){b.cancelEvent(E)}),b.bind(b.cursorh,"dblclick",function(E){b.cancelEvent(E)})));w.cursordragontouch&&(this.istouchcapable||G.cantouch)&&(b.bind(b.cursor,"touchstart",b.ontouchstartCursor),b.bind(b.cursor,"touchmove",b.ontouchmoveCursor),b.bind(b.cursor,"touchend",b.ontouchendCursor),b.cursorh&&b.bind(b.cursorh,"touchstart",function(E){b.ontouchstartCursor(E,!0)}),
79
+ b.cursorh&&b.bind(b.cursorh,"touchmove",b.ontouchmoveCursor),b.cursorh&&b.bind(b.cursorh,"touchend",b.ontouchendCursor));w.emulatetouch||G.isandroid||G.isios?(b.bind(G.hasmousecapture?b.win:x,"mouseup",b.ontouchend),b.onclick&&b.bind(x,"click",b.onclick),w.cursordragontouch?(b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.cursorh&&b.bind(b.cursorh,"mousedown",function(E){b.onmousedown(E,!0)}),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onmouseup)):(b.bind(b.rail,"mousedown",
80
+ function(E){E.preventDefault()}),b.railh&&b.bind(b.railh,"mousedown",function(E){E.preventDefault()}))):(b.bind(G.hasmousecapture?b.win:x,"mouseup",b.onmouseup),b.bind(x,"mousemove",b.onmousemove),b.onclick&&b.bind(x,"click",b.onclick),b.bind(b.cursor,"mousedown",b.onmousedown),b.bind(b.cursor,"mouseup",b.onmouseup),b.railh&&(b.bind(b.cursorh,"mousedown",function(E){b.onmousedown(E,!0)}),b.bind(b.cursorh,"mouseup",b.onmouseup)),!b.ispage&&w.enablescrollonselection&&(b.bind(b.win[0],"mousedown",b.onselectionstart),
81
+ b.bind(x,"mouseup",b.onselectionend),b.bind(b.cursor,"mouseup",b.onselectionend),b.cursorh&&b.bind(b.cursorh,"mouseup",b.onselectionend),b.bind(x,"mousemove",b.onselectiondrag)),b.zoom&&(b.jqbind(b.zoom,"mouseenter",function(){b.canshowonmouseevent&&b.showCursor();b.rail.active=!0}),b.jqbind(b.zoom,"mouseleave",function(){b.rail.active=!1;b.rail.drag||b.hideCursor()})));w.enablemousewheel&&(b.isiframe||b.mousewheel(G.isie&&b.ispage?x:b.win,b.onmousewheel),b.mousewheel(b.rail,b.onmousewheel),b.railh&&
82
+ b.mousewheel(b.railh,b.onmousewheelhr));b.ispage||G.cantouch||/HTML|^BODY/.test(b.win[0].nodeName)||(b.win.attr("tabindex")||b.win.attr({tabindex:++y}),b.bind(b.win,"focus",function(E){B=b.getTarget(E).id||b.getTarget(E)||!1;b.hasfocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"blur",function(E){B=!1;b.hasfocus=!1}),b.bind(b.win,"mouseenter",function(E){v=b.getTarget(E).id||b.getTarget(E)||!1;b.hasmousefocus=!0;b.canshowonmouseevent&&b.noticeCursor()}),b.bind(b.win,"mouseleave",function(E){v=
83
+ !1;b.hasmousefocus=!1;b.rail.drag||b.hideCursor()}));b.onkeypress=function(E){if(b.railslocked&&b.page.maxh===0)return!0;E=E||K.event;var X=b.getTarget(E);if(X&&/INPUT|TEXTAREA|SELECT|OPTION/.test(X.nodeName)&&(!X.getAttribute("type")&&!X.type||!/submit|button|cancel/i.tp)||n(X).attr("contenteditable"))return!0;if(b.hasfocus||b.hasmousefocus&&!B||b.ispage&&!B&&!v){X=E.keyCode;if(b.railslocked&&X!=27)return b.cancelEvent(E);var oa=E.ctrlKey||!1,ra=E.shiftKey||!1,sa=!1;switch(X){case 38:case 63233:b.doScrollBy(72);
84
+ sa=!0;break;case 40:case 63235:b.doScrollBy(-72);sa=!0;break;case 37:case 63232:b.railh&&(oa?b.doScrollLeft(0):b.doScrollLeftBy(72),sa=!0);break;case 39:case 63234:b.railh&&(oa?b.doScrollLeft(b.page.maxw):b.doScrollLeftBy(-72),sa=!0);break;case 33:case 63276:b.doScrollBy(b.view.h);sa=!0;break;case 34:case 63277:b.doScrollBy(-b.view.h);sa=!0;break;case 36:case 63273:b.railh&&oa?b.doScrollPos(0,0):b.doScrollTo(0);sa=!0;break;case 35:case 63275:b.railh&&oa?b.doScrollPos(b.page.maxw,b.page.maxh):b.doScrollTo(b.page.maxh);
85
+ sa=!0;break;case 32:w.spacebarenabled&&(ra?b.doScrollBy(b.view.h):b.doScrollBy(-b.view.h),sa=!0);break;case 27:b.zoomactive&&(b.doZoom(),sa=!0)}if(sa)return b.cancelEvent(E)}};w.enablekeyboard&&b.bind(x,G.isopera&&!G.isopera12?"keypress":"keydown",b.onkeypress);b.bind(x,"keydown",function(E){E.ctrlKey&&(b.wheelprevented=!0)});b.bind(x,"keyup",function(E){E.ctrlKey||(b.wheelprevented=!1)});b.bind(K,"blur",function(E){b.wheelprevented=!1});b.bind(K,"resize",b.onscreenresize);b.bind(K,"orientationchange",
86
+ b.onscreenresize);b.bind(K,"load",b.lazyResize);if(G.ischrome&&!b.ispage&&!b.haswrapper){var Aa=b.win.attr("style");f=parseFloat(b.win.css("width"))+1;b.win.css("width",f);b.synched("chromefix",function(){b.win.attr("style",Aa)})}b.onAttributeChange=function(E){b.lazyResize(b.isieold?250:30)};if(w.enableobserver&&(b.isie11||ca===!1||(b.observerbody=new ca(function(E){E.forEach(function(X){if(X.type=="attributes")return M.hasClass("modal-open")&&M.hasClass("modal-dialog")&&!n.contains(n(".modal-dialog")[0],
87
+ b.doc[0])?b.hide():b.show()});if(b.me.clientWidth!=b.page.width||b.me.clientHeight!=b.page.height)return b.lazyResize(30)}),b.observerbody.observe(x.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!b.ispage&&!b.haswrapper)){var ya=b.win[0];ca!==!1?(b.observer=new ca(function(E){E.forEach(b.onAttributeChange)}),b.observer.observe(ya,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),b.observerremover=new ca(function(E){E.forEach(function(X){if(X.removedNodes.length>
88
+ 0)for(var oa in X.removedNodes)if(b&&X.removedNodes[oa]===ya)return b.remove()})}),b.observerremover.observe(ya.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(b.bind(ya,G.isie&&!G.isie9?"propertychange":"DOMAttrModified",b.onAttributeChange),G.isie9&&ya.attachEvent("onpropertychange",b.onAttributeChange),b.bind(ya,"DOMNodeRemoved",function(E){E.target===ya&&b.remove()}))}!b.ispage&&w.boxzoom&&b.bind(K,"resize",b.resizeZoom);b.istextarea&&(b.bind(b.win,"keydown",b.lazyResize),
89
+ b.bind(b.win,"mouseup",b.lazyResize));b.lazyResize(30)}if(this.doc[0].nodeName=="IFRAME"){var za=function(){b.iframexd=!1;try{var E="contentDocument"in this?this.contentDocument:this.contentWindow._doc}catch(oa){b.iframexd=!0,E=!1}if(b.iframexd)return"console"in K&&console.log("NiceScroll error: policy restriced iframe"),!0;b.forcescreen=!0;b.isiframe&&(b.iframe={doc:n(E),html:b.doc.contents().find("html")[0],body:b.doc.contents().find("body")[0]},b.getContentSize=function(){return{w:Math.max(b.iframe.html.scrollWidth,
90
+ b.iframe.body.scrollWidth),h:Math.max(b.iframe.html.scrollHeight,b.iframe.body.scrollHeight)}},b.docscroll=n(b.iframe.body));if(!G.isios&&w.iframeautoresize&&!b.isiframe){b.win.scrollTop(0);b.doc.height("");var X=Math.max(E.getElementsByTagName("html")[0].scrollHeight,E.body.scrollHeight);b.doc.height(X)}b.lazyResize(30);b.css(n(b.iframe.body),g);G.isios&&b.haswrapper&&b.css(n(E.body),{"-webkit-transform":"translate3d(0,0,0)"});"contentWindow"in this?b.bind(this.contentWindow,"scroll",b.onscroll):
91
+ b.bind(E,"scroll",b.onscroll);w.enablemousewheel&&b.mousewheel(E,b.onmousewheel);w.enablekeyboard&&b.bind(E,G.isopera?"keypress":"keydown",b.onkeypress);G.cantouch?(b.bind(E,"touchstart",b.ontouchstart),b.bind(E,"touchmove",b.ontouchmove)):w.emulatetouch&&(b.bind(E,"mousedown",b.ontouchstart),b.bind(E,"mousemove",function(oa){return b.ontouchmove(oa,!0)}),w.grabcursorenabled&&G.cursorgrabvalue&&b.css(n(E.body),{cursor:G.cursorgrabvalue}));b.bind(E,"mouseup",b.ontouchend);b.zoom&&(w.dblclickzoom&&
92
+ b.bind(E,"dblclick",b.doZoom),b.ongesturezoom&&b.bind(E,"gestureend",b.ongesturezoom))};this.doc[0].readyState&&this.doc[0].readyState==="complete"&&setTimeout(function(){za.call(b.doc[0],!1)},500);b.bind(this.doc,"load",za)}};this.showCursor=function(g,r){b.cursortimeout&&(clearTimeout(b.cursortimeout),b.cursortimeout=0);b.rail&&(b.autohidedom&&(b.autohidedom.stop().css({opacity:w.cursoropacitymax}),b.cursoractive=!0),b.rail.drag&&b.rail.drag.pt==1||(g!==void 0&&g!==!1&&(b.scroll.y=g/b.scrollratio.y|
93
+ 0),r!==void 0&&(b.scroll.x=r/b.scrollratio.x|0)),b.cursor.css({height:b.cursorheight,top:b.scroll.y}),b.cursorh&&(g=b.hasreversehr?b.scrollvaluemaxw-b.scroll.x:b.scroll.x,b.cursorh.css({width:b.cursorwidth,left:!b.rail.align&&b.rail.visibility?g+b.rail.width:g}),b.cursoractive=!0),b.zoom&&b.zoom.stop().css({opacity:w.cursoropacitymax}))};this.hideCursor=function(g){b.cursortimeout||!b.rail||!b.autohidedom||b.hasmousefocus&&w.autohidemode==="leave"||(b.cursortimeout=setTimeout(function(){b.rail.active&&
94
+ b.showonmouseevent||(b.autohidedom.stop().animate({opacity:w.cursoropacitymin}),b.zoom&&b.zoom.stop().animate({opacity:w.cursoropacitymin}),b.cursoractive=!1);b.cursortimeout=0},g||w.hidecursordelay))};this.noticeCursor=function(g,r,t){b.showCursor(r,t);b.rail.active||b.hideCursor(g)};this.getContentSize=b.ispage?function(){return{w:Math.max(x.body.scrollWidth,x.documentElement.scrollWidth),h:Math.max(x.body.scrollHeight,x.documentElement.scrollHeight)}}:b.haswrapper?function(){return{w:b.doc[0].offsetWidth,
95
+ h:b.doc[0].offsetHeight}}:function(){return{w:b.docscroll[0].scrollWidth,h:b.docscroll[0].scrollHeight}};this.onResize=function(g,r){if(!b||!b.win)return!1;g=b.page.maxh;var t=b.page.maxw,f=b.view.h,p=b.view.w;b.view={w:b.ispage?b.win.width():b.win[0].clientWidth,h:b.ispage?b.win.height():b.win[0].clientHeight};b.page=r?r:b.getContentSize();b.page.maxh=Math.max(0,b.page.h-b.view.h);b.page.maxw=Math.max(0,b.page.w-b.view.w);if(b.page.maxh==g&&b.page.maxw==t&&b.view.w==p&&b.view.h==f){if(b.ispage)return b;
96
+ r=b.win.offset();if(b.lastposition&&(g=b.lastposition,g.top==r.top&&g.left==r.left))return b;b.lastposition=r}b.page.maxh===0?(b.hideRail(),b.scrollvaluemax=0,b.scroll.y=0,b.scrollratio.y=0,b.cursorheight=0,b.setScrollTop(0),b.rail&&(b.rail.scrollable=!1)):(b.page.maxh-=w.railpadding.top+w.railpadding.bottom,b.rail.scrollable=!0);b.page.maxw===0?(b.hideRailHr(),b.scrollvaluemaxw=0,b.scroll.x=0,b.scrollratio.x=0,b.cursorwidth=0,b.setScrollLeft(0),b.railh&&(b.railh.scrollable=!1)):(b.page.maxw-=w.railpadding.left+
97
+ w.railpadding.right,b.railh&&(b.railh.scrollable=w.horizrailenabled));b.railslocked=b.locked||b.page.maxh===0&&b.page.maxw===0;if(b.railslocked)return b.ispage||b.updateScrollBar(b.view),!1;b.hidden||(b.rail.visibility||b.showRail(),b.railh&&!b.railh.visibility&&b.showRailHr());b.istextarea&&b.win.css("resize")&&b.win.css("resize")!="none"&&(b.view.h-=20);b.cursorheight=Math.min(b.view.h,Math.round(b.view.h/b.page.h*b.view.h));b.cursorheight=w.cursorfixedheight?w.cursorfixedheight:Math.max(w.cursorminheight,
98
+ b.cursorheight);b.cursorwidth=Math.min(b.view.w,Math.round(b.view.w/b.page.w*b.view.w));b.cursorwidth=w.cursorfixedheight?w.cursorfixedheight:Math.max(w.cursorminheight,b.cursorwidth);b.scrollvaluemax=b.view.h-b.cursorheight-(w.railpadding.top+w.railpadding.bottom);b.hasborderbox||(b.scrollvaluemax-=b.cursor[0].offsetHeight-b.cursor[0].clientHeight);b.railh&&(b.railh.width=b.page.maxh>0?b.view.w-b.rail.width:b.view.w,b.scrollvaluemaxw=b.railh.width-b.cursorwidth-(w.railpadding.left+w.railpadding.right));
99
+ b.ispage||b.updateScrollBar(b.view);b.scrollratio={x:b.page.maxw/b.scrollvaluemaxw,y:b.page.maxh/b.scrollvaluemax};b.getScrollTop()>b.page.maxh?b.doScrollTop(b.page.maxh):(b.scroll.y=b.getScrollTop()/b.scrollratio.y|0,b.scroll.x=b.getScrollLeft()/b.scrollratio.x|0,b.cursoractive&&b.noticeCursor());b.scroll.y&&b.getScrollTop()===0&&b.doScrollTo(b.scroll.y*b.scrollratio.y|0);return b};this.resize=b.onResize;var h=0;this.onscreenresize=function(g){clearTimeout(h);var r=!b.ispage&&!b.haswrapper;r&&b.hideRails();
100
+ h=setTimeout(function(){b&&(r&&b.showRails(),b.resize());h=0},120)};this.lazyResize=function(g){clearTimeout(h);g=isNaN(g)?240:g;h=setTimeout(function(){b&&b.resize();h=0},g);return b};this.jqbind=function(g,r,t){b.events.push({e:g,n:r,f:t,q:!0});n(g).on(r,t)};this.mousewheel=function(g,r,t){g="jquery"in g?g[0]:g;if("onwheel"in x.createElement("div"))b._bind(g,"wheel",r,t||!1);else{var f=x.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";u(g,f,r,t||!1);f=="DOMMouseScroll"&&u(g,"MozMousePixelScroll",
101
+ r,t||!1)}};var q=!1;if(G.haseventlistener){try{var C=Object.defineProperty({},"passive",{get:function(){q=!0}});K.addEventListener("test",null,C)}catch(g){}this.stopPropagation=function(g){if(!g)return!1;g=g.original?g.original:g;g.stopPropagation();return!1};this.cancelEvent=function(g){g.cancelable&&g.preventDefault();g.stopImmediatePropagation();g.preventManipulation&&g.preventManipulation();return!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=
102
+ function(){this.cancelBubble=!0},K.constructor.prototype.addEventListener=x.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(g,r,t){this.attachEvent("on"+g,r)},K.constructor.prototype.removeEventListener=x.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(g,r,t){this.detachEvent("on"+g,r)},this.cancelEvent=function(g){if(g=g||K.event)g.cancelBubble=!0,g.cancel=!0,g.returnValue=!1;return!1},this.stopPropagation=function(g){if(g=
103
+ g||K.event)g.cancelBubble=!0;return!1};this.delegate=function(g,r,t,f,p){var D=L[r]||!1;D?b.events.push({e:g,n:r,f:t,b:f,q:!1}):(D={a:[],l:[],f:function(R){for(var ea=D.l,da=!1,wa=ea.length-1;wa>=0;wa--)if(da=ea[wa].call(R.target,R),da===!1)return!1;return da}},b.bind(g,r,D.f,f,p),L[r]=D);b.ispage?(D.a=[b.id].concat(D.a),D.l=[t].concat(D.l)):(D.a.push(b.id),D.l.push(t))};this.undelegate=function(g,r,t,f,p){if((t=L[r]||!1)&&t.l)for(f=0,p=t.l.length;f<p;f++)t.a[f]===b.id&&(t.a.splice(f),t.l.splice(f),
104
+ t.a.length===0&&(b._unbind(g,r,t.l.f),L[r]=null))};this.bind=function(g,r,t,f,p){b._bind("jquery"in g?g[0]:g,r,t,f||!1,p||!1)};this._bind=function(g,r,t,f,p){b.events.push({e:g,n:r,f:t,b:f,q:!1});q&&(p||g==K.document||g==K.document.body||g==K)?g.addEventListener(r,t,{passive:!1,capture:f}):g.addEventListener(r,t,f||!1)};this._unbind=function(g,r,t,f){L[r]?b.undelegate(g,r,t,f):g.removeEventListener(r,t,f)};this.unbindAll=function(){for(var g=0;g<b.events.length;g++){var r=b.events[g];r.q?r.e.unbind(r.n,
105
+ r.f):b._unbind(r.e,r.n,r.f,r.b)}};this.showRails=function(){return b.showRail().showRailHr()};this.showRail=function(){b.page.maxh===0||!b.ispage&&b.win.css("display")=="none"||(b.rail.visibility=!0,b.rail.css("display","block"));return b};this.showRailHr=function(){b.railh&&b.page.maxw!==0&&(b.ispage||b.win.css("display")!="none")&&(b.railh.visibility=!0,b.railh.css("display","block"));return b};this.hideRails=function(){return b.hideRail().hideRailHr()};this.hideRail=function(){b.rail.visibility=
106
+ !1;b.rail.css("display","none");return b};this.hideRailHr=function(){b.railh&&(b.railh.visibility=!1,b.railh.css("display","none"));return b};this.show=function(){b.hidden=!1;b.railslocked=!1;return b.showRails()};this.hide=function(){b.hidden=!0;b.railslocked=!0;return b.hideRails()};this.toggle=function(){return b.hidden?b.show():b.hide()};this.remove=function(){b.stop();b.cursortimeout&&clearTimeout(b.cursortimeout);for(var g in b.delaylist)b.delaylist[g]&&Q(b.delaylist[g].h);b.doZoomOut();G.hasw3ctouch?
107
+ b.undelegate(x,"pointermove",b.ontouchmove):G.hasmstouch?b.undelegate(x,"MSPointerMove",b.ontouchmove):G.cantouch&&b.undelegate(x,"touchmove",b.ontouchmove,!1,!0);b.unbindAll();G.isie9&&b.win[0].detachEvent("onpropertychange",b.onAttributeChange);b.observer!==!1&&b.observer.disconnect();b.observerremover!==!1&&b.observerremover.disconnect();b.observerbody!==!1&&b.observerbody.disconnect();b.events=null;b.cursor&&b.cursor.remove();b.cursorh&&b.cursorh.remove();b.rail&&b.rail.remove();b.railh&&b.railh.remove();
108
+ b.zoom&&b.zoom.remove();for(g=0;g<b.saved.css.length;g++){var r=b.saved.css[g];r[0].css(r[1],r[2]===void 0?"":r[2])}b.saved=!1;b.me.data("__nicescroll","");var t=n.nicescroll;t.each(function(p){if(this&&this.id===b.id){delete t[p];for(var D=++p;D<t.length;D++,p++)t[p]=t[D];t.length--;t.length&&delete t[t.length]}});for(var f in b)b[f]=null,delete b[f];b=null};this.scrollstart=function(g){this.onscrollstart=g;return b};this.scrollend=function(g){this.onscrollend=g;return b};this.scrollcancel=function(g){this.onscrollcancel=
109
+ g;return b};this.zoomin=function(g){this.onzoomin=g;return b};this.zoomout=function(g){this.onzoomout=g;return b};this.isScrollable=function(g){g=g.target?g.target:g;if(g.nodeName=="OPTION")return!0;for(;g&&g.nodeType==1&&g!==this.me[0]&&!/^BODY|HTML/.test(g.nodeName);){var r=n(g);r=r.css("overflowY")||r.css("overflowX")||r.css("overflow")||"";if(/scroll|auto/.test(r))return g.clientHeight!=g.scrollHeight;g=g.parentNode?g.parentNode:!1}return!1};this.getViewport=function(g){for(g=g&&g.parentNode?
110
+ g.parentNode:!1;g&&g.nodeType==1&&!/^BODY|HTML/.test(g.nodeName);){var r=n(g);if(/fixed|absolute/.test(r.css("position")))return r;var t=r.css("overflowY")||r.css("overflowX")||r.css("overflow")||"";if(/scroll|auto/.test(t)&&g.clientHeight!=g.scrollHeight||r.getNiceScroll().length>0)return r;g=g.parentNode?g.parentNode:!1}return!1};this.triggerScrollStart=function(g,r,t,f,p){b.onscrollstart&&b.onscrollstart.call(b,{type:"scrollstart",current:{x:g,y:r},request:{x:t,y:f},end:{x:b.newscrollx,y:b.newscrolly},
111
+ speed:p})};this.triggerScrollEnd=function(){if(b.onscrollend){var g=b.getScrollLeft(),r=b.getScrollTop();b.onscrollend.call(b,{type:"scrollend",current:{x:g,y:r},end:{x:g,y:r}})}};var H=0,P=0,O=0,V=1,S=!1;this.onmousewheel=function(g){if(b.wheelprevented||b.locked)return!1;if(b.railslocked)return b.debounced("checkunlock",b.resize,250),!1;if(b.rail.drag)return b.cancelEvent(g);w.oneaxismousemode==="auto"&&g.deltaX!==0&&(w.oneaxismousemode=!1);if(w.oneaxismousemode&&g.deltaX===0&&!b.rail.scrollable)return b.railh&&
112
+ b.railh.scrollable?b.onmousewheelhr(g):!0;var r=aa(),t=!1;w.preservenativescrolling&&b.checkarea+600<r&&(b.nativescrollingarea=b.isScrollable(g),t=!0);b.checkarea=r;if(b.nativescrollingarea)return!0;if(g=z(g,!1,t))b.checkarea=0;return g};this.onmousewheelhr=function(g){if(!b.wheelprevented){if(b.railslocked||!b.railh.scrollable)return!0;if(b.rail.drag)return b.cancelEvent(g);var r=aa(),t=!1;w.preservenativescrolling&&b.checkarea+600<r&&(b.nativescrollingarea=b.isScrollable(g),t=!0);b.checkarea=r;
113
+ return b.nativescrollingarea?!0:b.railslocked?b.cancelEvent(g):z(g,!0,t)}};this.stop=function(){b.cancelScroll();b.scrollmon&&b.scrollmon.stop();b.cursorfreezed=!1;b.scroll.y=Math.round(b.getScrollTop()*(1/b.scrollratio.y));b.noticeCursor();return b};this.getTransitionSpeed=function(g){return 80+g/72*w.scrollspeed|0};if(w.smoothscroll)if(b.ishwscroll&&G.hastransition&&w.usetransition&&w.smoothscroll){var U="";this.resetTransition=function(){U="";b.doc.css(G.prefixstyle+"transition-duration","0ms")};
114
+ this.prepareTransition=function(g,r){g=r?g:b.getTransitionSpeed(g);r=g+"ms";U!==r&&(U=r,b.doc.css(G.prefixstyle+"transition-duration",r));return g};this.doScrollLeft=function(g,r){var t=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(g,t,r)};this.doScrollTop=function(g,r){var t=b.scrollrunning?b.newscrollx:b.getScrollLeft();b.doScrollPos(t,g,r)};this.cursorupdate={running:!1,start:function(){var g=this;if(!g.running){g.running=!0;var r=function(){g.running&&N(r);b.showCursor(b.getScrollTop(),
115
+ b.getScrollLeft());b.notifyScrollEvent(b.win[0])};N(r)}},stop:function(){this.running=!1}};this.doScrollPos=function(g,r,t){t=b.getScrollTop();var f=b.getScrollLeft();((b.newscrolly-t)*(r-t)<0||(b.newscrollx-f)*(g-f)<0)&&b.cancelScroll();w.bouncescroll?(r<0?r=r/2|0:r>b.page.maxh&&(r=b.page.maxh+(r-b.page.maxh)/2|0),g<0?g=g/2|0:g>b.page.maxw&&(g=b.page.maxw+(g-b.page.maxw)/2|0)):(r<0?r=0:r>b.page.maxh&&(r=b.page.maxh),g<0?g=0:g>b.page.maxw&&(g=b.page.maxw));if(b.scrollrunning&&g==b.newscrollx&&r==
116
+ b.newscrolly)return!1;b.newscrolly=r;b.newscrollx=g;t=b.getScrollTop();f=b.getScrollLeft();var p=g-f;var D=r-t;p=b.prepareTransition(Math.sqrt(p*p+D*D)|0);b.scrollrunning||(b.scrollrunning=!0,b.triggerScrollStart(f,t,g,r,p),b.cursorupdate.start());b.scrollendtrapped=!0;G.transitionend||(b.scrollendtrapped&&clearTimeout(b.scrollendtrapped),b.scrollendtrapped=setTimeout(b.onScrollTransitionEnd,p));b.setScrollTop(b.newscrolly);b.setScrollLeft(b.newscrollx)};this.cancelScroll=function(){if(!b.scrollendtrapped)return!0;
117
+ var g=b.getScrollTop(),r=b.getScrollLeft();b.scrollrunning=!1;G.transitionend||clearTimeout(G.transitionend);b.scrollendtrapped=!1;b.resetTransition();b.setScrollTop(g);b.railh&&b.setScrollLeft(r);b.timerscroll&&b.timerscroll.tm&&clearInterval(b.timerscroll.tm);b.timerscroll=!1;b.cursorfreezed=!1;b.cursorupdate.stop();b.showCursor(g,r);return b};this.onScrollTransitionEnd=function(){if(b.scrollendtrapped){var g=b.getScrollTop(),r=b.getScrollLeft();g<0?g=0:g>b.page.maxh&&(g=b.page.maxh);r<0?r=0:r>
118
+ b.page.maxw&&(r=b.page.maxw);if(g!=b.newscrolly||r!=b.newscrollx)return b.doScrollPos(r,g,w.snapbackspeed);b.scrollrunning&&b.triggerScrollEnd();b.scrollrunning=!1;b.scrollendtrapped=!1;b.resetTransition();b.timerscroll=!1;b.setScrollTop(g);b.railh&&b.setScrollLeft(r);b.cursorupdate.stop();b.noticeCursor(!1,g,r);b.cursorfreezed=!1}}}else this.doScrollLeft=function(g,r){var t=b.scrollrunning?b.newscrolly:b.getScrollTop();b.doScrollPos(g,t,r)},this.doScrollTop=function(g,r){var t=b.scrollrunning?b.newscrollx:
119
+ b.getScrollLeft();b.doScrollPos(t,g,r)},this.doScrollPos=function(g,r,t){t=b.getScrollTop();var f=b.getScrollLeft();((b.newscrolly-t)*(r-t)<0||(b.newscrollx-f)*(g-f)<0)&&b.cancelScroll();var p=!1;b.bouncescroll&&b.rail.visibility||(r<0?(r=0,p=!0):r>b.page.maxh&&(r=b.page.maxh,p=!0));b.bouncescroll&&b.railh.visibility||(g<0?(g=0,p=!0):g>b.page.maxw&&(g=b.page.maxw,p=!0));if(b.scrollrunning&&b.newscrolly===r&&b.newscrollx===g)return!0;b.newscrolly=r;b.newscrollx=g;b.dst={};b.dst.x=g-f;b.dst.y=r-t;b.dst.px=
120
+ f;b.dst.py=t;var D=b.getTransitionSpeed(Math.sqrt(b.dst.x*b.dst.x+b.dst.y*b.dst.y)|0);b.bzscroll={};p=p?1:.58;b.bzscroll.x=new ja(f,b.newscrollx,D,0,0,p,1);b.bzscroll.y=new ja(t,b.newscrolly,D,0,0,p,1);aa();var R=function(){if(b.scrollrunning){var ea=b.bzscroll.y.getPos();b.setScrollLeft(b.bzscroll.x.getNow());b.setScrollTop(b.bzscroll.y.getNow());ea<=1?b.timer=N(R):(b.scrollrunning=!1,b.timer=0,b.triggerScrollEnd())}};b.scrollrunning||(b.triggerScrollStart(f,t,g,r,D),b.scrollrunning=!0,b.timer=N(R))},
121
+ this.cancelScroll=function(){b.timer&&Q(b.timer);b.timer=0;b.bzscroll=!1;b.scrollrunning=!1;return b};else this.doScrollLeft=function(g,r){var t=b.getScrollTop();b.doScrollPos(g,t,r)},this.doScrollTop=function(g,r){var t=b.getScrollLeft();b.doScrollPos(t,g,r)},this.doScrollPos=function(g,r,t){var f=g>b.page.maxw?b.page.maxw:g;f<0&&(f=0);var p=r>b.page.maxh?b.page.maxh:r;p<0&&(p=0);b.synched("scroll",function(){b.setScrollTop(p);b.setScrollLeft(f)})},this.cancelScroll=function(){};this.doScrollBy=
122
+ function(g,r){A(0,g)};this.doScrollLeftBy=function(g,r){A(g,0)};this.doScrollTo=function(g,r){b.cursorfreezed=!1;b.doScrollTop(g)};this.checkContentSize=function(){var g=b.getContentSize();g.h==b.page.h&&g.w==b.page.w||b.resize(!1,g)};b.onscroll=function(g){b.rail.drag||b.cursorfreezed||b.synched("scroll",function(){b.scroll.y=Math.round(b.getScrollTop()/b.scrollratio.y);b.railh&&(b.scroll.x=Math.round(b.getScrollLeft()/b.scrollratio.x));b.noticeCursor()})};b.bind(b.docscroll,"scroll",b.onscroll);
123
+ this.doZoomIn=function(g){if(!b.zoomactive){b.zoomactive=!0;b.zoomrestore={style:{}};var r="position top left zIndex backgroundColor marginTop marginBottom marginLeft marginRight".split(" "),t=b.win[0].style,f;for(f in r){var p=r[f];b.zoomrestore.style[p]=t[p]!==void 0?t[p]:""}b.zoomrestore.style.width=b.win.css("width");b.zoomrestore.style.height=b.win.css("height");b.zoomrestore.padding={w:b.win.outerWidth()-b.win.width(),h:b.win.outerHeight()-b.win.height()};G.isios4&&(b.zoomrestore.scrollTop=
124
+ I.scrollTop(),I.scrollTop(0));b.win.css({position:G.isios4?"absolute":"fixed",top:0,left:0,zIndex:J+100,margin:0});r=b.win.css("backgroundColor");(""===r||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(r))&&b.win.css("backgroundColor","#fff");b.rail.css({zIndex:J+101});b.zoom.css({zIndex:J+102});b.zoom.css("backgroundPosition","0 -18px");b.resizeZoom();b.onzoomin&&b.onzoomin.call(b);return b.cancelEvent(g)}};this.doZoomOut=function(g){if(b.zoomactive)return b.zoomactive=!1,b.win.css("margin",
125
+ ""),b.win.css(b.zoomrestore.style),G.isios4&&I.scrollTop(b.zoomrestore.scrollTop),b.rail.css({"z-index":b.zindex}),b.zoom.css({"z-index":b.zindex}),b.zoomrestore=!1,b.zoom.css("backgroundPosition","0 0"),b.onResize(),b.onzoomout&&b.onzoomout.call(b),b.cancelEvent(g)};this.doZoom=function(g){return b.zoomactive?b.doZoomOut(g):b.doZoomIn(g)};this.resizeZoom=function(){if(b.zoomactive){var g=b.getScrollTop();b.win.css({width:I.width()-b.zoomrestore.padding.w+"px",height:I.height()-b.zoomrestore.padding.h+
126
+ "px"});b.onResize();b.setScrollTop(Math.min(b.page.maxh,g))}};this.init();n.nicescroll.push(this)},ia=function(T){var e=this;this.nc=T;this.steptime=this.lasttime=this.speedy=this.speedx=this.lasty=this.lastx=0;this.snapy=this.snapx=!1;this.demuly=this.demulx=0;this.lastscrolly=this.lastscrollx=-1;this.timer=this.chky=this.chkx=0;this.reset=function(l,m){e.stop();e.steptime=0;e.lasttime=aa();e.speedx=0;e.speedy=0;e.lastx=l;e.lasty=m;e.lastscrollx=-1;e.lastscrolly=-1};this.update=function(l,m){var c=
127
+ aa();e.steptime=c-e.lasttime;e.lasttime=c;c=m-e.lasty;var u=l-e.lastx,A=e.nc.getScrollTop(),z=e.nc.getScrollLeft();A+=c;z+=u;e.snapx=z<0||z>e.nc.page.maxw;e.snapy=A<0||A>e.nc.page.maxh;e.speedx=u;e.speedy=c;e.lastx=l;e.lasty=m};this.stop=function(){e.nc.unsynched("domomentum2d");e.timer&&clearTimeout(e.timer);e.timer=0;e.lastscrollx=-1;e.lastscrolly=-1};this.doSnapy=function(l,m){var c=!1;m<0?(m=0,c=!0):m>e.nc.page.maxh&&(m=e.nc.page.maxh,c=!0);l<0?(l=0,c=!0):l>e.nc.page.maxw&&(l=e.nc.page.maxw,c=
128
+ !0);c?e.nc.doScrollPos(l,m,e.nc.opt.snapbackspeed):e.nc.triggerScrollEnd()};this.doMomentum=function(l){var m=aa(),c=l?m+l:e.lasttime;l=e.nc.getScrollLeft();var u=e.nc.getScrollTop(),A=e.nc.page.maxh,z=e.nc.page.maxw;e.speedx=z>0?Math.min(60,e.speedx):0;e.speedy=A>0?Math.min(60,e.speedy):0;c=c&&m-c<=60;if(u<0||u>A||l<0||l>z)c=!1;l=e.speedx&&c?e.speedx:!1;if(e.speedy&&c&&e.speedy||l){var b=Math.max(16,e.steptime);b>50&&(l=b/50,e.speedx*=l,e.speedy*=l,b=50);e.demulxy=0;e.lastscrollx=e.nc.getScrollLeft();
129
+ e.chkx=e.lastscrollx;e.lastscrolly=e.nc.getScrollTop();e.chky=e.lastscrolly;var M=e.lastscrollx,w=e.lastscrolly,Y=function(){var G=aa()-m>600?.04:.02;e.speedx&&(M=Math.floor(e.lastscrollx-e.speedx*(1-e.demulxy)),e.lastscrollx=M,M<0||M>z)&&(G=.1);e.speedy&&(w=Math.floor(e.lastscrolly-e.speedy*(1-e.demulxy)),e.lastscrolly=w,w<0||w>A)&&(G=.1);e.demulxy=Math.min(1,e.demulxy+G);e.nc.synched("domomentum2d",function(){e.speedx&&(e.nc.getScrollLeft(),e.chkx=M,e.nc.setScrollLeft(M));e.speedy&&(e.nc.getScrollTop(),
130
+ e.chky=w,e.nc.setScrollTop(w));e.timer||(e.nc.hideCursor(),e.doSnapy(M,w))});e.demulxy<1?e.timer=setTimeout(Y,b):(e.stop(),e.nc.hideCursor(),e.doSnapy(M,w))};Y()}else e.doSnapy(e.nc.getScrollLeft(),e.nc.getScrollTop())}},qa=n.fn.scrollTop;typeof n.cssHooks==="object"&&(n.cssHooks.pageYOffset={get:function(T,e,l){return(e=n.data(T,"__nicescroll")||!1)&&e.ishwscroll?e.getScrollTop():qa.call(T)},set:function(T,e){var l=n.data(T,"__nicescroll")||!1;l&&l.ishwscroll?l.setScrollTop(parseInt(e)):qa.call(T,
131
+ e);return this}});n.fn.scrollTop=function(T){if(T===void 0){var e=this[0]?n.data(this[0],"__nicescroll")||!1:!1;return e&&e.ishwscroll?e.getScrollTop():qa.call(this)}return this.each(function(){var l=n.data(this,"__nicescroll")||!1;l&&l.ishwscroll?l.setScrollTop(parseInt(T)):qa.call(n(this),T)})};var fa=n.fn.scrollLeft;typeof n.cssHooks==="object"&&(n.cssHooks.pageXOffset={get:function(T,e,l){return(e=n.data(T,"__nicescroll")||!1)&&e.ishwscroll?e.getScrollLeft():fa.call(T)},set:function(T,e){var l=
132
+ n.data(T,"__nicescroll")||!1;l&&l.ishwscroll?l.setScrollLeft(parseInt(e)):fa.call(T,e);return this}});n.fn.scrollLeft=function(T){if(T===void 0){var e=this[0]?n.data(this[0],"__nicescroll")||!1:!1;return e&&e.ishwscroll?e.getScrollLeft():fa.call(this)}return this.each(function(){var l=n.data(this,"__nicescroll")||!1;l&&l.ishwscroll?l.setScrollLeft(parseInt(T)):fa.call(n(this),T)})};var ba=function(T){var e=this;this.length=0;this.name="nicescrollarray";this.each=function(c){n.each(e,c);return e};
133
+ this.push=function(c){e[e.length]=c;e.length++};this.eq=function(c){return e[c]};if(T)for(var l=0;l<T.length;l++){var m=n.data(T[l],"__nicescroll")||!1;m&&(this[this.length]=m,this.length++)}return this};(function(T,e,l){for(var m=0,c=e.length;m<c;m++)l(T,e[m])})(ba.prototype,"show hide toggle onResize resize remove stop doScrollPos".split(" "),function(T,e){T[e]=function(){var l=arguments;return this.each(function(){this[e].apply(this,l)})}});n.fn.getNiceScroll=function(T){return T===void 0?new ba(this):
134
+ this[T]&&n.data(this[T],"__nicescroll")||!1};if(typeof n.expr==="object"){var na=n.expr.pseudos||n.expr[":"];na&&(na.nicescroll=function(T){return n.data(T,"__nicescroll")!==void 0})}n.fn.niceScroll=function(T,e){e!==void 0||typeof T!="object"||"jquery"in T||(e=T,T=!1);var l=new ba;this.each(function(){var m=n(this),c=n.extend({},e);if(T){var u=n(T);c.doc=u.length>1?n(T,m):u;c.win=m}"doc"in c&&!("win"in c)&&(c.win=m);u=m.data("__nicescroll")||!1;u||(c.doc=c.doc||m,u=new ka(c,m),m.data("__nicescroll",
135
+ u));l.push(u)});return l.length===1?l[0]:l};K.NiceScroll={getjQuery:function(){return n}};n.nicescroll||(n.nicescroll=new ba,n.nicescroll.options=ha)})(function(n){var B=function(){function v(f){return f==null?String(f):H[P.call(f)]||"object"}function y(f){return v(f)=="function"}function F(f){return f!=null&&f==f.window}function J(f){return v(f)=="object"}function x(f){return J(f)&&!F(f)&&Object.getPrototypeOf(f)==Object.prototype}function I(f){var p=!!f&&"length"in f&&f.length,D=t.type(f);return"function"!=
136
+ D&&!F(f)&&("array"==D||p===0||typeof p=="number"&&p>0&&p-1 in f)}function L(f){return l.call(f,function(p){return p!=null})}function N(f){return f.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function Q(f){return f in A?A[f]:A[f]=new RegExp("(^|\\s)"+f+"(\\s|$)")}function Z(f,p){return typeof p!="number"||z[N(f)]?p:p+"px"}function ca(f){return"children"in f?m.call(f.children):t.map(f.childNodes,function(p){if(p.nodeType==
137
+ 1)return p})}function aa(f,p){var D,R=f?f.length:0;for(D=0;D<R;D++)this[D]=f[D];this.length=R;this.selector=p||""}function ha(f,p,D){for(ba in p)D&&(x(p[ba])||U(p[ba]))?(x(p[ba])&&!x(f[ba])&&(f[ba]={}),U(p[ba])&&!U(f[ba])&&(f[ba]=[]),ha(f[ba],p[ba],D)):p[ba]!==fa&&(f[ba]=p[ba])}function ma(f,p){return p==null?t(f):t(f).filter(p)}function W(f,p,D,R){return y(p)?p.call(f,D,R):p}function ka(f,p){var D=f.className||"",R=D&&D.baseVal!==fa;if(p===fa)return R?D.baseVal:D;R?D.baseVal=p:f.className=p}function ia(f){try{return f?
138
+ f=="true"||(f=="false"?!1:f=="null"?null:+f+""==f?+f:/^[\[\{]/.test(f)?t.parseJSON(f):f):f}catch(p){return f}}function qa(f,p){p(f);for(var D=0,R=f.childNodes.length;D<R;D++)qa(f.childNodes[D],p)}var fa,ba,na,T=[],e=T.concat,l=T.filter,m=T.slice,c=n.document,u={},A={},z={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},b=/^\s*<(\w+|!)[^>]*>/,M=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Y=/^(?:body|html)$/i,
139
+ G=/([A-Z])/g,ja="val css html text data width height offset".split(" "),la=c.createElement("table"),d=c.createElement("tr"),h={tr:c.createElement("tbody"),tbody:la,thead:la,tfoot:la,td:d,th:d,"*":c.createElement("div")},q=/complete|loaded|interactive/,C=/^[\w-]*$/,H={},P=H.toString,O={},V=c.createElement("div"),S={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",
140
+ usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},U=Array.isArray||function(f){return f instanceof Array};O.matches=function(f,p){if(!p||!f||f.nodeType!==1)return!1;var D=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.matchesSelector;if(D)return D.call(f,p);var R=f.parentNode;(D=!R)&&(R=V).appendChild(f);p=~O.qsa(R,p).indexOf(f);D&&V.removeChild(f);return p};var g=function(f){return f.replace(/-+(.)?/g,function(p,D){return D?D.toUpperCase():
141
+ ""})};var r=function(f){return l.call(f,function(p,D){return f.indexOf(p)==D})};O.fragment=function(f,p,D){var R;M.test(f)&&(R=t(c.createElement(RegExp.$1)));if(!R){f.replace&&(f=f.replace(w,"<$1></$2>"));p===fa&&(p=b.test(f)&&RegExp.$1);p in h||(p="*");var ea=h[p];ea.innerHTML=""+f;R=t.each(m.call(ea.childNodes),function(){ea.removeChild(this)})}if(x(D)){var da=t(R);t.each(D,function(wa,ta){if(ja.indexOf(wa)>-1)da[wa](ta);else da.attr(wa,ta)})}return R};O.Z=function(f,p){return new aa(f,p)};O.isZ=
142
+ function(f){return f instanceof O.Z};O.init=function(f,p){if(f)if(typeof f=="string")if(f=f.trim(),f[0]=="<"&&b.test(f))p=O.fragment(f,RegExp.$1,p),f=null;else{if(p!==fa)return t(p).find(f);p=O.qsa(c,f)}else{if(y(f))return t(c).ready(f);if(O.isZ(f))return f;if(U(f))p=L(f);else if(J(f))p=[f],f=null;else if(b.test(f))p=O.fragment(f.trim(),RegExp.$1,p),f=null;else{if(p!==fa)return t(p).find(f);p=O.qsa(c,f)}}else return O.Z();return O.Z(p,f)};var t=function(f,p){return O.init(f,p)};t.extend=function(f){var p=
143
+ m.call(arguments,1);if(typeof f=="boolean"){var D=f;f=p.shift()}p.forEach(function(R){ha(f,R,D)});return f};O.qsa=function(f,p){var D,R=p[0]=="#",ea=!R&&p[0]==".",da=R||ea?p.slice(1):p,wa=C.test(da);return f.getElementById&&wa&&R?(D=f.getElementById(da))?[D]:[]:f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11?[]:m.call(wa&&!R&&f.getElementsByClassName?ea?f.getElementsByClassName(da):f.getElementsByTagName(p):f.querySelectorAll(p))};t.contains=c.documentElement.contains?function(f,p){return f!==p&&
144
+ f.contains(p)}:function(f,p){for(;p&&=p.parentNode;)if(p===f)return!0;return!1};t.type=v;t.isFunction=y;t.isWindow=F;t.isArray=U;t.isPlainObject=x;t.isEmptyObject=function(f){for(var p in f)return!1;return!0};t.isNumeric=function(f){var p=Number(f),D=typeof f;return f!=null&&D!="boolean"&&(D!="string"||f.length)&&!isNaN(p)&&isFinite(p)||!1};t.inArray=function(f,p,D){return T.indexOf.call(p,f,D)};t.camelCase=g;t.trim=function(f){return f==null?"":String.prototype.trim.call(f)};t.uuid=0;t.support={};
145
+ t.expr={};t.noop=function(){};t.map=function(f,p){var D=[],R;if(I(f))for(R=0;R<f.length;R++){var ea=p(f[R],R);ea!=null&&D.push(ea)}else for(R in f)ea=p(f[R],R),ea!=null&&D.push(ea);return D.length>0?t.fn.concat.apply([],D):D};t.each=function(f,p){var D;if(I(f))for(D=0;D<f.length&&p.call(f[D],D,f[D])!==!1;D++);else for(D in f)if(p.call(f[D],D,f[D])===!1)break;return f};t.grep=function(f,p){return l.call(f,p)};n.JSON&&(t.parseJSON=JSON.parse);t.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),
146
+ function(f,p){H["[object "+p+"]"]=p.toLowerCase()});t.data=function(f,p,D){if(D===fa)return typeof f[p]!=="undefined"?f[p]:fa;D===null?delete f[p]:f[p]=D};t.fn={jquery:"1.2.0",constructor:O.Z,length:0,forEach:T.forEach,reduce:T.reduce,push:T.push,sort:T.sort,splice:T.splice,indexOf:T.indexOf,concat:function(){var f,p=[];for(f=0;f<arguments.length;f++){var D=arguments[f];p[f]=O.isZ(D)?D.toArray():D}return e.apply(O.isZ(this)?this.toArray():this,p)},map:function(f){return t(t.map(this,function(p,D){return f.call(p,
147
+ D,p)}))},slice:function(){return t(m.apply(this,arguments))},ready:function(f){q.test(c.readyState)&&c.body?f(t):c.addEventListener("DOMContentLoaded",function(){f(t)},!1);return this},get:function(f){return f===fa?m.call(this):this[f>=0?f:f+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){this.parentNode!=null&&this.parentNode.removeChild(this)})},each:function(f){T.every.call(this,function(p,D){return f.call(p,
148
+ D,p)!==!1});return this},filter:function(f){return y(f)?this.not(this.not(f)):t(l.call(this,function(p){return O.matches(p,f)}))},add:function(f,p){return t(r(this.concat(t(f,p))))},is:function(f){return f===":visible"?this.length>0?this.css("display")!=="none":!1:J(f)?this[0]===f?!0:!1:this.length>0&&O.matches(this[0],f)},not:function(f){var p=[];if(y(f)&&f.call!==fa)this.each(function(R){f.call(this,R)||p.push(this)});else{var D=typeof f=="string"?this.filter(f):I(f)&&y(f.item)?m.call(f):t(f);this.forEach(function(R){D.indexOf(R)<
149
+ 0&&p.push(R)})}return t(p)},has:function(f){return this.filter(function(){return J(f)?t.contains(this,f):t(this).find(f).size()})},eq:function(f){return f===-1?this.slice(f):this.slice(f,+f+1)},first:function(){var f=this[0];return f&&!J(f)?f:t(f)},last:function(){var f=this[this.length-1];return f&&!J(f)?f:t(f)},find:function(f){var p=this;return f?typeof f=="object"?t(f).filter(function(){var D=this;return T.some.call(p,function(R){return t.contains(R,D)})}):this.length==1?t(O.qsa(this[0],f)):this.map(function(){return O.qsa(this,
150
+ f)}):t()},closest:function(f,p){var D=[],R=typeof f=="object"&&t(f);this.each(function(ea,da){for(;da&&!(R?R.indexOf(da)>=0:O.matches(da,f));)da=da!==p&&!(da!=null&&da.nodeType==da.DOCUMENT_NODE)&&da.parentNode;da&&D.indexOf(da)<0&&D.push(da)});return t(D)},parents:function(f){for(var p=[],D=this;D.length>0;)D=t.map(D,function(R){if((R=R.parentNode)&&(R==null||R.nodeType!=R.DOCUMENT_NODE)&&p.indexOf(R)<0)return p.push(R),R});return ma(p,f)},parent:function(f){return ma(r(this.pluck("parentNode")),
151
+ f)},children:function(f){return ma(this.map(function(){return ca(this)}),f)},contents:function(){return this.map(function(){return this.contentDocument||m.call(this.childNodes)})},siblings:function(f){return ma(this.map(function(p,D){return l.call(ca(D.parentNode),function(R){return R!==D})}),f)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(f){return t.map(this,function(p){return p[f]})},show:function(){return this.each(function(){this.style.display=="none"&&(this.style.display=
152
+ "");if(getComputedStyle(this,"").getPropertyValue("display")=="none"){var f=this.style,p=this.nodeName;if(!u[p]){var D=c.createElement(p);c.body.appendChild(D);var R=getComputedStyle(D,"").getPropertyValue("display");D.parentNode.removeChild(D);R=="none"&&(R="block");u[p]=R}f.display=u[p]}})},replaceWith:function(f){return this.before(f).remove()},wrap:function(f){var p=y(f);if(this[0]&&!p)var D=t(f).get(0),R=D.parentNode||this.length>1;return this.each(function(ea){t(this).wrapAll(p?f.call(this,
153
+ ea):R?D.cloneNode(!0):D)})},wrapAll:function(f){if(this[0]){t(this[0]).before(f=t(f));for(var p;(p=f.children()).length;)f=p.first();t(f).append(this)}return this},wrapInner:function(f){var p=y(f);return this.each(function(D){var R=t(this),ea=R.contents();D=p?f.call(this,D):f;ea.length?ea.wrapAll(D):R.append(D)})},unwrap:function(){this.parent().each(function(){t(this).replaceWith(t(this).children())});return this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display",
154
+ "none")},toggle:function(f){return this.each(function(){var p=t(this);(f===fa?p.css("display")=="none":f)?p.show():p.hide()})},prev:function(f){return t(this.pluck("previousElementSibling")).filter(f||"*")},next:function(f){return t(this.pluck("nextElementSibling")).filter(f||"*")},html:function(f){return 0 in arguments?this.each(function(p){var D=this.innerHTML;t(this).empty().append(W(this,f,p,D))}):0 in this?this[0].innerHTML:null},text:function(f){return 0 in arguments?this.each(function(p){p=
155
+ W(this,f,p,this.textContent);this.textContent=p==null?"":""+p}):0 in this?this.pluck("textContent").join(""):null},attr:function(f,p){var D;return typeof f!="string"||1 in arguments?this.each(function(R){if(this.nodeType===1)if(J(f))for(ba in f){var ea=ba;R=f[ba];R==null?this.removeAttribute(ea):this.setAttribute(ea,R)}else ea=f,R=W(this,p,R,this.getAttribute(f)),R==null?this.removeAttribute(ea):this.setAttribute(ea,R)}):0 in this&&this[0].nodeType==1&&(D=this[0].getAttribute(f))!=null?D:fa},removeAttr:function(f){return this.each(function(){this.nodeType===
156
+ 1&&f.split(" ").forEach(function(p){this.removeAttribute(p)},this)})},prop:function(f,p){f=S[f]||f;return 1 in arguments?this.each(function(D){this[f]=W(this,p,D,this[f])}):this[0]&&this[0][f]},removeProp:function(f){f=S[f]||f;return this.each(function(){delete this[f]})},data:function(f,p){if(typeof p==="object")this.length&&(this[0][f]=p);else{if(typeof p==="undefined"){if(this.length&&typeof this[0][f]!=="undefined")return this[0][f]}else this.length&&(typeof this[0][f]!=="undefined"&&delete this[0][f],
157
+ p&&(this[0][f]=p));var D="data-"+f.replace(G,"-$1").toLowerCase();D=1 in arguments?this.attr(D,p):this.attr(D);return D!==null?ia(D):fa}},val:function(f){return 0 in arguments?(f==null&&(f=""),this.each(function(p){this.value=W(this,f,p,this.value)})):this[0]&&(this[0].multiple?t(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(f){if(f)return this.each(function(D){var R=t(this);D=W(this,f,D,R.offset());var ea=R.offsetParent().offset();
158
+ D={top:D.top-ea.top,left:D.left-ea.left};R.css("position")=="static"&&(D.position="relative");R.css(D)});if(!this.length)return null;if(c.documentElement!==this[0]&&!t.contains(c.documentElement,this[0]))return{top:0,left:0};var p=this[0].getBoundingClientRect();return{left:p.left+n.pageXOffset,top:p.top+n.pageYOffset,width:Math.round(p.width),height:Math.round(p.height)}},css:function(f,p){if(arguments.length<2){var D=this[0];if(typeof f=="string")return D?D.style[g(f)]||getComputedStyle(D,"").getPropertyValue(f):
159
+ void 0;if(U(f)){if(!D)return;var R={},ea=getComputedStyle(D,"");t.each(f,function(wa,ta){R[ta]=D.style[g(ta)]||ea.getPropertyValue(ta)});return R}}var da="";if(v(f)=="string")p||p===0?da=N(f)+":"+Z(f,p):this.each(function(){this.style.removeProperty(N(f))});else for(ba in f)f[ba]||f[ba]===0?da+=N(ba)+":"+Z(ba,f[ba])+";":this.each(function(){this.style.removeProperty(N(ba))});return this.each(function(){this.style.cssText+=";"+da})},index:function(f){return f?this.indexOf(t(f)[0]):this.parent().children().indexOf(this[0])},
160
+ hasClass:function(f){return f?T.some.call(this,function(p){return this.test(ka(p))},Q(f)):!1},addClass:function(f){return f?this.each(function(p){if("className"in this){na=[];var D=ka(this);W(this,f,p,D).split(/\s+/g).forEach(function(R){t(this).hasClass(R)||na.push(R)},this);na.length&&ka(this,D+(D?" ":"")+na.join(" "))}}):this},removeClass:function(f){return this.each(function(p){if("className"in this){if(f===fa)return ka(this,"");na=ka(this);W(this,f,p,na).split(/\s+/g).forEach(function(D){na=
161
+ na.replace(Q(D)," ")});ka(this,na.trim())}})},toggleClass:function(f,p){return f?this.each(function(D){var R=t(this);W(this,f,D,ka(this)).split(/\s+/g).forEach(function(ea){(p===fa?!R.hasClass(ea):p)?R.addClass(ea):R.removeClass(ea)})}):this},scrollTop:function(f){if(this.length){var p="scrollTop"in this[0];return f===fa?p?this[0].scrollTop:this[0].pageYOffset:this.each(p?function(){this.scrollTop=f}:function(){this.scrollTo(this.scrollX,f)})}},scrollLeft:function(f){if(this.length){var p="scrollLeft"in
162
+ this[0];return f===fa?p?this[0].scrollLeft:this[0].pageXOffset:this.each(p?function(){this.scrollLeft=f}:function(){this.scrollTo(f,this.scrollY)})}},position:function(){if(this.length){var f=this[0],p=this.offsetParent(),D=this.offset(),R=Y.test(p[0].nodeName)?{top:0,left:0}:p.offset();D.top-=parseFloat(t(f).css("margin-top"))||0;D.left-=parseFloat(t(f).css("margin-left"))||0;R.top+=parseFloat(t(p[0]).css("border-top-width"))||0;R.left+=parseFloat(t(p[0]).css("border-left-width"))||0;return{top:D.top-
163
+ R.top,left:D.left-R.left}}},offsetParent:function(){return this.map(function(){for(var f=this.offsetParent||c.body;f&&!Y.test(f.nodeName)&&t(f).css("position")=="static";)f=f.offsetParent;return f})}};t.fn.detach=t.fn.remove;["width","height"].forEach(function(f){var p=f.replace(/./,function(D){return D[0].toUpperCase()});t.fn[f]=function(D){var R,ea=this[0];return D===fa?F(ea)?ea["inner"+p]:ea!=null&&ea.nodeType==ea.DOCUMENT_NODE?ea.documentElement["scroll"+p]:(R=this.offset())&&R[f]:this.each(function(da){ea=
164
+ t(this);ea.css(f,W(this,D,da,ea[f]()))})}});t.fn.innerWidth=function(){return this.width()};t.fn.innerHeight=function(){return this.height()};["after","prepend","before","append"].forEach(function(f,p){var D=p%2;t.fn[f]=function(){var R,ea=t.map(arguments,function(ta){var ua=[];R=v(ta);return R=="array"?(ta.forEach(function(Aa){if(Aa.nodeType!==fa)return ua.push(Aa);if(t.zepto.isZ(Aa))return ua=ua.concat(Aa.get());ua=ua.concat(O.fragment(Aa))}),ua):R=="object"||ta==null?ta:O.fragment(ta)}),da,wa=
165
+ this.length>1;return ea.length<1?this:this.each(function(ta,ua){da=D?ua:ua.parentNode;ua=p==0?ua.nextSibling:p==1?ua.firstChild:p==2?ua:null;var Aa=t.contains(c.documentElement,da);ea.forEach(function(ya){if(wa)ya=ya.cloneNode(!0);else if(!da)return t(ya).remove();da.insertBefore(ya,ua);Aa&&qa(ya,function(za){if(!(za.nodeName==null||za.nodeName.toUpperCase()!=="SCRIPT"||za.type&&za.type!=="text/javascript"||za.src)){var E=za.ownerDocument?za.ownerDocument.defaultView:n;E.eval.call(E,za.innerHTML)}})})})};
166
+ t.fn[D?f+"To":"insert"+(p?"Before":"After")]=function(R){t(R)[f](this);return this}});O.Z.prototype=aa.prototype=t.fn;O.uniq=r;O.deserializeValue=ia;t.zepto=O;return t}();n.mQuery=B;n.$$===void 0&&(n.$$=B);(function(v){function y(l){return l._zid||(l._zid=Z++)}function F(l,m,c,u){m=J(m);if(m.ns)var A=new RegExp("(?:^| )"+m.ns.replace(" "," .* ?")+"(?: |$)");return(W[y(l)]||[]).filter(function(z){return z&&(!m.e||z.e==m.e)&&(!m.ns||A.test(z.ns))&&(!c||y(z.fn)===y(c))&&(!u||z.sel==u)})}function J(l){l=
167
+ (""+l).split(".");return{e:l[0],ns:l.slice(1).sort().join(" ")}}function x(l){return fa[l]||ia&&qa[l]||l}function I(l,m,c,u,A,z,b){var M=y(l),w=W[M]||(W[M]=[]);m.split(/\s/).forEach(function(Y){if(Y=="ready")return v(document).ready(c);var G=J(Y);G.fn=c;G.sel=A;G.e in fa&&(c=function(la){var d=la.relatedTarget;if(!d||d!==this&&!v.contains(this,d))return G.fn.apply(this,arguments)});var ja=(G.del=z)||c;G.proxy=function(la){la=N(la);if(!la.isImmediatePropagationStopped()){la.data=u;var d=ja.apply(l,
168
+ la._args==ca?[la]:[la].concat(la._args));d===!1&&(la.preventDefault(),la.stopPropagation());return d}};G.i=w.length;w.push(G);"addEventListener"in l&&l.addEventListener(x(G.e),G.proxy,G.del&&!ia&&G.e in qa||!!b)})}function L(l,m,c,u,A){var z=y(l);(m||"").split(/\s/).forEach(function(b){F(l,b,c,u).forEach(function(M){delete W[z][M.i];"removeEventListener"in l&&l.removeEventListener(x(M.e),M.proxy,M.del&&!ia&&M.e in qa||!!A)})})}function N(l,m){if(m||!l.isDefaultPrevented)if(m||=l,v.each(e,function(c,
169
+ u){var A=m[c];l[c]=function(){this[u]=ba;return A&&A.apply(m,arguments)};l[u]=na}),l.timeStamp||(l.timeStamp=Date.now()),m.defaultPrevented!==ca?m.defaultPrevented:"returnValue"in m?m.returnValue===!1:m.getPreventDefault&&m.getPreventDefault())l.isDefaultPrevented=ba;return l}function Q(l){var m,c={originalEvent:l};for(m in l)T.test(m)||l[m]===ca||(c[m]=l[m]);return N(c,l)}var Z=1,ca,aa=Array.prototype.slice,ha=v.isFunction,ma=function(l){return typeof l=="string"},W={},ka={},ia="onfocusin"in n,qa=
170
+ {focus:"focusin",blur:"focusout"},fa={mouseenter:"mouseover",mouseleave:"mouseout"};ka.click=ka.mousedown=ka.mouseup=ka.mousemove="MouseEvents";v.event={add:I,remove:L};v.proxy=function(l,m){var c=2 in arguments&&aa.call(arguments,2);if(ha(l)){var u=function(){return l.apply(m,c?c.concat(aa.call(arguments)):arguments)};u._zid=y(l);return u}if(ma(m))return c?(c.unshift(l[m],l),v.proxy.apply(null,c)):v.proxy(l[m],l);throw new TypeError("expected function");};v.fn.bind=function(l,m,c){return this.on(l,
171
+ m,c)};v.fn.unbind=function(l,m){return this.off(l,m)};v.fn.one=function(l,m,c,u){return this.on(l,m,c,u,1)};var ba=function(){return!0},na=function(){return!1},T=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,e={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};v.fn.delegate=function(l,m,c){return this.on(m,l,c)};v.fn.undelegate=function(l,m,c){return this.off(m,l,c)};v.fn.live=function(l,m){v(document.body).delegate(this.selector,
172
+ l,m);return this};v.fn.die=function(l,m){v(document.body).undelegate(this.selector,l,m);return this};v.fn.on=function(l,m,c,u,A){var z,b,M=this;if(l&&!ma(l))return v.each(l,function(w,Y){M.on(w,m,c,Y,A)}),M;ma(m)||ha(u)||u===!1||(u=c,c=m,m=ca);if(u===ca||c===!1)u=c,c=ca;u===!1&&(u=na);return M.each(function(w,Y){A&&(z=function(G){L(Y,G.type,u);return u.apply(this,arguments)});m&&(b=function(G){var ja=v(G.target).closest(m,Y).get(0);if(ja&&ja!==Y){var la=v.extend(Q(G),{currentTarget:ja,liveFired:Y});
173
+ return(z||u).apply(ja,[la].concat(aa.call(arguments,1)))}});I(Y,l,u,c,m,b||z)})};v.fn.off=function(l,m,c){var u=this;if(l&&!ma(l))return v.each(l,function(A,z){u.off(A,m,z)}),u;ma(m)||ha(c)||c===!1||(c=m,m=ca);c===!1&&(c=na);return u.each(function(){L(this,l,c,m)})};v.fn.trigger=function(l,m){l=ma(l)||v.isPlainObject(l)?v.Event(l):N(l);l._args=m;return this.each(function(){if(l.type in qa&&typeof this[l.type]=="function")this[l.type]();else"dispatchEvent"in this?this.dispatchEvent(l):v(this).triggerHandler(l,
174
+ m)})};v.fn.triggerHandler=function(l,m){var c,u;this.each(function(A,z){c=Q(ma(l)?v.Event(l):l);c._args=m;c.target=z;v.each(F(z,l.type||l),function(b,M){u=M.proxy(c);if(c.isImmediatePropagationStopped())return!1})});return u};"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(l){v.fn[l]=function(m){return 0 in arguments?this.bind(l,m):this.trigger(l)}});
175
+ v.Event=function(l,m){ma(l)||(m=l,l=m.type);var c=document.createEvent(ka[l]||"Events"),u=!0;if(m)for(var A in m)A=="bubbles"?u=!!m[A]:c[A]=m[A];c.initEvent(l,u,!0);return N(c)}})(B);(function(v){["width","height"].forEach(function(y){var F=y.replace(/./,function(J){return J[0].toUpperCase()});v.fn["outer"+F]=function(J){var x=this;if(x){var I=x[y]();({width:["left","right"],height:["top","bottom"]})[y].forEach(function(L){J&&(I+=parseInt(x.css("margin-"+L),10))});return I}return null}})})(B);(function(v){function y(l,
176
+ m,c,u){if(l.global)return l=m||W,c=v.Event(c),v(l).trigger(c,u),!c.isDefaultPrevented()}function F(l){l.global&&v.active++===0&&y(l,null,"ajaxStart")}function J(l,m){var c=m.context;if(m.beforeSend.call(c,l,m)===!1||y(m,c,"ajaxBeforeSend",[l,m])===!1)return!1;y(m,c,"ajaxSend",[l,m])}function x(l,m,c,u){var A=c.context;c.success.call(A,l,"success",m);u&&u.resolveWith(A,[l,"success",m]);y(c,A,"ajaxSuccess",[m,c,l]);L("success",m,c)}function I(l,m,c,u,A){var z=u.context;u.error.call(z,c,m,l);A&&A.rejectWith(z,
177
+ [c,m,l]);y(u,z,"ajaxError",[c,u,l||m]);L(m,c,u)}function L(l,m,c){var u=c.context;c.complete.call(u,m,l);y(c,u,"ajaxComplete",[m,c]);c.global&&!--v.active&&y(c,null,"ajaxStop")}function N(){}function Q(l){l&&=l.split(";",2)[0];return l&&(l=="text/html"?"html":l=="application/json"?"json":fa.test(l)?"script":ba.test(l)&&"xml")||"text"}function Z(l,m){return m==""?l:(l+"&"+m).replace(/[&?]{1,2}/,"?")}function ca(l){l.processData&&l.data&&v.type(l.data)!="string"&&(l.data=v.param(l.data,l.traditional));
178
+ !l.data||l.type&&l.type.toUpperCase()!="GET"&&"jsonp"!=l.dataType||(l.url=Z(l.url,l.data),l.data=void 0)}function aa(l,m,c,u){v.isFunction(m)&&(u=c,c=m,m=void 0);v.isFunction(c)||(u=c,c=void 0);return{url:l,data:m,success:c,dataType:u}}function ha(l,m,c,u){var A,z=v.isArray(m),b=v.isPlainObject(m);v.each(m,function(M,w){A=v.type(w);u&&(M=c?u:u+"["+(b||A=="object"||A=="array"?M:"")+"]");!u&&z?l.add(w.name,w.value):A=="array"||!c&&A=="object"?ha(l,w,c,M):l.add(M,w)})}var ma=+new Date,W=n.document,ka,
179
+ ia,qa=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,fa=/^(?:text|application)\/javascript/i,ba=/^(?:text|application)\/xml/i,na=/^\s*$/,T=W.createElement("a");T.href=n.location.href;v.active=0;v.ajaxJSONP=function(l,m){if(!("type"in l))return v.ajax(l);var c=l.jsonpCallback,u=(v.isFunction(c)?c():c)||"Zepto"+ma++,A=W.createElement("script"),z=n[u],b,M=function(G){v(A).triggerHandler("error",G||"abort")},w={abort:M},Y;m&&m.promise(w);v(A).on("load error",function(G,ja){clearTimeout(Y);v(A).off().remove();
180
+ G.type!="error"&&b?x(b[0],w,l,m):I(null,ja||"error",w,l,m);n[u]=z;b&&v.isFunction(z)&&z(b[0]);z=b=void 0});if(J(w,l)===!1)return M("abort"),w;n[u]=function(){b=arguments};A.src=l.url.replace(/\?(.+)=\?/,"?$1="+u);W.head.appendChild(A);l.timeout>0&&(Y=setTimeout(function(){M("timeout")},l.timeout));return w};v.ajaxSettings={type:"GET",beforeSend:N,success:N,error:N,complete:N,context:null,global:!0,xhr:function(){return new n.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",
181
+ json:"application/json",xml:"application/xml, text/xml",html:"text/html",text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:N};v.ajax=function(l){var m=v.extend({},l||{}),c=v.Deferred&&v.Deferred();for(ka in v.ajaxSettings)m[ka]===void 0&&(m[ka]=v.ajaxSettings[ka]);F(m);if(!m.crossDomain){var u=W.createElement("a");u.href=m.url;u.href=u.href;m.crossDomain=T.protocol+"//"+T.host!==u.protocol+"//"+u.host}m.url||(m.url=n.location.toString());(u=m.url.indexOf("#"))>-1&&(m.url=
182
+ m.url.slice(0,u));ca(m);var A=m.dataType;(u=/\?.+=\?/.test(m.url))&&(A="jsonp");m.cache!==!1&&(l&&l.cache===!0||"script"!=A&&"jsonp"!=A)||(m.url=Z(m.url,"_="+Date.now()));if("jsonp"==A)return u||(m.url=Z(m.url,m.jsonp?m.jsonp+"=?":m.jsonp===!1?"":"callback=?")),v.ajaxJSONP(m,c);l=m.accepts[A];var z={};u=function(G,ja){z[G.toLowerCase()]=[G,ja]};var b=/^([\w-]+:)\/\//.test(m.url)?RegExp.$1:n.location.protocol,M=m.xhr(),w=M.setRequestHeader,Y;c&&c.promise(M);m.crossDomain||u("X-Requested-With","XMLHttpRequest");
183
+ u("Accept",l||"*/*");if(l=m.mimeType||l)l.indexOf(",")>-1&&(l=l.split(",",2)[0]),M.overrideMimeType&&M.overrideMimeType(l);(m.contentType||m.contentType!==!1&&m.data&&m.type.toUpperCase()!="GET")&&u("Content-Type",m.contentType||"application/x-www-form-urlencoded");if(m.headers)for(ia in m.headers)u(ia,m.headers[ia]);M.setRequestHeader=u;M.onreadystatechange=function(){if(M.readyState==4){M.onreadystatechange=N;clearTimeout(Y);var G=!1;if(M.status>=200&&M.status<300||M.status==304||M.status==0&&b==
184
+ "file:"){A=A||Q(m.mimeType||M.getResponseHeader("content-type"));if(M.responseType=="arraybuffer"||M.responseType=="blob")var ja=M.response;else{ja=M.responseText;try{ja=m.dataFilter==N?ja:m.dataFilter.call(m.context,ja,A),A=="script"?(0,eval)(ja):A=="xml"?ja=M.responseXML:A=="json"&&(ja=na.test(ja)?null:v.parseJSON(ja))}catch(la){G=la}if(G)return I(G,"parsererror",M,m,c)}x(ja,M,m,c)}else I(M.statusText||null,M.status?"error":"abort",M,m,c)}};if(J(M,m)===!1)return M.abort(),I(null,"abort",M,m,c),
185
+ M;M.open(m.type,m.url,"async"in m?m.async:!0,m.username,m.password);if(m.xhrFields)for(ia in m.xhrFields)M[ia]=m.xhrFields[ia];for(ia in z)w.apply(M,z[ia]);m.timeout>0&&(Y=setTimeout(function(){M.onreadystatechange=N;M.abort();I(null,"timeout",M,m,c)},m.timeout));M.send(m.data?m.data:null);return M};v.get=function(){return v.ajax(aa.apply(null,arguments))};v.post=function(){var l=aa.apply(null,arguments);l.type="POST";return v.ajax(l)};v.getJSON=function(){var l=aa.apply(null,arguments);l.dataType=
186
+ "json";return v.ajax(l)};v.fn.load=function(l,m,c){if(!this.length)return this;var u=this,A=l.split(/\s/);l=aa(l,m,c);var z=l.success;if(A.length>1){l.url=A[0];var b=A[1]}l.success=function(M){u.html(b?v("<div>").html(M.replace(qa,"")).find(b):M);z&&z.apply(u,arguments)};v.ajax(l);return this};var e=encodeURIComponent;v.param=function(l,m){var c=[];c.add=function(u,A){v.isFunction(A)&&(A=A());A==null&&(A="");this.push(e(u)+"="+e(A))};ha(c,l,m);return c.join("&").replace(/%20/g,"+")}})(B);(function(v){v.fn.serializeArray=
187
+ function(){var y,F,J=[],x=function(I){if(I.forEach)return I.forEach(x);J.push({name:y,value:I})};this[0]&&v.each(this[0].elements,function(I,L){F=L.type;(y=L.name)&&L.nodeName.toLowerCase()!="fieldset"&&!L.disabled&&F!="submit"&&F!="reset"&&F!="button"&&F!="file"&&(F!="radio"&&F!="checkbox"||L.checked)&&x(v(L).val())});return J};v.fn.serialize=function(){var y=[];this.serializeArray().forEach(function(F){y.push(encodeURIComponent(F.name)+"="+encodeURIComponent(F.value))});return y.join("&")};v.fn.submit=
188
+ function(y){if(0 in arguments)this.bind("submit",y);else if(this.length){var F=v.Event("submit");this.eq(0).trigger(F);F.isDefaultPrevented()||this.get(0).submit()}return this}})(B);(function(v,y){function F(fa){return x?x+fa:fa.toLowerCase()}var J="",x,I={Webkit:"webkit",Moz:"",O:"o"},L=document.createElement("div"),N=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,Q,Z,ca,aa,ha,ma,W,ka,ia={};L.style.transform===y&&v.each(I,function(fa,ba){if(L.style[fa+"TransitionProperty"]!==
189
+ y)return J="-"+fa.toLowerCase()+"-",x=ba,!1});var qa=J+"transform";ia[Q=J+"transition-property"]=ia[Z=J+"transition-duration"]=ia[aa=J+"transition-delay"]=ia[ca=J+"transition-timing-function"]=ia[ha=J+"animation-name"]=ia[ma=J+"animation-duration"]=ia[ka=J+"animation-delay"]=ia[W=J+"animation-timing-function"]="";v.fx={off:x===y&&L.style.transitionProperty===y,speeds:{_default:400,fast:200,slow:600},cssPrefix:J,transitionEnd:F("TransitionEnd"),animationEnd:F("AnimationEnd")};v.fn.animate=function(fa,
190
+ ba,na,T,e){v.isFunction(ba)&&(T=ba,ba=na=y);v.isFunction(na)&&(T=na,na=y);v.isPlainObject(ba)&&(na=ba.easing,T=ba.complete,e=ba.delay,ba=ba.duration);ba&&=(typeof ba=="number"?ba:v.fx.speeds[ba]||v.fx.speeds._default)/1E3;e&&=parseFloat(e)/1E3;return this.anim(fa,ba,na,T,e)};v.fn.anim=function(fa,ba,na,T,e){var l,m={},c="",u=this,A=v.fx.transitionEnd,z=!1;ba===y&&(ba=v.fx.speeds._default/1E3);e===y&&(e=0);v.fx.off&&(ba=0);if(typeof fa=="string")m[ha]=fa,m[ma]=ba+"s",m[ka]=e+"s",m[W]=na||"linear",
191
+ A=v.fx.animationEnd;else{var b=[];for(l in fa)N.test(l)?c+=l+"("+fa[l]+") ":(m[l]=fa[l],b.push(l.replace(/([A-Z])/g,"-$1").toLowerCase()));c&&(m[qa]=c,b.push(qa));ba>0&&typeof fa==="object"&&(m[Q]=b.join(", "),m[Z]=ba+"s",m[aa]=e+"s",m[ca]=na||"linear")}var M=function(w){if(typeof w!=="undefined"){if(w.target!==w.currentTarget)return;v(w.target).unbind(A,M)}else v(this).unbind(A,M);z=!0;v(this).css(ia);T&&T.call(this)};ba>0&&(this.bind(A,M),setTimeout(function(){z||M.call(u)},(ba+e)*1E3+25));this.size()&&
192
+ this.get(0).clientLeft;this.css(m);ba<=0&&setTimeout(function(){u.each(function(){M.call(this)})},0);return this};v.fn.stop=function(fa,ba){return this};L=null})(B);(function(){try{getComputedStyle(void 0)}catch(y){var v=getComputedStyle;n.getComputedStyle=function(F,J){try{return v(F,J)}catch(x){return null}}}})();return B}(K));var Da=function(){if(document.currentScript)var n=document.currentScript.src;else{n=document.scripts;for(var B=n.length-1,v,y=B;y>0;y--)if(n[y].readyState==="interactive"){v=
193
+ n[y].src;break}n=v||n[B].src}B=n.indexOf("v=");B=B>0?n.substr(B+2):2023;n=n.substring(0,n.lastIndexOf("/")+1);n.endsWith("zwplayer/")||(n+="js/");return{path:n,v:B}}(),Ia=Da.path+"plugins/",Ja=function(n,B,v){var y=document.getElementsByTagName("head");if(y.length==0){y=document.createElement("head");var F=document.getElementsByTagName("body");if(F.length>0)F=F[0],document.insertBefore(y,F);else return alert("Invalid html document: no HEAD tag"),!1}else{y=y[0];F=y.childNodes;for(var J=0;J<F.length;J++){var x=
194
+ F[J];if(x.nodeName.toUpperCase()==="SCRIPT"&&x.id&&x.id==n){if(x.getAttribute("loadstate")!="true"){var I=function(){x.getAttribute("loadstate")!="true"?setTimeout(I,50):typeof v=="function"&&v(n)};setTimeout(I,50);return!1}typeof v=="function"&&v(n);return!0}}}var L=document.createElement("script");L.type="text/javascript";L.readyState?L.onreadystatechange=function(){if(L.readyState=="loaded"||L.readyState=="complete")L.onreadystatechange=null,L.setAttribute("loadstate","true"),typeof v=="function"&&
195
+ v(n)}:L.onload=function(){L.setAttribute("loadstate","true");typeof v=="function"&&v(n)};L.id=n;L.src=B;y.appendChild(L);return!1};(function(n,B,v){var y=document.getElementsByTagName("head");if(y.length==0){y=document.createElement("head");var F=document.getElementsByTagName("body");if(F.length>0)F=F[0],document.insertBefore(y,F);else return alert("Invalid html document: no HEAD tag found"),!1}else{y=y[0];F=y.childNodes;for(var J=0;J<F.length;J++){var x=F[J];if(x.nodeName.toUpperCase()==="link"&&
196
+ x.id&&x.id==n){if(x.getAttribute("loadstate")!=="true"){var I=function(){x.getAttribute("loadstate")!=="true"?setTimeout(I,50):typeof v==="function"&&v(n)};setTimeout(I,50);return!1}typeof v==="function"&&v(n);return!0}}}var L=document.createElement("link");L.type="text/css";L.setAttribute("rel","stylesheet");L.readyState?L.onreadystatechange=function(){if(L.readyState=="loaded"||L.readyState=="complete")L.onreadystatechange=null,L.setAttribute("loadstate","true"),typeof v=="function"&&v(n)}:L.onload=
197
+ function(){L.setAttribute("loadstate","true");typeof v=="function"&&v(n)};L.id=n;L.href=B;y.appendChild(L);return!1})("zwplayer-css",Da.path+"css/zwplayer.css?v="+Da.v,function(n){console.log("zwplayer.css["+n+"] is loaded")});var Ua=function(n){return typeof HTMLElement==="object"?n instanceof HTMLElement:!(!n||typeof n!=="object"||n.nodeType!==1&&n.nodeType!==9||typeof n.nodeName!=="string")};Array.isArray||(Array.isArray=function(n){return Object.prototype.toString.call(n)==="[object Array]"});
198
+ var Va=/iPhone|iPad|iPod/.test(navigator.userAgent);(function(n){n+="=";for(var B=document.cookie.split(";"),v=0;v<B.length;v++){var y=B[v].trim();if(y.indexOf(n)==0)return y.substring(n.length,y.length)}return""})("ZWPlayer")||bb("ZWPlayer","V1.0",365);var ib=function(n){for(var B=navigator.languages&&navigator.languages.length?navigator.languages:[navigator.language],v=0;v<n.length;v++)for(var y=0;y<B.length;y++)if(n[v].lang&&B[y]&&B[y].indexOf(n[v].lang)>-1)return n[v].text;return n.length===1?
199
+ n[0].text:null};HUAYI={};HUAYI.Danmu=function(){var n={playerObj:null,opacity:70,onInit:null,onClose:null,onResize:null};return{create:function(B){var v={};for(k in n)v[k]=n[k];for(k in B)v[k]=B[k];typeof v.playerId=="undefined"&&(v.playerId="video-body");return new function(y){y=y.playerId;this.rows=[];this.timerId=this.rowCount=0;this.frameDuration=40;this.Danmulayer=null;this.danmuMargin=50;this.speedX=100;this.hasTransition=!0;this.rowHeight=28;this.topMargin=10;this.layerHeight=this.layerWidth=
200
+ 0;this.fontSize="25px";if(typeof y=="string")this.vPlayer=document.getElementById(y);else if(typeof y=="object")this.vPlayer=y;else return;this.vPlayer||(this.vPlayer=document.getElementById("video-body"));if(this.vPlayer&&(y=this.vPlayer.childNodes,y.length>0))for(var F=0;F<y.length;F++){var J=y[F];if(J.nodeName=="DIV"&&Qa(J.className,"danmuplayer")){this.wrapObj=J;break}}if(this.wrapObj){if(y=this.wrapObj.childNodes,y.length>0)for(F=0;F<y.length;F++)if(J=y[F],J.nodeName=="DIV"&&Qa(J.className,"danmu-layer")){this.Danmulayer=
201
+ J;break}}else this.wrapObj=document.createElement("div"),this.wrapObj.className="danmuplayer",this.vPlayer.appendChild(this.wrapObj),this.Danmulayer=document.createElement("div"),this.Danmulayer.className="danmu-layer",this.wrapObj.appendChild(this.Danmulayer),Ka.ie&&Ka.ver<9&&(this.wrapObj.style.height=this.vPlayer.offsetHeight-45+"px");if(this.Danmulayer){this.hasTransition=typeof this.Danmulayer.style.transition!="undefined";this.rowCount=Math.floor(Math.floor((this.Danmulayer.offsetHeight-this.topMargin)*
202
+ 2/3)/this.rowHeight);if(this.rowCount>0)for(F=0;F<this.rowCount;F++)this.rows.push({top:this.topMargin+this.rowHeight*F,count:0,last:null,idx:F});this.layerWidth=this.Danmulayer.offsetWidth;this.layerHeight=this.Danmulayer.offsetHeight;Ba.addElement(this.Danmulayer);this.Danmulayer.addEventListener("resize",function(x){this.reCalcLayout()}.bind(this))}this.start=function(x){this.timerId&&(clearInterval(this.timerId),this.timerId=0);if(!this.hasTransition){var I=this;this.timerId=setInterval(function(){var L=
203
+ I.Danmulayer,N=L.childNodes;if(N.length>0){for(var Q=[],Z=0;Z<N.length;Z++){var ca=N[Z];if(ca.tagName=="DIV"){var aa=parseFloat(ca.style.left);aa+ca.offsetWidth<0?Q.push(ca):ca.style.left=aa-4.5+"px"}}if(Q.length>0){for(Z=0;Z<Q.length;Z++)N=Q[Z],N.rowIdx&&(I.rows[N.rowIdx].last==this&&(I.rows[N.rowIdx].last=null),I.rows[N.rowIdx].count--),L.removeChild(Q[Z]);Q.splice(0,Q.length)}}},this.frameDuration)}};this.stop=function(){this.timerId&&(clearInterval(this.timerId),this.timerId=0);var x=this.Danmulayer.childNodes;
204
+ if(x.length>0)for(var I=0;I<x.length;I++)x[I].style.display="none";this.Danmulayer.style.display="none"};this.destroy=function(){this.Danmulayer&&(Ba.removeElement(this.Danmulayer),delete this.Danmulayer);this.timerId&&(clearInterval(this.timerId),this.timerId=0);this.wrapObj&&this.vPlayer&&this.vPlayer.removeChild(this.wrapObj)};this.addDanmu=function(x,I){I||={};var L=document.createElement("div");L.className="danmu";typeof x.color=="undefined"||I.isFilterColorFont||(L.style.color=x.color);typeof x.border!=
205
+ "undefined"&&(L.style.border="1px solid #666");L.style.fontSize=I.forcedFontSizeValue?parseInt(25*I.forcedFontSizeValue/100)+"px":"25px";this.fontSize!=L.style.fontSize&&(this.rowHeight=parseInt(L.style.fontSize)+3,this.layerHeight=0,this.reCalcLayout(),this.fontSize=L.style.fontSize);x.outlineColor&&(L.style.outlineStyle="solid",L.style.outlineWidth="2px",L.style.outlineColor=x.outlineColor);L.style.opacity=I.opacityValue?I.opacityValue/100:"0.9";L.innerHTML=typeof K.replaceSmileDanmu=="function"?
206
+ K.replaceSmileDanmu(x.text,this.rowHeight,I):x.text;var N=x=0,Q=999999;this.rowCount>this.rows.length&&(this.rowCount=this.rows.length);for(;x<this.rowCount;x++)if(this.rows[x].count==0){N=x;Q=this.layerWidth;break}else if(this.rows[x].last){var Z=this.rows[x].last;Z=Z.getBoundingClientRect().left+Z.offsetWidth+this.danmuMargin;if(Z<Q&&(N=x,Q=Z,Q<this.layerWidth))break}Q<this.layerWidth&&(Q=this.layerWidth);L.style.fontFamily='SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif';L.style.textShadow=
207
+ "rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px";L.style.cursor="pointer";L.style.left=Q+"px";L.style.top=this.rows[N].top+"px";L.rowIdx=N;this.rows[N].last=L;this.rows[N].count++;this.Danmulayer.appendChild(L);var ca=this;L.onmouseover=function(aa){this.pause||(this.pause=!0)};L.onmouseout=function(aa){this.pause&&(this.pause=!1)};this.hasTransition&&(L.addEventListener("transitionend",function(){typeof this.rowIdx=="number"&&(ca.rows[this.rowIdx].last==
208
+ this&&(ca.rows[this.rowIdx].last=null),ca.rows[this.rowIdx].count--);ca.Danmulayer.removeChild(this)}),x=Q+L.offsetWidth,I.speedValue?(I=parseInt(this.speedX*parseFloat(I.speedValue)),I==0&&(I=1),I=x/I+4*Math.random()):I=x/this.speedX+4*Math.random(),L.style.transition="transform "+I+"s linear",L.style.transform="translateX(-"+x+"px)")};this.reCalcLayout=function(){if(this.Danmulayer){Ka.ie&&Ka.ver<9&&(this.wrapObj.style.height=this.vPlayer.offsetHeight-45+"px");var x=this.Danmulayer.offsetHeight;
209
+ if(x!=this.layerHeight){this.rowCount=Math.floor(Math.floor((x-this.topMargin)*2/3)/this.rowHeight);if(this.rowCount>0)if(this.rowCount>this.rows.length)for(var I=this.rows.length;I<this.rowCount;I++)this.rows.push({top:this.topMargin+this.rowHeight*I,count:0,last:null,idx:I});else for(I=0;I<this.rowCount;I++)this.rows[I].top=this.topMargin+this.rowHeight*I;this.layerHeight=x}if(this.Danmulayer.offsetWidth!=this.layerWidth){x=this.Danmulayer.childNodes;if(x.length>0)for(I=0;I<x.length;I++);this.layerWidth=
210
+ this.Danmulayer.offsetWidth}}};this.hasTransition||this.start()}(v)}}}();var Ba={_onResize:function(n){var B=n.target||n.srcElement;if(B=B.__resizeTrigger__?B.__resizeTrigger__:B){var v=B.__z_resizeListeners;if(v)for(var y=v.length,F=0;F<y;F++){var J=v[F],x=J.handler;(J=J.context)||(J=B);if(x)x.apply(J,[n]);else if(n.type==="resize"||Object.prototype.toString.call(n)==="[object ResizeObserverEntry]")x=document.createEvent("Event"),x.initEvent("resize",!1,!1),B.dispatchEvent(x)}}},addElement:function(n,
211
+ B,v){var y=n.__z_resizeListeners;if(!y)if(y=[],n.__z_resizeListeners=y,typeof K.ResizeObserver==="function")this.resizeObserver||(this.resizeObserver=new ResizeObserver(function(J){for(var x=0;x<J.length;x++)this._onResize(J[x])}.bind(this))),this.resizeObserver.observe(n);else{getComputedStyle(n,null).position==="static"&&(n.style.position="relative");var F=document.createElement("object");F.resizer=this;F.__resizeElement__=n;F.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; opacity: 0; pointer-events: none; z-index: -9999;");
212
+ F.type="text/html";F.data="about:blank";F.onload=function(J){this.contentDocument.defaultView.__resizeTrigger__=this.__resizeElement__;this.contentDocument.defaultView.addEventListener("resize",this.resizer._onResize)};n.appendChild(F);n.__resizeDetector__=F}y.push({handler:B,context:v})},removeElement:function(n,B,v){var y=n.__z_resizeListeners;if(y){for(var F=y.length,J=0;J<F;J++){var x=y[J];if(x.handler===B&&x.context===v){y.splice(J,1);break}}if(y.length===0){if(B=n.__resizeDetector__)B.contentDocument.defaultView.removeEventListener("resize",
213
+ this._onResize),n.removeChild(B),delete n.__resizeDetector__;delete n.__z_resizeListeners;this.resizeObserver&&this.resizeObserver.unobserve(n)}}}},Ka=function(){var n,B,v,y,F,J,x=navigator.userAgent.toLowerCase(),I;(I=x.match(/chrome\/([\d.]+)/),I)?n=I[1]:(I=x.match(/firefox\/([\d.]+)/),I)?B=I[1]:(I=x.match(/edge\/([\d.]+)/),I)?v=I[1]:(I=x.match(/rv:([\d.]+)\) like gecko/),I)?y=I[1]:(I=x.match(/msie ([\d.]+)/),I)?y=I[1]:(I=x.match(/opera.([\d.]+)/),I)?F=I[1]:(I=x.match(/version\/([\d.]+).*safari/),
214
+ I)?J=I[1]:J=!1;return n?{broswer:"Chrome",version:n,chrome:!0,ver:parseInt(n)}:B?{broswer:"Firefox",version:B,firefox:!0,ver:parseInt(B)}:J?{broswer:"Safari",version:J,ver:parseInt(J)}:v?{broswer:"Edge",version:v,edge:!0,ver:parseInt(v)}:y?{broswer:"IE",version:y,ie:!0,ver:parseInt(y)}:F?{broswer:"Opera",version:F,opera:!0,ver:parseInt(F)}:{broswer:"",version:"0",ver:0}}(),Fa={about:"\u5173\u4e8e",current:"\u5f53\u524d","qs-auto":"\u81ea\u52a8\u5207\u6362",enterFullScreen:"\u8fdb\u5165\u5168\u5c4f",
215
215
  exitFullScreen:"\u9000\u51fa\u5168\u5c4f",subtitleOff:"\u5b57\u5e55\u5173\u95ed",FULL_HD1:"\u539f\u753b",allSubtitle:"\u5b57\u5e55\u603b\u5f00\u5173",closeSmallWindow:"\u5173\u95ed\u5c0f\u7a97\u53e3\u6a21\u5f0f",mainSubtitle:"\u9ed8\u8ba4\u5b57\u5e55",secondSubtitle:"\u7b2c\u4e8c\u5b57\u5e55",speed:"\u500d\u901f",muted:"\u9759\u97f3",unmuted:"\u53d6\u6d88\u9759\u97f3",level:"\u7ea7\u522b","media-prop":"\u5a92\u4f53\u6d41\u5c5e\u6027","player-help":"\u4f7f\u7528\u8bf4\u660e","version-update":"\u7248\u672c\u66f4\u65b0",
216
- HD1:"\u8d85\u6e05",SD1:"\u9ad8\u6e05",SD2:"\u6807\u6e05",HD:"\u9ad8\u6e05",FHD:"\u5168\u9ad8\u6e05",BD:"\u84dd\u5149","BD 4M":"\u84dd\u51494M","BD 8M":"\u84dd\u51498M"},Ha={},Wa={FULL_HD1:"RAW",HD1:"FHD",SD1:"HD",SD2:"SD"},Xa="en",jb={"zh-CN":Fa,zh:Fa,"zh-HK":Ha,"zh-TW":Ha,"en-US":Wa,en:Wa};Fa="en";L.navigator&&(Ha=(L.navigator.language||L.navigator.browserLanguage).toLowerCase(),-1!=Ha.indexOf("zh")?Fa="zh-CN":-1!=Ha.indexOf("zh-tw")&&(Fa="zh-Hant"));Xa=Fa;var qa=function(p,B){var u=jb[Xa]||B;return u?
217
- u[p]||B:B},kb=function(){for(var p='<div class="zwp-button zwp-speedButton"><button class="zwpbtn zwp-speedBtn" data-action="showSpeedMenu" data-name="speedbtn">'+qa("speed","Speed")+'</button><ul class="zwp-speedMenu">',B="2.0x 1.5x 1.25x 1.0x 0.75x 0.5x 0.25x".split(" "),u="",y=0;y<B.length;y++)u=3===y?u+('<li class="zwp-speed-item active">'+B[y]+"</li>"):u+('<li class="zwp-speed-item">'+B[y]+"</li>");return p+u+"</ul></div>"},Ya=function(){var p='<div class="zwp-option-item main"><label class="zwp-option-item-label">'+
218
- qa("allSubtitle","All subtitle")+'</label><div class="zwp-option-item-value">'+Ca("","subtitleOn")+"</div></div>";p+='<div class="zwp-option-item sub1" style="display: none;"><label class="zwp-option-item-label">'+qa("mainSubtitle","Main subtitle")+'</label><div class="zwp-option-item-value">'+Ca("","subtitleDefault")+"</div></div>";return p+='<div class="zwp-option-item sub2" style="display: none;"><label class="zwp-option-item-label">'+qa("secondSubtitle","Second subtitle")+'</label><div class="zwp-option-item-value">'+
219
- Ca("","subtitleSecond")+"</div></div>"},lb=function(p){var B='<li class="zwp-subtitles-item" data-id="-1">'+qa("subtitleOff","Captions off")+"</li>";for(var u=0;u<p.length;u++)B=0===u?B+('<li class="zwp-subtitles-item active" data-id="'+p[u].id+'">'+p[u].name+"</li>"):B+('<li class="zwp-subtitles-item" data-id="'+p[u].id+'">'+p[u].name+"</li>");return'<ul class="zwp-subtitlesMenu">'+B+"</ul>"},mb=function(){var p="",B=(new Date).getTime();p=p+'<div class="zwp-toolbox-ground-right zwp-dmform zwp_danmu-controlbar"> <div class="zwp_switch_group"> <div class="zwp_switch_text">\u5f39\u5e55</div> <div class="zwp_switch" id="danmuSwitch-'+
220
- (B+'"><i class="switch_inner"></i></div> </div> <div class="zwp_dmconfig zwp_dmicon" id="danmu-config-btn-')+(B+'" title="\u5f39\u5e55\u8bbe\u7f6e"><i class="xicon xicon-subtitles"></i></div> <div class="zwp-barrage_form" id="barrage_form-')+(B+'"> <div class="zwp-barrage_inp logined"> <input id="barrage_inp_text-')+(B+'" type="text" class="barrage_inp_text" maxlength="40" disabled="disabled" readonly="readonly"> <div class="barrage_login" href="#login"><span class="barrage_text">\u767b\u5f55</span>\u540e\u53ef\u4ee5\u53c2\u4e0e\u5f39\u5e55</div> </div>');
221
- p+=' <a class="btn_bubble disabled" href="javascript:void(0);" title="\u9009\u62e9\u8868\u60c5" data-viewid="smilesFaces-view-'+B+'"><i class="xicon xicon-smile"></i></a> <button type="submit" class="btn_submit vtb_disabled" title="\u767b\u5f55\u540e\u624d\u53ef\u4ee5\u53d1\u9001\u5f39\u5e55\u54e6" disabled="disabled">\u53d1\u9001</button> </div>';p+=' <div class="zwp-barrage-set hidden" data-barrage-panel="panel" data-render="0"></div>';return p+="</div>"},La=function(p){if("number"===typeof p)return p;
222
- p=p.split(":");return 2===p.length?60*parseInt(p[0])+parseInt(p[1]):3===p.length?3600*parseInt(p[0])+60*parseInt(p[1])+parseInt(p[2]):1===p.length?parseFloat(p[0]):3<p.length?9.999999999999999E8:0},nb=function y(B,u){var F=(y.canvas||(y.canvas=document.createElement("canvas"))).getContext("2d");F.font=u;return F.measureText(B).width},ob=function(B,u){var y="";if(!u||!Array.isArray(u))return"";for(var F=0;F<u.length;F++){var J=u[F],w=La(J.time);if(!(w>=B)){var H=100*w/B+"%",K=J.title||J.text||J.time+
223
- "";if("undefined"!==typeof J.duration){var N="red";J.style&&"undefined"!==typeof J.style.background&&(N=J.style.background);var P=La(J.duration);w+P>B&&(P=B-w);y+='<span class="zwp__chapter_dot zwp_bar" style="left: '+H+"; width: "+(100*P/B+"%; border-radius: 3px; background-color: ")+N+';" title="'+K+'" data-time="'+J.time+'" data-desc="'+J.desc+'">&nbsp;</span>'}else y+='<span class="zwp__chapter_dot" style="left: '+H+'" title="'+K+'" data-time="'+J.time+'" data-desc="'+J.desc+'">&nbsp;</span>'}}return y},
224
- Za=function(B){return B.replace(/[<>&"]/g,function(u){return{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;"}[u]})},pb=function(B){if(!B||!Array.isArray(B)||0===B.length)return null;var u='<div class="zwp-button zwp-chapterButton"><button class="zwpbtn zwp-chapterBtn" data-action="showChapterListview" data-name="chapterbtn"><i class="xicon xicon-chapter"></i> \u7ae0\u8282</button><div class="zwp-chapterPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">\u7ae0\u8282\u5217\u8868</div><div class="zwp-list-inner"><ul class="zwp-chapterlist">';
225
- for(var y=0,F=0;F<B.length;F++){var J=B[F],w=J.title||J.text||J.time+"";w=Za(w);a:{var H=J.time;if("string"===typeof H){if(0<=H.indexOf(":")){var K=H;break a}H=parseInt(H)}K=parseInt(H/3600);var N=parseInt(H%3600/60);H=parseInt(H%60);var P="";0<K&&(P+=K+":");0<=N?(10<N||0<K&&(P+="0"),P+=N+":"):P+="0:";K=P=10<=H?P+H:P+("0"+H)}N='<li class="chapter-item" data-time="'+J.time+'">';N+='<div class="item-title"><span class="item-time">'+K+"</span>";N+='<span class="title" title="'+w+'">'+w+"</span></div>";
226
- J.desc&&(N+='<div class="item-content"><span class="desc">'+Za(J.desc)+"</span></div>");N+="</li>";u+=N;J=nb(w,'bold 16px "Microsoft YaHei", "Segoe UI","PingFang SC","Hiragino Sans GB","Helvetica Neue",Helvetica,Arial,sans-serif,-apple-system,BlinkMacSystemFont');J>y&&(y=J)}return{html:u+"</ul></div></div></div>",titleWidth:y}};L.insertSmile=function(B,u){B=$$(B).closest("div.zwp-smileview");if(0<B.length&&(B=B.get(0).inputbox))if(B.createTextRange&&(B.caretPos=document.selection.createRange().duplicate()),
227
- document.all)B.createTextRange&&B.caretPos?(B=B.caretPos,B.text=" "==B.text.charAt(B.text.length-1)?u+" ":u):B.value=u;else if(B.setSelectionRange){var y=B.selectionEnd,F=B.value.substring(0,B.selectionStart);y=B.value.substring(y);B.value=F+u+y}else alert("This version of Mozilla based browser does not support setSelectionRange")};L.replaceSmileDanmu=function(B,u,y){if("string"!=typeof B)return"";0<=B.indexOf("<")&&(B=B.replace(/</g,"&lt;").replace(/>/g,"&gt;"));var F=B.indexOf("[sm-");if(0>F)return B;
228
- var J=Da.path+"widgets/smiles/p",w="",H=B.substring(0,F);for(""!=H&&(w+=H);0<=F;){H=B.indexOf("]",F+4);if(0>H){H=B.substring(F);""!=H&&(w+=H);break}F=B.substring(F+4,H);""!=F&&(y.isFilterImage||(w+='<img style="opacity: 1;" src="'+J+F+'.png" height="'+u+'">'));F=B.indexOf("[sm-",H+1);0>F?(H=B.substring(H+1),""!=H&&(w+=H)):F>H+1&&(w+=B.substring(H+1,F))}return w};var Oa=function(B){hasClass(B,"switch_on")?removeClass(B,"switch_on"):addClass(B,"switch_on")},qb=function(B,u){var y=$$;B=y(u).closest("div.zwp-dmform").children(".zwp-barrage-set");
229
- if(0!=B.length){if("1"!=B.attr("data-render")){var F=u.zwplayer,J=B.get(0);y.get(Da.path+"widgets/danmu_setting.html?v="+Da.v,{},function(K){var N=y(J);N.html(K);N.find("a.barrage-tab-link").click(function(P){P.preventDefault();P=y(this).parent();P.hasClass("selected")||(P.addClass("selected").siblings().removeClass("selected"),P=y(P.attr("data-tab")),P.hasClass("hidden")&&(P.removeClass("hidden"),P.siblings().addClass("hidden")))});K=y("#fsBox_tab");K.find("div.color-box").children("a").click(function(P){P.preventDefault();
230
- P=y(this);P.hasClass("selected")||(P.siblings().removeClass("selected"),P.addClass("selected"),F&&(F.danmuSetting.color=P.attr("data-color")))});K.find("div.other-box").children("a.checkbox-wrap").click(function(P){P.preventDefault();var Z=y(this);Z.toggleClass("selected");P=Z.attr("data-content");Z=Z.hasClass("selected");F&&(F.danmuSetting[P]=Z)});y("#bfBox_tab").find("a.zwp-barrage-icons").mousedown(function(P){if(0==P.button){this.isMousePressed=!0;var Z=y(this).position().left,ba=P.clientX-Z,
231
- aa=this,fa=function(Y){Y=Y.clientX-ba;0>Y?Y=0:134<Y&&(Y=134);y(aa).css({left:Y+"px"});var ka=y(aa).siblings("div.bar-t");0<ka.length&&ka.width(Y+3);aa.valuePanel||(aa.valuePanel=y(aa).parent().siblings("div.set-rol-right").get(0));if("object"==typeof aa.valuePanel){ka=y(aa.valuePanel);var ia=ka.attr("data-barrage-content");"opacityValue"==ia?(Y=parseInt(100*Y/138),F&&(F.danmuSetting.opacityValue=Y),ka.html(Y+"%")):"forcedFontSizeValue"==ia?(Y=50+parseInt(150*Y/138),F&&(F.danmuSetting.forcedFontSizeValue=
232
- Y),ka.html(Y+"%")):"speedValue"==ia?(Y=(.5+parseFloat(Y/69)).toFixed(1),F&&(F.danmuSetting.speedValue=Y),ka.html(Y+"x")):"densityValue"==ia&&(Y=parseInt(100*Y/46),F&&(F.danmuSetting.densityValue=Y),ka.html(Y+"\u6761"))}return!1},ma=function(Y){y(document).unbind("mousemove",fa).unbind("mouseup",ma)};y(document).bind("mousemove",fa).bind("mouseup",ma)}return!1});y("#pbBox_tab").find("a.pb-link").click(function(P){P.preventDefault();var Z=y(this).parent();Z.toggleClass("selected");P=y(this).attr("data-content");
233
- Z=Z.hasClass("selected");F&&(F.danmuSetting[P]=Z)});y("#barrage-set-bot").children("a").click(function(P){P.preventDefault();if("reset"==y(this).attr("data-content")){if(F)for(a in F.danmuSetting)delete F.danmuSetting[a];y("#fsBox_tab").find(".color-box a").removeClass("selected").eq(0).addClass("selected");y("#fsBox_tab").find(".other-box a").removeClass("selected");var Z={opacityTrigger:[128,124,"90%"],forcedFontSizeTrigger:[50,46,"100%"],speedTrigger:[39,35,"1.0x"],densityTrigger:[18,14,"30\u6761"]};
234
- y("#bfBox_tab").find("a.zwp-barrage-icons").each(function(ba,aa){ba=y(aa).attr("data-barrage-content");if(Z[ba]){var fa=Z[ba];ba=fa[1];var ma=fa[0];fa=fa[2];aa=y(aa);aa.css({left:ba+"px"});aa.siblings(".bar-t").width(ma+"px");aa.parent().siblings(".set-rol-right").text(fa)}});y("#pbBox_tab").find("li.selected").removeClass("selected")}})},"html");B.attr("data-render","1")}if(B.hasClass("hidden")){J=B.get(0);var w=this,H=function(K){var N=y(J);if(K.target==w)w=null;else if(hasClass(K.target,"xicon-close")||
235
- !N.is(K.target)&&0===N.has(K.target).length)N.addClass("hidden"),y(document).off("click",H),delete u.zwplayer};B.removeClass("hidden");y(document).on("click",H)}}},$a=function(B){L.ctrlInitId||(L.ctrlInitId=(new Date).getTime());var u=L.ctrlInitId++;return B+u},Ca=function(B,u){return'<div class="zwp_switch action-item" id="'+(B||$a("switch-"))+'" data-action="'+(u||"none")+'"><i class="switch_inner"></i></div>'},ab=function(B){var u=B.parentNode;u&&(u=u.querySelector(".zwp-slider-value"))&&(u.innerHTML=
236
- B.value)},Ma=function(B,u){B=B||$a("zwp_slider-");return'<input type="range" id="'+B+'" name="slider'+B+'" data-action="'+u+'" class="zwp-slider" value="0" min="-100" max="100"/><span class="zwp-slider-value">0</span>'},rb=function(B){var u="";B.infoButton&&(u='<div class="zwp-button zwp-infoButton"><button class="zwpbtn zwp-infoBtn" data-action="showMediainfo" data-name="infobtn"><i class="xicon xicon-info"></i></button></div>');var y="",F="",J="",w="",H="",K="",N="",P=B.defVolume||61.25;B.speedButton&&
216
+ HD1:"\u8d85\u6e05",SD1:"\u9ad8\u6e05",SD2:"\u6807\u6e05",HD:"\u9ad8\u6e05",FHD:"\u5168\u9ad8\u6e05",BD:"\u84dd\u5149","BD 4M":"\u84dd\u51494M","BD 8M":"\u84dd\u51498M",waitStreamToReady:"\u6b63\u5728\u7b49\u5f85\u8282\u76ee..."},Ha={},Wa={FULL_HD1:"RAW",HD1:"FHD",SD1:"HD",SD2:"SD"},Xa="en",jb={"zh-CN":Fa,zh:Fa,"zh-HK":Ha,"zh-TW":Ha,"en-US":Wa,en:Wa};Fa="en";K.navigator&&(Ha=(K.navigator.language||K.navigator.browserLanguage).toLowerCase(),Ha.indexOf("zh")!=-1?Fa="zh-CN":Ha.indexOf("zh-tw")!=-1&&(Fa=
217
+ "zh-Hant"));Xa=Fa;var pa=function(n,B){var v=jb[Xa]||B;return v?v[n]||B:B},kb=function(){for(var n='<div class="zwp-button zwp-speedButton"><button class="zwpbtn zwp-speedBtn" data-action="showSpeedMenu" data-name="speedbtn">'+pa("speed","Speed")+'</button><ul class="zwp-speedMenu">',B="2.0x 1.5x 1.25x 1.0x 0.75x 0.5x 0.25x".split(" "),v="",y=0;y<B.length;y++)v=y===3?v+('<li class="zwp-speed-item active">'+B[y]+"</li>"):v+('<li class="zwp-speed-item">'+B[y]+"</li>");return n+v+"</ul></div>"},Ya=function(){var n=
218
+ '<div class="zwp-option-item main"><label class="zwp-option-item-label">'+pa("allSubtitle","All subtitle")+'</label><div class="zwp-option-item-value">'+Ca("","subtitleOn")+"</div></div>";n+='<div class="zwp-option-item sub1" style="display: none;"><label class="zwp-option-item-label">'+pa("mainSubtitle","Main subtitle")+'</label><div class="zwp-option-item-value">'+Ca("","subtitleDefault")+"</div></div>";return n+='<div class="zwp-option-item sub2" style="display: none;"><label class="zwp-option-item-label">'+
219
+ pa("secondSubtitle","Second subtitle")+'</label><div class="zwp-option-item-value">'+Ca("","subtitleSecond")+"</div></div>"},lb=function(n){var B='<li class="zwp-subtitles-item" data-id="-1">'+pa("subtitleOff","Captions off")+"</li>";for(var v=0;v<n.length;v++)B=v===0?B+('<li class="zwp-subtitles-item active" data-id="'+n[v].id+'">'+n[v].name+"</li>"):B+('<li class="zwp-subtitles-item" data-id="'+n[v].id+'">'+n[v].name+"</li>");return'<ul class="zwp-subtitlesMenu">'+B+"</ul>"},mb=function(){var n=
220
+ "",B=(new Date).getTime();n=n+'<div class="zwp-toolbox-ground-right zwp-dmform zwp_danmu-controlbar"> <div class="zwp_switch_group"> <div class="zwp_switch_text">\u5f39\u5e55</div> <div class="zwp_switch" id="danmuSwitch-'+(B+'"><i class="switch_inner"></i></div> </div> <div class="zwp_dmconfig zwp_dmicon" id="danmu-config-btn-')+(B+'" title="\u5f39\u5e55\u8bbe\u7f6e"><i class="xicon xicon-subtitles"></i></div> <div class="zwp-barrage_form" id="barrage_form-')+(B+'"> <div class="zwp-barrage_inp logined"> <input id="barrage_inp_text-')+
221
+ (B+'" type="text" class="barrage_inp_text" maxlength="40" disabled="disabled" readonly="readonly"> <div class="barrage_login" href="#login"><span class="barrage_text">\u767b\u5f55</span>\u540e\u53ef\u4ee5\u53c2\u4e0e\u5f39\u5e55</div> </div>');n+=' <a class="btn_bubble disabled" href="javascript:void(0);" title="\u9009\u62e9\u8868\u60c5" data-viewid="smilesFaces-view-'+B+'"><i class="xicon xicon-smile"></i></a> <button type="submit" class="btn_submit vtb_disabled" title="\u767b\u5f55\u540e\u624d\u53ef\u4ee5\u53d1\u9001\u5f39\u5e55\u54e6" disabled="disabled">\u53d1\u9001</button> </div>';
222
+ n+=' <div class="zwp-barrage-set hidden" data-barrage-panel="panel" data-render="0"></div>';return n+="</div>"},La=function(n){if(typeof n==="number")return n;n=n.split(":");return n.length===2?parseInt(n[0])*60+parseInt(n[1]):n.length===3?parseInt(n[0])*3600+parseInt(n[1])*60+parseInt(n[2]):n.length===1?parseFloat(n[0]):n.length>3?9.999999999999999E8:0},nb=function y(B,v){var F=(y.canvas||(y.canvas=document.createElement("canvas"))).getContext("2d");F.font=v;return F.measureText(B).width},ob=function(B,
223
+ v){var y="";if(!v||!Array.isArray(v))return"";for(var F=0;F<v.length;F++){var J=v[F],x=La(J.time);if(!(x>=B)){var I=x*100/B+"%",L=J.title||J.text||J.time+"";if(typeof J.duration!=="undefined"){var N="red";J.style&&typeof J.style.background!=="undefined"&&(N=J.style.background);var Q=La(J.duration);x+Q>B&&(Q=B-x);y+='<span class="zwp__chapter_dot zwp_bar" style="left: '+I+"; width: "+(Q*100/B+"%; border-radius: 3px; background-color: ")+N+';" title="'+L+'" data-time="'+J.time+'" data-desc="'+J.desc+
224
+ '">&nbsp;</span>'}else y+='<span class="zwp__chapter_dot" style="left: '+I+'" title="'+L+'" data-time="'+J.time+'" data-desc="'+J.desc+'">&nbsp;</span>'}}return y},Za=function(B){return B.replace(/[<>&"]/g,function(v){return{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;"}[v]})},pb=function(B){if(!B||!Array.isArray(B)||B.length===0)return null;var v='<div class="zwp-button zwp-chapterButton"><button class="zwpbtn zwp-chapterBtn" data-action="showChapterListview" data-name="chapterbtn"><i class="xicon xicon-chapter"></i> \u7ae0\u8282</button><div class="zwp-chapterPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">\u7ae0\u8282\u5217\u8868</div><div class="zwp-list-inner"><ul class="zwp-chapterlist">';
225
+ for(var y=0,F=0;F<B.length;F++){var J=B[F],x=J.title||J.text||J.time+"";x=Za(x);a:{var I=J.time;if(typeof I==="string"){if(I.indexOf(":")>=0){var L=I;break a}I=parseInt(I)}L=parseInt(I/3600);var N=parseInt(I%3600/60);I=parseInt(I%60);var Q="";L>0&&(Q+=L+":");N>=0?(N>10||L>0&&(Q+="0"),Q+=N+":"):Q+="0:";L=Q=I>=10?Q+I:Q+("0"+I)}N='<li class="chapter-item" data-time="'+J.time+'">';N+='<div class="item-title"><span class="item-time">'+L+"</span>";N+='<span class="title" title="'+x+'">'+x+"</span></div>";
226
+ J.desc&&(N+='<div class="item-content"><span class="desc">'+Za(J.desc)+"</span></div>");N+="</li>";v+=N;J=nb(x,'bold 16px "Microsoft YaHei", "Segoe UI","PingFang SC","Hiragino Sans GB","Helvetica Neue",Helvetica,Arial,sans-serif,-apple-system,BlinkMacSystemFont');J>y&&(y=J)}return{html:v+"</ul></div></div></div>",titleWidth:y}};K.insertSmile=function(B,v){B=$$(B).closest("div.zwp-smileview");if(B.length>0&&(B=B.get(0).inputbox))if(B.createTextRange&&(B.caretPos=document.selection.createRange().duplicate()),
227
+ document.all)B.createTextRange&&B.caretPos?(B=B.caretPos,B.text=B.text.charAt(B.text.length-1)==" "?v+" ":v):B.value=v;else if(B.setSelectionRange){var y=B.selectionEnd,F=B.value.substring(0,B.selectionStart);y=B.value.substring(y);B.value=F+v+y}else alert("This version of Mozilla based browser does not support setSelectionRange")};K.replaceSmileDanmu=function(B,v,y){if(typeof B!="string")return"";B.indexOf("<")>=0&&(B=B.replace(/</g,"&lt;").replace(/>/g,"&gt;"));var F=B.indexOf("[sm-");if(F<0)return B;
228
+ var J=Da.path+"widgets/smiles/p",x="",I=B.substring(0,F);for(I!=""&&(x+=I);F>=0;){I=B.indexOf("]",F+4);if(I<0){I=B.substring(F);I!=""&&(x+=I);break}F=B.substring(F+4,I);F!=""&&(y.isFilterImage||(x+='<img style="opacity: 1;" src="'+J+F+'.png" height="'+v+'">'));F=B.indexOf("[sm-",I+1);F<0?(I=B.substring(I+1),I!=""&&(x+=I)):F>I+1&&(x+=B.substring(I+1,F))}return x};var Oa=function(B){hasClass(B,"switch_on")?removeClass(B,"switch_on"):addClass(B,"switch_on")},qb=function(B,v){var y=$$;B=y(v).closest("div.zwp-dmform").children(".zwp-barrage-set");
229
+ if(B.length!=0){if(B.attr("data-render")!="1"){var F=v.zwplayer,J=B.get(0);y.get(Da.path+"widgets/danmu_setting.html?v="+Da.v,{},function(L){var N=y(J);N.html(L);N.find("a.barrage-tab-link").click(function(Q){Q.preventDefault();Q=y(this).parent();Q.hasClass("selected")||(Q.addClass("selected").siblings().removeClass("selected"),Q=y(Q.attr("data-tab")),Q.hasClass("hidden")&&(Q.removeClass("hidden"),Q.siblings().addClass("hidden")))});L=y("#fsBox_tab");L.find("div.color-box").children("a").click(function(Q){Q.preventDefault();
230
+ Q=y(this);Q.hasClass("selected")||(Q.siblings().removeClass("selected"),Q.addClass("selected"),F&&(F.danmuSetting.color=Q.attr("data-color")))});L.find("div.other-box").children("a.checkbox-wrap").click(function(Q){Q.preventDefault();var Z=y(this);Z.toggleClass("selected");Q=Z.attr("data-content");Z=Z.hasClass("selected");F&&(F.danmuSetting[Q]=Z)});y("#bfBox_tab").find("a.zwp-barrage-icons").mousedown(function(Q){if(Q.button==0){this.isMousePressed=!0;var Z=y(this).position().left,ca=Q.clientX-Z,
231
+ aa=this,ha=function(W){W=W.clientX-ca;W<0?W=0:W>134&&(W=134);y(aa).css({left:W+"px"});var ka=y(aa).siblings("div.bar-t");ka.length>0&&ka.width(W+3);aa.valuePanel||(aa.valuePanel=y(aa).parent().siblings("div.set-rol-right").get(0));if(typeof aa.valuePanel=="object"){ka=y(aa.valuePanel);var ia=ka.attr("data-barrage-content");ia=="opacityValue"?(W=parseInt(W*100/138),F&&(F.danmuSetting.opacityValue=W),ka.html(W+"%")):ia=="forcedFontSizeValue"?(W=50+parseInt(W*150/138),F&&(F.danmuSetting.forcedFontSizeValue=
232
+ W),ka.html(W+"%")):ia=="speedValue"?(W=(.5+parseFloat(W/69)).toFixed(1),F&&(F.danmuSetting.speedValue=W),ka.html(W+"x")):ia=="densityValue"&&(W=parseInt(W*100/46),F&&(F.danmuSetting.densityValue=W),ka.html(W+"\u6761"))}return!1},ma=function(W){y(document).unbind("mousemove",ha).unbind("mouseup",ma)};y(document).bind("mousemove",ha).bind("mouseup",ma)}return!1});y("#pbBox_tab").find("a.pb-link").click(function(Q){Q.preventDefault();var Z=y(this).parent();Z.toggleClass("selected");Q=y(this).attr("data-content");
233
+ Z=Z.hasClass("selected");F&&(F.danmuSetting[Q]=Z)});y("#barrage-set-bot").children("a").click(function(Q){Q.preventDefault();if(y(this).attr("data-content")=="reset"){if(F)for(a in F.danmuSetting)delete F.danmuSetting[a];y("#fsBox_tab").find(".color-box a").removeClass("selected").eq(0).addClass("selected");y("#fsBox_tab").find(".other-box a").removeClass("selected");var Z={opacityTrigger:[128,124,"90%"],forcedFontSizeTrigger:[50,46,"100%"],speedTrigger:[39,35,"1.0x"],densityTrigger:[18,14,"30\u6761"]};
234
+ y("#bfBox_tab").find("a.zwp-barrage-icons").each(function(ca,aa){ca=y(aa).attr("data-barrage-content");if(Z[ca]){var ha=Z[ca];ca=ha[1];var ma=ha[0];ha=ha[2];aa=y(aa);aa.css({left:ca+"px"});aa.siblings(".bar-t").width(ma+"px");aa.parent().siblings(".set-rol-right").text(ha)}});y("#pbBox_tab").find("li.selected").removeClass("selected")}})},"html");B.attr("data-render","1")}if(B.hasClass("hidden")){J=B.get(0);var x=this,I=function(L){var N=y(J);if(L.target==x)x=null;else if(hasClass(L.target,"xicon-close")||
235
+ !N.is(L.target)&&N.has(L.target).length===0)N.addClass("hidden"),y(document).off("click",I),delete v.zwplayer};B.removeClass("hidden");y(document).on("click",I)}}},$a=function(B){K.ctrlInitId||(K.ctrlInitId=(new Date).getTime());var v=K.ctrlInitId++;return B+v},Ca=function(B,v){return'<div class="zwp_switch action-item" id="'+(B||$a("switch-"))+'" data-action="'+(v||"none")+'"><i class="switch_inner"></i></div>'},ab=function(B){var v=B.parentNode;v&&(v=v.querySelector(".zwp-slider-value"))&&(v.innerHTML=
236
+ B.value)},Ma=function(B,v){B=B||$a("zwp_slider-");return'<input type="range" id="'+B+'" name="slider'+B+'" data-action="'+v+'" class="zwp-slider" value="0" min="-100" max="100"/><span class="zwp-slider-value">0</span>'},rb=function(B){var v="";B.infoButton&&(v='<div class="zwp-button zwp-infoButton"><button class="zwpbtn zwp-infoBtn" data-action="showMediainfo" data-name="infobtn"><i class="xicon xicon-info"></i></button></div>');var y="",F="",J="",x="",I="",L="",N="",Q=B.defVolume||61.25;B.speedButton&&
237
237
  !B.isLive&&(y="");B.optionButton&&(J='<div class="zwp-button zwp-optionButton"><button class="zwpbtn zwp-optionBtn" data-action="showConfigPanel" data-name="optionbtn" title="\u8bbe\u7f6e"><i class="xicon xicon-config"></i></button><div class="zwp-optionPanel"><div class="zwp-option-item"><label class="zwp-option-item-label">\u5de6\u53f3\u7ffb\u8f6c</label><div class="zwp-option-item-value">'+(Ca("","mirror")+'</div></div><div class="zwp-option-item"><label class="zwp-option-item-label">\u4e0a\u4e0b\u7ffb\u8f6c</label><div class="zwp-option-item-value">'+
238
238
  Ca("","flip")+'</div></div><div class="zwp-option-item"><label class="zwp-option-item-label">\u987a90\u5ea6\u7ffb\u8f6c</label><div class="zwp-option-item-value">'+Ca("","rotated90")+'</div></div><div class="zwp-option-item"><label class="zwp-option-item-label">\u900690\u5ea6\u7ffb\u8f6c</label><div class="zwp-option-item-value">'+Ca("","rotated270")+'</div></div><div class="zwp-option-h-separator"><hr/></div><div class="zwp-option-item"><label class="zwp-option-item-label">\u5faa\u73af\u64ad\u653e</label><div class="zwp-option-item-value">'+
239
239
  Ca("","loop")+'</div></div><div class="zwp-option-item zwp-lefticon"><span class="zwp-liteicon"><i class="xicon xicon-hue"></i></span> <button class="zwp-option-button action-item" data-action="showColorConfig">\u89c6\u9891\u8272\u5ea6\u8c03\u8282...</button></div></div></div>'));B.disableVolumeControl||(N='<div class="zwp-button zwp-volume-docker"><button class="zwpbtn zwp-muteBtn" data-action="mute" data-name="mutebtn"><i class="xicon xicon-speaker"></i></button><div class="zwp-volume-slider"><div class="zwp-volume-total"><div class="zwp-volume-current" style="bottom: 0px; height: '+
240
- P+'%;"></div><div class="zwp-volume-handle" style="bottom: '+P+'%; margin-bottom: -7px;"></div></div></div></div>');B.disableFullscreenWin||(w='<div class="zwp-button zwp-fullscrWinButton"><button class="zwpbtn zwp-fullscrWinBtn" data-action="enterfullscreenWin" data-name="fullscrWinbtn" title="\u7f51\u9875\u5168\u5c4f"><i class="xicon xicon-fullScreen-win"></i></button></div>');B.snapshotButton&&(H='<div class="zwp-button zwp-snapshotButton"><button class="zwpbtn zwp-snapshotBtn" data-action="snapshot" data-name="snapshotbtn" title="\u6293\u53d6\u56fe\u50cf"><i class="xicon xicon-camera"></i></button></div>');
241
- B.disablePicInPic||document.pictureInPictureEnabled&&(K='<div class="zwp-button zwp-picInPicButton"><button class="zwpbtn zwp-picInPicBtn" data-action="pictureInPicture" data-name="picInPicbtn" title="\u753b\u4e2d\u753b\u6a21\u5f0f"><i class="xicon xicon-pic-in-pic"></i></button></div>');B.isLive||(F='<div class="zwp__time-rail"></div>');B='<div class="zwp-button zwp-subtitleButton" style="display: none;"><button class="zwpbtn zwp-subtitleBtn" data-action="showSubtitleMenu" data-name="subtitlebtn" title="\u5916\u6302\u5b57\u5e55"><i class="xicon xicon-cc"></i></button><div class="zwp-subtitleMenu">'+
242
- Ya()+"</div></div>";P=["1920","1280","720","480"];for(var Z="",ba=0;ba<P.length;ba++)Z=3===ba?Z+('<li class="zwp-quality-item active">'+P[ba]+"</li>"):Z+('<li class="zwp-quality-item">'+P[ba]+"</li>");return'<div class="zwp-button zwp_playbtn"><button class="zwpbtn zwp-playbtn" data-action="play" data-name="playbtn"><i class="xicon xicon-play"></i></button></div><div class="zwp__time zwp__currenttime-container" role="timer" aria-live="on"><span class="zwp__currenttime">00:00</span></div><div class="zwp__time zwp__duration-container" style="display: none;"><span class="zwp__time_divider">/</span> <span class="zwp__duration">0:00:00</span></div><div class="zwp__time-info "></div>'+
243
- H+B+('<div class="zwp-button zwp-qualityButton" style="display: none;"><button class="zwpbtn zwp-qualityBtn" data-action="showQualityMenu" data-name="qualitybtn" title="\u6e05\u6670\u5ea6\u9009\u62e9"><i class="xicon xicon-hd"></i></button><ul class="zwp-qualityMenu">'+Z+"</ul></div>")+y+u+J+N+K+w+'<div class="zwp-button"><button class="zwpbtn zwp-fullscrBtn" data-action="enterfullscreen" data-name="fullscrbtn" title="'+qa("enterFullScreen","\u8fdb\u5165\u5168\u5c4f")+'"><i class="xicon xicon-fullScreen"></i></button></div>'+
244
- F};(function(B,u){"function"===typeof L.define&&L.define.amd?L.define([],u):"object"===typeof exports?module.exports=u():B.ZWPlayer=u()})(L,function(){function B(e){e=e.getBoundingClientRect();return{top:e.top+(L.pageYOffset||document.documentElement.scrollTop),left:e.left+(L.pageXOffset||document.documentElement.scrollLeft)}}function u(e){var n=e.offsetTop;for(e=e.offsetParent;null!==e;)n+=e.offsetTop,e=e.offsetParent;return n}var y=function(){return(new Date).getTime()};"undefined"!=typeof performance&&
245
- performance.now&&(y=function(){return performance.now()});var F=y(),J=function(e){var n="";e.startsWith("webrtc://")&&(n="/rtc/v1/play/");var m=e.indexOf("://");if(-1==m)return!1;var c="";if(0<=e.indexOf("?")){var l=e.indexOf("?");c=e.substr(l+1);e=e.substr(0,l)}var v=e.indexOf("/",m+3);l=e.substr(0,m);m=e.substring(m+3,v);var A=e.substring(v),M=A.lastIndexOf("/");v="";var b=m.indexOf(":");0<b&&(v=m.substring(b+1),m=m.substring(0,b));b=A.substring(1,M);A=A.substring(M+1);M=A.lastIndexOf(".");0<M&&
246
- (A=A.substring(0,M));M="";0<c.indexOf("vhost=")&&(M=c.substr(c.indexOf("vhost=")+6),0<M.indexOf("&")&&(M=M.substr(0,M.indexOf("&"))));m===M&&/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(m)&&(M="_default_vhost_");e={url:e,schema:l,server:m,port:v,vhost:M,app:b,stream:A};e.user_query={};if(0!==c.length){0<=c.indexOf("?")&&(c=c.split("?")[1]);c=c.split("&");for(v=0;v<c.length;v++)M=c[v].split("="),e[M[0]]=M[1],e.user_query[M[0]]=M[1];e.domain&&(e.vhost=e.domain)}if("webrtc"===l||"rtc"===l)l="",e.port||("https"===
247
- e.user_query.schema?(e.port=443,l=e.user_query.schema||"https"):0===L.location.href.indexOf("https://")?(e.port=443,l=e.user_query.schema||"https"):e.port=1985);m="rtmp://"+m+"/"+b+"/"+A;l=l?l+":":L.location.protocol;(v=e.port)||(v="https:"===l?v||443:v||1985);n=n||"/live/webrtc/play/";n.lastIndexOf("/")!==n.length-1&&(n+="/");c=l+"//"+e.server+":"+v+n;for(var Q in e.user_query)"api"!==Q&&"play"!==Q&&(c+="&"+Q+"="+e.user_query[Q]);c=c.replace(n+"&",n+"?");Q={apiUrl:c,streamUrl:m,schema:l,urlObject:e,
248
- port:v};Q.tid=Number(parseInt((new Date).getTime()*Math.random()*100)).toString(16).slice(0,7);return Q},w=function(e,n,m,c){let l=null;l=L.XMLHttpRequest?new L.XMLHttpRequest:new L.ActiveXObject("Microsoft.XMLHTTP");l.addEventListener("error",function(v){c&&c("REQUEST:"+v.type)});l.onreadystatechange=function(){if(4===l.readyState)if(200===l.status){var v=JSON.parse(l.responseText);m&&m(v)}else c&&c("STATUS:"+l.status+":"+l.statusText)};l.open("POST",e,!0);l.setRequestHeader("Content-Type","application/json");
249
- l.send(n);return l},H=function(e){var n=e.lastIndexOf("/"),m=e.indexOf("?");n=e.indexOf(".",n+1);var c="";0<n&&(0<m?n>m||(c=e.substring(n,m).toLowerCase()):c=e.substring(n).toLowerCase(),n=c.lastIndexOf("."),0<n&&(c=c.substring(n)));return c},K=void 0,N=void 0,P=void 0;"classList"in document.documentElement?(K=function(e,n){return void 0!==e.classList&&e.classList.contains(n)},N=function(e,n){return e.classList.add(n)},P=function(e,n){return e.classList.remove(n)}):(K=function(e,n){return(new RegExp("\\b"+
250
- n+"\\b")).test(e.className)},N=function(e,n){K(e,n)||(e.className+=" "+n)},P=function(e,n){e.className=e.className.replace(new RegExp("\\b"+n+"\\b","g"),"")});L.hasClass=K;L.addClass=N;L.removeClass=P;/MSIE 8\.0/.test(navigator.userAgent);var Z=function(e){e=parseInt(e);var n=parseInt(e/3600),m=parseInt(e%3600/60);e=parseInt(e%60);var c="";0<n&&(c+=n+":");c=10<=m?c+(m+":"):0<m?c+("0"+m+":"):c+"00:";return 10<=e?c+e:c+("0"+e)},ba=function(e){var n=!1,m=!1,c=this;c._config=e||{};c.peer_conn=null;c.danmuSetting=
251
- {};"undefined"===typeof c._config.controlbar&&(c._config.controlbar=!0);c._config.hideControlbarTimeout||(c._config.hideControlbarTimeout=1E4);"undefined"===typeof c._config.defVolume&&(c._config.defVolume=61.25);c.setRtcstream=function(d){this.videoEl&&(this.videoEl.srcObject=d,this.videoEl.play(),this.setplaystate(!0),this.startHideControlbar(this))};c.onfullscrchange=function(d){Na()?(this.isFullscr=!0,this.setupFullscrBtn&&this.setupFullscrBtn.setAttribute("title",qa("exitFullScreen","Exit full screen"))):
252
- (this.setupFullscrBtn&&(P(this.playerElm,"zwp-fullscreen"),this.setupFullscrBtn.setAttribute("data-action","enterfullscreen"),this.setupFullscrBtn.setAttribute("title",qa("enterFullScreen","Enter full screen"))),this.isFullscr=!1);this.isFullscrWin||this.reposDanmuToolbar(this.isFullscr);console.log("fullscrchange:"+d.type)}.bind(c);c.on_btnclick=function(d){if(d.currentTarget&&this.btnBindZwp){d=d.currentTarget;var h=d.getAttribute("data-action");"play"===h?this._config.disablePlayBtn||(this.isPlaying?
253
- this.videoEl&&(this.videoEl.paused||this.videoEl.ended)&&(this.videoEl.play(),this.setplaystate(!0)):this._config.url&&this.play(this._config.url)):"pause"===h?this._config.disablePlayBtn||!this.videoEl||this.videoEl.paused||this.videoEl.ended||(this.videoEl.pause(),this.setplaystate(!1)):"mute"===h?this.videoEl&&(this.videoEl.muted||this.setMuted(!0)):"unmute"===h?this.videoEl&&this.videoEl.muted&&this.setMuted(!1):"enterfullscreen"===h?this.setFullscreen(!0,d):"exitfullscreen"===h?this.setFullscreen(!1,
254
- d):"enterfullscreenWin"===h?this.setFullscreenWin(!0,d):"exitfullscreenWin"===h?this.setFullscreenWin(!1,d):"showMediainfo"===h?this.showMediainfo():"snapshot"===h?this.doSnapshot():"pictureInPicture"===h&&this.togglePictureInPicture()}}.bind(c);c.setFullscreen=function(d,h){if(d){if(!Na()&&this.playerElm){d=this.playerElm;var q=this.videoEl;d.requestFullscreen?d.requestFullscreen():d.webkitRequestFullscreen?d.webkitRequestFullScreen():d.mozRequestFullScreen?d.mozRequestFullScreen():d.msRequestFullscreen?
255
- d.msRequestFullscreen():d.oRequestFullscreen?d.oRequestFullscreen():q.webkitEnterFullScreen?q.webkitEnterFullScreen():(q=document.documentElement,q.requestFullscreen?q.requestFullscreen():q.mozRequestFullScreen?q.mozRequestFullScreen():q.webkitRequestFullScreen?q.webkitRequestFullScreen():(q=document.body,document.documentElement.style.cssText="width:100%;height:100%;overflow:hidden;",q.style.cssText="width:100%;height:100%;overflow:hidden;",d.style.cssText="width:100%;height:100%;overflow:hidden;;margin:0px;padding:0px;",
256
- document.IsFullScreen=!0));N(this.playerElm,"zwp-fullscreen");h.setAttribute("data-action","exitfullscreen");if(!this.setupFullscrBtn){d=this.onfullscrchange;q=this.videoEl;var C=document.webkitExitFullscreen||document.webkitCancelFullScreen?"webkitfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":document.msExitFullscreen?"MSFullscreenChange":"webkitfullscreenchange";document.addEventListener("fullscreenchange",d,!1);C&&document.addEventListener(C,d,!1);q&&Va&&(q.addEventListener("webkitbeginfullscreen",
257
- d),q.addEventListener("webkitendfullscreen",d));this.setupFullscrBtn=h}}}else Na()&&this.playerElm&&(d=this.playerElm,q=document.documentElement,q.exitFullscreen?q.exitFullscreen():q.mozCancelFullScreen?q.mozCancelFullScreen():q.webkitCancelFullScreen?q.webkitCancelFullScreen():document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():
258
- document.oRequestFullscreen?document.oCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():(q=document.body,document.documentElement.style.cssText="",q.style.cssText="",d.style.cssText="",document.IsFullScreen=!1),P(this.playerElm,"zwp-fullscreen"),h.setAttribute("data-action","enterfullscreen"))}.bind(c);c.setFullscreenWin=function(d,h){this.playerElm&&(d?this.isFullscrWin||(N(this.playerElm,"zwp-fullscreen-win"),h.setAttribute("data-action","exitfullscreenWin"),this.isFullscrWin=
259
- !0,this.reposDanmuToolbar(!0),(d=this.playerElm.parentNode)&&"BODY"!==d.tagName&&(this.oldWrapZIndex=d.style.zIndex,d.style.zIndex=99999999)):this.isFullscrWin&&("undefined"!==typeof this.oldWrapZIndex&&(d=this.playerElm.parentNode,d.style.zIndex=this.oldWrapZIndex,delete this.oldWrapZIndex),P(this.playerElm,"zwp-fullscreen-win"),h.setAttribute("data-action","enterfullscreenWin"),delete this.isFullscrWin,this.reposDanmuToolbar(!1)))}.bind(c);c.setMuted=function(d){this.videoEl&&(this.videoEl.muted=
260
- d)&&(this.oldVolume=this.videoEl.volume);d?(N(this.playerElm,"zwp-muted"),this.muteBtn&&this.muteBtn.setAttribute("data-action","unmute")):(this.oldVolume&&(this.videoEl.volume=this.oldVolume,delete this.oldVolume),P(this.playerElm,"zwp-muted"),this.muteBtn&&this.muteBtn.setAttribute("data-action","mute"));this.mutedTipBox&&(this.popup_layers.removeChild(this.mutedTipBox),delete this.mutedTipBox)}.bind(c);c.setVolume=function(d){this.videoEl&&(this.videoEl.volume=d)}.bind(c);c.startHideControlbar=
261
- function(d){d.controlbar&&!d._config.fixedControlbar&&(d.hideControlbarTime=(new Date).getTime()+d._config.hideControlbarTimeout,d.hideControlbarTimer||(d.hideControlbarTimer=L.setInterval(function(){(new Date).getTime()>=d.hideControlbarTime&&(L.clearInterval(d.hideControlbarTimer),delete d.hideControlbarTimer,Ga(d.controlbar,1E3,function(h){h.style.display="none";N(d.playerElm,"hide-cursor");d.isControlbarhidden=!0;"function"==typeof d._config.onhideControlbar&&d._config.onhideControlbar.call(d)}))},
262
- 1E3)))}.bind(c);c.buildProgressBar=function(){var d={};if(this.controlbar){var h=this.controlbar;d.rail=h.querySelector(".zwp__time-rail");d.timeInfo=h.querySelector(".zwp__time-info");if(this._config.isLive)d.rail&&(P(d.rail,"has-duration"),N(d.rail,"zwp-hidden")),this.progressBar&&this.progressBar.streamtype||(d.timeInfo&&(d.timeInfo.innerHTML='<div class="zwp-streamtype zwp-label">Live</div>',d.streamtype=h.querySelector(".zwp-streamtype")),this.progressBar=d);else if(d.timeInfo&&(this.progressBar&&
263
- this.progressBar.streamtype?this.progressBar.streamtype.innerHTML="VOD":(d.timeInfo.innerHTML='<div class="zwp-streamtype zwp-label">VOD</div>',d.streamtype=h.querySelector(".zwp-streamtype"))),d.rail||(h.insertAdjacentHTML("beforeend",'<div class="zwp__time-rail"></div>'),d.rail=h.querySelector(".zwp__time-rail")),P(d.rail,"zwp-hidden"),N(d.rail,"has-duration"),this._config.disableSeek&&N(d.rail,"zwp_disabled"),this.progressBar&&this.progressBar.total)this.progressBar.rail&&this._config.useProgressTooltip&&
264
- (h=this.progressBar.rail.querySelector(".zwp__time-float"))&&(q=h.querySelector(".zwp__time-thumbnail"),q||(h.insertAdjacentHTML("afterbegin",'<div class="zwp__time-thumbnail"></div>'),q=h.querySelector(".zwp__time-thumbnail"),this.progressBar.thumbnails=q),this._config.thumbnails?(U=this._config.thumbnails,q&&(U.rowsize="number"==typeof U.row?U.row:Math.ceil(Math.sqrt(U.total)),q.style.width=U.width+"px",q.style.height=U.height+"px",q.style.backgroundImage="url("+U.url+")"),h.style.width=4+U.width+
265
- "px",h.style.height=4+U.height+"px",N(h,"zwp__thumbnail")):(h.style.width=null,h.style.height=null,q&&(q.style.width="0px",q.style.height="0px",q.style.backgroundImage=null),P(h,"zwp__thumbnail")));else{var q='<span class="zwp__time-total zwp__time-slider"><span class="zwp__bar zwp__time-buffering"></span><span class="zwp__bar zwp__time-loaded"></span><span class="zwp__bar zwp__time-current"></span><span class="zwp__time-chapter"></span><span class="zwp__time-hovered no-hover"></span><span class="zwp__time-thumb"><span class="zwp__time-thumb-content"></span></span>';
266
- if(this._config.useProgressTooltip){var C="",G="",O="";if("object"===typeof this._config.thumbnails&&null!=this._config.thumbnails){var U=this._config.thumbnails;"number"==typeof U.width&&"number"==typeof U.height&&"number"==typeof U.total&&(U.rowsize="number"==typeof U.row?U.row:Math.ceil(Math.sqrt(U.total)),O=' style="width: '+(4+U.width)+"px; height: "+(4+U.height)+'px;"',G=" zwp__thumbnail",C='<div class="zwp__time-thumbnail" style="width: '+U.width+"px;height: "+U.height+"px; background-image: url("+
267
- U.url+');"></div>')}q+='<div class="zwp__time-float'+G+'"'+O+">"+C+'<span class="zwp__time-float-current">0:00</span><span class="zwp__time-float-corner corner_external"></span><span class="zwp__time-float-corner corner_internal"></span></div>'}d.rail.innerHTML=q+"</span>";d.buffering=h.querySelector(".zwp__time-buffering");d.total=h.querySelector(".zwp__time-total");d.loaded=h.querySelector(".zwp__time-loaded");d.current=h.querySelector(".zwp__time-current");d.thumb=h.querySelector(".zwp__time-thumb");
268
- d.timefloat=h.querySelector(".zwp__time-float");d.timefloatcurrent=h.querySelector(".zwp__time-float-current");d.thumbnails=h.querySelector(".zwp__time-thumbnail");d.slider=h.querySelector(".zwp__time-slider");d.hovered=h.querySelector(".zwp__time-hovered");d.chapters=h.querySelector(".zwp__time-chapter");d.newTime=0;d.forcedHandlePause=!1;d.buffering.style.display="none";d.slider.addEventListener("dragstart",function(){return!1});this.progressBar=d;this.showTimefloat=function(T){if(this._config.useProgressTooltip){var V=
269
- T.originalEvent&&T.originalEvent.changedTouches?T.originalEvent.changedTouches[0].pageX:T.changedTouches?T.changedTouches[0].pageX:T.pageX;T=this.progressBar;var W=this.videoEl.duration;var g=B(T.total);var t=T.total.offsetWidth;V<g.left?V=g.left:V>t+g.left&&(V=t+g.left);V-=g.left;g=V/t;T=this.progressBar;T.timefloatcurrent.innerHTML=Z(W*g);T.thumbnails&&this._config.thumbnails?(W=this._config.thumbnails,g=Math.floor(g*W.total),g>=W.total&&(g=W.total-1),0!=W.rowsize&&(T.thumbnails.style.backgroundPosition=
270
- "-"+g%W.rowsize*W.width+"px -"+W.height*Math.floor(g/W.rowsize)+"px")):(W=7*T.timefloatcurrent.innerHTML.length+10,40>W&&(W=40),T.timefloat.style.width=W+"px");W=T.timefloat.offsetWidth/2;T.timefloat.style.left=(V<W?W:V>t-W?t-W:V)+"px";T.timefloat.style.display="block"}}.bind(this);d.slider.addEventListener("mouseenter",function(T){var V=this;if(V.videoEl){var W=V.videoEl.duration;isNaN(W)||Infinity===W||T.target!==d.slider||(d.bindMouseMoveEvent||(d.slider.addEventListener("mousemove",function(g){var t=
271
- g.target;(t===d.slider||t.closest(".zwp__time-slider"))&&V.showTimefloat(g)}),d.bindMouseMoveEvent=!0),d.timefloat&&(d.timefloat.style.display="block"))}}.bind(this));d.slider.addEventListener("mouseleave",function(){if(this.videoEl){var T=this.videoEl.duration;isNaN(T)||Infinity===T||n||!d.timefloat||(d.timefloat.style.display="none")}}.bind(this));var S=function(T,V){var W=this,g=d.slider.offsetWidth,t=B(d.slider);t=T.pageX-t.left;0>t?t=0:t>g&&(t=g);g=(100*t/g).toFixed(4);d.thumb.style.left=g+"%";
272
- V?(W.seekTimeProgress(g),W.lastSeekProgress=g):"undefined"!=typeof W.lastSeekProgress&&1<Math.abs(g-W.lastSeekProgress)&&(W.lastSeekProgress=g,W.seekTimer||(W.seekTimer=setTimeout(function(){W.seekTimeProgress(W.lastSeekProgress);delete W.seekTimer},1E3)));T.preventDefault();T.stopPropagation()}.bind(this);this.on_progressbar_mousemove=function(T){var V=T.target,W;if(W=n)a:if(W=d.slider,V===W)W=!0;else{for(;V.parentNode;){if(V.parentNode===W){W=!0;break a}V=V.parentNode}W=!1}W&&S(T)}.bind(this);this.on_progressbar_mouseup=
273
- function(T){if(n){document.removeEventListener("mousemove",this.on_progressbar_mousemove);document.removeEventListener("mouseup",this.on_progressbar_mouseup);n=!1;delete this.isTrackingProgress;this.seekTimer&&(clearTimeout(this.seekTimer),delete this.seekTimer);if(T.target&&(T.target.parentNode==d.thumb||T.target==d.thumb)){var V=d.slider.offsetWidth,W=B(d.slider);T=T.pageX-W.left;0>T?T=0:T>V&&(T=V);V=(100*T/V).toFixed(4);"undefined"!=typeof this.lastSeekProgress?1<Math.abs(V-this.lastSeekProgress)&&
274
- this.seekTimeProgress(V):this.seekTimeProgress(V)}delete this.lastSeekProgress}}.bind(this);this.on_progressbar_mousedown=function(T){n||this._config.disableSeek||(c.isTrackingProgress=!0,S(T,!0),document.addEventListener("mousemove",this.on_progressbar_mousemove),document.addEventListener("mouseup",this.on_progressbar_mouseup),n=!0,T.preventDefault(),T.stopPropagation())}.bind(this);d.slider.addEventListener("mousedown",this.on_progressbar_mousedown)}}}.bind(c);c.updateProgressBarType=function(){if(this.controlbar){var d=
275
- this.controlbar.querySelector(".zwp__time-rail");this._config.isLive?(d&&(P(d,"has-duration"),N(d,"zwp-hidden")),this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.innerHTML="Live",this.progressBar.streamtype.style.display="block")):(d&&(P(d,"zwp-hidden"),N(d,"has-duration"),this._config.disableSeek&&N(d,"zwp_disabled")),this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.innerHTML="VOD",this.progressBar.streamtype.style.display="block"))}}.bind(c);
276
- c.updateDuration=function(d){if(d.controlbar){var h=d.controlbar.querySelector(".zwp__duration-container"),q=d.videoEl.duration;if(isNaN(q)||Infinity===q)h.style.display="none",d._config.isLive=!0;else{h.style.display="block";h=h.querySelector(".zwp__duration");var C=parseInt(q/3600),G=parseInt(q%3600/60);q=parseInt(q%60);var O="";0<C&&(O+=C+":");O=10<=G?O+(G+":"):0<G?O+("0"+G+":"):O+"00:";h.innerHTML=10<=q?O+q:O+("0"+q);d.chapters&&setTimeout(function(){this.loadChapters()}.bind(d),1E3)}d.updateProgressBarType();
277
- d.syncUI()}}.bind(c);c.setProgressRail=function(d){var h=void 0!==d?d.target||d.detail.target:this.videoEl,q=null;h&&h.buffered&&0<h.buffered.length&&h.buffered.end&&this.videoEl.duration?q=h.buffered.end(h.buffered.length-1)/this.videoEl.duration:h&&void 0!==h.bytesTotal&&0<h.bytesTotal&&void 0!==h.bufferedBytes?q=h.bufferedBytes/h.bytesTotal:d&&d.lengthComputable&&0!==d.total&&(q=d.loaded/d.total);null!==q&&(q=Math.min(1,Math.max(0,q)),this.progressBar&&this.progressBar.loaded&&(this.progressBar.loaded.style.width=
278
- 100*q+"%"))}.bind(c);c.updateProgress=function(d){if(!this.isTrackingProgress&&this.progressBar&&this.progressBar.thumb){var h=this.videoEl.duration;!isNaN(h)&&Infinity!==h&&0<h&&(d+.3>=h&&(d=h),d=d/h*100,this.progressBar.thumb.style.left=d+"%",this.progressBar.current&&(this.progressBar.current.style.width=d/100*100+"%"))}}.bind(c);c.seekTimeProgress=function(d){if(this.videoEl){var h=this.videoEl.duration;isNaN(h)||Infinity===h||(this.videoEl.currentTime=h*d/100,this.progressBar.current&&(this.progressBar.current.style.width=
279
- d+"%"))}}.bind(c);c.seekTimeProgressByTime=function(d){if(this.videoEl){var h=this.videoEl.duration;isNaN(h)||Infinity===h||(this.videoEl.currentTime=d,this.progressBar.current&&(this.progressBar.current.style.width=d/h*100+"%"))}}.bind(c);c.on_speedItemclick=function(d){d.stopPropagation();d=d.currentTarget;if(!K(d,"active")){var h=parseFloat(d.innerText),q=d.parentNode.querySelector(".active");q&&P(q,"active");N(d,"active");this.videoEl&&(this.videoEl.playbackRate=h);if(q=this.controlbar.querySelector(".zwp-speedBtn"))q.innerHTML=
280
- 1==h?qa("speed","Speed"):d.innerText}var C=d.parentNode;C.style.display="none";setTimeout(function(){C.style.display=null},1E3)}.bind(c);c.resetSpeedMenu=function(){if(this.controlbar){var d=this.controlbar.querySelector(".zwp-speed-item.active");if(d&&"1.0x"!==d.innerText){var h=this.controlbar.querySelector(".zwp-speedBtn");h&&(h.innerHTML=qa("speed","Speed"));P(d,"active");d=d.parentNode.querySelectorAll("li.zwp-speed-item");if(0<d.length)for(h=0;h<d.length;h++)if("1.0x"===d[h].innerText){N(d[h],
281
- "active");break}}}}.bind(c);c.syncUI=function(){if(this._config.isLive){var d=this.controlbar.querySelector(".zwp-speedButton");d&&this.controlbar.removeChild(d);P(this.controlbar,"zwp-vodplayer")}else{if(this._config.speedButton&&(d=this.controlbar.querySelector(".zwp-speedButton"),!d)){var h=this.controlbar.querySelector(".zwp-infoButton")||this.controlbar.querySelector(".zwp-optionButton")||this.controlbar.querySelector(".zwp-volume-docker");if(h){var q=kb();d=document.createElement("div");this.controlbar.insertBefore(d,
282
- h);d.outerHTML=q;d=this.controlbar.querySelectorAll(".zwp-speedMenu>li.zwp-speed-item");0<d.length&&d.forEach(function(C){C.addEventListener("click",c.on_speedItemclick)})}}N(this.controlbar,"zwp-vodplayer")}}.bind(c);c.onKeydown=function(d){if(d)if(27===d.keyCode)if(this.contextMenu)this.hideContextMenu(),d.stopPropagation(),d.preventDefault();else{if(this.isFullscrWin&&this.controlbar){var h=this.controlbar.querySelector(".zwp-fullscrWinBtn");h&&(this.setFullscreenWin(!1,h),d.stopPropagation(),
283
- d.preventDefault())}}else 13!==d.keyCode&&(38===d.keyCode?(d.preventDefault(),this.videoEl&&(d=this.videoEl.volume,d+=.05,1<d&&(d=1),this.setVolume(d),this.setMuted(!1),h=parseInt(100*d)+"%",h={icon:"speaker",text:h},this.toast(h,1200,!1),this.positionVolumeThumb&&this.positionVolumeThumb(d))):40===d.keyCode?(d.preventDefault(),this.videoEl&&(d=this.videoEl.volume,d-=.05,0>d&&(d=0),this.setVolume(d),this.setMuted(0===d),h=parseInt(100*d)+"%",0===d&&(h=qa("muted","Muted")),h={icon:"speaker",text:h},
284
- this.toast(h,1200,!1),this.positionVolumeThumb&&this.positionVolumeThumb(d))):32===d.keyCode?(d.preventDefault(),this._config.isLive||this._config.disablePlayBtn||!this.videoEl||(this.videoEl.paused||this.videoEl.ended?(this.videoEl.play(),this.setplaystate(!0)):(this.videoEl.pause(),this.setplaystate(!1)))):77!==d.keyCode&&109!==d.keyCode||!this.videoEl||(this.videoEl.muted?(this.toast(qa("unmuted","Unmuted"),1E3,!1,!0),this.setMuted(!1)):(this.toast(qa("muted","Muted"),1E3,!1,!0),this.setMuted(!0))))}.bind(c);
285
- c.on_colorSliderChange=function(d){var h=d.currentTarget;d=h.getAttribute("data-action");this.colors||(this.colors={brightness:0,contrast:0,saturation:0,hue:0});ab(h);if("undefined"!==typeof this.colors[d]&&(h=parseInt(h.value),"hue"===d?this.colors.hue=parseInt(180*h/100):this.colors[d]=h,this.videoEl)){d=null;h=this.colors;h.brightness&&(d="brightness("+(100+h.brightness)+"%)");if(h.contrast){var q=100+h.contrast;d=(d?d+" ":"")+("contrast("+q+"%)")}h.saturation&&(q=100+h.saturation,d=(d?d+" ":"")+
240
+ Q+'%;"></div><div class="zwp-volume-handle" style="bottom: '+Q+'%; margin-bottom: -7px;"></div></div></div></div>');B.disableFullscreenWin||(x='<div class="zwp-button zwp-fullscrWinButton"><button class="zwpbtn zwp-fullscrWinBtn" data-action="enterfullscreenWin" data-name="fullscrWinbtn" title="\u7f51\u9875\u5168\u5c4f"><i class="xicon xicon-fullScreen-win"></i></button></div>');B.snapshotButton&&(I='<div class="zwp-button zwp-snapshotButton"><button class="zwpbtn zwp-snapshotBtn" data-action="snapshot" data-name="snapshotbtn" title="\u6293\u53d6\u56fe\u50cf"><i class="xicon xicon-camera"></i></button></div>');
241
+ B.disablePicInPic||document.pictureInPictureEnabled&&(L='<div class="zwp-button zwp-picInPicButton"><button class="zwpbtn zwp-picInPicBtn" data-action="pictureInPicture" data-name="picInPicbtn" title="\u753b\u4e2d\u753b\u6a21\u5f0f"><i class="xicon xicon-pic-in-pic"></i></button></div>');B.isLive||(F='<div class="zwp__time-rail"></div>');B='<div class="zwp-button zwp-subtitleButton" style="display: none;"><button class="zwpbtn zwp-subtitleBtn" data-action="showSubtitleMenu" data-name="subtitlebtn" title="\u5916\u6302\u5b57\u5e55"><i class="xicon xicon-cc"></i></button><div class="zwp-subtitleMenu">'+
242
+ Ya()+"</div></div>";Q=["1920","1280","720","480"];for(var Z="",ca=0;ca<Q.length;ca++)Z=ca===3?Z+('<li class="zwp-quality-item active">'+Q[ca]+"</li>"):Z+('<li class="zwp-quality-item">'+Q[ca]+"</li>");return'<div class="zwp-button zwp_playbtn"><button class="zwpbtn zwp-playbtn" data-action="play" data-name="playbtn"><i class="xicon xicon-play"></i></button></div><div class="zwp__time zwp__currenttime-container" role="timer" aria-live="on"><span class="zwp__currenttime">00:00</span></div><div class="zwp__time zwp__duration-container" style="display: none;"><span class="zwp__time_divider">/</span> <span class="zwp__duration">0:00:00</span></div><div class="zwp__time-info "></div>'+
243
+ I+B+('<div class="zwp-button zwp-qualityButton" style="display: none;"><button class="zwpbtn zwp-qualityBtn" data-action="showQualityMenu" data-name="qualitybtn" title="\u6e05\u6670\u5ea6\u9009\u62e9"><i class="xicon xicon-hd"></i></button><ul class="zwp-qualityMenu">'+Z+"</ul></div>")+y+v+J+N+L+x+'<div class="zwp-button"><button class="zwpbtn zwp-fullscrBtn" data-action="enterfullscreen" data-name="fullscrbtn" title="'+pa("enterFullScreen","\u8fdb\u5165\u5168\u5c4f")+'"><i class="xicon xicon-fullScreen"></i></button></div>'+
244
+ F};(function(B,v){typeof K.define==="function"&&K.define.amd?K.define([],v):typeof exports==="object"?module.exports=v():B.ZWPlayer=v()})(K,function(){function B(e){e=e.getBoundingClientRect();return{top:e.top+(K.pageYOffset||document.documentElement.scrollTop),left:e.left+(K.pageXOffset||document.documentElement.scrollLeft)}}function v(e){var l=e.offsetTop;for(e=e.offsetParent;e!==null;)l+=e.offsetTop,e=e.offsetParent;return l}var y=function(){return(new Date).getTime()};typeof performance!="undefined"&&
245
+ performance.now&&(y=function(){return performance.now()});var F=y(),J=function(e){var l="",m=!1,c="";e.startsWith("webrtc://")?l="/rtc/v1/play/":e.startsWith("brtc://")&&(l="/brtc/v3/pullstream",m=!0,c=e.replace("brtc://","webrtc://"));var u=e.indexOf("://");if(u==-1)return!1;var A="";if(e.indexOf("?")>=0){var z=e.indexOf("?");A=e.substr(z+1);e=e.substr(0,z)}var b=e.indexOf("/",u+3);z=e.substr(0,u);u=e.substring(u+3,b);var M=e.substring(b),w=M.lastIndexOf("/"),Y="";b=u.indexOf(":");b>0&&(Y=u.substring(b+
246
+ 1),u=u.substring(0,b));b=M.substring(1,w);M=M.substring(w+1);w=M.lastIndexOf(".");w>0&&(M=M.substring(0,w));w="";A.indexOf("vhost=")>0&&(w=A.substr(A.indexOf("vhost=")+6),w.indexOf("&")>0&&(w=w.substr(0,w.indexOf("&"))));u===w&&/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(u)&&(w="_default_vhost_");e={url:e,schema:z,server:u,port:Y,vhost:w,app:b,stream:M};e.user_query={};if(A.length!==0){A.indexOf("?")>=0&&(A=A.split("?")[1]);A=A.split("&");for(Y=0;Y<A.length;Y++)w=A[Y].split("="),e[w[0]]=w[1],e.user_query[w[0]]=
247
+ w[1];e.domain&&(e.vhost=e.domain)}z==="webrtc"||z==="rtc"?(z="",e.port||(e.user_query.schema==="https"?(e.port=443,z=e.user_query.schema||"https"):K.location.href.indexOf("https://")===0?(e.port=443,z=e.user_query.schema||"https"):e.port=1985)):m&&(K.location.href.indexOf("https://")===0?(z="https",e.port=e.por||443):(z="http",e.port=e.por||80));c||="rtmp://"+u+"/"+b+"/"+M;z=z?z+":":K.location.protocol;(Y=e.port)||(Y=z==="https:"?Y||443:Y||1985);l=l||"/live/webrtc/play/";u=z+"//"+e.server+":"+Y+l;
248
+ for(var G in e.user_query)G!=="api"&&G!=="play"&&(u+="&"+G+"="+e.user_query[G]);u=u.replace(l+"&",l+"?");m={apiUrl:u,streamUrl:c,schema:z,urlObject:e,port:Y,is_brtc:m};m.tid=Number(parseInt((new Date).getTime()*Math.random()*100)).toString(16).slice(0,7);return m},x=function(e,l,m,c){let u=null;u=K.XMLHttpRequest?new K.XMLHttpRequest:new K.ActiveXObject("Microsoft.XMLHTTP");u.addEventListener("error",function(A){c&&c("REQUEST:"+A.type)});u.onreadystatechange=function(){if(u.readyState===4)if(u.status===
249
+ 200){var A=JSON.parse(u.responseText);m&&m(A)}else c&&c("STATUS:"+u.status+":"+u.statusText)};u.open("POST",e,!0);u.setRequestHeader("Content-Type","application/json");u.send(l);return u},I=function(e){var l=e.lastIndexOf("/"),m=e.indexOf("?");l=e.indexOf(".",l+1);var c="";l>0&&(m>0?l>m||(c=e.substring(l,m).toLowerCase()):c=e.substring(l).toLowerCase(),l=c.lastIndexOf("."),l>0&&(c=c.substring(l)));return c},L=void 0,N=void 0,Q=void 0;"classList"in document.documentElement?(L=function(e,l){return e.classList!==
250
+ void 0&&e.classList.contains(l)},N=function(e,l){return e.classList.add(l)},Q=function(e,l){return e.classList.remove(l)}):(L=function(e,l){return(new RegExp("\\b"+l+"\\b")).test(e.className)},N=function(e,l){L(e,l)||(e.className+=" "+l)},Q=function(e,l){e.className=e.className.replace(new RegExp("\\b"+l+"\\b","g"),"")});K.hasClass=L;K.addClass=N;K.removeClass=Q;/MSIE 8\.0/.test(navigator.userAgent);var Z=function(e){e=parseInt(e);var l=parseInt(e/3600),m=parseInt(e%3600/60);e=parseInt(e%60);var c=
251
+ "";l>0&&(c+=l+":");c=m>=10?c+(m+":"):m>0?c+("0"+m+":"):c+"00:";return e>=10?c+e:c+("0"+e)},ca=function(e){var l=!1,m=!1,c=this;c._config=e||{};c.peer_conn=null;c.danmuSetting={};typeof c._config.controlbar==="undefined"&&(c._config.controlbar=!0);c._config.hideControlbarTimeout||(c._config.hideControlbarTimeout=1E4);typeof c._config.defVolume==="undefined"&&(c._config.defVolume=61.25);c.setRtcstream=function(d){this.videoEl&&(this.videoEl.srcObject=d,this.videoEl.play(),this.setplaystate(!0),this.startHideControlbar(this))};
252
+ c.onfullscrchange=function(d){Na()?(this.isFullscr=!0,this.setupFullscrBtn&&this.setupFullscrBtn.setAttribute("title",pa("exitFullScreen","Exit full screen"))):(this.setupFullscrBtn&&(Q(this.playerElm,"zwp-fullscreen"),this.setupFullscrBtn.setAttribute("data-action","enterfullscreen"),this.setupFullscrBtn.setAttribute("title",pa("enterFullScreen","Enter full screen"))),this.isFullscr=!1);this.isFullscrWin||this.reposDanmuToolbar(this.isFullscr);console.log("fullscrchange:"+d.type)}.bind(c);c.on_btnclick=
253
+ function(d){if(d.currentTarget&&this.btnBindZwp){d=d.currentTarget;var h=d.getAttribute("data-action");h==="play"?this._config.disablePlayBtn||(this.isPlaying?this.videoEl&&(this.videoEl.paused||this.videoEl.ended)&&(this.videoEl.play(),this.setplaystate(!0)):this._config.url&&this.play(this._config.url)):h==="pause"?this._config.disablePlayBtn||!this.videoEl||this.videoEl.paused||this.videoEl.ended||(this.videoEl.pause(),this.setplaystate(!1)):h==="mute"?this.videoEl&&(this.videoEl.muted||this.setMuted(!0)):
254
+ h==="unmute"?this.videoEl&&this.videoEl.muted&&this.setMuted(!1):h==="enterfullscreen"?this.setFullscreen(!0,d):h==="exitfullscreen"?this.setFullscreen(!1,d):h==="enterfullscreenWin"?this.setFullscreenWin(!0,d):h==="exitfullscreenWin"?this.setFullscreenWin(!1,d):h==="showMediainfo"?this.showMediainfo():h==="snapshot"?this.doSnapshot():h==="pictureInPicture"&&this.togglePictureInPicture()}}.bind(c);c.setFullscreen=function(d,h){if(d){if(!Na()&&this.playerElm){d=this.playerElm;var q=this.videoEl;d.requestFullscreen?
255
+ d.requestFullscreen():d.webkitRequestFullscreen?d.webkitRequestFullScreen():d.mozRequestFullScreen?d.mozRequestFullScreen():d.msRequestFullscreen?d.msRequestFullscreen():d.oRequestFullscreen?d.oRequestFullscreen():q.webkitEnterFullScreen?q.webkitEnterFullScreen():(q=document.documentElement,q.requestFullscreen?q.requestFullscreen():q.mozRequestFullScreen?q.mozRequestFullScreen():q.webkitRequestFullScreen?q.webkitRequestFullScreen():(q=document.body,document.documentElement.style.cssText="width:100%;height:100%;overflow:hidden;",
256
+ q.style.cssText="width:100%;height:100%;overflow:hidden;",d.style.cssText="width:100%;height:100%;overflow:hidden;;margin:0px;padding:0px;",document.IsFullScreen=!0));N(this.playerElm,"zwp-fullscreen");h.setAttribute("data-action","exitfullscreen");if(!this.setupFullscrBtn){d=this.onfullscrchange;q=this.videoEl;var C=document.webkitExitFullscreen||document.webkitCancelFullScreen?"webkitfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":document.msExitFullscreen?"MSFullscreenChange":
257
+ "webkitfullscreenchange";document.addEventListener("fullscreenchange",d,!1);C&&document.addEventListener(C,d,!1);q&&Va&&(q.addEventListener("webkitbeginfullscreen",d),q.addEventListener("webkitendfullscreen",d));this.setupFullscrBtn=h}}}else Na()&&this.playerElm&&(d=this.playerElm,q=document.documentElement,q.exitFullscreen?q.exitFullscreen():q.mozCancelFullScreen?q.mozCancelFullScreen():q.webkitCancelFullScreen?q.webkitCancelFullScreen():document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?
258
+ document.webkitCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.oRequestFullscreen?document.oCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():(q=document.body,document.documentElement.style.cssText="",q.style.cssText="",d.style.cssText="",document.IsFullScreen=!1),Q(this.playerElm,"zwp-fullscreen"),h.setAttribute("data-action","enterfullscreen"))}.bind(c);c.setFullscreenWin=
259
+ function(d,h){this.playerElm&&(d?this.isFullscrWin||(N(this.playerElm,"zwp-fullscreen-win"),h.setAttribute("data-action","exitfullscreenWin"),this.isFullscrWin=!0,this.reposDanmuToolbar(!0),(d=this.playerElm.parentNode)&&d.tagName!=="BODY"&&(this.oldWrapZIndex=d.style.zIndex,d.style.zIndex=99999999)):this.isFullscrWin&&(typeof this.oldWrapZIndex!=="undefined"&&(d=this.playerElm.parentNode,d.style.zIndex=this.oldWrapZIndex,delete this.oldWrapZIndex),Q(this.playerElm,"zwp-fullscreen-win"),h.setAttribute("data-action",
260
+ "enterfullscreenWin"),delete this.isFullscrWin,this.reposDanmuToolbar(!1)))}.bind(c);c.setMuted=function(d){this.videoEl&&(this.videoEl.muted=d)&&(this.oldVolume=this.videoEl.volume);d?(N(this.playerElm,"zwp-muted"),this.muteBtn&&this.muteBtn.setAttribute("data-action","unmute")):(this.oldVolume&&(this.videoEl.volume=this.oldVolume,delete this.oldVolume),Q(this.playerElm,"zwp-muted"),this.muteBtn&&this.muteBtn.setAttribute("data-action","mute"));this.mutedTipBox&&(this.popup_layers.removeChild(this.mutedTipBox),
261
+ this.popup_layers.style.display=null,delete this.mutedTipBox)}.bind(c);c.setVolume=function(d){this.videoEl&&(this.videoEl.volume=d)}.bind(c);c.startHideControlbar=function(d){d.controlbar&&!d._config.fixedControlbar&&(d.hideControlbarTime=(new Date).getTime()+d._config.hideControlbarTimeout,d.hideControlbarTimer||(d.hideControlbarTimer=K.setInterval(function(){(new Date).getTime()>=d.hideControlbarTime&&(K.clearInterval(d.hideControlbarTimer),delete d.hideControlbarTimer,Ga(d.controlbar,1E3,function(h){h.style.display=
262
+ "none";N(d.playerElm,"hide-cursor");d.isControlbarhidden=!0;typeof d._config.onhideControlbar=="function"&&d._config.onhideControlbar.call(d)}))},1E3)))}.bind(c);c.buildProgressBar=function(){var d={};if(this.controlbar){var h=this.controlbar;d.rail=h.querySelector(".zwp__time-rail");d.timeInfo=h.querySelector(".zwp__time-info");if(this._config.isLive)d.rail&&(Q(d.rail,"has-duration"),N(d.rail,"zwp-hidden")),this.progressBar&&this.progressBar.streamtype||(d.timeInfo&&(d.timeInfo.innerHTML='<div class="zwp-streamtype zwp-label">Live</div>',
263
+ d.streamtype=h.querySelector(".zwp-streamtype")),this.progressBar=d);else if(d.timeInfo&&(this.progressBar&&this.progressBar.streamtype?this.progressBar.streamtype.innerHTML="VOD":(d.timeInfo.innerHTML='<div class="zwp-streamtype zwp-label">VOD</div>',d.streamtype=h.querySelector(".zwp-streamtype"))),d.rail||(h.insertAdjacentHTML("beforeend",'<div class="zwp__time-rail"></div>'),d.rail=h.querySelector(".zwp__time-rail")),Q(d.rail,"zwp-hidden"),N(d.rail,"has-duration"),this._config.disableSeek&&N(d.rail,
264
+ "zwp_disabled"),this.progressBar&&this.progressBar.total)this.progressBar.rail&&this._config.useProgressTooltip&&(h=this.progressBar.rail.querySelector(".zwp__time-float"))&&(q=h.querySelector(".zwp__time-thumbnail"),q||(h.insertAdjacentHTML("afterbegin",'<div class="zwp__time-thumbnail"></div>'),q=h.querySelector(".zwp__time-thumbnail"),this.progressBar.thumbnails=q),this._config.thumbnails?(O=this._config.thumbnails,q&&(O.rowsize=typeof O.row=="number"?O.row:Math.ceil(Math.sqrt(O.total)),q.style.width=
265
+ O.width+"px",q.style.height=O.height+"px",q.style.backgroundImage="url("+O.url+")"),h.style.width=4+O.width+"px",h.style.height=4+O.height+"px",N(h,"zwp__thumbnail")):(h.style.width=null,h.style.height=null,q&&(q.style.width="0px",q.style.height="0px",q.style.backgroundImage=null),Q(h,"zwp__thumbnail")));else{var q='<span class="zwp__time-total zwp__time-slider"><span class="zwp__bar zwp__time-buffering"></span><span class="zwp__bar zwp__time-loaded"></span><span class="zwp__bar zwp__time-current"></span><span class="zwp__time-chapter"></span><span class="zwp__time-hovered no-hover"></span><span class="zwp__time-thumb"><span class="zwp__time-thumb-content"></span></span>';
266
+ if(this._config.useProgressTooltip){var C="",H="",P="";if(typeof this._config.thumbnails==="object"&&this._config.thumbnails!=null){var O=this._config.thumbnails;typeof O.width=="number"&&typeof O.height=="number"&&typeof O.total=="number"&&(O.rowsize=typeof O.row=="number"?O.row:Math.ceil(Math.sqrt(O.total)),P=' style="width: '+(4+O.width)+"px; height: "+(4+O.height)+'px;"',H=" zwp__thumbnail",C='<div class="zwp__time-thumbnail" style="width: '+O.width+"px;height: "+O.height+"px; background-image: url("+
267
+ O.url+');"></div>')}q+='<div class="zwp__time-float'+H+'"'+P+">"+C+'<span class="zwp__time-float-current">0:00</span><span class="zwp__time-float-corner corner_external"></span><span class="zwp__time-float-corner corner_internal"></span></div>'}d.rail.innerHTML=q+"</span>";d.buffering=h.querySelector(".zwp__time-buffering");d.total=h.querySelector(".zwp__time-total");d.loaded=h.querySelector(".zwp__time-loaded");d.current=h.querySelector(".zwp__time-current");d.thumb=h.querySelector(".zwp__time-thumb");
268
+ d.timefloat=h.querySelector(".zwp__time-float");d.timefloatcurrent=h.querySelector(".zwp__time-float-current");d.thumbnails=h.querySelector(".zwp__time-thumbnail");d.slider=h.querySelector(".zwp__time-slider");d.hovered=h.querySelector(".zwp__time-hovered");d.chapters=h.querySelector(".zwp__time-chapter");d.newTime=0;d.forcedHandlePause=!1;d.buffering.style.display="none";d.slider.addEventListener("dragstart",function(){return!1});this.progressBar=d;this.showTimefloat=function(S){if(this._config.useProgressTooltip){var U=
269
+ S.originalEvent&&S.originalEvent.changedTouches?S.originalEvent.changedTouches[0].pageX:S.changedTouches?S.changedTouches[0].pageX:S.pageX;S=this.progressBar;var g=this.videoEl.duration;var r=B(S.total);var t=S.total.offsetWidth;U<r.left?U=r.left:U>t+r.left&&(U=t+r.left);U-=r.left;r=U/t;S=this.progressBar;S.timefloatcurrent.innerHTML=Z(g*r);S.thumbnails&&this._config.thumbnails?(g=this._config.thumbnails,r=Math.floor(r*g.total),r>=g.total&&(r=g.total-1),g.rowsize!=0&&(S.thumbnails.style.backgroundPosition=
270
+ "-"+r%g.rowsize*g.width+"px -"+g.height*Math.floor(r/g.rowsize)+"px")):(g=7*S.timefloatcurrent.innerHTML.length+10,g<40&&(g=40),S.timefloat.style.width=g+"px");g=S.timefloat.offsetWidth/2;S.timefloat.style.left=(U<g?g:U>t-g?t-g:U)+"px";S.timefloat.style.display="block"}}.bind(this);d.slider.addEventListener("mouseenter",function(S){var U=this;if(U.videoEl){var g=U.videoEl.duration;isNaN(g)||g===Infinity||S.target!==d.slider||(d.bindMouseMoveEvent||(d.slider.addEventListener("mousemove",function(r){var t=
271
+ r.target;(t===d.slider||t.closest(".zwp__time-slider"))&&U.showTimefloat(r)}),d.bindMouseMoveEvent=!0),d.timefloat&&(d.timefloat.style.display="block"))}}.bind(this));d.slider.addEventListener("mouseleave",function(){if(this.videoEl){var S=this.videoEl.duration;isNaN(S)||S===Infinity||l||!d.timefloat||(d.timefloat.style.display="none")}}.bind(this));var V=function(S,U){var g=this,r=d.slider.offsetWidth,t=B(d.slider);t=S.pageX-t.left;t<0?t=0:t>r&&(t=r);r=(t*100/r).toFixed(4);d.thumb.style.left=r+"%";
272
+ U?(g.seekTimeProgress(r),g.lastSeekProgress=r):typeof g.lastSeekProgress!="undefined"&&Math.abs(r-g.lastSeekProgress)>1&&(g.lastSeekProgress=r,g.seekTimer||(g.seekTimer=setTimeout(function(){g.seekTimeProgress(g.lastSeekProgress);delete g.seekTimer},1E3)));S.preventDefault();S.stopPropagation()}.bind(this);this.on_progressbar_mousemove=function(S){var U=S.target,g;if(g=l)a:if(g=d.slider,U===g)g=!0;else{for(;U.parentNode;){if(U.parentNode===g){g=!0;break a}U=U.parentNode}g=!1}g&&V(S)}.bind(this);this.on_progressbar_mouseup=
273
+ function(S){if(l){document.removeEventListener("mousemove",this.on_progressbar_mousemove);document.removeEventListener("mouseup",this.on_progressbar_mouseup);l=!1;delete this.isTrackingProgress;this.seekTimer&&(clearTimeout(this.seekTimer),delete this.seekTimer);if(S.target&&(S.target.parentNode==d.thumb||S.target==d.thumb)){var U=d.slider.offsetWidth,g=B(d.slider);S=S.pageX-g.left;S<0?S=0:S>U&&(S=U);U=(S*100/U).toFixed(4);typeof this.lastSeekProgress!="undefined"?Math.abs(U-this.lastSeekProgress)>
274
+ 1&&this.seekTimeProgress(U):this.seekTimeProgress(U)}delete this.lastSeekProgress}}.bind(this);this.on_progressbar_mousedown=function(S){l||this._config.disableSeek||(c.isTrackingProgress=!0,V(S,!0),document.addEventListener("mousemove",this.on_progressbar_mousemove),document.addEventListener("mouseup",this.on_progressbar_mouseup),l=!0,S.preventDefault(),S.stopPropagation())}.bind(this);d.slider.addEventListener("mousedown",this.on_progressbar_mousedown)}}}.bind(c);c.updateProgressBarType=function(){if(this.controlbar){var d=
275
+ this.controlbar.querySelector(".zwp__time-rail");this._config.isLive?(d&&(Q(d,"has-duration"),N(d,"zwp-hidden")),this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.innerHTML="Live",this.progressBar.streamtype.style.display="block")):(d&&(Q(d,"zwp-hidden"),N(d,"has-duration"),this._config.disableSeek&&N(d,"zwp_disabled")),this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.innerHTML="VOD",this.progressBar.streamtype.style.display="block"))}}.bind(c);
276
+ c.updateDuration=function(d){if(d.controlbar){var h=d.controlbar.querySelector(".zwp__duration-container"),q=d.videoEl.duration;if(isNaN(q)||q===Infinity)h.style.display="none",d._config.isLive=!0;else{h.style.display="block";h=h.querySelector(".zwp__duration");var C=parseInt(q/3600),H=parseInt(q%3600/60);q=parseInt(q%60);var P="";C>0&&(P+=C+":");P=H>=10?P+(H+":"):H>0?P+("0"+H+":"):P+"00:";h.innerHTML=q>=10?P+q:P+("0"+q);d.chapters&&setTimeout(function(){this.loadChapters()}.bind(d),1E3)}d.updateProgressBarType();
277
+ d.syncUI()}}.bind(c);c.setProgressRail=function(d){var h=d!==void 0?d.target||d.detail.target:this.videoEl,q=null;h&&h.buffered&&h.buffered.length>0&&h.buffered.end&&this.videoEl.duration?q=h.buffered.end(h.buffered.length-1)/this.videoEl.duration:h&&h.bytesTotal!==void 0&&h.bytesTotal>0&&h.bufferedBytes!==void 0?q=h.bufferedBytes/h.bytesTotal:d&&d.lengthComputable&&d.total!==0&&(q=d.loaded/d.total);q!==null&&(q=Math.min(1,Math.max(0,q)),this.progressBar&&this.progressBar.loaded&&(this.progressBar.loaded.style.width=
278
+ q*100+"%"))}.bind(c);c.updateProgress=function(d){if(!this.isTrackingProgress&&this.progressBar&&this.progressBar.thumb){var h=this.videoEl.duration;!isNaN(h)&&h!==Infinity&&h>0&&(d+.3>=h&&(d=h),d=d/h*100,this.progressBar.thumb.style.left=d+"%",this.progressBar.current&&(this.progressBar.current.style.width=d/100*100+"%"))}}.bind(c);c.seekTimeProgress=function(d){if(this.videoEl){var h=this.videoEl.duration;isNaN(h)||h===Infinity||(this.videoEl.currentTime=h*d/100,this.progressBar.current&&(this.progressBar.current.style.width=
279
+ d+"%"))}}.bind(c);c.seekTimeProgressByTime=function(d){if(this.videoEl){var h=this.videoEl.duration;isNaN(h)||h===Infinity||(this.videoEl.currentTime=d,this.progressBar.current&&(this.progressBar.current.style.width=d/h*100+"%"))}}.bind(c);c.on_speedItemclick=function(d){d.stopPropagation();d=d.currentTarget;if(!L(d,"active")){var h=parseFloat(d.innerText),q=d.parentNode.querySelector(".active");q&&Q(q,"active");N(d,"active");this.videoEl&&(this.videoEl.playbackRate=h);if(q=this.controlbar.querySelector(".zwp-speedBtn"))q.innerHTML=
280
+ h==1?pa("speed","Speed"):d.innerText}var C=d.parentNode;C.style.display="none";setTimeout(function(){C.style.display=null},1E3)}.bind(c);c.resetSpeedMenu=function(){if(this.controlbar){var d=this.controlbar.querySelector(".zwp-speed-item.active");if(d&&d.innerText!=="1.0x"){var h=this.controlbar.querySelector(".zwp-speedBtn");h&&(h.innerHTML=pa("speed","Speed"));Q(d,"active");d=d.parentNode.querySelectorAll("li.zwp-speed-item");if(d.length>0)for(h=0;h<d.length;h++)if(d[h].innerText==="1.0x"){N(d[h],
281
+ "active");break}}}}.bind(c);c.syncUI=function(){if(this._config.isLive){var d=this.controlbar.querySelector(".zwp-speedButton");d&&this.controlbar.removeChild(d);Q(this.controlbar,"zwp-vodplayer")}else{if(this._config.speedButton&&(d=this.controlbar.querySelector(".zwp-speedButton"),!d)){var h=this.controlbar.querySelector(".zwp-infoButton")||this.controlbar.querySelector(".zwp-optionButton")||this.controlbar.querySelector(".zwp-volume-docker");if(h){var q=kb();d=document.createElement("div");this.controlbar.insertBefore(d,
282
+ h);d.outerHTML=q;d=this.controlbar.querySelectorAll(".zwp-speedMenu>li.zwp-speed-item");d.length>0&&d.forEach(function(C){C.addEventListener("click",c.on_speedItemclick)})}}N(this.controlbar,"zwp-vodplayer")}}.bind(c);c.onKeydown=function(d){if(d)if(d.keyCode===27)if(this.contextMenu)this.hideContextMenu(),d.stopPropagation(),d.preventDefault();else{if(this.isFullscrWin&&this.controlbar){var h=this.controlbar.querySelector(".zwp-fullscrWinBtn");h&&(this.setFullscreenWin(!1,h),d.stopPropagation(),
283
+ d.preventDefault())}}else d.keyCode!==13&&(d.keyCode===38?(d.preventDefault(),this.videoEl&&(d=this.videoEl.volume,d+=.05,d>1&&(d=1),this.setVolume(d),this.setMuted(!1),h=parseInt(d*100)+"%",h={icon:"speaker",text:h},this.toast(h,1200,!1),this.positionVolumeThumb&&this.positionVolumeThumb(d))):d.keyCode===40?(d.preventDefault(),this.videoEl&&(d=this.videoEl.volume,d-=.05,d<0&&(d=0),this.setVolume(d),this.setMuted(d===0),h=parseInt(d*100)+"%",d===0&&(h=pa("muted","Muted")),h={icon:"speaker",text:h},
284
+ this.toast(h,1200,!1),this.positionVolumeThumb&&this.positionVolumeThumb(d))):d.keyCode===32?(d.preventDefault(),this._config.isLive||this._config.disablePlayBtn||!this.videoEl||(this.videoEl.paused||this.videoEl.ended?(this.videoEl.play(),this.setplaystate(!0)):(this.videoEl.pause(),this.setplaystate(!1)))):d.keyCode!==77&&d.keyCode!==109||!this.videoEl||(this.videoEl.muted?(this.toast(pa("unmuted","Unmuted"),1E3,!1,!0),this.setMuted(!1)):(this.toast(pa("muted","Muted"),1E3,!1,!0),this.setMuted(!0))))}.bind(c);
285
+ c.on_colorSliderChange=function(d){var h=d.currentTarget;d=h.getAttribute("data-action");this.colors||(this.colors={brightness:0,contrast:0,saturation:0,hue:0});ab(h);if(typeof this.colors[d]!=="undefined"&&(h=parseInt(h.value),d==="hue"?this.colors.hue=parseInt(h*180/100):this.colors[d]=h,this.videoEl)){d=null;h=this.colors;h.brightness&&(d="brightness("+(100+h.brightness)+"%)");if(h.contrast){var q=100+h.contrast;d=(d?d+" ":"")+("contrast("+q+"%)")}h.saturation&&(q=100+h.saturation,d=(d?d+" ":"")+
286
286
  ("saturate("+q+"%)"));h.hue&&(h=h.hue,d=(d?d+" ":"")+("hue-rotate("+h+"deg)"));this.videoEl.style.filter=d}}.bind(c);c.createColorSettingPanel=function(){var d=this,h='<div class="zwp-colorSettingPanel zwp-popupwindow"><button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">\u89c6\u9891\u8272\u5f69\u8c03\u6574</div><div class="form-row"><label class="row-label">\u4eae\u5ea6</label><div class="row-content">'+Ma("","brightness")+'</div></div><div class="form-row"><label class="row-label">\u5bf9\u6bd4\u5ea6</label><div class="row-content">'+
287
287
  Ma("","contrast")+'</div></div><div class="form-row"><label class="row-label">\u9971\u548c\u5ea6</label><div class="row-content">'+Ma("","saturation")+'</div></div><div class="form-row"><label class="row-label">\u8272\u8c03</label><div class="row-content">'+Ma("","hue")+'</div></div><div class="form-row form-bottombar"><button class="zwp-form-button action-item" data-action="resetcolors">\u91cd\u7f6e</button></div></div>';d.overlay_layers.insertAdjacentHTML("beforeend",h);h=d.overlay_layers.querySelector(":scope > .zwp-colorSettingPanel");
288
- var q=h.querySelector(".closeBtn");q&&q.addEventListener("click",function(C){C.stopPropagation();var G=C.currentTarget.closest(".zwp-colorSettingPanel");Ga(G,500,function(){G.remove()});delete d.colorSettingPanel});q=h.querySelectorAll('input[type="range"]');0<q.length&&q.forEach(function(C){C.addEventListener("input",c.on_colorSliderChange);if(d.colors){var G=C.getAttribute("data-action");"undefined"!==typeof d.colors[G]&&(C.value=d.colors[G],ab(C))}});h.addEventListener("mousedown",function(C){C.stopPropagation()});
289
- h.addEventListener("dblclick",function(C){C.stopPropagation()});h.addEventListener("click",function(C){C.stopPropagation()});(q=h.querySelector(".zwp-form-button"))&&q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();C=C.currentTarget.closest(".zwp-colorSettingPanel").querySelectorAll('input[type="range"]');0<C.length&&C.forEach(function(G){if(0!==parseInt(G.value))if(G.value=0,document.createEvent){const O=document.createEvent("HTMLEvents");O.initEvent("input",!0,!1);G.dispatchEvent(O)}else document.createEventObject&&
290
- G.fireEvent("input")})});return d.colorSettingPanel=h}.bind(c);var l=function(d,h){if(d=d.querySelector(".zwp-optionPanel"))d=d.querySelectorAll(".zwp_switch"),0<d.length&&d.forEach(function(q){var C=q.getAttribute("data-action");-1!==h.indexOf(C)&&K(q,"switch_on")&&P(q,"switch_on")})};c.on_optionItemclick=function(d){d.stopPropagation();d=d.currentTarget;K(d,"zwp_switch")&&Oa(d);var h=d.getAttribute("data-action");if("mirror"===h)this.videoEl&&(d=K(d,"switch_on"),this._config.video_mirror=d,this.flipMirrorVideo(),
291
- d&&(this._config.video_rotated=0,l(this.controlbar,["rotated270","rotated90"])));else if("flip"===h)this.videoEl&&(d=K(d,"switch_on"),this._config.video_flip=d,this.flipMirrorVideo(),d&&(this._config.video_rotated=0,l(this.controlbar,["rotated270","rotated90"])));else if("rotated90"===h)this.videoEl&&(d=K(d,"switch_on"),this._config.video_rotated=d?90:0,this.rotateVideo(),d&&(this._config.video_mirror=!1,this._config.video_flip=!1,l(this.controlbar,["mirror","flip","rotated270"])));else if("rotated270"===
292
- h)this.videoEl&&(d=K(d,"switch_on"),this._config.video_rotated=d?270:0,this.rotateVideo(),d&&(this._config.video_mirror=!1,this._config.video_flip=!1,l(this.controlbar,["mirror","flip","rotated90"])));else if("loop"===h)d=K(d,"switch_on"),this._config.loop=d;else if("showColorConfig"===h){var q=d.closest(".zwp-optionPanel");if(q&&q.closest(".zwp-optionButton")){d=this.overlay_layers.querySelector(":scope > .zwp-colorSettingPanel");if(!d&&(d=this.createColorSettingPanel(),!d))return;d.style.display=
293
- "block";q.style.display="none";setTimeout(function(){q.style.display=null},1E3)}}}.bind(c);c.flipMirrorVideo=function(){var d=null;this._config.video_flip&&(d="rotateX(180.00deg)");this._config.video_mirror&&(d=d?d+" rotateY(180.00deg)":" rotateY(180.00deg)");this.videoEl.style.width="100%";this.videoEl.style.height="100%";this.videoEl.style.transform=d}.bind(c);c.rotateVideo=function(){var d=null,h=this.videoEl.parentNode;if(h&&h===this.videoWrapper)if(this._config.video_rotated){var q=h.offsetHeight;
294
- h=h.offsetWidth;var C=this.videoEl.videoHeight;this.videoEl.videoWidth&&C&&(this.videoEl.style.width=q+"px",this.videoEl.style.height=h+"px",this.videoEl.style.transformOrigin="center center",C=(h-q)/2,q=(q-h)/2,90===this._config.video_rotated?d="translate("+C+"px, "+q+"px) rotate(0.25turn)":270===this._config.video_rotated&&(d="translate("+C+"px, "+q+"px) rotate(0.75turn)"),this.videoEl.style.transform=d)}else this.videoEl.style.transform&&(this.videoEl.style.transform=null,this.videoEl.style.width=
295
- "100%",this.videoEl.style.height="100%")}.bind(c);c.setupEventsHandler=function(){var d=this,h=function(O){d.loadingOverlay&&(d.loadingOverlay.style.display="none");d.videoEl.play();d.setplaystate(!0);d.updateDuration(d);d._config.isLive&&d.controlbar&&(d.controlbar.querySelector(".zwp__duration-container").style.display="none");d._config.fluid&&(O=d.videoEl,N(d.playerElm,"zwp-fluid"),d.playerElm.style.maxWidth="100%",d.playerElm.style.width="100%",d.playerElm.style.height="0",d.playerElm.style.paddingTop=
296
- O.videoHeight&&O.videoWidth?100*O.videoHeight/O.videoWidth+"%":"64px");d.buildProgressBar()};d.videoEl.addEventListener("loadedmetadata",h);var q=d.videoEl,C=function(O){var U=!0;"ended"===O.type?!d._config.isLive&&d._config.loop?(L.setTimeout(function(){d.videoEl.currentTime=0;d.videoEl.play()},1E3),U=!1):(d.isEnded=!0,d.setplaystate(!1),d._config.reconnect&&d.mpegtsPlayer&&(setTimeout(function(){d.lastDecodedFrames=0;d.closecall(d);d.openMpegts()},1E3),U=!1)):"play"===O.type?(delete d.isEnded,"undefined"!==
297
- typeof d.postSeekTime&&(d.seekTimeProgressByTime(d.postSeekTime),delete d.postSeekTime)):"pause"===O.type?d.setplaystate(!1):"playing"===O.type&&d.setplaystate(!0);d.progressBar&&d.progressBar.buffering&&("play playing pause seeked ended error".split(" ").includes(O.type)?d.progressBar.buffering.style.display="none":["seeking","waiting","loadeddata"].includes(O.type)&&(d.progressBar.buffering.style.display=""));U&&"function"===typeof d._config.onmediaevent&&d._config.onmediaevent.call(d,O)},G=function(O){var U=
298
- this.currentTime;"undefined"!==typeof d.postSeekTime&&(U=d.postSeekTime);if("function"===typeof d._config.ontimeupdate)d._config.ontimeupdate(U);!d.timeSpan&&d.controlbar&&(d.timeSpan=d.controlbar.querySelector(".zwp__currenttime"));d.timeSpan&&(d.timeSpan.innerHTML=Z(U));d.updateProgress(U);d.setProgressRail(O);d.renderSubtitles(U)};q.addEventListener("play",C);q.addEventListener("playing",C);q.addEventListener("pause",C);q.addEventListener("seeked",C);q.addEventListener("ended",C);q.addEventListener("error",
299
- C);q.addEventListener("seeking",C);q.addEventListener("waiting",C);q.addEventListener("timeupdate",G);document.addEventListener("keydown",d.onKeydown);c.videoEventsSetuped=!0;c.removeVideoEventHandlers=function(){if(this.videoEventsSetuped){var O=this.videoEl;O.removeEventListener("loadedmetadata",h);O.removeEventListener("play",C);O.removeEventListener("playing",C);O.removeEventListener("pause",C);O.removeEventListener("seeked",C);O.removeEventListener("ended",C);O.removeEventListener("error",C);
300
- O.removeEventListener("seeking",C);O.removeEventListener("waiting",C);O.removeEventListener("timeupdate",G);document.removeEventListener("keydown",this.onKeydown);delete this.videoEventsSetuped}}}.bind(c);c.showMediainfo=function(d){var h=this;if(h.overlay_layers){var q=h.overlay_layers.querySelector(".zwp__mediainfo-viewer");if(q){if(!d){d=q.querySelector(".closeBtn");var C=document.createEvent("Event");C.initEvent("click",!0,!0);d.dispatchEvent(C)}}else{d='<button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">'+
301
- (qa("media-prop","Media properties")+"</div>");h.mediaInfo?(C=h.mediaInfo,C.hasVideo&&(d+='<div class="info-item"><span class="info-label">Video</span><span class="info-value">'+C.vCodec+"</span></div>",d+='<div class="info-item"><span class="info-label">Width</span><span class="info-value">'+C.width+"</span></div>",d+='<div class="info-item"><span class="info-label">Height</span><span class="info-value">'+C.height+"</span></div>",d+='<div class="info-item"><span class="info-label">FPS</span><span class="info-value">'+
288
+ var q=h.querySelector(".closeBtn");q&&q.addEventListener("click",function(C){C.stopPropagation();var H=C.currentTarget.closest(".zwp-colorSettingPanel");Ga(H,500,function(){H.remove()});delete d.colorSettingPanel});q=h.querySelectorAll('input[type="range"]');q.length>0&&q.forEach(function(C){C.addEventListener("input",c.on_colorSliderChange);if(d.colors){var H=C.getAttribute("data-action");typeof d.colors[H]!=="undefined"&&(C.value=d.colors[H],ab(C))}});h.addEventListener("mousedown",function(C){C.stopPropagation()});
289
+ h.addEventListener("dblclick",function(C){C.stopPropagation()});h.addEventListener("click",function(C){C.stopPropagation()});(q=h.querySelector(".zwp-form-button"))&&q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();C=C.currentTarget.closest(".zwp-colorSettingPanel").querySelectorAll('input[type="range"]');C.length>0&&C.forEach(function(H){if(parseInt(H.value)!==0)if(H.value=0,document.createEvent){const P=document.createEvent("HTMLEvents");P.initEvent("input",!0,!1);H.dispatchEvent(P)}else document.createEventObject&&
290
+ H.fireEvent("input")})});return d.colorSettingPanel=h}.bind(c);var u=function(d,h){if(d=d.querySelector(".zwp-optionPanel"))d=d.querySelectorAll(".zwp_switch"),d.length>0&&d.forEach(function(q){var C=q.getAttribute("data-action");h.indexOf(C)!==-1&&L(q,"switch_on")&&Q(q,"switch_on")})};c.on_optionItemclick=function(d){d.stopPropagation();d=d.currentTarget;L(d,"zwp_switch")&&Oa(d);var h=d.getAttribute("data-action");if(h==="mirror")this.videoEl&&(d=L(d,"switch_on"),this._config.video_mirror=d,this.flipMirrorVideo(),
291
+ d&&(this._config.video_rotated=0,u(this.controlbar,["rotated270","rotated90"])));else if(h==="flip")this.videoEl&&(d=L(d,"switch_on"),this._config.video_flip=d,this.flipMirrorVideo(),d&&(this._config.video_rotated=0,u(this.controlbar,["rotated270","rotated90"])));else if(h==="rotated90")this.videoEl&&(d=L(d,"switch_on"),this._config.video_rotated=d?90:0,this.rotateVideo(),d&&(this._config.video_mirror=!1,this._config.video_flip=!1,u(this.controlbar,["mirror","flip","rotated270"])));else if(h==="rotated270")this.videoEl&&
292
+ (d=L(d,"switch_on"),this._config.video_rotated=d?270:0,this.rotateVideo(),d&&(this._config.video_mirror=!1,this._config.video_flip=!1,u(this.controlbar,["mirror","flip","rotated90"])));else if(h==="loop")d=L(d,"switch_on"),this._config.loop=d;else if(h==="showColorConfig"){var q=d.closest(".zwp-optionPanel");if(q&&q.closest(".zwp-optionButton")){d=this.overlay_layers.querySelector(":scope > .zwp-colorSettingPanel");if(!d&&(d=this.createColorSettingPanel(),!d))return;d.style.display="block";q.style.display=
293
+ "none";setTimeout(function(){q.style.display=null},1E3)}}}.bind(c);c.flipMirrorVideo=function(){var d=null;this._config.video_flip&&(d="rotateX(180.00deg)");this._config.video_mirror&&(d=d?d+" rotateY(180.00deg)":" rotateY(180.00deg)");this.videoEl.style.width="100%";this.videoEl.style.height="100%";this.videoEl.style.transform=d}.bind(c);c.rotateVideo=function(){var d=null,h=this.videoEl.parentNode;if(h&&h===this.videoWrapper)if(this._config.video_rotated){var q=h.offsetHeight;h=h.offsetWidth;var C=
294
+ this.videoEl.videoHeight;this.videoEl.videoWidth&&C&&(this.videoEl.style.width=q+"px",this.videoEl.style.height=h+"px",this.videoEl.style.transformOrigin="center center",C=(h-q)/2,q=(q-h)/2,this._config.video_rotated===90?d="translate("+C+"px, "+q+"px) rotate(0.25turn)":this._config.video_rotated===270&&(d="translate("+C+"px, "+q+"px) rotate(0.75turn)"),this.videoEl.style.transform=d)}else this.videoEl.style.transform&&(this.videoEl.style.transform=null,this.videoEl.style.width="100%",this.videoEl.style.height=
295
+ "100%")}.bind(c);c.setupEventsHandler=function(){var d=this,h=function(P){d.loadingOverlay&&(d.loadingOverlay.style.display="none");d.videoEl.play();d.setplaystate(!0);d.updateDuration(d);d._config.isLive&&d.controlbar&&(d.controlbar.querySelector(".zwp__duration-container").style.display="none");d._config.fluid&&(P=d.videoEl,N(d.playerElm,"zwp-fluid"),d.playerElm.style.maxWidth="100%",d.playerElm.style.width="100%",d.playerElm.style.height="0",d.playerElm.style.paddingTop=P.videoHeight&&P.videoWidth?
296
+ P.videoHeight*100/P.videoWidth+"%":"64px");d.buildProgressBar()};d.videoEl.addEventListener("loadedmetadata",h);var q=d.videoEl,C=function(P){var O=!0;P.type==="ended"?!d._config.isLive&&d._config.loop?(K.setTimeout(function(){d.videoEl.currentTime=0;d.videoEl.play()},1E3),O=!1):(d.isEnded=!0,d.setplaystate(!1),d._config.reconnect&&d.mpegtsPlayer&&(setTimeout(function(){d.lastDecodedFrames=0;d.closecall(d);d.openMpegts()},1E3),O=!1)):P.type==="play"?(delete d.isEnded,typeof d.postSeekTime!=="undefined"&&
297
+ (d.seekTimeProgressByTime(d.postSeekTime),delete d.postSeekTime)):P.type==="pause"?d.setplaystate(!1):P.type==="playing"&&d.setplaystate(!0);d.progressBar&&d.progressBar.buffering&&("play playing pause seeked ended error".split(" ").includes(P.type)?d.progressBar.buffering.style.display="none":["seeking","waiting","loadeddata"].includes(P.type)&&(d.progressBar.buffering.style.display=""));O&&typeof d._config.onmediaevent==="function"&&d._config.onmediaevent.call(d,P)},H=function(P){var O=this.currentTime;
298
+ typeof d.postSeekTime!=="undefined"&&(O=d.postSeekTime);if(typeof d._config.ontimeupdate==="function")d._config.ontimeupdate(O);!d.timeSpan&&d.controlbar&&(d.timeSpan=d.controlbar.querySelector(".zwp__currenttime"));d.timeSpan&&(d.timeSpan.innerHTML=Z(O));d.updateProgress(O);d.setProgressRail(P);d.renderSubtitles(O)};q.addEventListener("play",C);q.addEventListener("playing",C);q.addEventListener("pause",C);q.addEventListener("seeked",C);q.addEventListener("ended",C);q.addEventListener("error",C);
299
+ q.addEventListener("seeking",C);q.addEventListener("waiting",C);q.addEventListener("timeupdate",H);document.addEventListener("keydown",d.onKeydown);c.videoEventsSetuped=!0;c.removeVideoEventHandlers=function(){if(this.videoEventsSetuped){var P=this.videoEl;P.removeEventListener("loadedmetadata",h);P.removeEventListener("play",C);P.removeEventListener("playing",C);P.removeEventListener("pause",C);P.removeEventListener("seeked",C);P.removeEventListener("ended",C);P.removeEventListener("error",C);P.removeEventListener("seeking",
300
+ C);P.removeEventListener("waiting",C);P.removeEventListener("timeupdate",H);document.removeEventListener("keydown",this.onKeydown);delete this.videoEventsSetuped}}}.bind(c);c.showMediainfo=function(d){var h=this;if(h.overlay_layers){var q=h.overlay_layers.querySelector(".zwp__mediainfo-viewer");if(q){if(!d){d=q.querySelector(".closeBtn");var C=document.createEvent("Event");C.initEvent("click",!0,!0);d.dispatchEvent(C)}}else{d='<button class="closeBtn"><i class="xicon xicon-close"></i></button><div class="form-row form-title">'+
301
+ (pa("media-prop","Media properties")+"</div>");h.mediaInfo?(C=h.mediaInfo,C.hasVideo&&(d+='<div class="info-item"><span class="info-label">Video</span><span class="info-value">'+C.vCodec+"</span></div>",d+='<div class="info-item"><span class="info-label">Width</span><span class="info-value">'+C.width+"</span></div>",d+='<div class="info-item"><span class="info-label">Height</span><span class="info-value">'+C.height+"</span></div>",d+='<div class="info-item"><span class="info-label">FPS</span><span class="info-value">'+
302
302
  C.fps+"</span></div>",d+='<div class="info-item"><span class="info-label">Profile</span><span class="info-value">'+C.profile+"</span></div>",d+='<div class="info-item"><span class="info-label">Level</span><span class="info-value">'+C.level+"</span></div>"),C.hasAudio&&(d+='<div class="info-item"><span class="info-label">Audio</span><span class="info-value">'+C.aCodec+"</span></div>",d+='<div class="info-item"><span class="info-label">SampRate</span><span class="info-value">'+C.sampleRate+"</span></div>",
303
303
  d+='<div class="info-item"><span class="info-label">Channel</span><span class="info-value">'+C.channels+"</span></div>")):h.videoEl?(C=h.videoEl,C.videoWidth&&(d+='<div class="info-item"><span class="info-label">Width</span><span class="info-value">'+C.videoWidth+"</span></div>",d+='<div class="info-item"><span class="info-label">Height</span><span class="info-value">'+C.videoHeight+"</span></div>"),C.duration&&(d+='<div class="info-item"><span class="info-label">Duration</span><span class="info-value">'+
304
- Z(C.duration)+"</span></div>")):d+='<div class="info-item"><div class="row-text">No More Media Info</div></div>';q=document.createElement("div");q.setAttribute("class","zwp__mediainfo-viewer zwp-popupwindow");q.innerHTML=d;h.overlay_layers.appendChild(q);q.addEventListener("click",function(O){O.stopPropagation()});var G=function(O){O.preventDefault();O.stopPropagation();Ga(q,500,function(){q.remove()});h.overlay_layers.removeEventListener("click",G);delete h.infoViewer};d=q.querySelector(".closeBtn");
305
- d.addEventListener("click",G);h.infoViewer=q}}}.bind(c);c.setMediainfo=function(d,h){d={engine:d,hasVideo:h.hasVideo,hasAudio:h.hasAudio};if(h.hasVideo){var q=h.videoCodec;q=0<=q.indexOf("avc1")?"H264/AVC":0<=q.indexOf("hvc")?"H265/HEVC":"Unknown";d.vCodec=q;d.width=h.width;d.height=h.height;d.fps=h.fps;"number"===typeof d.fps&&(d.fps=d.fps.toFixed(2));d.profile=h.profile;d.level=h.level}h.hasAudio&&(q=h.audioCodec,q=0<=q.indexOf("mp4a.40.2")?"AAC-LC":0<=q.indexOf("mp4a.40.5")?"HE-AAC":0<=q.indexOf("mp3")?
306
- "MP3":"Unknown",d.aCodec=q,d.sampleRate=h.audioSampleRate,d.channels=h.audioChannelCount);this.mediaInfo=d}.bind(c);c.loadChapters=function(){var d=this;if(d.chapters){if("string"===typeof d.chapters)if("["===d.chapters.charAt(0))d.chapters=JSON.parse(d.chapters);else{if("http"===d.chapters.substr(0,4))Ra(d.chapters,function(S){if("WEBVTT"===S.substr(0,6))d.chapters=S,d.loadChapters();else if(S=JSON.parse(S))d.chapters=S,d.loadChapters()},function(S){console.warn("get chapter list from "+d.chapters+
307
- " failed!")});else if("WEBVTT"===d.chapters.substr(0,6)){var h=Sa(d.chapters);if(h){for(var q=[],C=0;C<h.body.length;C++){var G=h.body[C];q.push({title:G.content,time:Z(G.from),desc:"no desc",image:null})}d.chapters=q;d.loadChapters()}else delete d.chapters}else delete d.chapters;return}else if(!Array.isArray(d.chapters))return;h=d.videoEl.duration;if(!isNaN(h)&&Infinity!==h){if(h=ob(h,d.chapters))if(q=d.controlbar.querySelector(".zwp__time-chapter"))q.innerHTML=h,h=q.querySelectorAll(".zwp__chapter_dot"),
308
- 0<h.length&&h.forEach(function(S){S.addEventListener("mousedown",function(T){T.stopPropagation();T=La(this.getAttribute("data-time"));d.seekTimeProgressByTime(T)})});if(d._config.chapterButton&&(h=d.controlbar.querySelector(".zwp__time-info"))){var O=h.querySelector(".zwp-chapterButton");O&&O.remove();var U=pb(d.chapters);U&&((q=h.querySelector(".zwp_danmuBarDock"))?q.insertAdjacentHTML("beforebegin",U.html):h.insertAdjacentHTML("beforeend",U.html),O=h.querySelector(".zwp-chapterButton"),h=O.querySelector(".zwp-chapterlist"),
309
- q=h.querySelectorAll(".chapter-item"),0<q.length&&q.forEach(function(S){S.addEventListener("click",function(T){T.stopPropagation();T=La(this.getAttribute("data-time"));d.seekTimeProgressByTime(T)})}),h.addEventListener("mousedown",function(S){S.stopPropagation()}),h.addEventListener("dblclick",function(S){S.stopPropagation()}),O.querySelector(".zwp-chapterBtn").addEventListener("click",function(S){S.stopPropagation();if(S=O.querySelector(".zwp-chapterPanel")){var T=d.overlay_layers.offsetHeight;if(!(100>
310
- T)){T-=100;400<T&&(T=400);var V=U.titleWidth;200<V&&(V=200);S.style.height=T+"px";S.style.width=80+V+10+"px";"block"!==S.style.display?(T=S.querySelector(".zwp-list-inner"),$$(T).niceScroll({cursorborder:"",cursorcolor:"rgb(179 178 178 / 67%)",boxzoom:!1,rightdock:4}),S.style.opacity=1,S.style.display="block"):S.style.display="none"}}}),(h=O.querySelector(".closeBtn"))&&h.addEventListener("click",function(S){S.stopPropagation();var T=S.currentTarget.closest(".zwp-chapterPanel");Ga(T,500,function(){T.style.display=
304
+ Z(C.duration)+"</span></div>")):d+='<div class="info-item"><div class="row-text">No More Media Info</div></div>';q=document.createElement("div");q.setAttribute("class","zwp__mediainfo-viewer zwp-popupwindow");q.innerHTML=d;h.overlay_layers.appendChild(q);q.addEventListener("click",function(P){P.stopPropagation()});var H=function(P){P.preventDefault();P.stopPropagation();Ga(q,500,function(){q.remove()});h.overlay_layers.removeEventListener("click",H);delete h.infoViewer};d=q.querySelector(".closeBtn");
305
+ d.addEventListener("click",H);h.infoViewer=q}}}.bind(c);c.setMediainfo=function(d,h){d={engine:d,hasVideo:h.hasVideo,hasAudio:h.hasAudio};if(h.hasVideo){var q=h.videoCodec;q=q.indexOf("avc1")>=0?"H264/AVC":q.indexOf("hvc")>=0?"H265/HEVC":"Unknown";d.vCodec=q;d.width=h.width;d.height=h.height;d.fps=h.fps;typeof d.fps==="number"&&(d.fps=d.fps.toFixed(2));d.profile=h.profile;d.level=h.level}h.hasAudio&&(q=h.audioCodec,q=q.indexOf("mp4a.40.2")>=0?"AAC-LC":q.indexOf("mp4a.40.5")>=0?"HE-AAC":q.indexOf("mp3")>=
306
+ 0?"MP3":"Unknown",d.aCodec=q,d.sampleRate=h.audioSampleRate,d.channels=h.audioChannelCount);this.mediaInfo=d}.bind(c);c.loadChapters=function(){var d=this;if(d.chapters){if(typeof d.chapters==="string")if(d.chapters.charAt(0)==="[")d.chapters=JSON.parse(d.chapters);else{if(d.chapters.substr(0,4)==="http")Ra(d.chapters,function(V){if(V.substr(0,6)==="WEBVTT")d.chapters=V,d.loadChapters();else if(V=JSON.parse(V))d.chapters=V,d.loadChapters()},function(V){console.warn("get chapter list from "+d.chapters+
307
+ " failed!")});else if(d.chapters.substr(0,6)==="WEBVTT"){var h=Sa(d.chapters);if(h){for(var q=[],C=0;C<h.body.length;C++){var H=h.body[C];q.push({title:H.content,time:Z(H.from),desc:"no desc",image:null})}d.chapters=q;d.loadChapters()}else delete d.chapters}else delete d.chapters;return}else if(!Array.isArray(d.chapters))return;h=d.videoEl.duration;if(!isNaN(h)&&h!==Infinity){if(h=ob(h,d.chapters))if(q=d.controlbar.querySelector(".zwp__time-chapter"))q.innerHTML=h,h=q.querySelectorAll(".zwp__chapter_dot"),
308
+ h.length>0&&h.forEach(function(V){V.addEventListener("mousedown",function(S){S.stopPropagation();S=La(this.getAttribute("data-time"));d.seekTimeProgressByTime(S)})});if(d._config.chapterButton&&(h=d.controlbar.querySelector(".zwp__time-info"))){var P=h.querySelector(".zwp-chapterButton");P&&P.remove();var O=pb(d.chapters);O&&((q=h.querySelector(".zwp_danmuBarDock"))?q.insertAdjacentHTML("beforebegin",O.html):h.insertAdjacentHTML("beforeend",O.html),P=h.querySelector(".zwp-chapterButton"),h=P.querySelector(".zwp-chapterlist"),
309
+ q=h.querySelectorAll(".chapter-item"),q.length>0&&q.forEach(function(V){V.addEventListener("click",function(S){S.stopPropagation();S=La(this.getAttribute("data-time"));d.seekTimeProgressByTime(S)})}),h.addEventListener("mousedown",function(V){V.stopPropagation()}),h.addEventListener("dblclick",function(V){V.stopPropagation()}),P.querySelector(".zwp-chapterBtn").addEventListener("click",function(V){V.stopPropagation();if(V=P.querySelector(".zwp-chapterPanel")){var S=d.overlay_layers.offsetHeight;if(!(S<
310
+ 100)){S-=100;S>400&&(S=400);var U=O.titleWidth;U>200&&(U=200);V.style.height=S+"px";V.style.width=80+U+10+"px";V.style.display!=="block"?(S=V.querySelector(".zwp-list-inner"),$$(S).niceScroll({cursorborder:"",cursorcolor:"rgb(179 178 178 / 67%)",boxzoom:!1,rightdock:4}),V.style.opacity=1,V.style.display="block"):V.style.display="none"}}}),(h=P.querySelector(".closeBtn"))&&h.addEventListener("click",function(V){V.stopPropagation();var S=V.currentTarget.closest(".zwp-chapterPanel");Ga(S,500,function(){S.style.display=
311
311
  "none"})}))}}}}.bind(c);c.removeChapters=function(){if(this.chapters){if(this.controlbar){var d=this.controlbar.querySelector(".zwp__time-chapter");d&&(d.innerHTML="")}(d=this.controlbar.querySelector(".zwp__time-info"))&&(d=d.querySelector(".zwp-chapterButton"))&&d.remove();delete this.chapters}}.bind(c);c.doSnapshot=function(){if(this.videoEl&&this.videoEl.videoWidth){if(!this.snapCanvas&&(this.snapCanvas=document.createElement("canvas"),!this.snapCanvas))return;var d=this.videoEl,h=this.snapCanvas;
312
- h.width=this.videoEl.videoWidth;h.height=this.videoEl.videoHeight;var q=h.getContext("2d");q.fillStyle="#000000";q.beginPath();q.fillRect(0,0,d.videoWidth,d.videoHeight);q.closePath();q.drawImage(d,0,0,d.videoWidth,d.videoHeight);if("function"==typeof h.toBlob){var C="SNAP-"+eb();try{h.toBlob(function(G){const O=document.createElement("a");O.download=`${C}.jpg`;O.href=URL.createObjectURL(G);O.click();db(G)},"image/jpg",.99)}catch(G){console.error("\u89c6\u9891\u6e90\u53d7CORS\u6807\u8bc6\u9650\u5236\uff0c\u65e0\u6cd5\u76f4\u63a5\u4e0b\u8f7d\u622a\u56fe\uff0c\u89c1\uff1a\n https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS")}}else console.error("\u6d4f\u89c8\u5668\u529f\u80fd\u9650\u5236\uff0c\u65e0\u6cd5\u622a\u53d6\u56fe\u50cf")}}.bind(c);
312
+ h.width=this.videoEl.videoWidth;h.height=this.videoEl.videoHeight;var q=h.getContext("2d");q.fillStyle="#000000";q.beginPath();q.fillRect(0,0,d.videoWidth,d.videoHeight);q.closePath();q.drawImage(d,0,0,d.videoWidth,d.videoHeight);if(typeof h.toBlob=="function"){var C="SNAP-"+eb();try{h.toBlob(function(H){const P=document.createElement("a");P.download=`${C}.jpg`;P.href=URL.createObjectURL(H);P.click();db(H)},"image/jpg",.99)}catch(H){console.error("\u89c6\u9891\u6e90\u53d7CORS\u6807\u8bc6\u9650\u5236\uff0c\u65e0\u6cd5\u76f4\u63a5\u4e0b\u8f7d\u622a\u56fe\uff0c\u89c1\uff1a\n https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS")}}else console.error("\u6d4f\u89c8\u5668\u529f\u80fd\u9650\u5236\uff0c\u65e0\u6cd5\u622a\u53d6\u56fe\u50cf")}}.bind(c);
313
313
  c.togglePictureInPicture=function(){var d=this;if(d.videoEl)if(document.pictureInPictureElement)document.exitPictureInPicture();else{var h=d.videoEl;d.smallWindowMode||(h.bindPicInPicEvent||(h.addEventListener("enterpictureinpicture",function(q){console.log(q.width,q.height);N(d.playerElm,"zwp-picInPic");d.overlay_layers.insertAdjacentHTML("beforeEnd",'<div class="zwp-pipPlaceHolder">\t<div class="zwp-pipControl">\t\t<div class="zwp-pipTiptext">\u6b63\u5728\u300c\u753b\u4e2d\u753b\u300d\u6a21\u5f0f\u4e0b\u64ad\u653e</div>\t\t<div class="zwp-pipExitButton">\u9000\u51fa\u753b\u4e2d\u753b</div>\t</div></div>');
314
- (q=d.overlay_layers.querySelector(".zwp-pipExitButton"))&&q.addEventListener("click",function(C){C.stopPropagation();document.pictureInPictureElement&&document.exitPictureInPicture()});d.isInPicInPic=!0}),h.addEventListener("leavepictureinpicture",function(){P(d.playerElm,"zwp-picInPic");var q=d.overlay_layers.querySelector(".zwp-pipPlaceHolder");q&&d.overlay_layers.removeChild(q);setTimeout(function(){},500);delete d.isInPicInPic}),h.bindPicInPicEvent=!0),h.requestPictureInPicture())}}.bind(c);c.showSubtitle=
315
- function(d){var h=this;if(h.overlay_layers){var q=h.overlay_layers.querySelector(".zwp-subtitles-show");if(q){if(d?"block"!==q.style.display&&(q.style.opacity=0,q.style.display="block",Pa(q,500,function(){})):Ga(q,500,function(){Ba.removeElement(q);q.remove();delete h.subtitleShow;delete h.subtitle1;delete h.subtitle2}),h.controlbar){var C=h.controlbar.querySelector(".zwp-subtitleButton");C&&(C.style.display=d?"block":"none")}}else if(d){q=document.createElement("div");q.setAttribute("class","zwp-subtitles-show");
316
- q.innerHTML='<div class="zwp-subtitles-viever"><div class="zwp-subtitle subtitle-1"><span class="subtitle-text"></span></div><div class="zwp-subtitle subtitle-2"><span class="subtitle-text"></span></div></div>';h.overlay_layers.appendChild(q);q.addEventListener("click",function(V){V.preventDefault();V.stopPropagation()});Ba.addElement(q);q.addEventListener("resize",function(V){this.updateSubtitlePosition()}.bind(h));h.subtitleShow=q;h.subtitle1=q.querySelector(".subtitle-1 > .subtitle-text");h.subtitle2=
317
- q.querySelector(".subtitle-2 > .subtitle-text");h.subtitle2.style.display="none";var G=q.querySelector(".zwp-subtitles-viever"),O=!1,U=0,S=0;d="onpointerout"in document;var T="ontouchstart"in document.documentElement||"ontouchstart"in L;h.on_subtitle_mousemove=function(V){var W=V.target;if(!O||W!==this.subtitle1&&W!==this.subtitle2)console.log("out subtitle");else{W=V.pageY;var g=!0;"touchmove"==V.type&&(V.changedTouches&&(W=V.changedTouches[0].pageY),g=!1);g&&V.preventDefault();V.stopPropagation();
318
- V=U-W;54>=G.offsetTop&&0<V||(V=S+V,54>V&&(console.log("mouse move 0"),V=54),G.style.bottom=V+"px",console.log("move x: ",V))}}.bind(h);h.on_subtitle_mouseup=function(V){O&&("onpointerout"in document?(document.removeEventListener("pointermove",this.on_subtitle_mousemove),document.removeEventListener("pointerup",this.on_subtitle_mouseup)):T?(document.removeEventListener("touchmove",this.on_subtitle_mousemove),document.removeEventListener("touchend",this.on_subtitle_mouseup)):(document.removeEventListener("mousemove",
319
- this.on_subtitle_mousemove),document.removeEventListener("mouseup",this.on_subtitle_mouseup)),O=!1)}.bind(h);h.on_subtitle_mousedown=function(V){"onpointerout"in document?(document.addEventListener("pointermove",this.on_subtitle_mousemove),document.addEventListener("pointerup",this.on_subtitle_mouseup)):T?(document.addEventListener("touchmove",this.on_subtitle_mousemove),document.addEventListener("touchend",this.on_subtitle_mouseup)):(document.addEventListener("mousemove",this.on_subtitle_mousemove),
320
- document.addEventListener("mouseup",this.on_subtitle_mouseup));O=!0;U=V.pageY;var W=parseInt(G.offsetTop+G.offsetHeight);S=this.subtitleShow.offsetHeight-W;V.stopPropagation();V.preventDefault()}.bind(h);h.on_subtitleItemclick=function(V){V.stopPropagation();var W=V.currentTarget;K(W,"zwp_switch")&&Oa(W);V=W.getAttribute("data-action");W=K(W,"switch_on");"subtitleOn"===V?this.subtitleShow&&(this.subtitleShow.style.display=W?"block":"none"):"subtitleDefault"===V?this.subtitles["1"]&&(W?this.subtitles["1"].hidden&&
321
- (delete this.subtitles["1"].hidden,this.subtitle1.style.display="block"):(this.subtitles["1"].hidden=!0,this.subtitle1.style.display="none")):"subtitleSecond"===V&&this.subtitles["2"]&&(W?this.subtitles["2"].hidden&&(delete this.subtitles["2"].hidden,this.subtitle2.style.display="block"):(this.subtitles["2"].hidden=!0,this.subtitle2.style.display="none"))}.bind(h);d?G.addEventListener("pointerdown",h.on_subtitle_mousedown):canTouch?G.addEventListener("touchstart",h.on_subtitle_mousedown):G.addEventListener("mousedown",
322
- h.on_subtitle_mousedown);if(h.controlbar){if(C=h.controlbar.querySelector(".zwp-subtitleButton"))C.style.display="block";(d=Q.querySelector(".zwp-subtitleMenu"))&&!d.bindSwitchEvent&&(C=d.querySelectorAll(".action-item"),0<C.length&&C.forEach(function(V){V.addEventListener("click",h.on_subtitleItemclick);var W=V.getAttribute("data-action");"subtitleOn"!==W&&"subtitleDefault"!==W||N(V,"switch_on")}),d.bindSwitchEvent=!0)}}}}.bind(c);c.getSimpleSubtitleRenderer=function(){if(!this.overlay_layers)return null;
314
+ (q=d.overlay_layers.querySelector(".zwp-pipExitButton"))&&q.addEventListener("click",function(C){C.stopPropagation();document.pictureInPictureElement&&document.exitPictureInPicture()});d.isInPicInPic=!0}),h.addEventListener("leavepictureinpicture",function(){Q(d.playerElm,"zwp-picInPic");var q=d.overlay_layers.querySelector(".zwp-pipPlaceHolder");q&&d.overlay_layers.removeChild(q);setTimeout(function(){},500);delete d.isInPicInPic}),h.bindPicInPicEvent=!0),h.requestPictureInPicture())}}.bind(c);c.showSubtitle=
315
+ function(d){var h=this;if(h.overlay_layers){var q=h.overlay_layers.querySelector(".zwp-subtitles-show");if(q){if(d?q.style.display!=="block"&&(q.style.opacity=0,q.style.display="block",Pa(q,500,function(){})):Ga(q,500,function(){Ba.removeElement(q);q.remove();delete h.subtitleShow;delete h.subtitle1;delete h.subtitle2}),h.controlbar){var C=h.controlbar.querySelector(".zwp-subtitleButton");C&&(C.style.display=d?"block":"none")}}else if(d){q=document.createElement("div");q.setAttribute("class","zwp-subtitles-show");
316
+ q.innerHTML='<div class="zwp-subtitles-viever"><div class="zwp-subtitle subtitle-1"><span class="subtitle-text"></span></div><div class="zwp-subtitle subtitle-2"><span class="subtitle-text"></span></div></div>';h.overlay_layers.appendChild(q);q.addEventListener("click",function(U){U.preventDefault();U.stopPropagation()});Ba.addElement(q);q.addEventListener("resize",function(U){this.updateSubtitlePosition()}.bind(h));h.subtitleShow=q;h.subtitle1=q.querySelector(".subtitle-1 > .subtitle-text");h.subtitle2=
317
+ q.querySelector(".subtitle-2 > .subtitle-text");h.subtitle2.style.display="none";var H=q.querySelector(".zwp-subtitles-viever"),P=!1,O=0,V=0;d="onpointerout"in document;var S="ontouchstart"in document.documentElement||"ontouchstart"in K;h.on_subtitle_mousemove=function(U){var g=U.target;if(!P||g!==this.subtitle1&&g!==this.subtitle2)console.log("out subtitle");else{g=U.pageY;var r=!0;U.type=="touchmove"&&(U.changedTouches&&(g=U.changedTouches[0].pageY),r=!1);r&&U.preventDefault();U.stopPropagation();
318
+ U=O-g;H.offsetTop<=54&&U>0||(U=V+U,U<54&&(console.log("mouse move 0"),U=54),H.style.bottom=U+"px",console.log("move x: ",U))}}.bind(h);h.on_subtitle_mouseup=function(U){P&&("onpointerout"in document?(document.removeEventListener("pointermove",this.on_subtitle_mousemove),document.removeEventListener("pointerup",this.on_subtitle_mouseup)):S?(document.removeEventListener("touchmove",this.on_subtitle_mousemove),document.removeEventListener("touchend",this.on_subtitle_mouseup)):(document.removeEventListener("mousemove",
319
+ this.on_subtitle_mousemove),document.removeEventListener("mouseup",this.on_subtitle_mouseup)),P=!1)}.bind(h);h.on_subtitle_mousedown=function(U){"onpointerout"in document?(document.addEventListener("pointermove",this.on_subtitle_mousemove),document.addEventListener("pointerup",this.on_subtitle_mouseup)):S?(document.addEventListener("touchmove",this.on_subtitle_mousemove),document.addEventListener("touchend",this.on_subtitle_mouseup)):(document.addEventListener("mousemove",this.on_subtitle_mousemove),
320
+ document.addEventListener("mouseup",this.on_subtitle_mouseup));P=!0;O=U.pageY;var g=parseInt(H.offsetTop+H.offsetHeight);V=this.subtitleShow.offsetHeight-g;U.stopPropagation();U.preventDefault()}.bind(h);h.on_subtitleItemclick=function(U){U.stopPropagation();var g=U.currentTarget;L(g,"zwp_switch")&&Oa(g);U=g.getAttribute("data-action");g=L(g,"switch_on");U==="subtitleOn"?this.subtitleShow&&(this.subtitleShow.style.display=g?"block":"none"):U==="subtitleDefault"?this.subtitles["1"]&&(g?this.subtitles["1"].hidden&&
321
+ (delete this.subtitles["1"].hidden,this.subtitle1.style.display="block"):(this.subtitles["1"].hidden=!0,this.subtitle1.style.display="none")):U==="subtitleSecond"&&this.subtitles["2"]&&(g?this.subtitles["2"].hidden&&(delete this.subtitles["2"].hidden,this.subtitle2.style.display="block"):(this.subtitles["2"].hidden=!0,this.subtitle2.style.display="none"))}.bind(h);d?H.addEventListener("pointerdown",h.on_subtitle_mousedown):canTouch?H.addEventListener("touchstart",h.on_subtitle_mousedown):H.addEventListener("mousedown",
322
+ h.on_subtitle_mousedown);if(h.controlbar){if(C=h.controlbar.querySelector(".zwp-subtitleButton"))C.style.display="block";(d=w.querySelector(".zwp-subtitleMenu"))&&!d.bindSwitchEvent&&(C=d.querySelectorAll(".action-item"),C.length>0&&C.forEach(function(U){U.addEventListener("click",h.on_subtitleItemclick);var g=U.getAttribute("data-action");g!=="subtitleOn"&&g!=="subtitleDefault"||N(U,"switch_on")}),d.bindSwitchEvent=!0)}}}}.bind(c);c.getSimpleSubtitleRenderer=function(){if(!this.overlay_layers)return null;
323
323
  var d=this.overlay_layers.querySelector(".zwp-subtitles-show");if(d){var h=d.querySelector(".zwp-simple-subtitles-viever");h||(d.innerHTML='<div class="zwp-simple-subtitles-viever"></div>',h=d.querySelector(".zwp-simple-subtitles-viever"));return h}d=document.createElement("div");d.setAttribute("class","zwp-subtitles-show");d.innerHTML='<div class="zwp-simple-subtitles-viever"></div>';this.overlay_layers.appendChild(d);d.addEventListener("click",function(q){q.preventDefault();q.stopPropagation()});
324
- Ba.addElement(d);d.addEventListener("resize",function(q){this.updateSubtitlePosition()}.bind(this));this.subtitleShow=d;return d.querySelector(".zwp-simple-subtitles-viever")}.bind(c);c.loadSubtitle=function(d,h,q){var C=this;"1"!==h&&"2"!==h||Ra(d,function(G){var O=H(d);if(".srt"===O)var U=fb(G);else if(".vtt"===O)U=Sa(G);else if(".json"===O||".bcc"===O)U=JSON.parse(G);if(U){C.subtitles||(C.subtitles={});q&&(U.title=q);"2"===h&&C._config.secondSubtitleHidden&&(U.hidden=!0);if(C.controlbar&&(O=C.controlbar.querySelector(".zwp-subtitleMenu"))){O.querySelector(".main")||
325
- (O.innerHTML=Ya(),P(O,"zwp-autosize"));if("1"===h&&(G=O.querySelector(".sub1"))){q||=qa("mainSubtitle","Main subtitle");var S=G.querySelector(".zwp-option-item-label");S&&(S.innerHTML=q);G.style.display="block"}if("2"===h&&(G=O.querySelector(".sub2"))){q||=qa("secondSubtitle","Second subtitle");if(S=G.querySelector(".zwp-option-item-label"))S.innerHTML=q;U.hidden||(O=G.querySelector(".zwp_switch"))&&N(O,"switch_on");G.style.display="block"}}C.subtitles[h]=U;C.showSubtitleTimer||(C.showSubtitleTimer=
326
- setTimeout(function(){this.showSubtitle(!0);delete this.showSubtitleTimer}.bind(C),300))}else console.warn("Invalid subtitle file from "+d)},function(G){console.warn("get subtitle from "+d+" failed!")})}.bind(c);c.renderSubtitles=function(d){if(this.subtitleShow&&this.subtitles&&"none"!==this.subtitleShow.style.display)for(var h=["1","2"],q=0;q<h.length;q++){var C=h[q];if(this.subtitles[C]){var G="subtitle"+C;C=this.subtitles[C];var O=!1;if(!C.hidden){if(C.current){if(d<C.current.from)O=!0;else if(d<
327
- C.current.to)continue;this[G]&&(this[G].innerHTML="",this[G].style.display="none");C.current=null}var U=C.nextSubtitleIdx||0,S=!0;if(O){var T=U-4;0>T&&(T=0);for(var V=U-2;V>=T;V--)if(O=C.body[V],d<=O.to){if(d>=O.from){C.current=O;C.nextSubtitleIdx=V+1;S=!1;break}}else{C.nextSubtitleIdx=U;S=!1;break}if(S&&0<T){U=0;for(V=T-1;U<=V;)if(T=parseInt((U+V)/2),O=C.body[T],d<O.from)V=T-1;else if(d>O.to)U=T+1;else{C.current=O;C.nextSubtitleIdx=T+1;S=!1;break}S&&(C.nextSubtitleIdx=U)}}else{T=U+2;T>C.body.length&&
328
- (T=C.body.length);for(V=U;V<T;V++)if(O=C.body[V],d>=O.from){if(d<=O.to){C.current=O;C.nextSubtitleIdx=V+1;S=!1;break}}else{C.nextSubtitleIdx=U;S=!1;break}if(S){U=T;V=C.body.length-1;for(T>=C.body.length?d<C.body[C.body.length-1].from&&(U=0):d<C.body[T].from&&(U=0);U<=V;)if(T=parseInt((U+V)/2),O=C.body[T],d<O.from)V=T-1;else if(d>O.to)U=T+1;else{C.current=O;C.nextSubtitleIdx=T+1;S=!1;break}S&&(C.nextSubtitleIdx=U)}}C.current&&this[G]&&(this[G].innerHTML=C.current.content,this[G].style.display="block")}}}}.bind(c);
324
+ Ba.addElement(d);d.addEventListener("resize",function(q){this.updateSubtitlePosition()}.bind(this));this.subtitleShow=d;return d.querySelector(".zwp-simple-subtitles-viever")}.bind(c);c.loadSubtitle=function(d,h,q){var C=this;h!=="1"&&h!=="2"||Ra(d,function(H){var P=I(d);if(P===".srt")var O=fb(H);else if(P===".vtt")O=Sa(H);else if(P===".json"||P===".bcc")O=JSON.parse(H);if(O){C.subtitles||(C.subtitles={});q&&(O.title=q);h==="2"&&C._config.secondSubtitleHidden&&(O.hidden=!0);if(C.controlbar&&(P=C.controlbar.querySelector(".zwp-subtitleMenu"))){P.querySelector(".main")||
325
+ (P.innerHTML=Ya(),Q(P,"zwp-autosize"));if(h==="1"&&(H=P.querySelector(".sub1"))){q||=pa("mainSubtitle","Main subtitle");var V=H.querySelector(".zwp-option-item-label");V&&(V.innerHTML=q);H.style.display="block"}if(h==="2"&&(H=P.querySelector(".sub2"))){q||=pa("secondSubtitle","Second subtitle");if(V=H.querySelector(".zwp-option-item-label"))V.innerHTML=q;O.hidden||(P=H.querySelector(".zwp_switch"))&&N(P,"switch_on");H.style.display="block"}}C.subtitles[h]=O;C.showSubtitleTimer||(C.showSubtitleTimer=
326
+ setTimeout(function(){this.showSubtitle(!0);delete this.showSubtitleTimer}.bind(C),300))}else console.warn("Invalid subtitle file from "+d)},function(H){console.warn("get subtitle from "+d+" failed!")})}.bind(c);c.renderSubtitles=function(d){if(this.subtitleShow&&this.subtitles&&this.subtitleShow.style.display!=="none")for(var h=["1","2"],q=0;q<h.length;q++){var C=h[q];if(this.subtitles[C]){var H="subtitle"+C;C=this.subtitles[C];var P=!1;if(!C.hidden){if(C.current){if(d<C.current.from)P=!0;else if(d<
327
+ C.current.to)continue;this[H]&&(this[H].innerHTML="",this[H].style.display="none");C.current=null}var O=C.nextSubtitleIdx||0,V=!0;if(P){var S=O-4;S<0&&(S=0);for(var U=O-2;U>=S;U--)if(P=C.body[U],d<=P.to){if(d>=P.from){C.current=P;C.nextSubtitleIdx=U+1;V=!1;break}}else{C.nextSubtitleIdx=O;V=!1;break}if(V&&S>0){O=0;for(U=S-1;O<=U;)if(S=parseInt((O+U)/2),P=C.body[S],d<P.from)U=S-1;else if(d>P.to)O=S+1;else{C.current=P;C.nextSubtitleIdx=S+1;V=!1;break}V&&(C.nextSubtitleIdx=O)}}else{S=O+2;S>C.body.length&&
328
+ (S=C.body.length);for(U=O;U<S;U++)if(P=C.body[U],d>=P.from){if(d<=P.to){C.current=P;C.nextSubtitleIdx=U+1;V=!1;break}}else{C.nextSubtitleIdx=O;V=!1;break}if(V){O=S;U=C.body.length-1;for(S>=C.body.length?d<C.body[C.body.length-1].from&&(O=0):d<C.body[S].from&&(O=0);O<=U;)if(S=parseInt((O+U)/2),P=C.body[S],d<P.from)U=S-1;else if(d>P.to)O=S+1;else{C.current=P;C.nextSubtitleIdx=S+1;V=!1;break}V&&(C.nextSubtitleIdx=O)}}C.current&&this[H]&&(this[H].innerHTML=C.current.content,this[H].style.display="block")}}}}.bind(c);
329
329
  c.updateSubtitlePosition=function(){if(this.subtitleShow&&this.subtitles){var d=["1","2"],h=this.subtitleShow.offsetWidth,q=this.subtitleShow.offsetHeight;if(h&&q)for(h/=1024,q/=576,q=32*(h>q?q:h),h=0;h<d.length;h++){var C=d[h];this.subtitles[C]&&(C="subtitle"+C,this[C]&&(this[C].style.fontSize=q.toFixed(2)+"px"))}}}.bind(c);c.resetQualitiesMenu=function(){if(this&&!this.multiStreams&&this.controlbar){var d=this.controlbar.querySelector(".zwp-qualityButton");if(d){var h=d.querySelector(".zwp-qualityMenu");
330
- h&&(h.innerHTML='<li class="zwp-quality-item zwp-disabled" data-index="-1">No quality</li>');d.style.display="none"}}}.bind(c);c.createQualitiesMenu=function(d){var h=this;if(1>=d.length)h.resetQualitiesMenu();else{var q=h.controlbar.querySelector(".zwp-qualityButton");if(q){var C="",G=qa("level","Level")+" ";C+='<li class="zwp-quality-item active" data-idx="-1">'+qa("qs-auto","AUTO SWITCH")+"</li>";for(var O=0;O<d.length;O++){var U="";"undefined"!==typeof d[O]&&(U=d[O].width&&d[O].height?d[O].width+
331
- "x"+d[O].height:G+(O+1));"undefined"!==typeof d[O].bitrate&&(U+=" ("+parseInt(d[O].bitrate/1E3)+"kbps)");C+='<li class="zwp-quality-item" data-br="'+d[O].bitrate+'" data-idx="'+d[O].qualityIndex+'" data-vh="'+d[O].height+'">'+U+"</li>"}if(d=q.querySelector(".zwp-qualityMenu"))d.innerHTML=C,L.mQuery(d).find(".zwp-quality-item").click(function(S){S.preventDefault();S.stopPropagation();S=L.mQuery(this);S.hasClass("active")||(S.siblings().removeClass("active"),S.addClass("active"),S=this.getAttribute("data-idx"),
332
- "function"===typeof h.switchQualityLevel&&h.switchQualityLevel(S))});q.style.display="block"}}}.bind(c);c.updateQualityLevel=function(d,h){if(this&&this.controlbar){var q=this.controlbar.querySelector(".zwp-qualityButton");q&&(q=q.querySelector(".zwp-qualityMenu"))&&L.mQuery(q).children(".zwp-quality-item").each(function(C,G){C=parseInt(G.getAttribute("data-idx"));G=L.mQuery(G);-1===C?h&&!G.hasClass("active")&&(G.siblings(".active").removeClass("active"),G.addClass("active")):d===C?(h||G.hasClass("active")||
333
- (G.siblings(".active").removeClass("active"),G.addClass("active")),G.hasClass("current")||(G.siblings(".current").removeClass("current"),G.addClass("current"))):G.hasClass("current")&&G.removeClass("current")})}}.bind(c);c.buildStreamSelector=function(){var d=this;if(d.multiStreams){var h=d.controlbar.querySelector(".zwp-qualityButton");if(h){var q="",C=d.multiStreams.murls;if(!Array.isArray(C)||1!==C.length){for(var G in C){var O=C[G];O="object"===typeof O?O.name:G;q+='<li class="zwp-quality-item" data-stream="'+
334
- O+'">'+qa(O,O)+"</li>"}if(C=h.querySelector(".zwp-qualityMenu"))C.innerHTML=q,q=L.mQuery(C).find(".zwp-quality-item"),q.click(function(U){U.preventDefault();U.stopPropagation();U=this.getAttribute("data-stream");if(d.multiStreams.curStream!==U){var S=d.multiStreams.murls;if(Array.isArray(S))for(var T in S){var V=S[T];if(V.name===U){var W=V.url;break}}else W=S[U];d.__switchStream(W);d.multiStreams.curStream=U;W=L.mQuery(this);W.hasClass("active")||(W.siblings(".active").removeClass("active"),W.addClass("active"));
335
- U=qa(U,U);d.toast("\u5df2\u7ecf\u4e3a\u60a8\u5207\u6362\u5230"+U+"\u753b\u8d28")}}),q.each(function(U,S){U=this.getAttribute("data-stream");if(d.multiStreams.curStream===U&&(U=L.mQuery(this),!U.hasClass("active")))return U.siblings(".active").removeClass("active"),U.addClass("active"),!1});h.style.display="block"}}}}.bind(c);c.createSubtitlesMenu=function(d,h){var q=this;q.controlbar&&(h=q.controlbar.querySelector(".zwp-subtitleMenu"),d=lb(d),h.innerHTML=d,delete h.bindSwitchEvent,N(h,"zwp-autosize"),
336
- L.mQuery(h).find(".zwp-subtitles-item").click(function(C){C.preventDefault();C.stopPropagation();C=L.mQuery(this);C.hasClass("active")||(C.siblings().removeClass("active"),C.addClass("active"),C=this.getAttribute("data-id"),"function"===typeof q.switchSubtitleTrack&&q.switchSubtitleTrack(C))}),d=q.controlbar.querySelector(".zwp-subtitleButton"))&&(d.style.display="block")}.bind(c);c.updateSubtitleTrack=function(d){}.bind(c);c.resetSubtitleMenu=function(){if(this.controlbar){var d=this.controlbar.querySelector(".zwp-subtitleButton");
337
- d&&(d.style.display="none")}}.bind(c);c.__getDanmuBarDock=function(){var d=this.progressBar.timeInfo.querySelector(".zwp_danmuBarDock");d||(d=document.createElement("DIV"),d.setAttribute("class","zwp_danmuBarDock"),this.progressBar.timeInfo.appendChild(d),Ba.addElement(d),d.addEventListener("resize",function(h){var q=this;q.resizeTimer||(q.resizeTimer=L.setTimeout(function(){console.log("danmuBarDock resize");350>d.clientWidth?N(d,"zwp-mini"):P(d,"zwp-mini");delete q.resizeTimer},50))}.bind(this)));
338
- return d}.bind(c);c.buildDanmuToolbar=function(d,h){var q=this,C;if(!q.danmuToolbar){d&&(C=document.querySelector("#"+d));if(!C){if(!q.overlay_layers)return;h=null;C=q.progressBar&&q.progressBar.timeInfo?q.__getDanmuBarDock():q.overlay_layers}d=mb();C.insertAdjacentHTML("beforeend",d);q.danmuToolbar=C.querySelector(".zwp_danmu-controlbar");h&&N(q.danmuToolbar,h);C.appendChild(q.danmuToolbar);(h=q.danmuToolbar.querySelector(".zwp_switch"))&&h.addEventListener("click",function(G){G.stopPropagation();
339
- G=G.currentTarget;if(K(G,"zwp_switch")){Oa(G);var O=K(G,"switch_on");G=L.$$(this.danmuToolbar);if(O){var U=G.find("button.btn_submit");U.removeClass("vtb_disabled").removeAttr("disabled");this.setEnableDanmu(!0);O=G.find(".barrage_inp_text");O.removeAttr("readonly").removeAttr("disabled").removeClass("disabled");"on"!=O.attr("keydown")&&(O.keydown(function(S){13==S.which&&0<U.length&&U.trigger("click")}),O.attr("keydown","on"));G.find(".zwp-barrage_form").css("background-color","#28303db3").children("a.btn_bubble").toggleClass("disabled")}else G.find("button.btn_submit").addClass("vtb_disabled").attr({disabled:"disabled"}),
340
- this.setEnableDanmu(!1),G.find(".barrage_inp_text").attr("readonly","readonly").attr("disabled","disabled").addClass("disabled"),G.find(".zwp-barrage_form").css("background-color","#202020b3").children("a.btn_bubble").toggleClass("disabled")}}.bind(q));(h=q.danmuToolbar.querySelector(".barrage_login"))&&h.addEventListener("click",function(G){G.preventDefault();G.stopPropagation();alert("login")});(h=q.danmuToolbar.querySelector(".zwp_dmconfig"))&&h.addEventListener("click",function(G){G.preventDefault();
341
- G.stopPropagation();this.zwplayer=q;qb(G,this)});(h=q.danmuToolbar.querySelector(".btn_bubble"))&&h.addEventListener("click",function(G){G.preventDefault();G.stopPropagation();gb(this,G)});(h=q.danmuToolbar.querySelector(".btn_submit"))&&h.addEventListener("click",function(G){G.preventDefault();G.stopPropagation();a:{if(!this.inpbox){$inpbox=$$(this).parent().children("DIV.zwp-barrage_inp").children(".barrage_inp_text");if(!$inpbox)break a;this.inpbox=$inpbox}if(q){G=this.inpbox.val();if(""==G)break a;
342
- -1!=G.indexOf("&")&&(G=G.replace(/&/g,"&amp;"));-1!=G.indexOf("<")&&(G=G.replace(/</g,"&lt;"));-1!=G.indexOf(">")&&(G=G.replace(/>/g,"&gt;"));-1!=G.indexOf('"')&&(G=G.replace(/"/g,"&quot;"));-1!=G.indexOf("'")&&(G=G.replace(/'/g,"&#039;"));if(!q.sendDanmu(G))break a}this.inpbox.val("")}})}}.bind(c);c.reposDanmuToolbar=function(d){if(this.danmuToolbar&&this.progressBar&&this.progressBar.timeInfo){var h=this.__getDanmuBarDock(),q=this.danmuToolbar.parentNode;q&&(d?q!==h&&(q.removeChild(this.danmuToolbar),
343
- h.appendChild(this.danmuToolbar),this.oldDanmuParentNode=q):this.oldDanmuParentNode&&(h.removeChild(this.danmuToolbar),this.oldDanmuParentNode.appendChild(this.danmuToolbar),delete this.oldDanmuParentNode))}}.bind(c);c.sendDanmu=function(d){if("function"===typeof this._config.sendDanmu){var h="";this.danmuSetting.border&&(h+=',"border":"1"');this.danmuSetting.color&&(h+=',"color":"#'+this.danmuSetting.color+'"');this._config.sendDanmu('{"type":"danmu","text":"'+d+'"'+h+"}");return!0}alert("No danmu send function is setup");
344
- return!1}.bind(c);c.showContextMenu=function(d){var h=this,q=d.offsetX;d=d.offsetY;var C=h.playerContainer.getBoundingClientRect(),G=C.width;C=C.height;var O="left",U="top",S=q,T=d;q+180>G&&(O="right",S=G-q);d+148>C&&(U="bottom",T=C-d);if(h.contextMenu)h.contextMenu.style["left"===O?"right":"left"]=null,h.contextMenu.style["top"===U?"bottom":"top"]=null,h.contextMenu.style[O]=S+"px",h.contextMenu.style[U]=T+"px";else{q='<div class="zwp-popupmenu" style="'+O+": "+S+"px; "+U+":"+T+'px;"><a class="zwp-menuitem" data-action="document" href="https://www.zwplayer.com/docment" target="zwplayer-doc"><span class="zwp-menucaption">'+
345
- (qa("player-help","Help and document")+"</span></a>");q+='<a class="zwp-menuitem" data-action="version" href="https://www.zwplayer.com/version?v=3.1.2" title="Build: 20240507" target="zwplayer-version"><span class="zwp-menucaption">'+qa("version-update","Version update")+' (<span class="zwp-version">'+qa("current")+": v3.1.2</span>) </span></a>";q=q+'<span class="zwp-menuseperator" action="version"></span><a class="zwp-menuitem" data-action="about" href="https://www.zwplayer.com/about"><span class="zwp-menucaption">'+
346
- (qa("about","About")+" zwplayer</span></a>");h.playerContainer.insertAdjacentHTML("beforeEnd",q+"</div>");h.contextMenu=h.playerContainer.querySelector(".zwp-popupmenu");var V=function(W){W.stopPropagation();W.preventDefault();var g=this.getAttribute("data-action");this.getAttribute("target");var t=this.getAttribute("href");h.hideContextMenu();setTimeout(function(){"about"===g?L.open(t,"zwplayer-about"):"version"===g?L.open(t,"zwplayer-version"):"document"===g&&L.open(t,"zwplayer-doc")},10)};h.contextMenu.querySelectorAll("a.zwp-menuitem").forEach(function(W){W.addEventListener("click",
347
- V,!1)});document.addEventListener("click",h.hideContextMenu)}}.bind(c);c.hideContextMenu=function(){this.contextMenu&&(this.playerContainer.removeChild(this.contextMenu),delete this.contextMenu,document.removeEventListener("click",this.hideContextMenu))}.bind(c);c.toast=function(d,h,q,C){var G=this;h=h||2E3;G.toastTimerId&&(clearTimeout(G.toastTimerId),G.toastBox&&(G.overlay_layers.removeChild(G.toastBox),delete G.toastBox));if("object"===typeof d){if("icon"in d)var O=d.icon;d=d.text}var U=document.createElement("div"),
348
- S="",T="zwp-toast zwp-center";O&&(T+=" zwp-toast-icon",S='<i class="xicon xicon-'+O+'"></i>');q&&(S+='<a href="javascript:void(0)" class="zwp-toast-closebtn"><i class="xicon xicon-close"></i></a>',T+=" zwp-use-close");C&&(T+=" zwp-lite");S+='<span class="zwp-toast-text">'+d+"</span>";U.setAttribute("class",T);U.innerHTML=S;G.overlay_layers.appendChild(U);G.toastBox=U;var V=function(W){if(G.toastBox){var g=G.toastBox.querySelector(".zwp-toast-closebtn");g&&g.removeEventListener("click",V);G.overlay_layers.removeChild(G.toastBox);
349
- delete G.toastBox}G.toastTimerId&&(W&&"click"===W.type&&clearTimeout(G.toastTimerId),delete G.toastTimerId)};G.toastTimerId=L.setTimeout(V,h);q&&(q=U.querySelector(".zwp-toast-closebtn"))&&q.addEventListener("click",V)}.bind(c);c.mutedConfirmBox=function(){var d=this;d.popup_layers||(d.popup_layers=document.createElement("div"),d.popup_layers.setAttribute("class","zwp__popup_layers"),d.playerContainer.appendChild(d.popup_layers));var h=document.createElement("div");h.setAttribute("class","zwp-toast zwp-confirm zwp-center");
350
- h.innerHTML='<span class="zwp-toast-text">\u56e0<a href="#mutemore" class="mutemore">\u6d4f\u89c8\u5668\u9650\u5236</a>\uff0c\u9700\u8981\u70b9\u51fb<a href="#openaudio" class="openaudio">\u6253\u5f00\u58f0\u97f3</a><button class="closeBtn" title="\u5173\u95ed\u63d0\u793a"><i class="xicon xicon-close"></i></button></span>';d.popup_layers.appendChild(h);d.mutedTipBox=h;var q=h.querySelector(".closeBtn");q&&q.addEventListener("click",function(C){C.preventDefault();d.mutedTipBox&&(d.popup_layers.removeChild(d.mutedTipBox),
351
- d.popup_layers.style.display=null,delete d.mutedTipBox);L.allowAutoAudioPlay=!0});(q=h.querySelector(".openaudio"))&&q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();d.mutedTipBox&&(d.popup_layers.removeChild(d.mutedTipBox),d.popup_layers.style.display=null,delete d.mutedTipBox);d.setMuted(!1);L.allowAutoAudioPlay=!0});(q=h.querySelector(".mutemore"))&&q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();var G=h.querySelector(".moreInfoBox");G||
352
- (h.insertAdjacentHTML("beforeend",'<div class="moreInfoBox"><div class="info-text">\u5f53\u4f60\u8bbf\u95ee\u672c\u7f51\u7ad9\u7684\u6b21\u6570\u8f83\u5c11\uff0c\u6216\u7ecf\u5e38\u9759\u97f3\u64ad\u653e\u65f6\uff0c\u6d4f\u89c8\u5668\u53ef\u80fd\u4f1a\u9650\u5236\u7f51\u7ad9\u97f3\u91cf\uff0c\u4f7f\u7f51\u7ad9\u65e0\u6cd5\u81ea\u52a8\u6267\u884c\u6709\u58f0\u64ad\u653e</div><div class="info-control"><button class="info-btn">\u6211\u77e5\u9053\u4e86</button></div></div>'),G=h.querySelector(".moreInfoBox"),
353
- G.querySelector(".info-btn").addEventListener("click",function(O){O.preventDefault();O.stopPropagation();G.style.display="none"}));G&&(G.style.display="block");L.allowAutoAudioPlay=!0});d.popup_layers.style.display="block"}.bind(c);"string"==typeof c._config.playerElm?(e=c._config.playerElm,"#"!=e.charAt(0)&&(e="#"+e),c.playerElm=document.querySelector(e)):Ua(c._config.playerElm)&&(c.playerElm=c._config.playerElm);c.playerElm?K(c.playerElm,"zwp-wrap")||(c.playerElmOldClass=c.playerElm.getAttribute("class"),
354
- N(c.playerElm,"zwp-wrap"),c.doRemovePlayerClass=!0):(e="","string"==typeof c._config.playerElm?(e=c._config.playerElm,"#"==e.charAt(0)&&(e=e.substr(1))):e="ZWP-"+(new Date).getTime(),c.playerElm=document.createElement("DIV"),c.playerElm.id=e,c.playerElm.style.position="absolute",c.playerElm.style.left=0,c.playerElm.style.top=0,c.playerElm.style.width="640px",c.playerElm.style.height="360px",document.body.appendChild(c.playerElm),c.playerElm.setAttribute("class","zwp-wrap"),c.doDeletePlayerElm=!0);
355
- c.playerContainer=document.createElement("DIV");c.playerContainer.setAttribute("class","zwp-container");c.playerElm.appendChild(c.playerContainer);"string"==typeof c._config.videoElm?(e=c._config.videoElm,"#"!=e.charAt(0)&&(e="#"+e),c.videoEl=document.querySelector(e)):Ua(c._config.videoElm)&&(c.videoEl=c._config.videoElm);if(!c.videoEl){var v=document.createElement("DIV");v.setAttribute("class","zwp-videoWrapper");c.playerContainer.appendChild(v);Ba.addElement(v);v.addEventListener("resize",function(d){this._config.video_rotated&&
356
- this.rotateVideo()}.bind(c));c.videoWrapper=v;c.videoEl=document.createElement("VIDEO");"string"==typeof c._config.videostyle&&c.videoEl.setAttribute("style",c._config.videostyle);"string"==typeof c._config.videoclass&&c.videoEl.setAttribute("class",c._config.videoclass);c._config.videostyle||c._config.videoclass||c.videoEl.setAttribute("style","width:100%;height:100%;");"string"==typeof c._config.videoElm&&(e=c._config.videoElm,"#"==e.charAt(0)&&(e=e.substr(1)),c.videoEl.id=e);c.videoEl.setAttribute("playsinline",
357
- "");c.videoEl.setAttribute("webkit-playsinline","");c.videoEl.setAttribute("autoplay","");v.appendChild(c.videoEl);c.videoRemoveWhenClose=!0}c.videoEl.volume=c._config.defVolume/100;c._config.poster&&c.videoEl.setAttribute("poster",c._config.poster);if(!c._config.disableOverlayLayer&&(e=document.createElement("div"),e.setAttribute("class","zwp__layers"),e.innerHTML='<div class="zwp__overlay zwp__layer zwp_loadingicon" style="width: 100%; height: 100%; display: none;"><div class="zwp__overlay-loading"><span class="zwp__overlay-loading-bg-img"><svg width="80px" height="80px" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#fff"><g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/></path></g></g></svg></span></div></div><div class="zwp__overlay zwp__layer zwp__overlay-play" style="width: 100%; height: 100%; display: none;"><div class="zwp__overlay-button" role="button" tabindex="0" aria-label="play" aria-pressed="false" data-action="play"><svg class="icon" width="96px" height="96px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#c2c2c2" d="M512.61025 48.820024a463.790226 463.790226 0 1 0 463.790227 463.790226A463.790226 463.790226 0 0 0 512.61025 48.820024z m0 854.350417a390.560191 390.560191 0 1 1 390.560191-390.560191 390.560191 390.560191 0 0 1-390.560191 390.560191z m166.720382-414.970203l-120.341359-70.300834-127.908463-74.694636a22.945411 22.945411 0 0 0-32.465315 24.410011v288.526341a22.945411 22.945411 0 0 0 32.465315 24.410012l127.908463-74.694636 120.341359-70.056734a28.559714 28.559714 0 0 0 0-47.599524z" /></svg></div></div>',
330
+ h&&(h.innerHTML='<li class="zwp-quality-item zwp-disabled" data-index="-1">No quality</li>');d.style.display="none"}}}.bind(c);c.createQualitiesMenu=function(d){var h=this;if(d.length<=1)h.resetQualitiesMenu();else{var q=h.controlbar.querySelector(".zwp-qualityButton");if(q){var C="",H=pa("level","Level")+" ";C+='<li class="zwp-quality-item active" data-idx="-1">'+pa("qs-auto","AUTO SWITCH")+"</li>";for(var P=0;P<d.length;P++){var O="";typeof d[P]!=="undefined"&&(O=d[P].width&&d[P].height?d[P].width+
331
+ "x"+d[P].height:H+(P+1));typeof d[P].bitrate!=="undefined"&&(O+=" ("+parseInt(d[P].bitrate/1E3)+"kbps)");C+='<li class="zwp-quality-item" data-br="'+d[P].bitrate+'" data-idx="'+d[P].qualityIndex+'" data-vh="'+d[P].height+'">'+O+"</li>"}if(d=q.querySelector(".zwp-qualityMenu"))d.innerHTML=C,K.mQuery(d).find(".zwp-quality-item").click(function(V){V.preventDefault();V.stopPropagation();V=K.mQuery(this);V.hasClass("active")||(V.siblings().removeClass("active"),V.addClass("active"),V=this.getAttribute("data-idx"),
332
+ typeof h.switchQualityLevel==="function"&&h.switchQualityLevel(V))});q.style.display="block"}}}.bind(c);c.updateQualityLevel=function(d,h){if(this&&this.controlbar){var q=this.controlbar.querySelector(".zwp-qualityButton");q&&(q=q.querySelector(".zwp-qualityMenu"))&&K.mQuery(q).children(".zwp-quality-item").each(function(C,H){C=parseInt(H.getAttribute("data-idx"));H=K.mQuery(H);C===-1?h&&!H.hasClass("active")&&(H.siblings(".active").removeClass("active"),H.addClass("active")):d===C?(h||H.hasClass("active")||
333
+ (H.siblings(".active").removeClass("active"),H.addClass("active")),H.hasClass("current")||(H.siblings(".current").removeClass("current"),H.addClass("current"))):H.hasClass("current")&&H.removeClass("current")})}}.bind(c);c.buildStreamSelector=function(){var d=this;if(d.multiStreams&&d.controlbar){var h=d.controlbar.querySelector(".zwp-qualityButton");if(h){var q="",C=d.multiStreams.murls;if(!Array.isArray(C)||C.length!==1){for(var H in C){var P=C[H];P=typeof P==="object"?P.name:H;q+='<li class="zwp-quality-item" data-stream="'+
334
+ P+'">'+pa(P,P)+"</li>"}if(C=h.querySelector(".zwp-qualityMenu"))C.innerHTML=q,q=K.mQuery(C).find(".zwp-quality-item"),q.click(function(O){O.preventDefault();O.stopPropagation();O=this.getAttribute("data-stream");if(d.multiStreams.curStream!==O){var V=d.multiStreams.murls;if(Array.isArray(V))for(var S in V){var U=V[S];if(U.name===O){var g=U.url;break}}else g=V[O];d.__switchStream(g);d.multiStreams.curStream=O;g=K.mQuery(this);g.hasClass("active")||(g.siblings(".active").removeClass("active"),g.addClass("active"));
335
+ O=pa(O,O);d.toast("\u5df2\u7ecf\u4e3a\u60a8\u5207\u6362\u5230"+O+"\u753b\u8d28")}}),q.each(function(O,V){O=this.getAttribute("data-stream");if(d.multiStreams.curStream===O&&(O=K.mQuery(this),!O.hasClass("active")))return O.siblings(".active").removeClass("active"),O.addClass("active"),!1});h.style.display="block"}}}}.bind(c);c.createSubtitlesMenu=function(d,h){var q=this;q.controlbar&&(h=q.controlbar.querySelector(".zwp-subtitleMenu"),d=lb(d),h.innerHTML=d,delete h.bindSwitchEvent,N(h,"zwp-autosize"),
336
+ K.mQuery(h).find(".zwp-subtitles-item").click(function(C){C.preventDefault();C.stopPropagation();C=K.mQuery(this);C.hasClass("active")||(C.siblings().removeClass("active"),C.addClass("active"),C=this.getAttribute("data-id"),typeof q.switchSubtitleTrack==="function"&&q.switchSubtitleTrack(C))}),d=q.controlbar.querySelector(".zwp-subtitleButton"))&&(d.style.display="block")}.bind(c);c.updateSubtitleTrack=function(d){}.bind(c);c.resetSubtitleMenu=function(){if(this.controlbar){var d=this.controlbar.querySelector(".zwp-subtitleButton");
337
+ d&&(d.style.display="none")}}.bind(c);c.__getDanmuBarDock=function(){var d=this.progressBar.timeInfo.querySelector(".zwp_danmuBarDock");d||(d=document.createElement("DIV"),d.setAttribute("class","zwp_danmuBarDock"),this.progressBar.timeInfo.appendChild(d),Ba.addElement(d),d.addEventListener("resize",function(h){var q=this;q.resizeTimer||(q.resizeTimer=K.setTimeout(function(){console.log("danmuBarDock resize");d.clientWidth<350?N(d,"zwp-mini"):Q(d,"zwp-mini");delete q.resizeTimer},50))}.bind(this)));
338
+ return d}.bind(c);c.buildDanmuToolbar=function(d,h){var q=this,C;if(!q.danmuToolbar){d&&(C=document.querySelector("#"+d));if(!C){if(!q.overlay_layers)return;h=null;C=q.progressBar&&q.progressBar.timeInfo?q.__getDanmuBarDock():q.overlay_layers}d=mb();C.insertAdjacentHTML("beforeend",d);q.danmuToolbar=C.querySelector(".zwp_danmu-controlbar");h&&N(q.danmuToolbar,h);C.appendChild(q.danmuToolbar);(h=q.danmuToolbar.querySelector(".zwp_switch"))&&h.addEventListener("click",function(H){H.stopPropagation();
339
+ H=H.currentTarget;if(L(H,"zwp_switch")){Oa(H);var P=L(H,"switch_on");H=K.$$(this.danmuToolbar);if(P){var O=H.find("button.btn_submit");O.removeClass("vtb_disabled").removeAttr("disabled");this.setEnableDanmu(!0);P=H.find(".barrage_inp_text");P.removeAttr("readonly").removeAttr("disabled").removeClass("disabled");P.attr("keydown")!="on"&&(P.keydown(function(V){V.which==13&&O.length>0&&O.trigger("click")}),P.attr("keydown","on"));H.find(".zwp-barrage_form").css("background-color","#28303db3").children("a.btn_bubble").toggleClass("disabled")}else H.find("button.btn_submit").addClass("vtb_disabled").attr({disabled:"disabled"}),
340
+ this.setEnableDanmu(!1),H.find(".barrage_inp_text").attr("readonly","readonly").attr("disabled","disabled").addClass("disabled"),H.find(".zwp-barrage_form").css("background-color","#202020b3").children("a.btn_bubble").toggleClass("disabled")}}.bind(q));(h=q.danmuToolbar.querySelector(".barrage_login"))&&h.addEventListener("click",function(H){H.preventDefault();H.stopPropagation();alert("login")});(h=q.danmuToolbar.querySelector(".zwp_dmconfig"))&&h.addEventListener("click",function(H){H.preventDefault();
341
+ H.stopPropagation();this.zwplayer=q;qb(H,this)});(h=q.danmuToolbar.querySelector(".btn_bubble"))&&h.addEventListener("click",function(H){H.preventDefault();H.stopPropagation();gb(this,H)});(h=q.danmuToolbar.querySelector(".btn_submit"))&&h.addEventListener("click",function(H){H.preventDefault();H.stopPropagation();a:{if(!this.inpbox){$inpbox=$$(this).parent().children("DIV.zwp-barrage_inp").children(".barrage_inp_text");if(!$inpbox)break a;this.inpbox=$inpbox}if(q){H=this.inpbox.val();if(H=="")break a;
342
+ H.indexOf("&")!=-1&&(H=H.replace(/&/g,"&amp;"));H.indexOf("<")!=-1&&(H=H.replace(/</g,"&lt;"));H.indexOf(">")!=-1&&(H=H.replace(/>/g,"&gt;"));H.indexOf('"')!=-1&&(H=H.replace(/"/g,"&quot;"));H.indexOf("'")!=-1&&(H=H.replace(/'/g,"&#039;"));if(!q.sendDanmu(H))break a}this.inpbox.val("")}})}}.bind(c);c.reposDanmuToolbar=function(d){if(this.danmuToolbar&&this.progressBar&&this.progressBar.timeInfo){var h=this.__getDanmuBarDock(),q=this.danmuToolbar.parentNode;q&&(d?q!==h&&(q.removeChild(this.danmuToolbar),
343
+ h.appendChild(this.danmuToolbar),this.oldDanmuParentNode=q):this.oldDanmuParentNode&&(h.removeChild(this.danmuToolbar),this.oldDanmuParentNode.appendChild(this.danmuToolbar),delete this.oldDanmuParentNode))}}.bind(c);c.sendDanmu=function(d){if(typeof this._config.sendDanmu==="function"){var h="";this.danmuSetting.border&&(h+=',"border":"1"');this.danmuSetting.color&&(h+=',"color":"#'+this.danmuSetting.color+'"');this._config.sendDanmu('{"type":"danmu","text":"'+d+'"'+h+"}");return!0}alert("No danmu send function is setup");
344
+ return!1}.bind(c);c.showContextMenu=function(d){var h=this,q=d.offsetX;d=d.offsetY;var C=h.playerContainer.getBoundingClientRect(),H=C.width;C=C.height;var P="left",O="top",V=q,S=d;q+180>H&&(P="right",V=H-q);d+148>C&&(O="bottom",S=C-d);if(h.contextMenu)h.contextMenu.style[P==="left"?"right":"left"]=null,h.contextMenu.style[O==="top"?"bottom":"top"]=null,h.contextMenu.style[P]=V+"px",h.contextMenu.style[O]=S+"px";else{q='<div class="zwp-popupmenu" style="'+P+": "+V+"px; "+O+":"+S+'px;"><a class="zwp-menuitem" data-action="document" href="https://www.zwplayer.com/docment" target="zwplayer-doc"><span class="zwp-menucaption">'+
345
+ (pa("player-help","Help and document")+"</span></a>");q+='<a class="zwp-menuitem" data-action="version" href="https://www.zwplayer.com/version?v=3.1.3" title="Build: 20250825" target="zwplayer-version"><span class="zwp-menucaption">'+pa("version-update","Version update")+' (<span class="zwp-version">'+pa("current")+": v3.1.3</span>) </span></a>";q=q+'<span class="zwp-menuseperator" action="version"></span><a class="zwp-menuitem" data-action="about" href="https://www.zwplayer.com/about"><span class="zwp-menucaption">'+
346
+ (pa("about","About")+" zwplayer</span></a>");h.playerContainer.insertAdjacentHTML("beforeEnd",q+"</div>");h.contextMenu=h.playerContainer.querySelector(".zwp-popupmenu");var U=function(g){g.stopPropagation();g.preventDefault();var r=this.getAttribute("data-action");this.getAttribute("target");var t=this.getAttribute("href");h.hideContextMenu();setTimeout(function(){r==="about"?K.open(t,"zwplayer-about"):r==="version"?K.open(t,"zwplayer-version"):r==="document"&&K.open(t,"zwplayer-doc")},10)};h.contextMenu.querySelectorAll("a.zwp-menuitem").forEach(function(g){g.addEventListener("click",
347
+ U,!1)});document.addEventListener("click",h.hideContextMenu)}}.bind(c);c.hideContextMenu=function(){this.contextMenu&&(this.playerContainer.removeChild(this.contextMenu),delete this.contextMenu,document.removeEventListener("click",this.hideContextMenu))}.bind(c);c.toast=function(d,h,q,C){var H=this;h=h||2E3;H.toastTimerId&&(clearTimeout(H.toastTimerId),H.toastBox&&(H.overlay_layers.removeChild(H.toastBox),delete H.toastBox));if(d!=="closetoast"){if(typeof d==="object"){if("icon"in d)var P=d.icon;
348
+ d=d.text}var O=document.createElement("div"),V="",S="zwp-toast zwp-center";P&&(S+=" zwp-toast-icon",V='<i class="xicon xicon-'+P+'"></i>');q&&(V+='<a href="javascript:void(0)" class="zwp-toast-closebtn"><i class="xicon xicon-close"></i></a>',S+=" zwp-use-close");C&&(S+=" zwp-lite");V+='<span class="zwp-toast-text">'+d+"</span>";O.setAttribute("class",S);O.innerHTML=V;H.overlay_layers.appendChild(O);H.toastBox=O;var U=function(g){if(H.toastBox){var r=H.toastBox.querySelector(".zwp-toast-closebtn");
349
+ r&&r.removeEventListener("click",U);H.overlay_layers.removeChild(H.toastBox);delete H.toastBox}H.toastTimerId&&(g&&g.type==="click"&&clearTimeout(H.toastTimerId),delete H.toastTimerId)};H.toastTimerId=K.setTimeout(U,h);q&&(q=O.querySelector(".zwp-toast-closebtn"))&&q.addEventListener("click",U)}}.bind(c);c.mutedConfirmBox=function(){var d=this;d.popup_layers||(d.popup_layers=document.createElement("div"),d.popup_layers.setAttribute("class","zwp__popup_layers"),d.playerContainer.appendChild(d.popup_layers));
350
+ var h=document.createElement("div");h.setAttribute("class","zwp-toast zwp-confirm zwp-center");h.innerHTML='<span class="zwp-toast-text">\u56e0<a href="#mutemore" class="mutemore">\u6d4f\u89c8\u5668\u9650\u5236</a>\uff0c\u9700\u8981\u70b9\u51fb<a href="#openaudio" class="openaudio">\u6253\u5f00\u58f0\u97f3</a><button class="closeBtn" title="\u5173\u95ed\u63d0\u793a"><i class="xicon xicon-close"></i></button></span>';d.popup_layers.appendChild(h);d.mutedTipBox=h;var q=h.querySelector(".closeBtn");
351
+ q&&q.addEventListener("click",function(C){C.preventDefault();d.mutedTipBox&&(d.popup_layers.removeChild(d.mutedTipBox),d.popup_layers.style.display=null,delete d.mutedTipBox);K.allowAutoAudioPlay=!0});(q=h.querySelector(".openaudio"))&&q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();d.mutedTipBox&&(d.popup_layers.removeChild(d.mutedTipBox),d.popup_layers.style.display=null,delete d.mutedTipBox);d.setMuted(!1);K.allowAutoAudioPlay=!0});(q=h.querySelector(".mutemore"))&&
352
+ q.addEventListener("click",function(C){C.preventDefault();C.stopPropagation();var H=h.querySelector(".moreInfoBox");H||(h.insertAdjacentHTML("beforeend",'<div class="moreInfoBox"><div class="info-text">\u5f53\u4f60\u8bbf\u95ee\u672c\u7f51\u7ad9\u7684\u6b21\u6570\u8f83\u5c11\uff0c\u6216\u7ecf\u5e38\u9759\u97f3\u64ad\u653e\u65f6\uff0c\u6d4f\u89c8\u5668\u53ef\u80fd\u4f1a\u9650\u5236\u7f51\u7ad9\u97f3\u91cf\uff0c\u4f7f\u7f51\u7ad9\u65e0\u6cd5\u81ea\u52a8\u6267\u884c\u6709\u58f0\u64ad\u653e</div><div class="info-control"><button class="info-btn">\u6211\u77e5\u9053\u4e86</button></div></div>'),
353
+ H=h.querySelector(".moreInfoBox"),H.querySelector(".info-btn").addEventListener("click",function(P){P.preventDefault();P.stopPropagation();H.style.display="none"}));H&&(H.style.display="block");K.allowAutoAudioPlay=!0});d.popup_layers.style.display="block"}.bind(c);typeof c._config.playerElm=="string"?(e=c._config.playerElm,e.charAt(0)!="#"&&(e="#"+e),c.playerElm=document.querySelector(e)):Ua(c._config.playerElm)&&(c.playerElm=c._config.playerElm);c.playerElm?L(c.playerElm,"zwp-wrap")||(c.playerElmOldClass=
354
+ c.playerElm.getAttribute("class"),N(c.playerElm,"zwp-wrap"),c.doRemovePlayerClass=!0):(e="",typeof c._config.playerElm=="string"?(e=c._config.playerElm,e.charAt(0)=="#"&&(e=e.substr(1))):e="ZWP-"+(new Date).getTime(),c.playerElm=document.createElement("DIV"),c.playerElm.id=e,c.playerElm.style.position="absolute",c.playerElm.style.left=0,c.playerElm.style.top=0,c.playerElm.style.width="640px",c.playerElm.style.height="360px",document.body.appendChild(c.playerElm),c.playerElm.setAttribute("class","zwp-wrap"),
355
+ c.doDeletePlayerElm=!0);c.playerContainer=document.createElement("DIV");c.playerContainer.setAttribute("class","zwp-container");c.playerElm.appendChild(c.playerContainer);typeof c._config.videoElm=="string"?(e=c._config.videoElm,e.charAt(0)!="#"&&(e="#"+e),c.videoEl=document.querySelector(e)):Ua(c._config.videoElm)&&(c.videoEl=c._config.videoElm);if(!c.videoEl){var A=document.createElement("DIV");A.setAttribute("class","zwp-videoWrapper");c.playerContainer.appendChild(A);Ba.addElement(A);A.addEventListener("resize",
356
+ function(d){this._config.video_rotated&&this.rotateVideo()}.bind(c));c.videoWrapper=A;c.videoEl=document.createElement("VIDEO");typeof c._config.videostyle=="string"&&c.videoEl.setAttribute("style",c._config.videostyle);typeof c._config.videoclass=="string"&&c.videoEl.setAttribute("class",c._config.videoclass);c._config.videostyle||c._config.videoclass||c.videoEl.setAttribute("style","width:100%;height:100%;");typeof c._config.videoElm=="string"&&(e=c._config.videoElm,e.charAt(0)=="#"&&(e=e.substr(1)),
357
+ c.videoEl.id=e);c.videoEl.setAttribute("playsinline","");c.videoEl.setAttribute("webkit-playsinline","");c.videoEl.setAttribute("autoplay","");A.appendChild(c.videoEl);c.videoRemoveWhenClose=!0}c.videoEl.volume=c._config.defVolume/100;c._config.poster&&c.videoEl.setAttribute("poster",c._config.poster);if(!c._config.disableOverlayLayer&&(e=document.createElement("div"),e.setAttribute("class","zwp__layers"),e.innerHTML='<div class="zwp__overlay zwp__layer zwp_loadingicon" style="width: 100%; height: 100%; display: none;"><div class="zwp__overlay-loading"><span class="zwp__overlay-loading-bg-img"><svg width="80px" height="80px" viewBox="0 0 38 38" xmlns="http://www.w3.org/2000/svg" stroke="#fff"><g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indefinite"/></path></g></g></svg></span></div></div><div class="zwp__overlay zwp__layer zwp__overlay-play" style="width: 100%; height: 100%; display: none;"><div class="zwp__overlay-button" role="button" tabindex="0" aria-label="play" aria-pressed="false" data-action="play"><svg class="icon" width="96px" height="96px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path fill="#c2c2c2" d="M512.61025 48.820024a463.790226 463.790226 0 1 0 463.790227 463.790226A463.790226 463.790226 0 0 0 512.61025 48.820024z m0 854.350417a390.560191 390.560191 0 1 1 390.560191-390.560191 390.560191 390.560191 0 0 1-390.560191 390.560191z m166.720382-414.970203l-120.341359-70.300834-127.908463-74.694636a22.945411 22.945411 0 0 0-32.465315 24.410011v288.526341a22.945411 22.945411 0 0 0 32.465315 24.410012l127.908463-74.694636 120.341359-70.056734a28.559714 28.559714 0 0 0 0-47.599524z" /></svg></div></div>',
358
358
  c.playerContainer.appendChild(e),c.overlay_layers=e,c.bigPlayOverlay=e.querySelector(".zwp__overlay-play"),c.bigPlayBtn=c.bigPlayOverlay.querySelector(".zwp__overlay-button"),c.loadingOverlay=e.querySelector(".zwp_loadingicon"),c._config.disablePlayBtn?N(c.bigPlayBtn,"zwp_disabled"):c.bigPlayBtn.addEventListener("click",function(d){d.preventDefault();d.stopPropagation();this.on_btnclick(d)}.bind(c)),c._config.enableDanmu&&(c.danmuPlayer=HUAYI.Danmu.create({playerId:e})),e.addEventListener("contextmenu",
359
- function(d){d.preventDefault();d.stopPropagation();Va||this.showContextMenu(d)}.bind(c)),e.addEventListener("click",function(d){var h=this;d=function(q){q=q.querySelector(".closeBtn");var C=document.createEvent("Event");C.initEvent("click",!0,!0);q.dispatchEvent(C)};h.infoViewer?d(h.infoViewer):h.colorSettingPanel?d(h.colorSettingPanel):h.contextMenu?h.hideContextMenu():h._config.disableClickPause||h._config.disablePlayBtn||h._config.isLive||(h.overlayLayerClickTimer&&(L.clearTimeout(h.overlayLayerClickTimer),
360
- delete h.overlayLayerClickTimer),h.videoEl&&(h.overlayLayerClickTimer=L.setTimeout(function(){h.videoEl.paused||h.videoEl.ended?(h.videoEl.play(),h.setplaystate(!0)):(h.videoEl.pause(),h.setplaystate(!1));delete h.overlayLayerClickTimer},300)))}.bind(c)),c._config.logo)){if("object"===typeof c._config.logo){if("string"===typeof c._config.logo.icon)var A=c._config.logo.icon}else"string"===typeof c._config.logo&&(A=c._config.logo);if(A){v='<div class="zwp-logo"';if("object"===typeof c._config.logo){var M=
361
- "";"dock"in c._config.logo?M+=("left"===c._config.logo.dock?"left":"right")+": "+(c._config.logo.x||"5%")+";":"x"in c._config.logo&&(M+="right: "+c._config.logo.x+";");"y"in c._config.logo&&(M+="top: "+c._config.logo.y+";");"width"in c._config.logo&&(M+="width: "+c._config.logo.width+";");if("opacity"in c._config.logo){var b=c._config.logo.opacity/100;1<b&&(b=1);M+="opacity: "+b+";"}M&&(v+=' style="'+M+'"')}e.insertAdjacentHTML("afterbegin",v+('><img src="'+A+'"></div>'))}}if(c._config.nativecontrols)c.videoEl.setAttribute("controls",
362
- "controls"),c.overlay_layers&&(c.overlay_layers.style.bottom="70px"),c.videoEl.addEventListener("fullscreenchange",function(d){return!1}.bind(c));else if(c._config.controlbar){var Q=document.createElement("div");Q.setAttribute("class","zwp-controlbar");c._config.isLive||N(Q,"zwp-vodplayer");Q.innerHTML=rb(c._config);c.playerContainer.appendChild(Q);c.controlbar=Q;if(c.controlbar){Q.addEventListener("dblclick",function(d){d.stopPropagation()});A=Q.querySelectorAll("button.zwpbtn");0<A.length&&(c.btnBindZwp=
363
- !0,A.forEach(function(d){d.addEventListener("click",c.on_btnclick)}));c._config.disablePlayBtn&&(A=Q.querySelector(".zwp_playbtn"),N(A,"zwp_disabled"),A.setAttribute("disabled","disabled"));A=Q.querySelectorAll(".zwp-speedMenu>li.zwp-speed-item");0<A.length&&A.forEach(function(d){d.addEventListener("click",c.on_speedItemclick)});var z=Q.querySelector(".zwp-volume-docker");if(z){c.muteBtn=z.querySelector("button.zwp-muteBtn");c.volslider=z.querySelector(".zwp-volume-slider");c.voltotal=z.querySelector(".zwp-volume-total");
364
- c.volcurrent=c.volslider.querySelector(".zwp-volume-current");c.volthumb=c.volslider.querySelector(".zwp-volume-handle");var la=function(d){if(null!==d&&!isNaN(d)&&void 0!==d){d=Math.max(0,d);d=Math.min(d,1);if(0===d){P(z,"zwp__mute");N(z,"zwp__unmute");var h=c.muteBtn;h.setAttribute("title","unmute");h.setAttribute("aria-label","unmute")}else P(z,"zwp__unmute"),N(z,"zwp__mute"),h=c.muteBtn,h.setAttribute("title","muted"),h.setAttribute("aria-label","muted");h=c.volthumb;var q=c.volcurrent;d=100*
365
- d+"%";var C=getComputedStyle(h);q.style.bottom=0;q.style.height=d;h.style.bottom=d;h.style.marginBottom=-parseFloat(C.height)/2+"px"}},I=function(d){var h=B(c.voltotal),q=getComputedStyle(c.voltotal),C=!0;"touchmove"==d.type&&(d.changedTouches&&(C=d.changedTouches[0],d.pageX=C.pageX,d.pageY=C.pageY),C=!1);q=parseFloat(q.height);q=(q-(d.pageY-h.top))/q;0!==h.top&&0!==h.left&&(q=Math.max(0,q),q=Math.min(q,1),la(q),c.setMuted(0===q),c.setVolume(q),C&&d.preventDefault(),d.stopPropagation())};c.positionVolumeThumb=
366
- la;c.on_volthumb_mousemove=function(d){var h=d.target;n&&(h===c.volslider||h.closest(".zwp-volume-slider"))&&I(d)}.bind(c);c.on_volthumb_mouseup=function(d){n&&("onpointerout"in document?(document.removeEventListener("pointermove",c.on_volthumb_mousemove),document.removeEventListener("pointerup",c.on_volthumb_mouseup),document.removeEventListener("touchmove",c.on_volthumb_mousemove),document.removeEventListener("touchend",c.on_volthumb_mouseup)):(document.removeEventListener("mousemove",c.on_volthumb_mousemove),
367
- document.removeEventListener("mouseup",c.on_volthumb_mouseup)),n=!1);m||(c.volslider.style.display="none");console.log("volthumb_mouseup:"+d.type)}.bind(c);c.on_volthumb_mousedown=function(d){I(d);"onpointerout"in document?(document.addEventListener("pointermove",c.on_volthumb_mousemove),document.addEventListener("pointerup",c.on_volthumb_mouseup),document.addEventListener("touchmove",c.on_volthumb_mousemove),document.addEventListener("touchend",c.on_volthumb_mouseup)):(document.addEventListener("mousemove",
368
- c.on_volthumb_mousemove),document.addEventListener("mouseup",c.on_volthumb_mouseup));n=!0;d.preventDefault();d.stopPropagation()}.bind(c);var ja=c.volslider;z.addEventListener("mouseenter",function(d){d.target===z&&(ja.style.display="block",m=!0,d.preventDefault(),d.stopPropagation())});z.addEventListener("focusin",function(){ja.style.display="block";m=!0});z.addEventListener("focusout",function(d){if(!d.relatedTarget||d.relatedTarget&&!d.relatedTarget.matches(".zwp-volume-slider"))ja.style.display=
369
- "none"});z.addEventListener("mouseleave",function(){m=!1;n||(ja.style.display="none")});z.addEventListener("focusout",function(){m=!1});z.addEventListener("keydown",function(d){var h=d.which||d.keyCode||0;d.preventDefault();d.stopPropagation();32==h&&(c.videoEl.muted?c.setMuted(!1):c.setMuted(!0))});ja.addEventListener("dragstart",function(){return!1});ja.addEventListener("mouseover",function(){m=!0});ja.addEventListener("focusin",function(){ja.style.display="block";m=!0});ja.addEventListener("focusout",
370
- function(){m=!1;n||(ja.style.display="none")});ja.addEventListener("mousedown",c.on_volthumb_mousedown)}if(A=Q.querySelector(".zwp-optionPanel"))A=A.querySelectorAll(".action-item"),0<A.length&&A.forEach(function(d){d.addEventListener("click",c.on_optionItemclick)})}}c._config.autoSmallWindow&&!c.windowScrollHandler&&(c.windowScrollHandler=function(d){if(!this.isFullscr&&!this.isFullscrWin&&this.videoEl&&this.playerElm&&this.isPlaying&&!this.isInPicInPic)if(d=u(this.playerElm),(document.documentElement.scrollTop||
371
- document.body.scrollTop)>=d+this.playerElm.offsetHeight-100){if(!this.smallWindowMode){var h=this.playerContainer;hb(h,function(){P(h,"zwp-smallwindow");h.style.left=null;h.style.top=null;h.style.width=null;h.style.height=null});N(h,"zwp-smallwindow");this.smallWindowMode=!0}}else this.smallWindowMode&&(h=this.playerContainer,P(h,"zwp-smallwindow"),h.style.left=null,h.style.top=null,h.style.width=null,h.style.height=null,delete this.smallWindowMode)}.bind(c),L.addEventListener("scroll",c.windowScrollHandler));
372
- c._config.clientip||(c._config.clientip="");c.videoEl&&(c._config.muted?c.setMuted(!0):"undefined"===typeof L.allowAutoAudioPlay?(c.setMuted(!0),cb(function(d){d?c.setMuted(!1):c.mutedConfirmBox();L.allowAutoAudioPlay=d})):L.allowAutoAudioPlay||(c.setMuted(!0),c.mutedConfirmBox()),(c._config.snapshotButton||c._config.allowSnapshot)&&c.videoEl.setAttribute("crossorigin","Anonymous"));A=function(d){var h=this;if(h.controlbar)if(h.isControlbarhidden){h.controlbar.style.display="flex";P(h.playerElm,"hide-cursor");
373
- d=d||L.event;if(d.srcElement!=h.controlbar&&h.overlay_layers){var q=h.overlay_layers.offsetHeight,C=0;"undefined"!==typeof d.offsetY?C=q-d.offsetY:"undefined"!==typeof d.layerY&&(C=q-d.layerY);if(80<C)return}Pa(h.controlbar,500,function(G){G&&h.startHideControlbar(h)});h.isControlbarhidden=!1}else h.startHideControlbar(h)}.bind(c);c.playerElm.addEventListener("mousemove",A);c.playerElm.addEventListener("touchmove",A);c.playerElm.addEventListener("dblclick",function(d){this.overlayLayerClickTimer&&
374
- (L.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);if(this.controlbar&&(d={},d.currentTarget=this.controlbar.querySelector(".zwp-fullscrBtn"),d.currentTarget))this.on_btnclick(d)}.bind(c));"undefined"==typeof c._config.autoplay&&(c._config.autoplay=!0);c._config.url&&c._config.autoplay&&c.play(c._config.url);"function"==typeof c._config.onready&&c._config.onready.call(c);c._config.chapters&&(c.chapters=c._config.chapters);c._config.lostFocusPause&&"undefined"!==typeof document.visibilityState&&
375
- document.addEventListener("visibilitychange",function(){this._config.isLive||this.isInPicInPic||("visible"===document.visibilityState?this.focusPaused&&this.videoEl.paused&&!this.videoEl.ended&&(this.videoEl.play(),this.setplaystate(!0),delete this.focusPaused):this.focusPaused||this.videoEl.paused||this.videoEl.ended||(this.videoEl.pause(),this.setplaystate(!1),this.focusPaused=!0))}.bind(c));c._config.fluid?c._config.autoplay||(N(c.playerElm,"zwp-fluid"),c.playerElm.style.maxWidth="100%",c.playerElm.style.width=
376
- "100%",c.playerElm.style.height="0",e=56.25,"number"===typeof c._config.ratio?e=100*c._config.ratio:"string"===typeof c._config.ratio?(A=c._config.ratio.split(":"),2===A.length&&(e=parseFloat(A[0]),A=parseFloat(A[1]),0===e&&(e=1),e=100*A/e)):"number"===typeof c._config.width&&"number"===typeof c._config.height&&(e=c._config.width,0===e&&(e=1),e=100*c._config.height/e),c.playerElm.style.paddingTop=e+"%"):c._config.width&&c._config.height&&(c.playerElm.style.width="number"===typeof c._config.width?
377
- c._config.width+"px":c._config.width,c.playerElm.style.height="number"===typeof c._config.height?c._config.height+"px":c._config.height)},aa=async function(e){if("undefined"==typeof L.RTCPeerConnection)return alert("This browser does not support the stream.\r\nPlease play this stream in chrome!"),!1;var n=J(e.murl);if(!n)return e.toast("Invalid url"),!1;e.peer_conn=new RTCPeerConnection("function"==typeof RTCPeerConnection.prototype.addTransceiver?{iceServers:[],iceTransportPolicy:"all",bundlePolicy:"max-bundle",
378
- rtcpMuxPolicy:"require",sdpSemantics:"unified-plan"}:null);e.mediaStream=new MediaStream;e.peer_conn.ontrack=function(c){if(!this.hasTracks){this.setRtcstream(e.mediaStream);var l=y();console.log("start usetime:"+(F-l))}this.hasTracks++;this.mediaStream.addTrack(c.track);e.baseTrack&&"video"!=c.track.kind||(e.baseTrack=c.track);e.rtcstatsTimerId||(e.packetsReceived=0,e.framesDecoded=0,e.emptyCount=0,e.rtcstatsTimerId=L.setInterval(function(){e.baseTrack&&e.peer_conn.getStats(e.baseTrack).then(v=>
379
- {v.forEach(A=>{"inbound-rtp"==A.type&&"video"==A.kind&&(A.framesDecoded!=e.framesDecoded?(e.framesDecoded=A.framesDecoded,e.packetsReceived=A.packetsReceived,e.emptyCount=0):0<e.framesDecoded&&(e.emptyCount++,3<e.emptyCount&&(console.warn("Rtp Data break for "+e.emptyCount),e.closecall(e),aa(e))))})})},1E3))}.bind(e);e.hasTracks=0;if("function"==typeof e.peer_conn.addTransceiver){("undefined"===typeof e._config.hasAudio||e._config.hasAudio)&&await e.peer_conn.addTransceiver("audio",{direction:"recvonly"});
380
- await e.peer_conn.addTransceiver("video",{direction:"recvonly"});var m=await e.peer_conn.createOffer()}else m=await e.peer_conn.createOffer({offerToReceiveAudio:"undefined"===typeof e._config.hasAudio||e._config.hasAudio,offerToReceiveVideo:!0});await e.peer_conn.setLocalDescription(m);(new Promise(function(c,l){var v={api:n.apiUrl,rtcstream:n.streamUrl,clientip:null,sdp:m.sdp};"webrtc"===n.urlObject.schema&&(delete v.rtcstream,v.streamurl=n.streamUrl);console.log("Generated offer: ",v);w(n.apiUrl,
381
- JSON.stringify(v),function(A){console.log("Got answer: ",A);A.code?l(A):c(A)},function(A){"REQUEST:error"==A&&(e.tryStartPlayTimer=L.setTimeout(function(){delete e.tryStartPlayTimer;e.closecall(e);aa(e)},1E3));l(A)})})).then(c=>{e.peer_conn.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:c.sdp}))}).catch(c=>{console.log(c);e.peer_conn.close();e.peer_conn=null});e.closecall=function(c){c.rtcstatsTimerId&&(L.clearInterval(c.rtcstatsTimerId),delete c.rtcstatsTimerId);c.tryStartPlayTimer&&
382
- (L.clearTimeout(c.tryStartPlayTimer),delete c.tryStartPlayTimer);"undefined"!=typeof c.baseTrack&&delete c.baseTrack;c.peer_conn&&(c.videoEl&&(c.videoEl.srcObject=null),c.mediaStream&&delete c.mediaStream,c.peer_conn.close(),c.peer_conn=null)};return!0},fa=async function(e){var n=e._config.xmc_url||L.xmc_url;if(!n)return e.toast("The rtsp protocol is not supported without setting XMC."),!1;n+="play";e.wsclient&&(e.wsclient.close(),delete e.wsclient);n=n.replace("http","ws");var m=new WebSocket(n);
383
- m.onopen=function(){var c="undefined"===typeof e._config.rtspOverTcp?1:e._config.rtspOverTcp,l="boolean"===typeof e._config.rtsp_bypass?e._config.rtsp_bypass:0,v="undefined"===typeof e._config.use_audio?0:e._config.use_audio,A="MediaSource"in L&&L.MediaSource.isTypeSupported("video/mp4;codecs=hvc1.1.1.L93.B0")?1:0;c=JSON.stringify({msgtype:"playurl",data:{sourceurl:e.murl,rtsp_over_tcp:c,has_audio:v,has_hevc:A,rtsp_bypass:l}});m.send(c)};m.onmessage=function(c){console.log(c.data);c=JSON.parse(c.data);
384
- if("object"==typeof c&&"onresult"===c.type&&"playurl"===c.event&&"object"===typeof c.streaminfo)if(e.closecall2=function(v){v.waitSignTimer&&(L.clearTimeout(v.waitSignTimer),delete v.waitSignTimer);v.wsclient&&(v.wsclient.close(),v.wsclient=null,delete v.wsclient)},c.snapshot&&e.videoEl&&e.videoEl.setAttribute("poster",c.snapshot),e._config.useFlv||"string"!==typeof c.streaminfo.rtc_playurl)"string"===typeof c.streaminfo.http_playurl?(l=c.streaminfo.http_playurl+c.streaminfo.stream+".flv",e.murl=
385
- l,Y(e)):e.closecall2(e);else{var l=c.streaminfo.rtc_playurl+c.streaminfo.stream+".rtc";c.first?e.waitSignTimer=setTimeout(function(){e.murl=l;aa(e);delete e.waitSignTimer},1E3):(e.murl=l,aa(e))}};m.onclose=function(){e.wsclient&&delete e.wsclient};m.onerror=function(){};e.wsclient=m;return!0},ma=function(e){Ja("flv_js",Ia+"flv.min.js",function(n){console.log("js:"+n+" is load!");var m=L.flvjs;if(!m.isSupported())return!1;var c={type:"flv",isLive:!0,url:e.murl};var l={enableWorker:!1,enableStashBuffer:!1,
386
- stashInitialSize:0,lazyLoad:!1,autoCleanupSourceBuffer:!0,lazyLoadMaxDuration:0,isLive:!0};e.openFlv=function(){var v=m.createPlayer(c,l);v.on(m.Events.METADATA_ARRIVED,function(A){e.loadingOverlay&&(e.loadingOverlay.style.display="none");"object"==typeof A&&console.log("flvplayer:"+A.type)});v.on(m.Events.ERROR,function(A){"object"==typeof A?console.log("flvplayer:"+A.type):console.log("flvplayer:"+A)});v.attachMediaElement(e.videoEl);e.videoEl.playbackRate=1;e.onFlvStaticInfo=function(A){this.videoEl.paused||
387
- (this.lastDecodedFrames?this.lastDecodedFrames!=A.decodedFrames?this.lastDecodedFrames=A.decodedFrames:(this.lastDecodedFrames=0,this.flvPlayer&&(this.closecall(this),this.openFlv(),this.setplaystate(!0))):this.lastDecodedFrames=A.decodedFrames)}.bind(e);e.onFlvError=function(A){"NetworkError"!==A||e.reconnectTimer||(e.reconnectTimer=L.setTimeout(function(){e.flvPlayer&&(e.closecall(e),e.openFlv(),e.setplaystate(!0));delete e.reconnectTimer},1E3))}.bind(e);e.onMediainfoCb=function(A){A&&this.setMediainfo("flvjs",
388
- A)}.bind(e);v.on(m.Events.ERROR,e.onFlvError);v.on(m.Events.STATISTICS_INFO,e.onFlvStaticInfo);v.on(m.Events.MEDIA_INFO,e.onMediainfoCb);e.delayCheckTimerId=L.setInterval(function(){if(this.flvPlayer&&!this.videoEl.paused){var A=this.flvPlayer;if(A.buffered.length){let M=A.buffered.end(0)-A.currentTime;6<=M?A.currentTime=A.buffered.end(0)-.2:3<M&&(e.videoEl.playbackRate=1.5,e.fastForwardTimerId=setTimeout(function(){e.videoEl.playbackRate=1;delete e.fastForwardTimerId},2E3*M))}}}.bind(e),2E3);v.load();
389
- v.play();e.flvPlayer=v;e.closecall=function(A){if(A.flvPlayer){var M=A.flvPlayer;M.off(m.Events.ERROR,A.onFlvError);M.off(m.Events.STATISTICS_INFO,A.onFlvStaticInfo);M.off(m.Events.MEDIA_INFO,A.onMediainfoCb);delete A.onFlvError;delete A.onFlvStaticInfo;delete A.onMediainfoCb;A.delayCheckTimerId&&(L.clearInterval(A.delayCheckTimerId),delete A.delayCheckTimerId);A.fastForwardTimerId&&(L.clearTimeout(A.fastForwardTimerId),delete A.fastForwardTimerId);A.reconnectTimer&&(L.clearTimeout(A.reconnectTimer),
390
- delete A.reconnectTimer);M.pause();M.unload();M.detachMediaElement();M.destroy();delete A.flvPlayer}}};e.openFlv();e.setplaystate(!0)});return!0},Y=function(e){Ja("mpeg_js",Ia+"mpeg.min.js?v=2",function(n){console.log("js:"+n+" is load!");n=mpegts.getFeatureList();if(!mpegts.isSupported()||!n.mseLivePlayback)return!1;e.openMpegts=function(){var m=e.videoEl,c=void 0,l=void 0;"boolean"===typeof e._config.hasAudio&&(c=e._config.hasAudio);"boolean"===typeof e._config.hasVideo&&(l=e._config.hasVideo);
391
- c=mpegts.createPlayer({type:"mse",isLive:!0,hasAudio:c,hasVideo:l,url:e.murl},{autoCleanupSourceBuffer:!0,stashInitialSize:128,autoCleanupMaxBackwardDuration:20,autoCleanupMinBackwardDuration:10,enableWorker:!0,enableStashBuffer:!1});e.onErrorCb=function(v){var A=this;v!==mpegts.ErrorTypes.NETWORK_ERROR||A.reconnectTimer||(A.reconnectTimer=L.setTimeout(function(){A.mpegtsPlayer&&(A.closecall(A),A.openMpegts());delete A.reconnectTimer},1E3))}.bind(e);e.onEventCb=function(v){console.log(v)}.bind(e);
392
- e.onMetadataCb=function(v){console.log(v)}.bind(e);e.onMediaInfoCb=function(v){v&&this.setMediainfo("mpegts",v)}.bind(e);e.onStatisCb=function(v){this.videoEl.paused||(this.lastDecodedFrames?this.lastDecodedFrames!=v.decodedFrames?(this.lastDecodedFrames=v.decodedFrames,delete this.waitDecodedFrames):("undefined"===typeof this.waitDecodedFrames?this.waitDecodedFrames=0:this.waitDecodedFrames++,1<this.waitDecodedFrames&&(this.lastDecodedFrames=0,delete this.waitDecodedFrames,this.mpegtsPlayer&&(this.closecall(this),
393
- this.openMpegts()))):this.lastDecodedFrames=v.decodedFrames)}.bind(e);e.closecall=function(v){v.checkDelayTimerId&&(L.clearInterval(v.checkDelayTimerId),delete v.checkDelayTimerId);v.reconnectTimer||(L.clearTimeout(v.reconnectTimer),delete v.reconnectTimer);v.fastForwardTimerId&&(L.clearTimeout(v.fastForwardTimerId),delete v.fastForwardTimerId);if(v.mpegtsPlayer){var A=v.mpegtsPlayer;A.pause();A.off(mpegts.Events.ERROR,v.onErrorCb);A.off(mpegts.Events.MEDIA_INFO,v.onMediaInfoCb);A.off(mpegts.Events.METADATA_ARRIVED,
394
- v.onMetadataCb);A.off(mpegts.Events.STATISTICS_INFO,v.onStatisCb);A.unload();A.detachMediaElement();A.destroy();delete v.onErrorCb;delete v.onMediaInfoCb;delete v.onMetadataCb;delete v.onStatisCb;delete v.onEventCb;delete v.mpegtsPlayer}};e.checkDelayTimerId=L.setInterval(function(){var v=this;if(v.mpegtsPlayer&&!v.videoEl.paused&&v.mpegtsPlayer.buffered.length){var A=v.mpegtsPlayer.buffered.end(0)-v.mpegtsPlayer.currentTime;6<=A?v.mpegtsPlayer.currentTime=v.mpegtsPlayer.buffered.end(0)-.2:3<A&&(v.videoEl.playbackRate=
395
- 1.5,v.fastForwardTimerId=setTimeout(function(){v.videoEl.playbackRate=1;delete v.fastForwardTimerId},2E3*A))}}.bind(e),2E3);c.on(mpegts.Events.ERROR,e.onErrorCb);c.on(mpegts.Events.MEDIA_INFO,e.onMediaInfoCb);c.on(mpegts.Events.METADATA_ARRIVED,e.onMetadataCb);c.on(mpegts.Events.STATISTICS_INFO,e.onStatisCb);c.attachMediaElement(m);c.load();c.play();e.mpegtsPlayer=c};e.openMpegts()});return!0},ka=function(e){Ja("hls_js",Ia+"hls.min.js",function(n){console.log("js:"+n+" is load!");var m=L.Hls;if(m.isSupported()){var c=
396
- e,l=new m;l.attachMedia(e.videoEl);l.on(m.Events.MEDIA_ATTACHED,function(){console.log("video and hlsPlayer are now bound together !");l.loadSource(e.murl);l.on(m.Events.MANIFEST_PARSED,function(M,b){console.log("HLSPlayer manifest loaded, found "+b.levels.length+" quality level");c.loadingOverlay&&(c.loadingOverlay.style.display="none");c.videoEl.play();c.setplaystate(!0)})});l.on(m.Events.ERROR,function(M,b){if(b.fatal)switch(b.type){case m.ErrorTypes.NETWORK_ERROR:console.log("fatal network error encountered, try to recover");
397
- l.startLoad();break;case m.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover");l.recoverMediaError();break;default:l.destroy(),delete e.hlsPlayer,c.setplaystate(!1)}});c.onHlsManifestParsed=function(M,b){var Q=this;if(1<b.levels.length){var z=[];for(M=0;M<b.levels.length;M++){var la={mediaType:"video",bitrate:b.levels[M].bitrate,height:b.levels[M].height,width:b.levels[M].width,qualityIndex:M,name:b.levels[M].name||"q"+M};z.push(la)}Q.switchQualityLevel=function(I){l.nextLevel=
398
- parseInt(I)}.bind(Q);Q.createQualitiesMenu(z);l.on(m.Events.LEVEL_SWITCHED,function(I,ja){Q.updateQualityLevel(l.currentLevel,l.autoLevelEnabled)},Q)}else Q.resetQualitiesMenu();if(b.subtitleTracks&&0<b.subtitleTracks.length){z=[];for(M=0;M<b.subtitleTracks.length;M++)la=b.subtitleTracks[M],la.forced||(la={"default":la.default,id:la.id,lang:la.lang,name:la.name,url:la.url},z.push(la));Q.switchSubtitleTrack=function(I){I=parseInt(I);-1===I?l.subtitleDisplay=!1:(l.subtitleDisplay=!0,l.subtitleTrack=
399
- I)};Q.createSubtitlesMenu(z);l.on(m.Events.SUBTITLE_TRACK_SWITCH,function(I,ja){Q.updateSubtitleTrack(ja.id)})}}.bind(c);l.on(m.Events.MANIFEST_PARSED,c.onHlsManifestParsed);c.hlsPlayer=l;c.closecall=function(M){M.hlsPlayer&&(M.hlsPlayer.off(m.Events.MANIFEST_PARSED,M.onHlsManifestParsed),M.hlsPlayer.detachMedia(),M.hlsPlayer.destroy(),delete M.hlsPlayer,delete M.onHlsManifestParsed)}}else if(e.videoEl.canPlayType("application/vnd.apple.mpegurl")){c=e;e.videoEl.zwplayer=e;var v=function(){"object"==
400
- typeof this.zwplayer&&(this.play(),this.zwplayer.setplaystate(!0))},A=function(){"object"==typeof this.zwplayer&&console.log("HLS fatal media error encountered, try to recover")};c.videoEl.addEventListener("loadedmetadata",v);c.videoEl.addEventListener("error",A);c.closecall=function(M){"object"===typeof M.videoEl&&(M.videoEl.pause(),M.videoEl.src="",M.videoEl.removeEventListener("loadedmetadata",v),M.videoEl.removeEventListener("error",A),"object"==typeof M.videoEl.zwplayer&&delete M.videoEl.zwplayer)};
401
- c.videoEl.src=c.murl}else return e.toast("player cannot play hls media"),!1});return!0},ia=function(e){Ja("dash_js",Ia+"dash.all.min.js",function(n){console.log("js:"+n+" is load!");var m=L.dashjs,c=m.MediaPlayer().create();c.initialize(e.videoEl,e.murl,!0);n=e.getSimpleSubtitleRenderer();c.attachTTMLRenderingDiv(n);e.dashTextTrackList={};e.onDashMetadata=function(l){l&&console.log(l);this.loadingOverlay&&(this.loadingOverlay.style.display="none");this.videoEl.play();this.setplaystate(!0)}.bind(e);
402
- e.onDashQualityChanged=function(l){l=c.getQualityFor("video");var v=c.getSettings().streaming.abr.autoSwitchBitrate.video||!1;e.updateQualityLevel(l,v)}.bind(e);e.onDashStreamInitialized=function(l){c.getBitrateInfoListFor("audio");l=c.getBitrateInfoListFor("video")||[];1<l.length?(this.switchQualityLevel=function(v){v=parseInt(v);var A={streaming:{abr:{autoSwitchBitrate:{}}}};0<=v?(A.streaming.abr.autoSwitchBitrate.video=!1,c.updateSettings(A),c.setQualityFor("video",v,!1)):(A.streaming.abr.autoSwitchBitrate.video=
403
- !0,c.updateSettings(A))}.bind(this),this.createQualitiesMenu(l),c.on(m.MediaPlayer.events.QUALITY_CHANGE_RENDERED,this.onDashQualityChanged,this)):this.resetQualitiesMenu()}.bind(e);e.onDashTracksAdded=function(l){var v=this.dashTextTrackList;v[l.streamId]||(v[l.streamId]=[]);v[l.streamId]=v[l.streamId].concat(l.tracks)};e.onDashStreamDeactivated=function(l){var v=this.dashTextTrackList;l.streamInfo&&v[l.streamInfo.id]&&delete v[l.streamInfo.id]}.bind(e);e.onDashStreamActivated=function(l){l=l.streamInfo.id||
404
- "none";var v=this.dashTextTrackList;if(v[l]&&(l=v[l],!(1>l.length))){v=[];for(var A=0;A<l.length;A++){var M=l[A],b=ib(M.labels);b?b+=" : "+M.type:(b=M.label||M.lang,b+=" : "+M.kind);v.push({"default":M.defaultTrack,id:A,lang:M.lang,name:b,url:M.url||""})}this.switchSubtitleTrack=function(Q){var z=this.dashPlayer||null;z&&(parseInt(Q),z.setTextTrack(Q))}.bind(this);this.createSubtitlesMenu(v)}}.bind(e);c.on(m.MediaPlayer.events.PLAYBACK_METADATA_LOADED,e.onDashMetadata,e);c.on(m.MediaPlayer.events.STREAM_INITIALIZED,
405
- e.onDashStreamInitialized,e);c.on(m.MediaPlayer.events.STREAM_ACTIVATED,e.onDashStreamActivated,e);c.on(m.MediaPlayer.events.STREAM_DEACTIVATED,e.onDashStreamDeactivated,e);c.on(m.MediaPlayer.events.TEXT_TRACKS_ADDED,e.onDashTracksAdded,e);e.dashPlayer=c;e.closecall=function(l){l.dashPlayer&&(l.dashPlayer.pause(),l.dashPlayer.off(m.MediaPlayer.events.PLAYBACK_METADATA_LOADED,l.onDashMetadata,l),l.dashPlayer.off(m.MediaPlayer.events.STREAM_INITIALIZED,l.onDashStreamInitialized,l),l.dashPlayer.off(m.MediaPlayer.events.STREAM_ACTIVATED,
406
- l.onDashStreamActivated,l),l.dashPlayer.off(m.MediaPlayer.events.STREAM_DEACTIVATED,l.onDashStreamDeactivated,l),l.dashPlayer.on(m.MediaPlayer.events.TEXT_TRACKS_ADDED,e.onDashTracksAdded,e),l.switchQualityLevel&&(l.dashPlayer.off(m.MediaPlayer.events.QUALITY_CHANGE_RENDERED,l.onDashQualityChanged,l),delete l.switchQualityLevel),l.dashPlayer.destroy(),delete l.dashPlayer,delete l.onDashMetadata,delete l.onDashStreamInitialized,delete l.onDashStreamActivated,delete l.onDashStreamDeactivated,delete l.onDashTracksAdded,
407
- delete l.switchSubtitleTrack)}});return!0},na=function(e){var n=e.videoEl;e.closecall=function(m){if(m.isPlayVideo){var c=m.videoEl;c.paused||c.pause();c.src="";delete m.isPlayVideo}};e.isPlayVideo=!0;n.src=e.murl;return!0},ha=function(e){var n=e.videoEl;e.closecall=function(m){if(m.isPlayAudio){var c=m.videoEl;c.paused||c.pause();c.src="";delete m.isPlayAudio}};e.isPlayAudio=!0;n.src=e.murl;return!0},ca=function(e){var n=e.murl;if("dvr"===(n.type||"")&&n.http)return e.murl=n.http,na(e);if(L.MediaSource&&
408
- L.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')){var m=L.RTCPeerConnection||L.webkitRTCPeerConnection||L.mozRTCPeerConnection||L.RTCIceGatherer;if(n.rtc&&m)return e.murl=n.rtc,aa(e);if(n["httpflv-n"])return e.murl=n["httpflv-n"],ma(e);if(n.httpflv)return e.murl=n.httpflv,ma(e);if(n["wsflv-n"])return e.murl=n["wsflv-n"],ma(e);if(n.wsflv)return e.murl=n.wsflv,ma(e);if(n.hls)return e.murl=n.hls,ka(e);if(n.dash)return e.murl=n.dash,ia(e);if(n.ts)return e.murl=n.ts,Y(e)}else if(e.murl.hls)return e.murl=
409
- e.murl.hls,ka(e);return!1},oa=function(e){var n=[];var m=String.fromCharCode(107)+"u"+String.fromCharCode(97)+"ishou";var c=String.fromCharCode(46)+"co"+String.fromCharCode(109)+"/",l=String.fromCharCode(100)+"ou"+String.fromCharCode(121)+"i"+String.fromCharCode(110);n.push("https://live."+m+c+"u/");n.push("https://live."+l+c);if("string"===typeof e&&23<e.length)for(c=0;c<n.length;c++)if(m=n[c],0===e.indexOf(m))return!0;return!1};ba.prototype={play:function(e,n,m){var c=this;if(e){c.murl&&c.stop();
410
- if("string"===typeof e&&(e.startsWith("wcdn://")||e.startsWith("wcdns://")))return!0;if("object"===typeof e){"object"===typeof e.thumbnails&&(c._config.thumbnails=JSON.parse(JSON.stringify(e.thumbnails)));if("object"===typeof e.murls){c.multiStreams=JSON.parse(JSON.stringify(e));var l=e.murls}else Array.isArray(e)?(c.multiStreams={},l=e):(c.multiStreams={},l=[e]),c.multiStreams.murls=l;var v=!0,A="",M=[],b;for(b in l){var Q,z=l[b];if("object"===typeof z)if(Array.isArray(z)){var la="";var I=z[0];if(2<
411
- z.length){var ja=z[2];la=z[1]}else ja=1<z.length?z[1]:b;M.push({url:I,name:ja,mime:la});v&&(e=I,A=ja,v=!1)}else{if(I=!1,"default"in z&&z["default"]&&(I=z["default"]),v||I)"url"in z&&(e=z.url),"name"in z&&(Q=z.name),A=Q,v=!1}else"string"===typeof z&&v&&(Q=b,e=z,A=Q,v=!1)}0<M.length&&(c.multiStreams.murls=M);c.multiStreams.curStream=A;console.log(e)}c.murl=e}if(!c.murl)return!1;c.force_stopped=!1;c.isPlaying=!0;c.loadingOverlay&&(c.loadingOverlay.style.display="flex");"undefined"!=typeof n&&(n?c._config.isLive=
412
- n:delete c._config.isLive);"undefined"!=typeof m&&(m?c._config.useOldFlv=m:delete c._config.useOldFlv);e=!1;if("object"==typeof c.murl)e=ca(c);else if("string"==typeof c.murl){e=H(c.murl);e||(n=c.murl.indexOf("mime_type="),0<n&&(n+=10,l=c.murl.indexOf("&",n),0>l&&(l=c.murl.length),n=c.murl.substring(n,l),"video_mp4"===n?e=".mp4":"video_flv"===n?e=".flv":"video_hls"===n?e=".m3u8":"video_rtc"===n?e=".rtc":"video_dash"===n&&(e=".mpd")));if(!e&&("string"===typeof c._config.streamtype&&("httpflv"===c._config.streamtype?
413
- e=".flv":"hls"===c._config.streamtype?e=".m3u8":"dash"===c._config.streamtype?e=".mpd":"mpegts"===c._config.streamtype?e=".ts":"webrtc"===c._config.streamtype&&(e=".rtc")),!e&&oa(c.murl))){var d=function(){setTimeout(function(){c.loadingOverlay&&(c.loadingOverlay.style.display="none")},1E3)};if(!c._config.url_proxy)return c.toast("Sorry, the player cannot play this media address",5E3,!0),d(),!1;var h=h;w(c._config.url_proxy,JSON.stringify({roomUrl:c.murl,token:c._config.proxy_token||"12345678"}),
414
- function(q){if("object"===typeof q&&q.result){q={murls:q.flvStreams||q.hlsStreams,multistream:1};if(!q.murls)return c.toast("Sorry, missing valid address for this room.",5E3,!0),d(),!1;c.play(q,h,m)}else c.toast("Sorry, unable to obtain a valid address for this room.",5E3,!0),d()},function(q){c.toast("Sorry, failed to get address due to network!",5E3,!0);d()});return!1}e=0===c.murl.indexOf("rtsp")?fa(c):".rtc"===e||c.murl.startsWith("webrtc://")?aa(c):".flv"===e?c._config.useOldFlv?ma(c):Y(c):".m3u8"===
415
- e?ka(c):".mpd"===e?ia(c):".mp4"===e?na(c):".mp3"===e||".m4a"===e||".aac"===e||".mp4a"===e||".ogg"===e?ha(c):".ts"===e?Y(c):na(c)}e?(c.setupEventsHandler(),c.startHideControlbar(c),c.multiStreams&&L.setTimeout(function(){c.buildStreamSelector()},1E3)):(c.isPlaying=!1,c.loadingOverlay&&(c.loadingOverlay.style.display="none"),c.toast("Play media failed, unsupported media type",5E3,!0));return e},__switchStream:function(e){if("string"!==typeof e)this.toast("Switch stream methon does not support "+e);
416
- else{this.murl=e;e=H(this.murl);if(!e){var n=this.murl.indexOf("mime_type=");if(0<n){n+=10;var m=this.murl.indexOf("&",n);0>m&&(m=this.murl.length);n=this.murl.substring(n,m);"video_mp4"===n?e=".mp4":"video_flv"===n?e=".flv":"video_hls"===n?e=".m3u8":"video_rtc"===n?e=".rtc":"video_dash"===n&&(e=".mpd")}}e||"string"===typeof this._config.streamtype&&("httpflv"===this._config.streamtype?e=".flv":"hls"===this._config.streamtype?e=".m3u8":"dash"===this._config.streamtype?e=".mpd":"mpegts"===this._config.streamtype?
417
- e=".ts":"webrtc"===this._config.streamtype&&(e=".rtc"));!this._config.isLive&&this.videoEl&&(this.postSeekTime=this.videoEl.currentTime);this.closecall&&(this.closecall(this),delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load());(0===this.murl.indexOf("rtsp")?fa(this):".rtc"===e||this.murl.startsWith("webrtc://")?aa(this):".flv"===e?this._config.useOldFlv?ma(this):Y(this):".m3u8"===e?ka(this):
418
- ".mpd"===e?ia(this):".mp4"===e?na(this):".mp3"===e||".m4a"===e||".aac"===e||".mp4a"===e||".ogg"===e?ha(this):".ts"===e?Y(this):na(this))||this.toast("Switch stream failed, unsupported media type")}},stop:function(){this.closecall&&(this.closecall(this),this.removeVideoEventHandlers(),delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load());this.isPlaying=!1;this.setplaystate(!1);this.bigPlayOverlay&&
419
- (this.bigPlayOverlay.style.display="none");this.updateProgress(0);this.timeSpan&&(this.timeSpan.innerHTML="");this.controlbar&&(this.controlbar.querySelector(".zwp__duration-container").style.display="none");this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.style.display="none");this.progressBar&&this.progressBar.chapters&&(this.progressBar.chapters.innerHTML="");this.subtitles&&delete this.subtitles;this.subtitleShow&&(this.subtitleShow.style.display="none");this.toastTimerId&&
420
- (clearTimeout(this.toastTimerId),delete this.toastTimerId);this.mutedTipBox&&(this.popup_layers.removeChild(player.mutedTipBox),delete this.mutedTipBox);this.overlayLayerClickTimer&&(L.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);delete this.multiStreams;this.resetSpeedMenu();this.resetQualitiesMenu();this.removeChapters();this.resetSubtitleMenu()},pause:function(){this.isPlaying&&this.videoEl&&!this.videoEl.paused&&!this.videoEl.ended&&(this.videoEl.pause(),this.setplaystate(!1))},
421
- resume:function(){this.isPlaying?this.videoEl&&(this.videoEl.paused||this.videoEl.ended)&&(this.videoEl.play(),this.setplaystate(!0)):this._config.url&&this.play(this._config.url)},seekTime:function(e){if(this.isPlaying&&this.videoEl&&!(0>e)){var n=this.videoEl.duration;isNaN(n)||Infinity===n||(e>n&&(e=n),this.videoEl.currentTime=e)}},getDuration:function(){if(this.isPlaying&&this.videoEl)return this.videoEl.duration},destroy:function(){this.closecall&&(this.closecall(this),this.removeVideoEventHandlers(),
359
+ function(d){d.preventDefault();d.stopPropagation();Va||this.showContextMenu(d)}.bind(c)),e.addEventListener("click",function(d){var h=this;d=function(q){q=q.querySelector(".closeBtn");var C=document.createEvent("Event");C.initEvent("click",!0,!0);q.dispatchEvent(C)};h.infoViewer?d(h.infoViewer):h.colorSettingPanel?d(h.colorSettingPanel):h.contextMenu?h.hideContextMenu():h._config.disableClickPause||h._config.disablePlayBtn||h._config.isLive||(h.overlayLayerClickTimer&&(K.clearTimeout(h.overlayLayerClickTimer),
360
+ delete h.overlayLayerClickTimer),h.videoEl&&(h.overlayLayerClickTimer=K.setTimeout(function(){h.videoEl.paused||h.videoEl.ended?(h.videoEl.play(),h.setplaystate(!0)):(h.videoEl.pause(),h.setplaystate(!1));delete h.overlayLayerClickTimer},300)))}.bind(c)),c._config.logo)){if(typeof c._config.logo==="object"){if(typeof c._config.logo.icon==="string")var z=c._config.logo.icon}else typeof c._config.logo==="string"&&(z=c._config.logo);if(z){A='<div class="zwp-logo"';if(typeof c._config.logo==="object"){var b=
361
+ "";"dock"in c._config.logo?b+=(c._config.logo.dock==="left"?"left":"right")+": "+(c._config.logo.x||"5%")+";":"x"in c._config.logo&&(b+="right: "+c._config.logo.x+";");"y"in c._config.logo&&(b+="top: "+c._config.logo.y+";");"width"in c._config.logo&&(b+="width: "+c._config.logo.width+";");if("opacity"in c._config.logo){var M=c._config.logo.opacity/100;M>1&&(M=1);b+="opacity: "+M+";"}b&&(A+=' style="'+b+'"')}e.insertAdjacentHTML("afterbegin",A+('><img src="'+z+'"></div>'))}}if(c._config.nativecontrols)c.videoEl.setAttribute("controls",
362
+ "controls"),c.overlay_layers&&(c.overlay_layers.style.bottom="70px"),c.videoEl.addEventListener("fullscreenchange",function(d){return!1}.bind(c));else if(c._config.controlbar){var w=document.createElement("div");w.setAttribute("class","zwp-controlbar");c._config.isLive||N(w,"zwp-vodplayer");w.innerHTML=rb(c._config);c.playerContainer.appendChild(w);c.controlbar=w;if(c.controlbar){w.addEventListener("dblclick",function(d){d.stopPropagation()});z=w.querySelectorAll("button.zwpbtn");z.length>0&&(c.btnBindZwp=
363
+ !0,z.forEach(function(d){d.addEventListener("click",c.on_btnclick)}));c._config.disablePlayBtn&&(z=w.querySelector(".zwp_playbtn"),N(z,"zwp_disabled"),z.setAttribute("disabled","disabled"));z=w.querySelectorAll(".zwp-speedMenu>li.zwp-speed-item");z.length>0&&z.forEach(function(d){d.addEventListener("click",c.on_speedItemclick)});var Y=w.querySelector(".zwp-volume-docker");if(Y){c.muteBtn=Y.querySelector("button.zwp-muteBtn");c.volslider=Y.querySelector(".zwp-volume-slider");c.voltotal=Y.querySelector(".zwp-volume-total");
364
+ c.volcurrent=c.volslider.querySelector(".zwp-volume-current");c.volthumb=c.volslider.querySelector(".zwp-volume-handle");var G=function(d){if(d!==null&&!isNaN(d)&&d!==void 0){d=Math.max(0,d);d=Math.min(d,1);if(d===0){Q(Y,"zwp__mute");N(Y,"zwp__unmute");var h=c.muteBtn;h.setAttribute("title","unmute");h.setAttribute("aria-label","unmute")}else Q(Y,"zwp__unmute"),N(Y,"zwp__mute"),h=c.muteBtn,h.setAttribute("title","muted"),h.setAttribute("aria-label","muted");h=c.volthumb;var q=c.volcurrent;d=d*100+
365
+ "%";var C=getComputedStyle(h);q.style.bottom=0;q.style.height=d;h.style.bottom=d;h.style.marginBottom=-parseFloat(C.height)/2+"px"}},ja=function(d){var h=B(c.voltotal),q=getComputedStyle(c.voltotal),C=!0;d.type=="touchmove"&&(d.changedTouches&&(C=d.changedTouches[0],d.pageX=C.pageX,d.pageY=C.pageY),C=!1);q=parseFloat(q.height);q=(q-(d.pageY-h.top))/q;h.top!==0&&h.left!==0&&(q=Math.max(0,q),q=Math.min(q,1),G(q),c.setMuted(q===0),c.setVolume(q),C&&d.preventDefault(),d.stopPropagation())};c.positionVolumeThumb=
366
+ G;c.on_volthumb_mousemove=function(d){var h=d.target;l&&(h===c.volslider||h.closest(".zwp-volume-slider"))&&ja(d)}.bind(c);c.on_volthumb_mouseup=function(d){l&&("onpointerout"in document?(document.removeEventListener("pointermove",c.on_volthumb_mousemove),document.removeEventListener("pointerup",c.on_volthumb_mouseup),document.removeEventListener("touchmove",c.on_volthumb_mousemove),document.removeEventListener("touchend",c.on_volthumb_mouseup)):(document.removeEventListener("mousemove",c.on_volthumb_mousemove),
367
+ document.removeEventListener("mouseup",c.on_volthumb_mouseup)),l=!1);m||(c.volslider.style.display="none");console.log("volthumb_mouseup:"+d.type)}.bind(c);c.on_volthumb_mousedown=function(d){ja(d);"onpointerout"in document?(document.addEventListener("pointermove",c.on_volthumb_mousemove),document.addEventListener("pointerup",c.on_volthumb_mouseup),document.addEventListener("touchmove",c.on_volthumb_mousemove),document.addEventListener("touchend",c.on_volthumb_mouseup)):(document.addEventListener("mousemove",
368
+ c.on_volthumb_mousemove),document.addEventListener("mouseup",c.on_volthumb_mouseup));l=!0;d.preventDefault();d.stopPropagation()}.bind(c);var la=c.volslider;Y.addEventListener("mouseenter",function(d){d.target===Y&&(la.style.display="block",m=!0,d.preventDefault(),d.stopPropagation())});Y.addEventListener("focusin",function(){la.style.display="block";m=!0});Y.addEventListener("focusout",function(d){if(!d.relatedTarget||d.relatedTarget&&!d.relatedTarget.matches(".zwp-volume-slider"))la.style.display=
369
+ "none"});Y.addEventListener("mouseleave",function(){m=!1;l||(la.style.display="none")});Y.addEventListener("focusout",function(){m=!1});Y.addEventListener("keydown",function(d){var h=d.which||d.keyCode||0;d.preventDefault();d.stopPropagation();h==32&&(c.videoEl.muted?c.setMuted(!1):c.setMuted(!0))});la.addEventListener("dragstart",function(){return!1});la.addEventListener("mouseover",function(){m=!0});la.addEventListener("focusin",function(){la.style.display="block";m=!0});la.addEventListener("focusout",
370
+ function(){m=!1;l||(la.style.display="none")});la.addEventListener("mousedown",c.on_volthumb_mousedown)}if(z=w.querySelector(".zwp-optionPanel"))z=z.querySelectorAll(".action-item"),z.length>0&&z.forEach(function(d){d.addEventListener("click",c.on_optionItemclick)})}}c._config.autoSmallWindow&&!c.windowScrollHandler&&(c.windowScrollHandler=function(d){if(!this.isFullscr&&!this.isFullscrWin&&this.videoEl&&this.playerElm&&this.isPlaying&&!this.isInPicInPic)if(d=v(this.playerElm),(document.documentElement.scrollTop||
371
+ document.body.scrollTop)>=d+this.playerElm.offsetHeight-100){if(!this.smallWindowMode){var h=this.playerContainer;hb(h,function(){Q(h,"zwp-smallwindow");h.style.left=null;h.style.top=null;h.style.width=null;h.style.height=null});N(h,"zwp-smallwindow");this.smallWindowMode=!0}}else this.smallWindowMode&&(h=this.playerContainer,Q(h,"zwp-smallwindow"),h.style.left=null,h.style.top=null,h.style.width=null,h.style.height=null,delete this.smallWindowMode)}.bind(c),K.addEventListener("scroll",c.windowScrollHandler));
372
+ c._config.clientip||(c._config.clientip="");c.videoEl&&(c._config.muted?c.setMuted(!0):typeof K.allowAutoAudioPlay==="undefined"?(c.setMuted(!0),cb(function(d){d?c.setMuted(!1):c.mutedConfirmBox();K.allowAutoAudioPlay=d})):K.allowAutoAudioPlay||(c.setMuted(!0),c.mutedConfirmBox()),(c._config.snapshotButton||c._config.allowSnapshot)&&c.videoEl.setAttribute("crossorigin","Anonymous"));z=function(d){var h=this;if(h.controlbar)if(h.isControlbarhidden){h.controlbar.style.display="flex";Q(h.playerElm,"hide-cursor");
373
+ d=d||K.event;if(d.srcElement!=h.controlbar&&h.overlay_layers){var q=h.overlay_layers.offsetHeight,C=0;typeof d.offsetY!=="undefined"?C=q-d.offsetY:typeof d.layerY!=="undefined"&&(C=q-d.layerY);if(C>80)return}Pa(h.controlbar,500,function(H){H&&h.startHideControlbar(h)});h.isControlbarhidden=!1}else h.startHideControlbar(h)}.bind(c);c.playerElm.addEventListener("mousemove",z);c.playerElm.addEventListener("touchmove",z);c.playerElm.addEventListener("dblclick",function(d){this.overlayLayerClickTimer&&
374
+ (K.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);if(this.controlbar&&(d={},d.currentTarget=this.controlbar.querySelector(".zwp-fullscrBtn"),d.currentTarget))this.on_btnclick(d)}.bind(c));typeof c._config.autoplay=="undefined"&&(c._config.autoplay=!0);c._config.url&&c._config.autoplay&&c.play(c._config.url);typeof c._config.onready=="function"&&c._config.onready.call(c);c._config.chapters&&(c.chapters=c._config.chapters);c._config.lostFocusPause&&typeof document.visibilityState!==
375
+ "undefined"&&document.addEventListener("visibilitychange",function(){this._config.isLive||this.isInPicInPic||(document.visibilityState==="visible"?this.focusPaused&&this.videoEl.paused&&!this.videoEl.ended&&(this.videoEl.play(),this.setplaystate(!0),delete this.focusPaused):this.focusPaused||this.videoEl.paused||this.videoEl.ended||(this.videoEl.pause(),this.setplaystate(!1),this.focusPaused=!0))}.bind(c));c._config.fluid?c._config.autoplay||(N(c.playerElm,"zwp-fluid"),c.playerElm.style.maxWidth=
376
+ "100%",c.playerElm.style.width="100%",c.playerElm.style.height="0",e=56.25,typeof c._config.ratio==="number"?e=c._config.ratio*100:typeof c._config.ratio==="string"?(z=c._config.ratio.split(":"),z.length===2&&(e=parseFloat(z[0]),z=parseFloat(z[1]),e===0&&(e=1),e=z*100/e)):typeof c._config.width==="number"&&typeof c._config.height==="number"&&(e=c._config.width,e===0&&(e=1),e=c._config.height*100/e),c.playerElm.style.paddingTop=e+"%"):c._config.width&&c._config.height&&(c.playerElm.style.width=typeof c._config.width===
377
+ "number"?c._config.width+"px":c._config.width,c.playerElm.style.height=typeof c._config.height==="number"?c._config.height+"px":c._config.height)},aa=async function(e){if(typeof K.RTCPeerConnection=="undefined")return alert("This browser does not support the stream.\r\nPlease play this stream in chrome!"),!1;var l=J(e.murl);if(!l)return e.toast("Invalid url"),!1;e.peer_conn=new RTCPeerConnection(typeof RTCPeerConnection.prototype.addTransceiver=="function"?{iceServers:[],iceTransportPolicy:"all",
378
+ bundlePolicy:"max-bundle",rtcpMuxPolicy:"require",sdpSemantics:"unified-plan"}:null);e.mediaStream=new MediaStream;e.peer_conn.ontrack=function(c){if(!this.hasTracks){this.setRtcstream(e.mediaStream);var u=y();console.log("start usetime:"+(F-u))}this.hasTracks++;this.mediaStream.addTrack(c.track);e.baseTrack&&c.track.kind!="video"||(e.baseTrack=c.track);e.rtcstatsTimerId||(e.packetsReceived=0,e.framesDecoded=0,e.emptyCount=0,e.rtcstatsTimerId=K.setInterval(function(){e.baseTrack&&e.peer_conn.getStats(e.baseTrack).then(A=>
379
+ {A.forEach(z=>{z.type=="inbound-rtp"&&z.kind=="video"&&(z.framesDecoded!=e.framesDecoded?(e.framesDecoded=z.framesDecoded,e.packetsReceived=z.packetsReceived,e.emptyCount=0):e.framesDecoded>0&&(e.emptyCount++,e.emptyCount>3&&(console.warn("Rtp Data break for "+e.emptyCount),e.closecall(e),aa(e))))})})},1E3))}.bind(e);e.hasTracks=0;if(typeof e.peer_conn.addTransceiver=="function"){(typeof e._config.hasAudio==="undefined"||e._config.hasAudio)&&await e.peer_conn.addTransceiver("audio",{direction:"recvonly"});
380
+ await e.peer_conn.addTransceiver("video",{direction:"recvonly"});var m=await e.peer_conn.createOffer()}else m=await e.peer_conn.createOffer({offerToReceiveAudio:typeof e._config.hasAudio==="undefined"||e._config.hasAudio,offerToReceiveVideo:!0});await e.peer_conn.setLocalDescription(m);(new Promise(function(c,u){var A=l.is_brtc?{streamurl:l.streamUrl,sdp:m.sdp}:{api:l.apiUrl,rtcstream:l.streamUrl,clientip:null,sdp:m.sdp};l.urlObject.schema==="webrtc"&&(delete A.rtcstream,A.streamurl=l.streamUrl);
381
+ console.log("Generated offer: ",A);x(l.apiUrl,JSON.stringify(A),function(z){console.log("Got answer: ",z);z.code?u(z):c(z)},function(z){"REQUEST:error"==z&&(e.tryStartPlayTimer=K.setTimeout(function(){delete e.tryStartPlayTimer;e.closecall(e);aa(e)},1E3));u(z)})})).then(c=>{e.peer_conn.setRemoteDescription(new RTCSessionDescription({type:"answer",sdp:c.sdp}))}).catch(c=>{console.log(c);e.peer_conn.close();e.peer_conn=null});e.closecall=function(c){c.rtcstatsTimerId&&(K.clearInterval(c.rtcstatsTimerId),
382
+ delete c.rtcstatsTimerId);c.tryStartPlayTimer&&(K.clearTimeout(c.tryStartPlayTimer),delete c.tryStartPlayTimer);typeof c.baseTrack!="undefined"&&delete c.baseTrack;c.peer_conn&&(c.videoEl&&(c.videoEl.srcObject=null),c.mediaStream&&delete c.mediaStream,c.peer_conn.close(),c.peer_conn=null)};return!0},ha=async function(e){var l=e._config.xmc_url||K.xmc_url;if(!l)return e.toast("The rtsp protocol is not supported without setting XMC."),!1;l+="play";e.wsclient&&(e.wsclient.close(),delete e.wsclient);
383
+ l=l.replace("http","ws");var m=new WebSocket(l);m.onopen=function(){var c=typeof e._config.rtspOverTcp==="undefined"?1:e._config.rtspOverTcp,u=typeof e._config.rtsp_bypass==="boolean"?e._config.rtsp_bypass:0,A=typeof e._config.use_audio==="undefined"?0:e._config.use_audio,z="MediaSource"in K&&K.MediaSource.isTypeSupported("video/mp4;codecs=hvc1.1.1.L93.B0")?1:0;c=JSON.stringify({msgtype:"playurl",data:{sourceurl:e.murl,rtsp_over_tcp:c,has_audio:A,has_hevc:z,rtsp_bypass:u}});m.send(c)};m.onmessage=
384
+ function(c){console.log(c.data);c=JSON.parse(c.data);if(typeof c=="object"&&c.type==="onresult"&&c.event==="playurl"&&typeof c.streaminfo==="object")if(e.closecall2=function(A){A.waitSignTimer&&(K.clearTimeout(A.waitSignTimer),delete A.waitSignTimer);A.wsclient&&(A.wsclient.close(),A.wsclient=null,delete A.wsclient)},c.snapshot&&e.videoEl&&e.videoEl.setAttribute("poster",c.snapshot),e._config.useFlv||typeof c.streaminfo.rtc_playurl!=="string")typeof c.streaminfo.http_playurl==="string"?(u=c.streaminfo.http_playurl+
385
+ c.streaminfo.stream+".flv",e.murl=u,W(e)):e.closecall2(e);else{var u=c.streaminfo.rtc_playurl+c.streaminfo.stream+".rtc";c.first?e.waitSignTimer=setTimeout(function(){e.murl=u;aa(e);delete e.waitSignTimer},1E3):(e.murl=u,aa(e))}};m.onclose=function(){e.wsclient&&delete e.wsclient};m.onerror=function(){};e.wsclient=m;return!0},ma=function(e){Ja("flv_js",Ia+"flv.min.js",function(l){console.log("js:"+l+" is load!");var m=K.flvjs;if(!m.isSupported())return!1;var c={type:"flv",isLive:!0,url:e.murl};var u=
386
+ {enableWorker:!1,enableStashBuffer:!1,stashInitialSize:0,lazyLoad:!1,autoCleanupSourceBuffer:!0,lazyLoadMaxDuration:0,isLive:!0};e.openFlv=function(){var A=m.createPlayer(c,u);A.on(m.Events.METADATA_ARRIVED,function(z){e.loadingOverlay&&(e.loadingOverlay.style.display="none");typeof z=="object"&&console.log("flvplayer:"+z.type)});A.on(m.Events.ERROR,function(z){typeof z=="object"?console.log("flvplayer:"+z.type):console.log("flvplayer:"+z)});A.attachMediaElement(e.videoEl);e.videoEl.playbackRate=
387
+ 1;e.onFlvStaticInfo=function(z){this.videoEl.paused||(this.lastDecodedFrames?this.lastDecodedFrames!=z.decodedFrames?this.lastDecodedFrames=z.decodedFrames:(this.lastDecodedFrames=0,this.flvPlayer&&(this.closecall(this),this.openFlv(),this.setplaystate(!0))):this.lastDecodedFrames=z.decodedFrames)}.bind(e);e.onFlvError=function(z){z!=="NetworkError"||e.reconnectTimer||(e.reconnectTimer=K.setTimeout(function(){e.flvPlayer&&(e.closecall(e),e.openFlv(),e.setplaystate(!0));delete e.reconnectTimer},1E3))}.bind(e);
388
+ e.onMediainfoCb=function(z){z&&this.setMediainfo("flvjs",z)}.bind(e);A.on(m.Events.ERROR,e.onFlvError);A.on(m.Events.STATISTICS_INFO,e.onFlvStaticInfo);A.on(m.Events.MEDIA_INFO,e.onMediainfoCb);e.delayCheckTimerId=K.setInterval(function(){if(this.flvPlayer&&!this.videoEl.paused){var z=this.flvPlayer;if(z.buffered.length){let b=z.buffered.end(0)-z.currentTime;b>=6?z.currentTime=z.buffered.end(0)-.2:b>3&&(e.videoEl.playbackRate=1.5,e.fastForwardTimerId=setTimeout(function(){e.videoEl.playbackRate=1;
389
+ delete e.fastForwardTimerId},b*2E3))}}}.bind(e),2E3);A.load();A.play();e.flvPlayer=A;e.closecall=function(z){if(z.flvPlayer){var b=z.flvPlayer;b.off(m.Events.ERROR,z.onFlvError);b.off(m.Events.STATISTICS_INFO,z.onFlvStaticInfo);b.off(m.Events.MEDIA_INFO,z.onMediainfoCb);delete z.onFlvError;delete z.onFlvStaticInfo;delete z.onMediainfoCb;z.delayCheckTimerId&&(K.clearInterval(z.delayCheckTimerId),delete z.delayCheckTimerId);z.fastForwardTimerId&&(K.clearTimeout(z.fastForwardTimerId),delete z.fastForwardTimerId);
390
+ z.reconnectTimer&&(K.clearTimeout(z.reconnectTimer),delete z.reconnectTimer);b.pause();b.unload();b.detachMediaElement();b.destroy();delete z.flvPlayer}}};e.openFlv();e.setplaystate(!0)});return!0},W=function(e){Ja("mpeg_js",Ia+"mpeg.min.js?v=2",function(l){console.log("js:"+l+" is load!");l=mpegts.getFeatureList();if(!mpegts.isSupported()||!l.mseLivePlayback)return!1;e.openMpegts=function(){var m=e.videoEl,c=void 0,u=void 0;typeof e._config.hasAudio==="boolean"&&(c=e._config.hasAudio);typeof e._config.hasVideo===
391
+ "boolean"&&(u=e._config.hasVideo);c=mpegts.createPlayer({type:"mse",isLive:!0,hasAudio:c,hasVideo:u,url:e.murl},{autoCleanupSourceBuffer:!0,stashInitialSize:128,autoCleanupMaxBackwardDuration:20,autoCleanupMinBackwardDuration:10,enableWorker:!0,enableStashBuffer:!1});e.onErrorCb=function(A){var z=this;A!==mpegts.ErrorTypes.NETWORK_ERROR||z.reconnectTimer||(z.reconnectTimer=K.setTimeout(function(){z.mpegtsPlayer&&(z.closecall(z),z.openMpegts());delete z.reconnectTimer},1E3))}.bind(e);e.onEventCb=function(A){console.log(A)}.bind(e);
392
+ e.onMetadataCb=function(A){console.log(A)}.bind(e);e.onMediaInfoCb=function(A){A&&this.setMediainfo("mpegts",A)}.bind(e);e.onStatisCb=function(A){this.videoEl.paused||(this.lastDecodedFrames?this.lastDecodedFrames!=A.decodedFrames?(this.lastDecodedFrames=A.decodedFrames,delete this.waitDecodedFrames):(typeof this.waitDecodedFrames==="undefined"?this.waitDecodedFrames=0:this.waitDecodedFrames++,this.waitDecodedFrames>1&&(this.lastDecodedFrames=0,delete this.waitDecodedFrames,this.mpegtsPlayer&&(this.closecall(this),
393
+ this.openMpegts()))):this.lastDecodedFrames=A.decodedFrames)}.bind(e);e.closecall=function(A){A.checkDelayTimerId&&(K.clearInterval(A.checkDelayTimerId),delete A.checkDelayTimerId);A.reconnectTimer||(K.clearTimeout(A.reconnectTimer),delete A.reconnectTimer);A.fastForwardTimerId&&(K.clearTimeout(A.fastForwardTimerId),delete A.fastForwardTimerId);if(A.mpegtsPlayer){var z=A.mpegtsPlayer;z.pause();z.off(mpegts.Events.ERROR,A.onErrorCb);z.off(mpegts.Events.MEDIA_INFO,A.onMediaInfoCb);z.off(mpegts.Events.METADATA_ARRIVED,
394
+ A.onMetadataCb);z.off(mpegts.Events.STATISTICS_INFO,A.onStatisCb);z.unload();z.detachMediaElement();z.destroy();delete A.onErrorCb;delete A.onMediaInfoCb;delete A.onMetadataCb;delete A.onStatisCb;delete A.onEventCb;delete A.mpegtsPlayer}};e.checkDelayTimerId=K.setInterval(function(){var A=this;if(A.mpegtsPlayer&&!A.videoEl.paused&&A.mpegtsPlayer.buffered.length){var z=A.mpegtsPlayer.buffered.end(0)-A.mpegtsPlayer.currentTime;z>=6?A.mpegtsPlayer.currentTime=A.mpegtsPlayer.buffered.end(0)-.2:z>3&&(A.videoEl.playbackRate=
395
+ 1.5,A.fastForwardTimerId=setTimeout(function(){A.videoEl.playbackRate=1;delete A.fastForwardTimerId},z*2E3))}}.bind(e),2E3);c.on(mpegts.Events.ERROR,e.onErrorCb);c.on(mpegts.Events.MEDIA_INFO,e.onMediaInfoCb);c.on(mpegts.Events.METADATA_ARRIVED,e.onMetadataCb);c.on(mpegts.Events.STATISTICS_INFO,e.onStatisCb);c.attachMediaElement(m);c.load();c.play();e.mpegtsPlayer=c};e.openMpegts()});return!0},ka=function(e){Ja("hls_js",Ia+"hls.min.js",function(l){console.log("js:"+l+" is load!");var m=K.Hls;if(m.isSupported()){var c=
396
+ e,u=new m;u.attachMedia(e.videoEl);u.on(m.Events.MEDIA_ATTACHED,function(){console.log("video and hlsPlayer are now bound together !");u.loadSource(e.murl);u.on(m.Events.MANIFEST_PARSED,function(b,M){console.log("HLSPlayer manifest loaded, found "+M.levels.length+" quality level");c.loadingOverlay&&(c.loadingOverlay.style.display="none");c.videoEl.play();c.setplaystate(!0)})});u.on(m.Events.ERROR,function(b,M){if(M.fatal)switch(M.type){case m.ErrorTypes.NETWORK_ERROR:console.log("fatal network error encountered, try to recover");
397
+ u.startLoad();break;case m.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover");u.recoverMediaError();break;default:u.destroy(),delete e.hlsPlayer,c.setplaystate(!1)}});c.onHlsManifestParsed=function(b,M){var w=this;if(M.levels.length>1){var Y=[];for(b=0;b<M.levels.length;b++){var G={mediaType:"video",bitrate:M.levels[b].bitrate,height:M.levels[b].height,width:M.levels[b].width,qualityIndex:b,name:M.levels[b].name||"q"+b};Y.push(G)}w.switchQualityLevel=function(ja){u.nextLevel=
398
+ parseInt(ja)}.bind(w);w.createQualitiesMenu(Y);u.on(m.Events.LEVEL_SWITCHED,function(ja,la){w.updateQualityLevel(u.currentLevel,u.autoLevelEnabled)},w)}else w.resetQualitiesMenu();if(M.subtitleTracks&&M.subtitleTracks.length>0){Y=[];for(b=0;b<M.subtitleTracks.length;b++)G=M.subtitleTracks[b],G.forced||(G={"default":G.default,id:G.id,lang:G.lang,name:G.name,url:G.url},Y.push(G));w.switchSubtitleTrack=function(ja){ja=parseInt(ja);ja===-1?u.subtitleDisplay=!1:(u.subtitleDisplay=!0,u.subtitleTrack=ja)};
399
+ w.createSubtitlesMenu(Y);u.on(m.Events.SUBTITLE_TRACK_SWITCH,function(ja,la){w.updateSubtitleTrack(la.id)})}}.bind(c);u.on(m.Events.MANIFEST_PARSED,c.onHlsManifestParsed);c.hlsPlayer=u;c.closecall=function(b){b.hlsPlayer&&(b.hlsPlayer.off(m.Events.MANIFEST_PARSED,b.onHlsManifestParsed),b.hlsPlayer.detachMedia(),b.hlsPlayer.destroy(),delete b.hlsPlayer,delete b.onHlsManifestParsed)}}else if(e.videoEl.canPlayType("application/vnd.apple.mpegurl")){c=e;e.videoEl.zwplayer=e;var A=function(){typeof this.zwplayer==
400
+ "object"&&(this.play(),this.zwplayer.setplaystate(!0))},z=function(){typeof this.zwplayer=="object"&&console.log("HLS fatal media error encountered, try to recover")};c.videoEl.addEventListener("loadedmetadata",A);c.videoEl.addEventListener("error",z);c.closecall=function(b){typeof b.videoEl==="object"&&(b.videoEl.pause(),b.videoEl.src="",b.videoEl.removeEventListener("loadedmetadata",A),b.videoEl.removeEventListener("error",z),typeof b.videoEl.zwplayer=="object"&&delete b.videoEl.zwplayer)};c.videoEl.src=
401
+ c.murl}else return e.toast("player cannot play hls media"),!1});return!0},ia=function(e){Ja("dash_js",Ia+"dash.all.min.js",function(l){console.log("js:"+l+" is load!");var m=K.dashjs,c=m.MediaPlayer().create();c.initialize(e.videoEl,e.murl,!0);l=e.getSimpleSubtitleRenderer();c.attachTTMLRenderingDiv(l);e.dashTextTrackList={};e.onDashMetadata=function(u){u&&console.log(u);this.loadingOverlay&&(this.loadingOverlay.style.display="none");this.videoEl.play();this.setplaystate(!0)}.bind(e);e.onDashQualityChanged=
402
+ function(u){u=c.getQualityFor("video");var A=c.getSettings().streaming.abr.autoSwitchBitrate.video||!1;e.updateQualityLevel(u,A)}.bind(e);e.onDashStreamInitialized=function(u){c.getBitrateInfoListFor("audio");u=c.getBitrateInfoListFor("video")||[];u.length>1?(this.switchQualityLevel=function(A){A=parseInt(A);var z={streaming:{abr:{autoSwitchBitrate:{}}}};A>=0?(z.streaming.abr.autoSwitchBitrate.video=!1,c.updateSettings(z),c.setQualityFor("video",A,!1)):(z.streaming.abr.autoSwitchBitrate.video=!0,
403
+ c.updateSettings(z))}.bind(this),this.createQualitiesMenu(u),c.on(m.MediaPlayer.events.QUALITY_CHANGE_RENDERED,this.onDashQualityChanged,this)):this.resetQualitiesMenu()}.bind(e);e.onDashTracksAdded=function(u){var A=this.dashTextTrackList;A[u.streamId]||(A[u.streamId]=[]);A[u.streamId]=A[u.streamId].concat(u.tracks)};e.onDashStreamDeactivated=function(u){var A=this.dashTextTrackList;u.streamInfo&&A[u.streamInfo.id]&&delete A[u.streamInfo.id]}.bind(e);e.onDashStreamActivated=function(u){u=u.streamInfo.id||
404
+ "none";var A=this.dashTextTrackList;if(A[u]&&(u=A[u],!(u.length<1))){A=[];for(var z=0;z<u.length;z++){var b=u[z],M=ib(b.labels);M?M+=" : "+b.type:(M=b.label||b.lang,M+=" : "+b.kind);A.push({"default":b.defaultTrack,id:z,lang:b.lang,name:M,url:b.url||""})}this.switchSubtitleTrack=function(w){var Y=this.dashPlayer||null;Y&&(parseInt(w),Y.setTextTrack(w))}.bind(this);this.createSubtitlesMenu(A)}}.bind(e);c.on(m.MediaPlayer.events.PLAYBACK_METADATA_LOADED,e.onDashMetadata,e);c.on(m.MediaPlayer.events.STREAM_INITIALIZED,
405
+ e.onDashStreamInitialized,e);c.on(m.MediaPlayer.events.STREAM_ACTIVATED,e.onDashStreamActivated,e);c.on(m.MediaPlayer.events.STREAM_DEACTIVATED,e.onDashStreamDeactivated,e);c.on(m.MediaPlayer.events.TEXT_TRACKS_ADDED,e.onDashTracksAdded,e);e.dashPlayer=c;e.closecall=function(u){u.dashPlayer&&(u.dashPlayer.pause(),u.dashPlayer.off(m.MediaPlayer.events.PLAYBACK_METADATA_LOADED,u.onDashMetadata,u),u.dashPlayer.off(m.MediaPlayer.events.STREAM_INITIALIZED,u.onDashStreamInitialized,u),u.dashPlayer.off(m.MediaPlayer.events.STREAM_ACTIVATED,
406
+ u.onDashStreamActivated,u),u.dashPlayer.off(m.MediaPlayer.events.STREAM_DEACTIVATED,u.onDashStreamDeactivated,u),u.dashPlayer.on(m.MediaPlayer.events.TEXT_TRACKS_ADDED,e.onDashTracksAdded,e),u.switchQualityLevel&&(u.dashPlayer.off(m.MediaPlayer.events.QUALITY_CHANGE_RENDERED,u.onDashQualityChanged,u),delete u.switchQualityLevel),u.dashPlayer.destroy(),delete u.dashPlayer,delete u.onDashMetadata,delete u.onDashStreamInitialized,delete u.onDashStreamActivated,delete u.onDashStreamDeactivated,delete u.onDashTracksAdded,
407
+ delete u.switchSubtitleTrack)}});return!0},qa=function(e,l){var m=e._config.cdn_addr||K.cdn_addr;if(!m)return e.toast("The webcdn protocol is not supported due without setting cdn server address url."),!1;m.endsWith("/")||(m+="/");m+="cdnplay";e.wcdnClient&&(e.wcdnClient.close(),delete e.wcdnClient);m=m.replace("http","ws");K.location.protocol=="https:"&&(m=m.replace("ws:","wss:"));var c=l.indexOf("://");if(c<0)return e.toast("Invalid wcdn url:"+l),!1;l=l.substr(c+3);(c=e._config.userInfo||K.userInfo)||
408
+ (c={userid:"0",username:"Visitor",nickname:"Visitor"});var u={msgtype:"startplay",data:{userid:c.userid||"0",username:c.username||"Visitor",nickname:c.nickname||"Visitor",avatar:c.avatar||"",streamurl:l}},A=function(z){var b=new WebSocket(m);b.onopen=function(M){M=JSON.stringify(u);b.send(M)};b.onmessage=function(M){if(typeof M.data==="string")try{var w=JSON.parse(M.data),Y=w.msgtype||"none",G=w.event||"none";if(Y==="onresult")if(G==="startplay"){var ja=w.data||null;if(ja&&typeof ja==="object"){M=
409
+ void 0;typeof z.closecall2==="function"&&(M=z.closecall2,z.closecall2=null);w={msgtype:"playstatus",data:{status:"playing"}};z.play(ja,!0)||(w.data.status="error");var la=JSON.stringify(w);b.send(la);typeof M==="function"&&(z.closecall2=M)}else{var d=w.msg||"Unknown error";d==="StreamNotExist"?(z.toast(pa("waitStreamToReady","Waiting for stream")),z.errorHandleTimerId=K.setTimeout(function(){delete z.errorHandleTimerId;z.toast("closetoast");var h=JSON.stringify(u);b.send(h)},3E3)):(z.toast(G+" error:"+
410
+ d),z.errorHandleTimerId=K.setTimeout(function(){delete z.errorHandleTimerId;z.stop()},2E3))}}else G==="endplay"&&(console.log("Receive endplay result"),z.stop());else Y==="error"?z.toast(G+" error:"+w.msg||"Unknown error"):Y==="command"&&(w.action||"none")==="stopplay"&&(z.toast("Server is close, player is stop."),z.errorHandleTimerId=K.setTimeout(function(){delete z.errorHandleTimerId;z.stop()},100),z.wcdnClient&&(z.wcdnClient.ws.close(),z.wcdnClient=null))}catch(h){console.warn("JSON.parse failed:",
411
+ h)}};b.onerror=function(M){console.error("Web CDN websocket Error:",M)};b.onclose=function(M){this.wsVersionId===z.wsVersionId&&z.wcdnClient&&!z.cdnReconnectTimerId&&z.wcdnClient===this&&(z.cdnReconnectTimerId=setTimeout(function(){A(z)},1E3),delete z.wcdnClient)};b.wsVersionId=(new Date).getTime();z.wcdnClient=b;z.wsVersionId=b.wsVersionId;typeof z.cdnReconnectTimerId!=="undefined"&&delete z.cdnReconnectTimerId};e.closecall2=function(z){e.cdnReconnectTimerId&&(clearTimeout(e.cdnReconnectTimerId),
412
+ delete e.cdnReconnectTimerId);e.errorHandleTimerId&&(clearTimeout(e.errorHandleTimerId),delete e.errorHandleTimerId);e.wcdnClient?(z=e.wcdnClient,delete e.wcdnClient,z.close()):(e.toast("The wcdn connection has been passively closed."),console.log("Websocket connection is abnormally closed."))};A(e);return!0},fa=function(e){var l=e.videoEl;e.closecall=function(m){if(m.isPlayVideo){var c=m.videoEl;c.paused||c.pause();c.src="";delete m.isPlayVideo}};e.isPlayVideo=!0;l.src=e.murl;return!0},ba=function(e){var l=
413
+ e.videoEl;e.closecall=function(m){if(m.isPlayAudio){var c=m.videoEl;c.paused||c.pause();c.src="";delete m.isPlayAudio}};e.isPlayAudio=!0;l.src=e.murl;return!0},na=function(e){var l=e.murl;if((l.type||"")==="dvr"&&l.http)return e.murl=l.http,fa(e);if(K.MediaSource&&K.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')){var m=K.RTCPeerConnection||K.webkitRTCPeerConnection||K.mozRTCPeerConnection||K.RTCIceGatherer;if(l.rtc&&m)return e.murl=l.rtc,aa(e);if(l["httpflv-n"])return e.murl=
414
+ l["httpflv-n"],e._config.useOldFlv?ma(e):W(e);if(l.httpflv)return e.murl=l.httpflv,e._config.useOldFlv?ma(e):W(e);if(l["wsflv-n"])return e.murl=l["wsflv-n"],e._config.useOldFlv?ma(e):W(e);if(l.wsflv)return e.murl=l.wsflv,e._config.useOldFlv?ma(e):W(e);if(l.hls)return e.murl=l.hls,ka(e);if(l.dash)return e.murl=l.dash,ia(e);if(l.ts)return e.murl=l.ts,W(e)}else if(e.murl.hls)return e.murl=e.murl.hls,ka(e);return!1},T=function(e){var l=[];var m=String.fromCharCode(107)+"u"+String.fromCharCode(97)+"ishou";
415
+ var c=String.fromCharCode(46)+"co"+String.fromCharCode(109)+"/",u=String.fromCharCode(100)+"ou"+String.fromCharCode(121)+"i"+String.fromCharCode(110);l.push("https://live."+m+c+"u/");l.push("https://live."+u+c);if(typeof e==="string"&&e.length>23)for(c=0;c<l.length;c++)if(m=l[c],e.indexOf(m)===0)return!0;return!1};ca.prototype={play:function(e,l,m){var c=this;if(e){c.murl&&c.stop();if(typeof e==="string"&&(e.startsWith("wcdn://")||e.startsWith("wcdns://")))return e=qa(c,e);if(typeof e==="object"){typeof e.thumbnails===
416
+ "object"&&(c._config.thumbnails=JSON.parse(JSON.stringify(e.thumbnails)));if(typeof e.murls==="object"){c.multiStreams=JSON.parse(JSON.stringify(e));var u=e.murls}else Array.isArray(e)?(c.multiStreams={},u=e):(c.multiStreams={},u=[e]),c.multiStreams.murls=u;var A=!0,z="",b=[],M;for(M in u){var w=u[M];if(typeof w==="object")if(Array.isArray(w)){var Y="";var G=w[0];if(w.length>2){var ja=w[2];Y=w[1]}else ja=w.length>1?w[1]:M;b.push({url:G,name:ja,mime:Y});A&&(e=G,z=ja,A=!1)}else{if(G=!1,"default"in w&&
417
+ w["default"]&&(G=w["default"]),A||G)"url"in w&&(e=w.url),z=A="name"in w?w.name:M,A=!1}else typeof w==="string"&&A&&(A=M,e=w,z=A,A=!1)}b.length>0&&(c.multiStreams.murls=b);c.multiStreams.curStream=z;console.log(e)}c.murl=e}if(!c.murl)return!1;c.force_stopped=!1;c.isPlaying=!0;c.loadingOverlay&&(c.loadingOverlay.style.display="flex");typeof l!="undefined"&&(l?c._config.isLive=l:delete c._config.isLive);typeof m!="undefined"&&(m?c._config.useOldFlv=m:delete c._config.useOldFlv);e=!1;if(typeof c.murl==
418
+ "object")e=na(c);else if(typeof c.murl=="string"){e=I(c.murl);e||(l=c.murl.indexOf("mime_type="),l>0&&(l+=10,u=c.murl.indexOf("&",l),u<0&&(u=c.murl.length),l=c.murl.substring(l,u),l==="video_mp4"?e=".mp4":l==="video_flv"?e=".flv":l==="video_hls"?e=".m3u8":l==="video_rtc"?e=".rtc":l==="video_dash"&&(e=".mpd")));if(!e&&(typeof c._config.streamtype==="string"&&(c._config.streamtype==="httpflv"?e=".flv":c._config.streamtype==="hls"?e=".m3u8":c._config.streamtype==="dash"?e=".mpd":c._config.streamtype===
419
+ "mpegts"?e=".ts":c._config.streamtype==="webrtc"&&(e=".rtc")),!e&&T(c.murl))){var la=function(){setTimeout(function(){c.loadingOverlay&&(c.loadingOverlay.style.display="none")},1E3)};if(!c._config.url_proxy)return c.toast("Sorry, the player cannot play this media address",5E3,!0),la(),!1;var d=d;x(c._config.url_proxy,JSON.stringify({roomUrl:c.murl,token:c._config.proxy_token||"12345678"}),function(h){if(typeof h==="object"&&h.result){h={murls:h.flvStreams||h.hlsStreams,multistream:1};if(!h.murls)return c.toast("Sorry, missing valid address for this room.",
420
+ 5E3,!0),la(),!1;c.play(h,d,m)}else c.toast("Sorry, unable to obtain a valid address for this room.",5E3,!0),la()},function(h){c.toast("Sorry, failed to get address due to network!",5E3,!0);la()});return!1}e=c.murl.indexOf("rtsp")===0?ha(c):e===".rtc"||c.murl.startsWith("webrtc://")||c.murl.startsWith("brtc://")?aa(c):e===".flv"?c._config.useOldFlv?ma(c):W(c):e===".m3u8"?ka(c):e===".mpd"?ia(c):e===".mp4"?fa(c):e===".mp3"||e===".m4a"||e===".aac"||e===".mp4a"||e===".ogg"?ba(c):e===".ts"?W(c):fa(c)}e?
421
+ (c.setupEventsHandler(),c.startHideControlbar(c),c.multiStreams&&K.setTimeout(function(){c.buildStreamSelector()},1E3)):(c.isPlaying=!1,c.loadingOverlay&&(c.loadingOverlay.style.display="none"),c.toast("Play media failed, unsupported media type",5E3,!0));return e},__switchStream:function(e){if(typeof e!=="string")this.toast("Switch stream methon does not support "+e);else{this.murl=e;e=I(this.murl);if(!e){var l=this.murl.indexOf("mime_type=");if(l>0){l+=10;var m=this.murl.indexOf("&",l);m<0&&(m=this.murl.length);
422
+ l=this.murl.substring(l,m);l==="video_mp4"?e=".mp4":l==="video_flv"?e=".flv":l==="video_hls"?e=".m3u8":l==="video_rtc"?e=".rtc":l==="video_dash"&&(e=".mpd")}}e||typeof this._config.streamtype==="string"&&(this._config.streamtype==="httpflv"?e=".flv":this._config.streamtype==="hls"?e=".m3u8":this._config.streamtype==="dash"?e=".mpd":this._config.streamtype==="mpegts"?e=".ts":this._config.streamtype==="webrtc"&&(e=".rtc"));!this._config.isLive&&this.videoEl&&(this.postSeekTime=this.videoEl.currentTime);
423
+ this.closecall&&(this.closecall(this),delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load());(this.murl.indexOf("rtsp")===0?ha(this):e===".rtc"||this.murl.startsWith("webrtc://")||this.murl.startsWith("brtc://")?aa(this):e===".flv"?this._config.useOldFlv?ma(this):W(this):e===".m3u8"?ka(this):e===".mpd"?ia(this):e===".mp4"?fa(this):e===".mp3"||e===".m4a"||e===".aac"||e===".mp4a"||e===".ogg"?ba(this):
424
+ e===".ts"?W(this):fa(this))||this.toast("Switch stream failed, unsupported media type")}},stop:function(){this.closecall&&(this.closecall(this),this.removeVideoEventHandlers(),delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load());this.isPlaying=!1;this.setplaystate(!1);this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="none");this.updateProgress(0);this.timeSpan&&(this.timeSpan.innerHTML=
425
+ "");this.controlbar&&(this.controlbar.querySelector(".zwp__duration-container").style.display="none");this.progressBar&&this.progressBar.streamtype&&(this.progressBar.streamtype.style.display="none");this.progressBar&&this.progressBar.chapters&&(this.progressBar.chapters.innerHTML="");this.subtitles&&delete this.subtitles;this.subtitleShow&&(this.subtitleShow.style.display="none");this.toastTimerId&&(clearTimeout(this.toastTimerId),delete this.toastTimerId,this.toastBox&&(this.overlay_layers.removeChild(this.toastBox),
426
+ delete this.toastBox));this.mutedTipBox&&(this.popup_layers.removeChild(this.mutedTipBox),this.popup_layers.style.display=null,delete this.mutedTipBox);this.overlayLayerClickTimer&&(K.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);delete this.multiStreams;this.resetSpeedMenu();this.resetQualitiesMenu();this.removeChapters();this.resetSubtitleMenu()},pause:function(){this.isPlaying&&this.videoEl&&!this.videoEl.paused&&!this.videoEl.ended&&(this.videoEl.pause(),this.setplaystate(!1))},
427
+ resume:function(){this.isPlaying?this.videoEl&&(this.videoEl.paused||this.videoEl.ended)&&(this.videoEl.play(),this.setplaystate(!0)):this._config.url&&this.play(this._config.url)},seekTime:function(e){if(this.isPlaying&&this.videoEl&&!(e<0)){var l=this.videoEl.duration;isNaN(l)||l===Infinity||(e>l&&(e=l),this.videoEl.currentTime=e)}},getDuration:function(){if(this.isPlaying&&this.videoEl)return this.videoEl.duration},destroy:function(){this.closecall&&(this.closecall(this),this.removeVideoEventHandlers(),
422
428
  delete this.closecall);this.closecall2&&(this.closecall2(this),delete this.closecall2);this.videoRemoveWhenClose&&(this.videoEl&&this.videoWrapper&&(this.videoWrapper.removeChild(this.videoEl),this.playerContainer.removeChild(this.videoWrapper),delete this.videoWrapper),delete this.videoRemoveWhenClose);this.videoEl&&(this.videoEl.removeAttribute("src"),this.videoEl.load(),this.videoEl=null,delete this.videoEl);this.snapCanvas&&delete this.snapCanvas;this.controlbar&&(this.progressBar&&this.progressBar.chapters&&
423
- (this.progressBar.chapters.innerHTML=""),this.playerContainer.removeChild(this.controlbar),delete this.controlbar);this.danmuToolbar&&(this.danmuToolbar.remove(),delete this.danmuToolbar);this.subtitles&&delete this.subtitles;this.toastTimerId&&(clearTimeout(this.toastTimerId),delete this.toastTimerId);this.overlayLayerClickTimer&&(L.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);this.overlay_layers&&(this.subtitle1&&delete this.subtitle1,this.subtitle2&&delete this.subtitle2,
424
- this.subtitleShow&&(Ba.removeElement(this.subtitleShow),delete this.subtitleShow),this.danmuPlayer&&(this.danmuPlayer.destroy(),delete this.danmuPlayer),this.playerContainer.removeChild(this.overlay_layers),delete this.overlay_layers);this.popup_layers&&(this.playerContainer.removeChild(this.popup_layers),delete this.popup_layers);this.playerElm&&(delete this.playerContainer.zwpDragable,this.playerElm.removeChild(this.playerContainer),delete this.playerContainer,this.doDeletePlayerElm?(document.removeChild(this.playerElm),
425
- delete this.playerElm):this.doRemovePlayerClass&&(P(this.playerElm,"zwp-wrap"),this.playerElm.setAttribute("class",this.playerElmOldClass)));this.windowScrollHandler&&(L.removeEventListener("scroll",this.windowScrollHandler),delete this.windowScrollHandler)},setplaystate:function(e){this.controlbar&&(this.playbtn||(this.playbtn=this.controlbar.querySelector(".zwp-playbtn")),this.playbtn&&(e?(this.playbtn.setAttribute("data-action","pause"),this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="none")):
426
- (this.playbtn.setAttribute("data-action","play"),this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="flex"))),this.playerElm&&(e?(P(this.playerElm,"zwp-pause"),N(this.playerElm,"zwp-playing")):(P(this.playerElm,"zwp-playing"),N(this.playerElm,"zwp-pause"))),this.loadingOverlay&&(this.loadingOverlay.style.display="none"))},setEnableDanmu:function(e){e?this.overlay_layers&&!this.danmuPlayer&&(this.danmuPlayer=HUAYI.Danmu.create({playerId:this.overlay_layers})):this.danmuPlayer&&(this.danmuPlayer.destroy(),
427
- delete this.danmuPlayer)},appendDanmu:function(e,n){this.danmuPlayer&&(n||(n=this.danmuSetting),this.danmuPlayer.addDanmu(e,n))},setChapters:function(e){null===e?this.removeChapters():(this.chapters=e,this.videoEl&&setTimeout(function(){this.loadChapters()}.bind(this),1E3))},addSubtitle:function(e,n,m){this.loadSubtitle(e,n,m)},removeSubtitle:function(){this.showSubtitle(!1)},buildDanmuControlbar:function(e,n){this.buildDanmuToolbar(e,n)},notifyResize:function(e,n){this.playerElm&&("undefined"!==
428
- typeof e&&("number"===typeof e&&(e+="px"),this.playerElm.style.width=e),"undefined"!==typeof n&&("number"===typeof n&&(n+="px"),this.playerElm.style.height=n))},lightOff:function(){this.playerElm&&N(this.playerElm,"zwp-state-light-off")},lightOn:function(){this.playerElm&&P(this.playerElm,"zwp-state-light-off")},get CurrentTime(){return this.isPlaying&&this.videoEl?this.videoEl.currentTime:-1},set CurrentTime(e){if(this.isPlaying&&this.videoEl&&!(0>e)){var n=this.videoEl.duration;isNaN(n)||Infinity===
429
- n||(e>n&&(e=n),this.videoEl.currentTime=e)}}};return ba})})(window);
429
+ (this.progressBar.chapters.innerHTML=""),this.playerContainer.removeChild(this.controlbar),delete this.controlbar);this.danmuToolbar&&(this.danmuToolbar.remove(),delete this.danmuToolbar);this.subtitles&&delete this.subtitles;this.toastTimerId&&(clearTimeout(this.toastTimerId),delete this.toastTimerId,this.toastBox&&(this.overlay_layers.removeChild(this.toastBox),delete this.toastBox));this.overlayLayerClickTimer&&(K.clearTimeout(this.overlayLayerClickTimer),delete this.overlayLayerClickTimer);this.overlay_layers&&
430
+ (this.subtitle1&&delete this.subtitle1,this.subtitle2&&delete this.subtitle2,this.subtitleShow&&(Ba.removeElement(this.subtitleShow),delete this.subtitleShow),this.danmuPlayer&&(this.danmuPlayer.destroy(),delete this.danmuPlayer),this.playerContainer.removeChild(this.overlay_layers),delete this.overlay_layers);this.popup_layers&&(this.playerContainer.removeChild(this.popup_layers),delete this.popup_layers);this.playerElm&&(delete this.playerContainer.zwpDragable,this.playerElm.removeChild(this.playerContainer),
431
+ delete this.playerContainer,this.doDeletePlayerElm?(document.removeChild(this.playerElm),delete this.playerElm):this.doRemovePlayerClass&&(Q(this.playerElm,"zwp-wrap"),this.playerElm.setAttribute("class",this.playerElmOldClass)));this.windowScrollHandler&&(K.removeEventListener("scroll",this.windowScrollHandler),delete this.windowScrollHandler)},setplaystate:function(e){this.controlbar&&(this.playbtn||(this.playbtn=this.controlbar.querySelector(".zwp-playbtn")),this.playbtn&&(e?(this.playbtn.setAttribute("data-action",
432
+ "pause"),this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="none")):(this.playbtn.setAttribute("data-action","play"),this.bigPlayOverlay&&(this.bigPlayOverlay.style.display="flex"))),this.playerElm&&(e?(Q(this.playerElm,"zwp-pause"),N(this.playerElm,"zwp-playing")):(Q(this.playerElm,"zwp-playing"),N(this.playerElm,"zwp-pause"))),this.loadingOverlay&&(this.loadingOverlay.style.display="none"))},setEnableDanmu:function(e){e?this.overlay_layers&&!this.danmuPlayer&&(this.danmuPlayer=HUAYI.Danmu.create({playerId:this.overlay_layers})):
433
+ this.danmuPlayer&&(this.danmuPlayer.destroy(),delete this.danmuPlayer)},appendDanmu:function(e,l){this.danmuPlayer&&(l||(l=this.danmuSetting),this.danmuPlayer.addDanmu(e,l))},setChapters:function(e){e===null?this.removeChapters():(this.chapters=e,this.videoEl&&setTimeout(function(){this.loadChapters()}.bind(this),1E3))},addSubtitle:function(e,l,m){this.loadSubtitle(e,l,m)},removeSubtitle:function(){this.showSubtitle(!1)},buildDanmuControlbar:function(e,l){this.buildDanmuToolbar(e,l)},notifyResize:function(e,
434
+ l){this.playerElm&&(typeof e!=="undefined"&&(typeof e==="number"&&(e+="px"),this.playerElm.style.width=e),typeof l!=="undefined"&&(typeof l==="number"&&(l+="px"),this.playerElm.style.height=l))},lightOff:function(){this.playerElm&&N(this.playerElm,"zwp-state-light-off")},lightOn:function(){this.playerElm&&Q(this.playerElm,"zwp-state-light-off")},get CurrentTime(){return this.isPlaying&&this.videoEl?this.videoEl.currentTime:-1},set CurrentTime(e){if(this.isPlaying&&this.videoEl&&!(e<0)){var l=this.videoEl.duration;
435
+ isNaN(l)||l===Infinity||(e>l&&(e=l),this.videoEl.currentTime=e)}}};return ca})})(window);