|
|
var Hl=Object.getOwnPropertySymbols;var mh=Object.prototype.hasOwnProperty,ph=Object.prototype.propertyIsEnumerable;var Vl=(ae,Je)=>{var ue={};for(var fe in ae)mh.call(ae,fe)&&Je.indexOf(fe)<0&&(ue[fe]=ae[fe]);if(ae!=null&&Hl)for(var fe of Hl(ae))Je.indexOf(fe)<0&&ph.call(ae,fe)&&(ue[fe]=ae[fe]);return ue};var Wl=(ae,Je,ue)=>new Promise((fe,St)=>{var dt=ut=>{try{gn(ue.next(ut))}catch(Mt){St(Mt)}},je=ut=>{try{gn(ue.throw(ut))}catch(Mt){St(Mt)}},gn=ut=>ut.done?fe(ut.value):Promise.resolve(ut.value).then(dt,je);gn((ue=ue.apply(ae,Je)).next())});import{r as fh,n as hh}from"./index-ed255eef-1784132466083.js";var Ar=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function gh(ae){return ae&&ae.__esModule&&Object.prototype.hasOwnProperty.call(ae,"default")?ae.default:ae}function Dr(ae){throw new Error('Could not dynamically require "'+ae+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Mr={exports:{}};Mr.exports;(function(ae,Je){function ue(f){"@babel/helpers - typeof";return ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},ue(f)}function fe(f,u){if(!(f instanceof u))throw new TypeError("Cannot call a class as a function")}function St(f,u){for(var n=0;n<u.length;n++){var i=u[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(f,i.key,i)}}function dt(f,u,n){return u&&St(f.prototype,u),n&&St(f,n),Object.defineProperty(f,"prototype",{writable:!1}),f}function je(f,u,n){return u in f?Object.defineProperty(f,u,{value:n,enumerable:!0,configurable:!0,writable:!0}):f[u]=n,f}var gn=function(){function f(u,n){fe(this,f),this.coreX=u,this.coreY=n}return dt(f,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}}]),f}();Date.prototype.Format=function(f){var u={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(f)&&(f=f.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in u)new RegExp("("+n+")").test(f)&&(f=f.replace(RegExp.$1,RegExp.$1.length==1?u[n]:("00"+u[n]).substr((""+u[n]).length)));return f};var ut=function(u,n,i){var r=document.getElementsByTagName("head")[0].getElementsByTagName("script"),a=!1;if(i)a=i();else for(var l=0;l<r.length;l++)r[l].getAttribute("src")==u&&(a=!0,n());if(a)n();else{var s=document.createElement("script");s.setAttribute("src",u),s.setAttribute("crossorigin",!0),s.onload=n,document.getElementsByTagName("head")[0].appendChild(s)}},Mt=function(u,n){for(var i=document.getElementsByTagName("head")[0].getElementsByTagName("link"),r=!1,a=0;a<i.length;a++)i[a].getAttribute("href")==u&&(r=!0);if(!r){var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.href=u,l.onload=n,document.getElementsByTagName("head")[0].appendChild(l)}},ln=function(u){return!!u&&(ue(u)==="object"||typeof u=="function")&&typeof u.then=="function"},et=function(u,n){var i=new RegExp("(\\?|#|&)"+u+"=(.*?)(#|&|$)"),r=(n||window.location.href).match(i);return decodeURIComponent(r?r[2]:"")},Wn=function(u,n){var i=n.parentNode;i.lastChild==n?i.appendChild(u):i.insertBefore(u,n.nextSibling)},Jl=function(u){console.log("requestFullScreen",document.getElementById(u));var n=u.requestFullScreen||u.webkitRequestFullScreen||u.mozRequestFullScreen||u.msRequestFullScreen;if(n)n.call(u);else if(typeof window.ActiveXObject!="undefined"){var i=new window.ActiveXObject("WScript.Shell");i!==null&&i.SendKeys("{F11}")}},$o=function(u){var n=document.documentElement.clientWidth,i=document.documentElement.clientHeight,r=u,a="";a+="width:"+i+"px;",a+="height:"+n+"px;",a+="-webkit-transform: rotate(90.001deg); transform: rotate(90.001deg);",a+="-webkit-transform-origin: "+n/2+"px "+n/2+"px;",a+="transform-origin: "+n/2+"px "+n/2+"px;",a+="position: fixed;top: 0;left: 0;z-index:10",r.style.cssText=a},yi=function(u){Jl(u);var n=new Promise(function(i,r){var a=setInterval(function(){var s=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(s)return clearInterval(a),i(!0)},100),l=setTimeout(function(){var s=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;s||r(!1),clearTimeout(l)},2e3)});return n},Kl=function(u,n,i){var r="";r+="width:"+n+"px;",r+="height:"+i+"px;",r+="-webkit-transform: none; transform: none;",r+="-webkit-transform-origin: 0 0;",r+="transform-origin: 0 0;",u.style.cssText=r},ql=function(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen&&document.mozCancelFullScreen()},Nr=function(u){ql();var n=new Promise(function(i,r){var a=setInterval(function(){var s=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;if(!s)return clearInterval(a),i(!0)},50),l=setTimeout(function(){var s=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;s&&r(!1),clearTimeout(l)},2e3)});return n},Ke=function(u){var n=u.split("/")[3],i=u.split("/")[4].split(".")[0],r=u.split("/")[2].split("@").length===2?u.split("/")[2].split("@")[0]:"",a=u.indexOf(".hd")!==-1,l=u.split("/")[4].split(".")[u.split("/")[4].split(".").length-1].split("?")[0];return l==="rec"&&u.indexOf(".cloud.rec")!==-1&&(l="cloud.rec"),{deviceSerial:n,channelNo:i,validCode:r,hd:a,type:l}};function $l(f){if(typeof f=="string")try{var u=JSON.parse(f);return!!(ue(u)==="object"&&u)}catch(n){return!1}console.log("It is not a string!")}var Gn=function(u,n,i,r,a,l){var s=u,b=new XMLHttpRequest;b.onreadystatechange=function(){if(b.readyState==4&&b.status==200)if($l(b.responseText)){var y=JSON.parse(b.responseText);a(y)}else a(b.responseText)},b.open(n,s,!0);var T=new FormData;for(var C in i)T.append(C,i[C]);b.send(T)},Yl=function(){function f(u,n){var i=this;fe(this,f),ut("https://open.ys7.com/assets/ezuikit_v3.4/js/hls.js",function(){console.log("加载hls.min.js成功",window.Hls),console.log("isSupportHls",window.Hls.isSupported()),window.Hls.isSupported()&&i.initHLS(u,n)},function(){return!!window.Hls})}return dt(f,[{key:"toString",value:function(){return"hls ".concat(this.coreX,"-").concat(this.coreY)}},{key:"initHLS",value:function(n,i){var r=document.getElementById(n),a=new window.Hls({defaultAudioCodec:"mp4a.40.2"});a.loadSource(i),a.attachMedia(r),a.on(window.Hls.Events.MANIFEST_PARSED,function(){r.play()}),a.on(window.Hls.Events.ERROR,function(l,s){if(s.fatal)switch(s.type){case window.Hls.ErrorTypes.NETWORK_ERROR:console.log("fatal network error encountered, try to recover"),a.startLoad();break;case window.Hls.ErrorTypes.MEDIA_ERROR:console.log("fatal media error encountered, try to recover"),a.recoverMediaError();break;default:a.destroy();break}}),this.hls=a,this.video=r,this.hlsUrl=i}},{key:"play",value:function(){console.log("执行hls播放",this.video),this.hls.startLoad(),this.video.play()}},{key:"stop",value:function(){this.video.pause(),this.hls.stopLoad()}}]),f}(),Xl=function(){function f(u,n){var i=this;fe(this,f),ut("https://open.ys7.com/assets/ezuikit_v3.4/js/flv.min.js",function(){console.log("加载flv.min.js成功",window.flvjs),console.log("isSupportFlv",window.flvjs.isSupported()),window.flvjs.isSupported()&&i.initFLV(u,n)})}return dt(f,[{key:"toString",value:function(){return"Flv ".concat(this.coreX,"-").concat(this.coreY)}},{key:"initFLV",value:function(n,i){var r=document.getElementById(n),a=r.getAttribute("controls");a||r.setAttribute("controls",!0);var l=window.flvjs.createPlayer({type:"flv",url:i,isLive:!0},{enableStashBuffer:!0,stashInitialSize:128,enableWorker:!0});l.attachMediaElement(r),l.load(),l.play(),this.flvUrl=i,this.flv=l,this.video=r}},{key:"play",value:function(){console.log("执行flv播放",this.video),this.video.play()}},{key:"stop",value:function(){this.video.pause(),this.flv.unload()}}]),f}(),Zn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof Ar!="undefined"?Ar:typeof self!="undefined"?self:{};function Ql(f,u){return u={exports:{}},f(u,u.exports),u.exports}var Ut=Ql(function(f,u){(function(){var n,i="4.17.21",r=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",s="Invalid `variable` option passed into `_.template`",b="__lodash_hash_undefined__",T=500,C="__lodash_placeholder__",y=1,h=2,D=4,_=1,E=2,w=1,z=2,S=4,d=8,m=16,g=32,k=64,A=128,O=256,H=512,Z=30,X="...",ne=800,Y=16,me=1,ge=2,ve=3,Ce=1/0,be=9007199254740991,Pe=17976931348623157e292,Ye=0/0,N=4294967295,K=N-1,te=N>>>1,ce=[["ary",A],["bind",w],["bindKey",z],["curry",d],["curryRight",m],["flip",H],["partial",g],["partialRight",k],["rearg",O]],he="[object Arguments]",Re="[object Array]",we="[object AsyncFunction]",ke="[object Boolean]",We="[object Date]",yn="[object DOMException]",Yt="[object Error]",It="[object Function]",Ht="[object GeneratorFunction]",Ge="[object Map]",Ct="[object Number]",kt="[object Null]",Oe="[object Object]",rt="[object Promise]",Ae="[object Proxy]",ye="[object RegExp]",De="[object Set]",Xe="[object String]",P="[object Symbol]",M="[object Undefined]",F="[object WeakMap]",j="[object WeakSet]",I="[object ArrayBuffer]",V="[object DataView]",L="[object Float32Array]",J="[object Float64Array]",q="[object Int8Array]",de="[object Int16Array]",ee="[object Int32Array]",se="[object Uint8Array]",Qe="[object Uint8ClampedArray]",mt="[object Uint16Array]",Ie="[object Uint32Array]",ht=/\b__p \+= '';/g,Be=/\b(__p \+=) '' \+/g,tt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xt=/&(?:amp|lt|gt|quot|#39);/g,Vt=/[&<>"']/g,Ue=RegExp(Xt.source),st=RegExp(Vt.source),Nn=/<%-([\s\S]+?)%>/g,Ti=/<%([\s\S]+?)%>/g,Si=/<%=([\s\S]+?)%>/g,ji=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Li=/^\w*$/,yt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pt=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(pt.source),cn=/^\s+/,Tn=/\s/,ni=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Oi=/\{\n\/\* \[wrapped with (.+)\] \*/,Ui=/,? & /,Hi=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ii=/[()=,{}\[\]\/\s]/,un=/\\(\\)?/g,$s=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ga=/\w*$/,Ys=/^[-+]0x[0-9a-f]+$/i,Xs=/^0b[01]+$/i,Qs=/^\[object .+?Constructor\]$/,e0=/^0o[0-7]+$/i,t0=/^(?:0|[1-9]\d*)$/,n0=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Vi=/($^)/,i0=/['\n\r\u2028\u2029\\]/g,Wi="\\ud800-\\udfff",r0="\\u0300-\\u036f",o0="\\ufe20-\\ufe2f",a0="\\u20d0-\\u20ff",va=r0+o0+a0,ya="\\u2700-\\u27bf",Ta="a-z\\xdf-\\xf6\\xf8-\\xff",d0="\\xac\\xb1\\xd7\\xf7",l0="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",s0="\\u2000-\\u206f",c0=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Sa="A-Z\\xc0-\\xd6\\xd8-\\xde",Ca="\\ufe0e\\ufe0f",ba=d0+l0+s0+c0,jr="['’]",u0="["+Wi+"]",Pa="["+ba+"]",Gi="["+va+"]",wa="\\d+",m0="["+ya+"]",Ea="["+Ta+"]",Ia="[^"+Wi+ba+wa+ya+Ta+Sa+"]",Lr="\\ud83c[\\udffb-\\udfff]",p0="(?:"+Gi+"|"+Lr+")",xa="[^"+Wi+"]",Or="(?:\\ud83c[\\udde6-\\uddff]){2}",Ur="[\\ud800-\\udbff][\\udc00-\\udfff]",ri="["+Sa+"]",_a="\\u200d",Ra="(?:"+Ea+"|"+Ia+")",f0="(?:"+ri+"|"+Ia+")",ka="(?:"+jr+"(?:d|ll|m|re|s|t|ve))?",Aa="(?:"+jr+"(?:D|LL|M|RE|S|T|VE))?",Da=p0+"?",Ma="["+Ca+"]?",h0="(?:"+_a+"(?:"+[xa,Or,Ur].join("|")+")"+Ma+Da+")*",g0="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",v0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Na=Ma+Da+h0,y0="(?:"+[m0,Or,Ur].join("|")+")"+Na,T0="(?:"+[xa+Gi+"?",Gi,Or,Ur,u0].join("|")+")",S0=RegExp(jr,"g"),C0=RegExp(Gi,"g"),Hr=RegExp(Lr+"(?="+Lr+")|"+T0+Na,"g"),b0=RegExp([ri+"?"+Ea+"+"+ka+"(?="+[Pa,ri,"$"].join("|")+")",f0+"+"+Aa+"(?="+[Pa,ri+Ra,"$"].join("|")+")",ri+"?"+Ra+"+"+ka,ri+"+"+Aa,v0,g0,wa,y0].join("|"),"g"),P0=RegExp("["+_a+Wi+va+Ca+"]"),w0=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,E0=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],I0=-1,ft={};ft[L]=ft[J]=ft[q]=ft[de]=ft[ee]=ft[se]=ft[Qe]=ft[mt]=ft[Ie]=!0,ft[he]=ft[Re]=ft[I]=ft[ke]=ft[V]=ft[We]=ft[Yt]=ft[It]=ft[Ge]=ft[Ct]=ft[Oe]=ft[ye]=ft[De]=ft[Xe]=ft[F]=!1;var ct={};ct[he]=ct[Re]=ct[I]=ct[V]=ct[ke]=ct[We]=ct[L]=ct[J]=ct[q]=ct[de]=ct[ee]=ct[Ge]=ct[Ct]=ct[Oe]=ct[ye]=ct[De]=ct[Xe]=ct[P]=ct[se]=ct[Qe]=ct[mt]=ct[Ie]=!0,ct[Yt]=ct[It]=ct[F]=!1;var x0={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},_0={"&":"&","<":"<",">":">",'"':""","'":"'"},R0={"&":"&","<":"<",">":">",""":'"',"'":"'"},k0={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},A0=parseFloat,D0=parseInt,Fa=typeof Zn=="object"&&Zn&&Zn.Object===Object&&Zn,M0=typeof self=="object"&&self&&self.Object===Object&&self,_t=Fa||M0||Function("return this")(),Vr=u&&!u.nodeType&&u,Jn=Vr&&!0&&f&&!f.nodeType&&f,Ba=Jn&&Jn.exports===Vr,Wr=Ba&&Fa.process,Qt=function(){try{var W=Jn&&Jn.require&&Jn.require("util").types;return W||Wr&&Wr.binding&&Wr.binding("util")}catch(ie){}}(),za=Qt&&Qt.isArrayBuffer,ja=Qt&&Qt.isDate,La=Qt&&Qt.isMap,Oa=Qt&&Qt.isRegExp,Ua=Qt&&Qt.isSet,Ha=Qt&&Qt.isTypedArray;function Gt(W,ie,Q){switch(Q.length){case 0:return W.call(ie);case 1:return W.call(ie,Q[0]);case 2:return W.call(ie,Q[0],Q[1]);case 3:return W.call(ie,Q[0],Q[1],Q[2])}return W.apply(ie,Q)}function N0(W,ie,Q,Te){for(var Ne=-1,nt=W==null?0:W.length;++Ne<nt;){var wt=W[Ne];ie(Te,wt,Q(wt),W)}return Te}function en(W,ie){for(var Q=-1,Te=W==null?0:W.length;++Q<Te&&ie(W[Q],Q,W)!==!1;);return W}function F0(W,ie){for(var Q=W==null?0:W.length;Q--&&ie(W[Q],Q,W)!==!1;);return W}function Va(W,ie){for(var Q=-1,Te=W==null?0:W.length;++Q<Te;)if(!ie(W[Q],Q,W))return!1;return!0}function Fn(W,ie){for(var Q=-1,Te=W==null?0:W.length,Ne=0,nt=[];++Q<Te;){var wt=W[Q];ie(wt,Q,W)&&(nt[Ne++]=wt)}return nt}function Zi(W,ie){var Q=W==null?0:W.length;return!!Q&&oi(W,ie,0)>-1}function Gr(W,ie,Q){for(var Te=-1,Ne=W==null?0:W.length;++Te<Ne;)if(Q(ie,W[Te]))return!0;return!1}function gt(W,ie){for(var Q=-1,Te=W==null?0:W.length,Ne=Array(Te);++Q<Te;)Ne[Q]=ie(W[Q],Q,W);return Ne}function Bn(W,ie){for(var Q=-1,Te=ie.length,Ne=W.length;++Q<Te;)W[Ne+Q]=ie[Q];return W}function Zr(W,ie,Q,Te){var Ne=-1,nt=W==null?0:W.length;for(Te&&nt&&(Q=W[++Ne]);++Ne<nt;)Q=ie(Q,W[Ne],Ne,W);return Q}function B0(W,ie,Q,Te){var Ne=W==null?0:W.length;for(Te&&Ne&&(Q=W[--Ne]);Ne--;)Q=ie(Q,W[Ne],Ne,W);return Q}function Jr(W,ie){for(var Q=-1,Te=W==null?0:W.length;++Q<Te;)if(ie(W[Q],Q,W))return!0;return!1}var z0=Kr("length");function j0(W){return W.split("")}function L0(W){return W.match(Hi)||[]}function Wa(W,ie,Q){var Te;return Q(W,function(Ne,nt,wt){if(ie(Ne,nt,wt))return Te=nt,!1}),Te}function Ji(W,ie,Q,Te){for(var Ne=W.length,nt=Q+(Te?1:-1);Te?nt--:++nt<Ne;)if(ie(W[nt],nt,W))return nt;return-1}function oi(W,ie,Q){return ie===ie?Y0(W,ie,Q):Ji(W,Ga,Q)}function O0(W,ie,Q,Te){for(var Ne=Q-1,nt=W.length;++Ne<nt;)if(Te(W[Ne],ie))return Ne;return-1}function Ga(W){return W!==W}function Za(W,ie){var Q=W==null?0:W.length;return Q?$r(W,ie)/Q:Ye}function Kr(W){return function(ie){return ie==null?n:ie[W]}}function qr(W){return function(ie){return W==null?n:W[ie]}}function Ja(W,ie,Q,Te,Ne){return Ne(W,function(nt,wt,at){Q=Te?(Te=!1,nt):ie(Q,nt,wt,at)}),Q}function U0(W,ie){var Q=W.length;for(W.sort(ie);Q--;)W[Q]=W[Q].value;return W}function $r(W,ie){for(var Q,Te=-1,Ne=W.length;++Te<Ne;){var nt=ie(W[Te]);nt!==n&&(Q=Q===n?nt:Q+nt)}return Q}function Yr(W,ie){for(var Q=-1,Te=Array(W);++Q<W;)Te[Q]=ie(Q);return Te}function H0(W,ie){return gt(ie,function(Q){return[Q,W[Q]]})}function Ka(W){return W&&W.slice(0,Xa(W)+1).replace(cn,"")}function Zt(W){return function(ie){return W(ie)}}function Xr(W,ie){return gt(ie,function(Q){return W[Q]})}function Ci(W,ie){return W.has(ie)}function qa(W,ie){for(var Q=-1,Te=W.length;++Q<Te&&oi(ie,W[Q],0)>-1;);return Q}function $a(W,ie){for(var Q=W.length;Q--&&oi(ie,W[Q],0)>-1;);return Q}function V0(W,ie){for(var Q=W.length,Te=0;Q--;)W[Q]===ie&&++Te;return Te}var W0=qr(x0),G0=qr(_0);function Z0(W){return"\\"+k0[W]}function J0(W,ie){return W==null?n:W[ie]}function ai(W){return P0.test(W)}function K0(W){return w0.test(W)}function q0(W){for(var ie,Q=[];!(ie=W.next()).done;)Q.push(ie.value);return Q}function Qr(W){var ie=-1,Q=Array(W.size);return W.forEach(function(Te,Ne){Q[++ie]=[Ne,Te]}),Q}function Ya(W,ie){return function(Q){return W(ie(Q))}}function zn(W,ie){for(var Q=-1,Te=W.length,Ne=0,nt=[];++Q<Te;){var wt=W[Q];(wt===ie||wt===C)&&(W[Q]=C,nt[Ne++]=Q)}return nt}function Ki(W){var ie=-1,Q=Array(W.size);return W.forEach(function(Te){Q[++ie]=Te}),Q}function $0(W){var ie=-1,Q=Array(W.size);return W.forEach(function(Te){Q[++ie]=[Te,Te]}),Q}function Y0(W,ie,Q){for(var Te=Q-1,Ne=W.length;++Te<Ne;)if(W[Te]===ie)return Te;return-1}function X0(W,ie,Q){for(var Te=Q+1;Te--;)if(W[Te]===ie)return Te;return Te}function di(W){return ai(W)?ec(W):z0(W)}function mn(W){return ai(W)?tc(W):j0(W)}function Xa(W){for(var ie=W.length;ie--&&Tn.test(W.charAt(ie)););return ie}var Q0=qr(R0);function ec(W){for(var ie=Hr.lastIndex=0;Hr.test(W);)++ie;return ie}function tc(W){return W.match(Hr)||[]}function nc(W){return W.match(b0)||[]}var ic=function W(ie){ie=ie==null?_t:li.defaults(_t.Object(),ie,li.pick(_t,E0));var Q=ie.Array,Te=ie.Date,Ne=ie.Error,nt=ie.Function,wt=ie.Math,at=ie.Object,eo=ie.RegExp,rc=ie.String,tn=ie.TypeError,qi=Q.prototype,oc=nt.prototype,si=at.prototype,$i=ie["__core-js_shared__"],Yi=oc.toString,ot=si.hasOwnProperty,ac=0,Qa=function(){var e=/[^.]+$/.exec($i&&$i.keys&&$i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Xi=si.toString,dc=Yi.call(at),lc=_t._,sc=eo("^"+Yi.call(ot).replace(pt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Qi=Ba?ie.Buffer:n,jn=ie.Symbol,er=ie.Uint8Array,ed=Qi?Qi.allocUnsafe:n,tr=Ya(at.getPrototypeOf,at),td=at.create,nd=si.propertyIsEnumerable,nr=qi.splice,id=jn?jn.isConcatSpreadable:n,bi=jn?jn.iterator:n,Kn=jn?jn.toStringTag:n,ir=function(){try{var e=Qn(at,"defineProperty");return e({},"",{}),e}catch(t){}}(),cc=ie.clearTimeout!==_t.clearTimeout&&ie.clearTimeout,uc=Te&&Te.now!==_t.Date.now&&Te.now,mc=ie.setTimeout!==_t.setTimeout&&ie.setTimeout,rr=wt.ceil,or=wt.floor,to=at.getOwnPropertySymbols,pc=Qi?Qi.isBuffer:n,rd=ie.isFinite,fc=qi.join,hc=Ya(at.keys,at),Et=wt.max,At=wt.min,gc=Te.now,vc=ie.parseInt,od=wt.random,yc=qi.reverse,no=Qn(ie,"DataView"),Pi=Qn(ie,"Map"),io=Qn(ie,"Promise"),ci=Qn(ie,"Set"),wi=Qn(ie,"WeakMap"),Ei=Qn(at,"create"),ar=wi&&new wi,ui={},Tc=ei(no),Sc=ei(Pi),Cc=ei(io),bc=ei(ci),Pc=ei(wi),dr=jn?jn.prototype:n,Ii=dr?dr.valueOf:n,ad=dr?dr.toString:n;function x(e){if(Tt(e)&&!Fe(e)&&!(e instanceof Ze)){if(e instanceof nn)return e;if(ot.call(e,"__wrapped__"))return dl(e)}return new nn(e)}var mi=function(){function e(){}return function(t){if(!vt(t))return{};if(td)return td(t);e.prototype=t;var o=new e;return e.prototype=n,o}}();function lr(){}function nn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}x.templateSettings={escape:Nn,evaluate:Ti,interpolate:Si,variable:"",imports:{_:x}},x.prototype=lr.prototype,x.prototype.constructor=x,nn.prototype=mi(lr.prototype),nn.prototype.constructor=nn;function Ze(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=N,this.__views__=[]}function wc(){var e=new Ze(this.__wrapped__);return e.__actions__=zt(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=zt(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=zt(this.__views__),e}function Ec(){if(this.__filtered__){var e=new Ze(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Ic(){var e=this.__wrapped__.value(),t=this.__dir__,o=Fe(e),c=t<0,v=o?e.length:0,R=ju(0,v,this.__views__),B=R.start,U=R.end,G=U-B,re=c?U:B-1,oe=this.__iteratees__,le=oe.length,pe=0,Se=At(G,this.__takeCount__);if(!o||!c&&v==G&&Se==G)return kd(e,this.__actions__);var xe=[];e:for(;G--&&pe<Se;){re+=t;for(var Le=-1,_e=e[re];++Le<le;){var Ve=oe[Le],$e=Ve.iteratee,qt=Ve.type,Bt=$e(_e);if(qt==ge)_e=Bt;else if(!Bt){if(qt==me)continue e;break e}}xe[pe++]=_e}return xe}Ze.prototype=mi(lr.prototype),Ze.prototype.constructor=Ze;function qn(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var c=e[t];this.set(c[0],c[1])}}function xc(){this.__data__=Ei?Ei(null):{},this.size=0}function _c(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function Rc(e){var t=this.__data__;if(Ei){var o=t[e];return o===b?n:o}return ot.call(t,e)?t[e]:n}function kc(e){var t=this.__data__;return Ei?t[e]!==n:ot.call(t,e)}function Ac(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=Ei&&t===n?b:t,this}qn.prototype.clear=xc,qn.prototype.delete=_c,qn.prototype.get=Rc,qn.prototype.has=kc,qn.prototype.set=Ac;function En(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var c=e[t];this.set(c[0],c[1])}}function Dc(){this.__data__=[],this.size=0}function Mc(e){var t=this.__data__,o=sr(t,e);if(o<0)return!1;var c=t.length-1;return o==c?t.pop():nr.call(t,o,1),--this.size,!0}function Nc(e){var t=this.__data__,o=sr(t,e);return o<0?n:t[o][1]}function Fc(e){return sr(this.__data__,e)>-1}function Bc(e,t){var o=this.__data__,c=sr(o,e);return c<0?(++this.size,o.push([e,t])):o[c][1]=t,this}En.prototype.clear=Dc,En.prototype.delete=Mc,En.prototype.get=Nc,En.prototype.has=Fc,En.prototype.set=Bc;function In(e){var t=-1,o=e==null?0:e.length;for(this.clear();++t<o;){var c=e[t];this.set(c[0],c[1])}}function zc(){this.size=0,this.__data__={hash:new qn,map:new(Pi||En),string:new qn}}function jc(e){var t=Cr(this,e).delete(e);return this.size-=t?1:0,t}function Lc(e){return Cr(this,e).get(e)}function Oc(e){return Cr(this,e).has(e)}function Uc(e,t){var o=Cr(this,e),c=o.size;return o.set(e,t),this.size+=o.size==c?0:1,this}In.prototype.clear=zc,In.prototype.delete=jc,In.prototype.get=Lc,In.prototype.has=Oc,In.prototype.set=Uc;function $n(e){var t=-1,o=e==null?0:e.length;for(this.__data__=new In;++t<o;)this.add(e[t])}function Hc(e){return this.__data__.set(e,b),this}function Vc(e){return this.__data__.has(e)}$n.prototype.add=$n.prototype.push=Hc,$n.prototype.has=Vc;function pn(e){var t=this.__data__=new En(e);this.size=t.size}function Wc(){this.__data__=new En,this.size=0}function Gc(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}function Zc(e){return this.__data__.get(e)}function Jc(e){return this.__data__.has(e)}function Kc(e,t){var o=this.__data__;if(o instanceof En){var c=o.__data__;if(!Pi||c.length<r-1)return c.push([e,t]),this.size=++o.size,this;o=this.__data__=new In(c)}return o.set(e,t),this.size=o.size,this}pn.prototype.clear=Wc,pn.prototype.delete=Gc,pn.prototype.get=Zc,pn.prototype.has=Jc,pn.prototype.set=Kc;function dd(e,t){var o=Fe(e),c=!o&&ti(e),v=!o&&!c&&Vn(e),R=!o&&!c&&!v&&gi(e),B=o||c||v||R,U=B?Yr(e.length,rc):[],G=U.length;for(var re in e)(t||ot.call(e,re))&&!(B&&(re=="length"||v&&(re=="offset"||re=="parent")||R&&(re=="buffer"||re=="byteLength"||re=="byteOffset")||kn(re,G)))&&U.push(re);return U}function ld(e){var t=e.length;return t?e[ho(0,t-1)]:n}function qc(e,t){return br(zt(e),Yn(t,0,e.length))}function $c(e){return br(zt(e))}function ro(e,t,o){(o!==n&&!fn(e[t],o)||o===n&&!(t in e))&&xn(e,t,o)}function xi(e,t,o){var c=e[t];(!(ot.call(e,t)&&fn(c,o))||o===n&&!(t in e))&&xn(e,t,o)}function sr(e,t){for(var o=e.length;o--;)if(fn(e[o][0],t))return o;return-1}function Yc(e,t,o,c){return Ln(e,function(v,R,B){t(c,v,o(v),B)}),c}function sd(e,t){return e&&Cn(t,xt(t),e)}function Xc(e,t){return e&&Cn(t,Lt(t),e)}function xn(e,t,o){t=="__proto__"&&ir?ir(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}function oo(e,t){for(var o=-1,c=t.length,v=Q(c),R=e==null;++o<c;)v[o]=R?n:Oo(e,t[o]);return v}function Yn(e,t,o){return e===e&&(o!==n&&(e=e<=o?e:o),t!==n&&(e=e>=t?e:t)),e}function rn(e,t,o,c,v,R){var B,U=t&y,G=t&h,re=t&D;if(o&&(B=v?o(e,c,v,R):o(e)),B!==n)return B;if(!vt(e))return e;var oe=Fe(e);if(oe){if(B=Ou(e),!U)return zt(e,B)}else{var le=Dt(e),pe=le==It||le==Ht;if(Vn(e))return Md(e,U);if(le==Oe||le==he||pe&&!v){if(B=G||pe?{}:Xd(e),!U)return G?Ru(e,Xc(B,e)):_u(e,sd(B,e))}else{if(!ct[le])return v?e:{};B=Uu(e,le,U)}}R||(R=new pn);var Se=R.get(e);if(Se)return Se;R.set(e,B),xl(e)?e.forEach(function(_e){B.add(rn(_e,t,o,_e,e,R))}):El(e)&&e.forEach(function(_e,Ve){B.set(Ve,rn(_e,t,o,Ve,e,R))});var xe=re?G?Io:Eo:G?Lt:xt,Le=oe?n:xe(e);return en(Le||e,function(_e,Ve){Le&&(Ve=_e,_e=e[Ve]),xi(B,Ve,rn(_e,t,o,Ve,e,R))}),B}function Qc(e){var t=xt(e);return function(o){return cd(o,e,t)}}function cd(e,t,o){var c=o.length;if(e==null)return!c;for(e=at(e);c--;){var v=o[c],R=t[v],B=e[v];if(B===n&&!(v in e)||!R(B))return!1}return!0}function ud(e,t,o){if(typeof e!="function")throw new tn(l);return Ni(function(){e.apply(n,o)},t)}function _i(e,t,o,c){var v=-1,R=Zi,B=!0,U=e.length,G=[],re=t.length;if(!U)return G;o&&(t=gt(t,Zt(o))),c?(R=Gr,B=!1):t.length>=r&&(R=Ci,B=!1,t=new $n(t));e:for(;++v<U;){var oe=e[v],le=o==null?oe:o(oe);if(oe=c||oe!==0?oe:0,B&&le===le){for(var pe=re;pe--;)if(t[pe]===le)continue e;G.push(oe)}else R(t,le,c)||G.push(oe)}return G}var Ln=jd(Sn),md=jd(lo,!0);function eu(e,t){var o=!0;return Ln(e,function(c,v,R){return o=!!t(c,v,R),o}),o}function cr(e,t,o){for(var c=-1,v=e.length;++c<v;){var R=e[c],B=t(R);if(B!=null&&(U===n?B===B&&!Kt(B):o(B,U)))var U=B,G=R}return G}function tu(e,t,o,c){var v=e.length;for(o=ze(o),o<0&&(o=-o>v?0:v+o),c=c===n||c>v?v:ze(c),c<0&&(c+=v),c=o>c?0:Rl(c);o<c;)e[o++]=t;return e}function pd(e,t){var o=[];return Ln(e,function(c,v,R){t(c,v,R)&&o.push(c)}),o}function Rt(e,t,o,c,v){var R=-1,B=e.length;for(o||(o=Vu),v||(v=[]);++R<B;){var U=e[R];t>0&&o(U)?t>1?Rt(U,t-1,o,c,v):Bn(v,U):c||(v[v.length]=U)}return v}var ao=Ld(),fd=Ld(!0);function Sn(e,t){return e&&ao(e,t,xt)}function lo(e,t){return e&&fd(e,t,xt)}function ur(e,t){return Fn(t,function(o){return An(e[o])})}function Xn(e,t){t=Un(t,e);for(var o=0,c=t.length;e!=null&&o<c;)e=e[bn(t[o++])];return o&&o==c?e:n}function hd(e,t,o){var c=t(e);return Fe(e)?c:Bn(c,o(e))}function Nt(e){return e==null?e===n?M:kt:Kn&&Kn in at(e)?zu(e):$u(e)}function so(e,t){return e>t}function nu(e,t){return e!=null&&ot.call(e,t)}function iu(e,t){return e!=null&&t in at(e)}function ru(e,t,o){return e>=At(t,o)&&e<Et(t,o)}function co(e,t,o){for(var c=o?Gr:Zi,v=e[0].length,R=e.length,B=R,U=Q(R),G=1/0,re=[];B--;){var oe=e[B];B&&t&&(oe=gt(oe,Zt(t))),G=At(oe.length,G),U[B]=!o&&(t||v>=120&&oe.length>=120)?new $n(B&&oe):n}oe=e[0];var le=-1,pe=U[0];e:for(;++le<v&&re.length<G;){var Se=oe[le],xe=t?t(Se):Se;if(Se=o||Se!==0?Se:0,!(pe?Ci(pe,xe):c(re,xe,o))){for(B=R;--B;){var Le=U[B];if(!(Le?Ci(Le,xe):c(e[B],xe,o)))continue e}pe&&pe.push(xe),re.push(Se)}}return re}function ou(e,t,o,c){return Sn(e,function(v,R,B){t(c,o(v),R,B)}),c}function Ri(e,t,o){t=Un(t,e),e=nl(e,t);var c=e==null?e:e[bn(an(t))];return c==null?n:Gt(c,e,o)}function gd(e){return Tt(e)&&Nt(e)==he}function au(e){return Tt(e)&&Nt(e)==I}function du(e){return Tt(e)&&Nt(e)==We}function ki(e,t,o,c,v){return e===t?!0:e==null||t==null||!Tt(e)&&!Tt(t)?e!==e&&t!==t:lu(e,t,o,c,ki,v)}function lu(e,t,o,c,v,R){var B=Fe(e),U=Fe(t),G=B?Re:Dt(e),re=U?Re:Dt(t);G=G==he?Oe:G,re=re==he?Oe:re;var oe=G==Oe,le=re==Oe,pe=G==re;if(pe&&Vn(e)){if(!Vn(t))return!1;B=!0,oe=!1}if(pe&&!oe)return R||(R=new pn),B||gi(e)?qd(e,t,o,c,v,R):Fu(e,t,G,o,c,v,R);if(!(o&_)){var Se=oe&&ot.call(e,"__wrapped__"),xe=le&&ot.call(t,"__wrapped__");if(Se||xe){var Le=Se?e.value():e,_e=xe?t.value():t;return R||(R=new pn),v(Le,_e,o,c,R)}}return pe?(R||(R=new pn),Bu(e,t,o,c,v,R)):!1}function su(e){return Tt(e)&&Dt(e)==Ge}function uo(e,t,o,c){var v=o.length,R=v,B=!c;if(e==null)return!R;for(e=at(e);v--;){var U=o[v];if(B&&U[2]?U[1]!==e[U[0]]:!(U[0]in e))return!1}for(;++v<R;){U=o[v];var G=U[0],re=e[G],oe=U[1];if(B&&U[2]){if(re===n&&!(G in e))return!1}else{var le=new pn;if(c)var pe=c(re,oe,G,e,t,le);if(!(pe===n?ki(oe,re,_|E,c,le):pe))return!1}}return!0}function vd(e){if(!vt(e)||Gu(e))return!1;var t=An(e)?sc:Qs;return t.test(ei(e))}function cu(e){return Tt(e)&&Nt(e)==ye}function uu(e){return Tt(e)&&Dt(e)==De}function mu(e){return Tt(e)&&_r(e.length)&&!!ft[Nt(e)]}function yd(e){return typeof e=="function"?e:e==null?Ot:typeof e=="object"?Fe(e)?Cd(e[0],e[1]):Sd(e):Ol(e)}function mo(e){if(!Mi(e))return hc(e);var t=[];for(var o in at(e))ot.call(e,o)&&o!="constructor"&&t.push(o);return t}function pu(e){if(!vt(e))return qu(e);var t=Mi(e),o=[];for(var c in e)c=="constructor"&&(t||!ot.call(e,c))||o.push(c);return o}function po(e,t){return e<t}function Td(e,t){var o=-1,c=jt(e)?Q(e.length):[];return Ln(e,function(v,R,B){c[++o]=t(v,R,B)}),c}function Sd(e){var t=_o(e);return t.length==1&&t[0][2]?el(t[0][0],t[0][1]):function(o){return o===e||uo(o,e,t)}}function Cd(e,t){return ko(e)&&Qd(t)?el(bn(e),t):function(o){var c=Oo(o,e);return c===n&&c===t?Uo(o,e):ki(t,c,_|E)}}function mr(e,t,o,c,v){e!==t&&ao(t,function(R,B){if(v||(v=new pn),vt(R))fu(e,t,B,o,mr,c,v);else{var U=c?c(Do(e,B),R,B+"",e,t,v):n;U===n&&(U=R),ro(e,B,U)}},Lt)}function fu(e,t,o,c,v,R,B){var U=Do(e,o),G=Do(t,o),re=B.get(G);if(re){ro(e,o,re);return}var oe=R?R(U,G,o+"",e,t,B):n,le=oe===n;if(le){var pe=Fe(G),Se=!pe&&Vn(G),xe=!pe&&!Se&&gi(G);oe=G,pe||Se||xe?Fe(U)?oe=U:bt(U)?oe=zt(U):Se?(le=!1,oe=Md(G,!0)):xe?(le=!1,oe=Nd(G,!0)):oe=[]:Fi(G)||ti(G)?(oe=U,ti(U)?oe=kl(U):(!vt(U)||An(U))&&(oe=Xd(G))):le=!1}le&&(B.set(G,oe),v(oe,G,c,R,B),B.delete(G)),ro(e,o,oe)}function bd(e,t){var o=e.length;if(o)return t+=t<0?o:0,kn(t,o)?e[t]:n}function Pd(e,t,o){t.length?t=gt(t,function(R){return Fe(R)?function(B){return Xn(B,R.length===1?R[0]:R)}:R}):t=[Ot];var c=-1;t=gt(t,Zt(Ee()));var v=Td(e,function(R,B,U){var G=gt(t,function(re){return re(R)});return{criteria:G,index:++c,value:R}});return U0(v,function(R,B){return xu(R,B,o)})}function hu(e,t){return wd(e,t,function(o,c){return Uo(e,c)})}function wd(e,t,o){for(var c=-1,v=t.length,R={};++c<v;){var B=t[c],U=Xn(e,B);o(U,B)&&Ai(R,Un(B,e),U)}return R}function gu(e){return function(t){return Xn(t,e)}}function fo(e,t,o,c){var v=c?O0:oi,R=-1,B=t.length,U=e;for(e===t&&(t=zt(t)),o&&(U=gt(e,Zt(o)));++R<B;)for(var G=0,re=t[R],oe=o?o(re):re;(G=v(U,oe,G,c))>-1;)U!==e&&nr.call(U,G,1),nr.call(e,G,1);return e}function Ed(e,t){for(var o=e?t.length:0,c=o-1;o--;){var v=t[o];if(o==c||v!==R){var R=v;kn(v)?nr.call(e,v,1):yo(e,v)}}return e}function ho(e,t){return e+or(od()*(t-e+1))}function vu(e,t,o,c){for(var v=-1,R=Et(rr((t-e)/(o||1)),0),B=Q(R);R--;)B[c?R:++v]=e,e+=o;return B}function go(e,t){var o="";if(!e||t<1||t>be)return o;do t%2&&(o+=e),t=or(t/2),t&&(e+=e);while(t);return o}function He(e,t){return Mo(tl(e,t,Ot),e+"")}function yu(e){return ld(vi(e))}function Tu(e,t){var o=vi(e);return br(o,Yn(t,0,o.length))}function Ai(e,t,o,c){if(!vt(e))return e;t=Un(t,e);for(var v=-1,R=t.length,B=R-1,U=e;U!=null&&++v<R;){var G=bn(t[v]),re=o;if(G==="__proto__"||G==="constructor"||G==="prototype")return e;if(v!=B){var oe=U[G];re=c?c(oe,G,U):n,re===n&&(re=vt(oe)?oe:kn(t[v+1])?[]:{})}xi(U,G,re),U=U[G]}return e}var Id=ar?function(e,t){return ar.set(e,t),e}:Ot,Su=ir?function(e,t){return ir(e,"toString",{configurable:!0,enumerable:!1,value:Vo(t),writable:!0})}:Ot;function Cu(e){return br(vi(e))}function on(e,t,o){var c=-1,v=e.length;t<0&&(t=-t>v?0:v+t),o=o>v?v:o,o<0&&(o+=v),v=t>o?0:o-t>>>0,t>>>=0;for(var R=Q(v);++c<v;)R[c]=e[c+t];return R}function bu(e,t){var o;return Ln(e,function(c,v,R){return o=t(c,v,R),!o}),!!o}function pr(e,t,o){var c=0,v=e==null?c:e.length;if(typeof t=="number"&&t===t&&v<=te){for(;c<v;){var R=c+v>>>1,B=e[R];B!==null&&!Kt(B)&&(o?B<=t:B<t)?c=R+1:v=R}return v}return vo(e,t,Ot,o)}function vo(e,t,o,c){var v=0,R=e==null?0:e.length;if(R===0)return 0;t=o(t);for(var B=t!==t,U=t===null,G=Kt(t),re=t===n;v<R;){var oe=or((v+R)/2),le=o(e[oe]),pe=le!==n,Se=le===null,xe=le===le,Le=Kt(le);if(B)var _e=c||xe;else re?_e=xe&&(c||pe):U?_e=xe&&pe&&(c||!Se):G?_e=xe&&pe&&!Se&&(c||!Le):Se||Le?_e=!1:_e=c?le<=t:le<t;_e?v=oe+1:R=oe}return At(R,K)}function xd(e,t){for(var o=-1,c=e.length,v=0,R=[];++o<c;){var B=e[o],U=t?t(B):B;if(!o||!fn(U,G)){var G=U;R[v++]=B===0?0:B}}return R}function _d(e){return typeof e=="number"?e:Kt(e)?Ye:+e}function Jt(e){if(typeof e=="string")return e;if(Fe(e))return gt(e,Jt)+"";if(Kt(e))return ad?ad.call(e):"";var t=e+"";return t=="0"&&1/e==-Ce?"-0":t}function On(e,t,o){var c=-1,v=Zi,R=e.length,B=!0,U=[],G=U;if(o)B=!1,v=Gr;else if(R>=r){var re=t?null:Mu(e);if(re)return Ki(re);B=!1,v=Ci,G=new $n}else G=t?[]:U;e:for(;++c<R;){var oe=e[c],le=t?t(oe):oe;if(oe=o||oe!==0?oe:0,B&&le===le){for(var pe=G.length;pe--;)if(G[pe]===le)continue e;t&&G.push(le),U.push(oe)}else v(G,le,o)||(G!==U&&G.push(le),U.push(oe))}return U}function yo(e,t){return t=Un(t,e),e=nl(e,t),e==null||delete e[bn(an(t))]}function Rd(e,t,o,c){return Ai(e,t,o(Xn(e,t)),c)}function fr(e,t,o,c){for(var v=e.length,R=c?v:-1;(c?R--:++R<v)&&t(e[R],R,e););return o?on(e,c?0:R,c?R+1:v):on(e,c?R+1:0,c?v:R)}function kd(e,t){var o=e;return o instanceof Ze&&(o=o.value()),Zr(t,function(c,v){return v.func.apply(v.thisArg,Bn([c],v.args))},o)}function To(e,t,o){var c=e.length;if(c<2)return c?On(e[0]):[];for(var v=-1,R=Q(c);++v<c;)for(var B=e[v],U=-1;++U<c;)U!=v&&(R[v]=_i(R[v]||B,e[U],t,o));return On(Rt(R,1),t,o)}function Ad(e,t,o){for(var c=-1,v=e.length,R=t.length,B={};++c<v;){var U=c<R?t[c]:n;o(B,e[c],U)}return B}function So(e){return bt(e)?e:[]}function Co(e){return typeof e=="function"?e:Ot}function Un(e,t){return Fe(e)?e:ko(e,t)?[e]:al(it(e))}var Pu=He;function Hn(e,t,o){var c=e.length;return o=o===n?c:o,!t&&o>=c?e:on(e,t,o)}var Dd=cc||function(e){return _t.clearTimeout(e)};function Md(e,t){if(t)return e.slice();var o=e.length,c=ed?ed(o):new e.constructor(o);return e.copy(c),c}function bo(e){var t=new e.constructor(e.byteLength);return new er(t).set(new er(e)),t}function wu(e,t){var o=t?bo(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.byteLength)}function Eu(e){var t=new e.constructor(e.source,ga.exec(e));return t.lastIndex=e.lastIndex,t}function Iu(e){return Ii?at(Ii.call(e)):{}}function Nd(e,t){var o=t?bo(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}function Fd(e,t){if(e!==t){var o=e!==n,c=e===null,v=e===e,R=Kt(e),B=t!==n,U=t===null,G=t===t,re=Kt(t);if(!U&&!re&&!R&&e>t||R&&B&&G&&!U&&!re||c&&B&&G||!o&&G||!v)return 1;if(!c&&!R&&!re&&e<t||re&&o&&v&&!c&&!R||U&&o&&v||!B&&v||!G)return-1}return 0}function xu(e,t,o){for(var c=-1,v=e.criteria,R=t.criteria,B=v.length,U=o.length;++c<B;){var G=Fd(v[c],R[c]);if(G){if(c>=U)return G;var re=o[c];return G*(re=="desc"?-1:1)}}return e.index-t.index}function Bd(e,t,o,c){for(var v=-1,R=e.length,B=o.length,U=-1,G=t.length,re=Et(R-B,0),oe=Q(G+re),le=!c;++U<G;)oe[U]=t[U];for(;++v<B;)(le||v<R)&&(oe[o[v]]=e[v]);for(;re--;)oe[U++]=e[v++];return oe}function zd(e,t,o,c){for(var v=-1,R=e.length,B=-1,U=o.length,G=-1,re=t.length,oe=Et(R-U,0),le=Q(oe+re),pe=!c;++v<oe;)le[v]=e[v];for(var Se=v;++G<re;)le[Se+G]=t[G];for(;++B<U;)(pe||v<R)&&(le[Se+o[B]]=e[v++]);return le}function zt(e,t){var o=-1,c=e.length;for(t||(t=Q(c));++o<c;)t[o]=e[o];return t}function Cn(e,t,o,c){var v=!o;o||(o={});for(var R=-1,B=t.length;++R<B;){var U=t[R],G=c?c(o[U],e[U],U,o,e):n;G===n&&(G=e[U]),v?xn(o,U,G):xi(o,U,G)}return o}function _u(e,t){return Cn(e,Ro(e),t)}function Ru(e,t){return Cn(e,$d(e),t)}function hr(e,t){return function(o,c){var v=Fe(o)?N0:Yc,R=t?t():{};return v(o,e,Ee(c,2),R)}}function pi(e){return He(function(t,o){var c=-1,v=o.length,R=v>1?o[v-1]:n,B=v>2?o[2]:n;for(R=e.length>3&&typeof R=="function"?(v--,R):n,B&&Ft(o[0],o[1],B)&&(R=v<3?n:R,v=1),t=at(t);++c<v;){var U=o[c];U&&e(t,U,c,R)}return t})}function jd(e,t){return function(o,c){if(o==null)return o;if(!jt(o))return e(o,c);for(var v=o.length,R=t?v:-1,B=at(o);(t?R--:++R<v)&&c(B[R],R,B)!==!1;);return o}}function Ld(e){return function(t,o,c){for(var v=-1,R=at(t),B=c(t),U=B.length;U--;){var G=B[e?U:++v];if(o(R[G],G,R)===!1)break}return t}}function ku(e,t,o){var c=t&w,v=Di(e);function R(){var B=this&&this!==_t&&this instanceof R?v:e;return B.apply(c?o:this,arguments)}return R}function Od(e){return function(t){t=it(t);var o=ai(t)?mn(t):n,c=o?o[0]:t.charAt(0),v=o?Hn(o,1).join(""):t.slice(1);return c[e]()+v}}function fi(e){return function(t){return Zr(jl(zl(t).replace(S0,"")),e,"")}}function Di(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var o=mi(e.prototype),c=e.apply(o,t);return vt(c)?c:o}}function Au(e,t,o){var c=Di(e);function v(){for(var R=arguments.length,B=Q(R),U=R,G=hi(v);U--;)B[U]=arguments[U];var re=R<3&&B[0]!==G&&B[R-1]!==G?[]:zn(B,G);if(R-=re.length,R<o)return Gd(e,t,gr,v.placeholder,n,B,re,n,n,o-R);var oe=this&&this!==_t&&this instanceof v?c:e;return Gt(oe,this,B)}return v}function Ud(e){return function(t,o,c){var v=at(t);if(!jt(t)){var R=Ee(o,3);t=xt(t),o=function(U){return R(v[U],U,v)}}var B=e(t,o,c);return B>-1?v[R?t[B]:B]:n}}function Hd(e){return Rn(function(t){var o=t.length,c=o,v=nn.prototype.thru;for(e&&t.reverse();c--;){var R=t[c];if(typeof R!="function")throw new tn(l);if(v&&!B&&Sr(R)=="wrapper")var B=new nn([],!0)}for(c=B?c:o;++c<o;){R=t[c];var U=Sr(R),G=U=="wrapper"?xo(R):n;G&&Ao(G[0])&&G[1]==(A|d|g|O)&&!G[4].length&&G[9]==1?B=B[Sr(G[0])].apply(B,G[3]):B=R.length==1&&Ao(R)?B[U]():B.thru(R)}return function(){var re=arguments,oe=re[0];if(B&&re.length==1&&Fe(oe))return B.plant(oe).value();for(var le=0,pe=o?t[le].apply(this,re):oe;++le<o;)pe=t[le].call(this,pe);return pe}})}function gr(e,t,o,c,v,R,B,U,G,re){var oe=t&A,le=t&w,pe=t&z,Se=t&(d|m),xe=t&H,Le=pe?n:Di(e);function _e(){for(var Ve=arguments.length,$e=Q(Ve),qt=Ve;qt--;)$e[qt]=arguments[qt];if(Se)var Bt=hi(_e),$t=V0($e,Bt);if(c&&($e=Bd($e,c,v,Se)),R&&($e=zd($e,R,B,Se)),Ve-=$t,Se&&Ve<re){var Pt=zn($e,Bt);return Gd(e,t,gr,_e.placeholder,o,$e,Pt,U,G,re-Ve)}var hn=le?o:this,Mn=pe?hn[e]:e;return Ve=$e.length,U?$e=Yu($e,U):xe&&Ve>1&&$e.reverse(),oe&&G<Ve&&($e.length=G),this&&this!==_t&&this instanceof _e&&(Mn=Le||Di(Mn)),Mn.apply(hn,$e)}return _e}function Vd(e,t){return function(o,c){return ou(o,e,t(c),{})}}function vr(e,t){return function(o,c){var v;if(o===n&&c===n)return t;if(o!==n&&(v=o),c!==n){if(v===n)return c;typeof o=="string"||typeof c=="string"?(o=Jt(o),c=Jt(c)):(o=_d(o),c=_d(c)),v=e(o,c)}return v}}function Po(e){return Rn(function(t){return t=gt(t,Zt(Ee())),He(function(o){var c=this;return e(t,function(v){return Gt(v,c,o)})})})}function yr(e,t){t=t===n?" ":Jt(t);var o=t.length;if(o<2)return o?go(t,e):t;var c=go(t,rr(e/di(t)));return ai(t)?Hn(mn(c),0,e).join(""):c.slice(0,e)}function Du(e,t,o,c){var v=t&w,R=Di(e);function B(){for(var U=-1,G=arguments.length,re=-1,oe=c.length,le=Q(oe+G),pe=this&&this!==_t&&this instanceof B?R:e;++re<oe;)le[re]=c[re];for(;G--;)le[re++]=arguments[++U];return Gt(pe,v?o:this,le)}return B}function Wd(e){return function(t,o,c){return c&&typeof c!="number"&&Ft(t,o,c)&&(o=c=n),t=Dn(t),o===n?(o=t,t=0):o=Dn(o),c=c===n?t<o?1:-1:Dn(c),vu(t,o,c,e)}}function Tr(e){return function(t,o){return typeof t=="string"&&typeof o=="string"||(t=dn(t),o=dn(o)),e(t,o)}}function Gd(e,t,o,c,v,R,B,U,G,re){var oe=t&d,le=oe?B:n,pe=oe?n:B,Se=oe?R:n,xe=oe?n:R;t|=oe?g:k,t&=~(oe?k:g),t&S||(t&=~(w|z));var Le=[e,t,v,Se,le,xe,pe,U,G,re],_e=o.apply(n,Le);return Ao(e)&&il(_e,Le),_e.placeholder=c,rl(_e,e,t)}function wo(e){var t=wt[e];return function(o,c){if(o=dn(o),c=c==null?0:At(ze(c),292),c&&rd(o)){var v=(it(o)+"e").split("e"),R=t(v[0]+"e"+(+v[1]+c));return v=(it(R)+"e").split("e"),+(v[0]+"e"+(+v[1]-c))}return t(o)}}var Mu=ci&&1/Ki(new ci([,-0]))[1]==Ce?function(e){return new ci(e)}:Zo;function Zd(e){return function(t){var o=Dt(t);return o==Ge?Qr(t):o==De?$0(t):H0(t,e(t))}}function _n(e,t,o,c,v,R,B,U){var G=t&z;if(!G&&typeof e!="function")throw new tn(l);var re=c?c.length:0;if(re||(t&=~(g|k),c=v=n),B=B===n?B:Et(ze(B),0),U=U===n?U:ze(U),re-=v?v.length:0,t&k){var oe=c,le=v;c=v=n}var pe=G?n:xo(e),Se=[e,t,o,c,v,oe,le,R,B,U];if(pe&&Ku(Se,pe),e=Se[0],t=Se[1],o=Se[2],c=Se[3],v=Se[4],U=Se[9]=Se[9]===n?G?0:e.length:Et(Se[9]-re,0),!U&&t&(d|m)&&(t&=~(d|m)),!t||t==w)var xe=ku(e,t,o);else t==d||t==m?xe=Au(e,t,U):(t==g||t==(w|g))&&!v.length?xe=Du(e,t,o,c):xe=gr.apply(n,Se);var Le=pe?Id:il;return rl(Le(xe,Se),e,t)}function Jd(e,t,o,c){return e===n||fn(e,si[o])&&!ot.call(c,o)?t:e}function Kd(e,t,o,c,v,R){return vt(e)&&vt(t)&&(R.set(t,e),mr(e,t,n,Kd,R),R.delete(t)),e}function Nu(e){return Fi(e)?n:e}function qd(e,t,o,c,v,R){var B=o&_,U=e.length,G=t.length;if(U!=G&&!(B&&G>U))return!1;var re=R.get(e),oe=R.get(t);if(re&&oe)return re==t&&oe==e;var le=-1,pe=!0,Se=o&E?new $n:n;for(R.set(e,t),R.set(t,e);++le<U;){var xe=e[le],Le=t[le];if(c)var _e=B?c(Le,xe,le,t,e,R):c(xe,Le,le,e,t,R);if(_e!==n){if(_e)continue;pe=!1;break}if(Se){if(!Jr(t,function(Ve,$e){if(!Ci(Se,$e)&&(xe===Ve||v(xe,Ve,o,c,R)))return Se.push($e)})){pe=!1;break}}else if(!(xe===Le||v(xe,Le,o,c,R))){pe=!1;break}}return R.delete(e),R.delete(t),pe}function Fu(e,t,o,c,v,R,B){switch(o){case V:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case I:return!(e.byteLength!=t.byteLength||!R(new er(e),new er(t)));case ke:case We:case Ct:return fn(+e,+t);case Yt:return e.name==t.name&&e.message==t.message;case ye:case Xe:return e==t+"";case Ge:var U=Qr;case De:var G=c&_;if(U||(U=Ki),e.size!=t.size&&!G)return!1;var re=B.get(e);if(re)return re==t;c|=E,B.set(e,t);var oe=qd(U(e),U(t),c,v,R,B);return B.delete(e),oe;case P:if(Ii)return Ii.call(e)==Ii.call(t)}return!1}function Bu(e,t,o,c,v,R){var B=o&_,U=Eo(e),G=U.length,re=Eo(t),oe=re.length;if(G!=oe&&!B)return!1;for(var le=G;le--;){var pe=U[le];if(!(B?pe in t:ot.call(t,pe)))return!1}var Se=R.get(e),xe=R.get(t);if(Se&&xe)return Se==t&&xe==e;var Le=!0;R.set(e,t),R.set(t,e);for(var _e=B;++le<G;){pe=U[le];var Ve=e[pe],$e=t[pe];if(c)var qt=B?c($e,Ve,pe,t,e,R):c(Ve,$e,pe,e,t,R);if(!(qt===n?Ve===$e||v(Ve,$e,o,c,R):qt)){Le=!1;break}_e||(_e=pe=="constructor")}if(Le&&!_e){var Bt=e.constructor,$t=t.constructor;Bt!=$t&&"constructor"in e&&"constructor"in t&&!(typeof Bt=="function"&&Bt instanceof Bt&&typeof $t=="function"&&$t instanceof $t)&&(Le=!1)}return R.delete(e),R.delete(t),Le}function Rn(e){return Mo(tl(e,n,cl),e+"")}function Eo(e){return hd(e,xt,Ro)}function Io(e){return hd(e,Lt,$d)}var xo=ar?function(e){return ar.get(e)}:Zo;function Sr(e){for(var t=e.name+"",o=ui[t],c=ot.call(ui,t)?o.length:0;c--;){var v=o[c],R=v.func;if(R==null||R==e)return v.name}return t}function hi(e){var t=ot.call(x,"placeholder")?x:e;return t.placeholder}function Ee(){var e=x.iteratee||Wo;return e=e===Wo?yd:e,arguments.length?e(arguments[0],arguments[1]):e}function Cr(e,t){var o=e.__data__;return Wu(t)?o[typeof t=="string"?"string":"hash"]:o.map}function _o(e){for(var t=xt(e),o=t.length;o--;){var c=t[o],v=e[c];t[o]=[c,v,Qd(v)]}return t}function Qn(e,t){var o=J0(e,t);return vd(o)?o:n}function zu(e){var t=ot.call(e,Kn),o=e[Kn];try{e[Kn]=n;var c=!0}catch(R){}var v=Xi.call(e);return c&&(t?e[Kn]=o:delete e[Kn]),v}var Ro=to?function(e){return e==null?[]:(e=at(e),Fn(to(e),function(t){return nd.call(e,t)}))}:Jo,$d=to?function(e){for(var t=[];e;)Bn(t,Ro(e)),e=tr(e);return t}:Jo,Dt=Nt;(no&&Dt(new no(new ArrayBuffer(1)))!=V||Pi&&Dt(new Pi)!=Ge||io&&Dt(io.resolve())!=rt||ci&&Dt(new ci)!=De||wi&&Dt(new wi)!=F)&&(Dt=function(e){var t=Nt(e),o=t==Oe?e.constructor:n,c=o?ei(o):"";if(c)switch(c){case Tc:return V;case Sc:return Ge;case Cc:return rt;case bc:return De;case Pc:return F}return t});function ju(e,t,o){for(var c=-1,v=o.length;++c<v;){var R=o[c],B=R.size;switch(R.type){case"drop":e+=B;break;case"dropRight":t-=B;break;case"take":t=At(t,e+B);break;case"takeRight":e=Et(e,t-B);break}}return{start:e,end:t}}function Lu(e){var t=e.match(Oi);return t?t[1].split(Ui):[]}function Yd(e,t,o){t=Un(t,e);for(var c=-1,v=t.length,R=!1;++c<v;){var B=bn(t[c]);if(!(R=e!=null&&o(e,B)))break;e=e[B]}return R||++c!=v?R:(v=e==null?0:e.length,!!v&&_r(v)&&kn(B,v)&&(Fe(e)||ti(e)))}function Ou(e){var t=e.length,o=new e.constructor(t);return t&&typeof e[0]=="string"&&ot.call(e,"index")&&(o.index=e.index,o.input=e.input),o}function Xd(e){return typeof e.constructor=="function"&&!Mi(e)?mi(tr(e)):{}}function Uu(e,t,o){var c=e.constructor;switch(t){case I:return bo(e);case ke:case We:return new c(+e);case V:return wu(e,o);case L:case J:case q:case de:case ee:case se:case Qe:case mt:case Ie:return Nd(e,o);case Ge:return new c;case Ct:case Xe:return new c(e);case ye:return Eu(e);case De:return new c;case P:return Iu(e)}}function Hu(e,t){var o=t.length;if(!o)return e;var c=o-1;return t[c]=(o>1?"& ":"")+t[c],t=t.join(o>2?", ":" "),e.replace(ni,`{
|
|
|
/* [wrapped with `+t+`] */
|
|
|
`)}function Vu(e){return Fe(e)||ti(e)||!!(id&&e&&e[id])}function kn(e,t){var o=typeof e;return t=t==null?be:t,!!t&&(o=="number"||o!="symbol"&&t0.test(e))&&e>-1&&e%1==0&&e<t}function Ft(e,t,o){if(!vt(o))return!1;var c=typeof t;return(c=="number"?jt(o)&&kn(t,o.length):c=="string"&&t in o)?fn(o[t],e):!1}function ko(e,t){if(Fe(e))return!1;var o=typeof e;return o=="number"||o=="symbol"||o=="boolean"||e==null||Kt(e)?!0:Li.test(e)||!ji.test(e)||t!=null&&e in at(t)}function Wu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ao(e){var t=Sr(e),o=x[t];if(typeof o!="function"||!(t in Ze.prototype))return!1;if(e===o)return!0;var c=xo(o);return!!c&&e===c[0]}function Gu(e){return!!Qa&&Qa in e}var Zu=$i?An:Ko;function Mi(e){var t=e&&e.constructor,o=typeof t=="function"&&t.prototype||si;return e===o}function Qd(e){return e===e&&!vt(e)}function el(e,t){return function(o){return o==null?!1:o[e]===t&&(t!==n||e in at(o))}}function Ju(e){var t=Ir(e,function(c){return o.size===T&&o.clear(),c}),o=t.cache;return t}function Ku(e,t){var o=e[1],c=t[1],v=o|c,R=v<(w|z|A),B=c==A&&o==d||c==A&&o==O&&e[7].length<=t[8]||c==(A|O)&&t[7].length<=t[8]&&o==d;if(!(R||B))return e;c&w&&(e[2]=t[2],v|=o&w?0:S);var U=t[3];if(U){var G=e[3];e[3]=G?Bd(G,U,t[4]):U,e[4]=G?zn(e[3],C):t[4]}return U=t[5],U&&(G=e[5],e[5]=G?zd(G,U,t[6]):U,e[6]=G?zn(e[5],C):t[6]),U=t[7],U&&(e[7]=U),c&A&&(e[8]=e[8]==null?t[8]:At(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=v,e}function qu(e){var t=[];if(e!=null)for(var o in at(e))t.push(o);return t}function $u(e){return Xi.call(e)}function tl(e,t,o){return t=Et(t===n?e.length-1:t,0),function(){for(var c=arguments,v=-1,R=Et(c.length-t,0),B=Q(R);++v<R;)B[v]=c[t+v];v=-1;for(var U=Q(t+1);++v<t;)U[v]=c[v];return U[t]=o(B),Gt(e,this,U)}}function nl(e,t){return t.length<2?e:Xn(e,on(t,0,-1))}function Yu(e,t){for(var o=e.length,c=At(t.length,o),v=zt(e);c--;){var R=t[c];e[c]=kn(R,o)?v[R]:n}return e}function Do(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var il=ol(Id),Ni=mc||function(e,t){return _t.setTimeout(e,t)},Mo=ol(Su);function rl(e,t,o){var c=t+"";return Mo(e,Hu(c,Xu(Lu(c),o)))}function ol(e){var t=0,o=0;return function(){var c=gc(),v=Y-(c-o);if(o=c,v>0){if(++t>=ne)return arguments[0]}else t=0;return e.apply(n,arguments)}}function br(e,t){var o=-1,c=e.length,v=c-1;for(t=t===n?c:t;++o<t;){var R=ho(o,v),B=e[R];e[R]=e[o],e[o]=B}return e.length=t,e}var al=Ju(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(yt,function(o,c,v,R){t.push(v?R.replace(un,"$1"):c||o)}),t});function bn(e){if(typeof e=="string"||Kt(e))return e;var t=e+"";return t=="0"&&1/e==-Ce?"-0":t}function ei(e){if(e!=null){try{return Yi.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Xu(e,t){return en(ce,function(o){var c="_."+o[0];t&o[1]&&!Zi(e,c)&&e.push(c)}),e.sort()}function dl(e){if(e instanceof Ze)return e.clone();var t=new nn(e.__wrapped__,e.__chain__);return t.__actions__=zt(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function Qu(e,t,o){(o?Ft(e,t,o):t===n)?t=1:t=Et(ze(t),0);var c=e==null?0:e.length;if(!c||t<1)return[];for(var v=0,R=0,B=Q(rr(c/t));v<c;)B[R++]=on(e,v,v+=t);return B}function em(e){for(var t=-1,o=e==null?0:e.length,c=0,v=[];++t<o;){var R=e[t];R&&(v[c++]=R)}return v}function tm(){var e=arguments.length;if(!e)return[];for(var t=Q(e-1),o=arguments[0],c=e;c--;)t[c-1]=arguments[c];return Bn(Fe(o)?zt(o):[o],Rt(t,1))}var nm=He(function(e,t){return bt(e)?_i(e,Rt(t,1,bt,!0)):[]}),im=He(function(e,t){var o=an(t);return bt(o)&&(o=n),bt(e)?_i(e,Rt(t,1,bt,!0),Ee(o,2)):[]}),rm=He(function(e,t){var o=an(t);return bt(o)&&(o=n),bt(e)?_i(e,Rt(t,1,bt,!0),n,o):[]});function om(e,t,o){var c=e==null?0:e.length;return c?(t=o||t===n?1:ze(t),on(e,t<0?0:t,c)):[]}function am(e,t,o){var c=e==null?0:e.length;return c?(t=o||t===n?1:ze(t),t=c-t,on(e,0,t<0?0:t)):[]}function dm(e,t){return e&&e.length?fr(e,Ee(t,3),!0,!0):[]}function lm(e,t){return e&&e.length?fr(e,Ee(t,3),!0):[]}function sm(e,t,o,c){var v=e==null?0:e.length;return v?(o&&typeof o!="number"&&Ft(e,t,o)&&(o=0,c=v),tu(e,t,o,c)):[]}function ll(e,t,o){var c=e==null?0:e.length;if(!c)return-1;var v=o==null?0:ze(o);return v<0&&(v=Et(c+v,0)),Ji(e,Ee(t,3),v)}function sl(e,t,o){var c=e==null?0:e.length;if(!c)return-1;var v=c-1;return o!==n&&(v=ze(o),v=o<0?Et(c+v,0):At(v,c-1)),Ji(e,Ee(t,3),v,!0)}function cl(e){var t=e==null?0:e.length;return t?Rt(e,1):[]}function cm(e){var t=e==null?0:e.length;return t?Rt(e,Ce):[]}function um(e,t){var o=e==null?0:e.length;return o?(t=t===n?1:ze(t),Rt(e,t)):[]}function mm(e){for(var t=-1,o=e==null?0:e.length,c={};++t<o;){var v=e[t];c[v[0]]=v[1]}return c}function ul(e){return e&&e.length?e[0]:n}function pm(e,t,o){var c=e==null?0:e.length;if(!c)return-1;var v=o==null?0:ze(o);return v<0&&(v=Et(c+v,0)),oi(e,t,v)}function fm(e){var t=e==null?0:e.length;return t?on(e,0,-1):[]}var hm=He(function(e){var t=gt(e,So);return t.length&&t[0]===e[0]?co(t):[]}),gm=He(function(e){var t=an(e),o=gt(e,So);return t===an(o)?t=n:o.pop(),o.length&&o[0]===e[0]?co(o,Ee(t,2)):[]}),vm=He(function(e){var t=an(e),o=gt(e,So);return t=typeof t=="function"?t:n,t&&o.pop(),o.length&&o[0]===e[0]?co(o,n,t):[]});function ym(e,t){return e==null?"":fc.call(e,t)}function an(e){var t=e==null?0:e.length;return t?e[t-1]:n}function Tm(e,t,o){var c=e==null?0:e.length;if(!c)return-1;var v=c;return o!==n&&(v=ze(o),v=v<0?Et(c+v,0):At(v,c-1)),t===t?X0(e,t,v):Ji(e,Ga,v,!0)}function Sm(e,t){return e&&e.length?bd(e,ze(t)):n}var Cm=He(ml);function ml(e,t){return e&&e.length&&t&&t.length?fo(e,t):e}function bm(e,t,o){return e&&e.length&&t&&t.length?fo(e,t,Ee(o,2)):e}function Pm(e,t,o){return e&&e.length&&t&&t.length?fo(e,t,n,o):e}var wm=Rn(function(e,t){var o=e==null?0:e.length,c=oo(e,t);return Ed(e,gt(t,function(v){return kn(v,o)?+v:v}).sort(Fd)),c});function Em(e,t){var o=[];if(!(e&&e.length))return o;var c=-1,v=[],R=e.length;for(t=Ee(t,3);++c<R;){var B=e[c];t(B,c,e)&&(o.push(B),v.push(c))}return Ed(e,v),o}function No(e){return e==null?e:yc.call(e)}function Im(e,t,o){var c=e==null?0:e.length;return c?(o&&typeof o!="number"&&Ft(e,t,o)?(t=0,o=c):(t=t==null?0:ze(t),o=o===n?c:ze(o)),on(e,t,o)):[]}function xm(e,t){return pr(e,t)}function _m(e,t,o){return vo(e,t,Ee(o,2))}function Rm(e,t){var o=e==null?0:e.length;if(o){var c=pr(e,t);if(c<o&&fn(e[c],t))return c}return-1}function km(e,t){return pr(e,t,!0)}function Am(e,t,o){return vo(e,t,Ee(o,2),!0)}function Dm(e,t){var o=e==null?0:e.length;if(o){var c=pr(e,t,!0)-1;if(fn(e[c],t))return c}return-1}function Mm(e){return e&&e.length?xd(e):[]}function Nm(e,t){return e&&e.length?xd(e,Ee(t,2)):[]}function Fm(e){var t=e==null?0:e.length;return t?on(e,1,t):[]}function Bm(e,t,o){return e&&e.length?(t=o||t===n?1:ze(t),on(e,0,t<0?0:t)):[]}function zm(e,t,o){var c=e==null?0:e.length;return c?(t=o||t===n?1:ze(t),t=c-t,on(e,t<0?0:t,c)):[]}function jm(e,t){return e&&e.length?fr(e,Ee(t,3),!1,!0):[]}function Lm(e,t){return e&&e.length?fr(e,Ee(t,3)):[]}var Om=He(function(e){return On(Rt(e,1,bt,!0))}),Um=He(function(e){var t=an(e);return bt(t)&&(t=n),On(Rt(e,1,bt,!0),Ee(t,2))}),Hm=He(function(e){var t=an(e);return t=typeof t=="function"?t:n,On(Rt(e,1,bt,!0),n,t)});function Vm(e){return e&&e.length?On(e):[]}function Wm(e,t){return e&&e.length?On(e,Ee(t,2)):[]}function Gm(e,t){return t=typeof t=="function"?t:n,e&&e.length?On(e,n,t):[]}function Fo(e){if(!(e&&e.length))return[];var t=0;return e=Fn(e,function(o){if(bt(o))return t=Et(o.length,t),!0}),Yr(t,function(o){return gt(e,Kr(o))})}function pl(e,t){if(!(e&&e.length))return[];var o=Fo(e);return t==null?o:gt(o,function(c){return Gt(t,n,c)})}var Zm=He(function(e,t){return bt(e)?_i(e,t):[]}),Jm=He(function(e){return To(Fn(e,bt))}),Km=He(function(e){var t=an(e);return bt(t)&&(t=n),To(Fn(e,bt),Ee(t,2))}),qm=He(function(e){var t=an(e);return t=typeof t=="function"?t:n,To(Fn(e,bt),n,t)}),$m=He(Fo);function Ym(e,t){return Ad(e||[],t||[],xi)}function Xm(e,t){return Ad(e||[],t||[],Ai)}var Qm=He(function(e){var t=e.length,o=t>1?e[t-1]:n;return o=typeof o=="function"?(e.pop(),o):n,pl(e,o)});function fl(e){var t=x(e);return t.__chain__=!0,t}function ep(e,t){return t(e),e}function Pr(e,t){return t(e)}var tp=Rn(function(e){var t=e.length,o=t?e[0]:0,c=this.__wrapped__,v=function(R){return oo(R,e)};return t>1||this.__actions__.length||!(c instanceof Ze)||!kn(o)?this.thru(v):(c=c.slice(o,+o+(t?1:0)),c.__actions__.push({func:Pr,args:[v],thisArg:n}),new nn(c,this.__chain__).thru(function(R){return t&&!R.length&&R.push(n),R}))});function np(){return fl(this)}function ip(){return new nn(this.value(),this.__chain__)}function rp(){this.__values__===n&&(this.__values__=_l(this.value()));var e=this.__index__>=this.__values__.length,t=e?n:this.__values__[this.__index__++];return{done:e,value:t}}function op(){return this}function ap(e){for(var t,o=this;o instanceof lr;){var c=dl(o);c.__index__=0,c.__values__=n,t?v.__wrapped__=c:t=c;var v=c;o=o.__wrapped__}return v.__wrapped__=e,t}function dp(){var e=this.__wrapped__;if(e instanceof Ze){var t=e;return this.__actions__.length&&(t=new Ze(this)),t=t.reverse(),t.__actions__.push({func:Pr,args:[No],thisArg:n}),new nn(t,this.__chain__)}return this.thru(No)}function lp(){return kd(this.__wrapped__,this.__actions__)}var sp=hr(function(e,t,o){ot.call(e,o)?++e[o]:xn(e,o,1)});function cp(e,t,o){var c=Fe(e)?Va:eu;return o&&Ft(e,t,o)&&(t=n),c(e,Ee(t,3))}function up(e,t){var o=Fe(e)?Fn:pd;return o(e,Ee(t,3))}var mp=Ud(ll),pp=Ud(sl);function fp(e,t){return Rt(wr(e,t),1)}function hp(e,t){return Rt(wr(e,t),Ce)}function gp(e,t,o){return o=o===n?1:ze(o),Rt(wr(e,t),o)}function hl(e,t){var o=Fe(e)?en:Ln;return o(e,Ee(t,3))}function gl(e,t){var o=Fe(e)?F0:md;return o(e,Ee(t,3))}var vp=hr(function(e,t,o){ot.call(e,o)?e[o].push(t):xn(e,o,[t])});function yp(e,t,o,c){e=jt(e)?e:vi(e),o=o&&!c?ze(o):0;var v=e.length;return o<0&&(o=Et(v+o,0)),Rr(e)?o<=v&&e.indexOf(t,o)>-1:!!v&&oi(e,t,o)>-1}var Tp=He(function(e,t,o){var c=-1,v=typeof t=="function",R=jt(e)?Q(e.length):[];return Ln(e,function(B){R[++c]=v?Gt(t,B,o):Ri(B,t,o)}),R}),Sp=hr(function(e,t,o){xn(e,o,t)});function wr(e,t){var o=Fe(e)?gt:Td;return o(e,Ee(t,3))}function Cp(e,t,o,c){return e==null?[]:(Fe(t)||(t=t==null?[]:[t]),o=c?n:o,Fe(o)||(o=o==null?[]:[o]),Pd(e,t,o))}var bp=hr(function(e,t,o){e[o?0:1].push(t)},function(){return[[],[]]});function Pp(e,t,o){var c=Fe(e)?Zr:Ja,v=arguments.length<3;return c(e,Ee(t,4),o,v,Ln)}function wp(e,t,o){var c=Fe(e)?B0:Ja,v=arguments.length<3;return c(e,Ee(t,4),o,v,md)}function Ep(e,t){var o=Fe(e)?Fn:pd;return o(e,xr(Ee(t,3)))}function Ip(e){var t=Fe(e)?ld:yu;return t(e)}function xp(e,t,o){(o?Ft(e,t,o):t===n)?t=1:t=ze(t);var c=Fe(e)?qc:Tu;return c(e,t)}function _p(e){var t=Fe(e)?$c:Cu;return t(e)}function Rp(e){if(e==null)return 0;if(jt(e))return Rr(e)?di(e):e.length;var t=Dt(e);return t==Ge||t==De?e.size:mo(e).length}function kp(e,t,o){var c=Fe(e)?Jr:bu;return o&&Ft(e,t,o)&&(t=n),c(e,Ee(t,3))}var Ap=He(function(e,t){if(e==null)return[];var o=t.length;return o>1&&Ft(e,t[0],t[1])?t=[]:o>2&&Ft(t[0],t[1],t[2])&&(t=[t[0]]),Pd(e,Rt(t,1),[])}),Er=uc||function(){return _t.Date.now()};function Dp(e,t){if(typeof t!="function")throw new tn(l);return e=ze(e),function(){if(--e<1)return t.apply(this,arguments)}}function vl(e,t,o){return t=o?n:t,t=e&&t==null?e.length:t,_n(e,A,n,n,n,n,t)}function yl(e,t){var o;if(typeof t!="function")throw new tn(l);return e=ze(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=n),o}}var Bo=He(function(e,t,o){var c=w;if(o.length){var v=zn(o,hi(Bo));c|=g}return _n(e,c,t,o,v)}),Tl=He(function(e,t,o){var c=w|z;if(o.length){var v=zn(o,hi(Tl));c|=g}return _n(t,c,e,o,v)});function Sl(e,t,o){t=o?n:t;var c=_n(e,d,n,n,n,n,n,t);return c.placeholder=Sl.placeholder,c}function Cl(e,t,o){t=o?n:t;var c=_n(e,m,n,n,n,n,n,t);return c.placeholder=Cl.placeholder,c}function bl(e,t,o){var c,v,R,B,U,G,re=0,oe=!1,le=!1,pe=!0;if(typeof e!="function")throw new tn(l);t=dn(t)||0,vt(o)&&(oe=!!o.leading,le="maxWait"in o,R=le?Et(dn(o.maxWait)||0,t):R,pe="trailing"in o?!!o.trailing:pe);function Se(Pt){var hn=c,Mn=v;return c=v=n,re=Pt,B=e.apply(Mn,hn),B}function xe(Pt){return re=Pt,U=Ni(Ve,t),oe?Se(Pt):B}function Le(Pt){var hn=Pt-G,Mn=Pt-re,Ul=t-hn;return le?At(Ul,R-Mn):Ul}function _e(Pt){var hn=Pt-G,Mn=Pt-re;return G===n||hn>=t||hn<0||le&&Mn>=R}function Ve(){var Pt=Er();if(_e(Pt))return $e(Pt);U=Ni(Ve,Le(Pt))}function $e(Pt){return U=n,pe&&c?Se(Pt):(c=v=n,B)}function qt(){U!==n&&Dd(U),re=0,c=G=v=U=n}function Bt(){return U===n?B:$e(Er())}function $t(){var Pt=Er(),hn=_e(Pt);if(c=arguments,v=this,G=Pt,hn){if(U===n)return xe(G);if(le)return Dd(U),U=Ni(Ve,t),Se(G)}return U===n&&(U=Ni(Ve,t)),B}return $t.cancel=qt,$t.flush=Bt,$t}var Mp=He(function(e,t){return ud(e,1,t)}),Np=He(function(e,t,o){return ud(e,dn(t)||0,o)});function Fp(e){return _n(e,H)}function Ir(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new tn(l);var o=function(){var c=arguments,v=t?t.apply(this,c):c[0],R=o.cache;if(R.has(v))return R.get(v);var B=e.apply(this,c);return o.cache=R.set(v,B)||R,B};return o.cache=new(Ir.Cache||In),o}Ir.Cache=In;function xr(e){if(typeof e!="function")throw new tn(l);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Bp(e){return yl(2,e)}var zp=Pu(function(e,t){t=t.length==1&&Fe(t[0])?gt(t[0],Zt(Ee())):gt(Rt(t,1),Zt(Ee()));var o=t.length;return He(function(c){for(var v=-1,R=At(c.length,o);++v<R;)c[v]=t[v].call(this,c[v]);return Gt(e,this,c)})}),zo=He(function(e,t){var o=zn(t,hi(zo));return _n(e,g,n,t,o)}),Pl=He(function(e,t){var o=zn(t,hi(Pl));return _n(e,k,n,t,o)}),jp=Rn(function(e,t){return _n(e,O,n,n,n,t)});function Lp(e,t){if(typeof e!="function")throw new tn(l);return t=t===n?t:ze(t),He(e,t)}function Op(e,t){if(typeof e!="function")throw new tn(l);return t=t==null?0:Et(ze(t),0),He(function(o){var c=o[t],v=Hn(o,0,t);return c&&Bn(v,c),Gt(e,this,v)})}function Up(e,t,o){var c=!0,v=!0;if(typeof e!="function")throw new tn(l);return vt(o)&&(c="leading"in o?!!o.leading:c,v="trailing"in o?!!o.trailing:v),bl(e,t,{leading:c,maxWait:t,trailing:v})}function Hp(e){return vl(e,1)}function Vp(e,t){return zo(Co(t),e)}function Wp(){if(!arguments.length)return[];var e=arguments[0];return Fe(e)?e:[e]}function Gp(e){return rn(e,D)}function Zp(e,t){return t=typeof t=="function"?t:n,rn(e,D,t)}function Jp(e){return rn(e,y|D)}function Kp(e,t){return t=typeof t=="function"?t:n,rn(e,y|D,t)}function qp(e,t){return t==null||cd(e,t,xt(t))}function fn(e,t){return e===t||e!==e&&t!==t}var $p=Tr(so),Yp=Tr(function(e,t){return e>=t}),ti=gd(function(){return arguments}())?gd:function(e){return Tt(e)&&ot.call(e,"callee")&&!nd.call(e,"callee")},Fe=Q.isArray,Xp=za?Zt(za):au;function jt(e){return e!=null&&_r(e.length)&&!An(e)}function bt(e){return Tt(e)&&jt(e)}function Qp(e){return e===!0||e===!1||Tt(e)&&Nt(e)==ke}var Vn=pc||Ko,ef=ja?Zt(ja):du;function tf(e){return Tt(e)&&e.nodeType===1&&!Fi(e)}function nf(e){if(e==null)return!0;if(jt(e)&&(Fe(e)||typeof e=="string"||typeof e.splice=="function"||Vn(e)||gi(e)||ti(e)))return!e.length;var t=Dt(e);if(t==Ge||t==De)return!e.size;if(Mi(e))return!mo(e).length;for(var o in e)if(ot.call(e,o))return!1;return!0}function rf(e,t){return ki(e,t)}function of(e,t,o){o=typeof o=="function"?o:n;var c=o?o(e,t):n;return c===n?ki(e,t,n,o):!!c}function jo(e){if(!Tt(e))return!1;var t=Nt(e);return t==Yt||t==yn||typeof e.message=="string"&&typeof e.name=="string"&&!Fi(e)}function af(e){return typeof e=="number"&&rd(e)}function An(e){if(!vt(e))return!1;var t=Nt(e);return t==It||t==Ht||t==we||t==Ae}function wl(e){return typeof e=="number"&&e==ze(e)}function _r(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=be}function vt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Tt(e){return e!=null&&typeof e=="object"}var El=La?Zt(La):su;function df(e,t){return e===t||uo(e,t,_o(t))}function lf(e,t,o){return o=typeof o=="function"?o:n,uo(e,t,_o(t),o)}function sf(e){return Il(e)&&e!=+e}function cf(e){if(Zu(e))throw new Ne(a);return vd(e)}function uf(e){return e===null}function mf(e){return e==null}function Il(e){return typeof e=="number"||Tt(e)&&Nt(e)==Ct}function Fi(e){if(!Tt(e)||Nt(e)!=Oe)return!1;var t=tr(e);if(t===null)return!0;var o=ot.call(t,"constructor")&&t.constructor;return typeof o=="function"&&o instanceof o&&Yi.call(o)==dc}var Lo=Oa?Zt(Oa):cu;function pf(e){return wl(e)&&e>=-be&&e<=be}var xl=Ua?Zt(Ua):uu;function Rr(e){return typeof e=="string"||!Fe(e)&&Tt(e)&&Nt(e)==Xe}function Kt(e){return typeof e=="symbol"||Tt(e)&&Nt(e)==P}var gi=Ha?Zt(Ha):mu;function ff(e){return e===n}function hf(e){return Tt(e)&&Dt(e)==F}function gf(e){return Tt(e)&&Nt(e)==j}var vf=Tr(po),yf=Tr(function(e,t){return e<=t});function _l(e){if(!e)return[];if(jt(e))return Rr(e)?mn(e):zt(e);if(bi&&e[bi])return q0(e[bi]());var t=Dt(e),o=t==Ge?Qr:t==De?Ki:vi;return o(e)}function Dn(e){if(!e)return e===0?e:0;if(e=dn(e),e===Ce||e===-Ce){var t=e<0?-1:1;return t*Pe}return e===e?e:0}function ze(e){var t=Dn(e),o=t%1;return t===t?o?t-o:t:0}function Rl(e){return e?Yn(ze(e),0,N):0}function dn(e){if(typeof e=="number")return e;if(Kt(e))return Ye;if(vt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=vt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ka(e);var o=Xs.test(e);return o||e0.test(e)?D0(e.slice(2),o?2:8):Ys.test(e)?Ye:+e}function kl(e){return Cn(e,Lt(e))}function Tf(e){return e?Yn(ze(e),-be,be):e===0?e:0}function it(e){return e==null?"":Jt(e)}var Sf=pi(function(e,t){if(Mi(t)||jt(t)){Cn(t,xt(t),e);return}for(var o in t)ot.call(t,o)&&xi(e,o,t[o])}),Al=pi(function(e,t){Cn(t,Lt(t),e)}),kr=pi(function(e,t,o,c){Cn(t,Lt(t),e,c)}),Cf=pi(function(e,t,o,c){Cn(t,xt(t),e,c)}),bf=Rn(oo);function Pf(e,t){var o=mi(e);return t==null?o:sd(o,t)}var wf=He(function(e,t){e=at(e);var o=-1,c=t.length,v=c>2?t[2]:n;for(v&&Ft(t[0],t[1],v)&&(c=1);++o<c;)for(var R=t[o],B=Lt(R),U=-1,G=B.length;++U<G;){var re=B[U],oe=e[re];(oe===n||fn(oe,si[re])&&!ot.call(e,re))&&(e[re]=R[re])}return e}),Ef=He(function(e){return e.push(n,Kd),Gt(Dl,n,e)});function If(e,t){return Wa(e,Ee(t,3),Sn)}function xf(e,t){return Wa(e,Ee(t,3),lo)}function _f(e,t){return e==null?e:ao(e,Ee(t,3),Lt)}function Rf(e,t){return e==null?e:fd(e,Ee(t,3),Lt)}function kf(e,t){return e&&Sn(e,Ee(t,3))}function Af(e,t){return e&&lo(e,Ee(t,3))}function Df(e){return e==null?[]:ur(e,xt(e))}function Mf(e){return e==null?[]:ur(e,Lt(e))}function Oo(e,t,o){var c=e==null?n:Xn(e,t);return c===n?o:c}function Nf(e,t){return e!=null&&Yd(e,t,nu)}function Uo(e,t){return e!=null&&Yd(e,t,iu)}var Ff=Vd(function(e,t,o){t!=null&&typeof t.toString!="function"&&(t=Xi.call(t)),e[t]=o},Vo(Ot)),Bf=Vd(function(e,t,o){t!=null&&typeof t.toString!="function"&&(t=Xi.call(t)),ot.call(e,t)?e[t].push(o):e[t]=[o]},Ee),zf=He(Ri);function xt(e){return jt(e)?dd(e):mo(e)}function Lt(e){return jt(e)?dd(e,!0):pu(e)}function jf(e,t){var o={};return t=Ee(t,3),Sn(e,function(c,v,R){xn(o,t(c,v,R),c)}),o}function Lf(e,t){var o={};return t=Ee(t,3),Sn(e,function(c,v,R){xn(o,v,t(c,v,R))}),o}var Of=pi(function(e,t,o){mr(e,t,o)}),Dl=pi(function(e,t,o,c){mr(e,t,o,c)}),Uf=Rn(function(e,t){var o={};if(e==null)return o;var c=!1;t=gt(t,function(R){return R=Un(R,e),c||(c=R.length>1),R}),Cn(e,Io(e),o),c&&(o=rn(o,y|h|D,Nu));for(var v=t.length;v--;)yo(o,t[v]);return o});function Hf(e,t){return Ml(e,xr(Ee(t)))}var Vf=Rn(function(e,t){return e==null?{}:hu(e,t)});function Ml(e,t){if(e==null)return{};var o=gt(Io(e),function(c){return[c]});return t=Ee(t),wd(e,o,function(c,v){return t(c,v[0])})}function Wf(e,t,o){t=Un(t,e);var c=-1,v=t.length;for(v||(v=1,e=n);++c<v;){var R=e==null?n:e[bn(t[c])];R===n&&(c=v,R=o),e=An(R)?R.call(e):R}return e}function Gf(e,t,o){return e==null?e:Ai(e,t,o)}function Zf(e,t,o,c){return c=typeof c=="function"?c:n,e==null?e:Ai(e,t,o,c)}var Nl=Zd(xt),Fl=Zd(Lt);function Jf(e,t,o){var c=Fe(e),v=c||Vn(e)||gi(e);if(t=Ee(t,4),o==null){var R=e&&e.constructor;v?o=c?new R:[]:vt(e)?o=An(R)?mi(tr(e)):{}:o={}}return(v?en:Sn)(e,function(B,U,G){return t(o,B,U,G)}),o}function Kf(e,t){return e==null?!0:yo(e,t)}function qf(e,t,o){return e==null?e:Rd(e,t,Co(o))}function $f(e,t,o,c){return c=typeof c=="function"?c:n,e==null?e:Rd(e,t,Co(o),c)}function vi(e){return e==null?[]:Xr(e,xt(e))}function Yf(e){return e==null?[]:Xr(e,Lt(e))}function Xf(e,t,o){return o===n&&(o=t,t=n),o!==n&&(o=dn(o),o=o===o?o:0),t!==n&&(t=dn(t),t=t===t?t:0),Yn(dn(e),t,o)}function Qf(e,t,o){return t=Dn(t),o===n?(o=t,t=0):o=Dn(o),e=dn(e),ru(e,t,o)}function e1(e,t,o){if(o&&typeof o!="boolean"&&Ft(e,t,o)&&(t=o=n),o===n&&(typeof t=="boolean"?(o=t,t=n):typeof e=="boolean"&&(o=e,e=n)),e===n&&t===n?(e=0,t=1):(e=Dn(e),t===n?(t=e,e=0):t=Dn(t)),e>t){var c=e;e=t,t=c}if(o||e%1||t%1){var v=od();return At(e+v*(t-e+A0("1e-"+((v+"").length-1))),t)}return ho(e,t)}var t1=fi(function(e,t,o){return t=t.toLowerCase(),e+(o?Bl(t):t)});function Bl(e){return Ho(it(e).toLowerCase())}function zl(e){return e=it(e),e&&e.replace(n0,W0).replace(C0,"")}function n1(e,t,o){e=it(e),t=Jt(t);var c=e.length;o=o===n?c:Yn(ze(o),0,c);var v=o;return o-=t.length,o>=0&&e.slice(o,v)==t}function i1(e){return e=it(e),e&&st.test(e)?e.replace(Vt,G0):e}function r1(e){return e=it(e),e&&Wt.test(e)?e.replace(pt,"\\$&"):e}var o1=fi(function(e,t,o){return e+(o?"-":"")+t.toLowerCase()}),a1=fi(function(e,t,o){return e+(o?" ":"")+t.toLowerCase()}),d1=Od("toLowerCase");function l1(e,t,o){e=it(e),t=ze(t);var c=t?di(e):0;if(!t||c>=t)return e;var v=(t-c)/2;return yr(or(v),o)+e+yr(rr(v),o)}function s1(e,t,o){e=it(e),t=ze(t);var c=t?di(e):0;return t&&c<t?e+yr(t-c,o):e}function c1(e,t,o){e=it(e),t=ze(t);var c=t?di(e):0;return t&&c<t?yr(t-c,o)+e:e}function u1(e,t,o){return o||t==null?t=0:t&&(t=+t),vc(it(e).replace(cn,""),t||0)}function m1(e,t,o){return(o?Ft(e,t,o):t===n)?t=1:t=ze(t),go(it(e),t)}function p1(){var e=arguments,t=it(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var f1=fi(function(e,t,o){return e+(o?"_":"")+t.toLowerCase()});function h1(e,t,o){return o&&typeof o!="number"&&Ft(e,t,o)&&(t=o=n),o=o===n?N:o>>>0,o?(e=it(e),e&&(typeof t=="string"||t!=null&&!Lo(t))&&(t=Jt(t),!t&&ai(e))?Hn(mn(e),0,o):e.split(t,o)):[]}var g1=fi(function(e,t,o){return e+(o?" ":"")+Ho(t)});function v1(e,t,o){return e=it(e),o=o==null?0:Yn(ze(o),0,e.length),t=Jt(t),e.slice(o,o+t.length)==t}function y1(e,t,o){var c=x.templateSettings;o&&Ft(e,t,o)&&(t=n),e=it(e),t=kr({},t,c,Jd);var v=kr({},t.imports,c.imports,Jd),R=xt(v),B=Xr(v,R),U,G,re=0,oe=t.interpolate||Vi,le="__p += '",pe=eo((t.escape||Vi).source+"|"+oe.source+"|"+(oe===Si?$s:Vi).source+"|"+(t.evaluate||Vi).source+"|$","g"),Se="//# sourceURL="+(ot.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++I0+"]")+`
|
|
|
`;e.replace(pe,function(_e,Ve,$e,qt,Bt,$t){return $e||($e=qt),le+=e.slice(re,$t).replace(i0,Z0),Ve&&(U=!0,le+=`' +
|
|
|
__e(`+Ve+`) +
|
|
|
'`),Bt&&(G=!0,le+=`';
|
|
|
`+Bt+`;
|
|
|
__p += '`),$e&&(le+=`' +
|
|
|
((__t = (`+$e+`)) == null ? '' : __t) +
|
|
|
'`),re=$t+_e.length,_e}),le+=`';
|
|
|
`;var xe=ot.call(t,"variable")&&t.variable;if(!xe)le=`with (obj) {
|
|
|
`+le+`
|
|
|
}
|
|
|
`;else if(ii.test(xe))throw new Ne(s);le=(G?le.replace(ht,""):le).replace(Be,"$1").replace(tt,"$1;"),le="function("+(xe||"obj")+`) {
|
|
|
`+(xe?"":`obj || (obj = {});
|
|
|
`)+"var __t, __p = ''"+(U?", __e = _.escape":"")+(G?`, __j = Array.prototype.join;
|
|
|
function print() { __p += __j.call(arguments, '') }
|
|
|
`:`;
|
|
|
`)+le+`return __p
|
|
|
}`;var Le=Ll(function(){return nt(R,Se+"return "+le).apply(n,B)});if(Le.source=le,jo(Le))throw Le;return Le}function T1(e){return it(e).toLowerCase()}function S1(e){return it(e).toUpperCase()}function C1(e,t,o){if(e=it(e),e&&(o||t===n))return Ka(e);if(!e||!(t=Jt(t)))return e;var c=mn(e),v=mn(t),R=qa(c,v),B=$a(c,v)+1;return Hn(c,R,B).join("")}function b1(e,t,o){if(e=it(e),e&&(o||t===n))return e.slice(0,Xa(e)+1);if(!e||!(t=Jt(t)))return e;var c=mn(e),v=$a(c,mn(t))+1;return Hn(c,0,v).join("")}function P1(e,t,o){if(e=it(e),e&&(o||t===n))return e.replace(cn,"");if(!e||!(t=Jt(t)))return e;var c=mn(e),v=qa(c,mn(t));return Hn(c,v).join("")}function w1(e,t){var o=Z,c=X;if(vt(t)){var v="separator"in t?t.separator:v;o="length"in t?ze(t.length):o,c="omission"in t?Jt(t.omission):c}e=it(e);var R=e.length;if(ai(e)){var B=mn(e);R=B.length}if(o>=R)return e;var U=o-di(c);if(U<1)return c;var G=B?Hn(B,0,U).join(""):e.slice(0,U);if(v===n)return G+c;if(B&&(U+=G.length-U),Lo(v)){if(e.slice(U).search(v)){var re,oe=G;for(v.global||(v=eo(v.source,it(ga.exec(v))+"g")),v.lastIndex=0;re=v.exec(oe);)var le=re.index;G=G.slice(0,le===n?U:le)}}else if(e.indexOf(Jt(v),U)!=U){var pe=G.lastIndexOf(v);pe>-1&&(G=G.slice(0,pe))}return G+c}function E1(e){return e=it(e),e&&Ue.test(e)?e.replace(Xt,Q0):e}var I1=fi(function(e,t,o){return e+(o?" ":"")+t.toUpperCase()}),Ho=Od("toUpperCase");function jl(e,t,o){return e=it(e),t=o?n:t,t===n?K0(e)?nc(e):L0(e):e.match(t)||[]}var Ll=He(function(e,t){try{return Gt(e,n,t)}catch(o){return jo(o)?o:new Ne(o)}}),x1=Rn(function(e,t){return en(t,function(o){o=bn(o),xn(e,o,Bo(e[o],e))}),e});function _1(e){var t=e==null?0:e.length,o=Ee();return e=t?gt(e,function(c){if(typeof c[1]!="function")throw new tn(l);return[o(c[0]),c[1]]}):[],He(function(c){for(var v=-1;++v<t;){var R=e[v];if(Gt(R[0],this,c))return Gt(R[1],this,c)}})}function R1(e){return Qc(rn(e,y))}function Vo(e){return function(){return e}}function k1(e,t){return e==null||e!==e?t:e}var A1=Hd(),D1=Hd(!0);function Ot(e){return e}function Wo(e){return yd(typeof e=="function"?e:rn(e,y))}function M1(e){return Sd(rn(e,y))}function N1(e,t){return Cd(e,rn(t,y))}var F1=He(function(e,t){return function(o){return Ri(o,e,t)}}),B1=He(function(e,t){return function(o){return Ri(e,o,t)}});function Go(e,t,o){var c=xt(t),v=ur(t,c);o==null&&!(vt(t)&&(v.length||!c.length))&&(o=t,t=e,e=this,v=ur(t,xt(t)));var R=!(vt(o)&&"chain"in o)||!!o.chain,B=An(e);return en(v,function(U){var G=t[U];e[U]=G,B&&(e.prototype[U]=function(){var re=this.__chain__;if(R||re){var oe=e(this.__wrapped__),le=oe.__actions__=zt(this.__actions__);return le.push({func:G,args:arguments,thisArg:e}),oe.__chain__=re,oe}return G.apply(e,Bn([this.value()],arguments))})}),e}function z1(){return _t._===this&&(_t._=lc),this}function Zo(){}function j1(e){return e=ze(e),He(function(t){return bd(t,e)})}var L1=Po(gt),O1=Po(Va),U1=Po(Jr);function Ol(e){return ko(e)?Kr(bn(e)):gu(e)}function H1(e){return function(t){return e==null?n:Xn(e,t)}}var V1=Wd(),W1=Wd(!0);function Jo(){return[]}function Ko(){return!1}function G1(){return{}}function Z1(){return""}function J1(){return!0}function K1(e,t){if(e=ze(e),e<1||e>be)return[];var o=N,c=At(e,N);t=Ee(t),e-=N;for(var v=Yr(c,t);++o<e;)t(o);return v}function q1(e){return Fe(e)?gt(e,bn):Kt(e)?[e]:zt(al(it(e)))}function $1(e){var t=++ac;return it(e)+t}var Y1=vr(function(e,t){return e+t},0),X1=wo("ceil"),Q1=vr(function(e,t){return e/t},1),eh=wo("floor");function th(e){return e&&e.length?cr(e,Ot,so):n}function nh(e,t){return e&&e.length?cr(e,Ee(t,2),so):n}function ih(e){return Za(e,Ot)}function rh(e,t){return Za(e,Ee(t,2))}function oh(e){return e&&e.length?cr(e,Ot,po):n}function ah(e,t){return e&&e.length?cr(e,Ee(t,2),po):n}var dh=vr(function(e,t){return e*t},1),lh=wo("round"),sh=vr(function(e,t){return e-t},0);function ch(e){return e&&e.length?$r(e,Ot):0}function uh(e,t){return e&&e.length?$r(e,Ee(t,2)):0}return x.after=Dp,x.ary=vl,x.assign=Sf,x.assignIn=Al,x.assignInWith=kr,x.assignWith=Cf,x.at=bf,x.before=yl,x.bind=Bo,x.bindAll=x1,x.bindKey=Tl,x.castArray=Wp,x.chain=fl,x.chunk=Qu,x.compact=em,x.concat=tm,x.cond=_1,x.conforms=R1,x.constant=Vo,x.countBy=sp,x.create=Pf,x.curry=Sl,x.curryRight=Cl,x.debounce=bl,x.defaults=wf,x.defaultsDeep=Ef,x.defer=Mp,x.delay=Np,x.difference=nm,x.differenceBy=im,x.differenceWith=rm,x.drop=om,x.dropRight=am,x.dropRightWhile=dm,x.dropWhile=lm,x.fill=sm,x.filter=up,x.flatMap=fp,x.flatMapDeep=hp,x.flatMapDepth=gp,x.flatten=cl,x.flattenDeep=cm,x.flattenDepth=um,x.flip=Fp,x.flow=A1,x.flowRight=D1,x.fromPairs=mm,x.functions=Df,x.functionsIn=Mf,x.groupBy=vp,x.initial=fm,x.intersection=hm,x.intersectionBy=gm,x.intersectionWith=vm,x.invert=Ff,x.invertBy=Bf,x.invokeMap=Tp,x.iteratee=Wo,x.keyBy=Sp,x.keys=xt,x.keysIn=Lt,x.map=wr,x.mapKeys=jf,x.mapValues=Lf,x.matches=M1,x.matchesProperty=N1,x.memoize=Ir,x.merge=Of,x.mergeWith=Dl,x.method=F1,x.methodOf=B1,x.mixin=Go,x.negate=xr,x.nthArg=j1,x.omit=Uf,x.omitBy=Hf,x.once=Bp,x.orderBy=Cp,x.over=L1,x.overArgs=zp,x.overEvery=O1,x.overSome=U1,x.partial=zo,x.partialRight=Pl,x.partition=bp,x.pick=Vf,x.pickBy=Ml,x.property=Ol,x.propertyOf=H1,x.pull=Cm,x.pullAll=ml,x.pullAllBy=bm,x.pullAllWith=Pm,x.pullAt=wm,x.range=V1,x.rangeRight=W1,x.rearg=jp,x.reject=Ep,x.remove=Em,x.rest=Lp,x.reverse=No,x.sampleSize=xp,x.set=Gf,x.setWith=Zf,x.shuffle=_p,x.slice=Im,x.sortBy=Ap,x.sortedUniq=Mm,x.sortedUniqBy=Nm,x.split=h1,x.spread=Op,x.tail=Fm,x.take=Bm,x.takeRight=zm,x.takeRightWhile=jm,x.takeWhile=Lm,x.tap=ep,x.throttle=Up,x.thru=Pr,x.toArray=_l,x.toPairs=Nl,x.toPairsIn=Fl,x.toPath=q1,x.toPlainObject=kl,x.transform=Jf,x.unary=Hp,x.union=Om,x.unionBy=Um,x.unionWith=Hm,x.uniq=Vm,x.uniqBy=Wm,x.uniqWith=Gm,x.unset=Kf,x.unzip=Fo,x.unzipWith=pl,x.update=qf,x.updateWith=$f,x.values=vi,x.valuesIn=Yf,x.without=Zm,x.words=jl,x.wrap=Vp,x.xor=Jm,x.xorBy=Km,x.xorWith=qm,x.zip=$m,x.zipObject=Ym,x.zipObjectDeep=Xm,x.zipWith=Qm,x.entries=Nl,x.entriesIn=Fl,x.extend=Al,x.extendWith=kr,Go(x,x),x.add=Y1,x.attempt=Ll,x.camelCase=t1,x.capitalize=Bl,x.ceil=X1,x.clamp=Xf,x.clone=Gp,x.cloneDeep=Jp,x.cloneDeepWith=Kp,x.cloneWith=Zp,x.conformsTo=qp,x.deburr=zl,x.defaultTo=k1,x.divide=Q1,x.endsWith=n1,x.eq=fn,x.escape=i1,x.escapeRegExp=r1,x.every=cp,x.find=mp,x.findIndex=ll,x.findKey=If,x.findLast=pp,x.findLastIndex=sl,x.findLastKey=xf,x.floor=eh,x.forEach=hl,x.forEachRight=gl,x.forIn=_f,x.forInRight=Rf,x.forOwn=kf,x.forOwnRight=Af,x.get=Oo,x.gt=$p,x.gte=Yp,x.has=Nf,x.hasIn=Uo,x.head=ul,x.identity=Ot,x.includes=yp,x.indexOf=pm,x.inRange=Qf,x.invoke=zf,x.isArguments=ti,x.isArray=Fe,x.isArrayBuffer=Xp,x.isArrayLike=jt,x.isArrayLikeObject=bt,x.isBoolean=Qp,x.isBuffer=Vn,x.isDate=ef,x.isElement=tf,x.isEmpty=nf,x.isEqual=rf,x.isEqualWith=of,x.isError=jo,x.isFinite=af,x.isFunction=An,x.isInteger=wl,x.isLength=_r,x.isMap=El,x.isMatch=df,x.isMatchWith=lf,x.isNaN=sf,x.isNative=cf,x.isNil=mf,x.isNull=uf,x.isNumber=Il,x.isObject=vt,x.isObjectLike=Tt,x.isPlainObject=Fi,x.isRegExp=Lo,x.isSafeInteger=pf,x.isSet=xl,x.isString=Rr,x.isSymbol=Kt,x.isTypedArray=gi,x.isUndefined=ff,x.isWeakMap=hf,x.isWeakSet=gf,x.join=ym,x.kebabCase=o1,x.last=an,x.lastIndexOf=Tm,x.lowerCase=a1,x.lowerFirst=d1,x.lt=vf,x.lte=yf,x.max=th,x.maxBy=nh,x.mean=ih,x.meanBy=rh,x.min=oh,x.minBy=ah,x.stubArray=Jo,x.stubFalse=Ko,x.stubObject=G1,x.stubString=Z1,x.stubTrue=J1,x.multiply=dh,x.nth=Sm,x.noConflict=z1,x.noop=Zo,x.now=Er,x.pad=l1,x.padEnd=s1,x.padStart=c1,x.parseInt=u1,x.random=e1,x.reduce=Pp,x.reduceRight=wp,x.repeat=m1,x.replace=p1,x.result=Wf,x.round=lh,x.runInContext=W,x.sample=Ip,x.size=Rp,x.snakeCase=f1,x.some=kp,x.sortedIndex=xm,x.sortedIndexBy=_m,x.sortedIndexOf=Rm,x.sortedLastIndex=km,x.sortedLastIndexBy=Am,x.sortedLastIndexOf=Dm,x.startCase=g1,x.startsWith=v1,x.subtract=sh,x.sum=ch,x.sumBy=uh,x.template=y1,x.times=K1,x.toFinite=Dn,x.toInteger=ze,x.toLength=Rl,x.toLower=T1,x.toNumber=dn,x.toSafeInteger=Tf,x.toString=it,x.toUpper=S1,x.trim=C1,x.trimEnd=b1,x.trimStart=P1,x.truncate=w1,x.unescape=E1,x.uniqueId=$1,x.upperCase=I1,x.upperFirst=Ho,x.each=hl,x.eachRight=gl,x.first=ul,Go(x,function(){var e={};return Sn(x,function(t,o){ot.call(x.prototype,o)||(e[o]=t)}),e}(),{chain:!1}),x.VERSION=i,en(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){x[e].placeholder=x}),en(["drop","take"],function(e,t){Ze.prototype[e]=function(o){o=o===n?1:Et(ze(o),0);var c=this.__filtered__&&!t?new Ze(this):this.clone();return c.__filtered__?c.__takeCount__=At(o,c.__takeCount__):c.__views__.push({size:At(o,N),type:e+(c.__dir__<0?"Right":"")}),c},Ze.prototype[e+"Right"]=function(o){return this.reverse()[e](o).reverse()}}),en(["filter","map","takeWhile"],function(e,t){var o=t+1,c=o==me||o==ve;Ze.prototype[e]=function(v){var R=this.clone();return R.__iteratees__.push({iteratee:Ee(v,3),type:o}),R.__filtered__=R.__filtered__||c,R}}),en(["head","last"],function(e,t){var o="take"+(t?"Right":"");Ze.prototype[e]=function(){return this[o](1).value()[0]}}),en(["initial","tail"],function(e,t){var o="drop"+(t?"":"Right");Ze.prototype[e]=function(){return this.__filtered__?new Ze(this):this[o](1)}}),Ze.prototype.compact=function(){return this.filter(Ot)},Ze.prototype.find=function(e){return this.filter(e).head()},Ze.prototype.findLast=function(e){return this.reverse().find(e)},Ze.prototype.invokeMap=He(function(e,t){return typeof e=="function"?new Ze(this):this.map(function(o){return Ri(o,e,t)})}),Ze.prototype.reject=function(e){return this.filter(xr(Ee(e)))},Ze.prototype.slice=function(e,t){e=ze(e);var o=this;return o.__filtered__&&(e>0||t<0)?new Ze(o):(e<0?o=o.takeRight(-e):e&&(o=o.drop(e)),t!==n&&(t=ze(t),o=t<0?o.dropRight(-t):o.take(t-e)),o)},Ze.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ze.prototype.toArray=function(){return this.take(N)},Sn(Ze.prototype,function(e,t){var o=/^(?:filter|find|map|reject)|While$/.test(t),c=/^(?:head|last)$/.test(t),v=x[c?"take"+(t=="last"?"Right":""):t],R=c||/^find/.test(t);v&&(x.prototype[t]=function(){var B=this.__wrapped__,U=c?[1]:arguments,G=B instanceof Ze,re=U[0],oe=G||Fe(B),le=function(Ve){var $e=v.apply(x,Bn([Ve],U));return c&&pe?$e[0]:$e};oe&&o&&typeof re=="function"&&re.length!=1&&(G=oe=!1);var pe=this.__chain__,Se=!!this.__actions__.length,xe=R&&!pe,Le=G&&!Se;if(!R&&oe){B=Le?B:new Ze(this);var _e=e.apply(B,U);return _e.__actions__.push({func:Pr,args:[le],thisArg:n}),new nn(_e,pe)}return xe&&Le?e.apply(this,U):(_e=this.thru(le),xe?c?_e.value()[0]:_e.value():_e)})}),en(["pop","push","shift","sort","splice","unshift"],function(e){var t=qi[e],o=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",c=/^(?:pop|shift)$/.test(e);x.prototype[e]=function(){var v=arguments;if(c&&!this.__chain__){var R=this.value();return t.apply(Fe(R)?R:[],v)}return this[o](function(B){return t.apply(Fe(B)?B:[],v)})}}),Sn(Ze.prototype,function(e,t){var o=x[t];if(o){var c=o.name+"";ot.call(ui,c)||(ui[c]=[]),ui[c].push({name:t,func:o})}}),ui[gr(n,z).name]=[{name:"wrapper",func:n}],Ze.prototype.clone=wc,Ze.prototype.reverse=Ec,Ze.prototype.value=Ic,x.prototype.at=tp,x.prototype.chain=np,x.prototype.commit=ip,x.prototype.next=rp,x.prototype.plant=ap,x.prototype.reverse=dp,x.prototype.toJSON=x.prototype.valueOf=x.prototype.value=lp,x.prototype.first=x.prototype.head,bi&&(x.prototype[bi]=op),x},li=ic();Jn?((Jn.exports=li)._=li,Vr._=li):_t._=li}).call(Zn)});function es(f,u){var n=u.parentNode;n.lastChild==u?n.appendChild(f):n.insertBefore(f,u.nextSibling)}var Bi=function(){function f(u,n){fe(this,f),this.id=n,this.jSPlugin=u,this.state={play:!1,loading:!1,text:""},this.loadingSetText=this.loadingSetText}return dt(f,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"setPlayStatus",value:function(n){this.state=Object.assign(this.state,n)}},{key:"loadingStart",value:function(n){var i=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(i),i.innerHTML="@keyframes antRotate {to {transform: rotate(400deg);transform-origin:50% 50%;}} .loading {display: inline-block;z-index: 1000;-webkit-animation: antRotate 1s infinite linear;animation: antRotate 1s infinite linear;}";var r=n,a=document.getElementById(r),l=a.offsetWidth,s=a.offsetHeight,b=0,T=a.offsetLeft;document.getElementById("".concat(n,"-loading-id-0"))&&document.getElementById("".concat(n,"-loading-id-0")).parentNode.removeChild(document.getElementById("".concat(n,"-loading-id-0")));var C=document.createElement("div");C.setAttribute("id","".concat(n,"-loading-id-0"));var _="position:absolute;outline:none;pointer-events:none;";console.log("this.jSPlugin",this.jSPlugin),_+="width: 100%;background-size: cover; background-repeat:no-repeat;",_+="height: 100%;",_+="top:"+b+";",_+="left:"+T+"px;",C.setAttribute("style",_),C.style.height=s,C.setAttribute("class","loading-container"),es(C,a);var y=1,h=document.createElement("div"),D=document.createElement("div");h.setAttribute("class","loading-item"),h.setAttribute("id","".concat(n,"-loading-item-0"));var _="display:inline-flex;pointer-events:none;flex-direction:column;justify-content:center;align-items: center;width:100%;height:"+s+"px;outline:none;vertical-align: top;position:absolute;";_+="left:"+E(s,l,y,0).left+"px;",_+="top:"+E(s,l,y,0).top+"px;",h.setAttribute("style",_);function E(S,d,m,g){var k=parseInt(g/m,10)*(S/m),A=g%m*(d/m);return{top:k,left:A}}var w=document.createElement("div");D.innerHTML="",D.style.color="#fff",w.setAttribute("class","loading"),w.setAttribute("id","loading-icon");var z='<svg t="1567069979438" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399" width="32" height="32"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>';w.innerHTML=z,h.appendChild(w),h.appendChild(D),C.appendChild(h)}},{key:"loadingStop",value:function(n){var i=document.getElementById("".concat(n,"-loading-item-0"));i&&i.removeChild(document.getElementById("loading-icon"))}},{key:"loadingSetText",value:function(n){var i=this;if(this.loadingClearText(),document.getElementById("".concat(this.id,"-loading-item-0"))){var r=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes[1];if(!r){var a=document.getElementById("".concat(this.id,"-loading-item-0"));a.style.height="100%",r=document.createElement("div"),r.innerHTML=n.text,a.appendChild(r)}r.innerHTML=n.text,r.style.fontSize="14px",r.style.color=n.color||"#FFFFFF",this.state.text=n.text,n.delayClear&&setTimeout(function(){i.loadingClearText()},parseInt(n.delayClear))}}},{key:"loadingClearText",value:function(){if(document.getElementById("".concat(this.id,"-loading-item-0"))){var n=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes;n.length>1?n[1].parentNode.removeChild(n[1]):n[0]&&n[0].parentNode.removeChild(n[0])}}},{key:"loadingClear",value:function(){if(document.getElementById("".concat(this.id,"-loading-item-0"))){for(var n=document.getElementById("".concat(this.id,"-loading-item-0")).childNodes,i=n.length-1;i>=0;i--)n[i].parentNode.removeChild(n[i]);document.getElementById("".concat(this.id,"-loading-id-0"))&&(document.getElementById("".concat(this.id,"-loading-id-0")).style.background="none"),document.getElementById("loading-icon")&&document.getElementById("loading-icon").parentNode.removeChild(document.getElementById("loading-icon"))}}},{key:"loadingEnd",value:function(){var n=document.getElementById("".concat(this.id,"-loading-item-0"));if(n){n.parentNode.removeChild(n);var i=document.getElementById("".concat(this.id,"-loading-id-0"));i&&i.children.length===0&&i.parentNode.removeChild(i)}document.getElementById("".concat(this.id,"-loading-item-0")).style.background="none"}}]),f}(),ts=function(){function f(u,n){fe(this,f),this.id=n,this.jSPlugin=u,this.timer=null,this.state={play:!1,loading:!1}}return dt(f,[{key:"default",value:function(n){var i=this,r="msgId";document.getElementById("".concat(this.id,"-").concat(r))&&document.getElementById("".concat(this.id,"-wrap")).removeChild(document.getElementById("".concat(this.id,"-").concat(r)));var a=document.createElement("div");a.id="".concat(this.id,"-").concat(r),a.style="position: absolute;top: 50%;left:calc(50% - ".concat(n.length*14/2,"px);padding: 4px 16px;background: #00000080;color: #FFFFFF;font-size: 14px"),a.innerHTML=n,document.getElementById("".concat(this.id,"-wrap")).appendChild(a),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){document.getElementById("".concat(i.id,"-wrap")).removeChild(document.getElementById("".concat(i.id,"-").concat(r)))},2e3)}}]),f}(),ns=[{moduleCode:"",detailCode:"405984",description:"",solution:"",updateTime:1559564188e3},{moduleCode:"",detailCode:"10035",description:"获取子账户AccessToken异常,子账户不存在或子账户不属于该开发者",solution:"",updateTime:1559551958e3},{moduleCode:"",detailCode:"1052674",description:"获取本地录像失败",solution:"",updateTime:1558579653e3},{moduleCode:"",detailCode:"395547",description:"",solution:"",updateTime:1557367296e3},{moduleCode:"",detailCode:"12",description:"",solution:"",updateTime:1557229476e3},{moduleCode:"",detailCode:"10052",description:"余额不足",solution:"",updateTime:1557121463e3},{moduleCode:"",detailCode:"20108",description:"当前用户和所添加用户不是好友关系",solution:"",updateTime:1556541725e3},{moduleCode:"",detailCode:"10009",description:"",solution:"",updateTime:1556422452e3},{moduleCode:"",detailCode:"320001",description:"通道不存在",solution:"请检查录像机的关联状态是否正常,没有摄像头的通道无法播放",updateTime:1556419044e3},{moduleCode:"",detailCode:"120001",description:"通道不存在",solution:"请检查录像机的关联状态是否正常,没有摄像头的通道无法播放",updateTime:155641903e4},{moduleCode:"",detailCode:"320049",description:"",solution:"",updateTime:1556272984e3},{moduleCode:"",detailCode:"380227",description:"",solution:"",updateTime:1556264379e3},{moduleCode:"",detailCode:"10033",description:"policy参数信息异常",solution:"",updateTime:1555922124e3},{moduleCode:"",detailCode:"10065",description:"weakAppKey 不属于accessToken对应的用户",solution:"",updateTime:1555497522e3},{moduleCode:"",detailCode:"100001",description:"",solution:"",updateTime:1555141776e3},{moduleCode:"",detailCode:"395558",description:"",solution:"",updateTime:1554987121e3},{moduleCode:"",detailCode:"70001",description:"智能家居买断用户设备受到限制,建议合理选择pagestart和pageSize",solution:"",updateTime:1554691023e3},{moduleCode:"",detailCode:"170001",description:"",solution:"",updateTime:1554691023e3},{moduleCode:"",detailCode:"1012",description:"重置失败",solution:"",updateTime:1554645841e3},{moduleCode:"",detailCode:"1043",description:"重置失败",solution:"",updateTime:1554645834e3},{moduleCode:"",detailCode:"60060",description:"直播功能未开通",solution:"通道未开通直播功能,请先开通直播",updateTime:1554346018e3},{moduleCode:"",detailCode:"380203",description:"",solution:"",updateTime:1554093666e3},{moduleCode:"",detailCode:"399048",description:"免费版并发数达到上限,请升级企业版使用多并发能力",solution:"升级成为企业版套餐即可取消并发数限制",updateTime:1553839878e3},{moduleCode:"",detailCode:"60007",description:"预置点个数超过最大值",solution:"",updateTime:1553671316e3},{moduleCode:"",detailCode:"1005",description:"",solution:"",updateTime:1553513701e3},{moduleCode:"",detailCode:"20605",description:"其他用户正在认证中",solution:"",updateTime:1552976317e3},{moduleCode:"",detailCode:"90004",description:"当前型号设备暂时不支持AI任务:CS-C3W-3B1WFR-YGL",solution:"",updateTime:1552898525e3},{moduleCode:"",detailCode:"60046",description:"添加的设备的IP和本设备的IP冲突",solution:"",updateTime:1552872372e3},{moduleCode:"",detailCode:"3",description:"修改视频清晰度失败!",solution:"",updateTime:1552440229e3},{moduleCode:"",detailCode:"1013",description:"",solution:"",updateTime:1552035069e3},{moduleCode:"",detailCode:"370007",description:"",solution:"",updateTime:1551852327e3},{moduleCode:"",detailCode:"-1",description:"",solution:"",updateTime:1551752889e3},{moduleCode:"",detailCode:"30005",description:"弱账户不存在",solution:"",updateTime:1551422358e3},{moduleCode:"",detailCode:"90006",description:"用户操作AI任务受限",solution:"",updateTime:155107332e4},{moduleCode:"",detailCode:"60203",description:"未开通相关服务",solution:"",updateTime:155062307e4},{moduleCode:"",detailCode:"10002",description:"accessToken过期或异常",solution:"",updateTime:1550300346e3},{moduleCode:"",detailCode:"380339",description:"",solution:"",updateTime:1549889458e3},{moduleCode:"",detailCode:"90002",description:"AI任务设备配置数达到上限:3",solution:"",updateTime:1549071664e3},{moduleCode:"",detailCode:"380008",description:"",solution:"",updateTime:1549005979e3},{moduleCode:"",detailCode:"320227",description:"",solution:"",updateTime:1548739731e3},{moduleCode:"",detailCode:"60059",description:"ezopen地址均不可用",solution:"",updateTime:154839535e4},{moduleCode:"",detailCode:"10005",description:"appKey异常",solution:"",updateTime:1548317858e3},{moduleCode:"",detailCode:"60045",description:"添加的设备的IP和其他通道的IP冲突",solution:"",updateTime:1548155085e3},{moduleCode:"",detailCode:"60047",description:"码流类型不支持",solution:"",updateTime:1547962108e3},{moduleCode:"",detailCode:"60041",description:"添加的设备被其他设备关联或响应超时",solution:"",updateTime:154796098e4},{moduleCode:"",detailCode:"110029",description:"个人用户接口调用频率超限",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1547606859e3},{moduleCode:"",detailCode:"380355",description:"设备直连推流异常结束",solution:"",updateTime:1547106294e3},{moduleCode:"",detailCode:"320081",description:"",solution:"",updateTime:1547106279e3},{moduleCode:"",detailCode:"60035",description:"购买云存储服务失败",solution:"",updateTime:1547026959e3},{moduleCode:"",detailCode:"90005",description:"设备已存在:C75714141",solution:"",updateTime:1546940622e3},{moduleCode:"",detailCode:"1053445",description:"该时间段没有录像片段",solution:"",updateTime:1546935727e3},{moduleCode:"",detailCode:"90007",description:"设备未加入到AI任务",solution:"",updateTime:1546932948e3},{moduleCode:"",detailCode:"326000",description:"",solution:"",updateTime:1546823143e3},{moduleCode:"",detailCode:"1021",description:"重置失败",solution:"",updateTime:1546781152e3},{moduleCode:"",detailCode:"2001",description:"删除设备失败!",solution:"",updateTime:1546422886e3},{moduleCode:"",detailCode:"380425",description:"",solution:"",updateTime:1546407694e3},{moduleCode:"",detailCode:"120097",description:"",solution:"",updateTime:1546085995e3},{moduleCode:"",detailCode:"10059",description:"requestId已存在",solution:"",updateTime:1545824509e3},{moduleCode:"",detailCode:"1154723",description:"",solution:"",updateTime:1545795209e3},{moduleCode:"",detailCode:"60043",description:"添加的设备超出最大数量",solution:"",updateTime:1545493607e3},{moduleCode:"",detailCode:"1152677",description:"",solution:"",updateTime:1545313404e3},{moduleCode:"",detailCode:"20097",description:"设备添加异常,设备验证码为ABCDEF或设备被N1,R1关联",solution:"",updateTime:1545310795e3},{moduleCode:"",detailCode:"10060",description:"设备不支持该云存储类型",solution:"",updateTime:1545309064e3},{moduleCode:"",detailCode:"20102",description:"无相应邀请信息,无法接受邀请",solution:"",updateTime:1545204966e3},{moduleCode:"",detailCode:"10053",description:"云存储开通中",solution:"",updateTime:1545100293e3},{moduleCode:"",detailCode:"20401",description:"用户云空间信息不存在",solution:"",updateTime:154501788e4},{moduleCode:"",detailCode:"20600",description:"临时密码数已达上限",solution:"",updateTime:1544873457e3},{moduleCode:"",detailCode:"901",description:"",solution:"",updateTime:1544693519e3},{moduleCode:"",detailCode:"60210",description:"图片数据错误",solution:"",updateTime:1544604457e3},{moduleCode:"",detailCode:"10013",description:"您的应用没有权限调用",solution:"",updateTime:1544416237e3},{moduleCode:"",detailCode:"70007",description:"授权码不存在",solution:"",updateTime:1544179533e3},{moduleCode:"",detailCode:"10015",description:"授权地址不存在",solution:"",updateTime:154416324e4},{moduleCode:"",detailCode:"320423",description:"",solution:"",updateTime:1544100685e3},{moduleCode:"",detailCode:"370009",description:"",solution:"",updateTime:1544077151e3},{moduleCode:"",detailCode:"10031",description:"子账户或萤石用户没有权限",solution:"",updateTime:1543990462e3},{moduleCode:"",detailCode:"10055",description:"设备不支持试用云存储服务",solution:"",updateTime:1543986292e3},{moduleCode:"",detailCode:"60042",description:"添加的设备密码错误",solution:"",updateTime:1543710913e3},{moduleCode:"",detailCode:"60082",description:"设备正在响应本次声源定位",solution:"",updateTime:1543647426e3},{moduleCode:"",detailCode:"10056",description:"设备不支持云存储服务转出",solution:"",updateTime:1543558342e3},{moduleCode:"",detailCode:"20104",description:"好友不存在",solution:"",updateTime:1543492403e3},{moduleCode:"",detailCode:"20111",description:"好友不是等待验证状态,无法接受邀请",solution:"",updateTime:1543492365e3},{moduleCode:"",detailCode:"20107",description:"不能添加自己为好友",solution:"",updateTime:1543480986e3},{moduleCode:"",detailCode:"1",description:"设备返回其他错误",solution:"",updateTime:1543459921e3},{moduleCode:"",detailCode:"60084",description:"当前正在关闭隐私遮蔽",solution:"",updateTime:1543456515e3},{moduleCode:"",detailCode:"380255",description:"",solution:"",updateTime:1543411652e3},{moduleCode:"",detailCode:"20015",description:"设备不支持",solution:"",updateTime:1543390936e3},{moduleCode:"",detailCode:"30003",description:"手机验证码错误",solution:"",updateTime:1543389137e3},{moduleCode:"",detailCode:"20615",description:"锁用户已存在",solution:"",updateTime:1543388325e3},{moduleCode:"",detailCode:"60061",description:"账户流量已超出或未购买,限制开通",solution:"",updateTime:1543372581e3},{moduleCode:"",detailCode:"60020",description:"设备不支持该信令",solution:"",updateTime:1543321636e3},{moduleCode:"",detailCode:"320146",description:"",solution:"",updateTime:1543318472e3},{moduleCode:"",detailCode:"60018",description:"设备升级失败",solution:"",updateTime:1543304928e3},{moduleCode:"",detailCode:"60044",description:"添加的设备网络不可达超时",solution:"",updateTime:1543304102e3},{moduleCode:"",detailCode:"20619",description:"主用户无法删除",solution:"",updateTime:1543290219e3},{moduleCode:"",detailCode:"20608",description:"锁用户不存在",solution:"",updateTime:154328195e4},{moduleCode:"",detailCode:"20609",description:"设备响应超时,门锁通信故障或者电量不足,请重试.",solution:"",updateTime:1543281601e3},{moduleCode:"",detailCode:"1049954",description:"升级设备失败",solution:"",updateTime:1543279264e3},{moduleCode:"",detailCode:"60009",description:"正在调用预置点",solution:"",updateTime:1543238114e3},{moduleCode:"",detailCode:"1052677",description:"获取本地录像失败",solution:"",updateTime:1543207604e3},{moduleCode:"",detailCode:"327000",description:"",solution:"",updateTime:1543196609e3},{moduleCode:"",detailCode:"20021",description:"设备在线,未被用户添加",solution:"",updateTime:1543193436e3},{moduleCode:"",detailCode:"20202",description:"操作留言信息失败",solution:"",updateTime:1543191562e3},{moduleCode:"",detailCode:"1052678",description:"获取本地录像失败",solution:"",updateTime:1543132218e3},{moduleCode:"",detailCode:"1054723",description:"格式化设备失败",solution:"",updateTime:1543129833e3},{moduleCode:"",detailCode:"20109",description:"对应分享不存在",solution:"",updateTime:1543129111e3},{moduleCode:"",detailCode:"60026",description:"设备处于隐私遮蔽状态",solution:"",updateTime:1543110403e3},{moduleCode:"",detailCode:"60083",description:"当前正在开启隐私遮蔽",solution:"",updateTime:1543071148e3},{moduleCode:"",detailCode:"60001",description:"用户无云台控制权限",solution:"",updateTime:1543059167e3},{moduleCode:"",detailCode:"2003",description:"设备不在线",solution:"",updateTime:1543051046e3},{moduleCode:"",detailCode:"-24",description:"设置设备enable错误",solution:"",updateTime:1543042701e3},{moduleCode:"",detailCode:"10018",description:"",solution:"",updateTime:1543041564e3},{moduleCode:"",detailCode:"20103",description:"好友已存在",solution:"",updateTime:154303843e4},{moduleCode:"",detailCode:"70010",description:"授权异常请重试",solution:"",updateTime:154303559e4},{moduleCode:"",detailCode:"60056",description:"删除设备失败",solution:"",updateTime:1543031275e3},{moduleCode:"",detailCode:"60040",description:"添加的设备不在同一局域网",solution:"",updateTime:154303121e4},{moduleCode:"",detailCode:"60019",description:"加密已开启",solution:"",updateTime:1543029931e3},{moduleCode:"",detailCode:"1054722",description:"格式化设备失败",solution:"",updateTime:1543028537e3},{moduleCode:"",detailCode:"20016",description:"当前设备正在格式化",solution:"",updateTime:1543028537e3},{moduleCode:"",detailCode:"10024",description:"透明通道权限校验不通过",solution:"",updateTime:154302554e4},{moduleCode:"",detailCode:"6002",description:"删除设备失败!",solution:"",updateTime:1543025026e3},{moduleCode:"",detailCode:"1011",description:"验证码错误!",solution:"",updateTime:1543016865e3},{moduleCode:"",detailCode:"60032",description:"卡密已使用",solution:"",updateTime:1543006668e3},{moduleCode:"",detailCode:"10034",description:"子账号已存在",solution:"",updateTime:1542989194e3},{moduleCode:"",detailCode:"20301",description:"根据uuid查询联动信息不存在",solution:"",updateTime:1542988651e3},{moduleCode:"",detailCode:"1041",description:"获取验证码过于频繁",solution:"",updateTime:1542980953e3},{moduleCode:"",detailCode:"10012",description:"该appkey下已绑定重复的phone!",solution:"",updateTime:15429808e5},{moduleCode:"",detailCode:"1008",description:"phone不合法!",solution:"",updateTime:1542979812e3},{moduleCode:"",detailCode:"60023",description:"订阅操作失败",solution:"",updateTime:1542979006e3},{moduleCode:"",detailCode:"5",description:"设备返回其他错误",solution:"",updateTime:1542977828e3},{moduleCode:"",detailCode:"60006",description:"云台当前操作失败",solution:"",updateTime:1542977598e3},{moduleCode:"",detailCode:"131",description:"修改视频清晰度失败!",solution:"",updateTime:1542977246e3},{moduleCode:"",detailCode:"10019",description:"密码错误",solution:"",updateTime:1542976628e3},{moduleCode:"",detailCode:"10004",description:"用户不存在",solution:"",updateTime:1542976268e3},{moduleCode:"",detailCode:"20201",description:"操作报警信息失败",solution:"",updateTime:1542975906e3},{moduleCode:"",detailCode:"20024",description:"设备不在线,已经被别的用户添加",solution:"",updateTime:1542975858e3},{moduleCode:"",detailCode:"60004",description:"设备云台旋转达到左限位",solution:"",updateTime:1542975207e3},{moduleCode:"",detailCode:"1052679",description:"修改视频清晰度失败!",solution:"",updateTime:1542974886e3},{moduleCode:"",detailCode:"20031",description:"请在萤石客户端关闭终端绑定",solution:"",updateTime:1542974756e3},{moduleCode:"",detailCode:"1053825",description:"获取本地录像失败",solution:"",updateTime:1542974692e3},{moduleCode:"",detailCode:"60011",description:"预置点不存在",solution:"",updateTime:1542974414e3},{moduleCode:"",detailCode:"1052936",description:"修改视频清晰度失败!",solution:"",updateTime:154297439e4},{moduleCode:"",detailCode:"1016",description:"",solution:"",updateTime:1542974273e3},{moduleCode:"",detailCode:"10032",description:"子账号不存在",solution:"",updateTime:1542973906e3},{moduleCode:"",detailCode:"20013",description:"设备已被别人添加",solution:"",updateTime:1542973817e3},{moduleCode:"",detailCode:"50000",description:"服务器错误!",solution:"",updateTime:1542973801e3},{moduleCode:"",detailCode:"60010",description:"该预置点已经是当前位置",solution:"",updateTime:15429738e5},{moduleCode:"",detailCode:"60003",description:"设备云台旋转达到下限位",solution:"",updateTime:154297377e4},{moduleCode:"",detailCode:"4",description:"设备返回其他错误",solution:"",updateTime:1542973755e3},{moduleCode:"",detailCode:"60016",description:"加密未开启,无需关闭",solution:"",updateTime:1542973753e3},{moduleCode:"",detailCode:"60002",description:"设备云台旋转达到上限位",solution:"",updateTime:1542973742e3},{moduleCode:"",detailCode:"20023",description:"设备不在线,未被用户添加",solution:"",updateTime:1542973685e3},{moduleCode:"",detailCode:"10008",description:"",solution:"",updateTime:1542973676e3},{moduleCode:"",detailCode:"20010",description:"设备验证码错误",solution:"",updateTime:1542973658e3},{moduleCode:"",detailCode:"60005",description:"设备云台旋转达到右限位",solution:"",updateTime:1542973657e3},{moduleCode:"",detailCode:"20017",description:"设备已经被自己添加",solution:"",updateTime:1542973648e3},{moduleCode:"",detailCode:"20020",description:"设备在线,已经被自己添加",solution:"",updateTime:1542973533e3},{moduleCode:"",detailCode:"20029",description:"设备不在线,已经被自己添加",solution:"",updateTime:154297353e4},{moduleCode:"",detailCode:"10014",description:"APPKEY下对应的第三方userId和phone未绑定!",solution:"",updateTime:1542973499e3},{moduleCode:"",detailCode:"20002",description:"设备不存在",solution:"",updateTime:1542973499e3},{moduleCode:"",detailCode:"10030",description:"appkey和appsecret不匹配",solution:"",updateTime:154297349e4},{moduleCode:"",detailCode:"20022",description:"设备在线,已经被别的用户添加",solution:"",updateTime:1542973486e3},{moduleCode:"",detailCode:"20008",description:"设备响应超时",solution:"",updateTime:1542973484e3},{moduleCode:"",detailCode:"20032",description:"该用户下通道不存在",solution:"",updateTime:1542973481e3},{moduleCode:"",detailCode:"20006",description:"网络异常",solution:"",updateTime:1542973475e3},{moduleCode:"",detailCode:"20014",description:"deviceSerial不合法!",solution:"",updateTime:1542973454e3},{moduleCode:"",detailCode:"20007",description:"设备不在线",solution:"",updateTime:1542973454e3},{moduleCode:"",detailCode:"20018",description:"该用户不拥有该设备",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"10010",description:"",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"10011",description:"未绑定!",solution:"",updateTime:1542973453e3},{moduleCode:"",detailCode:"20001",description:"通道不存在!",solution:"",updateTime:1542973452e3},{moduleCode:"",detailCode:"10017",description:"appKey不存在",solution:"",updateTime:1542973451e3},{moduleCode:"",detailCode:"400259",description:"",solution:"",updateTime:1542875643e3},{moduleCode:"",detailCode:"400004",description:"",solution:"",updateTime:1542873364e3},{moduleCode:"",detailCode:"3840",description:"",solution:"",updateTime:154186e7},{moduleCode:"",detailCode:"-1017",description:"",solution:"",updateTime:1541733663e3},{moduleCode:"",detailCode:"320025",description:"",solution:"",updateTime:1541078281e3},{moduleCode:"",detailCode:"320024",description:"",solution:"",updateTime:1540801374e3},{moduleCode:"",detailCode:"321002",description:"",solution:"",updateTime:1540631734e3},{moduleCode:"",detailCode:"321000",description:"",solution:"",updateTime:1540609178e3},{moduleCode:"",detailCode:"321022",description:"",solution:"",updateTime:1540548345e3},{moduleCode:"",detailCode:"321016",description:"",solution:"",updateTime:1540287187e3},{moduleCode:"",detailCode:"320023",description:"",solution:"",updateTime:1539825993e3},{moduleCode:"",detailCode:"-1016",description:"",solution:"",updateTime:1539584931e3},{moduleCode:"",detailCode:"8",description:"",solution:"",updateTime:1539391812e3},{moduleCode:"",detailCode:"1075127593",description:"",solution:"",updateTime:1538959251e3},{moduleCode:"",detailCode:"380421",description:"",solution:"",updateTime:1537288465e3},{moduleCode:"",detailCode:"322000",description:"麦克风权限未开启",solution:"",updateTime:1536820136e3},{moduleCode:"",detailCode:"1152678",description:"",solution:"",updateTime:1536738348e3},{moduleCode:"",detailCode:"320047",description:"",solution:"",updateTime:1536664472e3},{moduleCode:"",detailCode:"327006",description:"",solution:"",updateTime:153613612e4},{moduleCode:"",detailCode:"1074807593",description:"",solution:"",updateTime:1536135035e3},{moduleCode:"",detailCode:"320291",description:"",solution:"",updateTime:1536110836e3},{moduleCode:"",detailCode:"320045",description:"",solution:"",updateTime:1535963775e3},{moduleCode:"",detailCode:"370004",description:"",solution:"",updateTime:1535883699e3},{moduleCode:"",detailCode:"1149954",description:"",solution:"",updateTime:1535700674e3},{moduleCode:"",detailCode:"320053",description:"",solution:"",updateTime:1535681079e3},{moduleCode:"",detailCode:"400000",description:"",solution:"",updateTime:1535532332e3},{moduleCode:"",detailCode:"110028",description:"个人版抓图接口日调用次数超出限制",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348756e3},{moduleCode:"",detailCode:"110027",description:"个人版帐号数量超出安全限制,无法调用",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348734e3},{moduleCode:"",detailCode:"110026",description:"设备数量超出个人版限制,当前设备无法操作",solution:"请升级企业版:https://open.ys7.com/price.html",updateTime:1535348588e3},{moduleCode:"",detailCode:"100000",description:"",solution:"",updateTime:1534980008e3},{moduleCode:"",detailCode:"324004",description:"",solution:"",updateTime:1534927762e3},{moduleCode:"",detailCode:"360104",description:"",solution:"",updateTime:1534761006e3},{moduleCode:"",detailCode:"320204",description:"",solution:"",updateTime:1534584221e3},{moduleCode:"",detailCode:"380001",description:"",solution:"",updateTime:1534404715e3},{moduleCode:"",detailCode:"380204",description:"",solution:"",updateTime:1534401682e3},{moduleCode:"",detailCode:"328006",description:"",solution:"",updateTime:1534144407e3},{moduleCode:"",detailCode:"321703",description:"",solution:"",updateTime:1534127274e3},{moduleCode:"",detailCode:"321510",description:"",solution:"",updateTime:1533428892e3},{moduleCode:"",detailCode:"321006",description:"",solution:"",updateTime:1533036916e3},{moduleCode:"",detailCode:"50009",description:"",solution:"",updateTime:1532078548e3},{moduleCode:"",detailCode:"50007",description:"",solution:"",updateTime:153199172e4},{moduleCode:"",detailCode:"50018",description:"",solution:"",updateTime:1531912829e3},{moduleCode:"",detailCode:"380451",description:"",solution:"",updateTime:15316157e5},{moduleCode:"",detailCode:"380336",description:"",solution:"",updateTime:1531231721e3},{moduleCode:"",detailCode:"360020",description:"",solution:"",updateTime:1531117554e3},{moduleCode:"",detailCode:"380418",description:"",solution:"",updateTime:153110707e4},{moduleCode:"",detailCode:"1153445",description:"设备在该时间段内没有录像",solution:"",updateTime:1530944007e3},{moduleCode:"",detailCode:"110007",description:"调用接口总次数达到上限",solution:"请升级企业版,获取更高能力",updateTime:1530935584e3},{moduleCode:"",detailCode:"360019",description:"",solution:"",updateTime:1530869771e3},{moduleCode:"",detailCode:"360100",description:"",solution:"",updateTime:1530786188e3},{moduleCode:"",detailCode:"380042",description:"",solution:"",updateTime:1530775199e3},{moduleCode:"",detailCode:"320355",description:"",solution:"",updateTime:1530716074e3},{moduleCode:"",detailCode:"100003",description:"",solution:"",updateTime:1530232541e3},{moduleCode:"",detailCode:"371026",description:"",solution:"",updateTime:15301926e5},{moduleCode:"",detailCode:"102",description:"",solution:"",updateTime:1529895641e3},{moduleCode:"",detailCode:"380201",description:"",solution:"",updateTime:1529740929e3},{moduleCode:"",detailCode:"320054",description:"",solution:"",updateTime:1529544875e3},{moduleCode:"",detailCode:"500101",description:"",solution:"",updateTime:1529485953e3},{moduleCode:"",detailCode:"321001",description:"",solution:"",updateTime:1529411048e3},{moduleCode:"",detailCode:"321508",description:"",solution:"",updateTime:1529393279e3},{moduleCode:"",detailCode:"405991",description:"",solution:"",updateTime:1529380238e3},{moduleCode:"",detailCode:"380461",description:"",solution:"",updateTime:1529130941e3},{moduleCode:"",detailCode:"-1019",description:"",solution:"",updateTime:1529057245e3},{moduleCode:"",detailCode:"322009",description:"",solution:"",updateTime:1528965717e3},{moduleCode:"",detailCode:"324005",description:"",solution:"",updateTime:1528950153e3},{moduleCode:"",detailCode:"325000",description:"",solution:"",updateTime:1528947143e3},{moduleCode:"",detailCode:"326032",description:"",solution:"",updateTime:1528872971e3},{moduleCode:"",detailCode:"325032",description:"",solution:"",updateTime:1528863189e3},{moduleCode:"",detailCode:"328000",description:"",solution:"",updateTime:1528794505e3},{moduleCode:"",detailCode:"53",description:"",solution:"",updateTime:1528693249e3},{moduleCode:"",detailCode:"-1020",description:"",solution:"",updateTime:152849944e4},{moduleCode:"",detailCode:"329032",description:"",solution:"",updateTime:1528446301e3},{moduleCode:"",detailCode:"-1202",description:"",solution:"",updateTime:152843982e4},{moduleCode:"",detailCode:"2",description:"",solution:"",updateTime:1528434175e3},{moduleCode:"",detailCode:"1152936",description:"",solution:"",updateTime:1528345986e3},{moduleCode:"",detailCode:"328011",description:"",solution:"",updateTime:15283386e5},{moduleCode:"",detailCode:"28",description:"",solution:"",updateTime:152833753e4},{moduleCode:"",detailCode:"320356",description:"",solution:"",updateTime:1528188693e3},{moduleCode:"",detailCode:"320357",description:"",solution:"",updateTime:1528188517e3},{moduleCode:"",detailCode:"405800",description:"",solution:"",updateTime:1528168732e3},{moduleCode:"",detailCode:"405996",description:"",solution:"",updateTime:1528168686e3},{moduleCode:"",detailCode:"380357",description:"",solution:"",updateTime:1528011565e3},{moduleCode:"",detailCode:"328022",description:"",solution:"",updateTime:1527929065e3},{moduleCode:"",detailCode:"380003",description:"",solution:"",updateTime:1527927819e3},{moduleCode:"",detailCode:"50004",description:"",solution:"",updateTime:1527770643e3},{moduleCode:"",detailCode:"50011",description:"",solution:"",updateTime:1527770635e3},{moduleCode:"",detailCode:"370017",description:"",solution:"",updateTime:1527739514e3},{moduleCode:"",detailCode:"327032",description:"",solution:"",updateTime:1527726704e3},{moduleCode:"",detailCode:"324001",description:"",solution:"",updateTime:1527681892e3},{moduleCode:"",detailCode:"405997",description:"",solution:"",updateTime:1527653408e3},{moduleCode:"",detailCode:"405995",description:"",solution:"",updateTime:1527647283e3},{moduleCode:"",detailCode:"1153825",description:"",solution:"",updateTime:1527601747e3},{moduleCode:"",detailCode:"328002",description:"",solution:"",updateTime:1527495292e3},{moduleCode:"",detailCode:"1152679",description:"",solution:"",updateTime:1527486665e3},{moduleCode:"",detailCode:"380356",description:"",solution:"",updateTime:1527125669e3},{moduleCode:"",detailCode:"328032",description:"",solution:"",updateTime:1527069382e3},{moduleCode:"",detailCode:"22",description:"",solution:"",updateTime:1527049826e3},{moduleCode:"",detailCode:"9",description:"",solution:"",updateTime:1527006778e3},{moduleCode:"",detailCode:"89",description:"",solution:"",updateTime:1526622784e3},{moduleCode:"",detailCode:"328016",description:"",solution:"",updateTime:1526452365e3},{moduleCode:"",detailCode:"368005",description:"",solution:"",updateTime:1525921264e3},{moduleCode:"",detailCode:"0",description:"",solution:"",updateTime:1525920242e3},{moduleCode:"",detailCode:"380006",description:"",solution:"",updateTime:1525918868e3},{moduleCode:"",detailCode:"310",description:"",solution:"",updateTime:1525834436e3},{moduleCode:"",detailCode:"360011",description:"",solution:"",updateTime:1525681552e3},{moduleCode:"",detailCode:"170005",description:"",solution:"",updateTime:15254339e5},{moduleCode:"",detailCode:"50023",description:"",solution:"",updateTime:1525403338e3},{moduleCode:"",detailCode:"100131",description:"",solution:"",updateTime:1525229691e3},{moduleCode:"",detailCode:"-1018",description:"",solution:"",updateTime:1525142341e3},{moduleCode:"",detailCode:"362026",description:"",solution:"",updateTime:1524882677e3},{moduleCode:"",detailCode:"368007",description:"",solution:"",updateTime:1524832269e3},{moduleCode:"",detailCode:"54",description:"",solution:"",updateTime:1524793646e3},{moduleCode:"",detailCode:"1154722",description:"",solution:"",updateTime:1524620807e3},{moduleCode:"",detailCode:"320229",description:"",solution:"",updateTime:1524551682e3},{moduleCode:"",detailCode:"360012",description:"",solution:"",updateTime:1524472094e3},{moduleCode:"",detailCode:"380229",description:"",solution:"",updateTime:1524110755e3},{moduleCode:"",detailCode:"360016",description:"",solution:"",updateTime:1523933518e3},{moduleCode:"",detailCode:"-1003",description:"",solution:"",updateTime:1523584804e3},{moduleCode:"",detailCode:"410026",description:"",solution:"",updateTime:152351743e4},{moduleCode:"",detailCode:"360102",description:"TTS初始化失败",solution:"",updateTime:1523503528e3},{moduleCode:"",detailCode:"360013",description:"设备开启了隐私保护",solution:"",updateTime:1523503507e3},{moduleCode:"",detailCode:"360010",description:"设备正在对讲中",solution:"",updateTime:1523503491e3},{moduleCode:"",detailCode:"360007",description:"TTS关闭了与客户端的连接",solution:"",updateTime:1523503475e3},{moduleCode:"",detailCode:"360006",description:"客户端接收发生错误",solution:"",updateTime:1523503457e3},{moduleCode:"",detailCode:"360005",description:"客户端发送的消息错误",solution:"",updateTime:1523503437e3},{moduleCode:"",detailCode:"360004",description:"TTS内部发生错误",solution:"",updateTime:1523503421e3},{moduleCode:"",detailCode:"360003",description:"TTS的设备端发生错误",solution:"",updateTime:1523503397e3},{moduleCode:"",detailCode:"360002",description:"对讲发起超时",solution:"",updateTime:1523503376e3},{moduleCode:"",detailCode:"360001",description:"客户端请求超时",solution:"",updateTime:1523503357e3},{moduleCode:"",detailCode:"320077",description:"",solution:"",updateTime:1523444274e3},{moduleCode:"",detailCode:"370047",description:"",solution:"",updateTime:152344048e4},{moduleCode:"",detailCode:"100002",description:"",solution:"",updateTime:1523413964e3},{moduleCode:"",detailCode:"-1004",description:"",solution:"",updateTime:1523336653e3},{moduleCode:"",detailCode:"380000",description:"",solution:"",updateTime:1523180856e3},{moduleCode:"",detailCode:"380213",description:"",solution:"",updateTime:1523180623e3},{moduleCode:"",detailCode:"380101",description:"",solution:"",updateTime:1522834231e3},{moduleCode:"",detailCode:"50047",description:"",solution:"",updateTime:1522833243e3},{moduleCode:"",detailCode:"-999",description:"",solution:"",updateTime:1522831034e3},{moduleCode:"",detailCode:"320418",description:"",solution:"",updateTime:1522829072e3},{moduleCode:"",detailCode:"-1009",description:"",solution:"",updateTime:1522746247e3},{moduleCode:"",detailCode:"320209",description:"",solution:"",updateTime:1522744395e3},{moduleCode:"",detailCode:"368006",description:"",solution:"",updateTime:15227443e5},{moduleCode:"",detailCode:"369003",description:"",solution:"",updateTime:1522736355e3},{moduleCode:"",detailCode:"405989",description:"",solution:"",updateTime:1522726571e3},{moduleCode:"",detailCode:"-1012",description:"",solution:"",updateTime:1522726203e3},{moduleCode:"",detailCode:"322016",description:"",solution:"",updateTime:1522722918e3},{moduleCode:"",detailCode:"500103",description:"",solution:"",updateTime:1522655556e3},{moduleCode:"",detailCode:"405999",description:"",solution:"",updateTime:1522654716e3},{moduleCode:"",detailCode:"321032",description:"",solution:"",updateTime:1522647732e3},{moduleCode:"",detailCode:"381101",description:"",solution:"",updateTime:1522392414e3},{moduleCode:"",detailCode:"399999",description:"",solution:"",updateTime:1522379834e3},{moduleCode:"",detailCode:"380103",description:"",solution:"",updateTime:1522312724e3},{moduleCode:"",detailCode:"360014",description:"",solution:"",updateTime:1522304341e3},{moduleCode:"",detailCode:"-1005",description:"",solution:"",updateTime:1522288195e3},{moduleCode:"",detailCode:"100005",description:"",solution:"",updateTime:1522218849e3},{moduleCode:"",detailCode:"100004",description:"",solution:"",updateTime:1522209053e3},{moduleCode:"",detailCode:"106002",description:"",solution:"",updateTime:15222062e5},{moduleCode:"",detailCode:"410030",description:"",solution:"",updateTime:1522162252e3},{moduleCode:"",detailCode:"-1002",description:"",solution:"",updateTime:152215069e4},{moduleCode:"",detailCode:"-1200",description:"",solution:"",updateTime:1522139025e3},{moduleCode:"",detailCode:"-1001",description:"",solution:"",updateTime:1522046436e3},{moduleCode:"",detailCode:"-1011",description:"",solution:"",updateTime:1522045931e3},{moduleCode:"",detailCode:"381102",description:"",solution:"",updateTime:1522044953e3},{moduleCode:"",detailCode:"381103",description:"",solution:"",updateTime:1522044953e3},{moduleCode:"",detailCode:"391205",description:"vtdu解析服务器ip失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391206",description:"vtdu描述符select失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391207",description:"vtdu文件描述符不在可读中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391208",description:"vtdu网络发生错误getsockopt",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"391209",description:"vtdu描述符select超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395000",description:"cas回复信令,发现内存已经释放(和设备之间异常断开)",msg:"播放失败请重试",solution:"检查设备网络;刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395400",description:"私有化协议vtm检测私有化协议中码流类型小于0或者设备序列号为空等非法参数场景返回(app不重试取流)",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395402",description:"回放找不到录像文件",msg:"回放找不到录像文件,本地存储请检查存储卡是否接触良好",solution:"检查是否有存储卡并且接触良好",updateTime:1522034841e3},{moduleCode:"",detailCode:"395403",description:"操作码或信令密钥与设备不匹配",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395404",description:"设备不在线",solution:"检查设备网络;重启设备接入萤石云",msg:"设备不在线,请检查设备网络或重启设备接入萤石云",updateTime:1522034841e3},{moduleCode:"",detailCode:"395405",description:"流媒体向设备发送或接受信令超时/cas响应超时",msg:"播放失败,请检查设备网络或重启设备",solution:"检查设备网络;重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395406",description:"token失效",msg:"播放失败请重试或重启设备",solution:"刷新重试或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395407",description:"客户端的URL格式错误",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395409",description:"预览开启隐私保护",msg:"播放失败请关闭隐私遮蔽",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395410",description:"设备达到最大连接数",solution:"请升级设备固件版本",updateTime:1522034841e3},{moduleCode:"",detailCode:"395411",description:"token无权限",msg:"播放失败",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395412",description:"session不存在",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395413",description:"验证token的他异常(不具体) ",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395415",description:"设备通道错",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395416",description:"设备资源受限",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395451",description:"设备不支持的码流类型",msg:"播放失败请重试或切换设备码流",solution:"刷新重试或者切换到高清模式",updateTime:1522034841e3},{moduleCode:"",detailCode:"395452",description:"设备链接流媒体服务器失败",msg:"播放失败,请检查设备网络或重启设备或重新加载",solution:"检查设备网络,重启设备,刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395454",description:"流媒体中关于设备取流会话不存在",msg:"播放失败请重试",solution:"流媒体中关于设备取流会话不存在",updateTime:152222018e4},{moduleCode:"",detailCode:"395455",description:"设备通道未关联",msg:"播放失败,请检查设备通道是否关联",solution:"检查设备通道是否关联",updateTime:152222018e4},{moduleCode:"",detailCode:"395456",description:"设备通道关联设备不在线",msg:"播放失败,请检查设备通道是否上线",solution:"检查设备通道是否上线",updateTime:152222018e4},{moduleCode:"",detailCode:"395457",description:"客户端不支持端到端加密",msg:"播放失败",solution:"客户端不支持端到端加密",updateTime:152222018e4},{moduleCode:"",detailCode:"395458",description:"设备不支持当前并发ECDH密",msg:"客户端不支持端到端加密",solution:"设备不支持当前并发ECDH密",updateTime:152222018e4},{moduleCode:"",detailCode:"395459",description:"VTDU 处理ECDH 加密失败",msg:"播放失败",solution:"VTDU 处理ECDH 加密失败",updateTime:152222018e4},{moduleCode:"",detailCode:"395460",description:"流媒体中关于设备取流会话不存在",msg:"播放失败请重试",solution:"流媒体中关于设备取流会话不存在",updateTime:152222018e4},{moduleCode:"",detailCode:"395492",description:"设备不支持的命令",msg:"操作失败,设备不支持",solution:"",updateTime:152222018e4},{moduleCode:"",detailCode:"395500",description:"服务器处理失败",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395501",description:"流媒体vtdu达到最大负载,请扩容",msg:"播放失败请重试",solution:"服务器负载达到上限,请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395503",description:"vtm返回分配vtdu失败",msg:"播放失败请重试",solution:"vtdu服务异常,请请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395504",description:"流媒体vtdu达到最大负载",msg:"播放失败请重试",solution:"服务器负载达到上限,请稍后重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395505",description:"vtm ecdh解密失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395506",description:"vtm 返回IPC不支持取流(需要IPC添加NVR后支持)",msg:"播放失败,请绑定NVR使用",solution:"IPC绑定NVR使用",updateTime:1522034841e3},{moduleCode:"",detailCode:"395544",description:"设备返回无视频源",msg:"播放失败,请检查设备接触情况",solution:"设备是否接触良好; 如果一直无法解决,请联系技术支持",updateTime:1522034841e3},{moduleCode:"",detailCode:"395545",description:"视频分享时间已经结束",msg:"视频分享时间已结束",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395546",description:"vtdu返回达到取流并发路数限制",msg:"并发上限,请升级为企业版",solution:"请升级为企业版,放开并发限制",updateTime:1522034841e3},{moduleCode:"",detailCode:"395547",description:"vtdu返回开放平台用户并发限制",msg:"并发上限,请升级为企业版",solution:"请确定开放平台用户预览是否超过用户并发数量限制",updateTime:1522034841e3},{moduleCode:"",detailCode:"395556",description:"ticket校验失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395557",description:"回放服务器等待流头超时",msg:"播放失败请重试",solution:"刷新重试,检测设备网络,重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"395558",description:"查找录像开始时间错误",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395560",description:"群组分享取流二次验证失败",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395561",description:"分享群组用户被锁住",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395562",description:"群组分享用户权限变更",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395563",description:"认证服务连接失败",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395564",description:"认证超时",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395566",description:"不在分享时间内预览",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395567",description:"分享通道被锁定",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395568",description:"未找到认证类型",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395569",description:"认证返回的参数异常",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395600",description:"分享设备不在分享时间内",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395601",description:"群组分享用户没权限",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395602",description:"群组分享权限变更",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395610",description:"接收流头失败",msg:"播放失败请重试并检查设备网络情况以及设备配置",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395620",description:"心跳超时",msg:"播放失败请重试并检查设备网络情况以及设备配置",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"395530",description:"机房故障不可用",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395701",description:"cas信令返回格式错误",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395702",description:"SPGW请求Cas、Status透传超时",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"395703",description:"SPGW请求http不通",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396001",description:"客户端参数出错",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396099",description:"客户端默认错误",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396101",description:"不支持的命令",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396102",description:"设备流头发送失败",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396103",description:"cas/设备返回错误1",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396104",description:"cas/设备返回错误-1",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396105",description:"设备返回错误码3",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396106",description:"设备返回错误码4",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396107",description:"设备返回错误码5",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396108",description:"cas信令回应重复",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396109",description:"视频广场取消分享",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396110",description:"设备信令默认错误",msg:"播放失败请重试",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396501",description:"设备数据链路和实际链路不匹配",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396502",description:"设备数据链路重复建立连接",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396503",description:"设备数据链路端口不匹配",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396504",description:"缓存设备数据链路失败(内存块不足)",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396505",description:"设备发送确认头消息重复",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396506",description:"设备数据先于确定头部到达",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396508",description:"设备数据头部长度非法",msg:"播放失败请重试或重启设备",solution:"刷新重试,或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"396509",description:"索引找不到设备数据管理块",msg:"播放失败请重试",solution:"刷新重试",updateTime:1522034841e3},{moduleCode:"",detailCode:"396510",description:"设备数据链路vtdu内存块协议状态不匹配",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396511",description:"设备数据头部没有streamkey错误",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396512",description:"设备数据头部非法(较笼统)",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396513",description:"设备数据长度过小",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396514",description:"设备老协议推流头部没有streamkey错误",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396515",description:"设备老协议推流数据非法",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396516",description:"设备老协议索引找不到内存管理块",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396517",description:"设备老协议推流数据非法",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396518",description:"设备数据包过大",msg:"播放失败请重试或重启设备",solution:"刷新重试,或者重启设备",updateTime:1522034841e3},{moduleCode:"",detailCode:"396519",description:"设备推流链路网络不稳定",msg:"播放失败,请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396520",description:"设备推流链路网络不稳定(默认)",msg:"播放失败请重试或重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396700",description:"异常数据包",msg:"播放失败,设备重启",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"396701",description:"回放结束数据包",msg:"回放结束",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397001",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397002",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397003",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397004",description:"与相应服务连接失败",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397005",description:"VTDU连接失败,或VTDU侧断开连接",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397006",description:"vtm断开连接(无需 关注)",msg:"播放失败请重试,请检查设备网络情况以及连接情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"397007",description:"客户端发送缓冲区满(上行带宽太小)",msg:"播放失败,上行带宽过小请检查设备网络情况",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399000",description:"无效包,包过大",msg:" 检查设备重启设备",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399001",description:"地址不合法",msg:"播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"399002",description:"缺少端口",msg:" 播放失败",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"170003",description:"refreshToken不存在",solution:"建议用户重新调用logout接口,然后调用openLoginPage接口重新启动登录页面登录",updateTime:1522034841e3},{moduleCode:"",detailCode:"170004",description:"refreshToken已过期",solution:"建议用户重新调用logout接口,然后调用openLoginPage接口重新启动登录页面登录",updateTime:1522034841e3},{moduleCode:"",detailCode:"380011",description:"设备隐私保护中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380045",description:"设备直连取流连接数量过大",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380047",description:"设备不支持该命令",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380077",description:"设备正在对讲中",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380102",description:"数据接收异常",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380205",description:"设备检测入参异常",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380209",description:"网络连接超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"380212",description:"设备端网络连接超时",solution:"",updateTime:1522034841e3},{moduleCode:"",detailCode:"101007",description:"手机号未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120503",description:"正在响铃",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390016",description:"vtdu成功响应未携带流头",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101008",description:"手机号码不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120504",description:"室内机正在通话",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390017",description:"无数据流,尚未使用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101009",description:"用户名与手机不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120505",description:"设备操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390018",description:"信令消息体PB解析失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101010",description:"获取验证码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120506",description:"非法命令",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390019",description:"信令消息体PB封装失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101011",description:"验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120507",description:"智能锁密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390020",description:"申请系统内存资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101012",description:"验证码失效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120508",description:"开关锁失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390021",description:"vtdu地址尚未获取到",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101013",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120509",description:"开关锁超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390022",description:"客户端尚未支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101014",description:"密码不正确或者appKey不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120510",description:"智能锁设备繁忙",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390023",description:"获取系统socket资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101015",description:"用户被锁住",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120511",description:"远程开锁功能未打开",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390024",description:"上层填充的StreamSsnId不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101021",description:"验证参数异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120600",description:"临时密码数已达上限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390025",description:"链接服务器失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101026",description:"邮箱已经被注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120601",description:"添加临时密码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390026",description:"客户端请求未收到服务端应答",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101031",description:"邮箱未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120602",description:"删除临时密码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390027",description:"链路断开",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101032",description:"邮箱不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120603",description:"该临时密码不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390028",description:"没有取流链接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101041",description:"获取验证码过于频繁",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120604",description:"指纹锁射频通信失败,请稍后再试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390029",description:"流成功停止",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101043",description:"手机验证码输入错误超过规定次数",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120605",description:"其他用户正在认证中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390030",description:"客户端防串流校验失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102000",description:"设备不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120606",description:"验证已启动,请在120s内进行本地验证和调用添加设备接口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390031",description:"应用层tcp粘包处理缓冲区满",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102001",description:"摄像机不存在",solution:"摄像机未注册到萤石云平台,请仔细检查摄像机的网络配置,确保连接到网络",updateTime:152203484e4},{moduleCode:"",detailCode:"120607",description:"删除用户失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390032",description:"无效状态迁移",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102003",description:"设备不在线",solution:"参考服务中心排查方法",updateTime:152203484e4},{moduleCode:"",detailCode:"120608",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390033",description:"无效客户端状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102004",description:"设备异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120609",description:"设备响应超时,门锁通信故障或者电量不足,请重试.",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390034",description:"向vtm取流流媒体信息请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102007",description:"设备序列号不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120610",description:"获取临时密码列表失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390035",description:"向代理取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"102009",description:"设备请求响应超时异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130001",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390036",description:"向代理保活取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105000",description:"设备已被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130002",description:"手机号码已经注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390037",description:"向vtdu取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105001",description:"设备已被别人添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130003",description:"手机验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390038",description:"向vtdu保活取流请求超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"105002",description:"设备验证码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"130004",description:"终端绑定操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391001",description:"vtm地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107001",description:"邀请不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"149999",description:"数据异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391002",description:"vtm生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107002",description:"邀请验证失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"150000",description:"服务器异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391003",description:"vtm设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107003",description:"邀请用户不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160000",description:"设备不支持云台控制",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391004",description:"vtm设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107004",description:"云存储连接失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160001",description:"用户无云台控制权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391005",description:"vtm解析服务器ip失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"7005",description:"VTDU主动断开连接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107005",description:"VTDU主动断开连接",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160002",description:"设备云台旋转达到上限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391006",description:"vtm描述符select失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107006",description:"不能邀请自己",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160003",description:"设备云台旋转达到下限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391007",description:"vtm文件描述符不在可读中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"107007",description:"重复邀请",solution:"分享和删除分享必须全部由接口形式操作,如果与萤石客户端混用会造成这个问题,解决办法:在萤石客户端清空所有相关分享数据并重新添加设备,再通过接口操作即可",updateTime:152203484e4},{moduleCode:"",detailCode:"160004",description:"设备云台旋转达到左限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391008",description:"vtm网络发生错误getsockopt",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110001",description:"参数错误",solution:"参数为空或者格式不对",updateTime:152203484e4},{moduleCode:"",detailCode:"160005",description:"设备云台旋转达到右限位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391009",description:"vtm描述符select超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110002",description:"accessToken异常或过期",solution:"accessToken有效期为七天,建议在accessToken即将过期或者出现10002错误码的时候重新获取accessToken",updateTime:152203484e4},{moduleCode:"",detailCode:"160006",description:"云台当前操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391101",description:"proxy地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110004",description:"用户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160007",description:"预置点个数超过最大值",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391102",description:"proxy生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110005",description:"appKey异常",solution:"确认appKey状态,不通过或者冻结状态会返回该错误码",updateTime:152203484e4},{moduleCode:"",detailCode:"160009",description:"正在调用预置点",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391103",description:"proxy设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110006",description:"ip受限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160010",description:"该预置点已经是当前位置",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391104",description:"proxy设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160011",description:"预置点不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391105",description:"proxy解析服务器ip失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110008",description:"签名错误",solution:"①获取签名方式详见apidemo及[旧]API文档 ②注意编码格式为UTF-8",updateTime:152203484e4},{moduleCode:"",detailCode:"160013",description:"设备版本已是最新",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391106",description:"proxy描述符select失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110009",description:"签名参数错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160014",description:"设备正在升级",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391107",description:"proxy文件描述符不在可读中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110010",description:"签名超时",solution:"请调用同步服务器时间接口进行校时",updateTime:152203484e4},{moduleCode:"",detailCode:"160015",description:"设备正在重启",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391108",description:"proxy网络发生错误getsockopt",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110011",description:"未开通萤石云服务",solution:"参照绑定流程",updateTime:152203484e4},{moduleCode:"",detailCode:"160016",description:"加密未开启,无须关闭",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391109",description:"proxy描述符select超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110012",description:"第三方账户与萤石账号已经绑定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160017",description:"设备抓图失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391201",description:"vtdu地址或端口非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110013",description:"应用没有权限调用此接口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160018",description:"设备升级失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391202",description:"vtdu生成文件描述符失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110014",description:"APPKEY下对应的第三方userId和phone未绑定",solution:"获取AccessToken时所用appKey与SDK所用appKey不一致",updateTime:152203484e4},{moduleCode:"",detailCode:"160019",description:"加密已开启",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"391203",description:"vtdu设置文件描述符非阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110017",description:"appKey不存在",solution:"请填写在官网申请的应用秘钥",updateTime:152203484e4},{moduleCode:"",detailCode:"160020",description:"不支持该命令",solution:"请确认设备是否支持该命令",updateTime:152203484e4},{moduleCode:"",detailCode:"391204",description:"vtdu设置文件描述符阻塞失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110018",description:"AccessToken与Appkey不匹配",solution:"请检查获取accessToken对应的appKey和SDK中设置的appKey是否一致",updateTime:152203484e4},{moduleCode:"",detailCode:"160023",description:"订阅操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110019",description:"密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160024",description:"取消订阅操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110020",description:"请求方法为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160025",description:"客流统计配置失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110021",description:"ticket校验失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160026",description:"设备处于隐私遮蔽状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110022",description:"透传目的地非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160027",description:"设备正在镜像操作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110024",description:"无透传权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160028",description:"设备正在键控动作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110025",description:"appKey被禁止使用通明通道",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160029",description:"设备处于语音对讲状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160030",description:"卡密输入错误次数过多,24小时后再输入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160031",description:"卡密信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160032",description:"卡密状态不对或已过期",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160033",description:"卡密非卖品,只能开通对应的绑定设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110030",description:"appKey和appSecret不匹配",solution:"请检查appKey和appSecret是否对应",updateTime:152203484e4},{moduleCode:"",detailCode:"160035",description:"购买云存储服务失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110031",description:"子账户或萤石用户没有权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160040",description:"添加的设备不在同一局域网",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110032",description:"子账户不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160041",description:"添加的设备被其他设备关联或响应超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110033",description:"子账户未设置授权策略",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160042",description:"添加的设备密码错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110034",description:"子账户已存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160043",description:"添加的设备超出最大数量",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110035",description:"获取子账户AccessToken异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160044",description:"添加的设备网络不可达超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110036",description:"子账户被禁用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160045",description:"添加的设备的IP和其他通道的IP冲突",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"110051",description:"无权限进行抓图",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160046",description:"添加的设备的IP和本设备的IP冲突",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160047",description:"码流类型不支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120002",description:"设备不存在",solution:"①设备没有注册到萤石云平台,请检查下设备网络参数,确保能正常连接网络②设备序列号不存在",updateTime:152203484e4},{moduleCode:"",detailCode:"160048",description:"带宽超出系统接入带宽",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120003",description:"参数异常,SDK版本过低",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160049",description:"IP或者端口不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120004",description:"参数异常,SDK版本过低",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160050",description:"添加的设备版本不支持需要升级才能接入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120005",description:"安全认证失败,需进行SDK安全认证",solution:"已去掉安全验证",updateTime:152203484e4},{moduleCode:"",detailCode:"160051",description:"添加的设备不支持接入",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120006",description:"网络异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160052",description:"添加的设备通道号出错",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120007",description:"设备不在线",solution:"参考服务中心排查方法",updateTime:152203484e4},{moduleCode:"",detailCode:"160053",description:"添加的设备分辨率不支持",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120008",description:"设备响应超时",solution:"设备响应超时,请检测设备网络或重试",updateTime:152203484e4},{moduleCode:"",detailCode:"160054",description:"添加的设备账号被锁定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120009",description:"子账号不能添加设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160055",description:"添加的设备取码流出错",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120010",description:"设备验证码错误",solution:"验证码在设备标签上,六位大写字母,注意大小写",updateTime:152203484e4},{moduleCode:"",detailCode:"160056",description:"删除设备失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120012",description:"设备添加失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160057",description:"删除的设备未关联",solution:"检查IPC与NVR是否有关联关系",updateTime:152203484e4},{moduleCode:"",detailCode:"120013",description:"设备已被别人添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160060",description:"地址未绑定",solution:"请前往官网设置直播",updateTime:152203484e4},{moduleCode:"",detailCode:"120014",description:"设备序列号不正确",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160061",description:"账户流量已超出或未购买,限制开通",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120015",description:"设备不支持该功能",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160062",description:"该通道直播已开通",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120016",description:"当前设备正在格式化",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160063",description:"直播未使用或直播已关闭",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120017",description:"设备已被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160070",description:"设备不能转移给自己",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120018",description:"该用户不拥有该设备",solution:"确认设备是否属于用户",updateTime:152203484e4},{moduleCode:"",detailCode:"160071",description:"设备不能转移,设备与其他设备存在关联关系",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400001",description:"参数为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120019",description:"设备不支持云存储服务",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160072",description:"设备不能转移,通道被分享给其他用户或者分享到视频广场",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400002",description:"参数错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120020",description:"设备在线,被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160073",description:"云存储转移失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400025",description:"设备不支持对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120021",description:"设备在线,但是未被用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160080",description:"当前正在声源定位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400029",description:"没有初始化或资源被释放",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120022",description:"设备在线,但是已经被别的用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160081",description:"当前正在轨迹巡航",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400030",description:"json解析异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120023",description:"设备不在线,未被用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160082",description:"设备正在响应本次声源定位",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400031",description:"网络异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120024",description:"设备不在线,但是已经被别的用户添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"160083",description:"当前正在开启隐私遮蔽",solution:"设备正在操作隐私遮蔽,无法进行当前操作",updateTime:152203484e4},{moduleCode:"",detailCode:"400032",description:"设备信息异常为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120025",description:"重复申请分享",solution:"确认设备是否由添加过该设备且申请过分享的账户下是否还存在分享记录",updateTime:152203484e4},{moduleCode:"",detailCode:"160084",description:"当前正在关闭隐私遮蔽",solution:"设备正在操作隐私遮蔽,无法进行当前操作",updateTime:152203484e4},{moduleCode:"",detailCode:"400034",description:"取流超时",solution:"一般是由于网络状况不好导致,可以尝试下让用户重新播放",updateTime:152203484e4},{moduleCode:"",detailCode:"120026",description:"视频广场不存在该视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"380290",description:" 连接CAS服务器失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400035",description:"设备已加密,需要输入验证码",solution:"收到此错误码,需要让用户输入验证码后,调用EZPlayer.setPlayKey传入验证码,并重新调用播放函数",updateTime:152203484e4},{moduleCode:"",detailCode:"120027",description:"视频转码失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361001",description:"对讲服务端排队超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400036",description:"播放验证码错误",solution:"收到此错误码,需要让用户输入验证码后,调用EZPlayer.setPlayKey传入验证码,并重新调用播放函数",updateTime:152203484e4},{moduleCode:"",detailCode:"120028",description:"设备固件升级包不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361002",description:"对讲服务端处理超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400037",description:"surfacehold错误",solution:"请检查是否是播放之前销毁了surface,收到此错误也可以重新建立surface后播放",updateTime:152203484e4},{moduleCode:"",detailCode:"120029",description:"设备不在线,但是已经被自己添加",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361003",description:"设备链接对讲服务器超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400100",description:"未知错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120030",description:"该用户不拥有该视频广场视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361004",description:"服务器内部错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400200",description:"player sdk出错,这种错误一般开发者也是无法解决,不具体分类传出,传一个统一的inner错误码出去",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120031",description:"开启终端绑定,硬件特征码验证失败",solution:"请在萤石客户端关闭终端绑定,参考此步骤",updateTime:152203484e4},{moduleCode:"",detailCode:"361005",description:"解析消息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400300",description:"内存溢出",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120032",description:"该用户下通道不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361006",description:"请求重定向--需要向其他服务申请对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400901",description:"设备不在线,可以提示用户",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120033",description:"无法收藏自己分享的视频",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361007",description:"请求url非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400902",description:"accesstoken异常或失效,需要重新获取accesstoken,并传入到sdk",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120034",description:"该用户下无设备",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361008",description:"token失效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400903",description:"当前账号开启了终端绑定,只允许指定设备登录操作,提示用户登录i.ys7.com解除终端绑定",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120090",description:"用户反馈失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361009",description:"设备验证码或者通信秘钥不匹配",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400904",description:"设备正在对讲中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120095",description:"APP包下载失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361010",description:"设备已经在对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"400905",description:"设备开启了隐私保护,不允许预览、对讲等",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120096",description:"APP包信息删除失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361011",description:"设备10s响应超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120101",description:"视频不支持分享给本人",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361012",description:"设备不在线",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320002",description:"参数无效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120102",description:"无相应邀请信息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361013",description:"设备开启隐私保护拒绝对讲",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320003",description:"暂不支持此操作",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120103",description:"好友已存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361014",description:"token无权限",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320004",description:"内存溢出",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120104",description:"好友不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361015",description:"设备返回session不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320005",description:"创建CAS session失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120105",description:"好友状态错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361016",description:"验证token其他异常错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320006",description:"创建cloud session失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120106",description:"对应群组不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361017",description:"服务端监听设备建立端口超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320007",description:"token失效",solution:"重新设置token后再重试",updateTime:152203484e4},{moduleCode:"",detailCode:"120107",description:"不能添加自己为好友",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361018",description:"设备链路异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320008",description:"token池里面没有token,请传入token",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120108",description:"当前用户和所添加用户不是好友关系",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361019",description:"对讲服务端不支持的信令消息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320009",description:"传入新的INIT_PARAM并reset(保留,目前未用)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120109",description:"对应分享不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361020",description:"对讲服务端解析对讲请求未携带会话描述能力集",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320010",description:"请重试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120110",description:"好友群组不属于当前用户",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361021",description:"对讲服务端优先能力集结果为空",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320011",description:"500毫秒后请重试",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120111",description:"好友不是等待验证状态",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361022",description:"cas链路异常",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320012",description:"token池已满",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120112",description:"添加应用下的用户为好友失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361023",description:"对讲服务端分配对讲会话资源失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320013",description:"P2P client超过限制",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120201",description:"操作报警信息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"361024",description:"对讲服务端解析信令消息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320014",description:"sdk未初始化",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120202",description:"操作留言信息失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390001",description:"通用错误返回",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320015",description:"超时",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120301",description:"根据UUID查询报警消息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390002",description:"入参为空指针",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320016",description:"正在打洞中",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120302",description:"根据UUID查询图片不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390003",description:"入参值无效",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320017",description:"没有视频文件头(播放器层面产生和处理此错误)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120303",description:"根据FID查询图片不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390004",description:"信令消息解析非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320018",description:"解码错误/超时(播放器层面产生和处理此错误)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120305",description:"设备ip解析错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390005",description:"内存资源不足",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320019",description:"取消(保留,用户不用处理)",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120401",description:"用户云空间信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390006",description:"协议格式不对或者消息体长度超过STREAM_MAX_MSGBODY_LEN",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320020",description:"播放过程中预连接被用户清除预操作信息",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120402",description:"云空间操作失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390007",description:"设备序列号长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320021",description:"流加密码不对",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120403",description:"用户目录不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390008",description:"取流url长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"320022",description:"未传入播放窗口",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120404",description:"要操作的目标目录不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390009",description:"解析vtm返回vtdu地址不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"100200",description:"操作成功",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120405",description:"要删除的文件信息不存在",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390010",description:"解析vtm返回级联vtdu地址不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101001",description:"用户名不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120406",description:"已开通云存储",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390011",description:"解析vtm返回会话标识长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101002",description:"用户名已被占用",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120407",description:"开通记录失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390012",description:"vtdu返回流头长度不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101003",description:"密码不合法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120500",description:"获取数据错误",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390013",description:"vtdu会话长度非法",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101004",description:"密码为同一字符",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120501",description:"开锁失败",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390014",description:"回调函数未注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"101006",description:"手机号码已经被注册",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"120502",description:"室内机未收到呼叫",solution:"",updateTime:152203484e4},{moduleCode:"",detailCode:"390015",description:"vtdu成功响应未携带会话标识",solution:"",updateTime:152203484e4}],is="200",rs="操作成功!",Yo={data:ns,code:is,msg:rs},Xo=function(){function f(u,n){fe(this,f),this.coreX=u,this.coreY=n,console.log("ErrorCode",Yo)}return dt(f,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"matchErrorInfo",value:function(n){return Yo.data.find(function(i){return i.detailCode.substr(-4)==n})}}]),f}(),os={color:"red",backgroundColor:"red",activeColor:"red",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-0",iconId:"deviceID",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"},{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-1",iconId:"deviceName",part:"left",defaultActive:1,isrender:1,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]},as={color:"blue",backgroundColor:"blue",activeColor:"blue",btnList:[{btnKey:"ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-footer-0",iconId:"play",part:"left",defaultActive:0,isrender:0,themeId:"934f270c08b14e928bf0c2ae8e1a937d"}]},Qo={header:os,footer:as},ds=function f(u){this.jsPlugin=u;var n={isMouseDown:!1,isOver:!1,mousePosition:null,oldTime:null,nowTime:null,moved:null,hoverTime:"2018-12-07 12:00:00",hoverLeft:0,timeTipShow:!1,randomNum:123,timeWidthTbls:[60,1800,3600,86400],timeUnits:["范围: 1分钟; 单位: 秒","范围: 30分钟; 单位: 分钟","范围: 1小时; 单位: 分钟","范围: 1天; 单位: 小时","范围: 3天; 单位: 小时"],drawPen:null,timeSection:[],canvasWidth:null,canvasHeight:null,timeTips:null},i=this;Object.keys(n).forEach(function(r){i[r]=n[r]}),this.options={width:this.canvasWidth,height:48,time:new Date().getTime(),timeSection:[],timeWidth:0},f.prototype.subTime=function(r){return r<10?"0"+r:r},f.prototype.tranTime=function(r){var a=r;if(r){var l=new Date(r);a=l.getFullYear()+"/"+(l.getMonth()+1)+"/"+l.getDate()+" "+this.subTime(l.getHours())+":"+this.subTime(l.getMinutes())+":"+this.subTime(l.getSeconds())}return a},f.prototype.init=function(r){r.width&&document.getElementById(r.id).setAttribute("width",parseInt(r.width,10)+"px");var a=this,l=this.options;a.randomNum=(Math.random()+"").split(".").join(""),a.timeWidthTblIndex=l.timeWidth;var s=document.querySelector("#".concat(this.jsPlugin.id,"-canvas"));a.drawPen=s.getContext("2d"),a.nowTime=l.time||Date.now(),a.timeSection=l.timeSection||[],a.canvasWidth=s.offsetWidth,a.canvasHeight=s.offsetHeight,a.updata(),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mousemove",function(b){a.options.readOnly||a.mousemove(b)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseover",function(b){a.options.readOnly||a.mouseover(b)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseleave",function(b){a.options.readOnly||a.mouseleave(b)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mousedown",function(b){a.options.readOnly||a.mousedown(b)}),document.getElementById("".concat(this.jsPlugin.id,"-canvas")).addEventListener("mouseup",function(b){if(!a.options.readOnly){var T=r.onChange;a.mouseUpFn(b,T)}})},f.prototype.setWidth=function(r){var a=this,l=this;r.width&&(document.getElementById(this.jsPlugin.id).style.width=r.width,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.width=r.width,document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.width=r.width,l.canvasWidth=r.width,setTimeout(function(){a.updata({time:new Date})},500))},f.prototype.mousemove=function(r){if(this.isMouseDown&&this.isOver){var a=this.mousePosition-r.pageX;if(a===0)return;var l=0;switch(this.timeWidth){case 60:l=1/10;break;case 1800:l=1/20*60;break;case 3600:l=1/20*60;break;case 86400:l=1/30*60*60;break}var s=new Date(this.oldTime).getTime()+a*l*1e3;this.updata({time:s}),this.moved=!0}else{var b=parseInt(document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).offsetLeft,10);this.mousePosition=r.pageX-b,this.updata()}},f.prototype.mousedown=function(r){this.isMouseDown=!0,this.mousePosition=r.pageX,this.oldTime=this.nowTime},f.prototype.mouseover=function(r){this.isOver=!0},f.prototype.mouseleave=function(r){this.isOver=!1,this.isMouseDown=!1,this.updata()},f.prototype.changeSize=function(r){console.log("changeSize",r),this.options.timeWidth=r,this.updata({timeWidth:r})},f.prototype.mouseUpFn=function(r,a){if(this.isMouseDown&&(this.isMouseDown=!1,this.moved)){this.moved=!1;var l=this.subTime(new Date(this.nowTime).getHours())+":"+this.subTime(new Date(this.nowTime).getMinutes())+":"+this.subTime(new Date(this.nowTime).getSeconds()),s=new Date(this.oldTime).getFullYear()+"/"+(new Date(this.oldTime).getMonth()+1)+"/"+new Date(this.oldTime).getDate();this.nowTime=new Date("".concat(s," ").concat(l)),this.updata({time:this.nowTime}),this.oldTime=this.nowTime,console.log("nowTime",new Date(this.nowTime),"".concat(s," ").concat(l)),a(this.nowTime)}},f.prototype.readOnly=function(r){console.log("更改为只读"),this.options.readOnly=!0,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.cursor="not-allowed"},f.prototype.unReadOnly=function(r){console.log("更改为只读"),this.options.readOnly=!1,document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.cursor="pointer"},f.prototype.run=function(r){this.isMouseDown||this.updata(r)},f.prototype.getTime=function(r){console.log("this",this),console.log("当前时间",new Date(this.nowTime))},f.prototype.updata=function(r){var a=this;r=r||{},a.nowTime=r.time||a.nowTime,a.timeSection=r.timeSection||a.timeSection,a.timeWidthTblIndex=r.timeWidth||a.timeWidthTblIndex,a.timeWidth=a.timeWidthTbls[r.timeWidth||a.timeWidthTblIndex],a.timeUnit=a.timeUnits[r.timeWidth||a.timeWidthTblIndex],r.timeWidth===0&&(a.timeWidthTblIndex=0,a.timeWidth=a.timeWidthTbls[0],a.timeUnit=a.timeUnits[0]),a.drawPen.fillStyle="#000000",a.drawPen.fillRect(0,0,a.canvasWidth,a.canvasHeight),a.drawScale(),a.drawRecord(),a.drawOtherMsg(),document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.width=a.options.width+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.width=a.options.width+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas-container")).style.height=a.options.height+"px",document.getElementById("".concat(this.jsPlugin.id,"-canvas")).style.height=a.options.height+"px"},f.prototype.drawSolidLine=function(r,a,l,s,b,T){this.drawPen.save(),this.drawPen.strokeStyle=T,this.drawPen.lineWidth=b,this.drawPen.beginPath(),this.drawPen.moveTo(r,a),this.drawPen.lineTo(l,s),this.drawPen.stroke(),this.drawPen.restore()},f.prototype.drawString=function(r,a,l,s,b){this.drawPen.font="12px serif",this.drawPen.fillStyle="#ffffff",this.drawPen.textAlign=s||"left",this.drawPen.fillText(r,a,l+10)},f.prototype.drawScale=function(){var r=this,a="rgba(255,255,255)",l=new Date(r.nowTime),s=l.getFullYear(),b=l.getSeconds(),T=l.getMinutes(),C=l.getHours(),y=l.getDate(),h=0;switch(r.timeWidth){case 60:{var D=parseInt(r.canvasWidth/10);l.setSeconds(l.getSeconds()-parseInt(D/2,10)),y=l.getDate(),C=l.getHours(),T=l.getMinutes(),b=l.getSeconds();for(var _=0;_<D;_++){if(h=b+_,l.setSeconds(h),h%10===0){r.drawSolidLine(_*r.canvasWidth/D,8,_*r.canvasWidth/D,r.canvasHeight/5+8,1,a);var E=this.subTime(l.getHours())+":"+this.subTime(l.getMinutes())+":"+this.subTime(l.getSeconds());r.drawString(E,_*r.canvasWidth/D,r.canvasHeight/5*2.5,"center","rgba(255,255,255,0.3)")}else r.drawSolidLine(_*r.canvasWidth/D,8,_*r.canvasWidth/D,r.canvasHeight/5*.5+8,1,a);l.setDate(y),l.setHours(C),l.setMinutes(T)}break}case 1800:{var D=parseInt(r.canvasWidth/20);l.setMinutes(l.getMinutes()-parseInt(D/2,10)),C=l.getHours(),T=l.getMinutes();for(var _=0;_<=D;_++){if(h=T+_,l.setMinutes(h),h%5===0){r.drawSolidLine(_*r.canvasWidth/D,8,_*r.canvasWidth/D,r.canvasHeight/5*1.5+8,1,a);var E=this.subTime(l.getHours())+":"+this.subTime(l.getMinutes());r.drawString(E,_*r.canvasWidth/D,r.canvasHeight/5*2.5,"center","rgba(255,255,255,0.3)")}else r.drawSolidLine(_*r.canvasWidth/D,8,_*r.canvasWidth/D,r.canvasHeight/5*.5+8,1,a);l.setHours(C)}break}case 3600:{var D=parseInt(r.canvasWidth/20);l.setMinutes(l.getMinutes()-parseInt(D/2,10)),C=l.getHours(),T=l.getMinutes();for(var _=0;_<=D;_++){if(h=T+_,l.setMinutes(h),h%10===0){r.drawSolidLine(_*r.canvasWidth/D,8,_*r.canvasWidth/D,r.canvasHeight/5*1.5+8,1,a);var E=this.subTime(l.getHours())+":"+this.subTime(l.getMinutes());r.drawString(E,_*r.canvasWidth/D,r.canvasHeight/5*2.5,"center","rgba(255,255,255,0.3)")}else r.drawSolidLine(_*r.canvasWidth/D,8,_*r.canvasWidth/D,r.canvasHeight/5*.5+8,1,a);l.setHours(C)}break}case 86400:{var D=parseInt(r.canvasWidth/30);l.setHours(l.getHours()-parseInt(D/2,10)),b=l.getSeconds(),T=l.getMinutes(),C=l.getHours(),y=l.getDate(),s=l.getFullYear();for(var _=0;_<=D;_++){h=C+_,l.setHours(h);var E;E=this.subTime(l.getHours())+":00",r.drawSolidLine(_*r.canvasWidth/D,8,_*r.canvasWidth/D,r.canvasHeight/5*.5+8,1,a),h%2===0&&r.drawString(E,_*r.canvasWidth/D,r.canvasHeight/5*2,"center","rgba(255,255,255,0.3)"),l.setFullYear(s),l.setDate(y),l.setHours(C)}break}}},f.prototype.getRecord=function(r,a,l){this.timeSection=r,this.drawRecord()},f.prototype.drawRecord=function(){for(var r=this.timeSection||[],a=this,l=a.drawPen,s=0;s<r.length;s++){var b=C(r[s].startTime),T=C(r[s].endTime);l.fillStyle="#1890ff80",l.fillRect(b,0,T-b,48)}function C(y){var h=10;switch(a.timeWidth){case 60:h=10;break;case 1800:h=20/60;break;case 3600:h=20/60;break;case 86400:h=20/60/60;break}var D=a.canvasWidth/2,_=D+(y-a.nowTime)/1e3*h;return _>a.canvasWidth&&(_=a.canvasWidth),_<=0&&(_=0),_}},f.prototype.drawOtherMsg=function(){this.drawSolidLine(this.canvasWidth/2,0,this.canvasWidth/2,this.canvasHeight,2,"#1890FF"),this.drawPen.shadowBlur=0,this.isOver&&!this.isMouseDown?(this.mouseTime=this.mousePosition/this.canvasWidth*this.timeWidth*1e3+this.nowTime-this.timeWidth/2*1e3,this.mouseString=this.tranTime(this.mouseTime),this.hoverTime=this.mouseString,this.hoverLeft=this.mousePosition-60,this.timeTipShow=!0):this.timeTipShow=!1}},ls=function(){function f(u){if(fe(this,f),this.jSPlugin=u,!document.getElementById("".concat(this.jSPlugin.id,"-audioControls")))return!1;this.currentTimeWidth=0,this.date=new Date,this.datepickerVisible=!1,this.seekTimer=null,this.disabled=!1,this.seekFrequency=2e3,this.jSPlugin.params&&this.jSPlugin.params.seekFrequency&&(this.seekFrequency=this.jSPlugin.params.seekFrequency),this.recInit()}return dt(f,[{key:"recInit",value:function(){var n=this;this.currentTimeWidth=0;var i=parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width,10)-100,r=document.createElement("div");r.style="display:inline-block;height:48px;",r.id=this.jSPlugin.id+"-canvas-container";var a=document.createElement("canvas");a.id=this.jSPlugin.id+"-canvas",a.className="time-line-body",a.height="48",a.width=i,a.style="display:inline-block;",a.innerHTML="该浏览器不支持canvas",r.appendChild(a),Wn(r,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")));var l=document.createElement("div");l.className="timeline-controls",l.style="display:flex;width:100px;height:48px;text-align:center;line-height: 48px;vertical-align: top;background: #000000;";var s=`
|
|
|
<div class="timeline-controls-scale" style="display: inline-flex;flex-direction: column;justify-content: center;vertical-align: top;padding: 0 20px;">
|
|
|
<span style="vertical-Align: middle;line-height: 14px;height: 18px; width: 18px;cursor:pointer;" id="`.concat(this.jSPlugin.id,`-timeline-scale-add">
|
|
|
<svg fill="#2C2C2C" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"
|
|
|
viewBox="0 0 20 20">
|
|
|
<title>add</title>
|
|
|
<g>
|
|
|
<polygon points="0.1,0.5 15,0.5 15,15.4 0.1,15.4 " />
|
|
|
</g>
|
|
|
<g>
|
|
|
<path
|
|
|
fill="#FFFFFF";
|
|
|
d="M7.6,12.4c-0.3,0-0.5-0.2-0.5-0.5v-8c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v8C8.1,12.2,7.9,12.4,7.6,12.4z" />
|
|
|
</g>
|
|
|
<g>
|
|
|
<path
|
|
|
fill="#FFFFFF";
|
|
|
d="M11.6,8.4h-8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h8c0.3,0,0.5,0.2,0.5,0.5S11.8,8.4,11.6,8.4z" />
|
|
|
</g>
|
|
|
</svg>
|
|
|
</span>
|
|
|
<span style="vertical-Align: middle;line-height: 14px;height: 18px; width: 18px;cursor:pointer;" id="`).concat(this.jSPlugin.id,`-timeline-scale-sub">
|
|
|
<svg fill="#2C2C2C" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"
|
|
|
viewBox="0 0 20 20">
|
|
|
<title>reduce</title>
|
|
|
<g>
|
|
|
<polygon class="st0" points="1,0.8 15.2,0.8 15.2,15 1,15 " />
|
|
|
</g>
|
|
|
<g>
|
|
|
<path class="st1"
|
|
|
fill="#FFFFFF";
|
|
|
d="M12.1,8.4h-8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h8c0.3,0,0.5,0.2,0.5,0.5S12.4,8.4,12.1,8.4z" />
|
|
|
</g>
|
|
|
</svg>
|
|
|
</span>
|
|
|
</div>
|
|
|
<label for="`).concat(this.jSPlugin.id,`-datepicker">
|
|
|
<div class="timeline-controls-date">
|
|
|
<span>
|
|
|
<svg fill="#2C2C2C" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20"
|
|
|
viewBox="0 0 20 20">
|
|
|
<title>ifttt</title>
|
|
|
<g id="Rectangle">
|
|
|
<rect x="0.6" y="0.9" class="st0" width="20" height="20" />
|
|
|
</g>
|
|
|
<g id="Stroke-1">
|
|
|
<path fill="#FFFFFF"; class="st1"
|
|
|
d="M14,7.2c-0.3,0-0.5-0.2-0.5-0.5V3.4c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v3.3C14.5,7,14.2,7.2,14,7.2z" />
|
|
|
</g>
|
|
|
<g id="Stroke-3">
|
|
|
<path fill="#FFFFFF"; class="st1"
|
|
|
d="M7.3,7.2C7,7.2,6.8,7,6.8,6.7V3.4c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v3.3C7.8,7,7.6,7.2,7.3,7.2z" />
|
|
|
</g>
|
|
|
<g id="Stroke-5">
|
|
|
<path fill="#FFFFFF"; class="st1"
|
|
|
d="M18.1,9.7h-15c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h15c0.3,0,0.5,0.2,0.5,0.5S18.4,9.7,18.1,9.7z" />
|
|
|
</g>
|
|
|
<g id="Stroke-7">
|
|
|
<path fill="#FFFFFF"; class="st1" d="M16.5,19.7H4.8c-1.2,0-2.2-1-2.2-2.2V6.7c0-1.2,1-2.2,2.2-2.2h11.7c1.2,0,2.2,1,2.2,2.2v10.8
|
|
|
C18.6,18.8,17.7,19.7,16.5,19.7z M4.8,5.6c-0.6,0-1.2,0.5-1.2,1.2v10.8c0,0.6,0.5,1.2,1.2,1.2h11.7c0.6,0,1.2-0.5,1.2-1.2V6.7
|
|
|
c0-0.6-0.5-1.2-1.2-1.2H4.8z" />
|
|
|
</g>
|
|
|
<g id="Stroke-9">
|
|
|
<path fill="#FFFFFF"; class="st1" d="M10.6,13.3c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5s0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7
|
|
|
S11,13.3,10.6,13.3z" />
|
|
|
</g>
|
|
|
<g id="Stroke-11">
|
|
|
<path fill="#FFFFFF"; class="st1" d="M14.8,13.3c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2c0.4,0,0.7,0.3,0.7,0.7
|
|
|
S15.2,13.3,14.8,13.3z M14.8,12.3c-0.2,0-0.3,0.1-0.3,0.3c0,0.2,0.3,0.4,0.5,0.2c0.1-0.1,0.1-0.1,0.1-0.2
|
|
|
C15.1,12.4,15,12.3,14.8,12.3z" />
|
|
|
</g>
|
|
|
<g id="Stroke-13">
|
|
|
<path fill="#FFFFFF"; class="st1" d="M6.5,16.6c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7
|
|
|
C7.2,16.3,6.9,16.6,6.5,16.6z" />
|
|
|
</g>
|
|
|
<g id="Stroke-15">
|
|
|
<path fill="#FFFFFF"; class="st1" d="M10.6,16.6c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7
|
|
|
C11.4,16.3,11,16.6,10.6,16.6z" />
|
|
|
</g>
|
|
|
</svg>
|
|
|
</span>
|
|
|
</div>
|
|
|
</label>
|
|
|
<input autocomplete="off" data-toggle="`).concat(this.jSPlugin.id,'-datepicker" id="').concat(this.jSPlugin.id,'-datepicker" name="').concat(this.jSPlugin.id,`-datepicker" style="opacity:0;width:24px;margin-left:-24px;cursor:pointer;" />
|
|
|
`);l.innerHTML=s,Wn(l,r),this.timeLine=new ds(this.jSPlugin),this.timeLine.init({id:this.jSPlugin.id+"-canvas",width:i,onChange:function(h){console.log("time",h,new Date(h).Format("yyyyMMddhhmmss"));var D=new Date(h).Format("yyyyMMddhhmmss");if(console.log("----------------this.jSPlugin.url",n.jSPlugin.url),Ke(n.jSPlugin.url).type==="cloud.rec"||n.jSPlugin.capacity&&n.jSPlugin.capacity.support_seek_playback=="1"){var _=function(){n.jSPlugin.seek(D.substr(8,6),"235959"),n.unSyncTimeLine(),setTimeout(function(){n.syncTimeLine()},6e3)};n.seekTimer?clearTimeout(n.seekTimer):_(),n.seekTimer=setTimeout(function(){_(),clearTimeout(n.seekTimer),n.seekTimer=null},n.seekFrequency)}else{var E=function(){setTimeout(function(){n.disabled=!1},n.seekFrequency)},w=function(S){n.disabled=!0,n.jSPlugin.pause().then(function(){console.log("暂停成功"),n.jSPlugin.resume(D).then(function(d){console.log("恢复成功:",d),n.jSPlugin.Theme&&n.jSPlugin.Theme.setDecoderState({play:!0}),n.jSPlugin.Theme&&n.jSPlugin.Theme.decoderState.state.sound&&n.jSPlugin.openSound(),S&&S()}).catch(function(d){console.log("恢复失败",d)})}).catch(function(){console.log("暂停失败"),n.jSPlugin.resume(D).then(function(d){console.log("恢复成功"),n.jSPlugin.Theme&&n.jSPlugin.Theme.setDecoderState({play:!0}),S&&S()}).catch(function(d){console.log("恢复失败",d)})})};n.disabled?(console.log("操作频繁,等待2秒后执行"),n.seekTimer&&clearTimeout(n.seekTimer),n.seekTimer=setTimeout(function(){w(E)},n.seekFrequency)):w(E)}}}),this.syncTimeLine(),Mt("".concat(this.jSPlugin.staticPath,"/rec/datepicker.min.css")),ut("".concat(this.jSPlugin.staticPath,"/rec/jquery.min.js"),function(){ut("".concat(n.jSPlugin.staticPath,"/rec/datepicker.js"),function(){ut("".concat(n.jSPlugin.staticPath,"/rec/datepicker.zh-CN.js"),function(){!document.getElementsByClassName("datepicker-container")[0]&&$("#".concat(n.jSPlugin.id,"-datepicker")).datepicker&&$("#".concat(n.jSPlugin.id,"-datepicker")).datepicker({autoShow:!1,autoHide:!0,autoPick:!0,language:"zh-CN",date:new Date(et("begin",n.jSPlugin.params.url).replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"))||new Date,format:"yyyy-mm-dd",endDate:new Date,inline:!0,container:document.getElementById("".concat(n.jSPlugin.id,"-wrap"))}),document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),n.datepickerVisible=!1,$("#".concat(n.jSPlugin.id,"-datepicker")).on("pick.datepicker",function(y){console.log("重新选择日期",y.date,new Date(y.date).Format("yyyyMMdd"),new Date(document.getElementById("".concat(n.jSPlugin.id,"-datepicker")).value).Format("yyyyMMdd")),y.date>new Date||new Date(y.date).Format("yyyyMMdd")===new Date(document.getElementById("".concat(n.jSPlugin.id,"-datepicker")).value).Format("yyyyMMdd")?y.preventDefault():(document.getElementById("".concat(n.jSPlugin.id,"-datepicker")).value=new Date(y.date).Format("yyyy-MM-dd"),n.renderRec(y.date),n.jSPlugin.decoderState&&n.jSPlugin.decoderState.state?n.jSPlugin.decoderState.state.cloudRec?n.jSPlugin.changePlayUrl({begin:new Date(y.date).Format("yyyyMMdd"),type:"cloud.rec"}):n.jSPlugin.decoderState.state.rec?n.jSPlugin.changePlayUrl({begin:new Date(y.date).Format("yyyyMMdd"),type:"rec"}):n.jSPlugin.changePlayUrl({begin:new Date(y.date).Format("yyyyMMdd")}):n.jSPlugin.changePlayUrl({begin:new Date(y.date).Format("yyyyMMdd")})),document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),n.datepickerVisible=!1,n.jSPlugin.decoderState&&n.jSPlugin.decoderState&&n.jSPlugin.decoderState.state&&n.jSPlugin.decoderState.state.zoom&&(n.jSPlugin.setDecoderState({zoom:!1}),n.jSPlugin.Zoom.stopZoom())}),$("#".concat(n.jSPlugin.id,"-datepicker")).off("click").on("click",function(y){console.log("点击日期"),n.datepickerVisible?document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"):document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="inline"),n.datepickerVisible=!n.datepickerVisible})})})}),document.getElementById("".concat(this.jSPlugin.id,"-timeline-scale-add")).onclick=function(){var y=n.currentTimeWidth;y<3&&n.timeLine.changeSize(++n.currentTimeWidth)},document.getElementById("".concat(this.jSPlugin.id,"-timeline-scale-sub")).onclick=function(){var y=n.currentTimeWidth;y>0&&n.timeLine.changeSize(--n.currentTimeWidth)};var b=et("begin",this.jSPlugin.url)||new Date().Format("yyyyMMdd");this.renderRec("".concat(b.slice(0,4),"-").concat(b.slice(4,6),"-").concat(b.slice(6,8))),this.observer=new MutationObserver(function(y,h){n.recAutoSize()});var T={attributes:!0,attributeOldValue:!0,attributeFilter:["style"]},C=document.getElementById("".concat(this.jSPlugin.id));this.observer.observe(C,T)}},{key:"setDatepickerDate",value:function(n){if(document.getElementsByClassName("datepicker-container")[0]){var i=document.getElementsByClassName("datepicker-container")[0],r=i.parentNode;r.removeChild(i),document.getElementById("".concat(this.jSPlugin.id,"-datepicker")).value=n.replace(/(\d{4})(\d{2})(\d{2})/,"$1-$2-$3"),$("#".concat(this.jSPlugin.id,"-datepicker")).datepicker({autoShow:!1,autoHide:!0,autoPick:!0,language:"zh-CN",defaultDate:n,format:"yyyy-mm-dd",endDate:new Date,inline:!0,container:document.getElementById("".concat(this.jSPlugin.id,"-wrap"))})}}},{key:"datepickerHide",value:function(){document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="none"),this.datepickerVisible=!1}},{key:"datepickerShow",value:function(){document.getElementsByClassName("datepicker-container")[0]&&(document.getElementsByClassName("datepicker-container")[0].style.display="inline"),this.datepickerVisible=!0}},{key:"recAutoSize",value:function(){var n=this;if(document.getElementById("".concat(this.jSPlugin.id,"-canvas"))){var i=parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width,10)-100;i!==parseInt(document.getElementById("".concat(this.jSPlugin.id,"-canvas")).width)&&(document.getElementById("".concat(this.jSPlugin.id,"-canvas")).width=i,this.timeLine.init({id:"".concat(this.jSPlugin.id,"-canvas"),width:i,onChange:function(a){console.log("time",a,new Date(a).Format("yyyyMMddhhmmss")),console.log("jSPlugin",n.jSPlugin);var l=new Date(a).Format("yyyyMMddhhmmss");n.jSPlugin.changePlayUrl({begin:l})}}),this.renderRec(this.date),this.syncTimeLine())}}},{key:"syncTimeLine",value:function(){var n=this;this.jSPlugin.recTimer&&clearInterval(this.jSPlugin.recTimer),this.jSPlugin.recTimer=setInterval(function(){var i=n.jSPlugin.getOSDTime();i.then(function(r){var a=r.data;a===-1?console.log("获取播放时间错误"):a>0&&n.timeLine.run({time:new Date(a>1e12?a:a*1e3)})}).catch(function(r){})},1e3)}},{key:"unSyncTimeLine",value:function(){this.jSPlugin.recTimer&&clearInterval(this.jSPlugin.recTimer)}},{key:"renderRec",value:function(n){var i=this;this.date=n;var r=this,a=new Date(new Date(n).Format("yyyy-MM-dd 00:00:00").replace(/-/g,"/")).getTime(),l=new Date(new Date(n).Format("yyyy-MM-dd 23:59:59").replace(/-/g,"/")).getTime();this.timeLine.getRecord([],a,l),console.log("-----------233---------this.jSPlugin.url",this.jSPlugin.url);var s={accessToken:this.jSPlugin.accessToken,recType:Ke(this.jSPlugin.url).type==="cloud.rec"?1:2,deviceSerial:Ke(this.jSPlugin.url).deviceSerial,channelNo:Ke(this.jSPlugin.url).channelNo,startTime:a,endTime:l,version:"2.0"},b=function(y){if(y.data&&y.data.files&&y.data.files.length>0){var h=y.data.files,D=new Date().getTime(),_=y.data.isAll;if(_)i.timeLine.getRecord(h,a,l);else{var E=function w(){function z(S){S.data&&S.data.files&&S.data.files.length>0?S.data.isAll==!1?(S.data.files&&(h=h.concat(S.data.files)),D=S.data.nextFileTime>0?S.data.nextFileTime:new Date().getTime(),w()):(console.log("云存储执行渲染片段"),r.timeLine.getRecord(h,a,l)):r.timeLine.getRecord(h,a,l)}s.startTime=D,Gn(this.jSPlugin.env.domain+"/api/lapp/video/by/time","POST",s,"",z)};E()}i.timeLine.run({time:new Date(a)})}else y.data&&y.data.length>0&&(console.log("获取本地录像片段成功",y),r.timeLine.getRecord(y.data,a,l),r.timeLine.run({time:new Date(a)}))},T=this.jSPlugin.env.domain+"/api/lapp/video/by/time";Gn(T,"POST",s,"",b)}}]),f}(),sn=function(u){console.log("执行TimeLine - params",u),this.state={id:u.id,start:"00:00:00",end:"24:00:00",current:0,timelag:30,timeArr:[],availTimeLine:[],scrollTop:0,index:0,date:"",noTimeLineTxt:"",disabled:!1};var n=this;this.setState=function(i){Object.keys(i).forEach(function(r){n.state[r]=i[r],r==="scrollTop"&&document.getElementById("time-line-item").parentNode.scrollTo(0,i[r]),r==="current"&&(document.getElementById("time-line-current").innerHTML=i[r])})},this.setDisabled=function(i){this.setState({disabled:i}),document.getElementById("time-line-item").parentNode.style.overflowY=i?"hidden":"scroll"},this.timeToSecond=function(i){var r=i.split(":"),a=Number(r[0]),l=Number(r[1]),s=Number(r[2]);return a*60*60+l*60+(s||0)},this.minuteToTime=function(i){var r=Math.floor(i/60),a=i%60;return(r>9?r:"0"+r)+":"+(a>9?a:"0"+a)},this.timeToMinute=function(i){var r=i.split(":"),a=Number(r[0]),l=Number(r[1]);return a*60+l},this.getPalyParam=u.getPalyParam,document.getElementById("time-line-item").parentNode.ontouchstart=function(){if(n.state.disabled)return!1;u.ontouchstart()},document.getElementById("time-line-item").parentNode.ontouchmove=function(){if(n.state.disabled)return!1;u.ontouchmove()},document.getElementById("time-line-item").parentNode.ontouchend=function(){if(n.state.disabled)return!1;var i,r=new Promise(function(a,l){var s=-1;i=setInterval(function(){var b=document.getElementById("time-line-item").parentNode.scrollTop;b!==s?(console.log("scolling",b,s),s=b):(console.log("scoll stop",b,s),clearInterval(i),a(b))},100)});r.then(function(a){console.log("scollPromise: then",a,n),n.rectTopTotime(a),console.log("页面滚动实际高度",a,n.state),n.getPalyParam({current:n.state.current})}),u.ontouchend()},this.matchTimeDot()};sn.prototype.changeScale=function(f){this.setState({timelag:f}),this.matchTimeDot()},sn.prototype.setDateLine=function(f,u){f.length>0?(typeof u=="undefined"&&(u=f.length-1),this.setState({availTimeLine:f,start:f[u].st,end:f[u].et,current:f[u].st}),console.log("this.state",this.state),this.matchRecTimeDot(),this.primaryOffsetH()):(this.setState({availTimeLine:[]}),console.log("this.state",this.state),this.matchRecTimeDot())},sn.prototype.matchTimeDot=function(){var f=this.state,u=f.start,n=f.end,i=f.timelag;f.availTimeLine,console.log("start",u,"end",n);var r=[],a=this.timeToMinute(n);a=Math.floor(a/i)*i;for(var l=a;l>=0;){var s=0,b=0,T=[];l==a&&(s=70),l==0&&(b=230);var C=this.minuteToTime(l);r.push({id:l,current:C,label:"a"+l,marginTop:s,marginBottom:b,recArr:T}),l=l-i}this.setState({timeArr:r}),this.renderDateLine()},sn.prototype.matchRecTimeDot=function(){var f=this.state,u=f.start,n=f.end,i=f.timelag,r=f.availTimeLine,a=f.timeArr;console.log("start",u,"end",n);var l=[],s=r.length;if(s===0)for(var b=0;b<a.length;b++)a[b].recArr=[];else{for(var T=0;T<a.length;T++)a[T].recArr=[];for(var C=0;C<s;C++){var y=r[C],h=this.timeToSecond(y.st),D=this.timeToSecond(y.et),_=void 0,E=void 0,w=0,z=0;_=Math.floor(h/(i*60))*i,w=(h-_*60)/i,E=Math.floor(D/(i*60))*i,z=(D-E*60)/i,l[C]={st:_,et:E,stAvailPercent:w,etAvailPercent:z};for(var b=0;b<a.length;b++)if(a[b].id==_&&a[b].id==E){var S=z-w,d=60-z;a[b].recArr.push({height:S,top:d})}else a[b].id==_?a[b].recArr.push({height:60-w,top:0}):a[b].id==E?a[b].recArr.push({height:z,top:60-z}):a[b].id>_&&a[b].id<E&&a[b].recArr.push({height:60,top:0})}}console.log("availArr: ",l),this.setState({timeArr:a}),console.log("timeArr:",this.state),this.renderDateLine()},sn.prototype.renderDateLine=function(){var f=this.state,u=f.id,n=f.timeArr;console.log("id,timeArr",u,n);var i=document.getElementById("time-line-item");i.innerHTML="",n.forEach(function(r,a){var l=document.createElement("div");l.setAttribute("class","time-item"),l.style="margin-top: ".concat(r.marginTop,"px; margin-bottom: ").concat(r.marginBottom,"px; border-right-color: ").concat(r.borderColor,";");var s=document.createElement("div");s.setAttribute("class","scale");var b='<div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale" style="width:10px"></div>';r.recArr.forEach(function(T,C){b+='<div class="item-unavail" style="height: '.concat(T.height,"px;background-color:#A8B9ED; top: ").concat(T.top,'px"></div>')}),b+="<div id=".concat(r.label,' style="position: relative; top: 51px; left: 40%"> ').concat(r.current,"</div>"),l.innerHTML=b,i.appendChild(l)})},sn.prototype.primaryOffsetH=function(){var f=this.state,u=f.start,n=f.timelag,i=f.timeArr,r=i[0].current,a=this.timeToSecond(r),l=this.timeToSecond(u),s=a-l,b=Math.ceil(s/n)+60;this.setState({scrollTop:b}),console.log("起始偏移量",b)},sn.prototype.currentOffsetH=function(){var f=this.state,u=f.current,n=f.timelag,i=f.timeArr,r=i[0].current,a=this.timeToSecond(r),l=this.timeToSecond(u),s=a-l,b=Math.ceil(s/n)+60;this.setState({scrollTop:b})},sn.prototype.rectTopTotime=function(f){var u=this.state.timelag,n=Math.floor(f/60),i=f-n*60,r,a;if(console.log("index:",n,"offsetH:",i),i==0)r=this.state.timeArr[n-1].current,a=0;else{var l=this.state.timeArr[n].current,s=this.timeToMinute(l),b=60-i,T=b*u,C=Math.floor(T/60)+s,y=Math.floor(T/60)*60;a=Math.ceil(T-y),r=this.minuteToTime(C)}this.setState({current:r+":"+(a>9?a:"0"+a),scrollTop:f})},sn.prototype.stepScrollTimeLine=function(f){this.setState({current:f}),this.currentOffsetH()},sn.prototype.secondCountDown=function(f){var u=this.state.current,n=u.split(":"),i=Number(n[0]),r=Number(n[1]),a=Number(n[2]),l=i*60*60+r*60+a+1,s=Math.floor(l/3600),b=Math.floor((l-s*3600)/60),T=l-s*3600-b*60;this.setState({current:(s>9?s:"0"+s)+":"+(b>9?b:"0"+b)+":"+(T>9?T:"0"+T)})};var ss=sn;Date.prototype.Format=function(f){var u={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(f)&&(f=f.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in u)new RegExp("("+n+")").test(f)&&(f=f.replace(RegExp.$1,RegExp.$1.length==1?u[n]:("00"+u[n]).substr((""+u[n]).length)));return f};function ea(f){var u=new Date(f),n=u.getHours(),i=u.getMinutes(),r=u.getSeconds();return(n>9?n:"0"+n)+":"+(i>9?i:"0"+i)+":"+(r>9?r:"0"+r)}var cs=function(){function f(u,n,i){var r=this;fe(this,f),this.changeRecSpeed=n,this.resetMobileZoomStatus=i,this.isMobile=!0,this.jSPlugin=u,this.timer=null,this.date=new Date().Format("yyyy-MM-dd"),this.begin=(new Date().Format("yyyy-MM-dd")+" 00:00:00").replace(/-/g,"/"),this.end=(new Date().Format("yyyy-MM-dd")+" 23:59:59").replace(/-/g,"/"),this.initBegin=null,this.initEnd=null,this.type=Ke(this.jSPlugin.url).type,this.operating=!1,this.seekTimer=null,this.disabled=!1,this.seekFrequency=2e3,this.jSPlugin.params&&this.jSPlugin.params.seekFrequency&&(this.seekFrequency=this.jSPlugin.params.seekFrequency);var a=document.createElement("style");if(a.innerHTML=`
|
|
|
body{
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
.time-line-container {
|
|
|
text-align: left;
|
|
|
height: 300px;
|
|
|
/* outline: 1px solid red; */
|
|
|
/* background: gray; */
|
|
|
position: relative;
|
|
|
/* padding-top: 60px; */
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
|
|
|
.time-line-container .time-line-item-container {
|
|
|
display: inline-block;
|
|
|
/* height: 400px; */
|
|
|
width: 30%;
|
|
|
/* background: indianred; */
|
|
|
overflow-y: scroll;
|
|
|
overflow-x: hidden;
|
|
|
/* padding-top: 60px; */
|
|
|
height: 300px;
|
|
|
box-sizing: border-box;
|
|
|
white-space: nowrap;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.time-line-container .time-line-item-container::-webkit-scrollbar {
|
|
|
width: 0px;
|
|
|
/*滚动条宽度*/
|
|
|
height: 0px;
|
|
|
/*滚动条高度*/
|
|
|
}
|
|
|
|
|
|
.time-line-item .time-item {
|
|
|
position: relative;
|
|
|
box-sizing: border-box;
|
|
|
height: 60px;
|
|
|
font-size: 12px;
|
|
|
color: rgb(150, 150, 150);
|
|
|
border-right: 6px solid;
|
|
|
border-right-color: #ddd;
|
|
|
}
|
|
|
|
|
|
.time-line-item .time-item .scale {
|
|
|
width: 6px;
|
|
|
height: 9px;
|
|
|
border-bottom: 1px solid #ccc;
|
|
|
float: right;
|
|
|
clear: both;
|
|
|
}
|
|
|
|
|
|
.time-line-item .time-item .item-unavail {
|
|
|
width: 6px;
|
|
|
position: absolute;
|
|
|
left: 100%;
|
|
|
background-color: #ddd;
|
|
|
}
|
|
|
|
|
|
.time-line-container .current-time {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 40px;
|
|
|
height: 29px;
|
|
|
/* line-height: 58px; */
|
|
|
border-bottom: 1px solid #648FFC;
|
|
|
width: 60%;
|
|
|
margin-left: 26%;
|
|
|
}
|
|
|
|
|
|
.time-line-container .current-time .current-time-bg {
|
|
|
position: relative;
|
|
|
top: 15px;
|
|
|
width: 100px;
|
|
|
height: 29px;
|
|
|
line-height: 29px;
|
|
|
left: -70px;
|
|
|
font-size: 12px;
|
|
|
color: #2C2C2C;
|
|
|
}
|
|
|
|
|
|
.time-line-container .current-time .current-time-bg::before {
|
|
|
content: '';
|
|
|
display: inline-block;
|
|
|
width: 6px;
|
|
|
height: 6px;
|
|
|
border-radius: 100%;
|
|
|
background: #648FFC;
|
|
|
top: 11px;
|
|
|
position: absolute;
|
|
|
right: 30px;
|
|
|
}
|
|
|
|
|
|
.date-switch-container {
|
|
|
height: 40px;
|
|
|
position: relative;
|
|
|
text-align: center;
|
|
|
margin: 20px 10px;
|
|
|
}
|
|
|
|
|
|
.date-switch-container .current-date {
|
|
|
line-height: 40px;
|
|
|
height: 22px;
|
|
|
font-size: 16px;
|
|
|
color: #2C2C2C;
|
|
|
text-align: center;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.date-container {
|
|
|
width: 40px;
|
|
|
height: 40px;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
top: 0;
|
|
|
}
|
|
|
|
|
|
.rec-type-container {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
|
|
|
.rec-type-container .rec-type-text {
|
|
|
padding: 0 15px;
|
|
|
font-size: 12px;
|
|
|
color: #2C2C2C;
|
|
|
}
|
|
|
|
|
|
.rec-type-container .rec-type-switch {
|
|
|
padding: 0 20px;
|
|
|
}
|
|
|
|
|
|
.date-container input {
|
|
|
position: absolute;
|
|
|
opacity: 0;
|
|
|
display: inline-block;
|
|
|
width: 40px;
|
|
|
height: 40px;
|
|
|
z-index: 10;
|
|
|
left: 0;
|
|
|
}
|
|
|
|
|
|
.date-container label {
|
|
|
position: absolute;
|
|
|
left: 0;
|
|
|
top: 0;
|
|
|
/* display: none; */
|
|
|
z-index: 0;
|
|
|
}
|
|
|
|
|
|
.date-icon {
|
|
|
display: inline-block;
|
|
|
width: 40px;
|
|
|
height: 40px;
|
|
|
background: url('https://resource.eziot.com/group2/M00/00/6A/CtwQF2F6VieAQrU9AAABP-_Nsqo949.png') no-repeat 100% 100%;
|
|
|
}
|
|
|
.select-container {
|
|
|
padding: 10px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
}
|
|
|
|
|
|
.advice {
|
|
|
height: 24px;
|
|
|
width: 70px;
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
line-height: 24px;
|
|
|
background: #F8F8F8;
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
|
|
|
.advice span {
|
|
|
width: 40px;
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
input[type="checkbox"]:not(:checked)+.advice span:first-child {
|
|
|
box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%);
|
|
|
border-radius: 8px;
|
|
|
text-align: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
input[type="checkbox"]:checked+.advice span:last-child {
|
|
|
box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%);
|
|
|
border-radius: 8px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
|
|
|
input[type="checkbox"]:not(:checked)+.advice span:first-child svg {
|
|
|
fill: #648FFC !important;
|
|
|
}
|
|
|
|
|
|
input[type="checkbox"]:checked+.advice span:last-child svg {
|
|
|
fill: #648FFC !important;
|
|
|
}`,document.getElementsByTagName("head")[0].appendChild(a),et("begin",this.jSPlugin.url)){var l=et("begin",this.jSPlugin.url);this.date=l.slice(0,4)+"/"+l.slice(4,6)+"/"+l.slice(6,8),this.begin=this.date+" ".concat(l.slice(8,10)||"00",":").concat(l.slice(10,12)||"00",":").concat(l.slice(12,14)||"00"),this.end=this.date+" 23:59:59",this.initBegin=this.begin}if(et("end",this.jSPlugin.url)){var s=et("end",this.jSPlugin.url);this.end=this.date+" ".concat(s.slice(8,10)||"23",":").concat(s.slice(10,12)||"59",":").concat(s.slice(12,14)||"59"),this.initEnd=this.end}var b=document.createElement("div");b.id="date-switch-container-wrap",b.className="date-switch-container-wrap",b.style="",b.innerHTML=`
|
|
|
<div class="date-switch-container">
|
|
|
<div class="current-date" id="current-date">今日录像</div>
|
|
|
<div class="date-container">
|
|
|
<label for="date">
|
|
|
<div class="date-icon"></div>
|
|
|
</label>
|
|
|
<input type="date" name="date" id="date" />
|
|
|
</div>
|
|
|
</div>
|
|
|
`,Wn(b,document.getElementById("".concat(this.jSPlugin.id,"-wrap")));var T=document.createElement("div");T.id="rec-type-container-wrap",T.className="rec-type-container-wrap",T.style="",T.innerHTML=`
|
|
|
<div class="rec-type-container">
|
|
|
<div class="rec-type-text">共<span id="recCount">0</span>个录像</div>
|
|
|
<div class="rec-type-switch">
|
|
|
<label>
|
|
|
<input type="checkbox" name="type" id="cloudType" value="1" hidden />
|
|
|
<label for="cloudType" class="advice">
|
|
|
<span>
|
|
|
<svg fill="#CCCCCC" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="2 0 20 20">
|
|
|
<path class="st0" d="M12.6,5c-2.3,0.1-4.3,1.4-5.3,3.3L7.2,8.6c-2.4,0.5-4.1,2.5-4.1,4.9c0,2.8,2.4,5,5.2,5h9.9
|
|
|
c2.4,0,4.3-1.9,4.3-4.2l0-0.2c-0.1-2-1.6-3.5-3.5-3.9l-0.1,0l0-0.2c-0.4-2.8-3-5-6.1-5L12.6,5z"/>
|
|
|
</svg>
|
|
|
</span>
|
|
|
<span>
|
|
|
<svg fill="#CCCCCC" version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="2 0 20 20">
|
|
|
<path id="形状结合" class="st0" d="M14.3,4c0.6,0,1.2,0.2,1.7,0.7l0,0L18.3,7C18.7,7.4,19,8,19,8.6l0,0v9c0,1.3-1.1,2.3-2.4,2.3
|
|
|
l0,0H8.4C7.1,20,6,19,6,17.7l0,0V6.3C6,5,7.1,4,8.4,4l0,0H14.3z M9.7,7.2C9.3,7.2,8.9,7.6,8.9,8l0,0v2.5l0,0.1
|
|
|
c0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C10.4,7.5,10,7.2,9.7,7.2z M12.2,7.2c-0.4,0-0.8,0.3-0.8,0.8l0,0v2.5
|
|
|
l0,0.1c0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C12.9,7.5,12.5,7.2,12.2,7.2z M14.7,7.2c-0.4,0-0.8,0.3-0.8,0.8l0,0
|
|
|
v2.5l0,0.1c0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C15.4,7.5,15,7.2,14.7,7.2z"/>
|
|
|
</svg>
|
|
|
</span>
|
|
|
</label>
|
|
|
</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
`,Wn(T,b);var C=document.createElement("div");C.id="mobile-rec-wrap",C.className="mobileRec-wrap",C.style="",C.innerHTML=`
|
|
|
<div class="time-line-container">
|
|
|
<div class="current-time">
|
|
|
<div class="current-time-bg" id="time-line-current">2020-01-01 00:00:00</div>
|
|
|
</div>
|
|
|
<div class="time-line-item-container">
|
|
|
<div class="time-line-item" id="time-line-item">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
`,Wn(C,T);var y=function(w){console.log("子组件传值到父组件",w,w.current);var z=w.current,S=new Date(r.date).Format("yyyyMMdd").substr(0,8)+(w.current?z.replace(/:/g,""):w.current.replace(/:/g,""));if(r.initBegin&&new Date("".concat(r.date," ").concat(w.current)).getTime()<new Date(r.initBegin).getTime()&&(console.log("超过限制最低值"),S=new Date(r.initBegin).Format("yyyyMMddhhmmss")),r.initEnd&&new Date("".concat(r.date," ").concat(w.current)).getTime()>new Date(r.initEnd).getTime()&&(console.log("超过限制最高值"),S=new Date(r.initBegin).Format("yyyyMMddhhmmss")),r.type==="cloud.rec"){var d=function(){r.jSPlugin.seek(S.substr(8,6),"235959"),setTimeout(function(){r.syncTimeLine()},6e3)};r.seekTimer?clearTimeout(r.seekTimer):d(),console.log("this.jsPlug",r.jSPlugin.params),r.seekTimer=setTimeout(function(){d(),clearTimeout(r.seekTimer),r.seekTimer=null},r.seekFrequency)}else{var m=function(){setTimeout(function(){r.disabled=!1},r.seekFrequency)},g=function(A){r.disabled=!0,r.jSPlugin.pause().then(function(){console.log("暂停成功"),r.jSPlugin.resume(S).then(function(O){console.log("恢复成功"),r.jSPlugin.Theme&&r.jSPlugin.Theme.setDecoderState({play:!0}),r.jSPlugin.Theme&&r.jSPlugin.Theme.decoderState.state.sound&&r.jSPlugin.openSound(),r.syncTimeLine(),A&&A()})}).catch(function(){console.log("暂停失败"),r.jSPlugin.resume(S).then(function(O){console.log("恢复成功"),r.jSPlugin.Theme&&r.jSPlugin.Theme.setDecoderState({play:!0}),r.syncTimeLine(),A&&A()})})};r.disabled?(console.log("操作频繁,等待2秒后执行"),r.seekTimer&&clearTimeout(r.seekTimer),r.seekTimer=setTimeout(function(){g(m)},r.seekFrequency)):g(m)}},h=function(){r.operating=!0,r.unSyncTimeLine()},D=function(){},_=function(){r.operating=!1,console.log("ontouchend")};this.TimeLineOBJ=new ss({id:"time-line-item",getPalyParam:y,ontouchstart:h,ontouchmove:D,ontouchend:_}),this.fetchDeviceRec(),document.getElementById("date").addEventListener("change",function(E){if(console.log("日期变化",E.target.value),r.initBegin||r.initEnd)return console.log("您开启了时间限制,无法切换日期"),!1;r.date=new Date(E.target.value).Format("yyyy/MM/dd"),r.begin=r.date+" 00:00:00",r.end=r.date+" 23:59:59",r.fetchDeviceRec(),r.jSPlugin.changePlayUrl({type:r.type,begin:"".concat(new Date(r.date).Format("yyyyMMdd"),"000000")}),r.changeRecSpeed(1),r.resetMobileZoomStatus()}),document.getElementById("cloudType").checked=this.type==="rec",document.getElementById("cloudType").addEventListener("change",function(E){var w=E.target.checked?2:1;r.type=E.target.checked?"rec":"cloud.rec",console.log("recType",w),r.fetchDeviceRec(),r.jSPlugin.changePlayUrl({type:r.type,begin:"".concat(new Date(r.date).Format("yyyyMMdd"),"000000")}).then(function(){console.log("切换类型成功"),r.syncTimeLine(),r.changeRecSpeed(1),r.resetMobileZoomStatus()},function(z){console.log("err",z)}).catch(function(z){console.log(z)})}),this.syncTimeLine()}return dt(f,[{key:"fetchDeviceRec",value:function(){var n=this,i=function(l){var s=l.length;document.getElementById("recCount").innerHTML=s;for(var b=[],T=s-1;T>=0;T--){var C=l[T],y=ea(C.endTime),h=ea(C.startTime);b.push({st:h,et:y})}n.TimeLineOBJ.setDateLine(b)},r=new FormData;r.append("deviceSerial",Ke(this.jSPlugin.url).deviceSerial),r.append("channelNo",Ke(this.jSPlugin.url).channelNo),r.append("accessToken",this.jSPlugin.accessToken),r.append("recType",this.type==="cloud.rec"?1:2),r.append("startTime",new Date(this.begin).getTime()),r.append("endTime",new Date(this.end).getTime()),fetch(this.jSPlugin.env.domain+"/api/lapp/video/by/time",{method:"POST",body:r}).then(function(a){return a.json()}).then(function(a){if(a.code==200&&a.data){var l=[];l=a.data,i(l)}else i([])})}},{key:"syncTimeLine",value:function(){var n=this,i=function(a){var l=new Date(a),s=l.getHours(),b=l.getMinutes(),T=l.getSeconds();return(s>9?s:"0"+s)+":"+(b>9?b:"0"+b)+":"+(T>9?T:"0"+T)};this.timer&&clearInterval(this.timer),this.timer=setInterval(function(){if(n.operating)return console.log("操作中"),!1;n.jSPlugin.getOSDTime().then(function(r){r.data>0?n.TimeLineOBJ.stepScrollTimeLine(i(r.data*1e3)):(console.log("未找到当前获取播放时间,等待中..."),console.log("res:-----------------",r))}).catch(function(r){console.log("err:-----",r),console.log("未找到当前获取播放时间,等待中...")})},1e3)}},{key:"unSyncTimeLine",value:function(){this.timer&&clearInterval(this.timer)}}]),f}(),us=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"ptzStart"},{code:10001,msg:"操作失败",desc:"参数为空或格式不正确",text:"参数错误",type:"ptzStart"},{code:10002,msg:"账号异常,操作失败",desc:"重新获取accessToken",text:"accessToken异常或过期",type:"ptzStart"},{code:10005,msg:"账号异常,操作失败",desc:"appKey被冻结",text:"appKey异常",type:"ptzStart"},{code:20002,msg:"设备不存在,请检查设备连接情况",desc:"",text:"设备不存在",type:"ptzStart"},{code:20006,msg:"操作失败,请检查设备网络情况",desc:"检查设备网络状况,稍后再试",text:"网络异常",type:"ptzStart"},{code:20007,msg:"操作失败,请检查设备在线情况",desc:"检查设备是否在线",text:"设备不在线",type:"ptzStart"},{code:20008,msg:"操作过于频繁,稍后再试",desc:"操作过于频繁,稍后再试",text:"设备响应超时",type:"ptzStart"},{code:20014,msg:"操作失败",desc:"",text:"deviceSerial不合法",type:"ptzStart"},{code:20032,msg:"通道不存在请检查设备连接情况",desc:"该用户下通道不存在",text:"该用户下通道不存在",type:"ptzStart"},{code:49999,msg:"操作失败,请重试",desc:"接口调用异常",text:"数据异常",type:"ptzStart"},{code:6e4,msg:"操作失败,设备不支持该操作",desc:"",text:"设备不支持云台控制",type:"ptzStart"},{code:60001,msg:"操作失败,用户无权限",desc:"",text:"用户无云台控制权限",type:"ptzStart"},{code:60002,msg:"设备已旋转到上限位",desc:"",text:"设备云台旋转达到上限位",type:"ptzStart"},{code:60003,msg:"设备已旋转到下限位",desc:"",text:"设备云台旋转达到下限位",type:"ptzStart"},{code:60004,msg:"设备已旋转到左限位",desc:"",text:"设备云台旋转达到左限位",type:"ptzStart"},{code:60005,msg:"设备已旋转到右限位",desc:"",text:"设备云台旋转达到右限位",type:"ptzStart"},{code:60006,msg:"操作失败,请重试",desc:"稍候再试",text:"云台当前操作失败",type:"ptzStart"},{code:60009,msg:"设备正在操作中",desc:"",text:"正在调用预置点",type:"ptzStart"},{code:60020,msg:"操作失败",desc:"确认设备是否支持该操作",text:"不支持该命令",type:"ptzStart"}],ms=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"ptzStop"},{code:10001,msg:"操作失败",desc:"参数为空或格式不正确",text:"参数错误",type:"ptzStop"},{code:10002,msg:"账号异常,操作失败",desc:"重新获取accessToken",text:"accessToken异常或过期",type:"ptzStop"},{code:10005,msg:"账号异常,操作失败",desc:"appKey被冻结",text:"appKey异常",type:"ptzStop"},{code:20002,msg:"设备不存在,请检查设备连接情况",desc:"",text:"设备不存在",type:"ptzStop"},{code:20006,msg:"操作失败,请检查设备网络情况",desc:"检查设备网络状况,稍后再试",text:"网络异常",type:"ptzStop"},{code:20007,msg:"操作失败,请检查设备在线情况",desc:"检查设备是否在线",text:"设备不在线",type:"ptzStop"},{code:20008,msg:"操作过于频繁,稍后再试",desc:"操作过于频繁,稍后再试",text:"设备响应超时",type:"ptzStop"},{code:20014,msg:"操作失败",desc:"",text:"deviceSerial不合法",type:"ptzStop"},{code:20032,msg:"通道不存在请检查设备连接情况",desc:"该用户下通道不存在",text:"该用户下通道不存在",type:"ptzStop"},{code:49999,msg:"操作失败,请重试",desc:"接口调用异常",text:"数据异常",type:"ptzStop"},{code:6e4,msg:"操作失败,设备不支持该操作",desc:"",text:"设备不支持云台控制",type:"ptzStop"},{code:60001,msg:"操作失败,用户无权限",desc:"",text:"用户无云台控制权限",type:"ptzStop"},{code:60006,msg:"操作失败,请重试",desc:"稍候再试",text:"云台当前操作失败",type:"ptzStop"},{code:60009,msg:"设备正在操作中",desc:"",text:"正在调用预置点",type:"ptzStop"},{code:60020,msg:"操作失败",desc:"确认设备是否支持该操作",text:"不支持该命令",type:"ptzStop"}],ps=[{code:200,msg:"",desc:"请求成功",text:"操作成功",type:"talk"},{code:10001,msg:"播放失败",desc:"参数为空或格式不正确",text:"参数错误",type:"talk"},{code:10002,msg:"账号异常,操作失败",desc:"",text:"accessToken异常或过期",type:"talk"},{code:10031,msg:"账号异常,操作失败",desc:"",text:"子账户或萤石用户没有权限",type:"talk"},{code:20002,msg:"设备不存在请检查设备连接情况",desc:"设备序列号输入有误或者设备未被添加或者通道异常",text:"设备不存在",type:"talk"},{code:60059,msg:"播放失败",desc:"",text:"ezopen地址均不可用",type:"talk"}],fs=[{code:200,msg:"",desc:"",text:"操作成功",type:"time"},{code:10001,msg:"播放失败",desc:"参数为空或格式不正确",text:"参数错误",type:"time"},{code:10002,msg:"账号异常,播放失败",desc:"",text:"accessToken异常或过期",type:"time"},{code:10004,msg:"账号异常,播放失败",desc:"",text:"用户不存在",type:"time"},{code:10005,msg:"账号异常,播放失败",desc:"",text:"appKey异常",type:"time"},{code:10011,msg:"播放失败",desc:"设备对应用户未注册至应用下",text:"未开通萤石服务",type:"time"},{code:10013,msg:"账号异常,播放失败",desc:"",text:"非开发者账号无权限调用",type:"time"},{code:10030,msg:"播放失败",desc:"",text:"appkey和appsecret不匹配",type:"time"},{code:20002,msg:"设备不存在请检查设备连接情况",desc:"设备序列号输入有误或者设备未被添加或者通道异常",text:"设备不存在",type:"time"},{code:20014,msg:"播放失败",desc:"",text:"deviceSerial不合法",type:"time"},{code:20032,msg:"设备不存在请检查设备连接情况",desc:"",text:"该用户下通道不存在",type:"time"},{code:60024,msg:"播放失败请重试",desc:"",text:"取消订阅操作失败",type:"time"},{code:49999,msg:"播放失败请重试",desc:"",text:"操作异常",type:"time"}],Fr={ptzStart:us,ptzStop:ms,talk:ps,time:fs},ta=function(){function f(u,n){fe(this,f),this.coreX=u,this.coreY=n,console.log("uikitCode",Fr)}return dt(f,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"matchInfo",value:function(n,i){if(Fr[i]){var r={};return Fr[i].map(function(a){a.code==n&&(r=a)}),r}else return{code:500,msg:"未知错误",desc:"未知的错误码,或错误码类型有误",text:"",type:i}}}]),f}(),hs=function(){function f(u){var n=this;if(fe(this,f),this.jSPlugin=u,this.codeHandler=new ta,this.pluginStatus=new Bi(this,this.jSPlugin.id),console.log("云台初始化"),document.getElementById(this.jSPlugin.id+"-ez-ptz-item"))return!1;var i=document.createElement("div");i.id=this.jSPlugin.id+"-ez-ptz-item",i.className="ez-ptz-wrap",i.style="display:none";var r=document.createElement("style");r.innerHTML=`
|
|
|
.ez-ptz-container {
|
|
|
position: relative;
|
|
|
width: 80px;
|
|
|
height: 80px;
|
|
|
background: rgba(255, 255, 255, 0.80);
|
|
|
box-shadow: 0px 0px 33px 4px rgb(0 0 0 / 15%);
|
|
|
border: 1px solid rgba(255, 255, 255, 0.80);
|
|
|
border-radius: 100%;
|
|
|
cursor: pointer;
|
|
|
overflow: hidden;
|
|
|
user-select: none;
|
|
|
}
|
|
|
.ez-ptz-container .ez-ptz-icon.top {
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 3px solid transparent;
|
|
|
border-right: 3px solid transparent;
|
|
|
border-bottom: 6px solid #333333;
|
|
|
position: absolute;
|
|
|
display: inline-block;
|
|
|
left: calc(50% - 3px);
|
|
|
top: 2px;
|
|
|
}
|
|
|
|
|
|
.ez-ptz-container .ez-ptz-icon.top.active {
|
|
|
border-bottom-color: #1890FF;
|
|
|
}
|
|
|
|
|
|
.ez-ptz-container .ez-ptz-icon.bottom {
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 3px solid transparent;
|
|
|
border-right: 3px solid transparent;
|
|
|
border-top: 6px solid #333333;
|
|
|
position: absolute;
|
|
|
display: inline-block;
|
|
|
left: calc(50% - 3px);
|
|
|
bottom: 2px;
|
|
|
}
|
|
|
|
|
|
.ez-ptz-container .ez-ptz-icon.bottom.active {
|
|
|
border-top-color: #1890FF;
|
|
|
}
|
|
|
|
|
|
.ez-ptz-container .ez-ptz-icon.right {
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-top: 3px solid transparent;
|
|
|
border-bottom: 3px solid transparent;
|
|
|
border-left: 6px solid #333333;
|
|
|
position: absolute;
|
|
|
display: inline-block;
|
|
|
top: calc(50% - 3px);
|
|
|
right: 2px;
|
|
|
}
|
|
|
|
|
|
.ez-ptz-container .ez-ptz-icon.right.active {
|
|
|
border-left-color: #1890FF;
|
|
|
}
|
|
|
|
|
|
.ez-ptz-container .ez-ptz-icon.left {
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-top: 3px solid transparent;
|
|
|
border-bottom: 3px solid transparent;
|
|
|
border-right: 6px solid #333333;
|
|
|
position: absolute;
|
|
|
display: inline-block;
|
|
|
top: calc(50% - 3px);
|
|
|
left: 2px;
|
|
|
}
|
|
|
|
|
|
.ez-ptz-container .ez-ptz-icon.left.active {
|
|
|
border-right-color: #1890FF;
|
|
|
}
|
|
|
|
|
|
.ez-ptz-container .ez-ptz-main.center {
|
|
|
width: 23px;
|
|
|
height: 23px;
|
|
|
background: #1890FF;
|
|
|
border-radius: 100%;
|
|
|
top: calc(50% - 12.3px);
|
|
|
left: calc(50% - 12.3px);
|
|
|
position: absolute;
|
|
|
}
|
|
|
|
|
|
.ez-ptz-wrap {
|
|
|
position: absolute;
|
|
|
right: 20px;
|
|
|
top: calc(50% - 50px);
|
|
|
width: 100px;
|
|
|
height: 100px;
|
|
|
z-index: 999;
|
|
|
}
|
|
|
|
|
|
.ez-ptz-close {
|
|
|
position: absolute;
|
|
|
color: #FFFFFF;
|
|
|
top: 0;
|
|
|
right: 0px;
|
|
|
}`,document.getElementsByTagName("head")[0].appendChild(r),i.innerHTML=`
|
|
|
<div class="ez-ptz-container" id="`.concat(this.jSPlugin.id,`-ez-ptz-container" style="position: relative;width: 80px;height: 80px;background: rgba(255, 255, 255, 0.80);box-shadow: 0px 0px 33px 4px rgba(0, 0, 0, 0.15);border: 1px solid rgba(255, 255, 255, 0.80);border-radius: 100%;cursor: pointer;overflow: hidden;user-select: none;">
|
|
|
<div class="ez-ptz-main center"></div>
|
|
|
<div class="ez-ptz-icon top active"></div>
|
|
|
<div class="ez-ptz-icon left active"></div>
|
|
|
<div class="ez-ptz-icon bottom active"></div>
|
|
|
<div class="ez-ptz-icon right active"></div>
|
|
|
`),document.getElementById("".concat(u.id,"-wrap")).appendChild(i),document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).onmousedown=function(a){a.preventDefault(),console.log("触摸开始"),n._handlePtzTouch(a,"start")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).onmouseup=function(a){a.preventDefault(),console.log("触摸结束"),n._handlePtzTouch(a,"stop")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).ontouchstart=function(a){a.preventDefault(),console.log("触摸开始"),n._handlePtzTouch(a,"start")},document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).ontouchend=function(a){a.preventDefault(),console.log("触摸结束",a),n._handlePtzTouch(a,"stop")}}return dt(f,[{key:"show",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item")).style="display: inline-block"}},{key:"hide",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-item")).style="display: none"}},{key:"_handlePtzTouch",value:function(n,i){var r=this,a=document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).getBoundingClientRect(),l=a.left+41,s=a.top+41,b=n.x||n.changedTouches[0].clientX,T=n.y||n.changedTouches[0].clientY,C=b-l,y=T-s,h=0,D=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start";if(Math.abs(C)>Math.abs(y)?C>0?h=3:h=2:y>0?h=1:h=0,/^rotate\(90/.test(document.getElementById("".concat(this.jSPlugin.id,"-wrap")).style.transform))switch(h){case 0:h=2;break;case 1:h=3;break;case 2:h=1;break;case 3:h=0;break}document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).style="background-image:linear-gradient(".concat(h===0?180:h===1?0:h===2?90:270,"deg, #1d8dd8 0%, rgba(100,143,252,0.00) 30%)"),i==="stop"&&(D=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",document.getElementById("".concat(this.jSPlugin.id,"-ez-ptz-container")).style="");var _=new FormData;_.append("deviceSerial",Ke(this.jSPlugin.url).deviceSerial),_.append("channelNo",Ke(this.jSPlugin.url).channelNo),_.append("speed",1),_.append("direction",h),_.append("accessToken",this.jSPlugin.accessToken),fetch(D,{method:"POST",body:_}).then(function(E){return E.json()}).then(function(E){E.code==200||(console.log(E.code,r.codeHandler.matchInfo(E.code,i==="start"?"ptzStart":"ptzStop")),r.pluginStatus.loadingSetText({text:r.codeHandler.matchInfo(E.code,i==="start"?"ptzStart":"ptzStop").msg,color:"red",delayClear:2e3}),(E.code==60005||E.code==60002||E.code==60003||E.code==60004)&&(document.getElementById("".concat(r.jSPlugin.id,"-ez-ptz-container")).style="background-image:linear-gradient(".concat(h===0?180:h===1?0:h===2?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 30%)")))}).catch(function(E){console.log("云台调用异常",E)})}}]),f}();(function(f){if(ue(Je)==="object")ae.exports=f();else{var u;typeof window!="undefined"?u=window:typeof Ar!="undefined"?u=Ar:typeof self!="undefined"?u=self:u=this,u.adapter=f()}})(function(){return function(){function f(u,n,i){function r(s,b){if(!n[s]){if(!u[s]){var T=typeof Dr=="function"&&Dr;if(!b&&T)return T(s,!0);if(a)return a(s,!0);var C=new Error("Cannot find module '"+s+"'");throw C.code="MODULE_NOT_FOUND",C}var y=n[s]={exports:{}};u[s][0].call(y.exports,function(h){var D=u[s][1][h];return r(D||h)},y,y.exports,f,u,n,i)}return n[s].exports}for(var a=typeof Dr=="function"&&Dr,l=0;l<i.length;l++)r(i[l]);return r}return f}()({1:[function(f,u,n){var i=f("./adapter_factory.js"),r=(0,i.adapterFactory)({window});window.adapter=r,u.exports=r},{"./adapter_factory.js":2}],2:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.adapterFactory=w;var i=f("./utils"),r=E(i),a=f("./chrome/chrome_shim"),l=E(a),s=f("./edge/edge_shim"),b=E(s),T=f("./firefox/firefox_shim"),C=E(T),y=f("./safari/safari_shim"),h=E(y),D=f("./common_shim"),_=E(D);function E(z){if(z&&z.__esModule)return z;var S={};if(z!=null)for(var d in z)Object.prototype.hasOwnProperty.call(z,d)&&(S[d]=z[d]);return S.default=z,S}function w(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},S=z.window,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0},m=r.log,g=r.detectBrowser(S),k={browserDetails:g,commonShim:_,extractVersion:r.extractVersion,disableLog:r.disableLog,disableWarnings:r.disableWarnings};switch(g.browser){case"chrome":if(!l||!l.shimPeerConnection||!d.shimChrome)return m("Chrome shim is not included in this adapter release."),k;m("adapter.js shimming chrome."),k.browserShim=l,l.shimGetUserMedia(S),l.shimMediaStream(S),l.shimPeerConnection(S),l.shimOnTrack(S),l.shimAddTrackRemoveTrack(S),l.shimGetSendersWithDtmf(S),l.shimGetStats(S),l.shimSenderReceiverGetStats(S),l.fixNegotiationNeeded(S),_.shimRTCIceCandidate(S),_.shimConnectionState(S),_.shimMaxMessageSize(S),_.shimSendThrowTypeError(S),_.removeAllowExtmapMixed(S);break;case"firefox":if(!C||!C.shimPeerConnection||!d.shimFirefox)return m("Firefox shim is not included in this adapter release."),k;m("adapter.js shimming firefox."),k.browserShim=C,C.shimGetUserMedia(S),C.shimPeerConnection(S),C.shimOnTrack(S),C.shimRemoveStream(S),C.shimSenderGetStats(S),C.shimReceiverGetStats(S),C.shimRTCDataChannel(S),C.shimAddTransceiver(S),C.shimCreateOffer(S),C.shimCreateAnswer(S),_.shimRTCIceCandidate(S),_.shimConnectionState(S),_.shimMaxMessageSize(S),_.shimSendThrowTypeError(S);break;case"edge":if(!b||!b.shimPeerConnection||!d.shimEdge)return m("MS edge shim is not included in this adapter release."),k;m("adapter.js shimming edge."),k.browserShim=b,b.shimGetUserMedia(S),b.shimGetDisplayMedia(S),b.shimPeerConnection(S),b.shimReplaceTrack(S),_.shimMaxMessageSize(S),_.shimSendThrowTypeError(S);break;case"safari":if(!h||!d.shimSafari)return m("Safari shim is not included in this adapter release."),k;m("adapter.js shimming safari."),k.browserShim=h,h.shimRTCIceServerUrls(S),h.shimCreateOfferLegacy(S),h.shimCallbacksAPI(S),h.shimLocalStreamsAPI(S),h.shimRemoteStreamsAPI(S),h.shimTrackEventTransceiver(S),h.shimGetUserMedia(S),_.shimRTCIceCandidate(S),_.shimMaxMessageSize(S),_.shimSendThrowTypeError(S),_.removeAllowExtmapMixed(S);break;default:m("Unsupported browser!");break}return k}},{"./chrome/chrome_shim":3,"./common_shim":6,"./edge/edge_shim":7,"./firefox/firefox_shim":11,"./safari/safari_shim":14,"./utils":15}],3:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=n.shimGetUserMedia=void 0;var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(d){return ue(d)}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":ue(d)},r=f("./getusermedia");Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return r.shimGetUserMedia}});var a=f("./getdisplaymedia");Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return a.shimGetDisplayMedia}}),n.shimMediaStream=C,n.shimOnTrack=y,n.shimGetSendersWithDtmf=h,n.shimGetStats=D,n.shimSenderReceiverGetStats=_,n.shimAddTrackRemoveTrackWithNative=E,n.shimAddTrackRemoveTrack=w,n.shimPeerConnection=z,n.fixNegotiationNeeded=S;var l=f("../utils.js"),s=b(l);function b(d){if(d&&d.__esModule)return d;var m={};if(d!=null)for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[g]=d[g]);return m.default=d,m}function T(d,m,g){return m in d?Object.defineProperty(d,m,{value:g,enumerable:!0,configurable:!0,writable:!0}):d[m]=g,d}function C(d){d.MediaStream=d.MediaStream||d.webkitMediaStream}function y(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&!("ontrack"in d.RTCPeerConnection.prototype)){Object.defineProperty(d.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(k){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=k)},enumerable:!0,configurable:!0});var m=d.RTCPeerConnection.prototype.setRemoteDescription;d.RTCPeerConnection.prototype.setRemoteDescription=function(){var k=this;return this._ontrackpoly||(this._ontrackpoly=function(A){A.stream.addEventListener("addtrack",function(O){var H=void 0;d.RTCPeerConnection.prototype.getReceivers?H=k.getReceivers().find(function(X){return X.track&&X.track.id===O.track.id}):H={track:O.track};var Z=new Event("track");Z.track=O.track,Z.receiver=H,Z.transceiver={receiver:H},Z.streams=[A.stream],k.dispatchEvent(Z)}),A.stream.getTracks().forEach(function(O){var H=void 0;d.RTCPeerConnection.prototype.getReceivers?H=k.getReceivers().find(function(X){return X.track&&X.track.id===O.id}):H={track:O};var Z=new Event("track");Z.track=O,Z.receiver=H,Z.transceiver={receiver:H},Z.streams=[A.stream],k.dispatchEvent(Z)})},this.addEventListener("addstream",this._ontrackpoly)),m.apply(this,arguments)}}else s.wrapPeerConnectionEvent(d,"track",function(g){return g.transceiver||Object.defineProperty(g,"transceiver",{value:{receiver:g.receiver}}),g})}function h(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&!("getSenders"in d.RTCPeerConnection.prototype)&&"createDTMFSender"in d.RTCPeerConnection.prototype){var m=function(X,ne){return{track:ne,get dtmf(){return this._dtmf===void 0&&(ne.kind==="audio"?this._dtmf=X.createDTMFSender(ne):this._dtmf=null),this._dtmf},_pc:X}};if(!d.RTCPeerConnection.prototype.getSenders){d.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var g=d.RTCPeerConnection.prototype.addTrack;d.RTCPeerConnection.prototype.addTrack=function(X,ne){var Y=g.apply(this,arguments);return Y||(Y=m(this,X),this._senders.push(Y)),Y};var k=d.RTCPeerConnection.prototype.removeTrack;d.RTCPeerConnection.prototype.removeTrack=function(X){k.apply(this,arguments);var ne=this._senders.indexOf(X);ne!==-1&&this._senders.splice(ne,1)}}var A=d.RTCPeerConnection.prototype.addStream;d.RTCPeerConnection.prototype.addStream=function(X){var ne=this;this._senders=this._senders||[],A.apply(this,[X]),X.getTracks().forEach(function(Y){ne._senders.push(m(ne,Y))})};var O=d.RTCPeerConnection.prototype.removeStream;d.RTCPeerConnection.prototype.removeStream=function(X){var ne=this;this._senders=this._senders||[],O.apply(this,[X]),X.getTracks().forEach(function(Y){var me=ne._senders.find(function(ge){return ge.track===Y});me&&ne._senders.splice(ne._senders.indexOf(me),1)})}}else if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&"getSenders"in d.RTCPeerConnection.prototype&&"createDTMFSender"in d.RTCPeerConnection.prototype&&d.RTCRtpSender&&!("dtmf"in d.RTCRtpSender.prototype)){var H=d.RTCPeerConnection.prototype.getSenders;d.RTCPeerConnection.prototype.getSenders=function(){var X=this,ne=H.apply(this,[]);return ne.forEach(function(Y){return Y._pc=X}),ne},Object.defineProperty(d.RTCRtpSender.prototype,"dtmf",{get:function(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function D(d){if(d.RTCPeerConnection){var m=d.RTCPeerConnection.prototype.getStats;d.RTCPeerConnection.prototype.getStats=function(){var k=this,A=Array.prototype.slice.call(arguments),O=A[0],H=A[1],Z=A[2];if(arguments.length>0&&typeof O=="function")return m.apply(this,arguments);if(m.length===0&&(arguments.length===0||typeof O!="function"))return m.apply(this,[]);var X=function(ge){var ve={},Ce=ge.result();return Ce.forEach(function(be){var Pe={id:be.id,timestamp:be.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[be.type]||be.type};be.names().forEach(function(Ye){Pe[Ye]=be.stat(Ye)}),ve[Pe.id]=Pe}),ve},ne=function(ge){return new Map(Object.keys(ge).map(function(ve){return[ve,ge[ve]]}))};if(arguments.length>=2){var Y=function(ge){H(ne(X(ge)))};return m.apply(this,[Y,O])}return new Promise(function(me,ge){m.apply(k,[function(ve){me(ne(X(ve)))},ge])}).then(H,Z)}}}function _(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&d.RTCRtpSender&&d.RTCRtpReceiver){if(!("getStats"in d.RTCRtpSender.prototype)){var m=d.RTCPeerConnection.prototype.getSenders;m&&(d.RTCPeerConnection.prototype.getSenders=function(){var H=this,Z=m.apply(this,[]);return Z.forEach(function(X){return X._pc=H}),Z});var g=d.RTCPeerConnection.prototype.addTrack;g&&(d.RTCPeerConnection.prototype.addTrack=function(){var H=g.apply(this,arguments);return H._pc=this,H}),d.RTCRtpSender.prototype.getStats=function(){var H=this;return this._pc.getStats().then(function(Z){return s.filterStats(Z,H.track,!0)})}}if(!("getStats"in d.RTCRtpReceiver.prototype)){var k=d.RTCPeerConnection.prototype.getReceivers;k&&(d.RTCPeerConnection.prototype.getReceivers=function(){var H=this,Z=k.apply(this,[]);return Z.forEach(function(X){return X._pc=H}),Z}),s.wrapPeerConnectionEvent(d,"track",function(O){return O.receiver._pc=O.srcElement,O}),d.RTCRtpReceiver.prototype.getStats=function(){var H=this;return this._pc.getStats().then(function(Z){return s.filterStats(Z,H.track,!1)})}}if("getStats"in d.RTCRtpSender.prototype&&"getStats"in d.RTCRtpReceiver.prototype){var A=d.RTCPeerConnection.prototype.getStats;d.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof d.MediaStreamTrack){var H=arguments[0],Z=void 0,X=void 0,ne=void 0;return this.getSenders().forEach(function(Y){Y.track===H&&(Z?ne=!0:Z=Y)}),this.getReceivers().forEach(function(Y){return Y.track===H&&(X?ne=!0:X=Y),Y.track===H}),ne||Z&&X?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):Z?Z.getStats():X?X.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return A.apply(this,arguments)}}}}function E(d){d.RTCPeerConnection.prototype.getLocalStreams=function(){var H=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(Z){return H._shimmedLocalStreams[Z][0]})};var m=d.RTCPeerConnection.prototype.addTrack;d.RTCPeerConnection.prototype.addTrack=function(H,Z){if(!Z)return m.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var X=m.apply(this,arguments);return this._shimmedLocalStreams[Z.id]?this._shimmedLocalStreams[Z.id].indexOf(X)===-1&&this._shimmedLocalStreams[Z.id].push(X):this._shimmedLocalStreams[Z.id]=[Z,X],X};var g=d.RTCPeerConnection.prototype.addStream;d.RTCPeerConnection.prototype.addStream=function(H){var Z=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},H.getTracks().forEach(function(Y){var me=Z.getSenders().find(function(ge){return ge.track===Y});if(me)throw new DOMException("Track already exists.","InvalidAccessError")});var X=this.getSenders();g.apply(this,arguments);var ne=this.getSenders().filter(function(Y){return X.indexOf(Y)===-1});this._shimmedLocalStreams[H.id]=[H].concat(ne)};var k=d.RTCPeerConnection.prototype.removeStream;d.RTCPeerConnection.prototype.removeStream=function(H){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[H.id],k.apply(this,arguments)};var A=d.RTCPeerConnection.prototype.removeTrack;d.RTCPeerConnection.prototype.removeTrack=function(H){var Z=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},H&&Object.keys(this._shimmedLocalStreams).forEach(function(X){var ne=Z._shimmedLocalStreams[X].indexOf(H);ne!==-1&&Z._shimmedLocalStreams[X].splice(ne,1),Z._shimmedLocalStreams[X].length===1&&delete Z._shimmedLocalStreams[X]}),A.apply(this,arguments)}}function w(d){if(!d.RTCPeerConnection)return;var m=s.detectBrowser(d);if(d.RTCPeerConnection.prototype.addTrack&&m.version>=65)return E(d);var g=d.RTCPeerConnection.prototype.getLocalStreams;d.RTCPeerConnection.prototype.getLocalStreams=function(){var Y=this,me=g.apply(this);return this._reverseStreams=this._reverseStreams||{},me.map(function(ge){return Y._reverseStreams[ge.id]})};var k=d.RTCPeerConnection.prototype.addStream;d.RTCPeerConnection.prototype.addStream=function(Y){var me=this;if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},Y.getTracks().forEach(function(ve){var Ce=me.getSenders().find(function(be){return be.track===ve});if(Ce)throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[Y.id]){var ge=new d.MediaStream(Y.getTracks());this._streams[Y.id]=ge,this._reverseStreams[ge.id]=Y,Y=ge}k.apply(this,[Y])};var A=d.RTCPeerConnection.prototype.removeStream;d.RTCPeerConnection.prototype.removeStream=function(Y){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},A.apply(this,[this._streams[Y.id]||Y]),delete this._reverseStreams[this._streams[Y.id]?this._streams[Y.id].id:Y.id],delete this._streams[Y.id]},d.RTCPeerConnection.prototype.addTrack=function(Y,me){var ge=this;if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var ve=[].slice.call(arguments,1);if(ve.length!==1||!ve[0].getTracks().find(function(Ye){return Ye===Y}))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");var Ce=this.getSenders().find(function(Ye){return Ye.track===Y});if(Ce)throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};var be=this._streams[me.id];if(be)be.addTrack(Y),Promise.resolve().then(function(){ge.dispatchEvent(new Event("negotiationneeded"))});else{var Pe=new d.MediaStream([Y]);this._streams[me.id]=Pe,this._reverseStreams[Pe.id]=me,this.addStream(Pe)}return this.getSenders().find(function(Ye){return Ye.track===Y})};function O(ne,Y){var me=Y.sdp;return Object.keys(ne._reverseStreams||[]).forEach(function(ge){var ve=ne._reverseStreams[ge],Ce=ne._streams[ve.id];me=me.replace(new RegExp(Ce.id,"g"),ve.id)}),new RTCSessionDescription({type:Y.type,sdp:me})}function H(ne,Y){var me=Y.sdp;return Object.keys(ne._reverseStreams||[]).forEach(function(ge){var ve=ne._reverseStreams[ge],Ce=ne._streams[ve.id];me=me.replace(new RegExp(ve.id,"g"),Ce.id)}),new RTCSessionDescription({type:Y.type,sdp:me})}["createOffer","createAnswer"].forEach(function(ne){var Y=d.RTCPeerConnection.prototype[ne],me=T({},ne,function(){var ge=this,ve=arguments,Ce=arguments.length&&typeof arguments[0]=="function";return Ce?Y.apply(this,[function(be){var Pe=O(ge,be);ve[0].apply(null,[Pe])},function(be){ve[1]&&ve[1].apply(null,be)},arguments[2]]):Y.apply(this,arguments).then(function(be){return O(ge,be)})});d.RTCPeerConnection.prototype[ne]=me[ne]});var Z=d.RTCPeerConnection.prototype.setLocalDescription;d.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?Z.apply(this,arguments):(arguments[0]=H(this,arguments[0]),Z.apply(this,arguments))};var X=Object.getOwnPropertyDescriptor(d.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(d.RTCPeerConnection.prototype,"localDescription",{get:function(){var Y=X.get.apply(this);return Y.type===""?Y:O(this,Y)}}),d.RTCPeerConnection.prototype.removeTrack=function(Y){var me=this;if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!Y._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");var ge=Y._pc===this;if(!ge)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};var ve=void 0;Object.keys(this._streams).forEach(function(Ce){var be=me._streams[Ce].getTracks().find(function(Pe){return Y.track===Pe});be&&(ve=me._streams[Ce])}),ve&&(ve.getTracks().length===1?this.removeStream(this._reverseStreams[ve.id]):ve.removeTrack(Y.track),this.dispatchEvent(new Event("negotiationneeded")))}}function z(d){var m=s.detectBrowser(d);if(!d.RTCPeerConnection&&d.webkitRTCPeerConnection&&(d.RTCPeerConnection=d.webkitRTCPeerConnection),!!d.RTCPeerConnection){m.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(k){var A=d.RTCPeerConnection.prototype[k],O=T({},k,function(){return arguments[0]=new(k==="addIceCandidate"?d.RTCIceCandidate:d.RTCSessionDescription)(arguments[0]),A.apply(this,arguments)});d.RTCPeerConnection.prototype[k]=O[k]});var g=d.RTCPeerConnection.prototype.addIceCandidate;d.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?m.version<78&&arguments[0]&&arguments[0].candidate===""?Promise.resolve():g.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}}function S(d){s.wrapPeerConnectionEvent(d,"negotiationneeded",function(m){var g=m.target;if(g.signalingState==="stable")return m})}},{"../utils.js":15,"./getdisplaymedia":4,"./getusermedia":5}],4:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=i;function i(r,a){if(!(r.navigator.mediaDevices&&"getDisplayMedia"in r.navigator.mediaDevices)&&r.navigator.mediaDevices){if(typeof a!="function"){console.error("shimGetDisplayMedia: getSourceId argument is not a function");return}r.navigator.mediaDevices.getDisplayMedia=function(s){return a(s).then(function(b){var T=s.video&&s.video.width,C=s.video&&s.video.height,y=s.video&&s.video.frameRate;return s.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:b,maxFrameRate:y||3}},T&&(s.video.mandatory.maxWidth=T),C&&(s.video.mandatory.maxHeight=C),r.navigator.mediaDevices.getUserMedia(s)})}}}},{}],5:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(T){return ue(T)}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":ue(T)};n.shimGetUserMedia=b;var r=f("../utils.js"),a=l(r);function l(T){if(T&&T.__esModule)return T;var C={};if(T!=null)for(var y in T)Object.prototype.hasOwnProperty.call(T,y)&&(C[y]=T[y]);return C.default=T,C}var s=a.log;function b(T){var C=T&&T.navigator;if(C.mediaDevices){var y=a.detectBrowser(T),h=function(S){if((typeof S=="undefined"?"undefined":i(S))!=="object"||S.mandatory||S.optional)return S;var d={};return Object.keys(S).forEach(function(m){if(!(m==="require"||m==="advanced"||m==="mediaSource")){var g=i(S[m])==="object"?S[m]:{ideal:S[m]};g.exact!==void 0&&typeof g.exact=="number"&&(g.min=g.max=g.exact);var k=function(H,Z){return H?H+Z.charAt(0).toUpperCase()+Z.slice(1):Z==="deviceId"?"sourceId":Z};if(g.ideal!==void 0){d.optional=d.optional||[];var A={};typeof g.ideal=="number"?(A[k("min",m)]=g.ideal,d.optional.push(A),A={},A[k("max",m)]=g.ideal,d.optional.push(A)):(A[k("",m)]=g.ideal,d.optional.push(A))}g.exact!==void 0&&typeof g.exact!="number"?(d.mandatory=d.mandatory||{},d.mandatory[k("",m)]=g.exact):["min","max"].forEach(function(O){g[O]!==void 0&&(d.mandatory=d.mandatory||{},d.mandatory[k(O,m)]=g[O])})}}),S.advanced&&(d.optional=(d.optional||[]).concat(S.advanced)),d},D=function(S,d){if(y.version>=61)return d(S);if(S=JSON.parse(JSON.stringify(S)),S&&i(S.audio)==="object"){var m=function(H,Z,X){Z in H&&!(X in H)&&(H[X]=H[Z],delete H[Z])};S=JSON.parse(JSON.stringify(S)),m(S.audio,"autoGainControl","googAutoGainControl"),m(S.audio,"noiseSuppression","googNoiseSuppression"),S.audio=h(S.audio)}if(S&&i(S.video)==="object"){var g=S.video.facingMode;g=g&&((typeof g=="undefined"?"undefined":i(g))==="object"?g:{ideal:g});var k=y.version<66;if(g&&(g.exact==="user"||g.exact==="environment"||g.ideal==="user"||g.ideal==="environment")&&!(C.mediaDevices.getSupportedConstraints&&C.mediaDevices.getSupportedConstraints().facingMode&&!k)){delete S.video.facingMode;var A=void 0;if(g.exact==="environment"||g.ideal==="environment"?A=["back","rear"]:(g.exact==="user"||g.ideal==="user")&&(A=["front"]),A)return C.mediaDevices.enumerateDevices().then(function(O){O=O.filter(function(Z){return Z.kind==="videoinput"});var H=O.find(function(Z){return A.some(function(X){return Z.label.toLowerCase().includes(X)})});return!H&&O.length&&A.includes("back")&&(H=O[O.length-1]),H&&(S.video.deviceId=g.exact?{exact:H.deviceId}:{ideal:H.deviceId}),S.video=h(S.video),s("chrome: "+JSON.stringify(S)),d(S)})}S.video=h(S.video)}return s("chrome: "+JSON.stringify(S)),d(S)},_=function(S){return y.version>=64?S:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[S.name]||S.name,message:S.message,constraint:S.constraint||S.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},E=function(S,d,m){D(S,function(g){C.webkitGetUserMedia(g,d,function(k){m&&m(_(k))})})};if(C.getUserMedia=E.bind(C),C.mediaDevices.getUserMedia){var w=C.mediaDevices.getUserMedia.bind(C.mediaDevices);C.mediaDevices.getUserMedia=function(z){return D(z,function(S){return w(S).then(function(d){if(S.audio&&!d.getAudioTracks().length||S.video&&!d.getVideoTracks().length)throw d.getTracks().forEach(function(m){m.stop()}),new DOMException("","NotFoundError");return d},function(d){return Promise.reject(_(d))})})}}}}},{"../utils.js":15}],6:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(E){return ue(E)}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":ue(E)};n.shimRTCIceCandidate=C,n.shimMaxMessageSize=y,n.shimSendThrowTypeError=h,n.shimConnectionState=D,n.removeAllowExtmapMixed=_;var r=f("sdp"),a=T(r),l=f("./utils"),s=b(l);function b(E){if(E&&E.__esModule)return E;var w={};if(E!=null)for(var z in E)Object.prototype.hasOwnProperty.call(E,z)&&(w[z]=E[z]);return w.default=E,w}function T(E){return E&&E.__esModule?E:{default:E}}function C(E){if(!(!E.RTCIceCandidate||E.RTCIceCandidate&&"foundation"in E.RTCIceCandidate.prototype)){var w=E.RTCIceCandidate;E.RTCIceCandidate=function(S){if((typeof S=="undefined"?"undefined":i(S))==="object"&&S.candidate&&S.candidate.indexOf("a=")===0&&(S=JSON.parse(JSON.stringify(S)),S.candidate=S.candidate.substr(2)),S.candidate&&S.candidate.length){var d=new w(S),m=a.default.parseCandidate(S.candidate),g=Object.assign(d,m);return g.toJSON=function(){return{candidate:g.candidate,sdpMid:g.sdpMid,sdpMLineIndex:g.sdpMLineIndex,usernameFragment:g.usernameFragment}},g}return new w(S)},E.RTCIceCandidate.prototype=w.prototype,s.wrapPeerConnectionEvent(E,"icecandidate",function(z){return z.candidate&&Object.defineProperty(z,"candidate",{value:new E.RTCIceCandidate(z.candidate),writable:"false"}),z})}}function y(E){if(E.RTCPeerConnection){var w=s.detectBrowser(E);"sctp"in E.RTCPeerConnection.prototype||Object.defineProperty(E.RTCPeerConnection.prototype,"sctp",{get:function(){return typeof this._sctp=="undefined"?null:this._sctp}});var z=function(A){if(!A||!A.sdp)return!1;var O=a.default.splitSections(A.sdp);return O.shift(),O.some(function(H){var Z=a.default.parseMLine(H);return Z&&Z.kind==="application"&&Z.protocol.indexOf("SCTP")!==-1})},S=function(A){var O=A.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(O===null||O.length<2)return-1;var H=parseInt(O[1],10);return H!==H?-1:H},d=function(A){var O=65536;return w.browser==="firefox"&&(w.version<57?A===-1?O=16384:O=2147483637:w.version<60?O=w.version===57?65535:65536:O=2147483637),O},m=function(A,O){var H=65536;w.browser==="firefox"&&w.version===57&&(H=65535);var Z=a.default.matchPrefix(A.sdp,"a=max-message-size:");return Z.length>0?H=parseInt(Z[0].substr(19),10):w.browser==="firefox"&&O!==-1&&(H=2147483637),H},g=E.RTCPeerConnection.prototype.setRemoteDescription;E.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,w.browser==="chrome"&&w.version>=76){var A=this.getConfiguration(),O=A.sdpSemantics;O==="plan-b"&&Object.defineProperty(this,"sctp",{get:function(){return typeof this._sctp=="undefined"?null:this._sctp},enumerable:!0,configurable:!0})}if(z(arguments[0])){var H=S(arguments[0]),Z=d(H),X=m(arguments[0],H),ne=void 0;Z===0&&X===0?ne=Number.POSITIVE_INFINITY:Z===0||X===0?ne=Math.max(Z,X):ne=Math.min(Z,X);var Y={};Object.defineProperty(Y,"maxMessageSize",{get:function(){return ne}}),this._sctp=Y}return g.apply(this,arguments)}}}function h(E){if(!(E.RTCPeerConnection&&"createDataChannel"in E.RTCPeerConnection.prototype))return;function w(S,d){var m=S.send;S.send=function(){var k=arguments[0],A=k.length||k.size||k.byteLength;if(S.readyState==="open"&&d.sctp&&A>d.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+d.sctp.maxMessageSize+" bytes)");return m.apply(S,arguments)}}var z=E.RTCPeerConnection.prototype.createDataChannel;E.RTCPeerConnection.prototype.createDataChannel=function(){var d=z.apply(this,arguments);return w(d,this),d},s.wrapPeerConnectionEvent(E,"datachannel",function(S){return w(S.channel,S.target),S})}function D(E){if(!(!E.RTCPeerConnection||"connectionState"in E.RTCPeerConnection.prototype)){var w=E.RTCPeerConnection.prototype;Object.defineProperty(w,"connectionState",{get:function(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(w,"onconnectionstatechange",{get:function(){return this._onconnectionstatechange||null},set:function(S){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),S&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=S)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(function(z){var S=w[z];w[z]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=function(d){var m=d.target;if(m._lastConnectionState!==m.connectionState){m._lastConnectionState=m.connectionState;var g=new Event("connectionstatechange",d);m.dispatchEvent(g)}return d},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),S.apply(this,arguments)}})}}function _(E){if(E.RTCPeerConnection){var w=s.detectBrowser(E);if(!(w.browser==="chrome"&&w.version>=71)){var z=E.RTCPeerConnection.prototype.setRemoteDescription;E.RTCPeerConnection.prototype.setRemoteDescription=function(d){return d&&d.sdp&&d.sdp.indexOf(`
|
|
|
a=extmap-allow-mixed`)!==-1&&(d.sdp=d.sdp.split(`
|
|
|
`).filter(function(m){return m.trim()!=="a=extmap-allow-mixed"}).join(`
|
|
|
`)),z.apply(this,arguments)}}}}},{"./utils":15,sdp:17}],7:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=n.shimGetUserMedia=void 0;var i=f("./getusermedia");Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return i.shimGetUserMedia}});var r=f("./getdisplaymedia");Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return r.shimGetDisplayMedia}}),n.shimPeerConnection=h,n.shimReplaceTrack=D;var a=f("../utils"),l=y(a),s=f("./filtericeservers"),b=f("rtcpeerconnection-shim"),T=C(b);function C(_){return _&&_.__esModule?_:{default:_}}function y(_){if(_&&_.__esModule)return _;var E={};if(_!=null)for(var w in _)Object.prototype.hasOwnProperty.call(_,w)&&(E[w]=_[w]);return E.default=_,E}function h(_){var E=l.detectBrowser(_);if(_.RTCIceGatherer&&(_.RTCIceCandidate||(_.RTCIceCandidate=function(d){return d}),_.RTCSessionDescription||(_.RTCSessionDescription=function(d){return d}),E.version<15025)){var w=Object.getOwnPropertyDescriptor(_.MediaStreamTrack.prototype,"enabled");Object.defineProperty(_.MediaStreamTrack.prototype,"enabled",{set:function(d){w.set.call(this,d);var m=new Event("enabled");m.enabled=d,this.dispatchEvent(m)}})}_.RTCRtpSender&&!("dtmf"in _.RTCRtpSender.prototype)&&Object.defineProperty(_.RTCRtpSender.prototype,"dtmf",{get:function(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=new _.RTCDtmfSender(this):this.track.kind==="video"&&(this._dtmf=null)),this._dtmf}}),_.RTCDtmfSender&&!_.RTCDTMFSender&&(_.RTCDTMFSender=_.RTCDtmfSender);var z=(0,T.default)(_,E.version);_.RTCPeerConnection=function(d){return d&&d.iceServers&&(d.iceServers=(0,s.filterIceServers)(d.iceServers,E.version),l.log("ICE servers after filtering:",d.iceServers)),new z(d)},_.RTCPeerConnection.prototype=z.prototype}function D(_){_.RTCRtpSender&&!("replaceTrack"in _.RTCRtpSender.prototype)&&(_.RTCRtpSender.prototype.replaceTrack=_.RTCRtpSender.prototype.setTrack)}},{"../utils":15,"./filtericeservers":8,"./getdisplaymedia":9,"./getusermedia":10,"rtcpeerconnection-shim":16}],8:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.filterIceServers=l;var i=f("../utils"),r=a(i);function a(s){if(s&&s.__esModule)return s;var b={};if(s!=null)for(var T in s)Object.prototype.hasOwnProperty.call(s,T)&&(b[T]=s[T]);return b.default=s,b}function l(s,b){var T=!1;return s=JSON.parse(JSON.stringify(s)),s.filter(function(C){if(C&&(C.urls||C.url)){var y=C.urls||C.url;C.url&&!C.urls&&r.deprecated("RTCIceServer.url","RTCIceServer.urls");var h=typeof y=="string";return h&&(y=[y]),y=y.filter(function(D){if(D.indexOf("stun:")===0)return!1;var _=D.startsWith("turn")&&!D.startsWith("turn:[")&&D.includes("transport=udp");return _&&!T?(T=!0,!0):_&&!T}),delete C.url,C.urls=h?y[0]:y,!!y.length}})}},{"../utils":15}],9:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=i;function i(r){"getDisplayMedia"in r.navigator&&r.navigator.mediaDevices&&(r.navigator.mediaDevices&&"getDisplayMedia"in r.navigator.mediaDevices||(r.navigator.mediaDevices.getDisplayMedia=r.navigator.getDisplayMedia.bind(r.navigator)))}},{}],10:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetUserMedia=i;function i(r){var a=r&&r.navigator,l=function(T){return{name:{PermissionDeniedError:"NotAllowedError"}[T.name]||T.name,message:T.message,constraint:T.constraint,toString:function(){return this.name}}},s=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(b){return s(b).catch(function(T){return Promise.reject(l(T))})}}},{}],11:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=n.shimGetUserMedia=void 0;var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(d){return ue(d)}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":ue(d)},r=f("./getusermedia");Object.defineProperty(n,"shimGetUserMedia",{enumerable:!0,get:function(){return r.shimGetUserMedia}});var a=f("./getdisplaymedia");Object.defineProperty(n,"shimGetDisplayMedia",{enumerable:!0,get:function(){return a.shimGetDisplayMedia}}),n.shimOnTrack=C,n.shimPeerConnection=y,n.shimSenderGetStats=h,n.shimReceiverGetStats=D,n.shimRemoveStream=_,n.shimRTCDataChannel=E,n.shimAddTransceiver=w,n.shimCreateOffer=z,n.shimCreateAnswer=S;var l=f("../utils"),s=b(l);function b(d){if(d&&d.__esModule)return d;var m={};if(d!=null)for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[g]=d[g]);return m.default=d,m}function T(d,m,g){return m in d?Object.defineProperty(d,m,{value:g,enumerable:!0,configurable:!0,writable:!0}):d[m]=g,d}function C(d){(typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCTrackEvent&&"receiver"in d.RTCTrackEvent.prototype&&!("transceiver"in d.RTCTrackEvent.prototype)&&Object.defineProperty(d.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function y(d){var m=s.detectBrowser(d);if(!((typeof d=="undefined"?"undefined":i(d))!=="object"||!(d.RTCPeerConnection||d.mozRTCPeerConnection))){if(!d.RTCPeerConnection&&d.mozRTCPeerConnection&&(d.RTCPeerConnection=d.mozRTCPeerConnection),m.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(O){var H=d.RTCPeerConnection.prototype[O],Z=T({},O,function(){return arguments[0]=new(O==="addIceCandidate"?d.RTCIceCandidate:d.RTCSessionDescription)(arguments[0]),H.apply(this,arguments)});d.RTCPeerConnection.prototype[O]=Z[O]}),m.version<68){var g=d.RTCPeerConnection.prototype.addIceCandidate;d.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&arguments[0].candidate===""?Promise.resolve():g.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}var k={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},A=d.RTCPeerConnection.prototype.getStats;d.RTCPeerConnection.prototype.getStats=function(){var H=Array.prototype.slice.call(arguments),Z=H[0],X=H[1],ne=H[2];return A.apply(this,[Z||null]).then(function(Y){if(m.version<53&&!X)try{Y.forEach(function(me){me.type=k[me.type]||me.type})}catch(me){if(me.name!=="TypeError")throw me;Y.forEach(function(ge,ve){Y.set(ve,Object.assign({},ge,{type:k[ge.type]||ge.type}))})}return Y}).then(X,ne)}}}function h(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&d.RTCRtpSender&&!(d.RTCRtpSender&&"getStats"in d.RTCRtpSender.prototype)){var m=d.RTCPeerConnection.prototype.getSenders;m&&(d.RTCPeerConnection.prototype.getSenders=function(){var A=this,O=m.apply(this,[]);return O.forEach(function(H){return H._pc=A}),O});var g=d.RTCPeerConnection.prototype.addTrack;g&&(d.RTCPeerConnection.prototype.addTrack=function(){var A=g.apply(this,arguments);return A._pc=this,A}),d.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}}function D(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection&&d.RTCRtpSender&&!(d.RTCRtpSender&&"getStats"in d.RTCRtpReceiver.prototype)){var m=d.RTCPeerConnection.prototype.getReceivers;m&&(d.RTCPeerConnection.prototype.getReceivers=function(){var k=this,A=m.apply(this,[]);return A.forEach(function(O){return O._pc=k}),A}),s.wrapPeerConnectionEvent(d,"track",function(g){return g.receiver._pc=g.srcElement,g}),d.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}}function _(d){!d.RTCPeerConnection||"removeStream"in d.RTCPeerConnection.prototype||(d.RTCPeerConnection.prototype.removeStream=function(g){var k=this;s.deprecated("removeStream","removeTrack"),this.getSenders().forEach(function(A){A.track&&g.getTracks().includes(A.track)&&k.removeTrack(A)})})}function E(d){d.DataChannel&&!d.RTCDataChannel&&(d.RTCDataChannel=d.DataChannel)}function w(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection){var m=d.RTCPeerConnection.prototype.addTransceiver;m&&(d.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];var k=arguments[1],A=k&&"sendEncodings"in k;A&&k.sendEncodings.forEach(function(X){if("rid"in X){var ne=/^[a-z0-9]{0,16}$/i;if(!ne.test(X.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in X&&!(parseFloat(X.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in X&&!(parseFloat(X.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});var O=m.apply(this,arguments);if(A){var H=O.sender,Z=H.getParameters();"encodings"in Z||(Z.encodings=k.sendEncodings,this.setParametersPromises.push(H.setParameters(Z).catch(function(){})))}return O})}}function z(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection){var m=d.RTCPeerConnection.prototype.createOffer;d.RTCPeerConnection.prototype.createOffer=function(){var k=this,A=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return m.apply(k,A)}).finally(function(){k.setParametersPromises=[]}):m.apply(this,arguments)}}}function S(d){if((typeof d=="undefined"?"undefined":i(d))==="object"&&d.RTCPeerConnection){var m=d.RTCPeerConnection.prototype.createAnswer;d.RTCPeerConnection.prototype.createAnswer=function(){var k=this,A=arguments;return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(function(){return m.apply(k,A)}).finally(function(){k.setParametersPromises=[]}):m.apply(this,arguments)}}}},{"../utils":15,"./getdisplaymedia":12,"./getusermedia":13}],12:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0}),n.shimGetDisplayMedia=i;function i(r,a){r.navigator.mediaDevices&&"getDisplayMedia"in r.navigator.mediaDevices||r.navigator.mediaDevices&&(r.navigator.mediaDevices.getDisplayMedia=function(s){if(!(s&&s.video)){var b=new DOMException("getDisplayMedia without video constraints is undefined");return b.name="NotFoundError",b.code=8,Promise.reject(b)}return s.video===!0?s.video={mediaSource:a}:s.video.mediaSource=a,r.navigator.mediaDevices.getUserMedia(s)})}},{}],13:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(b){return ue(b)}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":ue(b)};n.shimGetUserMedia=s;var r=f("../utils"),a=l(r);function l(b){if(b&&b.__esModule)return b;var T={};if(b!=null)for(var C in b)Object.prototype.hasOwnProperty.call(b,C)&&(T[C]=b[C]);return T.default=b,T}function s(b){var T=a.detectBrowser(b),C=b&&b.navigator,y=b&&b.MediaStreamTrack;if(C.getUserMedia=function(w,z,S){a.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),C.mediaDevices.getUserMedia(w).then(z,S)},!(T.version>55&&"autoGainControl"in C.mediaDevices.getSupportedConstraints())){var h=function(z,S,d){S in z&&!(d in z)&&(z[d]=z[S],delete z[S])},D=C.mediaDevices.getUserMedia.bind(C.mediaDevices);if(C.mediaDevices.getUserMedia=function(w){return(typeof w=="undefined"?"undefined":i(w))==="object"&&i(w.audio)==="object"&&(w=JSON.parse(JSON.stringify(w)),h(w.audio,"autoGainControl","mozAutoGainControl"),h(w.audio,"noiseSuppression","mozNoiseSuppression")),D(w)},y&&y.prototype.getSettings){var _=y.prototype.getSettings;y.prototype.getSettings=function(){var w=_.apply(this,arguments);return h(w,"mozAutoGainControl","autoGainControl"),h(w,"mozNoiseSuppression","noiseSuppression"),w}}if(y&&y.prototype.applyConstraints){var E=y.prototype.applyConstraints;y.prototype.applyConstraints=function(w){return this.kind==="audio"&&(typeof w=="undefined"?"undefined":i(w))==="object"&&(w=JSON.parse(JSON.stringify(w)),h(w,"autoGainControl","mozAutoGainControl"),h(w,"noiseSuppression","mozNoiseSuppression")),E.apply(this,[w])}}}}},{"../utils":15}],14:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(E){return ue(E)}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":ue(E)};n.shimLocalStreamsAPI=s,n.shimRemoteStreamsAPI=b,n.shimCallbacksAPI=T,n.shimGetUserMedia=C,n.shimConstraints=y,n.shimRTCIceServerUrls=h,n.shimTrackEventTransceiver=D,n.shimCreateOfferLegacy=_;var r=f("../utils"),a=l(r);function l(E){if(E&&E.__esModule)return E;var w={};if(E!=null)for(var z in E)Object.prototype.hasOwnProperty.call(E,z)&&(w[z]=E[z]);return w.default=E,w}function s(E){if(!((typeof E=="undefined"?"undefined":i(E))!=="object"||!E.RTCPeerConnection)){if("getLocalStreams"in E.RTCPeerConnection.prototype||(E.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in E.RTCPeerConnection.prototype)){var w=E.RTCPeerConnection.prototype.addTrack;E.RTCPeerConnection.prototype.addStream=function(S){var d=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(S)||this._localStreams.push(S),S.getAudioTracks().forEach(function(m){return w.call(d,m,S)}),S.getVideoTracks().forEach(function(m){return w.call(d,m,S)})},E.RTCPeerConnection.prototype.addTrack=function(S){var d=arguments[1];return d&&(this._localStreams?this._localStreams.includes(d)||this._localStreams.push(d):this._localStreams=[d]),w.apply(this,arguments)}}"removeStream"in E.RTCPeerConnection.prototype||(E.RTCPeerConnection.prototype.removeStream=function(S){var d=this;this._localStreams||(this._localStreams=[]);var m=this._localStreams.indexOf(S);if(m!==-1){this._localStreams.splice(m,1);var g=S.getTracks();this.getSenders().forEach(function(k){g.includes(k.track)&&d.removeTrack(k)})}})}}function b(E){if(!((typeof E=="undefined"?"undefined":i(E))!=="object"||!E.RTCPeerConnection)&&("getRemoteStreams"in E.RTCPeerConnection.prototype||(E.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in E.RTCPeerConnection.prototype))){Object.defineProperty(E.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(S){var d=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=S),this.addEventListener("track",this._onaddstreampoly=function(m){m.streams.forEach(function(g){if(d._remoteStreams||(d._remoteStreams=[]),!d._remoteStreams.includes(g)){d._remoteStreams.push(g);var k=new Event("addstream");k.stream=g,d.dispatchEvent(k)}})})}});var w=E.RTCPeerConnection.prototype.setRemoteDescription;E.RTCPeerConnection.prototype.setRemoteDescription=function(){var S=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(d){d.streams.forEach(function(m){if(S._remoteStreams||(S._remoteStreams=[]),!(S._remoteStreams.indexOf(m)>=0)){S._remoteStreams.push(m);var g=new Event("addstream");g.stream=m,S.dispatchEvent(g)}})}),w.apply(S,arguments)}}}function T(E){if(!((typeof E=="undefined"?"undefined":i(E))!=="object"||!E.RTCPeerConnection)){var w=E.RTCPeerConnection.prototype,z=w.createOffer,S=w.createAnswer,d=w.setLocalDescription,m=w.setRemoteDescription,g=w.addIceCandidate;w.createOffer=function(O,H){var Z=arguments.length>=2?arguments[2]:arguments[0],X=z.apply(this,[Z]);return H?(X.then(O,H),Promise.resolve()):X},w.createAnswer=function(O,H){var Z=arguments.length>=2?arguments[2]:arguments[0],X=S.apply(this,[Z]);return H?(X.then(O,H),Promise.resolve()):X};var k=function(O,H,Z){var X=d.apply(this,[O]);return Z?(X.then(H,Z),Promise.resolve()):X};w.setLocalDescription=k,k=function(O,H,Z){var X=m.apply(this,[O]);return Z?(X.then(H,Z),Promise.resolve()):X},w.setRemoteDescription=k,k=function(O,H,Z){var X=g.apply(this,[O]);return Z?(X.then(H,Z),Promise.resolve()):X},w.addIceCandidate=k}}function C(E){var w=E&&E.navigator;if(w.mediaDevices&&w.mediaDevices.getUserMedia){var z=w.mediaDevices,S=z.getUserMedia.bind(z);w.mediaDevices.getUserMedia=function(d){return S(y(d))}}!w.getUserMedia&&w.mediaDevices&&w.mediaDevices.getUserMedia&&(w.getUserMedia=function(m,g,k){w.mediaDevices.getUserMedia(m).then(g,k)}.bind(w))}function y(E){return E&&E.video!==void 0?Object.assign({},E,{video:a.compactObject(E.video)}):E}function h(E){var w=E.RTCPeerConnection;E.RTCPeerConnection=function(S,d){if(S&&S.iceServers){for(var m=[],g=0;g<S.iceServers.length;g++){var k=S.iceServers[g];!k.hasOwnProperty("urls")&&k.hasOwnProperty("url")?(a.deprecated("RTCIceServer.url","RTCIceServer.urls"),k=JSON.parse(JSON.stringify(k)),k.urls=k.url,delete k.url,m.push(k)):m.push(S.iceServers[g])}S.iceServers=m}return new w(S,d)},E.RTCPeerConnection.prototype=w.prototype,"generateCertificate"in E.RTCPeerConnection&&Object.defineProperty(E.RTCPeerConnection,"generateCertificate",{get:function(){return w.generateCertificate}})}function D(E){(typeof E=="undefined"?"undefined":i(E))==="object"&&E.RTCTrackEvent&&"receiver"in E.RTCTrackEvent.prototype&&!("transceiver"in E.RTCTrackEvent.prototype)&&Object.defineProperty(E.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function _(E){var w=E.RTCPeerConnection.prototype.createOffer;E.RTCPeerConnection.prototype.createOffer=function(S){if(S){typeof S.offerToReceiveAudio!="undefined"&&(S.offerToReceiveAudio=!!S.offerToReceiveAudio);var d=this.getTransceivers().find(function(g){return g.receiver.track.kind==="audio"});S.offerToReceiveAudio===!1&&d?d.direction==="sendrecv"?d.setDirection?d.setDirection("sendonly"):d.direction="sendonly":d.direction==="recvonly"&&(d.setDirection?d.setDirection("inactive"):d.direction="inactive"):S.offerToReceiveAudio===!0&&!d&&this.addTransceiver("audio"),typeof S.offerToReceiveVideo!="undefined"&&(S.offerToReceiveVideo=!!S.offerToReceiveVideo);var m=this.getTransceivers().find(function(g){return g.receiver.track.kind==="video"});S.offerToReceiveVideo===!1&&m?m.direction==="sendrecv"?m.setDirection?m.setDirection("sendonly"):m.direction="sendonly":m.direction==="recvonly"&&(m.setDirection?m.setDirection("inactive"):m.direction="inactive"):S.offerToReceiveVideo===!0&&!m&&this.addTransceiver("video")}return w.apply(this,arguments)}}},{"../utils":15}],15:[function(f,u,n){Object.defineProperty(n,"__esModule",{value:!0});var i=typeof Symbol=="function"&&ue(Symbol.iterator)==="symbol"?function(S){return ue(S)}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":ue(S)};n.extractVersion=s,n.wrapPeerConnectionEvent=b,n.disableLog=T,n.disableWarnings=C,n.log=y,n.deprecated=h,n.detectBrowser=D,n.compactObject=E,n.walkStats=w,n.filterStats=z;function r(S,d,m){return d in S?Object.defineProperty(S,d,{value:m,enumerable:!0,configurable:!0,writable:!0}):S[d]=m,S}var a=!0,l=!0;function s(S,d,m){var g=S.match(d);return g&&g.length>=m&&parseInt(g[m],10)}function b(S,d,m){if(S.RTCPeerConnection){var g=S.RTCPeerConnection.prototype,k=g.addEventListener;g.addEventListener=function(O,H){if(O!==d)return k.apply(this,arguments);var Z=function(ne){var Y=m(ne);Y&&H(Y)};return this._eventMap=this._eventMap||{},this._eventMap[H]=Z,k.apply(this,[O,Z])};var A=g.removeEventListener;g.removeEventListener=function(O,H){if(O!==d||!this._eventMap||!this._eventMap[H])return A.apply(this,arguments);var Z=this._eventMap[H];return delete this._eventMap[H],A.apply(this,[O,Z])},Object.defineProperty(g,"on"+d,{get:function(){return this["_on"+d]},set:function(H){this["_on"+d]&&(this.removeEventListener(d,this["_on"+d]),delete this["_on"+d]),H&&this.addEventListener(d,this["_on"+d]=H)},enumerable:!0,configurable:!0})}}function T(S){return typeof S!="boolean"?new Error("Argument type: "+(typeof S=="undefined"?"undefined":i(S))+". Please use a boolean."):(a=S,S?"adapter.js logging disabled":"adapter.js logging enabled")}function C(S){return typeof S!="boolean"?new Error("Argument type: "+(typeof S=="undefined"?"undefined":i(S))+". Please use a boolean."):(l=!S,"adapter.js deprecation warnings "+(S?"disabled":"enabled"))}function y(){if((typeof window=="undefined"?"undefined":i(window))==="object"){if(a)return;typeof console!="undefined"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function h(S,d){l&&console.warn(S+" is deprecated, please use "+d+" instead.")}function D(S){var d=S.navigator,m={browser:null,version:null};if(typeof S=="undefined"||!S.navigator)return m.browser="Not a browser.",m;if(d.mozGetUserMedia)m.browser="firefox",m.version=s(d.userAgent,/Firefox\/(\d+)\./,1);else if(d.webkitGetUserMedia||S.isSecureContext===!1&&S.webkitRTCPeerConnection&&!S.RTCIceGatherer)m.browser="chrome",m.version=s(d.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(d.mediaDevices&&d.userAgent.match(/Edge\/(\d+).(\d+)$/))m.browser="edge",m.version=s(d.userAgent,/Edge\/(\d+).(\d+)$/,2);else if(S.RTCPeerConnection&&d.userAgent.match(/AppleWebKit\/(\d+)\./))m.browser="safari",m.version=s(d.userAgent,/AppleWebKit\/(\d+)\./,1),m.supportsUnifiedPlan=S.RTCRtpTransceiver&&"currentDirection"in S.RTCRtpTransceiver.prototype;else return m.browser="Not a supported browser.",m;return m}function _(S){return Object.prototype.toString.call(S)==="[object Object]"}function E(S){return _(S)?Object.keys(S).reduce(function(d,m){var g=_(S[m]),k=g?E(S[m]):S[m],A=g&&!Object.keys(k).length;return k===void 0||A?d:Object.assign(d,r({},m,k))},{}):S}function w(S,d,m){!d||m.has(d.id)||(m.set(d.id,d),Object.keys(d).forEach(function(g){g.endsWith("Id")?w(S,S.get(d[g]),m):g.endsWith("Ids")&&d[g].forEach(function(k){w(S,S.get(k),m)})}))}function z(S,d,m){var g=m?"outbound-rtp":"inbound-rtp",k=new Map;if(d===null)return k;var A=[];return S.forEach(function(O){O.type==="track"&&O.trackIdentifier===d.id&&A.push(O)}),A.forEach(function(O){S.forEach(function(H){H.type===g&&H.trackId===O.id&&w(S,H,k)})}),k}},{}],16:[function(f,u,n){var i=f("sdp");function r(y){return{inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[y.type]||y.type}function a(y,h,D,_,E){var w=i.writeRtpDescription(y.kind,h);if(w+=i.writeIceParameters(y.iceGatherer.getLocalParameters()),w+=i.writeDtlsParameters(y.dtlsTransport.getLocalParameters(),D==="offer"?"actpass":E||"active"),w+="a=mid:"+y.mid+`\r
|
|
|
`,y.rtpSender&&y.rtpReceiver?w+=`a=sendrecv\r
|
|
|
`:y.rtpSender?w+=`a=sendonly\r
|
|
|
`:y.rtpReceiver?w+=`a=recvonly\r
|
|
|
`:w+=`a=inactive\r
|
|
|
`,y.rtpSender){var z=y.rtpSender._initialTrackId||y.rtpSender.track.id;y.rtpSender._initialTrackId=z;var S="msid:"+(_?_.id:"-")+" "+z+`\r
|
|
|
`;w+="a="+S,w+="a=ssrc:"+y.sendEncodingParameters[0].ssrc+" "+S,y.sendEncodingParameters[0].rtx&&(w+="a=ssrc:"+y.sendEncodingParameters[0].rtx.ssrc+" "+S,w+="a=ssrc-group:FID "+y.sendEncodingParameters[0].ssrc+" "+y.sendEncodingParameters[0].rtx.ssrc+`\r
|
|
|
`)}return w+="a=ssrc:"+y.sendEncodingParameters[0].ssrc+" cname:"+i.localCName+`\r
|
|
|
`,y.rtpSender&&y.sendEncodingParameters[0].rtx&&(w+="a=ssrc:"+y.sendEncodingParameters[0].rtx.ssrc+" cname:"+i.localCName+`\r
|
|
|
`),w}function l(y,h){var D=!1;return y=JSON.parse(JSON.stringify(y)),y.filter(function(_){if(_&&(_.urls||_.url)){var E=_.urls||_.url;_.url&&!_.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var w=typeof E=="string";return w&&(E=[E]),E=E.filter(function(z){var S=z.indexOf("turn:")===0&&z.indexOf("transport=udp")!==-1&&z.indexOf("turn:[")===-1&&!D;return S?(D=!0,!0):z.indexOf("stun:")===0&&h>=14393&&z.indexOf("?transport=udp")===-1}),delete _.url,_.urls=w?E[0]:E,!!E.length}})}function s(y,h){var D={codecs:[],headerExtensions:[],fecMechanisms:[]},_=function(z,S){z=parseInt(z,10);for(var d=0;d<S.length;d++)if(S[d].payloadType===z||S[d].preferredPayloadType===z)return S[d]},E=function(z,S,d,m){var g=_(z.parameters.apt,d),k=_(S.parameters.apt,m);return g&&k&&g.name.toLowerCase()===k.name.toLowerCase()};return y.codecs.forEach(function(w){for(var z=0;z<h.codecs.length;z++){var S=h.codecs[z];if(w.name.toLowerCase()===S.name.toLowerCase()&&w.clockRate===S.clockRate){if(w.name.toLowerCase()==="rtx"&&w.parameters&&S.parameters.apt&&!E(w,S,y.codecs,h.codecs))continue;S=JSON.parse(JSON.stringify(S)),S.numChannels=Math.min(w.numChannels,S.numChannels),D.codecs.push(S),S.rtcpFeedback=S.rtcpFeedback.filter(function(d){for(var m=0;m<w.rtcpFeedback.length;m++)if(w.rtcpFeedback[m].type===d.type&&w.rtcpFeedback[m].parameter===d.parameter)return!0;return!1});break}}}),y.headerExtensions.forEach(function(w){for(var z=0;z<h.headerExtensions.length;z++){var S=h.headerExtensions[z];if(w.uri===S.uri){D.headerExtensions.push(S);break}}}),D}function b(y,h,D){return{offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[h][y].indexOf(D)!==-1}function T(y,h){var D=y.getRemoteCandidates().find(function(_){return h.foundation===_.foundation&&h.ip===_.ip&&h.port===_.port&&h.priority===_.priority&&h.protocol===_.protocol&&h.type===_.type});return D||y.addRemoteCandidate(h),!D}function C(y,h){var D=new Error(h);return D.name=y,D.code={NotSupportedError:9,InvalidStateError:11,InvalidAccessError:15,TypeError:void 0,OperationError:void 0}[y],D}u.exports=function(y,h){function D(d,m){m.addTrack(d),m.dispatchEvent(new y.MediaStreamTrackEvent("addtrack",{track:d}))}function _(d,m){m.removeTrack(d),m.dispatchEvent(new y.MediaStreamTrackEvent("removetrack",{track:d}))}function E(d,m,g,k){var A=new Event("track");A.track=m,A.receiver=g,A.transceiver={receiver:g},A.streams=k,y.setTimeout(function(){d._dispatchEvent("track",A)})}var w=function(m){var g=this,k=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(O){g[O]=k[O].bind(k)}),this.canTrickleIceCandidates=null,this.needNegotiation=!1,this.localStreams=[],this.remoteStreams=[],this._localDescription=null,this._remoteDescription=null,this.signalingState="stable",this.iceConnectionState="new",this.connectionState="new",this.iceGatheringState="new",m=JSON.parse(JSON.stringify(m||{})),this.usingBundle=m.bundlePolicy==="max-bundle",m.rtcpMuxPolicy==="negotiate")throw C("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(m.rtcpMuxPolicy||(m.rtcpMuxPolicy="require"),m.iceTransportPolicy){case"all":case"relay":break;default:m.iceTransportPolicy="all";break}switch(m.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:m.bundlePolicy="balanced";break}if(m.iceServers=l(m.iceServers||[],h),this._iceGatherers=[],m.iceCandidatePoolSize)for(var A=m.iceCandidatePoolSize;A>0;A--)this._iceGatherers.push(new y.RTCIceGatherer({iceServers:m.iceServers,gatherPolicy:m.iceTransportPolicy}));else m.iceCandidatePoolSize=0;this._config=m,this.transceivers=[],this._sdpSessionId=i.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(w.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(w.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),w.prototype.onicecandidate=null,w.prototype.onaddstream=null,w.prototype.ontrack=null,w.prototype.onremovestream=null,w.prototype.onsignalingstatechange=null,w.prototype.oniceconnectionstatechange=null,w.prototype.onconnectionstatechange=null,w.prototype.onicegatheringstatechange=null,w.prototype.onnegotiationneeded=null,w.prototype.ondatachannel=null,w.prototype._dispatchEvent=function(d,m){this._isClosed||(this.dispatchEvent(m),typeof this["on"+d]=="function"&&this["on"+d](m))},w.prototype._emitGatheringStateChange=function(){var d=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",d)},w.prototype.getConfiguration=function(){return this._config},w.prototype.getLocalStreams=function(){return this.localStreams},w.prototype.getRemoteStreams=function(){return this.remoteStreams},w.prototype._createTransceiver=function(d,m){var g=this.transceivers.length>0,k={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:d,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&g)k.iceTransport=this.transceivers[0].iceTransport,k.dtlsTransport=this.transceivers[0].dtlsTransport;else{var A=this._createIceAndDtlsTransports();k.iceTransport=A.iceTransport,k.dtlsTransport=A.dtlsTransport}return m||this.transceivers.push(k),k},w.prototype.addTrack=function(d,m){if(this._isClosed)throw C("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var g=this.transceivers.find(function(O){return O.track===d});if(g)throw C("InvalidAccessError","Track already exists.");for(var k,A=0;A<this.transceivers.length;A++)!this.transceivers[A].track&&this.transceivers[A].kind===d.kind&&(k=this.transceivers[A]);return k||(k=this._createTransceiver(d.kind)),this._maybeFireNegotiationNeeded(),this.localStreams.indexOf(m)===-1&&this.localStreams.push(m),k.track=d,k.stream=m,k.rtpSender=new y.RTCRtpSender(d,k.dtlsTransport),k.rtpSender},w.prototype.addStream=function(d){var m=this;if(h>=15025)d.getTracks().forEach(function(k){m.addTrack(k,d)});else{var g=d.clone();d.getTracks().forEach(function(k,A){var O=g.getTracks()[A];k.addEventListener("enabled",function(H){O.enabled=H.enabled})}),g.getTracks().forEach(function(k){m.addTrack(k,g)})}},w.prototype.removeTrack=function(d){if(this._isClosed)throw C("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(d instanceof y.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var m=this.transceivers.find(function(A){return A.rtpSender===d});if(!m)throw C("InvalidAccessError","Sender was not created by this connection.");var g=m.stream;m.rtpSender.stop(),m.rtpSender=null,m.track=null,m.stream=null;var k=this.transceivers.map(function(A){return A.stream});k.indexOf(g)===-1&&this.localStreams.indexOf(g)>-1&&this.localStreams.splice(this.localStreams.indexOf(g),1),this._maybeFireNegotiationNeeded()},w.prototype.removeStream=function(d){var m=this;d.getTracks().forEach(function(g){var k=m.getSenders().find(function(A){return A.track===g});k&&m.removeTrack(k)})},w.prototype.getSenders=function(){return this.transceivers.filter(function(d){return!!d.rtpSender}).map(function(d){return d.rtpSender})},w.prototype.getReceivers=function(){return this.transceivers.filter(function(d){return!!d.rtpReceiver}).map(function(d){return d.rtpReceiver})},w.prototype._createIceGatherer=function(d,m){var g=this;if(m&&d>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var k=new y.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(k,"state",{value:"new",writable:!0}),this.transceivers[d].bufferedCandidateEvents=[],this.transceivers[d].bufferCandidates=function(A){var O=!A.candidate||Object.keys(A.candidate).length===0;k.state=O?"completed":"gathering",g.transceivers[d].bufferedCandidateEvents!==null&&g.transceivers[d].bufferedCandidateEvents.push(A)},k.addEventListener("localcandidate",this.transceivers[d].bufferCandidates),k},w.prototype._gather=function(d,m){var g=this,k=this.transceivers[m].iceGatherer;if(!k.onlocalcandidate){var A=this.transceivers[m].bufferedCandidateEvents;this.transceivers[m].bufferedCandidateEvents=null,k.removeEventListener("localcandidate",this.transceivers[m].bufferCandidates),k.onlocalcandidate=function(O){if(!(g.usingBundle&&m>0)){var H=new Event("icecandidate");H.candidate={sdpMid:d,sdpMLineIndex:m};var Z=O.candidate,X=!Z||Object.keys(Z).length===0;if(X)(k.state==="new"||k.state==="gathering")&&(k.state="completed");else{k.state==="new"&&(k.state="gathering"),Z.component=1,Z.ufrag=k.getLocalParameters().usernameFragment;var ne=i.writeCandidate(Z);H.candidate=Object.assign(H.candidate,i.parseCandidate(ne)),H.candidate.candidate=ne,H.candidate.toJSON=function(){return{candidate:H.candidate.candidate,sdpMid:H.candidate.sdpMid,sdpMLineIndex:H.candidate.sdpMLineIndex,usernameFragment:H.candidate.usernameFragment}}}var Y=i.getMediaSections(g._localDescription.sdp);X?Y[H.candidate.sdpMLineIndex]+=`a=end-of-candidates\r
|
|
|
`:Y[H.candidate.sdpMLineIndex]+="a="+H.candidate.candidate+`\r
|
|
|
`,g._localDescription.sdp=i.getDescription(g._localDescription.sdp)+Y.join("");var me=g.transceivers.every(function(ge){return ge.iceGatherer&&ge.iceGatherer.state==="completed"});g.iceGatheringState!=="gathering"&&(g.iceGatheringState="gathering",g._emitGatheringStateChange()),X||g._dispatchEvent("icecandidate",H),me&&(g._dispatchEvent("icecandidate",new Event("icecandidate")),g.iceGatheringState="complete",g._emitGatheringStateChange())}},y.setTimeout(function(){A.forEach(function(O){k.onlocalcandidate(O)})},0)}},w.prototype._createIceAndDtlsTransports=function(){var d=this,m=new y.RTCIceTransport(null);m.onicestatechange=function(){d._updateIceConnectionState(),d._updateConnectionState()};var g=new y.RTCDtlsTransport(m);return g.ondtlsstatechange=function(){d._updateConnectionState()},g.onerror=function(){Object.defineProperty(g,"state",{value:"failed",writable:!0}),d._updateConnectionState()},{iceTransport:m,dtlsTransport:g}},w.prototype._disposeIceAndDtlsTransports=function(d){var m=this.transceivers[d].iceGatherer;m&&(delete m.onlocalcandidate,delete this.transceivers[d].iceGatherer);var g=this.transceivers[d].iceTransport;g&&(delete g.onicestatechange,delete this.transceivers[d].iceTransport);var k=this.transceivers[d].dtlsTransport;k&&(delete k.ondtlsstatechange,delete k.onerror,delete this.transceivers[d].dtlsTransport)},w.prototype._transceive=function(d,m,g){var k=s(d.localCapabilities,d.remoteCapabilities);m&&d.rtpSender&&(k.encodings=d.sendEncodingParameters,k.rtcp={cname:i.localCName,compound:d.rtcpParameters.compound},d.recvEncodingParameters.length&&(k.rtcp.ssrc=d.recvEncodingParameters[0].ssrc),d.rtpSender.send(k)),g&&d.rtpReceiver&&k.codecs.length>0&&(d.kind==="video"&&d.recvEncodingParameters&&h<15019&&d.recvEncodingParameters.forEach(function(A){delete A.rtx}),d.recvEncodingParameters.length?k.encodings=d.recvEncodingParameters:k.encodings=[{}],k.rtcp={compound:d.rtcpParameters.compound},d.rtcpParameters.cname&&(k.rtcp.cname=d.rtcpParameters.cname),d.sendEncodingParameters.length&&(k.rtcp.ssrc=d.sendEncodingParameters[0].ssrc),d.rtpReceiver.receive(k))},w.prototype.setLocalDescription=function(d){var m=this;if(["offer","answer"].indexOf(d.type)===-1)return Promise.reject(C("TypeError",'Unsupported type "'+d.type+'"'));if(!b("setLocalDescription",d.type,m.signalingState)||m._isClosed)return Promise.reject(C("InvalidStateError","Can not set local "+d.type+" in state "+m.signalingState));var g,k;if(d.type==="offer")g=i.splitSections(d.sdp),k=g.shift(),g.forEach(function(O,H){var Z=i.parseRtpParameters(O);m.transceivers[H].localCapabilities=Z}),m.transceivers.forEach(function(O,H){m._gather(O.mid,H)});else if(d.type==="answer"){g=i.splitSections(m._remoteDescription.sdp),k=g.shift();var A=i.matchPrefix(k,"a=ice-lite").length>0;g.forEach(function(O,H){var Z=m.transceivers[H],X=Z.iceGatherer,ne=Z.iceTransport,Y=Z.dtlsTransport,me=Z.localCapabilities,ge=Z.remoteCapabilities,ve=i.isRejected(O)&&i.matchPrefix(O,"a=bundle-only").length===0;if(!ve&&!Z.rejected){var Ce=i.getIceParameters(O,k),be=i.getDtlsParameters(O,k);A&&(be.role="server"),(!m.usingBundle||H===0)&&(m._gather(Z.mid,H),ne.state==="new"&&ne.start(X,Ce,A?"controlling":"controlled"),Y.state==="new"&&Y.start(be));var Pe=s(me,ge);m._transceive(Z,Pe.codecs.length>0,!1)}})}return m._localDescription={type:d.type,sdp:d.sdp},d.type==="offer"?m._updateSignalingState("have-local-offer"):m._updateSignalingState("stable"),Promise.resolve()},w.prototype.setRemoteDescription=function(d){var m=this;if(["offer","answer"].indexOf(d.type)===-1)return Promise.reject(C("TypeError",'Unsupported type "'+d.type+'"'));if(!b("setRemoteDescription",d.type,m.signalingState)||m._isClosed)return Promise.reject(C("InvalidStateError","Can not set remote "+d.type+" in state "+m.signalingState));var g={};m.remoteStreams.forEach(function(ne){g[ne.id]=ne});var k=[],A=i.splitSections(d.sdp),O=A.shift(),H=i.matchPrefix(O,"a=ice-lite").length>0,Z=i.matchPrefix(O,"a=group:BUNDLE ").length>0;m.usingBundle=Z;var X=i.matchPrefix(O,"a=ice-options:")[0];return X?m.canTrickleIceCandidates=X.substr(14).split(" ").indexOf("trickle")>=0:m.canTrickleIceCandidates=!1,A.forEach(function(ne,Y){var me=i.splitLines(ne),ge=i.getKind(ne),ve=i.isRejected(ne)&&i.matchPrefix(ne,"a=bundle-only").length===0,Ce=me[0].substr(2).split(" ")[2],be=i.getDirection(ne,O),Pe=i.parseMsid(ne),Ye=i.getMid(ne)||i.generateIdentifier();if(ve||ge==="application"&&(Ce==="DTLS/SCTP"||Ce==="UDP/DTLS/SCTP")){m.transceivers[Y]={mid:Ye,kind:ge,protocol:Ce,rejected:!0};return}!ve&&m.transceivers[Y]&&m.transceivers[Y].rejected&&(m.transceivers[Y]=m._createTransceiver(ge,!0));var N,K,te,ce,he,Re,we,ke,We,yn=i.parseRtpParameters(ne),Yt,It;ve||(Yt=i.getIceParameters(ne,O),It=i.getDtlsParameters(ne,O),It.role="client"),we=i.parseRtpEncodingParameters(ne);var Ht=i.parseRtcpParameters(ne),Ge=i.matchPrefix(ne,"a=end-of-candidates",O).length>0,Ct=i.matchPrefix(ne,"a=candidate:").map(function(ye){return i.parseCandidate(ye)}).filter(function(ye){return ye.component===1});if((d.type==="offer"||d.type==="answer")&&!ve&&Z&&Y>0&&m.transceivers[Y]&&(m._disposeIceAndDtlsTransports(Y),m.transceivers[Y].iceGatherer=m.transceivers[0].iceGatherer,m.transceivers[Y].iceTransport=m.transceivers[0].iceTransport,m.transceivers[Y].dtlsTransport=m.transceivers[0].dtlsTransport,m.transceivers[Y].rtpSender&&m.transceivers[Y].rtpSender.setTransport(m.transceivers[0].dtlsTransport),m.transceivers[Y].rtpReceiver&&m.transceivers[Y].rtpReceiver.setTransport(m.transceivers[0].dtlsTransport)),d.type==="offer"&&!ve){N=m.transceivers[Y]||m._createTransceiver(ge),N.mid=Ye,N.iceGatherer||(N.iceGatherer=m._createIceGatherer(Y,Z)),Ct.length&&N.iceTransport.state==="new"&&(Ge&&(!Z||Y===0)?N.iceTransport.setRemoteCandidates(Ct):Ct.forEach(function(ye){T(N.iceTransport,ye)})),ke=y.RTCRtpReceiver.getCapabilities(ge),h<15019&&(ke.codecs=ke.codecs.filter(function(ye){return ye.name!=="rtx"})),Re=N.sendEncodingParameters||[{ssrc:(2*Y+2)*1001}];var kt=!1;if(be==="sendrecv"||be==="sendonly"){if(kt=!N.rtpReceiver,he=N.rtpReceiver||new y.RTCRtpReceiver(N.dtlsTransport,ge),kt){var Oe;We=he.track,Pe&&Pe.stream==="-"||(Pe?(g[Pe.stream]||(g[Pe.stream]=new y.MediaStream,Object.defineProperty(g[Pe.stream],"id",{get:function(){return Pe.stream}})),Object.defineProperty(We,"id",{get:function(){return Pe.track}}),Oe=g[Pe.stream]):(g.default||(g.default=new y.MediaStream),Oe=g.default)),Oe&&(D(We,Oe),N.associatedRemoteMediaStreams.push(Oe)),k.push([We,he,Oe])}}else N.rtpReceiver&&N.rtpReceiver.track&&(N.associatedRemoteMediaStreams.forEach(function(ye){var De=ye.getTracks().find(function(Xe){return Xe.id===N.rtpReceiver.track.id});De&&_(De,ye)}),N.associatedRemoteMediaStreams=[]);N.localCapabilities=ke,N.remoteCapabilities=yn,N.rtpReceiver=he,N.rtcpParameters=Ht,N.sendEncodingParameters=Re,N.recvEncodingParameters=we,m._transceive(m.transceivers[Y],!1,kt)}else if(d.type==="answer"&&!ve){N=m.transceivers[Y],K=N.iceGatherer,te=N.iceTransport,ce=N.dtlsTransport,he=N.rtpReceiver,Re=N.sendEncodingParameters,ke=N.localCapabilities,m.transceivers[Y].recvEncodingParameters=we,m.transceivers[Y].remoteCapabilities=yn,m.transceivers[Y].rtcpParameters=Ht,Ct.length&&te.state==="new"&&((H||Ge)&&(!Z||Y===0)?te.setRemoteCandidates(Ct):Ct.forEach(function(ye){T(N.iceTransport,ye)})),(!Z||Y===0)&&(te.state==="new"&&te.start(K,Yt,"controlling"),ce.state==="new"&&ce.start(It));var rt=s(N.localCapabilities,N.remoteCapabilities),Ae=rt.codecs.filter(function(ye){return ye.name.toLowerCase()==="rtx"}).length;!Ae&&N.sendEncodingParameters[0].rtx&&delete N.sendEncodingParameters[0].rtx,m._transceive(N,be==="sendrecv"||be==="recvonly",be==="sendrecv"||be==="sendonly"),he&&(be==="sendrecv"||be==="sendonly")?(We=he.track,Pe?(g[Pe.stream]||(g[Pe.stream]=new y.MediaStream),D(We,g[Pe.stream]),k.push([We,he,g[Pe.stream]])):(g.default||(g.default=new y.MediaStream),D(We,g.default),k.push([We,he,g.default]))):delete N.rtpReceiver}}),m._dtlsRole===void 0&&(m._dtlsRole=d.type==="offer"?"active":"passive"),m._remoteDescription={type:d.type,sdp:d.sdp},d.type==="offer"?m._updateSignalingState("have-remote-offer"):m._updateSignalingState("stable"),Object.keys(g).forEach(function(ne){var Y=g[ne];if(Y.getTracks().length){if(m.remoteStreams.indexOf(Y)===-1){m.remoteStreams.push(Y);var me=new Event("addstream");me.stream=Y,y.setTimeout(function(){m._dispatchEvent("addstream",me)})}k.forEach(function(ge){var ve=ge[0],Ce=ge[1];Y.id===ge[2].id&&E(m,ve,Ce,[Y])})}}),k.forEach(function(ne){ne[2]||E(m,ne[0],ne[1],[])}),y.setTimeout(function(){m&&m.transceivers&&m.transceivers.forEach(function(ne){ne.iceTransport&&ne.iceTransport.state==="new"&&ne.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),ne.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},w.prototype.close=function(){this.transceivers.forEach(function(d){d.iceTransport&&d.iceTransport.stop(),d.dtlsTransport&&d.dtlsTransport.stop(),d.rtpSender&&d.rtpSender.stop(),d.rtpReceiver&&d.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},w.prototype._updateSignalingState=function(d){this.signalingState=d;var m=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",m)},w.prototype._maybeFireNegotiationNeeded=function(){var d=this;this.signalingState!=="stable"||this.needNegotiation===!0||(this.needNegotiation=!0,y.setTimeout(function(){if(d.needNegotiation){d.needNegotiation=!1;var m=new Event("negotiationneeded");d._dispatchEvent("negotiationneeded",m)}},0))},w.prototype._updateIceConnectionState=function(){var d,m={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(k){k.iceTransport&&!k.rejected&&m[k.iceTransport.state]++}),d="new",m.failed>0?d="failed":m.checking>0?d="checking":m.disconnected>0?d="disconnected":m.new>0?d="new":m.connected>0?d="connected":m.completed>0&&(d="completed"),d!==this.iceConnectionState){this.iceConnectionState=d;var g=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",g)}},w.prototype._updateConnectionState=function(){var d,m={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(k){k.iceTransport&&k.dtlsTransport&&!k.rejected&&(m[k.iceTransport.state]++,m[k.dtlsTransport.state]++)}),m.connected+=m.completed,d="new",m.failed>0?d="failed":m.connecting>0?d="connecting":m.disconnected>0?d="disconnected":m.new>0?d="new":m.connected>0&&(d="connected"),d!==this.connectionState){this.connectionState=d;var g=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",g)}},w.prototype.createOffer=function(){var d=this;if(d._isClosed)return Promise.reject(C("InvalidStateError","Can not call createOffer after close"));var m=d.transceivers.filter(function(H){return H.kind==="audio"}).length,g=d.transceivers.filter(function(H){return H.kind==="video"}).length,k=arguments[0];if(k){if(k.mandatory||k.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");k.offerToReceiveAudio!==void 0&&(k.offerToReceiveAudio===!0?m=1:k.offerToReceiveAudio===!1?m=0:m=k.offerToReceiveAudio),k.offerToReceiveVideo!==void 0&&(k.offerToReceiveVideo===!0?g=1:k.offerToReceiveVideo===!1?g=0:g=k.offerToReceiveVideo)}for(d.transceivers.forEach(function(H){H.kind==="audio"?(m--,m<0&&(H.wantReceive=!1)):H.kind==="video"&&(g--,g<0&&(H.wantReceive=!1))});m>0||g>0;)m>0&&(d._createTransceiver("audio"),m--),g>0&&(d._createTransceiver("video"),g--);var A=i.writeSessionBoilerplate(d._sdpSessionId,d._sdpSessionVersion++);d.transceivers.forEach(function(H,Z){var X=H.track,ne=H.kind,Y=H.mid||i.generateIdentifier();H.mid=Y,H.iceGatherer||(H.iceGatherer=d._createIceGatherer(Z,d.usingBundle));var me=y.RTCRtpSender.getCapabilities(ne);h<15019&&(me.codecs=me.codecs.filter(function(ve){return ve.name!=="rtx"})),me.codecs.forEach(function(ve){ve.name==="H264"&&ve.parameters["level-asymmetry-allowed"]===void 0&&(ve.parameters["level-asymmetry-allowed"]="1"),H.remoteCapabilities&&H.remoteCapabilities.codecs&&H.remoteCapabilities.codecs.forEach(function(Ce){ve.name.toLowerCase()===Ce.name.toLowerCase()&&ve.clockRate===Ce.clockRate&&(ve.preferredPayloadType=Ce.payloadType)})}),me.headerExtensions.forEach(function(ve){var Ce=H.remoteCapabilities&&H.remoteCapabilities.headerExtensions||[];Ce.forEach(function(be){ve.uri===be.uri&&(ve.id=be.id)})});var ge=H.sendEncodingParameters||[{ssrc:(2*Z+1)*1001}];X&&h>=15019&&ne==="video"&&!ge[0].rtx&&(ge[0].rtx={ssrc:ge[0].ssrc+1}),H.wantReceive&&(H.rtpReceiver=new y.RTCRtpReceiver(H.dtlsTransport,ne)),H.localCapabilities=me,H.sendEncodingParameters=ge}),d._config.bundlePolicy!=="max-compat"&&(A+="a=group:BUNDLE "+d.transceivers.map(function(H){return H.mid}).join(" ")+`\r
|
|
|
`),A+=`a=ice-options:trickle\r
|
|
|
`,d.transceivers.forEach(function(H,Z){A+=a(H,H.localCapabilities,"offer",H.stream,d._dtlsRole),A+=`a=rtcp-rsize\r
|
|
|
`,H.iceGatherer&&d.iceGatheringState!=="new"&&(Z===0||!d.usingBundle)&&(H.iceGatherer.getLocalCandidates().forEach(function(X){X.component=1,A+="a="+i.writeCandidate(X)+`\r
|
|
|
`}),H.iceGatherer.state==="completed"&&(A+=`a=end-of-candidates\r
|
|
|
`))});var O=new y.RTCSessionDescription({type:"offer",sdp:A});return Promise.resolve(O)},w.prototype.createAnswer=function(){var d=this;if(d._isClosed)return Promise.reject(C("InvalidStateError","Can not call createAnswer after close"));if(!(d.signalingState==="have-remote-offer"||d.signalingState==="have-local-pranswer"))return Promise.reject(C("InvalidStateError","Can not call createAnswer in signalingState "+d.signalingState));var m=i.writeSessionBoilerplate(d._sdpSessionId,d._sdpSessionVersion++);d.usingBundle&&(m+="a=group:BUNDLE "+d.transceivers.map(function(A){return A.mid}).join(" ")+`\r
|
|
|
`),m+=`a=ice-options:trickle\r
|
|
|
`;var g=i.getMediaSections(d._remoteDescription.sdp).length;d.transceivers.forEach(function(A,O){if(!(O+1>g)){if(A.rejected){A.kind==="application"?A.protocol==="DTLS/SCTP"?m+=`m=application 0 DTLS/SCTP 5000\r
|
|
|
`:m+="m=application 0 "+A.protocol+` webrtc-datachannel\r
|
|
|
`:A.kind==="audio"?m+=`m=audio 0 UDP/TLS/RTP/SAVPF 0\r
|
|
|
a=rtpmap:0 PCMU/8000\r
|
|
|
`:A.kind==="video"&&(m+=`m=video 0 UDP/TLS/RTP/SAVPF 120\r
|
|
|
a=rtpmap:120 VP8/90000\r
|
|
|
`),m+=`c=IN IP4 0.0.0.0\r
|
|
|
a=inactive\r
|
|
|
a=mid:`+A.mid+`\r
|
|
|
`;return}if(A.stream){var H;A.kind==="audio"?H=A.stream.getAudioTracks()[0]:A.kind==="video"&&(H=A.stream.getVideoTracks()[0]),H&&h>=15019&&A.kind==="video"&&!A.sendEncodingParameters[0].rtx&&(A.sendEncodingParameters[0].rtx={ssrc:A.sendEncodingParameters[0].ssrc+1})}var Z=s(A.localCapabilities,A.remoteCapabilities),X=Z.codecs.filter(function(ne){return ne.name.toLowerCase()==="rtx"}).length;!X&&A.sendEncodingParameters[0].rtx&&delete A.sendEncodingParameters[0].rtx,m+=a(A,Z,"answer",A.stream,d._dtlsRole),A.rtcpParameters&&A.rtcpParameters.reducedSize&&(m+=`a=rtcp-rsize\r
|
|
|
`)}});var k=new y.RTCSessionDescription({type:"answer",sdp:m});return Promise.resolve(k)},w.prototype.addIceCandidate=function(d){var m=this,g;return d&&!(d.sdpMLineIndex!==void 0||d.sdpMid)?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(k,A){if(m._remoteDescription)if(!d||d.candidate==="")for(var O=0;O<m.transceivers.length&&!(!m.transceivers[O].rejected&&(m.transceivers[O].iceTransport.addRemoteCandidate({}),g=i.getMediaSections(m._remoteDescription.sdp),g[O]+=`a=end-of-candidates\r
|
|
|
`,m._remoteDescription.sdp=i.getDescription(m._remoteDescription.sdp)+g.join(""),m.usingBundle));O++);else{var H=d.sdpMLineIndex;if(d.sdpMid){for(var Z=0;Z<m.transceivers.length;Z++)if(m.transceivers[Z].mid===d.sdpMid){H=Z;break}}var X=m.transceivers[H];if(X){if(X.rejected)return k();var ne=Object.keys(d.candidate).length>0?i.parseCandidate(d.candidate):{};if(ne.protocol==="tcp"&&(ne.port===0||ne.port===9)||ne.component&&ne.component!==1)return k();if((H===0||H>0&&X.iceTransport!==m.transceivers[0].iceTransport)&&!T(X.iceTransport,ne))return A(C("OperationError","Can not add ICE candidate"));var Y=d.candidate.trim();Y.indexOf("a=")===0&&(Y=Y.substr(2)),g=i.getMediaSections(m._remoteDescription.sdp),g[H]+="a="+(ne.type?Y:"end-of-candidates")+`\r
|
|
|
`,m._remoteDescription.sdp=i.getDescription(m._remoteDescription.sdp)+g.join("")}else return A(C("OperationError","Can not add ICE candidate"))}else return A(C("InvalidStateError","Can not add ICE candidate without a remote description"));k()})},w.prototype.getStats=function(d){if(d&&d instanceof y.MediaStreamTrack){var m=null;if(this.transceivers.forEach(function(k){k.rtpSender&&k.rtpSender.track===d?m=k.rtpSender:k.rtpReceiver&&k.rtpReceiver.track===d&&(m=k.rtpReceiver)}),!m)throw C("InvalidAccessError","Invalid selector.");return m.getStats()}var g=[];return this.transceivers.forEach(function(k){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(A){k[A]&&g.push(k[A].getStats())})}),Promise.all(g).then(function(k){var A=new Map;return k.forEach(function(O){O.forEach(function(H){A.set(H.id,H)})}),A})};var z=["RTCRtpSender","RTCRtpReceiver","RTCIceGatherer","RTCIceTransport","RTCDtlsTransport"];z.forEach(function(d){var m=y[d];if(m&&m.prototype&&m.prototype.getStats){var g=m.prototype.getStats;m.prototype.getStats=function(){return g.apply(this).then(function(k){var A=new Map;return Object.keys(k).forEach(function(O){k[O].type=r(k[O]),A.set(O,k[O])}),A})}}});var S=["createOffer","createAnswer"];return S.forEach(function(d){var m=w.prototype[d];w.prototype[d]=function(){var g=arguments;return typeof g[0]=="function"||typeof g[1]=="function"?m.apply(this,[arguments[2]]).then(function(k){typeof g[0]=="function"&&g[0].apply(null,[k])},function(k){typeof g[1]=="function"&&g[1].apply(null,[k])}):m.apply(this,arguments)}}),S=["setLocalDescription","setRemoteDescription","addIceCandidate"],S.forEach(function(d){var m=w.prototype[d];w.prototype[d]=function(){var g=arguments;return typeof g[1]=="function"||typeof g[2]=="function"?m.apply(this,arguments).then(function(){typeof g[1]=="function"&&g[1].apply(null)},function(k){typeof g[2]=="function"&&g[2].apply(null,[k])}):m.apply(this,arguments)}}),["getStats"].forEach(function(d){var m=w.prototype[d];w.prototype[d]=function(){var g=arguments;return typeof g[1]=="function"?m.apply(this,arguments).then(function(){typeof g[1]=="function"&&g[1].apply(null)}):m.apply(this,arguments)}}),w}},{sdp:17}],17:[function(f,u,n){var i={};i.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},i.localCName=i.generateIdentifier(),i.splitLines=function(r){return r.trim().split(`
|
|
|
`).map(function(a){return a.trim()})},i.splitSections=function(r){var a=r.split(`
|
|
|
m=`);return a.map(function(l,s){return(s>0?"m="+l:l).trim()+`\r
|
|
|
`})},i.getDescription=function(r){var a=i.splitSections(r);return a&&a[0]},i.getMediaSections=function(r){var a=i.splitSections(r);return a.shift(),a},i.matchPrefix=function(r,a){return i.splitLines(r).filter(function(l){return l.indexOf(a)===0})},i.parseCandidate=function(r){var a;r.indexOf("a=candidate:")===0?a=r.substring(12).split(" "):a=r.substring(10).split(" ");for(var l={foundation:a[0],component:parseInt(a[1],10),protocol:a[2].toLowerCase(),priority:parseInt(a[3],10),ip:a[4],address:a[4],port:parseInt(a[5],10),type:a[7]},s=8;s<a.length;s+=2)switch(a[s]){case"raddr":l.relatedAddress=a[s+1];break;case"rport":l.relatedPort=parseInt(a[s+1],10);break;case"tcptype":l.tcpType=a[s+1];break;case"ufrag":l.ufrag=a[s+1],l.usernameFragment=a[s+1];break;default:l[a[s]]=a[s+1];break}return l},i.writeCandidate=function(r){var a=[];a.push(r.foundation),a.push(r.component),a.push(r.protocol.toUpperCase()),a.push(r.priority),a.push(r.address||r.ip),a.push(r.port);var l=r.type;return a.push("typ"),a.push(l),l!=="host"&&r.relatedAddress&&r.relatedPort&&(a.push("raddr"),a.push(r.relatedAddress),a.push("rport"),a.push(r.relatedPort)),r.tcpType&&r.protocol.toLowerCase()==="tcp"&&(a.push("tcptype"),a.push(r.tcpType)),(r.usernameFragment||r.ufrag)&&(a.push("ufrag"),a.push(r.usernameFragment||r.ufrag)),"candidate:"+a.join(" ")},i.parseIceOptions=function(r){return r.substr(14).split(" ")},i.parseRtpMap=function(r){var a=r.substr(9).split(" "),l={payloadType:parseInt(a.shift(),10)};return a=a[0].split("/"),l.name=a[0],l.clockRate=parseInt(a[1],10),l.channels=a.length===3?parseInt(a[2],10):1,l.numChannels=l.channels,l},i.writeRtpMap=function(r){var a=r.payloadType;r.preferredPayloadType!==void 0&&(a=r.preferredPayloadType);var l=r.channels||r.numChannels||1;return"a=rtpmap:"+a+" "+r.name+"/"+r.clockRate+(l!==1?"/"+l:"")+`\r
|
|
|
`},i.parseExtmap=function(r){var a=r.substr(9).split(" ");return{id:parseInt(a[0],10),direction:a[0].indexOf("/")>0?a[0].split("/")[1]:"sendrecv",uri:a[1]}},i.writeExtmap=function(r){return"a=extmap:"+(r.id||r.preferredId)+(r.direction&&r.direction!=="sendrecv"?"/"+r.direction:"")+" "+r.uri+`\r
|
|
|
`},i.parseFmtp=function(r){for(var a={},l,s=r.substr(r.indexOf(" ")+1).split(";"),b=0;b<s.length;b++)l=s[b].trim().split("="),a[l[0].trim()]=l[1];return a},i.writeFmtp=function(r){var a="",l=r.payloadType;if(r.preferredPayloadType!==void 0&&(l=r.preferredPayloadType),r.parameters&&Object.keys(r.parameters).length){var s=[];Object.keys(r.parameters).forEach(function(b){r.parameters[b]?s.push(b+"="+r.parameters[b]):s.push(b)}),a+="a=fmtp:"+l+" "+s.join(";")+`\r
|
|
|
`}return a},i.parseRtcpFb=function(r){var a=r.substr(r.indexOf(" ")+1).split(" ");return{type:a.shift(),parameter:a.join(" ")}},i.writeRtcpFb=function(r){var a="",l=r.payloadType;return r.preferredPayloadType!==void 0&&(l=r.preferredPayloadType),r.rtcpFeedback&&r.rtcpFeedback.length&&r.rtcpFeedback.forEach(function(s){a+="a=rtcp-fb:"+l+" "+s.type+(s.parameter&&s.parameter.length?" "+s.parameter:"")+`\r
|
|
|
`}),a},i.parseSsrcMedia=function(r){var a=r.indexOf(" "),l={ssrc:parseInt(r.substr(7,a-7),10)},s=r.indexOf(":",a);return s>-1?(l.attribute=r.substr(a+1,s-a-1),l.value=r.substr(s+1)):l.attribute=r.substr(a+1),l},i.parseSsrcGroup=function(r){var a=r.substr(13).split(" ");return{semantics:a.shift(),ssrcs:a.map(function(l){return parseInt(l,10)})}},i.getMid=function(r){var a=i.matchPrefix(r,"a=mid:")[0];if(a)return a.substr(6)},i.parseFingerprint=function(r){var a=r.substr(14).split(" ");return{algorithm:a[0].toLowerCase(),value:a[1]}},i.getDtlsParameters=function(r,a){var l=i.matchPrefix(r+a,"a=fingerprint:");return{role:"auto",fingerprints:l.map(i.parseFingerprint)}},i.writeDtlsParameters=function(r,a){var l="a=setup:"+a+`\r
|
|
|
`;return r.fingerprints.forEach(function(s){l+="a=fingerprint:"+s.algorithm+" "+s.value+`\r
|
|
|
`}),l},i.getIceParameters=function(r,a){var l=i.splitLines(r);l=l.concat(i.splitLines(a));var s={usernameFragment:l.filter(function(b){return b.indexOf("a=ice-ufrag:")===0})[0].substr(12),password:l.filter(function(b){return b.indexOf("a=ice-pwd:")===0})[0].substr(10)};return s},i.writeIceParameters=function(r){return"a=ice-ufrag:"+r.usernameFragment+`\r
|
|
|
a=ice-pwd:`+r.password+`\r
|
|
|
`},i.parseRtpParameters=function(r){for(var a={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},l=i.splitLines(r),s=l[0].split(" "),b=3;b<s.length;b++){var T=s[b],C=i.matchPrefix(r,"a=rtpmap:"+T+" ")[0];if(C){var y=i.parseRtpMap(C),h=i.matchPrefix(r,"a=fmtp:"+T+" ");switch(y.parameters=h.length?i.parseFmtp(h[0]):{},y.rtcpFeedback=i.matchPrefix(r,"a=rtcp-fb:"+T+" ").map(i.parseRtcpFb),a.codecs.push(y),y.name.toUpperCase()){case"RED":case"ULPFEC":a.fecMechanisms.push(y.name.toUpperCase());break}}}return i.matchPrefix(r,"a=extmap:").forEach(function(D){a.headerExtensions.push(i.parseExtmap(D))}),a},i.writeRtpDescription=function(r,a){var l="";l+="m="+r+" ",l+=a.codecs.length>0?"9":"0",l+=" UDP/TLS/RTP/SAVPF ",l+=a.codecs.map(function(b){return b.preferredPayloadType!==void 0?b.preferredPayloadType:b.payloadType}).join(" ")+`\r
|
|
|
`,l+=`c=IN IP4 0.0.0.0\r
|
|
|
`,l+=`a=rtcp:9 IN IP4 0.0.0.0\r
|
|
|
`,a.codecs.forEach(function(b){l+=i.writeRtpMap(b),l+=i.writeFmtp(b),l+=i.writeRtcpFb(b)});var s=0;return a.codecs.forEach(function(b){b.maxptime>s&&(s=b.maxptime)}),s>0&&(l+="a=maxptime:"+s+`\r
|
|
|
`),l+=`a=rtcp-mux\r
|
|
|
`,a.headerExtensions&&a.headerExtensions.forEach(function(b){l+=i.writeExtmap(b)}),l},i.parseRtpEncodingParameters=function(r){var a=[],l=i.parseRtpParameters(r),s=l.fecMechanisms.indexOf("RED")!==-1,b=l.fecMechanisms.indexOf("ULPFEC")!==-1,T=i.matchPrefix(r,"a=ssrc:").map(function(_){return i.parseSsrcMedia(_)}).filter(function(_){return _.attribute==="cname"}),C=T.length>0&&T[0].ssrc,y,h=i.matchPrefix(r,"a=ssrc-group:FID").map(function(_){var E=_.substr(17).split(" ");return E.map(function(w){return parseInt(w,10)})});h.length>0&&h[0].length>1&&h[0][0]===C&&(y=h[0][1]),l.codecs.forEach(function(_){if(_.name.toUpperCase()==="RTX"&&_.parameters.apt){var E={ssrc:C,codecPayloadType:parseInt(_.parameters.apt,10)};C&&y&&(E.rtx={ssrc:y}),a.push(E),s&&(E=JSON.parse(JSON.stringify(E)),E.fec={ssrc:C,mechanism:b?"red+ulpfec":"red"},a.push(E))}}),a.length===0&&C&&a.push({ssrc:C});var D=i.matchPrefix(r,"b=");return D.length&&(D[0].indexOf("b=TIAS:")===0?D=parseInt(D[0].substr(7),10):D[0].indexOf("b=AS:")===0?D=parseInt(D[0].substr(5),10)*1e3*.95-50*40*8:D=void 0,a.forEach(function(_){_.maxBitrate=D})),a},i.parseRtcpParameters=function(r){var a={},l=i.matchPrefix(r,"a=ssrc:").map(function(T){return i.parseSsrcMedia(T)}).filter(function(T){return T.attribute==="cname"})[0];l&&(a.cname=l.value,a.ssrc=l.ssrc);var s=i.matchPrefix(r,"a=rtcp-rsize");a.reducedSize=s.length>0,a.compound=s.length===0;var b=i.matchPrefix(r,"a=rtcp-mux");return a.mux=b.length>0,a},i.parseMsid=function(r){var a,l=i.matchPrefix(r,"a=msid:");if(l.length===1)return a=l[0].substr(7).split(" "),{stream:a[0],track:a[1]};var s=i.matchPrefix(r,"a=ssrc:").map(function(b){return i.parseSsrcMedia(b)}).filter(function(b){return b.attribute==="msid"});if(s.length>0)return a=s[0].value.split(" "),{stream:a[0],track:a[1]}},i.parseSctpDescription=function(r){var a=i.parseMLine(r),l=i.matchPrefix(r,"a=max-message-size:"),s;l.length>0&&(s=parseInt(l[0].substr(19),10)),isNaN(s)&&(s=65536);var b=i.matchPrefix(r,"a=sctp-port:");if(b.length>0)return{port:parseInt(b[0].substr(12),10),protocol:a.fmt,maxMessageSize:s};var T=i.matchPrefix(r,"a=sctpmap:");if(T.length>0){var C=i.matchPrefix(r,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(C[0],10),protocol:C[1],maxMessageSize:s}}},i.writeSctpDescription=function(r,a){var l=[];return r.protocol!=="DTLS/SCTP"?l=["m="+r.kind+" 9 "+r.protocol+" "+a.protocol+`\r
|
|
|
`,`c=IN IP4 0.0.0.0\r
|
|
|
`,"a=sctp-port:"+a.port+`\r
|
|
|
`]:l=["m="+r.kind+" 9 "+r.protocol+" "+a.port+`\r
|
|
|
`,`c=IN IP4 0.0.0.0\r
|
|
|
`,"a=sctpmap:"+a.port+" "+a.protocol+` 65535\r
|
|
|
`],a.maxMessageSize!==void 0&&l.push("a=max-message-size:"+a.maxMessageSize+`\r
|
|
|
`),l.join("")},i.generateSessionId=function(){return Math.random().toString().substr(2,21)},i.writeSessionBoilerplate=function(r,a,l){var s,b=a!==void 0?a:2;r?s=r:s=i.generateSessionId();var T=l||"thisisadapterortc";return`v=0\r
|
|
|
o=`+T+" "+s+" "+b+` IN IP4 127.0.0.1\r
|
|
|
s=-\r
|
|
|
t=0 0\r
|
|
|
`},i.writeMediaSection=function(r,a,l,s){var b=i.writeRtpDescription(r.kind,a);if(b+=i.writeIceParameters(r.iceGatherer.getLocalParameters()),b+=i.writeDtlsParameters(r.dtlsTransport.getLocalParameters(),l==="offer"?"actpass":"active"),b+="a=mid:"+r.mid+`\r
|
|
|
`,r.direction?b+="a="+r.direction+`\r
|
|
|
`:r.rtpSender&&r.rtpReceiver?b+=`a=sendrecv\r
|
|
|
`:r.rtpSender?b+=`a=sendonly\r
|
|
|
`:r.rtpReceiver?b+=`a=recvonly\r
|
|
|
`:b+=`a=inactive\r
|
|
|
`,r.rtpSender){var T="msid:"+s.id+" "+r.rtpSender.track.id+`\r
|
|
|
`;b+="a="+T,b+="a=ssrc:"+r.sendEncodingParameters[0].ssrc+" "+T,r.sendEncodingParameters[0].rtx&&(b+="a=ssrc:"+r.sendEncodingParameters[0].rtx.ssrc+" "+T,b+="a=ssrc-group:FID "+r.sendEncodingParameters[0].ssrc+" "+r.sendEncodingParameters[0].rtx.ssrc+`\r
|
|
|
`)}return b+="a=ssrc:"+r.sendEncodingParameters[0].ssrc+" cname:"+i.localCName+`\r
|
|
|
`,r.rtpSender&&r.sendEncodingParameters[0].rtx&&(b+="a=ssrc:"+r.sendEncodingParameters[0].rtx.ssrc+" cname:"+i.localCName+`\r
|
|
|
`),b},i.getDirection=function(r,a){for(var l=i.splitLines(r),s=0;s<l.length;s++)switch(l[s]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return l[s].substr(2)}return a?i.getDirection(a):"sendrecv"},i.getKind=function(r){var a=i.splitLines(r),l=a[0].split(" ");return l[0].substr(2)},i.isRejected=function(r){return r.split(" ",2)[1]==="0"},i.parseMLine=function(r){var a=i.splitLines(r),l=a[0].substr(2).split(" ");return{kind:l[0],port:parseInt(l[1],10),protocol:l[2],fmt:l.slice(3).join(" ")}},i.parseOLine=function(r){var a=i.matchPrefix(r,"o=")[0],l=a.substr(2).split(" ");return{username:l[0],sessionId:l[1],sessionVersion:parseInt(l[2],10),netType:l[3],addressType:l[4],address:l[5]}},i.isValidSDP=function(r){if(typeof r!="string"||r.length===0)return!1;for(var a=i.splitLines(r),l=0;l<a.length;l++)if(a[l].length<2||a[l].charAt(1)!=="=")return!1;return!0},ue(u)==="object"&&(u.exports=i)},{}]},{},[1])(1)}),p.sessions={},p.isExtensionEnabled=function(){if(navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia)return!0;if(window.navigator.userAgent.match("Chrome")){var f=parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1],10),u=33;return window.navigator.userAgent.match("Linux")&&(u=35),f>=26&&f<=u?!0:p.extension.isInstalled()}else return!0};var na={extensionId:"hapfgfdkleiggjjpfpenajgdnfckjpaj",isInstalled:function(){return document.querySelector("#janus-extension-installed")!==null},getScreen:function(u){var n=window.setTimeout(function(){var i=new Error("NavigatorUserMediaError");return i.name='The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)',u(i)},1e3);this.cache[n]=u,window.postMessage({type:"janusGetScreen",id:n},"*")},init:function(){var u={};this.cache=u,window.addEventListener("message",function(n){if(n.origin==window.location.origin)if(n.data.type=="janusGotScreen"&&u[n.data.id]){var i=u[n.data.id];if(delete u[n.data.id],n.data.sourceId===""){var r=new Error("NavigatorUserMediaError");r.name="You cancelled the request for permission, giving up...",i(r)}else i(null,n.data.sourceId)}else n.data.type=="janusGetScreenPending"&&(console.log("clearing ",n.data.id),window.clearTimeout(n.data.id))})}};p.useDefaultDependencies=function(f){var u=f&&f.fetch||fetch,n=f&&f.Promise||Promise,i=f&&f.WebSocket||WebSocket;return{newWebSocket:function(a,l){return new i(a,l)},extension:f&&f.extension||na,isArray:function(a){return Array.isArray(a)},webRTCAdapter:f&&f.adapter||window.adapter,httpAPICall:function(a,l){var s={method:l.verb,headers:{Accept:"application/json, text/plain, */*"},cache:"no-cache"};l.verb==="POST"&&(s.headers["Content-Type"]="application/json"),l.withCredentials!==void 0&&(s.credentials=l.withCredentials===!0?"include":l.withCredentials?l.withCredentials:"omit"),l.body!==void 0&&(s.body=JSON.stringify(l.body));var b=u(a,s).catch(function(C){return n.reject({message:"Probably a network error, is the server down?",error:C})});if(l.timeout!==void 0){var T=new n(function(C,y){var h=setTimeout(function(){return clearTimeout(h),y({message:"Request timed out",timeout:l.timeout})},l.timeout)});b=n.race([b,T])}return b.then(function(C){if(C.ok){if(ue(l.success)===ue(p.noop))return C.json().then(function(y){l.success(y)}).catch(function(y){return n.reject({message:"Failed to parse response body",error:y,response:C})})}else return n.reject({message:"API call failed",response:C})}).catch(function(C){ue(l.error)===ue(p.noop)&&l.error(C.message||"<< internal error >>",C)}),b}}},p.useOldDependencies=function(f){var u=f&&f.jQuery||jQuery,n=f&&f.WebSocket||WebSocket;return{newWebSocket:function(r,a){return new n(r,a)},isArray:function(r){return u.isArray(r)},extension:f&&f.extension||na,webRTCAdapter:f&&f.adapter||adapter,httpAPICall:function(r,a){var l=a.body!==void 0?{contentType:"application/json",data:JSON.stringify(a.body)}:{},s=a.withCredentials!==void 0?{xhrFields:{withCredentials:a.withCredentials}}:{};return u.ajax(u.extend(l,s,{url:r,type:a.verb,cache:!1,dataType:"json",async:a.async,timeout:a.timeout,success:function(T){ue(a.success)===ue(p.noop)&&a.success(T)},error:function(T,C,y){ue(a.error)===ue(p.noop)&&a.error(C,y)}}))}}},p.noop=function(){},p.dataChanDefaultLabel="JanusDataChannel",p.endOfCandidates=null,p.init=function(f){if(f=f||{},f.callback=typeof f.callback=="function"?f.callback:p.noop,p.initDone===!0)f.callback();else{if((typeof console=="undefined"||typeof console.log=="undefined")&&(console={log:function(){}}),p.trace=p.noop,p.debug=p.noop,p.vdebug=p.noop,p.log=p.noop,p.warn=p.noop,p.error=p.noop,f.debug===!0||f.debug==="all")p.trace=console.trace.bind(console),p.debug=console.debug.bind(console),p.vdebug=console.debug.bind(console),p.log=console.log.bind(console),p.warn=console.warn.bind(console),p.error=console.error.bind(console);else if(Array.isArray(f.debug))for(var u in f.debug){var n=f.debug[u];switch(n){case"trace":p.trace=console.trace.bind(console);break;case"debug":p.debug=console.debug.bind(console);break;case"vdebug":p.vdebug=console.debug.bind(console);break;case"log":p.log=console.log.bind(console);break;case"warn":p.warn=console.warn.bind(console);break;case"error":p.error=console.error.bind(console);break;default:console.error("Unknown debugging option '"+n+"' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')");break}}p.log("Initializing library");var i=f.dependencies||p.useDefaultDependencies();p.isArray=i.isArray,p.webRTCAdapter=i.webRTCAdapter,p.httpAPICall=i.httpAPICall,p.newWebSocket=i.newWebSocket,p.extension=i.extension,p.extension.init(),p.listDevices=function(C,y){C=typeof C=="function"?C:p.noop,y==null&&(y={audio:!0,video:!0}),p.isGetUserMediaAvailable()?navigator.mediaDevices.getUserMedia(y).then(function(h){navigator.mediaDevices.enumerateDevices().then(function(D){p.debug(D),C(D);try{var _=h.getTracks();for(var E in _){var w=_[E];w!=null&&w.stop()}}catch(z){}})}).catch(function(h){p.error(h),C([])}):(p.warn("navigator.mediaDevices unavailable"),C([]))},p.attachMediaStream=function(C,y){if(p.webRTCAdapter.browserDetails.browser==="chrome"){var h=p.webRTCAdapter.browserDetails.version;h>=52?C.srcObject=y:p.error("Error attaching stream to element")}else C.srcObject=y},p.reattachMediaStream=function(C,y){if(p.webRTCAdapter.browserDetails.browser==="chrome"){var h=p.webRTCAdapter.browserDetails.version;h>=52?C.srcObject=y.srcObject:typeof C.src!="undefined"?C.src=y.src:p.error("Error reattaching stream to element")}else C.srcObject=y.srcObject};var r=["iPad","iPhone","iPod"].indexOf(navigator.platform)>=0,a=r?"pagehide":"beforeunload",l=window["on"+a];if(window.addEventListener(a,function(C){p.log("Closing window");for(var y in p.sessions)p.sessions[y]!==null&&p.sessions[y]!==void 0&&p.sessions[y].destroyOnUnload&&(p.log("Destroying session "+y),p.sessions[y].destroy({asyncRequest:!1,notifyDestroyed:!1}));l&&typeof l=="function"&&l()}),p.safariVp8=!1,p.webRTCAdapter.browserDetails.browser==="safari"&&p.webRTCAdapter.browserDetails.version>=605)if(RTCRtpSender&&RTCRtpSender.getCapabilities&&RTCRtpSender.getCapabilities("video")&&RTCRtpSender.getCapabilities("video").codecs&&RTCRtpSender.getCapabilities("video").codecs.length){for(var u in RTCRtpSender.getCapabilities("video").codecs){var s=RTCRtpSender.getCapabilities("video").codecs[u];if(s&&s.mimeType&&s.mimeType.toLowerCase()==="video/vp8"){p.safariVp8=!0;break}}p.safariVp8?p.log("This version of Safari supports VP8"):p.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu")}else{var b=new RTCPeerConnection({},{});b.createOffer({offerToReceiveVideo:!0}).then(function(C){p.safariVp8=C.sdp.indexOf("VP8")!==-1,p.safariVp8?p.log("This version of Safari supports VP8"):p.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu"),b.close(),b=null})}if(p.unifiedPlan=!1,p.webRTCAdapter.browserDetails.browser==="firefox"&&p.webRTCAdapter.browserDetails.version>=59)p.unifiedPlan=!0;else if(p.webRTCAdapter.browserDetails.browser==="chrome"&&p.webRTCAdapter.browserDetails.version<72)p.unifiedPlan=!1;else if(typeof RTCRtpTransceiver!="undefined"&&!("currentDirection"in RTCRtpTransceiver.prototype))p.unifiedPlan=!1;else{var T=new RTCPeerConnection;try{T.addTransceiver("audio"),p.unifiedPlan=!0}catch(C){}T.close()}p.initDone=!0,f.callback()}},p.isWebrtcSupported=function(){return window.RTCPeerConnection!==void 0&&window.RTCPeerConnection!==null},p.isGetUserMediaAvailable=function(){return navigator.mediaDevices!==void 0&&navigator.mediaDevices!==null&&navigator.mediaDevices.getUserMedia!==void 0&&navigator.mediaDevices.getUserMedia!==null},p.randomString=function(f){for(var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="",i=0;i<f;i++){var r=Math.floor(Math.random()*u.length);n+=u.substring(r,r+1)}return n};function p(f){if(p.initDone===void 0)return f.error("Library not initialized"),{};if(!p.isWebrtcSupported())return f.error("WebRTC not supported by this browser"),{};if(p.log("Library initialized: "+p.initDone),f=f||{},f.success=typeof f.success=="function"?f.success:p.noop,f.error=typeof f.error=="function"?f.error:p.noop,f.destroyed=typeof f.destroyed=="function"?f.destroyed:p.noop,f.server===null||f.server===void 0)return f.error("Invalid server url"),{};var u=!1,n=null,i={},r=null,a=null,l=0,s=f.server;p.isArray(s)?(p.log("Multiple servers provided ("+s.length+"), will use the first that works"),s=null,a=f.server,p.debug(a)):s.indexOf("ws")===0?(u=!0,p.log("Using WebSockets to contact Janus: "+s)):(u=!1,p.log("Using REST API to contact Janus: "+s));var b=f.iceServers;b==null&&(b=[{urls:"stun:stun.l.google.com:19302"}]);var T=f.iceTransportPolicy,C=f.bundlePolicy,y=f.ipv6;y==null&&(y=!1);var h=!1;f.withCredentials!==void 0&&f.withCredentials!==null&&(h=f.withCredentials===!0);var D=10;f.max_poll_events!==void 0&&f.max_poll_events!==null&&(D=f.max_poll_events),D<1&&(D=1);var _=null;f.token!==void 0&&f.token!==null&&(_=f.token);var E=null;f.apisecret!==void 0&&f.apisecret!==null&&(E=f.apisecret),this.destroyOnUnload=!0,f.destroyOnUnload!==void 0&&f.destroyOnUnload!==null&&(this.destroyOnUnload=f.destroyOnUnload===!0);var w=25e3;f.keepAlivePeriod!==void 0&&f.keepAlivePeriod!==null&&(w=f.keepAlivePeriod),isNaN(w)&&(w=25e3);var z=6e4;f.longPollTimeout!==void 0&&f.longPollTimeout!==null&&(z=f.longPollTimeout),isNaN(z)&&(z=6e4);function S(P){var M={high:9e5,medium:3e5,low:1e5};return P!=null&&(P.high&&(M.high=P.high),P.medium&&(M.medium=P.medium),P.low&&(M.low=P.low)),M}var d=!1,m=null,g={},k=this,A=0,O={};ne(f),this.getServer=function(){return s},this.isConnected=function(){return d},this.reconnect=function(P){P=P||{},P.success=typeof P.success=="function"?P.success:p.noop,P.error=typeof P.error=="function"?P.error:p.noop,P.reconnect=!0,ne(P)},this.getSessionId=function(){return m},this.destroy=function(P){Y(P)},this.attach=function(P){me(P)};function H(){if(m!=null){if(p.debug("Long poll..."),!d){p.warn("Is the server down? (connected=false)");return}var P=s+"/"+m+"?rid="+new Date().getTime();D!=null&&(P=P+"&maxev="+D),_!=null&&(P=P+"&token="+encodeURIComponent(_)),E!=null&&(P=P+"&apisecret="+encodeURIComponent(E)),p.httpAPICall(P,{verb:"GET",withCredentials:h,success:Z,timeout:z,error:function(F,j){if(p.error(F+":",j),A++,A>3){d=!1,f.error("Lost connection to the server (is it down?)");return}H()}})}}function Z(P,M){if(A=0,!u&&m!==void 0&&m!==null&&M!==!0&&H(),!u&&p.isArray(P)){for(var F=0;F<P.length;F++)Z(P[F],!0);return}if(P.rtcgw==="keepalive"){p.vdebug("Got a keepalive on session "+m);return}else if(P.rtcgw==="ack"){p.debug("Got an ack on session "+m),p.debug(P);var j=P.transaction;if(j!=null){var I=O[j];I!=null&&I(P),delete O[j]}return}else if(P.rtcgw==="success"){p.debug("Got a success on session "+m),p.debug(P);var j=P.transaction;if(j!=null){var I=O[j];I!=null&&I(P),delete O[j]}return}else if(P.rtcgw==="trickle"){var V=P.sender;if(V==null){p.warn("Missing sender...");return}var L=g[V];if(L==null){p.debug("This handle is not attached to this session");return}var J=P.candidate;p.debug("Got a trickled candidate on session "+m),p.debug(J);var q=L.webrtcStuff;q.pc&&q.remoteSdp?(p.debug("Adding remote candidate:",J),!J||J.completed===!0?q.pc.addIceCandidate(p.endOfCandidates):q.pc.addIceCandidate(J)):(p.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate"),q.candidates||(q.candidates=[]),q.candidates.push(J),p.debug(q.candidates))}else if(P.rtcgw==="webrtcup"){p.debug("Got a webrtcup event on session "+m),p.debug(P);var V=P.sender;if(V==null){p.warn("Missing sender...");return}var L=g[V];if(L==null){p.debug("This handle is not attached to this session");return}L.webrtcState(!0);return}else if(P.rtcgw==="hangup"){p.debug("Got a hangup event on session "+m),p.debug(P);var V=P.sender;if(V==null){p.warn("Missing sender...");return}var L=g[V];if(L==null){p.debug("This handle is not attached to this session");return}L.webrtcState(!1,P.reason),L.hangup()}else if(P.rtcgw==="detached"){p.debug("Got a detached event on session "+m),p.debug(P);var V=P.sender;if(V==null){p.warn("Missing sender...");return}var L=g[V];if(L==null)return;L.detached=!0,L.ondetached(),L.detach()}else if(P.rtcgw==="media"){p.debug("Got a media event on session "+m),p.debug(P);var V=P.sender;if(V==null){p.warn("Missing sender...");return}var L=g[V];if(L==null){p.debug("This handle is not attached to this session");return}L.mediaState(P.type,P.receiving)}else if(P.rtcgw==="slowlink"){p.debug("Got a slowlink event on session "+m),p.debug(P);var V=P.sender;if(V==null){p.warn("Missing sender...");return}var L=g[V];if(L==null){p.debug("This handle is not attached to this session");return}L.slowLink(P.uplink,P.lost)}else if(P.rtcgw==="error"){p.error("Ooops: "+P.error.code+" "+P.error.reason),p.debug(P);var j=P.transaction;if(j!=null){var I=O[j];I!=null&&I(P),delete O[j]}return}else if(P.rtcgw==="event"){p.debug("Got a plugin event on session "+m),p.debug(P);var V=P.sender;if(V==null){p.warn("Missing sender...");return}var de=P.plugindata;if(de==null){p.warn("Missing plugindata...");return}p.debug(" -- Event is coming from "+V+" ("+de.plugin+")");var ee=de.data;p.debug(ee);var L=g[V];if(L==null){p.warn("This handle is not attached to this session");return}var se=P.jsep;se!=null&&(p.debug("Handling SDP as well..."),p.debug(se));var Qe=L.onmessage;Qe!=null?(p.debug("Notifying application..."),Qe(ee,se)):p.debug("No provided notification callback")}else if(P.rtcgw==="timeout"){p.error("Timeout on session "+m),p.debug(P),u&&n.close(3504,"Gateway timeout");return}else p.warn("Unknown message/event '"+P.rtcgw+"' on session "+m),p.debug(P)}function X(){if(!(s===null||!u||!d)){r=setTimeout(X,w);var P={rtcgw:"keepalive",session_id:m,transaction:p.randomString(12)};_!=null&&(P.token=_),E!=null&&(P.apisecret=E),n.send(JSON.stringify(P))}}function ne(P){var M=p.randomString(12),F={rtcgw:"create",transaction:M,token:window.EZUIKit.opt.stream,device:window.EZUIKit.opt.deviceSerial,channel:window.EZUIKit.opt.channelNo};if(P.reconnect&&(d=!1,F.rtcgw="claim",F.session_id=m,n&&(n.onopen=null,n.onerror=null,n.onclose=null,r&&(clearTimeout(r),r=null))),_!=null&&(F.token=_),E!=null&&(F.apisecret=E),s===null&&p.isArray(a)&&(s=a[l],s.indexOf("ws")===0?(u=!0,p.log("Server #"+(l+1)+": trying WebSockets to contact Janus ("+s+")")):(u=!1,p.log("Server #"+(l+1)+": trying REST API to contact Janus ("+s+")"))),u){n=p.newWebSocket(s,"rtcgw-protocol"),i={error:function(){if(p.error("Error connecting to the Janus WebSockets server... "+s),p.isArray(a)&&!P.reconnect){if(l++,l==a.length){P.error("Error connecting to any of the provided Janus servers: Is the server down?");return}s=null,setTimeout(function(){ne(P)},200);return}P.error("Error connecting to the Janus WebSockets server: Is the server down?")},open:function(){O[M]=function(V){if(p.debug(V),V.rtcgw!=="success"){p.error("Ooops: "+V.error.code+" "+V.error.reason),P.error(V.error.reason);return}r=setTimeout(X,w),d=!0,m=V.session_id?V.session_id:V.data.id,P.reconnect?p.log("Claimed session: "+m):p.log("Created session: "+m),p.sessions[m]=k,P.success()},n.send(JSON.stringify(F))},message:function(V){Z(JSON.parse(V.data))},close:function(){s===null||!d||(d=!1,f.error("Lost connection to the server (is it down?)"))}};for(var j in i)n.addEventListener(j,i[j]);return}p.httpAPICall(s,{verb:"POST",withCredentials:h,body:F,success:function(V){if(p.debug(V),V.rtcgw!=="success"){p.error("Ooops: "+V.error.code+" "+V.error.reason),P.error(V.error.reason);return}d=!0,m=V.session_id?V.session_id:V.data.id,P.reconnect?p.log("Claimed session: "+m):p.log("Created session: "+m),p.sessions[m]=k,H(),P.success()},error:function(V,L){if(p.error(V+":",L),p.isArray(a)&&!P.reconnect){if(l++,l==a.length){P.error("Error connecting to any of the provided Janus servers: Is the server down?");return}s=null,setTimeout(function(){ne(P)},200);return}L===""?P.error(V+": Is the server down?"):P.error(V+": "+L)}})}function Y(P){P=P||{},P.success=typeof P.success=="function"?P.success:p.noop;var M=!0;P.asyncRequest!==void 0&&P.asyncRequest!==null&&(M=P.asyncRequest===!0);var F=!0;P.notifyDestroyed!==void 0&&P.notifyDestroyed!==null&&(F=P.notifyDestroyed===!0);var j=!1;if(P.cleanupHandles!==void 0&&P.cleanupHandles!==null&&(j=P.cleanupHandles===!0),p.log("Destroying session "+m+" (async="+M+")"),!d){p.warn("Is the server down? (connected=false)"),P.success();return}if(m==null){p.warn("No session to destroy"),P.success(),F&&f.destroyed();return}if(j)for(var I in g)Ye(I,{noRequest:!0});var V={rtcgw:"destroy",transaction:p.randomString(12)};if(_!=null&&(V.token=_),E!=null&&(V.apisecret=E),u){V.session_id=m;var L=function(){for(var ee in i)n.removeEventListener(ee,i[ee]);n.removeEventListener("message",J),n.removeEventListener("error",q),r&&clearTimeout(r),n.close()},J=function(ee){var se=JSON.parse(ee.data);se.session_id==V.session_id&&se.transaction==V.transaction&&(L(),P.success(),F&&f.destroyed())},q=function(ee){L(),P.error("Failed to destroy the server: Is the server down?"),F&&f.destroyed()};n.addEventListener("message",J),n.addEventListener("error",q),n.send(JSON.stringify(V));return}p.httpAPICall(s+"/"+m,{verb:"POST",async:M,withCredentials:h,body:V,success:function(ee){p.log("Destroyed session:"),p.debug(ee),m=null,d=!1,ee.rtcgw!=="success"&&p.error("Ooops: "+ee.error.code+" "+ee.error.reason),P.success(),F&&f.destroyed()},error:function(ee,se){p.error(ee+":",se),m=null,d=!1,P.success(),F&&f.destroyed()}})}function me(P){if(P=P||{},P.success=typeof P.success=="function"?P.success:p.noop,P.error=typeof P.error=="function"?P.error:p.noop,P.consentDialog=typeof P.consentDialog=="function"?P.consentDialog:p.noop,P.iceState=typeof P.iceState=="function"?P.iceState:p.noop,P.mediaState=typeof P.mediaState=="function"?P.mediaState:p.noop,P.webrtcState=typeof P.webrtcState=="function"?P.webrtcState:p.noop,P.slowLink=typeof P.slowLink=="function"?P.slowLink:p.noop,P.onmessage=typeof P.onmessage=="function"?P.onmessage:p.noop,P.onlocalstream=typeof P.onlocalstream=="function"?P.onlocalstream:p.noop,P.onremotestream=typeof P.onremotestream=="function"?P.onremotestream:p.noop,P.ondata=typeof P.ondata=="function"?P.ondata:p.noop,P.ondataopen=typeof P.ondataopen=="function"?P.ondataopen:p.noop,P.oncleanup=typeof P.oncleanup=="function"?P.oncleanup:p.noop,P.ondetached=typeof P.ondetached=="function"?P.ondetached:p.noop,!d){p.warn("Is the server down? (connected=false)"),P.error("Is the server down? (connected=false)");return}var M=P.plugin;if(M==null){p.error("Invalid plugin"),P.error("Invalid plugin");return}var F=P.opaqueId,j=P.token?P.token:_,I=p.randomString(12),V={rtcgw:"attach",plugin:M,opaque_id:F,transaction:I};if(j!=null&&(V.token=j),E!=null&&(V.apisecret=E),u){O[I]=function(L){if(p.debug(L),L.rtcgw!=="success"){p.error("Ooops: "+L.error.code+" "+L.error.reason),P.error("Ooops: "+L.error.code+" "+L.error.reason);return}var J=L.data.id;p.log("Created handle: "+J);var q={session:k,plugin:M,id:J,token:j,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function(){return J},getPlugin:function(){return M},getVolume:function(){return we(J,!0)},getRemoteVolume:function(){return we(J,!0)},getLocalVolume:function(){return we(J,!1)},isAudioMuted:function(){return ke(J,!1)},muteAudio:function(){return We(J,!1,!0)},unmuteAudio:function(){return We(J,!1,!1)},isVideoMuted:function(){return ke(J,!0)},muteVideo:function(){return We(J,!0,!0)},unmuteVideo:function(){return We(J,!0,!1)},getBitrate:function(){return yn(J)},send:function(ee){ge(J,ee)},data:function(ee){be(J,ee)},dtmf:function(ee){Pe(J,ee)},consentDialog:P.consentDialog,iceState:P.iceState,mediaState:P.mediaState,webrtcState:P.webrtcState,slowLink:P.slowLink,onmessage:P.onmessage,createOffer:function(ee){K(J,!0,ee)},createAnswer:function(ee){K(J,!1,ee)},handleRemoteJsep:function(ee){te(J,ee)},onlocalstream:P.onlocalstream,onremotestream:P.onremotestream,ondata:P.ondata,ondataopen:P.ondataopen,oncleanup:P.oncleanup,ondetached:P.ondetached,hangup:function(ee){It(J,ee===!0)},detach:function(ee){Ye(J,ee)}};g[J]=q,P.success(q)},V.session_id=m,n.send(JSON.stringify(V));return}p.httpAPICall(s+"/"+m,{verb:"POST",withCredentials:h,body:V,success:function(J){if(p.debug(J),J.rtcgw!=="success"){p.error("Ooops: "+J.error.code+" "+J.error.reason),P.error("Ooops: "+J.error.code+" "+J.error.reason);return}var q=J.data.id;p.log("Created handle: "+q);var de={session:k,plugin:M,id:q,token:j,detached:!1,webrtcStuff:{started:!1,myStream:null,streamExternal:!1,remoteStream:null,mySdp:null,mediaConstraints:null,pc:null,dataChannel:{},dtmfSender:null,trickle:!0,iceDone:!1,volume:{value:null,timer:null},bitrate:{value:null,bsnow:null,bsbefore:null,tsnow:null,tsbefore:null,timer:null}},getId:function(){return q},getPlugin:function(){return M},getVolume:function(){return we(q,!0)},getRemoteVolume:function(){return we(q,!0)},getLocalVolume:function(){return we(q,!1)},isAudioMuted:function(){return ke(q,!1)},muteAudio:function(){return We(q,!1,!0)},unmuteAudio:function(){return We(q,!1,!1)},isVideoMuted:function(){return ke(q,!0)},muteVideo:function(){return We(q,!0,!0)},unmuteVideo:function(){return We(q,!0,!1)},getBitrate:function(){return yn(q)},send:function(se){ge(q,se)},data:function(se){be(q,se)},dtmf:function(se){Pe(q,se)},consentDialog:P.consentDialog,iceState:P.iceState,mediaState:P.mediaState,webrtcState:P.webrtcState,slowLink:P.slowLink,onmessage:P.onmessage,createOffer:function(se){K(q,!0,se)},createAnswer:function(se){K(q,!1,se)},handleRemoteJsep:function(se){te(q,se)},onlocalstream:P.onlocalstream,onremotestream:P.onremotestream,ondata:P.ondata,ondataopen:P.ondataopen,oncleanup:P.oncleanup,ondetached:P.ondetached,hangup:function(se){It(q,se===!0)},detach:function(se){Ye(q,se)}};g[q]=de,P.success(de)},error:function(J,q){p.error(J+":",q)}})}function ge(P,M){if(M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:p.noop,!d){p.warn("Is the server down? (connected=false)"),M.error("Is the server down? (connected=false)");return}var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0){p.warn("Invalid handle"),M.error("Invalid handle");return}var j=M.message,I=M.jsep,V=p.randomString(12),L={rtcgw:"message",body:j,transaction:V};if(F.token!==null&&F.token!==void 0&&(L.token=F.token),E!=null&&(L.apisecret=E),I!=null&&(L.jsep=I),p.debug("Sending message to plugin (handle="+P+"):"),p.debug(L),u){L.session_id=m,L.handle_id=P,O[V]=function(J){if(p.debug("Message sent!"),p.debug(J),J.rtcgw==="success"){var q=J.plugindata;if(q==null){p.warn("Request succeeded, but missing plugindata..."),M.success();return}p.log("Synchronous transaction successful ("+q.plugin+")");var de=q.data;p.debug(de),M.success(de);return}else if(J.rtcgw!=="ack"){J.error!==void 0&&J.error!==null?(p.error("Ooops: "+J.error.code+" "+J.error.reason),M.error(J.error.code+" "+J.error.reason)):(p.error("Unknown error"),M.error("Unknown error"));return}M.success()},n.send(JSON.stringify(L));return}p.httpAPICall(s+"/"+m+"/"+P,{verb:"POST",withCredentials:h,body:L,success:function(q){if(p.debug("Message sent!"),p.debug(q),q.rtcgw==="success"){var de=q.plugindata;if(de==null){p.warn("Request succeeded, but missing plugindata..."),M.success();return}p.log("Synchronous transaction successful ("+de.plugin+")");var ee=de.data;p.debug(ee),M.success(ee);return}else if(q.rtcgw!=="ack"){q.error!==void 0&&q.error!==null?(p.error("Ooops: "+q.error.code+" "+q.error.reason),M.error(q.error.code+" "+q.error.reason)):(p.error("Unknown error"),M.error("Unknown error"));return}M.success()},error:function(q,de){p.error(q+":",de),M.error(q+": "+de)}})}function ve(P,M){if(!d){p.warn("Is the server down? (connected=false)");return}var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0){p.warn("Invalid handle");return}var j={rtcgw:"trickle",candidate:M,transaction:p.randomString(12)};if(F.token!==null&&F.token!==void 0&&(j.token=F.token),E!=null&&(j.apisecret=E),p.vdebug("Sending trickle candidate (handle="+P+"):"),p.vdebug(j),u){j.session_id=m,j.handle_id=P,n.send(JSON.stringify(j));return}p.httpAPICall(s+"/"+m+"/"+P,{verb:"POST",withCredentials:h,body:j,success:function(V){if(p.vdebug("Candidate sent!"),p.vdebug(V),V.rtcgw!=="ack"){p.error("Ooops: "+V.error.code+" "+V.error.reason);return}},error:function(V,L){p.error(V+":",L)}})}function Ce(P,M,F,j){var I=g[P];if(I==null||I.webrtcStuff===null||I.webrtcStuff===void 0){p.warn("Invalid handle");return}var V=I.webrtcStuff,L=function(ee){p.log("Received message on data channel:",ee);var se=ee.target.label;I.ondata(ee.data,se)},J=function(ee){p.log("Received state change on data channel:",ee);var se=ee.target.label,Qe=V.dataChannel[se]?V.dataChannel[se].readyState:"null";if(p.log("State change on <"+se+"> data channel: "+Qe),Qe==="open"){if(V.dataChannel[se].pending&&V.dataChannel[se].pending.length>0){p.log("Sending pending messages on <"+se+">:",V.dataChannel[se].pending.length);for(var mt in V.dataChannel[se].pending){var Ie=V.dataChannel[se].pending[mt];p.log("Sending string on data channel <"+se+">: "+Ie),V.dataChannel[se].send(Ie)}V.dataChannel[se].pending=[]}I.ondataopen(se)}},q=function(ee){p.error("Got error on data channel:",ee)};F?V.dataChannel[M]=F:V.dataChannel[M]=V.pc.createDataChannel(M,{ordered:!1}),V.dataChannel[M].onmessage=L,V.dataChannel[M].onopen=J,V.dataChannel[M].onclose=J,V.dataChannel[M].onerror=q,V.dataChannel[M].pending=[],j&&V.dataChannel[M].pending.push(j)}function be(P,M){M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:p.noop;var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0){p.warn("Invalid handle"),M.error("Invalid handle");return}var j=F.webrtcStuff,I=M.text;if(I==null){p.warn("Invalid text"),M.error("Invalid text");return}var V=M.label?M.label:p.dataChanDefaultLabel;if(!j.dataChannel[V]){Ce(P,V,!1,I),M.success();return}if(j.dataChannel[V].readyState!=="open"){j.dataChannel[V].pending.push(I),M.success();return}p.log("Sending string on data channel <"+V+">: "+I),j.dataChannel[V].send(I),M.success()}function Pe(P,M){M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:p.noop;var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0){p.warn("Invalid handle"),M.error("Invalid handle");return}var j=F.webrtcStuff;if(j.dtmfSender===null||j.dtmfSender===void 0){if(j.pc!==void 0&&j.pc!==null){var I=j.pc.getSenders(),V=I.find(function(ee){return ee.track&&ee.track.kind==="audio"});if(!V){p.warn("Invalid DTMF configuration (no audio track)"),M.error("Invalid DTMF configuration (no audio track)");return}j.dtmfSender=V.dtmf,j.dtmfSender&&(p.log("Created DTMF Sender"),j.dtmfSender.ontonechange=function(ee){p.debug("Sent DTMF tone: "+ee.tone)})}if(j.dtmfSender===null||j.dtmfSender===void 0){p.warn("Invalid DTMF configuration"),M.error("Invalid DTMF configuration");return}}var L=M.dtmf;if(L==null){p.warn("Invalid DTMF parameters"),M.error("Invalid DTMF parameters");return}var J=L.tones;if(J==null){p.warn("Invalid DTMF string"),M.error("Invalid DTMF string");return}var q=L.duration;q==null&&(q=500);var de=L.gap;de==null&&(de=50),p.debug("Sending DTMF string "+J+" (duration "+q+"ms, gap "+de+"ms)"),j.dtmfSender.insertDTMF(J,q,de),M.success()}function Ye(P,M){M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:p.noop;var F=!0;M.asyncRequest!==void 0&&M.asyncRequest!==null&&(F=M.asyncRequest===!0);var j=!0;M.noRequest!==void 0&&M.noRequest!==null&&(j=M.noRequest===!0),p.log("Destroying handle "+P+" (async="+F+")"),It(P);var I=g[P];if(I==null||I.detached){delete g[P],M.success();return}if(j){delete g[P],M.success();return}if(!d){p.warn("Is the server down? (connected=false)"),M.error("Is the server down? (connected=false)");return}var V={rtcgw:"detach",transaction:p.randomString(12)};if(I.token!==null&&I.token!==void 0&&(V.token=I.token),E!=null&&(V.apisecret=E),u){V.session_id=m,V.handle_id=P,n.send(JSON.stringify(V)),delete g[P],M.success();return}p.httpAPICall(s+"/"+m+"/"+P,{verb:"POST",async:F,withCredentials:h,body:V,success:function(J){p.log("Destroyed handle:"),p.debug(J),J.rtcgw!=="success"&&p.error("Ooops: "+J.error.code+" "+J.error.reason),delete g[P],M.success()},error:function(J,q){p.error(J+":",q),delete g[P],M.success()}})}function N(P,M,F,j,I){var V=g[P];if(V==null||V.webrtcStuff===null||V.webrtcStuff===void 0){p.warn("Invalid handle"),j.error("Invalid handle");return}var L=V.webrtcStuff;p.debug("streamsDone:",I),I&&(p.debug(" -- Audio tracks:",I.getAudioTracks()),p.debug(" -- Video tracks:",I.getVideoTracks()));var J=!1;if(!L.myStream||!F.update||L.streamExternal)L.myStream=I,J=!0;else{if((!F.update&&Ge(F)||F.update&&(F.addAudio||F.replaceAudio))&&I.getAudioTracks()&&I.getAudioTracks().length)if(L.myStream.addTrack(I.getAudioTracks()[0]),p.unifiedPlan){p.log((F.replaceAudio?"Replacing":"Adding")+" audio track:",I.getAudioTracks()[0]);var q=null,de=L.pc.getTransceivers();if(de&&de.length>0)for(var ee in de){var se=de[ee];if(se.sender&&se.sender.track&&se.sender.track.kind==="audio"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="audio"){q=se;break}}q&&q.sender?q.sender.replaceTrack(I.getAudioTracks()[0]):L.pc.addTrack(I.getAudioTracks()[0],I)}else p.log((F.replaceAudio?"Replacing":"Adding")+" audio track:",I.getAudioTracks()[0]),L.pc.addTrack(I.getAudioTracks()[0],I);if((!F.update&&Oe(F)||F.update&&(F.addVideo||F.replaceVideo))&&I.getVideoTracks()&&I.getVideoTracks().length)if(L.myStream.addTrack(I.getVideoTracks()[0]),p.unifiedPlan){p.log((F.replaceVideo?"Replacing":"Adding")+" video track:",I.getVideoTracks()[0]);var Qe=null,de=L.pc.getTransceivers();if(de&&de.length>0)for(var ee in de){var se=de[ee];if(se.sender&&se.sender.track&&se.sender.track.kind==="video"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="video"){Qe=se;break}}Qe&&Qe.sender?Qe.sender.replaceTrack(I.getVideoTracks()[0]):L.pc.addTrack(I.getVideoTracks()[0],I)}else p.log((F.replaceVideo?"Replacing":"Adding")+" video track:",I.getVideoTracks()[0]),L.pc.addTrack(I.getVideoTracks()[0],I)}if(!L.pc){var mt={iceServers:b,iceTransportPolicy:T,bundlePolicy:C};p.webRTCAdapter.browserDetails.browser==="chrome"&&(mt.sdpSemantics=p.webRTCAdapter.browserDetails.version<72?"plan-b":"unified-plan");var Ie={optional:[{DtlsSrtpKeyAgreement:!0}]};if(y===!0&&Ie.optional.push({googIPv6:!0}),j.rtcConstraints&&ue(j.rtcConstraints)==="object"){p.debug("Adding custom PeerConnection constraints:",j.rtcConstraints);for(var ee in j.rtcConstraints)Ie.optional.push(j.rtcConstraints[ee])}p.webRTCAdapter.browserDetails.browser==="edge"&&(mt.bundlePolicy="max-bundle"),p.log("Creating PeerConnection"),p.debug(Ie),L.pc=new RTCPeerConnection(mt,Ie),p.debug(L.pc),L.pc.getStats&&(L.volume={},L.bitrate.value="0 kbits/sec"),p.log("Preparing local SDP and gathering candidates (trickle="+L.trickle+")"),L.pc.oniceconnectionstatechange=function(Be){L.pc&&V.iceState(L.pc.iceConnectionState)},L.pc.onicecandidate=function(Be){if(Be.candidate==null||p.webRTCAdapter.browserDetails.browser==="edge"&&Be.candidate.candidate.indexOf("endOfCandidates")>0)p.log("End of candidates."),L.iceDone=!0,L.trickle===!0?ve(P,{completed:!0}):Re(P,j);else{var tt={candidate:Be.candidate.candidate,sdpMid:Be.candidate.sdpMid,sdpMLineIndex:Be.candidate.sdpMLineIndex};L.trickle===!0&&ve(P,tt)}},L.pc.ontrack=function(Be){p.log("Handling Remote Track"),p.debug(Be),Be.streams&&(L.remoteStream=Be.streams[0],V.onremotestream(L.remoteStream),!Be.track.onended&&(p.log("Adding onended callback to track:",Be.track),Be.track.onended=function(tt){p.log("Remote track muted/removed:",tt),L.remoteStream&&(L.remoteStream.removeTrack(tt.target),V.onremotestream(L.remoteStream))},Be.track.onmute=Be.track.onended,Be.track.onunmute=function(tt){p.log("Remote track flowing again:",tt);try{L.remoteStream.addTrack(tt.target),V.onremotestream(L.remoteStream)}catch(Xt){p.error(Xt)}}))}}if(J&&I!==null&&I!==void 0){p.log("Adding local stream");var ht=j.simulcast2===!0;I.getTracks().forEach(function(Be){if(p.log("Adding local track:",Be),!ht)L.pc.addTrack(Be,I);else if(Be.kind==="audio")L.pc.addTrack(Be,I);else{p.log("Enabling rid-based simulcasting:",Be);var tt=S(j.simulcastMaxBitrates);L.pc.addTransceiver(Be,{direction:"sendrecv",streams:[I],sendEncodings:[{rid:"h",active:!0,maxBitrate:tt.high},{rid:"m",active:!0,maxBitrate:tt.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:tt.low,scaleResolutionDownBy:4}]})}})}De(F)&&!L.dataChannel[p.dataChanDefaultLabel]&&(p.log("Creating data channel"),Ce(P,p.dataChanDefaultLabel,!1),L.pc.ondatachannel=function(Be){p.log("Data channel created by Janus:",Be),Ce(P,Be.channel.label,Be.channel)}),L.myStream&&V.onlocalstream(L.myStream),M==null?ce(P,F,j):L.pc.setRemoteDescription(M).then(function(){if(p.log("Remote description accepted!"),L.remoteSdp=M.sdp,L.candidates&&L.candidates.length>0){for(var Be=0;Be<L.candidates.length;Be++){var tt=L.candidates[Be];p.debug("Adding remote candidate:",tt),!tt||tt.completed===!0?L.pc.addIceCandidate(p.endOfCandidates):L.pc.addIceCandidate(tt)}L.candidates=[]}he(P,F,j)},j.error)}function K(P,M,F){F=F||{},F.success=typeof F.success=="function"?F.success:p.noop,F.error=typeof F.error=="function"?F.error:Yt;var j=F.jsep;if(M&&j){p.error("Provided a JSEP to a createOffer"),F.error("Provided a JSEP to a createOffer");return}else if(!M&&(!j||!j.type||!j.sdp)){p.error("A valid JSEP is required for createAnswer"),F.error("A valid JSEP is required for createAnswer");return}F.media=F.media||{audio:!0,video:!0};var I=F.media,V=g[P];if(V==null||V.webrtcStuff===null||V.webrtcStuff===void 0){p.warn("Invalid handle"),F.error("Invalid handle");return}var L=V.webrtcStuff;if(L.trickle=Xe(F.trickle),L.pc===void 0||L.pc===null)I.update=!1,I.keepAudio=!1,I.keepVideo=!1;else if(L.pc!==void 0&&L.pc!==null){if(p.log("Updating existing media session"),I.update=!0,F.stream!==null&&F.stream!==void 0)F.stream!==L.myStream&&p.log("Renegotiation involves a new external stream");else{if(I.addAudio){if(I.keepAudio=!1,I.replaceAudio=!1,I.removeAudio=!1,I.audioSend=!0,L.myStream&&L.myStream.getAudioTracks()&&L.myStream.getAudioTracks().length){p.error("Can't add audio stream, there already is one"),F.error("Can't add audio stream, there already is one");return}}else I.removeAudio?(I.keepAudio=!1,I.replaceAudio=!1,I.addAudio=!1,I.audioSend=!1):I.replaceAudio&&(I.keepAudio=!1,I.addAudio=!1,I.removeAudio=!1,I.audioSend=!0);if(L.myStream===null||L.myStream===void 0?(I.replaceAudio&&(I.keepAudio=!1,I.replaceAudio=!1,I.addAudio=!0,I.audioSend=!0),Ge(I)&&(I.keepAudio=!1,I.addAudio=!0)):L.myStream.getAudioTracks()===null||L.myStream.getAudioTracks()===void 0||L.myStream.getAudioTracks().length===0?(I.replaceAudio&&(I.keepAudio=!1,I.replaceAudio=!1,I.addAudio=!0,I.audioSend=!0),Ge(I)&&(I.keepVideo=!1,I.addAudio=!0)):Ge(I)&&!I.removeAudio&&!I.replaceAudio&&(I.keepAudio=!0),I.addVideo){if(I.keepVideo=!1,I.replaceVideo=!1,I.removeVideo=!1,I.videoSend=!0,L.myStream&&L.myStream.getVideoTracks()&&L.myStream.getVideoTracks().length){p.error("Can't add video stream, there already is one"),F.error("Can't add video stream, there already is one");return}}else I.removeVideo?(I.keepVideo=!1,I.replaceVideo=!1,I.addVideo=!1,I.videoSend=!1):I.replaceVideo&&(I.keepVideo=!1,I.addVideo=!1,I.removeVideo=!1,I.videoSend=!0);L.myStream===null||L.myStream===void 0||L.myStream.getVideoTracks()===null||L.myStream.getVideoTracks()===void 0||L.myStream.getVideoTracks().length===0?(I.replaceVideo&&(I.keepVideo=!1,I.replaceVideo=!1,I.addVideo=!0,I.videoSend=!0),Oe(I)&&(I.keepVideo=!1,I.addVideo=!0)):Oe(I)&&!I.removeVideo&&!I.replaceVideo&&(I.keepVideo=!0),I.addData&&(I.data=!0)}if(Ge(I)&&I.keepAudio&&Oe(I)&&I.keepVideo){V.consentDialog(!1),N(P,j,I,F,L.myStream);return}}if(I.update&&!L.streamExternal){if(I.removeAudio||I.replaceAudio){if(L.myStream&&L.myStream.getAudioTracks()&&L.myStream.getAudioTracks().length){var J=L.myStream.getAudioTracks()[0];p.log("Removing audio track:",J),L.myStream.removeTrack(J);try{J.stop()}catch(yt){}}if(L.pc.getSenders()&&L.pc.getSenders().length){var q=!0;if(I.replaceAudio&&p.unifiedPlan&&(q=!1),q)for(var de in L.pc.getSenders()){var J=L.pc.getSenders()[de];J&&J.track&&J.track.kind==="audio"&&(p.log("Removing audio sender:",J),L.pc.removeTrack(J))}}}if(I.removeVideo||I.replaceVideo){if(L.myStream&&L.myStream.getVideoTracks()&&L.myStream.getVideoTracks().length){var J=L.myStream.getVideoTracks()[0];p.log("Removing video track:",J),L.myStream.removeTrack(J);try{J.stop()}catch(pt){}}if(L.pc.getSenders()&&L.pc.getSenders().length){var ee=!0;if(I.replaceVideo&&p.unifiedPlan&&(ee=!1),ee)for(var de in L.pc.getSenders()){var J=L.pc.getSenders()[de];J&&J.track&&J.track.kind==="video"&&(p.log("Removing video sender:",J),L.pc.removeTrack(J))}}}}if(F.stream!==null&&F.stream!==void 0){var se=F.stream;if(p.log("MediaStream provided by the application"),p.debug(se),I.update&&L.myStream&&L.myStream!==F.stream&&!L.streamExternal){try{var Qe=L.myStream.getTracks();for(var mt in Qe){var Ie=Qe[mt];p.log(Ie),Ie!=null&&Ie.stop()}}catch(yt){}L.myStream=null}L.streamExternal=!0,V.consentDialog(!1),N(P,j,I,F,se);return}if(Ge(I)||Oe(I)){if(!p.isGetUserMediaAvailable()){F.error("getUserMedia not available");return}var ht={mandatory:{},optional:[]};V.consentDialog(!0);var Be=Ge(I);Be===!0&&I!=null&&I!=null&&ue(I.audio)==="object"&&(Be=I.audio);var tt=Oe(I);if(tt===!0&&I!=null&&I!=null){var Xt=F.simulcast===!0,Vt=F.simulcast2===!0;if((Xt||Vt)&&!j&&(I.video===void 0||I.video===!1)&&(I.video="hires"),I.video&&I.video!="screen"&&I.video!="window")if(ue(I.video)==="object")tt=I.video;else{var Ue=0,st=0;I.video==="lowres"?(st=240,Ue=320):I.video==="lowres-16:9"?(st=180,Ue=320):I.video==="hires"||I.video==="hires-16:9"||I.video==="hdres"?(st=720,Ue=1280):I.video==="fhdres"?(st=1080,Ue=1920):I.video==="4kres"?(st=2160,Ue=3840):I.video==="stdres"?(st=480,Ue=640):I.video==="stdres-16:9"?(st=360,Ue=640):(p.log("Default video setting is stdres 4:3"),st=480,Ue=640),p.log("Adding media constraint:",I.video),tt={height:{ideal:st},width:{ideal:Ue}},p.log("Adding video constraint:",tt)}else if(I.video==="screen"||I.video==="window"){var Nn=function(pt,Wt){V.consentDialog(!1),pt?F.error(pt):N(P,j,I,F,Wt)},Ti=function(pt,Wt,cn){p.log("Adding media constraint (screen capture)"),p.debug(pt),navigator.mediaDevices.getUserMedia(pt).then(function(Tn){cn?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(ni){Tn.addTrack(ni.getAudioTracks()[0]),Wt(null,Tn)}):Wt(null,Tn)}).catch(function(Tn){V.consentDialog(!1),Wt(Tn)})};if(I.screenshareFrameRate||(I.screenshareFrameRate=3),navigator.mediaDevices&&navigator.mediaDevices.getDisplayMedia){navigator.mediaDevices.getDisplayMedia({video:!0}).then(function(yt){V.consentDialog(!1),Ge(I)&&!I.keepAudio?navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(pt){yt.addTrack(pt.getAudioTracks()[0]),N(P,j,I,F,yt)}):N(P,j,I,F,yt)},function(yt){V.consentDialog(!1),F.error(yt)});return}if(p.webRTCAdapter.browserDetails.browser==="chrome"){var Si=p.webRTCAdapter.browserDetails.version,ji=33;window.navigator.userAgent.match("Linux")&&(ji=35),Si>=26&&Si<=ji?(ht={video:{mandatory:{googLeakyBucket:!0,maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:I.screenshareFrameRate,maxFrameRate:I.screenshareFrameRate,chromeMediaSource:"screen"}},audio:Ge(I)&&!I.keepAudio},Ti(ht,Nn)):p.extension.getScreen(function(yt,pt){if(yt)return V.consentDialog(!1),F.error(yt);ht={audio:!1,video:{mandatory:{chromeMediaSource:"desktop",maxWidth:window.screen.width,maxHeight:window.screen.height,minFrameRate:I.screenshareFrameRate,maxFrameRate:I.screenshareFrameRate},optional:[{googLeakyBucket:!0},{googTemporalLayeredScreencast:!0}]}},ht.video.mandatory.chromeMediaSourceId=pt,Ti(ht,Nn,Ge(I)&&!I.keepAudio)})}else if(p.webRTCAdapter.browserDetails.browser==="firefox")if(p.webRTCAdapter.browserDetails.version>=33)ht={video:{mozMediaSource:I.video,mediaSource:I.video},audio:Ge(I)&&!I.keepAudio},Ti(ht,function(yt,pt){if(Nn(yt,pt),!yt)var Wt=pt.currentTime,cn=window.setInterval(function(){pt||window.clearInterval(cn),pt.currentTime==Wt&&(window.clearInterval(cn),pt.onended&&pt.onended()),Wt=pt.currentTime},500)});else{var Li=new Error("NavigatorUserMediaError");Li.name="Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)",V.consentDialog(!1),F.error(Li);return}return}}(I==null||I.video!=="screen")&&navigator.mediaDevices.enumerateDevices().then(function(yt){var pt=yt.some(function(un){return un.kind==="audioinput"}),Wt=ye(I)||yt.some(function(un){return un.kind==="videoinput"}),cn=Ge(I),Tn=Oe(I),ni=Ct(I),Oi=rt(I);if(cn||Tn||ni||Oi){var Ui=cn?pt:!1,Hi=Tn?Wt:!1;if(!Ui&&!Hi)return V.consentDialog(!1),F.error("No capture device found"),!1;if(!Ui&&ni)return V.consentDialog(!1),F.error("Audio capture is required, but no capture device found"),!1;if(!Hi&&Oi)return V.consentDialog(!1),F.error("Video capture is required, but no capture device found"),!1}var ii={audio:pt&&!I.keepAudio?Be:!1,video:Wt&&!I.keepVideo?tt:!1};p.debug("getUserMedia constraints",ii),!ii.audio&&!ii.video?(V.consentDialog(!1),N(P,j,I,F,se)):navigator.mediaDevices.getUserMedia(ii).then(function(un){V.consentDialog(!1),N(P,j,I,F,un)}).catch(function(un){V.consentDialog(!1),F.error({code:un.code,name:un.name,message:un.message})})}).catch(function(yt){V.consentDialog(!1),F.error("enumerateDevices error",yt)})}else N(P,j,I,F)}function te(P,M){M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:Yt;var F=M.jsep,j=g[P];if(j==null||j.webrtcStuff===null||j.webrtcStuff===void 0){p.warn("Invalid handle"),M.error("Invalid handle");return}var I=j.webrtcStuff;if(F!=null){if(I.pc===null){p.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep"),M.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");return}I.pc.setRemoteDescription(F).then(function(){if(p.log("Remote description accepted!"),I.remoteSdp=F.sdp,I.candidates&&I.candidates.length>0){for(var V=0;V<I.candidates.length;V++){var L=I.candidates[V];p.debug("Adding remote candidate:",L),!L||L.completed===!0?I.pc.addIceCandidate(p.endOfCandidates):I.pc.addIceCandidate(L)}I.candidates=[]}M.success()},M.error)}else M.error("Invalid JSEP")}function ce(P,M,F){F=F||{},F.success=typeof F.success=="function"?F.success:p.noop,F.error=typeof F.error=="function"?F.error:p.noop,F.customizeSdp=typeof F.customizeSdp=="function"?F.customizeSdp:p.noop;var j=g[P];if(j==null||j.webrtcStuff===null||j.webrtcStuff===void 0){p.warn("Invalid handle"),F.error("Invalid handle");return}var I=j.webrtcStuff,V=F.simulcast===!0;V?p.log("Creating offer (iceDone="+I.iceDone+", simulcast="+V+")"):p.log("Creating offer (iceDone="+I.iceDone+")");var L={};if(p.unifiedPlan){var J=null,q=null,de=I.pc.getTransceivers();if(de&&de.length>0)for(var ee in de){var se=de[ee];if(se.sender&&se.sender.track&&se.sender.track.kind==="audio"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="audio"){J||(J=se);continue}if(se.sender&&se.sender.track&&se.sender.track.kind==="video"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="video"){q||(q=se);continue}}var Qe=Ge(M),mt=kt(M);!Qe&&!mt?M.removeAudio&&J&&(J.setDirection?J.setDirection("inactive"):J.direction="inactive",p.log("Setting audio transceiver to inactive:",J)):Qe&&mt?J&&(J.setDirection?J.setDirection("sendrecv"):J.direction="sendrecv",p.log("Setting audio transceiver to sendrecv:",J)):Qe&&!mt?J&&(J.setDirection?J.setDirection("sendonly"):J.direction="sendonly",p.log("Setting audio transceiver to sendonly:",J)):!Qe&&mt&&(J?(J.setDirection?J.setDirection("recvonly"):J.direction="recvonly",p.log("Setting audio transceiver to recvonly:",J)):(J=I.pc.addTransceiver("audio",{direction:"recvonly"}),p.log("Adding recvonly audio transceiver:",J)));var Ie=Oe(M),ht=Ae(M);!Ie&&!ht?M.removeVideo&&q&&(q.setDirection?q.setDirection("inactive"):q.direction="inactive",p.log("Setting video transceiver to inactive:",q)):Ie&&ht?q&&(q.setDirection?q.setDirection("sendrecv"):q.direction="sendrecv",p.log("Setting video transceiver to sendrecv:",q)):Ie&&!ht?q&&(q.setDirection?q.setDirection("sendonly"):q.direction="sendonly",p.log("Setting video transceiver to sendonly:",q)):!Ie&&ht&&(q?(q.setDirection?q.setDirection("recvonly"):q.direction="recvonly",p.log("Setting video transceiver to recvonly:",q)):(q=I.pc.addTransceiver("video",{direction:"recvonly"}),p.log("Adding recvonly video transceiver:",q)))}else L.offerToReceiveAudio=kt(M),L.offerToReceiveVideo=Ae(M);var Be=F.iceRestart===!0;Be&&(L.iceRestart=!0),p.debug(L);var tt=Oe(M);if(tt&&V&&p.webRTCAdapter.browserDetails.browser==="firefox"){p.log("Enabling Simulcasting for Firefox (RID)");var Xt=I.pc.getSenders().find(function(st){return st.track.kind=="video"});if(Xt){var Vt=Xt.getParameters();Vt||(Vt={});var Ue=S(F.simulcastMaxBitrates);Vt.encodings=[{rid:"h",active:!0,maxBitrate:Ue.high},{rid:"m",active:!0,maxBitrate:Ue.medium,scaleResolutionDownBy:2},{rid:"l",active:!0,maxBitrate:Ue.low,scaleResolutionDownBy:4}],Xt.setParameters(Vt)}}I.pc.createOffer(L).then(function(st){p.debug(st);var Nn={type:st.type,sdp:st.sdp};if(F.customizeSdp(Nn),st.sdp=Nn.sdp,p.log("Setting local description"),tt&&V&&(p.webRTCAdapter.browserDetails.browser==="chrome"||p.webRTCAdapter.browserDetails.browser==="safari"?(p.log("Enabling Simulcasting for Chrome (SDP munging)"),st.sdp=Ht(st.sdp)):p.webRTCAdapter.browserDetails.browser!=="firefox"&&p.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),I.mySdp=st.sdp,I.pc.setLocalDescription(st).catch(F.error),I.mediaConstraints=L,!I.iceDone&&!I.trickle){p.log("Waiting for all candidates...");return}p.log("Offer ready"),p.debug(F),F.success(st)},F.error)}function he(P,M,F){F=F||{},F.success=typeof F.success=="function"?F.success:p.noop,F.error=typeof F.error=="function"?F.error:p.noop,F.customizeSdp=typeof F.customizeSdp=="function"?F.customizeSdp:p.noop;var j=g[P];if(j==null||j.webrtcStuff===null||j.webrtcStuff===void 0){p.warn("Invalid handle"),F.error("Invalid handle");return}var I=j.webrtcStuff,V=F.simulcast===!0;V?p.log("Creating answer (iceDone="+I.iceDone+", simulcast="+V+")"):p.log("Creating answer (iceDone="+I.iceDone+")");var L=null;if(p.unifiedPlan){L={};var J=null,q=null,de=I.pc.getTransceivers();if(de&&de.length>0)for(var ee in de){var se=de[ee];if(se.sender&&se.sender.track&&se.sender.track.kind==="audio"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="audio"){J||(J=se);continue}if(se.sender&&se.sender.track&&se.sender.track.kind==="video"||se.receiver&&se.receiver.track&&se.receiver.track.kind==="video"){q||(q=se);continue}}var Qe=Ge(M),mt=kt(M);if(!Qe&&!mt){if(M.removeAudio&&J)try{J.setDirection?J.setDirection("inactive"):J.direction="inactive",p.log("Setting audio transceiver to inactive:",J)}catch(Ue){p.error(Ue)}}else if(Qe&&mt){if(J)try{J.setDirection?J.setDirection("sendrecv"):J.direction="sendrecv",p.log("Setting audio transceiver to sendrecv:",J)}catch(Ue){p.error(Ue)}}else if(Qe&&!mt)try{J&&(J.setDirection?J.setDirection("sendonly"):J.direction="sendonly",p.log("Setting audio transceiver to sendonly:",J))}catch(Ue){p.error(Ue)}else if(!Qe&&mt)if(J)try{J.setDirection?J.setDirection("recvonly"):J.direction="recvonly",p.log("Setting audio transceiver to recvonly:",J)}catch(Ue){p.error(Ue)}else J=I.pc.addTransceiver("audio",{direction:"recvonly"}),p.log("Adding recvonly audio transceiver:",J);var Ie=Oe(M),ht=Ae(M);if(!Ie&&!ht){if(M.removeVideo&&q)try{q.setDirection?q.setDirection("inactive"):q.direction="inactive",p.log("Setting video transceiver to inactive:",q)}catch(Ue){p.error(Ue)}}else if(Ie&&ht){if(q)try{q.setDirection?q.setDirection("sendrecv"):q.direction="sendrecv",p.log("Setting video transceiver to sendrecv:",q)}catch(Ue){p.error(Ue)}}else if(Ie&&!ht){if(q)try{q.setDirection?q.setDirection("sendonly"):q.direction="sendonly",p.log("Setting video transceiver to sendonly:",q)}catch(Ue){p.error(Ue)}}else if(!Ie&&ht)if(q)try{q.setDirection?q.setDirection("recvonly"):q.direction="recvonly",p.log("Setting video transceiver to recvonly:",q)}catch(Ue){p.error(Ue)}else q=I.pc.addTransceiver("video",{direction:"recvonly"}),p.log("Adding recvonly video transceiver:",q)}else p.webRTCAdapter.browserDetails.browser=="firefox"||p.webRTCAdapter.browserDetails.browser=="edge"?L={offerToReceiveAudio:kt(M),offerToReceiveVideo:Ae(M)}:L={mandatory:{OfferToReceiveAudio:kt(M),OfferToReceiveVideo:Ae(M)}};p.debug(L);var Be=Oe(M);if(Be&&V&&p.webRTCAdapter.browserDetails.browser==="firefox"){p.log("Enabling Simulcasting for Firefox (RID)");var tt=I.pc.getSenders()[1];p.log(tt);var Xt=tt.getParameters();p.log(Xt);var Vt=S(F.simulcastMaxBitrates);tt.setParameters({encodings:[{rid:"high",active:!0,priority:"high",maxBitrate:Vt.high},{rid:"medium",active:!0,priority:"medium",maxBitrate:Vt.medium},{rid:"low",active:!0,priority:"low",maxBitrate:Vt.low}]})}I.pc.createAnswer(L).then(function(Ue){p.debug(Ue);var st={type:Ue.type,sdp:Ue.sdp};if(F.customizeSdp(st),Ue.sdp=st.sdp,p.log("Setting local description"),Be&&V&&(p.webRTCAdapter.browserDetails.browser==="chrome"?p.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it"):p.webRTCAdapter.browserDetails.browser!=="firefox"&&p.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring")),I.mySdp=Ue.sdp,I.pc.setLocalDescription(Ue).catch(F.error),I.mediaConstraints=L,!I.iceDone&&!I.trickle){p.log("Waiting for all candidates...");return}F.success(Ue)},F.error)}function Re(P,M){M=M||{},M.success=typeof M.success=="function"?M.success:p.noop,M.error=typeof M.error=="function"?M.error:p.noop;var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0){p.warn("Invalid handle, not sending anything");return}var j=F.webrtcStuff;if(p.log("Sending offer/answer SDP..."),j.mySdp===null||j.mySdp===void 0){p.warn("Local SDP instance is invalid, not sending anything...");return}j.mySdp={type:j.pc.localDescription.type,sdp:j.pc.localDescription.sdp},j.trickle===!1&&(j.mySdp.trickle=!1),p.debug(M),j.sdpSent=!0,M.success(j.mySdp)}function we(P,M){var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0)return p.warn("Invalid handle"),0;var j=M?"remote":"local",I=F.webrtcStuff;return I.volume[j]||(I.volume[j]={value:0}),I.pc.getStats&&p.webRTCAdapter.browserDetails.browser==="chrome"?M&&(I.remoteStream===null||I.remoteStream===void 0)?(p.warn("Remote stream unavailable"),0):!M&&(I.myStream===null||I.myStream===void 0)?(p.warn("Local stream unavailable"),0):I.volume[j].timer===null||I.volume[j].timer===void 0?(p.log("Starting "+j+" volume monitor"),I.volume[j].timer=setInterval(function(){I.pc.getStats(function(V){for(var L=V.result(),J=0;J<L.length;J++){var q=L[J];q.type=="ssrc"&&(M&&q.stat("audioOutputLevel")?I.volume[j].value=parseInt(q.stat("audioOutputLevel")):!M&&q.stat("audioInputLevel")&&(I.volume[j].value=parseInt(q.stat("audioInputLevel"))))}})},200),0):I.volume[j].value:(p.warn("Getting the "+j+" volume unsupported by browser"),0)}function ke(P,M){var F=g[P];if(F==null||F.webrtcStuff===null||F.webrtcStuff===void 0)return p.warn("Invalid handle"),!0;var j=F.webrtcStuff;return j.pc===null||j.pc===void 0?(p.warn("Invalid PeerConnection"),!0):j.myStream===void 0||j.myStream===null?(p.warn("Invalid local MediaStream"),!0):M?j.myStream.getVideoTracks()===null||j.myStream.getVideoTracks()===void 0||j.myStream.getVideoTracks().length===0?(p.warn("No video track"),!0):!j.myStream.getVideoTracks()[0].enabled:j.myStream.getAudioTracks()===null||j.myStream.getAudioTracks()===void 0||j.myStream.getAudioTracks().length===0?(p.warn("No audio track"),!0):!j.myStream.getAudioTracks()[0].enabled}function We(P,M,F){var j=g[P];if(j==null||j.webrtcStuff===null||j.webrtcStuff===void 0)return p.warn("Invalid handle"),!1;var I=j.webrtcStuff;return I.pc===null||I.pc===void 0?(p.warn("Invalid PeerConnection"),!1):I.myStream===void 0||I.myStream===null?(p.warn("Invalid local MediaStream"),!1):M?I.myStream.getVideoTracks()===null||I.myStream.getVideoTracks()===void 0||I.myStream.getVideoTracks().length===0?(p.warn("No video track"),!1):(I.myStream.getVideoTracks()[0].enabled=!F,!0):I.myStream.getAudioTracks()===null||I.myStream.getAudioTracks()===void 0||I.myStream.getAudioTracks().length===0?(p.warn("No audio track"),!1):(I.myStream.getAudioTracks()[0].enabled=!F,!0)}function yn(P){var M=g[P];if(M==null||M.webrtcStuff===null||M.webrtcStuff===void 0)return p.warn("Invalid handle"),"Invalid handle";var F=M.webrtcStuff;return F.pc===null||F.pc===void 0?"Invalid PeerConnection":F.pc.getStats?F.bitrate.timer===null||F.bitrate.timer===void 0?(p.log("Starting bitrate timer (via getStats)"),F.bitrate.timer=setInterval(function(){F.pc.getStats().then(function(j){j.forEach(function(I){if(I){var V=!1;if(((I.mediaType==="video"||I.id.toLowerCase().indexOf("video")>-1)&&I.type==="inbound-rtp"&&I.id.indexOf("rtcp")<0||I.type=="ssrc"&&I.bytesReceived&&(I.googCodecName==="VP8"||I.googCodecName===""))&&(V=!0),V)if(F.bitrate.bsnow=I.bytesReceived,F.bitrate.tsnow=I.timestamp,F.bitrate.bsbefore===null||F.bitrate.tsbefore===null)F.bitrate.bsbefore=F.bitrate.bsnow,F.bitrate.tsbefore=F.bitrate.tsnow;else{var L=F.bitrate.tsnow-F.bitrate.tsbefore;p.webRTCAdapter.browserDetails.browser=="safari"&&(L=L/1e3);var J=Math.round((F.bitrate.bsnow-F.bitrate.bsbefore)*8/L);p.webRTCAdapter.browserDetails.browser==="safari"&&(J=parseInt(J/1e3)),F.bitrate.value=J+" kbits/sec",F.bitrate.bsbefore=F.bitrate.bsnow,F.bitrate.tsbefore=F.bitrate.tsnow}}})})},1e3),"0 kbits/sec"):F.bitrate.value:(p.warn("Getting the video bitrate unsupported by browser"),"Feature unsupported by browser")}function Yt(P){p.error("WebRTC error:",P)}function It(P,M){p.log("Cleaning WebRTC stuff");var F=g[P];if(F!=null){var j=F.webrtcStuff;if(j!=null){if(M===!0){var I={rtcgw:"hangup",transaction:p.randomString(12)};F.token!==null&&F.token!==void 0&&(I.token=F.token),E!=null&&(I.apisecret=E),p.debug("Sending hangup request (handle="+P+"):"),p.debug(I),u?(I.session_id=m,I.handle_id=P,n.send(JSON.stringify(I))):p.httpAPICall(s+"/"+m+"/"+P,{verb:"POST",withCredentials:h,body:I})}j.remoteStream=null,j.volume&&(j.volume.local&&j.volume.local.timer&&clearInterval(j.volume.local.timer),j.volume.remote&&j.volume.remote.timer&&clearInterval(j.volume.remote.timer)),j.volume={},j.bitrate.timer&&clearInterval(j.bitrate.timer),j.bitrate.timer=null,j.bitrate.bsnow=null,j.bitrate.bsbefore=null,j.bitrate.tsnow=null,j.bitrate.tsbefore=null,j.bitrate.value=null;try{if(!j.streamExternal&&j.myStream!==null&&j.myStream!==void 0){p.log("Stopping local stream tracks");var V=j.myStream.getTracks();for(var L in V){var J=V[L];p.log(J),J!=null&&J.stop()}}}catch(q){}j.streamExternal=!1,j.myStream=null;try{j.pc.close()}catch(q){}j.pc=null,j.candidates=null,j.mySdp=null,j.remoteSdp=null,j.iceDone=!1,j.dataChannel={},j.dtmfSender=null}F.oncleanup()}}function Ht(P){for(var M=P.split(`\r
|
|
|
`),F=!1,j=[-1],I=[-1],V=null,L=null,J=null,q=null,de=-1,ee=0;ee<M.length;ee++){var se=M[ee].match(/m=(\w+) */);if(se){var Qe=se[1];if(Qe==="video")if(j[0]<0)F=!0;else{de=ee;break}else if(j[0]>-1){de=ee;break}continue}if(F){var mt=M[ee].match(/a=ssrc-group:FID (\d+) (\d+)/);if(mt){j[0]=mt[1],I[0]=mt[2],M.splice(ee,1),ee--;continue}if(j[0]){var Ie=M[ee].match("a=ssrc:"+j[0]+" cname:(.+)");if(Ie&&(V=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" msid:(.+)"),Ie&&(L=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" mslabel:(.+)"),Ie&&(J=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" label:(.+)"),Ie&&(q=Ie[1]),M[ee].indexOf("a=ssrc:"+I[0])===0){M.splice(ee,1),ee--;continue}if(M[ee].indexOf("a=ssrc:"+j[0])===0){M.splice(ee,1),ee--;continue}}if(M[ee].length==0){M.splice(ee,1),ee--;continue}}}if(j[0]<0){de=-1,F=!1;for(var ee=0;ee<M.length;ee++){var se=M[ee].match(/m=(\w+) */);if(se){var Qe=se[1];if(Qe==="video")if(j[0]<0)F=!0;else{de=ee;break}else if(j[0]>-1){de=ee;break}continue}if(F){if(j[0]<0){var ht=M[ee].match(/a=ssrc:(\d+)/);if(ht){j[0]=ht[1],M.splice(ee,1),ee--;continue}}else{var Ie=M[ee].match("a=ssrc:"+j[0]+" cname:(.+)");if(Ie&&(V=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" msid:(.+)"),Ie&&(L=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" mslabel:(.+)"),Ie&&(J=Ie[1]),Ie=M[ee].match("a=ssrc:"+j[0]+" label:(.+)"),Ie&&(q=Ie[1]),M[ee].indexOf("a=ssrc:"+I[0])===0){M.splice(ee,1),ee--;continue}if(M[ee].indexOf("a=ssrc:"+j[0])===0){M.splice(ee,1),ee--;continue}}if(M[ee].length==0){M.splice(ee,1),ee--;continue}}}}if(j[0]<0)return p.warn("Couldn't find the video SSRC, simulcasting NOT enabled"),P;de<0&&(de=M.length),j[1]=Math.floor(Math.random()*4294967295),j[2]=Math.floor(Math.random()*4294967295),I[1]=Math.floor(Math.random()*4294967295),I[2]=Math.floor(Math.random()*4294967295);for(var ee=0;ee<j.length;ee++)V&&(M.splice(de,0,"a=ssrc:"+j[ee]+" cname:"+V),de++),L&&(M.splice(de,0,"a=ssrc:"+j[ee]+" msid:"+L),de++),J&&(M.splice(de,0,"a=ssrc:"+j[ee]+" mslabel:"+J),de++),q&&(M.splice(de,0,"a=ssrc:"+j[ee]+" label:"+q),de++),V&&(M.splice(de,0,"a=ssrc:"+I[ee]+" cname:"+V),de++),L&&(M.splice(de,0,"a=ssrc:"+I[ee]+" msid:"+L),de++),J&&(M.splice(de,0,"a=ssrc:"+I[ee]+" mslabel:"+J),de++),q&&(M.splice(de,0,"a=ssrc:"+I[ee]+" label:"+q),de++);return M.splice(de,0,"a=ssrc-group:FID "+j[2]+" "+I[2]),M.splice(de,0,"a=ssrc-group:FID "+j[1]+" "+I[1]),M.splice(de,0,"a=ssrc-group:FID "+j[0]+" "+I[0]),M.splice(de,0,"a=ssrc-group:SIM "+j[0]+" "+j[1]+" "+j[2]),P=M.join(`\r
|
|
|
`),P.endsWith(`\r
|
|
|
`)||(P+=`\r
|
|
|
`),P}function Ge(P){return p.debug("isAudioSendEnabled:",P),P==null?!0:P.audio===!1?!1:P.audioSend===void 0||P.audioSend===null?!0:P.audioSend===!0}function Ct(P){return p.debug("isAudioSendRequired:",P),P==null||P.audio===!1||P.audioSend===!1||P.failIfNoAudio===void 0||P.failIfNoAudio===null?!1:P.failIfNoAudio===!0}function kt(P){return p.debug("isAudioRecvEnabled:",P),P==null?!0:P.audio===!1?!1:P.audioRecv===void 0||P.audioRecv===null?!0:P.audioRecv===!0}function Oe(P){return p.debug("isVideoSendEnabled:",P),P==null?!0:P.video===!1?!1:P.videoSend===void 0||P.videoSend===null?!0:P.videoSend===!0}function rt(P){return p.debug("isVideoSendRequired:",P),P==null||P.video===!1||P.videoSend===!1||P.failIfNoVideo===void 0||P.failIfNoVideo===null?!1:P.failIfNoVideo===!0}function Ae(P){return p.debug("isVideoRecvEnabled:",P),P==null?!0:P.video===!1?!1:P.videoRecv===void 0||P.videoRecv===null?!0:P.videoRecv===!0}function ye(P){if(p.debug("isScreenSendEnabled:",P),P==null||ue(P.video)!=="object"||ue(P.video.mandatory)!=="object")return!1;var M=P.video.mandatory;return M.chromeMediaSource?M.chromeMediaSource==="desktop"||M.chromeMediaSource==="screen":M.mozMediaSource?M.mozMediaSource==="window"||M.mozMediaSource==="screen":M.mediaSource?M.mediaSource==="window"||M.mediaSource==="screen":!1}function De(P){return p.debug("isDataEnabled:",P),p.webRTCAdapter.browserDetails.browser=="edge"?(p.warn("Edge doesn't support data channels yet"),!1):P==null?!1:P.data===!0}function Xe(P){return p.debug("isTrickleEnabled:",P),P==null?!0:P===!0}}window.Janus=p;var zi=null,wn=null,gs="tts-"+Janus.randomString(12),vn=null;Janus=window.Janus,Janus.init({debug:"all",callback:function(){window.stopTalk=function(){zi.destroy()},window.startTalk=function(){if(!Janus.isWebrtcSupported()){bootbox.alert("No WebRTC support... ");return}zi=new Janus({server:window.EZUIKit.opt.rtcUrl,success:function(){zi.attach({plugin:"rtcgw.plugin.tts",opaqueId:gs,success:function(i){wn=i,Janus.log("Plugin attached! ("+wn.getPlugin()+", id="+wn.getId()+")");var r=window.EZUIKit.opt.talkLink;console.log("ttsUlr",r);var a={request:"start",url:r,codec:"opus",dir:"sendrecv",audio_debug:1};window.EZUIKit.opt.talkType==="gb28181"&&(a.devProto="gb28181"),Janus.debug("Trying a createOffer too (audio/video sendrecv)"),wn.createOffer({media:{audio:!0,video:!1,data:!1},simulcast:!1,simulcast2:!1,success:function(s){Janus.debug("Got SDP!"),Janus.debug(s),wn.send({message:a,jsep:s}),typeof window.EZUIKit.handleTalkSuccess!="undefined"&&window.EZUIKit.handleTalkSuccess()},error:function(s){Janus.error("WebRTC error:",s),typeof window.EZUIKit.handleTalkError!="undefined"&&window.EZUIKit.handleTalkError(s)}})},error:function(i){console.error(" -- Error attaching plugin...",i),bootbox.alert("Error attaching plugin... "+i),window.EZUIKit.handleTalkError!=="undefined"&&window.EZUIKit.handleTalkError(i)},consentDialog:function(i){Janus.debug("Consent dialog should be "+(i?"on":"off")+" now")},iceState:function(i){Janus.log("ICE state changed to "+i)},mediaState:function(i,r){Janus.log("Janus "+(r?"started":"stopped")+" receiving our "+i)},webrtcState:function(i){Janus.log("Janus says our WebRTC PeerConnection is "+(i?"up":"down")+" now")},slowLink:function(i,r){Janus.warn("Janus reports problems "+(i?"sending":"receiving")+" packets on this PeerConnection ("+r+" lost packets)")},onmessage:function(i,r){Janus.debug(" ::: Got a message :::"),Janus.debug(i),r!=null&&(Janus.debug("Handling SDP as well..."),Janus.debug(r),wn.handleRemoteJsep({jsep:r}));var a=i.result;if(a!=null){if(a==="done"){bootbox.alert("The TTS Test is over"),vn!=null&&vn.stop(),vn=null;return}a==="msg"&&typeof window.EZUIKit.handleTalkMessage!="undefined"&&window.EZUIKit.handleTalkMessage(i);var l=a.status;l==="slow_link"&&toastr.warning("Janus apparently missed many packets we sent, maybe we should reduce the bitrate","Packet loss?",{timeOut:2e3})}},onlocalstream:function(i){Janus.debug(" ::: Got a local stream :::"),Janus.debug(i),Janus.attachMediaStream(document.getElementById("myaudio"),i),wn.webrtcStuff.pc.iceConnectionState!=="completed"&&wn.webrtcStuff.pc.iceConnectionState!=="connected"&&(vn==null?document.getElementById("audioright"):vn.spin());var r=i.getAudioTracks();r==null||r.length},onremotestream:function(i){Janus.debug(" ::: Got a remote stream :::"),Janus.debug(i),Janus.attachMediaStream(document.getElementById("peeraudio"),i);var r=i.getAudioTracks();r==null||r.length===0||document.getElementById("peeraudio").play()},ondataopen:function(i){Janus.log("The DataChannel is available!")},ondata:function(i){Janus.debug("We got data from the DataChannel! "+i)},oncleanup:function(){Janus.log(" ::: Got a cleanup notification :::"),vn!=null&&vn.stop(),vn=null}})},error:function(n){Janus.error(n),window.EZUIKit.handleTalkError!=="undefined"&&window.EZUIKit.handleTalkError(n)},destroyed:function(){}})}}}),window.janus=zi,window.tts=wn;var ia=function(){function f(u){var n=this;fe(this,f),this.jSPlugin=u,this.codeHandler=new ta,this.pluginStatus=new Bi(this,this.jSPlugin.params.id);var i=document.createElement("div");i.id="audioleft";var r=document.createElement("div");r.id="audioright",r.style="display:none;";var a=document.createElement("audio");a.id="myaudio",a.muted=!0,a.setAttribute("autoplay",!0),a.setAttribute("controls",!0),i.appendChild(a),i.style="display:none;";var l=document.createElement("audio");l.id="peeraudio",l.setAttribute("autoplay",!0),l.setAttribute("controls",!0),r.appendChild(l),window.EZUIKit.handleTalkError=function(s){console.log("talk err",s),typeof n.jSPlugin.handleTalkError!="undefined"&&n.jSPlugin.handleTalkError(s)},window.EZUIKit.handleTalkSuccess=function(s){console.log("talk success",s),typeof n.jSPlugin.handleTalkSuccess!="undefined"&&n.jSPlugin.handleTalkSuccess(s)},window.EZUIKit.opt={rtcUrl:"",talkLink:"",ttsUrl:"",stream:"",deviceSerial:Ke(this.jSPlugin.url).deviceSerial,channelNo:Ke(this.jSPlugin.url).channelNo},document.body.appendChild(i),document.body.appendChild(r)}return dt(f,[{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"startTalk",value:function(){var n=this;if(this.jSPlugin.capacity&&this.jSPlugin.capacity.support_talk&&!(this.jSPlugin.capacity&&(this.jSPlugin.capacity.support_talk==="3"||this.jSPlugin.capacity.support_talk==="1")))return typeof this.jSPlugin.params.handleError=="function"&&(this.pluginStatus.loadingSetText({text:"设备不支持对讲",color:"red",delayClear:2e3}),this.jSPlugin.params.handleError({msg:"设备不支持对讲",retcode:-1e3,id:this.jSPlugin.params.id,type:"handleError"})),console.log("设备不支持对讲"),!1;var i=new FormData;i.append("accessToken",this.jSPlugin.accessToken),i.append("deviceSerial",Ke(this.jSPlugin.url).deviceSerial),i.append("channelNo",Ke(this.jSPlugin.url).channelNo),fetch(this.jSPlugin.env.domain+"/api/lapp/live/talk/url",{method:"POST",body:i}).then(function(r){return r.json()}).then(function(r){if(r.code==200){var a=r.data;if(a){var l=a.rtcUrl;l.indexOf("ws")===-1&&(l=l.replace("https","wss").replace("rtcgw","rtcgw-ws")),window.EZUIKit.opt.rtcUrl=l,window.EZUIKit.opt.ttsUrl="tts://"+a.ttsUrl,window.EZUIKit.opt.deviceSerial=Ke(n.jSPlugin.url).deviceSerial,window.EZUIKit.opt.channelNo=Ke(n.jSPlugin.url).channelNo;var s=window.EZUIKit.opt.ttsUrl.split("?");if(s.length===2){var b="talk?dev="+window.EZUIKit.opt.deviceSerial+"&chann="+window.EZUIKit.opt.channelNo+"&encodetype=2";window.EZUIKit.opt.talkLink=window.EZUIKit.opt.ttsUrl.split("?")[0]+"/"+b,window.EZUIKit.opt.talkType="gb28181"}else{var b="talk://"+window.EZUIKit.opt.deviceSerial+":0:"+window.EZUIKit.opt.channelNo+":cas.ys7.com:6500";window.EZUIKit.opt.talkLink=window.EZUIKit.opt.ttsUrl.split("?")[0]+"/"+b}window.EZUIKit.opt.stream=a.stream,window.startTalk()}}else console.log(r.code,n.codeHandler.matchInfo(r.code,"talk")),n.pluginStatus.loadingSetText({text:n.codeHandler.matchInfo(r.code,"talk").msg||r.msg,color:"red",delayClear:2e3}),typeof n.jSPlugin.params.handleError=="function"&&n.jSPlugin.params.handleError({msg:r.msg,retcode:r.code,id:n.jSPlugin.params.id,type:"handleError"})}).catch(function(r){console.log("err",r)})}},{key:"stopTalk",value:function(){window.stopTalk(),document.getElementById("myaudio")&&document.getElementById("myaudio").srcObject&&document.getElementById("myaudio").srcObject.getTracks()[0].stop()}}]),f}(),vs=function(){function f(u){var n=this;fe(this,f),this.jSPlugin=u;var i=document.createElement("style");i.innerHTML=`
|
|
|
body{
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
}
|
|
|
#mobile-ez-ptz-container {
|
|
|
display: inline-block;
|
|
|
width: 375px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
.live-ptz-title{
|
|
|
height: 25px;
|
|
|
font-size: 18px;
|
|
|
color: #2c2c2c;
|
|
|
text-align: center;
|
|
|
font-weight: 700;
|
|
|
margin: 24px 0 12px;
|
|
|
}
|
|
|
.live-ptz-intro {
|
|
|
margin-bottom: 24px;
|
|
|
color: #aaaaaa;
|
|
|
}
|
|
|
.mobile-ez-ptz-wrap {
|
|
|
background-image: linear-gradient(180deg, #f6f8ff 0%, #ededed6b 50%)
|
|
|
}
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-container {
|
|
|
position: relative;
|
|
|
width: 260px;
|
|
|
height: 260px;
|
|
|
background: rgba(255, 255, 255, 0.80);
|
|
|
border: 1px solid rgba(255, 255, 255, 0.80);
|
|
|
border-radius: 100%;
|
|
|
cursor: pointer;
|
|
|
overflow: hidden;
|
|
|
margin: auto;
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top {
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 6px solid transparent;
|
|
|
border-right: 6px solid transparent;
|
|
|
border-bottom: 6px solid #aaaaaa;
|
|
|
position: absolute;
|
|
|
display: inline-block;
|
|
|
left: calc(50% - 6px);
|
|
|
top: 10px;
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top.active {
|
|
|
border-bottom-color: #1890FF;
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom {
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-left: 6px solid transparent;
|
|
|
border-right: 6px solid transparent;
|
|
|
border-top: 6px solid #aaaaaa;
|
|
|
position: absolute;
|
|
|
display: inline-block;
|
|
|
left: calc(50% - 6px);
|
|
|
bottom: 10px;
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom.active {
|
|
|
border-top-color: #1890FF;
|
|
|
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right {
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-top: 6px solid transparent;
|
|
|
border-bottom: 6px solid transparent;
|
|
|
border-left: 6px solid #aaaaaa;
|
|
|
position: absolute;
|
|
|
display: inline-block;
|
|
|
top: calc(50% - 6px);
|
|
|
right: 10px;
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right.active {
|
|
|
border-left-color: #1890FF;
|
|
|
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left {
|
|
|
width: 0;
|
|
|
height: 0;
|
|
|
border-top: 6px solid transparent;
|
|
|
border-bottom: 6px solid transparent;
|
|
|
border-right: 6px solid #aaaaaa;
|
|
|
position: absolute;
|
|
|
display: inline-block;
|
|
|
top: calc(50% - 6px);
|
|
|
left: 10px;
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left.active {
|
|
|
border-right-color: #1890FF;
|
|
|
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-container .ez-ptz-main.center {
|
|
|
width: 52px;
|
|
|
height: 52px;
|
|
|
background: #FFFFFF;
|
|
|
border: 2px solid #eee;
|
|
|
border-radius: 100%;
|
|
|
top: calc(50% - 26px);
|
|
|
left: calc(50% - 26px);
|
|
|
position: absolute;
|
|
|
/* box-shadow: 0px -39px 40px 6px #1890ff; */
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .mobile-ez-ptz-wrap {
|
|
|
display: inline-block;
|
|
|
padding: 24px 24px;
|
|
|
border-radius: 100%;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
|
|
|
#mobile-ez-ptz-container .ez-ptz-close {
|
|
|
position: absolute;
|
|
|
color: #FFFFFF;
|
|
|
top: 0;
|
|
|
right: 0px;
|
|
|
}`,document.getElementsByTagName("head")[0].appendChild(i);var r=document.createElement("div");r.className="mobile-ez-ptz-container",r.id="mobile-ez-ptz-container",r.style="display:inline-block;width: ".concat(this.jSPlugin.width,"px;text-align:center;");var a=document.createElement("div");a.className="live-ptz-title",a.id="live-ptz-title",a.innerHTML="云台控制",document.getElementById("live-ptz-title")||r.appendChild(a);var l=document.createElement("div");l.className="live-ptz-intro",l.id="live-ptz-intro",l.innerHTML="请通过操控云台来调整摄像机视角",document.getElementById("live-ptz-intro")||r.appendChild(l);var s=document.createElement("div");s.id="mobile-ez-ptz-item",s.className="mobile-ez-ptz-wrap",s.innerHTML=`
|
|
|
<div class="mobile-ez-ptz-container" id="mobile-ez-ptz-container">
|
|
|
<div class="ez-ptz-main center"></div>
|
|
|
<div class="mobile-ez-ptz-icon top default"></div>
|
|
|
<div class="mobile-ez-ptz-icon left default"></div>
|
|
|
<div class="mobile-ez-ptz-icon bottom default"></div>
|
|
|
<div class="mobile-ez-ptz-icon right default"></div>
|
|
|
</div>
|
|
|
`,document.getElementById("mobile-ez-ptz-item")||r.appendChild(s),Wn(r,document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),document.getElementById("mobile-ez-ptz-item").ontouchstart=function(b){b.preventDefault(),console.log("触摸开始"),n._handlePtzTouch(b,"start")},document.getElementById("mobile-ez-ptz-item").ontouchend=function(b){b.preventDefault(),console.log("触摸结束",b),n._handlePtzTouch(b,"stop")},document.getElementById("mobile-ez-ptz-item").onmousedown=function(b){b.preventDefault(),console.log("触摸开始"),n._handlePtzTouch(b,"start")},document.getElementById("mobile-ez-ptz-item").onmouseup=function(b){b.preventDefault(),console.log("触摸结束",b),n._handlePtzTouch(b,"stop")}}return dt(f,[{key:"show",value:function(){document.getElementById("mobile-ez-ptz-item").style="display: inline-block"}},{key:"hide",value:function(){document.getElementById("mobile-ez-ptz-item").style="display: none"}},{key:"_handlePtzTouch",value:function(n,i){var r=document.getElementById("mobile-ez-ptz-item").getBoundingClientRect(),a=r.left+130,l=r.top+130,s=n.x||n.changedTouches[0].clientX,b=n.y||n.changedTouches[0].clientY,T=s-a,C=b-l,y=0,h=this.jSPlugin.env.domain+"/api/lapp/device/ptz/start";Math.abs(T)>Math.abs(C)?T>0?(y=3,document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("default","active")):(y=2,document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("default","active")):C>0?(y=1,document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("default","active")):(y=0,document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("default","active")),document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(y===0?180:y===1?0:y===2?90:270,"deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)"),i==="stop"&&(h=this.jSPlugin.env.domain+"/api/lapp/device/ptz/stop",document.getElementById("mobile-ez-ptz-item").style="",document.getElementsByClassName("mobile-ez-ptz-icon")[3].className=document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[1].className=document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[2].className=document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("active","default"),document.getElementsByClassName("mobile-ez-ptz-icon")[0].className=document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("active","default"));var D=new FormData;D.append("deviceSerial",Ke(this.jSPlugin.url).deviceSerial),D.append("channelNo",Ke(this.jSPlugin.url).channelNo),D.append("speed",1),D.append("direction",y),D.append("accessToken",this.jSPlugin.accessToken),fetch(h,{method:"POST",body:D}).then(function(_){return _.json()}).then(function(_){_.code==200||(_.code==60005||_.code==60002||_.code==60003||_.code==60004)&&(document.getElementById("mobile-ez-ptz-item").style="background-image:linear-gradient(".concat(y===0?180:y===1?0:y===2?90:270,"deg, #f45656 0%, rgba(100,143,252,0.00) 50%)"))}).catch(function(_){console.log("云台调用异常",_)})}}]),f}(),ys=0,Ts="成功",Ss={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]},footer:{color:"#FFFFFF",backgroundColor:"rgb(0 0 0 / 0%)",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-0",iconId:"play",part:"left",defaultActive:1,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-1",iconId:"capturePicture",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-2",iconId:"sound",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-3",iconId:"pantile",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-4",iconId:"recordvideo",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-5",iconId:"talk",part:"left",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-6",iconId:"hd",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-7",iconId:"webExpend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-8",iconId:"expend",part:"right",defaultActive:0,isrender:0,themeId:"f7896c8942c9476fb439370dd974f1c0"}]}},Cs={retcode:ys,msg:Ts,data:Ss},bs={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},ra={data:bs},Ps={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},oa={data:Ps},ws={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},aa={data:ws},Es={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{btnKey:"c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:1},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},da={data:Es},Is={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:0},{iconId:"deviceName",part:"left",defaultActive:0,isrender:0},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:0},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"sound",part:"left",defaultActive:1,isrender:0},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:0}]}},la={data:Is},xs={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:0},{iconId:"rec",part:"right",defaultActive:0,isrender:0}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:0},{iconId:"talk",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:0},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"zoom",part:"left",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:0},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},sa={data:xs},_s={header:{color:"#FFFFFF",backgroundColor:"#000000",activeColor:"#1890FF",btnList:[{iconId:"deviceID",part:"left",defaultActive:0,isrender:1},{iconId:"deviceName",part:"left",defaultActive:0,isrender:1},{iconId:"cloudRec",part:"right",defaultActive:0,isrender:1},{iconId:"rec",part:"right",defaultActive:0,isrender:1}]},footer:{color:"#FFFFFF",backgroundColor:"#00000080",activeColor:"#1890FF",btnList:[{iconId:"play",part:"left",defaultActive:1,isrender:1},{iconId:"capturePicture",part:"left",defaultActive:0,isrender:1},{iconId:"sound",part:"left",defaultActive:1,isrender:1},{iconId:"pantile",part:"left",defaultActive:0,isrender:0},{iconId:"recordvideo",part:"left",defaultActive:0,isrender:1},{iconId:"zoom",part:"left",defaultActive:0,isrender:1},{iconId:"speed",part:"right",defaultActive:0,isrender:1},{iconId:"hd",part:"right",defaultActive:0,isrender:0},{iconId:"webExpend",part:"right",defaultActive:0,isrender:1},{iconId:"expend",part:"right",defaultActive:0,isrender:1}]}},ca={data:_s},ua=[{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcLive",themeIntro:"PC直播全量版",themeName:"PC直播全量版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:aa.data.header,footer:aa.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"security",themeIntro:"PC直播安防版",themeName:"PC直播安防版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:da.data.header,footer:da.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"voice",themeIntro:"PC直播语音版",themeName:"PC直播语音版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:sa.data.header,footer:sa.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"simple",themeIntro:"PC直播极简版",themeName:"PC直播极简版",themeType:"webLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"",header:la.data.header,footer:la.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"pcRec",themeIntro:"PC回放全量版",themeName:"PC回放全量版",themeType:"webRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:ca.data.header,footer:ca.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileLive",themeIntro:"Mobile直播全量版",themeName:"Mobile直播全量版",themeType:"mobileLive",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:ra.data.header,footer:ra.data.footer},{autoFocus:5,createTime:"2021-06-14T08:04:37.000Z",themeId:"mobileRec",themeIntro:"Mobile回放全量版",themeName:"Mobile回放全量版",themeType:"mobileRec",updateTime:"2021-06-14T08:04:37.000Z",label:"官方",labelPic:"https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",poster:"https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",header:oa.data.header,footer:oa.data.footer}],Rs=function(){function f(u){var n=this;fe(this,f),this.jSPlugin=u,this.enableZoom=!1,this.isMouseDown=!1,this.videoWidth=1920,this.videoHeight=1080,this.currentScale=1,this.currentPosition={x:0,y:0,xPercent:.1,yPercent:.1,xCurrentVideo:0,yCurrentVideo:0,left:0,top:0,right:1920,bottom:1080},this.DOM=document.getElementById(u.id),this.clientRect=document.getElementById(u.id).getBoundingClientRect();var i=document.createElement("div");i.id="".concat(u.id,"-zoom-container"),i.style=`position: absolute;
|
|
|
display:none;
|
|
|
left: 12px;
|
|
|
bottom: 80px;`;var r=`
|
|
|
<div
|
|
|
style="display: inline-flex;flex-direction: column;width: 38px;height: 160px;background:rgba(0,0,0,0.60);border-radius: 8px;align-items: center;">
|
|
|
<div id="`.concat(this.jSPlugin.id,`-scale-value" style="font-size: 12px;color:#FFFFFF;margin-top:10px;margin-bottom:4px;">2.0X</div>
|
|
|
<div style="width: 24px;" id="`).concat(this.jSPlugin.id,`-addScale">
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
<svg version="1.1" fill="#FFFFFF" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
|
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
|
|
|
<title>放大</title>
|
|
|
<g id="矩形">
|
|
|
<rect class="st0" width="20" height="20" fill="none"/>
|
|
|
</g>
|
|
|
<g id="形状结合">
|
|
|
<path class="st1" d="M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5
|
|
|
s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z"/>
|
|
|
</g>
|
|
|
<g id="路径-4">
|
|
|
<path class="st2" d="M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z"/>
|
|
|
</g>
|
|
|
<g id="路径-4备份">
|
|
|
<path class="st2" d="M10,13.2c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C10.6,12.9,10.3,13.2,10,13.2z"/>
|
|
|
</g>
|
|
|
</svg>
|
|
|
</div>
|
|
|
<div style="
|
|
|
position: relative;
|
|
|
width: 1px;
|
|
|
height: 64px;
|
|
|
border: 1px solid rgba(255,255,255,0.75);
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
justify-content: flex-end;">
|
|
|
<div class="scale-body-line-dot" id="`).concat(this.jSPlugin.id,`-scale-body-line-dot" style="width: 8px;
|
|
|
height: 8px;
|
|
|
background: #FFFFFF;
|
|
|
border-radius: 100%;
|
|
|
position: absolute;
|
|
|
border: 1.5px solid rgba(64,122,255,1);"></div>
|
|
|
<div id="`).concat(this.jSPlugin.id,`-line-dot" style="width: 1px;
|
|
|
height: 0%;
|
|
|
background: #1890FF;
|
|
|
bottom: 0;"></div>
|
|
|
</div>
|
|
|
<div style="width: 24px;margin-top: 6px;" id="`).concat(this.jSPlugin.id,`-subScale">
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
<svg fill="#FFFFFF" version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
|
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
|
|
|
<title>缩小</title>
|
|
|
<g id="矩形">
|
|
|
<rect class="st0" width="20" height="20" fill="none"/>
|
|
|
</g>
|
|
|
<g id="形状结合">
|
|
|
<path class="st1" d="M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5
|
|
|
s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z"/>
|
|
|
</g>
|
|
|
<g id="路径-4">
|
|
|
<path class="st2" d="M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z"/>
|
|
|
</g>
|
|
|
</svg>
|
|
|
</div>
|
|
|
</div>
|
|
|
`);i.innerHTML=r,document.getElementById("".concat(u.id,"-audioControls-left")).parentNode.appendChild(i),document.getElementById("".concat(u.id,"-addScale")).onclick=function(){n.addScale()},document.getElementById("".concat(u.id,"-subScale")).onclick=function(){n.subScale()}}return dt(f,[{key:"onMouseDown",value:function(n){this.currentPosition,this.currentScale;var i=this.enableZoom;if(!i)return!1;this.moveX=n.clientX,this.moveY=n.clientY,this.isMouseDown=!0}},{key:"onMouseUp",value:function(n){var i=this.currentPosition,r=this.enableZoom;if(!r)return!1;this.isMouseDown=!1,i.left=i.left-(n.clientX-this.moveX),i.top=i.top-(n.clientY-this.moveY),this.doScale()}},{key:"onMouseOut",value:function(n){var i=this.enableZoom;if(!i)return!1;this.isMouseDown&&(console.log("鼠标按上",n),this.isMouseDown=!1),this.isMouseDown=!1}},{key:"renderDot",value:function(){var n=this.currentScale;document.getElementById("".concat(this.jSPlugin.id,"-scale-value")).innerHTML="".concat(n,".0X"),document.getElementById("".concat(this.jSPlugin.id,"-line-dot")).style.height="".concat((n-1)/7*100,"%"),document.getElementById("".concat(this.jSPlugin.id,"-scale-body-line-dot")).style.bottom="calc(".concat((n-1)/7*100,"% - 6px)")}},{key:"startZoom",value:function(){var n=this,i=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=i.width,this.videoHeight=i.height,this.currentPosition.right=i.width,this.currentPosition.bottom=i.height,this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block",this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),this.renderDot(),this.enableZoom=!0,document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0"))?(document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mousedown",function(r){return n.onMouseDown(r)}),document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mouseup",function(r){return n.onMouseUp(r)}),document.getElementById("".concat(this.jSPlugin.id,"canvas_draw0")).addEventListener("mouseout",function(r){return n.onMouseOut(r)})):document.getElementById("".concat(this.jSPlugin.id,"-player"))&&(document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mousedown",function(r){return n.onMouseDown(r)}),document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mouseup",function(r){return n.onMouseUp(r)}),document.getElementById("".concat(this.jSPlugin.id,"-player")).addEventListener("mouseout",function(r){return n.onMouseOut(r)}))}},{key:"stopZoom",value:function(){var n=this;this.currentScale=1,this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none",this.renderDot(),this.enableZoom=!1,document.getElementById(this.jSPlugin.id).removeEventListener("mousedown",function(i){return n.onMouseDown(i)}),document.getElementById(this.jSPlugin.id).removeEventListener("mouseup",function(i){return n.onMouseUp(i)}),document.getElementById(this.jSPlugin.id).removeEventListener("mouseout",function(i){return n.onMouseOut(i)})}},{key:"doScale",value:function(){console.log("执行放大");var n=this.currentPosition,i=this.currentScale;n.left=n.left+n.xPercent*(n.right-n.left)-1/2*(this.videoWidth/i),n.left<0?n.left=0:n.left>this.videoWidth-this.videoWidth/i&&(n.left=this.videoWidth-this.videoWidth/i),n.right=n.left+this.videoWidth/i,n.top=n.top+n.yPercent*(n.bottom-n.top)-1/2*(this.videoHeight/i),n.top<0?n.top=0:n.top>this.videoHeight-this.videoHeight/i&&(n.top=this.videoHeight-this.videoHeight/i),n.bottom=n.top+this.videoHeight/i,n.left=parseInt(n.left,10),n.right=parseInt(n.right,10),n.top=parseInt(n.top,10),n.bottom=parseInt(n.bottom,10),console.log("计算后,",this.jSPlugin.jSPlugin,n.left,n.right,n.top,n.bottom,n.xPercent,n.yPercent),this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(n.left,n.right,n.top,n.bottom),this.renderDot()}},{key:"calCurrentPosition",value:function(n){var i=this.currentPosition,r=this.clientRect;i.x=n.clientX,i.y=n.clientY,i.xPercent=(n.clientX-r.x)/r.width,i.yPercent=(n.clientY-r.y)/r.height,this.doScale()}},{key:"addScale",value:function(){var n=this.currentScale,i=this.currentPosition;if(n>=8)return console.log("达到最大倍率了"),this.jSPlugin.Message&&this.jSPlugin.Message.default("已经放大到最大倍数8.0X"),!1;this.currentScale++,i.xPercent=.5,i.yPercent=.5,this.doScale()}},{key:"subScale",value:function(){var n=this.currentScale,i=this.currentPosition;if(n<=1)return console.log("达到最小倍率了"),!1;this.currentScale--,i.xPercent=.5,i.yPercent=.5,this.doScale()}}]),f}();function ma(f,u){return Math.abs(u.clientX-f.clientX)*Math.abs(u.clientX-f.clientX)+Math.abs(u.clientY-f.clientY)*Math.abs(u.clientY-f.clientY)}var ks=function(){function f(u){var n=this;fe(this,f),this.jSPlugin=u,this.enableZoom=!1,this.isDubboTouch=!1,this.videoWidth=0,this.videoHeight=0,this.currentScale=1,this.currentPosition={x:0,y:0,xPercent:.1,yPercent:.1,xCurrentVideo:0,yCurrentVideo:0,left:0,top:0,right:1920,bottom:1080},this.DOM=document.getElementById(u.id),this.clientRect=document.getElementById(u.id).getBoundingClientRect(),this.point1={clientX:0,clientY:0},this.point2={clientX:0,clientY:0},this.touchLineLength=0,this.inited=!1;var i=document.createElement("div");i.id="".concat(u.id,"-zoom-container"),i.style=`display:none;
|
|
|
position: absolute;
|
|
|
left: 10px;
|
|
|
top: -30px;
|
|
|
border: 1px solid rgba(0,0,0,0.6);
|
|
|
color: #FFFFFF;
|
|
|
background: rgba(0,0,0,0.6);
|
|
|
border-radius: 10px;
|
|
|
width: 36px;
|
|
|
font-size: 12px;
|
|
|
text-align: center;
|
|
|
height: 22px;
|
|
|
line-height: 22px;`;var r="1X";i.innerHTML=r,document.getElementById("".concat(u.id,"-audioControls-left")).parentNode.appendChild(i),document.getElementById(this.jSPlugin.id).addEventListener("touchstart",function(a){return n.onTouchstart(a)}),document.getElementById(this.jSPlugin.id).addEventListener("touchmove",function(a){return n.onTouchmove(a)})}return dt(f,[{key:"onTouchstart",value:function(n){var i=this.jSPlugin.beforeMobileZoomVerify();if(!i)return!1;if(!this.inited){var r=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=r.width,this.videoHeight=r.height,this.currentPosition.right=r.width,this.currentPosition.bottom=r.height,this.inited=!0}var a=this.currentPosition;this.currentScale,console.log("双指按下",a);var l=n.touches,s=l[0],b=l[1];s&&(this.point1.clientX=s.clientX,this.point1.clientY=s.clientY),b&&(this.point2.clientX=b.clientX,this.point2.clientY=b.clientY,this.touchLineLength=ma(this.point1,this.point2),this.isDubboTouch=!0,this.moveX=s.clientX,this.moveY=s.clientY),console.log("双指按下2",a)}},{key:"onTouchmove",value:function(n){var i=this.isDubboTouch,r=this.currentPosition,a=this.clientRect,l=this.jSPlugin.beforeMobileZoomVerify();if(!l)return!1;if(n.touches.length===1){var b=n.touches[0];return r.xPercent=r.xPercent+(this.point1.clientX-b.clientX)/a.width/this.currentScale,r.yPercent=r.yPercent+(this.point1.clientY-b.clientY)/a.height/this.currentScale,this.doScale(),this.point1.clientX=b.clientX,this.point1.clientY=b.clientY,!1}if(!i)return!1;var s=n.touches,b=s[0],T=s[1];if(b&&(this.point1.clientX=b.clientX,this.point1.clientY=b.clientY),T){this.point2.clientX=T.clientX,this.point2.clientY=T.clientY;var C=ma(this.point1,this.point2);C!==this.touchLineLength&&(C>this.touchLineLength?this.currentScale<8?(++this.currentScale,r.xPercent=(this.point1.clientX+this.point2.clientX)/2/a.width,r.yPercent=(this.point1.clientY+this.point2.clientY)/2/a.height,this.doScale()):console.log("已经是最大8倍率了"):this.currentScale>1?(--this.currentScale,r.xPercent=(this.point1.clientX+this.point2.clientX)/2/a.width,r.yPercent=(this.point1.clientY+this.point2.clientY)/2/a.height,this.doScale()):console.log("已经是最小1倍率了"),this.isDubboTouch=!1)}}},{key:"startZoom",value:function(){var n=this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);this.videoWidth=n.width,this.videoHeight=n.height,this.currentPosition.right=n.width,this.currentPosition.bottom=n.height,this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="block",this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),this.renderDot()}},{key:"stopZoom",value:function(){this.currentScale=1,this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0,this.videoWidth,0,this.videoHeight),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none",this.renderDot()}},{key:"resetZoom",value:function(){this.currentScale=1,document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display="none"}},{key:"doScale",value:function(){var n=this.currentPosition,i=this.currentScale;n.left=n.left+n.xPercent*(n.right-n.left)-1/2*(this.videoWidth/i),n.left<0?n.left=0:n.left>this.videoWidth-this.videoWidth/i&&(n.left=this.videoWidth-this.videoWidth/i),n.right=n.left+this.videoWidth/i,n.top=n.top+n.yPercent*(n.bottom-n.top)-1/2*(this.videoHeight/i),n.top<0?n.top=0:n.top>this.videoHeight-this.videoHeight/i&&(n.top=this.videoHeight-this.videoHeight/i),n.bottom=n.top+this.videoHeight/i,n.left=parseInt(n.left,10),n.right=parseInt(n.right,10),n.top=parseInt(n.top,10),n.bottom=parseInt(n.bottom,10),console.log("视频宽高",this.videoWidth,this.videoHeight),console.log("计算后,",n.left,n.right,n.top,n.bottom,n.xPercent,n.yPercent),n.left<n.right&&n.top<n.bottom&&n.bottom<=this.videoHeight&&n.right<=this.videoWidth&&this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(n.left,n.right,n.top,n.bottom),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).innerHTML="".concat(i,".0X"),document.getElementById("".concat(this.jSPlugin.id,"-zoom-container")).style.display=i===1?"none":"inline-block"}},{key:"calCurrentPosition",value:function(n){var i=this.currentPosition,r=this.clientRect;i.x=n.clientX,i.y=n.clientY,i.xPercent=(n.clientX-r.x)/r.width,i.yPercent=(n.clientY-r.y)/r.height,this.doScale()}}]),f}(),pa=function(u){var n="";return Object.keys(u).map(function(i,r){n+="".concat(i,":").concat(u[i]).concat(r<Object.keys(u).length-1?";":"")}),n},Me=500,As=function(){function f(u){var n=this;if(fe(this,f),this.jSPlugin=u,this.isNeedRenderHeader=!1,this.isNeedRenderFooter=!1,this.autoFocus=0,this.autoFocusTimer=null,this.recordTimer=null,this.nextRate=1,this.showHD=!1,this.themeInited=!1,this.decoderState={state:{isEditing:!1,play:!1,sound:!1,recordvideo:!1,recordCount:"00:00",talk:!1,zoom:!1,pantile:!1,hd:!1,speed:!1,expend:!1,webExpend:!1,cloudRec:Ke(u.url).type==="cloud.rec",rec:Ke(u.url).type==="rec",type:Ke(u.url).type}},this.pluginStatus=new Bi(this,this.jSPlugin.params.id),console.log(" matchEzopenUrl(jSPlugin.url)",Ke(u.url),this.decoderState.state),this.inited=!1,this.isMobile=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i),typeof u.isMobile!="undefined"&&(this.isMobile=u.isMobile),this.themeData=Cs.data,this.jSPlugin.themeId)switch(this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"security":case"voice":case"simple":var i=Ut.find(ua,function(r){return r.themeId===n.jSPlugin.themeId});i&&(this.themeData=i),this.initThemeData(),this.renderThemeData();break;case"themeData":this.themeData=this.jSPlugin.params.themeData,this.initThemeData(),this.renderThemeData();break;default:this.fetchThemeData(this.jSPlugin.themeId);break}this.jSPlugin.Talk||(this.jSPlugin.Talk=new ia(this.jSPlugin)),Mt("".concat(this.jSPlugin.staticPath,"/speed/speed.css")),Mt("".concat(this.jSPlugin.staticPath,"/css/theme.css"))}return dt(f,[{key:"fetchThemeData",value:function(n){var i=this,r="".concat(this.jSPlugin.env.domain,"/console/jssdk/ezopen/template/getDetail?accessToken=").concat(this.jSPlugin.accessToken,"&id=").concat(n);(window.location.hostname==="test11open.ys7.com"||window.location.hostname==="127.0.0.1"||window.location.hostname==="jianboyu.top")&&(r=r.replace("test12open.ys7.com/console/jssdk","test11open.ys7.com/console/jssdk")),fetch(r,{method:"GET"}).then(function(a){return a.json()}).then(function(a){console.log("get theme data",a),a.meta.code===0&&a.data&&(i.themeData=a.data,a.data.header&&(i.themeData.header=a.data.header,i.themeData.header.btnList=i.themeData.header.btnList.sort(function(l,s){return l.btnKey.split("-")[3]-s.btnKey.split("-")[3]})),a.data.footer&&(i.themeData.footer=a.data.footer,i.themeData.footer.btnList=i.themeData.footer.btnList.sort(function(l,s){return l.btnKey.split("-")[3]-s.btnKey.split("-")[3]})),i.initThemeData(),i.renderThemeData())}).catch(function(a){i.renderThemeData()})}},{key:"changeTheme",value:function(n){var i=this;if(typeof n=="string")switch(this.jSPlugin.themeId=n,this.jSPlugin.themeId){case"pcLive":case"pcRec":case"mobileLive":case"mobileRec":case"security":case"voice":case"simple":var r=Ut.find(ua,function(a){return a.themeId===i.jSPlugin.themeId});r&&(this.themeData=r),this.initThemeData(),this.renderThemeData();break;default:this.fetchThemeData(n);break}else ue(n)==="object"&&(this.themeData=n,this.initThemeData(),this.renderThemeData(),this.decoderState.state.isEditing&&this.editStart());this.jSPlugin&&this.jSPlugin.handleThemeChange&&this.jSPlugin.handleThemeChange(n)}},{key:"renderThemeData",value:function(){var n=this,i=this.themeData,r=i.header,a=i.footer;if(this.isNeedRenderHeader&&r&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=r.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=r.color.replace("-diy",""),r.btnList.map(function(T,C){T.isrender&&n.setDecoderState(je({},T.iconId,n.decoderState.state[T.iconId]))})),this.isNeedRenderFooter&&a)document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=a.backgroundColor.replace("-diy",""),document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=a.color.replace("-diy",""),a.btnList.map(function(T,C){if(T.isrender&&n.setDecoderState(je({},T.iconId,n.decoderState.state[T.iconId])),T.iconId==="play"&&T.defaultActive&&!n.themeInited)var y=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(y),n.jSPlugin.play(),n.themeInited=!0)},50)}),this.jSPlugin.url.indexOf("hd.live")!==-1&&this.setDecoderState({hd:!0}),this.themeData.autoFocus>0&&(this.autoFocus=parseInt(this.themeData.autoFocus),this.startAutoFocus(),document.getElementById("".concat(this.jSPlugin.id,"-wrap")).addEventListener("click",function(){n.stopAutoFocus()})),this.setDecoderState({cloudRec:Ke(this.jSPlugin.url).type==="cloud.rec",rec:Ke(this.jSPlugin.url).type==="rec",type:Ke(this.jSPlugin.url).type});else if(!this.themeInited)var l=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(l),n.jSPlugin.play(),n.themeInited=!0)},50);var s=Ut.findIndex(this.themeData.footer.btnList,function(T){return T.iconId==="zoom"&&T.isrender>0})>=0;s&&(this.isMobile?(this.jSPlugin.beforeMobileZoomVerify=function(){var T=n.decoderState.state.play;return console.log("手机端电子放大前校验回调play------------",T),!!T},this.jSPlugin.Zoom=new ks(this.jSPlugin)):this.jSPlugin.Zoom=new Rs(this.jSPlugin));var b=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(b),n.jSPlugin.reSize(n.jSPlugin.params.width,n.jSPlugin.params.height))},50)}},{key:"setDecoderState",value:function(n){var i=this,r=this.themeData,a=r.header,l=r.footer;Object.keys(n).map(function(s,b){var T="#FFFFFF",C="#FFFFFF",y=a.btnList.findIndex(function(h){return h.iconId===s});switch(y===-1?(T=l.color.replace("-diy",""),C=l.activeColor.replace("-diy","")):(T=a.color.replace("-diy",""),C=l.activeColor.replace("-diy","")),s){case"play":n[s]?document.getElementById("".concat(i.jSPlugin.id,"-play"))&&(document.getElementById("".concat(i.jSPlugin.id,"-play-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-play-content")).children[0].children[1].style="display:none",document.getElementById("".concat(i.jSPlugin.id,"-play")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-play-content")).childNodes[0].children[0].style.fill=n[s]?C:T):document.getElementById("".concat(i.jSPlugin.id,"-play"))&&(document.getElementById("".concat(i.jSPlugin.id,"-play-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-play-content")).children[0].children[0].style="display:none",document.getElementById("".concat(i.jSPlugin.id,"-play")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-play-content")).childNodes[0].children[1].style.fill=n[s]?C:T);break;case"sound":document.getElementById("".concat(i.jSPlugin.id,"-sound"))&&(n[s]?(document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:none",document.getElementById("".concat(i.jSPlugin.id,"-sound")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).childNodes[0].children[1].style.fill=n[s]?C:T):(document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).children[0].children[1].style="display:none",document.getElementById("".concat(i.jSPlugin.id,"-sound")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-sound-content")).childNodes[0].children[0].style.fill=n[s]?C:T));break;case"recordvideo":document.getElementById("".concat(i.jSPlugin.id,"-recordvideo"))&&(document.getElementById("".concat(i.jSPlugin.id,"-recordvideo")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-recordvideo-content")).childNodes[0].style.fill=n[s]?C:T,n[s]?i.countTime("add",0):i.countTime("destroy",0));break;case"talk":document.getElementById("".concat(i.jSPlugin.id,"-talk"))&&(document.getElementById("".concat(i.jSPlugin.id,"-talk")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-talk-content")).childNodes[1].style.fill=n[s]?C:T);break;case"zoom":document.getElementById("".concat(i.jSPlugin.id,"-zoom"))&&(document.getElementById("".concat(i.jSPlugin.id,"-zoom")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-zoom-content")).childNodes[1].style.fill=n[s]?C:T);break;case"pantile":document.getElementById("".concat(i.jSPlugin.id,"-pantile"))&&(document.getElementById("".concat(i.jSPlugin.id,"-pantile")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-pantile-content")).childNodes[0].style.fill=n[s]?C:T);break;case"webExpend":n[s]?(document.getElementById("".concat(i.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(i.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-expend")).className="disabled")):(document.getElementById("".concat(i.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(i.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-expend")).className="")),document.getElementById("".concat(i.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-webExpend")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[0].style.fill=n[s]?C:T,document.getElementById("".concat(i.jSPlugin.id,"-webExpend-content")).childNodes[0].childNodes[1].style.fill=n[s]?C:T);break;case"capturePicture":document.getElementById("".concat(i.jSPlugin.id,"-capturePicture"))&&(document.getElementById("".concat(i.jSPlugin.id,"-capturePicture")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-capturePicture-content")).childNodes[0].style.fill=n[s]?C:T);break;case"expend":n[s]?(document.getElementById("".concat(i.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:none"),document.getElementById("".concat(i.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-webExpend")).className="disabled")):(document.getElementById("".concat(i.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).children[0].children[0].style="display:inline-block",document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).children[0].children[1].style="display:none"),document.getElementById("".concat(i.jSPlugin.id,"-webExpend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-webExpend")).className="")),document.getElementById("".concat(i.jSPlugin.id,"-expend"))&&(document.getElementById("".concat(i.jSPlugin.id,"-expend")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[0].style.fill=n[s]?C:T,document.getElementById("".concat(i.jSPlugin.id,"-expend-content")).childNodes[0].childNodes[1].style.fill=n[s]?C:T);break;case"hd":n[s]?document.getElementById("".concat(i.jSPlugin.id,"-hd"))&&(document.getElementById("".concat(i.jSPlugin.id,"-hd-content")).children[1].children[0].style="display:block",document.getElementById("".concat(i.jSPlugin.id,"-hd-content")).children[1].children[1].style="display:none"):document.getElementById("".concat(i.jSPlugin.id,"-hd"))&&(document.getElementById("".concat(i.jSPlugin.id,"-hd-content")).children[1].children[1].style="display:block",document.getElementById("".concat(i.jSPlugin.id,"-hd-content")).children[1].children[0].style="display:none");break;case"speed":document.getElementById("".concat(i.jSPlugin.id,"-speed"))&&(document.getElementById("".concat(i.jSPlugin.id,"-speed-content")).children[1].children[0].style.color=n[s]?C:T,document.getElementById("".concat(i.jSPlugin.id,"-speed-content")).children[1].children[0].style.borderColor=n[s]?C:T),document.getElementById("".concat(i.jSPlugin.id,"-select-mask"))&&(i.isMobile&&n[s]?document.getElementById("".concat(i.jSPlugin.id,"-select-mask")).style.display="block":document.getElementById("".concat(i.jSPlugin.id,"-select-mask")).style.display="none");break;case"cloudRec":document.getElementById("".concat(i.jSPlugin.id,"-cloudRec"))&&(console.log("document.getElementById(`${this.jSPlugin.id}-cloudRec-content`)",document.getElementById("".concat(i.jSPlugin.id,"-cloudRec"))),document.getElementById("".concat(i.jSPlugin.id,"-cloudRec")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=n[s]?C:T),document.getElementById("".concat(i.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(i.jSPlugin.id,"-rec")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=n[s]?T:C);break;case"rec":document.getElementById("".concat(i.jSPlugin.id,"-cloudRec"))&&(document.getElementById("".concat(i.jSPlugin.id,"-cloudRec")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-cloudRec-content")).children[0].children[0].style.fill=n[s]?T:C),document.getElementById("".concat(i.jSPlugin.id,"-rec"))&&(document.getElementById("".concat(i.jSPlugin.id,"-rec")).className=n[s]?"active":"",document.getElementById("".concat(i.jSPlugin.id,"-rec-content")).children[0].children[0].style.fill=n[s]?C:T);break}i.decoderState.state=Object.assign(i.decoderState.state,n)})}},{key:"startAutoFocus",value:function(){var n=this,i=this.autoFocus;this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.autoFocusTimer=setTimeout(function(){document.getElementById("".concat(n.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(n.jSPlugin.id,"-audioControls")).style.opacity=0,document.getElementById("".concat(n.jSPlugin.id,"-audioControls")).style.pointerEvents="none")},i*1e3)}},{key:"stopAutoFocus",value:function(){document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.opacity=1,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.pointerEvents="all"),this.autoFocusTimer&&clearTimeout(this.autoFocusTimer),this.startAutoFocus()}},{key:"toString",value:function(){return"".concat(this.coreX,"-").concat(this.coreY)}},{key:"renderFooter",value:function(n,i){var r=this,a=this.matchBtn(n);if(this.isMobile&&a.id==="zoom")return!1;var l=document.createElement("div");l.className="theme-icon-item",l.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(a.id,'" style="position:relative;">')+'<div id="'.concat(this.jSPlugin.id,"-").concat(a.id,'-content" title="').concat(a.title,'" style="height:').concat(this.jSPlugin.width>Me?48:32,'px;display: flex;align-items: center;position:relative;">')).concat(a.domString,"</div>")+"</span>",l.onclick=function(C){if(r.decoderState.state.isEditing)return!1;a.onclick(C)},a.onmouseenter&&(l.onmouseenter=function(C){if(r.decoderState.state.isEditing)return!1;a.onmouseenter(C)}),a.onmouseleave&&(l.onmouseleave=function(C){if(r.decoderState.state.isEditing)return!1;a.onmouseleave(C)});var s=document.createElement("span");s.className="icon-move left",s.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(a.id,'-left" title="左移" style="position: absolute;top: calc(50% - 10px);left: -4px;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>'),s.onclick=function(){r.editIcon(a.id,"left","footer")},l.appendChild(s);var b=document.createElement("span");b.className="icon-move right",b.innerHTML='<span id="'.concat(this.jSPlugin.id,"-").concat(a.id,'-right" class="ezuikit-theme-icon" title="右移" style="position: absolute;top: calc(50% - 10px);left: calc(100% - 8px);"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080"><path d="M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z"></path></svg></span>'),b.onclick=function(){r.editIcon(a.id,"right","footer")},l.appendChild(b);var T=document.createElement("span");T.className="icon-move close",T.innerHTML='<span id="'.concat(a.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: -10px;right: -10px;">')+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15"><circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" /><rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" /></svg></span>',T.onclick=function(){r.editIcon(a.id,"delete","footer")},l.appendChild(T),i==="left"?document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[0].appendChild(l):document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).childNodes[1].appendChild(l)}},{key:"editIcon",value:function(n,i,r){console.log("编辑组件",n,i,r);var a=this.themeData;console.log("themeData",this.themeData);var l=this.themeData[r].btnList,s=Ut.findIndex(l,function(D){return D.iconId===n}),b=l[s];switch(i){case"delete":if(n==="rec"){if(Ut.findIndex(l,function(D){return D.iconId==="cloudRec"&&D.isrender==1})===-1)return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1}else if(n==="cloudRec"&&Ut.findIndex(l,function(D){return D.iconId==="rec"&&D.isrender==1})===-1)return this.jSPlugin.Message&&this.jSPlugin.Message.default("必须选中一种存储介质"),!1;l[s].isrender=0;break;case"right":for(var T=-1,C=s+1;C<l.length;C++)if(l[C].part===l[s].part&&l[C].isrender==1){T=C;break}T!==-1&&(l[s]=l[T],l[T]=b);break;case"left":for(var y=-1,h=s-1;h>=0;h--)if(l[h].part===l[s].part&&l[h].isrender==1){y=h;break}y!==-1&&(l[s]=l[y],l[y]=b);break}console.log("new btnList",l),a[r].btnList=l,this.changeTheme(a)}},{key:"renderHeader",value:function(n,i){var r=this,a=this.matchBtn(n),l=document.createElement("div");l.className="theme-icon-item",l.style="max-width:50%;",l.innerHTML="".concat('<span id="'.concat(this.jSPlugin.id,"-").concat(a.id,'" style="position:relative;";>')+'<span id="'.concat(this.jSPlugin.id,"-").concat(a.id,'-content" title="').concat(a.title,'" style="display:inline-block;height:').concat(this.width>Me?48:32,'px;">')).concat(a.domString,"</span>")+'<span id="'.concat(this.jSPlugin.id,"-").concat(a.id,'-remove" title="移除" style="position: absolute;top: -6px;left: 38px;display: none;">')+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15"><circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" /><rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" /></svg></span></span>',l.onclick=function(b){if(r.decoderState.state.isEditing)return!1;a.onclick(b)};var s=document.createElement("span");s.className="icon-move close",s.innerHTML='<span id="'.concat(a.id,'-remove" class="ezuikit-theme-icon" title="移除" style="position: absolute;top: -6px;right: -6px;">')+'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15"><circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" /><rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" /><line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" /></svg></span>',s.onclick=function(){r.editIcon(a.id,"delete","header")},l.appendChild(s),i==="left"?document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[0].appendChild(l):document.getElementById("".concat(this.jSPlugin.id,"-headControl")).childNodes[1].appendChild(l)}},{key:"countTime",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this;if(!document.getElementById(this.jSPlugin.id+"time-area")){var a=document.createElement("div");a.id=this.jSPlugin.id+"time-area",a.className="time-area",a.innerHTML='<span class="dot"></span><span class="value">00:00</span>',document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).appendChild(a)}if(this.countTimer&&clearInterval(this.countTimer),n==="add"){var l=i;document.getElementById(r.jSPlugin.id+"time-area").style.display="flex",this.countTimer=setInterval(function(){++l,document.getElementById(r.jSPlugin.id+"time-area").children[1].innerHTML=s(l)},1e3)}else n==="destroy"&&(this.countTimer&&clearInterval(this.countTimer),this.countTimer=void 0,document.getElementById(r.jSPlugin.id+"time-area")&&(document.getElementById(r.jSPlugin.id+"time-area").children[1].innerHTML="00:00",document.getElementById(r.jSPlugin.id+"time-area").style.display="none"));function s(b){var T=parseInt(b),C=0,y=0,h="00",D="00",_="00";return T>59&&(C=parseInt(T/60),T=parseInt(T%60),C>59&&(y=parseInt(C/60),C=parseInt(C%60))),h=parseInt(T)>9?parseInt(T):"0"+parseInt(T),D=parseInt(C)>9?parseInt(C):"0"+parseInt(C),_=parseInt(y)>9?parseInt(y):"0"+parseInt(y),y>0?_+":"+D+":"+h:C>0?D+":"+h:"00:"+h}}},{key:"setDisabled",value:function(n){var i=this.decoderState.state,r=i.sound,a=i.hd;document.getElementById(r?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon"))!=null&&document.getElementById(r?"".concat(this.jSPlugin.id,"-sound-icon"):"".concat(this.jSPlugin.id,"-nosound-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-recordvideo-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-capturePicture-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-talk-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-talk-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-zoom-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-pantile-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById(a?"".concat(this.jSPlugin.id,"-hdSelect-icon"):"".concat(this.jSPlugin.id,"-sdSelect-icon"))!=null&&document.getElementById(a?"".concat(this.jSPlugin.id,"-hdSelect-icon"):"".concat(this.jSPlugin.id,"-sdSelect-icon")).setAttribute("style",n?"cursor: not-allowed;fill: gray":"cursor: default"),document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))!=null&&document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).setAttribute("style",document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).getAttribute("style")+";"+(n?"cursor: not-allowed;color: gray;border-color: gray;":"cursor: default;color: #ffffff;border-color: #ffffff;"))}},{key:"matchBtn",value:function(n){var i=this,r=this.themeData,a=r.header,l=r.footer,s={title:"",id:"",domString:"",color:"#FFFFFF",activeColor:"#FFFFFF",onclick:function(){},onmoveleft:function(){},onmoveright:function(){},onremove:function(){}},b=a.btnList.findIndex(function(T){return T.iconId===n});switch(b===-1?(s.color=l.color,s.backgroundColor=l.backgroundColor,s.activeColor=l.activeColor):(s.color=a.color,s.backgroundColor=a.backgroundColor,s.activeColor=a.activeColor),n){case"play":return s.title="播放/结束播放",s.id=n,s.domString='<div style="height: 100%">'+'<svg id="'.concat(this.jSPlugin.id+"-play-icon",'" class="theme-icon-item-icon" style="display:none" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" fill="').concat(s.color,`" viewBox="-6 -6 32 32">
|
|
|
<path id="Stroke-1" class="st1" d="M10.5,1.7c-4.9,0-8.8,4-8.8,8.8s4,8.8,8.8,8.8s8.8-4,8.8-8.8S15.4,1.7,10.5,1.7z M10.5,2.7
|
|
|
c4.3,0,7.8,3.5,7.8,7.8s-3.5,7.8-7.8,7.8s-7.8-3.5-7.8-7.8S6.2,2.7,10.5,2.7z"/>
|
|
|
<path class="st2" d="M8.7,8C9,8,9.3,8.3,9.3,8.6v3.8C9.3,12.7,9,13,8.7,13C8.3,13,8,12.7,8,12.4V8.6C8,8.3,8.3,8,8.7,8z"/>
|
|
|
<path id="Rectangle-Copy-10" class="st2" d="M12.8,8c0.3,0,0.6,0.3,0.6,0.6v3.8c0,0.3-0.3,0.6-0.6,0.6c-0.3,0-0.6-0.3-0.6-0.6V8.6
|
|
|
C12.2,8.3,12.5,8,12.8,8z"/>
|
|
|
</svg>`)+'<svg id="'.concat(this.jSPlugin.id+"-stop-icon",'" class="theme-icon-item-icon" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M13,9.8L10.1,8C9.9,7.9,9.7,7.9,9.5,7.9c-0.6,0-1,0.4-1,1v3.7c0,0.2,0.1,0.4,0.2,0.5c0.3,0.5,0.9,0.6,1.4,0.3 l2.9-1.8c0.1-0.1,0.2-0.2,0.3-0.3C13.6,10.7,13.4,10.1,13,9.8z" /><path d="M10.5,1.9c-4.9,0-8.8,4-8.8,8.8c0,4.9,4,8.8,8.8,8.8s8.8-4,8.8-8.8C19.4,5.8,15.4,1.9,10.5,1.9z M10.5,18.5 c-4.3,0-7.8-3.5-7.8-7.8s3.5-7.8,7.8-7.8c4.3,0,7.8,3.5,7.8,7.8S14.9,18.5,10.5,18.5z" /></svg></div>',s.onclick=function(){var T=i.decoderState.state,C=T.play,y=T.isEditing,h=T.rec,D=T.cloudRec,_=T.recordvideo;if(y)return!1;C?(h||D?i.jSPlugin.pause():i.jSPlugin.stop(),_&&i.setDecoderState({recordvideo:!1}),i.jSPlugin.Zoom.stopZoom()):(h||D?i.jSPlugin.resume():i.jSPlugin.play(),i.resetMobileZoomStatus()),i.setDecoderState({zoom:!1,play:!C}),i.setDisabled(C)},s;case"sound":return s.title="声音",s.id=n,s.domString='<span style="height: 100%">'+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-nosound-icon" style="display:none" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,`" viewBox="-6 -6 32 32">
|
|
|
<path d="M8.5,4.2c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8C5,13.2,5,12.9,5.1,12.7 c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3L9.2,5L5.9,7.8 C5.6,7.9,5.3,7.9,5.1,7.7C5,7.5,5,7.3,5.1,7.1L5.2,7L8.5,4.2z"/>
|
|
|
<path d="M5.5,6.9C5.8,6.9,6,7.1,6,7.4c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2C3.4,7.9,3.3,8,3.2,8.2l0,0.1v4 c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,12.5,6,12.7,6,13c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4 c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>
|
|
|
<path d="M17.4,7.9c0.2-0.2,0.5-0.2,0.7,0c0.2,0.2,0.2,0.4,0.1,0.6l-0.1,0.1l-3.8,3.8c-0.2,0.2-0.5,0.2-0.7,0 c-0.2-0.2-0.2-0.4-0.1-0.6l0.1-0.1L17.4,7.9z"/>
|
|
|
<path d="M13.7,7.9c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.8,3.8c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1-0.1 l-3.7-3.8C13.5,8.4,13.5,8.1,13.7,7.9z"/>
|
|
|
</svg>`)+'<svg class="theme-icon-item-icon" id="'.concat(this.jSPlugin.id,'-sound-icon" style="display:inline-block" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" fill="').concat(s.color,`" viewBox="-6 -6 32 32">
|
|
|
<path d="M13.2,7.1c0.1-0.2,0.5-0.3,0.7-0.2c1.1,0.7,1.9,2.2,1.9,3.7c0,1.6-0.7,3-1.9,3.7
|
|
|
c-0.2,0.1-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7c0.8-0.5,1.4-1.6,1.4-2.9c0-1.3-0.6-2.4-1.4-2.9C13.1,7.6,13,7.3,13.2,7.1z"/>
|
|
|
<path d="M15.7,4.5c0.2-0.2,0.5-0.2,0.7-0.1C18,5.8,19,8.2,19,10.7c0,2.5-1,4.8-2.7,6.3
|
|
|
c-0.2,0.2-0.5,0.2-0.7-0.1c-0.2-0.2-0.2-0.5,0.1-0.7c1.4-1.2,2.3-3.3,2.3-5.5c0-2.2-0.9-4.3-2.3-5.5C15.5,5,15.5,4.7,15.7,4.5z"/>
|
|
|
<path id="Stroke-5" class="st1" d="M8.5,4.7c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8
|
|
|
C5,13.7,5,13.4,5.1,13.2c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3l-0.1,0
|
|
|
L5.9,8.3C5.6,8.4,5.3,8.4,5.1,8.2C5,8,5,7.7,5.1,7.6l0.1-0.1L8.5,4.7z"/>
|
|
|
<path d="M5.5,7.4C5.8,7.4,6,7.6,6,7.9c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.2,0-0.3,0.1-0.3,0.3l0,0.1v4
|
|
|
c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,13,6,13.2,6,13.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4
|
|
|
c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z"/>
|
|
|
</svg>`)+"</span>",s.onclick=function(){var T=i.decoderState.state,C=T.play,y=T.sound,h=T.talk;C&&(y?(i.jSPlugin.closeSound(),i.setDecoderState({sound:!1})):h||(i.jSPlugin.openSound(),i.setDecoderState({sound:!0})))},s;case"recordvideo":return s.title="录屏",s.id=n,s.domString='<svg id="'.concat(this.jSPlugin.id,'-recordvideo-icon" class="theme-icon-item-icon" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M11.6,5.3H4.7c-1.4,0-2.5,1.1-2.5,2.5v5.9c0,1.4,1.1,2.5,2.5,2.5h6.9c1.4,0,2.5-1.1,2.5-2.5V7.7 C14.1,6.4,13,5.3,11.6,5.3z M4.7,6.3h6.9c0.8,0,1.5,0.7,1.5,1.5v5.9c0,0.8-0.7,1.5-1.5,1.5H4.7c-0.8,0-1.5-0.7-1.5-1.5V7.7 C3.3,6.9,3.9,6.3,4.7,6.3z" /><path d="M16.6,6.7c0.9-0.8,2.3-0.1,2.4,1l0,0.1v5.7c0,1.2-1.3,1.9-2.3,1.2l-0.1-0.1L13.3,12 c-0.2-0.2-0.2-0.5-0.1-0.7c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.7c0.3,0.2,0.7,0.1,0.8-0.3l0-0.1V7.8c0-0.4-0.4-0.6-0.7-0.4 l-0.1,0l-3.3,2.7c-0.2,0.2-0.5,0.1-0.7-0.1c-0.2-0.2-0.1-0.5,0-0.6l0.1-0.1L16.6,6.7z" /></svg>',s.onclick=function(){var T=i.decoderState.state,C=T.play,y=T.recordvideo;C&&(y?(i.jSPlugin.stopSave(),i.setDecoderState({recordvideo:!1})):(i.jSPlugin.startSave("".concat(new Date().getTime())),i.setDecoderState({recordvideo:!0})))},s;case"capturePicture":return s.title="截图",s.id=n,s.domString='<svg id="'.concat(this.jSPlugin.id,'-capturePicture-icon" class="theme-icon-item-icon" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.8,7.7c-2,0-3.7,1.6-3.7,3.7S8.7,15,10.8,15c2,0,3.7-1.6,3.7-3.7S12.8,7.7,10.8,7.7z M10.8,8.7c1.5,0,2.7,1.2,2.7,2.7S12.2,14,10.8,14c-1.5,0-2.7-1.2-2.7-2.7S9.3,8.7,10.8,8.7z" /><path d="M8.6,3.7l-0.1,0C8,3.7,7.7,4,7.5,4.3l-1,1.7l-1.3,0C4,6.1,3.1,7,3.1,8.2v7.1 c0,1.2,0.9,2.1,2.1,2.1h11.1c1.2,0,2.1-0.9,2.1-2.1V8.2l0-0.1c-0.1-1.1-1-1.9-2.1-1.9l-1.3,0l-1.1-1.8c-0.2-0.4-0.7-0.6-1.1-0.6H8.6 z M8.6,4.7h4.2c0.1,0,0.2,0.1,0.3,0.1l1.2,2c0.1,0.2,0.3,0.2,0.4,0.2h1.6c0.6,0,1.1,0.5,1.1,1.1v7.1c0,0.6-0.5,1.1-1.1,1.1H5.1 c-0.6,0-1.1-0.5-1.1-1.1V8.2c0-0.6,0.5-1.1,1.1-1.1h1.6c0.2,0,0.3-0.1,0.4-0.2l1.2-2C8.4,4.7,8.5,4.7,8.6,4.7z" /></svg>',s.onclick=function(){var T=i.decoderState.state.play;T?i.jSPlugin.capturePicture("".concat(new Date().getTime())):console.log("视频未播放,无法截图")},s;case"talk":return s.title="对讲",s.id=n,s.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-talk-icon" class="theme-icon-item-icon" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.1,2.7C8.5,2.7,7.2,4,7.2,5.6v5.2c0,1.6,1.3,2.9,2.9,2.9l0.2,0c1.5-0.1,2.7-1.4,2.7-2.9V5.6 C13,4,11.7,2.7,10.1,2.7z M10.1,3.7c1.1,0,1.9,0.9,1.9,1.9v5.2c0,1-0.8,1.8-1.8,1.9l-0.1,0c-1,0-1.9-0.9-1.9-1.9V5.6 C8.2,4.5,9,3.7,10.1,3.7z" /><path d="M15.1,8.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,3-2.5,5.5-5.5,5.5c-3,0-5.4-2.3-5.5-5.3l0-0.2V9 c0-0.3,0.2-0.5,0.5-0.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,2.5,2,4.5,4.5,4.5c2.4,0,4.4-1.9,4.5-4.3l0-0.2V9 C14.6,8.7,14.8,8.5,15.1,8.5z" /><path d="M13.5,17.7c0.3,0,0.5,0.2,0.5,0.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-7c-0.3,0-0.5-0.2-0.5-0.5 c0-0.2,0.2-0.4,0.4-0.5l0.1,0H13.5z" /><path d="M10.1,15.2c0.2,0,0.4,0.2,0.5,0.4l0,0.1v2.5c0,0.3-0.2,0.5-0.5,0.5c-0.2,0-0.4-0.2-0.5-0.4l0-0.1 v-2.5C9.6,15.4,9.8,15.2,10.1,15.2z" /></svg>',s.onclick=function(){var T=i.decoderState.state,C=T.talk,y=T.sound,h=T.play;if(h)if(C){console.log("结束对讲"),i.setDecoderState({talk:!1}),i.jSPlugin.Talk.stopTalk();var D=Ut.findIndex(i.themeData.footer.btnList,function(_){return _.iconId==="sound"&&_.isrender===1&&_.defaultActive===1})>-1;i.themeData&&D&&(i.jSPlugin.openSound(),i.setDecoderState({sound:!0}))}else console.log("开始对讲"),i.setDecoderState({talk:!0}),y&&(i.jSPlugin.closeSound(),i.setDecoderState({sound:!1})),i.jSPlugin.Talk.startTalk()},s;case"zoom":return s.title="电子放大",s.id=n,s.domString="<div></div>"+'<svg id="'.concat(this.jSPlugin.id,'-zoom-icon" class="theme-icon-item-icon" fill="').concat(s.color,`" version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
|
width="`).concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,`" viewBox="5 -6 5 32" style="enable-background:new 0 0 20 20.1;" xml:space="preserve">
|
|
|
<path class="st1" d="M8.8,2.6c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2s-6.2-2.8-6.2-6.2S5.3,2.6,8.8,2.6z M8.8,3.9
|
|
|
c-2.8,0-5,2.2-5,5s2.2,5,5,5s5-2.2,5-5S11.5,3.9,8.8,3.9z M12.7,12.7l3.9,3.9"/>
|
|
|
<path class="st2" d="M11.2,9.5h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S11.6,9.5,11.2,9.5z"/>
|
|
|
<path class="st2" d="M8.7,12c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C9.3,11.8,9.1,12,8.7,12z"/>
|
|
|
<path class="st2" d="M16.9,17.6c-0.1,0-0.3-0.1-0.4-0.2l-3.9-3.9c-0.2-0.2-0.2-0.6,0-0.8s0.6-0.2,0.8,0l3.9,3.9
|
|
|
c0.2,0.2,0.2,0.6,0,0.8C17.2,17.5,17,17.6,16.9,17.6z"/>
|
|
|
</svg>`),s.onclick=function(){var T=i.decoderState.state,C=T.zoom,y=T.play;if(!y)return!1;C?(console.log("结束电子放大"),i.setDecoderState({zoom:!1}),i.jSPlugin.Zoom.stopZoom()):(console.log("开始电子放大"),i.jSPlugin.Zoom.startZoom(),i.setDecoderState({zoom:!0}))},s;case"pantile":return s.title="云台控制",s.id=n,s.domString='<svg id="'.concat(this.jSPlugin.id,'-pantile-icon" class="theme-icon-item-icon" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M10.2,7.8c1.6,0,2.9,1.3,2.9,2.9s-1.3,2.9-2.9,2.9s-2.9-1.3-2.9-2.9S8.5,7.8,10.2,7.8z M10.2,8.8c-1.1,0-1.9,0.9-1.9,1.9s0.9,1.9,1.9,1.9s1.9-0.9,1.9-1.9S11.2,8.8,10.2,8.8z" /><path d="M8.8,3.5c0.7-0.6,1.8-0.6,2.5-0.1l0.1,0.1l1.4,1.1c0.2,0.2,0.3,0.5,0.1,0.7 c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1,0l-1.4-1.1C10.5,3.9,10,3.9,9.6,4.2L9.4,4.3L8,5.4C7.8,5.5,7.5,5.5,7.3,5.3c-0.2-0.2-0.1-0.5,0-0.6 l0.1-0.1L8.8,3.5z" /><path d="M2.5,12.3c-0.6-0.7-0.6-1.8-0.1-2.5l0.1-0.1l1.1-1.4c0.2-0.2,0.5-0.3,0.7-0.1 c0.2,0.2,0.2,0.4,0.1,0.6l0,0.1l-1.1,1.4C3,10.6,3,11.1,3.2,11.5l0.1,0.1L4.4,13c0.2,0.2,0.1,0.5-0.1,0.7c-0.2,0.2-0.5,0.1-0.6,0 l-0.1-0.1L2.5,12.3z" /><path d="M17.7,12.3c0.6-0.7,0.6-1.8,0.1-2.5l-0.1-0.1l-1.1-1.4c-0.2-0.2-0.5-0.3-0.7-0.1 c-0.2,0.2-0.2,0.4-0.1,0.6l0,0.1l1.1,1.4c0.3,0.4,0.3,0.9,0.1,1.3l-0.1,0.1L15.8,13c-0.2,0.2-0.1,0.5,0.1,0.7c0.2,0.2,0.5,0.1,0.6,0 l0.1-0.1L17.7,12.3z" /><path d="M8.8,18.2c0.7,0.6,1.8,0.6,2.5,0.1l0.1-0.1l1.4-1.1c0.2-0.2,0.3-0.5,0.1-0.7 c-0.2-0.2-0.4-0.2-0.6-0.1l-0.1,0l-1.4,1.1c-0.4,0.3-0.9,0.3-1.3,0.1l-0.1-0.1L8,16.3c-0.2-0.2-0.5-0.1-0.7,0.1 c-0.2,0.2-0.1,0.5,0,0.6l0.1,0.1L8.8,18.2z" /></svg>',s.onclick=function(){var T=i.decoderState.state,C=T.play,y=T.pantile,h=T.expend;if(C)if(y)console.log("隐藏云台"),i.Ptz.hide(),i.setDecoderState({pantile:!1});else{if(console.log("显示云台"),i.isMobile&&!h)return console.log("移动端,非全屏状态不展示云台"),!1;i.Ptz.show(),i.setDecoderState({pantile:!0})}},s;case"expend":return s.title="全局全屏",s.id=n,s.domString='<span><svg id="'.concat(this.jSPlugin.id,'-expend-icon" class="theme-icon-item-icon" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M3.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,4.1,6.9,4.1H5.2 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.9,7.4,3.7,7.6,3.4,7.6z" /><path d="M6.9,18.1H5.2c-1.2,0-2.2-1-2.2-2.2v-1.8c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8c0,0.7,0.6,1.2,1.2,1.2 h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,18.1,6.9,18.1z" /><path d="M15.7,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.9,17.1,16.9,18.1,15.7,18.1z" /><path d="M17.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-0.7-0.6-1.3-1.2-1.3h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8 c1.2,0,2.2,1,2.2,2.3v1.8C17.9,7.4,17.7,7.6,17.4,7.6z" /></svg>'+'<svg class="theme-icon-item-icon" style="display:none" width="'.concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" fill="').concat(s.color,`" viewBox="-6 -6 32 32">
|
|
|
<path class="st1" d="M5.7,8.1H3.9c-0.3,0-0.6-0.2-0.6-0.6S3.6,7,3.9,7h1.9c0.7,0,1.3-0.6,1.3-1.3V3.8c0-0.3,0.2-0.6,0.6-0.6
|
|
|
s0.6,0.2,0.6,0.6v1.9C8.2,7,7.1,8.1,5.7,8.1z"/>
|
|
|
<path class="st1" d="M7.6,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-0.7-0.6-1.3-1.3-1.3H3.9c-0.3,0-0.6-0.2-0.6-0.6s0.2-0.6,0.6-0.6h1.9
|
|
|
c1.3,0,2.4,1.1,2.4,2.4v1.9C8.2,17.5,7.9,17.7,7.6,17.7z"/>
|
|
|
<path class="st1" d="M13.4,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.6,0.2,0.6,0.6S17.5,14,17.2,14
|
|
|
h-1.9c-0.7,0-1.3,0.6-1.3,1.3v1.9C14,17.5,13.8,17.7,13.4,17.7z"/>
|
|
|
<path class="st1" d="M17.2,8.1h-1.9c-1.3,0-2.4-1.1-2.4-2.4V3.8c0-0.3,0.2-0.6,0.6-0.6S14,3.5,14,3.8v1.9C14,6.4,14.6,7,15.3,7h1.9
|
|
|
c0.3,0,0.6,0.2,0.6,0.6S17.5,8.1,17.2,8.1z"/>
|
|
|
</svg>
|
|
|
</span>`),s.onclick=function(){var T=i.decoderState.state,C=T.webExpend,y=T.expend;T.play;var h=T.pantile;if(C)return console.log("正在网站全屏"),!1;if(y)if(i.isMobile){var D=parseInt(getComputedStyle(document.getElementById("".concat(i.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(i.jSPlugin.id)).height,10);document.getElementById("".concat(i.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(i.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-32px"),document.getElementById("".concat(i.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(i.jSPlugin.id,"-headControl")).style.position="relative"),Kl(document.getElementById("".concat(i.jSPlugin.id,"-wrap")),i.jSPlugin.width,i.jSPlugin.height+D),i.jSPlugin.jSPlugin.JS_Resize(i.jSPlugin.width,i.jSPlugin.height),h&&(i.Ptz.hide(),i.setDecoderState({pantile:!1}))}else{console.log("取消全局全屏");var z=Nr();z.then(function(S){console.log("取消全屏",S,i.jSPlugin),i.jSPlugin.jSPlugin.JS_Resize(i.jSPlugin.width,i.jSPlugin.height)})}else if(console.log("执行全局全屏"),i.isMobile){var D=parseInt(getComputedStyle(document.getElementById("".concat(i.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(i.jSPlugin.id)).height,10);$o(document.getElementById("".concat(i.jSPlugin.id,"-wrap"))),setTimeout(function(){var S=document.documentElement.clientWidth,d=document.documentElement.clientHeight;document.getElementById("".concat(i.jSPlugin.id)).style["backface-visibility"]="hidden",i.jSPlugin.jSPlugin.JS_Resize(d,S-D)},100)}else{var _=window.screen.width,E=window.screen.height,w=yi(document.getElementById("".concat(i.jSPlugin.id)));w.then(function(S){i.jSPlugin.jSPlugin.JS_Resize(_,E)}).catch(function(S){console.log(S)})}i.setDecoderState({expend:!y})},s;case"webExpend":return s.title="网页全屏",s.id=n,s.domString='<span><svg id="'.concat(this.jSPlugin.id,'-webExpend-icon" class="theme-icon-item-icon" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M3.1,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S6.8,4.1,6.6,4.1H4.8 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.6,7.4,3.3,7.6,3.1,7.6z" /><path d="M15.3,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.6,17.1,16.6,18.1,15.3,18.1z" /><circle class="st2" cx="10.2" cy="10.4" r="1.1"/></svg>'+'<svg class="theme-icon-item-icon" fill="'.concat(s.color,'" style="display:none;" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,`" viewBox="-6 -6 32 32">
|
|
|
<path class="st1" d="M5.4,8.1H3.5C3.2,8.1,3,7.9,3,7.6s0.2-0.5,0.5-0.5h1.9c0.8,0,1.4-0.6,1.4-1.4V3.8c0-0.3,0.2-0.5,0.5-0.5
|
|
|
s0.5,0.2,0.5,0.5v1.9C7.7,7,6.7,8.1,5.4,8.1z"/>
|
|
|
<path class="st1" d="M13.1,17.7c-0.3,0-0.5-0.2-0.5-0.5v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5H15
|
|
|
c-0.8,0-1.4,0.6-1.4,1.4v1.9C13.6,17.4,13.4,17.7,13.1,17.7z"/>
|
|
|
<circle class="st2" cx="10.2" cy="10.4" r="1.1"/>
|
|
|
`)+"</svg></span>",s.onclick=function(){var T=i.decoderState.state,C=T.webExpend,y=T.expend;if(T.play,y)return console.log("正在全局全屏"),!1;if(i.jSPlugin.recTimer&&clearInterval(i.jSPlugin.recTimer),C){console.log("取消网页全屏");var S=Nr();S.then(function(d){i.jSPlugin.jSPlugin.JS_Resize(i.jSPlugin.width,i.jSPlugin.height),i.jSPlugin.Theme.Rec&&i.jSPlugin.Theme.Rec.recAutoSize()})}else{console.log("执行网页全屏");var h=0,D=0,_=i;["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(d){window.addEventListener(d,function(g){var k=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;return k?document.getElementById("".concat(_.jSPlugin.id,"-loading-item-0"))&&(document.getElementById("".concat(_.jSPlugin.id,"-loading-item-0")).style.height=window.screen.height-parseInt(window.getComputedStyle(document.getElementById("".concat(_.jSPlugin.id,"-headControl"))).height,10)+"px"):document.getElementById("".concat(_.jSPlugin.id,"-loading-item-0"))&&(document.getElementById("".concat(_.jSPlugin.id,"-loading-item-0")).style.height=_.jSPlugin.height+parseInt(window.getComputedStyle(document.getElementById("".concat(_.jSPlugin.id,"-headControl"))).height,10)+"px"),k})});var E=window.screen.width,w=window.screen.height,z=yi(document.getElementById("".concat(i.jSPlugin.id,"-wrap")));z.then(function(d){document.getElementById("".concat(i.jSPlugin.id,"-canvas-container"))&&(h=parseInt(window.getComputedStyle(document.getElementById("".concat(i.jSPlugin.id,"-canvas-container"))).height,10)),document.getElementById("".concat(i.jSPlugin.id,"-headControl"))&&(D=parseInt(window.getComputedStyle(document.getElementById("".concat(i.jSPlugin.id,"-headControl"))).height,10)),i.jSPlugin.jSPlugin.JS_Resize(E,w-h-D),i.jSPlugin.Theme.Rec&&i.jSPlugin.Theme.Rec.recAutoSize()}).catch(function(d){console.log(d)})}i.setDecoderState({webExpend:!C})},s;case"hd":return s.title="画面清晰度",s.id=n,s.domString='<ul id="'.concat(this.jSPlugin.id,'-hdSelect" class="hd speed-select ').concat(this.isMobile?"mobile":"",'" style="display:none;">')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;" name="option" id="'.concat(this.jSPlugin.id,'-select-hd">高清</li>')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;" name="option" id="'.concat(this.jSPlugin.id,'-select-sd">标清</li>')+'<li class="selectOption cancel" style="'.concat(this.isMobile?"":"display:none;",'" name="option" id="').concat(this.jSPlugin.id,'-select-speed">取消</li>')+"</ul>"+'<span><svg id="'.concat(this.jSPlugin.id,'-hdSelect-icon" class="theme-icon-item-icon" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,'" viewBox="-6 -6 32 32">')+'<path d="M17.4,16.5H3.1c-0.8,0-1.4-0.6-1.4-1.4V5.4c0-0.9,0.7-1.6,1.6-1.6h14.1c0.8,0,1.4,0.6,1.4,1.4v9.8 C18.8,15.9,18.2,16.5,17.4,16.5z M3.3,5C3.1,5,2.9,5.2,2.9,5.4v9.7c0,0.2,0.1,0.3,0.3,0.3h14.3c0.2,0,0.3-0.1,0.3-0.3V5.3 c0-0.2-0.1-0.3-0.3-0.3H3.3z" /><path d="M13.3,13.6h-1.6c-0.4,0-0.7-0.3-0.7-0.7V7.4c0-0.4,0.3-0.7,0.7-0.7h1.6c1.2,0,2.2,1,2.2,2.2v2.4 C15.6,12.6,14.6,13.6,13.3,13.6z M12.2,12.5h1.1c0.6,0,1.1-0.5,1.1-1.1V9c0-0.6-0.5-1.1-1.1-1.1h-1.1V12.5z" /><path d="M5.5,13.6c-0.3,0-0.6-0.2-0.6-0.6V7.3C5,7,5.2,6.8,5.5,6.8S6.1,7,6.1,7.3v5.7C6.1,13.4,5.8,13.6,5.5,13.6z" /><path d="M9.2,13.6c-0.3,0-0.6-0.2-0.6-0.6V7.3c0-0.3,0.2-0.6,0.6-0.6S9.8,7,9.8,7.3v5.7C9.8,13.4,9.5,13.6,9.2,13.6z" /><rect x="5.6" y="9.6" width="3.6" height="1.1" /></svg>'+'<svg id="'.concat(this.jSPlugin.id,'-sdSelect-icon" class="theme-icon-item-icon" style="display:none" fill="').concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,`" viewBox="-6 -8 40 44">
|
|
|
<path d="M24.1,23.8h-20c-1.1,0-1.9-0.9-1.9-1.9V8.4c0-1.2,1-2.2,2.1-2.2h19.7c1.1,0,1.9,0.9,1.9,1.9v13.8
|
|
|
C26,23,25.1,23.8,24.1,23.8z M4.3,7.7C4,7.7,3.7,8,3.7,8.4v13.5c0,0.2,0.2,0.4,0.4,0.4h20c0.2,0,0.4-0.2,0.4-0.4V8.2
|
|
|
c0-0.2-0.2-0.4-0.4-0.4H4.3z"/>
|
|
|
<path d="M18.4,19.8h-2.2c-0.5,0-0.9-0.4-0.9-0.9v-7.8c0-0.5,0.4-0.9,0.9-0.9h2.2c1.7,0,3.1,1.4,3.1,3.1v3.3
|
|
|
C21.5,18.4,20.1,19.8,18.4,19.8z M16.7,18.3h1.6c0.9,0,1.6-0.7,1.6-1.6v-3.3c0-0.9-0.7-1.6-1.6-1.6h-1.6V18.3z"/>
|
|
|
<path d="M10.5,19.8c1.2,0,2.1-0.3,2.7-0.9c0.6-0.6,0.9-1.3,0.9-2.1c0-0.8-0.3-1.4-0.9-1.8c-0.4-0.2-1.1-0.5-2.2-0.8
|
|
|
l0,0l-1-0.2c-0.4-0.1-0.8-0.2-1-0.4c-0.4-0.2-0.6-0.5-0.6-0.9c0-0.4,0.1-0.6,0.4-0.9s0.7-0.3,1.3-0.3c0.8,0,1.4,0.2,1.8,0.6
|
|
|
c0.2,0.3,0.3,0.6,0.4,0.9l0,0h1.4c0-0.6-0.2-1.1-0.5-1.6c-0.6-0.8-1.6-1.2-2.9-1.2c-1,0-1.8,0.3-2.4,0.8c-0.6,0.5-0.9,1.2-0.9,2
|
|
|
c0,0.7,0.3,1.3,1,1.7c0.4,0.2,0.9,0.4,1.7,0.6l0,0l1.2,0.3c0.6,0.2,1.1,0.3,1.3,0.4c0.3,0.2,0.5,0.5,0.5,0.9c0,0.5-0.2,0.9-0.6,1.1
|
|
|
s-0.9,0.4-1.5,0.4c-0.9,0-1.6-0.2-2-0.7c-0.2-0.3-0.3-0.6-0.4-1.1l0,0H6.8c0,0.9,0.3,1.6,0.9,2.2C8.2,19.5,9.2,19.8,10.5,19.8z"/>
|
|
|
<defs>
|
|
|
<filter id="Adobe_OpacityMaskFilter" filterUnits="userSpaceOnUse" x="15.2" y="10.3" width="6.2" height="9.5">
|
|
|
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
|
|
|
</filter>
|
|
|
</defs>
|
|
|
<mask maskUnits="userSpaceOnUse" x="15.2" y="10.3" width="6.2" height="9.5" id="mask-2_2_">
|
|
|
<g class="st2">
|
|
|
<path id="path-1_2_" class="st3" d="M24.1,23.1h-20c-0.6,0-1.2-0.5-1.2-1.2V8.2C2.9,7.5,3.5,7,4.1,7h19.7c0.8,0,1.4,0.6,1.4,1.4
|
|
|
v13.5C25.2,22.6,24.7,23.1,24.1,23.1z"/>
|
|
|
</g>
|
|
|
</mask>
|
|
|
<defs>
|
|
|
<filter id="Adobe_OpacityMaskFilter_1_" filterUnits="userSpaceOnUse" x="6.8" y="10.3" width="7.3" height="9.5">
|
|
|
<feColorMatrix type="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"/>
|
|
|
</filter>
|
|
|
</defs>
|
|
|
<mask maskUnits="userSpaceOnUse" x="6.8" y="10.3" width="7.3" height="9.5" id="mask-2_3_">
|
|
|
<g class="st5">
|
|
|
<path id="path-1_3_" class="st3" d="M24.1,23.1h-20c-0.6,0-1.2-0.5-1.2-1.2V8.2C2.9,7.5,3.5,7,4.1,7h19.7c0.8,0,1.4,0.6,1.4,1.4
|
|
|
v13.5C25.2,22.6,24.7,23.1,24.1,23.1z"/>
|
|
|
</g>
|
|
|
</mask>
|
|
|
</svg>
|
|
|
`)+`<span class='speed-select-mask' style="display:none" id="`.concat(this.jSPlugin.id,'-select-hd-mask"></span>')+"</span>",s.onclick=function(T){var C=i.decoderState.state,y=C.hd,h=C.expend,D=C.recordvideo,_=C.play;_&&(y&&T.target.id==="".concat(i.jSPlugin.id,"-select-sd")?(console.log("切换到标清"),i.jSPlugin.changeVideoLevel(0),i.setDecoderState({hd:!1}),i.resetMobileZoomStatus(),D&&i.setDecoderState({recordvideo:!1}),i.setDecoderState({zoom:!1}),i.jSPlugin.Zoom.stopZoom()):!y&&T.target.id==="".concat(i.jSPlugin.id,"-select-hd")&&(i.jSPlugin.changeVideoLevel(1),i.setDecoderState({hd:!0}),i.resetMobileZoomStatus(),D&&i.setDecoderState({recordvideo:!1}),i.setDecoderState({zoom:!1}),i.jSPlugin.Zoom.stopZoom()),i.showHD=!i.showHD,document.getElementById("".concat(i.jSPlugin.id,"-hdSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-hdSelect")).style.display=document.getElementById("".concat(i.jSPlugin.id,"-hdSelect")).style.display==="none"?"block":"none",i.isMobile&&(document.getElementById("".concat(i.jSPlugin.id,"-select-hd-mask")).style.display=document.getElementById("".concat(i.jSPlugin.id,"-select-hd-mask")).style.display==="none"?"block":"none")),i.isMobile&&h&&i.showHD?document.getElementById("".concat(i.jSPlugin.id,"-hdSelect")).className="hd speed-select mobile expend":document.getElementById("".concat(i.jSPlugin.id,"-hdSelect")).className=i.isMobile?"hd speed-select mobile":"speed-select")},s;case"speed":return s.title="回放倍速",s.id=n,s.domString='<ul id="'.concat(this.jSPlugin.id,'-speedSelect" class="speed speed-select ').concat(this.isMobile?"mobile":"",'" style="display:none;">')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed4">4倍</li>')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed2">2倍</li>')+'<li class="selectOption active" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed1">1倍(正常播放)</li>')+'<li class="selectOption default" style="height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;" name="option" id="'.concat(this.jSPlugin.id,'-select-speed05">0.5倍</li>')+'<li class="selectOption cancel" style="'.concat(this.isMobile?"":"display:none;",'" name="option" id="').concat(this.jSPlugin.id,'-select-speed">取消</li>')+"</ul>"+`<span>
|
|
|
<div style="font-size: 12px;
|
|
|
vertical-align: bottom;
|
|
|
display: inline-flex;
|
|
|
padding: 0px 7px;
|
|
|
width: 48px;
|
|
|
line-height: 24px;
|
|
|
justify-content: center;
|
|
|
border: 1px solid `.concat(s.color,`;
|
|
|
text-align: center;border-radius: 12.5px;"
|
|
|
id="`).concat(this.jSPlugin.id,`-speed-text"
|
|
|
>`).concat(this.nextRate===1?"倍速":"".concat(this.nextRate,"倍").replace("3","0.5"),`</div>
|
|
|
`)+`<span class='speed-select-mask' style="display:none" id="`.concat(this.jSPlugin.id,'-select-mask"></span>')+"</span>",this.isMobile||(s.onmouseenter=function(T){var C=i.decoderState.state.play;if(!C)return!1;console.log("鼠标移入",T),i.setDecoderState({speed:!0}),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display="block")},s.onmouseleave=function(T){var C=i.decoderState.state.play;if(!C)return!1;console.log("鼠标移出",T),i.setDecoderState({speed:!1}),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display="none")}),s.onclick=function(T){var C=i.decoderState.state,y=C.speed,h=C.expend,D=C.play;if(!D)return!1;if(!y&&i.isMobile&&(document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).className=h?"speed speed-select mobile expend":"speed speed-select mobile"),i.nextRate=1,T.target.id)switch(T.target.id){case"".concat(i.jSPlugin.id,"-select-speed1"):console.log("倍速1"),i.nextRate=1,i.jSPlugin.jSPlugin.JS_Speed(i.nextRate),i.changeRecSpeed(1),i.jSPlugin.speed=1,i.setDecoderState({speed:!y});break;case"".concat(i.jSPlugin.id,"-select-speed2"):console.log("倍速2"),i.nextRate=2,i.jSPlugin.jSPlugin.JS_Speed(i.nextRate),i.changeRecSpeed(2),i.jSPlugin.speed=2,i.setDecoderState({speed:!y});break;case"".concat(i.jSPlugin.id,"-select-speed4"):console.log("倍速4"),i.nextRate=4,i.jSPlugin.jSPlugin.JS_Speed(i.nextRate),i.changeRecSpeed(4),i.jSPlugin.speed=4,i.setDecoderState({speed:!y});break;case"".concat(i.jSPlugin.id,"-select-speed05"):console.log("倍速05"),i.nextRate=3,i.jSPlugin.jSPlugin.JS_Speed(i.nextRate),i.changeRecSpeed(.5),i.jSPlugin.speed=.5,i.setDecoderState({speed:!y});break;default:i.isMobile?i.setDecoderState({speed:!y}):i.setDecoderState({speed:!0});break}!i.isMobile&&T.target.id==="".concat(i.jSPlugin.id,"-speed-text")?document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display="block":document.getElementById("".concat(i.jSPlugin.id,"-speedSelect"))&&(document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).style.display==="none"?"block":"none")},s;case"deviceName":return s.title="设备名称",s.id=n,s.domString="<span>设备名称</span>",s.onclick=function(){},s;case"deviceID":return s.title="设备序列号",s.id=n,s.domString="<span>设备序列号</span>",s.onclick=function(){},s;case"cloudRec":return s.title="云存储回放",s.id=n,s.domString=`
|
|
|
<span>
|
|
|
<svg class="theme-icon-item-icon" fill="`.concat(s.color,'" version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,`" viewBox="-10 0 40 15">
|
|
|
<path d="M9.5,13.1c-0.3,0-0.5-0.2-0.5-0.5V8.8c0-0.3,0.2-0.5,0.5-0.5S10,8.5,10,8.8v3.8C10,12.8,9.8,13.1,9.5,13.1z"/>
|
|
|
<path d="M7.6,10.6c-0.1,0-0.3-0.1-0.4-0.2C7,10.2,7,9.9,7.3,9.7l1.9-1.7c0.2-0.2,0.5-0.2,0.7,0l1.8,1.7
|
|
|
c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.5,0.2-0.7,0L9.5,9.1l-1.6,1.4C7.8,10.6,7.7,10.6,7.6,10.6z"/>
|
|
|
<path d="M13.2,15.7H5.6c-2.1-0.1-3.8-1.8-3.8-3.9c0-1.8,1.3-3.4,3-3.8c0.4-2.2,2.3-3.9,4.6-3.9c2.3,0,4.2,1.7,4.6,3.8
|
|
|
c1.8,0.4,3.1,1.9,3.1,3.8C17.1,13.9,15.4,15.7,13.2,15.7z M5.6,14.7h7.6c1.6,0,2.9-1.3,2.9-2.9c0-1.5-1.1-2.7-2.6-2.9l-0.4,0l0-0.4
|
|
|
c-0.2-1.9-1.7-3.3-3.6-3.3C7.5,5.1,6,6.6,5.8,8.5l0,0.4l-0.4,0c-1.4,0.2-2.5,1.4-2.5,2.9C2.8,13.3,4.1,14.6,5.6,14.7z"/>
|
|
|
</svg>
|
|
|
</span>
|
|
|
`),s.onclick=function(){console.log("点击云回放"),i.setDecoderState({type:"cloud.rec",cloudRec:!0,rec:!1}),i.jSPlugin.changePlayUrl({type:"cloud.rec"},function(){console.log(i.jSPlugin);var T=et("begin",i.jSPlugin.url)||new Date().Format("yyyyMMdd");i.Rec.renderRec("".concat(T.slice(0,4),"-").concat(T.slice(4,6),"-").concat(T.slice(6,8)));var C=i.decoderState.state.zoom;C&&(i.setDecoderState({zoom:!1}),i.jSPlugin.Zoom.stopZoom())}),console.log(i.jSPlugin)},s;case"rec":return s.title="本地存储",s.id=n,s.domString=`
|
|
|
<span>
|
|
|
<svg class="theme-icon-item-icon" fill=`.concat(s.color,' version="1.1" xmlns="http://www.w3.org/2000/svg" width="').concat(this.jSPlugin.width>Me?48:32,'" height="').concat(this.jSPlugin.width>Me?48:32,`" viewBox="0 0 40 15">
|
|
|
<path d="M13,16.3H5.5c-1.1,0-2-0.9-2-2V3.8c0-1.1,0.9-2,2-2h5.4c0.5,0,1,0.2,1.4,0.6l2.1,2.1C14.8,4.8,15,5.3,15,5.9
|
|
|
v8.4C15,15.4,14.1,16.3,13,16.3z M5.5,2.8c-0.6,0-1,0.4-1,1v10.5c0,0.6,0.4,1,1,1H13c0.6,0,1-0.4,1-1V5.9c0-0.3-0.1-0.5-0.3-0.7
|
|
|
L11.6,3c-0.2-0.2-0.4-0.3-0.7-0.3H5.5z"/>
|
|
|
<path d="M6.3,7.3C6,7.3,5.8,7,5.8,6.8V4.5C5.8,4.2,6,4,6.3,4s0.5,0.2,0.5,0.5v2.2C6.8,7,6.6,7.3,6.3,7.3z"/>
|
|
|
<path d="M8.5,7.3C8.3,7.3,8,7,8,6.8V4.5C8,4.2,8.3,4,8.5,4S9,4.2,9,4.5v2.2C9,7,8.8,7.3,8.5,7.3z"/>
|
|
|
<path d="M10.8,7.3c-0.3,0-0.5-0.2-0.5-0.5V4.5c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v2.2C11.3,7,11.1,7.3,10.8,7.3z"
|
|
|
/>
|
|
|
</svg>
|
|
|
</span>
|
|
|
`),s.onclick=function(){console.log("点击本地回放"),i.setDecoderState({type:"rec",cloudRec:!1,rec:!0}),i.jSPlugin.changePlayUrl({type:"rec"},function(){console.log("---------本地回放"),console.log(i.jSPlugin);var T=et("begin",i.jSPlugin.url)||new Date().Format("yyyyMMdd");i.Rec.renderRec("".concat(T.slice(0,4),"-").concat(T.slice(4,6),"-").concat(T.slice(6,8)));var C=i.decoderState.state.zoom;C&&(i.setDecoderState({zoom:!1}),i.jSPlugin.Zoom.stopZoom())}),console.log(i.jSPlugin)},s;default:return s}}},{key:"changeRecSpeed",value:function(n){var i=this,r=function(s){if(console.log("setLiActive",s),!document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")))return!1;document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[0].className=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[0].className.replace("active","default"),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[1].className=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[1].className.replace("active","default"),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[2].className=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[2].className.replace("active","default"),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[3].className=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[3].className.replace("active","default"),document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[s].className=document.getElementById("".concat(i.jSPlugin.id,"-speedSelect")).childNodes[s].className.replace("default","active")},a="1";switch(n){case 1:r(2),a="倍速";break;case 2:r(1),a="".concat(n,"倍");break;case 4:r(0),a="".concat(n,"倍");break;case .5:r(3),a="".concat(n,"倍");break;default:r(2),a="".concat(n,"倍");break}document.getElementById("".concat(this.jSPlugin.id,"-speed-text"))&&(document.getElementById("".concat(this.jSPlugin.id,"-speed-text")).innerHTML=a)}},{key:"initThemeData",value:function(){var n=this,i=this.themeData,r=i.header,a=i.footer,l=this.jSPlugin.id;if(this.header=Qo.header,this.footer=Qo.footer,this.isNeedRenderHeader=Ut.findIndex(r.btnList,function(w){return w.isrender>0})>=0,this.isMobile&&(this.isNeedRenderHeader=Ut.findIndex(r.btnList,function(w){return w.isrender>0&&w.iconId==="deviceID"||w.isrender>0&&w.iconId==="deviceName"})>=0),this.isNeedRenderFooter=Ut.findIndex(a.btnList,function(w){return w.isrender>0})>=0,this.isNeedRenderTimeLine=Ut.findIndex(r.btnList,function(w){return w.iconId==="cloudRec"&&w.isrender===1||w.iconId==="rec"&&w.isrender===1})>=0&&!this.jSPlugin.disabledTimeLine,["date-switch-container-wrap","rec-type-container-wrap","mobile-rec-wrap","mobile-ez-ptz-container"].forEach(function(w,z){document.getElementById(w)&&document.getElementById(w).parentElement.removeChild(document.getElementById(w))}),this.isNeedRenderHeader)if(document.getElementById("".concat(this.jSPlugin.id,"-headControl")))document.getElementById("".concat(this.jSPlugin.id,"-headControl")).innerHTML="<div id='".concat(this.jSPlugin.id,"-headControl-left' style='display:flex;width: calc(100% - 100px);'></div><div id='").concat(this.jSPlugin.id,"-headControl-right' style='display:flex'></div>");else{var s=document.createElement("div");s.setAttribute("id","".concat(this.jSPlugin.id,"-headControl")),s.setAttribute("class","header-controls"),s.innerHTML="<div id='".concat(this.jSPlugin.id,`-headControl-left' class="header-controls-left" style='display:flex;width:calc(100% - 100px);overflow:hidden;'></div><div id='`).concat(this.jSPlugin.id,`-headControl-right' class="header-controls-right" style='display:flex;'></div>`);var b={height:this.jSPlugin.width>Me?"48px":"32px","line-height":this.jSPlugin.width>Me?"48px":"32px",display:"flex","justify-content":"space-between",top:0,"z-index":1,background:"#000000",color:"#FFFFFF",width:"100%"};s.style=pa(b),document.getElementById("".concat(l,"-wrap")).insertBefore(s,document.getElementById(l));var T=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(T)},50)}else document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&document.getElementById("".concat(this.jSPlugin.id,"-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-headControl")));if(this.isNeedRenderFooter)if(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")))document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).style.marginTop="-".concat(this.jSPlugin.width>Me?48:32,"px"),document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).innerHTML='<div id="'.concat(this.jSPlugin.id,`-audioControls" class="footer-controls" style='display:flex;justify-content: space-between;height: `).concat(this.jSPlugin.width>Me?48:32,"px;width:100%;'><div id='").concat(this.jSPlugin.id,`-audioControls-left' class="footer-controls-left" style='display:flex'></div><div id='`).concat(this.jSPlugin.id,`-audioControls-right' class="footer-controls-right" style='display:flex'></div></div>`));else{var C=document.createElement("div");C.setAttribute("id","".concat(this.jSPlugin.id,"-ez-iframe-footer-container")),C.setAttribute("class","ez-iframe-footer-container");var y={"min-height":this.jSPlugin.width>Me?"48px":"32px","max-height":this.jSPlugin.width>Me?"96px":"80px",position:"relative","margin-top":this.jSPlugin.width>Me?"-48px":"-32px",display:"flex","flex-wrap":"wrap","justify-content":"space-between","z-index":999,top:0,color:"#FFFFFF",width:"100%"};C.style=pa(y),C.innerHTML='<div id="'.concat(this.jSPlugin.id,`-audioControls" class="footer-controls" style='display:flex;height:`).concat(this.jSPlugin.width>Me?48:32,"px;justify-content: space-between;width:100%;z-index:999;position: relative;'><div id='").concat(this.jSPlugin.id,`-audioControls-left' class="footer-controls-left" style='display:flex;margin-lefacti'></div><div id='`).concat(this.jSPlugin.id,`-audioControls-right' class="footer-controls-right" style='display:flex'></div></div>`),Wn(C,document.getElementById(l))}else document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container"))&&document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id,"-ez-iframe-footer-container")));if(this.isNeedRenderHeader&&document.getElementById("".concat(this.jSPlugin.id,"-headControl"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.background=r.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-headControl")).style.color=r.color,r.btnList.map(function(w,z){w.isrender&&n.renderHeader(w.iconId,w.part)})),this.isNeedRenderFooter&&document.getElementById("".concat(this.jSPlugin.id,"-audioControls"))&&(document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.background=a.backgroundColor,document.getElementById("".concat(this.jSPlugin.id,"-audioControls")).style.color=a.color,a.btnList.map(function(w,z){w.isrender&&n.renderFooter(w.iconId,w.part)})),this.isNeedRenderTimeLine)if(this.isMobile)document.getElementById("".concat(this.jSPlugin.id,"-headControl-right"))&&(document.getElementById("".concat(this.jSPlugin.id,"-headControl-right")).style.display="none"),this.Rec=new cs(this.jSPlugin,this.changeRecSpeed,this.resetMobileZoomStatus);else{this.Rec?(this.Rec.unSyncTimeLine(),this.Rec.recInit()):(this.jSPlugin.decoderState=this.decoderState,this.jSPlugin.setDecoderState=this.setDecoderState,this.Rec=new ls(this.jSPlugin));var h=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&clearInterval(h)},50)}var D=Ut.findIndex(this.themeData.footer.btnList,function(w){return w.iconId==="pantile"&&w.isrender===1})>=0&&!this.jSPlugin.disabledPTZ;D&&(this.isMobile&&(this.MobilePtz=new vs(this.jSPlugin)),this.Ptz=new hs(this.jSPlugin));var _=function(){var z=n.decoderState.state,S=z.expend,d=z.webExpend,m=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;m||(n.jSPlugin.jSPlugin.JS_Resize(n.jSPlugin.width,n.jSPlugin.height),S&&n.setDecoderState({expend:!1}),d&&n.setDecoderState({webExpend:!1})),n.jSPlugin.Theme.Rec&&n.jSPlugin.Theme.Rec.recAutoSize()};if(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(w){window.addEventListener(w,function(z){return _()})}),this.themeData.poster){this.jSPlugin.poster=this.themeData.poster;var E=setInterval(function(){window.EZUIKit[n.jSPlugin.id].state.EZUIKitPlayer.init&&(clearInterval(E),n.jSPlugin.setPoster(n.themeData.poster))},50)}this.inited=!0,this.getDeviceInfo()}},{key:"resetMobileZoomStatus",value:function(){if(this.isMobile){var n=document.getElementById("".concat(this.jSPlugin.id,"-zoom-container"));n&&n.style&&n.style.display!="none"&&(console.log("结束电子放大"),n.style.display="none"),this.jSPlugin.Zoom.resetZoom()}}},{key:"getDeviceInfo",value:function(){var n=this,i=function(a){a.code==200&&a.data&&(a.data.isEncrypt&&setTimeout(function(){n.pluginStatus.loadingClear(),n.pluginStatus.loadingSetText({text:"设备已加密",color:"red"})},1500),document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content"))&&(document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content")).style.maxWidth="100%",document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content")).style.overflow="hidden",document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content")).style.textOverflow="ellipsis",document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content")).style.whiteSpace="nowrap",document.getElementById("".concat(n.jSPlugin.id,"-deviceName-content")).innerHTML=a.data.deviceName),document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content"))&&(document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content")).style.maxWidth="100%",document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content")).style.overflow="hidden",document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content")).style.textOverflow="ellipsis",document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content")).style.whiteSpace="nowrap",document.getElementById("".concat(n.jSPlugin.id,"-deviceID-content")).innerHTML=Ke(n.jSPlugin.url).deviceSerial))};Gn(this.jSPlugin.env.domain+"/api/lapp/device/info","POST",{accessToken:this.jSPlugin.accessToken,deviceSerial:Ke(this.jSPlugin.url).deviceSerial},"",i)}},{key:"editStart",value:function(n){var i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),r=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));r&&r.setAttribute("class","header-controls themeEditing"),i&&i.setAttribute("class","footer-controls themeEditing"),this.setDecoderState({isEditing:!0})}},{key:"editEnd",value:function(n){var i=document.getElementById("".concat(this.jSPlugin.id,"-audioControls")),r=document.getElementById("".concat(this.jSPlugin.id,"-headControl"));r&&r.setAttribute("class","header-controls"),i&&i.setAttribute("class","footer-controls"),this.setDecoderState({isEditing:!1})}},{key:"webExpend",value:function(){var n=this,i=this.decoderState.state;i.webExpend;var r=i.expend,a=i.play;if(!a)return!1;if(r)return console.log("正在全局全屏"),!1;console.log("执行网页全屏");var l=0,s=0,b=yi(document.getElementById("".concat(this.jSPlugin.id,"-wrap")));b.then(function(T){console.log("全屏promise",window.screen.width),document.getElementById("".concat(n.jSPlugin.id,"-canvas-container"))&&(l=parseInt(window.getComputedStyle(document.getElementById("".concat(n.jSPlugin.id,"-canvas-container"))).height,10)),document.getElementById("".concat(n.jSPlugin.id,"-headControl"))&&(s=parseInt(window.getComputedStyle(document.getElementById("".concat(n.jSPlugin.id,"-headControl"))).height,10)),console.log("this.jSPlugin.JS_Resiz",l,s,document.body.clientWidth),n.jSPlugin.jSPlugin.JS_Resize(window.screen.width,window.screen.height-l-s)}).catch(function(T){console.log(T)})}},{key:"expend",value:function(){var n=this,i=this.decoderState.state,r=i.webExpend;i.expend;var a=i.play;if(i.pantile,!a)return!1;if(r)return console.log("正在网站全屏"),!1;if(console.log("执行全局全屏"),this.isMobile){var l=parseInt(getComputedStyle(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))).height,10)-parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).height,10);$o(document.getElementById("".concat(this.jSPlugin.id,"-wrap"))),setTimeout(function(){var b=document.documentElement.clientWidth,T=document.documentElement.clientHeight;document.getElementById("".concat(n.jSPlugin.id)).style["backface-visibility"]="hidden",n.jSPlugin.jSPlugin.JS_Resize(T,b-l)},100)}else{var s=yi(document.getElementById("".concat(this.jSPlugin.id)));s.then(function(b){n.jSPlugin.jSPlugin.JS_Resize(window.screen.width,window.screen.height)}).catch(function(b){console.log(b)})}}}]),f}();Date.prototype.Format=function(f){var u={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};/(y+)/.test(f)&&(f=f.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in u)new RegExp("("+n+")").test(f)&&(f=f.replace(RegExp.$1,RegExp.$1.length==1?u[n]:("00"+u[n]).substr((""+u[n]).length)));return f};var Ds=function(){function f(u,n){if(fe(this,f),this.params=u,this.state={},this.jsPlugin=n,this.url="https://log.ys7.com/statistics.do?",u.env)switch(u.env){case"test12":this.url="https://test12dclog.ys7.com/statistics.do?";break;case"online":break;default:this.url=u.env;break}}return dt(f,[{key:"uuid",value:function(){for(var n=[],i="0123456789abcdef",r=0;r<36;r++)n[r]=i.substr(Math.floor(Math.random()*16),1);n[14]="4",n[19]=i.substr(n[19]&3|8,1),n[8]=n[13]=n[18]=n[23]="-";var a=n.join("");return a}},{key:"dclog",value:function(n){var i=this.url,r=Object.assign({},{systemName:"open_website_monitor"},{bn:"ezuikit-js"},n,{un:n.url},{st:new Date().getTime(),h:window.location.pathname});Object.keys(r).forEach(function(l,s){var b=r[l];typeof r[l]=="string"&&(b=r[l].replace("%","%25")),typeof r[l]!="undefined"&&(i+="".concat(s===0?"":"&").concat(l,"=").concat(encodeURIComponent(b)))});var a=new Image;a.src=i}},{key:"localInfoLog",value:function(n){var i=this.url,r=window.location.protocol+"//"+window.location.host,a={systemName:"open_netstream_localinfo",Ver:"v6.0.0",PlatAddr:r,ExterVer:"v6.0.0",OpId:this.uuid(),CltType:102,AppId:"",playurl:encodeURIComponent(this.jsPlugin.url),StartTime:new Date().Format("yyyy-MM-dd hh:mm:ss.S"),OS:navigator.platform};a=Object.assign(a,n),Object.keys(a).forEach(function(s,b){var T=a[s];typeof a[s]=="string"&&(T=a[s].replace("%","%25")),typeof a[s]!="undefined"&&(i+="".concat(b===0?"":"&").concat(s,"=").concat(encodeURIComponent(T)))});var l=new Image;l.src=i}},{key:"playLog",value:function(n){var i=this.url,r=i,a={systemName:"open_netstream_play_main",playurl:encodeURIComponent(this.jsPlugin.url),Time:new Date().Format("yyyy-MM-dd hh:mm:ss.S"),Via:2,OpId:this.uuid()};a=Object.assign(a,n),Object.keys(a).forEach(function(s,b){var T=a[s];typeof a[s]=="string"&&(T=a[s].replace("%","%25")),typeof a[s]!="undefined"&&(r+="".concat(b===0?"":"&").concat(s,"=").concat(encodeURIComponent(T)))});var l=new Image;l.src=r}}]),f}();(function(f,u){ue(ae)==="object"&&ue(ae.exports)==="object"?ae.exports=f.document?u(f,!0):function(n){if(!n.document)throw new Error("EZUIPlayer requires a window with a document");return u(n)}:u(f)})(typeof window!="undefined"?window:void 0,function(f,u){var n;function i(y,h){for(var D=document.getElementsByTagName("head")[0].getElementsByTagName("script"),_=!1,E=0;E<D.length;E++)D[E].getAttribute("src")==y&&(_=!0,h());if(!_){var w=document.createElement("script");w.setAttribute("src",y),w.onload=h,document.getElementsByTagName("head")[0].appendChild(w)}}function r(y,h){for(var D=document.getElementsByTagName("head")[0].getElementsByTagName("link"),_=!1,E=0;E<D.length;E++)D[E].getAttribute("href")==y&&(_=!0,h());if(!_){var w=document.createElement("link");w.rel="stylesheet",w.type="text/css",w.href=y,w.onload=h,document.getElementsByTagName("head")[0].appendChild(w)}}function a(y,h,D,_,E,w){var z=y,S=new XMLHttpRequest;S.onreadystatechange=function(){if(S.readyState==4&&S.status==200){var g=JSON.parse(S.responseText);E(g)}},S.open(h,z,!0);var d=new FormData;for(var m in D)d.append(m,D[m]);S.send(d)}var l={EZUIKitPlayer:void 0,EZUIKitTalk:void 0,opt:{apiDomain:"https://open.ys7.com/api/lapp/live/talk/url",filePath:"https://open.ys7.com/assets/ezuikit_v2.6.4",accessToken:"",url:"",deviceSerial:"",channelNo:"",id:"",talkLink:"",rtcUrl:"",ttsUrl:"",stream:"",isReliesReady:!1,template:"simple",plugin:[],audio:1,autoplay:1,videoLoading:!1},state:(n={countTimer:void 0,recodeTime:0,recodeTimer:void 0},je(n,"recodeTime",0),je(n,"fetchDefaultList",!1),je(n,"page",0),je(n,"pageSize",5),n),handleTalkSuccess:function(){},handleTalkError:function(){}},s="https://open.ys7.com",b=s,T=function(h){var g=this;this.opt={id:h.id,apiDomain:s+"/api/lapp/live/talk/url",filePath:b+"/assets/ezuikit_v2.6.4",decoderVersion:"",accessToken:"",url:"",deviceSerial:"",channelNo:"",talkLink:"",rtcUrl:"",ttsUrl:"",stream:"",isReliesReady:!1,template:"simple",plugin:[],audio:1,autoplay:1,fullScreenStatus:0,bSupporDoubleClickFull:!0,videoLoading:!1},this.params=h,h.id&&(this.opt.id=h.id),h.accessToken&&(this.opt.accessToken=h.accessToken),typeof h.audio!="undefined"&&(this.opt.audio=h.audio),typeof h.decoderVersion!="undefined"&&(this.opt.decoderVersion=h.decoderVersion),typeof h.env!="undefined"&&(typeof h.env.domain!="undefined"&&(s=h.env.domain,this.opt.apiDomain=s+"/api/lapp/live/talk/url"),typeof h.env.filePathDomain!="undefined"&&(b=h.env.filePathDomain,this.opt.filePathDomain=h.env.filePathDomain)),h.url&&(this.opt.url=h.url,this.opt.deviceSerial=h.url.split("/")[3],this.opt.channelNo=h.url.split("/")[4].split(".")[0]),typeof h.template!="undefined"&&(this.opt.template=h.template),h.plugin&&(this.opt.plugin=h.plugin),typeof h.autoplay!="undefined"&&(this.opt.autoplay=h.autoplay?1:0),typeof h.bSupporDoubleClickFull!="undefined"&&(this.opt.bSupporDoubleClickFull=h.bSupporDoubleClickFull),typeof h.handleTalkSuccess!="undefined"&&(f.EZUIKit.handleTalkSuccess=h.handleTalkSuccess),typeof h.handleTalkError!="undefined"&&(f.EZUIKit.handleTalkError=h.handleTalkError);var D=this.opt.id,_=document.getElementById(D);_.style.fontSize=0,_.style.overflowY="auto",_.style.position="relative";var E=document.createElement("iframe");function w(){switch(g.opt.template){case"simple":var A=s+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+g.opt.url.replace("?","&")+"&autoplay="+g.opt.autoplay+"&audio="+g.opt.audio+"&accessToken="+h.accessToken+"&templete=0&id="+D+"&decoderVersion="+g.opt.decoderVersion,O="";return typeof h.controls!="undefined"&&h.controls&&(console.log("typeof",ue(h.controls)),O="play,voice,hd,fullScreen",h.controls.length>0&&(O=h.controls.join(","),A+="&controls="+O)),h.websocketParams&&(A+="&websocketParams="+JSON.stringify(h.websocketParams)),A;case"standard":return s+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+g.opt.url.replace("?","&")+"&autoplay="+g.opt.autoplay+"&audio="+g.opt.audio+"&accessToken="+h.accessToken+"&templete=1&id="+D+"&decoderVersion="+g.opt.decoderVersion;case"security":return s+"/ezopen/h5/iframe_se?bSupporDoubleClickFull=0&url="+g.opt.url.replace("?","&")+"&autoplay="+g.opt.autoplay+"&audio="+g.opt.audio+"&accessToken="+h.accessToken+"&templete=0&id="+D+"&decoderVersion="+g.opt.decoderVersion;case"theme":return A=s+"/jssdk/theme.html?url=".concat(h.url,"&accessToken=").concat(h.accessToken,"&id=").concat(D,"&isMobile=").concat(h.isMobile),typeof h.isMobile!="undefined"&&(A+="&isMobile="+h.isMobile),typeof h.autoplay!="undefined"&&(A+="&autoplay="+h.autoplay),typeof h.domain!="undefined"&&h.domain=="https://test12open.ys7.com"&&(A+="&env=test12"),typeof h.env!="undefined"&&typeof h.env.domain!="undefined"&&h.env.domain=="https://test12open.ys7.com"&&(A+="&env=test12"),typeof h.header!="undefined"&&(A+="&header="+h.header),A;default:return s+"/ezopen/h5/iframe?bSupporDoubleClickFull=0&url="+g.opt.url.replace("?","&")+"&autoplay="+g.opt.autoplay+"&audio="+g.opt.audio+"&accessToken="+h.accessToken+"&templete=0&id="+D+"&decoderVersion="+g.opt.decoderVersion}}E.src=w();var z=document.getElementById(D).offsetHeight,S=document.getElementById(D).offsetWidth;h.height&&(z=parseInt(h.height),/\%$/.test(h.height)&&(S=document.getElementById(D).offsetWidth*(parseInt(h.height)/100))),h.width&&(S=parseInt(h.width),/\%$/.test(h.width)&&(S=document.getElementById(D).offsetWidth*(parseInt(h.width)/100))),E.width=S,E.height=z,E.id="EZUIKitPlayer-"+D,E.setAttribute("allowfullscreen",!0),E.setAttribute("allow","autoplay"),E.setAttribute("frameborder",0),_.appendChild(E);var d=g.opt.filePath+"/js/jquery.js",m="https://open.ys7.com/assets/layer/layer.js";i(d,function(){i(m,function(){if(ge().headerContainer){var A=document.createElement("div");A.setAttribute("class","panel-top");var O=document.createElement("div");if(O.setAttribute("class","contros"),A.appendChild(O),_.insertBefore(A,E),ge().capturePictureModule){var H=document.createElement("span");H.innerHTML='<span title="截图"><svg id="capturePicture" title="截图" t="1578882764585" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5958" width="24" height="24"> <path d="M887.296 315.904h-153.6c-51.2 0-68.096-102.4-119.296-102.4H392.704c-34.304 0-51.2 102.4-102.4 102.4h-153.6c-29.696 0-51.2 21.504-51.2 51.2v439.296c0 25.6 21.504 47.104 51.2 47.104h751.104c29.696 0 51.2-21.504 51.2-51.2v-435.2c-0.512-30.208-21.504-51.2-51.712-51.2zM512 768c-115.2 0-204.8-89.6-204.8-200.704s89.6-200.704 204.8-200.704 204.8 89.6 204.8 200.704-93.696 200.704-204.8 200.704z m247.296-354.304c-12.8 0-25.6-12.8-25.6-25.6s12.8-25.6 25.6-25.6 25.6 12.8 25.6 25.6c0 17.408-12.8 25.6-25.6 25.6zM256 264.704c0-8.704-8.704-16.896-16.896-16.896h-51.2c-8.704 0-16.896 8.704-16.896 16.896V281.6H256v-16.896z m256 148.992c-85.504 0-153.6 68.096-153.6 153.6s68.096 153.6 153.6 153.6 153.6-68.096 153.6-153.6-68.096-153.6-153.6-153.6z" fill="#ffffff" p-id="5959"></path></svg></span>',H.onclick=function(){g.capturePicture()},O.appendChild(H)}if(console.log("matchHeaderOpt().saveModule",ge().saveModule),ge().saveModule){var Z=document.createElement("span");Z.innerHTML='<span title="开始录像"> <svg id="startSave" t="1578882716693" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3782" width="24" height="24"> <path d="M915.2 729.6l-128-76.8c-25.6-12.8-44.8-32-44.8-51.2V435.2c0-25.6 19.2-38.4 44.8-51.2l128-76.8c25.6-12.8 44.8 0 44.8 19.2V704c0 32-19.2 38.4-44.8 25.6z m-332.8 89.6H96c-51.2 0-89.6-38.4-89.6-89.6V332.8c0-51.2 38.4-89.6 89.6-89.6h486.4c51.2 0 89.6 38.4 89.6 89.6v396.8c0 51.2-38.4 89.6-89.6 89.6zM192 364.8c-32 6.4-57.6 32-64 64-12.8 57.6 38.4 115.2 96 102.4 32-6.4 57.6-32 64-70.4 12.8-57.6-38.4-108.8-96-96z m0 0" p-id="3783" fill="#ffffff"></path> </svg></span>',Z.onclick=function(){g.startSave(),document.getElementById("startSave").setAttribute("class","icon hide"),document.getElementById("stopSave").setAttribute("class","icon")},O.appendChild(Z);var X=document.createElement("span");X.innerHTML='<span title="结束录像"> <svg id="stopSave" t="1578882716693" class="icon hide" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3782" width="24" height="24"> <path d="M915.2 729.6l-128-76.8c-25.6-12.8-44.8-32-44.8-51.2V435.2c0-25.6 19.2-38.4 44.8-51.2l128-76.8c25.6-12.8 44.8 0 44.8 19.2V704c0 32-19.2 38.4-44.8 25.6z m-332.8 89.6H96c-51.2 0-89.6-38.4-89.6-89.6V332.8c0-51.2 38.4-89.6 89.6-89.6h486.4c51.2 0 89.6 38.4 89.6 89.6v396.8c0 51.2-38.4 89.6-89.6 89.6zM192 364.8c-32 6.4-57.6 32-64 64-12.8 57.6 38.4 115.2 96 102.4 32-6.4 57.6-32 64-70.4 12.8-57.6-38.4-108.8-96-96z m0 0" p-id="3783" fill="red"></path> </svg> </span>',X.onclick=function(){g.stopSave(),document.getElementById("stopSave").setAttribute("class","icon hide"),document.getElementById("startSave").setAttribute("class","icon")},O.appendChild(X)}if(ge().zoomModule){var ne=document.createElement("span");ne.innerHTML='<span title="开启电子放大"> <svg id="enableZoom" t="1578882639834" class="icon" viewBox="0 0 1000 1000" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2227" width="24" height="24"> <path d="M830.6119 441.1089c0-193.7756-157.0939-350.8641-350.8775-350.8641S128.8559 247.3333 128.8559 441.1089 285.9508 791.972 479.7344 791.972 830.6119 634.8845 830.6119 441.1089zM483.2821 710.4863c-146.7975 0-265.8187-118.9953-265.8187-265.8088S336.4847 178.8697 483.2821 178.8697s265.8197 118.9953 265.8197 265.8078S630.0796 710.4863 483.2821 710.4863zM770.6031 653.5739l-72.6417 75.9485 141.6917 160.1814 82.0737-90.0739L770.6031 653.5739zM527.5849 267.4727h-88.60655762279428v132.90489048425167H306.0690340253259v88.60292721534799h132.90933675248866v132.9038911617923h88.60655762279428V488.9794719180395h132.90933675248866v-88.60292721534799H527.5849284006089V267.4726535408993z" p-id="2228" fill="#ffffff"></path> </svg></span>',ne.onclick=function(){g.enableZoom(),document.getElementById("enableZoom").setAttribute("class","icon hide"),document.getElementById("closeZoom").setAttribute("class","icon")},O.appendChild(ne);var Y=document.createElement("span");Y.innerHTML='<span title="关闭电子放大"> <svg id="closeZoom" t="1578882639834" class="icon hide" viewBox="0 0 1000 1000" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2227" width="24" height="24"> <path d="M830.6119 441.1089c0-193.7756-157.0939-350.8641-350.8775-350.8641S128.8559 247.3333 128.8559 441.1089 285.9508 791.972 479.7344 791.972 830.6119 634.8845 830.6119 441.1089zM483.2821 710.4863c-146.7975 0-265.8187-118.9953-265.8187-265.8088S336.4847 178.8697 483.2821 178.8697s265.8197 118.9953 265.8197 265.8078S630.0796 710.4863 483.2821 710.4863zM770.6031 653.5739l-72.6417 75.9485 141.6917 160.1814 82.0737-90.0739L770.6031 653.5739zM527.5849 267.4727h-88.60655762279428v132.90489048425167H306.0690340253259v88.60292721534799h132.90933675248866v132.9038911617923h88.60655762279428V488.9794719180395h132.90933675248866v-88.60292721534799H527.5849284006089V267.4726535408993z" p-id="2228" fill="red"></path> </svg></span>',Y.onclick=function(){g.closeZoom(),document.getElementById("closeZoom").setAttribute("class","icon hide"),document.getElementById("enableZoom").setAttribute("class","icon")},O.appendChild(Y)}}function me(){var rt={footerContainer:!1,talkModule:!1,broadcastModule:!1,hdModule:!1,fullScreenModule:!1},Ae=g.opt.template;switch(Ae){case"simple":if(h.footer&&h.footer instanceof Array){var ye=h.footer;rt={footerContainer:!0,talkModule:ye.indexOf("talk")!==-1,broadcastModule:ye.indexOf("broadcast")!==-1,hdModule:ye.indexOf("hd")!==-1,fullScreenModule:ye.indexOf("fullScreen")!==-1}}break;case"standard":if(h.footer&&h.footer instanceof Array){var ye=h.footer;rt={footerContainer:!0,talkModule:ye.indexOf("talk")!==-1,broadcastModule:ye.indexOf("broadcast")!==-1,hdModule:ye.indexOf("hd")!==-1,fullScreenModule:ye.indexOf("fullScreen")!==-1}}break;case"security":break;case"voice":rt={footerContainer:!0,talkModule:!0,broadcastModule:!0,hdModule:!0,fullScreenModule:!0};break}return rt}function ge(){var rt={headerContainer:!1,capturePictureModule:!1,saveModule:!1,zoomModule:!1},Ae=g.opt.template;switch(Ae){case"simple":if(h.header&&h.header instanceof Array){var ye=h.header;rt={headerContainer:!0,capturePictureModule:ye.indexOf("capturePicture")!==-1,saveModule:ye.indexOf("save")!==-1,zoomModule:ye.indexOf("zoom")!==-1}}break;case"standard":break;case"security":break;case"voice":rt={headerContainer:!0,capturePictureModule:!0,saveModule:!0,zoomModule:!0};break}return rt}if(me().footerContainer||g.opt.plugin.indexOf("talk")!==-1){var ve=g.opt.filePath+"/npm/css/recoder.css",Ce=g.opt.filePath+"/npm/js/recoder.js",be=g.opt.filePath+"/recorder.js";if(r(ve,function(){}),i(Ce,function(){i(be,function(){})}),g.opt.plugin.indexOf("talk")!==-1||me().talkModule){var Pe=function(Ae){if(console.log("data",Ae),Ae.code==200){var ye=Ae.data;if(ye){var De=ye.rtcUrl;De.indexOf("ws")===-1&&(De=De.replace("https","wss").replace("rtcgw","rtcgw-ws")),g.opt.rtcUrl=De,g.opt.ttsUrl="tts://"+ye.ttsUrl;var Xe="talk://"+g.opt.deviceSerial+":0:"+g.opt.channelNo+":cas.ys7.com:6500";if(g.opt.talkLink=g.opt.ttsUrl+"/"+Xe,g.opt.stream=ye.stream,console.log("_this.opt",g.opt),!g.opt.isReliesReady){var P=g.opt.filePath+"/npm/js/adapeter.js",M=g.opt.filePath+"/npm/js/janus.js",F=g.opt.filePath+"/npm/js/tts.js";console.log("加载jquery.js"),i(P,function(){console.log("加载adapeter.js"),i(M,function(){console.log("加载janus.js"),i(F,function(){console.log("加载tts.js"),g.opt.isReliesReady=!0})})},function(){return!!f.adapter})}if(!document.getElementById("audioleft")){var j=document.createElement("div");j.style.display="none",j.id="audioleft",document.body.appendChild(j)}if(!document.getElementById("audioright")){var I=document.createElement("div");I.style.display="none",I.id="audioright",document.body.appendChild(I)}}}l.opt=g.opt,f.EZUIKit&&(f.EZUIKit.opt=g.opt)};a(g.opt.apiDomain,"POST",{accessToken:g.opt.accessToken,deviceSerial:g.opt.deviceSerial,channelNo:g.opt.channelNo},"",Pe)}if(me().footerContainer){var Ye=function(Ae,ye){if(clearInterval(l.state.countTimer),Ae==="add"){var De=ye;l.state.countTimer=setInterval(function(){++De,document.getElementById("time-area").innerHTML=Xe(De)},1e3)}else if(Ae==="sub"){var De=ye;l.state.countTimer=setInterval(function(){De>0?(De--,document.getElementById("time-area").innerHTML=Xe(De)):(clearInterval(l.state.countTimer),l.state.countTimer=void 0,console.log("倒计时结束,开启声音"))},1e3)}else Ae==="destory"&&(clearInterval(l.state.countTimer),l.state.countTimer=void 0,document.getElementById("time-area").innerHTML="00:00");function Xe(P){var M=parseInt(P),F=0,j=0,I="00",V="00",L="00";return M>59&&(F=parseInt(M/60),M=parseInt(M%60),F>59&&(j=parseInt(F/60),F=parseInt(F%60))),I=parseInt(M)>9?parseInt(M):"0"+parseInt(M),V=parseInt(F)>9?parseInt(F):"0"+parseInt(F),L=parseInt(j)>9?parseInt(j):"0"+parseInt(j),j>0?L+":"+V+":"+I:F>0?V+":"+I:"00:"+I}},N=document.createElement("div");if(N.setAttribute("class","audio-controls"),_.appendChild(N),me().hdModule||me().fullScreenModule){var K=document.createElement("div");if(K.setAttribute("class","contros"),N.appendChild(K),me().hdModule){var te=document.createElement("span");te.setAttribute("id","video-hd"),te.innerHTML=g.opt.url.indexOf(".hd")===-1?"标清":"高清",te.onclick=function(){if(g.opt.videoLoading)return layer.msg("视频加载中,请稍后"),!1;var rt=g.stop();g.opt.videoLoading=!0,rt.then(function(Ae){g.opt.videoLoading=!1,g.opt.url.indexOf(".hd")===-1?(g.opt.url=g.opt.url.replace(".live",".hd.live"),te.innerHTML=g.opt.url.indexOf(".hd")===-1?"标清":"高清"):(g.opt.url=g.opt.url.replace(".hd.live",".live"),te.innerHTML=g.opt.url.indexOf(".hd")===-1?"标清":"高清"),g.play(g.opt.url)}).catch(function(Ae){console.log("error",Ae)})},K.appendChild(te)}if(me().fullScreenModule){var ce=document.createElement("span");ce.setAttribute("class","hide"),ce.setAttribute("id","ezuikit-open-sound"),ce.setAttribute("title","打开声音"),ce.setAttribute("style","vertical-align: top;"),ce.innerHTML='<svg t="1590476263239" class="icon" viewBox="0 0 1178 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2273" width="16" height="16"><path d="M665.6 51.2 665.6 51.2c-10.24-30.72-40.96-51.2-71.68-51.2-5.12 0-15.36 0-20.48 5.12l0 0L358.4 153.6 51.2 209.92l0 0C20.48 220.16 0 250.88 0 281.6 0 286.72 0 291.84 0 307.2l0 0 0 409.6 0 0c0 15.36 0 20.48 0 25.6 0 30.72 20.48 61.44 51.2 71.68l0 0L358.4 870.4l97.28 71.68 107.52 76.8 0 0c5.12 5.12 15.36 5.12 25.6 5.12 40.96 0 76.8-35.84 76.8-76.8 0-10.24 0-10.24 0-25.6l0 0L665.6 51.2zM563.2 870.4l-153.6-102.4-307.2-51.2L102.4 307.2l307.2-51.2 153.6-102.4L563.2 870.4z" p-id="2274" fill="#FF0000"></path><path d="M1049.6 537.6l112.64-112.64c20.48-20.48 20.48-56.32 0-76.8-20.48-20.48-56.32-20.48-76.8 0L972.8 460.8l-112.64-112.64c0 0 0 0 0 0-20.48-20.48-56.32-20.48-76.8 0 0 0 0 0 0 0-20.48 20.48-20.48 56.32 0 76.8l112.64 112.64-112.64 112.64c-20.48 20.48-20.48 56.32 0 76.8 20.48 20.48 56.32 20.48 76.8 0L972.8 614.4l112.64 112.64c20.48 20.48 56.32 20.48 76.8 0s20.48-56.32 0-76.8L1049.6 537.6z" p-id="2275" fill="#FF0000"></path></svg>',ce.onclick=function(){g.openSound(0),ce.setAttribute("class","hide"),he.setAttribute("class","")};var he=document.createElement("span");ce.setAttribute("id","ezuikit-close-sound"),he.setAttribute("class","hide"),he.setAttribute("title","关闭声音"),he.setAttribute("style","vertical-align: top;"),he.innerHTML='<svg t="1590414410633" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20545" width="16" height="16"><path d="M840.533333 98.133333c-17.066667-17.066667-42.666667-17.066667-59.733333 0-17.066667 17.066667-17.066667 42.666667 0 59.733334C883.2 256 938.666667 392.533333 938.666667 533.333333c0 140.8-55.466667 277.333333-157.866667 375.466667-17.066667 17.066667-17.066667 42.666667 0 59.733333 8.533333 8.533333 21.333333 12.8 29.866667 12.8 8.533333 0 21.333333-4.266667 29.866666-12.8 115.2-110.933333 183.466667-268.8 183.466667-435.2 0-166.4-68.266667-324.266667-183.466667-435.2zM571.733333 12.8c-17.066667-8.533333-34.133333-4.266667-46.933333 8.533333L281.6 256H42.666667c-25.6 0-42.666667 17.066667-42.666667 42.666667v426.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h238.933333l243.2 234.666667c8.533333 8.533333 17.066667 12.8 29.866667 12.8 4.266667 0 12.8 0 17.066666-4.266667 17.066667-8.533333 25.6-21.333333 25.6-38.4V51.2c0-17.066667-8.533333-34.133333-25.6-38.4zM512 870.4l-183.466667-179.2c-8.533333-4.266667-17.066667-8.533333-29.866666-8.533333H85.333333V341.333333h213.333334c12.8 0 21.333333-4.266667 29.866666-12.8L512 153.6v716.8z" p-id="20546" fill="#ffffff"></path><path d="M759.466667 349.866667c-12.8-21.333333-38.4-25.6-59.733334-8.533334-21.333333 12.8-25.6 38.4-8.533333 59.733334 21.333333 29.866667 34.133333 76.8 34.133333 123.733333 0 46.933333-12.8 93.866667-34.133333 123.733333-12.8 21.333333-8.533333 46.933333 8.533333 59.733334 8.533333 4.266667 17.066667 8.533333 25.6 8.533333 12.8 0 25.6-4.266667 34.133334-17.066667 34.133333-46.933333 51.2-106.666667 51.2-174.933333 0-68.266667-17.066667-128-51.2-174.933333z" p-id="20547" fill="#ffffff"></path></svg>',he.onclick=function(){g.closeSound(0),ce.setAttribute("class",""),he.setAttribute("class","hide")},K.appendChild(ce),K.appendChild(he)}if(g.opt.audio==1?he.setAttribute("class",""):(ce.setAttribute("class",""),g.closeSound(0)),me().fullScreenModule){var Re=document.createElement("span");Re.setAttribute("title","全屏"),Re.setAttribute("style","vertical-align: top;"),Re.innerHTML='<svg id="fullScreen" t="1578020167938" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5035" width="16" height="16"> <path d="M348.373333 625.706667l-128 128-64 64v-128a33.28 33.28 0 0 0-35.413333-35.413334A33.493333 33.493333 0 0 0 85.333333 689.706667v213.333333A33.706667 33.706667 0 0 0 120.96 938.666667h213.333333a35.626667 35.626667 0 0 0 0-71.04h-128l64-64 128-128a35.2 35.2 0 0 0-49.92-49.92zM206.293333 156.373333h128a33.28 33.28 0 0 0 35.413334-35.413333A33.493333 33.493333 0 0 0 334.293333 85.333333H113.706667c-7.04 0-14.08 7.04-21.333334 14.293334a26.026667 26.026667 0 0 0-7.04 21.333333v213.333333a33.493333 33.493333 0 0 0 35.626667 35.413334 33.28 33.28 0 0 0 35.413333-35.413334v-128l192 192a35.2 35.2 0 0 0 49.92-49.92zM903.04 85.333333h-213.333333a33.493333 33.493333 0 0 0-35.413334 35.626667 33.28 33.28 0 0 0 35.413334 35.413333h128l-64 64-128 128a35.2 35.2 0 0 0 49.92 49.92l128-128 64-64v128a35.626667 35.626667 0 0 0 71.04 0v-213.333333A33.706667 33.706667 0 0 0 903.04 85.333333zM903.04 654.293333a33.28 33.28 0 0 0-35.413333 35.413334v128l-64-64-128-128a35.2 35.2 0 0 0-49.92 49.92l128 128 64 64h-128a35.626667 35.626667 0 0 0 0 71.04h213.333333A33.706667 33.706667 0 0 0 938.666667 903.04v-213.333333a33.493333 33.493333 0 0 0-35.626667-35.413334z" p-id="5036" fill="#ffffff"></path></svg>',Re.onclick=function(){g.fullScreen()},K.appendChild(Re)}}if(me().talkModule){var we=document.createElement("div"),ke=document.createElement("div");we.setAttribute("class","ptp-talk off"),we.innerHTML='<span title="对讲"><svg t="1581930496966" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1641" width="16" height="16"> <path d="M715.648 647.872c-30.208-22.336-61.568 39.36-100.992 77.44-39.36 38.08-34.112 31.488-123.392-17.088S311.488 540.224 280 491.648C248.448 443.072 265.472 424.704 265.472 424.704s78.72-62.976 97.152-81.344c18.368-18.368 13.12-30.208 13.12-30.208l-128.64-190.144c-23.616-5.184-64.32 5.12-128.576 57.6C54.208 233.088 30.592 353.856 151.296 575.68c120.768 221.824 347.84 330.752 485.568 374.08 137.856 43.328 228.416-61.696 249.408-103.68 21.056-41.984 13.12-85.312 13.12-85.312S745.856 670.208 715.648 647.872z" p-id="1642" fill="#ffffff"></path> <path d="M715.328 64C580.992 64 472.192 172.864 472.192 307.2s108.8 243.2 243.136 243.2 243.2-108.864 243.2-243.2S849.6 64 715.328 64zM715.328 461.056c-84.992 0-153.856-68.864-153.856-153.856s68.864-153.856 153.856-153.856 153.856 68.928 153.856 153.856S800.32 461.056 715.328 461.056z" p-id="1643" fill="#ffffff"></path> <path d="M777.472 277.376c-18.176 0-32.96-14.784-32.96-33.024 0-8.448 3.136-16.064 8.32-21.888-11.52-5.12-24.128-8-37.568-8-51.2 0-92.672 41.472-92.672 92.736s41.472 92.736 92.672 92.736S808.064 358.4 808.064 307.2c0-13.696-3.072-26.688-8.384-38.4C793.728 274.112 786.048 277.376 777.472 277.376zM715.328 340.928c-18.624 0-33.664-15.104-33.664-33.728 0-18.624 15.04-33.728 33.664-33.728 18.688 0 33.728 15.104 33.728 33.728C749.056 325.824 734.016 340.928 715.328 340.928z" p-id="1644" fill="#ffffff"></path> </svg> </span> <span>开启对讲</span>',we.onclick=function(){if(console.log("EZUIKit.state.countTimer",l.state.countTimer),l.state.countTimer)return f.layer.msg("语音设备正忙,请稍后重试"),!1;Ye("add",0),console.log("开始对讲,关闭声音"),g.closeSound(0),console.log(g.opt),g.startTalk(),this.setAttribute("class","ptp-talk off hide"),ke.setAttribute("class","ptp-talk on")},ke.setAttribute("class","ptp-talk on hide"),ke.innerHTML='<span title="对讲"> <svg t="1581930496966" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1641" width="16" height="16"> <path d="M715.648 647.872c-30.208-22.336-61.568 39.36-100.992 77.44-39.36 38.08-34.112 31.488-123.392-17.088S311.488 540.224 280 491.648C248.448 443.072 265.472 424.704 265.472 424.704s78.72-62.976 97.152-81.344c18.368-18.368 13.12-30.208 13.12-30.208l-128.64-190.144c-23.616-5.184-64.32 5.12-128.576 57.6C54.208 233.088 30.592 353.856 151.296 575.68c120.768 221.824 347.84 330.752 485.568 374.08 137.856 43.328 228.416-61.696 249.408-103.68 21.056-41.984 13.12-85.312 13.12-85.312S745.856 670.208 715.648 647.872z" p-id="1642" fill="#ff0000"></path> <path d="M715.328 64C580.992 64 472.192 172.864 472.192 307.2s108.8 243.2 243.136 243.2 243.2-108.864 243.2-243.2S849.6 64 715.328 64zM715.328 461.056c-84.992 0-153.856-68.864-153.856-153.856s68.864-153.856 153.856-153.856 153.856 68.928 153.856 153.856S800.32 461.056 715.328 461.056z" p-id="1643" fill="#ff0000"></path> <path d="M777.472 277.376c-18.176 0-32.96-14.784-32.96-33.024 0-8.448 3.136-16.064 8.32-21.888-11.52-5.12-24.128-8-37.568-8-51.2 0-92.672 41.472-92.672 92.736s41.472 92.736 92.672 92.736S808.064 358.4 808.064 307.2c0-13.696-3.072-26.688-8.384-38.4C793.728 274.112 786.048 277.376 777.472 277.376zM715.328 340.928c-18.624 0-33.664-15.104-33.664-33.728 0-18.624 15.04-33.728 33.664-33.728 18.688 0 33.728 15.104 33.728 33.728C749.056 325.824 734.016 340.928 715.328 340.928z" p-id="1644" fill="#ff0000"></path> </svg> </span><span>关闭对讲</span>',ke.onclick=function(){console.log(g.opt),g.stopTalk(),Ye("destory",0),g.openSound(0),this.setAttribute("class","ptp-talk on hide"),we.setAttribute("class","ptp-talk off")},N.appendChild(we),N.appendChild(ke)}if(me().broadcastModule){var We=function rt(Ae){function ye(De){console.log("data",De),De.code==200&&(yn(De.data,5),l.state.page=De.page.page,Ae==0&&De.data.length==0&&!l.state.fetchDefaultList&&(l.state.fetchDefaultList=!0,rt(0)))}a(s+"/api/lapp/voice/query","POST",{accessToken:g.opt.accessToken,pageStart:Ae,pageSize:l.state.pageSize,default:l.state.fetchDefaultList?"true":"false"},"",ye)},yn=function(Ae){if(console.log("renderVoliceList",Ae),Ae&&Ae.length>0){for(var ye=0;ye<Ae.length;ye++){var De=document.createElement("li");De.innerHTML="<li class='voice-item' id='voice-item-"+ye+"' data-time="+(Ae[ye].duration||20)+" data-url="+Ae[ye].fileUrl+">"+(Ae[ye].voiceName.length>10?Ae[ye].voiceName.substr(0,10)+"...":Ae[ye].voiceName)+"</li>",document.getElementsByClassName("voice-list-ul")[0].append(De),De.onclick=function(Xe){console.log("点击元素",Xe.target,Xe.target.dataset.url);var P=Xe.target.dataset.url,M=Xe.target.dataset.time;Yt(P,M)}}Ae.length===l.state.pageSize?document.getElementById("voice-list-end").innerHTML="向下滚动加载更多":document.getElementById("voice-list-end").innerHTML="没有更多数据了"}},Yt=function(Ae,ye){console.log("播放语音",Ae,ye);function De(Xe){console.log("data.data",Xe.data),Xe.code==200?Ye("sub",parseInt(ye)):Xe.code=="10001"?f.layer.msg("未找到当前语音"):f.layer.msg(Xe.msg||"发送失败,请稍后再试")}a(s+"/api/lapp/voice/send","POST",{accessToken:g.opt.accessToken,deviceSerial:g.opt.deviceSerial,channelNo:g.opt.channelNo,fileUrl:Ae},"",De)},It=document.createElement("div"),Ht=document.createElement("div");It.setAttribute("class","broadcast off"),Ht.setAttribute("class","broadcast on hide"),It.innerHTML=' <span title="语音播报"> <svg t="1583561695846" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1126" width="16" height="16"> <path d="M513.82044445 964.38044445c-8.192 0-15.47377778-2.73066667-21.84533334-8.192 0 0-46.42133333-41.87022222-99.21422222-86.47111112-89.20177778-73.728-117.41866667-88.29155555-123.79022222-90.112H35.04355555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666V271.70133333c0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666666H246.21511111c7.28177778-2.73066667 37.31911111-15.47377778 137.44355556-91.02222222 58.25422222-43.69066667 111.04711111-86.47111111 111.04711111-86.47111112 5.46133333-4.55111111 12.74311111-7.28177778 20.02488889-7.28177778 4.55111111 0 10.01244445 0.91022222 14.56355555 3.6408889 10.92266667 5.46133333 18.20444445 17.29422222 18.20444445 30.03733333v837.40444444c0 12.74311111-7.28177778 25.48622222-19.11466667 30.94755556-5.46133333 1.82044445-10.01244445 2.73066667-14.56355555 2.73066667zM270.79111111 724.992c19.11466667 0 48.24177778 8.192 167.48088889 106.496 16.384 13.65333333 33.67822222 28.21688889 51.88266667 43.69066667l5.46133333 4.55111111V139.71911111l-5.46133333 3.64088889c-22.75555555 17.29422222-44.60088889 34.58844445-65.536 50.06222222C293.54666667 291.72622222 264.41955555 299.008 245.30488889 299.008H82.37511111c-20.02488889 0-21.84533333 12.74311111-21.84533333 26.39644445V694.04444445c0 23.66577778 6.37155555 30.03733333 28.21688889 30.03733333h180.224l1.82044444 0.91022222z m520.64711111 162.01955555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666 0-11.83288889 8.192-20.02488889 16.384-24.576 112.86755555-67.35644445 182.04444445-191.14666667 182.04444444-324.03911111 0-132.89244445-70.08711111-256.68266667-182.04444444-324.03911111-10.01244445-5.46133333-15.47377778-14.56355555-15.47377778-24.576 0-14.56355555 11.83288889-27.30666667 26.39644445-27.30666667 5.46133333 0 10.01244445 1.82044445 16.384 5.46133333 128.34133333 76.45866667 207.53066667 218.45333333 207.53066666 369.55022222 0 152.00711111-80.09955555 293.09155555-208.44088889 369.55022223-6.37155555 5.46133333-10.92266667 7.28177778-16.384 7.28177777z m-90.112-152.91733333c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666667 0-10.01244445 4.55111111-18.20444445 12.74311111-23.66577777 61.89511111-34.58844445 100.12444445-100.12444445 100.12444444-171.12177778 0-70.08711111-37.31911111-134.71288889-96.48355555-170.21155555-8.192-4.55111111-12.74311111-13.65333333-12.74311111-23.66577778 0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666667 4.55111111 0 11.83288889 2.73066667 15.47377778 4.55111111 74.63822222 44.60088889 121.96977778 127.43111111 121.96977778 215.72266667 0 90.112-48.24177778 173.85244445-125.61066667 218.45333333-1.82044445 0-9.10222222 4.55111111-15.47377778 4.55111111z" fill="#ffffff" p-id="1127"></path> </svg></span><span>语音播报</span>',It.onclick=function(){this.setAttribute("class","broadcast off hide"),Ht.setAttribute("class","broadcast on")},Ht.innerHTML='<div class="pop-hover"> <div class="pop-hover-content"> <div class="vioce-list" id="voice-list"> <ul class="voice-list-ul"> </ul> <div id="voice-list-end"></div> </div> <div id="voice-custom" style="text-align: center;">自定义语音</div> </div></div><span title="语音播报"> <svg t="1583561695846" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1126" width="16" height="16"> <path d="M513.82044445 964.38044445c-8.192 0-15.47377778-2.73066667-21.84533334-8.192 0 0-46.42133333-41.87022222-99.21422222-86.47111112-89.20177778-73.728-117.41866667-88.29155555-123.79022222-90.112H35.04355555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666V271.70133333c0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666666H246.21511111c7.28177778-2.73066667 37.31911111-15.47377778 137.44355556-91.02222222 58.25422222-43.69066667 111.04711111-86.47111111 111.04711111-86.47111112 5.46133333-4.55111111 12.74311111-7.28177778 20.02488889-7.28177778 4.55111111 0 10.01244445 0.91022222 14.56355555 3.6408889 10.92266667 5.46133333 18.20444445 17.29422222 18.20444445 30.03733333v837.40444444c0 12.74311111-7.28177778 25.48622222-19.11466667 30.94755556-5.46133333 1.82044445-10.01244445 2.73066667-14.56355555 2.73066667zM270.79111111 724.992c19.11466667 0 48.24177778 8.192 167.48088889 106.496 16.384 13.65333333 33.67822222 28.21688889 51.88266667 43.69066667l5.46133333 4.55111111V139.71911111l-5.46133333 3.64088889c-22.75555555 17.29422222-44.60088889 34.58844445-65.536 50.06222222C293.54666667 291.72622222 264.41955555 299.008 245.30488889 299.008H82.37511111c-20.02488889 0-21.84533333 12.74311111-21.84533333 26.39644445V694.04444445c0 23.66577778 6.37155555 30.03733333 28.21688889 30.03733333h180.224l1.82044444 0.91022222z m520.64711111 162.01955555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666 0-11.83288889 8.192-20.02488889 16.384-24.576 112.86755555-67.35644445 182.04444445-191.14666667 182.04444444-324.03911111 0-132.89244445-70.08711111-256.68266667-182.04444444-324.03911111-10.01244445-5.46133333-15.47377778-14.56355555-15.47377778-24.576 0-14.56355555 11.83288889-27.30666667 26.39644445-27.30666667 5.46133333 0 10.01244445 1.82044445 16.384 5.46133333 128.34133333 76.45866667 207.53066667 218.45333333 207.53066666 369.55022222 0 152.00711111-80.09955555 293.09155555-208.44088889 369.55022223-6.37155555 5.46133333-10.92266667 7.28177778-16.384 7.28177777z m-90.112-152.91733333c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666667 0-10.01244445 4.55111111-18.20444445 12.74311111-23.66577777 61.89511111-34.58844445 100.12444445-100.12444445 100.12444444-171.12177778 0-70.08711111-37.31911111-134.71288889-96.48355555-170.21155555-8.192-4.55111111-12.74311111-13.65333333-12.74311111-23.66577778 0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666667 4.55111111 0 11.83288889 2.73066667 15.47377778 4.55111111 74.63822222 44.60088889 121.96977778 127.43111111 121.96977778 215.72266667 0 90.112-48.24177778 173.85244445-125.61066667 218.45333333-1.82044445 0-9.10222222 4.55111111-15.47377778 4.55111111z" fill="#ff0000" p-id="1127"></path> </svg></span><span>语音播报</span>',Ht.onclick=function(){this.setAttribute("class","broadcast on hide"),It.setAttribute("class","broadcast off")},N.appendChild(It),N.appendChild(Ht),document.getElementById("voice-custom").onclick=function(){console.log("显示自定义语音"),Ge.setAttribute("class","speak off")},We(0);var Ge=document.createElement("div"),Ct=document.createElement("div");Ge.setAttribute("class","speak off hide"),Ct.setAttribute("class","speak on hide"),Ge.setAttribute("id","startSpeak"),Ct.setAttribute("id","stopSpeak"),Ge.innerHTML='<span title="按住说话"> <svg t="1581994757678" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1639" width="16" height="16"> <path d="M757.059829 393.846154v-52.512821h262.564103v52.512821H757.059829z m-420.102564 481.367521v96.273504h175.042735a8.752137 8.752137 0 0 1 8.752137 8.752137v35.008547a8.752137 8.752137 0 0 1-8.752137 8.752137H109.401709a8.752137 8.752137 0 0 1-8.752136-8.752137v-35.008547a8.752137 8.752137 0 0 1 8.752136-8.752137h175.042735v-96.273504C129.767932 875.213675 4.376068 749.821812 4.376068 595.145299V463.863248a26.25641 26.25641 0 1 1 52.512821 0v113.777778c0 140.174222 113.637744 253.811966 253.811966 253.811965s253.811966-113.637744 253.811966-253.811965V463.863248a26.25641 26.25641 0 1 1 52.51282 0v131.282051c0 154.676513-125.391863 280.068376-280.068376 280.068376z m-26.25641-96.273504c-111.178393 0-201.299145-90.120752-201.299146-201.299145V201.299145C109.401709 90.120752 199.522462 0 310.700855 0s201.299145 90.120752 201.299145 201.299145v376.341881c0 111.178393-90.120752 201.299145-201.299145 201.299145z m691.418803-280.068376H757.059829v-52.512821h245.059829v52.512821z m-17.504273 105.025641H757.059829v-52.512821h227.555556v52.512821z m-17.504274 105.025641H757.059829v-52.512821h210.051282v52.512821z m-8.752137 105.025641H757.059829v-52.512821h201.299145v52.512821z m-17.504273 105.025641H757.059829v-52.512821h183.794872v52.512821z m-26.25641 105.025641H757.059829v-52.512821h157.538462v52.512821z" p-id="1640" fill="#ffffff"></path> </svg></span><span>按住说话</span>',Ct.innerHTML='<span title="按住说话"><svg t="1581994757678" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1639" width="16" height="16"> <path d="M757.059829 393.846154v-52.512821h262.564103v52.512821H757.059829z m-420.102564 481.367521v96.273504h175.042735a8.752137 8.752137 0 0 1 8.752137 8.752137v35.008547a8.752137 8.752137 0 0 1-8.752137 8.752137H109.401709a8.752137 8.752137 0 0 1-8.752136-8.752137v-35.008547a8.752137 8.752137 0 0 1 8.752136-8.752137h175.042735v-96.273504C129.767932 875.213675 4.376068 749.821812 4.376068 595.145299V463.863248a26.25641 26.25641 0 1 1 52.512821 0v113.777778c0 140.174222 113.637744 253.811966 253.811966 253.811965s253.811966-113.637744 253.811966-253.811965V463.863248a26.25641 26.25641 0 1 1 52.51282 0v131.282051c0 154.676513-125.391863 280.068376-280.068376 280.068376z m-26.25641-96.273504c-111.178393 0-201.299145-90.120752-201.299146-201.299145V201.299145C109.401709 90.120752 199.522462 0 310.700855 0s201.299145 90.120752 201.299145 201.299145v376.341881c0 111.178393-90.120752 201.299145-201.299145 201.299145z m691.418803-280.068376H757.059829v-52.512821h245.059829v52.512821z m-17.504273 105.025641H757.059829v-52.512821h227.555556v52.512821z m-17.504274 105.025641H757.059829v-52.512821h210.051282v52.512821z m-8.752137 105.025641H757.059829v-52.512821h201.299145v52.512821z m-17.504273 105.025641H757.059829v-52.512821h183.794872v52.512821z m-26.25641 105.025641H757.059829v-52.512821h157.538462v52.512821z" p-id="1640" fill="#ff0000"></path></svg></span><span>松开发送</span>',N.appendChild(Ge),N.appendChild(Ct),document.getElementById("voice-list").onscroll=function(rt){var Ae=this.scrollHeight;console.log("sum",Ae,this.scrollTop,document.getElementById("voice-list").clientHeight),Ae<=this.scrollTop+this.clientHeight&&(console.log("拖动到底,执行加载",l.state.page),We(++l.state.page))};var kt=document.createElement("div");kt.setAttribute("class","time-area"),kt.setAttribute("id","time-area"),kt.innerHTML="00:00",N.appendChild(kt);var Oe;document.getElementById("startSpeak").onmousedown=function(){if(l.state.countTimer)return f.layer.msg("语音设备正忙,请稍后重试"),!1;console.log("按住说话"),Ge.setAttribute("class","speak off hide"),Ct.setAttribute("class","speak on"),De(),Ye("add",0),setTimeout(function(){l.state.recodeTime=0,ye()},1e3),l.state.recodeTimer&&clearInterval(l.state.recodeTimer),l.state.recodeTimer=setInterval(function(){l.state.recodeTime>=59?(g.stopTalk(),Ye("destory",0),this.setAttribute("class","ptp-talk on hide"),we.setAttribute("class","ptp-talk off"),f.layer.msg("不超过1分钟")):l.state.recodeTime=l.state.recodeTime+1},1e3);var rt;function Ae(Xe){var P=rt.createMediaStreamSource(Xe);Oe=new f.Recorder(P)}function ye(){Oe&&Oe.record()}function De(){console.log("run init");try{f.AudioContext=f.AudioContext||f.webkitAudioContext,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia,f.URL=f.URL||f.webkitURL,rt=new AudioContext,console.log("Audio context set up."),console.log("navigator.getUserMedia "+(navigator.getUserMedia?"available.":"not present!"))}catch(Xe){console.log("err",Xe),f.layer.msg("No web audio support in this browser!")}navigator.getUserMedia({audio:!0},Ae,function(Xe){console.log("No live audio input: "+Xe)})}},document.getElementById("stopSpeak").onmouseup=function(){console.log("松开发送"),Ct.setAttribute("class","speak on hide"),rt();function rt(){if(Ye("destory",0),l.state.recodeTime<1)return f.layer.msg("说话时间过短"),clearInterval(l.state.recodeTimer),!1;clearInterval(l.state.recodeTimer),Ae()}function Ae(){try{Oe&&Oe.stop(),Oe&&Oe.exportWAV(function(ye){if(console.log("wav_file",ye),ye.size<1e3)return f.layer.msg("录音失败,请重试"),l.state.recodeTime=0,!1;Ye("sub",l.state.recodeTime+2);var De=new FormData;De.append("voiceFile",ye),De.append("accessToken",g.opt.accessToken),De.append("deviceSerial",g.opt.deviceSerial),De.append("channelNo",g.opt.channelNo);function Xe(M){console.log("data.data",M.data),M.code==200?Ye("sub",l.state.recodeTime+2):M.code=="10001"?f.layer.msg("未找到当前语音"):f.layer.msg(M.msg||"发送失败,请稍后再试")}function P(M){console.log("err",M)}a(s+"/api/lapp/voice/sendonce","POST",{voiceFile:ye,accessToken:g.opt.accessToken,deviceSerial:g.opt.deviceSerial,channelNo:g.opt.channelNo},"",Xe,P)}),Oe&&Oe.clear()}catch(ye){console.log(ye)}}}}}}})});var g=this;f.addEventListener("message",function(A){A.origin;var O=g.opt.id;if(A.data.type)switch(A.data.type){case"openSound":O==A.data.id&&h.openSoundCallBack&&h.openSoundCallBack(A.data);break;case"closeSound":O==A.data.id&&h.closeSoundCallBack&&h.closeSoundCallBack(A.data);break;case"capturePicture":O==A.data.id&&h.capturePictureCallBack&&h.capturePictureCallBack(A.data);break;case"startSave":O==A.data.id&&h.startSaveCallBack&&h.startSaveCallBack(A.data);break;case"stopSave":O==A.data.id&&h.stopSaveCallBack&&h.stopSaveCallBack(A.data);break;case"fullScreen":O==A.data.id&&h.fullScreenCallBack&&h.fullScreenCallBack(A.data);break;case"getOSDTime":O==A.data.id&&h.getOSDTimeCallBack&&h.getOSDTimeCallBack(A.data);break;case"handleSuccess":O==A.data.id&&h.handleSuccess&&h.handleSuccess(A.data);break;case"handleError":O==A.data.id&&h.handleError&&h.handleError(A.data);break;case"dblclick":O==A.data.id&&g.opt.bSupporDoubleClickFull&&(g.opt.fullScreenStatus===0?g.fullScreen():g.cancelFullScreen());break;case"startTalk":g.startTalk(),g.closeSound();break;case"stopTalk":g.stopTalk(),g.openSound();break;case"clickEventHandle":console.log("event.data",A.data),h.clickEventHandle&&h.clickEventHandle(A.data);break;case"removeEventHandle":h.removeEventHandle&&h.removeEventHandle(A.data);break;case"esc":h.clickEventHandle&&h.clickEventHandle(A.data);break;case"iframeFullScreen":if(O==A.data.id){var H=function(X){var ne=X.requestFullScreen||X.webkitRequestFullScreen||X.mozRequestFullScreen||X.msRequestFullScreen;if(ne)ne.call(X);else if(typeof f.ActiveXObject!="undefined"){var Y=new ActiveXObject("WScript.Shell");Y!==null&&Y.SendKeys("{F11}")}};H(document.getElementById("EZUIKitPlayer-"+A.data.id))}break}});function k(A){g.opt.fullScreenStatus=A?1:0,h.fullScreenChangeCallBack&&h.fullScreenChangeCallBack({data:A,id:g.opt.id})}typeof document.fullScreen!="undefined"?document.addEventListener("fullscreenchange",function(){var A=document.fullscreen||!1;k(A)}):typeof document.webkitIsFullScreen!="undefined"?document.addEventListener("webkitfullscreenchange",function(){var A=document.webkitIsFullScreen||!1;k(A)}):typeof document.mozFullScreen!="undefined"&&document.addEventListener("mozfullscreenchange",function(){var A=document.mozFullScreen||!1;k(A)})};T.prototype.play=function(y){var h="EZUIKitPlayer-"+this.opt.id,D=document.getElementById(h).contentWindow;ue(y)==="object"&&y.url&&(this.opt.url=y.url),ue(y)==="object"&&y.accessToken&&(this.opt.accessToken=y.accessToken),typeof y=="string"&&(this.opt.url=y),D.postMessage({action:"play",accessToken:this.opt.accessToken,url:this.opt.url},s+"/ezopen/h5/iframe");var _=this;this.opt.videoLoading=!0;var E=new Promise(function(w,z){f.addEventListener("message",function(S){var d=_.opt.id;d==S.data.id&&S.data.type==="handleSuccess"&&(setTimeout(function(){_.opt.videoLoading=!1},1e3),w(S.data))})});return E},T.prototype.stop=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("stop",s+"/ezopen/h5/iframe");var D=this,_=new Promise(function(E,w){f.addEventListener("message",function(z){var S=D.opt.id;S==z.data.id&&z.data.type==="stop"&&E(z.data)})});return _},T.prototype.openSound=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("openSound",s+"/ezopen/h5/iframe");var D=this,_=new Promise(function(E,w){f.addEventListener("message",function(z){var S=D.opt.id;S==z.data.id&&z.data.type==="openSound"&&E(z.data)})});return _},T.prototype.closeSound=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("closeSound",s+"/ezopen/h5/iframe");var D=this,_=new Promise(function(E,w){f.addEventListener("message",function(z){var S=D.opt.id;S==z.data.id&&z.data.type==="closeSound"&&E(z.data)})});return _},T.prototype.startSave=function(y){var h="EZUIKitPlayer-"+this.opt.id,D=document.getElementById(h).contentWindow;D.postMessage({action:"startSave",fileName:y||"default"},s+"/ezopen/h5/iframe");var _=this,E=new Promise(function(w,z){f.addEventListener("message",function(S){var d=_.opt.id;d==S.data.id&&S.data.type==="startSave"&&w(S.data)})});return E},T.prototype.stopSave=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("stopSave",s+"/ezopen/h5/iframe");var D=this,_=new Promise(function(E,w){f.addEventListener("message",function(z){var S=D.opt.id;S==z.data.id&&z.data.type==="stopSave"&&E(z.data)})});return _},T.prototype.fullScreen=function(){if(this.opt.fullScreenStatus===1)return!1;var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var D=document.documentElement.clientWidth,_=document.documentElement.clientHeight,E=document.body;E=document.getElementById(y);var w="";w+="width:"+_+"px;",w+="height:"+D+"px;",w+="-webkit-transform: rotate(90deg); transform: rotate(90deg);",w+="-webkit-transform-origin: "+D/2+"px "+D/2+"px;",w+="transform-origin: "+D/2+"px "+D/2+"px;",w+="position: fixed;top: 0;left: 0;z-index:10",E.style.cssText=w,setTimeout(function(){h.postMessage("autoResize",s+"/ezopen/h5/iframe")},500)}else{var z=function(d){var m=d.requestFullScreen||d.webkitRequestFullScreen||d.mozRequestFullScreen||d.msRequestFullScreen;if(m)m.call(d);else if(typeof f.ActiveXObject!="undefined"){var g=new ActiveXObject("WScript.Shell");g!==null&&g.SendKeys("{F11}")}};z(document.getElementById(y))}this.params.fullScreenCallBack&&this.params.fullScreenCallBack(this.opt.id),this.opt.fullScreenStatus=1},T.prototype.cancelFullScreen=function(){if(this.opt.fullScreenStatus===0)return!1;var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;if(navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)){var D=document.getElementById(y).width,_=document.getElementById(y).height,E=document.body;E=document.getElementById(y);var w="";w+="width:"+D+"px;",w+="height:"+_+"px;",w+="-webkit-transform: none; transform: none;",w+="-webkit-transform-origin: 0 0;",w+="transform-origin: 0 0;",E.style.cssText=w,setTimeout(function(){h.postMessage("autoResize",s+"/ezopen/h5/iframe")},500);var z=y+"cancel-full-screen",S=document.getElementById(z);S&&document.body.removeChild(S)}else document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen&&document.mozCancelFullScreen();this.params.cancelFullScreenCallBack&&this.params.cancelFullScreenCallBack(this.opt.id),this.opt.fullScreenStatus=0},T.prototype.capturePicture=function(y,h){var D="EZUIKitPlayer-"+this.opt.id,_=document.getElementById(D).contentWindow;_.postMessage({action:"capturePicture",fileName:y||"default",isUndownload:h},s+"/ezopen/h5/iframe");var E=this,w=new Promise(function(z,S){f.addEventListener("message",function(d){var m=E.opt.id;m==d.data.id&&d.data.type==="capturePicture"&&z(d.data)})});return w},T.prototype.enableZoom=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("enableZoom",s+"/ezopen/h5/iframe")},T.prototype.closeZoom=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("closeZoom",s+"/ezopen/h5/iframe")},T.prototype.getOSDTime=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("getOSDTime",s+"/ezopen/h5/iframe");var D=this,_=new Promise(function(E,w){f.addEventListener("message",function(z){var S=D.opt.id;S==z.data.id&&z.data.type==="getOSDTime"&&E(z.data)})});return _},T.prototype.autoResize=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("autoResize",s+"/ezopen/h5/iframe")},T.prototype.reSize=function(y,h){var D="EZUIKitPlayer-"+this.opt.id,_=document.getElementById(D).contentWindow,E=document.getElementById(this.opt.id);E.style.width=y+"px",E.style.height=h+"px",document.getElementById(this.opt.id).style.width=y+"px",document.getElementById(this.opt.id).style.height=h+"px";var w=document.getElementById(D);w.setAttribute("width",y),w.setAttribute("height",h),w.style.width=y+"px",w.style.height=h+"px",setTimeout(function(){_.postMessage({action:"autoResize"},s+"/ezopen/h5/iframe")},500)},T.prototype.startTalk=function(){console.log("执行开始对讲"),console.log(this.opt);var y=this;l.opt=this.opt,f.EZUIKit&&(f.EZUIKit.opt=this.opt);var h=function(_){if(_.code==200){var E=_.data;if(E){var w=E.rtcUrl;w.indexOf("ws")===-1&&(w=w.replace("https","wss").replace("rtcgw","rtcgw-ws")),y.opt.rtcUrl=w,y.opt.ttsUrl="tts://"+E.ttsUrl;var z="talk://"+y.opt.deviceSerial+":0:"+y.opt.channelNo+":cas.ys7.com:6500";y.opt.talkLink=y.opt.ttsUrl+"/"+z,y.opt.stream=E.stream,f.startTalk()}}};a(y.opt.apiDomain,"POST",{accessToken:y.opt.accessToken,deviceSerial:y.opt.deviceSerial,channelNo:y.opt.channelNo},"",h)},T.prototype.stopTalk=function(){console.log("执行结束对讲"),f.stopTalk()},T.prototype.edit=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage("edit",s+"/ezopen/h5/iframe")},T.prototype.btnReRender=function(y){var h="EZUIKitPlayer-"+this.opt.id,D=document.getElementById(h).contentWindow;D.postMessage({action:"btnReRender",data:y},s+"/ezopen/h5/iframe")},T.prototype.changePlayUrl=function(y){y.deviceSerial&&(this.opt.deviceSerial=y.deviceSerial),y.channelNo&&(this.opt.channelNo=y.channelNo),y.accessToken&&(this.opt.accessToken=y.accessToken);var h="EZUIKitPlayer-"+this.opt.id,D=document.getElementById(h).contentWindow;D.postMessage({action:"changePlayUrl",data:y},s+"/ezopen/h5/iframe")},T.prototype.fetchThemeData=function(){var y="EZUIKitPlayer-"+this.opt.id,h=document.getElementById(y).contentWindow;h.postMessage({action:"fetchThemeData"},s+"/ezopen/h5/iframe")},T.prototype.setThemeData=function(y,h,D){var _="EZUIKitPlayer-"+this.opt.id,E=document.getElementById(_).contentWindow;E.postMessage({action:"setThemeData",data:{accessToken:y,header:h,footer:D}},s+"/ezopen/h5/iframe")},l.EZUIKitPlayer=T,f.EZUIKitV3=l;var C=l;return C});var Ms=EZUIKitV3,Br=function(u){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=void 0,a=void 0,l=void 0,s=[];return function(){var C=Ns(n),y=new Date().getTime(),h=!r||y-r>C;r=y;for(var D=arguments.length,_=Array(D),E=0;E<D;E++)_[E]=arguments[E];if(h&&i.leading)return i.accumulate?Promise.resolve(u.call(this,[_])).then(function(z){return z[0]}):Promise.resolve(u.call.apply(u,[this].concat(_)));if(a?clearTimeout(l):a=Fs(),s.push(_),l=setTimeout(b.bind(this),C),i.accumulate){var w=s.length-1;return a.promise.then(function(z){return z[w]})}return a.promise};function b(){var T=a;clearTimeout(l),Promise.resolve(i.accumulate?u.call(this,s):u.apply(this,s[s.length-1])).then(T.resolve,T.reject),s=[],a=null}};function Ns(f){return typeof f=="function"?f():f}function Fs(){var f={};return f.promise=new Promise(function(u,n){f.resolve=u,f.reject=n}),f}(function(){var f;function u(N){var K=0;return function(){return K<N.length?{done:!1,value:N[K++]}:{done:!0}}}var n=typeof Object.defineProperties=="function"?Object.defineProperty:function(N,K,te){return N==Array.prototype||N==Object.prototype||(N[K]=te.value),N};function i(N){N=[typeof globalThis=="object"&&globalThis,N,typeof window=="object"&&window,typeof self=="object"&&self,typeof Zn=="object"&&Zn];for(var K=0;K<N.length;++K){var te=N[K];if(te&&te.Math==Math)return te}throw Error("Cannot find global object")}var r=i(this);function a(N,K){if(K)e:{var te=r;N=N.split(".");for(var ce=0;ce<N.length-1;ce++){var he=N[ce];if(!(he in te))break e;te=te[he]}N=N[N.length-1],ce=te[N],K=K(ce),K!=ce&&K!=null&&n(te,N,{configurable:!0,writable:!0,value:K})}}a("Symbol",function(N){function K(Re){if(this instanceof K)throw new TypeError("Symbol is not a constructor");return new te(ce+(Re||"")+"_"+he++,Re)}function te(Re,we){this.A=Re,n(this,"description",{configurable:!0,writable:!0,value:we})}if(N)return N;te.prototype.toString=function(){return this.A};var ce="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",he=0;return K}),a("Symbol.iterator",function(N){if(N)return N;N=Symbol("Symbol.iterator");for(var K="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),te=0;te<K.length;te++){var ce=r[K[te]];typeof ce=="function"&&typeof ce.prototype[N]!="function"&&n(ce.prototype,N,{configurable:!0,writable:!0,value:function(){return l(u(this))}})}return N});function l(N){return N={next:N},N[Symbol.iterator]=function(){return this},N}function s(N){var K=typeof Symbol!="undefined"&&Symbol.iterator&&N[Symbol.iterator];return K?K.call(N):{next:u(N)}}var b;if(typeof Object.setPrototypeOf=="function")b=Object.setPrototypeOf;else{var T;e:{var C={a:!0},y={};try{y.__proto__=C,T=y.a;break e}catch(N){}T=!1}b=T?function(N,K){if(N.__proto__=K,N.__proto__!==K)throw new TypeError(N+" is not extensible");return N}:null}var h=b;function D(){this.m=!1,this.j=null,this.v=void 0,this.h=1,this.u=this.C=0,this.l=null}function _(N){if(N.m)throw new TypeError("Generator is already running");N.m=!0}D.prototype.o=function(N){this.v=N},D.prototype.s=function(N){this.l={D:N,F:!0},this.h=this.C||this.u},D.prototype.return=function(N){this.l={return:N},this.h=this.u};function E(N,K){return N.h=3,{value:K}}function w(N){this.g=new D,this.G=N}w.prototype.o=function(N){return _(this.g),this.g.j?S(this,this.g.j.next,N,this.g.o):(this.g.o(N),d(this))};function z(N,K){_(N.g);var te=N.g.j;return te?S(N,"return"in te?te.return:function(ce){return{value:ce,done:!0}},K,N.g.return):(N.g.return(K),d(N))}w.prototype.s=function(N){return _(this.g),this.g.j?S(this,this.g.j.throw,N,this.g.o):(this.g.s(N),d(this))};function S(N,K,te,ce){try{var he=K.call(N.g.j,te);if(!(he instanceof Object))throw new TypeError("Iterator result "+he+" is not an object");if(!he.done)return N.g.m=!1,he;var Re=he.value}catch(we){return N.g.j=null,N.g.s(we),d(N)}return N.g.j=null,ce.call(N.g,Re),d(N)}function d(N){for(;N.g.h;)try{var K=N.G(N.g);if(K)return N.g.m=!1,{value:K.value,done:!1}}catch(te){N.g.v=void 0,N.g.s(te)}if(N.g.m=!1,N.g.l){if(K=N.g.l,N.g.l=null,K.F)throw K.D;return{value:K.return,done:!0}}return{value:void 0,done:!0}}function m(N){this.next=function(K){return N.o(K)},this.throw=function(K){return N.s(K)},this.return=function(K){return z(N,K)},this[Symbol.iterator]=function(){return this}}function g(N,K){return K=new m(new w(K)),h&&N.prototype&&h(K,N.prototype),K}function k(N,K){N instanceof String&&(N+="");var te=0,ce=!1,he={next:function(){if(!ce&&te<N.length){var Re=te++;return{value:K(Re,N[Re]),done:!1}}return ce=!0,{done:!0,value:void 0}}};return he[Symbol.iterator]=function(){return he},he}if(a("Array.prototype.entries",function(N){return N||function(){return k(this,function(K,te){return[K,te]})}}),typeof Blob!="undefined"&&(typeof FormData=="undefined"||!FormData.prototype.keys)){var A=function(N,K){for(var te=0;te<N.length;te++)K(N[te])},O=function(N){return N.replace(/\r?\n|\r/g,`\r
|
|
|
`)},H=function(N,K,te){return K instanceof Blob?(te=te!==void 0?te+"":typeof K.name=="string"?K.name:"blob",(K.name!==te||Object.prototype.toString.call(K)==="[object Blob]")&&(K=new File([K],te)),[String(N),K]):[String(N),String(K)]},Z=function(N,K){if(N.length<K)throw new TypeError(K+" argument required, but only "+N.length+" present.")},X=typeof globalThis=="object"?globalThis:typeof window=="object"?window:typeof self=="object"?self:this,ne=X.FormData,Y=X.XMLHttpRequest&&X.XMLHttpRequest.prototype.send,me=X.Request&&X.fetch,ge=X.navigator&&X.navigator.sendBeacon,ve=X.Element&&X.Element.prototype,Ce=X.Symbol&&Symbol.toStringTag;Ce&&(Blob.prototype[Ce]||(Blob.prototype[Ce]="Blob"),"File"in X&&!File.prototype[Ce]&&(File.prototype[Ce]="File"));try{new File([],"")}catch(N){X.File=function(K,te,ce){return K=new Blob(K,ce||{}),Object.defineProperties(K,{name:{value:te},lastModified:{value:+(ce&&ce.lastModified!==void 0?new Date(ce.lastModified):new Date)},toString:{value:function(){return"[object File]"}}}),Ce&&Object.defineProperty(K,Ce,{value:"File"}),K}}var be=function(N){return N.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")},Pe=function(N){this.i=[];var K=this;N&&A(N.elements,function(te){if(te.name&&!te.disabled&&te.type!=="submit"&&te.type!=="button"&&!te.matches("form fieldset[disabled] *"))if(te.type==="file"){var ce=te.files&&te.files.length?te.files:[new File([],"",{type:"application/octet-stream"})];A(ce,function(he){K.append(te.name,he)})}else te.type==="select-multiple"||te.type==="select-one"?A(te.options,function(he){!he.disabled&&he.selected&&K.append(te.name,he.value)}):te.type==="checkbox"||te.type==="radio"?te.checked&&K.append(te.name,te.value):(ce=te.type==="textarea"?O(te.value):te.value,K.append(te.name,ce))})};if(f=Pe.prototype,f.append=function(N,K,te){Z(arguments,2),this.i.push(H(N,K,te))},f.delete=function(N){Z(arguments,1);var K=[];N=String(N),A(this.i,function(te){te[0]!==N&&K.push(te)}),this.i=K},f.entries=function N(){var K,te=this;return g(N,function(ce){if(ce.h==1&&(K=0),ce.h!=3)return K<te.i.length?ce=E(ce,te.i[K]):(ce.h=0,ce=void 0),ce;K++,ce.h=2})},f.forEach=function(N,K){Z(arguments,1);for(var te=s(this),ce=te.next();!ce.done;ce=te.next()){var he=s(ce.value);ce=he.next().value,he=he.next().value,N.call(K,he,ce,this)}},f.get=function(N){Z(arguments,1);var K=this.i;N=String(N);for(var te=0;te<K.length;te++)if(K[te][0]===N)return K[te][1];return null},f.getAll=function(N){Z(arguments,1);var K=[];return N=String(N),A(this.i,function(te){te[0]===N&&K.push(te[1])}),K},f.has=function(N){Z(arguments,1),N=String(N);for(var K=0;K<this.i.length;K++)if(this.i[K][0]===N)return!0;return!1},f.keys=function N(){var K=this,te,ce,he,Re,we;return g(N,function(ke){if(ke.h==1&&(te=s(K),ce=te.next()),ke.h!=3){if(ce.done){ke.h=0;return}return he=ce.value,Re=s(he),we=Re.next().value,E(ke,we)}ce=te.next(),ke.h=2})},f.set=function(N,K,te){Z(arguments,2),N=String(N);var ce=[],he=H(N,K,te),Re=!0;A(this.i,function(we){we[0]===N?Re&&(Re=!ce.push(he)):ce.push(we)}),Re&&ce.push(he),this.i=ce},f.values=function N(){var K=this,te,ce,he,Re,we;return g(N,function(ke){if(ke.h==1&&(te=s(K),ce=te.next()),ke.h!=3){if(ce.done){ke.h=0;return}return he=ce.value,Re=s(he),Re.next(),we=Re.next().value,E(ke,we)}ce=te.next(),ke.h=2})},Pe.prototype._asNative=function(){for(var N=new ne,K=s(this),te=K.next();!te.done;te=K.next()){var ce=s(te.value);te=ce.next().value,ce=ce.next().value,N.append(te,ce)}return N},Pe.prototype._blob=function(){var N="----formdata-polyfill-"+Math.random(),K=[],te="--"+N+`\r
|
|
|
Content-Disposition: form-data; name="`;return this.forEach(function(ce,he){return typeof ce=="string"?K.push(te+be(O(he))+(`"\r
|
|
|
\r
|
|
|
`+O(ce)+`\r
|
|
|
`)):K.push(te+be(O(he))+('"; filename="'+be(ce.name)+`"\r
|
|
|
Content-Type: `+(ce.type||"application/octet-stream")+`\r
|
|
|
\r
|
|
|
`),ce,`\r
|
|
|
`)}),K.push("--"+N+"--"),new Blob(K,{type:"multipart/form-data; boundary="+N})},Pe.prototype[Symbol.iterator]=function(){return this.entries()},Pe.prototype.toString=function(){return"[object FormData]"},ve&&!ve.matches&&(ve.matches=ve.matchesSelector||ve.mozMatchesSelector||ve.msMatchesSelector||ve.oMatchesSelector||ve.webkitMatchesSelector||function(N){N=(this.document||this.ownerDocument).querySelectorAll(N);for(var K=N.length;0<=--K&&N.item(K)!==this;);return-1<K}),Ce&&(Pe.prototype[Ce]="FormData"),Y){var Ye=X.XMLHttpRequest.prototype.setRequestHeader;X.XMLHttpRequest.prototype.setRequestHeader=function(N,K){Ye.call(this,N,K),N.toLowerCase()==="content-type"&&(this.B=!0)},X.XMLHttpRequest.prototype.send=function(N){N instanceof Pe?(N=N._blob(),this.B||this.setRequestHeader("Content-Type",N.type),Y.call(this,N)):Y.call(this,N)}}me&&(X.fetch=function(N,K){return K&&K.body&&K.body instanceof Pe&&(K.body=K.body._blob()),me.call(this,N,K)}),ge&&(X.navigator.sendBeacon=function(N,K){return K instanceof Pe&&(K=K._asNative()),ge.call(this,N,K)}),X.FormData=Pe}})();var Bs=function(){function f(u,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(u,r.key,r)}}return function(u,n,i){return n&&f(u.prototype,n),i&&f(u,i),u}}();function zs(f,u){if(!(f instanceof u))throw new TypeError("Cannot call a class as a function")}var zr=function(){var f=void 0;return function(u){return u&&(f=u),f}}();(function(){function f(){if(zs(this,f),zr())return zr();if(f.unique!==void 0)return f.unique;f.unique=this,this.oAudioContext=null,this.currentVolume=80,this.bSetVolume=!1,this.gainNode=null,this.iWndNum=-1,this.mVolumes=new Map;var u=window.AudioContext||window.webkitAudioContext;this.oAudioContext=new u,this.writeString=function(n,i,r){for(var a=0;a<r.length;a++)n.setUint8(i+a,r.charCodeAt(a))},this.setBufferToDataview=function(n,i,r){for(var a=0;a<r.length;a++,i++)n.setUint8(i,r[a])},zr(this)}return Bs(f,[{key:"Play",value:function(n,i,r){var a=new ArrayBuffer(44+i),l=new DataView(a),s=r.samplesPerSec,b=r.channels,T=r.bitsPerSample;this.writeString(l,0,"RIFF"),l.setUint32(4,32+i*2,!0),this.writeString(l,8,"WAVE"),this.writeString(l,12,"fmt "),l.setUint32(16,16,!0),l.setUint16(20,1,!0),l.setUint16(22,b,!0),l.setUint32(24,s,!0),l.setUint32(28,s*2,!0),l.setUint16(32,b*T/8,!0),l.setUint16(34,T,!0),this.writeString(l,36,"data"),l.setUint32(40,i,!0),this.setBufferToDataview(l,44,n);var C=this;return this.oAudioContext.decodeAudioData(l.buffer,function(y){var h=C.oAudioContext.createBufferSource();if(h==null)return-1;h.buffer=y,h.start(0),(C.gainNode==null||C.bSetVolume)&&(C.gainNode=C.oAudioContext.createGain(),C.bSetVolume=!1),C.gainNode.gain.value=C.currentVolume/100,C.gainNode.connect(C.oAudioContext.destination),h.connect(C.gainNode)},function(y){return console.log("decode error"),-1}),0}},{key:"Stop",value:function(){return this.gainNode!=null&&(this.gainNode.disconnect(),this.gainNode=null),!0}},{key:"SetVolume",value:function(n){return this.bSetVolume=!0,this.currentVolume=n,this.mVolumes.set(this.iWndNum,this.currentVolume),!0}},{key:"SetWndNum",value:function(n){this.iWndNum=n;var i=this.mVolumes.get(n);return i==null&&(i=80),this.currentVolume=i,!0}},{key:"GetVolume",value:function(){var n=this.mVolumes.get(this.iWndNum);return n==null&&(n=80),n}}]),window.AudioRenderer=f,f})();var js=["attribute vec4 vertexPos;","attribute vec2 texturePos;","varying vec2 textureCoord;","void main()","{","gl_Position = vertexPos;","textureCoord = texturePos;","}"].join(`
|
|
|
`),Ls=["precision highp float;","varying highp vec2 textureCoord;","uniform sampler2D ySampler;","uniform sampler2D uSampler;","uniform sampler2D vSampler;","const mat4 YUV2RGB = mat4","(","1.1643828125, 0, 1.59602734375, -.87078515625,","1.1643828125, -.39176171875, -.81296875, .52959375,","1.1643828125, 2.017234375, 0, -1.081390625,","0, 0, 0, 1",");","void main(void) {","highp float y = texture2D(ySampler, textureCoord).r;","highp float u = texture2D(uSampler, textureCoord).r;","highp float v = texture2D(vSampler, textureCoord).r;","gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;","}"].join(`
|
|
|
`);(function(f,u){window.SuperRender=u()})(void 0,function(){function f(u){this.canvasElement=document.getElementById(u),this.initContextGL(),this.contextGL&&(this.YUVProgram=this.initProgram(js,Ls),this.initBuffers(),this.initTextures())}return f.prototype.initContextGL=function(){var u=this.canvasElement,n=null;try{n=u.getContext("webgl")||u.getContext("experimental-webgl")}catch(i){n=null}(!n||typeof n.getParameter!="function")&&(n=null),this.contextGL=n,console.log("WebGL1.0")},f.prototype.initProgram=function(u,n){var i=this.contextGL,r=i.createShader(i.VERTEX_SHADER);i.shaderSource(r,u),i.compileShader(r),i.getShaderParameter(r,i.COMPILE_STATUS)||console.log("Vertex shader failed to compile: "+i.getShaderInfoLog(r));var a=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(a,n),i.compileShader(a),i.getShaderParameter(a,i.COMPILE_STATUS)||console.log("Fragment shader failed to compile: "+i.getShaderInfoLog(a));var l=i.createProgram();return i.attachShader(l,r),i.attachShader(l,a),i.linkProgram(l),i.getProgramParameter(l,i.LINK_STATUS)||console.log("Program failed to compile: "+i.getProgramInfoLog(l)),i.deleteShader(r),i.deleteShader(a),l},f.prototype.initBuffers=function(){var u=this.contextGL,n=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,n),u.bufferData(u.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),u.STATIC_DRAW),u.bindBuffer(u.ARRAY_BUFFER,null);var i=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,i),u.bufferData(u.ARRAY_BUFFER,new Float32Array([1,0,0,0,1,1,0,1]),u.DYNAMIC_DRAW),u.bindBuffer(u.ARRAY_BUFFER,null),this.vertexPosBuffer=n,this.texturePosBuffer=i},f.prototype.initTexture=function(){var u=this.contextGL,n=u.createTexture();return u.bindTexture(u.TEXTURE_2D,n),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,u.LINEAR),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.bindTexture(u.TEXTURE_2D,null),n},f.prototype.initTextures=function(){var u=this.contextGL,n=this.YUVProgram;u.useProgram(n);var i=this.initTexture(),r=u.getUniformLocation(n,"ySampler");u.uniform1i(r,0),this.yTextureRef=i;var a=this.initTexture(),l=u.getUniformLocation(n,"uSampler");u.uniform1i(l,1),this.uTextureRef=a;var s=this.initTexture(),b=u.getUniformLocation(n,"vSampler");u.uniform1i(b,2),this.vTextureRef=s,u.useProgram(null)},f.prototype.SR_DisplayFrameData=function(u,n,i,r,a){if(!(u<=0||n<=0)){var l=this.contextGL;if(i==null){l.clearColor(0,0,0,0),l.clear(l.COLOR_BUFFER_BIT|l.DEPTH_BUFFER_BIT);return}var s=this.canvasElement;this.nWindowWidth=s.width,this.nWindowHeight=s.height;var b=this.nWindowWidth,T=this.nWindowHeight;l.clearColor(.8,.8,1,1),l.clear(l.COLOR_BUFFER_BIT|l.DEPTH_BUFFER_BIT),l.viewport(0,0,b,T),this.updateFrameData(u,n,i,r,a);var C=this.YUVProgram;l.useProgram(C);var y=this.vertexPosBuffer;l.bindBuffer(l.ARRAY_BUFFER,y);var h=l.getAttribLocation(C,"vertexPos");l.enableVertexAttribArray(h),l.vertexAttribPointer(h,2,l.FLOAT,!1,0,0),l.bindBuffer(l.ARRAY_BUFFER,null);var D=this.texturePosBuffer;l.bindBuffer(l.ARRAY_BUFFER,D);var _=l.getAttribLocation(C,"texturePos");l.enableVertexAttribArray(_),l.vertexAttribPointer(_,2,l.FLOAT,!1,0,0),l.bindBuffer(l.ARRAY_BUFFER,null),l.drawArrays(l.TRIANGLE_STRIP,0,4),l.disableVertexAttribArray(h),l.disableVertexAttribArray(_),l.useProgram(null)}},f.prototype.updateFrameData=function(u,n,i,r,a){var l=this.contextGL,s=this.yTextureRef,b=this.uTextureRef,T=this.vTextureRef,C=i;if(u==r&&n==a){var y=u*n,h=C.subarray(0,y);l.activeTexture(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,s),l.texImage2D(l.TEXTURE_2D,0,l.LUMINANCE,u,n,0,l.LUMINANCE,l.UNSIGNED_BYTE,h);var D=u/2*n/2,_=C.subarray(u*n,u*n+D);l.activeTexture(l.TEXTURE2),l.bindTexture(l.TEXTURE_2D,T),l.texImage2D(l.TEXTURE_2D,0,l.LUMINANCE,u/2,n/2,0,l.LUMINANCE,l.UNSIGNED_BYTE,_);var E=D,w=C.subarray(u*n+u*n/4,u*n+u*n/4+E);l.activeTexture(l.TEXTURE1),l.bindTexture(l.TEXTURE_2D,b),l.texImage2D(l.TEXTURE_2D,0,l.LUMINANCE,u/2,n/2,0,l.LUMINANCE,l.UNSIGNED_BYTE,w)}else{for(var y=r*a,h=new Uint8Array(y),z=0;z<a;z++)for(var S=C.subarray(z*u,z*u+r),d=0;d<r;d++)h[z*r+d]=S[d];l.activeTexture(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,s),l.texImage2D(l.TEXTURE_2D,0,l.LUMINANCE,r,a,0,l.LUMINANCE,l.UNSIGNED_BYTE,h),h=null,S=null;for(var D=r/2*a/2,_=new Uint8Array(D),z=0;z<a/2;z++)for(var m=C.subarray(u*n+z*u/2,u*n+z*u/2+r/2),d=0;d<r/2;d++)_[z*r/2+d]=m[d];l.activeTexture(l.TEXTURE2),l.bindTexture(l.TEXTURE_2D,T),l.texImage2D(l.TEXTURE_2D,0,l.LUMINANCE,r/2,a/2,0,l.LUMINANCE,l.UNSIGNED_BYTE,_),_=null,m=null;for(var E=D,w=new Uint8Array(E),z=0;z<a/2;z++)for(var g=C.subarray(u*n*5/4+z*u/2,u*n*5/4+z*u/2+r/2),d=0;d<r/2;d++)w[z*r/2+d]=g[d];l.activeTexture(l.TEXTURE1),l.bindTexture(l.TEXTURE_2D,b),l.texImage2D(l.TEXTURE_2D,0,l.LUMINANCE,r/2,a/2,0,l.LUMINANCE,l.UNSIGNED_BYTE,w),w=null,g=null}},f.prototype.SR_SetDisplayRect=function(u){var n=this.contextGL,i=this.nWindowWidth,r=this.nWindowHeight,a=null;if(u&&i>0&&r>0){var l=u.left/i,s=u.top/r,b=u.right/i,T=u.bottom/r;a=new Float32Array([b,s,l,s,b,T,l,T])}else a=new Float32Array([1,0,0,0,1,1,0,1]);var C=this.texturePosBuffer;n.bindBuffer(n.ARRAY_BUFFER,C),n.bufferSubData(n.ARRAY_BUFFER,0,a),n.bindBuffer(n.ARRAY_BUFFER,null)},f.prototype.SR_Destroy=function(){var u=this.contextGL,n=this.YUVProgram;u.deleteProgram(n);var i=this.vertexPosBuffer,r=this.texturePosBuffer;u.deleteBuffer(i),u.deleteBuffer(r);var a=this.yTextureRef,l=this.uTextureRef,s=this.vTextureRef;u.deleteTexture(a),u.deleteTexture(l),u.deleteTexture(s)},f});var fa="https://open.ys7.com",Os="".concat(fa,"/console/ezuikit_static/v66/v2"),Us="".concat(fa,"/console/ezuikit_static/v66/v1"),ha=function(u,n){var i=["theme","standard"],r=["pcLive","pcRec","mobileLive","mobileRec","noData","security","voice","simple"];if(typeof u=="undefined")return n.themeData?{templateType:"themeData",templateId:"themeData"}:{templateType:"local",templateId:""};if(typeof u=="string"){if(u.length===32)return{templateType:"remote",templateId:u};if(i.indexOf(u)!==-1)return u==="simple"&&typeof n.header=="undefined"&&typeof n.footer=="undefined"?{templateType:"local",templateId:""}:{templateType:"iframe",templateId:u};if(r.indexOf(u)!==-1)return{templateType:"local",templateId:u}}},lt=function(){var u=window.navigator.userAgent.toLowerCase(),n={sa:/version.*safari/.test(u),ch:/chrome/.test(u),ff:/gecko/.test(u)&&!/webkit/.test(u)},i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);if(i)return!1;if(n.ch){var r=function(){for(var l=window.navigator.userAgent.split(" "),s="",b=0;b<l.length;b++)/chrome/i.test(l[b])&&(s=l[b]);return s?Number(s.split("/")[1].split(".")[0]):!1};return r()>91&&!!window.SharedArrayBuffer}return!1},Hs=function(){function f(u){var n=this;fe(this,f),this.isStoping=!1;var i=u.autoplay,r=i===void 0?!0:i;if((u.template||u.themeData)&&(r=!1),this.params=u,this.autoplay=r,window.EZUIKit[u.id]={state:{EZUIKitPlayer:{init:window.EZUIKit[u.id]&&window.EZUIKit[u.id].state&&window.EZUIKit[u.id].state.EZUIKitPlayer.init||!1,themeInit:window.EZUIKit[u.id]&&window.EZUIKit[u.id].state&&window.EZUIKit[u.id].state.EZUIKitPlayer.themeInit||!1,talkInit:window.EZUIKit[u.id]&&window.EZUIKit[u.id].state&&window.EZUIKit[u.id].state.EZUIKitPlayer.talkInit||!1}}},ha(this.params.template,u).templateType!=="iframe"){this.Monitor=new Ds({env:typeof u.disableMonitor!="undefined"&&u.disableMonitor?"test12":"online"},this),this.id=u.id,this.width=u.width,this.height=u.height,this.url=u.url,this.accessToken=u.accessToken,this.themeId=ha(u.template,u).templateId,this.id=u.id,this.audio=!0,this.poster=u.poster,this.speed=1,this.disabledTimeLine=!1,this.disabledPTZ=!1,this.enableSharedArrayBufferGuide=!1,this.capacity={},this.playTimer=null,this.env={domain:"https://open.ys7.com"};var a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);this.isMobile=a,document.getElementById("".concat(this.id,"-wrap"))&&(document.getElementById("".concat(this.id,"-wrap")).innerHTML="",document.getElementById("".concat(this.id,"-wrap")).id=this.id),this.staticPath=lt()?Os:Us,typeof u.staticPath=="string"&&(u.staticPath.startsWith("http")?this.staticPath=u.staticPath:this.staticPath=window.location.protocol+"//"+window.location.host+u.staticPath,lt()?this.staticPath+="/v2":this.staticPath+="/v1"),typeof u.audio!="undefined"&&(this.audio=u.audio),typeof u.env!="undefined"&&(this.env=Object.assign(this.env,u.env)),typeof u.isMobile!="undefined"&&(this.isMobile=u.isMobile),typeof u.disabledTimeLine!="undefined"&&(this.disabledTimeLine=u.disabledTimeLine),typeof u.disabledPTZ!="undefined"&&(this.disabledPTZ=u.disabledPTZ),typeof u.enableSharedArrayBufferGuide!="undefined"&&(this.enableSharedArrayBufferGuide=u.enableSharedArrayBufferGuide);var l="".concat(this.staticPath,"/js/jsPluginV1-1.0.0.min.js"),s=function(){if(window.addPluginUrlIng=!0,lt())console.log("启用多线程解析视频"),l="".concat(n.staticPath,"/js/jsPluginV2-2.0.1.min.js");else{var C=function(){for(var w=navigator.userAgent.split(" "),z="",S=0;S<w.length;S++)/chrome/i.test(w[S])&&(z=w[S]);return z?Number(z.split("/")[1].split(".")[0]):!1};if(!a&&91<C&&n.enableSharedArrayBufferGuide){console.log("提示用户开启谷歌实验室特性");var y="".concat(n.id,"-wrap"),h=document.createElement("div"),D=document.createElement("span");D.innerHTML="您当前浏览器可以开启谷歌实验室多线程特性,获取更好播放体验,避免浏览器卡顿及崩溃,详见",h.appendChild(D);var _=document.createElement("a");_.href="https://open.ys7.com/help/384",_.setAttribute("target","_blank"),h.appendChild(_),_.innerHTML="开启说明",h.id="".concat(n.id,"-guide"),h.style="font-size:12px;color:red;",setTimeout(function(){document.getElementById(y)&&document.getElementById(y).insertBefore(h,document.getElementById(n.id))},5e3)}}n.pluginStatus=new Bi(n,n.id),ut(l,function(){if(n.autoplay){n.initTime=new Date().getTime(),n.Monitor.dclog({url:n.url,action:0,text:"startInit",isVersion2Available:lt()?1:0}),n.Monitor.localInfoLog({Serial:Ke(n.url).deviceSerial,Channel:Ke(n.url).channelNo,Ver:lt()?"v7.0.0":"v6.0.0",ExterVer:lt()?"v7.0.0":"v6.0.0"}),console.log("初始化-");var E=n.initEZUIKitPlayer(u),w=n._getRealUrlPromise(u.accessToken,u.url);Promise.all([E,w]).then(function(z){z[1]?(n.playStartTime=new Date().getTime(),n._pluginPlay(z[1],function(){console.log("自动播放成功"),n.Monitor.dclog({url:n.url,action:202,d:new Date().getTime()-n.initTime,text:"autoPlaySuccess"})},function(){console.log("自动播放失败"),n.Monitor.dclog({url:n.url,action:402,d:new Date().getTime()-n.initTime,text:"autoPlayError"})})):console.log("promise of one",z),window.EZUIKit[u.id].state.EZUIKitPlayer.init=!0,document.getElementById("".concat(u.id,"canvas_draw0"))&&(document.getElementById("".concat(u.id,"canvas_draw0")).style.border="none")}).catch(function(z){console.log("err",z),n.Theme&&n.Theme.setDisabled(!0),n.pluginStatus.loadingClear(),n.pluginStatus.loadingSetText({text:z&&z.msg||"获取播放地址失败",color:"red"})})}else{n.initTime=new Date().getTime(),n.Monitor.dclog({url:n.url,action:0,text:"startInit",isVersion2Available:lt()?1:0}),n.Monitor.localInfoLog({Serial:Ke(n.url).deviceSerial,Channel:Ke(n.url).channelNo,Ver:lt()?"v7.0.0":"v6.0.0"});var E=n.initEZUIKitPlayer(u);E.then(function(S){console.log("初始化成功",S),window.EZUIKit[u.id].state.EZUIKitPlayer.init=!0,document.getElementById("".concat(u.id,"canvas_draw0"))&&(document.getElementById("".concat(u.id,"canvas_draw0")).style.border="none"),n.initSuccessTime=new Date().getTime(),n.Monitor.dclog({url:n.url,action:201,d:n.initSuccessTime-n.initTime,text:"initSuccess",isVersion2Available:lt()?1:0})})}},function(){return lt()?!!window.JSPluginV2||!!window.addPluginUrled:!!window.JSPluginV1||!!window.addPluginUrled}),u.plugin&&u.plugin.indexOf("talk")!==-1&&(n.Talk=new ia(n),window.EZUIKit[u.id].state.EZUIKitPlayer.talkInit=!0),n.getDeviceCapacity()};if(window.addPluginUrlIng)var b=setInterval(function(){(window.JSPluginV1||window.JSPluginV2)&&(clearInterval(b),s())},50);else s()}else return new Ms.EZUIKitPlayer(u);this.play=Br(function(T){return n._play(T)},500,!0),this.resume=Br(function(T){return n._resume(T)},500,!0),this.changePlayUrl=Br(function(T,C){return n._changePlayUrl(T,C)},500),window.addEventListener("beforeunload",function(){console.log("退出页面,停止视频流"),n.stop()})}return dt(f,[{key:"initEZUIKitPlayer",value:function(n){var i=this,r=n.id,a=n.width,l=a===void 0?600:a,s=n.height,b=s===void 0?400:s;if(!n.width||!n.height){var T=document.getElementById(r).getBoundingClientRect();!n.width&&T.width>0&&(l=T.width),!n.height&&T.height>0&&(b=T.height)}if(!document.getElementById("".concat(r,"-wrap"))){var C=document.createElement("div");C.id="".concat(r,"-wrap"),C.style="display:inline-block;width:".concat(l,"px;position:relative;vertical-align: bottom;"),document.getElementById(r).parentNode.insertBefore(C,document.getElementById(r)),document.getElementById(r).parentNode.removeChild(document.getElementById(r)),C.innerHTML="<div id=".concat(r,"></div>"),document.getElementById(r).style="display:inline-block;width:".concat(l,"px;height:").concat(b,"px;"),document.getElementById(r).style.verticalAlign="top"}this.themeId&&(this.Theme=new As(this,n.id),window.EZUIKit[n.id].state.EZUIKitPlayer.themeInit=!0,this.Monitor.dclog({url:this.url,action:2,text:this.themeId}),typeof this.params.handleThemeChange=="function"&&(this.handleThemeChange=this.params.handleThemeChange));var y=new ts(this,r);this.Message=y;var h=function(E,w){var z;if(lt()){z=new window.JSPluginV2({szId:r,iType:2,iWidth:l,iHeight:b,iMaxSplit:1,iCurrentSplit:1,szBasePath:"",staticPath:i.staticPath,oStyle:{border:"none",background:"#000000"}}),i.pluginStatus.loadingStart(r),i.pluginStatus.loadingSetText({text:"初始化播放器完成"}),z.EventCallback={pluginErrorHandler:function(m,g,k){if(console.log(m,g,k),g===1003)console.log("断流"),i.Theme.setDecoderState({play:!1}),i.pluginStatus.setPlayStatus({play:!1}),z.bPlay||(i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:"连接断开,请重试",color:"red"})),typeof i.params.handleError=="function"&&i.params.handleError({msg:"连接断开,请重试",retcode:1003,id:i.params.id,type:"handleError"});else if(k.errorCode!=1){var A=i.errorHander.matchErrorInfo(k.errorCode),O="连接断开,请重试";A&&A.msg?O=A.msg:A&&A.description&&(O=A.description),i.Theme.setDecoderState({play:!1}),i.pluginStatus.setPlayStatus({play:!1}),i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:O,color:"red"})}else i.pluginStatus.loadingClear(),i.Theme&&i.Theme.setDisabled(!1)},openStreamCallback:function(){console.log("开启取流"),i.openStreamTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:224,d:i.openStreamTime-i.gotWsUrlTime,text:"openStream",isVersion2Available:lt()?1:0})},getStreamHeaderCallback:function(){console.log("完成取流返回流头"),i.getStreamHeaderTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:225,d:i.getStreamHeaderTime-i.openStreamTime,text:"getStreamHeader",isVersion2Available:lt()?1:0})},getVideoStreamCallback:function(){console.log("返回视频流(首次)"),i.getVideoStreamTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:226,d:i.getVideoStreamTime-i.getStreamHeaderTime,text:"getVideoStream",isVersion2Available:lt()?1:0})},appearFirstFrameCallback:function(){console.log("出现首帧画面(播放成功)"),i.appearFirstFrameTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:227,d:i.appearFirstFrameTime-i.getStreamHeaderTime,text:"appearFirstFrame",isVersion2Available:lt()?1:0})},averageStreamSuccessCallback:function(){console.log("平均成功取流的出流耗时"),i.averageStreamSuccessTime=i.initSuccessTime-i.initTime+(i.gotWsUrlTime-i.startGetWsUrlTime)+(i.appearFirstFrameTime-i.openStreamTime),i.Monitor.dclog({url:i.url,action:228,d:i.averageStreamSuccessTime,text:"averageStreamSuccess",isVersion2Available:lt()?1:0})}},i.env={domain:"https://open.ys7.com"},typeof n.env!="undefined"&&(i.env=Object.assign(i.env,n.env)),typeof n.handleTalkSuccess!="undefined"&&(i.handleTalkSuccess=n.handleTalkSuccess),typeof n.handleTalkError!="undefined"&&(i.handleTalkError=n.handleTalkError),i.errorHander=new Xo,i.jSPlugin=z;var S=setInterval(function(){window.JSPlayerModuleLoaded&&(clearInterval(S),typeof i.params.handleInitSuccess=="function"&&i.params.handleInitSuccess({retcode:0,id:i.params.id,type:"handleInitSuccess"}),E({meta:{retcode:200,msg:"初始化成功"}}),n.url.indexOf("rec")!=-1&&i.Theme.changeTheme(i.isMobile?"mobileRec":"pcRec"))},50)}else z=new window.JSPluginV1({szId:r,iType:2,iWidth:l,iHeight:b,iMaxSplit:1,iCurrentSplit:1,szBasePath:"",staticPath:i.staticPath,oStyle:{border:"none",background:"#000000"}}),i.pluginStatus.loadingStart(r),i.pluginStatus.loadingSetText({text:"初始化播放器完成"}),z.EventCallback={openStreamCallback:function(){console.log("开启取流---v1"),i.openStreamTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:224,d:i.openStreamTime-i.gotWsUrlTime,text:"openStream",isVersion2Available:lt()?1:0})},getStreamHeaderCallback:function(){console.log("完成取流返回流头"),i.getStreamHeaderTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:225,d:i.getStreamHeaderTime-i.openStreamTime,text:"getStreamHeader",isVersion2Available:lt()?1:0})},getVideoStreamCallback:function(){console.log("返回视频流(首次)"),i.getVideoStreamTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:226,d:i.getVideoStreamTime-i.getStreamHeaderTime,text:"getVideoStream",isVersion2Available:lt()?1:0})},appearFirstFrameCallback:function(){console.log("出现首帧画面(播放成功)"),i.appearFirstFrameTime=new Date().getTime(),i.Monitor.dclog({url:i.url,action:227,d:i.appearFirstFrameTime-i.getStreamHeaderTime,text:"appearFirstFrame",isVersion2Available:lt()?1:0})},averageStreamSuccessCallback:function(){console.log("平均成功取流的出流耗时"),i.averageStreamSuccessTime=i.initSuccessTime-i.initTime+(i.gotWsUrlTime-i.startGetWsUrlTime)+(i.appearFirstFrameTime-i.openStreamTime),i.Monitor.dclog({url:i.url,action:228,d:i.averageStreamSuccessTime,text:"averageStreamSuccess",isVersion2Available:lt()?1:0})},loadEventHandler:function(){},zoomEventResponse:function(){},windowEventSelect:function(m){},pluginErrorHandler:function(m,g,k){if(console.log(m,g,k),g===1003)console.log("断流"),i.Theme.setDecoderState({play:!1}),i.pluginStatus.setPlayStatus({play:!1}),z.bPlay||(i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:"连接断开,请重试",color:"red"})),typeof i.params.handleError=="function"&&i.params.handleError({msg:"连接断开,请重试",retcode:1003,id:i.params.id,type:"handleError"});else if(k.errorCode!=1){var A=i.errorHander.matchErrorInfo(k.errorCode),O="连接断开,请重试";A&&A.msg?O=A.msg:A&&A.description&&(O=A.description),i.Theme.setDecoderState({play:!1}),i.pluginStatus.setPlayStatus({play:!1}),i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:O,color:"red"})}else i.pluginStatus.loadingClear(),i.Theme&&i.Theme.setDisabled(!1)},windowEventOver:function(m){},windowEventOut:function(m){},windowEventUp:function(m){},windowFullCcreenChange:function(m){},firstFrameDisplay:function(m,g,k){console.log(g,k),z.JS_SetCanFullScreen(!1)},performanceLack:function(){},mouseEvent:function(m,g,k){}},i.env={domain:"https://open.ys7.com"},typeof n.env!="undefined"&&(i.env=Object.assign(i.env,n.env)),typeof n.handleTalkSuccess!="undefined"&&(i.handleTalkSuccess=n.handleTalkSuccess),typeof n.handleTalkError!="undefined"&&(i.handleTalkError=n.handleTalkError),i.errorHander=new Xo,i.jSPlugin=z,typeof i.params.handleInitSuccess=="function"&&i.params.handleInitSuccess({retcode:0,id:i.params.id,type:"handleInitSuccess"}),E({meta:{retcode:200,msg:"初始化成功"}}),n.url.indexOf("rec")!=-1&&i.Theme.changeTheme(i.isMobile?"mobileRec":"pcRec")},D=new Promise(h);return D}},{key:"_getRealUrlPromise",value:function(n,i){var r=this;console.log("获取播放地址 url => ".concat(i," ").concat(this.accessToken)),console.log("开始获取wsurl"),this.startGetWsUrlTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:222,text:"startGetWsUrl",isVersion2Available:lt()?1:0});var a=this.env.domain;this.env&&(a=this.env.domain);var l=function(C,y){var h="",D=a+"/api/lapp/live/url/ezopen",_=new FormData;_.append("ezopen",i),_.append("isFlv",!1),_.append("userAgent",window.navigator.userAgent),_.append("isHttp",!1),_.append("accessToken",n),fetch(D,{method:"POST",body:_}).then(function(E){return E.json()}).then(function(E){if(E.code==200||E.retcode==0){var w="",z="";E.ext&&E.ext.token?(h+=E.data,z=E.ext.token,w=E.data):E.data&&E.data.token&&(h+=E.data.url,z=E.data.token,w=E.data.url);var S=i.indexOf("live")!==-1?"live":"playback";S==="live"?h=h+"&ssn="+z+"&auth=1&biz=4&cln=100":h=h+"&ssn="+z+"&auth=1&cln=100",console.log(h);var d=et("checkCode",h);if(d&&(typeof r.jSPlugin.decoderVersion!="undefined"&&r.jSPlugin.decoderVersion==="2.0"?r.validateCode=d:(console.log("设置密钥",d),r.jSPlugin.JS_SetSecretKey(0,d))),h.indexOf("playback")!==-1){var m=et("begin",w)||et("begin",i),g=et("end",w)||et("end",i);if(m)h=h.replace("&begin="+et("begin",w),"&begin="+s(m,"000000")),et("begin",h)||(h+="&begin="+s(m,"000000"));else{var k=new Date;h=h+"&begin="+k.Format("yyyyMMdd")+"T000000Z"}if(g?(h=h.replace("&end="+et("end",w),"&end="+s(g,"235959")),et("end",h)||(h+="&end="+s(g,"235959"))):h=h+"&end="+s(et("begin",h).substr(0,8),"235959"),et("stream",w)||(h=h.replace("stream","&stream")),i.indexOf(".cloud")!==-1){var A=function(Ce){if(Ce.code==200){var be=[];if(Ce.data&&Ce.data.files&&Ce.data.files.length>0){var Pe=Ce.data.files,Ye=new Date().getTime(),N=Ce.data.isAll;if(N){be=ce(Pe);var K=JSON.stringify(be).replace("\\","");h+="&recSlice="+K.replace("\\","")+"&r="+Math.random(),C(h)}else{var te=function he(){function Re(we){if(we.data&&we.data.files&&we.data.files.length>0)if(we.data.isAll==!1)we.data.files&&(Pe=Pe.concat(we.data.files)),Ye=we.data.nextFileTime>0?we.data.nextFileTime:new Date().getTime(),he();else{be=ce(Pe);var ke=JSON.stringify(be).replace("\\","");h+="&recSlice="+ke.replace("\\","")+"&r="+Math.random(),C(h)}else{be=ce(Pe);var ke=JSON.stringify(be).replace("\\","");h+="&recSlice="+ke.replace("\\","")+"&r="+Math.random(),C(h)}}Y.startTime=Ye,Gn(ne,"POST",Y,"",Re)};te()}}else y({retcode:-1,msg:"未找到录像片段"})}else y({retcode:-1,msg:"未找到录像片段"});function ce(he){var Re=[];return he.forEach(function(we,ke){Re.length==0||we.downloadPath!==Re[Re.length-1].downloadPath?Re.push({downloadPath:we.downloadPath,ownerId:we.ownerId,iStorageVersion:we.iStorageVersion,videoType:we.videoType,iPlaySpeed:0,startTime:we.startTime,endTime:we.endTime}):Re[Re.length-1].endTime=we.endTime}),Re}},O=b(et("begin",h)),H=b(et("end",h)),Z=et("serial",h),X=et("chn",h),ne=a+"/api/lapp/video/by/time",Y={accessToken:r.accessToken,recType:1,deviceSerial:Z,channelNo:X,startTime:O,endTime:H,version:"2.0"};Gn(ne,"POST",Y,"",A)}else if(i.indexOf("alarmId")!==-1){var me=function(te){if(te.code==200){var ce=[];if(te.data){ce=Re([te.data]);var he=JSON.stringify(ce).replace("\\","");h+="&recSlice="+he.replace("\\",""),console.log("realUrl",h,te.data.recType),te.data.recType==1?h=h.replace("/playback","/cloudplayback"):h=h.replace("/cloudplayback","/playback"),C(h)}}function Re(we){var ke=[];return we.forEach(function(We,yn){ke.length==0||We.downloadPath!==ke[ke.length-1].downloadPath?ke.push({downloadPath:We.downloadPath,ownerId:We.ownerId,iStorageVersion:We.iStorageVersion,videoType:We.videoType,iPlaySpeed:0,startTime:We.startTime,endTime:We.endTime}):ke[ke.length-1].endTime=We.endTime}),console.log("downloadPathArr",ke),ke}};console.log("进入alarmId回放");var ge=et("alarmId",h),O=b(et("begin",h)),H=b(et("end",h)),Z=et("serial",h),X=et("chn",h),ne=a+"/api/lapp/video/by/id",Y={accessToken:r.accessToken,deviceSerial:Z,channelNo:X,alarmId:ge};Gn(ne,"POST",Y,"",me)}else C(h)}else C(h)}else r.Theme&&r.Theme.setDisabled(!0),r.pluginStatus.loadingClear(),r.pluginStatus.loadingSetText({text:E.msg,color:"red"}),typeof r.params.handleError=="function"&&r.params.handleError({retcode:E.code,msg:E.msg,id:r.params.id,type:"handleError"}),y(E)})};return new Promise(function(T,C){return l(T,C)});function s(T,C){var y=/^[0-9]{8}T[0-9]{6}Z$/;if(y.test(T))return T;if(/[0-9]{8,14}/.test(T)){var h=6-(14-T.length),D=C.length,_=T+C.substring(h,D);return _.slice(0,8)+"T"+_.slice(8)+"Z"}throw new Error("回放时间格式有误,请确认")}function b(T){var C=T.slice(0,4),y=T.slice(4,6),h=T.slice(6,8),D=T.slice(9,11),_=T.slice(11,13),E=T.slice(13,15),w=C+"-"+y+"-"+h+" "+D+":"+_+":"+E;return new Date(w.replace(/-/g,"/")).getTime()}}},{key:"_pluginPlay",value:function(n,i,r){var a=this;if(console.log("执行播放 _pluginPlay",n),!n)return!1;function l(C){var y=C.split("?")[0].replace("/live","").replace("/playback",""),h=(C.indexOf("/live")===-1?C.indexOf("cloudplayback")!==-1?"/cloudplayback?":"/playback?":"/live?")+C.split("?")[1];return h.indexOf("/playback")!==-1&&(h=h.replace("stream=2","stream=1")),{websocketConnectUrl:y,websocketStreamingParam:h}}var s=l(n).websocketConnectUrl;this.env&&this.env.wsUrl&&(s=this.env.wsUrl),this.gotWsUrlTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:223,d:this.gotWsUrlTime-this.startGetWsUrlTime,text:"getWsUrlSuccess",isVersion2Available:lt()?1:0});var b={playURL:l(n).websocketStreamingParam};console.log("播放前 stop 阶段 结束"),this.isStoping=!1;var T=Date.now();console.log("执行播放 ... this.jSPlugin.JS_Play at ",T),this.jSPlugin.JS_Play(s,b,0).then(function(){if(console.log("执行播放 ... this.jSPlugin.JS_Play 播放成功",s,b),console.log("执行播放耗时 ",Date.now()-T),a.isStoping){console.log("现在在播放前 stop 阶段,此次应为无效播放成功触发。不执行后续回调, 此次耗时无效");return}if(a.validateCode&&typeof a.jSPlugin.decoderVersion!="undefined"&&a.jSPlugin.decoderVersion==="2.0"&&a.jSPlugin.JS_SetSecretKey(0,a.validateCode),a.pluginStatus.loadingClear(),a.pluginStatus.setPlayStatus({play:!0,loading:!1}),a.Theme){a.Theme.setDecoderState({play:!0});var C=Ut.findIndex(a.Theme.themeData.footer.btnList,function(y){return y.iconId==="sound"&&y.isrender===1&&y.defaultActive===1})>-1;a.audio=C}a.audio&&setTimeout(function(){a.openSound()},500),typeof a.params.handleSuccess=="function"&&a.params.handleSuccess({retcode:0,id:a.params.id,type:"handleSuccess"}),i(b),a.Monitor.dclog({url:a.url,action:211,d:new Date().getTime()-a.playStartTime,text:"startPlaySuccess"}),a.Monitor.playLog({Enc:a.url.indexOf("@")===-1?0:1,PlTp:a.url.indexOf("back")===-1?1:2,Via:2,ErrCd:0,Cost:new Date().getTime()-a.playStartTime,Serial:Ke(a.url).deviceSerial,Channel:Ke(a.url).channelNo,Ver:lt()?"v7.0.0":"v6.0.0"})},function(C){console.log("err",C);var y="播放失败,请检查设备及客户端网络",h=-1;if(a.jSPlugin.bPlay)return!1;if(C&&C.errorCode){var D=a.errorHander.matchErrorInfo(C.errorCode);a.Theme&&a.Theme.setDisabled(!0),D&&D.msg?y=D.msg:D&&D.description?y=D.description:y="播放失败,请检查设备及客户端网络",h=C.errorCode}a.pluginStatus.loadingClear(),a.pluginStatus.loadingSetText({text:y,color:"red"}),typeof a.params.handleError=="function"&&a.params.handleError({retcode:h,msg:y,id:a.params.id,type:"handleError"}),r(),a.Monitor.dclog({url:a.url,action:411,d:new Date().getTime()-a.playStartTime,text:"startPlayError"}),a.Monitor.playLog({Enc:a.url.indexOf("@")===-1?0:1,PlTp:a.url.indexOf("back")===-1?1:2,Via:2,ErrCd:h,Cost:-1,Serial:Ke(a.url).deviceSerial,Channel:Ke(a.url).channelNo,Ver:lt()?"v7.0.0":"v6.0.0"})})}},{key:"_play",value:function(n){var i=this;console.log("执行播放 play options.url =>",n),this.pluginStatus.setPlayStatus({play:!1,loading:!0}),this.playStartTime=new Date().getTime(),this.Monitor.dclog({url:this.url,action:1,d:new Date().getTime()-this.initTime,text:"startPlay"}),n&&(typeof n=="string"&&(this.url=n),typeof n.url=="string"&&(this.url=n.url),typeof n.accessToken=="string"&&(this.accessToken=n.accessToken),this.Theme&&(typeof n.url=="string"||typeof n.accessToken=="string")&&this.Theme.getDeviceInfo());var r=new Promise(function(a,l){console.log("执行 播放前 stop"),i.isStoping=!0,i.jSPlugin.JS_Stop(0).then(function(){console.log("播放前 stop 执行成功 this.url => ".concat(i.url," ").concat(i.accessToken)),i._getRealUrlPromise(i.accessToken,i.url).then(function(s){i._pluginPlay(s,function(b){a(!0)},function(){return l(!1)})}).catch(function(s){var b=s.msg?s.msg:"播放失败,请检查设备及客户端网络";i.Theme&&i.Theme.setDisabled(!0),i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:b,color:"red"}),typeof i.params.handleError=="function"&&i.params.handleError({retcode:s.oError?s.oError.errorCode:-1,msg:b,id:i.params.id,type:"handleError"}),l({retcode:s.oError?s.oError.errorCode:-1,msg:b,id:i.params.id,type:"handleError"})})})});return r}},{key:"stop",value:function(){var n=this;return this.pluginStatus.setPlayStatus({loading:!0}),this.reSetTheme(),this.jSPlugin.JS_Stop(0).then(function(){console.log("停止成功"),n.pluginStatus.setPlayStatus({play:!1,loading:!1}),n.Theme&&n.Theme.setDecoderState({play:!1})})}},{key:"changeVideoLevel",value:function(n){var i=this,r=this.url,a=n?r.replace(".live",".hd.live"):r.replace(".hd.live",".live");this.jSPlugin.playURL=n?this.jSPlugin.playURL.replace("stream=2","stream=1"):this.jSPlugin.playURL.replace("stream=1","stream=2"),console.log("changeVideoLevel",a,this.jSPlugin.playURL),this.url=a;var l=new Promise(function(s,b){i.pause().then(function(){console.log("暂停成功"),i.resume().then(function(T){console.log("恢复成功")})}).catch(function(){console.log("暂停失败"),i.resume().then(function(T){console.log("恢复成功")})})});return l}},{key:"reSetTheme",value:function(){this.Theme&&this.Theme.Ptz&&(this.Theme.setDecoderState({pantile:!1}),this.Theme.Ptz.hide()),this.Theme&&this.Theme.decoderState.state.recordvideo&&this.Theme.setDecoderState({recordvideo:!1}),this.Theme&&this.Theme.decoderState.state.zoom&&(this.Zoom.stopZoom(),this.Theme.setDecoderState({zoom:!1})),this.Theme&&this.Theme.decoderState.state.talk&&(this.stopTalk(),this.Theme.setDecoderState({talk:!1})),this.Theme&&this.Theme.Rec&&!this.Theme.isMobile&&this.Theme.Rec.datepickerHide(),this.Theme&&this.Theme.Rec&&(this.Theme.changeRecSpeed(1),this.Theme.nextRate=1,this.speed=1,this.Theme.setDecoderState({speed:!1}))}},{key:"_changePlayUrl",value:function(n){var i=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){};console.log("_changePlayUrl"),console.log(n),this.reSetTheme(),this.getDeviceCapacity({accessToken:n.accessToken,deviceSerial:n.deviceSerial});var a=this.url,l=b(a,n);n.accessToken&&(this.accessToken=n.accessToken),this.url=l,r(),this.pluginStatus.loadingStart(this.id),this.pluginStatus.loadingSetText({text:"加载中,请稍后"});var s=new Promise(function(T,C){var y={url:l};return n.accessToken&&(y.accessToken=n.accessToken),console.log("切换播放地址 参数 ",y),i.play(y).then(function(){console.log("切换播放地址 play 执行成功 ",i.url,i.accessToken),i.Theme&&i.Theme.decoderState.state.webExpend&&i.Theme.webExpend(),i.Theme&&i.Theme.decoderState.state.expend&&i.Theme.expend(),n.type?n.type=="rec"||n.type=="cloud.rec"?i.Theme.changeTheme(i.isMobile?"mobileRec":"pcRec"):i.Theme.changeTheme(i.isMobile?"mobileLive":"pcLive"):i.url.indexOf(".rec")>-1?i.Theme.changeTheme(i.isMobile?"mobileRec":"pcRec"):i.Theme.changeTheme(i.isMobile?"mobileLive":"pcLive"),n&&n.begin&&n.deviceSerial&&i.Theme.Rec.setDatepickerDate(n.begin),i.Theme.setDisabled(!1),T(l)}).catch(function(h){C(l),h&&h.msg&&(i.Theme&&i.Theme.setDisabled(!0),i.pluginStatus.loadingClear(),i.pluginStatus.loadingSetText({text:h.msg,color:"red"}))})});function b(T,C){if(C.url)return C.url;console.log("--------------matchInitUrl",T);var y=T.split("/")[4].split(".")[T.split("/")[4].split(".").length-1].split("?")[0];y==="rec"&&T.indexOf(".cloud.rec")!==-1&&(y="cloud.rec"),C.type&&(y=C.type);var h=T.split("/")[3];C.deviceSerial&&(h=C.deviceSerial);var D=T.split("/")[4].split(".")[0];C.channelNo&&(D=C.channelNo);var _=T.split("/")[2].split("@").length===2?T.split("/")[2].split("@")[0]:"";typeof C.validCode!="undefined"&&(_=C.validCode);var E=typeof C.hd=="undefined"?T.indexOf(".hd")!==-1:C.hd,w="ezopen://".concat(_?"".concat(_,"@"):"","open.ys7.com/").concat(h,"/").concat(D).concat(E?".hd":"",".").concat(y);return y==="live"||(w="ezopen://".concat(_?"".concat(_,"@"):"","open.ys7.com/").concat(h,"/").concat(D,".").concat(y),C.begin&&C.end?w+="?begin=".concat(C.begin,"&end=").concat(C.end):C.begin?w+="?begin=".concat(C.begin):et("begin",T)&&(w+="?begin=".concat(et("begin",T)))),w}return s}},{key:"getOSDTime",value:function(){var n=this,i=new Promise(function(r,a){n.jSPlugin.JS_GetOSDTime(0).then(function(l){r({code:0,retcode:0,data:l}),typeof n.params.getOSDTimeCallBack=="function"&&n.params.getOSDTimeCallBack({id:n.id,type:"getOSDTime",code:0,data:l})}).catch(function(l){a({code:-1,retcode:-1,data:l}),typeof n.params.getOSDTimeCallBack=="function"&&n.params.getOSDTimeCallBack({id:n.id,type:"getOSDTime",code:-1,data:-1})})});return i}},{key:"capturePicture",value:function(n){var i=this,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.jSPlugin.JS_CapturePicture(0,n,"JPEG",r,!!r);return ln(a)?(typeof this.params.capturePictureCallBack=="function"&&a.then(function(){i.params.capturePictureCallBack({id:i.id,type:"capturePicture",code:0})}).catch(function(){i.params.capturePictureCallBack({id:i.id,type:"capturePicture",code:-1})}),a):new Promise(function(l){l(a)})}},{key:"startSave",value:function(n){var i=this,r=this.jSPlugin.JS_StartSave(0,n);return ln(r)?(typeof this.params.startSaveCallBack=="function"&&r.then(function(){i.params.startSaveCallBack({id:i.id,type:"startSave",code:0})}).catch(function(){i.params.startSaveCallBack({id:i.id,type:"startSave",code:-1})}),r):(this.Theme&&this.Theme.setDecoderState({recordvideo:!0}),new Promise(function(a){a(r)}))}},{key:"stopSave",value:function(){var n=this,i=this.jSPlugin.JS_StopSave(0);return ln(i)?(typeof this.params.startSaveCallBack=="function"&&i.then(function(){n.params.stopSaveCallBack({id:n.id,type:"stopSave",code:0})}).catch(function(){n.params.stopSaveCallBack({id:n.id,type:"stopSave",code:-1})}),i):(this.Theme&&this.Theme.setDecoderState({recordvideo:!1}),new Promise(function(r){r(i)}))}},{key:"openSound",value:function(){var n=this.jSPlugin.JS_OpenSound(0);return console.log("打开声音",n),ln(n)?n:(this.Theme&&this.Theme.setDecoderState({sound:!0}),typeof this.params.openSoundCallBack=="function"&&this.params.openSoundCallBack({id:this.id,type:"openSound",code:n}),new Promise(function(i){i(n)}))}},{key:"closeSound",value:function(){var n=this.jSPlugin.JS_CloseSound(0);return ln(n)?n:(this.Theme&&this.Theme.setDecoderState({sound:!1}),typeof this.params.closeSoundCallBack=="function"&&this.params.closeSoundCallBack({id:this.id,type:"closeSound",code:n}),new Promise(function(i){i(n)}))}},{key:"enableZoom",value:function(){var n=this.jSPlugin.JS_EnableZoom(0);return ln(n)?n:new Promise(function(i){i(n)})}},{key:"closeZoom",value:function(){var n=this.jSPlugin.JS_DisableZoom(0);return ln(n)?n:new Promise(function(i){i(n)})}},{key:"setPoster",value:function(n){lt()?document.getElementById("".concat(this.id))&&(document.getElementById("".concat(this.id)).style.backgroundImage="url(".concat(n,")"),document.getElementById("".concat(this.id)).style.backgroundSize="100% 100%"):document.getElementById("".concat(this.id,"canvas0"))&&(document.getElementById("".concat(this.id,"canvas0")).style.backgroundImage="url(".concat(n,")"),document.getElementById("".concat(this.id,"canvas0")).style.backgroundSize="cover")}},{key:"reSize",value:function(n,i){var r=0,a=0;if(this.params.height=i,this.params.width=n,this.Theme&&this.Theme.isNeedRenderHeader&&document.getElementById("".concat(this.id,"-headControl"))&&(r=parseInt(document.getElementById("".concat(this.id,"-headControl")).style.height,10)),this.Theme&&this.Theme.isNeedRenderTimeLine&&!this.isMobile&&(a=48),i=i-r-a,this.width=n,this.height=i,document.getElementById("".concat(this.id,"-wrap")).style="width:".concat(n,"px;position:relative;display:inline-block;vertical-align: bottom;"),document.getElementById("".concat(this.id)).style.width=n+"px",document.getElementById("".concat(this.id)).style.height=i+"px",this.jSPlugin&&this.jSPlugin.bPlay)this.jSPlugin&&(this.jSPlugin.iHeight=i,this.jSPlugin.iWidth=n),this.jSPlugin.JS_Resize(n,i);else{document.getElementById("".concat(this.id,"-player"))&&(document.getElementById("".concat(this.id,"-player")).width=n,document.getElementById("".concat(this.id,"-player")).height=i,document.getElementById("".concat(this.id,"-player")).style.width=n+"px",document.getElementById("".concat(this.id,"-player")).style.height=i+"px");var l=1;if(document.getElementById("".concat(this.id,"canvas0"))){var s=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);s&&(l=2),document.getElementById("".concat(this.id,"canvas0")).style.width=n*l+"px",document.getElementById("".concat(this.id,"canvas0")).style.height=i*l+"px",document.getElementById("".concat(this.id,"canvas0")).width=n*l,document.getElementById("".concat(this.id,"canvas0")).height=i*l,document.getElementById("".concat(this.id,"canvas0")).parentNode.style.width=n*l+"px",document.getElementById("".concat(this.id,"canvas0")).parentNode.style.height=i*l+"px",document.getElementById("".concat(this.id,"canvas_draw0")).height=i*l}this.jSPlugin&&(this.jSPlugin.iHeight=i*l,this.jSPlugin.iWidth=n*l)}}},{key:"fast",value:function(n){var i=this,r=this.speed;if(n)var a=this.jSPlugin.JS_Fast(0,n);else{if(r===1)r=2;else if(r===2)r=4;else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"播放速度最大为4倍速度",retcode:1003,id:this.id,type:"handleError"}),new Promise(function(s,b){i.speed=r,b({code:-1,data:{speed:r,result:"播放速度最大为4倍速度"}})});var a=this.jSPlugin.JS_Fast(0)}return new Promise(function(l){i.speed=r,l({code:0,data:{speed:r,result:a}})})}},{key:"slow",value:function(){var n=this,i=this.speed;if(i===4)i=2;else if(i===2)i=1;else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"播放速度最小为1倍速度",retcode:1003,id:this.id,type:"handleError"}),new Promise(function(a,l){n.speed=i,l({code:-1,data:{speed:i,result:"播放速度最小为1倍速度"}})});var r=this.jSPlugin.JS_Slow(0);return new Promise(function(a){n.speed=i,a({code:0,data:{speed:i,result:r}})})}},{key:"seek",value:function(n,i){var r=this.url,a=(et("begin",r)||new Date().Format("yyyyMMdd")).substr(0,8);if(i=l(a,"235959"),n.length===6)n=l(a,n);else if(n.length===16){if(n.substr(0,8)!==a)return typeof this.params.handleError=="function"&&this.params.handleError({msg:"seek时间不能跨日期",retcode:-1,id:this.id,type:"handleError"}),!1}else return typeof this.params.handleError=="function"&&this.params.handleError({msg:"seek时间格式错误",retcode:-1,id:this.id,type:"handleError"}),!1;function l(b,T){var C=/^[0-9]{8}T[0-9]{6}Z$/;if(C.test(b))return b;if(/[0-9]{8,14}/.test(b)){var y=6-(14-b.length),h=T.length,D=b+T.substring(y,h);return D.slice(0,8)+"T"+D.slice(8)+"Z"}throw new Error("回放时间格式有误,请确认")}var s=this.jSPlugin.JS_Seek(0,n,i);return console.log("seekRT",s),ln(s)?s:new Promise(function(b){b(s)})}},{key:"fullScreen",value:function(){var n=this,i=yi(document.getElementById("".concat(this.id)));i.then(function(a){console.log("全屏promise",window.screen.availWidth),n.jSPlugin.JS_Resize(window.screen.availWidth,window.screen.availHeight),typeof n.params.fullScreenCallBack=="function"&&n.params.fullScreenCallBack({id:n.id,type:"fullScreen",code:0})});var r=function(){var l=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;l||n.jSPlugin.JS_Resize(n.width,n.height),typeof n.params.fullScreenChangeCallBack=="function"&&n.params.fullScreenChangeCallBack({id:n.id,type:"fullScreen",code:l})};["fullscreenchange","webkitfullscreenchange","mozfullscreenchange"].forEach(function(a){window.addEventListener(a,function(l){return r()})})}},{key:"cancelFullScreen",value:function(){var n=this,i=Nr();i.then(function(r){console.log("取消全屏",r,n.jSPlugin),n.jSPlugin.JS_Resize(n.width,n.height)})}},{key:"startTalk",value:function(){this.Talk.startTalk()}},{key:"stopTalk",value:function(){this.Talk.stopTalk()}},{key:"destroy",value:function(){var n=this.jSPlugin.JS_DestroyWorker(0);return this.Theme&&(this.Theme=null,window.EZUIKit[this.params.id].state.EZUIKitPlayer.themeInit=!1),ln(n)?n:new Promise(function(i){i(n)})}},{key:"getDeviceCapacity",value:function(n){var i=this,r=this.env.domain;this.env&&(r=this.env.domain);var a=r+"/api/lapp/device/capacity",l=function(T){T.code==200&&T.data&&(i.capacity=T.data)},s=n||{accessToken:this.accessToken,deviceSerial:Ke(this.url).deviceSerial};Gn(a,"POST",s,"",l)}},{key:"pause",value:function(){var n=this;return new Promise(function(i,r){n.jSPlugin.JS_CloseSound(0),n.jSPlugin.JS_Pause(0,function(a){n.setPoster(a.base64)}).then(function(a){n.Theme&&n.Theme.setDecoderState({play:!1}),i()}).catch(function(a){console.log(a),r(a)})})}},{key:"_resume",value:function(n){var i=this;return new Promise(function(r,a){i.pluginStatus.setPlayStatus({play:!1,loading:!0}),i.jSPlugin.JS_Resume(n).then(function(l){if(setTimeout(function(){i.url.indexOf(".rec")!==-1&&i.speed!=1&&i.jSPlugin.JS_Speed(i.speed)},500),i.Theme){i.Theme.setDecoderState({play:!0,speed:i.speed});var s=i.Theme.decoderState.state.sound;s&&setTimeout(function(){i.openSound()},500)}r(l)}).catch(function(l){console.log("resume err",l),a(l)})})}}]),f}(),qe=null;function Vs(f,u,n,i){return new WebControl({szPluginContainer:f,iServicePortStart:14510,iServicePortEnd:14519,cbConnectSuccess:u,cbConnectError:n,cbConnectClose:i})}function Ws(){qe!=null&&(qe.JS_DestroyWnd().then(function(){console.log("JS_DestroyWnd")},function(){}),qe.JS_StopService("window").then(function(){qe.JS_Disconnect().then(function(){console.log("JS_Disconnect")},function(){})}))}function Gs(f){f.responseMsg.eventName,console.log(f.responseMsg)}function Zs(){qe.JS_SetWindowControlCallback({cbIntegrationCallBack:Gs}),qe.JS_StartService("window",{dllPath:"./chain/cloudTransform.dll"}).then(function(){qe.JS_CreateWnd("playWnd",900,500).then(function(){console.log("JS_CreateWnd success")})})}function Js(){console.log("cbConnectError"),qe=null,console.error("确认本地进程是否已安装并开启成功!")}function Ks(f){console.log("cbConnectClose"),qe=null}window.onscroll=function(){qe!=null&&qe.JS_Resize(900,500)},window.onresize=function(){qe!=null&&qe.JS_Resize(900,500)},window.onunload=function(){try{qe.JS_HideWnd(),Ws()}catch(f){console.error(f)}},window.onpagehide=function(){try{qe.JS_HideWnd()}catch(f){console.error(f)}};var qs=function(){function f(u){var n=this;fe(this,f),je(this,"changeModel",function(i,r){var a=n;n.switchVideo=parseInt(i),qe&&qe.JS_RequestInterface({funcName:"ChangeModel",arguments:encodeURI(JSON.stringify({model:i}))}).then(function(l){i==0?a.play({deviceSerial:r.deviceSerial,channelNo:r.channelNo,validateCode:r.validateCode}):a.play({deviceSerial:r.deviceSerial,channelNo:r.channelNo,validateCode:r.validateCode,startTime:r.startTime,endTime:r.endTime})})}),je(this,"init",function(i){var r,a=n;if(!i.appKey||!i.accessToken){a.showTips(!1,"请输入appkey和token");return}typeof i.appKey!="undefined"&&(n.appKey=i.appKey),typeof i.accessToken!="undefined"&&(n.accessToken=i.accessToken),typeof i.platformId!="undefined"&&(n.platformId=i.platformId);var l=(r={layout:+a.layout,userName:"",waterMark:""},je(r,"waterMark","1"),je(r,"iWndType",0),je(r,"intelligenceEnable",1),je(r,"isRecord",1),je(r,"isSetPos",1),je(r,"motionDetectEnable",0),je(r,"playBackAlarmOverlyingEnable",0),je(r,"response",{code:0,message:null,data:{appKey:i.appKey,ezvizToken:i.accessToken,videoLevel:0,logLevel:3,showMainTool:1,showSubTool:1,waterMark:"1",userName:"openteam",platformId:i.platformId}}),r);console.log("初始化入参",l),qe.JS_RequestInterface({funcName:"Init",arguments:encodeURI(JSON.stringify(l))}).then(function(s){console.log(s.responseMsg),a.showTips(!0,"视频初始化成功!")})}),je(this,"play",function(i){var r=n;if(!(!i.deviceSerial||!i.channelNo)){typeof i.deviceSerial!="undefined"&&(n.deviceSerial=i.deviceSerial),typeof i.channelNo!="undefined"&&(n.channelNo=i.channelNo),typeof i.startTime!="undefined"&&i.startTime&&(n.startTime=i.startTime+" 00:00:00"),typeof i.endTime!="undefined"&&i.endTime&&(n.endTime=i.endTime+" 23:59:59"),typeof i.validateCode!="undefined"&&i.validateCode&&(n.validateCode=i.validateCode);var a={response:{code:0,message:null,data:{deviceSerial:i.deviceSerial,channelCode:i.channelNo,channelNo:+i.channelNo,codeIsEncrypt:0,validateCode:i.validateCode,deviceClass:r.deviceClass,deviceType:"10222",channelId:"2222222222",channelName:"channelNameTest",storeName:"storeName",storeId:"storeid",startTime:n.startTime,endTime:n.endTime}}};r.deviceClass==="1"?(a.response.data.channelCode=r.channelNo,a.response.data.platformId=r.platformId):a.response.data.channelNo=+r.channelNo,n.switchVideo===1&&(n.startTime&&(a.response.data.startTime=n.startTime),n.endTime&&(a.response.data.endTime=n.endTime)),console.log("预览/回放入参",a),qe.JS_RequestInterface({funcName:n.switchVideo===0?"StartPreview":"StartPlayback",arguments:encodeURI(JSON.stringify(a))}).then(function(l){console.log(l.responseMsg),r.showTips(!0,"预览/回放成功!")}).catch(function(l){console.log("开始播放:",l)})}}),je(this,"showCBInfo",function(i){n.callbackMessage=n.callbackMessage+JSON.stringify(i)+`
|
|
|
|
|
|
`,console.log(n.callbackMessage)}),je(this,"showTips",function(i,r){}),je(this,"hideVideo",function(){qe.JS_HideWnd()}),je(this,"showVideo",function(){qe.JS_ShowWnd()}),je(this,"GetLayout",function(){var i=null;qe.JS_RequestInterface({funcName:"GetLayout",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:i}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"capturePicture",function(i){var r=null;qe.JS_RequestInterface({funcName:"CaptureJPGEx",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:r}}))}).then(function(a){console.log(JSON.stringify(a.responseMsg)),console.log(a.responseMsg)})}),je(this,"stop",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1;qe.JS_RequestInterface({funcName:"StopPlay",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i)}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"setLayout",function(i){var r=parseInt(i);if(isNaN(r)||r==0||r>=13){console.log("不支持实际布局大于16的窗口数");return}n.layout=r,qe.JS_RequestInterface({funcName:"SetLayout",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{layout:r}}}))}).then(function(a){console.log(JSON.stringify(a.responseMsg)),console.log(a.responseMsg)})}),je(this,"setSoundVolumn",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:-1,r=arguments.length>1?arguments[1]:void 0;qe.JS_RequestInterface({funcName:"SoundVolumn",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i),volumn:parseInt(r)}}}))}).then(function(a){console.log(JSON.stringify(a.responseMsg)),console.log(a.responseMsg)})}),je(this,"testMute",function(){var i=parseInt(prompt("请输入窗口ID"));qe.JS_RequestInterface({funcName:"MuteOnOff",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:i}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"testSelectWnd",function(){var i=parseInt(prompt("请输入窗口ID"));qe.JS_RequestInterface({funcName:"SelectPlayWnd",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:i}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"setVideoLevel",function(i,r){qe.JS_RequestInterface({funcName:"SetVideoLevel",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:n.switchVideo==1?0:parseInt(i),level:parseInt(r,10)}}}))}).then(function(a){console.log(JSON.stringify(a.responseMsg)),console.log(a.responseMsg)})}),je(this,"startTalk",function(i){qe.JS_RequestInterface({funcName:"StartTalk",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i)}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"stopTalk",function(i){qe.JS_RequestInterface({funcName:"StopTalk",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i)}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"startSave",function(i){qe.JS_RequestInterface({funcName:"StartRecord",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i)}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),je(this,"stopSave",function(i){qe.JS_RequestInterface({funcName:"StopRecord",arguments:encodeURI(JSON.stringify({response:{code:0,message:null,data:{wndId:parseInt(i)}}}))}).then(function(r){console.log(JSON.stringify(r.responseMsg)),console.log(r.responseMsg)})}),this.appKey="b9a3ad6e8026410095d8252169fa430a",this.accessToken="at.2vtum8873rrcwbrv431qb6pn94dkbv23-8dw2twn355-1u3x014-wrthellzk",this.deviceSerial="C33368372",this.channelNo="1",this.validateCode="",this.deviceClass="0",this.platformId="",this.startTime="",this.endTime="",this.layout=2,this.switchVideo=0,this.tips="调用成功",this.successTip=!1,this.tipsShow=!1,qe=Vs("playWnd",Zs,Js,Ks)}return dt(f,[{key:"alarmMsg",value:function(){var n={request:{body:{alarmTypes:[10800,0,0,0,0],channelId:"066dde0465dd4abaab6afe355baf9d0b",endTime:"1621007999000",startTime:"1620921600000"},callBack:"GetAlarmMsgOrders",majorKey:"",method:"POST",storeId:"",url:"/videoplugin/message/getMessageByTypes"},response:{code:0,message:null,data:[{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620921217e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620920678e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620920586e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919513e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919483e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620919333e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918913e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918616e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620918305e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917858e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917658e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917244e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620917064e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916994e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916668e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916529e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916343e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620916081e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915825e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915676e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915531e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915394e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620915197e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914971e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914644e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914533e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914457e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914376e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620914284e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620913973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620913431e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912771e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912354e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912275e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912093e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620912024e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091189e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911839e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911807e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091176e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911682e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091127e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620911184e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910982e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910851e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910781e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910727e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910677e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910647e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910588e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910544e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910484e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091041e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162091035e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910278e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910217e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620910124e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909976e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909939e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909847e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909817e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909736e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909664e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909605e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909575e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909346e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909247e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909149e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090912e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620909028e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908999e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908969e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908909e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090888e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908835e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090875e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090872e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908652e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908612e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908582e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908552e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908456e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908426e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908299e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620908268e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090805e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907918e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907758e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907625e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907386e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907292e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620907127e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906864e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906828e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906797e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906747e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906717e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906632e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906368e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906329e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906142e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620906013e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905946e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905823e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905697e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905622e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905541e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905511e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905481e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905442e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905382e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905352e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905322e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905262e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620905196e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090515e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904994e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904813e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090473e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16209047e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904618e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904286e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904173e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904143e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904053e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620904023e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903854e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903789e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903723e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903643e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903612e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903573e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903505e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903383e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903329e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903299e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903268e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16209032e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620903149e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090312e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902977e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090286e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090277e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902639e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902609e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902517e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902373e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090232e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902253e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902198e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620902132e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090194e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090185e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901789e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901746e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901685e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901638e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090152e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901489e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901424e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901271e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901233e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620901157e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900915e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900774e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900744e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090065e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162090044e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900409e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900175e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900134e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900069e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620900016e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899976e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899908e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899879e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899826e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899756e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899599e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899559e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899467e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899406e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899265e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620899211e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089914e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089911e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089905e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898991e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898926e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898785e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898746e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898697e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898666e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898507e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898293e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898248e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898218e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898157e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620898088e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089802e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089796e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089785e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897807e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897771e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897719e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089769e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089763e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:16208976e5},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089757e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089754e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897475e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897369e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897339e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897279e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897237e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897207e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897172e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897142e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897112e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620897024e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896985e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896874e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896843e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896814e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896783e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896736e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896621e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896478e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896447e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896358e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896307e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896277e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896247e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620896214e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089604e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895953e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895921e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895868e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089577e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895704e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089559e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895559e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089548e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895442e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895377e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895347e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895293e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895171e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895136e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620895017e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894926e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894896e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894864e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894834e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894738e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894599e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894539e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894426e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894359e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894297e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894213e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894183e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620894051e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893964e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893934e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893843e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893754e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893676e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893606e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089353e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893452e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893423e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893357e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893288e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893143e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893051e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620893006e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892904e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892824e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892764e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892541e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892479e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892412e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892311e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892281e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892209e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620892063e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891991e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891931e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089187e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089181e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891708e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891655e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891585e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891531e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891401e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891297e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891257e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891178e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891128e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620891033e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162089094e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890879e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890794e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890714e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890616e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890586e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890469e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890414e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890346e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890288e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890179e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890108e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890041e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620890011e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889937e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889719e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889635e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889481e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889451e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889317e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889227e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889139e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620889034e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888973e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888902e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888837e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888767e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888737e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888706e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888633e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888571e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888413e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888353e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888323e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888249e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888162e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620888e6},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887859e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887776e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887734e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887692e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887619e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887501e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887355e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088732e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887289e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887126e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887066e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620887034e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088697e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886884e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886804e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886728e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886609e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886538e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886478e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886396e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886334e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886246e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886111e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620886011e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885956e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885894e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885696e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885514e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885484e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885414e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885383e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885341e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885306e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885276e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885216e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885186e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885114e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885037e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620885006e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884975e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884945e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884911e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884851e3},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:162088478e4},{alarmType:10800,alarmName:"移动侦测报警",alarmTime:1620884696e3}],success:!0}};console.log(n),qe.JS_RequestInterface({funcName:"TransFunctionResult",arguments:encodeURI(JSON.stringify(n))})}}]),f}();(function(f,u){ue(ae)==="object"&&ue(ae.exports)==="object"?ae.exports=f.document?u(f,!0):function(n){if(!n.document)throw new Error("EZUIPlayer requires a window with a document");return u(n)}:u(f)})(typeof window!="undefined"?window:void 0,function(f,u){var n={Core:gn,HLS:Yl,FLV:Xl,EZUIKitPlayer:Hs,EZUIKitHD:qs};return f.EZUIKit=n,n})})(Mr,Mr.exports);var vh=Mr.exports;const Bh=gh(vh),yh="/jsyApi",Th=["邛溪镇","刷经寺镇","安曲镇","龙日镇","江茸乡","查尔玛乡","瓦切镇","阿木乡","麦洼乡","色地镇"];function Sh(ae){return/^https?:\/\//.test(ae)?ae:`${yh}${ae.startsWith("/")?ae:`/${ae}`}`}function Ch(ae){if((ae==null?void 0:ae.success)===!1||(ae==null?void 0:ae.code)!==void 0&&![0,200,"0","200"].includes(ae.code)){const ue=new Error((ae==null?void 0:ae.msg)||(ae==null?void 0:ae.message)||"视频监控接口请求失败");throw ue.code=ae==null?void 0:ae.code,ue}return hh(ae)}function Pn(ae,Je,ue=""){for(const fe of Je)if((ae==null?void 0:ae[fe])!==void 0&&(ae==null?void 0:ae[fe])!==null&&(ae==null?void 0:ae[fe])!=="")return ae[fe];return ue}function bh(ae,Je){for(const ue of Je)if((ae==null?void 0:ae[ue])!==void 0&&(ae==null?void 0:ae[ue])!==null&&(ae==null?void 0:ae[ue])!=="")return{key:ue,value:ae[ue]};return null}function Gl(ae){return Pn(ae,["token","accessToken","access_token"])}function Ph(ae){return Pn(ae,["hdPlayUrl","hd_play_url","playUrl","play_url","url"])}function qo(ae){return!!(Gl(ae)&&Ph(ae))}function wh(ae){return bh(ae,["isOnline","is_online","online","onlineStatus","online_status","statusName","status_name","deviceStatus","device_status","cameraStatus","camera_status","rawStatus","raw_status","status","state","deviceState","device_state"])}function Zl(ae){const Je=qo(ae),ue=wh(ae);if(!ue)return{online:Je,raw:"",reason:Je?"后台未返回设备状态":"缺少播放地址或令牌"};const fe=ue.value;if(typeof fe=="boolean")return{online:fe,raw:fe?"在线":"离线",reason:`后台状态:${fe?"在线":"离线"}`};const St=String(fe!=null?fe:"").trim().toLowerCase();return St?typeof fe=="number"||/^-?\d+(\.\d+)?$/.test(St)?{online:Number(fe)!==0,raw:String(fe),reason:`后台状态:${fe}`}:["true","online","on","open","running","active","enabled"].includes(St)?{online:!0,raw:String(fe),reason:`后台状态:${fe}`}:["false","offline","off","closed","disabled","stop","stopped"].includes(St)?{online:!1,raw:String(fe),reason:`后台状态:${fe}`}:/(离线|不在线|未在线|断线|断开|异常|故障|停用|不可用|offline|disabled|closed|stop)/i.test(St)?{online:!1,raw:String(fe),reason:`后台状态:${fe}`}:/(在线|直播中|正常|启用|可用|online|enabled|open|running|active)/i.test(St)?{online:!0,raw:String(fe),reason:`后台状态:${fe}`}:{online:Je,raw:String(fe),reason:`后台状态:${fe}`}:{online:Je,raw:"",reason:Je?"后台状态为空":"缺少播放地址或令牌"}}function Eh(ae){return Zl(ae).online}function Ih(ae){return Pn(ae,["previewImgUrl","preview_img_url","latestCaptureUrl","latest_capture_url","img","image","cover","snapshot"])}function xh(ae){return Pn(ae,["lastCaptureTime","last_capture_time","captureTime","capture_time","latestCaptureTime","latest_capture_time"])}function _h(ae){return!!(qo(ae)&&Eh(ae))}function Rh(ae=""){const Je=String(ae);return Th.find(fe=>Je.includes(fe.replace(/[镇乡]$/,"")))||"红原县"}function kh(ae=""){const Je=String(ae);return Je.includes("养殖")?"养殖基地":Je.includes("饲草")?"饲草基地":Je.includes("种草")||Je.includes("牧草")?"牧草基地":Je.includes("虫情")?"虫情监测":Je.includes("机场")?"机场周边":"重点点位"}function Ah(ae,Je){const ue=Pn(ae,["hdPlayUrl","playUrl","url"]),fe=String(ue).match(/\/(\d+)(?:\.hd)?\.live/i);return fe?fe[1].padStart(2,"0"):String(Je+1).padStart(2,"0")}function Dh(){return new Date().toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit",hour12:!1})}function Mh(ae,Je,ue,fe){const St=Pn(ae,["name","title","deviceName"],`视频监控${Je+1}`),dt=Pn(ae,["hdPlayUrl","hd_play_url","url"]),je=Pn(ae,["playUrl","play_url"],dt),gn=Gl(ae),ut=Zl(ae),Mt=!!(qo(ae)&&ut.online),ln=ue?Math.round(fe/ue*100):0;return{key:Pn(ae,["id","number","deviceSerial"],`${St}-${Je}`),title:St,town:Rh(St),scene:kh(St),device:Pn(ae,["number","deviceSerial","serialNumber"],`CAM-${String(Je+1).padStart(3,"0")}`),channel:Ah(ae,Je),cameraCount:ue,status:Mt?"直播中":"离线",rawStatus:ut.raw,statusReason:ut.reason,onlineRate:ln,updateTime:Dh(),operator:Mt?"萤石云 · 在线预览":ut.reason,progress:Mt?100:0,image:Ih(ae),lastCaptureTime:xh(ae),playUrl:je,hdPlayUrl:dt,token:gn,source:ae}}function zh(){return Wl(this,arguments,function*(ae={}){const gn=ae,{includeOffline:Je=!1}=gn,ue=Vl(gn,["includeOffline"]),fe=yield fh(Sh("/api/home/monitorings"),{params:ue,timeout:18e3}).then(Ch),St=Array.isArray(fe)?fe:(fe==null?void 0:fe.rows)||(fe==null?void 0:fe.list)||[],dt=St.filter(_h),je=St.map((ut,Mt)=>Mh(ut,Mt,St.length,dt.length));return Je?je.sort((ut,Mt)=>+(Mt.status==="直播中")-+(ut.status==="直播中")):je.filter(ut=>ut.status==="直播中")})}const jh=""+new URL("live-scene-1-786cdd0a-balabala-1784132466083.png",import.meta.url).href;export{Bh as E,zh as g,jh as l};
|
|
|
|