-1?t[o?i[f]:f]:re}}function eo(e){return mo(function(i){var r=i.length,n=r,t=v.prototype.thru;for(e&&i.reverse();n--;){var o=i[n];if("function"!=typeof o)throw new kl(fe);if(t&&!f&&"wrapper"==Eo(o))var f=new v([],(!0))}for(n=f?n:r;++n1&&v.reverse(),c&&ua))return!1;var s=o.get(e);if(s&&o.get(i))return s==i;var l=-1,c=!0,d=r&he?new _r:re;for(o.set(e,i),o.set(i,e);++l1?"& ":"")+i[n],i=i.join(r>2?", ":" "),e.replace(Ii,"{\n/* [wrapped with "+i+"] */\n")}function No(e){return gd(e)||md(e)||!!(Dl&&e&&e[Dl])}function Io(e,i){return i=null==i?Pe:i,!!i&&("number"==typeof e||Ki.test(e))&&e>-1&&e%1==0&&e0){if(++i>=Ae)return arguments[0]}else i=0;return e.apply(re,arguments)}}function nf(e,i){var r=-1,n=e.length,t=n-1;for(i=i===re?n:i;++r=this.__values__.length,i=e?re:this.__values__[this.__index__++];return{done:e,value:i}}function aa(){return this}function ua(e){for(var i,n=this;n instanceof r;){var t=af(n);t.__index__=0,t.__values__=re,i?o.__wrapped__=t:i=t;var o=t;n=n.__wrapped__}return o.__wrapped__=e,i}function sa(){var e=this.__wrapped__;if(e instanceof A){var i=e;return this.__actions__.length&&(i=new A(this)),i=i.reverse(),i.__actions__.push({func:na,args:[Pf],thisArg:re}),new v(i,this.__chain__)}return this.thru(Pf)}function la(){return gt(this.__wrapped__,this.__actions__)}function ca(e,i,r){var n=gd(e)?s:Yr;return r&&Bo(e,i,r)&&(i=re),n(e,Oo(i,3))}function da(e,i){var r=gd(e)?l:$r;return r(e,Oo(i,3))}function ba(e,i){return Qr(wa(e,i),1)}function ha(e,i){return Qr(wa(e,i),Te)}function ka(e,i,r){return r=r===re?1:Au(r),Qr(wa(e,i),r)}function _a(e,i){var r=gd(e)?a:wc;return r(e,Oo(i,3))}function pa(e,i){var r=gd(e)?u:mc;return r(e,Oo(i,3))}function va(e,i,r,n){e=Za(e)?e:ts(e),r=r&&!n?Au(r):0;var t=e.length;return r<0&&(r=Jl(t+r,0)),mu(e)?r<=t&&e.indexOf(i,r)>-1:!!t&&y(e,i,r)>-1}function wa(e,i){var r=gd(e)?b:Vn;return r(e,Oo(i,3))}function ma(e,i,r,n){return null==e?[]:(gd(i)||(i=null==i?[]:[i]),r=n?re:r,gd(r)||(r=null==r?[]:[r]),Jn(e,i,r))}function ga(e,i,r){var n=gd(e)?k:x,t=arguments.length<3;return n(e,Oo(i,4),r,t,wc)}function ya(e,i,r){var n=gd(e)?_:x,t=arguments.length<3;return n(e,Oo(i,4),r,t,mc)}function Ea(e,i){var r=gd(e)?l:$r;return r(e,Na(Oo(i,3)))}function Sa(e){var i=gd(e)?Cr:ft;return i(e)}function Oa(e,i,r){i=(r?Bo(e,i,r):i===re)?1:Au(i);var n=gd(e)?Ar:at;return n(e,i)}function Ca(e){var i=gd(e)?xr:st;return i(e)}function Aa(e){if(null==e)return 0;if(Za(e))return mu(e)?Z(e):e.length;var i=Mc(e);return i==Ke||i==ri?e.size:Hn(e).length}function xa(e,i,r){var n=gd(e)?p:ct;return r&&Bo(e,i,r)&&(i=re),n(e,Oo(i,3))}function Ra(e,i){if("function"!=typeof i)throw new kl(fe);return e=Au(e),function(){if(--e<1)return i.apply(this,arguments)}}function Fa(e,i,r){return i=r?re:i,i=e&&null==i?e.length:i,bo(e,ye,re,re,re,re,i)}function Ma(e,i){var r;if("function"!=typeof i)throw new kl(fe);return e=Au(e),function(){return--e>0&&(r=i.apply(this,arguments)),e<=1&&(i=re),r}}function Ta(e,i,r){i=r?re:i;var n=bo(e,ve,re,re,re,re,re,i);return n.placeholder=Ta.placeholder,n}function Pa(e,i,r){i=r?re:i;var n=bo(e,we,re,re,re,re,re,i);return n.placeholder=Pa.placeholder,n}function ja(e,i,r){function n(i){var r=d,n=b;return d=b=re,v=i,k=e.apply(n,r)}function t(e){return v=e,_=jc(a,i),w?n(e):k}function o(e){var r=e-p,n=e-v,t=i-r;return m?Zl(t,h-n):t}function f(e){var r=e-p,n=e-v;return p===re||r>=i||r<0||m&&n>=h}function a(){var e=sd();return f(e)?u(e):void(_=jc(a,o(e)))}function u(e){return _=re,g&&d?n(e):(d=b=re,k)}function s(){_!==re&&Cc(_),v=0,d=p=b=_=re}function l(){return _===re?k:u(sd())}function c(){var e=sd(),r=f(e);if(d=arguments,b=this,p=e,r){if(_===re)return t(p);if(m)return _=jc(a,i),n(p)}return _===re&&(_=jc(a,i)),k}var d,b,h,k,_,p,v=0,w=!1,m=!1,g=!0;if("function"!=typeof e)throw new kl(fe);return i=Ru(i)||0,su(r)&&(w=!!r.leading,m="maxWait"in r,h=m?Jl(Ru(r.maxWait)||0,i):h,g="trailing"in r?!!r.trailing:g),c.cancel=s,c.flush=l,c}function La(e){return bo(e,Se)}function Da(e,i){if("function"!=typeof e||null!=i&&"function"!=typeof i)throw new kl(fe);var r=function(){var n=arguments,t=i?i.apply(this,n):n[0],o=r.cache;if(o.has(t))return o.get(t);var f=e.apply(this,n);return r.cache=o.set(t,f)||o,f};return r.cache=new(Da.Cache||lr),r}function Na(e){if("function"!=typeof e)throw new kl(fe);return function(){var i=arguments;switch(i.length){case 0:return!e.call(this);case 1:return!e.call(this,i[0]);case 2:return!e.call(this,i[0],i[1]);case 3:return!e.call(this,i[0],i[1],i[2])}return!e.apply(this,i)}}function Ia(e){return Ma(2,e)}function Ba(e,i){if("function"!=typeof e)throw new kl(fe);return i=i===re?i:Au(i),ot(e,i)}function Ua(e,i){if("function"!=typeof e)throw new kl(fe);return i=null==i?0:Jl(Au(i),0),ot(function(r){var n=r[i],t=At(r,0,i);return n&&h(t,n),o(e,this,t)})}function Ha(e,i,r){var n=!0,t=!0;if("function"!=typeof e)throw new kl(fe);return su(r)&&(n="leading"in r?!!r.leading:n,t="trailing"in r?!!r.trailing:t),ja(e,i,{leading:n,maxWait:i,trailing:t})}function za(e){return Fa(e,1)}function Ga(e,i){return kd(Ot(i),e)}function Va(){if(!arguments.length)return[];var e=arguments[0];return gd(e)?e:[e]}function Ya(e){return Ir(e,de)}function Wa(e,i){return i="function"==typeof i?i:re,Ir(e,de,i)}function qa(e){return Ir(e,le|de)}function Xa(e,i){return i="function"==typeof i?i:re,Ir(e,le|de,i)}function Ka(e,i){return null==i||zr(e,i,Yu(i))}function Ja(e,i){return e===i||e!==e&&i!==i}function Za(e){return null!=e&&uu(e.length)&&!fu(e)}function $a(e){return lu(e)&&Za(e)}function Qa(e){return e===!0||e===!1||lu(e)&&ln(e)==Ge}function eu(e){return lu(e)&&1===e.nodeType&&!vu(e)}function iu(e){if(null==e)return!0;if(Za(e)&&(gd(e)||"string"==typeof e||"function"==typeof e.splice||Ed(e)||xd(e)||md(e)))return!e.length;var i=Mc(e);if(i==Ke||i==ri)return!e.size;if(Vo(e))return!Hn(e).length;for(var r in e)if(gl.call(e,r))return!1;return!0}function ru(e,i){return Tn(e,i)}function nu(e,i,r){r="function"==typeof r?r:re;var n=r?r(e,i):re;return n===re?Tn(e,i,re,r):!!n}function tu(e){if(!lu(e))return!1;var i=ln(e);return i==We||i==Ye||"string"==typeof e.message&&"string"==typeof e.name&&!vu(e)}function ou(e){return"number"==typeof e&&ql(e)}function fu(e){if(!su(e))return!1;var i=ln(e);return i==qe||i==Xe||i==ze||i==ei}function au(e){return"number"==typeof e&&e==Au(e)}function uu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Pe}function su(e){var i=typeof e;return null!=e&&("object"==i||"function"==i)}function lu(e){return null!=e&&"object"==typeof e}function cu(e,i){return e===i||Ln(e,i,Ao(i))}function du(e,i,r){return r="function"==typeof r?r:re,Ln(e,i,Ao(i),r)}function bu(e){return pu(e)&&e!=+e}function hu(e){if(Tc(e))throw new sl(oe);return Dn(e)}function ku(e){return null===e}function _u(e){return null==e}function pu(e){return"number"==typeof e||lu(e)&&ln(e)==Je}function vu(e){if(!lu(e)||ln(e)!=$e)return!1;var i=Tl(e);if(null===i)return!0;var r=gl.call(i,"constructor")&&i.constructor;return"function"==typeof r&&r instanceof r&&ml.call(r)==Ol}function wu(e){return au(e)&&e>=-Pe&&e<=Pe}function mu(e){return"string"==typeof e||!gd(e)&&lu(e)&&ln(e)==ni}function gu(e){return"symbol"==typeof e||lu(e)&&ln(e)==ti}function yu(e){return e===re}function Eu(e){return lu(e)&&Mc(e)==fi}function Su(e){return lu(e)&&ln(e)==ai}function Ou(e){if(!e)return[];if(Za(e))return mu(e)?$(e):Ut(e);if(Nl&&e[Nl])return G(e[Nl]());var i=Mc(e),r=i==Ke?V:i==ri?q:ts;return r(e)}function Cu(e){if(!e)return 0===e?e:0;if(e=Ru(e),e===Te||e===-Te){var i=e<0?-1:1;return i*je}return e===e?e:0}function Au(e){var i=Cu(e),r=i%1;return i===i?r?i-r:i:0}function xu(e){return e?Nr(Au(e),0,De):0}function Ru(e){if("number"==typeof e)return e;if(gu(e))return Le;if(su(e)){var i="function"==typeof e.valueOf?e.valueOf():e;e=su(i)?i+"":i}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Li,"");var r=Wi.test(e);return r||Xi.test(e)?rn(e.slice(2),r?2:8):Yi.test(e)?Le:+e}function Fu(e){return Ht(e,Wu(e))}function Mu(e){return e?Nr(Au(e),-Pe,Pe):0===e?e:0}function Tu(e){return null==e?"":_t(e)}function Pu(e,i){var r=vc(e);return null==i?r:Pr(r,i)}function ju(e,i){return m(e,Oo(i,3),nn)}function Lu(e,i){return m(e,Oo(i,3),tn)}function Du(e,i){return null==e?e:gc(e,Oo(i,3),Wu)}function Nu(e,i){return null==e?e:yc(e,Oo(i,3),Wu)}function Iu(e,i){return e&&nn(e,Oo(i,3))}function Bu(e,i){return e&&tn(e,Oo(i,3))}function Uu(e){return null==e?[]:fn(e,Yu(e))}function Hu(e){return null==e?[]:fn(e,Wu(e))}function zu(e,i,r){var n=null==e?re:an(e,i);return n===re?r:n}function Gu(e,i){return null!=e&&To(e,i,gn)}function Vu(e,i){return null!=e&&To(e,i,Sn)}function Yu(e){return Za(e)?Or(e):Hn(e)}function Wu(e){return Za(e)?Or(e,!0):zn(e)}function qu(e,i){
+var r={};return i=Oo(i,3),nn(e,function(e,n,t){Lr(r,i(e,n,t),e)}),r}function Xu(e,i){var r={};return i=Oo(i,3),nn(e,function(e,n,t){Lr(r,n,i(e,n,t))}),r}function Ku(e,i){return Ju(e,Na(Oo(i)))}function Ju(e,i){if(null==e)return{};var r=b(yo(e),function(e){return[e]});return i=Oo(i),$n(e,r,function(e,r){return i(e,r[0])})}function Zu(e,i,r){i=Ct(i,e);var n=-1,t=i.length;for(t||(t=1,e=re);++ni){var n=e;e=i,i=n}if(r||e%1||i%1){var t=ec();return Zl(e+t*(i-e+en("1e-"+((t+"").length-1))),i)}return rt(e,i)}function ss(e){return eb(Tu(e).toLowerCase())}function ls(e){return e=Tu(e),e&&e.replace(Ji,vn).replace(Hr,"")}function cs(e,i,r){e=Tu(e),i=_t(i);var n=e.length;r=r===re?n:Nr(Au(r),0,n);var t=r;return r-=i.length,r>=0&&e.slice(r,t)==i}function ds(e){return e=Tu(e),e&&Oi.test(e)?e.replace(Ei,wn):e}function bs(e){return e=Tu(e),e&&ji.test(e)?e.replace(Pi,"\\$&"):e}function hs(e,i,r){e=Tu(e),i=Au(i);var n=i?Z(e):0;if(!i||n>=i)return e;var t=(i-n)/2;return oo(Vl(t),r)+e+oo(Gl(t),r)}function ks(e,i,r){e=Tu(e),i=Au(i);var n=i?Z(e):0;return i&&n>>0)?(e=Tu(e),e&&("string"==typeof i||null!=i&&!Cd(i))&&(i=_t(i),!i&&H(e))?At($(e),0,r):e.split(i,r)):[]}function gs(e,i,r){return e=Tu(e),r=null==r?0:Nr(Au(r),0,e.length),i=_t(i),e.slice(r,r+i.length)==i}function ys(e,r,n){var t=i.templateSettings;n&&Bo(e,r,n)&&(r=re),e=Tu(e),r=Pd({},r,t,ho);var o,f,a=Pd({},r.imports,t.imports,ho),u=Yu(a),s=j(a,u),l=0,c=r.interpolate||Zi,d="__p += '",b=bl((r.escape||Zi).source+"|"+c.source+"|"+(c===xi?Gi:Zi).source+"|"+(r.evaluate||Zi).source+"|$","g"),h="//# sourceURL="+("sourceURL"in r?r.sourceURL:"lodash.templateSources["+ ++qr+"]")+"\n";e.replace(b,function(i,r,n,t,a,u){return n||(n=t),d+=e.slice(l,u).replace($i,B),r&&(o=!0,d+="' +\n__e("+r+") +\n'"),a&&(f=!0,d+="';\n"+a+";\n__p += '"),n&&(d+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+i.length,i}),d+="';\n";var k=r.variable;k||(d="with (obj) {\n"+d+"\n}\n"),d=(f?d.replace(wi,""):d).replace(mi,"$1").replace(gi,"$1;"),d="function("+(k||"obj")+") {\n"+(k?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(f?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var _=ib(function(){return ll(u,h+"return "+d).apply(re,s)});if(_.source=d,tu(_))throw _;return _}function Es(e){return Tu(e).toLowerCase()}function Ss(e){return Tu(e).toUpperCase()}function Os(e,i,r){if(e=Tu(e),e&&(r||i===re))return e.replace(Li,"");if(!e||!(i=_t(i)))return e;var n=$(e),t=$(i),o=D(n,t),f=N(n,t)+1;return At(n,o,f).join("")}function Cs(e,i,r){if(e=Tu(e),e&&(r||i===re))return e.replace(Ni,"");if(!e||!(i=_t(i)))return e;var n=$(e),t=N(n,$(i))+1;return At(n,0,t).join("")}function As(e,i,r){if(e=Tu(e),e&&(r||i===re))return e.replace(Di,"");if(!e||!(i=_t(i)))return e;var n=$(e),t=D(n,$(i));return At(n,t).join("")}function xs(e,i){var r=Oe,n=Ce;if(su(i)){var t="separator"in i?i.separator:t;r="length"in i?Au(i.length):r,n="omission"in i?_t(i.omission):n}e=Tu(e);var o=e.length;if(H(e)){var f=$(e);o=f.length}if(r>=o)return e;var a=r-Z(n);if(a<1)return n;var u=f?At(f,0,a).join(""):e.slice(0,a);if(t===re)return u+n;if(f&&(a+=u.length-a),Cd(t)){if(e.slice(a).search(t)){var s,l=u;for(t.global||(t=bl(t.source,Tu(Vi.exec(t))+"g")),t.lastIndex=0;s=t.exec(l);)var c=s.index;u=u.slice(0,c===re?a:c)}}else if(e.indexOf(_t(t),a)!=a){var d=u.lastIndexOf(t);d>-1&&(u=u.slice(0,d))}return u+n}function Rs(e){return e=Tu(e),e&&Si.test(e)?e.replace(yi,mn):e}function Fs(e,i,r){return e=Tu(e),i=r?re:i,i===re?z(e)?ie(e):w(e):e.match(i)||[]}function Ms(e){var i=null==e?0:e.length,r=Oo();return e=i?b(e,function(e){if("function"!=typeof e[1])throw new kl(fe);return[r(e[0]),e[1]]}):[],ot(function(r){for(var n=-1;++nPe)return[];var r=De,n=Zl(e,De);i=Oo(i),e-=De;for(var t=M(n,i);++r1?e[i-1]:re;return r="function"==typeof r?(e.pop(),r):re,$f(e,r)}),ed=mo(function(e){var i=e.length,r=i?e[0]:0,n=this.__wrapped__,t=function(i){return Dr(i,e)};return!(i>1||this.__actions__.length)&&n instanceof A&&Io(r)?(n=n.slice(r,+r+(i?1:0)),n.__actions__.push({func:na,args:[t],thisArg:re}),new v(n,this.__chain__).thru(function(e){return i&&!e.length&&e.push(re),e})):this.thru(t)}),id=Vt(function(e,i,r){gl.call(e,r)?++e[r]:Lr(e,r,1)}),rd=Qt(_f),nd=Qt(pf),td=Vt(function(e,i,r){gl.call(e,r)?e[r].push(i):Lr(e,r,[i])}),od=ot(function(e,i,r){var n=-1,t="function"==typeof i,f=Za(e)?al(e.length):[];return wc(e,function(e){f[++n]=t?o(i,e,r):xn(e,i,r)}),f}),fd=Vt(function(e,i,r){Lr(e,r,i)}),ad=Vt(function(e,i,r){e[r?0:1].push(i)},function(){return[[],[]]}),ud=ot(function(e,i){if(null==e)return[];var r=i.length;return r>1&&Bo(e,i[0],i[1])?i=[]:r>2&&Bo(i[0],i[1],i[2])&&(i=[i[0]]),Jn(e,Qr(i,1),[])}),sd=Hl||function(){return on.Date.now()},ld=ot(function(e,i,r){var n=ke;if(r.length){var t=W(r,So(ld));n|=me}return bo(e,n,i,r,t)}),cd=ot(function(e,i,r){var n=ke|_e;if(r.length){var t=W(r,So(cd));n|=me}return bo(i,n,e,r,t)}),dd=ot(function(e,i){return Gr(e,1,i)}),bd=ot(function(e,i,r){return Gr(e,Ru(i)||0,r)});Da.Cache=lr;var hd=Oc(function(e,i){i=1==i.length&&gd(i[0])?b(i[0],P(Oo())):b(Qr(i,1),P(Oo()));var r=i.length;return ot(function(n){for(var t=-1,f=Zl(n.length,r);++t=i}),md=Rn(function(){return arguments}())?Rn:function(e){return lu(e)&&gl.call(e,"callee")&&!jl.call(e,"callee")},gd=al.isArray,yd=cn?P(cn):Fn,Ed=Wl||Ws,Sd=dn?P(dn):Mn,Od=bn?P(bn):jn,Cd=hn?P(hn):Nn,Ad=kn?P(kn):In,xd=_n?P(_n):Bn,Rd=uo(Gn),Fd=uo(function(e,i){return e<=i}),Md=Yt(function(e,i){if(Vo(i)||Za(i))return void Ht(i,Yu(i),e);for(var r in i)gl.call(i,r)&&Fr(e,r,i[r])}),Td=Yt(function(e,i){Ht(i,Wu(i),e)}),Pd=Yt(function(e,i,r,n){Ht(i,Wu(i),e,n)}),jd=Yt(function(e,i,r,n){Ht(i,Yu(i),e,n)}),Ld=mo(Dr),Dd=ot(function(e){return e.push(re,ho),o(Pd,re,e)}),Nd=ot(function(e){return e.push(re,ko),o(zd,re,e)}),Id=ro(function(e,i,r){e[i]=r},Ps(Ls)),Bd=ro(function(e,i,r){gl.call(e,i)?e[i].push(r):e[i]=[r]},Oo),Ud=ot(xn),Hd=Yt(function(e,i,r){qn(e,i,r)}),zd=Yt(function(e,i,r,n){qn(e,i,r,n)}),Gd=mo(function(e,i){var r={};if(null==e)return r;var n=!1;i=b(i,function(i){return i=Ct(i,e),n||(n=i.length>1),i}),Ht(e,yo(e),r),n&&(r=Ir(r,le|ce|de,_o));for(var t=i.length;t--;)vt(r,i[t]);return r}),Vd=mo(function(e,i){return null==e?{}:Zn(e,i)}),Yd=co(Yu),Wd=co(Wu),qd=Jt(function(e,i,r){return i=i.toLowerCase(),e+(r?ss(i):i)}),Xd=Jt(function(e,i,r){return e+(r?"-":"")+i.toLowerCase()}),Kd=Jt(function(e,i,r){return e+(r?" ":"")+i.toLowerCase()}),Jd=Kt("toLowerCase"),Zd=Jt(function(e,i,r){return e+(r?"_":"")+i.toLowerCase()}),$d=Jt(function(e,i,r){return e+(r?" ":"")+eb(i)}),Qd=Jt(function(e,i,r){return e+(r?" ":"")+i.toUpperCase()}),eb=Kt("toUpperCase"),ib=ot(function(e,i){try{return o(e,re,i)}catch(r){return tu(r)?r:new sl(r)}}),rb=mo(function(e,i){return a(i,function(i){i=tf(i),Lr(e,i,ld(e[i],e))}),e}),nb=eo(),tb=eo(!0),ob=ot(function(e,i){return function(r){return xn(r,e,i)}}),fb=ot(function(e,i){return function(r){return xn(e,r,i)}}),ab=to(b),ub=to(s),sb=to(p),lb=ao(),cb=ao(!0),db=no(function(e,i){return e+i},0),bb=lo("ceil"),hb=no(function(e,i){return e/i},1),kb=lo("floor"),_b=no(function(e,i){return e*i},1),pb=lo("round"),vb=no(function(e,i){return e-i},0);return i.after=Ra,i.ary=Fa,i.assign=Md,i.assignIn=Td,i.assignInWith=Pd,i.assignWith=jd,i.at=Ld,i.before=Ma,i.bind=ld,i.bindAll=rb,i.bindKey=cd,i.castArray=Va,i.chain=ia,i.chunk=uf,i.compact=sf,i.concat=lf,i.cond=Ms,i.conforms=Ts,i.constant=Ps,i.countBy=id,i.create=Pu,i.curry=Ta,i.curryRight=Pa,i.debounce=ja,i.defaults=Dd,i.defaultsDeep=Nd,i.defer=dd,i.delay=bd,i.difference=Nc,i.differenceBy=Ic,i.differenceWith=Bc,i.drop=cf,i.dropRight=df,i.dropRightWhile=bf,i.dropWhile=hf,i.fill=kf,i.filter=da,i.flatMap=ba,i.flatMapDeep=ha,i.flatMapDepth=ka,i.flatten=vf,i.flattenDeep=wf,i.flattenDepth=mf,i.flip=La,i.flow=nb,i.flowRight=tb,i.fromPairs=gf,i.functions=Uu,i.functionsIn=Hu,i.groupBy=td,i.initial=Sf,i.intersection=Uc,i.intersectionBy=Hc,i.intersectionWith=zc,i.invert=Id,i.invertBy=Bd,i.invokeMap=od,i.iteratee=Ds,i.keyBy=fd,i.keys=Yu,i.keysIn=Wu,i.map=wa,i.mapKeys=qu,i.mapValues=Xu,i.matches=Ns,i.matchesProperty=Is,i.memoize=Da,i.merge=Hd,i.mergeWith=zd,i.method=ob,i.methodOf=fb,i.mixin=Bs,i.negate=Na,i.nthArg=zs,i.omit=Gd,i.omitBy=Ku,i.once=Ia,i.orderBy=ma,i.over=ab,i.overArgs=hd,i.overEvery=ub,i.overSome=sb,i.partial=kd,i.partialRight=_d,i.partition=ad,i.pick=Vd,i.pickBy=Ju,i.property=Gs,i.propertyOf=Vs,i.pull=Gc,i.pullAll=Rf,i.pullAllBy=Ff,i.pullAllWith=Mf,i.pullAt=Vc,i.range=lb,i.rangeRight=cb,i.rearg=pd,i.reject=Ea,i.remove=Tf,i.rest=Ba,i.reverse=Pf,i.sampleSize=Oa,i.set=$u,i.setWith=Qu,i.shuffle=Ca,i.slice=jf,i.sortBy=ud,i.sortedUniq=Hf,i.sortedUniqBy=zf,i.split=ms,i.spread=Ua,i.tail=Gf,i.take=Vf,i.takeRight=Yf,i.takeRightWhile=Wf,i.takeWhile=qf,i.tap=ra,i.throttle=Ha,i.thru=na,i.toArray=Ou,i.toPairs=Yd,i.toPairsIn=Wd,i.toPath=Zs,i.toPlainObject=Fu,i.transform=es,i.unary=za,i.union=Yc,i.unionBy=Wc,i.unionWith=qc,i.uniq=Xf,i.uniqBy=Kf,i.uniqWith=Jf,i.unset=is,i.unzip=Zf,i.unzipWith=$f,i.update=rs,i.updateWith=ns,i.values=ts,i.valuesIn=os,i.without=Xc,i.words=Fs,i.wrap=Ga,i.xor=Kc,i.xorBy=Jc,i.xorWith=Zc,i.zip=$c,i.zipObject=Qf,i.zipObjectDeep=ea,i.zipWith=Qc,i.entries=Yd,i.entriesIn=Wd,i.extend=Td,i.extendWith=Pd,Bs(i,i),i.add=db,i.attempt=ib,i.camelCase=qd,i.capitalize=ss,i.ceil=bb,i.clamp=fs,i.clone=Ya,i.cloneDeep=qa,i.cloneDeepWith=Xa,i.cloneWith=Wa,i.conformsTo=Ka,i.deburr=ls,i.defaultTo=js,i.divide=hb,i.endsWith=cs,i.eq=Ja,i.escape=ds,i.escapeRegExp=bs,i.every=ca,i.find=rd,i.findIndex=_f,i.findKey=ju,i.findLast=nd,i.findLastIndex=pf,i.findLastKey=Lu,i.floor=kb,i.forEach=_a,i.forEachRight=pa,i.forIn=Du,i.forInRight=Nu,i.forOwn=Iu,i.forOwnRight=Bu,i.get=zu,i.gt=vd,i.gte=wd,i.has=Gu,i.hasIn=Vu,i.head=yf,i.identity=Ls,i.includes=va,i.indexOf=Ef,i.inRange=as,i.invoke=Ud,i.isArguments=md,i.isArray=gd,i.isArrayBuffer=yd,i.isArrayLike=Za,i.isArrayLikeObject=$a,i.isBoolean=Qa,i.isBuffer=Ed,i.isDate=Sd,i.isElement=eu,i.isEmpty=iu,i.isEqual=ru,i.isEqualWith=nu,i.isError=tu,i.isFinite=ou,i.isFunction=fu,i.isInteger=au,i.isLength=uu,i.isMap=Od,i.isMatch=cu,i.isMatchWith=du,i.isNaN=bu,i.isNative=hu,i.isNil=_u,i.isNull=ku,i.isNumber=pu,i.isObject=su,i.isObjectLike=lu,i.isPlainObject=vu,i.isRegExp=Cd,i.isSafeInteger=wu,i.isSet=Ad,i.isString=mu,i.isSymbol=gu,i.isTypedArray=xd,i.isUndefined=yu,i.isWeakMap=Eu,i.isWeakSet=Su,i.join=Of,i.kebabCase=Xd,i.last=Cf,i.lastIndexOf=Af,i.lowerCase=Kd,i.lowerFirst=Jd,i.lt=Rd,i.lte=Fd,i.max=Qs,i.maxBy=el,i.mean=il,i.meanBy=rl,i.min=nl,i.minBy=tl,i.stubArray=Ys,i.stubFalse=Ws,i.stubObject=qs,i.stubString=Xs,i.stubTrue=Ks,i.multiply=_b,i.nth=xf,i.noConflict=Us,i.noop=Hs,i.now=sd,i.pad=hs,i.padEnd=ks,i.padStart=_s,i.parseInt=ps,i.random=us,i.reduce=ga,i.reduceRight=ya,i.repeat=vs,i.replace=ws,i.result=Zu,i.round=pb,i.runInContext=En,i.sample=Sa,i.size=Aa,i.snakeCase=Zd,i.some=xa,i.sortedIndex=Lf,i.sortedIndexBy=Df,i.sortedIndexOf=Nf,i.sortedLastIndex=If,i.sortedLastIndexBy=Bf,i.sortedLastIndexOf=Uf,i.startCase=$d,i.startsWith=gs,i.subtract=vb,i.sum=ol,i.sumBy=fl,i.template=ys,i.times=Js,i.toFinite=Cu,i.toInteger=Au,i.toLength=xu,i.toLower=Es,i.toNumber=Ru,i.toSafeInteger=Mu,i.toString=Tu,i.toUpper=Ss,i.trim=Os,i.trimEnd=Cs,i.trimStart=As,i.truncate=xs,i.unescape=Rs,i.uniqueId=$s,i.upperCase=Qd,i.upperFirst=eb,i.each=_a,i.eachRight=pa,i.first=yf,Bs(i,function(){var e={};return nn(i,function(r,n){gl.call(i.prototype,n)||(e[n]=r)}),e}(),{chain:!1}),i.VERSION=ne,a(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){i[e].placeholder=i}),a(["drop","take"],function(e,i){A.prototype[e]=function(r){r=r===re?1:Jl(Au(r),0);var n=this.__filtered__&&!i?new A(this):this.clone();return n.__filtered__?n.__takeCount__=Zl(r,n.__takeCount__):n.__views__.push({size:Zl(r,De),type:e+(n.__dir__<0?"Right":"")}),n},A.prototype[e+"Right"]=function(i){return this.reverse()[e](i).reverse()}}),a(["filter","map","takeWhile"],function(e,i){var r=i+1,n=r==Re||r==Me;A.prototype[e]=function(e){var i=this.clone();return i.__iteratees__.push({iteratee:Oo(e,3),type:r}),i.__filtered__=i.__filtered__||n,i}}),a(["head","last"],function(e,i){var r="take"+(i?"Right":"");A.prototype[e]=function(){return this[r](1).value()[0]}}),a(["initial","tail"],function(e,i){var r="drop"+(i?"":"Right");A.prototype[e]=function(){return this.__filtered__?new A(this):this[r](1)}}),A.prototype.compact=function(){return this.filter(Ls)},A.prototype.find=function(e){return this.filter(e).head()},A.prototype.findLast=function(e){return this.reverse().find(e)},A.prototype.invokeMap=ot(function(e,i){return"function"==typeof e?new A(this):this.map(function(r){return xn(r,e,i)})}),A.prototype.reject=function(e){return this.filter(Na(Oo(e)))},A.prototype.slice=function(e,i){e=Au(e);var r=this;return r.__filtered__&&(e>0||i<0)?new A(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),i!==re&&(i=Au(i),r=i<0?r.dropRight(-i):r.take(i-e)),r)},A.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},A.prototype.toArray=function(){return this.take(De)},nn(A.prototype,function(e,r){var n=/^(?:filter|find|map|reject)|While$/.test(r),t=/^(?:head|last)$/.test(r),o=i[t?"take"+("last"==r?"Right":""):r],f=t||/^find/.test(r);o&&(i.prototype[r]=function(){var r=this.__wrapped__,a=t?[1]:arguments,u=r instanceof A,s=a[0],l=u||gd(r),c=function(e){var r=o.apply(i,h([e],a));return t&&d?r[0]:r};l&&n&&"function"==typeof s&&1!=s.length&&(u=l=!1);var d=this.__chain__,b=!!this.__actions__.length,k=f&&!d,_=u&&!b;if(!f&&l){r=_?r:new A(this);var p=e.apply(r,a);return p.__actions__.push({func:na,args:[c],thisArg:re}),new v(p,d)}return k&&_?e.apply(this,a):(p=this.thru(c),k?t?p.value()[0]:p.value():p)})}),a(["pop","push","shift","sort","splice","unshift"],function(e){var r=_l[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",t=/^(?:pop|shift)$/.test(e);i.prototype[e]=function(){var e=arguments;if(t&&!this.__chain__){var i=this.value();return r.apply(gd(i)?i:[],e)}return this[n](function(i){return r.apply(gd(i)?i:[],e)})}}),nn(A.prototype,function(e,r){var n=i[r];if(n){var t=n.name+"",o=sc[t]||(sc[t]=[]);o.push({name:r,func:n})}}),sc[io(re,_e).name]=[{name:"wrapper",func:re}],A.prototype.clone=K,A.prototype.reverse=Q,A.prototype.value=ee,i.prototype.at=ed,i.prototype.chain=ta,i.prototype.commit=oa,i.prototype.next=fa,i.prototype.plant=ua,i.prototype.reverse=sa,i.prototype.toJSON=i.prototype.valueOf=i.prototype.value=la,i.prototype.first=i.prototype.head,Nl&&(i.prototype[Nl]=aa),i},yn=gn();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(on._=yn,define(function(){return yn})):an?((an.exports=yn)._=yn,fn._=yn):on._=yn}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],305:[function(e,i,r){"use strict";function n(e,i){if(void 0===i)return e;if(E(i))return(E(e)?e:[]).concat(i);if(!f(i))return i;for(var r=o(e)?e:{},t=Object.keys(i),a=0;a0;)n[o]=arguments[o+1];var f=Object.create(e.methods||null);if(g(f,e.deepProperties),y(f,e.properties),Object.defineProperties(f,e.propertyDescriptors||{}),!e.initializers||0===e.initializers.length)return f;void 0===r&&(r={});for(var a=e.initializers,u=a.length,s=0;s0){for(var a=[],u=0;u0;)i[r]=arguments[r+1];return i.reduce(n,e)},y=Object.assign,E=Array.isArray,S=Array.prototype.concat,O=function(e){void 0===e&&(e={});var i=e.methods,r=e.properties,n=e.props,t=e.refs,f=e.initializers,s=e.init,l=e.composers,c=e.deepProperties,d=e.deepProps,b=e.propertyDescriptors,h=e.staticProperties,k=e.statics,_=e.staticDeepProperties,p=e.deepStatics,v=e.staticPropertyDescriptors,w=e.configuration,m=e.conf,E=e.deepConfiguration,S=e.deepConf,O=o(n)||o(t)||o(r)?y({},n,t,r):void 0,C=o(d)?g({},d):void 0;C=o(c)?g(C,c):C;var A=o(k)||o(h)?y({},k,h):void 0,x=o(p)?g({},p):void 0;x=o(_)?g(x,_):x;var R=o(m)||o(w)?y({},m,w):void 0,F=o(S)?g({},S):void 0;F=o(E)?g(F,E):F;var M=a(s,f),T=a(l);T&&(F=F||{},u(F,T,"composers"));var P={};return i&&(P.methods=i),O&&(P.properties=O),M&&(P.initializers=M),C&&(P.deepProperties=C),A&&(P.staticProperties=A),i&&(P.methods=i),x&&(P.staticDeepProperties=x),b&&(P.propertyDescriptors=b),v&&(P.staticPropertyDescriptors=v),R&&(P.configuration=R),F&&(P.deepConfiguration=F),P},C=p("methods",y),A=p("properties",y),x=p("deepProperties",g),R=p("staticProperties",y),F=p("staticDeepProperties",g),M=p("configuration",y),T=p("deepConfiguration",g),P=p("propertyDescriptors",y),j=p("staticPropertyDescriptors",y),L={methods:C,properties:A,refs:A,props:A,initializers:v,init:v,composers:w,deepProperties:x,deepProps:x,staticProperties:R,statics:R,staticDeepProperties:F,deepStatics:F,configuration:M,conf:M,deepConfiguration:T,deepConf:T,propertyDescriptors:P,staticPropertyDescriptors:j},D=k({staticProperties:L},{staticProperties:{create:function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];return this.apply(void 0,e)},compose:m}}),N=m.bind();m.compose=N;var I=y(m,L);r.methods=C,r.properties=A,r.refs=A,r.props=A,r.initializers=v,r.init=v,r.composers=w,r.deepProperties=x,r.deepProps=x,r.staticProperties=R,r.statics=R,r.staticDeepProperties=F,r.deepStatics=F,r.configuration=M,r.conf=M,r.deepConfiguration=T,r.deepConf=T,r.propertyDescriptors=P,r.staticPropertyDescriptors=j,r.compose=N,r["default"]=I,i.exports=r["default"]},{}],306:[function(e,i,r){i.exports=e("./lib/visibility.timers.js")},{"./lib/visibility.timers.js":308}],307:[function(e,i,r){!function(e){"use strict";var r=-1,n={onVisible:function(e){var i=n.isSupported();if(!i||!n.hidden())return e(),i;var r=n.change(function(i,t){n.hidden()||(n.unbind(r),e())});return r},change:function(e){if(!n.isSupported())return!1;r+=1;var i=r;return n._callbacks[i]=e,n._listen(),i},unbind:function(e){delete n._callbacks[e]},afterPrerendering:function(e){var i=n.isSupported(),r="prerender";if(!i||r!=n.state())return e(),i;var t=n.change(function(i,o){r!=o&&(n.unbind(t),e())});return t},hidden:function(){return!(!n._doc.hidden&&!n._doc.webkitHidden)},state:function(){return n._doc.visibilityState||n._doc.webkitVisibilityState||"visible"},isSupported:function(){return!(!n._doc.visibilityState&&!n._doc.webkitVisibilityState)},_doc:document||{},_callbacks:{},_change:function(e){var i=n.state();for(var r in n._callbacks)n._callbacks[r].call(n._doc,e,i)},_listen:function(){if(!n._init){var e="visibilitychange";n._doc.webkitVisibilityState&&(e="webkit"+e);var i=function(){n._change.apply(n,arguments)};n._doc.addEventListener?n._doc.addEventListener(e,i):n._doc.attachEvent(e,i),n._init=!0}}};"undefined"!=typeof i&&i.exports?i.exports=n:e.Visibility=n}(this)},{}],308:[function(e,i,r){!function(r){"use strict";var n=-1,t=function(e){return e.every=function(i,r,t){e._time(),t||(t=r,r=null),n+=1;var o=n;return e._timers[o]={visible:i,hidden:r,callback:t},e._run(o,!1),e.isSupported()&&e._listen(),o},e.stop=function(i){return!!e._timers[i]&&(e._stop(i),delete e._timers[i],!0)},e._timers={},e._time=function(){e._timed||(e._timed=!0,e._wasHidden=e.hidden(),e.change(function(){e._stopRun(),e._wasHidden=e.hidden()}))},e._run=function(i,n){var t,o=e._timers[i];if(e.hidden()){if(null===o.hidden)return;t=o.hidden}else t=o.visible;var f=function(){o.last=new Date,o.callback.call(r)};if(n){var a=new Date,u=a-o.last;t>u?o.delay=setTimeout(function(){o.id=setInterval(f,t),f()},t-u):(o.id=setInterval(f,t),f())}else o.id=setInterval(f,t)},e._stop=function(i){var r=e._timers[i];clearInterval(r.id),clearTimeout(r.delay),delete r.id,delete r.delay},e._stopRun=function(i){var r=e.hidden(),n=e._wasHidden;if(r&&!n||!r&&n)for(var t in e._timers)e._stop(t),e._run(t,!r)},e};"undefined"!=typeof i&&i.exports?i.exports=t(e("./visibility.core")):t(r.Visibility)}(window)},{"./visibility.core":307}],309:[function(e,i,r){"use strict";var n={};n.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},n.localCName=n.generateIdentifier(),n.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},n.splitSections=function(e){var i=e.split("\nm=");return i.map(function(e,i){return(i>0?"m="+e:e).trim()+"\r\n"})},n.matchPrefix=function(e,i){return n.splitLines(e).filter(function(e){return 0===e.indexOf(i)})},n.parseCandidate=function(e){var i;i=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");for(var r={foundation:i[0],component:i[1],protocol:i[2].toLowerCase(),priority:parseInt(i[3],10),ip:i[4],port:parseInt(i[5],10),type:i[7]},n=8;n-1?(r.attribute=e.substr(i+1,n-i-1),r.value=e.substr(n+1)):r.attribute=e.substr(i+1),r},n.getMid=function(e){var i=n.matchPrefix(e,"a=mid:")[0];if(i)return i.substr(6)},n.getDtlsParameters=function(e,i){var r=n.splitLines(e);r=r.concat(n.splitLines(i));var t=r.filter(function(e){return 0===e.indexOf("a=fingerprint:")})[0].substr(14),o={role:"auto",fingerprints:[{algorithm:t.split(" ")[0].toLowerCase(),value:t.split(" ")[1]}]};return o},n.writeDtlsParameters=function(e,i){var r="a=setup:"+i+"\r\n";return e.fingerprints.forEach(function(e){r+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),r},n.getIceParameters=function(e,i){var r=n.splitLines(e);r=r.concat(n.splitLines(i));var t={usernameFragment:r.filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:r.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)};return t},n.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},n.parseRtpParameters=function(e){for(var i={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=n.splitLines(e),t=r[0].split(" "),o=3;o0?"9":"0",r+=" UDP/TLS/RTP/SAVPF ",r+=i.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",i.codecs.forEach(function(e){r+=n.writeRtpMap(e),r+=n.writeFmtp(e),r+=n.writeRtcpFb(e)});var t=0;return i.codecs.forEach(function(e){e.maxptime>t&&(t=e.maxptime)}),t>0&&(r+="a=maxptime:"+t+"\r\n"),r+="a=rtcp-mux\r\n",i.headerExtensions.forEach(function(e){r+=n.writeExtmap(e)}),r},n.parseRtpEncodingParameters=function(e){var i,r=[],t=n.parseRtpParameters(e),o=t.fecMechanisms.indexOf("RED")!==-1,f=t.fecMechanisms.indexOf("ULPFEC")!==-1,a=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),u=a.length>0&&a[0].ssrc,s=n.matchPrefix(e,"a=ssrc-group:FID").map(function(e){var i=e.split(" ");return i.shift(),i.map(function(e){return parseInt(e,10)})});s.length>0&&s[0].length>1&&s[0][0]===u&&(i=s[0][1]),t.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var n={ssrc:u,codecPayloadType:parseInt(e.parameters.apt,10),rtx:{ssrc:i}};r.push(n),o&&(n=JSON.parse(JSON.stringify(n)),n.fec={ssrc:i,mechanism:f?"red+ulpfec":"red"},r.push(n))}}),0===r.length&&u&&r.push({ssrc:u});var l=n.matchPrefix(e,"b=");return l.length&&(0===l[0].indexOf("b=TIAS:")?l=parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")&&(l=parseInt(l[0].substr(5),10)),r.forEach(function(e){e.maxBitrate=l})),r},n.parseRtcpParameters=function(e){var i={},r=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];r&&(i.cname=r.value,i.ssrc=r.ssrc);var t=n.matchPrefix(e,"a=rtcp-rsize");i.reducedSize=t.length>0,i.compound=0===t.length;var o=n.matchPrefix(e,"a=rtcp-mux");return i.mux=o.length>0,i},n.parseMsid=function(e){var i,r=n.matchPrefix(e,"a=msid:");if(1===r.length)return i=r[0].substr(7).split(" "),{stream:i[0],track:i[1]};var t=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});return t.length>0?(i=t[0].value.split(" "),{stream:i[0],track:i[1]}):void 0},n.writeSessionBoilerplate=function(){return"v=0\r\no=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},n.writeMediaSection=function(e,i,r,t){var o=n.writeRtpDescription(e.kind,i);if(o+=n.writeIceParameters(e.iceGatherer.getLocalParameters()),o+=n.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===r?"actpass":"active"),o+="a=mid:"+e.mid+"\r\n",o+=e.rtpSender&&e.rtpReceiver?"a=sendrecv\r\n":e.rtpSender?"a=sendonly\r\n":e.rtpReceiver?"a=recvonly\r\n":"a=inactive\r\n",e.rtpSender){var f="msid:"+t.id+" "+e.rtpSender.track.id+"\r\n";o+="a="+f,o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+f,e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+f,o+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return o+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+n.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(o+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+n.localCName+"\r\n"),o},n.getDirection=function(e,i){for(var r=n.splitLines(e),t=0;t0&&"function"==typeof e)return t(e,i);var f=function(e){var i={},r=e.result();return r.forEach(function(e){var r={id:e.id,timestamp:e.timestamp,type:e.type};e.names().forEach(function(i){r[i]=e.stat(i)}),i[r.id]=r}),i},a=function(e,i){var r=new Map(Object.keys(e).map(function(i){return[i,e[i]]}));return i=i||e,Object.keys(i).forEach(function(e){r[e]=i[e]}),r};if(arguments.length>=2){var u=function(e){o[1](a(f(e)))};return t.apply(this,[u,arguments[0]])}return new Promise(function(i,r){1===o.length&&"object"==typeof e?t.apply(n,[function(e){i(a(f(e)))},r]):t.apply(n,[function(e){i(a(f(e),e.result()))},r])}).then(i,r)},r},window.RTCPeerConnection.prototype=webkitRTCPeerConnection.prototype,webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return webkitRTCPeerConnection.generateCertificate}}),["createOffer","createAnswer"].forEach(function(e){var i=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var r=1===arguments.length?arguments[0]:void 0;return new Promise(function(n,t){i.apply(e,[n,t,r])})}return i.apply(this,arguments)}}),t.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var i=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=arguments,r=this,n=new Promise(function(n,t){i.apply(r,[e[0],n,t])});return e.length<2?n:n.then(function(){e[1].apply(null,[])},function(i){e.length>=3&&e[2].apply(null,[i])})}});var e=RTCPeerConnection.prototype.addIceCandidate;RTCPeerConnection.prototype.addIceCandidate=function(){return null===arguments[0]?Promise.resolve():e.apply(this,arguments)},["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var i=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?RTCIceCandidate:RTCSessionDescription)(arguments[0]),i.apply(this,arguments)}})},attachMediaStream:function(e,i){n("DEPRECATED, attachMediaStream will soon be removed."),t.version>=43?e.srcObject=i:"undefined"!=typeof e.src?e.src=URL.createObjectURL(i):n("Error attaching stream to element.")},reattachMediaStream:function(e,i){n("DEPRECATED, reattachMediaStream will soon be removed."),t.version>=43?e.srcObject=i.srcObject:e.src=i.src}};i.exports={shimMediaStream:o.shimMediaStream,shimOnTrack:o.shimOnTrack,shimSourceObject:o.shimSourceObject,shimPeerConnection:o.shimPeerConnection,shimGetUserMedia:e("./getusermedia"),attachMediaStream:o.attachMediaStream,reattachMediaStream:o.reattachMediaStream}},{"../utils.js":318,"./getusermedia":312}],312:[function(e,i,r){"use strict";var n=e("../utils.js").log;i.exports=function(){var e=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;var i={};return Object.keys(e).forEach(function(r){if("require"!==r&&"advanced"!==r&&"mediaSource"!==r){var n="object"==typeof e[r]?e[r]:{ideal:e[r]};void 0!==n.exact&&"number"==typeof n.exact&&(n.min=n.max=n.exact);var t=function(e,i){return e?e+i.charAt(0).toUpperCase()+i.slice(1):"deviceId"===i?"sourceId":i};if(void 0!==n.ideal){i.optional=i.optional||[];var o={};"number"==typeof n.ideal?(o[t("min",r)]=n.ideal,i.optional.push(o),o={},o[t("max",r)]=n.ideal,i.optional.push(o)):(o[t("",r)]=n.ideal,i.optional.push(o))}void 0!==n.exact&&"number"!=typeof n.exact?(i.mandatory=i.mandatory||{},i.mandatory[t("",r)]=n.exact):["min","max"].forEach(function(e){void 0!==n[e]&&(i.mandatory=i.mandatory||{},i.mandatory[t(e,r)]=n[e])})}}),e.advanced&&(i.optional=(i.optional||[]).concat(e.advanced)),i},i=function(i,r){if(i=JSON.parse(JSON.stringify(i)),i&&i.audio&&(i.audio=e(i.audio)),i&&"object"==typeof i.video){var t=i.video.facingMode;if(t=t&&("object"==typeof t?t:{ideal:t}),t&&("user"===t.exact||"environment"===t.exact||"user"===t.ideal||"environment"===t.ideal)&&(!navigator.mediaDevices.getSupportedConstraints||!navigator.mediaDevices.getSupportedConstraints().facingMode)&&(delete i.video.facingMode,"environment"===t.exact||"environment"===t.ideal))return navigator.mediaDevices.enumerateDevices().then(function(o){o=o.filter(function(e){return"videoinput"===e.kind});var f=o.find(function(e){return e.label.toLowerCase().indexOf("back")!==-1})||o.length&&o[o.length-1];return f&&(i.video.deviceId=t.exact?{exact:f.deviceId}:{ideal:f.deviceId}),i.video=e(i.video),n("chrome: "+JSON.stringify(i)),r(i)});i.video=e(i.video)}return n("chrome: "+JSON.stringify(i)),r(i)},r=function(e){return{name:{PermissionDeniedError:"NotAllowedError",ConstraintNotSatisfiedError:"OverconstrainedError"}[e.name]||e.name,message:e.message,constraint:e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},t=function(e,n,t){i(e,function(e){navigator.webkitGetUserMedia(e,n,function(e){t(r(e))})})};navigator.getUserMedia=t;var o=function(e){return new Promise(function(i,r){navigator.getUserMedia(e,i,r)})};if(navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:o,enumerateDevices:function(){return new Promise(function(e){var i={audio:"audioinput",video:"videoinput"};return MediaStreamTrack.getSources(function(r){e(r.map(function(e){return{label:e.label,kind:i[e.kind],deviceId:e.id,groupId:""}}))})})}}),navigator.mediaDevices.getUserMedia){var f=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(e){return i(e,function(e){return f(e)["catch"](function(e){return Promise.reject(r(e))})})}}else navigator.mediaDevices.getUserMedia=function(e){return o(e)};"undefined"==typeof navigator.mediaDevices.addEventListener&&(navigator.mediaDevices.addEventListener=function(){n("Dummy mediaDevices.addEventListener called.")}),"undefined"==typeof navigator.mediaDevices.removeEventListener&&(navigator.mediaDevices.removeEventListener=function(){n("Dummy mediaDevices.removeEventListener called.")})}},{"../utils.js":318}],313:[function(e,i,r){"use strict";var n=e("sdp"),t=e("../utils").log,o={shimPeerConnection:function(){window.RTCIceGatherer&&(window.RTCIceCandidate||(window.RTCIceCandidate=function(e){return e}),window.RTCSessionDescription||(window.RTCSessionDescription=function(e){return e})),window.RTCPeerConnection=function(e){var i=this,r=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){i[e]=r[e].bind(r)}),this.onicecandidate=null,this.onaddstream=null,this.ontrack=null,this.onremovestream=null,this.onsignalingstatechange=null,this.oniceconnectionstatechange=null,this.onnegotiationneeded=null,this.ondatachannel=null,this.localStreams=[],this.remoteStreams=[],this.getLocalStreams=function(){return i.localStreams},this.getRemoteStreams=function(){return i.remoteStreams},this.localDescription=new RTCSessionDescription({type:"",sdp:""}),this.remoteDescription=new RTCSessionDescription({type:"",sdp:""}),this.signalingState="stable",this.iceConnectionState="new",this.iceGatheringState="new",this.iceOptions={gatherPolicy:"all",iceServers:[]},e&&e.iceTransportPolicy)switch(e.iceTransportPolicy){case"all":case"relay":this.iceOptions.gatherPolicy=e.iceTransportPolicy;break;case"none":throw new TypeError('iceTransportPolicy "none" not supported')}if(this.usingBundle=e&&"max-bundle"===e.bundlePolicy,e&&e.iceServers){var n=JSON.parse(JSON.stringify(e.iceServers));this.iceOptions.iceServers=n.filter(function(e){if(e&&e.urls){var i=e.urls;return"string"==typeof i&&(i=[i]),i=i.filter(function(e){return 0===e.indexOf("turn:")&&e.indexOf("transport=udp")!==-1})[0],!!i}return!1})}this.transceivers=[],this._localIceCandidatesBuffer=[]},window.RTCPeerConnection.prototype._emitBufferedCandidates=function(){var e=this,i=n.splitSections(e.localDescription.sdp);this._localIceCandidatesBuffer.forEach(function(r){var n=!r.candidate||0===Object.keys(r.candidate).length;if(n)for(var t=1;t-1&&(this.localStreams.splice(i,1),this._maybeFireNegotiationNeeded())},window.RTCPeerConnection.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},window.RTCPeerConnection.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},window.RTCPeerConnection.prototype._getCommonCapabilities=function(e,i){var r={codecs:[],headerExtensions:[],fecMechanisms:[]};return e.codecs.forEach(function(e){for(var n=0;n0;i.forEach(function(e,i){var f=t.transceivers[i],a=f.iceGatherer,u=f.iceTransport,s=f.dtlsTransport,l=f.localCapabilities,c=f.remoteCapabilities,d="0"===e.split("\n",1)[0].split(" ",2)[1];if(!d){var b=n.getIceParameters(e,r);if(o){var h=n.matchPrefix(e,"a=candidate:").map(function(e){return n.parseCandidate(e)}).filter(function(e){return"1"===e.component});h.length&&u.setRemoteCandidates(h)}var k=n.getDtlsParameters(e,r);o&&(k.role="server"),t.usingBundle&&0!==i||(u.start(a,b,o?"controlling":"controlled"),s.start(k));var _=t._getCommonCapabilities(l,c);t._transceive(f,_.codecs.length>0,!1)}})}switch(this.localDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-local-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}var f=arguments.length>1&&"function"==typeof arguments[1];if(f){var a=arguments[1];window.setTimeout(function(){a(),"new"===t.iceGatheringState&&(t.iceGatheringState="gathering"),t._emitBufferedCandidates()},0)}var u=Promise.resolve();return u.then(function(){f||("new"===t.iceGatheringState&&(t.iceGatheringState="gathering"),window.setTimeout(t._emitBufferedCandidates.bind(t),500))}),u},window.RTCPeerConnection.prototype.setRemoteDescription=function(e){var i=this,r=new MediaStream,t=[],o=n.splitSections(e.sdp),f=o.shift(),a=n.matchPrefix(f,"a=ice-lite").length>0;switch(this.usingBundle=n.matchPrefix(f,"a=group:BUNDLE ").length>0,o.forEach(function(o,u){var s,l,c,d,b,h,k,_,p,v,w,m,g=n.splitLines(o),y=g[0].substr(2).split(" "),E=y[0],S="0"===y[1],O=n.getDirection(o,f),C=n.parseRtpParameters(o);S||(w=n.getIceParameters(o,f),m=n.getDtlsParameters(o,f),m.role="client"),_=n.parseRtpEncodingParameters(o);var A=n.matchPrefix(o,"a=mid:");A=A.length?A[0].substr(6):n.generateIdentifier();var x,R=n.matchPrefix(o,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];R&&(x=R.value);var F=n.matchPrefix(o,"a=end-of-candidates").length>0,M=n.matchPrefix(o,"a=candidate:").map(function(e){return n.parseCandidate(e)}).filter(function(e){return"1"===e.component});if("offer"!==e.type||S)"answer"!==e.type||S||(s=i.transceivers[u],l=s.iceGatherer,c=s.iceTransport,d=s.dtlsTransport,b=s.rtpSender,h=s.rtpReceiver,k=s.sendEncodingParameters,p=s.localCapabilities,i.transceivers[u].recvEncodingParameters=_,i.transceivers[u].remoteCapabilities=C,i.transceivers[u].cname=x,(a||F)&&M.length&&c.setRemoteCandidates(M),i.usingBundle&&0!==u||(c.start(l,w,"controlling"),d.start(m)),i._transceive(s,"sendrecv"===O||"recvonly"===O,"sendrecv"===O||"sendonly"===O),!h||"sendrecv"!==O&&"sendonly"!==O?delete s.rtpReceiver:(v=h.track,t.push([v,h]),r.addTrack(v)));else{var T=i.usingBundle&&u>0?{iceGatherer:i.transceivers[0].iceGatherer,iceTransport:i.transceivers[0].iceTransport,dtlsTransport:i.transceivers[0].dtlsTransport}:i._createIceAndDtlsTransports(A,u);if(F&&T.iceTransport.setRemoteCandidates(M),p=RTCRtpReceiver.getCapabilities(E),k=[{ssrc:1001*(2*u+2)}],h=new RTCRtpReceiver(T.dtlsTransport,E),v=h.track,t.push([v,h]),r.addTrack(v),i.localStreams.length>0&&i.localStreams[0].getTracks().length>=u){var P=i.localStreams[0].getTracks()[u];b=new RTCRtpSender(P,T.dtlsTransport)}i.transceivers[u]={iceGatherer:T.iceGatherer,iceTransport:T.iceTransport,dtlsTransport:T.dtlsTransport,localCapabilities:p,remoteCapabilities:C,rtpSender:b,rtpReceiver:h,kind:E,mid:A,cname:x,sendEncodingParameters:k,recvEncodingParameters:_},i._transceive(i.transceivers[u],!1,"sendrecv"===O||"sendonly"===O)}}),this.remoteDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-remote-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}return r.getTracks().length&&(i.remoteStreams.push(r),window.setTimeout(function(){var e=new Event("addstream");e.stream=r,i.dispatchEvent(e),null!==i.onaddstream&&window.setTimeout(function(){i.onaddstream(e)},0),t.forEach(function(n){var t=n[0],o=n[1],f=new Event("track");f.track=t,f.receiver=o,f.streams=[r],i.dispatchEvent(e),null!==i.ontrack&&window.setTimeout(function(){i.ontrack(f)},0)})},0)),arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._updateSignalingState("closed")},window.RTCPeerConnection.prototype._updateSignalingState=function(e){this.signalingState=e;var i=new Event("signalingstatechange");this.dispatchEvent(i),null!==this.onsignalingstatechange&&this.onsignalingstatechange(i)},window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded=function(){var e=new Event("negotiationneeded");this.dispatchEvent(e),null!==this.onnegotiationneeded&&this.onnegotiationneeded(e)},window.RTCPeerConnection.prototype._updateConnectionState=function(){var e,i=this,r={"new":0,closed:0,connecting:0,checking:0,connected:0,completed:0,failed:0};if(this.transceivers.forEach(function(e){r[e.iceTransport.state]++,r[e.dtlsTransport.state]++}),r.connected+=r.completed,e="new",r.failed>0?e="failed":r.connecting>0||r.checking>0?e="connecting":r.disconnected>0?e="disconnected":r["new"]>0?e="new":(r.connected>0||r.completed>0)&&(e="connected"),e!==i.iceConnectionState){i.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this.dispatchEvent(n),null!==this.oniceconnectionstatechange&&this.oniceconnectionstatechange(n)}},window.RTCPeerConnection.prototype.createOffer=function(){var e=this;if(this._pendingOffer)throw new Error("createOffer called while there is a pending offer.");var i;1===arguments.length&&"function"!=typeof arguments[0]?i=arguments[0]:3===arguments.length&&(i=arguments[2]);var r=[],t=0,o=0;if(this.localStreams.length&&(t=this.localStreams[0].getAudioTracks().length,o=this.localStreams[0].getVideoTracks().length),i){if(i.mandatory||i.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==i.offerToReceiveAudio&&(t=i.offerToReceiveAudio),void 0!==i.offerToReceiveVideo&&(o=i.offerToReceiveVideo)}for(this.localStreams.length&&this.localStreams[0].getTracks().forEach(function(e){r.push({kind:e.kind,track:e,wantReceive:"audio"===e.kind?t>0:o>0}),"audio"===e.kind?t--:"video"===e.kind&&o--});t>0||o>0;)t>0&&(r.push({kind:"audio",wantReceive:!0}),t--),o>0&&(r.push({kind:"video",wantReceive:!0}),o--);var f=n.writeSessionBoilerplate(),a=[];r.forEach(function(i,r){var t,o,f=i.track,u=i.kind,s=n.generateIdentifier(),l=e.usingBundle&&r>0?{iceGatherer:a[0].iceGatherer,iceTransport:a[0].iceTransport,dtlsTransport:a[0].dtlsTransport}:e._createIceAndDtlsTransports(s,r),c=RTCRtpSender.getCapabilities(u),d=[{ssrc:1001*(2*r+1)}];f&&(t=new RTCRtpSender(f,l.dtlsTransport)),i.wantReceive&&(o=new RTCRtpReceiver(l.dtlsTransport,u)),a[r]={iceGatherer:l.iceGatherer,iceTransport:l.iceTransport,dtlsTransport:l.dtlsTransport,localCapabilities:c,remoteCapabilities:null,rtpSender:t,rtpReceiver:o,kind:u,mid:s,sendEncodingParameters:d,recvEncodingParameters:null}}),this.usingBundle&&(f+="a=group:BUNDLE "+a.map(function(e){return e.mid}).join(" ")+"\r\n"),r.forEach(function(i,r){var t=a[r];f+=n.writeMediaSection(t,t.localCapabilities,"offer",e.localStreams[0])}),this._pendingOffer=a;var u=new RTCSessionDescription({type:"offer",sdp:f});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,u),Promise.resolve(u)},window.RTCPeerConnection.prototype.createAnswer=function(){var e=this,i=n.writeSessionBoilerplate();this.usingBundle&&(i+="a=group:BUNDLE "+this.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),this.transceivers.forEach(function(r){var t=e._getCommonCapabilities(r.localCapabilities,r.remoteCapabilities);i+=n.writeMediaSection(r,t,"answer",e.localStreams[0])});var r=new RTCSessionDescription({type:"answer",sdp:i});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,r),Promise.resolve(r)},window.RTCPeerConnection.prototype.addIceCandidate=function(e){if(null===e)this.transceivers.forEach(function(e){e.iceTransport.addRemoteCandidate({})});else{var i=e.sdpMLineIndex;if(e.sdpMid)for(var r=0;r0?n.parseCandidate(e.candidate):{};if("tcp"===o.protocol&&0===o.port)return;if("1"!==o.component)return;"endOfCandidates"===o.type&&(o={}),t.iceTransport.addRemoteCandidate(o);var f=n.splitSections(this.remoteDescription.sdp);f[i+1]+=(o.type?e.candidate.trim():"a=end-of-candidates")+"\r\n",this.remoteDescription.sdp=f.join("")}}return arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.getStats=function(){var e=[];this.transceivers.forEach(function(i){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(r){i[r]&&e.push(i[r].getStats())})});var i=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1];return new Promise(function(r){var n=new Map;Promise.all(e).then(function(e){e.forEach(function(e){Object.keys(e).forEach(function(i){n.set(i,e[i]),n[i]=e[i]})}),i&&window.setTimeout(i,0,n),r(n)})})}},attachMediaStream:function(e,i){t("DEPRECATED, attachMediaStream will soon be removed."),e.srcObject=i},reattachMediaStream:function(e,i){t("DEPRECATED, reattachMediaStream will soon be removed."),e.srcObject=i.srcObject}};i.exports={shimPeerConnection:o.shimPeerConnection,shimGetUserMedia:e("./getusermedia"),attachMediaStream:o.attachMediaStream,reattachMediaStream:o.reattachMediaStream}},{"../utils":318,"./getusermedia":314,sdp:309}],314:[function(e,i,r){"use strict";i.exports=function(){var e=function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,
+toString:function(){return this.name}}},i=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(r){return i(r)["catch"](function(i){return Promise.reject(e(i))})}}},{}],315:[function(e,i,r){"use strict";var n=e("../utils").log,t=e("../utils").browserDetails,o={shimOnTrack:function(){"object"!=typeof window||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.getTracks().forEach(function(i){var r=new Event("track");r.track=i,r.receiver={track:i},r.streams=[e.stream],this.dispatchEvent(r)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==typeof window&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}}))},shimPeerConnection:function(){if("object"==typeof window&&(window.RTCPeerConnection||window.mozRTCPeerConnection)){window.RTCPeerConnection||(window.RTCPeerConnection=function(e,i){if(t.version<38&&e&&e.iceServers){for(var r=[],n=0;n=r&&parseInt(n[r],10)},detectBrowser:function(){var e={};if(e.browser=null,e.version=null,e.minVersion=null,"undefined"==typeof window||!window.navigator)return e.browser="Not a browser.",e;if(navigator.mozGetUserMedia)e.browser="firefox",e.version=this.extractVersion(navigator.userAgent,/Firefox\/([0-9]+)\./,1),e.minVersion=31;else if(navigator.webkitGetUserMedia)if(window.webkitRTCPeerConnection)e.browser="chrome",e.version=this.extractVersion(navigator.userAgent,/Chrom(e|ium)\/([0-9]+)\./,2),e.minVersion=38;else{if(!navigator.userAgent.match(/Version\/(\d+).(\d+)/))return e.browser="Unsupported webkit-based browser with GUM support but no WebRTC support.",e;e.browser="safari",e.version=this.extractVersion(navigator.userAgent,/AppleWebKit\/([0-9]+)\./,1),e.minVersion=602}else{if(!navigator.mediaDevices||!navigator.userAgent.match(/Edge\/(\d+).(\d+)$/))return e.browser="Not a supported browser.",e;e.browser="edge",e.version=this.extractVersion(navigator.userAgent,/Edge\/(\d+).(\d+)$/,2),e.minVersion=10547}return e.version0&&void 0!==arguments[0]?arguments[0]:null;return regeneratorRuntime.async(function(i){for(;;)switch(i.prev=i.next){case 0:if(!this._fsm.can("start")){i.next=5;break}return i.next=3,regeneratorRuntime.awrap(this._fsm.start(e));case 3:i.next=9;break;case 5:return i.next=7,regeneratorRuntime.awrap(this._fsm.stop());case 7:return i.next=9,regeneratorRuntime.awrap(this._fsm.start(e));case 9:case"end":return i.stop()}},null,this)}},{key:"stop",value:function(){return regeneratorRuntime.async(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._fsm.can("stop")){e.next=3;break}return e.next=3,regeneratorRuntime.awrap(this._fsm.stop());case 3:case"end":return e.stop()}},null,this)}},{key:"_enableScan",value:function(e){var i;return regeneratorRuntime.async(function(r){for(;;)switch(r.prev=r.next){case 0:if(this._camera=e||this._camera,this._camera){r.next=3;break}throw new Error("Camera is not defined.");case 3:return r.next=5,regeneratorRuntime.awrap(this._camera.start());case 5:i=r.sent,this.video.srcObject=i,this._continuous&&this._scanner.start();case 8:case"end":return r.stop()}},null,this)}},{key:"_disableScan",value:function(){this.video.src="",this._scanner&&this._scanner.stop(),this._camera&&this._camera.stop()}},{key:"_configureVideo",value:function(e){if(e.video&&"VIDEO"!==e.video.tagName)throw new Error("Video must be a