@livedigital/client 3.35.0-createCustomMediaTracks.3 → 3.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -37,4 +37,4 @@ let Qs;xs.AwaitQueue=class{constructor(){this.pendingTasks=new Map,this.nextTask
|
|
|
37
37
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
38
38
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
39
39
|
*/
|
|
40
|
-
!function(e,t){(function(){var r,n="Expected a function",i="__lodash_hash_undefined__",s="__lodash_placeholder__",o=16,a=32,c=64,d=128,u=256,p=1/0,h=9007199254740991,f=NaN,m=4294967295,g=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",a],["partialRight",c],["rearg",u]],v="[object Arguments]",y="[object Array]",b="[object Boolean]",w="[object Date]",_="[object Error]",S="[object Function]",k="[object GeneratorFunction]",C="[object Map]",R="[object Number]",P="[object Object]",T="[object Promise]",E="[object RegExp]",D="[object Set]",M="[object String]",I="[object Symbol]",x="[object WeakMap]",O="[object ArrayBuffer]",L="[object DataView]",A="[object Float32Array]",j="[object Float64Array]",F="[object Int8Array]",N="[object Int16Array]",B="[object Int32Array]",W="[object Uint8Array]",q="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,Q=RegExp(K.source),J=RegExp(G.source),Y=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(ne.source),se=/^\s+/,oe=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,de=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Re="a-z\\xdf-\\xf6\\xf8-\\xff",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",De="['’]",Me="[\\ud800-\\udfff]",Ie="["+Ee+"]",xe="["+ke+"]",Oe="\\d+",Le="[\\u2700-\\u27bf]",Ae="["+Re+"]",je="[^\\ud800-\\udfff"+Ee+Oe+Ce+Re+Pe+"]",Fe="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",We="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Pe+"]",Ue="(?:"+Ae+"|"+je+")",ze="(?:"+qe+"|"+je+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+xe+"|"+Fe+")"+"?",Ke="[\\ufe0e\\ufe0f]?",Ge=Ke+He+("(?:\\u200d(?:"+[Ne,Be,We].join("|")+")"+Ke+He+")*"),Qe="(?:"+[Le,Be,We].join("|")+")"+Ge,Je="(?:"+[Ne+xe+"?",xe,Be,We,Me].join("|")+")",Ye=RegExp(De,"g"),Ze=RegExp(xe,"g"),Xe=RegExp(Fe+"(?="+Fe+")|"+Je+Ge,"g"),et=RegExp([qe+"?"+Ae+"+"+Ve+"(?="+[Ie,qe,"$"].join("|")+")",ze+"+"+$e+"(?="+[Ie,qe+Ue,"$"].join("|")+")",qe+"?"+Ue+"+"+Ve,qe+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Oe,Qe].join("|"),"g"),tt=RegExp("[\\u200d\\ud800-\\udfff"+ke+Te+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["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"],it=-1,st={};st[A]=st[j]=st[F]=st[N]=st[B]=st[W]=st[q]=st[U]=st[z]=!0,st[v]=st[y]=st[O]=st[b]=st[L]=st[w]=st[_]=st[S]=st[C]=st[R]=st[P]=st[E]=st[D]=st[M]=st[x]=!1;var ot={};ot[v]=ot[y]=ot[O]=ot[L]=ot[b]=ot[w]=ot[A]=ot[j]=ot[F]=ot[N]=ot[B]=ot[C]=ot[R]=ot[P]=ot[E]=ot[D]=ot[M]=ot[I]=ot[W]=ot[q]=ot[U]=ot[z]=!0,ot[_]=ot[S]=ot[x]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,dt=parseInt,ut="object"==typeof l&&l&&l.Object===Object&&l,lt="object"==typeof self&&self&&self.Object===Object&&self,pt=ut||lt||Function("return this")(),ht=t&&!t.nodeType&&t,ft=ht&&e&&!e.nodeType&&e,mt=ft&&ft.exports===ht,gt=mt&&ut.process,vt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||gt&>.binding&>.binding("util")}catch(e){}}(),yt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,wt=vt&&vt.isMap,_t=vt&&vt.isRegExp,St=vt&&vt.isSet,kt=vt&&vt.isTypedArray;function Ct(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Rt(e,t,r,n){for(var i=-1,s=null==e?0:e.length;++i<s;){var o=e[i];t(n,o,r(o),e)}return n}function Pt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Tt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Et(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Dt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[i++]=o)}return s}function Mt(e,t){return!!(null==e?0:e.length)&&Wt(e,t,0)>-1}function It(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function xt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Ot(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Lt(e,t,r,n){var i=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}function At(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function jt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ft=Vt("length");function Nt(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Bt(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function Wt(e,t,r){return t==t?function(e,t,r){var n=r-1,i=e.length;for(;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Bt(e,Ut,r)}function qt(e,t,r,n){for(var i=r-1,s=e.length;++i<s;)if(n(e[i],t))return i;return-1}function Ut(e){return e!=e}function zt(e,t){var r=null==e?0:e.length;return r?Kt(e,t)/r:f}function Vt(e){return function(t){return null==t?r:t[e]}}function $t(e){return function(t){return null==e?r:e[t]}}function Ht(e,t,r,n,i){return i(e,(function(e,i,s){r=n?(n=!1,e):t(r,e,i,s)})),r}function Kt(e,t){for(var n,i=-1,s=e.length;++i<s;){var o=t(e[i]);o!==r&&(n=n===r?o:n+o)}return n}function Gt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Qt(e){return e?e.slice(0,hr(e)+1).replace(se,""):e}function Jt(e){return function(t){return e(t)}}function Yt(e,t){return xt(t,(function(t){return e[t]}))}function Zt(e,t){return e.has(t)}function Xt(e,t){for(var r=-1,n=e.length;++r<n&&Wt(t,e[r],0)>-1;);return r}function er(e,t){for(var r=e.length;r--&&Wt(t,e[r],0)>-1;);return r}function tr(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var rr=$t({"À":"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"}),nr=$t({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+at[e]}function sr(e){return tt.test(e)}function or(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ar(e,t){return function(r){return e(t(r))}}function cr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];a!==t&&a!==s||(e[r]=s,o[i++]=r)}return o}function dr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function lr(e){return sr(e)?function(e){var t=Xe.lastIndex=0;for(;Xe.test(e);)++t;return t}(e):Ft(e)}function pr(e){return sr(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function hr(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var fr=$t({"&":"&","<":"<",">":">",""":'"',"'":"'"});var mr=function e(t){var l,oe=(t=null==t?pt:mr.defaults(pt.Object(),t,mr.pick(pt,nt))).Array,ke=t.Date,Ce=t.Error,Re=t.Function,Pe=t.Math,Te=t.Object,Ee=t.RegExp,De=t.String,Me=t.TypeError,Ie=oe.prototype,xe=Re.prototype,Oe=Te.prototype,Le=t["__core-js_shared__"],Ae=xe.toString,je=Oe.hasOwnProperty,Fe=0,Ne=(l=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+l:"",Be=Oe.toString,We=Ae.call(Te),qe=pt._,Ue=Ee("^"+Ae.call(je).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=mt?t.Buffer:r,Ve=t.Symbol,$e=t.Uint8Array,He=ze?ze.allocUnsafe:r,Ke=ar(Te.getPrototypeOf,Te),Ge=Te.create,Qe=Oe.propertyIsEnumerable,Je=Ie.splice,Xe=Ve?Ve.isConcatSpreadable:r,tt=Ve?Ve.iterator:r,at=Ve?Ve.toStringTag:r,ut=function(){try{var e=hs(Te,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ht=ke&&ke.now!==pt.Date.now&&ke.now,ft=t.setTimeout!==pt.setTimeout&&t.setTimeout,gt=Pe.ceil,vt=Pe.floor,Ft=Te.getOwnPropertySymbols,$t=ze?ze.isBuffer:r,gr=t.isFinite,vr=Ie.join,yr=ar(Te.keys,Te),br=Pe.max,wr=Pe.min,_r=ke.now,Sr=t.parseInt,kr=Pe.random,Cr=Ie.reverse,Rr=hs(t,"DataView"),Pr=hs(t,"Map"),Tr=hs(t,"Promise"),Er=hs(t,"Set"),Dr=hs(t,"WeakMap"),Mr=hs(Te,"create"),Ir=Dr&&new Dr,xr={},Or=Ws(Rr),Lr=Ws(Pr),Ar=Ws(Tr),jr=Ws(Er),Fr=Ws(Dr),Nr=Ve?Ve.prototype:r,Br=Nr?Nr.valueOf:r,Wr=Nr?Nr.toString:r;function qr(e){if(ia(e)&&!Ko(e)&&!(e instanceof $r)){if(e instanceof Vr)return e;if(je.call(e,"__wrapped__"))return qs(e)}return new Vr(e)}var Ur=function(){function e(){}return function(t){if(!na(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function zr(){}function Vr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function $r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Gr;++t<r;)this.add(e[t])}function Jr(e){var t=this.__data__=new Kr(e);this.size=t.size}function Yr(e,t){var r=Ko(e),n=!r&&Ho(e),i=!r&&!n&&Yo(e),s=!r&&!n&&!i&&pa(e),o=r||n||i||s,a=o?Gt(e.length,De):[],c=a.length;for(var d in e)!t&&!je.call(e,d)||o&&("length"==d||i&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||ws(d,c))||a.push(d);return a}function Zr(e){var t=e.length;return t?e[Jn(0,t-1)]:r}function Xr(e,t){return Fs(Ii(e),dn(t,0,e.length))}function en(e){return Fs(Ii(e))}function tn(e,t,n){(n!==r&&!zo(e[t],n)||n===r&&!(t in e))&&an(e,t,n)}function rn(e,t,n){var i=e[t];je.call(e,t)&&zo(i,n)&&(n!==r||t in e)||an(e,t,n)}function nn(e,t){for(var r=e.length;r--;)if(zo(e[r][0],t))return r;return-1}function sn(e,t,r,n){return fn(e,(function(e,i,s){t(n,e,r(e),s)})),n}function on(e,t){return e&&xi(t,La(t),e)}function an(e,t,r){"__proto__"==t&&ut?ut(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function cn(e,t){for(var n=-1,i=t.length,s=oe(i),o=null==e;++n<i;)s[n]=o?r:Da(e,t[n]);return s}function dn(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function un(e,t,n,i,s,o){var a,c=1&t,d=2&t,u=4&t;if(n&&(a=s?n(e,i,s,o):n(e)),a!==r)return a;if(!na(e))return e;var l=Ko(e);if(l){if(a=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&je.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!c)return Ii(e,a)}else{var p=gs(e),h=p==S||p==k;if(Yo(e))return Ri(e,c);if(p==P||p==v||h&&!s){if(a=d||h?{}:ys(e),!c)return d?function(e,t){return xi(e,ms(e),t)}(e,function(e,t){return e&&xi(t,Aa(t),e)}(a,e)):function(e,t){return xi(e,fs(e),t)}(e,on(a,e))}else{if(!ot[p])return s?e:{};a=function(e,t,r){var n=e.constructor;switch(t){case O:return Pi(e);case b:case w:return new n(+e);case L:return function(e,t){var r=t?Pi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case A:case j:case F:case N:case B:case W:case q:case U:case z:return Ti(e,r);case C:case D:return new n;case R:case M:return new n(e);case E:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case I:return i=e,Br?Te(Br.call(i)):{}}var i}(e,p,c)}}o||(o=new Jr);var f=o.get(e);if(f)return f;o.set(e,a),da(e)?e.forEach((function(r){a.add(un(r,t,n,r,e,o))})):sa(e)&&e.forEach((function(r,i){a.set(i,un(r,t,n,i,e,o))}));var m=l?r:(u?d?os:ss:d?Aa:La)(e);return Pt(m||e,(function(r,i){m&&(r=e[i=r]),rn(a,i,un(r,t,n,i,e,o))})),a}function ln(e,t,n){var i=n.length;if(null==e)return!i;for(e=Te(e);i--;){var s=n[i],o=t[s],a=e[s];if(a===r&&!(s in e)||!o(a))return!1}return!0}function pn(e,t,i){if("function"!=typeof e)throw new Me(n);return Os((function(){e.apply(r,i)}),t)}function hn(e,t,r,n){var i=-1,s=Mt,o=!0,a=e.length,c=[],d=t.length;if(!a)return c;r&&(t=xt(t,Jt(r))),n?(s=It,o=!1):t.length>=200&&(s=Zt,o=!1,t=new Qr(t));e:for(;++i<a;){var u=e[i],l=null==r?u:r(u);if(u=n||0!==u?u:0,o&&l==l){for(var p=d;p--;)if(t[p]===l)continue e;c.push(u)}else s(t,l,n)||c.push(u)}return c}qr.templateSettings={escape:Y,evaluate:Z,interpolate:X,variable:"",imports:{_:qr}},qr.prototype=zr.prototype,qr.prototype.constructor=qr,Vr.prototype=Ur(zr.prototype),Vr.prototype.constructor=Vr,$r.prototype=Ur(zr.prototype),$r.prototype.constructor=$r,Hr.prototype.clear=function(){this.__data__=Mr?Mr(null):{},this.size=0},Hr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hr.prototype.get=function(e){var t=this.__data__;if(Mr){var n=t[e];return n===i?r:n}return je.call(t,e)?t[e]:r},Hr.prototype.has=function(e){var t=this.__data__;return Mr?t[e]!==r:je.call(t,e)},Hr.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Mr&&t===r?i:t,this},Kr.prototype.clear=function(){this.__data__=[],this.size=0},Kr.prototype.delete=function(e){var t=this.__data__,r=nn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Je.call(t,r,1),--this.size,!0)},Kr.prototype.get=function(e){var t=this.__data__,n=nn(t,e);return n<0?r:t[n][1]},Kr.prototype.has=function(e){return nn(this.__data__,e)>-1},Kr.prototype.set=function(e,t){var r=this.__data__,n=nn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Gr.prototype.clear=function(){this.size=0,this.__data__={hash:new Hr,map:new(Pr||Kr),string:new Hr}},Gr.prototype.delete=function(e){var t=ls(this,e).delete(e);return this.size-=t?1:0,t},Gr.prototype.get=function(e){return ls(this,e).get(e)},Gr.prototype.has=function(e){return ls(this,e).has(e)},Gr.prototype.set=function(e,t){var r=ls(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Qr.prototype.add=Qr.prototype.push=function(e){return this.__data__.set(e,i),this},Qr.prototype.has=function(e){return this.__data__.has(e)},Jr.prototype.clear=function(){this.__data__=new Kr,this.size=0},Jr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Jr.prototype.get=function(e){return this.__data__.get(e)},Jr.prototype.has=function(e){return this.__data__.has(e)},Jr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Kr){var n=r.__data__;if(!Pr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Gr(n)}return r.set(e,t),this.size=r.size,this};var fn=Ai(Sn),mn=Ai(kn,!0);function gn(e,t){var r=!0;return fn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function vn(e,t,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(c===r?a==a&&!la(a):n(a,c)))var c=a,d=o}return d}function yn(e,t){var r=[];return fn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function bn(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=bs),i||(i=[]);++s<o;){var a=e[s];t>0&&r(a)?t>1?bn(a,t-1,r,n,i):Ot(i,a):n||(i[i.length]=a)}return i}var wn=ji(),_n=ji(!0);function Sn(e,t){return e&&wn(e,t,La)}function kn(e,t){return e&&_n(e,t,La)}function Cn(e,t){return Dt(t,(function(t){return ea(e[t])}))}function Rn(e,t){for(var n=0,i=(t=_i(t,e)).length;null!=e&&n<i;)e=e[Bs(t[n++])];return n&&n==i?e:r}function Pn(e,t,r){var n=t(e);return Ko(e)?n:Ot(n,r(e))}function Tn(e){return null==e?e===r?"[object Undefined]":"[object Null]":at&&at in Te(e)?function(e){var t=je.call(e,at),n=e[at];try{e[at]=r;var i=!0}catch(e){}var s=Be.call(e);i&&(t?e[at]=n:delete e[at]);return s}(e):function(e){return Be.call(e)}(e)}function En(e,t){return e>t}function Dn(e,t){return null!=e&&je.call(e,t)}function Mn(e,t){return null!=e&&t in Te(e)}function In(e,t,n){for(var i=n?It:Mt,s=e[0].length,o=e.length,a=o,c=oe(o),d=1/0,u=[];a--;){var l=e[a];a&&t&&(l=xt(l,Jt(t))),d=wr(l.length,d),c[a]=!n&&(t||s>=120&&l.length>=120)?new Qr(a&&l):r}l=e[0];var p=-1,h=c[0];e:for(;++p<s&&u.length<d;){var f=l[p],m=t?t(f):f;if(f=n||0!==f?f:0,!(h?Zt(h,m):i(u,m,n))){for(a=o;--a;){var g=c[a];if(!(g?Zt(g,m):i(e[a],m,n)))continue e}h&&h.push(m),u.push(f)}}return u}function xn(e,t,n){var i=null==(e=Ds(e,t=_i(t,e)))?e:e[Bs(Zs(t))];return null==i?r:Ct(i,e,n)}function On(e){return ia(e)&&Tn(e)==v}function Ln(e,t,n,i,s){return e===t||(null==e||null==t||!ia(e)&&!ia(t)?e!=e&&t!=t:function(e,t,n,i,s,o){var a=Ko(e),c=Ko(t),d=a?y:gs(e),u=c?y:gs(t),l=(d=d==v?P:d)==P,p=(u=u==v?P:u)==P,h=d==u;if(h&&Yo(e)){if(!Yo(t))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new Jr),a||pa(e)?ns(e,t,n,i,s,o):function(e,t,r,n,i,s,o){switch(r){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!s(new $e(e),new $e(t)));case b:case w:case R:return zo(+e,+t);case _:return e.name==t.name&&e.message==t.message;case E:case M:return e==t+"";case C:var a=or;case D:var c=1&n;if(a||(a=dr),e.size!=t.size&&!c)return!1;var d=o.get(e);if(d)return d==t;n|=2,o.set(e,t);var u=ns(a(e),a(t),n,i,s,o);return o.delete(e),u;case I:if(Br)return Br.call(e)==Br.call(t)}return!1}(e,t,d,n,i,s,o);if(!(1&n)){var f=l&&je.call(e,"__wrapped__"),m=p&&je.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,S=m?t.value():t;return o||(o=new Jr),s(g,S,n,i,o)}}if(!h)return!1;return o||(o=new Jr),function(e,t,n,i,s,o){var a=1&n,c=ss(e),d=c.length,u=ss(t).length;if(d!=u&&!a)return!1;var l=d;for(;l--;){var p=c[l];if(!(a?p in t:je.call(t,p)))return!1}var h=o.get(e),f=o.get(t);if(h&&f)return h==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);var g=a;for(;++l<d;){var v=e[p=c[l]],y=t[p];if(i)var b=a?i(y,v,p,t,e,o):i(v,y,p,e,t,o);if(!(b===r?v===y||s(v,y,n,i,o):b)){m=!1;break}g||(g="constructor"==p)}if(m&&!g){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,i,s,o)}(e,t,n,i,Ln,s))}function An(e,t,n,i){var s=n.length,o=s,a=!i;if(null==e)return!o;for(e=Te(e);s--;){var c=n[s];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<o;){var d=(c=n[s])[0],u=e[d],l=c[1];if(a&&c[2]){if(u===r&&!(d in e))return!1}else{var p=new Jr;if(i)var h=i(u,l,d,e,t,p);if(!(h===r?Ln(l,u,3,i,p):h))return!1}}return!0}function jn(e){return!(!na(e)||(t=e,Ne&&Ne in t))&&(ea(e)?Ue:ve).test(Ws(e));var t}function Fn(e){return"function"==typeof e?e:null==e?oc:"object"==typeof e?Ko(e)?zn(e[0],e[1]):Un(e):mc(e)}function Nn(e){if(!Rs(e))return yr(e);var t=[];for(var r in Te(e))je.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Bn(e){if(!na(e))return function(e){var t=[];if(null!=e)for(var r in Te(e))t.push(r);return t}(e);var t=Rs(e),r=[];for(var n in e)("constructor"!=n||!t&&je.call(e,n))&&r.push(n);return r}function Wn(e,t){return e<t}function qn(e,t){var r=-1,n=Qo(e)?oe(e.length):[];return fn(e,(function(e,i,s){n[++r]=t(e,i,s)})),n}function Un(e){var t=ps(e);return 1==t.length&&t[0][2]?Ts(t[0][0],t[0][1]):function(r){return r===e||An(r,e,t)}}function zn(e,t){return Ss(e)&&Ps(t)?Ts(Bs(e),t):function(n){var i=Da(n,e);return i===r&&i===t?Ma(n,e):Ln(t,i,3)}}function Vn(e,t,n,i,s){e!==t&&wn(t,(function(o,a){if(s||(s=new Jr),na(o))!function(e,t,n,i,s,o,a){var c=Is(e,n),d=Is(t,n),u=a.get(d);if(u)return void tn(e,n,u);var l=o?o(c,d,n+"",e,t,a):r,p=l===r;if(p){var h=Ko(d),f=!h&&Yo(d),m=!h&&!f&&pa(d);l=d,h||f||m?Ko(c)?l=c:Jo(c)?l=Ii(c):f?(p=!1,l=Ri(d,!0)):m?(p=!1,l=Ti(d,!0)):l=[]:aa(d)||Ho(d)?(l=c,Ho(c)?l=wa(c):na(c)&&!ea(c)||(l=ys(d))):p=!1}p&&(a.set(d,l),s(l,d,i,o,a),a.delete(d));tn(e,n,l)}(e,t,a,n,Vn,i,s);else{var c=i?i(Is(e,a),o,a+"",e,t,s):r;c===r&&(c=o),tn(e,a,c)}}),Aa)}function $n(e,t){var n=e.length;if(n)return ws(t+=t<0?n:0,n)?e[t]:r}function Hn(e,t,r){t=t.length?xt(t,(function(e){return Ko(e)?function(t){return Rn(t,1===e.length?e[0]:e)}:e})):[oc];var n=-1;t=xt(t,Jt(us()));var i=qn(e,(function(e,r,i){var s=xt(t,(function(t){return t(e)}));return{criteria:s,index:++n,value:e}}));return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(i,(function(e,t){return function(e,t,r){var n=-1,i=e.criteria,s=t.criteria,o=i.length,a=r.length;for(;++n<o;){var c=Ei(i[n],s[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Kn(e,t,r){for(var n=-1,i=t.length,s={};++n<i;){var o=t[n],a=Rn(e,o);r(a,o)&&ti(s,_i(o,e),a)}return s}function Gn(e,t,r,n){var i=n?qt:Wt,s=-1,o=t.length,a=e;for(e===t&&(t=Ii(t)),r&&(a=xt(e,Jt(r)));++s<o;)for(var c=0,d=t[s],u=r?r(d):d;(c=i(a,u,c,n))>-1;)a!==e&&Je.call(a,c,1),Je.call(e,c,1);return e}function Qn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==s){var s=i;ws(i)?Je.call(e,i,1):hi(e,i)}}return e}function Jn(e,t){return e+vt(kr()*(t-e+1))}function Yn(e,t){var r="";if(!e||t<1||t>h)return r;do{t%2&&(r+=e),(t=vt(t/2))&&(e+=e)}while(t);return r}function Zn(e,t){return Ls(Es(e,t,oc),e+"")}function Xn(e){return Zr(za(e))}function ei(e,t){var r=za(e);return Fs(r,dn(t,0,r.length))}function ti(e,t,n,i){if(!na(e))return e;for(var s=-1,o=(t=_i(t,e)).length,a=o-1,c=e;null!=c&&++s<o;){var d=Bs(t[s]),u=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return e;if(s!=a){var l=c[d];(u=i?i(l,d,c):r)===r&&(u=na(l)?l:ws(t[s+1])?[]:{})}rn(c,d,u),c=c[d]}return e}var ri=Ir?function(e,t){return Ir.set(e,t),e}:oc,ni=ut?function(e,t){return ut(e,"toString",{configurable:!0,enumerable:!1,value:nc(t),writable:!0})}:oc;function ii(e){return Fs(za(e))}function si(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=oe(i);++n<i;)s[n]=e[n+t];return s}function oi(e,t){var r;return fn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ai(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var s=n+i>>>1,o=e[s];null!==o&&!la(o)&&(r?o<=t:o<t)?n=s+1:i=s}return i}return ci(e,t,oc,r)}function ci(e,t,n,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,c=null===t,d=la(t),u=t===r;s<o;){var l=vt((s+o)/2),p=n(e[l]),h=p!==r,f=null===p,m=p==p,g=la(p);if(a)var v=i||m;else v=u?m&&(i||h):c?m&&h&&(i||!f):d?m&&h&&!f&&(i||!g):!f&&!g&&(i?p<=t:p<t);v?s=l+1:o=l}return wr(o,4294967294)}function di(e,t){for(var r=-1,n=e.length,i=0,s=[];++r<n;){var o=e[r],a=t?t(o):o;if(!r||!zo(a,c)){var c=a;s[i++]=0===o?0:o}}return s}function ui(e){return"number"==typeof e?e:la(e)?f:+e}function li(e){if("string"==typeof e)return e;if(Ko(e))return xt(e,li)+"";if(la(e))return Wr?Wr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function pi(e,t,r){var n=-1,i=Mt,s=e.length,o=!0,a=[],c=a;if(r)o=!1,i=It;else if(s>=200){var d=t?null:Yi(e);if(d)return dr(d);o=!1,i=Zt,c=new Qr}else c=t?[]:a;e:for(;++n<s;){var u=e[n],l=t?t(u):u;if(u=r||0!==u?u:0,o&&l==l){for(var p=c.length;p--;)if(c[p]===l)continue e;t&&c.push(l),a.push(u)}else i(c,l,r)||(c!==a&&c.push(l),a.push(u))}return a}function hi(e,t){return null==(e=Ds(e,t=_i(t,e)))||delete e[Bs(Zs(t))]}function fi(e,t,r,n){return ti(e,t,r(Rn(e,t)),n)}function mi(e,t,r,n){for(var i=e.length,s=n?i:-1;(n?s--:++s<i)&&t(e[s],s,e););return r?si(e,n?0:s,n?s+1:i):si(e,n?s+1:0,n?i:s)}function gi(e,t){var r=e;return r instanceof $r&&(r=r.value()),Lt(t,(function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))}),r)}function vi(e,t,r){var n=e.length;if(n<2)return n?pi(e[0]):[];for(var i=-1,s=oe(n);++i<n;)for(var o=e[i],a=-1;++a<n;)a!=i&&(s[i]=hn(s[i]||o,e[a],t,r));return pi(bn(s,1),t,r)}function yi(e,t,n){for(var i=-1,s=e.length,o=t.length,a={};++i<s;){var c=i<o?t[i]:r;n(a,e[i],c)}return a}function bi(e){return Jo(e)?e:[]}function wi(e){return"function"==typeof e?e:oc}function _i(e,t){return Ko(e)?e:Ss(e,t)?[e]:Ns(_a(e))}var Si=Zn;function ki(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:si(e,t,n)}var Ci=lt||function(e){return pt.clearTimeout(e)};function Ri(e,t){if(t)return e.slice();var r=e.length,n=He?He(r):new e.constructor(r);return e.copy(n),n}function Pi(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ti(e,t){var r=t?Pi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var n=e!==r,i=null===e,s=e==e,o=la(e),a=t!==r,c=null===t,d=t==t,u=la(t);if(!c&&!u&&!o&&e>t||o&&a&&d&&!c&&!u||i&&a&&d||!n&&d||!s)return 1;if(!i&&!o&&!u&&e<t||u&&n&&s&&!i&&!o||c&&n&&s||!a&&s||!d)return-1}return 0}function Di(e,t,r,n){for(var i=-1,s=e.length,o=r.length,a=-1,c=t.length,d=br(s-o,0),u=oe(c+d),l=!n;++a<c;)u[a]=t[a];for(;++i<o;)(l||i<s)&&(u[r[i]]=e[i]);for(;d--;)u[a++]=e[i++];return u}function Mi(e,t,r,n){for(var i=-1,s=e.length,o=-1,a=r.length,c=-1,d=t.length,u=br(s-a,0),l=oe(u+d),p=!n;++i<u;)l[i]=e[i];for(var h=i;++c<d;)l[h+c]=t[c];for(;++o<a;)(p||i<s)&&(l[h+r[o]]=e[i++]);return l}function Ii(e,t){var r=-1,n=e.length;for(t||(t=oe(n));++r<n;)t[r]=e[r];return t}function xi(e,t,n,i){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var c=t[o],d=i?i(n[c],e[c],c,n,e):r;d===r&&(d=e[c]),s?an(n,c,d):rn(n,c,d)}return n}function Oi(e,t){return function(r,n){var i=Ko(r)?Rt:sn,s=t?t():{};return i(r,e,us(n,2),s)}}function Li(e){return Zn((function(t,n){var i=-1,s=n.length,o=s>1?n[s-1]:r,a=s>2?n[2]:r;for(o=e.length>3&&"function"==typeof o?(s--,o):r,a&&_s(n[0],n[1],a)&&(o=s<3?r:o,s=1),t=Te(t);++i<s;){var c=n[i];c&&e(t,c,i,o)}return t}))}function Ai(e,t){return function(r,n){if(null==r)return r;if(!Qo(r))return e(r,n);for(var i=r.length,s=t?i:-1,o=Te(r);(t?s--:++s<i)&&!1!==n(o[s],s,o););return r}}function ji(e){return function(t,r,n){for(var i=-1,s=Te(t),o=n(t),a=o.length;a--;){var c=o[e?a:++i];if(!1===r(s[c],c,s))break}return t}}function Fi(e){return function(t){var n=sr(t=_a(t))?pr(t):r,i=n?n[0]:t.charAt(0),s=n?ki(n,1).join(""):t.slice(1);return i[e]()+s}}function Ni(e){return function(t){return Lt(ec(Ha(t).replace(Ye,"")),e,"")}}function Bi(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 r=Ur(e.prototype),n=e.apply(r,t);return na(n)?n:r}}function Wi(e){return function(t,n,i){var s=Te(t);if(!Qo(t)){var o=us(n,3);t=La(t),n=function(e){return o(s[e],e,s)}}var a=e(t,n,i);return a>-1?s[o?t[a]:a]:r}}function qi(e){return is((function(t){var i=t.length,s=i,o=Vr.prototype.thru;for(e&&t.reverse();s--;){var a=t[s];if("function"!=typeof a)throw new Me(n);if(o&&!c&&"wrapper"==cs(a))var c=new Vr([],!0)}for(s=c?s:i;++s<i;){var d=cs(a=t[s]),u="wrapper"==d?as(a):r;c=u&&ks(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[cs(u[0])].apply(c,u[3]):1==a.length&&ks(a)?c[d]():c.thru(a)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&Ko(r))return c.plant(r).value();for(var n=0,s=i?t[n].apply(this,e):r;++n<i;)s=t[n].call(this,s);return s}}))}function Ui(e,t,n,i,s,o,a,c,u,l){var p=t&d,h=1&t,f=2&t,m=24&t,g=512&t,v=f?r:Bi(e);return function r(){for(var d=arguments.length,y=oe(d),b=d;b--;)y[b]=arguments[b];if(m)var w=ds(r),_=tr(y,w);if(i&&(y=Di(y,i,s,m)),o&&(y=Mi(y,o,a,m)),d-=_,m&&d<l){var S=cr(y,w);return Qi(e,t,Ui,r.placeholder,n,y,S,c,u,l-d)}var k=h?n:this,C=f?k[e]:e;return d=y.length,c?y=Ms(y,c):g&&d>1&&y.reverse(),p&&u<d&&(y.length=u),this&&this!==pt&&this instanceof r&&(C=v||Bi(C)),C.apply(k,y)}}function zi(e,t){return function(r,n){return function(e,t,r,n){return Sn(e,(function(e,i,s){t(n,r(e),i,s)})),n}(r,e,t(n),{})}}function Vi(e,t){return function(n,i){var s;if(n===r&&i===r)return t;if(n!==r&&(s=n),i!==r){if(s===r)return i;"string"==typeof n||"string"==typeof i?(n=li(n),i=li(i)):(n=ui(n),i=ui(i)),s=e(n,i)}return s}}function $i(e){return is((function(t){return t=xt(t,Jt(us())),Zn((function(r){var n=this;return e(t,(function(e){return Ct(e,n,r)}))}))}))}function Hi(e,t){var n=(t=t===r?" ":li(t)).length;if(n<2)return n?Yn(t,e):t;var i=Yn(t,gt(e/lr(t)));return sr(t)?ki(pr(i),0,e).join(""):i.slice(0,e)}function Ki(e){return function(t,n,i){return i&&"number"!=typeof i&&_s(t,n,i)&&(n=i=r),t=ga(t),n===r?(n=t,t=0):n=ga(n),function(e,t,r,n){for(var i=-1,s=br(gt((t-e)/(r||1)),0),o=oe(s);s--;)o[n?s:++i]=e,e+=r;return o}(t,n,i=i===r?t<n?1:-1:ga(i),e)}}function Gi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ba(t),r=ba(r)),e(t,r)}}function Qi(e,t,n,i,s,o,d,u,l,p){var h=8&t;t|=h?a:c,4&(t&=~(h?c:a))||(t&=-4);var f=[e,t,s,h?o:r,h?d:r,h?r:o,h?r:d,u,l,p],m=n.apply(r,f);return ks(e)&&xs(m,f),m.placeholder=i,As(m,e,t)}function Ji(e){var t=Pe[e];return function(e,r){if(e=ba(e),(r=null==r?0:wr(va(r),292))&&gr(e)){var n=(_a(e)+"e").split("e");return+((n=(_a(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Yi=Er&&1/dr(new Er([,-0]))[1]==p?function(e){return new Er(e)}:lc;function Zi(e){return function(t){var r=gs(t);return r==C?or(t):r==D?ur(t):function(e,t){return xt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,i,l,p,h,f,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Me(n);var v=l?l.length:0;if(v||(t&=-97,l=p=r),f=f===r?f:br(va(f),0),m=m===r?m:va(m),v-=p?p.length:0,t&c){var y=l,b=p;l=p=r}var w=g?r:as(e),_=[e,t,i,l,p,y,b,h,f,m];if(w&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,a=n==d&&8==r||n==d&&r==u&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!a)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?Di(l,c,t[4]):c,e[4]=l?cr(e[3],s):t[4]}(c=t[5])&&(l=e[5],e[5]=l?Mi(l,c,t[6]):c,e[6]=l?cr(e[5],s):t[6]);(c=t[7])&&(e[7]=c);n&d&&(e[8]=null==e[8]?t[8]:wr(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(_,w),e=_[0],t=_[1],i=_[2],l=_[3],p=_[4],!(m=_[9]=_[9]===r?g?0:e.length:br(_[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||t==o?function(e,t,n){var i=Bi(e);return function s(){for(var o=arguments.length,a=oe(o),c=o,d=ds(s);c--;)a[c]=arguments[c];var u=o<3&&a[0]!==d&&a[o-1]!==d?[]:cr(a,d);return(o-=u.length)<n?Qi(e,t,Ui,s.placeholder,r,a,u,r,r,n-o):Ct(this&&this!==pt&&this instanceof s?i:e,this,a)}}(e,t,m):t!=a&&33!=t||p.length?Ui.apply(r,_):function(e,t,r,n){var i=1&t,s=Bi(e);return function t(){for(var o=-1,a=arguments.length,c=-1,d=n.length,u=oe(d+a),l=this&&this!==pt&&this instanceof t?s:e;++c<d;)u[c]=n[c];for(;a--;)u[c++]=arguments[++o];return Ct(l,i?r:this,u)}}(e,t,i,l);else var S=function(e,t,r){var n=1&t,i=Bi(e);return function t(){return(this&&this!==pt&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,i);return As((w?ri:xs)(S,_),e,t)}function es(e,t,n,i){return e===r||zo(e,Oe[n])&&!je.call(i,n)?t:e}function ts(e,t,n,i,s,o){return na(e)&&na(t)&&(o.set(t,e),Vn(e,t,r,ts,o),o.delete(t)),e}function rs(e){return aa(e)?r:e}function ns(e,t,n,i,s,o){var a=1&n,c=e.length,d=t.length;if(c!=d&&!(a&&d>c))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var p=-1,h=!0,f=2&n?new Qr:r;for(o.set(e,t),o.set(t,e);++p<c;){var m=e[p],g=t[p];if(i)var v=a?i(g,m,p,t,e,o):i(m,g,p,e,t,o);if(v!==r){if(v)continue;h=!1;break}if(f){if(!jt(t,(function(e,t){if(!Zt(f,t)&&(m===e||s(m,e,n,i,o)))return f.push(t)}))){h=!1;break}}else if(m!==g&&!s(m,g,n,i,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function is(e){return Ls(Es(e,r,Ks),e+"")}function ss(e){return Pn(e,La,fs)}function os(e){return Pn(e,Aa,ms)}var as=Ir?function(e){return Ir.get(e)}:lc;function cs(e){for(var t=e.name+"",r=xr[t],n=je.call(xr,t)?r.length:0;n--;){var i=r[n],s=i.func;if(null==s||s==e)return i.name}return t}function ds(e){return(je.call(qr,"placeholder")?qr:e).placeholder}function us(){var e=qr.iteratee||ac;return e=e===ac?Fn:e,arguments.length?e(arguments[0],arguments[1]):e}function ls(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function ps(e){for(var t=La(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Ps(i)]}return t}function hs(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return jn(n)?n:r}var fs=Ft?function(e){return null==e?[]:(e=Te(e),Dt(Ft(e),(function(t){return Qe.call(e,t)})))}:yc,ms=Ft?function(e){for(var t=[];e;)Ot(t,fs(e)),e=Ke(e);return t}:yc,gs=Tn;function vs(e,t,r){for(var n=-1,i=(t=_i(t,e)).length,s=!1;++n<i;){var o=Bs(t[n]);if(!(s=null!=e&&r(e,o)))break;e=e[o]}return s||++n!=i?s:!!(i=null==e?0:e.length)&&ra(i)&&ws(o,i)&&(Ko(e)||Ho(e))}function ys(e){return"function"!=typeof e.constructor||Rs(e)?{}:Ur(Ke(e))}function bs(e){return Ko(e)||Ho(e)||!!(Xe&&e&&e[Xe])}function ws(e,t){var r=typeof e;return!!(t=null==t?h:t)&&("number"==r||"symbol"!=r&&be.test(e))&&e>-1&&e%1==0&&e<t}function _s(e,t,r){if(!na(r))return!1;var n=typeof t;return!!("number"==n?Qo(r)&&ws(t,r.length):"string"==n&&t in r)&&zo(r[t],e)}function Ss(e,t){if(Ko(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!la(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Te(t))}function ks(e){var t=cs(e),r=qr[t];if("function"!=typeof r||!(t in $r.prototype))return!1;if(e===r)return!0;var n=as(r);return!!n&&e===n[0]}(Rr&&gs(new Rr(new ArrayBuffer(1)))!=L||Pr&&gs(new Pr)!=C||Tr&&gs(Tr.resolve())!=T||Er&&gs(new Er)!=D||Dr&&gs(new Dr)!=x)&&(gs=function(e){var t=Tn(e),n=t==P?e.constructor:r,i=n?Ws(n):"";if(i)switch(i){case Or:return L;case Lr:return C;case Ar:return T;case jr:return D;case Fr:return x}return t});var Cs=Le?ea:bc;function Rs(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function Ps(e){return e==e&&!na(e)}function Ts(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==r||e in Te(n)))}}function Es(e,t,n){return t=br(t===r?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=br(r.length-t,0),o=oe(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=oe(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),Ct(e,this,a)}}function Ds(e,t){return t.length<2?e:Rn(e,si(t,0,-1))}function Ms(e,t){for(var n=e.length,i=wr(t.length,n),s=Ii(e);i--;){var o=t[i];e[i]=ws(o,n)?s[o]:r}return e}function Is(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var xs=js(ri),Os=ft||function(e,t){return pt.setTimeout(e,t)},Ls=js(ni);function As(e,t,r){var n=t+"";return Ls(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Pt(g,(function(r){var n="_."+r[0];t&r[1]&&!Mt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(de):[]}(n),r)))}function js(e){var t=0,n=0;return function(){var i=_r(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Fs(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var o=Jn(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var Ns=function(e){var t=Fo(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,r,n,i){t.push(n?i.replace(pe,"$1"):r||e)})),t}));function Bs(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ws(e){if(null!=e){try{return Ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qs(e){if(e instanceof $r)return e.clone();var t=new Vr(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Us=Zn((function(e,t){return Jo(e)?hn(e,bn(t,1,Jo,!0)):[]})),zs=Zn((function(e,t){var n=Zs(t);return Jo(n)&&(n=r),Jo(e)?hn(e,bn(t,1,Jo,!0),us(n,2)):[]})),Vs=Zn((function(e,t){var n=Zs(t);return Jo(n)&&(n=r),Jo(e)?hn(e,bn(t,1,Jo,!0),r,n):[]}));function $s(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:va(r);return i<0&&(i=br(n+i,0)),Bt(e,us(t,3),i)}function Hs(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return n!==r&&(s=va(n),s=n<0?br(i+s,0):wr(s,i-1)),Bt(e,us(t,3),s,!0)}function Ks(e){return(null==e?0:e.length)?bn(e,1):[]}function Gs(e){return e&&e.length?e[0]:r}var Qs=Zn((function(e){var t=xt(e,bi);return t.length&&t[0]===e[0]?In(t):[]})),Js=Zn((function(e){var t=Zs(e),n=xt(e,bi);return t===Zs(n)?t=r:n.pop(),n.length&&n[0]===e[0]?In(n,us(t,2)):[]})),Ys=Zn((function(e){var t=Zs(e),n=xt(e,bi);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?In(n,r,t):[]}));function Zs(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Xs=Zn(eo);function eo(e,t){return e&&e.length&&t&&t.length?Gn(e,t):e}var to=is((function(e,t){var r=null==e?0:e.length,n=cn(e,t);return Qn(e,xt(t,(function(e){return ws(e,r)?+e:e})).sort(Ei)),n}));function ro(e){return null==e?e:Cr.call(e)}var no=Zn((function(e){return pi(bn(e,1,Jo,!0))})),io=Zn((function(e){var t=Zs(e);return Jo(t)&&(t=r),pi(bn(e,1,Jo,!0),us(t,2))})),so=Zn((function(e){var t=Zs(e);return t="function"==typeof t?t:r,pi(bn(e,1,Jo,!0),r,t)}));function oo(e){if(!e||!e.length)return[];var t=0;return e=Dt(e,(function(e){if(Jo(e))return t=br(e.length,t),!0})),Gt(t,(function(t){return xt(e,Vt(t))}))}function ao(e,t){if(!e||!e.length)return[];var n=oo(e);return null==t?n:xt(n,(function(e){return Ct(t,r,e)}))}var co=Zn((function(e,t){return Jo(e)?hn(e,t):[]})),uo=Zn((function(e){return vi(Dt(e,Jo))})),lo=Zn((function(e){var t=Zs(e);return Jo(t)&&(t=r),vi(Dt(e,Jo),us(t,2))})),po=Zn((function(e){var t=Zs(e);return t="function"==typeof t?t:r,vi(Dt(e,Jo),r,t)})),ho=Zn(oo);var fo=Zn((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ao(e,n)}));function mo(e){var t=qr(e);return t.__chain__=!0,t}function go(e,t){return t(e)}var vo=is((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return cn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof $r&&ws(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:go,args:[s],thisArg:r}),new Vr(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(s)}));var yo=Oi((function(e,t,r){je.call(e,r)?++e[r]:an(e,r,1)}));var bo=Wi($s),wo=Wi(Hs);function _o(e,t){return(Ko(e)?Pt:fn)(e,us(t,3))}function So(e,t){return(Ko(e)?Tt:mn)(e,us(t,3))}var ko=Oi((function(e,t,r){je.call(e,r)?e[r].push(t):an(e,r,[t])}));var Co=Zn((function(e,t,r){var n=-1,i="function"==typeof t,s=Qo(e)?oe(e.length):[];return fn(e,(function(e){s[++n]=i?Ct(t,e,r):xn(e,t,r)})),s})),Ro=Oi((function(e,t,r){an(e,r,t)}));function Po(e,t){return(Ko(e)?xt:qn)(e,us(t,3))}var To=Oi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Eo=Zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&_s(e,t[0],t[1])?t=[]:r>2&&_s(t[0],t[1],t[2])&&(t=[t[0]]),Hn(e,bn(t,1),[])})),Do=ht||function(){return pt.Date.now()};function Mo(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Xi(e,d,r,r,r,r,t)}function Io(e,t){var i;if("function"!=typeof t)throw new Me(n);return e=va(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var xo=Zn((function(e,t,r){var n=1;if(r.length){var i=cr(r,ds(xo));n|=a}return Xi(e,n,t,r,i)})),Oo=Zn((function(e,t,r){var n=3;if(r.length){var i=cr(r,ds(Oo));n|=a}return Xi(t,n,e,r,i)}));function Lo(e,t,i){var s,o,a,c,d,u,l=0,p=!1,h=!1,f=!0;if("function"!=typeof e)throw new Me(n);function m(t){var n=s,i=o;return s=o=r,l=t,c=e.apply(i,n)}function g(e){return l=e,d=Os(y,t),p?m(e):c}function v(e){var n=e-u;return u===r||n>=t||n<0||h&&e-l>=a}function y(){var e=Do();if(v(e))return b(e);d=Os(y,function(e){var r=t-(e-u);return h?wr(r,a-(e-l)):r}(e))}function b(e){return d=r,f&&s?m(e):(s=o=r,c)}function w(){var e=Do(),n=v(e);if(s=arguments,o=this,u=e,n){if(d===r)return g(u);if(h)return Ci(d),d=Os(y,t),m(u)}return d===r&&(d=Os(y,t)),c}return t=ba(t)||0,na(i)&&(p=!!i.leading,a=(h="maxWait"in i)?br(ba(i.maxWait)||0,t):a,f="trailing"in i?!!i.trailing:f),w.cancel=function(){d!==r&&Ci(d),l=0,s=u=o=d=r},w.flush=function(){return d===r?c:b(Do())},w}var Ao=Zn((function(e,t){return pn(e,1,t)})),jo=Zn((function(e,t,r){return pn(e,ba(t)||0,r)}));function Fo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Me(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(Fo.Cache||Gr),r}function No(e){if("function"!=typeof e)throw new Me(n);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)}}Fo.Cache=Gr;var Bo=Si((function(e,t){var r=(t=1==t.length&&Ko(t[0])?xt(t[0],Jt(us())):xt(bn(t,1),Jt(us()))).length;return Zn((function(n){for(var i=-1,s=wr(n.length,r);++i<s;)n[i]=t[i].call(this,n[i]);return Ct(e,this,n)}))})),Wo=Zn((function(e,t){var n=cr(t,ds(Wo));return Xi(e,a,r,t,n)})),qo=Zn((function(e,t){var n=cr(t,ds(qo));return Xi(e,c,r,t,n)})),Uo=is((function(e,t){return Xi(e,u,r,r,r,t)}));function zo(e,t){return e===t||e!=e&&t!=t}var Vo=Gi(En),$o=Gi((function(e,t){return e>=t})),Ho=On(function(){return arguments}())?On:function(e){return ia(e)&&je.call(e,"callee")&&!Qe.call(e,"callee")},Ko=oe.isArray,Go=yt?Jt(yt):function(e){return ia(e)&&Tn(e)==O};function Qo(e){return null!=e&&ra(e.length)&&!ea(e)}function Jo(e){return ia(e)&&Qo(e)}var Yo=$t||bc,Zo=bt?Jt(bt):function(e){return ia(e)&&Tn(e)==w};function Xo(e){if(!ia(e))return!1;var t=Tn(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!aa(e)}function ea(e){if(!na(e))return!1;var t=Tn(e);return t==S||t==k||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ta(e){return"number"==typeof e&&e==va(e)}function ra(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function na(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ia(e){return null!=e&&"object"==typeof e}var sa=wt?Jt(wt):function(e){return ia(e)&&gs(e)==C};function oa(e){return"number"==typeof e||ia(e)&&Tn(e)==R}function aa(e){if(!ia(e)||Tn(e)!=P)return!1;var t=Ke(e);if(null===t)return!0;var r=je.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ae.call(r)==We}var ca=_t?Jt(_t):function(e){return ia(e)&&Tn(e)==E};var da=St?Jt(St):function(e){return ia(e)&&gs(e)==D};function ua(e){return"string"==typeof e||!Ko(e)&&ia(e)&&Tn(e)==M}function la(e){return"symbol"==typeof e||ia(e)&&Tn(e)==I}var pa=kt?Jt(kt):function(e){return ia(e)&&ra(e.length)&&!!st[Tn(e)]};var ha=Gi(Wn),fa=Gi((function(e,t){return e<=t}));function ma(e){if(!e)return[];if(Qo(e))return ua(e)?pr(e):Ii(e);if(tt&&e[tt])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[tt]());var t=gs(e);return(t==C?or:t==D?dr:za)(e)}function ga(e){return e?(e=ba(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function va(e){var t=ga(e),r=t%1;return t==t?r?t-r:t:0}function ya(e){return e?dn(va(e),0,m):0}function ba(e){if("number"==typeof e)return e;if(la(e))return f;if(na(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=na(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Qt(e);var r=ge.test(e);return r||ye.test(e)?dt(e.slice(2),r?2:8):me.test(e)?f:+e}function wa(e){return xi(e,Aa(e))}function _a(e){return null==e?"":li(e)}var Sa=Li((function(e,t){if(Rs(t)||Qo(t))xi(t,La(t),e);else for(var r in t)je.call(t,r)&&rn(e,r,t[r])})),ka=Li((function(e,t){xi(t,Aa(t),e)})),Ca=Li((function(e,t,r,n){xi(t,Aa(t),e,n)})),Ra=Li((function(e,t,r,n){xi(t,La(t),e,n)})),Pa=is(cn);var Ta=Zn((function(e,t){e=Te(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&_s(t[0],t[1],s)&&(i=1);++n<i;)for(var o=t[n],a=Aa(o),c=-1,d=a.length;++c<d;){var u=a[c],l=e[u];(l===r||zo(l,Oe[u])&&!je.call(e,u))&&(e[u]=o[u])}return e})),Ea=Zn((function(e){return e.push(r,ts),Ct(Fa,r,e)}));function Da(e,t,n){var i=null==e?r:Rn(e,t);return i===r?n:i}function Ma(e,t){return null!=e&&vs(e,t,Mn)}var Ia=zi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),e[t]=r}),nc(oc)),xa=zi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),je.call(e,t)?e[t].push(r):e[t]=[r]}),us),Oa=Zn(xn);function La(e){return Qo(e)?Yr(e):Nn(e)}function Aa(e){return Qo(e)?Yr(e,!0):Bn(e)}var ja=Li((function(e,t,r){Vn(e,t,r)})),Fa=Li((function(e,t,r,n){Vn(e,t,r,n)})),Na=is((function(e,t){var r={};if(null==e)return r;var n=!1;t=xt(t,(function(t){return t=_i(t,e),n||(n=t.length>1),t})),xi(e,os(e),r),n&&(r=un(r,7,rs));for(var i=t.length;i--;)hi(r,t[i]);return r}));var Ba=is((function(e,t){return null==e?{}:function(e,t){return Kn(e,t,(function(t,r){return Ma(e,r)}))}(e,t)}));function Wa(e,t){if(null==e)return{};var r=xt(os(e),(function(e){return[e]}));return t=us(t),Kn(e,r,(function(e,r){return t(e,r[0])}))}var qa=Zi(La),Ua=Zi(Aa);function za(e){return null==e?[]:Yt(e,La(e))}var Va=Ni((function(e,t,r){return t=t.toLowerCase(),e+(r?$a(t):t)}));function $a(e){return Xa(_a(e).toLowerCase())}function Ha(e){return(e=_a(e))&&e.replace(we,rr).replace(Ze,"")}var Ka=Ni((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ga=Ni((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Qa=Fi("toLowerCase");var Ja=Ni((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Ya=Ni((function(e,t,r){return e+(r?" ":"")+Xa(t)}));var Za=Ni((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Xa=Fi("toUpperCase");function ec(e,t,n){return e=_a(e),(t=n?r:t)===r?function(e){return rt.test(e)}(e)?function(e){return e.match(et)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var tc=Zn((function(e,t){try{return Ct(e,r,t)}catch(e){return Xo(e)?e:new Ce(e)}})),rc=is((function(e,t){return Pt(t,(function(t){t=Bs(t),an(e,t,xo(e[t],e))})),e}));function nc(e){return function(){return e}}var ic=qi(),sc=qi(!0);function oc(e){return e}function ac(e){return Fn("function"==typeof e?e:un(e,1))}var cc=Zn((function(e,t){return function(r){return xn(r,e,t)}})),dc=Zn((function(e,t){return function(r){return xn(e,r,t)}}));function uc(e,t,r){var n=La(t),i=Cn(t,n);null!=r||na(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=Cn(t,La(t)));var s=!(na(r)&&"chain"in r&&!r.chain),o=ea(e);return Pt(i,(function(r){var n=t[r];e[r]=n,o&&(e.prototype[r]=function(){var t=this.__chain__;if(s||t){var r=e(this.__wrapped__),i=r.__actions__=Ii(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Ot([this.value()],arguments))})})),e}function lc(){}var pc=$i(xt),hc=$i(Et),fc=$i(jt);function mc(e){return Ss(e)?Vt(Bs(e)):function(e){return function(t){return Rn(t,e)}}(e)}var gc=Ki(),vc=Ki(!0);function yc(){return[]}function bc(){return!1}var wc=Vi((function(e,t){return e+t}),0),_c=Ji("ceil"),Sc=Vi((function(e,t){return e/t}),1),kc=Ji("floor");var Cc,Rc=Vi((function(e,t){return e*t}),1),Pc=Ji("round"),Tc=Vi((function(e,t){return e-t}),0);return qr.after=function(e,t){if("function"!=typeof t)throw new Me(n);return e=va(e),function(){if(--e<1)return t.apply(this,arguments)}},qr.ary=Mo,qr.assign=Sa,qr.assignIn=ka,qr.assignInWith=Ca,qr.assignWith=Ra,qr.at=Pa,qr.before=Io,qr.bind=xo,qr.bindAll=rc,qr.bindKey=Oo,qr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ko(e)?e:[e]},qr.chain=mo,qr.chunk=function(e,t,n){t=(n?_s(e,t,n):t===r)?1:br(va(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,o=0,a=oe(gt(i/t));s<i;)a[o++]=si(e,s,s+=t);return a},qr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var s=e[t];s&&(i[n++]=s)}return i},qr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=oe(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Ot(Ko(r)?Ii(r):[r],bn(t,1))},qr.cond=function(e){var t=null==e?0:e.length,r=us();return e=t?xt(e,(function(e){if("function"!=typeof e[1])throw new Me(n);return[r(e[0]),e[1]]})):[],Zn((function(r){for(var n=-1;++n<t;){var i=e[n];if(Ct(i[0],this,r))return Ct(i[1],this,r)}}))},qr.conforms=function(e){return function(e){var t=La(e);return function(r){return ln(r,e,t)}}(un(e,1))},qr.constant=nc,qr.countBy=yo,qr.create=function(e,t){var r=Ur(e);return null==t?r:on(r,t)},qr.curry=function e(t,n,i){var s=Xi(t,8,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},qr.curryRight=function e(t,n,i){var s=Xi(t,o,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},qr.debounce=Lo,qr.defaults=Ta,qr.defaultsDeep=Ea,qr.defer=Ao,qr.delay=jo,qr.difference=Us,qr.differenceBy=zs,qr.differenceWith=Vs,qr.drop=function(e,t,n){var i=null==e?0:e.length;return i?si(e,(t=n||t===r?1:va(t))<0?0:t,i):[]},qr.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?si(e,0,(t=i-(t=n||t===r?1:va(t)))<0?0:t):[]},qr.dropRightWhile=function(e,t){return e&&e.length?mi(e,us(t,3),!0,!0):[]},qr.dropWhile=function(e,t){return e&&e.length?mi(e,us(t,3),!0):[]},qr.fill=function(e,t,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&_s(e,t,n)&&(n=0,i=s),function(e,t,n,i){var s=e.length;for((n=va(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:va(i))<0&&(i+=s),i=n>i?0:ya(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},qr.filter=function(e,t){return(Ko(e)?Dt:yn)(e,us(t,3))},qr.flatMap=function(e,t){return bn(Po(e,t),1)},qr.flatMapDeep=function(e,t){return bn(Po(e,t),p)},qr.flatMapDepth=function(e,t,n){return n=n===r?1:va(n),bn(Po(e,t),n)},qr.flatten=Ks,qr.flattenDeep=function(e){return(null==e?0:e.length)?bn(e,p):[]},qr.flattenDepth=function(e,t){return(null==e?0:e.length)?bn(e,t=t===r?1:va(t)):[]},qr.flip=function(e){return Xi(e,512)},qr.flow=ic,qr.flowRight=sc,qr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},qr.functions=function(e){return null==e?[]:Cn(e,La(e))},qr.functionsIn=function(e){return null==e?[]:Cn(e,Aa(e))},qr.groupBy=ko,qr.initial=function(e){return(null==e?0:e.length)?si(e,0,-1):[]},qr.intersection=Qs,qr.intersectionBy=Js,qr.intersectionWith=Ys,qr.invert=Ia,qr.invertBy=xa,qr.invokeMap=Co,qr.iteratee=ac,qr.keyBy=Ro,qr.keys=La,qr.keysIn=Aa,qr.map=Po,qr.mapKeys=function(e,t){var r={};return t=us(t,3),Sn(e,(function(e,n,i){an(r,t(e,n,i),e)})),r},qr.mapValues=function(e,t){var r={};return t=us(t,3),Sn(e,(function(e,n,i){an(r,n,t(e,n,i))})),r},qr.matches=function(e){return Un(un(e,1))},qr.matchesProperty=function(e,t){return zn(e,un(t,1))},qr.memoize=Fo,qr.merge=ja,qr.mergeWith=Fa,qr.method=cc,qr.methodOf=dc,qr.mixin=uc,qr.negate=No,qr.nthArg=function(e){return e=va(e),Zn((function(t){return $n(t,e)}))},qr.omit=Na,qr.omitBy=function(e,t){return Wa(e,No(us(t)))},qr.once=function(e){return Io(2,e)},qr.orderBy=function(e,t,n,i){return null==e?[]:(Ko(t)||(t=null==t?[]:[t]),Ko(n=i?r:n)||(n=null==n?[]:[n]),Hn(e,t,n))},qr.over=pc,qr.overArgs=Bo,qr.overEvery=hc,qr.overSome=fc,qr.partial=Wo,qr.partialRight=qo,qr.partition=To,qr.pick=Ba,qr.pickBy=Wa,qr.property=mc,qr.propertyOf=function(e){return function(t){return null==e?r:Rn(e,t)}},qr.pull=Xs,qr.pullAll=eo,qr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Gn(e,t,us(r,2)):e},qr.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gn(e,t,r,n):e},qr.pullAt=to,qr.range=gc,qr.rangeRight=vc,qr.rearg=Uo,qr.reject=function(e,t){return(Ko(e)?Dt:yn)(e,No(us(t,3)))},qr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],s=e.length;for(t=us(t,3);++n<s;){var o=e[n];t(o,n,e)&&(r.push(o),i.push(n))}return Qn(e,i),r},qr.rest=function(e,t){if("function"!=typeof e)throw new Me(n);return Zn(e,t=t===r?t:va(t))},qr.reverse=ro,qr.sampleSize=function(e,t,n){return t=(n?_s(e,t,n):t===r)?1:va(t),(Ko(e)?Xr:ei)(e,t)},qr.set=function(e,t,r){return null==e?e:ti(e,t,r)},qr.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:ti(e,t,n,i)},qr.shuffle=function(e){return(Ko(e)?en:ii)(e)},qr.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&_s(e,t,n)?(t=0,n=i):(t=null==t?0:va(t),n=n===r?i:va(n)),si(e,t,n)):[]},qr.sortBy=Eo,qr.sortedUniq=function(e){return e&&e.length?di(e):[]},qr.sortedUniqBy=function(e,t){return e&&e.length?di(e,us(t,2)):[]},qr.split=function(e,t,n){return n&&"number"!=typeof n&&_s(e,t,n)&&(t=n=r),(n=n===r?m:n>>>0)?(e=_a(e))&&("string"==typeof t||null!=t&&!ca(t))&&!(t=li(t))&&sr(e)?ki(pr(e),0,n):e.split(t,n):[]},qr.spread=function(e,t){if("function"!=typeof e)throw new Me(n);return t=null==t?0:br(va(t),0),Zn((function(r){var n=r[t],i=ki(r,0,t);return n&&Ot(i,n),Ct(e,this,i)}))},qr.tail=function(e){var t=null==e?0:e.length;return t?si(e,1,t):[]},qr.take=function(e,t,n){return e&&e.length?si(e,0,(t=n||t===r?1:va(t))<0?0:t):[]},qr.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?si(e,(t=i-(t=n||t===r?1:va(t)))<0?0:t,i):[]},qr.takeRightWhile=function(e,t){return e&&e.length?mi(e,us(t,3),!1,!0):[]},qr.takeWhile=function(e,t){return e&&e.length?mi(e,us(t,3)):[]},qr.tap=function(e,t){return t(e),e},qr.throttle=function(e,t,r){var i=!0,s=!0;if("function"!=typeof e)throw new Me(n);return na(r)&&(i="leading"in r?!!r.leading:i,s="trailing"in r?!!r.trailing:s),Lo(e,t,{leading:i,maxWait:t,trailing:s})},qr.thru=go,qr.toArray=ma,qr.toPairs=qa,qr.toPairsIn=Ua,qr.toPath=function(e){return Ko(e)?xt(e,Bs):la(e)?[e]:Ii(Ns(_a(e)))},qr.toPlainObject=wa,qr.transform=function(e,t,r){var n=Ko(e),i=n||Yo(e)||pa(e);if(t=us(t,4),null==r){var s=e&&e.constructor;r=i?n?new s:[]:na(e)&&ea(s)?Ur(Ke(e)):{}}return(i?Pt:Sn)(e,(function(e,n,i){return t(r,e,n,i)})),r},qr.unary=function(e){return Mo(e,1)},qr.union=no,qr.unionBy=io,qr.unionWith=so,qr.uniq=function(e){return e&&e.length?pi(e):[]},qr.uniqBy=function(e,t){return e&&e.length?pi(e,us(t,2)):[]},qr.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?pi(e,r,t):[]},qr.unset=function(e,t){return null==e||hi(e,t)},qr.unzip=oo,qr.unzipWith=ao,qr.update=function(e,t,r){return null==e?e:fi(e,t,wi(r))},qr.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:fi(e,t,wi(n),i)},qr.values=za,qr.valuesIn=function(e){return null==e?[]:Yt(e,Aa(e))},qr.without=co,qr.words=ec,qr.wrap=function(e,t){return Wo(wi(t),e)},qr.xor=uo,qr.xorBy=lo,qr.xorWith=po,qr.zip=ho,qr.zipObject=function(e,t){return yi(e||[],t||[],rn)},qr.zipObjectDeep=function(e,t){return yi(e||[],t||[],ti)},qr.zipWith=fo,qr.entries=qa,qr.entriesIn=Ua,qr.extend=ka,qr.extendWith=Ca,uc(qr,qr),qr.add=wc,qr.attempt=tc,qr.camelCase=Va,qr.capitalize=$a,qr.ceil=_c,qr.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ba(n))==n?n:0),t!==r&&(t=(t=ba(t))==t?t:0),dn(ba(e),t,n)},qr.clone=function(e){return un(e,4)},qr.cloneDeep=function(e){return un(e,5)},qr.cloneDeepWith=function(e,t){return un(e,5,t="function"==typeof t?t:r)},qr.cloneWith=function(e,t){return un(e,4,t="function"==typeof t?t:r)},qr.conformsTo=function(e,t){return null==t||ln(e,t,La(t))},qr.deburr=Ha,qr.defaultTo=function(e,t){return null==e||e!=e?t:e},qr.divide=Sc,qr.endsWith=function(e,t,n){e=_a(e),t=li(t);var i=e.length,s=n=n===r?i:dn(va(n),0,i);return(n-=t.length)>=0&&e.slice(n,s)==t},qr.eq=zo,qr.escape=function(e){return(e=_a(e))&&J.test(e)?e.replace(G,nr):e},qr.escapeRegExp=function(e){return(e=_a(e))&&ie.test(e)?e.replace(ne,"\\$&"):e},qr.every=function(e,t,n){var i=Ko(e)?Et:gn;return n&&_s(e,t,n)&&(t=r),i(e,us(t,3))},qr.find=bo,qr.findIndex=$s,qr.findKey=function(e,t){return Nt(e,us(t,3),Sn)},qr.findLast=wo,qr.findLastIndex=Hs,qr.findLastKey=function(e,t){return Nt(e,us(t,3),kn)},qr.floor=kc,qr.forEach=_o,qr.forEachRight=So,qr.forIn=function(e,t){return null==e?e:wn(e,us(t,3),Aa)},qr.forInRight=function(e,t){return null==e?e:_n(e,us(t,3),Aa)},qr.forOwn=function(e,t){return e&&Sn(e,us(t,3))},qr.forOwnRight=function(e,t){return e&&kn(e,us(t,3))},qr.get=Da,qr.gt=Vo,qr.gte=$o,qr.has=function(e,t){return null!=e&&vs(e,t,Dn)},qr.hasIn=Ma,qr.head=Gs,qr.identity=oc,qr.includes=function(e,t,r,n){e=Qo(e)?e:za(e),r=r&&!n?va(r):0;var i=e.length;return r<0&&(r=br(i+r,0)),ua(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Wt(e,t,r)>-1},qr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:va(r);return i<0&&(i=br(n+i,0)),Wt(e,t,i)},qr.inRange=function(e,t,n){return t=ga(t),n===r?(n=t,t=0):n=ga(n),function(e,t,r){return e>=wr(t,r)&&e<br(t,r)}(e=ba(e),t,n)},qr.invoke=Oa,qr.isArguments=Ho,qr.isArray=Ko,qr.isArrayBuffer=Go,qr.isArrayLike=Qo,qr.isArrayLikeObject=Jo,qr.isBoolean=function(e){return!0===e||!1===e||ia(e)&&Tn(e)==b},qr.isBuffer=Yo,qr.isDate=Zo,qr.isElement=function(e){return ia(e)&&1===e.nodeType&&!aa(e)},qr.isEmpty=function(e){if(null==e)return!0;if(Qo(e)&&(Ko(e)||"string"==typeof e||"function"==typeof e.splice||Yo(e)||pa(e)||Ho(e)))return!e.length;var t=gs(e);if(t==C||t==D)return!e.size;if(Rs(e))return!Nn(e).length;for(var r in e)if(je.call(e,r))return!1;return!0},qr.isEqual=function(e,t){return Ln(e,t)},qr.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Ln(e,t,r,n):!!i},qr.isError=Xo,qr.isFinite=function(e){return"number"==typeof e&&gr(e)},qr.isFunction=ea,qr.isInteger=ta,qr.isLength=ra,qr.isMap=sa,qr.isMatch=function(e,t){return e===t||An(e,t,ps(t))},qr.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,An(e,t,ps(t),n)},qr.isNaN=function(e){return oa(e)&&e!=+e},qr.isNative=function(e){if(Cs(e))throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return jn(e)},qr.isNil=function(e){return null==e},qr.isNull=function(e){return null===e},qr.isNumber=oa,qr.isObject=na,qr.isObjectLike=ia,qr.isPlainObject=aa,qr.isRegExp=ca,qr.isSafeInteger=function(e){return ta(e)&&e>=-9007199254740991&&e<=h},qr.isSet=da,qr.isString=ua,qr.isSymbol=la,qr.isTypedArray=pa,qr.isUndefined=function(e){return e===r},qr.isWeakMap=function(e){return ia(e)&&gs(e)==x},qr.isWeakSet=function(e){return ia(e)&&"[object WeakSet]"==Tn(e)},qr.join=function(e,t){return null==e?"":vr.call(e,t)},qr.kebabCase=Ka,qr.last=Zs,qr.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i;return n!==r&&(s=(s=va(n))<0?br(i+s,0):wr(s,i-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,s):Bt(e,Ut,s,!0)},qr.lowerCase=Ga,qr.lowerFirst=Qa,qr.lt=ha,qr.lte=fa,qr.max=function(e){return e&&e.length?vn(e,oc,En):r},qr.maxBy=function(e,t){return e&&e.length?vn(e,us(t,2),En):r},qr.mean=function(e){return zt(e,oc)},qr.meanBy=function(e,t){return zt(e,us(t,2))},qr.min=function(e){return e&&e.length?vn(e,oc,Wn):r},qr.minBy=function(e,t){return e&&e.length?vn(e,us(t,2),Wn):r},qr.stubArray=yc,qr.stubFalse=bc,qr.stubObject=function(){return{}},qr.stubString=function(){return""},qr.stubTrue=function(){return!0},qr.multiply=Rc,qr.nth=function(e,t){return e&&e.length?$n(e,va(t)):r},qr.noConflict=function(){return pt._===this&&(pt._=qe),this},qr.noop=lc,qr.now=Do,qr.pad=function(e,t,r){e=_a(e);var n=(t=va(t))?lr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Hi(vt(i),r)+e+Hi(gt(i),r)},qr.padEnd=function(e,t,r){e=_a(e);var n=(t=va(t))?lr(e):0;return t&&n<t?e+Hi(t-n,r):e},qr.padStart=function(e,t,r){e=_a(e);var n=(t=va(t))?lr(e):0;return t&&n<t?Hi(t-n,r)+e:e},qr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),Sr(_a(e).replace(se,""),t||0)},qr.random=function(e,t,n){if(n&&"boolean"!=typeof n&&_s(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=ga(e),t===r?(t=e,e=0):t=ga(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=kr();return wr(e+s*(t-e+ct("1e-"+((s+"").length-1))),t)}return Jn(e,t)},qr.reduce=function(e,t,r){var n=Ko(e)?Lt:Ht,i=arguments.length<3;return n(e,us(t,4),r,i,fn)},qr.reduceRight=function(e,t,r){var n=Ko(e)?At:Ht,i=arguments.length<3;return n(e,us(t,4),r,i,mn)},qr.repeat=function(e,t,n){return t=(n?_s(e,t,n):t===r)?1:va(t),Yn(_a(e),t)},qr.replace=function(){var e=arguments,t=_a(e[0]);return e.length<3?t:t.replace(e[1],e[2])},qr.result=function(e,t,n){var i=-1,s=(t=_i(t,e)).length;for(s||(s=1,e=r);++i<s;){var o=null==e?r:e[Bs(t[i])];o===r&&(i=s,o=n),e=ea(o)?o.call(e):o}return e},qr.round=Pc,qr.runInContext=e,qr.sample=function(e){return(Ko(e)?Zr:Xn)(e)},qr.size=function(e){if(null==e)return 0;if(Qo(e))return ua(e)?lr(e):e.length;var t=gs(e);return t==C||t==D?e.size:Nn(e).length},qr.snakeCase=Ja,qr.some=function(e,t,n){var i=Ko(e)?jt:oi;return n&&_s(e,t,n)&&(t=r),i(e,us(t,3))},qr.sortedIndex=function(e,t){return ai(e,t)},qr.sortedIndexBy=function(e,t,r){return ci(e,t,us(r,2))},qr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ai(e,t);if(n<r&&zo(e[n],t))return n}return-1},qr.sortedLastIndex=function(e,t){return ai(e,t,!0)},qr.sortedLastIndexBy=function(e,t,r){return ci(e,t,us(r,2),!0)},qr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=ai(e,t,!0)-1;if(zo(e[r],t))return r}return-1},qr.startCase=Ya,qr.startsWith=function(e,t,r){return e=_a(e),r=null==r?0:dn(va(r),0,e.length),t=li(t),e.slice(r,r+t.length)==t},qr.subtract=Tc,qr.sum=function(e){return e&&e.length?Kt(e,oc):0},qr.sumBy=function(e,t){return e&&e.length?Kt(e,us(t,2)):0},qr.template=function(e,t,n){var i=qr.templateSettings;n&&_s(e,t,n)&&(t=r),e=_a(e),t=Ca({},t,i,es);var s,o,a=Ca({},t.imports,i.imports,es),c=La(a),d=Yt(a,c),u=0,l=t.interpolate||_e,p="__p += '",h=Ee((t.escape||_e).source+"|"+l.source+"|"+(l===X?he:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),f="//# sourceURL="+(je.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";e.replace(h,(function(t,r,n,i,a,c){return n||(n=i),p+=e.slice(u,c).replace(Se,ir),r&&(s=!0,p+="' +\n__e("+r+") +\n'"),a&&(o=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),p+="';\n";var m=je.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new Ce("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(o?p.replace(V,""):p).replace($,"$1").replace(H,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=tc((function(){return Re(c,f+"return "+p).apply(r,d)}));if(g.source=p,Xo(g))throw g;return g},qr.times=function(e,t){if((e=va(e))<1||e>h)return[];var r=m,n=wr(e,m);t=us(t),e-=m;for(var i=Gt(n,t);++r<e;)t(r);return i},qr.toFinite=ga,qr.toInteger=va,qr.toLength=ya,qr.toLower=function(e){return _a(e).toLowerCase()},qr.toNumber=ba,qr.toSafeInteger=function(e){return e?dn(va(e),-9007199254740991,h):0===e?e:0},qr.toString=_a,qr.toUpper=function(e){return _a(e).toUpperCase()},qr.trim=function(e,t,n){if((e=_a(e))&&(n||t===r))return Qt(e);if(!e||!(t=li(t)))return e;var i=pr(e),s=pr(t);return ki(i,Xt(i,s),er(i,s)+1).join("")},qr.trimEnd=function(e,t,n){if((e=_a(e))&&(n||t===r))return e.slice(0,hr(e)+1);if(!e||!(t=li(t)))return e;var i=pr(e);return ki(i,0,er(i,pr(t))+1).join("")},qr.trimStart=function(e,t,n){if((e=_a(e))&&(n||t===r))return e.replace(se,"");if(!e||!(t=li(t)))return e;var i=pr(e);return ki(i,Xt(i,pr(t))).join("")},qr.truncate=function(e,t){var n=30,i="...";if(na(t)){var s="separator"in t?t.separator:s;n="length"in t?va(t.length):n,i="omission"in t?li(t.omission):i}var o=(e=_a(e)).length;if(sr(e)){var a=pr(e);o=a.length}if(n>=o)return e;var c=n-lr(i);if(c<1)return i;var d=a?ki(a,0,c).join(""):e.slice(0,c);if(s===r)return d+i;if(a&&(c+=d.length-c),ca(s)){if(e.slice(c).search(s)){var u,l=d;for(s.global||(s=Ee(s.source,_a(fe.exec(s))+"g")),s.lastIndex=0;u=s.exec(l);)var p=u.index;d=d.slice(0,p===r?c:p)}}else if(e.indexOf(li(s),c)!=c){var h=d.lastIndexOf(s);h>-1&&(d=d.slice(0,h))}return d+i},qr.unescape=function(e){return(e=_a(e))&&Q.test(e)?e.replace(K,fr):e},qr.uniqueId=function(e){var t=++Fe;return _a(e)+t},qr.upperCase=Za,qr.upperFirst=Xa,qr.each=_o,qr.eachRight=So,qr.first=Gs,uc(qr,(Cc={},Sn(qr,(function(e,t){je.call(qr.prototype,t)||(Cc[t]=e)})),Cc),{chain:!1}),qr.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){qr[e].placeholder=qr})),Pt(["drop","take"],(function(e,t){$r.prototype[e]=function(n){n=n===r?1:br(va(n),0);var i=this.__filtered__&&!t?new $r(this):this.clone();return i.__filtered__?i.__takeCount__=wr(n,i.__takeCount__):i.__views__.push({size:wr(n,m),type:e+(i.__dir__<0?"Right":"")}),i},$r.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;$r.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:us(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Pt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");$r.prototype[e]=function(){return this[r](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");$r.prototype[e]=function(){return this.__filtered__?new $r(this):this[r](1)}})),$r.prototype.compact=function(){return this.filter(oc)},$r.prototype.find=function(e){return this.filter(e).head()},$r.prototype.findLast=function(e){return this.reverse().find(e)},$r.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new $r(this):this.map((function(r){return xn(r,e,t)}))})),$r.prototype.reject=function(e){return this.filter(No(us(e)))},$r.prototype.slice=function(e,t){e=va(e);var n=this;return n.__filtered__&&(e>0||t<0)?new $r(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=va(t))<0?n.dropRight(-t):n.take(t-e)),n)},$r.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$r.prototype.toArray=function(){return this.take(m)},Sn($r.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=qr[i?"take"+("last"==t?"Right":""):t],o=i||/^find/.test(t);s&&(qr.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,c=t instanceof $r,d=a[0],u=c||Ko(t),l=function(e){var t=s.apply(qr,Ot([e],a));return i&&p?t[0]:t};u&&n&&"function"==typeof d&&1!=d.length&&(c=u=!1);var p=this.__chain__,h=!!this.__actions__.length,f=o&&!p,m=c&&!h;if(!o&&u){t=m?t:new $r(this);var g=e.apply(t,a);return g.__actions__.push({func:go,args:[l],thisArg:r}),new Vr(g,p)}return f&&m?e.apply(this,a):(g=this.thru(l),f?i?g.value()[0]:g.value():g)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);qr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Ko(i)?i:[],e)}return this[r]((function(r){return t.apply(Ko(r)?r:[],e)}))}})),Sn($r.prototype,(function(e,t){var r=qr[t];if(r){var n=r.name+"";je.call(xr,n)||(xr[n]=[]),xr[n].push({name:t,func:r})}})),xr[Ui(r,2).name]=[{name:"wrapper",func:r}],$r.prototype.clone=function(){var e=new $r(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},$r.prototype.reverse=function(){if(this.__filtered__){var e=new $r(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$r.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ko(e),n=t<0,i=r?e.length:0,s=function(e,t,r){var n=-1,i=r.length;for(;++n<i;){var s=r[n],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=wr(t,e+o);break;case"takeRight":e=br(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=s.start,a=s.end,c=a-o,d=n?a:o-1,u=this.__iteratees__,l=u.length,p=0,h=wr(c,this.__takeCount__);if(!r||!n&&i==c&&h==c)return gi(e,this.__actions__);var f=[];e:for(;c--&&p<h;){for(var m=-1,g=e[d+=t];++m<l;){var v=u[m],y=v.iteratee,b=v.type,w=y(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}f[p++]=g}return f},qr.prototype.at=vo,qr.prototype.chain=function(){return mo(this)},qr.prototype.commit=function(){return new Vr(this.value(),this.__chain__)},qr.prototype.next=function(){this.__values__===r&&(this.__values__=ma(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},qr.prototype.plant=function(e){for(var t,n=this;n instanceof zr;){var i=qs(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t},qr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $r){var t=e;return this.__actions__.length&&(t=new $r(this)),(t=t.reverse()).__actions__.push({func:go,args:[ro],thisArg:r}),new Vr(t,this.__chain__)}return this.thru(ro)},qr.prototype.toJSON=qr.prototype.valueOf=qr.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},qr.prototype.first=qr.prototype.head,tt&&(qr.prototype[tt]=function(){return this}),qr}();ft?((ft.exports=mr)._=mr,ht._=mr):pt._=mr}).call(l)}(Tw,Tw.exports);var Ew,Dw=l&&l.__extends||(Ew=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}Ew(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Pw,"__esModule",{value:!0});var Mw=Tw.exports,Iw=["MaxBatchSize","MaxDelay","MinDelay"],xw=function(e){function t(t){var r=e.call(this)||this;return r.fifo=[],r.firstBatch=!0,function(e){if(Iw.forEach((function(t){if(!e.hasOwnProperty(t))throw new Error("Missing required MessageBatcher option: "+t)})),isNaN(e.MaxBatchSize))throw new Error("MessageBatcher MaxBatchSize option must be a number");if(!isFinite(e.MaxBatchSize))throw new Error("MessageBatcher MaxBatchSize option must be a finite number");if(e.MaxBatchSize<1)throw new Error("MessageBatcher MaxBatchSize option cannot be less than 1");if(isNaN(e.MaxDelay))throw new Error("MessageBatcher MaxDelay option must be a number");if(!isFinite(e.MaxDelay))throw new Error("MessageBatcher MaxDelay option must be a finite number");if(e.MaxDelay<0)throw new Error("MessageBatcher MaxDelay option cannot be less than 0");if(isNaN(e.MinDelay))throw new Error("MessageBatcher MinDelay option must be a number");if(!isFinite(e.MinDelay))throw new Error("MessageBatcher MinDelay option must be a finite number");if(e.MinDelay<0)throw new Error("MessageBatcher MinDelay option cannot be less than 0");if(e.MinDelay>e.MaxDelay)throw new Error("MessageBatcher MinDelay option cannot be greater than MaxDelay")}(t),r.options=t,r.releaseBatchDebouncedMax=Mw.debounce(r.releaseBatch.bind(r),r.options.MaxDelay,{maxWait:r.options.MaxDelay}),r.releaseBatchDebouncedMin=Mw.debounce(r.releaseBatch.bind(r),r.options.MinDelay,{maxWait:r.options.MinDelay}),r}return Dw(t,e),t.prototype.Queue=function(e){var t=this;(e=[].concat(e)).forEach((function(e){t.fifo.push(e),t.debounce(t.fifo,t.options.MaxBatchSize)}),this)},t.prototype.debounce=function(e,t){e.length>0&&(e.length>=t?this.firstBatch?(this.firstBatch=!1,this.releaseBatchDebouncedMax.flush()):(this.releaseBatchDebouncedMax.cancel(),this.releaseBatchDebouncedMin(e,t)):(this.releaseBatchDebouncedMin.cancel(),this.releaseBatchDebouncedMax(e,t)))},t.prototype.releaseBatch=function(e,t){var r=this.drainFIFO(e,t);r&&r.length&&(this.emit("batch",r),this.debounce(e,t))},t.prototype.drainFIFO=function(e,t){return e.length>0?e.splice(0,t):e},t}(e.EventEmitter);Pw.MessageBatcher=xw,function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(Pw)}(Rw),function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(Rw)}(Cw);let Ow,Lw=!1;const Aw=()=>{try{return Lw?null:window.localStorage}catch(e){return console.error("Get local storage error",{error:mr(e)}),e instanceof Error&&"SecurityError"===e.name&&(Lw=!0),null}};function jw(e){const t=Aw();if(!t)return null;try{return JSON.parse(t.getItem(e))}catch(e){return null}}const Fw=()=>{if(Ow)return Ow;const e=jw("sdk_clientUniqueId");if(e)return Ow=e,e;const t=r.randomBytes(12).toString("hex");return Ow=t,function(e,t){const r=Aw();if(r)try{r.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}}("sdk_clientUniqueId",t),t},Nw=()=>{const e=jw("sdk_clientUniqueId");return e||(null!=Ow?Ow:Fw())},Bw=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function Ww(e){return!e.response&&(!!e.code&&(!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&(e=>!Bw.has(e&&e.code))(e)))}const qw=["get","head","options"],Uw=qw.concat(["put","delete"]);function zw(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Vw(e){return!!e.config?.method&&(zw(e)&&-1!==Uw.indexOf(e.config.method))}function $w(e){return Ww(e)||Vw(e)}function Hw(e){const t=e?.response?.headers["retry-after"];if(!t)return 0;let r=1e3*(Number(t)||0);return 0===r&&(r=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,r)}const Kw={retries:3,retryCondition:$w,retryDelay:function(e=0,t){return Math.max(0,Hw(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Gw(e,t,r=!1){const n=function(e,t){return{...Kw,...t,...e["axios-retry"]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e["axios-retry"]=n,n}const Qw=(e,t)=>{const r=e.interceptors.request.use((e=>(Gw(e,t,!0),e["axios-retry"]?.validateResponse&&(e.validateStatus=()=>!1),e))),n=e.interceptors.response.use(null,(async r=>{const{config:n}=r;if(!n)return Promise.reject(r);const i=Gw(n,t);return r.response&&i.validateResponse?.(r.response)?r.response:await async function(e,t){const{retries:r,retryCondition:n}=e,i=(e.retryCount||0)<r&&n(t);if("object"==typeof i)try{return!1!==await i}catch(e){return!1}return i}(i,r)?async function(e,t,r,n){t.retryCount+=1;const{retryDelay:i,shouldResetTimeout:s,onRetry:o}=t,a=i(t.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!s&&n.timeout&&t.lastRequestTime){const e=Date.now()-t.lastRequestTime,i=n.timeout-e-a;if(i<=0)return Promise.reject(r);n.timeout=i}return n.transformRequest=[e=>e],await o(t.retryCount,r,n),n.signal?.aborted?Promise.resolve(e(n)):new Promise((t=>{const r=()=>{clearTimeout(i),t(e(n))},i=setTimeout((()=>{t(e(n)),n.signal?.removeEventListener&&n.signal.removeEventListener("abort",r)}),a);n.signal?.addEventListener&&n.signal.addEventListener("abort",r,{once:!0})}))}(e,i,r,n):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(i,r),Promise.reject(r))}));return{requestInterceptorId:r,responseInterceptorId:n}};Qw.isNetworkError=Ww,Qw.isSafeRequestError=function(e){return!!e.config?.method&&(zw(e)&&-1!==qw.indexOf(e.config.method))},Qw.isIdempotentRequestError=Vw,Qw.isNetworkOrIdempotentRequestError=$w,Qw.exponentialDelay=function(e=0,t,r=100){const n=2**e*r,i=Math.max(n,Hw(t));return i+.2*i*Math.random()},Qw.linearDelay=function(e=100){return(t=0,r)=>{const n=t*e;return Math.max(n,Hw(r))}},Qw.isRetryableError=zw;class Jw{constructor(e){this.api=e,Qw(this.api,{retries:2,shouldResetTimeout:!0,retryDelay:e=>1500*e,retryCondition:e=>{var t,r;return/^\/?log\//.test(null!==(r=null===(t=e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:"")||!1}})}batch(e){return a(this,void 0,void 0,(function*(){return this.api.post("/log/batch",e)}))}}class Yw{constructor(e){this.api=e,Qw(this.api,{retries:2,shouldResetTimeout:!0,retryDelay:e=>1500*e,retryCondition:e=>{var t,r;return/^\/?log\//.test(null!==(r=null===(t=e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:"")||!1}})}sendNetworkMetrics(e){return a(this,void 0,void 0,(function*(){return this.api.post("/analytics/network-metrics",e)}))}sendWIDMetrics(e){return a(this,void 0,void 0,(function*(){return this.api.post("/analytics/wid-metrics",Object.assign({},e))}))}}let Zw=class{constructor(){this.api=kg.create({baseURL:"https://moodhood-analytics.livedigital.space/v1",timeout:1e4,withCredentials:!0,paramsSerializer:e=>By.stringify(e),headers:{"x-cl-id":Nw()}}),this.api.defaults.headers.common["Cache-Control"]="no-cache",this.api.defaults.headers.common.Pragma="no-cache",this.api.defaults.headers.common.Expires="0",this.logApi=new Jw(this.api),this.metricsApi=new Yw(this.api)}get log(){return this.logApi}get metrics(){return this.metricsApi}};Zw=i([at(),o("design:paramtypes",[])],Zw);var Xw,e_,t_,r_,n_,i_,s_,o_,a_=Zw;class c_{constructor(e){Xw.add(this),e_.set(this,void 0),t_.set(this,void 0),r_.set(this,void 0),n_.set(this,void 0),i_.set(this,void 0);const{logLevel:t,namespace:r,onLogMessage:n}=e;d(this,e_,r,"f"),d(this,t_,t,"f"),this.onLogMessage=n,d(this,n_,new a_,"f"),d(this,r_,new Cw.MessageBatcher({MaxBatchSize:50,MaxDelay:1e3,MinDelay:500}),"f"),d(this,i_,e.sendAnalytics,"f"),c(this,r_,"f").on("batch",(e=>a(this,void 0,void 0,(function*(){yield this.logToApi(e)})))),this._debug=Yi("LiveDigital").extend("debug").extend(c(this,e_,"f")),this._info=Yi("LiveDigital").extend("info").extend(c(this,e_,"f")),this._warn=Yi("LiveDigital").extend("warn").extend(c(this,e_,"f")),this._error=Yi("LiveDigital").extend("error").extend(c(this,e_,"f")),this._debug.log=console.info.bind(console),this._info.log=console.info.bind(console),this._warn.log=console.warn.bind(console),this._error.log=console.error.bind(console)}debug(e,t){this._debug(e,t),c(this,i_,"f")&&c(this,r_,"f").Queue({level:"debug",message:e,meta:t}),c(this,t_,"f")>=ht&&c(this,Xw,"m",s_).call(this,"debug",e,t)}info(e,t){this._info(e,t),c(this,i_,"f")&&c(this,r_,"f").Queue({level:"info",message:e,meta:t}),c(this,t_,"f")>=pt&&c(this,Xw,"m",s_).call(this,"info",e,t)}warn(e,t){this._warn(e,t),c(this,i_,"f")&&c(this,r_,"f").Queue({level:"warn",message:e,meta:t}),c(this,t_,"f")>=lt&&c(this,Xw,"m",s_).call(this,"warn",e,t)}error(e,t){this._error(e,t),c(this,i_,"f")&&c(this,r_,"f").Queue({level:"error",message:e,meta:t}),c(this,t_,"f")>=ut&&c(this,Xw,"m",s_).call(this,"error",e,t)}logToApi(e){return a(this,void 0,void 0,(function*(){try{yield c(this,n_,"f").log.batch({logs:e.map((e=>c(this,Xw,"m",o_).call(this,Object.assign(Object.assign({},e),{meta:this.prepareRecordMeta(e.meta)})))),clientMeta:this.getClientMeta()})}catch(e){this._debug("Log request was not successful",{error:e})}}))}getClientMeta(){return Object.assign(Object.assign({},gr.meta),{clUId:Nw()})}prepareRecordMeta(e){const t=e||{},{error:r}=t;return Object.assign(Object.assign(Object.assign({},t),{clientTimestamp:(new Date).toISOString(),from_sdk:!0}),r&&"object"==typeof r?{error:mr(r)}:{})}}e_=new WeakMap,t_=new WeakMap,r_=new WeakMap,n_=new WeakMap,i_=new WeakMap,Xw=new WeakSet,s_=function(e,t,...r){"function"==typeof this.onLogMessage&&this.onLogMessage(t,...c(this,Xw,"m",o_).call(this,r),e)},o_=function(e){const t=new WeakMap;return function e(r,n=[]){if(!Qh(r))return r;const i=t.get(r);if(i)return`[Circular *${i.join(".")}]`;t.set(r,n);const s=Array.isArray(r)?[]:{};return Object.entries(r).forEach((([t,r])=>{s[t]=e(r,[...n,t])})),t.delete(r),s}(e)};let d_=class{constructor(e){this.peerTrackFactory=e,this.tracksByConsumerId=new Map}register(e,t){this.tracksByConsumerId.set(e,t)}get(e){return this.tracksByConsumerId.get(e)}delete(e){return this.tracksByConsumerId.delete(e)}reset(){this.tracksByConsumerId.clear()}create(e){const{consumer:t,label:r,muted:n=!1,mediaStreamTrack:i,paused:s,peerEventEmitter:o}=e,a=this.peerTrackFactory({consumer:t,label:r,mediaStreamTrack:i,paused:s,peerEventEmitter:o,muted:n,onClose:()=>{void 0!==a.consumerId&&this.delete(a.consumerId)}});return void 0!==a.consumerId&&this.register(a.consumerId,a),a}};var u_,l_,p_,h_,f_,m_,g_;d_=i([at(),s(0,dt(Jn.PeerTrackFactory)),o("design:paramtypes",[Function])],d_);const v_=()=>{};class y_{constructor(e){u_.set(this,void 0),l_.set(this,void 0),p_.set(this,null),h_.set(this,"speed"),f_.set(this,16e3),m_.set(this,void 0),this.type="asdk",g_.set(this,void 0);const{loggerFactory:t}=e;d(this,l_,t("ASDKTrackProcessor"),"f"),d(this,g_,"function"==typeof e.onError?e.onError:v_,"f"),d(this,u_,new window.atsvb(e.asdkCustomerId),"f"),c(this,u_,"f").config({preset:c(this,h_,"f"),sample_rate:c(this,f_,"f"),sdk_url:"https://effectssdk.ai/sdk/audio/",wasmPaths:{"ort-wasm.wasm":"https://effectssdk.ai/sdk/audio/dev/2.4.2/ort-wasm.wasm","ort-wasm-simd.wasm":"https://effectssdk.ai/sdk/audio/dev/2.4.2/ort-wasm-simd.wasm"}}),c(this,u_,"f").onError((e=>{const{message:t,type:r,cause:i}=e,s=n(e,["message","type","cause"]);1002!==s.code&&1001!==s.code||c(this,g_,"f").call(this,`ASDK performance issue(${s.code}): ${t}`,i),"error"===r&&(c(this,l_,"f").error(t,Object.assign(Object.assign({error:mr(i),cause:i},s),{type:this.type,case:"Denoiser"})),c(this,g_,"f").call(this,`ASDK runtime error: ${t}`,i),d(this,g_,v_,"f")),"warning"===r&&c(this,l_,"f").warn(t,Object.assign(Object.assign({},s),{type:this.type,case:"Denoiser"})),"info"===r&&c(this,l_,"f").info(t,Object.assign(Object.assign({},s),{type:this.type,case:"Denoiser"}))}))}setOnError(e){d(this,g_,e,"f")}init(){return a(this,void 0,void 0,(function*(){yield c(this,u_,"f").preload()}))}get isProcessing(){return!!c(this,m_,"f")}processTrack(e){var t;return a(this,void 0,void 0,(function*(){if(c(this,p_,"f")===e||"ended"===e.readyState)return(null===(t=c(this,u_,"f").getStream())||void 0===t?void 0:t.getAudioTracks()[0])||e;yield this.stopProcessing();try{const t=new Promise(((t,r)=>{c(this,u_,"f").onReady=()=>{try{const r=c(this,u_,"f").getStream(),n=null==r?void 0:r.getAudioTracks()[0];if(!n)return void t(e);d(this,p_,e,"f"),d(this,m_,n,"f"),t(n),c(this,u_,"f").run()}catch(e){r(e)}finally{c(this,u_,"f").onReady=void 0}}}));c(this,u_,"f").useStream(new MediaStream([e]));return yield t}catch(t){throw c(this,l_,"f").error("processTrack()",{error:mr(t),type:this.type,case:"Denoiser",track:e}),c(this,g_,"f").call(this,"ASDK processTrack() error",t),d(this,g_,v_,"f"),new Error("Can not process this track")}}))}stopProcessing(){return a(this,void 0,void 0,(function*(){try{c(this,u_,"f").stop()}catch(e){c(this,l_,"f").error("stopProcessing()",{type:this.type,case:"Denoiser",error:mr(e)})}finally{d(this,p_,null,"f")}}))}}u_=new WeakMap,l_=new WeakMap,p_=new WeakMap,h_=new WeakMap,f_=new WeakMap,m_=new WeakMap,g_=new WeakMap;class b_ extends AudioWorkletNode{constructor(e){super(e.context,"rnnoise",{channelCountMode:"explicit",channelCount:1,channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,outputChannelCount:[1],processorOptions:{module:e.noiseSuppressor.module}}),this.port.onmessage=({data:e})=>{const t=Object.assign(new Event("status"),e);this.dispatchEvent(t)}}update(e){this.port.postMessage(e)}static register(e){return a(this,void 0,void 0,(function*(){const t=PS.get(Jn.Config);yield e.audioWorklet.addModule(`${t.get("staticFilesPath")}/noiseSuppressionWorklet.js`)}))}}var w_,__,S_,k_,C_,R_;class P_{constructor(e){w_.set(this,void 0),__.set(this,void 0),S_.set(this,void 0),k_.set(this,void 0),C_.set(this,void 0),R_.set(this,!0),d(this,w_,e.noiseSuppressor.instance.exports,"f"),d(this,__,e.context,"f"),d(this,S_,new Float32Array(c(this,w_,"f").memory.buffer),"f"),d(this,k_,c(this,w_,"f").newState(),"f"),d(this,C_,c(this,__,"f").createScriptProcessor(),"f"),this.setOnAudioProcess()}get noiseSuppressionScriptProcessorNode(){return c(this,C_,"f")}update(e){e||(d(this,R_,!1,"f"),c(this,w_,"f").deleteState(c(this,k_,"f")));const t=Object.assign(new Event("status"),{vadProb:c(this,w_,"f").getVadProb(c(this,k_,"f"))});c(this,C_,"f").dispatchEvent(t)}setOnAudioProcess(){c(this,C_,"f").addEventListener("audioprocess",(({inputBuffer:e,outputBuffer:t})=>{if(!c(this,R_,"f"))return;c(this,S_,"f").set(e.getChannelData(0),c(this,w_,"f").getInput(c(this,k_,"f"))/4);const r=t.getChannelData(0),n=c(this,w_,"f").pipe(c(this,k_,"f"),r.length)/4;n&&r.set(c(this,S_,"f").subarray(n,n+r.length))}))}}w_=new WeakMap,__=new WeakMap,S_=new WeakMap,k_=new WeakMap,C_=new WeakMap,R_=new WeakMap;var T_,E_,D_,M_,I_,x_,O_,L_,A_,j_,F_,N_,B_,W_,q_,U_,z_,V_,$_,H_,K_,G_,Q_,J_,Y_,Z_,X_,eS,tS,rS,nS,iS,sS,oS,aS,cS,dS,uS,lS,pS,hS,fS;class mS{constructor({context:e,noiseSuppressor:t}){T_.set(this,void 0),E_.set(this,void 0),D_.set(this,void 0),d(this,T_,e,"f"),d(this,E_,t,"f")}createNoiseSuppressionNode(){return a(this,void 0,void 0,(function*(){return/apple/i.test(navigator.vendor)?this.createScriptProcessorNode():this.createAudioWorkletNode()}))}stop(){var e;null===(e=c(this,D_,"f"))||void 0===e||e.update(!1)}createAudioWorkletNode(){return a(this,void 0,void 0,(function*(){return yield b_.register(c(this,T_,"f")),d(this,D_,new b_({context:c(this,T_,"f"),noiseSuppressor:c(this,E_,"f")}),"f"),c(this,D_,"f")}))}createScriptProcessorNode(){return d(this,D_,new P_({context:c(this,T_,"f"),noiseSuppressor:c(this,E_,"f")}),"f"),c(this,D_,"f").noiseSuppressionScriptProcessorNode}}T_=new WeakMap,E_=new WeakMap,D_=new WeakMap;class gS{constructor(e){M_.set(this,void 0),I_.set(this,void 0),x_.set(this,void 0),O_.set(this,void 0),this.type="rnnoise",d(this,M_,e.noiseSuppressor,"f"),d(this,x_,e.loggerFactory("TrackProcessor"),"f")}get isProcessing(){return!!c(this,O_,"f")}processTrack(e){return a(this,void 0,void 0,(function*(){const t=(e=>{const t=window.AudioContext||window.webkitAudioContext||!1;return t?new t(e):null})();if(!t)throw new Error("AudioContext is not available");const r=new MediaStreamAudioDestinationNode(t,{channelCountMode:"explicit",channelCount:1,channelInterpretation:"speakers"});yield b_.register(t);const n=t.createMediaStreamSource(new MediaStream([e])),i=new mS({context:t,noiseSuppressor:c(this,M_,"f")}),s=yield i.createNoiseSuppressionNode();s.connect(r),n.connect(s);const[o]=r.stream.getTracks();return d(this,I_,{audioContext:t,streamDestination:r,noiseSuppressionNode:s,noiseSuppressionProvider:i},"f"),d(this,O_,o,"f"),c(this,x_,"f").info("processTrack()",{case:"Denoiser",type:this.type,track:e.id}),o}))}stopProcessing(){var e;return a(this,void 0,void 0,(function*(){if(this.isProcessing)if(c(this,I_,"f"))try{c(this,I_,"f").noiseSuppressionProvider.stop(),c(this,I_,"f").noiseSuppressionNode.disconnect(),c(this,I_,"f").streamDestination.disconnect(),yield c(this,I_,"f").audioContext.close(),null===(e=c(this,O_,"f"))||void 0===e||e.stop(),d(this,O_,void 0,"f"),c(this,x_,"f").info("stopProcessing()",{success:!0,case:"Denoiser",type:this.type})}catch(e){c(this,x_,"f").error("stopProcessing()",{success:!1,error:mr(e),case:"Denoiser",type:this.type})}else c(this,x_,"f").warn("stopProcessing()",{success:!1,description:"Processing context is not available",case:"Denoiser",type:this.type});else c(this,x_,"f").debug("stopProcessing()",{description:"Track is not processed",case:"Denoiser",type:this.type})}))}}M_=new WeakMap,I_=new WeakMap,x_=new WeakMap,O_=new WeakMap;class vS extends Vf{constructor(){super(...arguments),L_.set(this,!1),A_.set(this,void 0),j_.set(this,void 0)}get isDenoiserRequireActivation(){var e;return!(null===(e=c(this,A_,"f"))||void 0===e?void 0:e.isProcessing)&&c(this,L_,"f")}prepareTrackProcessor(e){this.logger.debug("Setting trackProcessor to AudioTrack",{case:"Denoiser",type:e.type}),d(this,A_,e,"f")}unsetTrackProcessor(){d(this,A_,void 0,"f")}get isEffectsProcessing(){var e;return Boolean(null===(e=c(this,A_,"f"))||void 0===e?void 0:e.isProcessing)}getEncoderConfig(){return this.encoderConfig}getEncodings(){var e;return null!==(e=this.getEncoderConfig().encodings)&&void 0!==e?e:jl}getCodecOptions(){var e,t;return{opusFec:null===(e=this.getEncoderConfig().enableFec)||void 0===e||e,opusDtx:null===(t=this.getEncoderConfig().enableDtx)||void 0===t||t}}getPreferredCodec(){const{preferredCodec:e}=this.getEncoderConfig();return e||"opus"}enableNoiseSuppression(){var e,t;return a(this,void 0,void 0,(function*(){if(d(this,L_,!0,"f"),c(this,A_,"f"))try{const r=yield null===(e=c(this,A_,"f"))||void 0===e?void 0:e.processTrack(this.mediaStreamTrack);d(this,j_,this.mediaStreamTrack,"f"),yield this.replaceTrack(r),this.logger.debug("Denoiser activated",{case:"Denoiser",type:(null===(t=c(this,A_,"f"))||void 0===t?void 0:t.type)||"none"})}catch(e){throw this.logger.warn("enableNoiseSuppression()",{description:"Can not enable noise suppression",track:this.logCtx,error:mr(e)}),new Error("Can not enable noise suppression")}else this.logger.warn("enableNoiseSuppression()",{description:"Track suppressor is not defined"})}))}disableNoiseSuppression(){var e,t,r;return a(this,void 0,void 0,(function*(){d(this,L_,!1,"f");try{if(!(null===(e=c(this,A_,"f"))||void 0===e?void 0:e.isProcessing))return void this.logger.debug("stopProcessing()",{description:"Track is not processed"});if(!c(this,j_,"f"))return void this.logger.warn("disableNoiseSuppression()",{description:"Original track missing"});this.isPublished&&(yield this.replaceTrack(c(this,j_,"f"))),yield null===(t=c(this,A_,"f"))||void 0===t?void 0:t.stopProcessing(),this.logger.debug("Denoiser deactivated",{case:"Denoiser",type:(null===(r=c(this,A_,"f"))||void 0===r?void 0:r.type)||"none"})}catch(e){throw this.logger.warn("disableNoiseSuppression()",{description:"Can not disable noise suppression",track:this.logCtx,error:mr(e)}),new Error("Can not disable noise suppression")}}))}publish(){return a(this,void 0,void 0,(function*(){yield this.produce({encodings:this.getEncodings(),preferredCodec:this.getPreferredCodec(),codecOptions:this.getCodecOptions()}),this.internalEventEmitter.emit(tn.trackProduced,this)}))}pause(){return a(this,void 0,void 0,(function*(){yield this.mute()}))}}L_=new WeakMap,A_=new WeakMap,j_=new WeakMap;class yS{constructor({track:e,statsHandler:t}){F_.set(this,void 0),N_.set(this,void 0),this.handleWebRTCStats(e,t)}get videoWebRTCStats(){return c(this,F_,"f")}get audioWebRTCStats(){return c(this,N_,"f")}handleWebRTCStats(e,t){e.addEventListener("ended",(()=>{t.removeInboundVideoHandler(e.id),t.removeInboundAudioHandler(e.id)}),{once:!0}),"video"!==e.kind?t.addInboundAudioHandler(e.id,this.setAudioWebRTCStats.bind(this)):t.addInboundVideoHandler(e.id,this.setVideoWebRTCStats.bind(this))}setVideoWebRTCStats(e){d(this,F_,e,"f")}setAudioWebRTCStats(e){d(this,N_,e,"f")}}F_=new WeakMap,N_=new WeakMap;class bS{constructor(e){this.label=Zn.Unknown,B_.set(this,void 0),W_.set(this,void 0),q_.set(this,void 0),U_.set(this,void 0),z_.set(this,void 0),V_.set(this,void 0),$_.set(this,void 0),H_.set(this,void 0),K_.set(this,void 0),G_.set(this,void 0),Q_.set(this,!1),J_.set(this,void 0),Y_.set(this,!1),Z_.set(this,new hf),X_.set(this,!1),eS.set(this,0),tS.set(this,void 0),this.observer=new Rt,d(this,K_,e.mediaStreamTrack,"f"),this.label=e.label,this.consumer=e.consumer,d(this,z_,e.peerConsumerFactory,"f"),d(this,$_,e.loggerFactory("PeerTrack"),"f"),d(this,H_,e.peerEventEmitter,"f"),d(this,X_,e.muted,"f"),d(this,G_,e.paused,"f"),d(this,B_,e.network,"f"),d(this,W_,e.socket,"f"),d(this,q_,e.media,"f"),d(this,V_,e.callState,"f"),d(this,U_,e.onClose,"f"),d(this,tS,new yS({track:e.mediaStreamTrack,statsHandler:e.statsHandler}),"f")}get videoWebRTCStats(){return c(this,tS,"f").videoWebRTCStats}get audioWebRTCStats(){return c(this,tS,"f").audioWebRTCStats}get logCtx(){var e,t;return{id:c(this,K_,"f").id,label:this.label,consumerId:null===(e=this.consumer)||void 0===e?void 0:e.id,producerId:null===(t=this.consumer)||void 0===t?void 0:t.producerId,muted:c(this,X_,"f"),paused:c(this,G_,"f"),closed:c(this,Y_,"f")}}get volume(){return c(this,eS,"f")}get isRemote(){return!!this.consumer}get mediaStreamTrack(){return c(this,K_,"f")}get kind(){return this.mediaStreamTrack.kind}get isPaused(){return c(this,G_,"f")}get isMuted(){return c(this,X_,"f")}get consumerId(){var e;return null===(e=this.consumer)||void 0===e?void 0:e.id}get currentSpatialLayer(){var e;return(null===(e=this.consumer)||void 0===e?void 0:e.currentSpatialLayer)||0}close(){return a(this,void 0,void 0,(function*(){c(this,H_,"f").safeEmit(cn,this),d(this,Y_,!0,"f"),c(this,U_,"f").call(this),this.consumer&&(yield this.closeConsumer(),this.clearCheckStateTimeout())}))}mute(){return a(this,void 0,void 0,(function*(){yield c(this,Z_,"f").push((()=>a(this,void 0,void 0,(function*(){c(this,$_,"f").debug("mute()",{track:this.logCtx}),yield this.pauseConsumer(),d(this,X_,!0,"f")}))))}))}unmute(){return a(this,void 0,void 0,(function*(){yield c(this,Z_,"f").push((()=>a(this,void 0,void 0,(function*(){c(this,$_,"f").debug("unmute()",{track:this.logCtx}),yield this.resumeConsumer(),d(this,X_,!1,"f")}))))}))}pause(e=!0){return a(this,void 0,void 0,(function*(){yield c(this,Z_,"f").push((()=>a(this,void 0,void 0,(function*(){if(!this.consumer||this.isMuted)return d(this,G_,!0,"f"),c(this,H_,"f").safeEmit(dn,this),void c(this,$_,"f").debug("pause()",{track:this.logCtx});yield this.pauseConsumer(e),d(this,G_,!0,"f"),c(this,H_,"f").safeEmit(dn,this)}))))}))}resume(e=!0){return a(this,void 0,void 0,(function*(){yield c(this,Z_,"f").push((()=>a(this,void 0,void 0,(function*(){if(!this.consumer||this.isMuted)return d(this,G_,!1,"f"),c(this,H_,"f").safeEmit(un,this),void c(this,$_,"f").debug("resume()",{track:this.logCtx});yield this.resumeConsumer(e),d(this,G_,!1,"f"),c(this,H_,"f").safeEmit(un,this)}))))}))}resumeConsumer(e=!0){return a(this,void 0,void 0,(function*(){if(this.consumer)try{this.consumer.resume(),e&&(yield c(this,B_,"f").resumeRemoteConsumer(this.consumer.id)),this.checkConsumerState().catch((e=>{c(this,$_,"f").warn("Failed to checkConsumerState()",{track:this.logCtx,error:mr(e)})})),c(this,$_,"f").debug("resumeConsumer()",{track:this.logCtx})}catch(e){c(this,$_,"f").warn("resumeConsumer()",{error:e})}}))}pauseConsumer(e=!0){return a(this,void 0,void 0,(function*(){if(this.consumer)try{this.clearCheckStateTimeout(),e&&(yield c(this,B_,"f").pauseRemoteConsumer(this.consumer.id)),this.consumer.pause(),d(this,Q_,!1,"f"),c(this,$_,"f").debug("pauseConsumer()",{track:this.logCtx})}catch(e){c(this,$_,"f").warn("pauseConsumer()",{error:e})}}))}requestVideoPreferredLayers({spatialLayer:e,temporalLayer:t}){return a(this,void 0,void 0,(function*(){if(this.consumer)try{if(this.consumer.isAudio)return void c(this,$_,"f").warn("Only video consumers support layers",{case:"requestVideoPreferredLayers"});if(e===this.consumer.currentSpatialLayer)return;if(e>this.consumer.spatialLayers)return void c(this,$_,"f").warn("Invalid spatial layer",{spatialLayer:e,consumerSpatialLayers:this.consumer.spatialLayers,case:"requestVideoPreferredLayers"});if(e>this.consumer.currentMaxSpatialLayer)return void(yield this.requestMaxSpatialLayer(this.consumer.id,e));yield c(this,W_,"f").request(Dn,{consumerId:this.consumer.id,spatialLayer:e,temporalLayer:t}),c(this,$_,"f").debug("requestVideoPreferredLayers()",{track:this.logCtx,consumer:this.consumer,spatialLayer:e,temporalLayer:t})}catch(e){throw c(this,$_,"f").error("Failed to request preferred layers",{case:"requestVideoPreferredLayers",track:{id:this.mediaStreamTrack.id,kind:this.mediaStreamTrack.kind,label:this.mediaStreamTrack.label},consumerId:this.consumer.id,spatialLayers:this.consumer.spatialLayers,temporalLayers:this.consumer.temporalLayers,error:e}),new Error("Error request preferred layers")}}))}requestKeyFrame(){return a(this,void 0,void 0,(function*(){if(this.consumerId){c(this,$_,"f").debug("requestKeyFrame()",{track:this.logCtx});try{yield c(this,W_,"f").request(Mn,{consumerId:this.consumerId})}catch(e){throw c(this,$_,"f").error("requestKeyFrame()",{error:e,track:this.logCtx,consumerId:this.consumerId}),new Error("Failed to request key frame")}}}))}getVideoAvailableLayers(){if(this.consumer){if(!this.consumer.isAudio)return this.consumer.availableSpatialLayers;c(this,$_,"f").warn("Only video consumers support layers",{case:"getVideoAvailableLayers"})}}getInfo(){var e;return a(this,void 0,void 0,(function*(){const{width:t,height:r,frameRate:n,aspectRatio:i}=c(this,K_,"f").getSettings();return{trackId:c(this,K_,"f").id,readyState:c(this,K_,"f").readyState,isRemote:this.isRemote,kind:this.kind,label:this.label,width:t,height:r,frameRate:n,aspectRatio:i,paused:c(this,G_,"f"),trackInboundStats:yield null===(e=this.consumer)||void 0===e?void 0:e.getStats(),trackOutboundStats:yield this.getOutboundStats()}}))}getOutboundStats(){return a(this,void 0,void 0,(function*(){if(this.isRemote)return;const e=c(this,q_,"f").getAllTracks().find((e=>e.getLabel()===this.label));return e?e.getStats():void 0}))}requestMaxSpatialLayer(e,t){return a(this,void 0,void 0,(function*(){try{if(!this.consumer)return;if(this.consumer.isAudio||0===this.consumer.spatialLayers||this.consumer.currentMaxSpatialLayer===t||t<this.consumer.currentMaxSpatialLayer)return void c(this,$_,"f").warn("Can`t request this spatial layer",{case:"requestMaxSpatialLayer",consumerId:e,spatialLayer:t});this.consumer.setRequestedSpatialLayer(t),yield c(this,W_,"f").request(kn,{producerId:this.consumer.producerId,spatialLayer:t}),c(this,$_,"f").debug("requestMaxSpatialLayer()",{consumerId:e,spatialLayer:t})}catch(r){c(this,$_,"f").warn("Failed to request max spatial layer",{case:"requestMaxSpatialLayer",consumerId:e,spatialLayer:t,error:r})}}))}checkConsumerState(){return a(this,void 0,void 0,(function*(){try{if(c(this,Y_,"f")||"audio"===this.kind)return;c(this,$_,"f").debug("checkConsumerState()",{track:this.logCtx});if((yield this.isInboundRTPStreamActive())||c(this,Y_,"f"))return;yield this.requestKeyFrame();if((yield this.isInboundRTPStreamActive())||c(this,Y_,"f"))return;if(c(this,Q_,"f"))return c(this,H_,"f").emit(ln,this),void c(this,$_,"f").debug("trackFail()",{track:this.logCtx});yield this.restartConsumer()}catch(e){c(this,$_,"f").warn("checkConsumerState()",{track:this,error:e})}}))}setVolume(e){c(this,eS,"f")!==e&&(d(this,eS,e,"f"),this.observer.safeEmit(en,{value:e}))}closeConsumer(){return a(this,void 0,void 0,(function*(){try{if(!this.consumer)return;this.consumer.close(),yield c(this,B_,"f").closeRemoteConsumer(this.consumer.id)}catch(e){c(this,$_,"f").debug("closeConsumer()",{track:this,error:e})}}))}restartConsumer(){return a(this,void 0,void 0,(function*(){try{if(!this.consumer||c(this,Y_,"f"))return;c(this,$_,"f").debug("restartConsumer()",{track:this.logCtx}),c(this,H_,"f").emit(cn,this),d(this,G_,!0,"f"),yield this.closeConsumer();const{consumer:e}=yield c(this,B_,"f").createConsumer({producerId:this.consumer.producerId,rtpCapabilities:c(this,q_,"f").mediasoupDevice.rtpCapabilities,producerPeerId:this.consumer.appData.producerData.peerId,appId:c(this,V_,"f").appId,channelId:c(this,V_,"f").channelId});d(this,Q_,!0,"f"),this.consumer=c(this,z_,"f").call(this,{consumer:e}),d(this,K_,e.track,"f"),yield this.resume(),c(this,H_,"f").emit(an,this)}catch(e){d(this,Q_,!0,"f"),c(this,$_,"f").warn("restartConsumer()",{track:this,error:e})}}))}isInboundRTPStreamActive(){return a(this,void 0,void 0,(function*(){if(!this.consumer||c(this,Y_,"f"))return!1;const{framesDecoded:e}=yield this.consumer.getInboundRTPStreamStats();return new Promise((t=>{d(this,J_,setTimeout((()=>a(this,void 0,void 0,(function*(){try{if(!this.consumer)return void t(!1);const{framesDecoded:r}=yield this.consumer.getInboundRTPStreamStats();if(e===r&&!this.isPaused)return void t(!1);t(!0)}catch(e){c(this,$_,"f").debug("isInboundRTPStreamActive()",{error:e,track:this.logCtx}),t(!1)}}))),4500),"f")}))}))}clearCheckStateTimeout(){c(this,J_,"f")||clearTimeout(c(this,J_,"f"))}}B_=new WeakMap,W_=new WeakMap,q_=new WeakMap,U_=new WeakMap,z_=new WeakMap,V_=new WeakMap,$_=new WeakMap,H_=new WeakMap,K_=new WeakMap,G_=new WeakMap,Q_=new WeakMap,J_=new WeakMap,Y_=new WeakMap,Z_=new WeakMap,X_=new WeakMap,eS=new WeakMap,tS=new WeakMap;class wS{constructor(e){const{id:t,kind:r,peerId:n,label:i,paused:s}=e;this.id=t,this.kind=r,this.peerId=n,this.label=i,this.paused=s,this.encodings=e.encodings,this.trackTransformParams=e.trackTransformParams,this.maxSpatialLayer=e.maxSpatialLayer}}class _S{constructor({id:e,channelIds:t,groups:r,producePermissions:n,appId:i,loginDate:s,producers:o=[],appData:a,uid:c,role:u,loggerFactory:l,myPeer:p,callState:h,peers:f,remotePeerTracks:m,media:g,network:v,socket:y,peerConsumerFactory:b}){this.producers=new Map,this.tracks=new Map,rS.set(this,void 0),nS.set(this,void 0),iS.set(this,void 0),sS.set(this,void 0),oS.set(this,void 0),aS.set(this,void 0),cS.set(this,void 0),dS.set(this,void 0),uS.set(this,void 0),this._observer=new Rt,this.id=e,this.channelIds=t,this.groups=r,this.producePermissions=n,this.appId=i,this.loginDate=s,this.applicationData=a||{},this.uid=c,this.role=u,d(this,aS,p,"f"),d(this,cS,h,"f"),d(this,rS,f,"f"),d(this,nS,m,"f"),d(this,sS,y,"f"),d(this,dS,b,"f"),d(this,iS,v,"f"),d(this,oS,g,"f"),d(this,uS,l("Peer"),"f"),o.forEach(this.handleNewProducer.bind(this)),this.handlePeerEvents()}get appData(){return this.applicationData}get observer(){return this._observer}get isMe(){return this.id===c(this,aS,"f").id}get isModerator(){return this.groups.includes("moderator")}get isUser(){return this.groups.includes("user")}get publishedMedia(){return Array.from(this.producers.values()).map((e=>({producerId:e.id,kind:e.kind,label:e.label,paused:e.paused})))}get shortData(){return{id:this.id,producers:Array.from(this.producers.values()).map((e=>({id:e.id,paused:e.paused}))),appData:this.appData}}hasPermission(e){return this.producePermissions.includes(e)}hasGroup(e){return this.groups.includes(e)}subscribe({producerId:e,muted:t=!1}){return a(this,void 0,void 0,(function*(){try{const r=this.producers.get(e);if(!r)return void c(this,uS,"f").warn("subscribe()",{message:"Peer does not have a producer",peer:cf(this),producerId:e});if(this.getAllConsumers().find((t=>t.producerId===e)))return void c(this,uS,"f").debug("subscribe()",{message:"Already subscribed to producer",peer:cf(this),producerId:e});const{consumer:n,isProducerPaused:i}=yield c(this,iS,"f").createConsumer({producerId:r.id,rtpCapabilities:c(this,oS,"f").mediasoupDevice.rtpCapabilities,producerPeerId:this.id,appId:c(this,cS,"f").appId,channelId:c(this,cS,"f").channelId});if(!this.producePermissions.includes(r.label)&&Object.values(Zn).includes(r.label))return void c(this,uS,"f").debug("subscribe()",{message:"Producer is not allowed anymore",peer:cf(this),producerId:e});const s=c(this,nS,"f").create({mediaStreamTrack:n.track,label:r.label,consumer:c(this,dS,"f").call(this,{consumer:n}),muted:t,paused:i,peerEventEmitter:this.observer});t||(yield s.unmute()),this.tracks.set(s.label,s),c(this,uS,"f").debug(`Subscribed for ${r.kind}`,{peer:cf(this)})}catch(t){throw c(this,uS,"f").error("subscribe()",{producerId:e,error:t,peer:cf(this)}),new Error("Error subscribe media")}}))}unsubscribe(e){return a(this,void 0,void 0,(function*(){try{const t=this.getConsumerByProducerId(e);if(!t)return;const r=this.getTrackByConsumerId(t.id);if(!r)return;yield r.close(),this.tracks.delete(r.label),c(this,uS,"f").debug(`Unsubscribed consumer ${t.kind}`,{peer:cf(this)})}catch(t){throw c(this,uS,"f").error("unsubscribe()",{producerId:e,error:t}),new Error("Error unsubscribe media")}}))}setProducePermissions(e){return a(this,void 0,void 0,(function*(){this.throwIfIamNotModerator(),yield c(this,sS,"f").request(Ir,{peerId:this.id,producePermissions:e}),c(this,uS,"f").debug("Produce permissions changed",{peerId:this.id,producePermissions:e})}))}addProducePermission(e){return a(this,void 0,void 0,(function*(){this.throwIfIamNotModerator(),yield c(this,sS,"f").request(xr,{peerId:this.id,label:e}),c(this,uS,"f").debug("Add produce permission requested",{peerId:this.id,label:e})}))}removeProducePermission(e){return a(this,void 0,void 0,(function*(){this.throwIfIamNotModerator(),yield c(this,sS,"f").request(Or,{peerId:this.id,label:e}),c(this,uS,"f").debug("Remove produce permission requested",{peerId:this.id,label:e})}))}getInfo(){return a(this,void 0,void 0,(function*(){try{return{id:this.id,appData:this.appData,role:this.role,channelIds:this.channelIds,appId:this.appId,uid:this.uid,loginDate:this.loginDate,tracks:yield Promise.all(Array.from(this.tracks.values()).map((e=>e.getInfo())))}}catch(e){throw c(this,uS,"f").error("getInfo()",{peer:cf(this),error:e}),new Error("Error get info")}}))}getProducers(){return Array.from(this.producers.values())}getConsumersState(){return this.getAllConsumers().map((e=>({id:e.id,paused:e.paused,producerId:e.producerId})))}handleNewProducer(e){if(this.producers.get(e.id))return;const t=new wS(e);this.producers.set(t.id,t),c(this,uS,"f").debug("Peer published media:",{peer:cf(this),producer:t}),this.observer.safeEmit(rn,{producerId:t.id,kind:t.kind,label:t.label,paused:t.paused})}handlePeerEvents(){this.observer.on(mn,this.handleNewProducer.bind(this)),this.observer.on(gn,(e=>a(this,void 0,void 0,(function*(){this.producers.delete(e.id),c(this,uS,"f").debug("Peer unpublished media:",{peer:cf(this),producer:e}),this.observer.safeEmit(nn,{producerId:e.id,kind:e.kind,label:e.label,paused:e.paused});const t=this.tracks.get(e.label);if(t)try{yield t.close()}catch(e){c(this,uS,"f").warn("Failed to close peer track due to producer closed",{label:t.label,peerId:this.id})}})))),this.observer.on(Pn,(e=>a(this,void 0,void 0,(function*(){const t=this.getTrackByConsumerId(e);t&&(yield t.close(),this.tracks.delete(t.label),c(this,uS,"f").debug("Peer video track was ended:",{peer:cf(this),track:t.logCtx}))})))),this.observer.on(Tn,(e=>a(this,void 0,void 0,(function*(){const t=this.getTrackByConsumerId(e);t&&(yield t.pause(!1))})))),this.observer.on(En,(e=>a(this,void 0,void 0,(function*(){const t=this.getTrackByConsumerId(e);t&&(yield t.resume(!1))})))),this.observer.on(Dn,(e=>{const t=this.getConsumerById(e.consumerId);(null==t?void 0:t.isVideo)&&(t.setCurrentTemporalLayer(e.temporalLayer),t.setCurrentSpatialLayer(e.spatialLayer),e.spatialLayer===t.requestedSpatialLayer&&t.setRequestedSpatialLayer(void 0),c(this,uS,"f").debug("consumerChangePreferredLayers()",Object.assign({},e)))})),this.observer.on(Sn,(e=>a(this,void 0,void 0,(function*(){const{producerId:t,spatialLayer:r}=e,n=this.getConsumerByProducerId(t);n?(n.setCurrentMaxSpatialLayer(r),c(this,uS,"f").debug("producerSetMaxSpatialLayer()",{producerId:t,consumerId:n.id,spatialLayer:r}),n.requestedSpatialLayer===r?(yield c(this,sS,"f").request(Dn,{consumerId:n.id,spatialLayer:r}),c(this,uS,"f").debug("requestVideoPreferredLayers()",{producerId:t,consumerId:n.id,spatialLayer:r})):c(this,uS,"f").debug("producerSetMaxSpatialLayer()",{message:"No need to request new preferred layer",currentMaxSpatialLayer:r,requestedMaxSpatialLayer:n.requestedSpatialLayer})):c(this,uS,"f").debug("producerSetMaxSpatialLayer()",{message:"Consumer for producer not created, ignore MaxSpatialLayer change"})})))),this.observer.on(_r,(e=>{try{Un(e),this.setAppData(e),this.observer.emit(pn,e),c(this,uS,"f").debug("updatePeerAppData",{peer:cf(this),appData:e})}catch(t){c(this,uS,"f").error("updatePeerAppData",{peer:cf(this),appData:e,error:t})}}))}reset(){return a(this,void 0,void 0,(function*(){this.producers.clear(),yield Promise.all(Array.from(this.tracks.values()).map((e=>e.close()))),this.tracks.clear();[mn,gn,Pn,Tn,En,Dn,Sn,_r].forEach((e=>this.observer.removeAllListeners(e)))}))}getActiveTracksCount(){return Array.from(this.tracks.values()).map((e=>e.consumer)).filter((e=>!(null==e?void 0:e.paused))).length}getActivePublishersCount(){return Array.from(this.producers.values()).filter((e=>!e.paused)).length}handleProducePermissionsChange(e){this.producePermissions=e,Object.values(Zn).filter((e=>!this.producePermissions.includes(e))).forEach((e=>{const t=this.tracks.get(e);t&&(this.tracks.delete(t.label),t.close())})),this.observer.safeEmit(hn,{labels:this.producePermissions})}handleGroupsChange(e){this.groups=e,this.observer.safeEmit(fn,{groups:e})}getAllConsumers(){return Array.from(this.tracks.values()).map((e=>e.consumer)).filter((e=>!!e))}getConsumerByProducerId(e){return this.getAllConsumers().find((t=>t.producerId===e))}getConsumerById(e){return this.getAllConsumers().find((t=>t.id===e))}getTrackByConsumerId(e){return Array.from(this.tracks.values()).find((t=>t.consumerId===e))}setAppData(e){this.applicationData=e}throwIfIamNotModerator(){if(!c(this,rS,"f").isModerator(c(this,aS,"f").id))throw new Error("Not enough access")}}rS=new WeakMap,nS=new WeakMap,iS=new WeakMap,sS=new WeakMap,oS=new WeakMap,aS=new WeakMap,cS=new WeakMap,dS=new WeakMap,uS=new WeakMap;class SS{constructor(e){this.spatialLayers=0,this.temporalLayers=0,this.currentSpatialLayer=0,this.currentTemporalLayer=0,this.availableSpatialLayers=[],lS.set(this,void 0);const{consumer:t,loggerFactory:r}=e;this.id=t.id,this.kind=t.kind,this.producerId=t.producerId,this.appData=t.appData,this.consumer=t,d(this,lS,r("PeerConsumer"),"f"),this.currentMaxSpatialLayer=this.appData.producerData.maxSpatialLayer,this.parseScalabilityMode(),this.initAvailableSpatialLayers(),this.setCurrentSpatialLayerParams()}get paused(){return this.consumer.paused}pause(){return this.consumer.pause()}resume(){return this.consumer.resume()}close(){return this.consumer.close()}get isVideo(){return"video"===this.kind}get isAudio(){return"audio"===this.kind}parseScalabilityMode(){if(this.consumer.rtpParameters.encodings){const{scalabilityMode:e}=this.consumer.rtpParameters.encodings[0],{spatialLayers:t,temporalLayers:r}=ri.parseScalabilityMode(e);this.spatialLayers=t,this.temporalLayers=r,c(this,lS,"f").debug("parseScalabilityMode()",{scalabilityMode:e,spatialLayers:t,temporalLayers:r})}}initAvailableSpatialLayers(){const{encodings:e,trackTransformParams:t}=this.appData.producerData;if(!e)return;if(this.availableSpatialLayers=e.map((e=>this.tryPrepareSpatialLayerParams(e))),!t||this.availableSpatialLayers.length>1||this.spatialLayers<2)return void c(this,lS,"f").debug("Using available spatial layers",{case:"initAvailableSpatialLayers"});c(this,lS,"f").debug("Pre-generating encodings with spatial layer params",{case:"initAvailableSpatialLayers"});const r=[],n=e[e.length-1];for(let e=this.spatialLayers-1;e>=0;e-=1)r.push(this.tryPrepareSpatialLayerParams(Object.assign(Object.assign({},n),{scaleResolutionDownBy:Math.pow(2,e)})));this.availableSpatialLayers=r}setCurrentSpatialLayerParams(){const{encodings:e}=this.appData.producerData;e&&e[this.currentSpatialLayer]&&(this.currentSpatialLayerParams=this.tryPrepareSpatialLayerParams(e[this.currentSpatialLayer]),c(this,lS,"f").debug("setCurrentSpatialLayerParams()",{currentSpatialLayerParams:this.currentSpatialLayerParams}))}tryPrepareSpatialLayerParams(e){const{trackTransformParams:t}=this.appData.producerData;if(!t)return e;const{width:r,height:n}=t,i=e.scaleResolutionDownBy||1;return r&&n?Object.assign({width:r/i,height:n/i},e):e}setCurrentSpatialLayer(e){if(!this.isVideo)throw new Error("setCurrentSpatialLayer applies to video consumers only");this.currentSpatialLayer=e,c(this,lS,"f").debug("setCurrentSpatialLayer()",{currentSpatialLayer:e}),this.setCurrentSpatialLayerParams()}setCurrentTemporalLayer(e){if(!this.isVideo)throw new Error("setCurrentTemporalLayer applies to video consumers only");this.currentTemporalLayer=e,c(this,lS,"f").debug("setCurrentTemporalLayer()",{currentTemporalLayer:e})}setRequestedSpatialLayer(e){this.requestedSpatialLayer=e}setCurrentMaxSpatialLayer(e){this.currentMaxSpatialLayer=e}getStats(){var e,t;return a(this,void 0,void 0,(function*(){try{return{consumerId:this.consumer.id,codec:this.consumer.rtpParameters.codecs.find((e=>bf(e))),dtlsState:null===(t=null===(e=this.consumer.rtpReceiver)||void 0===e?void 0:e.transport)||void 0===t?void 0:t.state,availableSpatialLayers:this.availableSpatialLayers,currentSpatialLayerParams:this.currentSpatialLayerParams,requestedSpatialLayer:this.requestedSpatialLayer,rtcStats:yield this.getInboundRTPStreamStats()}}catch(e){return void c(this,lS,"f").debug("getStats()",{error:e})}}))}getInboundRTPStreamStats(){return a(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const r=(n=0)=>a(this,void 0,void 0,(function*(){try{const i=yield this.consumer.getStats(),s=Array.from(i.values()).find((e=>"inbound-rtp"===e.type));if(!s&&n<5)return void setTimeout((()=>r(n+1)),150);n>=5&&!s&&t(new Error("InboundRTPStreamStat not exist")),e(s)}catch(e){t(new Error("Can not get RTCStatsReport")),c(this,lS,"f").debug("getInboundRTPStreamStats()",{error:e})}}));r()}))}))}}lS=new WeakMap;const kS=["frozen-video-track","network-media-sync-failure","encoder-cpu-throttling","decoder-cpu-throttling","missing-video-stream-data","missing-audio-stream-data"];let CS=class{constructor(e,t,r,n,i,s){this.analyticsApiClient=e,this.peers=t,this.socket=r,this.myPeer=n,this.transportsStatsProvider=s,pS.set(this,void 0),hS.set(this,void 0),fS.set(this,void 0),d(this,fS,i("IntegrationsService"),"f"),d(this,hS,new Cw.MessageBatcher({MaxBatchSize:50,MaxDelay:6e4,MinDelay:3e4}),"f"),c(this,hS,"f").on("batch",(e=>{this.analyticsApiClient.metrics.sendWIDMetrics({reasons:e,clientMeta:this.getClientMeta()})})),d(this,pS,new Cw.MessageBatcher({MaxBatchSize:100,MaxDelay:6e4,MinDelay:3e4}),"f"),c(this,pS,"f").on("batch",(e=>{this.analyticsApiClient.metrics.sendNetworkMetrics({metrics:e,clientMeta:this.getClientMeta()})}))}handleIssues(e){e.map((e=>c(this,fS,"f").info("WebRTCIssue",e)));const t=e.filter((e=>kS.includes(e.reason)));0!==t.length&&t.map((e=>c(this,hS,"f").Queue(e.reason)))}handleNetworkScores(e){var t,r,n,i,s;const{inbound:o,outbound:a,statsSamples:{inboundStatsSample:d,outboundStatsSample:u}}=e,l=this.getNodeActiveStreamsStat(),p=null===(t=l.node)||void 0===t?void 0:t.replace(/https:\/\/app-\d+-/,""),h=this.transportsStatsProvider.getStats();void 0!==o&&d&&c(this,pS,"f").Queue({jitter:Math.round(1e3*d.avgJitter),packetLoss:d.packetsLoss,rtt:d.rtt,mos:Math.round(10*o)/10,streams:l.inboundActiveStreams,direction:"inbound",node:p,bitrate:null!==(n=null===(r=null==h?void 0:h.inbound)||void 0===r?void 0:r.bitrate)&&void 0!==n?n:0,timestamp:(new Date).toISOString()}),void 0!==a&&u&&c(this,pS,"f").Queue({jitter:Math.round(1e3*u.avgJitter),packetLoss:u.packetsLoss,rtt:u.rtt,mos:Math.round(10*a)/10,streams:l.outboundActiveStreams,direction:"outbound",node:p,bitrate:null!==(s=null===(i=null==h?void 0:h.outbound)||void 0===i?void 0:i.bitrate)&&void 0!==s?s:0,timestamp:(new Date).toISOString()})}getNodeActiveStreamsStat(){const e=this.socket.getServerUrl(),t=this.peers.hosts().filter((e=>{var t;return e.id!==(null===(t=this.myPeer)||void 0===t?void 0:t.id)})).reduce(((e,t)=>e+t.getActiveTracksCount()),0),r=this.myPeer.get();return{node:e,inboundActiveStreams:t,outboundActiveStreams:(null==r?void 0:r.getActivePublishersCount())||0}}getClientMeta(){return Object.assign(Object.assign({},gr.meta),{clientUniqueId:Nw()})}};pS=new WeakMap,hS=new WeakMap,fS=new WeakMap,CS=i([at(),s(0,dt(Jn.AnalyticsApiClient)),s(1,dt(Jn.Peers)),s(2,dt(Jn.SocketIO)),s(3,dt(Jn.MyPeer)),s(4,dt(Jn.LoggerFactory)),s(5,dt(Jn.TransportsStatsProvider)),o("design:paramtypes",[a_,Object,$h,mp,Function,ib])],CS);var RS=CS;const PS=new rt({autoBindInjectable:!0});var TS;PS.bind(Jn.CallState).to(ti).inSingletonScope(),PS.bind(Jn.MyPeer).to(mp).inSingletonScope(),PS.bind(Jn.LoggerFactory).toFactory((e=>{const t=e.container.get(Jn.Config),r=t.get("logLevel"),n=t.get("sendAnalytics"),i=t.get("onLogMessage");return e=>new c_({logLevel:r,namespace:e,onLogMessage:i,sendAnalytics:n})})),PS.bind(Jn.System).to(Jy).inSingletonScope(),PS.bind(Jn.ProcessorsCache).to(Vl).inSingletonScope(),PS.bind(Jn.IntegrationsService).to(Kl).inSingletonScope(),PS.bind(Jn.MediaStreamTrackManager).to(pp).inSingletonScope(),PS.bind(Jn.Media).to(fp).inSingletonScope(),PS.bind(Jn.SocketIO).to($h).inSingletonScope(),PS.bind(Jn.LoadBalancerApiClient).to(Uy).inSingletonScope(),PS.bind(Jn.Network).to(Kh).inSingletonScope(),PS.bind(Jn.RemotePeerTracks).to(d_).inSingletonScope(),PS.bind(Jn.Peers).to(Gh).inSingletonScope(),PS.bind(Jn.MediaSoupEventHandler).to(Kf).inSingletonScope(),PS.bind(Jn.ChannelEventHandler).to(uf).inSingletonScope(),PS.bind(Jn.ChannelAudioObserverEventHandler).to(mb).inSingletonScope(),PS.bind(Jn.EventsQueue).to(nf).inSingletonScope(),PS.bind(Jn.ChannelStateSynchronizer).to(af).inSingletonScope(),PS.bind(Jn.ChannelStateSyncEventHandler).to(mw).inSingletonScope(),PS.bind(Jn.StatsHandler).to(pb).inSingletonScope(),PS.bind(Jn.WIDHandler).to(RS).inSingletonScope(),PS.bind(Jn.WebRTCIssueDetector).toDynamicValue((e=>{const t=e.container.get(Jn.Config),r=e.container.get(Jn.WIDHandler);if(t.get("disableWid"))return;const n=e.container.get(Jn.StatsHandler),i=[1234],s=e.container.get(Jn.LoggerFactory)("WID"),o=new rr({statsParser:new nr({ignoreSSRCList:i,logger:s})});return new sr({onIssues:e=>{var n;r.handleIssues(e),null===(n=t.get("onIssues"))||void 0===n||n(e)},issueEmitter:new Nt,networkScoresCalculator:new qt,detectors:[new Kt,new Vt,new Ht,new $t,new zt,new Gt,new Zt({minMosQuality:kt.GOOD,avgFreezeDurationThresholdMs:2e3,frozenDurationThresholdPct:50}),new Xt({minMosQuality:kt.GOOD,volatilityThreshold:10,affectedStreamsPercentThreshold:60})],statsReporter:new Bt({compositeStatsParser:o,getStatsInterval:5e3}),onNetworkScoresUpdated:e=>{var n;r.handleNetworkScores(e),null===(n=t.get("onNetworkScoresUpdated"))||void 0===n||n(e)},onStats:n.handle.bind(n),ignoreSSRCList:i,compositeStatsParser:o,logger:s,autoAddPeerConnections:!1})})).inSingletonScope(),PS.bind(Jn.Engine).to(kw).inSingletonScope(),PS.bind(Jn.PeerTrackFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory),r=e.container.get(Jn.CallState),n=e.container.get(Jn.StatsHandler);return i=>{const s={callState:r,loggerFactory:t,media:e.container.get(Jn.Media),network:e.container.get(Jn.Network),peerConsumerFactory:e.container.get(Jn.PeerConsumerFactory),socket:e.container.get(Jn.SocketIO)},{peerEventEmitter:o}=i,a=new bS(Object.assign(Object.assign(Object.assign({},i),s),{statsHandler:n}));return o.safeEmit(an,a),a}})),PS.bind(Jn.PeerFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory),r=e.container.get(Jn.CallState);return n=>{const i={callState:r,loggerFactory:t,media:e.container.get(Jn.Media),myPeer:e.container.get(Jn.MyPeer),network:e.container.get(Jn.Network),peers:e.container.get(Jn.Peers),remotePeerTracks:e.container.get(Jn.RemotePeerTracks),socket:e.container.get(Jn.SocketIO),peerConsumerFactory:e.container.get(Jn.PeerConsumerFactory)};return new _S(Object.assign(Object.assign({},i),n))}})),PS.bind(Jn.PeerConsumerFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory);return e=>{const r={loggerFactory:t};return new SS(Object.assign(Object.assign({},r),e))}})),PS.bind(Jn.AudioTrackFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory),r=e.container.get(Jn.StatsHandler);return n=>{const i={internalEventEmitter:e.container.get(Jn.InternalEventEmitter),loggerFactory:t,media:e.container.get(Jn.Media),mediaStreamTrackManager:e.container.get(Jn.MediaStreamTrackManager),myPeer:e.container.get(Jn.MyPeer),network:e.container.get(Jn.Network),socket:e.container.get(Jn.SocketIO),processorFactory:e.container.get(Jn.AudioTrackProcessorFactory),clientEventEmitter:e.container.get(Jn.ClientEventEmitter),statsHandler:r};return new vS(Object.assign(Object.assign({},i),n))}})),PS.bind(Jn.VideoTrackFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory),r=e.container.get(Jn.StatsHandler);return n=>{const i={internalEventEmitter:e.container.get(Jn.InternalEventEmitter),loggerFactory:t,media:e.container.get(Jn.Media),mediaStreamTrackManager:e.container.get(Jn.MediaStreamTrackManager),myPeer:e.container.get(Jn.MyPeer),network:e.container.get(Jn.Network),socket:e.container.get(Jn.SocketIO),statsHandler:r};return new $f(Object.assign(Object.assign({},i),n))}})),PS.bind(Jn.AudioTrackProcessorFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory),r=e.container.get(Jn.Config),n=e.container.get(Jn.ProcessorsCache),i=r.get("asdk");return e=>{const s=r.get("denoiser");if(n.has(s,e.trackLabel))throw new Error(`Track processor for type:${s}, label:${e.trackLabel} already created`);let o;if("rnnoise"===s&&e.noiseSuppressor&&(o=new gS({noiseSuppressor:e.noiseSuppressor,loggerFactory:t})),"asdk"===s&&(null==i?void 0:i.customerId)&&(o=new y_({asdkCustomerId:i.customerId,loggerFactory:t})),!o)throw new TypeError("Incorrect parameters passed to AudioTrackProcessorFactory");return o}})),PS.bind(Jn.DataChannelsManager).to(_w).inSingletonScope(),PS.bind(Jn.AnalyticsApiClient).to(a_).inSingletonScope(),PS.bind(Jn.TransportsStatsProvider).to(ib).inSingletonScope();class ES{constructor(e){TS.set(this,void 0);const{clientEventEmitter:t,internalEventEmitter:r}=e;PS.bind(Jn.Config).toDynamicValue((()=>new Ct(e))).inSingletonScope(),PS.bind(Jn.InternalEventEmitter).toDynamicValue((()=>null!=r?r:new Rt)).inSingletonScope(),PS.bind(Jn.ClientEventEmitter).toDynamicValue((()=>null!=t?t:new Rt)).inSingletonScope(),PS.get(Jn.IntegrationsService),this.clientEventEmitter=PS.get(Jn.ClientEventEmitter),d(this,TS,PS.get(Jn.Engine),"f")}get observer(){return this.clientEventEmitter}get id(){return c(this,TS,"f").myPeerId}get peers(){return c(this,TS,"f").getPeers()}get availableVideoDevices(){return c(this,TS,"f").system.availableVideoDevices}get availableAudioDevices(){return c(this,TS,"f").system.availableAudioDevices}get canUseNoiseSuppression(){return!0}get effectsSDKInitialized(){return c(this,TS,"f").media.effectsSDKInitialized}detectDevices(e){return a(this,void 0,void 0,(function*(){return yield c(this,TS,"f").system.detectDevices(e),{video:c(this,TS,"f").system.availableVideoDevices,audio:c(this,TS,"f").system.availableAudioDevices}}))}initEffectsSDK(){return c(this,TS,"f").media.initEffectsSDK()}join(e){return c(this,TS,"f").join(e)}leave(e){return c(this,TS,"f").release(e)}confirmActivity(){return c(this,TS,"f").confirmActivity()}createCameraVideoTrack(e){return c(this,TS,"f").createCameraVideoTrack(e)}createMicrophoneAudioTrack(e){return c(this,TS,"f").createMicrophoneAudioTrack(e)}createScreenMediaTracks(e){return c(this,TS,"f").createScreenMediaTracks(e)}createCustomAudioTrack(e){return c(this,TS,"f").createCustomAudioTrack(e)}createCustomVideoTrack(e){return c(this,TS,"f").createCustomVideoTrack(e)}deleteTrack(e){return c(this,TS,"f").deleteTrack(e)}loadPeers(e){return c(this,TS,"f").loadPeers(e)}updateAppData(e){return c(this,TS,"f").updateAppData(e)}getTransportsInfo(){return a(this,void 0,void 0,(function*(){return c(this,TS,"f").network.getTransportsStateInfo()}))}setPreferRelay(e){c(this,TS,"f").network.setPreferRelay(e)}getPreferRelay(){return c(this,TS,"f").network.getPreferRelay()}transportsStats(){return c(this,TS,"f").transportsStats()}}TS=new WeakMap;export{ES as default};
|
|
40
|
+
!function(e,t){(function(){var r,n="Expected a function",i="__lodash_hash_undefined__",s="__lodash_placeholder__",o=16,a=32,c=64,d=128,u=256,p=1/0,h=9007199254740991,f=NaN,m=4294967295,g=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",a],["partialRight",c],["rearg",u]],v="[object Arguments]",y="[object Array]",b="[object Boolean]",w="[object Date]",_="[object Error]",S="[object Function]",k="[object GeneratorFunction]",C="[object Map]",R="[object Number]",P="[object Object]",T="[object Promise]",E="[object RegExp]",D="[object Set]",M="[object String]",I="[object Symbol]",x="[object WeakMap]",O="[object ArrayBuffer]",L="[object DataView]",A="[object Float32Array]",j="[object Float64Array]",F="[object Int8Array]",N="[object Int16Array]",B="[object Int32Array]",W="[object Uint8Array]",q="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",V=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,H=/(__e\(.*?\)|\b__t\)) \+\n'';/g,K=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,Q=RegExp(K.source),J=RegExp(G.source),Y=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,te=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,ie=RegExp(ne.source),se=/^\s+/,oe=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,de=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,pe=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ve=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,be=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_e=/($^)/,Se=/['\n\r\u2028\u2029\\]/g,ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Re="a-z\\xdf-\\xf6\\xf8-\\xff",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\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",De="['’]",Me="[\\ud800-\\udfff]",Ie="["+Ee+"]",xe="["+ke+"]",Oe="\\d+",Le="[\\u2700-\\u27bf]",Ae="["+Re+"]",je="[^\\ud800-\\udfff"+Ee+Oe+Ce+Re+Pe+"]",Fe="\\ud83c[\\udffb-\\udfff]",Ne="[^\\ud800-\\udfff]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",We="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Pe+"]",Ue="(?:"+Ae+"|"+je+")",ze="(?:"+qe+"|"+je+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",$e="(?:['’](?:D|LL|M|RE|S|T|VE))?",He="(?:"+xe+"|"+Fe+")"+"?",Ke="[\\ufe0e\\ufe0f]?",Ge=Ke+He+("(?:\\u200d(?:"+[Ne,Be,We].join("|")+")"+Ke+He+")*"),Qe="(?:"+[Le,Be,We].join("|")+")"+Ge,Je="(?:"+[Ne+xe+"?",xe,Be,We,Me].join("|")+")",Ye=RegExp(De,"g"),Ze=RegExp(xe,"g"),Xe=RegExp(Fe+"(?="+Fe+")|"+Je+Ge,"g"),et=RegExp([qe+"?"+Ae+"+"+Ve+"(?="+[Ie,qe,"$"].join("|")+")",ze+"+"+$e+"(?="+[Ie,qe+Ue,"$"].join("|")+")",qe+"?"+Ue+"+"+Ve,qe+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Oe,Qe].join("|"),"g"),tt=RegExp("[\\u200d\\ud800-\\udfff"+ke+Te+"]"),rt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,nt=["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"],it=-1,st={};st[A]=st[j]=st[F]=st[N]=st[B]=st[W]=st[q]=st[U]=st[z]=!0,st[v]=st[y]=st[O]=st[b]=st[L]=st[w]=st[_]=st[S]=st[C]=st[R]=st[P]=st[E]=st[D]=st[M]=st[x]=!1;var ot={};ot[v]=ot[y]=ot[O]=ot[L]=ot[b]=ot[w]=ot[A]=ot[j]=ot[F]=ot[N]=ot[B]=ot[C]=ot[R]=ot[P]=ot[E]=ot[D]=ot[M]=ot[I]=ot[W]=ot[q]=ot[U]=ot[z]=!0,ot[_]=ot[S]=ot[x]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ct=parseFloat,dt=parseInt,ut="object"==typeof l&&l&&l.Object===Object&&l,lt="object"==typeof self&&self&&self.Object===Object&&self,pt=ut||lt||Function("return this")(),ht=t&&!t.nodeType&&t,ft=ht&&e&&!e.nodeType&&e,mt=ft&&ft.exports===ht,gt=mt&&ut.process,vt=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||gt&>.binding&>.binding("util")}catch(e){}}(),yt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,wt=vt&&vt.isMap,_t=vt&&vt.isRegExp,St=vt&&vt.isSet,kt=vt&&vt.isTypedArray;function Ct(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Rt(e,t,r,n){for(var i=-1,s=null==e?0:e.length;++i<s;){var o=e[i];t(n,o,r(o),e)}return n}function Pt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Tt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Et(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Dt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[i++]=o)}return s}function Mt(e,t){return!!(null==e?0:e.length)&&Wt(e,t,0)>-1}function It(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function xt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Ot(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Lt(e,t,r,n){var i=-1,s=null==e?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}function At(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function jt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ft=Vt("length");function Nt(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Bt(e,t,r,n){for(var i=e.length,s=r+(n?1:-1);n?s--:++s<i;)if(t(e[s],s,e))return s;return-1}function Wt(e,t,r){return t==t?function(e,t,r){var n=r-1,i=e.length;for(;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Bt(e,Ut,r)}function qt(e,t,r,n){for(var i=r-1,s=e.length;++i<s;)if(n(e[i],t))return i;return-1}function Ut(e){return e!=e}function zt(e,t){var r=null==e?0:e.length;return r?Kt(e,t)/r:f}function Vt(e){return function(t){return null==t?r:t[e]}}function $t(e){return function(t){return null==e?r:e[t]}}function Ht(e,t,r,n,i){return i(e,(function(e,i,s){r=n?(n=!1,e):t(r,e,i,s)})),r}function Kt(e,t){for(var n,i=-1,s=e.length;++i<s;){var o=t(e[i]);o!==r&&(n=n===r?o:n+o)}return n}function Gt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Qt(e){return e?e.slice(0,hr(e)+1).replace(se,""):e}function Jt(e){return function(t){return e(t)}}function Yt(e,t){return xt(t,(function(t){return e[t]}))}function Zt(e,t){return e.has(t)}function Xt(e,t){for(var r=-1,n=e.length;++r<n&&Wt(t,e[r],0)>-1;);return r}function er(e,t){for(var r=e.length;r--&&Wt(t,e[r],0)>-1;);return r}function tr(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var rr=$t({"À":"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"}),nr=$t({"&":"&","<":"<",">":">",'"':""","'":"'"});function ir(e){return"\\"+at[e]}function sr(e){return tt.test(e)}function or(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ar(e,t){return function(r){return e(t(r))}}function cr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];a!==t&&a!==s||(e[r]=s,o[i++]=r)}return o}function dr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function lr(e){return sr(e)?function(e){var t=Xe.lastIndex=0;for(;Xe.test(e);)++t;return t}(e):Ft(e)}function pr(e){return sr(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.split("")}(e)}function hr(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var fr=$t({"&":"&","<":"<",">":">",""":'"',"'":"'"});var mr=function e(t){var l,oe=(t=null==t?pt:mr.defaults(pt.Object(),t,mr.pick(pt,nt))).Array,ke=t.Date,Ce=t.Error,Re=t.Function,Pe=t.Math,Te=t.Object,Ee=t.RegExp,De=t.String,Me=t.TypeError,Ie=oe.prototype,xe=Re.prototype,Oe=Te.prototype,Le=t["__core-js_shared__"],Ae=xe.toString,je=Oe.hasOwnProperty,Fe=0,Ne=(l=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||""))?"Symbol(src)_1."+l:"",Be=Oe.toString,We=Ae.call(Te),qe=pt._,Ue=Ee("^"+Ae.call(je).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ze=mt?t.Buffer:r,Ve=t.Symbol,$e=t.Uint8Array,He=ze?ze.allocUnsafe:r,Ke=ar(Te.getPrototypeOf,Te),Ge=Te.create,Qe=Oe.propertyIsEnumerable,Je=Ie.splice,Xe=Ve?Ve.isConcatSpreadable:r,tt=Ve?Ve.iterator:r,at=Ve?Ve.toStringTag:r,ut=function(){try{var e=hs(Te,"defineProperty");return e({},"",{}),e}catch(e){}}(),lt=t.clearTimeout!==pt.clearTimeout&&t.clearTimeout,ht=ke&&ke.now!==pt.Date.now&&ke.now,ft=t.setTimeout!==pt.setTimeout&&t.setTimeout,gt=Pe.ceil,vt=Pe.floor,Ft=Te.getOwnPropertySymbols,$t=ze?ze.isBuffer:r,gr=t.isFinite,vr=Ie.join,yr=ar(Te.keys,Te),br=Pe.max,wr=Pe.min,_r=ke.now,Sr=t.parseInt,kr=Pe.random,Cr=Ie.reverse,Rr=hs(t,"DataView"),Pr=hs(t,"Map"),Tr=hs(t,"Promise"),Er=hs(t,"Set"),Dr=hs(t,"WeakMap"),Mr=hs(Te,"create"),Ir=Dr&&new Dr,xr={},Or=Ws(Rr),Lr=Ws(Pr),Ar=Ws(Tr),jr=Ws(Er),Fr=Ws(Dr),Nr=Ve?Ve.prototype:r,Br=Nr?Nr.valueOf:r,Wr=Nr?Nr.toString:r;function qr(e){if(ia(e)&&!Ko(e)&&!(e instanceof $r)){if(e instanceof Vr)return e;if(je.call(e,"__wrapped__"))return qs(e)}return new Vr(e)}var Ur=function(){function e(){}return function(t){if(!na(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function zr(){}function Vr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}function $r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function Hr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Kr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Gr;++t<r;)this.add(e[t])}function Jr(e){var t=this.__data__=new Kr(e);this.size=t.size}function Yr(e,t){var r=Ko(e),n=!r&&Ho(e),i=!r&&!n&&Yo(e),s=!r&&!n&&!i&&pa(e),o=r||n||i||s,a=o?Gt(e.length,De):[],c=a.length;for(var d in e)!t&&!je.call(e,d)||o&&("length"==d||i&&("offset"==d||"parent"==d)||s&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||ws(d,c))||a.push(d);return a}function Zr(e){var t=e.length;return t?e[Jn(0,t-1)]:r}function Xr(e,t){return Fs(Ii(e),dn(t,0,e.length))}function en(e){return Fs(Ii(e))}function tn(e,t,n){(n!==r&&!zo(e[t],n)||n===r&&!(t in e))&&an(e,t,n)}function rn(e,t,n){var i=e[t];je.call(e,t)&&zo(i,n)&&(n!==r||t in e)||an(e,t,n)}function nn(e,t){for(var r=e.length;r--;)if(zo(e[r][0],t))return r;return-1}function sn(e,t,r,n){return fn(e,(function(e,i,s){t(n,e,r(e),s)})),n}function on(e,t){return e&&xi(t,La(t),e)}function an(e,t,r){"__proto__"==t&&ut?ut(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function cn(e,t){for(var n=-1,i=t.length,s=oe(i),o=null==e;++n<i;)s[n]=o?r:Da(e,t[n]);return s}function dn(e,t,n){return e==e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function un(e,t,n,i,s,o){var a,c=1&t,d=2&t,u=4&t;if(n&&(a=s?n(e,i,s,o):n(e)),a!==r)return a;if(!na(e))return e;var l=Ko(e);if(l){if(a=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&je.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!c)return Ii(e,a)}else{var p=gs(e),h=p==S||p==k;if(Yo(e))return Ri(e,c);if(p==P||p==v||h&&!s){if(a=d||h?{}:ys(e),!c)return d?function(e,t){return xi(e,ms(e),t)}(e,function(e,t){return e&&xi(t,Aa(t),e)}(a,e)):function(e,t){return xi(e,fs(e),t)}(e,on(a,e))}else{if(!ot[p])return s?e:{};a=function(e,t,r){var n=e.constructor;switch(t){case O:return Pi(e);case b:case w:return new n(+e);case L:return function(e,t){var r=t?Pi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case A:case j:case F:case N:case B:case W:case q:case U:case z:return Ti(e,r);case C:case D:return new n;case R:case M:return new n(e);case E:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case I:return i=e,Br?Te(Br.call(i)):{}}var i}(e,p,c)}}o||(o=new Jr);var f=o.get(e);if(f)return f;o.set(e,a),da(e)?e.forEach((function(r){a.add(un(r,t,n,r,e,o))})):sa(e)&&e.forEach((function(r,i){a.set(i,un(r,t,n,i,e,o))}));var m=l?r:(u?d?os:ss:d?Aa:La)(e);return Pt(m||e,(function(r,i){m&&(r=e[i=r]),rn(a,i,un(r,t,n,i,e,o))})),a}function ln(e,t,n){var i=n.length;if(null==e)return!i;for(e=Te(e);i--;){var s=n[i],o=t[s],a=e[s];if(a===r&&!(s in e)||!o(a))return!1}return!0}function pn(e,t,i){if("function"!=typeof e)throw new Me(n);return Os((function(){e.apply(r,i)}),t)}function hn(e,t,r,n){var i=-1,s=Mt,o=!0,a=e.length,c=[],d=t.length;if(!a)return c;r&&(t=xt(t,Jt(r))),n?(s=It,o=!1):t.length>=200&&(s=Zt,o=!1,t=new Qr(t));e:for(;++i<a;){var u=e[i],l=null==r?u:r(u);if(u=n||0!==u?u:0,o&&l==l){for(var p=d;p--;)if(t[p]===l)continue e;c.push(u)}else s(t,l,n)||c.push(u)}return c}qr.templateSettings={escape:Y,evaluate:Z,interpolate:X,variable:"",imports:{_:qr}},qr.prototype=zr.prototype,qr.prototype.constructor=qr,Vr.prototype=Ur(zr.prototype),Vr.prototype.constructor=Vr,$r.prototype=Ur(zr.prototype),$r.prototype.constructor=$r,Hr.prototype.clear=function(){this.__data__=Mr?Mr(null):{},this.size=0},Hr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Hr.prototype.get=function(e){var t=this.__data__;if(Mr){var n=t[e];return n===i?r:n}return je.call(t,e)?t[e]:r},Hr.prototype.has=function(e){var t=this.__data__;return Mr?t[e]!==r:je.call(t,e)},Hr.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Mr&&t===r?i:t,this},Kr.prototype.clear=function(){this.__data__=[],this.size=0},Kr.prototype.delete=function(e){var t=this.__data__,r=nn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Je.call(t,r,1),--this.size,!0)},Kr.prototype.get=function(e){var t=this.__data__,n=nn(t,e);return n<0?r:t[n][1]},Kr.prototype.has=function(e){return nn(this.__data__,e)>-1},Kr.prototype.set=function(e,t){var r=this.__data__,n=nn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Gr.prototype.clear=function(){this.size=0,this.__data__={hash:new Hr,map:new(Pr||Kr),string:new Hr}},Gr.prototype.delete=function(e){var t=ls(this,e).delete(e);return this.size-=t?1:0,t},Gr.prototype.get=function(e){return ls(this,e).get(e)},Gr.prototype.has=function(e){return ls(this,e).has(e)},Gr.prototype.set=function(e,t){var r=ls(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Qr.prototype.add=Qr.prototype.push=function(e){return this.__data__.set(e,i),this},Qr.prototype.has=function(e){return this.__data__.has(e)},Jr.prototype.clear=function(){this.__data__=new Kr,this.size=0},Jr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Jr.prototype.get=function(e){return this.__data__.get(e)},Jr.prototype.has=function(e){return this.__data__.has(e)},Jr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Kr){var n=r.__data__;if(!Pr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Gr(n)}return r.set(e,t),this.size=r.size,this};var fn=Ai(Sn),mn=Ai(kn,!0);function gn(e,t){var r=!0;return fn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function vn(e,t,n){for(var i=-1,s=e.length;++i<s;){var o=e[i],a=t(o);if(null!=a&&(c===r?a==a&&!la(a):n(a,c)))var c=a,d=o}return d}function yn(e,t){var r=[];return fn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function bn(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=bs),i||(i=[]);++s<o;){var a=e[s];t>0&&r(a)?t>1?bn(a,t-1,r,n,i):Ot(i,a):n||(i[i.length]=a)}return i}var wn=ji(),_n=ji(!0);function Sn(e,t){return e&&wn(e,t,La)}function kn(e,t){return e&&_n(e,t,La)}function Cn(e,t){return Dt(t,(function(t){return ea(e[t])}))}function Rn(e,t){for(var n=0,i=(t=_i(t,e)).length;null!=e&&n<i;)e=e[Bs(t[n++])];return n&&n==i?e:r}function Pn(e,t,r){var n=t(e);return Ko(e)?n:Ot(n,r(e))}function Tn(e){return null==e?e===r?"[object Undefined]":"[object Null]":at&&at in Te(e)?function(e){var t=je.call(e,at),n=e[at];try{e[at]=r;var i=!0}catch(e){}var s=Be.call(e);i&&(t?e[at]=n:delete e[at]);return s}(e):function(e){return Be.call(e)}(e)}function En(e,t){return e>t}function Dn(e,t){return null!=e&&je.call(e,t)}function Mn(e,t){return null!=e&&t in Te(e)}function In(e,t,n){for(var i=n?It:Mt,s=e[0].length,o=e.length,a=o,c=oe(o),d=1/0,u=[];a--;){var l=e[a];a&&t&&(l=xt(l,Jt(t))),d=wr(l.length,d),c[a]=!n&&(t||s>=120&&l.length>=120)?new Qr(a&&l):r}l=e[0];var p=-1,h=c[0];e:for(;++p<s&&u.length<d;){var f=l[p],m=t?t(f):f;if(f=n||0!==f?f:0,!(h?Zt(h,m):i(u,m,n))){for(a=o;--a;){var g=c[a];if(!(g?Zt(g,m):i(e[a],m,n)))continue e}h&&h.push(m),u.push(f)}}return u}function xn(e,t,n){var i=null==(e=Ds(e,t=_i(t,e)))?e:e[Bs(Zs(t))];return null==i?r:Ct(i,e,n)}function On(e){return ia(e)&&Tn(e)==v}function Ln(e,t,n,i,s){return e===t||(null==e||null==t||!ia(e)&&!ia(t)?e!=e&&t!=t:function(e,t,n,i,s,o){var a=Ko(e),c=Ko(t),d=a?y:gs(e),u=c?y:gs(t),l=(d=d==v?P:d)==P,p=(u=u==v?P:u)==P,h=d==u;if(h&&Yo(e)){if(!Yo(t))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new Jr),a||pa(e)?ns(e,t,n,i,s,o):function(e,t,r,n,i,s,o){switch(r){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!s(new $e(e),new $e(t)));case b:case w:case R:return zo(+e,+t);case _:return e.name==t.name&&e.message==t.message;case E:case M:return e==t+"";case C:var a=or;case D:var c=1&n;if(a||(a=dr),e.size!=t.size&&!c)return!1;var d=o.get(e);if(d)return d==t;n|=2,o.set(e,t);var u=ns(a(e),a(t),n,i,s,o);return o.delete(e),u;case I:if(Br)return Br.call(e)==Br.call(t)}return!1}(e,t,d,n,i,s,o);if(!(1&n)){var f=l&&je.call(e,"__wrapped__"),m=p&&je.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,S=m?t.value():t;return o||(o=new Jr),s(g,S,n,i,o)}}if(!h)return!1;return o||(o=new Jr),function(e,t,n,i,s,o){var a=1&n,c=ss(e),d=c.length,u=ss(t).length;if(d!=u&&!a)return!1;var l=d;for(;l--;){var p=c[l];if(!(a?p in t:je.call(t,p)))return!1}var h=o.get(e),f=o.get(t);if(h&&f)return h==t&&f==e;var m=!0;o.set(e,t),o.set(t,e);var g=a;for(;++l<d;){var v=e[p=c[l]],y=t[p];if(i)var b=a?i(y,v,p,t,e,o):i(v,y,p,e,t,o);if(!(b===r?v===y||s(v,y,n,i,o):b)){m=!1;break}g||(g="constructor"==p)}if(m&&!g){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,i,s,o)}(e,t,n,i,Ln,s))}function An(e,t,n,i){var s=n.length,o=s,a=!i;if(null==e)return!o;for(e=Te(e);s--;){var c=n[s];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<o;){var d=(c=n[s])[0],u=e[d],l=c[1];if(a&&c[2]){if(u===r&&!(d in e))return!1}else{var p=new Jr;if(i)var h=i(u,l,d,e,t,p);if(!(h===r?Ln(l,u,3,i,p):h))return!1}}return!0}function jn(e){return!(!na(e)||(t=e,Ne&&Ne in t))&&(ea(e)?Ue:ve).test(Ws(e));var t}function Fn(e){return"function"==typeof e?e:null==e?oc:"object"==typeof e?Ko(e)?zn(e[0],e[1]):Un(e):mc(e)}function Nn(e){if(!Rs(e))return yr(e);var t=[];for(var r in Te(e))je.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Bn(e){if(!na(e))return function(e){var t=[];if(null!=e)for(var r in Te(e))t.push(r);return t}(e);var t=Rs(e),r=[];for(var n in e)("constructor"!=n||!t&&je.call(e,n))&&r.push(n);return r}function Wn(e,t){return e<t}function qn(e,t){var r=-1,n=Qo(e)?oe(e.length):[];return fn(e,(function(e,i,s){n[++r]=t(e,i,s)})),n}function Un(e){var t=ps(e);return 1==t.length&&t[0][2]?Ts(t[0][0],t[0][1]):function(r){return r===e||An(r,e,t)}}function zn(e,t){return Ss(e)&&Ps(t)?Ts(Bs(e),t):function(n){var i=Da(n,e);return i===r&&i===t?Ma(n,e):Ln(t,i,3)}}function Vn(e,t,n,i,s){e!==t&&wn(t,(function(o,a){if(s||(s=new Jr),na(o))!function(e,t,n,i,s,o,a){var c=Is(e,n),d=Is(t,n),u=a.get(d);if(u)return void tn(e,n,u);var l=o?o(c,d,n+"",e,t,a):r,p=l===r;if(p){var h=Ko(d),f=!h&&Yo(d),m=!h&&!f&&pa(d);l=d,h||f||m?Ko(c)?l=c:Jo(c)?l=Ii(c):f?(p=!1,l=Ri(d,!0)):m?(p=!1,l=Ti(d,!0)):l=[]:aa(d)||Ho(d)?(l=c,Ho(c)?l=wa(c):na(c)&&!ea(c)||(l=ys(d))):p=!1}p&&(a.set(d,l),s(l,d,i,o,a),a.delete(d));tn(e,n,l)}(e,t,a,n,Vn,i,s);else{var c=i?i(Is(e,a),o,a+"",e,t,s):r;c===r&&(c=o),tn(e,a,c)}}),Aa)}function $n(e,t){var n=e.length;if(n)return ws(t+=t<0?n:0,n)?e[t]:r}function Hn(e,t,r){t=t.length?xt(t,(function(e){return Ko(e)?function(t){return Rn(t,1===e.length?e[0]:e)}:e})):[oc];var n=-1;t=xt(t,Jt(us()));var i=qn(e,(function(e,r,i){var s=xt(t,(function(t){return t(e)}));return{criteria:s,index:++n,value:e}}));return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(i,(function(e,t){return function(e,t,r){var n=-1,i=e.criteria,s=t.criteria,o=i.length,a=r.length;for(;++n<o;){var c=Ei(i[n],s[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Kn(e,t,r){for(var n=-1,i=t.length,s={};++n<i;){var o=t[n],a=Rn(e,o);r(a,o)&&ti(s,_i(o,e),a)}return s}function Gn(e,t,r,n){var i=n?qt:Wt,s=-1,o=t.length,a=e;for(e===t&&(t=Ii(t)),r&&(a=xt(e,Jt(r)));++s<o;)for(var c=0,d=t[s],u=r?r(d):d;(c=i(a,u,c,n))>-1;)a!==e&&Je.call(a,c,1),Je.call(e,c,1);return e}function Qn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==s){var s=i;ws(i)?Je.call(e,i,1):hi(e,i)}}return e}function Jn(e,t){return e+vt(kr()*(t-e+1))}function Yn(e,t){var r="";if(!e||t<1||t>h)return r;do{t%2&&(r+=e),(t=vt(t/2))&&(e+=e)}while(t);return r}function Zn(e,t){return Ls(Es(e,t,oc),e+"")}function Xn(e){return Zr(za(e))}function ei(e,t){var r=za(e);return Fs(r,dn(t,0,r.length))}function ti(e,t,n,i){if(!na(e))return e;for(var s=-1,o=(t=_i(t,e)).length,a=o-1,c=e;null!=c&&++s<o;){var d=Bs(t[s]),u=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return e;if(s!=a){var l=c[d];(u=i?i(l,d,c):r)===r&&(u=na(l)?l:ws(t[s+1])?[]:{})}rn(c,d,u),c=c[d]}return e}var ri=Ir?function(e,t){return Ir.set(e,t),e}:oc,ni=ut?function(e,t){return ut(e,"toString",{configurable:!0,enumerable:!1,value:nc(t),writable:!0})}:oc;function ii(e){return Fs(za(e))}function si(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=oe(i);++n<i;)s[n]=e[n+t];return s}function oi(e,t){var r;return fn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ai(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var s=n+i>>>1,o=e[s];null!==o&&!la(o)&&(r?o<=t:o<t)?n=s+1:i=s}return i}return ci(e,t,oc,r)}function ci(e,t,n,i){var s=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,c=null===t,d=la(t),u=t===r;s<o;){var l=vt((s+o)/2),p=n(e[l]),h=p!==r,f=null===p,m=p==p,g=la(p);if(a)var v=i||m;else v=u?m&&(i||h):c?m&&h&&(i||!f):d?m&&h&&!f&&(i||!g):!f&&!g&&(i?p<=t:p<t);v?s=l+1:o=l}return wr(o,4294967294)}function di(e,t){for(var r=-1,n=e.length,i=0,s=[];++r<n;){var o=e[r],a=t?t(o):o;if(!r||!zo(a,c)){var c=a;s[i++]=0===o?0:o}}return s}function ui(e){return"number"==typeof e?e:la(e)?f:+e}function li(e){if("string"==typeof e)return e;if(Ko(e))return xt(e,li)+"";if(la(e))return Wr?Wr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function pi(e,t,r){var n=-1,i=Mt,s=e.length,o=!0,a=[],c=a;if(r)o=!1,i=It;else if(s>=200){var d=t?null:Yi(e);if(d)return dr(d);o=!1,i=Zt,c=new Qr}else c=t?[]:a;e:for(;++n<s;){var u=e[n],l=t?t(u):u;if(u=r||0!==u?u:0,o&&l==l){for(var p=c.length;p--;)if(c[p]===l)continue e;t&&c.push(l),a.push(u)}else i(c,l,r)||(c!==a&&c.push(l),a.push(u))}return a}function hi(e,t){return null==(e=Ds(e,t=_i(t,e)))||delete e[Bs(Zs(t))]}function fi(e,t,r,n){return ti(e,t,r(Rn(e,t)),n)}function mi(e,t,r,n){for(var i=e.length,s=n?i:-1;(n?s--:++s<i)&&t(e[s],s,e););return r?si(e,n?0:s,n?s+1:i):si(e,n?s+1:0,n?i:s)}function gi(e,t){var r=e;return r instanceof $r&&(r=r.value()),Lt(t,(function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))}),r)}function vi(e,t,r){var n=e.length;if(n<2)return n?pi(e[0]):[];for(var i=-1,s=oe(n);++i<n;)for(var o=e[i],a=-1;++a<n;)a!=i&&(s[i]=hn(s[i]||o,e[a],t,r));return pi(bn(s,1),t,r)}function yi(e,t,n){for(var i=-1,s=e.length,o=t.length,a={};++i<s;){var c=i<o?t[i]:r;n(a,e[i],c)}return a}function bi(e){return Jo(e)?e:[]}function wi(e){return"function"==typeof e?e:oc}function _i(e,t){return Ko(e)?e:Ss(e,t)?[e]:Ns(_a(e))}var Si=Zn;function ki(e,t,n){var i=e.length;return n=n===r?i:n,!t&&n>=i?e:si(e,t,n)}var Ci=lt||function(e){return pt.clearTimeout(e)};function Ri(e,t){if(t)return e.slice();var r=e.length,n=He?He(r):new e.constructor(r);return e.copy(n),n}function Pi(e){var t=new e.constructor(e.byteLength);return new $e(t).set(new $e(e)),t}function Ti(e,t){var r=t?Pi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var n=e!==r,i=null===e,s=e==e,o=la(e),a=t!==r,c=null===t,d=t==t,u=la(t);if(!c&&!u&&!o&&e>t||o&&a&&d&&!c&&!u||i&&a&&d||!n&&d||!s)return 1;if(!i&&!o&&!u&&e<t||u&&n&&s&&!i&&!o||c&&n&&s||!a&&s||!d)return-1}return 0}function Di(e,t,r,n){for(var i=-1,s=e.length,o=r.length,a=-1,c=t.length,d=br(s-o,0),u=oe(c+d),l=!n;++a<c;)u[a]=t[a];for(;++i<o;)(l||i<s)&&(u[r[i]]=e[i]);for(;d--;)u[a++]=e[i++];return u}function Mi(e,t,r,n){for(var i=-1,s=e.length,o=-1,a=r.length,c=-1,d=t.length,u=br(s-a,0),l=oe(u+d),p=!n;++i<u;)l[i]=e[i];for(var h=i;++c<d;)l[h+c]=t[c];for(;++o<a;)(p||i<s)&&(l[h+r[o]]=e[i++]);return l}function Ii(e,t){var r=-1,n=e.length;for(t||(t=oe(n));++r<n;)t[r]=e[r];return t}function xi(e,t,n,i){var s=!n;n||(n={});for(var o=-1,a=t.length;++o<a;){var c=t[o],d=i?i(n[c],e[c],c,n,e):r;d===r&&(d=e[c]),s?an(n,c,d):rn(n,c,d)}return n}function Oi(e,t){return function(r,n){var i=Ko(r)?Rt:sn,s=t?t():{};return i(r,e,us(n,2),s)}}function Li(e){return Zn((function(t,n){var i=-1,s=n.length,o=s>1?n[s-1]:r,a=s>2?n[2]:r;for(o=e.length>3&&"function"==typeof o?(s--,o):r,a&&_s(n[0],n[1],a)&&(o=s<3?r:o,s=1),t=Te(t);++i<s;){var c=n[i];c&&e(t,c,i,o)}return t}))}function Ai(e,t){return function(r,n){if(null==r)return r;if(!Qo(r))return e(r,n);for(var i=r.length,s=t?i:-1,o=Te(r);(t?s--:++s<i)&&!1!==n(o[s],s,o););return r}}function ji(e){return function(t,r,n){for(var i=-1,s=Te(t),o=n(t),a=o.length;a--;){var c=o[e?a:++i];if(!1===r(s[c],c,s))break}return t}}function Fi(e){return function(t){var n=sr(t=_a(t))?pr(t):r,i=n?n[0]:t.charAt(0),s=n?ki(n,1).join(""):t.slice(1);return i[e]()+s}}function Ni(e){return function(t){return Lt(ec(Ha(t).replace(Ye,"")),e,"")}}function Bi(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 r=Ur(e.prototype),n=e.apply(r,t);return na(n)?n:r}}function Wi(e){return function(t,n,i){var s=Te(t);if(!Qo(t)){var o=us(n,3);t=La(t),n=function(e){return o(s[e],e,s)}}var a=e(t,n,i);return a>-1?s[o?t[a]:a]:r}}function qi(e){return is((function(t){var i=t.length,s=i,o=Vr.prototype.thru;for(e&&t.reverse();s--;){var a=t[s];if("function"!=typeof a)throw new Me(n);if(o&&!c&&"wrapper"==cs(a))var c=new Vr([],!0)}for(s=c?s:i;++s<i;){var d=cs(a=t[s]),u="wrapper"==d?as(a):r;c=u&&ks(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[cs(u[0])].apply(c,u[3]):1==a.length&&ks(a)?c[d]():c.thru(a)}return function(){var e=arguments,r=e[0];if(c&&1==e.length&&Ko(r))return c.plant(r).value();for(var n=0,s=i?t[n].apply(this,e):r;++n<i;)s=t[n].call(this,s);return s}}))}function Ui(e,t,n,i,s,o,a,c,u,l){var p=t&d,h=1&t,f=2&t,m=24&t,g=512&t,v=f?r:Bi(e);return function r(){for(var d=arguments.length,y=oe(d),b=d;b--;)y[b]=arguments[b];if(m)var w=ds(r),_=tr(y,w);if(i&&(y=Di(y,i,s,m)),o&&(y=Mi(y,o,a,m)),d-=_,m&&d<l){var S=cr(y,w);return Qi(e,t,Ui,r.placeholder,n,y,S,c,u,l-d)}var k=h?n:this,C=f?k[e]:e;return d=y.length,c?y=Ms(y,c):g&&d>1&&y.reverse(),p&&u<d&&(y.length=u),this&&this!==pt&&this instanceof r&&(C=v||Bi(C)),C.apply(k,y)}}function zi(e,t){return function(r,n){return function(e,t,r,n){return Sn(e,(function(e,i,s){t(n,r(e),i,s)})),n}(r,e,t(n),{})}}function Vi(e,t){return function(n,i){var s;if(n===r&&i===r)return t;if(n!==r&&(s=n),i!==r){if(s===r)return i;"string"==typeof n||"string"==typeof i?(n=li(n),i=li(i)):(n=ui(n),i=ui(i)),s=e(n,i)}return s}}function $i(e){return is((function(t){return t=xt(t,Jt(us())),Zn((function(r){var n=this;return e(t,(function(e){return Ct(e,n,r)}))}))}))}function Hi(e,t){var n=(t=t===r?" ":li(t)).length;if(n<2)return n?Yn(t,e):t;var i=Yn(t,gt(e/lr(t)));return sr(t)?ki(pr(i),0,e).join(""):i.slice(0,e)}function Ki(e){return function(t,n,i){return i&&"number"!=typeof i&&_s(t,n,i)&&(n=i=r),t=ga(t),n===r?(n=t,t=0):n=ga(n),function(e,t,r,n){for(var i=-1,s=br(gt((t-e)/(r||1)),0),o=oe(s);s--;)o[n?s:++i]=e,e+=r;return o}(t,n,i=i===r?t<n?1:-1:ga(i),e)}}function Gi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ba(t),r=ba(r)),e(t,r)}}function Qi(e,t,n,i,s,o,d,u,l,p){var h=8&t;t|=h?a:c,4&(t&=~(h?c:a))||(t&=-4);var f=[e,t,s,h?o:r,h?d:r,h?r:o,h?r:d,u,l,p],m=n.apply(r,f);return ks(e)&&xs(m,f),m.placeholder=i,As(m,e,t)}function Ji(e){var t=Pe[e];return function(e,r){if(e=ba(e),(r=null==r?0:wr(va(r),292))&&gr(e)){var n=(_a(e)+"e").split("e");return+((n=(_a(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Yi=Er&&1/dr(new Er([,-0]))[1]==p?function(e){return new Er(e)}:lc;function Zi(e){return function(t){var r=gs(t);return r==C?or(t):r==D?ur(t):function(e,t){return xt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,i,l,p,h,f,m){var g=2&t;if(!g&&"function"!=typeof e)throw new Me(n);var v=l?l.length:0;if(v||(t&=-97,l=p=r),f=f===r?f:br(va(f),0),m=m===r?m:va(m),v-=p?p.length:0,t&c){var y=l,b=p;l=p=r}var w=g?r:as(e),_=[e,t,i,l,p,y,b,h,f,m];if(w&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,a=n==d&&8==r||n==d&&r==u&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!a)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?Di(l,c,t[4]):c,e[4]=l?cr(e[3],s):t[4]}(c=t[5])&&(l=e[5],e[5]=l?Mi(l,c,t[6]):c,e[6]=l?cr(e[5],s):t[6]);(c=t[7])&&(e[7]=c);n&d&&(e[8]=null==e[8]?t[8]:wr(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(_,w),e=_[0],t=_[1],i=_[2],l=_[3],p=_[4],!(m=_[9]=_[9]===r?g?0:e.length:br(_[9]-v,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||t==o?function(e,t,n){var i=Bi(e);return function s(){for(var o=arguments.length,a=oe(o),c=o,d=ds(s);c--;)a[c]=arguments[c];var u=o<3&&a[0]!==d&&a[o-1]!==d?[]:cr(a,d);return(o-=u.length)<n?Qi(e,t,Ui,s.placeholder,r,a,u,r,r,n-o):Ct(this&&this!==pt&&this instanceof s?i:e,this,a)}}(e,t,m):t!=a&&33!=t||p.length?Ui.apply(r,_):function(e,t,r,n){var i=1&t,s=Bi(e);return function t(){for(var o=-1,a=arguments.length,c=-1,d=n.length,u=oe(d+a),l=this&&this!==pt&&this instanceof t?s:e;++c<d;)u[c]=n[c];for(;a--;)u[c++]=arguments[++o];return Ct(l,i?r:this,u)}}(e,t,i,l);else var S=function(e,t,r){var n=1&t,i=Bi(e);return function t(){return(this&&this!==pt&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,i);return As((w?ri:xs)(S,_),e,t)}function es(e,t,n,i){return e===r||zo(e,Oe[n])&&!je.call(i,n)?t:e}function ts(e,t,n,i,s,o){return na(e)&&na(t)&&(o.set(t,e),Vn(e,t,r,ts,o),o.delete(t)),e}function rs(e){return aa(e)?r:e}function ns(e,t,n,i,s,o){var a=1&n,c=e.length,d=t.length;if(c!=d&&!(a&&d>c))return!1;var u=o.get(e),l=o.get(t);if(u&&l)return u==t&&l==e;var p=-1,h=!0,f=2&n?new Qr:r;for(o.set(e,t),o.set(t,e);++p<c;){var m=e[p],g=t[p];if(i)var v=a?i(g,m,p,t,e,o):i(m,g,p,e,t,o);if(v!==r){if(v)continue;h=!1;break}if(f){if(!jt(t,(function(e,t){if(!Zt(f,t)&&(m===e||s(m,e,n,i,o)))return f.push(t)}))){h=!1;break}}else if(m!==g&&!s(m,g,n,i,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function is(e){return Ls(Es(e,r,Ks),e+"")}function ss(e){return Pn(e,La,fs)}function os(e){return Pn(e,Aa,ms)}var as=Ir?function(e){return Ir.get(e)}:lc;function cs(e){for(var t=e.name+"",r=xr[t],n=je.call(xr,t)?r.length:0;n--;){var i=r[n],s=i.func;if(null==s||s==e)return i.name}return t}function ds(e){return(je.call(qr,"placeholder")?qr:e).placeholder}function us(){var e=qr.iteratee||ac;return e=e===ac?Fn:e,arguments.length?e(arguments[0],arguments[1]):e}function ls(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function ps(e){for(var t=La(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,Ps(i)]}return t}function hs(e,t){var n=function(e,t){return null==e?r:e[t]}(e,t);return jn(n)?n:r}var fs=Ft?function(e){return null==e?[]:(e=Te(e),Dt(Ft(e),(function(t){return Qe.call(e,t)})))}:yc,ms=Ft?function(e){for(var t=[];e;)Ot(t,fs(e)),e=Ke(e);return t}:yc,gs=Tn;function vs(e,t,r){for(var n=-1,i=(t=_i(t,e)).length,s=!1;++n<i;){var o=Bs(t[n]);if(!(s=null!=e&&r(e,o)))break;e=e[o]}return s||++n!=i?s:!!(i=null==e?0:e.length)&&ra(i)&&ws(o,i)&&(Ko(e)||Ho(e))}function ys(e){return"function"!=typeof e.constructor||Rs(e)?{}:Ur(Ke(e))}function bs(e){return Ko(e)||Ho(e)||!!(Xe&&e&&e[Xe])}function ws(e,t){var r=typeof e;return!!(t=null==t?h:t)&&("number"==r||"symbol"!=r&&be.test(e))&&e>-1&&e%1==0&&e<t}function _s(e,t,r){if(!na(r))return!1;var n=typeof t;return!!("number"==n?Qo(r)&&ws(t,r.length):"string"==n&&t in r)&&zo(r[t],e)}function Ss(e,t){if(Ko(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!la(e))||(te.test(e)||!ee.test(e)||null!=t&&e in Te(t))}function ks(e){var t=cs(e),r=qr[t];if("function"!=typeof r||!(t in $r.prototype))return!1;if(e===r)return!0;var n=as(r);return!!n&&e===n[0]}(Rr&&gs(new Rr(new ArrayBuffer(1)))!=L||Pr&&gs(new Pr)!=C||Tr&&gs(Tr.resolve())!=T||Er&&gs(new Er)!=D||Dr&&gs(new Dr)!=x)&&(gs=function(e){var t=Tn(e),n=t==P?e.constructor:r,i=n?Ws(n):"";if(i)switch(i){case Or:return L;case Lr:return C;case Ar:return T;case jr:return D;case Fr:return x}return t});var Cs=Le?ea:bc;function Rs(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Oe)}function Ps(e){return e==e&&!na(e)}function Ts(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==r||e in Te(n)))}}function Es(e,t,n){return t=br(t===r?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=br(r.length-t,0),o=oe(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=oe(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),Ct(e,this,a)}}function Ds(e,t){return t.length<2?e:Rn(e,si(t,0,-1))}function Ms(e,t){for(var n=e.length,i=wr(t.length,n),s=Ii(e);i--;){var o=t[i];e[i]=ws(o,n)?s[o]:r}return e}function Is(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var xs=js(ri),Os=ft||function(e,t){return pt.setTimeout(e,t)},Ls=js(ni);function As(e,t,r){var n=t+"";return Ls(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Pt(g,(function(r){var n="_."+r[0];t&r[1]&&!Mt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(de):[]}(n),r)))}function js(e){var t=0,n=0;return function(){var i=_r(),s=16-(i-n);if(n=i,s>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(r,arguments)}}function Fs(e,t){var n=-1,i=e.length,s=i-1;for(t=t===r?i:t;++n<t;){var o=Jn(n,s),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}var Ns=function(e){var t=Fo(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,r,n,i){t.push(n?i.replace(pe,"$1"):r||e)})),t}));function Bs(e){if("string"==typeof e||la(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ws(e){if(null!=e){try{return Ae.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qs(e){if(e instanceof $r)return e.clone();var t=new Vr(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Us=Zn((function(e,t){return Jo(e)?hn(e,bn(t,1,Jo,!0)):[]})),zs=Zn((function(e,t){var n=Zs(t);return Jo(n)&&(n=r),Jo(e)?hn(e,bn(t,1,Jo,!0),us(n,2)):[]})),Vs=Zn((function(e,t){var n=Zs(t);return Jo(n)&&(n=r),Jo(e)?hn(e,bn(t,1,Jo,!0),r,n):[]}));function $s(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:va(r);return i<0&&(i=br(n+i,0)),Bt(e,us(t,3),i)}function Hs(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i-1;return n!==r&&(s=va(n),s=n<0?br(i+s,0):wr(s,i-1)),Bt(e,us(t,3),s,!0)}function Ks(e){return(null==e?0:e.length)?bn(e,1):[]}function Gs(e){return e&&e.length?e[0]:r}var Qs=Zn((function(e){var t=xt(e,bi);return t.length&&t[0]===e[0]?In(t):[]})),Js=Zn((function(e){var t=Zs(e),n=xt(e,bi);return t===Zs(n)?t=r:n.pop(),n.length&&n[0]===e[0]?In(n,us(t,2)):[]})),Ys=Zn((function(e){var t=Zs(e),n=xt(e,bi);return(t="function"==typeof t?t:r)&&n.pop(),n.length&&n[0]===e[0]?In(n,r,t):[]}));function Zs(e){var t=null==e?0:e.length;return t?e[t-1]:r}var Xs=Zn(eo);function eo(e,t){return e&&e.length&&t&&t.length?Gn(e,t):e}var to=is((function(e,t){var r=null==e?0:e.length,n=cn(e,t);return Qn(e,xt(t,(function(e){return ws(e,r)?+e:e})).sort(Ei)),n}));function ro(e){return null==e?e:Cr.call(e)}var no=Zn((function(e){return pi(bn(e,1,Jo,!0))})),io=Zn((function(e){var t=Zs(e);return Jo(t)&&(t=r),pi(bn(e,1,Jo,!0),us(t,2))})),so=Zn((function(e){var t=Zs(e);return t="function"==typeof t?t:r,pi(bn(e,1,Jo,!0),r,t)}));function oo(e){if(!e||!e.length)return[];var t=0;return e=Dt(e,(function(e){if(Jo(e))return t=br(e.length,t),!0})),Gt(t,(function(t){return xt(e,Vt(t))}))}function ao(e,t){if(!e||!e.length)return[];var n=oo(e);return null==t?n:xt(n,(function(e){return Ct(t,r,e)}))}var co=Zn((function(e,t){return Jo(e)?hn(e,t):[]})),uo=Zn((function(e){return vi(Dt(e,Jo))})),lo=Zn((function(e){var t=Zs(e);return Jo(t)&&(t=r),vi(Dt(e,Jo),us(t,2))})),po=Zn((function(e){var t=Zs(e);return t="function"==typeof t?t:r,vi(Dt(e,Jo),r,t)})),ho=Zn(oo);var fo=Zn((function(e){var t=e.length,n=t>1?e[t-1]:r;return n="function"==typeof n?(e.pop(),n):r,ao(e,n)}));function mo(e){var t=qr(e);return t.__chain__=!0,t}function go(e,t){return t(e)}var vo=is((function(e){var t=e.length,n=t?e[0]:0,i=this.__wrapped__,s=function(t){return cn(t,e)};return!(t>1||this.__actions__.length)&&i instanceof $r&&ws(n)?((i=i.slice(n,+n+(t?1:0))).__actions__.push({func:go,args:[s],thisArg:r}),new Vr(i,this.__chain__).thru((function(e){return t&&!e.length&&e.push(r),e}))):this.thru(s)}));var yo=Oi((function(e,t,r){je.call(e,r)?++e[r]:an(e,r,1)}));var bo=Wi($s),wo=Wi(Hs);function _o(e,t){return(Ko(e)?Pt:fn)(e,us(t,3))}function So(e,t){return(Ko(e)?Tt:mn)(e,us(t,3))}var ko=Oi((function(e,t,r){je.call(e,r)?e[r].push(t):an(e,r,[t])}));var Co=Zn((function(e,t,r){var n=-1,i="function"==typeof t,s=Qo(e)?oe(e.length):[];return fn(e,(function(e){s[++n]=i?Ct(t,e,r):xn(e,t,r)})),s})),Ro=Oi((function(e,t,r){an(e,r,t)}));function Po(e,t){return(Ko(e)?xt:qn)(e,us(t,3))}var To=Oi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Eo=Zn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&_s(e,t[0],t[1])?t=[]:r>2&&_s(t[0],t[1],t[2])&&(t=[t[0]]),Hn(e,bn(t,1),[])})),Do=ht||function(){return pt.Date.now()};function Mo(e,t,n){return t=n?r:t,t=e&&null==t?e.length:t,Xi(e,d,r,r,r,r,t)}function Io(e,t){var i;if("function"!=typeof t)throw new Me(n);return e=va(e),function(){return--e>0&&(i=t.apply(this,arguments)),e<=1&&(t=r),i}}var xo=Zn((function(e,t,r){var n=1;if(r.length){var i=cr(r,ds(xo));n|=a}return Xi(e,n,t,r,i)})),Oo=Zn((function(e,t,r){var n=3;if(r.length){var i=cr(r,ds(Oo));n|=a}return Xi(t,n,e,r,i)}));function Lo(e,t,i){var s,o,a,c,d,u,l=0,p=!1,h=!1,f=!0;if("function"!=typeof e)throw new Me(n);function m(t){var n=s,i=o;return s=o=r,l=t,c=e.apply(i,n)}function g(e){return l=e,d=Os(y,t),p?m(e):c}function v(e){var n=e-u;return u===r||n>=t||n<0||h&&e-l>=a}function y(){var e=Do();if(v(e))return b(e);d=Os(y,function(e){var r=t-(e-u);return h?wr(r,a-(e-l)):r}(e))}function b(e){return d=r,f&&s?m(e):(s=o=r,c)}function w(){var e=Do(),n=v(e);if(s=arguments,o=this,u=e,n){if(d===r)return g(u);if(h)return Ci(d),d=Os(y,t),m(u)}return d===r&&(d=Os(y,t)),c}return t=ba(t)||0,na(i)&&(p=!!i.leading,a=(h="maxWait"in i)?br(ba(i.maxWait)||0,t):a,f="trailing"in i?!!i.trailing:f),w.cancel=function(){d!==r&&Ci(d),l=0,s=u=o=d=r},w.flush=function(){return d===r?c:b(Do())},w}var Ao=Zn((function(e,t){return pn(e,1,t)})),jo=Zn((function(e,t,r){return pn(e,ba(t)||0,r)}));function Fo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Me(n);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(Fo.Cache||Gr),r}function No(e){if("function"!=typeof e)throw new Me(n);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)}}Fo.Cache=Gr;var Bo=Si((function(e,t){var r=(t=1==t.length&&Ko(t[0])?xt(t[0],Jt(us())):xt(bn(t,1),Jt(us()))).length;return Zn((function(n){for(var i=-1,s=wr(n.length,r);++i<s;)n[i]=t[i].call(this,n[i]);return Ct(e,this,n)}))})),Wo=Zn((function(e,t){var n=cr(t,ds(Wo));return Xi(e,a,r,t,n)})),qo=Zn((function(e,t){var n=cr(t,ds(qo));return Xi(e,c,r,t,n)})),Uo=is((function(e,t){return Xi(e,u,r,r,r,t)}));function zo(e,t){return e===t||e!=e&&t!=t}var Vo=Gi(En),$o=Gi((function(e,t){return e>=t})),Ho=On(function(){return arguments}())?On:function(e){return ia(e)&&je.call(e,"callee")&&!Qe.call(e,"callee")},Ko=oe.isArray,Go=yt?Jt(yt):function(e){return ia(e)&&Tn(e)==O};function Qo(e){return null!=e&&ra(e.length)&&!ea(e)}function Jo(e){return ia(e)&&Qo(e)}var Yo=$t||bc,Zo=bt?Jt(bt):function(e){return ia(e)&&Tn(e)==w};function Xo(e){if(!ia(e))return!1;var t=Tn(e);return t==_||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!aa(e)}function ea(e){if(!na(e))return!1;var t=Tn(e);return t==S||t==k||"[object AsyncFunction]"==t||"[object Proxy]"==t}function ta(e){return"number"==typeof e&&e==va(e)}function ra(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=h}function na(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ia(e){return null!=e&&"object"==typeof e}var sa=wt?Jt(wt):function(e){return ia(e)&&gs(e)==C};function oa(e){return"number"==typeof e||ia(e)&&Tn(e)==R}function aa(e){if(!ia(e)||Tn(e)!=P)return!1;var t=Ke(e);if(null===t)return!0;var r=je.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Ae.call(r)==We}var ca=_t?Jt(_t):function(e){return ia(e)&&Tn(e)==E};var da=St?Jt(St):function(e){return ia(e)&&gs(e)==D};function ua(e){return"string"==typeof e||!Ko(e)&&ia(e)&&Tn(e)==M}function la(e){return"symbol"==typeof e||ia(e)&&Tn(e)==I}var pa=kt?Jt(kt):function(e){return ia(e)&&ra(e.length)&&!!st[Tn(e)]};var ha=Gi(Wn),fa=Gi((function(e,t){return e<=t}));function ma(e){if(!e)return[];if(Qo(e))return ua(e)?pr(e):Ii(e);if(tt&&e[tt])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[tt]());var t=gs(e);return(t==C?or:t==D?dr:za)(e)}function ga(e){return e?(e=ba(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function va(e){var t=ga(e),r=t%1;return t==t?r?t-r:t:0}function ya(e){return e?dn(va(e),0,m):0}function ba(e){if("number"==typeof e)return e;if(la(e))return f;if(na(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=na(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Qt(e);var r=ge.test(e);return r||ye.test(e)?dt(e.slice(2),r?2:8):me.test(e)?f:+e}function wa(e){return xi(e,Aa(e))}function _a(e){return null==e?"":li(e)}var Sa=Li((function(e,t){if(Rs(t)||Qo(t))xi(t,La(t),e);else for(var r in t)je.call(t,r)&&rn(e,r,t[r])})),ka=Li((function(e,t){xi(t,Aa(t),e)})),Ca=Li((function(e,t,r,n){xi(t,Aa(t),e,n)})),Ra=Li((function(e,t,r,n){xi(t,La(t),e,n)})),Pa=is(cn);var Ta=Zn((function(e,t){e=Te(e);var n=-1,i=t.length,s=i>2?t[2]:r;for(s&&_s(t[0],t[1],s)&&(i=1);++n<i;)for(var o=t[n],a=Aa(o),c=-1,d=a.length;++c<d;){var u=a[c],l=e[u];(l===r||zo(l,Oe[u])&&!je.call(e,u))&&(e[u]=o[u])}return e})),Ea=Zn((function(e){return e.push(r,ts),Ct(Fa,r,e)}));function Da(e,t,n){var i=null==e?r:Rn(e,t);return i===r?n:i}function Ma(e,t){return null!=e&&vs(e,t,Mn)}var Ia=zi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),e[t]=r}),nc(oc)),xa=zi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),je.call(e,t)?e[t].push(r):e[t]=[r]}),us),Oa=Zn(xn);function La(e){return Qo(e)?Yr(e):Nn(e)}function Aa(e){return Qo(e)?Yr(e,!0):Bn(e)}var ja=Li((function(e,t,r){Vn(e,t,r)})),Fa=Li((function(e,t,r,n){Vn(e,t,r,n)})),Na=is((function(e,t){var r={};if(null==e)return r;var n=!1;t=xt(t,(function(t){return t=_i(t,e),n||(n=t.length>1),t})),xi(e,os(e),r),n&&(r=un(r,7,rs));for(var i=t.length;i--;)hi(r,t[i]);return r}));var Ba=is((function(e,t){return null==e?{}:function(e,t){return Kn(e,t,(function(t,r){return Ma(e,r)}))}(e,t)}));function Wa(e,t){if(null==e)return{};var r=xt(os(e),(function(e){return[e]}));return t=us(t),Kn(e,r,(function(e,r){return t(e,r[0])}))}var qa=Zi(La),Ua=Zi(Aa);function za(e){return null==e?[]:Yt(e,La(e))}var Va=Ni((function(e,t,r){return t=t.toLowerCase(),e+(r?$a(t):t)}));function $a(e){return Xa(_a(e).toLowerCase())}function Ha(e){return(e=_a(e))&&e.replace(we,rr).replace(Ze,"")}var Ka=Ni((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ga=Ni((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Qa=Fi("toLowerCase");var Ja=Ni((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Ya=Ni((function(e,t,r){return e+(r?" ":"")+Xa(t)}));var Za=Ni((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Xa=Fi("toUpperCase");function ec(e,t,n){return e=_a(e),(t=n?r:t)===r?function(e){return rt.test(e)}(e)?function(e){return e.match(et)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var tc=Zn((function(e,t){try{return Ct(e,r,t)}catch(e){return Xo(e)?e:new Ce(e)}})),rc=is((function(e,t){return Pt(t,(function(t){t=Bs(t),an(e,t,xo(e[t],e))})),e}));function nc(e){return function(){return e}}var ic=qi(),sc=qi(!0);function oc(e){return e}function ac(e){return Fn("function"==typeof e?e:un(e,1))}var cc=Zn((function(e,t){return function(r){return xn(r,e,t)}})),dc=Zn((function(e,t){return function(r){return xn(e,r,t)}}));function uc(e,t,r){var n=La(t),i=Cn(t,n);null!=r||na(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=Cn(t,La(t)));var s=!(na(r)&&"chain"in r&&!r.chain),o=ea(e);return Pt(i,(function(r){var n=t[r];e[r]=n,o&&(e.prototype[r]=function(){var t=this.__chain__;if(s||t){var r=e(this.__wrapped__),i=r.__actions__=Ii(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Ot([this.value()],arguments))})})),e}function lc(){}var pc=$i(xt),hc=$i(Et),fc=$i(jt);function mc(e){return Ss(e)?Vt(Bs(e)):function(e){return function(t){return Rn(t,e)}}(e)}var gc=Ki(),vc=Ki(!0);function yc(){return[]}function bc(){return!1}var wc=Vi((function(e,t){return e+t}),0),_c=Ji("ceil"),Sc=Vi((function(e,t){return e/t}),1),kc=Ji("floor");var Cc,Rc=Vi((function(e,t){return e*t}),1),Pc=Ji("round"),Tc=Vi((function(e,t){return e-t}),0);return qr.after=function(e,t){if("function"!=typeof t)throw new Me(n);return e=va(e),function(){if(--e<1)return t.apply(this,arguments)}},qr.ary=Mo,qr.assign=Sa,qr.assignIn=ka,qr.assignInWith=Ca,qr.assignWith=Ra,qr.at=Pa,qr.before=Io,qr.bind=xo,qr.bindAll=rc,qr.bindKey=Oo,qr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ko(e)?e:[e]},qr.chain=mo,qr.chunk=function(e,t,n){t=(n?_s(e,t,n):t===r)?1:br(va(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var s=0,o=0,a=oe(gt(i/t));s<i;)a[o++]=si(e,s,s+=t);return a},qr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var s=e[t];s&&(i[n++]=s)}return i},qr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=oe(e-1),r=arguments[0],n=e;n--;)t[n-1]=arguments[n];return Ot(Ko(r)?Ii(r):[r],bn(t,1))},qr.cond=function(e){var t=null==e?0:e.length,r=us();return e=t?xt(e,(function(e){if("function"!=typeof e[1])throw new Me(n);return[r(e[0]),e[1]]})):[],Zn((function(r){for(var n=-1;++n<t;){var i=e[n];if(Ct(i[0],this,r))return Ct(i[1],this,r)}}))},qr.conforms=function(e){return function(e){var t=La(e);return function(r){return ln(r,e,t)}}(un(e,1))},qr.constant=nc,qr.countBy=yo,qr.create=function(e,t){var r=Ur(e);return null==t?r:on(r,t)},qr.curry=function e(t,n,i){var s=Xi(t,8,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},qr.curryRight=function e(t,n,i){var s=Xi(t,o,r,r,r,r,r,n=i?r:n);return s.placeholder=e.placeholder,s},qr.debounce=Lo,qr.defaults=Ta,qr.defaultsDeep=Ea,qr.defer=Ao,qr.delay=jo,qr.difference=Us,qr.differenceBy=zs,qr.differenceWith=Vs,qr.drop=function(e,t,n){var i=null==e?0:e.length;return i?si(e,(t=n||t===r?1:va(t))<0?0:t,i):[]},qr.dropRight=function(e,t,n){var i=null==e?0:e.length;return i?si(e,0,(t=i-(t=n||t===r?1:va(t)))<0?0:t):[]},qr.dropRightWhile=function(e,t){return e&&e.length?mi(e,us(t,3),!0,!0):[]},qr.dropWhile=function(e,t){return e&&e.length?mi(e,us(t,3),!0):[]},qr.fill=function(e,t,n,i){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&_s(e,t,n)&&(n=0,i=s),function(e,t,n,i){var s=e.length;for((n=va(n))<0&&(n=-n>s?0:s+n),(i=i===r||i>s?s:va(i))<0&&(i+=s),i=n>i?0:ya(i);n<i;)e[n++]=t;return e}(e,t,n,i)):[]},qr.filter=function(e,t){return(Ko(e)?Dt:yn)(e,us(t,3))},qr.flatMap=function(e,t){return bn(Po(e,t),1)},qr.flatMapDeep=function(e,t){return bn(Po(e,t),p)},qr.flatMapDepth=function(e,t,n){return n=n===r?1:va(n),bn(Po(e,t),n)},qr.flatten=Ks,qr.flattenDeep=function(e){return(null==e?0:e.length)?bn(e,p):[]},qr.flattenDepth=function(e,t){return(null==e?0:e.length)?bn(e,t=t===r?1:va(t)):[]},qr.flip=function(e){return Xi(e,512)},qr.flow=ic,qr.flowRight=sc,qr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},qr.functions=function(e){return null==e?[]:Cn(e,La(e))},qr.functionsIn=function(e){return null==e?[]:Cn(e,Aa(e))},qr.groupBy=ko,qr.initial=function(e){return(null==e?0:e.length)?si(e,0,-1):[]},qr.intersection=Qs,qr.intersectionBy=Js,qr.intersectionWith=Ys,qr.invert=Ia,qr.invertBy=xa,qr.invokeMap=Co,qr.iteratee=ac,qr.keyBy=Ro,qr.keys=La,qr.keysIn=Aa,qr.map=Po,qr.mapKeys=function(e,t){var r={};return t=us(t,3),Sn(e,(function(e,n,i){an(r,t(e,n,i),e)})),r},qr.mapValues=function(e,t){var r={};return t=us(t,3),Sn(e,(function(e,n,i){an(r,n,t(e,n,i))})),r},qr.matches=function(e){return Un(un(e,1))},qr.matchesProperty=function(e,t){return zn(e,un(t,1))},qr.memoize=Fo,qr.merge=ja,qr.mergeWith=Fa,qr.method=cc,qr.methodOf=dc,qr.mixin=uc,qr.negate=No,qr.nthArg=function(e){return e=va(e),Zn((function(t){return $n(t,e)}))},qr.omit=Na,qr.omitBy=function(e,t){return Wa(e,No(us(t)))},qr.once=function(e){return Io(2,e)},qr.orderBy=function(e,t,n,i){return null==e?[]:(Ko(t)||(t=null==t?[]:[t]),Ko(n=i?r:n)||(n=null==n?[]:[n]),Hn(e,t,n))},qr.over=pc,qr.overArgs=Bo,qr.overEvery=hc,qr.overSome=fc,qr.partial=Wo,qr.partialRight=qo,qr.partition=To,qr.pick=Ba,qr.pickBy=Wa,qr.property=mc,qr.propertyOf=function(e){return function(t){return null==e?r:Rn(e,t)}},qr.pull=Xs,qr.pullAll=eo,qr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Gn(e,t,us(r,2)):e},qr.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Gn(e,t,r,n):e},qr.pullAt=to,qr.range=gc,qr.rangeRight=vc,qr.rearg=Uo,qr.reject=function(e,t){return(Ko(e)?Dt:yn)(e,No(us(t,3)))},qr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],s=e.length;for(t=us(t,3);++n<s;){var o=e[n];t(o,n,e)&&(r.push(o),i.push(n))}return Qn(e,i),r},qr.rest=function(e,t){if("function"!=typeof e)throw new Me(n);return Zn(e,t=t===r?t:va(t))},qr.reverse=ro,qr.sampleSize=function(e,t,n){return t=(n?_s(e,t,n):t===r)?1:va(t),(Ko(e)?Xr:ei)(e,t)},qr.set=function(e,t,r){return null==e?e:ti(e,t,r)},qr.setWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:ti(e,t,n,i)},qr.shuffle=function(e){return(Ko(e)?en:ii)(e)},qr.slice=function(e,t,n){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&_s(e,t,n)?(t=0,n=i):(t=null==t?0:va(t),n=n===r?i:va(n)),si(e,t,n)):[]},qr.sortBy=Eo,qr.sortedUniq=function(e){return e&&e.length?di(e):[]},qr.sortedUniqBy=function(e,t){return e&&e.length?di(e,us(t,2)):[]},qr.split=function(e,t,n){return n&&"number"!=typeof n&&_s(e,t,n)&&(t=n=r),(n=n===r?m:n>>>0)?(e=_a(e))&&("string"==typeof t||null!=t&&!ca(t))&&!(t=li(t))&&sr(e)?ki(pr(e),0,n):e.split(t,n):[]},qr.spread=function(e,t){if("function"!=typeof e)throw new Me(n);return t=null==t?0:br(va(t),0),Zn((function(r){var n=r[t],i=ki(r,0,t);return n&&Ot(i,n),Ct(e,this,i)}))},qr.tail=function(e){var t=null==e?0:e.length;return t?si(e,1,t):[]},qr.take=function(e,t,n){return e&&e.length?si(e,0,(t=n||t===r?1:va(t))<0?0:t):[]},qr.takeRight=function(e,t,n){var i=null==e?0:e.length;return i?si(e,(t=i-(t=n||t===r?1:va(t)))<0?0:t,i):[]},qr.takeRightWhile=function(e,t){return e&&e.length?mi(e,us(t,3),!1,!0):[]},qr.takeWhile=function(e,t){return e&&e.length?mi(e,us(t,3)):[]},qr.tap=function(e,t){return t(e),e},qr.throttle=function(e,t,r){var i=!0,s=!0;if("function"!=typeof e)throw new Me(n);return na(r)&&(i="leading"in r?!!r.leading:i,s="trailing"in r?!!r.trailing:s),Lo(e,t,{leading:i,maxWait:t,trailing:s})},qr.thru=go,qr.toArray=ma,qr.toPairs=qa,qr.toPairsIn=Ua,qr.toPath=function(e){return Ko(e)?xt(e,Bs):la(e)?[e]:Ii(Ns(_a(e)))},qr.toPlainObject=wa,qr.transform=function(e,t,r){var n=Ko(e),i=n||Yo(e)||pa(e);if(t=us(t,4),null==r){var s=e&&e.constructor;r=i?n?new s:[]:na(e)&&ea(s)?Ur(Ke(e)):{}}return(i?Pt:Sn)(e,(function(e,n,i){return t(r,e,n,i)})),r},qr.unary=function(e){return Mo(e,1)},qr.union=no,qr.unionBy=io,qr.unionWith=so,qr.uniq=function(e){return e&&e.length?pi(e):[]},qr.uniqBy=function(e,t){return e&&e.length?pi(e,us(t,2)):[]},qr.uniqWith=function(e,t){return t="function"==typeof t?t:r,e&&e.length?pi(e,r,t):[]},qr.unset=function(e,t){return null==e||hi(e,t)},qr.unzip=oo,qr.unzipWith=ao,qr.update=function(e,t,r){return null==e?e:fi(e,t,wi(r))},qr.updateWith=function(e,t,n,i){return i="function"==typeof i?i:r,null==e?e:fi(e,t,wi(n),i)},qr.values=za,qr.valuesIn=function(e){return null==e?[]:Yt(e,Aa(e))},qr.without=co,qr.words=ec,qr.wrap=function(e,t){return Wo(wi(t),e)},qr.xor=uo,qr.xorBy=lo,qr.xorWith=po,qr.zip=ho,qr.zipObject=function(e,t){return yi(e||[],t||[],rn)},qr.zipObjectDeep=function(e,t){return yi(e||[],t||[],ti)},qr.zipWith=fo,qr.entries=qa,qr.entriesIn=Ua,qr.extend=ka,qr.extendWith=Ca,uc(qr,qr),qr.add=wc,qr.attempt=tc,qr.camelCase=Va,qr.capitalize=$a,qr.ceil=_c,qr.clamp=function(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=(n=ba(n))==n?n:0),t!==r&&(t=(t=ba(t))==t?t:0),dn(ba(e),t,n)},qr.clone=function(e){return un(e,4)},qr.cloneDeep=function(e){return un(e,5)},qr.cloneDeepWith=function(e,t){return un(e,5,t="function"==typeof t?t:r)},qr.cloneWith=function(e,t){return un(e,4,t="function"==typeof t?t:r)},qr.conformsTo=function(e,t){return null==t||ln(e,t,La(t))},qr.deburr=Ha,qr.defaultTo=function(e,t){return null==e||e!=e?t:e},qr.divide=Sc,qr.endsWith=function(e,t,n){e=_a(e),t=li(t);var i=e.length,s=n=n===r?i:dn(va(n),0,i);return(n-=t.length)>=0&&e.slice(n,s)==t},qr.eq=zo,qr.escape=function(e){return(e=_a(e))&&J.test(e)?e.replace(G,nr):e},qr.escapeRegExp=function(e){return(e=_a(e))&&ie.test(e)?e.replace(ne,"\\$&"):e},qr.every=function(e,t,n){var i=Ko(e)?Et:gn;return n&&_s(e,t,n)&&(t=r),i(e,us(t,3))},qr.find=bo,qr.findIndex=$s,qr.findKey=function(e,t){return Nt(e,us(t,3),Sn)},qr.findLast=wo,qr.findLastIndex=Hs,qr.findLastKey=function(e,t){return Nt(e,us(t,3),kn)},qr.floor=kc,qr.forEach=_o,qr.forEachRight=So,qr.forIn=function(e,t){return null==e?e:wn(e,us(t,3),Aa)},qr.forInRight=function(e,t){return null==e?e:_n(e,us(t,3),Aa)},qr.forOwn=function(e,t){return e&&Sn(e,us(t,3))},qr.forOwnRight=function(e,t){return e&&kn(e,us(t,3))},qr.get=Da,qr.gt=Vo,qr.gte=$o,qr.has=function(e,t){return null!=e&&vs(e,t,Dn)},qr.hasIn=Ma,qr.head=Gs,qr.identity=oc,qr.includes=function(e,t,r,n){e=Qo(e)?e:za(e),r=r&&!n?va(r):0;var i=e.length;return r<0&&(r=br(i+r,0)),ua(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Wt(e,t,r)>-1},qr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:va(r);return i<0&&(i=br(n+i,0)),Wt(e,t,i)},qr.inRange=function(e,t,n){return t=ga(t),n===r?(n=t,t=0):n=ga(n),function(e,t,r){return e>=wr(t,r)&&e<br(t,r)}(e=ba(e),t,n)},qr.invoke=Oa,qr.isArguments=Ho,qr.isArray=Ko,qr.isArrayBuffer=Go,qr.isArrayLike=Qo,qr.isArrayLikeObject=Jo,qr.isBoolean=function(e){return!0===e||!1===e||ia(e)&&Tn(e)==b},qr.isBuffer=Yo,qr.isDate=Zo,qr.isElement=function(e){return ia(e)&&1===e.nodeType&&!aa(e)},qr.isEmpty=function(e){if(null==e)return!0;if(Qo(e)&&(Ko(e)||"string"==typeof e||"function"==typeof e.splice||Yo(e)||pa(e)||Ho(e)))return!e.length;var t=gs(e);if(t==C||t==D)return!e.size;if(Rs(e))return!Nn(e).length;for(var r in e)if(je.call(e,r))return!1;return!0},qr.isEqual=function(e,t){return Ln(e,t)},qr.isEqualWith=function(e,t,n){var i=(n="function"==typeof n?n:r)?n(e,t):r;return i===r?Ln(e,t,r,n):!!i},qr.isError=Xo,qr.isFinite=function(e){return"number"==typeof e&&gr(e)},qr.isFunction=ea,qr.isInteger=ta,qr.isLength=ra,qr.isMap=sa,qr.isMatch=function(e,t){return e===t||An(e,t,ps(t))},qr.isMatchWith=function(e,t,n){return n="function"==typeof n?n:r,An(e,t,ps(t),n)},qr.isNaN=function(e){return oa(e)&&e!=+e},qr.isNative=function(e){if(Cs(e))throw new Ce("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return jn(e)},qr.isNil=function(e){return null==e},qr.isNull=function(e){return null===e},qr.isNumber=oa,qr.isObject=na,qr.isObjectLike=ia,qr.isPlainObject=aa,qr.isRegExp=ca,qr.isSafeInteger=function(e){return ta(e)&&e>=-9007199254740991&&e<=h},qr.isSet=da,qr.isString=ua,qr.isSymbol=la,qr.isTypedArray=pa,qr.isUndefined=function(e){return e===r},qr.isWeakMap=function(e){return ia(e)&&gs(e)==x},qr.isWeakSet=function(e){return ia(e)&&"[object WeakSet]"==Tn(e)},qr.join=function(e,t){return null==e?"":vr.call(e,t)},qr.kebabCase=Ka,qr.last=Zs,qr.lastIndexOf=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=i;return n!==r&&(s=(s=va(n))<0?br(i+s,0):wr(s,i-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,s):Bt(e,Ut,s,!0)},qr.lowerCase=Ga,qr.lowerFirst=Qa,qr.lt=ha,qr.lte=fa,qr.max=function(e){return e&&e.length?vn(e,oc,En):r},qr.maxBy=function(e,t){return e&&e.length?vn(e,us(t,2),En):r},qr.mean=function(e){return zt(e,oc)},qr.meanBy=function(e,t){return zt(e,us(t,2))},qr.min=function(e){return e&&e.length?vn(e,oc,Wn):r},qr.minBy=function(e,t){return e&&e.length?vn(e,us(t,2),Wn):r},qr.stubArray=yc,qr.stubFalse=bc,qr.stubObject=function(){return{}},qr.stubString=function(){return""},qr.stubTrue=function(){return!0},qr.multiply=Rc,qr.nth=function(e,t){return e&&e.length?$n(e,va(t)):r},qr.noConflict=function(){return pt._===this&&(pt._=qe),this},qr.noop=lc,qr.now=Do,qr.pad=function(e,t,r){e=_a(e);var n=(t=va(t))?lr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Hi(vt(i),r)+e+Hi(gt(i),r)},qr.padEnd=function(e,t,r){e=_a(e);var n=(t=va(t))?lr(e):0;return t&&n<t?e+Hi(t-n,r):e},qr.padStart=function(e,t,r){e=_a(e);var n=(t=va(t))?lr(e):0;return t&&n<t?Hi(t-n,r)+e:e},qr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),Sr(_a(e).replace(se,""),t||0)},qr.random=function(e,t,n){if(n&&"boolean"!=typeof n&&_s(e,t,n)&&(t=n=r),n===r&&("boolean"==typeof t?(n=t,t=r):"boolean"==typeof e&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=ga(e),t===r?(t=e,e=0):t=ga(t)),e>t){var i=e;e=t,t=i}if(n||e%1||t%1){var s=kr();return wr(e+s*(t-e+ct("1e-"+((s+"").length-1))),t)}return Jn(e,t)},qr.reduce=function(e,t,r){var n=Ko(e)?Lt:Ht,i=arguments.length<3;return n(e,us(t,4),r,i,fn)},qr.reduceRight=function(e,t,r){var n=Ko(e)?At:Ht,i=arguments.length<3;return n(e,us(t,4),r,i,mn)},qr.repeat=function(e,t,n){return t=(n?_s(e,t,n):t===r)?1:va(t),Yn(_a(e),t)},qr.replace=function(){var e=arguments,t=_a(e[0]);return e.length<3?t:t.replace(e[1],e[2])},qr.result=function(e,t,n){var i=-1,s=(t=_i(t,e)).length;for(s||(s=1,e=r);++i<s;){var o=null==e?r:e[Bs(t[i])];o===r&&(i=s,o=n),e=ea(o)?o.call(e):o}return e},qr.round=Pc,qr.runInContext=e,qr.sample=function(e){return(Ko(e)?Zr:Xn)(e)},qr.size=function(e){if(null==e)return 0;if(Qo(e))return ua(e)?lr(e):e.length;var t=gs(e);return t==C||t==D?e.size:Nn(e).length},qr.snakeCase=Ja,qr.some=function(e,t,n){var i=Ko(e)?jt:oi;return n&&_s(e,t,n)&&(t=r),i(e,us(t,3))},qr.sortedIndex=function(e,t){return ai(e,t)},qr.sortedIndexBy=function(e,t,r){return ci(e,t,us(r,2))},qr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ai(e,t);if(n<r&&zo(e[n],t))return n}return-1},qr.sortedLastIndex=function(e,t){return ai(e,t,!0)},qr.sortedLastIndexBy=function(e,t,r){return ci(e,t,us(r,2),!0)},qr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=ai(e,t,!0)-1;if(zo(e[r],t))return r}return-1},qr.startCase=Ya,qr.startsWith=function(e,t,r){return e=_a(e),r=null==r?0:dn(va(r),0,e.length),t=li(t),e.slice(r,r+t.length)==t},qr.subtract=Tc,qr.sum=function(e){return e&&e.length?Kt(e,oc):0},qr.sumBy=function(e,t){return e&&e.length?Kt(e,us(t,2)):0},qr.template=function(e,t,n){var i=qr.templateSettings;n&&_s(e,t,n)&&(t=r),e=_a(e),t=Ca({},t,i,es);var s,o,a=Ca({},t.imports,i.imports,es),c=La(a),d=Yt(a,c),u=0,l=t.interpolate||_e,p="__p += '",h=Ee((t.escape||_e).source+"|"+l.source+"|"+(l===X?he:_e).source+"|"+(t.evaluate||_e).source+"|$","g"),f="//# sourceURL="+(je.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++it+"]")+"\n";e.replace(h,(function(t,r,n,i,a,c){return n||(n=i),p+=e.slice(u,c).replace(Se,ir),r&&(s=!0,p+="' +\n__e("+r+") +\n'"),a&&(o=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),u=c+t.length,t})),p+="';\n";var m=je.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new Ce("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(o?p.replace(V,""):p).replace($,"$1").replace(H,"$1;"),p="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var g=tc((function(){return Re(c,f+"return "+p).apply(r,d)}));if(g.source=p,Xo(g))throw g;return g},qr.times=function(e,t){if((e=va(e))<1||e>h)return[];var r=m,n=wr(e,m);t=us(t),e-=m;for(var i=Gt(n,t);++r<e;)t(r);return i},qr.toFinite=ga,qr.toInteger=va,qr.toLength=ya,qr.toLower=function(e){return _a(e).toLowerCase()},qr.toNumber=ba,qr.toSafeInteger=function(e){return e?dn(va(e),-9007199254740991,h):0===e?e:0},qr.toString=_a,qr.toUpper=function(e){return _a(e).toUpperCase()},qr.trim=function(e,t,n){if((e=_a(e))&&(n||t===r))return Qt(e);if(!e||!(t=li(t)))return e;var i=pr(e),s=pr(t);return ki(i,Xt(i,s),er(i,s)+1).join("")},qr.trimEnd=function(e,t,n){if((e=_a(e))&&(n||t===r))return e.slice(0,hr(e)+1);if(!e||!(t=li(t)))return e;var i=pr(e);return ki(i,0,er(i,pr(t))+1).join("")},qr.trimStart=function(e,t,n){if((e=_a(e))&&(n||t===r))return e.replace(se,"");if(!e||!(t=li(t)))return e;var i=pr(e);return ki(i,Xt(i,pr(t))).join("")},qr.truncate=function(e,t){var n=30,i="...";if(na(t)){var s="separator"in t?t.separator:s;n="length"in t?va(t.length):n,i="omission"in t?li(t.omission):i}var o=(e=_a(e)).length;if(sr(e)){var a=pr(e);o=a.length}if(n>=o)return e;var c=n-lr(i);if(c<1)return i;var d=a?ki(a,0,c).join(""):e.slice(0,c);if(s===r)return d+i;if(a&&(c+=d.length-c),ca(s)){if(e.slice(c).search(s)){var u,l=d;for(s.global||(s=Ee(s.source,_a(fe.exec(s))+"g")),s.lastIndex=0;u=s.exec(l);)var p=u.index;d=d.slice(0,p===r?c:p)}}else if(e.indexOf(li(s),c)!=c){var h=d.lastIndexOf(s);h>-1&&(d=d.slice(0,h))}return d+i},qr.unescape=function(e){return(e=_a(e))&&Q.test(e)?e.replace(K,fr):e},qr.uniqueId=function(e){var t=++Fe;return _a(e)+t},qr.upperCase=Za,qr.upperFirst=Xa,qr.each=_o,qr.eachRight=So,qr.first=Gs,uc(qr,(Cc={},Sn(qr,(function(e,t){je.call(qr.prototype,t)||(Cc[t]=e)})),Cc),{chain:!1}),qr.VERSION="4.17.21",Pt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){qr[e].placeholder=qr})),Pt(["drop","take"],(function(e,t){$r.prototype[e]=function(n){n=n===r?1:br(va(n),0);var i=this.__filtered__&&!t?new $r(this):this.clone();return i.__filtered__?i.__takeCount__=wr(n,i.__takeCount__):i.__views__.push({size:wr(n,m),type:e+(i.__dir__<0?"Right":"")}),i},$r.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Pt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;$r.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:us(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Pt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");$r.prototype[e]=function(){return this[r](1).value()[0]}})),Pt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");$r.prototype[e]=function(){return this.__filtered__?new $r(this):this[r](1)}})),$r.prototype.compact=function(){return this.filter(oc)},$r.prototype.find=function(e){return this.filter(e).head()},$r.prototype.findLast=function(e){return this.reverse().find(e)},$r.prototype.invokeMap=Zn((function(e,t){return"function"==typeof e?new $r(this):this.map((function(r){return xn(r,e,t)}))})),$r.prototype.reject=function(e){return this.filter(No(us(e)))},$r.prototype.slice=function(e,t){e=va(e);var n=this;return n.__filtered__&&(e>0||t<0)?new $r(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(n=(t=va(t))<0?n.dropRight(-t):n.take(t-e)),n)},$r.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$r.prototype.toArray=function(){return this.take(m)},Sn($r.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),i=/^(?:head|last)$/.test(t),s=qr[i?"take"+("last"==t?"Right":""):t],o=i||/^find/.test(t);s&&(qr.prototype[t]=function(){var t=this.__wrapped__,a=i?[1]:arguments,c=t instanceof $r,d=a[0],u=c||Ko(t),l=function(e){var t=s.apply(qr,Ot([e],a));return i&&p?t[0]:t};u&&n&&"function"==typeof d&&1!=d.length&&(c=u=!1);var p=this.__chain__,h=!!this.__actions__.length,f=o&&!p,m=c&&!h;if(!o&&u){t=m?t:new $r(this);var g=e.apply(t,a);return g.__actions__.push({func:go,args:[l],thisArg:r}),new Vr(g,p)}return f&&m?e.apply(this,a):(g=this.thru(l),f?i?g.value()[0]:g.value():g)})})),Pt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);qr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Ko(i)?i:[],e)}return this[r]((function(r){return t.apply(Ko(r)?r:[],e)}))}})),Sn($r.prototype,(function(e,t){var r=qr[t];if(r){var n=r.name+"";je.call(xr,n)||(xr[n]=[]),xr[n].push({name:t,func:r})}})),xr[Ui(r,2).name]=[{name:"wrapper",func:r}],$r.prototype.clone=function(){var e=new $r(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},$r.prototype.reverse=function(){if(this.__filtered__){var e=new $r(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$r.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ko(e),n=t<0,i=r?e.length:0,s=function(e,t,r){var n=-1,i=r.length;for(;++n<i;){var s=r[n],o=s.size;switch(s.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=wr(t,e+o);break;case"takeRight":e=br(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=s.start,a=s.end,c=a-o,d=n?a:o-1,u=this.__iteratees__,l=u.length,p=0,h=wr(c,this.__takeCount__);if(!r||!n&&i==c&&h==c)return gi(e,this.__actions__);var f=[];e:for(;c--&&p<h;){for(var m=-1,g=e[d+=t];++m<l;){var v=u[m],y=v.iteratee,b=v.type,w=y(g);if(2==b)g=w;else if(!w){if(1==b)continue e;break e}}f[p++]=g}return f},qr.prototype.at=vo,qr.prototype.chain=function(){return mo(this)},qr.prototype.commit=function(){return new Vr(this.value(),this.__chain__)},qr.prototype.next=function(){this.__values__===r&&(this.__values__=ma(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},qr.prototype.plant=function(e){for(var t,n=this;n instanceof zr;){var i=qs(n);i.__index__=0,i.__values__=r,t?s.__wrapped__=i:t=i;var s=i;n=n.__wrapped__}return s.__wrapped__=e,t},qr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $r){var t=e;return this.__actions__.length&&(t=new $r(this)),(t=t.reverse()).__actions__.push({func:go,args:[ro],thisArg:r}),new Vr(t,this.__chain__)}return this.thru(ro)},qr.prototype.toJSON=qr.prototype.valueOf=qr.prototype.value=function(){return gi(this.__wrapped__,this.__actions__)},qr.prototype.first=qr.prototype.head,tt&&(qr.prototype[tt]=function(){return this}),qr}();ft?((ft.exports=mr)._=mr,ht._=mr):pt._=mr}).call(l)}(Tw,Tw.exports);var Ew,Dw=l&&l.__extends||(Ew=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}Ew(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Pw,"__esModule",{value:!0});var Mw=Tw.exports,Iw=["MaxBatchSize","MaxDelay","MinDelay"],xw=function(e){function t(t){var r=e.call(this)||this;return r.fifo=[],r.firstBatch=!0,function(e){if(Iw.forEach((function(t){if(!e.hasOwnProperty(t))throw new Error("Missing required MessageBatcher option: "+t)})),isNaN(e.MaxBatchSize))throw new Error("MessageBatcher MaxBatchSize option must be a number");if(!isFinite(e.MaxBatchSize))throw new Error("MessageBatcher MaxBatchSize option must be a finite number");if(e.MaxBatchSize<1)throw new Error("MessageBatcher MaxBatchSize option cannot be less than 1");if(isNaN(e.MaxDelay))throw new Error("MessageBatcher MaxDelay option must be a number");if(!isFinite(e.MaxDelay))throw new Error("MessageBatcher MaxDelay option must be a finite number");if(e.MaxDelay<0)throw new Error("MessageBatcher MaxDelay option cannot be less than 0");if(isNaN(e.MinDelay))throw new Error("MessageBatcher MinDelay option must be a number");if(!isFinite(e.MinDelay))throw new Error("MessageBatcher MinDelay option must be a finite number");if(e.MinDelay<0)throw new Error("MessageBatcher MinDelay option cannot be less than 0");if(e.MinDelay>e.MaxDelay)throw new Error("MessageBatcher MinDelay option cannot be greater than MaxDelay")}(t),r.options=t,r.releaseBatchDebouncedMax=Mw.debounce(r.releaseBatch.bind(r),r.options.MaxDelay,{maxWait:r.options.MaxDelay}),r.releaseBatchDebouncedMin=Mw.debounce(r.releaseBatch.bind(r),r.options.MinDelay,{maxWait:r.options.MinDelay}),r}return Dw(t,e),t.prototype.Queue=function(e){var t=this;(e=[].concat(e)).forEach((function(e){t.fifo.push(e),t.debounce(t.fifo,t.options.MaxBatchSize)}),this)},t.prototype.debounce=function(e,t){e.length>0&&(e.length>=t?this.firstBatch?(this.firstBatch=!1,this.releaseBatchDebouncedMax.flush()):(this.releaseBatchDebouncedMax.cancel(),this.releaseBatchDebouncedMin(e,t)):(this.releaseBatchDebouncedMin.cancel(),this.releaseBatchDebouncedMax(e,t)))},t.prototype.releaseBatch=function(e,t){var r=this.drainFIFO(e,t);r&&r.length&&(this.emit("batch",r),this.debounce(e,t))},t.prototype.drainFIFO=function(e,t){return e.length>0?e.splice(0,t):e},t}(e.EventEmitter);Pw.MessageBatcher=xw,function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(Pw)}(Rw),function(e){Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(Rw)}(Cw);let Ow,Lw=!1;const Aw=()=>{try{return Lw?null:window.localStorage}catch(e){return console.error("Get local storage error",{error:mr(e)}),e instanceof Error&&"SecurityError"===e.name&&(Lw=!0),null}};function jw(e){const t=Aw();if(!t)return null;try{return JSON.parse(t.getItem(e))}catch(e){return null}}const Fw=()=>{if(Ow)return Ow;const e=jw("sdk_clientUniqueId");if(e)return Ow=e,e;const t=r.randomBytes(12).toString("hex");return Ow=t,function(e,t){const r=Aw();if(r)try{r.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}}("sdk_clientUniqueId",t),t},Nw=()=>{const e=jw("sdk_clientUniqueId");return e||(null!=Ow?Ow:Fw())},Bw=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function Ww(e){return!e.response&&(!!e.code&&(!["ERR_CANCELED","ECONNABORTED"].includes(e.code)&&(e=>!Bw.has(e&&e.code))(e)))}const qw=["get","head","options"],Uw=qw.concat(["put","delete"]);function zw(e){return"ECONNABORTED"!==e.code&&(!e.response||429===e.response.status||e.response.status>=500&&e.response.status<=599)}function Vw(e){return!!e.config?.method&&(zw(e)&&-1!==Uw.indexOf(e.config.method))}function $w(e){return Ww(e)||Vw(e)}function Hw(e){const t=e?.response?.headers["retry-after"];if(!t)return 0;let r=1e3*(Number(t)||0);return 0===r&&(r=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,r)}const Kw={retries:3,retryCondition:$w,retryDelay:function(e=0,t){return Math.max(0,Hw(t))},shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Gw(e,t,r=!1){const n=function(e,t){return{...Kw,...t,...e["axios-retry"]}}(e,t||{});return n.retryCount=n.retryCount||0,n.lastRequestTime&&!r||(n.lastRequestTime=Date.now()),e["axios-retry"]=n,n}const Qw=(e,t)=>{const r=e.interceptors.request.use((e=>(Gw(e,t,!0),e["axios-retry"]?.validateResponse&&(e.validateStatus=()=>!1),e))),n=e.interceptors.response.use(null,(async r=>{const{config:n}=r;if(!n)return Promise.reject(r);const i=Gw(n,t);return r.response&&i.validateResponse?.(r.response)?r.response:await async function(e,t){const{retries:r,retryCondition:n}=e,i=(e.retryCount||0)<r&&n(t);if("object"==typeof i)try{return!1!==await i}catch(e){return!1}return i}(i,r)?async function(e,t,r,n){t.retryCount+=1;const{retryDelay:i,shouldResetTimeout:s,onRetry:o}=t,a=i(t.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!s&&n.timeout&&t.lastRequestTime){const e=Date.now()-t.lastRequestTime,i=n.timeout-e-a;if(i<=0)return Promise.reject(r);n.timeout=i}return n.transformRequest=[e=>e],await o(t.retryCount,r,n),n.signal?.aborted?Promise.resolve(e(n)):new Promise((t=>{const r=()=>{clearTimeout(i),t(e(n))},i=setTimeout((()=>{t(e(n)),n.signal?.removeEventListener&&n.signal.removeEventListener("abort",r)}),a);n.signal?.addEventListener&&n.signal.addEventListener("abort",r,{once:!0})}))}(e,i,r,n):(await async function(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}(i,r),Promise.reject(r))}));return{requestInterceptorId:r,responseInterceptorId:n}};Qw.isNetworkError=Ww,Qw.isSafeRequestError=function(e){return!!e.config?.method&&(zw(e)&&-1!==qw.indexOf(e.config.method))},Qw.isIdempotentRequestError=Vw,Qw.isNetworkOrIdempotentRequestError=$w,Qw.exponentialDelay=function(e=0,t,r=100){const n=2**e*r,i=Math.max(n,Hw(t));return i+.2*i*Math.random()},Qw.linearDelay=function(e=100){return(t=0,r)=>{const n=t*e;return Math.max(n,Hw(r))}},Qw.isRetryableError=zw;class Jw{constructor(e){this.api=e,Qw(this.api,{retries:2,shouldResetTimeout:!0,retryDelay:e=>1500*e,retryCondition:e=>{var t,r;return/^\/?log\//.test(null!==(r=null===(t=e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:"")||!1}})}batch(e){return a(this,void 0,void 0,(function*(){return this.api.post("/log/batch",e)}))}}class Yw{constructor(e){this.api=e,Qw(this.api,{retries:2,shouldResetTimeout:!0,retryDelay:e=>1500*e,retryCondition:e=>{var t,r;return/^\/?log\//.test(null!==(r=null===(t=e.config)||void 0===t?void 0:t.url)&&void 0!==r?r:"")||!1}})}sendNetworkMetrics(e){return a(this,void 0,void 0,(function*(){return this.api.post("/analytics/network-metrics",e)}))}sendWIDMetrics(e){return a(this,void 0,void 0,(function*(){return this.api.post("/analytics/wid-metrics",Object.assign({},e))}))}}let Zw=class{constructor(){this.api=kg.create({baseURL:"https://moodhood-analytics.livedigital.space/v1",timeout:1e4,withCredentials:!0,paramsSerializer:e=>By.stringify(e),headers:{"x-cl-id":Nw()}}),this.api.defaults.headers.common["Cache-Control"]="no-cache",this.api.defaults.headers.common.Pragma="no-cache",this.api.defaults.headers.common.Expires="0",this.logApi=new Jw(this.api),this.metricsApi=new Yw(this.api)}get log(){return this.logApi}get metrics(){return this.metricsApi}};Zw=i([at(),o("design:paramtypes",[])],Zw);var Xw,e_,t_,r_,n_,i_,s_,o_,a_=Zw;class c_{constructor(e){Xw.add(this),e_.set(this,void 0),t_.set(this,void 0),r_.set(this,void 0),n_.set(this,void 0),i_.set(this,void 0);const{logLevel:t,namespace:r,onLogMessage:n}=e;d(this,e_,r,"f"),d(this,t_,t,"f"),this.onLogMessage=n,d(this,n_,new a_,"f"),d(this,r_,new Cw.MessageBatcher({MaxBatchSize:50,MaxDelay:1e3,MinDelay:500}),"f"),d(this,i_,e.sendAnalytics,"f"),c(this,r_,"f").on("batch",(e=>a(this,void 0,void 0,(function*(){yield this.logToApi(e)})))),this._debug=Yi("LiveDigital").extend("debug").extend(c(this,e_,"f")),this._info=Yi("LiveDigital").extend("info").extend(c(this,e_,"f")),this._warn=Yi("LiveDigital").extend("warn").extend(c(this,e_,"f")),this._error=Yi("LiveDigital").extend("error").extend(c(this,e_,"f")),this._debug.log=console.info.bind(console),this._info.log=console.info.bind(console),this._warn.log=console.warn.bind(console),this._error.log=console.error.bind(console)}debug(e,t){this._debug(e,t),c(this,i_,"f")&&c(this,r_,"f").Queue({level:"debug",message:e,meta:t}),c(this,t_,"f")>=ht&&c(this,Xw,"m",s_).call(this,"debug",e,t)}info(e,t){this._info(e,t),c(this,i_,"f")&&c(this,r_,"f").Queue({level:"info",message:e,meta:t}),c(this,t_,"f")>=pt&&c(this,Xw,"m",s_).call(this,"info",e,t)}warn(e,t){this._warn(e,t),c(this,i_,"f")&&c(this,r_,"f").Queue({level:"warn",message:e,meta:t}),c(this,t_,"f")>=lt&&c(this,Xw,"m",s_).call(this,"warn",e,t)}error(e,t){this._error(e,t),c(this,i_,"f")&&c(this,r_,"f").Queue({level:"error",message:e,meta:t}),c(this,t_,"f")>=ut&&c(this,Xw,"m",s_).call(this,"error",e,t)}logToApi(e){return a(this,void 0,void 0,(function*(){try{yield c(this,n_,"f").log.batch({logs:e.map((e=>c(this,Xw,"m",o_).call(this,Object.assign(Object.assign({},e),{meta:this.prepareRecordMeta(e.meta)})))),clientMeta:this.getClientMeta()})}catch(e){this._debug("Log request was not successful",{error:e})}}))}getClientMeta(){return Object.assign(Object.assign({},gr.meta),{clUId:Nw()})}prepareRecordMeta(e){const t=e||{},{error:r}=t;return Object.assign(Object.assign(Object.assign({},t),{clientTimestamp:(new Date).toISOString(),from_sdk:!0}),r&&"object"==typeof r?{error:mr(r)}:{})}}e_=new WeakMap,t_=new WeakMap,r_=new WeakMap,n_=new WeakMap,i_=new WeakMap,Xw=new WeakSet,s_=function(e,t,...r){"function"==typeof this.onLogMessage&&this.onLogMessage(t,...c(this,Xw,"m",o_).call(this,r),e)},o_=function(e){const t=new WeakMap;return function e(r,n=[]){if(!Qh(r))return r;const i=t.get(r);if(i)return`[Circular *${i.join(".")}]`;t.set(r,n);const s=Array.isArray(r)?[]:{};return Object.entries(r).forEach((([t,r])=>{s[t]=e(r,[...n,t])})),t.delete(r),s}(e)};let d_=class{constructor(e){this.peerTrackFactory=e,this.tracksByConsumerId=new Map}register(e,t){this.tracksByConsumerId.set(e,t)}get(e){return this.tracksByConsumerId.get(e)}delete(e){return this.tracksByConsumerId.delete(e)}reset(){this.tracksByConsumerId.clear()}create(e){const{consumer:t,label:r,muted:n=!1,mediaStreamTrack:i,paused:s,peerEventEmitter:o}=e,a=this.peerTrackFactory({consumer:t,label:r,mediaStreamTrack:i,paused:s,peerEventEmitter:o,muted:n,onClose:()=>{void 0!==a.consumerId&&this.delete(a.consumerId)}});return void 0!==a.consumerId&&this.register(a.consumerId,a),a}};var u_,l_,p_,h_,f_,m_,g_;d_=i([at(),s(0,dt(Jn.PeerTrackFactory)),o("design:paramtypes",[Function])],d_);const v_=()=>{};class y_{constructor(e){u_.set(this,void 0),l_.set(this,void 0),p_.set(this,null),h_.set(this,"speed"),f_.set(this,16e3),m_.set(this,void 0),this.type="asdk",g_.set(this,void 0);const{loggerFactory:t}=e;d(this,l_,t("ASDKTrackProcessor"),"f"),d(this,g_,"function"==typeof e.onError?e.onError:v_,"f"),d(this,u_,new window.atsvb(e.asdkCustomerId),"f"),c(this,u_,"f").config({preset:c(this,h_,"f"),sample_rate:c(this,f_,"f"),sdk_url:"https://effectssdk.ai/sdk/audio/",wasmPaths:{"ort-wasm.wasm":"https://effectssdk.ai/sdk/audio/dev/2.4.2/ort-wasm.wasm","ort-wasm-simd.wasm":"https://effectssdk.ai/sdk/audio/dev/2.4.2/ort-wasm-simd.wasm"}}),c(this,u_,"f").onError((e=>{const{message:t,type:r,cause:i}=e,s=n(e,["message","type","cause"]);1002!==s.code&&1001!==s.code||c(this,g_,"f").call(this,`ASDK performance issue(${s.code}): ${t}`,i),"error"===r&&(c(this,l_,"f").error(t,Object.assign(Object.assign({error:mr(i),cause:i},s),{type:this.type,case:"Denoiser"})),c(this,g_,"f").call(this,`ASDK runtime error: ${t}`,i),d(this,g_,v_,"f")),"warning"===r&&c(this,l_,"f").warn(t,Object.assign(Object.assign({},s),{type:this.type,case:"Denoiser"})),"info"===r&&c(this,l_,"f").info(t,Object.assign(Object.assign({},s),{type:this.type,case:"Denoiser"}))}))}setOnError(e){d(this,g_,e,"f")}init(){return a(this,void 0,void 0,(function*(){yield c(this,u_,"f").preload()}))}get isProcessing(){return!!c(this,m_,"f")}processTrack(e){var t;return a(this,void 0,void 0,(function*(){if(c(this,p_,"f")===e||"ended"===e.readyState)return(null===(t=c(this,u_,"f").getStream())||void 0===t?void 0:t.getAudioTracks()[0])||e;yield this.stopProcessing();try{const t=new Promise(((t,r)=>{c(this,u_,"f").onReady=()=>{try{const r=c(this,u_,"f").getStream(),n=null==r?void 0:r.getAudioTracks()[0];if(!n)return void t(e);d(this,p_,e,"f"),d(this,m_,n,"f"),t(n),c(this,u_,"f").run()}catch(e){r(e)}finally{c(this,u_,"f").onReady=void 0}}}));c(this,u_,"f").useStream(new MediaStream([e]));return yield t}catch(t){throw c(this,l_,"f").error("processTrack()",{error:mr(t),type:this.type,case:"Denoiser",track:e}),c(this,g_,"f").call(this,"ASDK processTrack() error",t),d(this,g_,v_,"f"),new Error("Can not process this track")}}))}stopProcessing(){return a(this,void 0,void 0,(function*(){try{c(this,u_,"f").stop()}catch(e){c(this,l_,"f").error("stopProcessing()",{type:this.type,case:"Denoiser",error:mr(e)})}finally{d(this,p_,null,"f")}}))}}u_=new WeakMap,l_=new WeakMap,p_=new WeakMap,h_=new WeakMap,f_=new WeakMap,m_=new WeakMap,g_=new WeakMap;class b_ extends AudioWorkletNode{constructor(e){super(e.context,"rnnoise",{channelCountMode:"explicit",channelCount:1,channelInterpretation:"speakers",numberOfInputs:1,numberOfOutputs:1,outputChannelCount:[1],processorOptions:{module:e.noiseSuppressor.module}}),this.port.onmessage=({data:e})=>{const t=Object.assign(new Event("status"),e);this.dispatchEvent(t)}}update(e){this.port.postMessage(e)}static register(e){return a(this,void 0,void 0,(function*(){const t=PS.get(Jn.Config);yield e.audioWorklet.addModule(`${t.get("staticFilesPath")}/noiseSuppressionWorklet.js`)}))}}var w_,__,S_,k_,C_,R_;class P_{constructor(e){w_.set(this,void 0),__.set(this,void 0),S_.set(this,void 0),k_.set(this,void 0),C_.set(this,void 0),R_.set(this,!0),d(this,w_,e.noiseSuppressor.instance.exports,"f"),d(this,__,e.context,"f"),d(this,S_,new Float32Array(c(this,w_,"f").memory.buffer),"f"),d(this,k_,c(this,w_,"f").newState(),"f"),d(this,C_,c(this,__,"f").createScriptProcessor(),"f"),this.setOnAudioProcess()}get noiseSuppressionScriptProcessorNode(){return c(this,C_,"f")}update(e){e||(d(this,R_,!1,"f"),c(this,w_,"f").deleteState(c(this,k_,"f")));const t=Object.assign(new Event("status"),{vadProb:c(this,w_,"f").getVadProb(c(this,k_,"f"))});c(this,C_,"f").dispatchEvent(t)}setOnAudioProcess(){c(this,C_,"f").addEventListener("audioprocess",(({inputBuffer:e,outputBuffer:t})=>{if(!c(this,R_,"f"))return;c(this,S_,"f").set(e.getChannelData(0),c(this,w_,"f").getInput(c(this,k_,"f"))/4);const r=t.getChannelData(0),n=c(this,w_,"f").pipe(c(this,k_,"f"),r.length)/4;n&&r.set(c(this,S_,"f").subarray(n,n+r.length))}))}}w_=new WeakMap,__=new WeakMap,S_=new WeakMap,k_=new WeakMap,C_=new WeakMap,R_=new WeakMap;var T_,E_,D_,M_,I_,x_,O_,L_,A_,j_,F_,N_,B_,W_,q_,U_,z_,V_,$_,H_,K_,G_,Q_,J_,Y_,Z_,X_,eS,tS,rS,nS,iS,sS,oS,aS,cS,dS,uS,lS,pS,hS,fS;class mS{constructor({context:e,noiseSuppressor:t}){T_.set(this,void 0),E_.set(this,void 0),D_.set(this,void 0),d(this,T_,e,"f"),d(this,E_,t,"f")}createNoiseSuppressionNode(){return a(this,void 0,void 0,(function*(){return/apple/i.test(navigator.vendor)?this.createScriptProcessorNode():this.createAudioWorkletNode()}))}stop(){var e;null===(e=c(this,D_,"f"))||void 0===e||e.update(!1)}createAudioWorkletNode(){return a(this,void 0,void 0,(function*(){return yield b_.register(c(this,T_,"f")),d(this,D_,new b_({context:c(this,T_,"f"),noiseSuppressor:c(this,E_,"f")}),"f"),c(this,D_,"f")}))}createScriptProcessorNode(){return d(this,D_,new P_({context:c(this,T_,"f"),noiseSuppressor:c(this,E_,"f")}),"f"),c(this,D_,"f").noiseSuppressionScriptProcessorNode}}T_=new WeakMap,E_=new WeakMap,D_=new WeakMap;class gS{constructor(e){M_.set(this,void 0),I_.set(this,void 0),x_.set(this,void 0),O_.set(this,void 0),this.type="rnnoise",d(this,M_,e.noiseSuppressor,"f"),d(this,x_,e.loggerFactory("TrackProcessor"),"f")}get isProcessing(){return!!c(this,O_,"f")}processTrack(e){return a(this,void 0,void 0,(function*(){const t=(e=>{const t=window.AudioContext||window.webkitAudioContext||!1;return t?new t(e):null})();if(!t)throw new Error("AudioContext is not available");const r=new MediaStreamAudioDestinationNode(t,{channelCountMode:"explicit",channelCount:1,channelInterpretation:"speakers"});yield b_.register(t);const n=t.createMediaStreamSource(new MediaStream([e])),i=new mS({context:t,noiseSuppressor:c(this,M_,"f")}),s=yield i.createNoiseSuppressionNode();s.connect(r),n.connect(s);const[o]=r.stream.getTracks();return d(this,I_,{audioContext:t,streamDestination:r,noiseSuppressionNode:s,noiseSuppressionProvider:i},"f"),d(this,O_,o,"f"),c(this,x_,"f").info("processTrack()",{case:"Denoiser",type:this.type,track:e.id}),o}))}stopProcessing(){var e;return a(this,void 0,void 0,(function*(){if(this.isProcessing)if(c(this,I_,"f"))try{c(this,I_,"f").noiseSuppressionProvider.stop(),c(this,I_,"f").noiseSuppressionNode.disconnect(),c(this,I_,"f").streamDestination.disconnect(),yield c(this,I_,"f").audioContext.close(),null===(e=c(this,O_,"f"))||void 0===e||e.stop(),d(this,O_,void 0,"f"),c(this,x_,"f").info("stopProcessing()",{success:!0,case:"Denoiser",type:this.type})}catch(e){c(this,x_,"f").error("stopProcessing()",{success:!1,error:mr(e),case:"Denoiser",type:this.type})}else c(this,x_,"f").warn("stopProcessing()",{success:!1,description:"Processing context is not available",case:"Denoiser",type:this.type});else c(this,x_,"f").debug("stopProcessing()",{description:"Track is not processed",case:"Denoiser",type:this.type})}))}}M_=new WeakMap,I_=new WeakMap,x_=new WeakMap,O_=new WeakMap;class vS extends Vf{constructor(){super(...arguments),L_.set(this,!1),A_.set(this,void 0),j_.set(this,void 0)}get isDenoiserRequireActivation(){var e;return!(null===(e=c(this,A_,"f"))||void 0===e?void 0:e.isProcessing)&&c(this,L_,"f")}prepareTrackProcessor(e){this.logger.debug("Setting trackProcessor to AudioTrack",{case:"Denoiser",type:e.type}),d(this,A_,e,"f")}unsetTrackProcessor(){d(this,A_,void 0,"f")}get isEffectsProcessing(){var e;return Boolean(null===(e=c(this,A_,"f"))||void 0===e?void 0:e.isProcessing)}getEncoderConfig(){return this.encoderConfig}getEncodings(){var e;return null!==(e=this.getEncoderConfig().encodings)&&void 0!==e?e:jl}getCodecOptions(){var e,t;return{opusFec:null===(e=this.getEncoderConfig().enableFec)||void 0===e||e,opusDtx:null===(t=this.getEncoderConfig().enableDtx)||void 0===t||t}}getPreferredCodec(){const{preferredCodec:e}=this.getEncoderConfig();return e||"opus"}enableNoiseSuppression(){var e,t;return a(this,void 0,void 0,(function*(){if(d(this,L_,!0,"f"),c(this,A_,"f"))try{const r=yield null===(e=c(this,A_,"f"))||void 0===e?void 0:e.processTrack(this.mediaStreamTrack);d(this,j_,this.mediaStreamTrack,"f"),yield this.replaceTrack(r),this.logger.debug("Denoiser activated",{case:"Denoiser",type:(null===(t=c(this,A_,"f"))||void 0===t?void 0:t.type)||"none"})}catch(e){throw this.logger.warn("enableNoiseSuppression()",{description:"Can not enable noise suppression",track:this.logCtx,error:mr(e)}),new Error("Can not enable noise suppression")}else this.logger.warn("enableNoiseSuppression()",{description:"Track suppressor is not defined"})}))}disableNoiseSuppression(){var e,t,r;return a(this,void 0,void 0,(function*(){d(this,L_,!1,"f");try{if(!(null===(e=c(this,A_,"f"))||void 0===e?void 0:e.isProcessing))return void this.logger.debug("stopProcessing()",{description:"Track is not processed"});if(!c(this,j_,"f"))return void this.logger.warn("disableNoiseSuppression()",{description:"Original track missing"});yield this.replaceTrack(c(this,j_,"f")),yield null===(t=c(this,A_,"f"))||void 0===t?void 0:t.stopProcessing(),this.logger.debug("Denoiser deactivated",{case:"Denoiser",type:(null===(r=c(this,A_,"f"))||void 0===r?void 0:r.type)||"none"})}catch(e){throw this.logger.warn("disableNoiseSuppression()",{description:"Can not disable noise suppression",track:this.logCtx,error:mr(e)}),new Error("Can not disable noise suppression")}}))}publish(){return a(this,void 0,void 0,(function*(){yield this.produce({encodings:this.getEncodings(),preferredCodec:this.getPreferredCodec(),codecOptions:this.getCodecOptions()}),this.internalEventEmitter.emit(tn.trackProduced,this)}))}pause(){return a(this,void 0,void 0,(function*(){yield this.mute()}))}}L_=new WeakMap,A_=new WeakMap,j_=new WeakMap;class yS{constructor({track:e,statsHandler:t}){F_.set(this,void 0),N_.set(this,void 0),this.handleWebRTCStats(e,t)}get videoWebRTCStats(){return c(this,F_,"f")}get audioWebRTCStats(){return c(this,N_,"f")}handleWebRTCStats(e,t){e.addEventListener("ended",(()=>{t.removeInboundVideoHandler(e.id),t.removeInboundAudioHandler(e.id)}),{once:!0}),"video"!==e.kind?t.addInboundAudioHandler(e.id,this.setAudioWebRTCStats.bind(this)):t.addInboundVideoHandler(e.id,this.setVideoWebRTCStats.bind(this))}setVideoWebRTCStats(e){d(this,F_,e,"f")}setAudioWebRTCStats(e){d(this,N_,e,"f")}}F_=new WeakMap,N_=new WeakMap;class bS{constructor(e){this.label=Zn.Unknown,B_.set(this,void 0),W_.set(this,void 0),q_.set(this,void 0),U_.set(this,void 0),z_.set(this,void 0),V_.set(this,void 0),$_.set(this,void 0),H_.set(this,void 0),K_.set(this,void 0),G_.set(this,void 0),Q_.set(this,!1),J_.set(this,void 0),Y_.set(this,!1),Z_.set(this,new hf),X_.set(this,!1),eS.set(this,0),tS.set(this,void 0),this.observer=new Rt,d(this,K_,e.mediaStreamTrack,"f"),this.label=e.label,this.consumer=e.consumer,d(this,z_,e.peerConsumerFactory,"f"),d(this,$_,e.loggerFactory("PeerTrack"),"f"),d(this,H_,e.peerEventEmitter,"f"),d(this,X_,e.muted,"f"),d(this,G_,e.paused,"f"),d(this,B_,e.network,"f"),d(this,W_,e.socket,"f"),d(this,q_,e.media,"f"),d(this,V_,e.callState,"f"),d(this,U_,e.onClose,"f"),d(this,tS,new yS({track:e.mediaStreamTrack,statsHandler:e.statsHandler}),"f")}get videoWebRTCStats(){return c(this,tS,"f").videoWebRTCStats}get audioWebRTCStats(){return c(this,tS,"f").audioWebRTCStats}get logCtx(){var e,t;return{id:c(this,K_,"f").id,label:this.label,consumerId:null===(e=this.consumer)||void 0===e?void 0:e.id,producerId:null===(t=this.consumer)||void 0===t?void 0:t.producerId,muted:c(this,X_,"f"),paused:c(this,G_,"f"),closed:c(this,Y_,"f")}}get volume(){return c(this,eS,"f")}get isRemote(){return!!this.consumer}get mediaStreamTrack(){return c(this,K_,"f")}get kind(){return this.mediaStreamTrack.kind}get isPaused(){return c(this,G_,"f")}get isMuted(){return c(this,X_,"f")}get consumerId(){var e;return null===(e=this.consumer)||void 0===e?void 0:e.id}get currentSpatialLayer(){var e;return(null===(e=this.consumer)||void 0===e?void 0:e.currentSpatialLayer)||0}close(){return a(this,void 0,void 0,(function*(){c(this,H_,"f").safeEmit(cn,this),d(this,Y_,!0,"f"),c(this,U_,"f").call(this),this.consumer&&(yield this.closeConsumer(),this.clearCheckStateTimeout())}))}mute(){return a(this,void 0,void 0,(function*(){yield c(this,Z_,"f").push((()=>a(this,void 0,void 0,(function*(){c(this,$_,"f").debug("mute()",{track:this.logCtx}),yield this.pauseConsumer(),d(this,X_,!0,"f")}))))}))}unmute(){return a(this,void 0,void 0,(function*(){yield c(this,Z_,"f").push((()=>a(this,void 0,void 0,(function*(){c(this,$_,"f").debug("unmute()",{track:this.logCtx}),yield this.resumeConsumer(),d(this,X_,!1,"f")}))))}))}pause(e=!0){return a(this,void 0,void 0,(function*(){yield c(this,Z_,"f").push((()=>a(this,void 0,void 0,(function*(){if(!this.consumer||this.isMuted)return d(this,G_,!0,"f"),c(this,H_,"f").safeEmit(dn,this),void c(this,$_,"f").debug("pause()",{track:this.logCtx});yield this.pauseConsumer(e),d(this,G_,!0,"f"),c(this,H_,"f").safeEmit(dn,this)}))))}))}resume(e=!0){return a(this,void 0,void 0,(function*(){yield c(this,Z_,"f").push((()=>a(this,void 0,void 0,(function*(){if(!this.consumer||this.isMuted)return d(this,G_,!1,"f"),c(this,H_,"f").safeEmit(un,this),void c(this,$_,"f").debug("resume()",{track:this.logCtx});yield this.resumeConsumer(e),d(this,G_,!1,"f"),c(this,H_,"f").safeEmit(un,this)}))))}))}resumeConsumer(e=!0){return a(this,void 0,void 0,(function*(){if(this.consumer)try{this.consumer.resume(),e&&(yield c(this,B_,"f").resumeRemoteConsumer(this.consumer.id)),this.checkConsumerState().catch((e=>{c(this,$_,"f").warn("Failed to checkConsumerState()",{track:this.logCtx,error:mr(e)})})),c(this,$_,"f").debug("resumeConsumer()",{track:this.logCtx})}catch(e){c(this,$_,"f").warn("resumeConsumer()",{error:e})}}))}pauseConsumer(e=!0){return a(this,void 0,void 0,(function*(){if(this.consumer)try{this.clearCheckStateTimeout(),e&&(yield c(this,B_,"f").pauseRemoteConsumer(this.consumer.id)),this.consumer.pause(),d(this,Q_,!1,"f"),c(this,$_,"f").debug("pauseConsumer()",{track:this.logCtx})}catch(e){c(this,$_,"f").warn("pauseConsumer()",{error:e})}}))}requestVideoPreferredLayers({spatialLayer:e,temporalLayer:t}){return a(this,void 0,void 0,(function*(){if(this.consumer)try{if(this.consumer.isAudio)return void c(this,$_,"f").warn("Only video consumers support layers",{case:"requestVideoPreferredLayers"});if(e===this.consumer.currentSpatialLayer)return;if(e>this.consumer.spatialLayers)return void c(this,$_,"f").warn("Invalid spatial layer",{spatialLayer:e,consumerSpatialLayers:this.consumer.spatialLayers,case:"requestVideoPreferredLayers"});if(e>this.consumer.currentMaxSpatialLayer)return void(yield this.requestMaxSpatialLayer(this.consumer.id,e));yield c(this,W_,"f").request(Dn,{consumerId:this.consumer.id,spatialLayer:e,temporalLayer:t}),c(this,$_,"f").debug("requestVideoPreferredLayers()",{track:this.logCtx,consumer:this.consumer,spatialLayer:e,temporalLayer:t})}catch(e){throw c(this,$_,"f").error("Failed to request preferred layers",{case:"requestVideoPreferredLayers",track:{id:this.mediaStreamTrack.id,kind:this.mediaStreamTrack.kind,label:this.mediaStreamTrack.label},consumerId:this.consumer.id,spatialLayers:this.consumer.spatialLayers,temporalLayers:this.consumer.temporalLayers,error:e}),new Error("Error request preferred layers")}}))}requestKeyFrame(){return a(this,void 0,void 0,(function*(){if(this.consumerId){c(this,$_,"f").debug("requestKeyFrame()",{track:this.logCtx});try{yield c(this,W_,"f").request(Mn,{consumerId:this.consumerId})}catch(e){throw c(this,$_,"f").error("requestKeyFrame()",{error:e,track:this.logCtx,consumerId:this.consumerId}),new Error("Failed to request key frame")}}}))}getVideoAvailableLayers(){if(this.consumer){if(!this.consumer.isAudio)return this.consumer.availableSpatialLayers;c(this,$_,"f").warn("Only video consumers support layers",{case:"getVideoAvailableLayers"})}}getInfo(){var e;return a(this,void 0,void 0,(function*(){const{width:t,height:r,frameRate:n,aspectRatio:i}=c(this,K_,"f").getSettings();return{trackId:c(this,K_,"f").id,readyState:c(this,K_,"f").readyState,isRemote:this.isRemote,kind:this.kind,label:this.label,width:t,height:r,frameRate:n,aspectRatio:i,paused:c(this,G_,"f"),trackInboundStats:yield null===(e=this.consumer)||void 0===e?void 0:e.getStats(),trackOutboundStats:yield this.getOutboundStats()}}))}getOutboundStats(){return a(this,void 0,void 0,(function*(){if(this.isRemote)return;const e=c(this,q_,"f").getAllTracks().find((e=>e.getLabel()===this.label));return e?e.getStats():void 0}))}requestMaxSpatialLayer(e,t){return a(this,void 0,void 0,(function*(){try{if(!this.consumer)return;if(this.consumer.isAudio||0===this.consumer.spatialLayers||this.consumer.currentMaxSpatialLayer===t||t<this.consumer.currentMaxSpatialLayer)return void c(this,$_,"f").warn("Can`t request this spatial layer",{case:"requestMaxSpatialLayer",consumerId:e,spatialLayer:t});this.consumer.setRequestedSpatialLayer(t),yield c(this,W_,"f").request(kn,{producerId:this.consumer.producerId,spatialLayer:t}),c(this,$_,"f").debug("requestMaxSpatialLayer()",{consumerId:e,spatialLayer:t})}catch(r){c(this,$_,"f").warn("Failed to request max spatial layer",{case:"requestMaxSpatialLayer",consumerId:e,spatialLayer:t,error:r})}}))}checkConsumerState(){return a(this,void 0,void 0,(function*(){try{if(c(this,Y_,"f")||"audio"===this.kind)return;c(this,$_,"f").debug("checkConsumerState()",{track:this.logCtx});if((yield this.isInboundRTPStreamActive())||c(this,Y_,"f"))return;yield this.requestKeyFrame();if((yield this.isInboundRTPStreamActive())||c(this,Y_,"f"))return;if(c(this,Q_,"f"))return c(this,H_,"f").emit(ln,this),void c(this,$_,"f").debug("trackFail()",{track:this.logCtx});yield this.restartConsumer()}catch(e){c(this,$_,"f").warn("checkConsumerState()",{track:this,error:e})}}))}setVolume(e){c(this,eS,"f")!==e&&(d(this,eS,e,"f"),this.observer.safeEmit(en,{value:e}))}closeConsumer(){return a(this,void 0,void 0,(function*(){try{if(!this.consumer)return;this.consumer.close(),yield c(this,B_,"f").closeRemoteConsumer(this.consumer.id)}catch(e){c(this,$_,"f").debug("closeConsumer()",{track:this,error:e})}}))}restartConsumer(){return a(this,void 0,void 0,(function*(){try{if(!this.consumer||c(this,Y_,"f"))return;c(this,$_,"f").debug("restartConsumer()",{track:this.logCtx}),c(this,H_,"f").emit(cn,this),d(this,G_,!0,"f"),yield this.closeConsumer();const{consumer:e}=yield c(this,B_,"f").createConsumer({producerId:this.consumer.producerId,rtpCapabilities:c(this,q_,"f").mediasoupDevice.rtpCapabilities,producerPeerId:this.consumer.appData.producerData.peerId,appId:c(this,V_,"f").appId,channelId:c(this,V_,"f").channelId});d(this,Q_,!0,"f"),this.consumer=c(this,z_,"f").call(this,{consumer:e}),d(this,K_,e.track,"f"),yield this.resume(),c(this,H_,"f").emit(an,this)}catch(e){d(this,Q_,!0,"f"),c(this,$_,"f").warn("restartConsumer()",{track:this,error:e})}}))}isInboundRTPStreamActive(){return a(this,void 0,void 0,(function*(){if(!this.consumer||c(this,Y_,"f"))return!1;const{framesDecoded:e}=yield this.consumer.getInboundRTPStreamStats();return new Promise((t=>{d(this,J_,setTimeout((()=>a(this,void 0,void 0,(function*(){try{if(!this.consumer)return void t(!1);const{framesDecoded:r}=yield this.consumer.getInboundRTPStreamStats();if(e===r&&!this.isPaused)return void t(!1);t(!0)}catch(e){c(this,$_,"f").debug("isInboundRTPStreamActive()",{error:e,track:this.logCtx}),t(!1)}}))),4500),"f")}))}))}clearCheckStateTimeout(){c(this,J_,"f")||clearTimeout(c(this,J_,"f"))}}B_=new WeakMap,W_=new WeakMap,q_=new WeakMap,U_=new WeakMap,z_=new WeakMap,V_=new WeakMap,$_=new WeakMap,H_=new WeakMap,K_=new WeakMap,G_=new WeakMap,Q_=new WeakMap,J_=new WeakMap,Y_=new WeakMap,Z_=new WeakMap,X_=new WeakMap,eS=new WeakMap,tS=new WeakMap;class wS{constructor(e){const{id:t,kind:r,peerId:n,label:i,paused:s}=e;this.id=t,this.kind=r,this.peerId=n,this.label=i,this.paused=s,this.encodings=e.encodings,this.trackTransformParams=e.trackTransformParams,this.maxSpatialLayer=e.maxSpatialLayer}}class _S{constructor({id:e,channelIds:t,groups:r,producePermissions:n,appId:i,loginDate:s,producers:o=[],appData:a,uid:c,role:u,loggerFactory:l,myPeer:p,callState:h,peers:f,remotePeerTracks:m,media:g,network:v,socket:y,peerConsumerFactory:b}){this.producers=new Map,this.tracks=new Map,rS.set(this,void 0),nS.set(this,void 0),iS.set(this,void 0),sS.set(this,void 0),oS.set(this,void 0),aS.set(this,void 0),cS.set(this,void 0),dS.set(this,void 0),uS.set(this,void 0),this._observer=new Rt,this.id=e,this.channelIds=t,this.groups=r,this.producePermissions=n,this.appId=i,this.loginDate=s,this.applicationData=a||{},this.uid=c,this.role=u,d(this,aS,p,"f"),d(this,cS,h,"f"),d(this,rS,f,"f"),d(this,nS,m,"f"),d(this,sS,y,"f"),d(this,dS,b,"f"),d(this,iS,v,"f"),d(this,oS,g,"f"),d(this,uS,l("Peer"),"f"),o.forEach(this.handleNewProducer.bind(this)),this.handlePeerEvents()}get appData(){return this.applicationData}get observer(){return this._observer}get isMe(){return this.id===c(this,aS,"f").id}get isModerator(){return this.groups.includes("moderator")}get isUser(){return this.groups.includes("user")}get publishedMedia(){return Array.from(this.producers.values()).map((e=>({producerId:e.id,kind:e.kind,label:e.label,paused:e.paused})))}get shortData(){return{id:this.id,producers:Array.from(this.producers.values()).map((e=>({id:e.id,paused:e.paused}))),appData:this.appData}}hasPermission(e){return this.producePermissions.includes(e)}hasGroup(e){return this.groups.includes(e)}subscribe({producerId:e,muted:t=!1}){return a(this,void 0,void 0,(function*(){try{const r=this.producers.get(e);if(!r)return void c(this,uS,"f").warn("subscribe()",{message:"Peer does not have a producer",peer:cf(this),producerId:e});if(this.getAllConsumers().find((t=>t.producerId===e)))return void c(this,uS,"f").debug("subscribe()",{message:"Already subscribed to producer",peer:cf(this),producerId:e});const{consumer:n,isProducerPaused:i}=yield c(this,iS,"f").createConsumer({producerId:r.id,rtpCapabilities:c(this,oS,"f").mediasoupDevice.rtpCapabilities,producerPeerId:this.id,appId:c(this,cS,"f").appId,channelId:c(this,cS,"f").channelId});if(!this.producePermissions.includes(r.label)&&Object.values(Zn).includes(r.label))return void c(this,uS,"f").debug("subscribe()",{message:"Producer is not allowed anymore",peer:cf(this),producerId:e});const s=c(this,nS,"f").create({mediaStreamTrack:n.track,label:r.label,consumer:c(this,dS,"f").call(this,{consumer:n}),muted:t,paused:i,peerEventEmitter:this.observer});t||(yield s.unmute()),this.tracks.set(s.label,s),c(this,uS,"f").debug(`Subscribed for ${r.kind}`,{peer:cf(this)})}catch(t){throw c(this,uS,"f").error("subscribe()",{producerId:e,error:t,peer:cf(this)}),new Error("Error subscribe media")}}))}unsubscribe(e){return a(this,void 0,void 0,(function*(){try{const t=this.getConsumerByProducerId(e);if(!t)return;const r=this.getTrackByConsumerId(t.id);if(!r)return;yield r.close(),this.tracks.delete(r.label),c(this,uS,"f").debug(`Unsubscribed consumer ${t.kind}`,{peer:cf(this)})}catch(t){throw c(this,uS,"f").error("unsubscribe()",{producerId:e,error:t}),new Error("Error unsubscribe media")}}))}setProducePermissions(e){return a(this,void 0,void 0,(function*(){this.throwIfIamNotModerator(),yield c(this,sS,"f").request(Ir,{peerId:this.id,producePermissions:e}),c(this,uS,"f").debug("Produce permissions changed",{peerId:this.id,producePermissions:e})}))}addProducePermission(e){return a(this,void 0,void 0,(function*(){this.throwIfIamNotModerator(),yield c(this,sS,"f").request(xr,{peerId:this.id,label:e}),c(this,uS,"f").debug("Add produce permission requested",{peerId:this.id,label:e})}))}removeProducePermission(e){return a(this,void 0,void 0,(function*(){this.throwIfIamNotModerator(),yield c(this,sS,"f").request(Or,{peerId:this.id,label:e}),c(this,uS,"f").debug("Remove produce permission requested",{peerId:this.id,label:e})}))}getInfo(){return a(this,void 0,void 0,(function*(){try{return{id:this.id,appData:this.appData,role:this.role,channelIds:this.channelIds,appId:this.appId,uid:this.uid,loginDate:this.loginDate,tracks:yield Promise.all(Array.from(this.tracks.values()).map((e=>e.getInfo())))}}catch(e){throw c(this,uS,"f").error("getInfo()",{peer:cf(this),error:e}),new Error("Error get info")}}))}getProducers(){return Array.from(this.producers.values())}getConsumersState(){return this.getAllConsumers().map((e=>({id:e.id,paused:e.paused,producerId:e.producerId})))}handleNewProducer(e){if(this.producers.get(e.id))return;const t=new wS(e);this.producers.set(t.id,t),c(this,uS,"f").debug("Peer published media:",{peer:cf(this),producer:t}),this.observer.safeEmit(rn,{producerId:t.id,kind:t.kind,label:t.label,paused:t.paused})}handlePeerEvents(){this.observer.on(mn,this.handleNewProducer.bind(this)),this.observer.on(gn,(e=>a(this,void 0,void 0,(function*(){this.producers.delete(e.id),c(this,uS,"f").debug("Peer unpublished media:",{peer:cf(this),producer:e}),this.observer.safeEmit(nn,{producerId:e.id,kind:e.kind,label:e.label,paused:e.paused});const t=this.tracks.get(e.label);if(t)try{yield t.close()}catch(e){c(this,uS,"f").warn("Failed to close peer track due to producer closed",{label:t.label,peerId:this.id})}})))),this.observer.on(Pn,(e=>a(this,void 0,void 0,(function*(){const t=this.getTrackByConsumerId(e);t&&(yield t.close(),this.tracks.delete(t.label),c(this,uS,"f").debug("Peer video track was ended:",{peer:cf(this),track:t.logCtx}))})))),this.observer.on(Tn,(e=>a(this,void 0,void 0,(function*(){const t=this.getTrackByConsumerId(e);t&&(yield t.pause(!1))})))),this.observer.on(En,(e=>a(this,void 0,void 0,(function*(){const t=this.getTrackByConsumerId(e);t&&(yield t.resume(!1))})))),this.observer.on(Dn,(e=>{const t=this.getConsumerById(e.consumerId);(null==t?void 0:t.isVideo)&&(t.setCurrentTemporalLayer(e.temporalLayer),t.setCurrentSpatialLayer(e.spatialLayer),e.spatialLayer===t.requestedSpatialLayer&&t.setRequestedSpatialLayer(void 0),c(this,uS,"f").debug("consumerChangePreferredLayers()",Object.assign({},e)))})),this.observer.on(Sn,(e=>a(this,void 0,void 0,(function*(){const{producerId:t,spatialLayer:r}=e,n=this.getConsumerByProducerId(t);n?(n.setCurrentMaxSpatialLayer(r),c(this,uS,"f").debug("producerSetMaxSpatialLayer()",{producerId:t,consumerId:n.id,spatialLayer:r}),n.requestedSpatialLayer===r?(yield c(this,sS,"f").request(Dn,{consumerId:n.id,spatialLayer:r}),c(this,uS,"f").debug("requestVideoPreferredLayers()",{producerId:t,consumerId:n.id,spatialLayer:r})):c(this,uS,"f").debug("producerSetMaxSpatialLayer()",{message:"No need to request new preferred layer",currentMaxSpatialLayer:r,requestedMaxSpatialLayer:n.requestedSpatialLayer})):c(this,uS,"f").debug("producerSetMaxSpatialLayer()",{message:"Consumer for producer not created, ignore MaxSpatialLayer change"})})))),this.observer.on(_r,(e=>{try{Un(e),this.setAppData(e),this.observer.emit(pn,e),c(this,uS,"f").debug("updatePeerAppData",{peer:cf(this),appData:e})}catch(t){c(this,uS,"f").error("updatePeerAppData",{peer:cf(this),appData:e,error:t})}}))}reset(){return a(this,void 0,void 0,(function*(){this.producers.clear(),yield Promise.all(Array.from(this.tracks.values()).map((e=>e.close()))),this.tracks.clear();[mn,gn,Pn,Tn,En,Dn,Sn,_r].forEach((e=>this.observer.removeAllListeners(e)))}))}getActiveTracksCount(){return Array.from(this.tracks.values()).map((e=>e.consumer)).filter((e=>!(null==e?void 0:e.paused))).length}getActivePublishersCount(){return Array.from(this.producers.values()).filter((e=>!e.paused)).length}handleProducePermissionsChange(e){this.producePermissions=e,Object.values(Zn).filter((e=>!this.producePermissions.includes(e))).forEach((e=>{const t=this.tracks.get(e);t&&(this.tracks.delete(t.label),t.close())})),this.observer.safeEmit(hn,{labels:this.producePermissions})}handleGroupsChange(e){this.groups=e,this.observer.safeEmit(fn,{groups:e})}getAllConsumers(){return Array.from(this.tracks.values()).map((e=>e.consumer)).filter((e=>!!e))}getConsumerByProducerId(e){return this.getAllConsumers().find((t=>t.producerId===e))}getConsumerById(e){return this.getAllConsumers().find((t=>t.id===e))}getTrackByConsumerId(e){return Array.from(this.tracks.values()).find((t=>t.consumerId===e))}setAppData(e){this.applicationData=e}throwIfIamNotModerator(){if(!c(this,rS,"f").isModerator(c(this,aS,"f").id))throw new Error("Not enough access")}}rS=new WeakMap,nS=new WeakMap,iS=new WeakMap,sS=new WeakMap,oS=new WeakMap,aS=new WeakMap,cS=new WeakMap,dS=new WeakMap,uS=new WeakMap;class SS{constructor(e){this.spatialLayers=0,this.temporalLayers=0,this.currentSpatialLayer=0,this.currentTemporalLayer=0,this.availableSpatialLayers=[],lS.set(this,void 0);const{consumer:t,loggerFactory:r}=e;this.id=t.id,this.kind=t.kind,this.producerId=t.producerId,this.appData=t.appData,this.consumer=t,d(this,lS,r("PeerConsumer"),"f"),this.currentMaxSpatialLayer=this.appData.producerData.maxSpatialLayer,this.parseScalabilityMode(),this.initAvailableSpatialLayers(),this.setCurrentSpatialLayerParams()}get paused(){return this.consumer.paused}pause(){return this.consumer.pause()}resume(){return this.consumer.resume()}close(){return this.consumer.close()}get isVideo(){return"video"===this.kind}get isAudio(){return"audio"===this.kind}parseScalabilityMode(){if(this.consumer.rtpParameters.encodings){const{scalabilityMode:e}=this.consumer.rtpParameters.encodings[0],{spatialLayers:t,temporalLayers:r}=ri.parseScalabilityMode(e);this.spatialLayers=t,this.temporalLayers=r,c(this,lS,"f").debug("parseScalabilityMode()",{scalabilityMode:e,spatialLayers:t,temporalLayers:r})}}initAvailableSpatialLayers(){const{encodings:e,trackTransformParams:t}=this.appData.producerData;if(!e)return;if(this.availableSpatialLayers=e.map((e=>this.tryPrepareSpatialLayerParams(e))),!t||this.availableSpatialLayers.length>1||this.spatialLayers<2)return void c(this,lS,"f").debug("Using available spatial layers",{case:"initAvailableSpatialLayers"});c(this,lS,"f").debug("Pre-generating encodings with spatial layer params",{case:"initAvailableSpatialLayers"});const r=[],n=e[e.length-1];for(let e=this.spatialLayers-1;e>=0;e-=1)r.push(this.tryPrepareSpatialLayerParams(Object.assign(Object.assign({},n),{scaleResolutionDownBy:Math.pow(2,e)})));this.availableSpatialLayers=r}setCurrentSpatialLayerParams(){const{encodings:e}=this.appData.producerData;e&&e[this.currentSpatialLayer]&&(this.currentSpatialLayerParams=this.tryPrepareSpatialLayerParams(e[this.currentSpatialLayer]),c(this,lS,"f").debug("setCurrentSpatialLayerParams()",{currentSpatialLayerParams:this.currentSpatialLayerParams}))}tryPrepareSpatialLayerParams(e){const{trackTransformParams:t}=this.appData.producerData;if(!t)return e;const{width:r,height:n}=t,i=e.scaleResolutionDownBy||1;return r&&n?Object.assign({width:r/i,height:n/i},e):e}setCurrentSpatialLayer(e){if(!this.isVideo)throw new Error("setCurrentSpatialLayer applies to video consumers only");this.currentSpatialLayer=e,c(this,lS,"f").debug("setCurrentSpatialLayer()",{currentSpatialLayer:e}),this.setCurrentSpatialLayerParams()}setCurrentTemporalLayer(e){if(!this.isVideo)throw new Error("setCurrentTemporalLayer applies to video consumers only");this.currentTemporalLayer=e,c(this,lS,"f").debug("setCurrentTemporalLayer()",{currentTemporalLayer:e})}setRequestedSpatialLayer(e){this.requestedSpatialLayer=e}setCurrentMaxSpatialLayer(e){this.currentMaxSpatialLayer=e}getStats(){var e,t;return a(this,void 0,void 0,(function*(){try{return{consumerId:this.consumer.id,codec:this.consumer.rtpParameters.codecs.find((e=>bf(e))),dtlsState:null===(t=null===(e=this.consumer.rtpReceiver)||void 0===e?void 0:e.transport)||void 0===t?void 0:t.state,availableSpatialLayers:this.availableSpatialLayers,currentSpatialLayerParams:this.currentSpatialLayerParams,requestedSpatialLayer:this.requestedSpatialLayer,rtcStats:yield this.getInboundRTPStreamStats()}}catch(e){return void c(this,lS,"f").debug("getStats()",{error:e})}}))}getInboundRTPStreamStats(){return a(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const r=(n=0)=>a(this,void 0,void 0,(function*(){try{const i=yield this.consumer.getStats(),s=Array.from(i.values()).find((e=>"inbound-rtp"===e.type));if(!s&&n<5)return void setTimeout((()=>r(n+1)),150);n>=5&&!s&&t(new Error("InboundRTPStreamStat not exist")),e(s)}catch(e){t(new Error("Can not get RTCStatsReport")),c(this,lS,"f").debug("getInboundRTPStreamStats()",{error:e})}}));r()}))}))}}lS=new WeakMap;const kS=["frozen-video-track","network-media-sync-failure","encoder-cpu-throttling","decoder-cpu-throttling","missing-video-stream-data","missing-audio-stream-data"];let CS=class{constructor(e,t,r,n,i,s){this.analyticsApiClient=e,this.peers=t,this.socket=r,this.myPeer=n,this.transportsStatsProvider=s,pS.set(this,void 0),hS.set(this,void 0),fS.set(this,void 0),d(this,fS,i("IntegrationsService"),"f"),d(this,hS,new Cw.MessageBatcher({MaxBatchSize:50,MaxDelay:6e4,MinDelay:3e4}),"f"),c(this,hS,"f").on("batch",(e=>{this.analyticsApiClient.metrics.sendWIDMetrics({reasons:e,clientMeta:this.getClientMeta()})})),d(this,pS,new Cw.MessageBatcher({MaxBatchSize:100,MaxDelay:6e4,MinDelay:3e4}),"f"),c(this,pS,"f").on("batch",(e=>{this.analyticsApiClient.metrics.sendNetworkMetrics({metrics:e,clientMeta:this.getClientMeta()})}))}handleIssues(e){e.map((e=>c(this,fS,"f").info("WebRTCIssue",e)));const t=e.filter((e=>kS.includes(e.reason)));0!==t.length&&t.map((e=>c(this,hS,"f").Queue(e.reason)))}handleNetworkScores(e){var t,r,n,i,s;const{inbound:o,outbound:a,statsSamples:{inboundStatsSample:d,outboundStatsSample:u}}=e,l=this.getNodeActiveStreamsStat(),p=null===(t=l.node)||void 0===t?void 0:t.replace(/https:\/\/app-\d+-/,""),h=this.transportsStatsProvider.getStats();void 0!==o&&d&&c(this,pS,"f").Queue({jitter:Math.round(1e3*d.avgJitter),packetLoss:d.packetsLoss,rtt:d.rtt,mos:Math.round(10*o)/10,streams:l.inboundActiveStreams,direction:"inbound",node:p,bitrate:null!==(n=null===(r=null==h?void 0:h.inbound)||void 0===r?void 0:r.bitrate)&&void 0!==n?n:0,timestamp:(new Date).toISOString()}),void 0!==a&&u&&c(this,pS,"f").Queue({jitter:Math.round(1e3*u.avgJitter),packetLoss:u.packetsLoss,rtt:u.rtt,mos:Math.round(10*a)/10,streams:l.outboundActiveStreams,direction:"outbound",node:p,bitrate:null!==(s=null===(i=null==h?void 0:h.outbound)||void 0===i?void 0:i.bitrate)&&void 0!==s?s:0,timestamp:(new Date).toISOString()})}getNodeActiveStreamsStat(){const e=this.socket.getServerUrl(),t=this.peers.hosts().filter((e=>{var t;return e.id!==(null===(t=this.myPeer)||void 0===t?void 0:t.id)})).reduce(((e,t)=>e+t.getActiveTracksCount()),0),r=this.myPeer.get();return{node:e,inboundActiveStreams:t,outboundActiveStreams:(null==r?void 0:r.getActivePublishersCount())||0}}getClientMeta(){return Object.assign(Object.assign({},gr.meta),{clientUniqueId:Nw()})}};pS=new WeakMap,hS=new WeakMap,fS=new WeakMap,CS=i([at(),s(0,dt(Jn.AnalyticsApiClient)),s(1,dt(Jn.Peers)),s(2,dt(Jn.SocketIO)),s(3,dt(Jn.MyPeer)),s(4,dt(Jn.LoggerFactory)),s(5,dt(Jn.TransportsStatsProvider)),o("design:paramtypes",[a_,Object,$h,mp,Function,ib])],CS);var RS=CS;const PS=new rt({autoBindInjectable:!0});var TS;PS.bind(Jn.CallState).to(ti).inSingletonScope(),PS.bind(Jn.MyPeer).to(mp).inSingletonScope(),PS.bind(Jn.LoggerFactory).toFactory((e=>{const t=e.container.get(Jn.Config),r=t.get("logLevel"),n=t.get("sendAnalytics"),i=t.get("onLogMessage");return e=>new c_({logLevel:r,namespace:e,onLogMessage:i,sendAnalytics:n})})),PS.bind(Jn.System).to(Jy).inSingletonScope(),PS.bind(Jn.ProcessorsCache).to(Vl).inSingletonScope(),PS.bind(Jn.IntegrationsService).to(Kl).inSingletonScope(),PS.bind(Jn.MediaStreamTrackManager).to(pp).inSingletonScope(),PS.bind(Jn.Media).to(fp).inSingletonScope(),PS.bind(Jn.SocketIO).to($h).inSingletonScope(),PS.bind(Jn.LoadBalancerApiClient).to(Uy).inSingletonScope(),PS.bind(Jn.Network).to(Kh).inSingletonScope(),PS.bind(Jn.RemotePeerTracks).to(d_).inSingletonScope(),PS.bind(Jn.Peers).to(Gh).inSingletonScope(),PS.bind(Jn.MediaSoupEventHandler).to(Kf).inSingletonScope(),PS.bind(Jn.ChannelEventHandler).to(uf).inSingletonScope(),PS.bind(Jn.ChannelAudioObserverEventHandler).to(mb).inSingletonScope(),PS.bind(Jn.EventsQueue).to(nf).inSingletonScope(),PS.bind(Jn.ChannelStateSynchronizer).to(af).inSingletonScope(),PS.bind(Jn.ChannelStateSyncEventHandler).to(mw).inSingletonScope(),PS.bind(Jn.StatsHandler).to(pb).inSingletonScope(),PS.bind(Jn.WIDHandler).to(RS).inSingletonScope(),PS.bind(Jn.WebRTCIssueDetector).toDynamicValue((e=>{const t=e.container.get(Jn.Config),r=e.container.get(Jn.WIDHandler);if(t.get("disableWid"))return;const n=e.container.get(Jn.StatsHandler),i=[1234],s=e.container.get(Jn.LoggerFactory)("WID"),o=new rr({statsParser:new nr({ignoreSSRCList:i,logger:s})});return new sr({onIssues:e=>{var n;r.handleIssues(e),null===(n=t.get("onIssues"))||void 0===n||n(e)},issueEmitter:new Nt,networkScoresCalculator:new qt,detectors:[new Kt,new Vt,new Ht,new $t,new zt,new Gt,new Zt({minMosQuality:kt.GOOD,avgFreezeDurationThresholdMs:2e3,frozenDurationThresholdPct:50}),new Xt({minMosQuality:kt.GOOD,volatilityThreshold:10,affectedStreamsPercentThreshold:60})],statsReporter:new Bt({compositeStatsParser:o,getStatsInterval:5e3}),onNetworkScoresUpdated:e=>{var n;r.handleNetworkScores(e),null===(n=t.get("onNetworkScoresUpdated"))||void 0===n||n(e)},onStats:n.handle.bind(n),ignoreSSRCList:i,compositeStatsParser:o,logger:s,autoAddPeerConnections:!1})})).inSingletonScope(),PS.bind(Jn.Engine).to(kw).inSingletonScope(),PS.bind(Jn.PeerTrackFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory),r=e.container.get(Jn.CallState),n=e.container.get(Jn.StatsHandler);return i=>{const s={callState:r,loggerFactory:t,media:e.container.get(Jn.Media),network:e.container.get(Jn.Network),peerConsumerFactory:e.container.get(Jn.PeerConsumerFactory),socket:e.container.get(Jn.SocketIO)},{peerEventEmitter:o}=i,a=new bS(Object.assign(Object.assign(Object.assign({},i),s),{statsHandler:n}));return o.safeEmit(an,a),a}})),PS.bind(Jn.PeerFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory),r=e.container.get(Jn.CallState);return n=>{const i={callState:r,loggerFactory:t,media:e.container.get(Jn.Media),myPeer:e.container.get(Jn.MyPeer),network:e.container.get(Jn.Network),peers:e.container.get(Jn.Peers),remotePeerTracks:e.container.get(Jn.RemotePeerTracks),socket:e.container.get(Jn.SocketIO),peerConsumerFactory:e.container.get(Jn.PeerConsumerFactory)};return new _S(Object.assign(Object.assign({},i),n))}})),PS.bind(Jn.PeerConsumerFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory);return e=>{const r={loggerFactory:t};return new SS(Object.assign(Object.assign({},r),e))}})),PS.bind(Jn.AudioTrackFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory),r=e.container.get(Jn.StatsHandler);return n=>{const i={internalEventEmitter:e.container.get(Jn.InternalEventEmitter),loggerFactory:t,media:e.container.get(Jn.Media),mediaStreamTrackManager:e.container.get(Jn.MediaStreamTrackManager),myPeer:e.container.get(Jn.MyPeer),network:e.container.get(Jn.Network),socket:e.container.get(Jn.SocketIO),processorFactory:e.container.get(Jn.AudioTrackProcessorFactory),clientEventEmitter:e.container.get(Jn.ClientEventEmitter),statsHandler:r};return new vS(Object.assign(Object.assign({},i),n))}})),PS.bind(Jn.VideoTrackFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory),r=e.container.get(Jn.StatsHandler);return n=>{const i={internalEventEmitter:e.container.get(Jn.InternalEventEmitter),loggerFactory:t,media:e.container.get(Jn.Media),mediaStreamTrackManager:e.container.get(Jn.MediaStreamTrackManager),myPeer:e.container.get(Jn.MyPeer),network:e.container.get(Jn.Network),socket:e.container.get(Jn.SocketIO),statsHandler:r};return new $f(Object.assign(Object.assign({},i),n))}})),PS.bind(Jn.AudioTrackProcessorFactory).toFactory((function(e){const t=e.container.get(Jn.LoggerFactory),r=e.container.get(Jn.Config),n=e.container.get(Jn.ProcessorsCache),i=r.get("asdk");return e=>{const s=r.get("denoiser");if(n.has(s,e.trackLabel))throw new Error(`Track processor for type:${s}, label:${e.trackLabel} already created`);let o;if("rnnoise"===s&&e.noiseSuppressor&&(o=new gS({noiseSuppressor:e.noiseSuppressor,loggerFactory:t})),"asdk"===s&&(null==i?void 0:i.customerId)&&(o=new y_({asdkCustomerId:i.customerId,loggerFactory:t})),!o)throw new TypeError("Incorrect parameters passed to AudioTrackProcessorFactory");return o}})),PS.bind(Jn.DataChannelsManager).to(_w).inSingletonScope(),PS.bind(Jn.AnalyticsApiClient).to(a_).inSingletonScope(),PS.bind(Jn.TransportsStatsProvider).to(ib).inSingletonScope();class ES{constructor(e){TS.set(this,void 0);const{clientEventEmitter:t,internalEventEmitter:r}=e;PS.bind(Jn.Config).toDynamicValue((()=>new Ct(e))).inSingletonScope(),PS.bind(Jn.InternalEventEmitter).toDynamicValue((()=>null!=r?r:new Rt)).inSingletonScope(),PS.bind(Jn.ClientEventEmitter).toDynamicValue((()=>null!=t?t:new Rt)).inSingletonScope(),PS.get(Jn.IntegrationsService),this.clientEventEmitter=PS.get(Jn.ClientEventEmitter),d(this,TS,PS.get(Jn.Engine),"f")}get observer(){return this.clientEventEmitter}get id(){return c(this,TS,"f").myPeerId}get peers(){return c(this,TS,"f").getPeers()}get availableVideoDevices(){return c(this,TS,"f").system.availableVideoDevices}get availableAudioDevices(){return c(this,TS,"f").system.availableAudioDevices}get canUseNoiseSuppression(){return!0}get effectsSDKInitialized(){return c(this,TS,"f").media.effectsSDKInitialized}detectDevices(e){return a(this,void 0,void 0,(function*(){return yield c(this,TS,"f").system.detectDevices(e),{video:c(this,TS,"f").system.availableVideoDevices,audio:c(this,TS,"f").system.availableAudioDevices}}))}initEffectsSDK(){return c(this,TS,"f").media.initEffectsSDK()}join(e){return c(this,TS,"f").join(e)}leave(e){return c(this,TS,"f").release(e)}confirmActivity(){return c(this,TS,"f").confirmActivity()}createCameraVideoTrack(e){return c(this,TS,"f").createCameraVideoTrack(e)}createMicrophoneAudioTrack(e){return c(this,TS,"f").createMicrophoneAudioTrack(e)}createScreenMediaTracks(e){return c(this,TS,"f").createScreenMediaTracks(e)}createCustomAudioTrack(e){return c(this,TS,"f").createCustomAudioTrack(e)}createCustomVideoTrack(e){return c(this,TS,"f").createCustomVideoTrack(e)}deleteTrack(e){return c(this,TS,"f").deleteTrack(e)}loadPeers(e){return c(this,TS,"f").loadPeers(e)}updateAppData(e){return c(this,TS,"f").updateAppData(e)}getTransportsInfo(){return a(this,void 0,void 0,(function*(){return c(this,TS,"f").network.getTransportsStateInfo()}))}setPreferRelay(e){c(this,TS,"f").network.setPreferRelay(e)}getPreferRelay(){return c(this,TS,"f").network.getPreferRelay()}transportsStats(){return c(this,TS,"f").transportsStats()}}TS=new WeakMap;export{ES as default};
|