UNPKG

trtc-sdk-v5

Version:
5 lines 682 kB
var Tf=Object.create;var Ks=Object.defineProperty,Ef=Object.defineProperties,qu=Object.getOwnPropertyDescriptor,Sf=Object.getOwnPropertyDescriptors,If=Object.getOwnPropertyNames,Sn=Object.getOwnPropertySymbols,ju=Object.getPrototypeOf,Uc=Object.prototype.hasOwnProperty,Xu=Object.prototype.propertyIsEnumerable,Af=Reflect.get;var Zi=Math.pow,wc=(s,i,e)=>i in s?Ks(s,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[i]=e,N=(s,i)=>{for(var e in i||(i={}))Uc.call(i,e)&&wc(s,e,i[e]);if(Sn)for(var e of Sn(i))Xu.call(i,e)&&wc(s,e,i[e]);return s},L=(s,i)=>Ef(s,Sf(i));var zu=(s,i)=>{var e={};for(var t in s)Uc.call(s,t)&&i.indexOf(t)<0&&(e[t]=s[t]);if(s!=null&&Sn)for(var t of Sn(s))i.indexOf(t)<0&&Xu.call(s,t)&&(e[t]=s[t]);return e};var Ei=(s,i)=>()=>(i||s((i={exports:{}}).exports,i),i.exports),Si=(s,i)=>{for(var e in i)Ks(s,e,{get:i[e],enumerable:!0})},Rf=(s,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of If(i))!Uc.call(s,r)&&r!==e&&Ks(s,r,{get:()=>i[r],enumerable:!(t=qu(i,r))||t.enumerable});return s};var $e=(s,i,e)=>(e=s!=null?Tf(ju(s)):{},Rf(i||!s||!s.__esModule?Ks(e,"default",{value:s,enumerable:!0}):e,s));var v=(s,i,e,t)=>{for(var r=t>1?void 0:t?qu(i,e):i,o=s.length-1,n;o>=0;o--)(n=s[o])&&(r=(t?n(i,e,r):n(r))||r);return t&&r&&Ks(i,e,r),r};var d=(s,i,e)=>wc(s,typeof i!="symbol"?i+"":i,e);var He=(s,i,e)=>Af(ju(s),e,i);var f=(s,i,e)=>new Promise((t,r)=>{var o=c=>{try{a(e.next(c))}catch(l){r(l)}},n=c=>{try{a(e.throw(c))}catch(l){r(l)}},a=c=>c.done?t(c.value):Promise.resolve(c.value).then(o,n);a((e=e.apply(s,i)).next())});var Ye=Ei((OE,Vc)=>{"use strict";var Cf=Object.prototype.hasOwnProperty,Qe="~";function eo(){}Object.create&&(eo.prototype=Object.create(null),new eo().__proto__||(Qe=!1));function yf(s,i,e){this.fn=s,this.context=i,this.once=e||!1}function Qu(s,i,e,t,r){if(typeof e!="function")throw new TypeError("The listener must be a function");var o=new yf(e,t||s,r),n=Qe?Qe+i:i;return s._events[n]?s._events[n].fn?s._events[n]=[s._events[n],o]:s._events[n].push(o):(s._events[n]=o,s._eventsCount++),s}function In(s,i){--s._eventsCount===0?s._events=new eo:delete s._events[i]}function We(){this._events=new eo,this._eventsCount=0}We.prototype.eventNames=function(){var i=[],e,t;if(this._eventsCount===0)return i;for(t in e=this._events)Cf.call(e,t)&&i.push(Qe?t.slice(1):t);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i};We.prototype.listeners=function(i){var e=Qe?Qe+i:i,t=this._events[e];if(!t)return[];if(t.fn)return[t.fn];for(var r=0,o=t.length,n=new Array(o);r<o;r++)n[r]=t[r].fn;return n};We.prototype.listenerCount=function(i){var e=Qe?Qe+i:i,t=this._events[e];return t?t.fn?1:t.length:0};We.prototype.emit=function(i,e,t,r,o,n){var a=Qe?Qe+i:i;if(!this._events[a])return!1;var c=this._events[a],l=arguments.length,h,u;if(c.fn){switch(c.once&&this.removeListener(i,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,t),!0;case 4:return c.fn.call(c.context,e,t,r),!0;case 5:return c.fn.call(c.context,e,t,r,o),!0;case 6:return c.fn.call(c.context,e,t,r,o,n),!0}for(u=1,h=new Array(l-1);u<l;u++)h[u-1]=arguments[u];c.fn.apply(c.context,h)}else{var m=c.length,g;for(u=0;u<m;u++)switch(c[u].once&&this.removeListener(i,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,t);break;case 4:c[u].fn.call(c[u].context,e,t,r);break;default:if(!h)for(g=1,h=new Array(l-1);g<l;g++)h[g-1]=arguments[g];c[u].fn.apply(c[u].context,h)}}return!0};We.prototype.on=function(i,e,t){return Qu(this,i,e,t,!1)};We.prototype.once=function(i,e,t){return Qu(this,i,e,t,!0)};We.prototype.removeListener=function(i,e,t,r){var o=Qe?Qe+i:i;if(!this._events[o])return this;if(!e)return In(this,o),this;var n=this._events[o];if(n.fn)n.fn===e&&(!r||n.once)&&(!t||n.context===t)&&In(this,o);else{for(var a=0,c=[],l=n.length;a<l;a++)(n[a].fn!==e||r&&!n[a].once||t&&n[a].context!==t)&&c.push(n[a]);c.length?this._events[o]=c.length===1?c[0]:c:In(this,o)}return this};We.prototype.removeAllListeners=function(i){var e;return i?(e=Qe?Qe+i:i,this._events[e]&&In(this,e)):(this._events=new eo,this._eventsCount=0),this};We.prototype.off=We.prototype.removeListener;We.prototype.addListener=We.prototype.on;We.prefixed=Qe;We.EventEmitter=We;typeof Vc!="undefined"&&(Vc.exports=We)});var da=Ei((PS,wh)=>{"use strict";var Lh=wh.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(s){return s.encoding?"rtpmap:%d %s/%s/%s":s.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(s){return s.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(s){return s.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(s){return"extmap:%d"+(s.direction?"/%s":"%v")+(s["encrypt-uri"]?" %s":"%v")+" %s"+(s.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(s){return s.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(s){var i="candidate:%s %d %s %d %s %d typ %s";return i+=s.raddr!=null?" raddr %s rport %d":"%v%v",i+=s.tcptype!=null?" tcptype %s":"%v",s.generation!=null&&(i+=" generation %d"),i+=s["network-id"]!=null?" network-id %d":"%v",i+=s["network-cost"]!=null?" network-cost %d":"%v",i}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(s){var i="ssrc:%d";return s.attribute!=null&&(i+=" %s",s.value!=null&&(i+=":%s")),i}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(s){return s.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(s){return s.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(s){return"imageattr:%s %s %s"+(s.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(s){return"simulcast:%s %s"+(s.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(s){return"ts-refclk:%s"+(s.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(s){var i="mediaclk:";return i+=s.id!=null?"id=%s %s":"%v%s",i+=s.mediaClockValue!=null?"=%s":"",i+=s.rateNumerator!=null?" rate=%s":"",i+=s.rateDenominator!=null?"/%s":"",i}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(Lh).forEach(function(s){var i=Lh[s];i.forEach(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")})})});var Bh=Ei(Li=>{"use strict";var bs=function(s){return String(Number(s))===s?Number(s):s},I_=function(s,i,e,t){if(t&&!e)i[t]=bs(s[1]);else for(var r=0;r<e.length;r+=1)s[r+1]!=null&&(i[e[r]]=bs(s[r+1]))},A_=function(s,i,e){var t=s.name&&s.names;s.push&&!i[s.push]?i[s.push]=[]:t&&!i[s.name]&&(i[s.name]={});var r=s.push?{}:t?i[s.name]:i;I_(e.match(s.reg),r,s.names,s.name),s.push&&i[s.push].push(r)},Uh=da(),R_=RegExp.prototype.test.bind(/^([a-z])=(.*)/);Li.parse=function(s){var i={},e=[],t=i;return s.split(/(\r\n|\r|\n)/).filter(R_).forEach(function(r){var o=r[0],n=r.slice(2);o==="m"&&(e.push({rtp:[],fmtp:[]}),t=e[e.length-1]);for(var a=0;a<(Uh[o]||[]).length;a+=1){var c=Uh[o][a];if(c.reg.test(n))return A_(c,t,n)}}),i.media=e,i};var Vh=function(s,i){var e=i.split(/=(.+)/,2);return e.length===2?s[e[0]]=bs(e[1]):e.length===1&&i.length>1&&(s[e[0]]=void 0),s};Li.parseParams=function(s){return s.split(/;\s?/).reduce(Vh,{})};Li.parseFmtpConfig=Li.parseParams;Li.parsePayloads=function(s){return s.toString().split(" ").map(Number)};Li.parseRemoteCandidates=function(s){for(var i=[],e=s.split(" ").map(bs),t=0;t<e.length;t+=3)i.push({component:e[t],ip:e[t+1],port:e[t+2]});return i};Li.parseImageAttributes=function(s){return s.split(" ").map(function(i){return i.substring(1,i.length-1).split(",").reduce(Vh,{})})};Li.parseSimulcastStreamList=function(s){return s.split(";").map(function(i){return i.split(",").map(function(e){var t,r=!1;return e[0]!=="~"?t=bs(e):(t=bs(e.substring(1,e.length)),r=!0),{scid:t,paused:r}})})}});var $h=Ei((LS,Fh)=>{"use strict";var Fd=da(),C_=/%[sdv%]/g,y_=function(s){var i=1,e=arguments,t=e.length;return s.replace(C_,function(r){if(i>=t)return r;var o=e[i];switch(i+=1,r){case"%%":return"%";case"%s":return String(o);case"%d":return Number(o);case"%v":return""}})},Mo=function(s,i,e){var t=i.format instanceof Function?i.format(i.push?e:e[i.name]):i.format,r=[s+"="+t];if(i.names)for(var o=0;o<i.names.length;o+=1){var n=i.names[o];i.name?r.push(e[i.name][n]):r.push(e[i.names[o]])}else r.push(e[i.name]);return y_.apply(null,r)},b_=["v","o","s","i","u","e","p","c","b","t","r","z","a"],N_=["i","c","b","a"];Fh.exports=function(s,i){i=i||{},s.version==null&&(s.version=0),s.name==null&&(s.name=" "),s.media.forEach(function(o){o.payloads==null&&(o.payloads="")});var e=i.outerOrder||b_,t=i.innerOrder||N_,r=[];return e.forEach(function(o){Fd[o].forEach(function(n){n.name in s&&s[n.name]!=null?r.push(Mo(o,n,s)):n.push in s&&s[n.push]!=null&&s[n.push].forEach(function(a){r.push(Mo(o,n,a))})})}),s.media.forEach(function(o){r.push(Mo("m",Fd.m[0],o)),t.forEach(function(n){Fd[n].forEach(function(a){a.name in o&&o[a.name]!=null?r.push(Mo(n,a,o)):a.push in o&&o[a.push]!=null&&o[a.push].forEach(function(c){r.push(Mo(n,a,c))})})})}),r.join(`\r `)+`\r `}});var Hh=Ei(ri=>{"use strict";var xr=Bh(),v_=$h(),D_=da();ri.grammar=D_;ri.write=v_;ri.parse=xr.parse;ri.parseParams=xr.parseParams;ri.parseFmtpConfig=xr.parseFmtpConfig;ri.parsePayloads=xr.parsePayloads;ri.parseRemoteCandidates=xr.parseRemoteCandidates;ri.parseImageAttributes=xr.parseImageAttributes;ri.parseSimulcastStreamList=xr.parseSimulcastStreamList});var vu=Ei((Ww,yp)=>{"use strict";var Cp=yp.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(s){return s.encoding?"rtpmap:%d %s/%s/%s":s.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(s){return s.address!=null?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%s trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(s){return s.subtype!=null?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,names:["value","direction","encrypt-uri","uri","config"],format:function(s){return"extmap:%d"+(s.direction?"/%s":"%v")+(s["encrypt-uri"]?" %s":"%v")+" %s"+(s.config?" %s":"")}},{name:"extmapAllowMixed",reg:/^(extmap-allow-mixed)/},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(s){return s.sessionConfig!=null?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"connectionType",reg:/^connection:(new|existing)/,format:"connection:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*(?:\.\d*)*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*(?:\.\d*)*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(s){var i="candidate:%s %d %s %d %s %d typ %s";return i+=s.raddr!=null?" raddr %s rport %d":"%v%v",i+=s.tcptype!=null?" tcptype %s":"%v",s.generation!=null&&(i+=" generation %d"),i+=s["network-id"]!=null?" network-id %d":"%v",i+=s["network-cost"]!=null?" network-cost %d":"%v",i}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(s){var i="ssrc:%d";return s.attribute!=null&&(i+=" %s",s.value!=null&&(i+=":%s")),i}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(s){return s.maxMessageSize!=null?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(s){return s.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(s){return"imageattr:%s %s %s"+(s.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(s){return"simulcast:%s %s"+(s.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{name:"sourceFilter",reg:/^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,names:["filterMode","netType","addressTypes","destAddress","srcList"],format:"source-filter: %s %s %s %s %s"},{name:"bundleOnly",reg:/^(bundle-only)/},{name:"label",reg:/^label:(.+)/,format:"label:%s"},{name:"sctpPort",reg:/^sctp-port:(\d+)$/,format:"sctp-port:%s"},{name:"maxMessageSize",reg:/^max-message-size:(\d+)$/,format:"max-message-size:%s"},{push:"tsRefClocks",reg:/^ts-refclk:([^\s=]*)(?:=(\S*))?/,names:["clksrc","clksrcExt"],format:function(s){return"ts-refclk:%s"+(s.clksrcExt!=null?"=%s":"")}},{name:"mediaClk",reg:/^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,names:["id","mediaClockName","mediaClockValue","rateNumerator","rateDenominator"],format:function(s){var i="mediaclk:";return i+=s.id!=null?"id=%s %s":"%v%s",i+=s.mediaClockValue!=null?"=%s":"",i+=s.rateNumerator!=null?" rate=%s":"",i+=s.rateDenominator!=null?"/%s":"",i}},{name:"keywords",reg:/^keywds:(.+)$/,format:"keywds:%s"},{name:"content",reg:/^content:(.+)/,format:"content:%s"},{name:"bfcpFloorCtrl",reg:/^floorctrl:(c-only|s-only|c-s)/,format:"floorctrl:%s"},{name:"bfcpConfId",reg:/^confid:(\d+)/,format:"confid:%s"},{name:"bfcpUserId",reg:/^userid:(\d+)/,format:"userid:%s"},{name:"bfcpFloorId",reg:/^floorid:(.+) (?:m-stream|mstrm):(.+)/,names:["id","mStream"],format:"floorid:%s mstrm:%s"},{push:"invalid",names:["value"]}]};Object.keys(Cp).forEach(function(s){var i=Cp[s];i.forEach(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")})})});var vp=Ei(zi=>{"use strict";var Xs=function(s){return String(Number(s))===s?Number(s):s},eE=function(s,i,e,t){if(t&&!e)i[t]=Xs(s[1]);else for(var r=0;r<e.length;r+=1)s[r+1]!=null&&(i[e[r]]=Xs(s[r+1]))},tE=function(s,i,e){var t=s.name&&s.names;s.push&&!i[s.push]?i[s.push]=[]:t&&!i[s.name]&&(i[s.name]={});var r=s.push?{}:t?i[s.name]:i;eE(e.match(s.reg),r,s.names,s.name),s.push&&i[s.push].push(r)},bp=vu(),iE=RegExp.prototype.test.bind(/^([a-z])=(.*)/);zi.parse=function(s){var i={},e=[],t=i;return s.split(/(\r\n|\r|\n)/).filter(iE).forEach(function(r){var o=r[0],n=r.slice(2);o==="m"&&(e.push({rtp:[],fmtp:[]}),t=e[e.length-1]);for(var a=0;a<(bp[o]||[]).length;a+=1){var c=bp[o][a];if(c.reg.test(n))return tE(c,t,n)}}),i.media=e,i};var Np=function(s,i){var e=i.split(/=(.+)/,2);return e.length===2?s[e[0]]=Xs(e[1]):e.length===1&&i.length>1&&(s[e[0]]=void 0),s};zi.parseParams=function(s){return s.split(/;\s?/).reduce(Np,{})};zi.parseFmtpConfig=zi.parseParams;zi.parsePayloads=function(s){return s.toString().split(" ").map(Number)};zi.parseRemoteCandidates=function(s){for(var i=[],e=s.split(" ").map(Xs),t=0;t<e.length;t+=3)i.push({component:e[t],ip:e[t+1],port:e[t+2]});return i};zi.parseImageAttributes=function(s){return s.split(" ").map(function(i){return i.substring(1,i.length-1).split(",").reduce(Np,{})})};zi.parseSimulcastStreamList=function(s){return s.split(";").map(function(i){return i.split(",").map(function(e){var t,r=!1;return e[0]!=="~"?t=Xs(e):(t=Xs(e.substring(1,e.length)),r=!0),{scid:t,paused:r}})})}});var Op=Ei((qw,Dp)=>{"use strict";var Du=vu(),rE=/%[sdv%]/g,sE=function(s){var i=1,e=arguments,t=e.length;return s.replace(rE,function(r){if(i>=t)return r;var o=e[i];switch(i+=1,r){case"%%":return"%";case"%s":return String(o);case"%d":return Number(o);case"%v":return""}})},hn=function(s,i,e){var t=i.format instanceof Function?i.format(i.push?e:e[i.name]):i.format,r=[s+"="+t];if(i.names)for(var o=0;o<i.names.length;o+=1){var n=i.names[o];i.name?r.push(e[i.name][n]):r.push(e[i.names[o]])}else r.push(e[i.name]);return sE.apply(null,r)},oE=["v","o","s","i","u","e","p","c","b","t","r","z","a"],nE=["i","c","b","a"];Dp.exports=function(s,i){i=i||{},s.version==null&&(s.version=0),s.name==null&&(s.name=" "),s.media.forEach(function(o){o.payloads==null&&(o.payloads="")});var e=i.outerOrder||oE,t=i.innerOrder||nE,r=[];return e.forEach(function(o){Du[o].forEach(function(n){n.name in s&&s[n.name]!=null?r.push(hn(o,n,s)):n.push in s&&s[n.push]!=null&&s[n.push].forEach(function(a){r.push(hn(o,n,a))})})}),s.media.forEach(function(o){r.push(hn("m",Du.m[0],o)),t.forEach(function(n){Du[n].forEach(function(a){a.name in o&&o[a.name]!=null?r.push(hn(n,a,o)):a.push in o&&o[a.push]!=null&&o[a.push].forEach(function(c){r.push(hn(n,a,c))})})})}),r.join(`\r `)+`\r `}});var Ou=Ei(Qi=>{"use strict";var Qr=vp(),aE=Op();Qi.write=aE;Qi.parse=Qr.parse;Qi.parseParams=Qr.parseParams;Qi.parseFmtpConfig=Qr.parseFmtpConfig;Qi.parsePayloads=Qr.parsePayloads;Qi.parseRemoteCandidates=Qr.parseRemoteCandidates;Qi.parseImageAttributes=Qr.parseImageAttributes;Qi.parseSimulcastStreamList=Qr.parseSimulcastStreamList});import oH from"webrtc-adapter";var _p=$e(Ye());var Yu=(V=>(V[V.INVALID_PARAMETER=4096]="INVALID_PARAMETER",V[V.INVALID_OPERATION=4097]="INVALID_OPERATION",V[V.NOT_SUPPORTED=4098]="NOT_SUPPORTED",V[V.DEVICE_NOT_FOUND=4099]="DEVICE_NOT_FOUND",V[V.INITIALIZE_FAILED=4100]="INITIALIZE_FAILED",V[V.SIGNAL_CHANNEL_SETUP_FAILED=16385]="SIGNAL_CHANNEL_SETUP_FAILED",V[V.SIGNAL_CHANNEL_ERROR=16386]="SIGNAL_CHANNEL_ERROR",V[V.ICE_TRANSPORT_ERROR=16387]="ICE_TRANSPORT_ERROR",V[V.JOIN_ROOM_FAILED=16388]="JOIN_ROOM_FAILED",V[V.CREATE_OFFER_FAILED=16389]="CREATE_OFFER_FAILED",V[V.SIGNAL_CHANNEL_RECONNECTION_FAILED=16390]="SIGNAL_CHANNEL_RECONNECTION_FAILED",V[V.UPLINK_RECONNECTION_FAILED=16391]="UPLINK_RECONNECTION_FAILED",V[V.DOWNLINK_RECONNECTION_FAILED=16392]="DOWNLINK_RECONNECTION_FAILED",V[V.REMOTE_STREAM_NOT_EXIST=16400]="REMOTE_STREAM_NOT_EXIST",V[V.CLIENT_BANNED=16448]="CLIENT_BANNED",V[V.SERVER_TIMEOUT=16449]="SERVER_TIMEOUT",V[V.SUBSCRIPTION_TIMEOUT=16450]="SUBSCRIPTION_TIMEOUT",V[V.PLAY_NOT_ALLOWED=16451]="PLAY_NOT_ALLOWED",V[V.DEVICE_AUTO_RECOVER_FAILED=16452]="DEVICE_AUTO_RECOVER_FAILED",V[V.START_PUBLISH_CDN_FAILED=16453]="START_PUBLISH_CDN_FAILED",V[V.STOP_PUBLISH_CDN_FAILED=16454]="STOP_PUBLISH_CDN_FAILED",V[V.START_MIX_TRANSCODE_FAILED=16455]="START_MIX_TRANSCODE_FAILED",V[V.STOP_MIX_TRANSCODE_FAILED=16456]="STOP_MIX_TRANSCODE_FAILED",V[V.NOT_SUPPORTED_H264=16457]="NOT_SUPPORTED_H264",V[V.SWITCH_ROLE_FAILED=16458]="SWITCH_ROLE_FAILED",V[V.API_CALL_TIMEOUT=16459]="API_CALL_TIMEOUT",V[V.SCHEDULE_FAILED=16460]="SCHEDULE_FAILED",V[V.API_CALL_ABORTED=16461]="API_CALL_ABORTED",V[V.SPC_INITIALIZED_FAILED=16462]="SPC_INITIALIZED_FAILED",V[V.VIDEO_MANAGER_ERROR=16463]="VIDEO_MANAGER_ERROR",V[V.SWITCH_ROOM_FAILED=16464]="SWITCH_ROOM_FAILED",V[V.UNKNOWN=65535]="UNKNOWN",V))(Yu||{}),I=Yu;var bf=function(s){for(let i in I)if(I[i]===s)return i;return"UNKNOWN"},Bc=class extends Error{constructor({name:e="RtcError",message:t,code:r=I.UNKNOWN,extraCode:o=0,constraint:n}){let a=`<${bf(r)} 0x${r.toString(16)}>`,c=`${t}${n?` constraint: ${n}`:""}${t!=null&&t.includes(a)?"":` ${a}`}`;super(c);d(this,"code");d(this,"extraCode");d(this,"message");d(this,"originMessage");d(this,"name");d(this,"constraint");this.code=r,this.extraCode=o,this.name=e,this.message=c,this.constraint=n,this.originMessage=t}getCode(){return this.code}getExtraCode(){return this.extraCode}toString(){return this.originMessage}},y=Bc;var Zu=new Date().getTime(),Fc=0,Ku=function(s){Zu=s,Fc=Zu-new Date().getTime();let i=new Date;i.setTime(s),C.info(`baseTime from server: ${i} offset: ${Fc}`)},to=function(){return new Date().getTime()+Fc},An=function(){let s=new Date;return s.setTime(to()),s.toLocaleString()},ts=function(s){let i=String(s.getMilliseconds());return"padStart"in String.prototype&&(i=i.toString().padStart(3,"0")),`${s.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")}:${i}`};var ht={};Si(ht,{bytes2ms:()=>ah,calculateScaleResolutionDownNumber:()=>us,convertObjectNumberToInt:()=>mo,copyProperties:()=>nh,deepClone:()=>Rr,deepMerge:()=>It,delay:()=>Ni,fibonacci:()=>yr,formatedTime:()=>fh,getConstructorName:()=>ns,getContainerFromElement:()=>ph,getEnv:()=>sh,getInternalVersion:()=>hh,getLoggerUrl:()=>yi,getMediaStreamTrackInfo:()=>Vn,getMuteStateFromFlag:()=>bi,getNetworkType:()=>td,getNumNetworkType:()=>Cr,getReconnectionTimeout:()=>Pt,getStringByteLength:()=>ho,getTurnServer:()=>mh,getUint32Version:()=>Ln,getValueType:()=>Re,getViewListFromView:()=>ds,glog:()=>sd,ipv4ToUint32:()=>cs,isArray:()=>Se,isAudioWorkletSupported:()=>uh,isBoolean:()=>me,isConstructor:()=>br,isEmpty:()=>as,isFunction:()=>ne,isLangChinese:()=>kt,isMediaStreamTrack:()=>dh,isNumber:()=>q,isObject:()=>Mt,isOverseaSdkAppId:()=>Ci,isPlainObject:()=>Je,isPortrait:()=>od,isPromise:()=>sr,isRemoteTrack:()=>lh,isRotate90Or270:()=>vi,isString:()=>ee,isUndefined:()=>T,loadImage:()=>ls,ms2bytes:()=>ch,ms2samples:()=>rd,normalizeUrl:()=>Un,performanceNow:()=>U,promiseAny:()=>Nr,samples2ms:()=>id,setNetworkType:()=>Pn,stringify:()=>St,stringifyIncludeValue:()=>xn,throttlePromise:()=>wn});var ed={};Si(ed,{AUDIO_MUTE_BIT:()=>Dn,AUDIO_STAT_BIT:()=>ir,AUX_STAT_BIT:()=>Er,AUX_STREAM_MSID:()=>jc,BACKEND_ENV:()=>vn,BASE_DOC_URL:()=>Xt,BASE_HOST:()=>eh,CAPABILITIES_KEYS:()=>kn,CLASS_NAME:()=>Xf,CLOUD_CONSOLE_URL:()=>Of,CROSS_ROOM_BIT:()=>qc,DATA_FREEZE_TIMING:()=>Mn,DEFAULT_ASSETS_URL:()=>Rn,DOC_URL:()=>Mf,DTLS_STATE_UNKNOWN:()=>Ot,ENV_NAME:()=>Ii,EXCHANGE_SDP_TIMEOUT:()=>Zc,IS_WORKER:()=>is,IS_WORKLET:()=>ro,KIBANA_EVENT:()=>st,LOCAL_STREAM_PUBLISH_STATE:()=>ih,LOGGER_CMD_TYPE:()=>Ki,LOGGER_DOMAIN:()=>Hc,LOGGER_DOMAIN_OVERSEA:()=>Gc,LOG_LEVEL:()=>vt,LOG_LEVEL_NAME:()=>Qf,MAIN_STREAM_MSID:()=>no,MAX_RTT:()=>lo,MICROPHONE_COMMUNICATIONS:()=>zf,MICROPHONE_DEFAULT:()=>Ar,MUTE_ALL_BIT:()=>xf,NAME:()=>p,NETWORK_TYPE:()=>Cn,NOT_SUPPORTED_H264:()=>Sr,PAUSED_RETRY_COUNT:()=>Ir,PEERCONNECTION_CONNECTING_TIMEOUT:()=>ao,PEER_CONNECTION_STATE:()=>ge,PEER_LEAVE_REASON:()=>Kc,RECOVER_CAPTURE_INTERVAL:()=>os,REMOTE_STREAM_TYPE_AUX:()=>zc,REMOTE_STREAM_TYPE_MAIN:()=>Xc,RENDER_FREEZE_TIMING:()=>Wf,SCHEDULE_DOMAIN:()=>Ri,SCHEDULE_TIMEOUT:()=>jf,SDP_SEMANTICS_PLAN_B:()=>rs,SDP_SEMANTICS_UNIFIED_PLAN:()=>rr,SECOND_HOST:()=>vf,SIGNAL_PING_PONG_INTERVAL:()=>Pf,SIGNAL_PING_TIMEOUT:()=>kf,SIGNAL_RECONNECTION_COUNT:()=>Hf,SMALL_STAT_BIT:()=>oo,SPEAKER_DEFAULT:()=>co,STORAGE_EXPIRES_TIME:()=>yn,STREAM_TYPE_BIG:()=>Jf,STREAM_TYPE_SMALL:()=>qf,SUBSCRIBE_SMALL_RETRY_COUNT:()=>ss,SYNC_USER_LIST_INTERVAL:()=>Gf,Scene:()=>zt,THIRD_HOST:()=>Df,TRANSPORT_DIRECTION:()=>te,TRTC_ERROR_ASSISTANCE:()=>Wc,TRTC_QUALITY_BAD:()=>Bf,TRTC_QUALITY_DISCONNECTED:()=>$f,TRTC_QUALITY_EXCELLENT:()=>wf,TRTC_QUALITY_GOOD:()=>Uf,TRTC_QUALITY_POOR:()=>Vf,TRTC_QUALITY_UNKNOWN:()=>Lf,TRTC_QUALITY_VERY_BAD:()=>Ff,UPDATE_OFFER_TIMEOUT:()=>Yc,VIDEO_MUTE_BIT:()=>On,VIDEO_STAT_BIT:()=>tr,audioProfileMap:()=>bn,defaultBigVideoProfile:()=>er,defaultSmallVideoProfile:()=>Jc,getRetryCount:()=>Ai,getScriptDir:()=>Nf,innerVersion:()=>io,loggerProxy:()=>so,screenProfileMap:()=>Nn,setLoggerProxy:()=>Tr,setRetryCount:()=>Qc,setVersion:()=>$c,version:()=>Pe,videoProfileMap:()=>Dt});var io="4.15.00.1600",Pe="5.0.0";function $c(s){Pe=s;let[i,e,t]=s.split(".").map(r=>parseInt(r,10));io=`${i}.${Math.min(15,e)}.${Math.min(15,t)}.${e.toString().padStart(2,"0")}${t.toString().padStart(2,"0")}`}var is=typeof importScripts!="undefined",ro=typeof registerProcessor!="undefined",Nf=()=>{let s=is?self.location.href:document.currentScript.src;return s.substring(0,s.lastIndexOf("/")+1)},so="",Tr=s=>so=s,eh="web.sdk.qcloud.com",vf="web.sdk.tencent.cn",Df="web.sdk.cloud.tencent.cn",Of="https://console.cloud.tencent.com/trtc",Xt=`https://${eh}/trtc/webrtc/v5/doc`,Rn="https://web.sdk.qcloud.com/trtc/webrtc/v5/assets/",Mf=`${Xt}/zh-cn/`,Hc="https://yun.tim.qq.com",Gc="https://apisgp.my-imcloud.com",Wc="trtc_error_assistance",Ki={LOG:"jssdk_log",EVENT:"jssdk_event",KEY_POINT:"jssdk_new_endreport",KV_STAT:"jssdk_key_metrics_report"},Ii={QCLOUD:"qcloud",OLD_CLOUD_LADDER:"trtc",WEBRTC:"webrtc"},vt=(n=>(n[n.TRACE=0]="TRACE",n[n.DEBUG=1]="DEBUG",n[n.INFO=2]="INFO",n[n.WARN=3]="WARN",n[n.ERROR=4]="ERROR",n[n.NONE=5]="NONE",n))(vt||{}),kf=18e3,Pf=2e3,Cn={unknown:0,wifi:1,"3g":2,"2g":3,"4g":4,wired:5,"5g":6},yn=7*24*3600*1e3,bn={standard:{sampleRate:48e3,channelCount:1,bitrate:40},"standard-stereo":{sampleRate:48e3,channelCount:2,bitrate:64},high:{sampleRate:48e3,channelCount:1,bitrate:128},"high-stereo":{sampleRate:48e3,channelCount:2,bitrate:192}},Dt={"120p":{width:160,height:120,frameRate:15,bitrate:200},"120p_2":{width:160,height:120,frameRate:15,bitrate:100},"180p":{width:320,height:180,frameRate:15,bitrate:350},"180p_2":{width:320,height:180,frameRate:15,bitrate:150},"240p":{width:320,height:240,frameRate:15,bitrate:400},"240p_2":{width:320,height:240,frameRate:15,bitrate:200},"360p":{width:640,height:360,frameRate:15,bitrate:800},"360p_2":{width:640,height:360,frameRate:15,bitrate:400},"480p":{width:640,height:480,frameRate:15,bitrate:900},"480p_2":{width:640,height:480,frameRate:15,bitrate:500},"720p":{width:1280,height:720,frameRate:15,bitrate:1500},"1080p":{width:1920,height:1080,frameRate:15,bitrate:2e3},"1440p":{width:2560,height:1440,frameRate:30,bitrate:4860},"4K":{width:3840,height:2160,frameRate:30,bitrate:9e3}},er=Dt["480p_2"],Jc=Dt["120p_2"],Nn={"480p":{width:640,height:480,frameRate:5,bitrate:900},"480p_2":{width:640,height:480,frameRate:30,bitrate:1e3},"720p":{width:1280,height:720,frameRate:5,bitrate:1200},"720p_2":{width:1280,height:720,frameRate:30,bitrate:3e3},"1080p":{width:1920,height:1080,frameRate:5,bitrate:1600},"1080p_2":{width:1920,height:1080,frameRate:30,bitrate:4e3}},p={CANVAS:"canvas",AUDIO:"audio",VIDEO:"video",SCREEN:"screen",SMALL:"small",BIG:"big",AUXILIARY:"auxiliary",SMALL_VIDEO:"smallVideo",FACING_MODE_USER:"user",FACING_MODE_ENVIRONMENT:"environment",MUTE:"mute",UNMUTE:"unmute",ENDED:"ended",PLAYING:"playing",PAUSE:"pause",ERROR:"error",LOADEDDATA:"loadeddata",LOADEDMETADATA:"loadedmetadata",AUDIO_INPUT:"audioinput",VIDEO_INPUT:"videoinput",DETAIL:"detail",TEXT:"text",MAIN:"main",BACKUP:"backup",BANNED:"banned",KICK:"kick",USER_TIME_OUT:"user_time_out",ROOM_DISBAND:"room_disband",SEI_MESSAGE:"sei-message",ADD:"add",REMOVE:"remove",REPLACE:"replace",TRACK:"track",SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",TRANSCEIVER_DIRECTION_SENDONLY:"sendonly",TRANSCEIVER_DIRECTION_RECVONLY:"recvonly",ENTER_PICTURE_IN_PICTURE:"enterpictureinpicture",LEAVE_PICTURE_IN_PICTURE:"leavepictureinpicture"},te={INACTIVE:"inactive",SENDONLY:"sendonly",RECVONLY:"recvonly"},vn={OLD_CLOUD_LADDER:"wss://trtc.rtc.qq.com",WEBRTC:"wss://webrtc.qq.com"},zt=(e=>(e.LIVE="live",e.RTC="rtc",e))(zt||{}),tr=1,oo=2,Er=4,ir=8,Dn=64,On=16,xf=112,qc=128,no="5Y2wZK8nANNAoVw6dSAHVjNxrD1ObBM2kBPV",jc="224d130c-7b5c-415b-aaa2-79c2eb5a6df2",Xc=p.MAIN,zc=p.AUXILIARY,Lf=0,wf=1,Uf=2,Vf=3,Bf=4,Ff=5,$f=6,Ot="unknown",ge={NEW:"new",CONNECTING:"connecting",FAILED:"failed",CLOSED:"closed",DISCONNECTED:"disconnected",CONNECTED:"connected",COMPLETED:"completed"},th=1/0;function Qc(s){th=s}function Ai(){return th}var Hf=30,st={JOIN:"join",DELTA_JOIN:"delta-join",REJOIN:"rejoin",LEAVE:"leave",DELTA_LEAVE:"delta-leave",PUBLISH:"publish",DELTA_PUBLISH:"delta-publish",UNPUBLISH:"unpublish",SUBSCRIBE:"subscribe",UNSUBSCRIBE:"unsubscribe",UPLINK_CONNECTION:"uplink-connection",UPLINK_RECONNECTION:"uplink-reconnection",DOWNLINK_CONNECTION:"downlink-connection",DOWNLINK_RECONNECTION:"downlink-reconnection",ON_TRACK:"ontrack",ICE_CONNECTION_STATE:"iceConnectionState",LOCAL_STREAM_INITIALIZE:"stream-initialize",SIGNAL_CONNECTION:"websocketConnectionState",SIGNAL_RECONNECTION:"websocketReconnectionState",UPDATE_STREAM:"update-stream",RECOVER_LOCAL_AUDIO_TRACK:"recover-local-audio-track",RECOVER_LOCAL_VIDEO_TRACK:"recover-local-video-track",RECOVER_SUBSCRIPTION:"recover-subscription",START_MIX_TRANSCODE:"start-mix-transcode",STOP_MIX_TRANSCODE:"stop-mix-transcode",PLAYER_ERROR:"player-error",SCHEDULE:"schedule",LOAD_WORKLET:"load-worklet",VIDEO_FROZEN_COUNT:"videoFrozenCount",GET_USER_MEDIA_RETRY:"getUserMedia-retry"},Gf=1e4,Yc=1e4,Zc=1e4,rr="unified-plan",rs="plan-b",Sr=1028,ih=(t=>(t[t.UNPUBLISH=-1]="UNPUBLISH",t[t.PUBLISHING=0]="PUBLISHING",t[t.PUBLISHED=1]="PUBLISHED",t))(ih||{}),Mn=500,Wf=1e3,Jf=p.BIG,qf=p.SMALL,ao=10*1e3,Ri={MAIN:"schedule.cloud-rtc.com",BACKUP:"schedule.cloud-rtc.net",MAIN_OVERSEA:"schedule.rtc-web.com",BACKUP_OVERSEA:"schedule.rtc-web.io",MAIN_OVERSEA_BACKUP:"intl-schedule.cloud-rtc.com"},jf=2e3,Xf={TRTC:"TRTC",CLIENT:"Client",LOCAL_STREAM:"LocalStream",REMOTE_STREAM:"RemoteStream",STREAM:"Stream"},Ir=5,Ar="default",co=Ar,zf="communications",Qf=Object.keys(vt),Kc=["normal leave","timeout leave","kick","role change"],ss=10,os=2e3,kn=["width","height","frameRate","facingMode","sampleRate","sampleSize","channelCount","deviceId","min","max"],lo=10*1e3;var sh=function(){return new URLSearchParams(location.search).get("trtc_env")||""},Ci=s=>Number(s)<14e8,yi=function(s,i){let e;so?e=so:e=Ci(s)?Gc:Hc;let t=Math.floor(Math.random()*Zi(2,31));return`${e}/v5/AVQualityReportSvc/C2S?random=${t}&sdkappid=${s}&cmdtype=${i}`},uo="unknown";function td(){if(uo!=="unknown")return uo;let{userAgent:s,connection:i}=navigator,e=(s.match(/NetType\/\S+/)||[])[0]||"";e=e.toLowerCase().replace("nettype/",""),e==="3gnet"&&(e="3g");let t=i&&i.type&&i.type.toLowerCase(),r=i&&i.effectiveType&&i.effectiveType.toLowerCase();return r==="slow-2"&&(r="2g"),t&&(uo=oh(t,r)),uo}function oh(s,i){if(Cn[s])return s;switch(s){case"cellular":case"wimax":return i||"unknown";case"ethernet":return"wired";case"none":case"other":default:return"unknown"}}function Pn(s){uo=oh(s)}function Cr(){return Cn[td()]}function nh(s,i){for(let e of Reflect.ownKeys(i))if(e!=="constructor"&&e!=="prototype"&&e!=="name"){let t=Object.getOwnPropertyDescriptor(i,e)||"";Object.defineProperty(s,e,t)}return s}function ah(s,i=48e3){return id(s/4,i)}function id(s,i=48e3){return s*1e3/i}function ch(s,i=48e3){return rd(s,i)*4}function rd(s,i=48e3){return s*i/1e3}var sd=typeof window!="undefined"&&typeof window.glog=="function"?window.glog:()=>{},kt=()=>{let s=navigator.language;return s=s.substring(0,2),s==="zh"},Je=function(s){if(!s||typeof s!="object"||Object.prototype.toString.call(s)!="[object Object]")return!1;let i=Object.getPrototypeOf(s);if(i===null)return!0;let e=Object.prototype.hasOwnProperty.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)};function yr(s,i=1,e=1){return s<=1?e:yr(s-1,e,i+e)}function Pt(s){return s>8?30*1e3:yr(s)*1e3}function Re(s){return Reflect.apply(Object.prototype.toString,s,[]).replace(/^\[object\s(\w+)\]$/,"$1").toLowerCase()}var ne=s=>typeof s=="function",T=s=>typeof s=="undefined",ee=s=>typeof s=="string",q=s=>typeof s=="number",me=s=>typeof s=="boolean",Mt=s=>Re(s)==="object",Se=s=>Re(s)==="array",dh=s=>Re(s)==="MediaStreamTrack".toLowerCase(),lh=s=>s.isRemote,sr=s=>Re(s)==="promise",br=s=>ne(s)&&s.prototype.constructor===s,ns=s=>br(s)?s.prototype.constructor.name:"",uh=typeof AudioWorkletNode!="undefined";function Nr(s){return new Promise((i,e)=>{let t=[];s.forEach(r=>{r.then(i).catch(o=>{t.push(o),t.length===s.length&&e(t)})})})}function U(){return!performance||!performance.now?Date.now():Math.floor(performance.now())}var rh=s=>+s<10?`0${s}`:s,hh=s=>{let i=s.match(/^\d+\.\d+\.\d+/)[0];if(!i)return s;let e=i.split("."),t=rh(e[1])+rh(e[2]);return e[1]-15>0&&(e[1]="15"),e[2]-15>0&&(e[2]="15"),`${e.join(".")}.${t}`},Yf=Object.prototype.hasOwnProperty,{toString:FE}=Object.prototype;function as(s){if(s==null)return!0;if(typeof s=="boolean")return!1;if(typeof s=="number")return s===0;if(typeof s=="string"||typeof s=="function"||Array.isArray(s))return s.length===0;if(s instanceof Error)return s.message==="";if(Je(s))switch(Object.prototype.toString.call(s)){case"[object File]":case"[object Map]":case"[object Set]":return s.size===0;case"[object Object]":{for(let i in s)if(Yf.call(s,i))return!1;return!0}}return!1}function bi(s,i){return{userId:i,hasAudio:!!(s&ir),hasVideo:!!(s&tr),hasAuxiliary:!!(s&Er),hasSmall:!!(s&oo),audioMuted:!!(s&Dn),videoMuted:!!(s&On),audioAvailable:!!(s&ir)&&!(s&Dn),videoAvailable:!!(s&tr)&&!(s&On)}}function mh(s){let i={urls:s.url.startsWith("turn:")||s.url.startsWith("turns:")?s.url:`turn:${s.url}`};return!T(s.username)&&!T(s.credential)&&(i.username=s.username,i.credential=s.credential,i.credentialType="password",T(s.credentialType)||(i.credentialType=s.credentialType)),i}function cs(s,i=!0){if(!ee(s))return 0;let e=s.split(".");return i?(Number(e[0])<<24|Number(e[1])<<16|Number(e[2])<<8|Number(e[3]))>>>0:(Number(e[3])<<24|Number(e[2])<<16|Number(e[1])<<8|Number(e[0]))>>>0}var It=function(s,i,e,t){if(!(Mt(s)&&Mt(i)))return 0;let r=0,o=Object.keys(i),n;for(let a=0,c=o.length;a<c;a++)if(n=o[a],!(T(i[n])||e&&e.includes(n)))if(Mt(s[n])&&Mt(i[n]))r+=It(s[n],i[n],e,t);else{if(t&&t.includes(i[n]))continue;s[n]!==i[n]&&(s[n]=Rr(i[n]),r+=1)}return r};function Rr(s){if(Se(s)){let i=[];return s.forEach((e,t)=>{i[t]=Rr(e)}),i}if(Mt(s)){let i={};return Object.keys(s).forEach(e=>{i[e]=Rr(s[e])}),i}return s}var ds=s=>{let i=[];if(Se(s))i=[...s];else if(ee(s)){let e=document.getElementById(s);e&&i.push(e)}else s&&i.push(s);return i},ph=s=>ee(s)?document.getElementById(s):s,Zf=s=>{let i=c=>c<10?`0${c}`:`${c}`,e=s.getFullYear(),t=s.getMonth()+1,r=s.getDate(),o=i(s.getHours()),n=i(s.getMinutes()),a=i(s.getSeconds());return`${e}/${t}/${r} ${o}:${n}:${a}`},fh=()=>Zf(new Date);function St(s,{keysToInclude:i,keysToExclude:e}){try{if(Se(s))return`[${s.map(n=>St(n,{keysToInclude:i,keysToExclude:e})).join(",")}]`;if(!Je(s)||!Se(i)&&!Se(e))return JSON.stringify(s);let t={},r=new Set(i),o=new Set(e);return Object.keys(s).forEach(n=>{(o.size===0&&r.has(n)||r.size===0&&!o.has(n))&&(t[n]=Je(s[n])||Se(s[n])?JSON.parse(St(s[n],{keysToExclude:e,keysToInclude:i})):s[n])}),JSON.stringify(t)}catch(t){return"{}"}}function xn(s,i=!1){let e=[];return Object.keys(s).forEach(t=>{i===s[t]&&e.push(t)}),St(s,{keysToInclude:e})}function ho(s){return s.replace(/[\u4e00-\u9fa5]/g,"aa").length}var od=()=>{var s,i,e,t;return(s=window.screen)!=null&&s.orientation?!!((t=(e=(i=window.screen)==null?void 0:i.orientation)==null?void 0:e.type)!=null&&t.includes("portrait")):window.orientation===0||window.orientation===180},ls=s=>f(void 0,null,function*(){return new Promise((i,e)=>{let t;if(ee(s))t=new Image,t.crossOrigin="anonymous",t.src=s;else if(t=s,t.complete){i(t);return}t.onload=()=>i(t),t.onerror=()=>{e(new y({code:I.INVALID_PARAMETER,message:`load image failed, url: ${s}`}))}})}),Ln=s=>{let i=s.split(".");return+i[0]<<24|+i[1]<<16|+i[2]<<8|+i[3]<<0},mo=s=>(Object.keys(s).forEach(i=>{q(s[i])&&(i.startsWith("uint")||i.startsWith("int"))?s[i]=Math.floor(s[i]):(Je(s[i])||Se(s[i]))&&mo(s[i])}),s);function Ni(s,i){return new Promise(e=>{let t=setTimeout(e,s);i&&i(t)})}function wn(s,i){let e=null;return function(...t){return e||(e=s.apply(i||this,t),e.finally(()=>e=null),e)}}function Un(s){return s.replace(/(^|[^:])\/{2,}/g,"$1/")}function Vn(s){var i;try{let{width:e,height:t,frameRate:r,sampleRate:o,sampleSize:n,channelCount:a}=(i=s.getSettings)==null?void 0:i.call(s),c=s.kind===p.AUDIO?`${o}x${n}@${a}`:`${e}x${t}@${r}`,l=s.stats?` stats: ${JSON.stringify(s.stats).replaceAll('"',"")}`:"";return`${s.id} ${s.readyState} muted:${s.muted} ${s.kind} ${s.label} ${c}${l}`}catch(e){return""}}function us(s,i){return s.width*s.height===i.width*i.height?1:od()&&i.width>i.height&&s.height>i.width?Math.max(s.width/i.height,s.height/i.width,1):Math.max(s.width/i.width,s.height/i.height,1)}function vi(s){return s===90||s===270}function Di({url:s,body:i,method:e="POST",timeout:t,priority:r}){return new Promise((o,n)=>{if("fetch"in window)return fetch(s,{method:e,body:i,priority:r}).then(c=>c.text()).then(c=>{try{o({data:JSON.parse(c)})}catch(l){o({data:c})}},n);let a=new XMLHttpRequest;a.onreadystatechange=()=>{if(a.readyState===4)if(a.status>=200&&a.status<300)try{let c=JSON.parse(a.response);o({data:c})}catch(c){o({data:a.response})}else n({status:a.status,statusText:a.statusText||"request failed!"})},a.timeout=t||5e3,a.open(e,s,!0),a.send(i)})}function nd(s){return f(this,null,function*(){let i=U(),e=JSON.stringify(s);try{if(!CompressionStream||e.length<=2800)return e;let r=new Blob([e],{type:"application/json"}).stream().pipeThrough(new CompressionStream("gzip")),a=yield(yield(yield new Response(r)).blob()).arrayBuffer();return C.debug(`compressJSON ${e.length} -> ${a.byteLength} ${U()-i}ms`),a}catch(t){return e}})}var Kf=Object.prototype.hasOwnProperty;var Qt=s=>typeof s=="function",Oi=s=>typeof s=="undefined";var Bn=s=>typeof s=="boolean";var ad=s=>s.isRemote;var cd=function(s){if(!s||typeof s!="object"||Object.prototype.toString.call(s)!="[object Object]")return!1;let i=Object.getPrototypeOf(s);if(i===null)return!0;let e=Object.prototype.hasOwnProperty.call(i,"constructor")&&i.constructor;return typeof e=="function"&&e instanceof e&&Function.prototype.toString.call(e)===Function.prototype.toString.call(Object)};function _h(s){if(s==null)return!0;if(typeof s=="boolean")return!1;if(typeof s=="number")return s===0;if(typeof s=="string"||typeof s=="function"||Array.isArray(s))return s.length===0;if(s instanceof Error)return s.message==="";if(cd(s))switch(Object.prototype.toString.call(s)){case"[object File]":case"[object Map]":case"[object Set]":return s.size===0;case"[object Object]":{for(let i in s)if(Kf.call(s,i))return!1;return!0}}return!1}var e_=0,t_=1,gh=2;function i_({retryFunction:s,settings:i,onError:e,onRetrying:t,onRetryFailed:r,onRetrySuccess:o,context:n}){return function(...a){let{retries:c=5,timeout:l=1e3}=i,h=0,u=-1,m=e_,g=(D,_)=>f(this,null,function*(){let S=n||this;try{let O=yield s.apply(S,a);h>0&&o&&o.call(this,h),h=0,D(O)}catch(O){let K=()=>{clearTimeout(u),h=0,m=gh,_(O)},G=()=>{m!==gh&&h<(Qt(c)?c():c)?(h++,m=t_,Qt(t)&&t.call(this,h,K),u=window.setTimeout(()=>{u=-1,g(D,_)},Qt(l)?l(h):l)):(K(),Qt(r)&&r.call(this,O))};Qt(e)?e.call(this,{error:O,retry:G,reject:_,retryFuncArgs:a,retriedCount:h}):G()}});return new Promise(g)}}var Yt=i_;var hs=class{constructor(i){d(this,"userId");d(this,"remoteUserId");d(this,"id");d(this,"sdkAppId");d(this,"type");d(this,"isLocal");this.id=i.id,this.userId=i.userId,this.sdkAppId=i.sdkAppId,this.remoteUserId=i.remoteUserId,this.isLocal=Bn(i.isLocal)?i.isLocal:!0,this.type=this.isLocal?"":i.type}createChild(i){return Object.setPrototypeOf(i,this)}setUserId(i){this.userId=i}setSdkAppId(i){this.sdkAppId=i}log(i,e){let t=this.isLocal?this.userId:this.remoteUserId;e.unshift(`[${this.isLocal?"\u2191":"\u2193"}${this.type&&this.type!=="main"?"*":""}${this.id}${t?`|${t}`:""}]`),C.log(i,e,Oi(this.userId)||_h(this.userId),this.userId,this.sdkAppId)}info(...i){this.log(2,i)}debug(...i){this.log(1,i)}warn(...i){this.log(3,i)}error(...i){this.log(4,i)}};var Rs={};Si(Rs,{ANDROID_VERSION:()=>ud,CHROME_MAJOR_VERSION:()=>ot,CHROME_VERSION:()=>ia,EDGE_VERSION:()=>$n,EDG_MAJOR_VERSION:()=>hd,EDG_VERSION:()=>Hn,FIREFOX_MAJOR_VERSION:()=>fs,FIREFOX_VERSION:()=>Fn,HUAWEI_VERSION:()=>Zn,IE_VERSION:()=>a_,IOS_MAIN_VERSION:()=>nt,IOS_VERSION:()=>Kt,IPADQQB_VERSION:()=>Qn,IS_ANDROID:()=>pe,IS_ANDROID_WEBVIEW:()=>u_,IS_ANY_SAFARI:()=>nr,IS_CHROME:()=>As,IS_CHROME_OS:()=>md,IS_CHROMIUM_BASE:()=>Ze,IS_DESKTOP_IOS_CHROME:()=>Ad,IS_EDG:()=>_s,IS_EDGE:()=>vr,IS_ELECTRON:()=>d_,IS_FIREFOX:()=>ae,IS_HEADLESS_CHROME:()=>Td,IS_HONOR:()=>_d,IS_HUAWEI:()=>fd,IS_HUAWEIBROWSER:()=>Io,IS_IE:()=>Ih,IS_IE8:()=>n_,IS_IOS:()=>Ie,IS_IOS_13_OR_14:()=>Id,IS_IOS_15_1:()=>Sd,IS_IOS_CHROME:()=>Ah,IS_IPAD:()=>ps,IS_IPADQQB:()=>To,IS_IPAD_PRO:()=>ld,IS_IPHONE:()=>or,IS_IPOD:()=>Sh,IS_LINUX:()=>Eo,IS_LOCAL:()=>Vt,IS_MAC:()=>Ut,IS_MACQQB:()=>go,IS_MIBROWSER:()=>So,IS_MQQB:()=>Ss,IS_NATIVE_ANDROID:()=>o_,IS_OLD_ANDROID:()=>s_,IS_OPENHARMONY:()=>gd,IS_OPPOBROWSER:()=>Ro,IS_SAFARI:()=>xe,IS_SAFARI_15_1:()=>h_,IS_SAMSUNGBROWSER:()=>Ao,IS_SOGOU:()=>fo,IS_SOGOUM:()=>po,IS_TBS:()=>wt,IS_UCBROWSER:()=>pd,IS_VIVOBROWSER:()=>Co,IS_WECHAT:()=>Ts,IS_WIN:()=>Dr,IS_WQQB:()=>_o,IS_WX:()=>c_,IS_X5MQQB:()=>Es,IS_XWEB:()=>gs,MACQQB_VERSION:()=>zn,MI_VERSION:()=>Yn,MQQB_VERSION:()=>ms,OPENHARMONY_VERSION:()=>l_,OPPO_VERSION:()=>ea,SAFARI_VERSION:()=>Mi,SAMSUNG_VERSION:()=>Kn,SOGOUM_VERSION:()=>Gn,SOGOU_VERSION:()=>Wn,TBS_VERSION:()=>Jn,UA_DATA_STRING:()=>xt,USER_AGENT:()=>Lt,VIVO_VERSION:()=>ta,WECHAT_VERSION:()=>jn,WQQB_VERSION:()=>Xn,XWEB_VERSION:()=>qn,browserInfo:()=>Zt,getBrowserInfo:()=>Rh,getChromeMajorVersion:()=>Is,getDeviceModel:()=>Mr,getGPUInfo:()=>Cd,getOSName:()=>ra,getOSNumber:()=>yo,getOSString:()=>Pi,getOSType:()=>m_,getTerminalType:()=>yd,getUserAgentData:()=>Or,isLocalStorageEnabled:()=>ki,isMobile:()=>Rd,isVersionSmallerThan:()=>Ed});var Lt=typeof navigator=="undefined"?"":navigator.userAgent,z=s=>new RegExp(s,"i").test(Lt),Oe=s=>{if(z(s)){let i=new RegExp(`${s}\\/([\\d.]+)`),e=Lt.match(i);if(e&&e[1])return e[1]}return""},dd=s=>{if(z(s)){let i=new RegExp(`${s}\\/(\\d+)`),e=Lt.match(i);if(e&&e[1])return parseFloat(e[1])}return NaN},Th=/AppleWebKit\/([\d.]+)/i.exec(Lt),r_=Th?parseFloat(Th[1]):NaN,ps=z("iPad"),ld=typeof navigator!="undefined"&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&z("Macintosh"),or=z("iPhone")&&!ps,Sh=z("iPod"),Ie=or||ps||Sh||ld,pe=z("Android"),ud=function(){if(pe){let s=Lt.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(s){let i=s[1]&&parseFloat(s[1]),e=s[2]&&parseFloat(s[2]);if(i&&e)return parseFloat(`${s[1]}.${s[2]}`);if(i)return i}}return NaN}(),s_=pe&&z("webkit")&&ud<2.3,o_=pe&&ud<5&&r_<537,ae=z("Firefox"),Fn=Oe("Firefox"),fs=dd("Firefox"),vr=z("Edge"),$n=Oe("Edge"),_s=z("Edg"),Hn=Oe("Edg"),hd=dd("Edg"),po=z("SogouMobileBrowser"),Gn=Oe("SogouMobileBrowser"),fo=z("MetaSr\\s"),Wn=Oe("MetaSr\\s"),wt=z("TBS"),Jn=Oe("TBS"),gs=z("XWEB"),qn=Oe("XWEB"),n_=z("MSIE\\s8\\.0"),Ih=z("MSIE\\/\\d+"),a_=function(){if(Ih){let s=/MSIE\s(\d+)\.\d/.exec(Lt),i=s&&parseFloat(s[1]);return!i&&/Trident\/7.0/i.test(Lt)&&/rv:11.0/.test(Lt)&&(i=11),i}return NaN}(),Ts=z("(micromessenger|webbrowser)"),jn=Oe("MicroMessenger"),Es=!wt&&z("MQQBrowser")&&z("COVC"),Ss=!wt&&z("MQQBrowser")&&!z("COVC"),ms=Ss||Es?Oe("MQQBrowser"):"",_o=!wt&&z(" QQBrowser"),Xn=Oe(" QQBrowser"),go=!wt&&z("QQBrowserLite"),zn=Oe("QQBrowserLite"),To=!wt&&z("MQBHD"),Qn=Oe("MQBHD"),Dr=z("Windows"),Ut=!Ie&&z("MA