@twilio/mcs-client 0.6.4-rc.1 → 0.6.4
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/builds/browser.js +917 -765
- package/builds/browser.js.map +1 -1
- package/builds/lib.js +917 -765
- package/builds/lib.js.map +1 -1
- package/builds/twilio-mcs-client.js +10818 -10602
- package/builds/twilio-mcs-client.min.js +1 -31
- package/dist/packages/mcs-client/package.json.js +1 -1
- package/package.json +17 -4
|
@@ -15,34 +15,4 @@ OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
|
15
15
|
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
16
16
|
|
|
17
17
|
*/
|
|
18
|
-
this.Twilio=this.Twilio||{},this.Twilio.McsClient=function(t){"use strict";var e=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},o=function(t){return t&&t.Math==Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof n&&n)||function(){return this}()||Function("return this")(),a={},u=function(t){try{return!!t()}catch(t){return!0}},c=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),s={},l={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,p=f&&!l.call({1:2},1);s.f=p?function(t){var e=f(this,t);return!!e&&e.enumerable}:l;var h,d,v=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},y={}.toString,g=function(t){return y.call(t).slice(8,-1)},m=g,b="".split,w=u((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==m(t)?b.call(t,""):Object(t)}:Object,x=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},S=w,k=x,A=function(t){return S(k(t))},E=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=i,j=function(t){return"function"==typeof t?t:void 0},T=function(t,e){return arguments.length<2?j(O[t]):O[t]&&O[t][e]},L=T("navigator","userAgent")||"",_=i,R=L,I=_.process,P=_.Deno,C=I&&I.versions||P&&P.version,D=C&&C.v8;D?d=(h=D.split("."))[0]<4?1:h[0]+h[1]:R&&(!(h=R.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=R.match(/Chrome\/(\d+)/))&&(d=h[1]);var M=d&&+d,U=M,N=u,F=!!Object.getOwnPropertySymbols&&!N((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&U&&U<41})),q=F&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=T,$=q?function(t){return"symbol"==typeof t}:function(t){var e=B("Symbol");return"function"==typeof e&&Object(t)instanceof e},G=E,W={exports:{}},z=i,V=function(t,e){try{Object.defineProperty(z,t,{value:e,configurable:!0,writable:!0})}catch(r){z[t]=e}return e},H=V,Y="__core-js_shared__",J=i[Y]||H(Y,{}),K=J;(W.exports=function(t,e){return K[t]||(K[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var X=x,Z=function(t){return Object(X(t))},Q=Z,tt={}.hasOwnProperty,et=Object.hasOwn||function(t,e){return tt.call(Q(t),e)},rt=0,nt=Math.random(),ot=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++rt+nt).toString(36)},it=i,at=W.exports,ut=et,ct=ot,st=F,lt=q,ft=at("wks"),pt=it.Symbol,ht=lt?pt:pt&&pt.withoutSetter||ct,dt=function(t){return ut(ft,t)&&(st||"string"==typeof ft[t])||(st&&ut(pt,t)?ft[t]=pt[t]:ft[t]=ht("Symbol."+t)),ft[t]},vt=E,yt=$,gt=function(t,e){var r,n;if("string"===e&&"function"==typeof(r=t.toString)&&!G(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!G(n=r.call(t)))return n;if("string"!==e&&"function"==typeof(r=t.toString)&&!G(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},mt=dt("toPrimitive"),bt=function(t,e){if(!vt(t)||yt(t))return t;var r,n=t[mt];if(void 0!==n){if(void 0===e&&(e="default"),r=n.call(t,e),!vt(r)||yt(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),gt(t,e)},wt=bt,xt=$,St=function(t){var e=wt(t,"string");return xt(e)?e:String(e)},kt=E,At=i.document,Et=kt(At)&&kt(At.createElement),Ot=function(t){return Et?At.createElement(t):{}},jt=Ot,Tt=!c&&!u((function(){return 7!=Object.defineProperty(jt("div"),"a",{get:function(){return 7}}).a})),Lt=c,_t=s,Rt=v,It=A,Pt=St,Ct=et,Dt=Tt,Mt=Object.getOwnPropertyDescriptor;a.f=Lt?Mt:function(t,e){if(t=It(t),e=Pt(e),Dt)try{return Mt(t,e)}catch(t){}if(Ct(t,e))return Rt(!_t.f.call(t,e),t[e])};var Ut={},Nt=E,Ft=function(t){if(!Nt(t))throw TypeError(String(t)+" is not an object");return t},qt=c,Bt=Tt,$t=Ft,Gt=St,Wt=Object.defineProperty;Ut.f=qt?Wt:function(t,e,r){if($t(t),e=Gt(e),$t(r),Bt)try{return Wt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var zt=Ut,Vt=v,Ht=c?function(t,e,r){return zt.f(t,e,Vt(1,r))}:function(t,e,r){return t[e]=r,t},Yt={exports:{}},Jt=J,Kt=Function.toString;"function"!=typeof Jt.inspectSource&&(Jt.inspectSource=function(t){return Kt.call(t)});var Xt,Zt,Qt,te=Jt.inspectSource,ee=te,re=i.WeakMap,ne="function"==typeof re&&/native code/.test(ee(re)),oe=W.exports,ie=ot,ae=oe("keys"),ue=function(t){return ae[t]||(ae[t]=ie(t))},ce={},se=ne,le=E,fe=Ht,pe=et,he=J,de=ue,ve=ce,ye="Object already initialized",ge=i.WeakMap;if(se||he.state){var me=he.state||(he.state=new ge),be=me.get,we=me.has,xe=me.set;Xt=function(t,e){if(we.call(me,t))throw new TypeError(ye);return e.facade=t,xe.call(me,t,e),e},Zt=function(t){return be.call(me,t)||{}},Qt=function(t){return we.call(me,t)}}else{var Se=de("state");ve[Se]=!0,Xt=function(t,e){if(pe(t,Se))throw new TypeError(ye);return e.facade=t,fe(t,Se,e),e},Zt=function(t){return pe(t,Se)?t[Se]:{}},Qt=function(t){return pe(t,Se)}}var ke={set:Xt,get:Zt,has:Qt,enforce:function(t){return Qt(t)?Zt(t):Xt(t,{})},getterFor:function(t){return function(e){var r;if(!le(e)||(r=Zt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},Ae=i,Ee=Ht,Oe=et,je=V,Te=te,Le=ke.get,_e=ke.enforce,Re=String(String).split("String");(Yt.exports=function(t,e,r,n){var o,i=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof r&&("string"!=typeof e||Oe(r,"name")||Ee(r,"name",e),(o=_e(r)).source||(o.source=Re.join("string"==typeof e?e:""))),t!==Ae?(i?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=r:Ee(t,e,r)):a?t[e]=r:je(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Le(this).source||Te(this)}));var Ie={},Pe=Math.ceil,Ce=Math.floor,De=function(t){return isNaN(t=+t)?0:(t>0?Ce:Pe)(t)},Me=De,Ue=Math.min,Ne=function(t){return t>0?Ue(Me(t),9007199254740991):0},Fe=De,qe=Math.max,Be=Math.min,$e=function(t,e){var r=Fe(t);return r<0?qe(r+e,0):Be(r,e)},Ge=A,We=Ne,ze=$e,Ve=function(t){return function(e,r,n){var o,i=Ge(e),a=We(i.length),u=ze(n,a);if(t&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},He={includes:Ve(!0),indexOf:Ve(!1)},Ye=et,Je=A,Ke=He.indexOf,Xe=ce,Ze=function(t,e){var r,n=Je(t),o=0,i=[];for(r in n)!Ye(Xe,r)&&Ye(n,r)&&i.push(r);for(;e.length>o;)Ye(n,r=e[o++])&&(~Ke(i,r)||i.push(r));return i},Qe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tr=Ze,er=Qe.concat("length","prototype");Ie.f=Object.getOwnPropertyNames||function(t){return tr(t,er)};var rr={};rr.f=Object.getOwnPropertySymbols;var nr=Ie,or=rr,ir=Ft,ar=T("Reflect","ownKeys")||function(t){var e=nr.f(ir(t)),r=or.f;return r?e.concat(r(t)):e},ur=et,cr=ar,sr=a,lr=Ut,fr=function(t,e){for(var r=cr(e),n=lr.f,o=sr.f,i=0;i<r.length;i++){var a=r[i];ur(t,a)||n(t,a,o(e,a))}},pr=u,hr=/#|\.prototype\./,dr=function(t,e){var r=yr[vr(t)];return r==mr||r!=gr&&("function"==typeof e?pr(e):!!e)},vr=dr.normalize=function(t){return String(t).replace(hr,".").toLowerCase()},yr=dr.data={},gr=dr.NATIVE="N",mr=dr.POLYFILL="P",br=dr,wr=i,xr=a.f,Sr=Ht,kr=Yt.exports,Ar=V,Er=fr,Or=br,jr=function(t,e){var r,n,o,i,a,u=t.target,c=t.global,s=t.stat;if(r=c?wr:s?wr[u]||Ar(u,{}):(wr[u]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(a=xr(r,n))&&a.value:r[n],!Or(c?n:u+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Er(i,o)}(t.sham||o&&o.sham)&&Sr(i,"sham",!0),kr(r,n,i,t)}},Tr=i.Promise,Lr=Yt.exports,_r=function(t,e,r){for(var n in e)Lr(t,n,e[n],r);return t},Rr=E,Ir=Ft,Pr=function(t){if(!Rr(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},Cr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Ir(r),Pr(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Dr=Ut.f,Mr=et,Ur=dt("toStringTag"),Nr=function(t,e,r){t&&!Mr(t=r?t:t.prototype,Ur)&&Dr(t,Ur,{configurable:!0,value:e})},Fr=T,qr=Ut,Br=c,$r=dt("species"),Gr=function(t){var e=Fr(t),r=qr.f;Br&&e&&!e[$r]&&r(e,$r,{configurable:!0,get:function(){return this}})},Wr=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},zr=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},Vr={},Hr=Vr,Yr=dt("iterator"),Jr=Array.prototype,Kr=function(t){return void 0!==t&&(Hr.Array===t||Jr[Yr]===t)},Xr=Wr,Zr=function(t,e,r){if(Xr(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},Qr={};Qr[dt("toStringTag")]="z";var tn="[object z]"===String(Qr),en=tn,rn=g,nn=dt("toStringTag"),on="Arguments"==rn(function(){return arguments}()),an=en?rn:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),nn))?r:on?rn(e):"Object"==(n=rn(e))&&"function"==typeof e.callee?"Arguments":n},un=an,cn=Vr,sn=dt("iterator"),ln=function(t){if(null!=t)return t[sn]||t["@@iterator"]||cn[un(t)]},fn=Ft,pn=ln,hn=function(t,e){var r=arguments.length<2?pn(t):e;if("function"!=typeof r)throw TypeError(String(t)+" is not iterable");return fn(r.call(t))},dn=Ft,vn=function(t,e,r){var n,o;dn(t);try{if(void 0===(n=t.return)){if("throw"===e)throw r;return r}n=n.call(t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return dn(n),r},yn=Ft,gn=Kr,mn=Ne,bn=Zr,wn=hn,xn=ln,Sn=vn,kn=function(t,e){this.stopped=t,this.result=e},An=function(t,e,r){var n,o,i,a,u,c,s,l=r&&r.that,f=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),d=bn(e,l,1+f+h),v=function(t){return n&&Sn(n,"normal",t),new kn(!0,t)},y=function(t){return f?(yn(t),h?d(t[0],t[1],v):d(t[0],t[1])):h?d(t,v):d(t)};if(p)n=t;else{if("function"!=typeof(o=xn(t)))throw TypeError("Target is not iterable");if(gn(o)){for(i=0,a=mn(t.length);a>i;i++)if((u=y(t[i]))&&u instanceof kn)return u;return new kn(!1)}n=wn(t,o)}for(c=n.next;!(s=c.call(n)).done;){try{u=y(s.value)}catch(t){Sn(n,"throw",t)}if("object"==typeof u&&u&&u instanceof kn)return u}return new kn(!1)},En=dt("iterator"),On=!1;try{var jn=0,Tn={next:function(){return{done:!!jn++}},return:function(){On=!0}};Tn[En]=function(){return this},Array.from(Tn,(function(){throw 2}))}catch(t){}var Ln,_n,Rn,In,Pn=function(t,e){if(!e&&!On)return!1;var r=!1;try{var n={};n[En]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Cn=Ft,Dn=Wr,Mn=dt("species"),Un=function(t,e){var r,n=Cn(t).constructor;return void 0===n||null==(r=Cn(n)[Mn])?e:Dn(r)},Nn=T("document","documentElement"),Fn=/(?:ipad|iphone|ipod).*applewebkit/i.test(L),qn="process"==g(i.process),Bn=i,$n=u,Gn=Zr,Wn=Nn,zn=Ot,Vn=Fn,Hn=qn,Yn=Bn.setImmediate,Jn=Bn.clearImmediate,Kn=Bn.process,Xn=Bn.MessageChannel,Zn=Bn.Dispatch,Qn=0,to={},eo="onreadystatechange";try{Ln=Bn.location}catch(t){}var ro=function(t){if(to.hasOwnProperty(t)){var e=to[t];delete to[t],e()}},no=function(t){return function(){ro(t)}},oo=function(t){ro(t.data)},io=function(t){Bn.postMessage(String(t),Ln.protocol+"//"+Ln.host)};Yn&&Jn||(Yn=function(t){for(var e=[],r=arguments.length,n=1;r>n;)e.push(arguments[n++]);return to[++Qn]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},_n(Qn),Qn},Jn=function(t){delete to[t]},Hn?_n=function(t){Kn.nextTick(no(t))}:Zn&&Zn.now?_n=function(t){Zn.now(no(t))}:Xn&&!Vn?(In=(Rn=new Xn).port2,Rn.port1.onmessage=oo,_n=Gn(In.postMessage,In,1)):Bn.addEventListener&&"function"==typeof postMessage&&!Bn.importScripts&&Ln&&"file:"!==Ln.protocol&&!$n(io)?(_n=io,Bn.addEventListener("message",oo,!1)):_n=eo in zn("script")?function(t){Wn.appendChild(zn("script")).onreadystatechange=function(){Wn.removeChild(this),ro(t)}}:function(t){setTimeout(no(t),0)});var ao,uo,co,so,lo,fo,po,ho,vo={set:Yn,clear:Jn},yo=i,go=/ipad|iphone|ipod/i.test(L)&&void 0!==yo.Pebble,mo=/web0s(?!.*chrome)/i.test(L),bo=i,wo=a.f,xo=vo.set,So=Fn,ko=go,Ao=mo,Eo=qn,Oo=bo.MutationObserver||bo.WebKitMutationObserver,jo=bo.document,To=bo.process,Lo=bo.Promise,_o=wo(bo,"queueMicrotask"),Ro=_o&&_o.value;Ro||(ao=function(){var t,e;for(Eo&&(t=To.domain)&&t.exit();uo;){e=uo.fn,uo=uo.next;try{e()}catch(t){throw uo?so():co=void 0,t}}co=void 0,t&&t.enter()},So||Eo||Ao||!Oo||!jo?!ko&&Lo&&Lo.resolve?((po=Lo.resolve(void 0)).constructor=Lo,ho=po.then,so=function(){ho.call(po,ao)}):so=Eo?function(){To.nextTick(ao)}:function(){xo.call(bo,ao)}:(lo=!0,fo=jo.createTextNode(""),new Oo(ao).observe(fo,{characterData:!0}),so=function(){fo.data=lo=!lo}));var Io=Ro||function(t){var e={fn:t,next:void 0};co&&(co.next=e),uo||(uo=e,so()),co=e},Po={},Co=Wr,Do=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=Co(e),this.reject=Co(r)};Po.f=function(t){return new Do(t)};var Mo,Uo,No,Fo,qo=Ft,Bo=E,$o=Po,Go=i,Wo="object"==typeof window,zo=jr,Vo=i,Ho=T,Yo=Tr,Jo=Yt.exports,Ko=_r,Xo=Cr,Zo=Nr,Qo=Gr,ti=E,ei=Wr,ri=zr,ni=te,oi=An,ii=Pn,ai=Un,ui=vo.set,ci=Io,si=function(t,e){if(qo(t),Bo(e)&&e.constructor===t)return e;var r=$o.f(t);return(0,r.resolve)(e),r.promise},li=function(t,e){var r=Go.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))},fi=Po,pi=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},hi=ke,di=br,vi=Wo,yi=qn,gi=M,mi=dt("species"),bi="Promise",wi=hi.get,xi=hi.set,Si=hi.getterFor(bi),ki=Yo&&Yo.prototype,Ai=Yo,Ei=ki,Oi=Vo.TypeError,ji=Vo.document,Ti=Vo.process,Li=fi.f,_i=Li,Ri=!!(ji&&ji.createEvent&&Vo.dispatchEvent),Ii="function"==typeof PromiseRejectionEvent,Pi="unhandledrejection",Ci=!1,Di=di(bi,(function(){var t=ni(Ai),e=t!==String(Ai);if(!e&&66===gi)return!0;if(gi>=51&&/native code/.test(t))return!1;var r=new Ai((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[mi]=n,!(Ci=r.then((function(){}))instanceof n)||!e&&vi&&!Ii})),Mi=Di||!ii((function(t){Ai.all(t).catch((function(){}))})),Ui=function(t){var e;return!(!ti(t)||"function"!=typeof(e=t.then))&&e},Ni=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;ci((function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var a,u,c,s=r[i++],l=o?s.ok:s.fail,f=s.resolve,p=s.reject,h=s.domain;try{l?(o||(2===t.rejection&&$i(t),t.rejection=1),!0===l?a=n:(h&&h.enter(),a=l(n),h&&(h.exit(),c=!0)),a===s.promise?p(Oi("Promise-chain cycle")):(u=Ui(a))?u.call(a,f,p):f(a)):p(n)}catch(t){h&&!c&&h.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&qi(t)}))}},Fi=function(t,e,r){var n,o;Ri?((n=ji.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),Vo.dispatchEvent(n)):n={promise:e,reason:r},!Ii&&(o=Vo["on"+t])?o(n):t===Pi&&li("Unhandled promise rejection",r)},qi=function(t){ui.call(Vo,(function(){var e,r=t.facade,n=t.value;if(Bi(t)&&(e=pi((function(){yi?Ti.emit("unhandledRejection",n,r):Fi(Pi,r,n)})),t.rejection=yi||Bi(t)?2:1,e.error))throw e.value}))},Bi=function(t){return 1!==t.rejection&&!t.parent},$i=function(t){ui.call(Vo,(function(){var e=t.facade;yi?Ti.emit("rejectionHandled",e):Fi("rejectionhandled",e,t.value)}))},Gi=function(t,e,r){return function(n){t(e,n,r)}},Wi=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Ni(t,!0))},zi=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw Oi("Promise can't be resolved itself");var n=Ui(e);n?ci((function(){var r={done:!1};try{n.call(e,Gi(zi,r,t),Gi(Wi,r,t))}catch(e){Wi(r,e,t)}})):(t.value=e,t.state=1,Ni(t,!1))}catch(e){Wi({done:!1},e,t)}}};if(Di&&(Ei=(Ai=function(t){ri(this,Ai,bi),ei(t),Mo.call(this);var e=wi(this);try{t(Gi(zi,e),Gi(Wi,e))}catch(t){Wi(e,t)}}).prototype,(Mo=function(t){xi(this,{type:bi,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Ko(Ei,{then:function(t,e){var r=Si(this),n=Li(ai(this,Ai));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=yi?Ti.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&Ni(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Uo=function(){var t=new Mo,e=wi(t);this.promise=t,this.resolve=Gi(zi,e),this.reject=Gi(Wi,e)},fi.f=Li=function(t){return t===Ai||t===No?new Uo(t):_i(t)},"function"==typeof Yo&&ki!==Object.prototype)){Fo=ki.then,Ci||(Jo(ki,"then",(function(t,e){var r=this;return new Ai((function(t,e){Fo.call(r,t,e)})).then(t,e)}),{unsafe:!0}),Jo(ki,"catch",Ei.catch,{unsafe:!0}));try{delete ki.constructor}catch(t){}Xo&&Xo(ki,Ei)}zo({global:!0,wrap:!0,forced:Di},{Promise:Ai}),Zo(Ai,bi,!1),Qo(bi),No=Ho(bi),zo({target:bi,stat:!0,forced:Di},{reject:function(t){var e=Li(this);return e.reject.call(void 0,t),e.promise}}),zo({target:bi,stat:!0,forced:Di},{resolve:function(t){return si(this,t)}}),zo({target:bi,stat:!0,forced:Mi},{all:function(t){var e=this,r=Li(e),n=r.resolve,o=r.reject,i=pi((function(){var r=ei(e.resolve),i=[],a=0,u=1;oi(t,(function(t){var c=a++,s=!1;i.push(void 0),u++,r.call(e,t).then((function(t){s||(s=!0,i[c]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=Li(e),n=r.reject,o=pi((function(){var o=ei(e.resolve);oi(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var Vi,Hi=Ze,Yi=Qe,Ji=Object.keys||function(t){return Hi(t,Yi)},Ki=Ut,Xi=Ft,Zi=Ji,Qi=c?Object.defineProperties:function(t,e){Xi(t);for(var r,n=Zi(e),o=n.length,i=0;o>i;)Ki.f(t,r=n[i++],e[r]);return t},ta=Ft,ea=Qi,ra=Qe,na=ce,oa=Nn,ia=Ot,aa=ue("IE_PROTO"),ua=function(){},ca=function(t){return"<script>"+t+"</"+"script>"},sa=function(t){t.write(ca("")),t.close();var e=t.parentWindow.Object;return t=null,e},la=function(){try{Vi=new ActiveXObject("htmlfile")}catch(t){}var t,e;la="undefined"!=typeof document?document.domain&&Vi?sa(Vi):((e=ia("iframe")).style.display="none",oa.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(ca("document.F=Object")),t.close(),t.F):sa(Vi);for(var r=ra.length;r--;)delete la.prototype[ra[r]];return la()};na[aa]=!0;var fa=Object.create||function(t,e){var r;return null!==t?(ua.prototype=ta(t),r=new ua,ua.prototype=null,r[aa]=t):r=la(),void 0===e?r:ea(r,e)},pa=fa,ha=Ut,da=dt("unscopables"),va=Array.prototype;null==va[da]&&ha.f(va,da,{configurable:!0,value:pa(null)});var ya,ga,ma,ba=function(t){va[da][t]=!0},wa=!u((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),xa=et,Sa=Z,ka=wa,Aa=ue("IE_PROTO"),Ea=Object.prototype,Oa=ka?Object.getPrototypeOf:function(t){return t=Sa(t),xa(t,Aa)?t[Aa]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ea:null},ja=u,Ta=Oa,La=Ht,_a=dt("iterator"),Ra=!1;[].keys&&("next"in(ma=[].keys())?(ga=Ta(Ta(ma)))!==Object.prototype&&(ya=ga):Ra=!0);var Ia=null==ya||ja((function(){var t={};return ya[_a].call(t)!==t}));Ia&&(ya={}),"function"!=typeof ya[_a]&&La(ya,_a,(function(){return this}));var Pa={IteratorPrototype:ya,BUGGY_SAFARI_ITERATORS:Ra},Ca=Pa.IteratorPrototype,Da=fa,Ma=v,Ua=Nr,Na=Vr,Fa=function(){return this},qa=function(t,e,r){var n=e+" Iterator";return t.prototype=Da(Ca,{next:Ma(1,r)}),Ua(t,n,!1),Na[n]=Fa,t},Ba=jr,$a=qa,Ga=Oa,Wa=Cr,za=Nr,Va=Ht,Ha=Yt.exports,Ya=Vr,Ja=Pa.IteratorPrototype,Ka=Pa.BUGGY_SAFARI_ITERATORS,Xa=dt("iterator"),Za="keys",Qa="values",tu="entries",eu=function(){return this},ru=function(t,e,r,n,o,i,a){$a(r,e,n);var u,c,s,l=function(t){if(t===o&&v)return v;if(!Ka&&t in h)return h[t];switch(t){case Za:case Qa:case tu:return function(){return new r(this,t)}}return function(){return new r(this)}},f=e+" Iterator",p=!1,h=t.prototype,d=h[Xa]||h["@@iterator"]||o&&h[o],v=!Ka&&d||l(o),y="Array"==e&&h.entries||d;if(y&&(u=Ga(y.call(new t)))!==Object.prototype&&u.next&&(Ga(u)!==Ja&&(Wa?Wa(u,Ja):"function"!=typeof u[Xa]&&Va(u,Xa,eu)),za(u,f,!0)),o==Qa&&d&&d.name!==Qa&&(p=!0,v=function(){return d.call(this)}),h[Xa]!==v&&Va(h,Xa,v),Ya[e]=v,o)if(c={values:l(Qa),keys:i?v:l(Za),entries:l(tu)},a)for(s in c)(Ka||p||!(s in h))&&Ha(h,s,c[s]);else Ba({target:e,proto:!0,forced:Ka||p},c);return c},nu=A,ou=ba,iu=Vr,au=ke,uu=ru,cu="Array Iterator",su=au.set,lu=au.getterFor(cu),fu=uu(Array,"Array",(function(t,e){su(this,{type:cu,target:nu(t),index:0,kind:e})}),(function(){var t=lu(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");iu.Arguments=iu.Array,ou("keys"),ou("values"),ou("entries");var pu={exports:{}},hu={},du=A,vu=Ie.f,yu={}.toString,gu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];hu.f=function(t){return gu&&"[object Window]"==yu.call(t)?function(t){try{return vu(t)}catch(t){return gu.slice()}}(t):vu(du(t))};var mu=!u((function(){return Object.isExtensible(Object.preventExtensions({}))})),bu=jr,wu=ce,xu=E,Su=et,ku=Ut.f,Au=Ie,Eu=hu,Ou=mu,ju=!1,Tu=ot("meta"),Lu=0,_u=Object.isExtensible||function(){return!0},Ru=function(t){ku(t,Tu,{value:{objectID:"O"+Lu++,weakData:{}}})},Iu=pu.exports={enable:function(){Iu.enable=function(){},ju=!0;var t=Au.f,e=[].splice,r={};r[Tu]=1,t(r).length&&(Au.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===Tu){e.call(n,o,1);break}return n},bu({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Eu.f}))},fastKey:function(t,e){if(!xu(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Su(t,Tu)){if(!_u(t))return"F";if(!e)return"E";Ru(t)}return t[Tu].objectID},getWeakData:function(t,e){if(!Su(t,Tu)){if(!_u(t))return!0;if(!e)return!1;Ru(t)}return t[Tu].weakData},onFreeze:function(t){return Ou&&ju&&_u(t)&&!Su(t,Tu)&&Ru(t),t}};wu[Tu]=!0;var Pu=E,Cu=Cr,Du=function(t,e,r){var n,o;return Cu&&"function"==typeof(n=e.constructor)&&n!==r&&Pu(o=n.prototype)&&o!==r.prototype&&Cu(t,o),t},Mu=jr,Uu=i,Nu=br,Fu=Yt.exports,qu=pu.exports,Bu=An,$u=zr,Gu=E,Wu=u,zu=Pn,Vu=Nr,Hu=Du,Yu=Ut.f,Ju=fa,Ku=_r,Xu=Zr,Zu=zr,Qu=An,tc=ru,ec=Gr,rc=c,nc=pu.exports.fastKey,oc=ke.set,ic=ke.getterFor,ac={getConstructor:function(t,e,r,n){var o=t((function(t,i){Zu(t,o,e),oc(t,{type:e,index:Ju(null),first:void 0,last:void 0,size:0}),rc||(t.size=0),null!=i&&Qu(i,t[n],{that:t,AS_ENTRIES:r})})),i=ic(e),a=function(t,e,r){var n,o,a=i(t),c=u(t,e);return c?c.value=r:(a.last=c={index:o=nc(e,!0),key:e,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=c),n&&(n.next=c),rc?a.size++:t.size++,"F"!==o&&(a.index[o]=c)),t},u=function(t,e){var r,n=i(t),o=nc(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return Ku(o.prototype,{clear:function(){for(var t=i(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,rc?t.size=0:this.size=0},delete:function(t){var e=this,r=i(e),n=u(e,t);if(n){var o=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=o),o&&(o.previous=a),r.first==n&&(r.first=o),r.last==n&&(r.last=a),rc?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=i(this),n=Xu(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),Ku(o.prototype,r?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),rc&&Yu(o.prototype,"size",{get:function(){return i(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=ic(e),i=ic(n);tc(t,e,(function(t,e){oc(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),ec(e)}},uc=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",a=Uu[t],u=a&&a.prototype,c=a,s={},l=function(t){var e=u[t];Fu(u,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!Gu(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return o&&!Gu(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!Gu(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(Nu(t,"function"!=typeof a||!(o||u.forEach&&!Wu((function(){(new a).entries().next()})))))c=r.getConstructor(e,t,n,i),qu.enable();else if(Nu(t,!0)){var f=new c,p=f[i](o?{}:-0,1)!=f,h=Wu((function(){f.has(1)})),d=zu((function(t){new a(t)})),v=!o&&Wu((function(){for(var t=new a,e=5;e--;)t[i](e,e);return!t.has(-0)}));d||((c=e((function(e,r){$u(e,c,t);var o=Hu(new a,e,c);return null!=r&&Bu(r,o[i],{that:o,AS_ENTRIES:n}),o}))).prototype=u,u.constructor=c),(h||v)&&(l("delete"),l("has"),n&&l("get")),(v||p)&&l(i),o&&u.clear&&delete u.clear}return s[t]=c,Mu({global:!0,forced:c!=a},s),Vu(c,t),o||r.setStrong(c,t,n),c};uc("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),ac);var cc={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},sc=Ot("span").classList,lc=sc&&sc.constructor&&sc.constructor.prototype,fc=lc===Object.prototype?void 0:lc,pc=i,hc=cc,dc=fc,vc=fu,yc=Ht,gc=dt,mc=gc("iterator"),bc=gc("toStringTag"),wc=vc.values,xc=function(t,e){if(t){if(t[mc]!==wc)try{yc(t,mc,wc)}catch(e){t[mc]=wc}if(t[bc]||yc(t,bc,e),hc[e])for(var r in vc)if(t[r]!==vc[r])try{yc(t,r,vc[r])}catch(e){t[r]=vc[r]}}};for(var Sc in hc)xc(pc[Sc]&&pc[Sc].prototype,Sc);xc(dc,"DOMTokenList");var kc={exports:{}},Ac="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(Ac){var Ec=new Uint8Array(16);kc.exports=function(){return Ac(Ec),Ec}}else{var Oc=new Array(16);kc.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),Oc[e]=t>>>((3&e)<<3)&255;return Oc}}for(var jc=[],Tc=0;Tc<256;++Tc)jc[Tc]=(Tc+256).toString(16).substr(1);var Lc,_c,Rc=function(t,e){var r=e||0,n=jc;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")},Ic=kc.exports,Pc=Rc,Cc=0,Dc=0;var Mc=function(t,e,r){var n=e&&r||0,o=e||[],i=(t=t||{}).node||Lc,a=void 0!==t.clockseq?t.clockseq:_c;if(null==i||null==a){var u=Ic();null==i&&(i=Lc=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==a&&(a=_c=16383&(u[6]<<8|u[7]))}var c=void 0!==t.msecs?t.msecs:(new Date).getTime(),s=void 0!==t.nsecs?t.nsecs:Dc+1,l=c-Cc+(s-Dc)/1e4;if(l<0&&void 0===t.clockseq&&(a=a+1&16383),(l<0||c>Cc)&&void 0===t.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");Cc=c,Dc=s,_c=a;var f=(1e4*(268435455&(c+=122192928e5))+s)%4294967296;o[n++]=f>>>24&255,o[n++]=f>>>16&255,o[n++]=f>>>8&255,o[n++]=255&f;var p=c/4294967296*1e4&268435455;o[n++]=p>>>8&255,o[n++]=255&p,o[n++]=p>>>24&15|16,o[n++]=p>>>16&255,o[n++]=a>>>8|128,o[n++]=255&a;for(var h=0;h<6;++h)o[n+h]=i[h];return e||Pc(o)},Uc=kc.exports,Nc=Rc;var Fc=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||Uc)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||Nc(o)},qc=Mc,Bc=Fc,$c=Bc;$c.v1=qc,$c.v4=Bc;var Gc=$c;class Wc extends Promise{constructor(t){var e,r=Gc.v4();super(((n,o)=>(e=o,t((t=>{Wc.cancellationMap.delete(r),n(t)}),(t=>{Wc.cancellationMap.delete(r),o(t)}),(t=>{Wc.cancellationMap.set(r,t)}))))),this.id=r,this.rejectPromise=e}cancel(){var t=Wc.cancellationMap.get(this.id);return null==t||t(),this.rejectPromise&&(this.catch((()=>{})),this.rejectPromise(new Error("Promise was cancelled"))),this}}function zc(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Vc(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){zc(i,n,o,a,u,"next",t)}function u(t){zc(i,n,o,a,u,"throw",t)}a(void 0)}))}}r(Wc,"cancellationMap",new Map);var Hc=g,Yc=Array.isArray||function(t){return"Array"==Hc(t)},Jc=E,Kc=Yc,Xc=dt("species"),Zc=function(t){var e;return Kc(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!Kc(e.prototype)?Jc(e)&&null===(e=e[Xc])&&(e=void 0):e=void 0),void 0===e?Array:e},Qc=function(t,e){return new(Zc(t))(0===e?0:e)},ts=Zr,es=w,rs=Z,ns=Ne,os=Qc,is=[].push,as=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=7==t,u=5==t||i;return function(c,s,l,f){for(var p,h,d=rs(c),v=es(d),y=ts(s,l,3),g=ns(v.length),m=0,b=f||os,w=e?b(c,g):r||a?b(c,0):void 0;g>m;m++)if((u||m in v)&&(h=y(p=v[m],m,d),t))if(e)w[m]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:is.call(w,p)}else switch(t){case 4:return!1;case 7:is.call(w,p)}return i?-1:n||o?o:w}},us={forEach:as(0),map:as(1),filter:as(2),some:as(3),every:as(4),find:as(5),findIndex:as(6),filterReject:as(7)},cs=u,ss=function(t,e){var r=[][t];return!!r&&cs((function(){r.call(null,e||function(){throw 1},1)}))},ls=us.forEach,fs=ss("forEach")?[].forEach:function(t){return ls(this,t,arguments.length>1?arguments[1]:void 0)},ps=i,hs=cc,ds=fc,vs=fs,ys=Ht,gs=function(t){if(t&&t.forEach!==vs)try{ys(t,"forEach",vs)}catch(e){t.forEach=vs}};for(var ms in hs)gs(ps[ms]&&ps[ms].prototype);gs(ds);var bs,ws=Object.prototype,xs=ws.hasOwnProperty,Ss="function"==typeof Symbol?Symbol:{},ks=Ss.iterator||"@@iterator",As=Ss.asyncIterator||"@@asyncIterator",Es=Ss.toStringTag||"@@toStringTag";function Os(t,e,r,n){var o=e&&e.prototype instanceof Ps?e:Ps,i=Object.create(o.prototype),a=new Vs(n||[]);return i._invoke=function(t,e,r){var n=Ts;return function(o,i){if(n===_s)throw new Error("Generator is already running");if(n===Rs){if("throw"===o)throw i;return Ys()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=Gs(a,r);if(u){if(u===Is)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===Ts)throw n=Rs,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=_s;var c=js(t,e,r);if("normal"===c.type){if(n=r.done?Rs:Ls,c.arg===Is)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=Rs,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function js(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}var Ts="suspendedStart",Ls="suspendedYield",_s="executing",Rs="completed",Is={};function Ps(){}function Cs(){}function Ds(){}var Ms={};Ms[ks]=function(){return this};var Us=Object.getPrototypeOf,Ns=Us&&Us(Us(Hs([])));Ns&&Ns!==ws&&xs.call(Ns,ks)&&(Ms=Ns);var Fs=Ds.prototype=Ps.prototype=Object.create(Ms);function qs(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function Bs(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===Cs||"GeneratorFunction"===(e.displayName||e.name))}function $s(t,e){function r(n,o,i,a){var u=js(t[n],t,o);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&xs.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,a)}),(function(t){r("throw",t,i,a)})):e.resolve(s).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,a)}))}a(u.arg)}var n;this._invoke=function(t,o){function i(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(i,i):i()}}function Gs(t,e){var r=t.iterator[e.method];if(r===bs){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=bs,Gs(t,e),"throw"===e.method))return Is;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return Is}var n=js(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,Is;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=bs),e.delegate=null,Is):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,Is)}function Ws(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function zs(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Vs(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(Ws,this),this.reset(!0)}function Hs(t){if(t){var e=t[ks];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(xs.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=bs,e.done=!0,e};return n.next=n}}return{next:Ys}}function Ys(){return{value:bs,done:!0}}Cs.prototype=Fs.constructor=Ds,Ds.constructor=Cs,Ds[Es]=Cs.displayName="GeneratorFunction",qs($s.prototype),$s.prototype[As]=function(){return this},qs(Fs),Fs[Es]="Generator",Fs[ks]=function(){return this},Fs.toString=function(){return"[object Generator]"},Vs.prototype={constructor:Vs,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=bs,this.done=!1,this.delegate=null,this.method="next",this.arg=bs,this.tryEntries.forEach(zs),!t)for(var e in this)"t"===e.charAt(0)&&xs.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=bs)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=bs),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=xs.call(o,"catchLoc"),u=xs.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&xs.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,Is):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),Is},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),zs(r),Is}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;zs(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:Hs(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=bs),Is}};var Js={wrap:Os,isGeneratorFunction:Bs,AsyncIterator:$s,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,Ds):(t.__proto__=Ds,Es in t||(t[Es]="GeneratorFunction")),t.prototype=Object.create(Fs),t},awrap:function(t){return{__await:t}},async:function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new $s(Os(t,e,r,n),o);return Bs(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},keys:function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:Hs};function Ks(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function Xs(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}var Zs=Ft,Qs=vn,tl=St,el=Ut,rl=v,nl=function(t,e,r){var n=tl(e);n in t?el.f(t,n,rl(0,r)):t[n]=r},ol=Zr,il=Z,al=function(t,e,r,n){try{return n?e(Zs(r)[0],r[1]):e(r)}catch(e){Qs(t,"throw",e)}},ul=Kr,cl=Ne,sl=nl,ll=hn,fl=ln,pl=function(t){var e,r,n,o,i,a,u=il(t),c="function"==typeof this?this:Array,s=arguments.length,l=s>1?arguments[1]:void 0,f=void 0!==l,p=fl(u),h=0;if(f&&(l=ol(l,s>2?arguments[2]:void 0,2)),null==p||c==Array&&ul(p))for(r=new c(e=cl(u.length));e>h;h++)a=f?l(u[h],h):u[h],sl(r,h,a);else for(i=(o=ll(u,p)).next,r=new c;!(n=i.call(o)).done;h++)a=f?al(o,l,[n.value,h],!0):n.value,sl(r,h,a);return r.length=h,r},hl=pl;jr({target:"Array",stat:!0,forced:!Pn((function(t){Array.from(t)}))},{from:hl});var dl,vl,yl,gl={exports:{}};function ml(t,e){return["".concat((new Date).toISOString()," MCS Client ").concat(t,":")].concat(Array.from(e))}vl=n,yl=function(){var t=function(){},e="undefined",r=typeof window!==e&&typeof window.navigator!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function o(t,e){var r=t[e];if("function"==typeof r.bind)return r.bind(t);try{return Function.prototype.bind.call(r,t)}catch(e){return function(){return Function.prototype.apply.apply(r,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(n){return"debug"===n&&(n="log"),typeof console!==e&&("trace"===n&&r?i:void 0!==console[n]?o(console,n):void 0!==console.log?o(console,"log"):t)}function u(e,r){for(var o=0;o<n.length;o++){var i=n[o];this[i]=o<e?t:this.methodFactory(i,e,r)}this.log=this.debug}function c(t,r,n){return function(){typeof console!==e&&(u.call(this,r,n),this[t].apply(this,arguments))}}function s(t,e,r){return a(t)||c.apply(this,arguments)}function l(t,r,o){var i,a=this;r=null==r?"WARN":r;var c="loglevel";function l(){var t;if(typeof window!==e&&c){try{t=window.localStorage[c]}catch(t){}if(typeof t===e)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(t=/^([^;]+)/.exec(r.slice(n))[1])}catch(t){}return void 0===a.levels[t]&&(t=void 0),t}}"string"==typeof t?c+=":"+t:"symbol"==typeof t&&(c=void 0),a.name=t,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=o||s,a.getLevel=function(){return i},a.setLevel=function(r,o){if("string"==typeof r&&void 0!==a.levels[r.toUpperCase()]&&(r=a.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(i=r,!1!==o&&function(t){var r=(n[t]||"silent").toUpperCase();if(typeof window!==e&&c){try{return void(window.localStorage[c]=r)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(t){}}}(r),u.call(a,r,t),typeof console===e&&r<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(t){r=t,l()||a.setLevel(t,!1)},a.resetLevel=function(){a.setLevel(r,!1),function(){if(typeof window!==e&&c){try{return void window.localStorage.removeItem(c)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}()},a.enableAll=function(t){a.setLevel(a.levels.TRACE,t)},a.disableAll=function(t){a.setLevel(a.levels.SILENT,t)};var f=l();null==f&&(f=r),a.setLevel(f,!1)}var f=new l,p={};f.getLogger=function(t){if("symbol"!=typeof t&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=p[t];return e||(e=p[t]=new l(t,f.getLevel(),f.methodFactory)),e};var h=typeof window!==e?window.log:void 0;return f.noConflict=function(){return typeof window!==e&&window.log===f&&(window.log=h),f},f.getLoggers=function(){return p},f.default=f,f},(dl=gl).exports?dl.exports=yl():vl.log=yl();class bl{constructor(t){r(this,"prefix",""),this.prefix=null!=t&&t.length>0?t+" ":""}static scope(t){return new bl(t)}setLevel(t){gl.exports.setLevel(t)}static setLevel(t){gl.exports.setLevel(t)}trace(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];gl.exports.trace.apply(null,ml(this.prefix+"T",e))}debug(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];gl.exports.debug.apply(null,ml(this.prefix+"D",e))}info(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];gl.exports.info.apply(null,ml(this.prefix+"I",e))}warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];gl.exports.warn.apply(null,ml(this.prefix+"W",e))}error(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];gl.exports.error.apply(null,ml(this.prefix+"E",e))}static trace(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];gl.exports.trace.apply(null,ml("T",e))}static debug(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];gl.exports.debug.apply(null,ml("D",e))}static info(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];gl.exports.info.apply(null,ml("I",e))}static warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];gl.exports.warn.apply(null,ml("W",e))}static error(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];gl.exports.error.apply(null,ml("E",e))}}var wl,xl=$,Sl=function(t){if(xl(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},kl=E,Al=g,El=dt("match"),Ol=function(t){var e;return kl(t)&&(void 0!==(e=t[El])?!!e:"RegExp"==Al(t))},jl=Ol,Tl=dt("match"),Ll=jr,_l=a.f,Rl=Ne,Il=Sl,Pl=function(t){if(jl(t))throw TypeError("The method doesn't accept regular expressions");return t},Cl=x,Dl=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Tl]=!1,"/./"[t](e)}catch(t){}}return!1},Ml="".startsWith,Ul=Math.min,Nl=Dl("startsWith");Ll({target:"String",proto:!0,forced:!!(Nl||(wl=_l(String.prototype,"startsWith"),!wl||wl.writable))&&!Nl},{startsWith:function(t){var e=Il(Cl(this));Pl(t);var r=Rl(Ul(arguments.length>1?arguments[1]:void 0,e.length)),n=Il(t);return Ml?Ml.call(e,n,r):e.slice(r,r+n.length)===n}});var Fl=(t,e)=>{return"".concat((r=t,r.startsWith("http")?"":(t=>"https://mcs.".concat(null!=t?t:"us1",".twilio.com"))(e))).concat(t);var r};class ql{constructor(t,e,r,n){var o,i,a,u,c,s,l=null!==(o=null!==(i=n.MCS)&&void 0!==i?i:n)&&void 0!==o?o:{};this.region=null!==(a=null!==(u=l.region)&&void 0!==u?u:n.region)&&void 0!==a?a:"us1",this.mediaUrl=Fl(e,this.region),this.mediaSetUrl=r?Fl(r):"".concat(this.mediaUrl,"Set"),this.token=t,this.retryWhenThrottledOverride=null===(c=l.retryWhenThrottledOverride)||void 0===c||c,this.backoffConfigOverride=null!==(s=l.backoffConfigOverride)&&void 0!==s?s:ql.backoffConfigDefault}static get backoffConfigDefault(){return{min:1e3,max:4e3,maxAttemptsCount:3}}static get retryWhenThrottledDefault(){return true}updateToken(t){this.token=t}}class Bl{constructor(t,e,r){this.config=t,this.network=e,this._update(r)}get sid(){return this.state.sid}get serviceSid(){return this.state.serviceSid}get dateCreated(){return this.state.dateCreated}get dateUpdated(){return this.state.dateUpdated}get contentType(){return this.state.contentType}get size(){return this.state.size}get fileName(){return this.state.filename}get filename(){return this.state.filename}get category(){return this.state.category}getContentUrl(){var t=this;return new Wc(function(){var e=Vc(Js.mark((function e(r,n,o){var i,a;return Js.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.network.get("".concat(t.config.mediaUrl,"/").concat(t.sid)),o((()=>i.cancel())),e.prev=2,e.next=5,i;case 5:a=e.sent,t._update(a.body),r(t.state.contentDirectUrl),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),n(e.t0);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t,r,n){return e.apply(this,arguments)}}())}_update(t){var e,r,n,o;this.state={sid:t.sid,serviceSid:t.service_sid,channelSid:t.channel_sid,messageSid:t.message_sid,dateCreated:t.date_created?new Date(t.date_created):null,dateUploadUpdated:t.date_upload_updated?new Date(t.date_upload_updated):null,dateUpdated:t.date_updated?new Date(t.date_updated):null,size:t.size,contentType:t.content_type,author:t.author,url:t.url,contentUrl:t.links.content,contentDirectUrl:null!==(e=t.links.content_direct_temporary)&&void 0!==e?e:null,filename:null!==(r=t.filename)&&void 0!==r?r:null,category:null!==(n=t.category)&&void 0!==n?n:"media",isMultipartUpstream:null!==(o=t.is_multipart_upstream)&&void 0!==o&&o}}}var $l=Wr,Gl=Z,Wl=w,zl=Ne,Vl=function(t){return function(e,r,n,o){$l(r);var i=Gl(e),a=Wl(i),u=zl(i.length),c=t?u-1:0,s=t?-1:1;if(n<2)for(;;){if(c in a){o=a[c],c+=s;break}if(c+=s,t?c<0:u<=c)throw TypeError("Reduce of empty array with no initial value")}for(;t?c>=0:u>c;c+=s)c in a&&(o=r(o,a[c],c,i));return o}},Hl={left:Vl(!1),right:Vl(!0)}.left,Yl=M,Jl=qn;jr({target:"Array",proto:!0,forced:!ss("reduce")||!Jl&&Yl>79&&Yl<83},{reduce:function(t){return Hl(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Kl=Ft,Xl={},Zl=u,Ql=i.RegExp;Xl.UNSUPPORTED_Y=Zl((function(){var t=Ql("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Xl.BROKEN_CARET=Zl((function(){var t=Ql("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));var tf,ef,rf=u,nf=i.RegExp,of=rf((function(){var t=nf(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),af=u,uf=i.RegExp,cf=af((function(){var t=uf("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),sf=Sl,lf=function(){var t=Kl(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},ff=Xl,pf=W.exports,hf=fa,df=ke.get,vf=of,yf=cf,gf=RegExp.prototype.exec,mf=pf("native-string-replace",String.prototype.replace),bf=gf,wf=(tf=/a/,ef=/b*/g,gf.call(tf,"a"),gf.call(ef,"a"),0!==tf.lastIndex||0!==ef.lastIndex),xf=ff.UNSUPPORTED_Y||ff.BROKEN_CARET,Sf=void 0!==/()??/.exec("")[1];(wf||Sf||xf||vf||yf)&&(bf=function(t){var e,r,n,o,i,a,u,c=this,s=df(c),l=sf(t),f=s.raw;if(f)return f.lastIndex=c.lastIndex,e=bf.call(f,l),c.lastIndex=f.lastIndex,e;var p=s.groups,h=xf&&c.sticky,d=lf.call(c),v=c.source,y=0,g=l;if(h&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),g=l.slice(c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==l.charAt(c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",d)),Sf&&(r=new RegExp("^"+v+"$(?!\\s)",d)),wf&&(n=c.lastIndex),o=gf.call(h?r:c,g),h?o?(o.input=o.input.slice(y),o[0]=o[0].slice(y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:wf&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Sf&&o&&o.length>1&&mf.call(o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=hf(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var kf=bf;jr({target:"RegExp",proto:!0,forced:/./.exec!==kf},{exec:kf});var Af=Yt.exports,Ef=kf,Of=u,jf=dt,Tf=Ht,Lf=jf("species"),_f=RegExp.prototype,Rf=function(t,e,r,n){var o=jf(t),i=!Of((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!Of((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Lf]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||r){var u=/./[o],c=e(o,""[t],(function(t,e,r,n,o){var a=e.exec;return a===Ef||a===_f.exec?i&&!o?{done:!0,value:u.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}));Af(String.prototype,t,c[0]),Af(_f,o,c[1])}n&&Tf(_f[o],"sham",!0)},If=De,Pf=Sl,Cf=x,Df=function(t){return function(e,r){var n,o,i=Pf(Cf(e)),a=If(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===u||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):n:t?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},Mf={codeAt:Df(!1),charAt:Df(!0)},Uf=Mf.charAt,Nf=function(t,e,r){return e+(r?Uf(t,e).length:1)},Ff=g,qf=kf,Bf=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==Ff(t))throw TypeError("RegExp#exec called on incompatible receiver");return qf.call(t,e)},$f=Rf,Gf=Ol,Wf=Ft,zf=x,Vf=Un,Hf=Nf,Yf=Ne,Jf=Sl,Kf=Bf,Xf=kf,Zf=u,Qf=Xl.UNSUPPORTED_Y,tp=[].push,ep=Math.min,rp=4294967295,np=!Zf((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));$f("split",(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=Jf(zf(this)),o=void 0===r?rp:r>>>0;if(0===o)return[];if(void 0===t)return[n];if(!Gf(t))return e.call(n,t,o);for(var i,a,u,c=[],s=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,f=new RegExp(t.source,s+"g");(i=Xf.call(f,n))&&!((a=f.lastIndex)>l&&(c.push(n.slice(l,i.index)),i.length>1&&i.index<n.length&&tp.apply(c,i.slice(1)),u=i[0].length,l=a,c.length>=o));)f.lastIndex===i.index&&f.lastIndex++;return l===n.length?!u&&f.test("")||c.push(""):c.push(n.slice(l)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var o=zf(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(Jf(o),e,r)},function(t,o){var i=Wf(this),a=Jf(t),u=r(n,i,a,o,n!==e);if(u.done)return u.value;var c=Vf(i,RegExp),s=i.unicode,l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(Qf?"g":"y"),f=new c(Qf?"^(?:"+i.source+")":i,l),p=void 0===o?rp:o>>>0;if(0===p)return[];if(0===a.length)return null===Kf(f,a)?[a]:[];for(var h=0,d=0,v=[];d<a.length;){f.lastIndex=Qf?0:d;var y,g=Kf(f,Qf?a.slice(d):a);if(null===g||(y=ep(Yf(f.lastIndex+(Qf?d:0)),a.length))===h)d=Hf(a,d,s);else{if(v.push(a.slice(h,d)),v.length===p)return v;for(var m=1;m<=g.length-1;m++)if(v.push(g[m]),v.length===p)return v;d=h=y}}return v.push(a.slice(h)),v}]}),!np,Qf);var op=Z,ip=Math.floor,ap="".replace,up=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,cp=/\$([$&'`]|\d{1,2})/g,sp=Rf,lp=u,fp=Ft,pp=De,hp=Ne,dp=Sl,vp=x,yp=Nf,gp=function(t,e,r,n,o,i){var a=r+t.length,u=n.length,c=cp;return void 0!==o&&(o=op(o),c=up),ap.call(i,c,(function(i,c){var s;switch(c.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(a);case"<":s=o[c.slice(1,-1)];break;default:var l=+c;if(0===l)return i;if(l>u){var f=ip(l/10);return 0===f?i:f<=u?void 0===n[f-1]?c.charAt(1):n[f-1]+c.charAt(1):i}s=n[l-1]}return void 0===s?"":s}))},mp=Bf,bp=dt("replace"),wp=Math.max,xp=Math.min,Sp="$0"==="a".replace(/./,"$0"),kp=!!/./[bp]&&""===/./[bp]("a","$0"),Ap=!lp((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}));sp("replace",(function(t,e,r){var n=kp?"$":"$0";return[function(t,r){var n=vp(this),o=null==t?void 0:t[bp];return void 0!==o?o.call(t,n,r):e.call(dp(n),t,r)},function(t,o){var i=fp(this),a=dp(t);if("string"==typeof o&&-1===o.indexOf(n)&&-1===o.indexOf("$<")){var u=r(e,i,a,o);if(u.done)return u.value}var c="function"==typeof o;c||(o=dp(o));var s=i.global;if(s){var l=i.unicode;i.lastIndex=0}for(var f=[];;){var p=mp(i,a);if(null===p)break;if(f.push(p),!s)break;""===dp(p[0])&&(i.lastIndex=yp(a,hp(i.lastIndex),l))}for(var h,d="",v=0,y=0;y<f.length;y++){p=f[y];for(var g=dp(p[0]),m=wp(xp(pp(p.index),a.length),0),b=[],w=1;w<p.length;w++)b.push(void 0===(h=p[w])?h:String(h));var x=p.groups;if(c){var S=[g].concat(b,m,a);void 0!==x&&S.push(x);var k=dp(o.apply(void 0,S))}else k=gp(g,a,m,b,x,o);m>=v&&(d+=a.slice(v,m)+k,v=m+g.length)}return d+a.slice(v)}]}),!Ap||!Sp||kp);var Ep=jr,Op=u,jp=T("JSON","stringify"),Tp=/[\uD800-\uDFFF]/g,Lp=/^[\uD800-\uDBFF]$/,_p=/^[\uDC00-\uDFFF]$/,Rp=function(t,e,r){var n=r.charAt(e-1),o=r.charAt(e+1);return Lp.test(t)&&!_p.test(o)||_p.test(t)&&!Lp.test(n)?"\\u"+t.charCodeAt(0).toString(16):t},Ip=Op((function(){return'"\\udf06\\ud834"'!==jp("\udf06\ud834")||'"\\udead"'!==jp("\udead")}));jp&&Ep({target:"JSON",stat:!0,forced:Ip},{stringify:function(t,e,r){var n=jp.apply(null,arguments);return"string"==typeof n?n.replace(Tp,Rp):n}});class Pp extends Error{constructor(t,e,r,n,o){super(t),this.code=e,this.body=r,this.status=n,this.headers=o}}var Cp=e.XMLHttpRequest||{};class Dp{static request(t,e,r,n){return new Wc(((o,i,a)=>{var u=new Cp,c=!1;for(var s in a((()=>{u.abort(),c=!0})),u.open(t,e,!0),u.onreadystatechange=function(){if(4===u.readyState&&!c){var t,e=(t=u.getAllResponseHeaders())?t.split("\r\n").map((t=>t.split(": "))).filter((t=>2===t.length&&t[1].length>0)).reduce(((t,e)=>(t[e[0]]=e[1],t)),{}):{},r=function(t){var e=t.getResponseHeader("Content-Type");if(!e||0!==e.indexOf("application/json")||0===t.responseText.length)return t.responseText;try{return JSON.parse(t.responseText)}catch(e){return t.responseText}}(u);if(200<=u.status&&u.status<300)o({status:u.status,headers:e,body:r});else{var n,a,s=null!==(n=u.statusText)&&void 0!==n?n:"NONE";if("string"==typeof r)if(r&&1===r.split("\n",2).length)a=r;else{var l,f=null===(l=r.replace(/<.*?>/g,"").split(/\r\n/g).filter((t=>t.length))[0])||void 0===l?void 0:l.split(" ");a=(null==f?void 0:f.length)>2?null==f?void 0:f.slice(1).join(" "):""}else a=JSON.stringify(r);var p="".concat(u.status,": [").concat(s,"] ").concat(a);i(new Pp(p,u.status,r,s,e))}}},r)u.setRequestHeader(s,r[s]),"Content-Type"===s&&"application/json"===r[s]&&(n=JSON.stringify(n));u.send(n)}))}get(t,e){return Dp.request("GET",t,e)}post(t,e,r){return Dp.request("POST",t,e,r)}}var Mp=c,Up=u,Np=Ji,Fp=rr,qp=s,Bp=Z,$p=w,Gp=Object.assign,Wp=Object.defineProperty,zp=!Gp||Up((function(){if(Mp&&1!==Gp({b:1},Gp(Wp({},"a",{enumerable:!0,get:function(){Wp(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=Gp({},t)[r]||Np(Gp({},e)).join("")!=n}))?function(t,e){for(var r=Bp(t),n=arguments.length,o=1,i=Fp.f,a=qp.f;n>o;)for(var u,c=$p(arguments[o++]),s=i?Np(c).concat(i(c)):Np(c),l=s.length,f=0;l>f;)u=s[f++],Mp&&!a.call(c,u)||(r[u]=c[u]);return r}:Gp,Vp=zp;jr({target:"Object",stat:!0,forced:Object.assign!==Vp},{assign:Vp});var Hp=Mf.charAt,Yp=Sl,Jp=ke,Kp=ru,Xp="String Iterator",Zp=Jp.set,Qp=Jp.getterFor(Xp);Kp(String,"String",(function(t){Zp(this,{type:Xp,string:Yp(t),index:0})}),(function(){var t,e=Qp(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Hp(r,n),e.index+=t.length,{value:t,done:!1})}));var th=u,eh=dt("iterator"),rh=!th((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[eh]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),nh=2147483647,oh=/[^\0-\u007E]/,ih=/[.\u3002\uFF0E\uFF61]/g,ah="Overflow: input needs wider integers to process",uh=Math.floor,ch=String.fromCharCode,sh=function(t){return t+22+75*(t<26)},lh=function(t,e,r){var n=0;for(t=r?uh(t/700):t>>1,t+=uh(t/e);t>455;n+=36)t=uh(t/35);return uh(n+36*t/(t+38))},fh=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=t.charCodeAt(r++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),r--)}else e.push(o)}return e}(t);var r,n,o=t.length,i=128,a=0,u=72;for(r=0;r<t.length;r++)(n=t[r])<128&&e.push(ch(n));var c=e.length,s=c;for(c&&e.push("-");s<o;){var l=nh;for(r=0;r<t.length;r++)(n=t[r])>=i&&n<l&&(l=n);var f=s+1;if(l-i>uh((nh-a)/f))throw RangeError(ah);for(a+=(l-i)*f,i=l,r=0;r<t.length;r++){if((n=t[r])<i&&++a>nh)throw RangeError(ah);if(n==i){for(var p=a,h=36;;h+=36){var d=h<=u?1:h>=u+26?26:h-u;if(p<d)break;var v=p-d,y=36-d;e.push(ch(sh(d+v%y))),p=uh(v/y)}e.push(ch(sh(p))),u=lh(a,f,s==c),a=0,++s}}++a,++i}return e.join("")},ph=jr,hh=T,dh=rh,vh=Yt.exports,yh=_r,gh=Nr,mh=qa,bh=ke,wh=zr,xh=et,Sh=Zr,kh=an,Ah=Ft,Eh=E,Oh=Sl,jh=fa,Th=v,Lh=hn,_h=ln,Rh=dt,Ih=hh("fetch"),Ph=hh("Request"),Ch=Ph&&Ph.prototype,Dh=hh("Headers"),Mh=Rh("iterator"),Uh="URLSearchParams",Nh="URLSearchParamsIterator",Fh=bh.set,qh=bh.getterFor(Uh),Bh=bh.getterFor(Nh),$h=/\+/g,Gh=Array(4),Wh=function(t){return Gh[t-1]||(Gh[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},zh=function(t){try{return decodeURIComponent(t)}catch(e){return t}},Vh=function(t){var e=t.replace($h," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(Wh(r--),zh);return e}},Hh=/[!'()~]|%20/g,Yh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Jh=function(t){return Yh[t]},Kh=function(t){return encodeURIComponent(t).replace(Hh,Jh)},Xh=function(t,e){if(e)for(var r,n,o=e.split("&"),i=0;i<o.length;)(r=o[i++]).length&&(n=r.split("="),t.push({key:Vh(n.shift()),value:Vh(n.join("="))}))},Zh=function(t){this.entries.length=0,Xh(this.entries,t)},Qh=function(t,e){if(t<e)throw TypeError("Not enough arguments")},td=mh((function(t,e){Fh(this,{type:Nh,iterator:Lh(qh(t).entries),kind:e})}),"Iterator",(function(){var t=Bh(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r})),ed=function(){wh(this,ed,Uh);var t,e,r,n,o,i,a,u,c,s=arguments.length>0?arguments[0]:void 0,l=this,f=[];if(Fh(l,{type:Uh,entries:f,updateURL:function(){},updateSearchParams:Zh}),void 0!==s)if(Eh(s))if("function"==typeof(t=_h(s)))for(r=(e=Lh(s,t)).next;!(n=r.call(e)).done;){if((a=(i=(o=Lh(Ah(n.value))).next).call(o)).done||(u=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");f.push({key:Oh(a.value),value:Oh(u.value)})}else for(c in s)xh(s,c)&&f.push({key:c,value:Oh(s[c])});else Xh(f,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:Oh(s))},rd=ed.prototype;if(yh(rd,{append:function(t,e){Qh(arguments.length,2);var r=qh(this);r.entries.push({key:Oh(t),value:Oh(e)}),r.updateURL()},delete:function(t){Qh(arguments.length,1);for(var e=qh(this),r=e.entries,n=Oh(t),o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;e.updateURL()},get:function(t){Qh(arguments.length,1);for(var e=qh(this).entries,r=Oh(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){Qh(arguments.length,1);for(var e=qh(this).entries,r=Oh(t),n=[],o=0;o<e.length;o++)e[o].key===r&&n.push(e[o].value);return n},has:function(t){Qh(arguments.length,1);for(var e=qh(this).entries,r=Oh(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){Qh(arguments.length,1);for(var r,n=qh(this),o=n.entries,i=!1,a=Oh(t),u=Oh(e),c=0;c<o.length;c++)(r=o[c]).key===a&&(i?o.splice(c--,1):(i=!0,r.value=u));i||o.push({key:a,value:u}),n.updateURL()},sort:function(){var t,e,r,n=qh(this),o=n.entries,i=o.slice();for(o.length=0,r=0;r<i.length;r++){for(t=i[r],e=0;e<r;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===r&&o.push(t)}n.updateURL()},forEach:function(t){for(var e,r=qh(this).entries,n=Sh(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new td(this,"keys")},values:function(){return new td(this,"values")},entries:function(){return new td(this,"entries")}},{enumerable:!0}),vh(rd,Mh,rd.entries),vh(rd,"toString",(function(){for(var t,e=qh(this).entries,r=[],n=0;n<e.length;)t=e[n++],r.push(Kh(t.key)+"="+Kh(t.value));return r.join("&")}),{enumerable:!0}),gh(ed,Uh),ph({global:!0,forced:!dh},{URLSearchParams:ed}),!dh&&"function"==typeof Dh){var nd=function(t){if(Eh(t)){var e,r=t.body;if(kh(r)===Uh)return(e=t.headers?new Dh(t.headers):new Dh).has("content-type")||e.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),jh(t,{body:Th(0,String(r)),headers:Th(0,e)})}return t};if("function"==typeof Ih&&ph({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Ih(t,arguments.length>1?nd(arguments[1]):{})}}),"function"==typeof Ph){var od=function(t){return wh(this,od,"Request"),new Ph(t,arguments.length>1?nd(arguments[1]):{})};Ch.constructor=od,od.prototype=Ch,ph({global:!0,forced:!0},{Request:od})}}var id,ad={URLSearchParams:ed,getState:qh},ud=jr,cd=c,sd=rh,ld=i,fd=Qi,pd=Yt.exports,hd=zr,dd=et,vd=zp,yd=pl,gd=Mf.codeAt,md=function(t){var e,r,n=[],o=t.toLowerCase().replace(ih,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(oh.test(r)?"xn--"+fh(r):r);return n.join(".")},bd=Sl,wd=Nr,xd=ad,Sd=ke,kd=ld.URL,Ad=xd.URLSearchParams,Ed=xd.getState,Od=Sd.set,jd=Sd.getterFor("URL"),Td=Math.floor,Ld=Math.pow,_d="Invalid scheme",Rd="Invalid host",Id="Invalid port",Pd=/[A-Za-z]/,Cd=/[\d+-.A-Za-z]/,Dd=/\d/,Md=/^0x/i,Ud=/^[0-7]+$/,Nd=/^\d+$/,Fd=/^[\dA-Fa-f]+$/,qd=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Bd=/[\0\t\n\r #/:<>?@[\\\]^|]/,$d=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Gd=/[\t\n\r]/g,Wd=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return Rd;if(!(r=Vd(e.slice(1,-1))))return Rd;t.host=r}else if(tv(t)){if(e=md(e),qd.test(e))return Rd;if(null===(r=zd(e)))return Rd;t.host=r}else{if(Bd.test(e))return Rd;for(r="",n=yd(e),o=0;o<n.length;o++)r+=Zd(n[o],Yd);t.host=r}},zd=function(t){var e,r,n,o,i,a,u,c=t.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(e=c.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=c[n]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=Md.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?Nd:8==i?Ud:Fd).test(o))return t;a=parseInt(o,i)}r.push(a)}for(n=0;n<e;n++)if(a=r[n],n==e-1){if(a>=Ld(256,5-e))return null}else if(a>255)return null;for(u=r.pop(),n=0;n<r.length;n++)u+=r[n]*Ld(256,3-n);return u},Vd=function(t){var e,r,n,o,i,a,u,c=[0,0,0,0,0,0,0,0],s=0,l=null,f=0,p=function(){return t.charAt(f)};if(":"==p()){if(":"!=t.charAt(1))return;f+=2,l=++s}for(;p();){if(8==s)return;if(":"!=p()){for(e=r=0;r<4&&Fd.test(p());)e=16*e+parseInt(p(),16),f++,r++;if("."==p()){if(0==r)return;if(f-=r,s>6)return;for(n=0;p();){if(o=null,n>0){if(!("."==p()&&n<4))return;f++}if(!Dd.test(p()))return;for(;Dd.test(p());){if(i=parseInt(p(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;f++}c[s]=256*c[s]+o,2!=++n&&4!=n||s++}if(4!=n)return;break}if(":"==p()){if(f++,!p())return}else if(p())return;c[s++]=e}else{if(null!==l)return;f++,l=++s}}if(null!==l)for(a=s-l,s=7;0!=s&&a>0;)u=c[s],c[s--]=c[l+a-1],c[l+--a]=u;else if(8!=s)return;return c},Hd=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=Td(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=t[r].toString(16),r<7&&(e+=":")));return"["+e+"]"}return t},Yd={},Jd=vd({},Yd,{" ":1,'"':1,"<":1,">":1,"`":1}),Kd=vd({},Jd,{"#":1,"?":1,"{":1,"}":1}),Xd=vd({},Kd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Zd=function(t,e){var r=gd(t,0);return r>32&&r<127&&!dd(e,t)?t:encodeURIComponent(t)},Qd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},tv=function(t){return dd(Qd,t.scheme)},ev=function(t){return""!=t.username||""!=t.password},rv=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},nv=function(t,e){var r;return 2==t.length&&Pd.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},ov=function(t){var e;return t.length>1&&nv(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},iv=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&nv(e[0],!0)||e.pop()},av=function(t){return"."===t||"%2e"===t.toLowerCase()},uv={},cv={},sv={},lv={},fv={},pv={},hv={},dv={},vv={},yv={},gv={},mv={},bv={},wv={},xv={},Sv={},kv={},Av={},Ev={},Ov={},jv={},Tv=function(t,e,r,n){var o,i,a,u,c,s=r||uv,l=0,f="",p=!1,h=!1,d=!1;for(r||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace($d,"")),e=e.replace(Gd,""),o=yd(e);l<=o.length;){switch(i=o[l],s){case uv:if(!i||!Pd.test(i)){if(r)return _d;s=sv;continue}f+=i.toLowerCase(),s=cv;break;case cv:if(i&&(Cd.test(i)||"+"==i||"-"==i||"."==i))f+=i.toLowerCase();else{if(":"!=i){if(r)return _d;f="",s=sv,l=0;continue}if(r&&(tv(t)!=dd(Qd,f)||"file"==f&&(ev(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=f,r)return void(tv(t)&&Qd[t.scheme]==t.port&&(t.port=null));f="","file"==t.scheme?s=wv:tv(t)&&n&&n.scheme==t.scheme?s=lv:tv(t)?s=dv:"/"==o[l+1]?(s=fv,l++):(t.cannotBeABaseURL=!0,t.path.push(""),s=Ev)}break;case sv:if(!n||n.cannotBeABaseURL&&"#"!=i)return _d;if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,s=jv;break}s="file"==n.scheme?wv:pv;continue;case lv:if("/"!=i||"/"!=o[l+1]){s=pv;continue}s=vv,l++;break;case fv:if("/"==i){s=yv;break}s=Av;continue;case pv:if(t.scheme=n.scheme,i==id)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query;else if("/"==i||"\\"==i&&tv(t))s=hv;else if("?"==i)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query="",s=Ov;else{if("#"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.path.pop(),s=Av;continue}t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=jv}break;case hv:if(!tv(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,s=Av;continue}s=yv}else s=vv;break;case dv:if(s=vv,"/"!=i||"/"!=f.charAt(l+1))continue;l++;break;case vv:if("/"!=i&&"\\"!=i){s=yv;continue}break;case yv:if("@"==i){p&&(f="%40"+f),p=!0,a=yd(f);for(var v=0;v<a.length;v++){var y=a[v];if(":"!=y||d){var g=Zd(y,Xd);d?t.password+=g:t.username+=g}else d=!0}f=""}else if(i==id||"/"==i||"?"==i||"#"==i||"\\"==i&&tv(t)){if(p&&""==f)return"Invalid authority";l-=yd(f).length+1,f="",s=gv}else f+=i;break;case gv:case mv:if(r&&"file"==t.scheme){s=Sv;continue}if(":"!=i||h){if(i==id||"/"==i||"?"==i||"#"==i||"\\"==i&&tv(t)){if(tv(t)&&""==f)return Rd;if(r&&""==f&&(ev(t)||null!==t.port))return;if(u=Wd(t,f))return u;if(f="",s=kv,r)return;continue}"["==i?h=!0:"]"==i&&(h=!1),f+=i}else{if(""==f)return Rd;if(u=Wd(t,f))return u;if(f="",s=bv,r==mv)return}break;case bv:if(!Dd.test(i)){if(i==id||"/"==i||"?"==i||"#"==i||"\\"==i&&tv(t)||r){if(""!=f){var m=parseInt(f,10);if(m>65535)return Id;t.port=tv(t)&&m===Qd[t.scheme]?null:m,f=""}if(r)return;s=kv;continue}return Id}f+=i;break;case wv:if(t.scheme="file","/"==i||"\\"==i)s=xv;else{if(!n||"file"!=n.scheme){s=Av;continue}if(i==id)t.host=n.host,t.path=n.path.slice(),t.query=n.query;else if("?"==i)t.host=n.host,t.path=n.path.slice(),t.query="",s=Ov;else{if("#"!=i){ov(o.slice(l).join(""))||(t.host=n.host,t.path=n.path.slice(),iv(t)),s=Av;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=jv}}break;case xv:if("/"==i||"\\"==i){s=Sv;break}n&&"file"==n.scheme&&!ov(o.slice(l).join(""))&&(nv(n.path[0],!0)?t.path.push(n.path[0]):t.host=n.host),s=Av;continue;case Sv:if(i==id||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&nv(f))s=Av;else if(""==f){if(t.host="",r)return;s=kv}else{if(u=Wd(t,f))return u;if("localhost"==t.host&&(t.host=""),r)return;f="",s=kv}continue}f+=i;break;case kv:if(tv(t)){if(s=Av,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=id&&(s=Av,"/"!=i))continue}else t.fragment="",s=jv;else t.query="",s=Ov;break;case Av:if(i==id||"/"==i||"\\"==i&&tv(t)||!r&&("?"==i||"#"==i)){if(".."===(c=(c=f).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(iv(t),"/"==i||"\\"==i&&tv(t)||t.path.push("")):av(f)?"/"==i||"\\"==i&&tv(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&nv(f)&&(t.host&&(t.host=""),f=f.charAt(0)+":"),t.path.push(f)),f="","file"==t.scheme&&(i==id||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",s=Ov):"#"==i&&(t.fragment="",s=jv)}else f+=Zd(i,Kd);break;case Ev:"?"==i?(t.query="",s=Ov):"#"==i?(t.fragment="",s=jv):i!=id&&(t.path[0]+=Zd(i,Yd));break;case Ov:r||"#"!=i?i!=id&&("'"==i&&tv(t)?t.query+="%27":t.query+="#"==i?"%23":Zd(i,Yd)):(t.fragment="",s=jv);break;case jv:i!=id&&(t.fragment+=Zd(i,Jd))}l++}},Lv=function(t){var e,r,n=hd(this,Lv,"URL"),o=arguments.length>1?arguments[1]:void 0,i=bd(t),a=Od(n,{type:"URL"});if(void 0!==o)if(o instanceof Lv)e=jd(o);else if(r=Tv(e={},bd(o)))throw TypeError(r);if(r=Tv(a,i,null,e))throw TypeError(r);var u=a.searchParams=new Ad,c=Ed(u);c.updateSearchParams(a.query),c.updateURL=function(){a.query=String(u)||null},cd||(n.href=Rv.call(n),n.origin=Iv.call(n),n.protocol=Pv.call(n),n.username=Cv.call(n),n.password=Dv.call(n),n.host=Mv.call(n),n.hostname=Uv.call(n),n.port=Nv.call(n),n.pathname=Fv.call(n),n.search=qv.call(n),n.searchParams=Bv.call(n),n.hash=$v.call(n))},_v=Lv.prototype,Rv=function(){var t=jd(this),e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,u=t.query,c=t.fragment,s=e+":";return null!==o?(s+="//",ev(t)&&(s+=r+(n?":"+n:"")+"@"),s+=Hd(o),null!==i&&(s+=":"+i)):"file"==e&&(s+="//"),s+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==u&&(s+="?"+u),null!==c&&(s+="#"+c),s},Iv=function(){var t=jd(this),e=t.scheme,r=t.port;if("blob"==e)try{return new Lv(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&tv(t)?e+"://"+Hd(t.host)+(null!==r?":"+r:""):"null"},Pv=function(){return jd(this).scheme+":"},Cv=function(){return jd(this).username},Dv=function(){return jd(this).password},Mv=function(){var t=jd(this),e=t.host,r=t.port;return null===e?"":null===r?Hd(e):Hd(e)+":"+r},Uv=function(){var t=jd(this).host;return null===t?"":Hd(t)},Nv=function(){var t=jd(this).port;return null===t?"":String(t)},Fv=function(){var t=jd(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},qv=function(){var t=jd(this).query;return t?"?"+t:""},Bv=function(){return jd(this).searchParams},$v=function(){var t=jd(this).fragment;return t?"#"+t:""},Gv=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(cd&&fd(_v,{href:Gv(Rv,(function(t){var e=jd(this),r=bd(t),n=Tv(e,r);if(n)throw TypeError(n);Ed(e.searchParams).updateSearchParams(e.query)})),origin:Gv(Iv),protocol:Gv(Pv,(function(t){var e=jd(this);Tv(e,bd(t)+":",uv)})),username:Gv(Cv,(function(t){var e=jd(this),r=yd(bd(t));if(!rv(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=Zd(r[n],Xd)}})),password:Gv(Dv,(function(t){var e=jd(this),r=yd(bd(t));if(!rv(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=Zd(r[n],Xd)}})),host:Gv(Mv,(function(t){var e=jd(this);e.cannotBeABaseURL||Tv(e,bd(t),gv)})),hostname:Gv(Uv,(function(t){var e=jd(this);e.cannotBeABaseURL||Tv(e,bd(t),mv)})),port:Gv(Nv,(function(t){var e=jd(this);rv(e)||(""==(t=bd(t))?e.port=null:Tv(e,t,bv))})),pathname:Gv(Fv,(function(t){var e=jd(this);e.cannotBeABaseURL||(e.path=[],Tv(e,bd(t),kv))})),search:Gv(qv,(function(t){var e=jd(this);""==(t=bd(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",Tv(e,t,Ov)),Ed(e.searchParams).updateSearchParams(e.query)})),searchParams:Gv(Bv),hash:Gv($v,(function(t){var e=jd(this);""!=(t=bd(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",Tv(e,t,jv)):e.fragment=null}))}),pd(_v,"toJSON",(function(){return Rv.call(this)}),{enumerable:!0}),pd(_v,"toString",(function(){return Rv.call(this)}),{enumerable:!0}),kd){var Wv=kd.createObjectURL,zv=kd.revokeObjectURL;Wv&&pd(Lv,"createObjectURL",(function(t){return Wv.apply(kd,arguments)})),zv&&pd(Lv,"revokeObjectURL",(function(t){return zv.apply(kd,arguments)}))}wd(Lv,"URL"),ud({global:!0,forced:!sd,sham:!cd},{URL:Lv});var Vv={},Hv=i,Yv=Nr;jr({global:!0},{Reflect:{}}),Yv(Hv.Reflect,"Reflect",!0);var Jv=Wr,Kv=E,Xv=[].slice,Zv={},Qv=function(t,e,r){if(!(e in Zv)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";Zv[e]=Function("C,a","return new C("+n.join(",")+")")}return Zv[e](t,r)},ty=Function.bind||function(t){var e=Jv(this),r=Xv.call(arguments,1),n=function(){var o=r.concat(Xv.call(arguments));return this instanceof n?Qv(e,o.length,o):e.apply(t,o)};return Kv(e.prototype)&&(n.prototype=e.prototype),n},ey=jr,ry=Wr,ny=Ft,oy=E,iy=fa,ay=ty,uy=u,cy=T("Reflect","construct"),sy=uy((function(){function t(){}return!(cy((function(){}),[],t)instanceof t)})),ly=!uy((function(){cy((function(){}))})),fy=sy||ly;ey({target:"Reflect",stat:!0,forced:fy,sham:fy},{construct:function(t,e){ry(t),ny(e);var r=arguments.length<3?t:ry(arguments[2]);if(ly&&!sy)return cy(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(ay.apply(t,n))}var o=r.prototype,i=iy(oy(o)?o:Object.prototype),a=Function.apply.call(t,i,e);return oy(a)?a:i}});var py={exports:{}};!function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports}(py);var hy={exports:{}};!function(t){function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}(hy);var dy={exports:{}};!function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports}(dy);var vy={exports:{}},yy={exports:{}};!function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(yy),function(t){var e=yy.exports;t.exports=function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&e(t,r)},t.exports.__esModule=!0,t.exports.default=t.exports}(vy);var gy={exports:{}},my={exports:{}};!function(t){function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(my),function(t){var e=my.exports.default,r=dy.exports;t.exports=function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return r(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(gy);var by={exports:{}};!function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(by);var wy={exports:{}};!function(t){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports}(wy);var xy=an,Sy=tn?{}.toString:function(){return"[object "+xy(this)+"]"},ky=tn,Ay=Yt.exports,Ey=Sy;ky||Ay(Object.prototype,"toString",Ey,{unsafe:!0})
|
|
19
|
-
/*
|
|
20
|
-
@license
|
|
21
|
-
Copyright (c) 2016, Twilio, Inc.
|
|
22
|
-
|
|
23
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
24
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
25
|
-
copyright notice and this permission notice appear in all copies.
|
|
26
|
-
|
|
27
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
28
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
29
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
|
30
|
-
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
31
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
|
32
|
-
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
|
33
|
-
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
34
|
-
|
|
35
|
-
*/,Object.defineProperty(Vv,"__esModule",{value:!0});var Oy=hy.exports,jy=dy.exports,Ty=vy.exports,Ly=gy.exports,_y=by.exports,Ry=wy.exports;function Iy(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var Py=Iy(py.exports),Cy=Iy(Oy),Dy=Iy(jy),My=Iy(Ty),Uy=Iy(Ly),Ny=Iy(_y),Fy=Iy(Ry);function qy(){}function By(){By.init.call(this)}function $y(t){return void 0===t._maxListeners?By.defaultMaxListeners:t._maxListeners}function Gy(t,e,r){if(e)t.call(r);else for(var n=t.length,o=Xy(t,n),i=0;i<n;++i)o[i].call(r)}function Wy(t,e,r,n){if(e)t.call(r,n);else for(var o=t.length,i=Xy(t,o),a=0;a<o;++a)i[a].call(r,n)}function zy(t,e,r,n,o){if(e)t.call(r,n,o);else for(var i=t.length,a=Xy(t,i),u=0;u<i;++u)a[u].call(r,n,o)}function Vy(t,e,r,n,o,i){if(e)t.call(r,n,o,i);else for(var a=t.length,u=Xy(t,a),c=0;c<a;++c)u[c].call(r,n,o,i)}function Hy(t,e,r,n){if(e)t.apply(r,n);else for(var o=t.length,i=Xy(t,o),a=0;a<o;++a)i[a].apply(r,n)}function Yy(t,e,r,n){var o,i,a,u;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=t._events)?(i.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),i=t._events),a=i[e]):(i=t._events=new qy,t._eventsCount=0),a){if("function"==typeof a?a=i[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(o=$y(t))&&o>0&&a.length>o){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=a.length,u=c,"function"==typeof console.warn?console.warn(u):console.log(u)}}else a=i[e]=r,++t._eventsCount;return t}function Jy(t,e,r){var n=!1;function o(){t.removeListener(e,o),n||(n=!0,r.apply(t,arguments))}return o.listener=r,o}function Ky(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function Xy(t,e){for(var r=new Array(e);e--;)r[e]=t[e];return r}function Zy(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ny.default(t);if(e){var o=Ny.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Uy.default(this,r)}}qy.prototype=Object.create(null),By.EventEmitter=By,By.usingDomains=!1,By.prototype.domain=void 0,By.prototype._events=void 0,By.prototype._maxListeners=void 0,By.defaultMaxListeners=10,By.init=function(){this.domain=null,By.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new qy,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},By.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},By.prototype.getMaxListeners=function(){return $y(this)},By.prototype.emit=function(t){var e,r,n,o,i,a,u,c="error"===t;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(u=this.domain,c){if(e=arguments[1],!u){if(e instanceof Error)throw e;var s=new Error('Uncaught, unspecified "error" event. ('+e+")");throw s.context=e,s}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=u,e.domainThrown=!1,u.emit("error",e),!1}if(!(r=a[t]))return!1;var l="function"==typeof r;switch(n=arguments.length){case 1:Gy(r,l,this);break;case 2:Wy(r,l,this,arguments[1]);break;case 3:zy(r,l,this,arguments[1],arguments[2]);break;case 4:Vy(r,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];Hy(r,l,this,o)}return!0},By.prototype.addListener=function(t,e){return Yy(this,t,e,!1)},By.prototype.on=By.prototype.addListener,By.prototype.prependListener=function(t,e){return Yy(this,t,e,!0)},By.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Jy(this,t,e)),this},By.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Jy(this,t,e)),this},By.prototype.removeListener=function(t,e){var r,n,o,i,a;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[t]))return this;if(r===e||r.listener&&r.listener===e)0==--this._eventsCount?this._events=new qy:(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(o=-1,i=r.length;i-- >0;)if(r[i]===e||r[i].listener&&r[i].listener===e){a=r[i].listener,o=i;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new qy,this;delete n[t]}else!function(t,e){for(var r=e,n=r+1,o=t.length;n<o;r+=1,n+=1)t[r]=t[n];t.pop()}(r,o);n.removeListener&&this.emit("removeListener",t,a||e)}return this},By.prototype.off=function(t,e){return this.removeListener(t,e)},By.prototype.removeAllListeners=function(t){var e,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new qy,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new qy:delete r[t]),this;if(0===arguments.length){for(var n,o=Object.keys(r),i=0;i<o.length;++i)"removeListener"!==(n=o[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new qy,this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},By.prototype.listeners=function(t){var e,r,n=this._events;return r=n&&(e=n[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(e):[],r},By.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):Ky.call(t,e)},By.prototype.listenerCount=Ky,By.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Qy=function(t){My.default(r,t);var e=Zy(r);function r(t){var n;return Py.default(this,r),n=e.call(this),Fy.default(Dy.default(n),"timeout",null),Fy.default(Dy.default(n),"startTimestamp",-1),n.minDelay=t.min,n.maxDelay=t.max,n.initialDelay=t.initial||0,n.maxAttemptsCount=t.maxAttemptsCount||0,n.maxAttemptsTime=t.maxAttemptsTime||0,n.randomness=t.randomness||0,n.inProgress=!1,n.attemptNum=0,n.prevDelay=0,n.currDelay=0,n}return Cy.default(r,[{key:"attempt",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.attemptNum++,this.emit("attempt",this)}},{key:"nextDelay",value:function(t){if("number"==typeof t)return this.prevDelay=0,this.currDelay=t,t;if(0==this.attemptNum)return this.initialDelay;if(1==this.attemptNum)return this.currDelay=this.minDelay,this.currDelay;this.prevDelay=this.currDelay;var e=this.currDelay+this.prevDelay;return this.maxDelay&&e>this.maxDelay&&(this.currDelay=this.maxDelay,e=this.maxDelay),this.currDelay=e,e}},{key:"randomize",value:function(t){var e=t*this.randomness,r=Math.round(Math.random()*e*2-e);return Math.max(0,t+r)}},{key:"scheduleAttempt",value:function(t){var e=this;if(this.maxAttemptsCount&&this.attemptNum>=this.maxAttemptsCount)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt count limit reached"));var r=this.nextDelay(t);if(r=this.randomize(r),this.maxAttemptsTime&&this.startTimestamp+this.maxAttemptsTime<Date.now()+r)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt time limit reached"));this.timeout=setTimeout((function(){return e.attempt()}),r)}},{key:"cleanup",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}},{key:"start",value:function(){if(this.inProgress)throw new Error("Retrier is already in progress");this.inProgress=!0,this.startTimestamp=Date.now(),this.scheduleAttempt(this.initialDelay)}},{key:"cancel",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.emit("cancelled"))}},{key:"succeeded",value:function(t){this.emit("succeeded",t)}},{key:"failed",value:function(t,e){if(this.timeout)throw new Error("Retrier attempt is already in progress");this.scheduleAttempt(e)}}]),r}(By),tg=function(t){My.default(r,t);var e=Zy(r);function r(t){var n;return Py.default(this,r),n=e.call(this),Fy.default(Dy.default(n),"resolve",(function(){})),Fy.default(Dy.default(n),"reject",(function(){})),n.retrier=new Qy(t),n}return Cy.default(r,[{key:"run",value:function(t){var e=this;return this.retrier.on("attempt",(function(){t().then((function(t){return e.retrier.succeeded(t)})).catch((function(t){return e.retrier.failed(t)}))})),this.retrier.on("succeeded",(function(t){return e.resolve(t)})),this.retrier.on("cancelled",(function(){return e.reject(new Error("Cancelled"))})),this.retrier.on("failed",(function(t){return e.reject(t)})),new Promise((function(t,r){e.resolve=t,e.reject=r,e.retrier.start()}))}},{key:"cancel",value:function(){this.retrier.cancel()}}]),r}(By);function eg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Ny.default(t);if(e){var o=Ny.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Uy.default(this,r)}}function rg(t){return null!=t}var ng=function(t){My.default(r,t);var e=eg(r);function r(t){var n;Py.default(this,r),n=e.call(this),Fy.default(Dy.default(n),"backoffDelay",0),Fy.default(Dy.default(n),"nextBackoffDelay",0),Fy.default(Dy.default(n),"backoffNumber",0),Fy.default(Dy.default(n),"timeoutID",null),Fy.default(Dy.default(n),"maxNumberOfRetry",-1);var o=t=t||{},i=o.initialDelay,a=o.maxDelay,u=o.randomisationFactor,c=o.factor;if(rg(i)&&i<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(rg(a)&&a<=1)throw new Error("The maximal timeout must be greater than 1.");if(rg(u)&&(u<0||u>1))throw new Error("The randomisation factor must be between 0 and 1.");if(rg(c)&&c<=1)throw new Error("Exponential factor should be greater than 1.");if(n.initialDelay=i||100,n.maxDelay=a||1e4,n.maxDelay<=n.initialDelay)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");return n.randomisationFactor=u||0,n.factor=c||2,n.reset(),n}return Cy.default(r,[{key:"backoff",value:function(t){null==this.timeoutID&&(this.backoffNumber===this.maxNumberOfRetry?(this.emit("fail",t),this.reset()):(this.backoffDelay=this.next(),this.timeoutID=setTimeout(this.onBackoff.bind(this),this.backoffDelay),this.emit("backoff",this.backoffNumber,this.backoffDelay,t)))}},{key:"reset",value:function(){this.backoffDelay=0,this.nextBackoffDelay=this.initialDelay,this.backoffNumber=0,this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=null}},{key:"failAfter",value:function(t){if(t<=0)throw new Error("Expected a maximum number of retry greater than 0 but got ".concat(t));this.maxNumberOfRetry=t}},{key:"next",value:function(){this.backoffDelay=Math.min(this.nextBackoffDelay,this.maxDelay),this.nextBackoffDelay=this.backoffDelay*this.factor;var t=1+Math.random()*this.randomisationFactor;return Math.min(this.maxDelay,Math.round(this.backoffDelay*t))}},{key:"onBackoff",value:function(){this.timeoutID=null,this.emit("ready",this.backoffNumber,this.backoffDelay),this.backoffNumber++}}],[{key:"exponential",value:function(t){return new r(t)}}]),r}(By);Vv.AsyncRetrier=tg,Vv.Backoff=ng;var og=Vv.Retrier=Qy,ig=bl.scope("Network");class ag{constructor(t,e){this.config=t,this.transport=e}backoffConfig(){return Object.assign(ql.backoffConfigDefault,this.config.backoffConfigOverride)}retryWhenThrottled(){var t,e;return null!==(t=null!==(e=this.config.retryWhenThrottledOverride)&&void 0!==e?e:ql.retryWhenThrottledDefault)&&void 0!==t&&t}executeWithRetry(t,e){var r=this;return new Wc(function(){var n=Vc(Js.mark((function n(o,i,a){var u,c;return Js.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:u=new og(r.backoffConfig()),c=[502,503,504],e&&c.push(429),a((()=>{u.cancel(),u.removeAllListeners()})),u.on("attempt",Vc(Js.mark((function e(){var r,n;return Js.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=t(),a((()=>{r.cancel(),u.cancel(),u.removeAllListeners()})),e.next=5,r;case 5:n=e.sent,u.succeeded(n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),c.indexOf(e.t0.status)>-1||"Twilsock disconnected"===e.t0.message?u.failed(e.t0):(u.removeAllListeners(),u.cancel(),i(e.t0));case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))),u.on("succeeded",(t=>{o(t)})),u.on("cancelled",(t=>i(t))),u.on("failed",(t=>i(t))),u.start();case 9:case"end":return n.stop()}}),n)})));return function(t,e,r){return n.apply(this,arguments)}}())}get(t){var e=this;return new Wc(function(){var r=Vc(Js.mark((function r(n,o,i){var a,u,c;return Js.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={"X-Twilio-Token":e.config.token},u=e.executeWithRetry((()=>e.transport.get(t,a)),e.retryWhenThrottled()),ig.trace("sending GET request to ",t," headers ",a),i((()=>u.cancel())),r.prev=4,r.next=7,u;case 7:c=r.sent,ig.trace("response",c),n(c),r.next=16;break;case 12:r.prev=12,r.t0=r.catch(4),ig.debug("get() error ".concat(r.t0)),o(r.t0);case 16:case"end":return r.stop()}}),r,null,[[4,12]])})));return function(t,e,n){return r.apply(this,arguments)}}())}post(t,r,n,o,i){var a=this,u={"X-Twilio-Token":this.config.token};"undefined"!=typeof FormData&&n instanceof FormData||!o||Object.assign(u,{"Content-Type":o});var c=new URL(t);return r&&c.searchParams.append("Category",r),i&&c.searchParams.append("Filename",i),new Wc(function(){var r=Vc(Js.mark((function r(o,i,s){var l,f;return Js.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return l=a.transport.post(c.href,u,n),s((()=>l.cancel())),ig.trace("sending POST request to ".concat(t," with headers ").concat(u)),r.prev=3,r.next=6,l;case 6:f=r.sent,r.next=17;break;case 9:if(r.prev=9,r.t0=r.catch(3),!(void 0===e.XMLHttpRequest&&n instanceof FormData)){r.next=14;break}return i(new TypeError("Posting FormData supported only with browser engine's FormData")),r.abrupt("return");case 14:return ig.debug("post() error ".concat(r.t0)),i(r.t0),r.abrupt("return");case 17:ig.trace("response",f),o(f);case 19:case"end":return r.stop()}}),r,null,[[3,9]])})));return function(t,e,n){return r.apply(this,arguments)}}())}}var ug={},cg=u,sg=M,lg=dt("species"),fg=function(t){return sg>=51||!cg((function(){var e=[];return(e.constructor={})[lg]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},pg=jr,hg=E,dg=Yc,vg=$e,yg=Ne,gg=A,mg=nl,bg=dt,wg=fg("slice"),xg=bg("species"),Sg=[].slice,kg=Math.max;pg({target:"Array",proto:!0,forced:!wg},{slice:function(t,e){var r,n,o,i=gg(this),a=yg(i.length),u=vg(t,a),c=vg(void 0===e?a:e,a);if(dg(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!dg(r.prototype)?hg(r)&&null===(r=r[xg])&&(r=void 0):r=void 0,r===Array||void 0===r))return Sg.call(i,u,c);for(n=new(void 0===r?Array:r)(kg(c-u,0)),o=0;u<c;u++,o++)u in i&&mg(n,o,i[u]);return n.length=o,n}});var Ag=jr,Eg=E,Og=function(){var t=!1,e=/[ac]/;return e.exec=function(){return t=!0,/./.exec.apply(this,arguments)},!0===e.test("abc")&&t}(),jg=/./.test;Ag({target:"RegExp",proto:!0,forced:!Og},{test:function(t){if("function"!=typeof this.exec)return jg.call(this,t);var e=this.exec(t);if(null!==e&&!Eg(e))throw new Error("RegExp exec method returned something other than an Object or null");return!!e}});var Tg={},Lg=dt;Tg.f=Lg;var _g=i,Rg=et,Ig=Tg,Pg=Ut.f,Cg=function(t){var e=_g.Symbol||(_g.Symbol={});Rg(e,t)||Pg(e,t,{value:Ig.f(t)})},Dg=jr,Mg=i,Ug=T,Ng=c,Fg=F,qg=u,Bg=et,$g=Yc,Gg=E,Wg=$,zg=Ft,Vg=Z,Hg=A,Yg=St,Jg=Sl,Kg=v,Xg=fa,Zg=Ji,Qg=Ie,tm=hu,em=rr,rm=a,nm=Ut,om=s,im=Ht,am=Yt.exports,um=W.exports,cm=ce,sm=ot,lm=dt,fm=Tg,pm=Cg,hm=Nr,dm=ke,vm=us.forEach,ym=ue("hidden"),gm="Symbol",mm=lm("toPrimitive"),bm=dm.set,wm=dm.getterFor(gm),xm=Object.prototype,Sm=Mg.Symbol,km=Ug("JSON","stringify"),Am=rm.f,Em=nm.f,Om=tm.f,jm=om.f,Tm=um("symbols"),Lm=um("op-symbols"),_m=um("string-to-symbol-registry"),Rm=um("symbol-to-string-registry"),Im=um("wks"),Pm=Mg.QObject,Cm=!Pm||!Pm.prototype||!Pm.prototype.findChild,Dm=Ng&&qg((function(){return 7!=Xg(Em({},"a",{get:function(){return Em(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Am(xm,e);n&&delete xm[e],Em(t,e,r),n&&t!==xm&&Em(xm,e,n)}:Em,Mm=function(t,e){var r=Tm[t]=Xg(Sm.prototype);return bm(r,{type:gm,tag:t,description:e}),Ng||(r.description=e),r},Um=function(t,e,r){t===xm&&Um(Lm,e,r),zg(t);var n=Yg(e);return zg(r),Bg(Tm,n)?(r.enumerable?(Bg(t,ym)&&t[ym][n]&&(t[ym][n]=!1),r=Xg(r,{enumerable:Kg(0,!1)})):(Bg(t,ym)||Em(t,ym,Kg(1,{})),t[ym][n]=!0),Dm(t,n,r)):Em(t,n,r)},Nm=function(t,e){zg(t);var r=Hg(e),n=Zg(r).concat($m(r));return vm(n,(function(e){Ng&&!Fm.call(r,e)||Um(t,e,r[e])})),t},Fm=function(t){var e=Yg(t),r=jm.call(this,e);return!(this===xm&&Bg(Tm,e)&&!Bg(Lm,e))&&(!(r||!Bg(this,e)||!Bg(Tm,e)||Bg(this,ym)&&this[ym][e])||r)},qm=function(t,e){var r=Hg(t),n=Yg(e);if(r!==xm||!Bg(Tm,n)||Bg(Lm,n)){var o=Am(r,n);return!o||!Bg(Tm,n)||Bg(r,ym)&&r[ym][n]||(o.enumerable=!0),o}},Bm=function(t){var e=Om(Hg(t)),r=[];return vm(e,(function(t){Bg(Tm,t)||Bg(cm,t)||r.push(t)})),r},$m=function(t){var e=t===xm,r=Om(e?Lm:Hg(t)),n=[];return vm(r,(function(t){!Bg(Tm,t)||e&&!Bg(xm,t)||n.push(Tm[t])})),n};(Fg||(Sm=function(){if(this instanceof Sm)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Jg(arguments[0]):void 0,e=sm(t),r=function(t){this===xm&&r.call(Lm,t),Bg(this,ym)&&Bg(this[ym],e)&&(this[ym][e]=!1),Dm(this,e,Kg(1,t))};return Ng&&Cm&&Dm(xm,e,{configurable:!0,set:r}),Mm(e,t)},am(Sm.prototype,"toString",(function(){return wm(this).tag})),am(Sm,"withoutSetter",(function(t){return Mm(sm(t),t)})),om.f=Fm,nm.f=Um,rm.f=qm,Qg.f=tm.f=Bm,em.f=$m,fm.f=function(t){return Mm(lm(t),t)},Ng&&(Em(Sm.prototype,"description",{configurable:!0,get:function(){return wm(this).description}}),am(xm,"propertyIsEnumerable",Fm,{unsafe:!0}))),Dg({global:!0,wrap:!0,forced:!Fg,sham:!Fg},{Symbol:Sm}),vm(Zg(Im),(function(t){pm(t)})),Dg({target:gm,stat:!0,forced:!Fg},{for:function(t){var e=Jg(t);if(Bg(_m,e))return _m[e];var r=Sm(e);return _m[e]=r,Rm[r]=e,r},keyFor:function(t){if(!Wg(t))throw TypeError(t+" is not a symbol");if(Bg(Rm,t))return Rm[t]},useSetter:function(){Cm=!0},useSimple:function(){Cm=!1}}),Dg({target:"Object",stat:!0,forced:!Fg,sham:!Ng},{create:function(t,e){return void 0===e?Xg(t):Nm(Xg(t),e)},defineProperty:Um,defineProperties:Nm,getOwnPropertyDescriptor:qm}),Dg({target:"Object",stat:!0,forced:!Fg},{getOwnPropertyNames:Bm,getOwnPropertySymbols:$m}),Dg({target:"Object",stat:!0,forced:qg((function(){em.f(1)}))},{getOwnPropertySymbols:function(t){return em.f(Vg(t))}}),km)&&Dg({target:"JSON",stat:!0,forced:!Fg||qg((function(){var t=Sm();return"[null]"!=km([t])||"{}"!=km({a:t})||"{}"!=km(Object(t))}))},{stringify:function(t,e,r){for(var n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e,(Gg(e)||void 0!==t)&&!Wg(t))return $g(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Wg(e))return e}),o[1]=e,km.apply(null,o)}});Sm.prototype[mm]||im(Sm.prototype,mm,Sm.prototype.valueOf),hm(Sm,gm),cm[ym]=!0;var Gm=jr,Wm=c,zm=i,Vm=et,Hm=E,Ym=Ut.f,Jm=fr,Km=zm.Symbol;if(Wm&&"function"==typeof Km&&(!("description"in Km.prototype)||void 0!==Km().description)){var Xm={},Zm=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof Zm?new Km(t):void 0===t?Km():Km(t);return""===t&&(Xm[e]=!0),e};Jm(Zm,Km);var Qm=Zm.prototype=Km.prototype;Qm.constructor=Zm;var tb=Qm.toString,eb="Symbol(test)"==String(Km("test")),rb=/^Symbol\((.*)\)[^)]+$/;Ym(Qm,"description",{configurable:!0,get:function(){var t=Hm(this)?this.valueOf():this,e=tb.call(t);if(Vm(Xm,t))return"";var r=eb?e.slice(7,-1):e.replace(rb,"$1");return""===r?void 0:r}}),Gm({global:!0,forced:!0},{Symbol:Zm})}Cg("iterator");var nb=c,ob=Ut.f,ib=Function.prototype,ab=ib.toString,ub=/^\s*function ([^ (]*)/,cb="name";nb&&!(cb in ib)&&ob(ib,cb,{configurable:!0,get:function(){try{return ab.call(this).match(ub)[1]}catch(t){return""}}});var sb={exports:{}},lb={exports:{}};!function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports}(lb);var fb={exports:{}};!function(t){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}},t.exports.__esModule=!0,t.exports.default=t.exports}(fb);var pb={exports:{}},hb={exports:{}};!function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports}(hb),function(t){var e=hb.exports;t.exports=function(t,r){if(t){if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports}(pb);var db={exports:{}};!function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports}(db),function(t){var e=lb.exports,r=fb.exports,n=pb.exports,o=db.exports;t.exports=function(t,i){return e(t)||r(t,i)||n(t,i)||o()},t.exports.__esModule=!0,t.exports.default=t.exports}(sb);var vb=jr,yb=u,gb=Yc,mb=E,bb=Z,wb=Ne,xb=nl,Sb=Qc,kb=fg,Ab=M,Eb=dt("isConcatSpreadable"),Ob=9007199254740991,jb="Maximum allowed index exceeded",Tb=Ab>=51||!yb((function(){var t=[];return t[Eb]=!1,t.concat()[0]!==t})),Lb=kb("concat"),_b=function(t){if(!mb(t))return!1;var e=t[Eb];return void 0!==e?!!e:gb(t)};vb({target:"Array",proto:!0,forced:!Tb||!Lb},{concat:function(t){var e,r,n,o,i,a=bb(this),u=Sb(a,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(_b(i=-1===e?a:arguments[e])){if(c+(o=wb(i.length))>Ob)throw TypeError(jb);for(r=0;r<o;r++,c++)r in i&&xb(u,c,i[r])}else{if(c>=Ob)throw TypeError(jb);xb(u,c++,i)}return u.length=c,u}});var Rb={exports:{}},Ib={exports:{}};!function(t){var e=hb.exports;t.exports=function(t){if(Array.isArray(t))return e(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(Ib);var Pb={exports:{}};!function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(Pb);var Cb={exports:{}};!function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports}(Cb),function(t){var e=Ib.exports,r=Pb.exports,n=pb.exports,o=Cb.exports;t.exports=function(t){return e(t)||r(t)||n(t)||o()},t.exports.__esModule=!0,t.exports.default=t.exports}(Rb);var Db=He.includes,Mb=ba;jr({target:"Array",proto:!0},{includes:function(t){return Db(this,t,arguments.length>1?arguments[1]:void 0)}}),Mb("includes");var Ub=jr,Nb=A,Fb=[].join,qb=w!=Object,Bb=ss("join",",");Ub({target:"Array",proto:!0,forced:qb||!Bb},{join:function(t){return Fb.call(Nb(this),void 0===t?",":t)}});var $b=E,Gb=Math.floor;jr({target:"Number",stat:!0},{isInteger:function(t){return!$b(t)&&isFinite(t)&&Gb(t)===t}});var Wb=x,zb=Sl,Vb="[\t\n\v\f\r \u2028\u2029\ufeff]",Hb=RegExp("^"+Vb+Vb+"*"),Yb=RegExp(Vb+Vb+"*$"),Jb=function(t){return function(e){var r=zb(Wb(e));return 1&t&&(r=r.replace(Hb,"")),2&t&&(r=r.replace(Yb,"")),r}},Kb={start:Jb(1),end:Jb(2),trim:Jb(3)},Xb=c,Zb=i,Qb=br,tw=Yt.exports,ew=et,rw=g,nw=Du,ow=$,iw=bt,aw=u,uw=fa,cw=Ie.f,sw=a.f,lw=Ut.f,fw=Kb.trim,pw="Number",hw=Zb.Number,dw=hw.prototype,vw=rw(uw(dw))==pw,yw=function(t){if(ow(t))throw TypeError("Cannot convert a Symbol value to a number");var e,r,n,o,i,a,u,c,s=iw(t,"number");if("string"==typeof s&&s.length>2)if(43===(e=(s=fw(s)).charCodeAt(0))||45===e){if(88===(r=s.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(s.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=s.slice(2)).length,u=0;u<a;u++)if((c=i.charCodeAt(u))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(Qb(pw,!hw(" 0o1")||!hw("0b1")||hw("+0x1"))){for(var gw,mw=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof mw&&(vw?aw((function(){dw.valueOf.call(r)})):rw(r)!=pw)?nw(new hw(yw(e)),r,mw):yw(e)},bw=Xb?cw(hw):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),ww=0;bw.length>ww;ww++)ew(hw,gw=bw[ww])&&!ew(mw,gw)&&lw(mw,gw,sw(hw,gw));mw.prototype=dw,dw.constructor=mw,tw(Zb,pw,mw)}var xw=c,Sw=Ji,kw=A,Aw=s.f,Ew=function(t){return function(e){for(var r,n=kw(e),o=Sw(n),i=o.length,a=0,u=[];i>a;)r=o[a++],xw&&!Aw.call(n,r)||u.push(t?[r,n[r]]:n[r]);return u}},Ow={entries:Ew(!0),values:Ew(!1)}.entries;jr({target:"Object",stat:!0},{entries:function(t){return Ow(t)}}),
|
|
36
|
-
/*
|
|
37
|
-
@license
|
|
38
|
-
Copyright (c) 2021 Twilio Inc.
|
|
39
|
-
|
|
40
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
41
|
-
|
|
42
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
43
|
-
|
|
44
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
*/
|
|
48
|
-
Object.defineProperty(ug,"__esModule",{value:!0});var jw=sb.exports,Tw=Rb.exports,Lw=hy.exports,_w=py.exports,Rw=vy.exports,Iw=gy.exports,Pw=by.exports;function Cw(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var Dw=Cw(my.exports),Mw=Cw(jw),Uw=Cw(Tw),Nw=Cw(Lw),Fw=Cw(_w),qw=Cw(Rw),Bw=Cw(Iw),$w=Cw(Pw),Gw=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return{checks:e}};function Ww(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return zw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zw(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function zw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Vw=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Gw((function(t){var r,n=!1,o=[],i=Ww(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;"string"!=typeof a?(n=n||t instanceof a,o.push("an instance of ".concat(a.name))):(n=n||Dw.default(t)===a,o.push("of type ".concat(a)))}}catch(t){i.e(t)}finally{i.f()}return[n,o]}))};function Hw(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Yw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yw(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Yw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Jw(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=$w.default(t);if(e){var o=$w.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Bw.default(this,r)}}function Kw(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Xw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xw(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Xw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Zw=function(t,e){if(e.length>t.length)throw new Error("Expected at most ".concat(t.length," argument(s), but got ").concat(e.length));for(;e.length<t.length;)e.push(void 0);var r,n=Kw(e.entries());try{for(n.s();!(r=n.n()).done;){var o=Mw.default(r.value,2),i=o[0],a=o[1],u=rx(t[i],a),c=Mw.default(u,4),s=c[0],l=c[1],f=c[2],p=c[3];if(!s)throw new Error("Argument ".concat(i+1," is expected to be ").concat(f).concat(p," but got ").concat(l))}}catch(t){n.e(t)}finally{n.f()}},Qw=function(t){var e,r,n;(["undefined","boolean","number","bigint","string"].includes(Dw.default(t))&&(r="string"==typeof t?'"'.concat(t,'"'):"".concat(t)),"object"===Dw.default(t)&&"Object"!==(null==t||null===(e=t.constructor)||void 0===e?void 0:e.name))&&(r=null===t?"null":"instance of ".concat(null==t||null===(n=t.constructor)||void 0===n?void 0:n.name));return r||(r=Dw.default(t)),r},tx=function(t){var e,r=[],n=Kw(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r.push(ex(o))}}catch(t){n.e(t)}finally{n.f()}return r},ex=function(t){var e,r=[],n=Kw(Array.isArray(t)?t:[t]);try{for(n.s();!(e=n.n()).done;){var o=e.value;"string"!=typeof o&&"function"!=typeof o?r.push(o):r.push(Vw(o))}}catch(t){n.e(t)}finally{n.f()}return r},rx=function(t,e){var r,n,o=[],i=!1,a=Kw(t);try{for(a.s();!(n=a.n()).done;){var u,c=Kw(n.value.checks);try{for(c.s();!(u=c.n()).done;){var s=(0,u.value)(e),l=Mw.default(s,3),f=l[0],p=l[1],h=l[2];i=i||f,!r&&h&&(r=h),p&&(o=[].concat(Uw.default(o),"string"==typeof p?[p]:Uw.default(p)))}}catch(t){c.e(t)}finally{c.f()}}}catch(t){a.e(t)}finally{a.f()}if(i)return[!0];var d=r||Qw(e),v=o.length-1;return[!1,d,v>0?"".concat(o.slice(0,v).join(", ")," or ").concat(o[v]):o.join(", "),v>1?";":","]};function nx(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return ox(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ox(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function ox(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ix=Gw((function(t){return["string"==typeof t&&t.length>0,"a non-empty string"]})),ax=Gw((function(t){return["number"==typeof t&&Number.isInteger(t)&&t>=0,"a non-negative integer"]})),ux=Gw((function(t){return["object"===Dw.default(t)&&null!==t&&!Array.isArray(t),"a pure object (non-null and non-array)"]}));function cx(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return sx(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sx(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function sx(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}ug.array=function(t,e){return Gw((function(r){if(!Array.isArray(r))return[!1,"an array of ".concat(t)];var n,o=cx(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Mw.default(n.value,2),a=i[0],u=i[1],c=rx(ex(e),u),s=Mw.default(c,3),l=s[0],f=s[1],p=s[2];if(!l)return[!1,"a valid array of ".concat(t," (index ").concat(a," should be ").concat(p,")"),"malformed array of ".concat(t," (index ").concat(a," is ").concat(f,")")]}}catch(t){o.e(t)}finally{o.f()}return[!0]}))},ug.custom=Gw;var lx=ug.literal=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Gw((function(t){var r,n=!1,o=[],i=Hw(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;n=n||t===a,o.push("string"==typeof a?'"'.concat(a,'"'):"".concat(a))}}catch(t){i.e(t)}finally{i.f()}return[n,o]}))};ug.nonEmptyArray=function(t,e){return Gw((function(r){if(!Array.isArray(r)||r.length<1)return[!1,"a non-empty array of ".concat(t)];var n,o=nx(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Mw.default(n.value,2),a=i[0],u=i[1],c=rx(ex(e),u),s=Mw.default(c,3),l=s[0],f=s[1],p=s[2];if(!l)return[!1,"a valid non-empty array of ".concat(t," (index ").concat(a," should be ").concat(p,")"),"malformed array of ".concat(t," (index ").concat(a," is ").concat(f,")")]}}catch(t){o.e(t)}finally{o.f()}return[!0]}))};var fx=ug.nonEmptyString=ix;ug.nonNegativeInteger=ax,ug.objectSchema=function(t,e){return Gw((function(r){if("object"!==Dw.default(r)||null===r||Array.isArray(r))return[!1,"valid ".concat(t," (should be a pure object)")];for(var n=0,o=Object.entries(e);n<o.length;n++){var i=Mw.default(o[n],2),a=i[0],u=i[1],c=rx(ex(u),r[a]),s=Mw.default(c,3),l=s[0],f=s[1],p=s[2];if(!l)return[!1,"valid ".concat(t,' (key "').concat(a,'" should be ').concat(p,")"),"malformed ".concat(t,' (key "').concat(a,'" is ').concat(f,")")]}return[!0]}))};var px=ug.pureObject=ux;ug.runtimeTypeValidation=Zw,ug.stringifyReceivedType=Qw,ug.type=Vw;var hx,dx=ug.validateConstructorTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=tx(e);return function(t){return function(t){qw.default(r,t);var e=Jw(r);function r(){Fw.default(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return Zw(n,o),e.call.apply(e,[this].concat(o))}return Nw.default(r)}(t)}},vx=ug.validateTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=tx(e);return function(t,e,r){if("function"!=typeof r.value)throw new Error("The validateTypes decorator can only be applied to methods");var o=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Zw(n,e),o.apply(this,e)}}},yx=ug.validateTypesAsync=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=tx(e);return function(t,e,r){if("function"!=typeof r.value)throw new Error("The validateTypesAsync decorator can only be applied to methods");var o=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];try{Zw(n,e)}catch(t){return Promise.reject(t)}return o.apply(this,e)}}},gx=bl.scope("");return t.default=(hx=class{constructor(t,e,r){var n,o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.options=i,this.options.logLevel=null!==(n=this.options.logLevel)&&void 0!==n?n:"silent",this.config=new ql(t,e,r,this.options),gx.setLevel(this.options.logLevel),this.options.transport=null!==(o=this.options.transport)&&void 0!==o?o:new Dp,this.transport=this.options.transport,this.network=new ag(this.config,this.transport)}updateToken(t){gx.info("updateToken"),this.config.updateToken(t)}get(t){var e=this;return new Wc(function(){var r=Vc(Js.mark((function r(n,o,i){var a,u;return Js.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=e.network.get("".concat(e.config.mediaUrl,"/").concat(t)),i((()=>a.cancel())),r.prev=2,r.next=5,a;case 5:u=r.sent,n(new Bl(e.config,e.network,u.body)),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),o(r.t0);case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(t,e,n){return r.apply(this,arguments)}}())}post(t,e,r,n){var o=this;return new Wc(function(){var i=Vc(Js.mark((function i(a,u,c){var s,l;return Js.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=o.network.post(o.config.mediaUrl,null!=r?r:"media",e,t,n),c((()=>s.cancel())),i.prev=2,i.next=5,s;case 5:l=i.sent,a(new Bl(o.config,o.network,l.body)),i.next=12;break;case 9:i.prev=9,i.t0=i.catch(2),u(i.t0);case 12:case"end":return i.stop()}}),i,null,[[2,9]])})));return function(t,e,r){return i.apply(this,arguments)}}())}postFormData(t,e){var r=this;return new Wc(function(){var n=Vc(Js.mark((function n(o,i,a){var u,c;return Js.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.network.post(r.config.mediaUrl,null!=e?e:"media",t),a((()=>u.cancel())),n.prev=2,n.next=5,u;case 5:c=n.sent,o(new Bl(r.config,r.network,c.body)),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),i(n.t0);case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(t,e,r){return n.apply(this,arguments)}}())}mediaSetGet(t){var e=this;return new Wc(function(){var r=Vc(Js.mark((function r(n,o,i){var a,u,c,s;return Js.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={command:"get",list:t.map((t=>({media_sid:t})))},u=e.network.post("".concat(e.config.mediaSetUrl),null,a,"application/json"),i((()=>u.cancel())),r.prev=3,r.next=6,u;case 6:c=r.sent,s=c.body.map((t=>{if(200===t.code)return new Bl(e.config,e.network,t.media_record);o("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"))})),n(s),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(3),o(r.t0);case 14:case"end":return r.stop()}}),r,null,[[3,11]])})));return function(t,e,n){return r.apply(this,arguments)}}())}mediaSetGetContentUrls(t){var e=this;return new Wc(function(){var r=Vc(Js.mark((function r(n,o,i){var a,u,c,s;return Js.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={command:"get",list:t.map((t=>({media_sid:t})))},u=e.network.post("".concat(e.config.mediaSetUrl),null,a,"application/json"),i((()=>u.cancel())),r.prev=3,r.next=6,u;case 6:c=r.sent,s=new Map,c.body.forEach((t=>{200===t.code?s.set(t.media_record.sid,t.media_record.links.content_direct_temporary):o("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"))})),n(s),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(3),o(r.t0);case 15:case"end":return r.stop()}}),r,null,[[3,12]])})));return function(t,e,n){return r.apply(this,arguments)}}())}},r(hx,"version","0.6.4-rc.1"),hx),Ks([vx(fx),Xs("design:type",Function),Xs("design:paramtypes",[String]),Xs("design:returntype",void 0)],t.default.prototype,"updateToken",null),Ks([yx(fx),Xs("design:type",Function),Xs("design:paramtypes",[String]),Xs("design:returntype",Wc)],t.default.prototype,"get",null),t.default=Ks([dx(fx,fx,[fx,lx(null)],[px,"undefined"]),Xs("design:paramtypes",[String,String,Object,Object])],t.default),t.CancellablePromise=Wc,t.Client=t.default,t.McsClient=t.default,t.McsMedia=Bl,t.Media=Bl,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
|
|
18
|
+
this.Twilio=this.Twilio||{},this.Twilio.McsClient=function(t){"use strict";var e=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},o=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r&&r)||function(){return this}()||Function("return this")(),i={},a=function(t){try{return!!t()}catch(t){return!0}},u=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={},s={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,l=f&&!s.call({1:2},1);c.f=l?function(t){var e=f(this,t);return!!e&&e.enumerable}:s;var p,h,d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v={}.toString,y=function(t){return v.call(t).slice(8,-1)},g=y,m="".split,b=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==g(t)?m.call(t,""):Object(t)}:Object,w=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},x=b,k=w,S=function(t){return x(k(t))},O=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=o,E=function(t){return"function"==typeof t?t:void 0},j=function(t,e){return arguments.length<2?E(A[t]):A[t]&&A[t][e]},T=j("navigator","userAgent")||"",_=o,L=T,R=_.process,I=_.Deno,P=R&&R.versions||I&&I.version,C=P&&P.v8;C?h=(p=C.split("."))[0]<4?1:p[0]+p[1]:L&&(!(p=L.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=L.match(/Chrome\/(\d+)/))&&(h=p[1]);var D=h&&+h,M=D,U=a,N=!!Object.getOwnPropertySymbols&&!U((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&M&&M<41})),F=N&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=j,q=F?function(t){return"symbol"==typeof t}:function(t){var e=B("Symbol");return"function"==typeof e&&Object(t)instanceof e},$=O,G={exports:{}},W=o,z=function(t,e){try{Object.defineProperty(W,t,{value:e,configurable:!0,writable:!0})}catch(r){W[t]=e}return e},V=z,H="__core-js_shared__",Y=o[H]||V(H,{}),J=Y;(G.exports=function(t,e){return J[t]||(J[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var K=w,X=function(t){return Object(K(t))},Z=X,Q={}.hasOwnProperty,tt=Object.hasOwn||function(t,e){return Q.call(Z(t),e)},et=0,rt=Math.random(),nt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++et+rt).toString(36)},ot=o,it=G.exports,at=tt,ut=nt,ct=N,st=F,ft=it("wks"),lt=ot.Symbol,pt=st?lt:lt&<.withoutSetter||ut,ht=function(t){return at(ft,t)&&(ct||"string"==typeof ft[t])||(ct&&at(lt,t)?ft[t]=lt[t]:ft[t]=pt("Symbol."+t)),ft[t]},dt=O,vt=q,yt=function(t,e){var r,n;if("string"===e&&"function"==typeof(r=t.toString)&&!$(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!$(n=r.call(t)))return n;if("string"!==e&&"function"==typeof(r=t.toString)&&!$(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},gt=ht("toPrimitive"),mt=function(t,e){if(!dt(t)||vt(t))return t;var r,n=t[gt];if(void 0!==n){if(void 0===e&&(e="default"),r=n.call(t,e),!dt(r)||vt(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),yt(t,e)},bt=mt,wt=q,xt=function(t){var e=bt(t,"string");return wt(e)?e:String(e)},kt=O,St=o.document,Ot=kt(St)&&kt(St.createElement),At=function(t){return Ot?St.createElement(t):{}},Et=At,jt=!u&&!a((function(){return 7!=Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a})),Tt=u,_t=c,Lt=d,Rt=S,It=xt,Pt=tt,Ct=jt,Dt=Object.getOwnPropertyDescriptor;i.f=Tt?Dt:function(t,e){if(t=Rt(t),e=It(e),Ct)try{return Dt(t,e)}catch(t){}if(Pt(t,e))return Lt(!_t.f.call(t,e),t[e])};var Mt={},Ut=O,Nt=function(t){if(!Ut(t))throw TypeError(String(t)+" is not an object");return t},Ft=u,Bt=jt,qt=Nt,$t=xt,Gt=Object.defineProperty;Mt.f=Ft?Gt:function(t,e,r){if(qt(t),e=$t(e),qt(r),Bt)try{return Gt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var Wt=Mt,zt=d,Vt=u?function(t,e,r){return Wt.f(t,e,zt(1,r))}:function(t,e,r){return t[e]=r,t},Ht={exports:{}},Yt=Y,Jt=Function.toString;"function"!=typeof Yt.inspectSource&&(Yt.inspectSource=function(t){return Jt.call(t)});var Kt,Xt,Zt,Qt=Yt.inspectSource,te=Qt,ee=o.WeakMap,re="function"==typeof ee&&/native code/.test(te(ee)),ne=G.exports,oe=nt,ie=ne("keys"),ae=function(t){return ie[t]||(ie[t]=oe(t))},ue={},ce=re,se=O,fe=Vt,le=tt,pe=Y,he=ae,de=ue,ve="Object already initialized",ye=o.WeakMap;if(ce||pe.state){var ge=pe.state||(pe.state=new ye),me=ge.get,be=ge.has,we=ge.set;Kt=function(t,e){if(be.call(ge,t))throw new TypeError(ve);return e.facade=t,we.call(ge,t,e),e},Xt=function(t){return me.call(ge,t)||{}},Zt=function(t){return be.call(ge,t)}}else{var xe=he("state");de[xe]=!0,Kt=function(t,e){if(le(t,xe))throw new TypeError(ve);return e.facade=t,fe(t,xe,e),e},Xt=function(t){return le(t,xe)?t[xe]:{}},Zt=function(t){return le(t,xe)}}var ke={set:Kt,get:Xt,has:Zt,enforce:function(t){return Zt(t)?Xt(t):Kt(t,{})},getterFor:function(t){return function(e){var r;if(!se(e)||(r=Xt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},Se=o,Oe=Vt,Ae=tt,Ee=z,je=Qt,Te=ke.get,_e=ke.enforce,Le=String(String).split("String");(Ht.exports=function(t,e,r,n){var o,i=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof r&&("string"!=typeof e||Ae(r,"name")||Oe(r,"name",e),(o=_e(r)).source||(o.source=Le.join("string"==typeof e?e:""))),t!==Se?(i?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=r:Oe(t,e,r)):a?t[e]=r:Ee(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Te(this).source||je(this)}));var Re={},Ie=Math.ceil,Pe=Math.floor,Ce=function(t){return isNaN(t=+t)?0:(t>0?Pe:Ie)(t)},De=Ce,Me=Math.min,Ue=function(t){return t>0?Me(De(t),9007199254740991):0},Ne=Ce,Fe=Math.max,Be=Math.min,qe=function(t,e){var r=Ne(t);return r<0?Fe(r+e,0):Be(r,e)},$e=S,Ge=Ue,We=qe,ze=function(t){return function(e,r,n){var o,i=$e(e),a=Ge(i.length),u=We(n,a);if(t&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},Ve={includes:ze(!0),indexOf:ze(!1)},He=tt,Ye=S,Je=Ve.indexOf,Ke=ue,Xe=function(t,e){var r,n=Ye(t),o=0,i=[];for(r in n)!He(Ke,r)&&He(n,r)&&i.push(r);for(;e.length>o;)He(n,r=e[o++])&&(~Je(i,r)||i.push(r));return i},Ze=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Qe=Xe,tr=Ze.concat("length","prototype");Re.f=Object.getOwnPropertyNames||function(t){return Qe(t,tr)};var er={};er.f=Object.getOwnPropertySymbols;var rr=Re,nr=er,or=Nt,ir=j("Reflect","ownKeys")||function(t){var e=rr.f(or(t)),r=nr.f;return r?e.concat(r(t)):e},ar=tt,ur=ir,cr=i,sr=Mt,fr=function(t,e){for(var r=ur(e),n=sr.f,o=cr.f,i=0;i<r.length;i++){var a=r[i];ar(t,a)||n(t,a,o(e,a))}},lr=a,pr=/#|\.prototype\./,hr=function(t,e){var r=vr[dr(t)];return r==gr||r!=yr&&("function"==typeof e?lr(e):!!e)},dr=hr.normalize=function(t){return String(t).replace(pr,".").toLowerCase()},vr=hr.data={},yr=hr.NATIVE="N",gr=hr.POLYFILL="P",mr=hr,br=o,wr=i.f,xr=Vt,kr=Ht.exports,Sr=z,Or=fr,Ar=mr,Er=function(t,e){var r,n,o,i,a,u=t.target,c=t.global,s=t.stat;if(r=c?br:s?br[u]||Sr(u,{}):(br[u]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(a=wr(r,n))&&a.value:r[n],!Ar(c?n:u+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Or(i,o)}(t.sham||o&&o.sham)&&xr(i,"sham",!0),kr(r,n,i,t)}},jr=Mt.f,Tr=tt,_r=ht("toStringTag"),Lr=function(t,e,r){t&&!Tr(t=r?t:t.prototype,_r)&&jr(t,_r,{configurable:!0,value:e})},Rr=o,Ir=Lr;Er({global:!0},{Reflect:{}}),Ir(Rr.Reflect,"Reflect",!0);var Pr,Cr=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Dr=Xe,Mr=Ze,Ur=Object.keys||function(t){return Dr(t,Mr)},Nr=Mt,Fr=Nt,Br=Ur,qr=u?Object.defineProperties:function(t,e){Fr(t);for(var r,n=Br(e),o=n.length,i=0;o>i;)Nr.f(t,r=n[i++],e[r]);return t},$r=j("document","documentElement"),Gr=Nt,Wr=qr,zr=Ze,Vr=ue,Hr=$r,Yr=At,Jr=ae("IE_PROTO"),Kr=function(){},Xr=function(t){return"<script>"+t+"</"+"script>"},Zr=function(t){t.write(Xr("")),t.close();var e=t.parentWindow.Object;return t=null,e},Qr=function(){try{Pr=new ActiveXObject("htmlfile")}catch(t){}var t,e;Qr="undefined"!=typeof document?document.domain&&Pr?Zr(Pr):((e=Yr("iframe")).style.display="none",Hr.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Xr("document.F=Object")),t.close(),t.F):Zr(Pr);for(var r=zr.length;r--;)delete Qr.prototype[zr[r]];return Qr()};Vr[Jr]=!0;var tn=Object.create||function(t,e){var r;return null!==t?(Kr.prototype=Gr(t),r=new Kr,Kr.prototype=null,r[Jr]=t):r=Qr(),void 0===e?r:Wr(r,e)},en=Cr,rn=O,nn=[].slice,on={},an=function(t,e,r){if(!(e in on)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";on[e]=Function("C,a","return new C("+n.join(",")+")")}return on[e](t,r)},un=Function.bind||function(t){var e=en(this),r=nn.call(arguments,1),n=function(){var o=r.concat(nn.call(arguments));return this instanceof n?an(e,o.length,o):e.apply(t,o)};return rn(e.prototype)&&(n.prototype=e.prototype),n},cn=Er,sn=Cr,fn=Nt,ln=O,pn=tn,hn=un,dn=a,vn=j("Reflect","construct"),yn=dn((function(){function t(){}return!(vn((function(){}),[],t)instanceof t)})),gn=!dn((function(){vn((function(){}))})),mn=yn||gn;function bn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xn(t,e,r){return e&&wn(t.prototype,e),r&&wn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function kn(t,e){return kn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},kn(t,e)}function Sn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kn(t,e)}function On(t){return On="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},On(t)}function An(t,e){if(e&&("object"===On(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function En(t){return En=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},En(t)}function jn(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Tn(t,e,r){return Tn=jn()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&kn(o,r.prototype),o},Tn.apply(null,arguments)}function _n(t){var e="function"==typeof Map?new Map:void 0;return _n=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Tn(t,arguments,En(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),kn(n,t)},_n(t)}function Ln(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}cn({target:"Reflect",stat:!0,forced:mn,sham:mn},{construct:function(t,e){sn(t),fn(e);var r=arguments.length<3?t:sn(arguments[2]);if(gn&&!yn)return vn(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(hn.apply(t,n))}var o=r.prototype,i=pn(ln(o)?o:Object.prototype),a=Function.apply.call(t,i,e);return ln(a)?a:i}});var Rn={};Rn[ht("toStringTag")]="z";var In="[object z]"===String(Rn),Pn=In,Cn=y,Dn=ht("toStringTag"),Mn="Arguments"==Cn(function(){return arguments}()),Un=Pn?Cn:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Dn))?r:Mn?Cn(e):"Object"==(n=Cn(e))&&"function"==typeof e.callee?"Arguments":n},Nn=Un,Fn=In?{}.toString:function(){return"[object "+Nn(this)+"]"},Bn=In,qn=Ht.exports,$n=Fn;Bn||qn(Object.prototype,"toString",$n,{unsafe:!0});var Gn=o.Promise,Wn=Ht.exports,zn=function(t,e,r){for(var n in e)Wn(t,n,e[n],r);return t},Vn=O,Hn=Nt,Yn=function(t){if(!Vn(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},Jn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Hn(r),Yn(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Kn=j,Xn=Mt,Zn=u,Qn=ht("species"),to=function(t){var e=Kn(t),r=Xn.f;Zn&&e&&!e[Qn]&&r(e,Qn,{configurable:!0,get:function(){return this}})},eo=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},ro={},no=ro,oo=ht("iterator"),io=Array.prototype,ao=function(t){return void 0!==t&&(no.Array===t||io[oo]===t)},uo=Cr,co=function(t,e,r){if(uo(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},so=Un,fo=ro,lo=ht("iterator"),po=function(t){if(null!=t)return t[lo]||t["@@iterator"]||fo[so(t)]},ho=Nt,vo=po,yo=function(t,e){var r=arguments.length<2?vo(t):e;if("function"!=typeof r)throw TypeError(String(t)+" is not iterable");return ho(r.call(t))},go=Nt,mo=function(t,e,r){var n,o;go(t);try{if(void 0===(n=t.return)){if("throw"===e)throw r;return r}n=n.call(t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return go(n),r},bo=Nt,wo=ao,xo=Ue,ko=co,So=yo,Oo=po,Ao=mo,Eo=function(t,e){this.stopped=t,this.result=e},jo=function(t,e,r){var n,o,i,a,u,c,s,f=r&&r.that,l=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),d=ko(e,f,1+l+h),v=function(t){return n&&Ao(n,"normal",t),new Eo(!0,t)},y=function(t){return l?(bo(t),h?d(t[0],t[1],v):d(t[0],t[1])):h?d(t,v):d(t)};if(p)n=t;else{if("function"!=typeof(o=Oo(t)))throw TypeError("Target is not iterable");if(wo(o)){for(i=0,a=xo(t.length);a>i;i++)if((u=y(t[i]))&&u instanceof Eo)return u;return new Eo(!1)}n=So(t,o)}for(c=n.next;!(s=c.call(n)).done;){try{u=y(s.value)}catch(t){Ao(n,"throw",t)}if("object"==typeof u&&u&&u instanceof Eo)return u}return new Eo(!1)},To=ht("iterator"),_o=!1;try{var Lo=0,Ro={next:function(){return{done:!!Lo++}},return:function(){_o=!0}};Ro[To]=function(){return this},Array.from(Ro,(function(){throw 2}))}catch(t){}var Io,Po,Co,Do,Mo=function(t,e){if(!e&&!_o)return!1;var r=!1;try{var n={};n[To]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Uo=Nt,No=Cr,Fo=ht("species"),Bo=function(t,e){var r,n=Uo(t).constructor;return void 0===n||null==(r=Uo(n)[Fo])?e:No(r)},qo=/(?:ipad|iphone|ipod).*applewebkit/i.test(T),$o="process"==y(o.process),Go=o,Wo=a,zo=co,Vo=$r,Ho=At,Yo=qo,Jo=$o,Ko=Go.setImmediate,Xo=Go.clearImmediate,Zo=Go.process,Qo=Go.MessageChannel,ti=Go.Dispatch,ei=0,ri={},ni="onreadystatechange";try{Io=Go.location}catch(t){}var oi=function(t){if(ri.hasOwnProperty(t)){var e=ri[t];delete ri[t],e()}},ii=function(t){return function(){oi(t)}},ai=function(t){oi(t.data)},ui=function(t){Go.postMessage(String(t),Io.protocol+"//"+Io.host)};Ko&&Xo||(Ko=function(t){for(var e=[],r=arguments.length,n=1;r>n;)e.push(arguments[n++]);return ri[++ei]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Po(ei),ei},Xo=function(t){delete ri[t]},Jo?Po=function(t){Zo.nextTick(ii(t))}:ti&&ti.now?Po=function(t){ti.now(ii(t))}:Qo&&!Yo?(Do=(Co=new Qo).port2,Co.port1.onmessage=ai,Po=zo(Do.postMessage,Do,1)):Go.addEventListener&&"function"==typeof postMessage&&!Go.importScripts&&Io&&"file:"!==Io.protocol&&!Wo(ui)?(Po=ui,Go.addEventListener("message",ai,!1)):Po=ni in Ho("script")?function(t){Vo.appendChild(Ho("script")).onreadystatechange=function(){Vo.removeChild(this),oi(t)}}:function(t){setTimeout(ii(t),0)});var ci,si,fi,li,pi,hi,di,vi,yi={set:Ko,clear:Xo},gi=o,mi=/ipad|iphone|ipod/i.test(T)&&void 0!==gi.Pebble,bi=/web0s(?!.*chrome)/i.test(T),wi=o,xi=i.f,ki=yi.set,Si=qo,Oi=mi,Ai=bi,Ei=$o,ji=wi.MutationObserver||wi.WebKitMutationObserver,Ti=wi.document,_i=wi.process,Li=wi.Promise,Ri=xi(wi,"queueMicrotask"),Ii=Ri&&Ri.value;Ii||(ci=function(){var t,e;for(Ei&&(t=_i.domain)&&t.exit();si;){e=si.fn,si=si.next;try{e()}catch(t){throw si?li():fi=void 0,t}}fi=void 0,t&&t.enter()},Si||Ei||Ai||!ji||!Ti?!Oi&&Li&&Li.resolve?((di=Li.resolve(void 0)).constructor=Li,vi=di.then,li=function(){vi.call(di,ci)}):li=Ei?function(){_i.nextTick(ci)}:function(){ki.call(wi,ci)}:(pi=!0,hi=Ti.createTextNode(""),new ji(ci).observe(hi,{characterData:!0}),li=function(){hi.data=pi=!pi}));var Pi=Ii||function(t){var e={fn:t,next:void 0};fi&&(fi.next=e),si||(si=e,li()),fi=e},Ci={},Di=Cr,Mi=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=Di(e),this.reject=Di(r)};Ci.f=function(t){return new Mi(t)};var Ui,Ni,Fi,Bi,qi=Nt,$i=O,Gi=Ci,Wi=o,zi="object"==typeof window,Vi=Er,Hi=o,Yi=j,Ji=Gn,Ki=Ht.exports,Xi=zn,Zi=Jn,Qi=Lr,ta=to,ea=O,ra=Cr,na=eo,oa=Qt,ia=jo,aa=Mo,ua=Bo,ca=yi.set,sa=Pi,fa=function(t,e){if(qi(t),$i(e)&&e.constructor===t)return e;var r=Gi.f(t);return(0,r.resolve)(e),r.promise},la=function(t,e){var r=Wi.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))},pa=Ci,ha=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},da=ke,va=mr,ya=zi,ga=$o,ma=D,ba=ht("species"),wa="Promise",xa=da.get,ka=da.set,Sa=da.getterFor(wa),Oa=Ji&&Ji.prototype,Aa=Ji,Ea=Oa,ja=Hi.TypeError,Ta=Hi.document,_a=Hi.process,La=pa.f,Ra=La,Ia=!!(Ta&&Ta.createEvent&&Hi.dispatchEvent),Pa="function"==typeof PromiseRejectionEvent,Ca="unhandledrejection",Da=!1,Ma=va(wa,(function(){var t=oa(Aa),e=t!==String(Aa);if(!e&&66===ma)return!0;if(ma>=51&&/native code/.test(t))return!1;var r=new Aa((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[ba]=n,!(Da=r.then((function(){}))instanceof n)||!e&&ya&&!Pa})),Ua=Ma||!aa((function(t){Aa.all(t).catch((function(){}))})),Na=function(t){var e;return!(!ea(t)||"function"!=typeof(e=t.then))&&e},Fa=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;sa((function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var a,u,c,s=r[i++],f=o?s.ok:s.fail,l=s.resolve,p=s.reject,h=s.domain;try{f?(o||(2===t.rejection&&Ga(t),t.rejection=1),!0===f?a=n:(h&&h.enter(),a=f(n),h&&(h.exit(),c=!0)),a===s.promise?p(ja("Promise-chain cycle")):(u=Na(a))?u.call(a,l,p):l(a)):p(n)}catch(t){h&&!c&&h.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&qa(t)}))}},Ba=function(t,e,r){var n,o;Ia?((n=Ta.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),Hi.dispatchEvent(n)):n={promise:e,reason:r},!Pa&&(o=Hi["on"+t])?o(n):t===Ca&&la("Unhandled promise rejection",r)},qa=function(t){ca.call(Hi,(function(){var e,r=t.facade,n=t.value;if($a(t)&&(e=ha((function(){ga?_a.emit("unhandledRejection",n,r):Ba(Ca,r,n)})),t.rejection=ga||$a(t)?2:1,e.error))throw e.value}))},$a=function(t){return 1!==t.rejection&&!t.parent},Ga=function(t){ca.call(Hi,(function(){var e=t.facade;ga?_a.emit("rejectionHandled",e):Ba("rejectionhandled",e,t.value)}))},Wa=function(t,e,r){return function(n){t(e,n,r)}},za=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Fa(t,!0))},Va=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw ja("Promise can't be resolved itself");var n=Na(e);n?sa((function(){var r={done:!1};try{n.call(e,Wa(Va,r,t),Wa(za,r,t))}catch(e){za(r,e,t)}})):(t.value=e,t.state=1,Fa(t,!1))}catch(e){za({done:!1},e,t)}}};if(Ma&&(Ea=(Aa=function(t){na(this,Aa,wa),ra(t),Ui.call(this);var e=xa(this);try{t(Wa(Va,e),Wa(za,e))}catch(t){za(e,t)}}).prototype,(Ui=function(t){ka(this,{type:wa,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Xi(Ea,{then:function(t,e){var r=Sa(this),n=La(ua(this,Aa));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=ga?_a.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&Fa(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Ni=function(){var t=new Ui,e=xa(t);this.promise=t,this.resolve=Wa(Va,e),this.reject=Wa(za,e)},pa.f=La=function(t){return t===Aa||t===Fi?new Ni(t):Ra(t)},"function"==typeof Ji&&Oa!==Object.prototype)){Bi=Oa.then,Da||(Ki(Oa,"then",(function(t,e){var r=this;return new Aa((function(t,e){Bi.call(r,t,e)})).then(t,e)}),{unsafe:!0}),Ki(Oa,"catch",Ea.catch,{unsafe:!0}));try{delete Oa.constructor}catch(t){}Zi&&Zi(Oa,Ea)}Vi({global:!0,wrap:!0,forced:Ma},{Promise:Aa}),Qi(Aa,wa,!1),ta(wa),Fi=Yi(wa),Vi({target:wa,stat:!0,forced:Ma},{reject:function(t){var e=La(this);return e.reject.call(void 0,t),e.promise}}),Vi({target:wa,stat:!0,forced:Ma},{resolve:function(t){return fa(this,t)}}),Vi({target:wa,stat:!0,forced:Ua},{all:function(t){var e=this,r=La(e),n=r.resolve,o=r.reject,i=ha((function(){var r=ra(e.resolve),i=[],a=0,u=1;ia(t,(function(t){var c=a++,s=!1;i.push(void 0),u++,r.call(e,t).then((function(t){s||(s=!0,i[c]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=La(e),n=r.reject,o=ha((function(){var o=ra(e.resolve);ia(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var Ha=tn,Ya=Mt,Ja=ht("unscopables"),Ka=Array.prototype;null==Ka[Ja]&&Ya.f(Ka,Ja,{configurable:!0,value:Ha(null)});var Xa,Za,Qa,tu=function(t){Ka[Ja][t]=!0},eu=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ru=tt,nu=X,ou=eu,iu=ae("IE_PROTO"),au=Object.prototype,uu=ou?Object.getPrototypeOf:function(t){return t=nu(t),ru(t,iu)?t[iu]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?au:null},cu=a,su=uu,fu=Vt,lu=ht("iterator"),pu=!1;[].keys&&("next"in(Qa=[].keys())?(Za=su(su(Qa)))!==Object.prototype&&(Xa=Za):pu=!0);var hu=null==Xa||cu((function(){var t={};return Xa[lu].call(t)!==t}));hu&&(Xa={}),"function"!=typeof Xa[lu]&&fu(Xa,lu,(function(){return this}));var du={IteratorPrototype:Xa,BUGGY_SAFARI_ITERATORS:pu},vu=du.IteratorPrototype,yu=tn,gu=d,mu=Lr,bu=ro,wu=function(){return this},xu=function(t,e,r){var n=e+" Iterator";return t.prototype=yu(vu,{next:gu(1,r)}),mu(t,n,!1),bu[n]=wu,t},ku=Er,Su=xu,Ou=uu,Au=Jn,Eu=Lr,ju=Vt,Tu=Ht.exports,_u=ro,Lu=du.IteratorPrototype,Ru=du.BUGGY_SAFARI_ITERATORS,Iu=ht("iterator"),Pu="keys",Cu="values",Du="entries",Mu=function(){return this},Uu=function(t,e,r,n,o,i,a){Su(r,e,n);var u,c,s,f=function(t){if(t===o&&v)return v;if(!Ru&&t in h)return h[t];switch(t){case Pu:case Cu:case Du:return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",p=!1,h=t.prototype,d=h[Iu]||h["@@iterator"]||o&&h[o],v=!Ru&&d||f(o),y="Array"==e&&h.entries||d;if(y&&(u=Ou(y.call(new t)))!==Object.prototype&&u.next&&(Ou(u)!==Lu&&(Au?Au(u,Lu):"function"!=typeof u[Iu]&&ju(u,Iu,Mu)),Eu(u,l,!0)),o==Cu&&d&&d.name!==Cu&&(p=!0,v=function(){return d.call(this)}),h[Iu]!==v&&ju(h,Iu,v),_u[e]=v,o)if(c={values:f(Cu),keys:i?v:f(Pu),entries:f(Du)},a)for(s in c)(Ru||p||!(s in h))&&Tu(h,s,c[s]);else ku({target:e,proto:!0,forced:Ru||p},c);return c},Nu=S,Fu=tu,Bu=ro,qu=ke,$u=Uu,Gu="Array Iterator",Wu=qu.set,zu=qu.getterFor(Gu),Vu=$u(Array,"Array",(function(t,e){Wu(this,{type:Gu,target:Nu(t),index:0,kind:e})}),(function(){var t=zu(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");Bu.Arguments=Bu.Array,Fu("keys"),Fu("values"),Fu("entries");var Hu={exports:{}},Yu={},Ju=S,Ku=Re.f,Xu={}.toString,Zu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Yu.f=function(t){return Zu&&"[object Window]"==Xu.call(t)?function(t){try{return Ku(t)}catch(t){return Zu.slice()}}(t):Ku(Ju(t))};var Qu=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),tc=Er,ec=ue,rc=O,nc=tt,oc=Mt.f,ic=Re,ac=Yu,uc=Qu,cc=!1,sc=nt("meta"),fc=0,lc=Object.isExtensible||function(){return!0},pc=function(t){oc(t,sc,{value:{objectID:"O"+fc++,weakData:{}}})},hc=Hu.exports={enable:function(){hc.enable=function(){},cc=!0;var t=ic.f,e=[].splice,r={};r[sc]=1,t(r).length&&(ic.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===sc){e.call(n,o,1);break}return n},tc({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ac.f}))},fastKey:function(t,e){if(!rc(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!nc(t,sc)){if(!lc(t))return"F";if(!e)return"E";pc(t)}return t[sc].objectID},getWeakData:function(t,e){if(!nc(t,sc)){if(!lc(t))return!0;if(!e)return!1;pc(t)}return t[sc].weakData},onFreeze:function(t){return uc&&cc&&lc(t)&&!nc(t,sc)&&pc(t),t}};ec[sc]=!0;var dc=O,vc=Jn,yc=function(t,e,r){var n,o;return vc&&"function"==typeof(n=e.constructor)&&n!==r&&dc(o=n.prototype)&&o!==r.prototype&&vc(t,o),t},gc=Er,mc=o,bc=mr,wc=Ht.exports,xc=Hu.exports,kc=jo,Sc=eo,Oc=O,Ac=a,Ec=Mo,jc=Lr,Tc=yc,_c=Mt.f,Lc=tn,Rc=zn,Ic=co,Pc=eo,Cc=jo,Dc=Uu,Mc=to,Uc=u,Nc=Hu.exports.fastKey,Fc=ke.set,Bc=ke.getterFor,qc={getConstructor:function(t,e,r,n){var o=t((function(t,i){Pc(t,o,e),Fc(t,{type:e,index:Lc(null),first:void 0,last:void 0,size:0}),Uc||(t.size=0),null!=i&&Cc(i,t[n],{that:t,AS_ENTRIES:r})})),i=Bc(e),a=function(t,e,r){var n,o,a=i(t),c=u(t,e);return c?c.value=r:(a.last=c={index:o=Nc(e,!0),key:e,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=c),n&&(n.next=c),Uc?a.size++:t.size++,"F"!==o&&(a.index[o]=c)),t},u=function(t,e){var r,n=i(t),o=Nc(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return Rc(o.prototype,{clear:function(){for(var t=i(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,Uc?t.size=0:this.size=0},delete:function(t){var e=this,r=i(e),n=u(e,t);if(n){var o=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=o),o&&(o.previous=a),r.first==n&&(r.first=o),r.last==n&&(r.last=a),Uc?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=i(this),n=Ic(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),Rc(o.prototype,r?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),Uc&&_c(o.prototype,"size",{get:function(){return i(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=Bc(e),i=Bc(n);Dc(t,e,(function(t,e){Fc(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),Mc(e)}},$c=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",a=mc[t],u=a&&a.prototype,c=a,s={},f=function(t){var e=u[t];wc(u,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!Oc(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return o&&!Oc(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!Oc(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(bc(t,"function"!=typeof a||!(o||u.forEach&&!Ac((function(){(new a).entries().next()})))))c=r.getConstructor(e,t,n,i),xc.enable();else if(bc(t,!0)){var l=new c,p=l[i](o?{}:-0,1)!=l,h=Ac((function(){l.has(1)})),d=Ec((function(t){new a(t)})),v=!o&&Ac((function(){for(var t=new a,e=5;e--;)t[i](e,e);return!t.has(-0)}));d||((c=e((function(e,r){Sc(e,c,t);var o=Tc(new a,e,c);return null!=r&&kc(r,o[i],{that:o,AS_ENTRIES:n}),o}))).prototype=u,u.constructor=c),(h||v)&&(f("delete"),f("has"),n&&f("get")),(v||p)&&f(i),o&&u.clear&&delete u.clear}return s[t]=c,gc({global:!0,forced:c!=a},s),jc(c,t),o||r.setStrong(c,t,n),c};$c("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),qc);var Gc=q,Wc=function(t){if(Gc(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},zc=Ce,Vc=Wc,Hc=w,Yc=function(t){return function(e,r){var n,o,i=Vc(Hc(e)),a=zc(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===u||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):n:t?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},Jc={codeAt:Yc(!1),charAt:Yc(!0)},Kc=Jc.charAt,Xc=Wc,Zc=ke,Qc=Uu,ts="String Iterator",es=Zc.set,rs=Zc.getterFor(ts);Qc(String,"String",(function(t){es(this,{type:ts,string:Xc(t),index:0})}),(function(){var t,e=rs(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Kc(r,n),e.index+=t.length,{value:t,done:!1})}));var ns={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},os=At("span").classList,is=os&&os.constructor&&os.constructor.prototype,as=is===Object.prototype?void 0:is,us=o,cs=ns,ss=as,fs=Vu,ls=Vt,ps=ht,hs=ps("iterator"),ds=ps("toStringTag"),vs=fs.values,ys=function(t,e){if(t){if(t[hs]!==vs)try{ls(t,hs,vs)}catch(e){t[hs]=vs}if(t[ds]||ls(t,ds,e),cs[e])for(var r in fs)if(t[r]!==fs[r])try{ls(t,r,fs[r])}catch(e){t[r]=fs[r]}}};for(var gs in cs)ys(us[gs]&&us[gs].prototype,gs);ys(ss,"DOMTokenList");var ms={exports:{}},bs="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(bs){var ws=new Uint8Array(16);ms.exports=function(){return bs(ws),ws}}else{var xs=new Array(16);ms.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),xs[e]=t>>>((3&e)<<3)&255;return xs}}for(var ks=[],Ss=0;Ss<256;++Ss)ks[Ss]=(Ss+256).toString(16).substr(1);var Os,As,Es=function(t,e){var r=e||0,n=ks;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")},js=ms.exports,Ts=Es,_s=0,Ls=0;var Rs=function(t,e,r){var n=e&&r||0,o=e||[],i=(t=t||{}).node||Os,a=void 0!==t.clockseq?t.clockseq:As;if(null==i||null==a){var u=js();null==i&&(i=Os=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==a&&(a=As=16383&(u[6]<<8|u[7]))}var c=void 0!==t.msecs?t.msecs:(new Date).getTime(),s=void 0!==t.nsecs?t.nsecs:Ls+1,f=c-_s+(s-Ls)/1e4;if(f<0&&void 0===t.clockseq&&(a=a+1&16383),(f<0||c>_s)&&void 0===t.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_s=c,Ls=s,As=a;var l=(1e4*(268435455&(c+=122192928e5))+s)%4294967296;o[n++]=l>>>24&255,o[n++]=l>>>16&255,o[n++]=l>>>8&255,o[n++]=255&l;var p=c/4294967296*1e4&268435455;o[n++]=p>>>8&255,o[n++]=255&p,o[n++]=p>>>24&15|16,o[n++]=p>>>16&255,o[n++]=a>>>8|128,o[n++]=255&a;for(var h=0;h<6;++h)o[n+h]=i[h];return e||Ts(o)},Is=ms.exports,Ps=Es;var Cs=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||Is)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||Ps(o)},Ds=Rs,Ms=Cs,Us=Ms;Us.v1=Ds,Us.v4=Ms;var Ns=Us;function Fs(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=En(t);if(e){var o=En(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return An(this,r)}}var Bs=function(t){Sn(r,t);var e=Fs(r);function r(t){var n;bn(this,r);var o,i=Ns.v4();return(n=e.call(this,(function(e,n){return o=n,t((function(t){r.cancellationMap.delete(i),e(t)}),(function(t){r.cancellationMap.delete(i),n(t)}),(function(t){r.cancellationMap.set(i,t)}))}))).id=i,n.rejectPromise=o,n}return xn(r,[{key:"cancel",value:function(){var t=r.cancellationMap.get(this.id);return null==t||t(),this.rejectPromise&&(this.catch((function(){})),this.rejectPromise(new Error("Promise was cancelled"))),this}}]),r}(_n(Promise));function qs(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function $s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){qs(i,n,o,a,u,"next",t)}function u(t){qs(i,n,o,a,u,"throw",t)}a(void 0)}))}}Ln(Bs,"cancellationMap",new Map);var Gs,Ws=Object.prototype,zs=Ws.hasOwnProperty,Vs="function"==typeof Symbol?Symbol:{},Hs=Vs.iterator||"@@iterator",Ys=Vs.asyncIterator||"@@asyncIterator",Js=Vs.toStringTag||"@@toStringTag";function Ks(t,e,r,n){var o=e&&e.prototype instanceof nf?e:nf,i=Object.create(o.prototype),a=new gf(n||[]);return i._invoke=function(t,e,r){var n=Zs;return function(o,i){if(n===tf)throw new Error("Generator is already running");if(n===ef){if("throw"===o)throw i;return bf()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=df(a,r);if(u){if(u===rf)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===Zs)throw n=ef,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=tf;var c=Xs(t,e,r);if("normal"===c.type){if(n=r.done?ef:Qs,c.arg===rf)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=ef,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function Xs(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}var Zs="suspendedStart",Qs="suspendedYield",tf="executing",ef="completed",rf={};function nf(){}function of(){}function af(){}var uf={};uf[Hs]=function(){return this};var cf=Object.getPrototypeOf,sf=cf&&cf(cf(mf([])));sf&&sf!==Ws&&zs.call(sf,Hs)&&(uf=sf);var ff=af.prototype=nf.prototype=Object.create(uf);function lf(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function pf(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===of||"GeneratorFunction"===(e.displayName||e.name))}function hf(t,e){function r(n,o,i,a){var u=Xs(t[n],t,o);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"===On(s)&&zs.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,a)}),(function(t){r("throw",t,i,a)})):e.resolve(s).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,a)}))}a(u.arg)}var n;this._invoke=function(t,o){function i(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(i,i):i()}}function df(t,e){var r=t.iterator[e.method];if(r===Gs){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=Gs,df(t,e),"throw"===e.method))return rf;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return rf}var n=Xs(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,rf;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=Gs),e.delegate=null,rf):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,rf)}function vf(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function yf(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function gf(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(vf,this),this.reset(!0)}function mf(t){if(t){var e=t[Hs];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(zs.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=Gs,e.done=!0,e};return n.next=n}}return{next:bf}}function bf(){return{value:Gs,done:!0}}of.prototype=ff.constructor=af,af.constructor=of,af[Js]=of.displayName="GeneratorFunction",lf(hf.prototype),hf.prototype[Ys]=function(){return this},lf(ff),ff[Js]="Generator",ff[Hs]=function(){return this},ff.toString=function(){return"[object Generator]"},gf.prototype={constructor:gf,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=Gs,this.done=!1,this.delegate=null,this.method="next",this.arg=Gs,this.tryEntries.forEach(yf),!t)for(var e in this)"t"===e.charAt(0)&&zs.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=Gs)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=Gs),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=zs.call(o,"catchLoc"),u=zs.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&zs.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,rf):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),rf},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),yf(r),rf}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;yf(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:mf(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=Gs),rf}};var wf={wrap:Ks,isGeneratorFunction:pf,AsyncIterator:hf,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,af):(t.__proto__=af,Js in t||(t[Js]="GeneratorFunction")),t.prototype=Object.create(ff),t},awrap:function(t){return{__await:t}},async:function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new hf(Ks(t,e,r,n),o);return pf(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},keys:function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:mf},xf=y,kf=Array.isArray||function(t){return"Array"==xf(t)},Sf=xt,Of=Mt,Af=d,Ef=function(t,e,r){var n=Sf(e);n in t?Of.f(t,n,Af(0,r)):t[n]=r},jf=O,Tf=kf,_f=ht("species"),Lf=function(t){var e;return Tf(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!Tf(e.prototype)?jf(e)&&null===(e=e[_f])&&(e=void 0):e=void 0),void 0===e?Array:e},Rf=function(t,e){return new(Lf(t))(0===e?0:e)},If=a,Pf=D,Cf=ht("species"),Df=function(t){return Pf>=51||!If((function(){var e=[];return(e.constructor={})[Cf]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Mf=Er,Uf=a,Nf=kf,Ff=O,Bf=X,qf=Ue,$f=Ef,Gf=Rf,Wf=Df,zf=D,Vf=ht("isConcatSpreadable"),Hf=9007199254740991,Yf="Maximum allowed index exceeded",Jf=zf>=51||!Uf((function(){var t=[];return t[Vf]=!1,t.concat()[0]!==t})),Kf=Wf("concat"),Xf=function(t){if(!Ff(t))return!1;var e=t[Vf];return void 0!==e?!!e:Nf(t)};Mf({target:"Array",proto:!0,forced:!Jf||!Kf},{concat:function(t){var e,r,n,o,i,a=Bf(this),u=Gf(a,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(Xf(i=-1===e?a:arguments[e])){if(c+(o=qf(i.length))>Hf)throw TypeError(Yf);for(r=0;r<o;r++,c++)r in i&&$f(u,c,i[r])}else{if(c>=Hf)throw TypeError(Yf);$f(u,c++,i)}return u.length=c,u}});var Zf=co,Qf=b,tl=X,el=Ue,rl=Rf,nl=[].push,ol=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=7==t,u=5==t||i;return function(c,s,f,l){for(var p,h,d=tl(c),v=Qf(d),y=Zf(s,f,3),g=el(v.length),m=0,b=l||rl,w=e?b(c,g):r||a?b(c,0):void 0;g>m;m++)if((u||m in v)&&(h=y(p=v[m],m,d),t))if(e)w[m]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:nl.call(w,p)}else switch(t){case 4:return!1;case 7:nl.call(w,p)}return i?-1:n||o?o:w}},il={forEach:ol(0),map:ol(1),filter:ol(2),some:ol(3),every:ol(4),find:ol(5),findIndex:ol(6),filterReject:ol(7)},al=il.map;Er({target:"Array",proto:!0,forced:!Df("map")},{map:function(t){return al(this,t,arguments.length>1?arguments[1]:void 0)}});var ul=a,cl=function(t,e){var r=[][t];return!!r&&ul((function(){r.call(null,e||function(){throw 1},1)}))},sl=il.forEach,fl=cl("forEach")?[].forEach:function(t){return sl(this,t,arguments.length>1?arguments[1]:void 0)},ll=o,pl=ns,hl=as,dl=fl,vl=Vt,yl=function(t){if(t&&t.forEach!==dl)try{vl(t,"forEach",dl)}catch(e){t.forEach=dl}};for(var gl in pl)yl(ll[gl]&&ll[gl].prototype);function ml(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":On(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function bl(t,e){if("object"===("undefined"==typeof Reflect?"undefined":On(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}yl(hl);var wl=Nt,xl=mo,kl=co,Sl=X,Ol=function(t,e,r,n){try{return n?e(wl(r)[0],r[1]):e(r)}catch(e){xl(t,"throw",e)}},Al=ao,El=Ue,jl=Ef,Tl=yo,_l=po,Ll=function(t){var e,r,n,o,i,a,u=Sl(t),c="function"==typeof this?this:Array,s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,p=_l(u),h=0;if(l&&(f=kl(f,s>2?arguments[2]:void 0,2)),null==p||c==Array&&Al(p))for(r=new c(e=El(u.length));e>h;h++)a=l?f(u[h],h):u[h],jl(r,h,a);else for(i=(o=Tl(u,p)).next,r=new c;!(n=i.call(o)).done;h++)a=l?Ol(o,f,[n.value,h],!0):n.value,jl(r,h,a);return r.length=h,r},Rl=Ll;Er({target:"Array",stat:!0,forced:!Mo((function(t){Array.from(t)}))},{from:Rl});var Il,Pl,Cl,Dl={exports:{}};function Ml(t,e){return["".concat((new Date).toISOString()," MCS Client ").concat(t,":")].concat(Array.from(e))}Pl=r,Cl=function(){var t=function(){},e="undefined",r=("undefined"==typeof window?"undefined":On(window))!==e&&On(window.navigator)!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function o(t,e){var r=t[e];if("function"==typeof r.bind)return r.bind(t);try{return Function.prototype.bind.call(r,t)}catch(e){return function(){return Function.prototype.apply.apply(r,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(n){return"debug"===n&&(n="log"),("undefined"==typeof console?"undefined":On(console))!==e&&("trace"===n&&r?i:void 0!==console[n]?o(console,n):void 0!==console.log?o(console,"log"):t)}function u(e,r){for(var o=0;o<n.length;o++){var i=n[o];this[i]=o<e?t:this.methodFactory(i,e,r)}this.log=this.debug}function c(t,r,n){return function(){("undefined"==typeof console?"undefined":On(console))!==e&&(u.call(this,r,n),this[t].apply(this,arguments))}}function s(t,e,r){return a(t)||c.apply(this,arguments)}function f(t,r,o){var i,a=this;r=null==r?"WARN":r;var c="loglevel";function f(){var t;if(("undefined"==typeof window?"undefined":On(window))!==e&&c){try{t=window.localStorage[c]}catch(t){}if(On(t)===e)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(t=/^([^;]+)/.exec(r.slice(n))[1])}catch(t){}return void 0===a.levels[t]&&(t=void 0),t}}"string"==typeof t?c+=":"+t:"symbol"===On(t)&&(c=void 0),a.name=t,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=o||s,a.getLevel=function(){return i},a.setLevel=function(r,o){if("string"==typeof r&&void 0!==a.levels[r.toUpperCase()]&&(r=a.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(i=r,!1!==o&&function(t){var r=(n[t]||"silent").toUpperCase();if(("undefined"==typeof window?"undefined":On(window))!==e&&c){try{return void(window.localStorage[c]=r)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(t){}}}(r),u.call(a,r,t),("undefined"==typeof console?"undefined":On(console))===e&&r<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(t){r=t,f()||a.setLevel(t,!1)},a.resetLevel=function(){a.setLevel(r,!1),function(){if(("undefined"==typeof window?"undefined":On(window))!==e&&c){try{return void window.localStorage.removeItem(c)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}()},a.enableAll=function(t){a.setLevel(a.levels.TRACE,t)},a.disableAll=function(t){a.setLevel(a.levels.SILENT,t)};var l=f();null==l&&(l=r),a.setLevel(l,!1)}var l=new f,p={};l.getLogger=function(t){if("symbol"!==On(t)&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=p[t];return e||(e=p[t]=new f(t,l.getLevel(),l.methodFactory)),e};var h=("undefined"==typeof window?"undefined":On(window))!==e?window.log:void 0;return l.noConflict=function(){return("undefined"==typeof window?"undefined":On(window))!==e&&window.log===l&&(window.log=h),l},l.getLoggers=function(){return p},l.default=l,l},(Il=Dl).exports?Il.exports=Cl():Pl.log=Cl();var Ul,Nl=function(){function t(e){bn(this,t),Ln(this,"prefix",""),this.prefix=null!=e&&e.length>0?e+" ":""}return xn(t,[{key:"setLevel",value:function(t){Dl.exports.setLevel(t)}},{key:"trace",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.trace.apply(null,Ml(this.prefix+"T",e))}},{key:"debug",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.debug.apply(null,Ml(this.prefix+"D",e))}},{key:"info",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.info.apply(null,Ml(this.prefix+"I",e))}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.warn.apply(null,Ml(this.prefix+"W",e))}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.error.apply(null,Ml(this.prefix+"E",e))}}],[{key:"scope",value:function(e){return new t(e)}},{key:"setLevel",value:function(t){Dl.exports.setLevel(t)}},{key:"trace",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.trace.apply(null,Ml("T",e))}},{key:"debug",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.debug.apply(null,Ml("D",e))}},{key:"info",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.info.apply(null,Ml("I",e))}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.warn.apply(null,Ml("W",e))}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.error.apply(null,Ml("E",e))}}]),t}(),Fl=O,Bl=y,ql=ht("match"),$l=function(t){var e;return Fl(t)&&(void 0!==(e=t[ql])?!!e:"RegExp"==Bl(t))},Gl=$l,Wl=ht("match"),zl=Er,Vl=i.f,Hl=Ue,Yl=Wc,Jl=function(t){if(Gl(t))throw TypeError("The method doesn't accept regular expressions");return t},Kl=w,Xl=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Wl]=!1,"/./"[t](e)}catch(t){}}return!1},Zl="".startsWith,Ql=Math.min,tp=Xl("startsWith");zl({target:"String",proto:!0,forced:!!(tp||(Ul=Vl(String.prototype,"startsWith"),!Ul||Ul.writable))&&!tp},{startsWith:function(t){var e=Yl(Kl(this));Jl(t);var r=Hl(Ql(arguments.length>1?arguments[1]:void 0,e.length)),n=Yl(t);return Zl?Zl.call(e,n,r):e.slice(r,r+n.length)===n}});var ep=function(t,e){return"".concat((r=t,r.startsWith("http")?"":function(t){return"https://mcs.".concat(null!=t?t:"us1",".twilio.com")}(e))).concat(t);var r},rp=function(){function t(e,r,n,o){var i,a,u,c,s,f;bn(this,t);var l=null!==(i=null!==(a=o.MCS)&&void 0!==a?a:o)&&void 0!==i?i:{};this.region=null!==(u=null!==(c=l.region)&&void 0!==c?c:o.region)&&void 0!==u?u:"us1",this.mediaUrl=ep(r,this.region),this.mediaSetUrl=n?ep(n):"".concat(this.mediaUrl,"Set"),this.token=e,this.retryWhenThrottledOverride=null===(s=l.retryWhenThrottledOverride)||void 0===s||s,this.backoffConfigOverride=null!==(f=l.backoffConfigOverride)&&void 0!==f?f:t.backoffConfigDefault}return xn(t,[{key:"updateToken",value:function(t){this.token=t}}],[{key:"backoffConfigDefault",get:function(){return{min:1e3,max:4e3,maxAttemptsCount:3}}},{key:"retryWhenThrottledDefault",get:function(){return true}}]),t}(),np=function(){function t(e,r,n){bn(this,t),this.config=e,this.network=r,this._update(n)}return xn(t,[{key:"sid",get:function(){return this.state.sid}},{key:"serviceSid",get:function(){return this.state.serviceSid}},{key:"dateCreated",get:function(){return this.state.dateCreated}},{key:"dateUpdated",get:function(){return this.state.dateUpdated}},{key:"contentType",get:function(){return this.state.contentType}},{key:"size",get:function(){return this.state.size}},{key:"fileName",get:function(){return this.state.filename}},{key:"filename",get:function(){return this.state.filename}},{key:"category",get:function(){return this.state.category}},{key:"getContentUrl",value:function(){var t=this;return new Bs(function(){var e=$s(wf.mark((function e(r,n,o){var i,a;return wf.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.network.get("".concat(t.config.mediaUrl,"/").concat(t.sid)),o((function(){return i.cancel()})),e.prev=2,e.next=5,i;case 5:a=e.sent,t._update(a.body),r(t.state.contentDirectUrl),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),n(e.t0);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t,r,n){return e.apply(this,arguments)}}())}},{key:"_update",value:function(t){var e,r,n,o;this.state={sid:t.sid,serviceSid:t.service_sid,channelSid:t.channel_sid,messageSid:t.message_sid,dateCreated:t.date_created?new Date(t.date_created):null,dateUploadUpdated:t.date_upload_updated?new Date(t.date_upload_updated):null,dateUpdated:t.date_updated?new Date(t.date_updated):null,size:t.size,contentType:t.content_type,author:t.author,url:t.url,contentUrl:t.links.content,contentDirectUrl:null!==(e=t.links.content_direct_temporary)&&void 0!==e?e:null,filename:null!==(r=t.filename)&&void 0!==r?r:null,category:null!==(n=t.category)&&void 0!==n?n:"media",isMultipartUpstream:null!==(o=t.is_multipart_upstream)&&void 0!==o&&o}}}]),t}(),op=il.filter;Er({target:"Array",proto:!0,forced:!Df("filter")},{filter:function(t){return op(this,t,arguments.length>1?arguments[1]:void 0)}});var ip=Nt,ap={},up=a,cp=o.RegExp;ap.UNSUPPORTED_Y=up((function(){var t=cp("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),ap.BROKEN_CARET=up((function(){var t=cp("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));var sp,fp,lp=a,pp=o.RegExp,hp=lp((function(){var t=pp(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),dp=a,vp=o.RegExp,yp=dp((function(){var t=vp("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),gp=Wc,mp=function(){var t=ip(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},bp=ap,wp=G.exports,xp=tn,kp=ke.get,Sp=hp,Op=yp,Ap=RegExp.prototype.exec,Ep=wp("native-string-replace",String.prototype.replace),jp=Ap,Tp=(sp=/a/,fp=/b*/g,Ap.call(sp,"a"),Ap.call(fp,"a"),0!==sp.lastIndex||0!==fp.lastIndex),_p=bp.UNSUPPORTED_Y||bp.BROKEN_CARET,Lp=void 0!==/()??/.exec("")[1];(Tp||Lp||_p||Sp||Op)&&(jp=function(t){var e,r,n,o,i,a,u,c=this,s=kp(c),f=gp(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=jp.call(l,f),c.lastIndex=l.lastIndex,e;var p=s.groups,h=_p&&c.sticky,d=mp.call(c),v=c.source,y=0,g=f;if(h&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),g=f.slice(c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==f.charAt(c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",d)),Lp&&(r=new RegExp("^"+v+"$(?!\\s)",d)),Tp&&(n=c.lastIndex),o=Ap.call(h?r:c,g),h?o?(o.input=o.input.slice(y),o[0]=o[0].slice(y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Tp&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Lp&&o&&o.length>1&&Ep.call(o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=xp(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Rp=jp;Er({target:"RegExp",proto:!0,forced:/./.exec!==Rp},{exec:Rp});var Ip=Ht.exports,Pp=Rp,Cp=a,Dp=ht,Mp=Vt,Up=Dp("species"),Np=RegExp.prototype,Fp=function(t,e,r,n){var o=Dp(t),i=!Cp((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!Cp((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Up]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||r){var u=/./[o],c=e(o,""[t],(function(t,e,r,n,o){var a=e.exec;return a===Pp||a===Np.exec?i&&!o?{done:!0,value:u.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}));Ip(String.prototype,t,c[0]),Ip(Np,o,c[1])}n&&Mp(Np[o],"sham",!0)},Bp=Jc.charAt,qp=function(t,e,r){return e+(r?Bp(t,e).length:1)},$p=y,Gp=Rp,Wp=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==$p(t))throw TypeError("RegExp#exec called on incompatible receiver");return Gp.call(t,e)},zp=Fp,Vp=$l,Hp=Nt,Yp=w,Jp=Bo,Kp=qp,Xp=Ue,Zp=Wc,Qp=Wp,th=Rp,eh=a,rh=ap.UNSUPPORTED_Y,nh=[].push,oh=Math.min,ih=4294967295,ah=!eh((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));zp("split",(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=Zp(Yp(this)),o=void 0===r?ih:r>>>0;if(0===o)return[];if(void 0===t)return[n];if(!Vp(t))return e.call(n,t,o);for(var i,a,u,c=[],s=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,l=new RegExp(t.source,s+"g");(i=th.call(l,n))&&!((a=l.lastIndex)>f&&(c.push(n.slice(f,i.index)),i.length>1&&i.index<n.length&&nh.apply(c,i.slice(1)),u=i[0].length,f=a,c.length>=o));)l.lastIndex===i.index&&l.lastIndex++;return f===n.length?!u&&l.test("")||c.push(""):c.push(n.slice(f)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var o=Yp(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(Zp(o),e,r)},function(t,o){var i=Hp(this),a=Zp(t),u=r(n,i,a,o,n!==e);if(u.done)return u.value;var c=Jp(i,RegExp),s=i.unicode,f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(rh?"g":"y"),l=new c(rh?"^(?:"+i.source+")":i,f),p=void 0===o?ih:o>>>0;if(0===p)return[];if(0===a.length)return null===Qp(l,a)?[a]:[];for(var h=0,d=0,v=[];d<a.length;){l.lastIndex=rh?0:d;var y,g=Qp(l,rh?a.slice(d):a);if(null===g||(y=oh(Xp(l.lastIndex+(rh?d:0)),a.length))===h)d=Kp(a,d,s);else{if(v.push(a.slice(h,d)),v.length===p)return v;for(var m=1;m<=g.length-1;m++)if(v.push(g[m]),v.length===p)return v;d=h=y}}return v.push(a.slice(h)),v}]}),!ah,rh);var uh=X,ch=Math.floor,sh="".replace,fh=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,lh=/\$([$&'`]|\d{1,2})/g,ph=Fp,hh=a,dh=Nt,vh=Ce,yh=Ue,gh=Wc,mh=w,bh=qp,wh=function(t,e,r,n,o,i){var a=r+t.length,u=n.length,c=lh;return void 0!==o&&(o=uh(o),c=fh),sh.call(i,c,(function(i,c){var s;switch(c.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(a);case"<":s=o[c.slice(1,-1)];break;default:var f=+c;if(0===f)return i;if(f>u){var l=ch(f/10);return 0===l?i:l<=u?void 0===n[l-1]?c.charAt(1):n[l-1]+c.charAt(1):i}s=n[f-1]}return void 0===s?"":s}))},xh=Wp,kh=ht("replace"),Sh=Math.max,Oh=Math.min,Ah="$0"==="a".replace(/./,"$0"),Eh=!!/./[kh]&&""===/./[kh]("a","$0"),jh=!hh((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}));ph("replace",(function(t,e,r){var n=Eh?"$":"$0";return[function(t,r){var n=mh(this),o=null==t?void 0:t[kh];return void 0!==o?o.call(t,n,r):e.call(gh(n),t,r)},function(t,o){var i=dh(this),a=gh(t);if("string"==typeof o&&-1===o.indexOf(n)&&-1===o.indexOf("$<")){var u=r(e,i,a,o);if(u.done)return u.value}var c="function"==typeof o;c||(o=gh(o));var s=i.global;if(s){var f=i.unicode;i.lastIndex=0}for(var l=[];;){var p=xh(i,a);if(null===p)break;if(l.push(p),!s)break;""===gh(p[0])&&(i.lastIndex=bh(a,yh(i.lastIndex),f))}for(var h,d="",v=0,y=0;y<l.length;y++){p=l[y];for(var g=gh(p[0]),m=Sh(Oh(vh(p.index),a.length),0),b=[],w=1;w<p.length;w++)b.push(void 0===(h=p[w])?h:String(h));var x=p.groups;if(c){var k=[g].concat(b,m,a);void 0!==x&&k.push(x);var S=gh(o.apply(void 0,k))}else S=wh(g,a,m,b,x,o);m>=v&&(d+=a.slice(v,m)+S,v=m+g.length)}return d+a.slice(v)}]}),!jh||!Ah||Eh);var Th=Er,_h=S,Lh=[].join,Rh=b!=Object,Ih=cl("join",",");Th({target:"Array",proto:!0,forced:Rh||!Ih},{join:function(t){return Lh.call(_h(this),void 0===t?",":t)}});var Ph=Er,Ch=O,Dh=kf,Mh=qe,Uh=Ue,Nh=S,Fh=Ef,Bh=ht,qh=Df("slice"),$h=Bh("species"),Gh=[].slice,Wh=Math.max;Ph({target:"Array",proto:!0,forced:!qh},{slice:function(t,e){var r,n,o,i=Nh(this),a=Uh(i.length),u=Mh(t,a),c=Mh(void 0===e?a:e,a);if(Dh(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!Dh(r.prototype)?Ch(r)&&null===(r=r[$h])&&(r=void 0):r=void 0,r===Array||void 0===r))return Gh.call(i,u,c);for(n=new(void 0===r?Array:r)(Wh(c-u,0)),o=0;u<c;u++,o++)u in i&&Fh(n,o,i[u]);return n.length=o,n}});var zh=Er,Vh=a,Hh=j("JSON","stringify"),Yh=/[\uD800-\uDFFF]/g,Jh=/^[\uD800-\uDBFF]$/,Kh=/^[\uDC00-\uDFFF]$/,Xh=function(t,e,r){var n=r.charAt(e-1),o=r.charAt(e+1);return Jh.test(t)&&!Kh.test(o)||Kh.test(t)&&!Jh.test(n)?"\\u"+t.charCodeAt(0).toString(16):t},Zh=Vh((function(){return'"\\udf06\\ud834"'!==Hh("\udf06\ud834")||'"\\udead"'!==Hh("\udead")}));function Qh(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=En(t);if(e){var o=En(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return An(this,r)}}Hh&&zh({target:"JSON",stat:!0,forced:Zh},{stringify:function(t,e,r){var n=Hh.apply(null,arguments);return"string"==typeof n?n.replace(Yh,Xh):n}});var td=function(t){Sn(r,t);var e=Qh(r);function r(t,n,o,i,a){var u;return bn(this,r),(u=e.call(this,t)).code=n,u.body=o,u.status=i,u.headers=a,u}return xn(r)}(_n(Error)),ed=e.XMLHttpRequest||{};var rd=function(){function t(){bn(this,t)}return xn(t,[{key:"get",value:function(e,r){return t.request("GET",e,r)}},{key:"post",value:function(e,r,n){return t.request("POST",e,r,n)}}],[{key:"request",value:function(t,e,r,n){return new Bs((function(o,i,a){var u=new ed,c=!1;for(var s in a((function(){u.abort(),c=!0})),u.open(t,e,!0),u.onreadystatechange=function(){if(4===u.readyState&&!c){var t,e=(t=u.getAllResponseHeaders())?t.split("\r\n").map((function(t){return t.split(": ")})).filter((function(t){return 2===t.length&&t[1].length>0})).reduce((function(t,e){return t[e[0]]=e[1],t}),{}):{},r=function(t){var e=t.getResponseHeader("Content-Type");if(!e||0!==e.indexOf("application/json")||0===t.responseText.length)return t.responseText;try{return JSON.parse(t.responseText)}catch(e){return t.responseText}}(u);if(200<=u.status&&u.status<300)o({status:u.status,headers:e,body:r});else{var n,a,s=null!==(n=u.statusText)&&void 0!==n?n:"NONE";if("string"==typeof r)if(r&&1===r.split("\n",2).length)a=r;else{var f,l=null===(f=r.replace(/<.*?>/g,"").split(/\r\n/g).filter((function(t){return t.length}))[0])||void 0===f?void 0:f.split(" ");a=(null==l?void 0:l.length)>2?null==l?void 0:l.slice(1).join(" "):""}else a=JSON.stringify(r);var p="".concat(u.status,": [").concat(s,"] ").concat(a);i(new td(p,u.status,r,s,e))}}},r)u.setRequestHeader(s,r[s]),"Content-Type"===s&&"application/json"===r[s]&&(n=JSON.stringify(n));u.send(n)}))}}]),t}(),nd=u,od=a,id=Ur,ad=er,ud=c,cd=X,sd=b,fd=Object.assign,ld=Object.defineProperty,pd=!fd||od((function(){if(nd&&1!==fd({b:1},fd(ld({},"a",{enumerable:!0,get:function(){ld(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=fd({},t)[r]||id(fd({},e)).join("")!=n}))?function(t,e){for(var r=cd(t),n=arguments.length,o=1,i=ad.f,a=ud.f;n>o;)for(var u,c=sd(arguments[o++]),s=i?id(c).concat(i(c)):id(c),f=s.length,l=0;f>l;)u=s[l++],nd&&!a.call(c,u)||(r[u]=c[u]);return r}:fd,hd=pd;Er({target:"Object",stat:!0,forced:Object.assign!==hd},{assign:hd});var dd=a,vd=ht("iterator"),yd=!dd((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[vd]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),gd=2147483647,md=/[^\0-\u007E]/,bd=/[.\u3002\uFF0E\uFF61]/g,wd="Overflow: input needs wider integers to process",xd=Math.floor,kd=String.fromCharCode,Sd=function(t){return t+22+75*(t<26)},Od=function(t,e,r){var n=0;for(t=r?xd(t/700):t>>1,t+=xd(t/e);t>455;n+=36)t=xd(t/35);return xd(n+36*t/(t+38))},Ad=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=t.charCodeAt(r++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),r--)}else e.push(o)}return e}(t);var r,n,o=t.length,i=128,a=0,u=72;for(r=0;r<t.length;r++)(n=t[r])<128&&e.push(kd(n));var c=e.length,s=c;for(c&&e.push("-");s<o;){var f=gd;for(r=0;r<t.length;r++)(n=t[r])>=i&&n<f&&(f=n);var l=s+1;if(f-i>xd((gd-a)/l))throw RangeError(wd);for(a+=(f-i)*l,i=f,r=0;r<t.length;r++){if((n=t[r])<i&&++a>gd)throw RangeError(wd);if(n==i){for(var p=a,h=36;;h+=36){var d=h<=u?1:h>=u+26?26:h-u;if(p<d)break;var v=p-d,y=36-d;e.push(kd(Sd(d+v%y))),p=xd(v/y)}e.push(kd(Sd(p))),u=Od(a,l,s==c),a=0,++s}}++a,++i}return e.join("")},Ed=Er,jd=j,Td=yd,_d=Ht.exports,Ld=zn,Rd=Lr,Id=xu,Pd=ke,Cd=eo,Dd=tt,Md=co,Ud=Un,Nd=Nt,Fd=O,Bd=Wc,qd=tn,$d=d,Gd=yo,Wd=po,zd=ht,Vd=jd("fetch"),Hd=jd("Request"),Yd=Hd&&Hd.prototype,Jd=jd("Headers"),Kd=zd("iterator"),Xd="URLSearchParams",Zd="URLSearchParamsIterator",Qd=Pd.set,tv=Pd.getterFor(Xd),ev=Pd.getterFor(Zd),rv=/\+/g,nv=Array(4),ov=function(t){return nv[t-1]||(nv[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},iv=function(t){try{return decodeURIComponent(t)}catch(e){return t}},av=function(t){var e=t.replace(rv," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(ov(r--),iv);return e}},uv=/[!'()~]|%20/g,cv={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},sv=function(t){return cv[t]},fv=function(t){return encodeURIComponent(t).replace(uv,sv)},lv=function(t,e){if(e)for(var r,n,o=e.split("&"),i=0;i<o.length;)(r=o[i++]).length&&(n=r.split("="),t.push({key:av(n.shift()),value:av(n.join("="))}))},pv=function(t){this.entries.length=0,lv(this.entries,t)},hv=function(t,e){if(t<e)throw TypeError("Not enough arguments")},dv=Id((function(t,e){Qd(this,{type:Zd,iterator:Gd(tv(t).entries),kind:e})}),"Iterator",(function(){var t=ev(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r})),vv=function(){Cd(this,vv,Xd);var t,e,r,n,o,i,a,u,c,s=arguments.length>0?arguments[0]:void 0,f=this,l=[];if(Qd(f,{type:Xd,entries:l,updateURL:function(){},updateSearchParams:pv}),void 0!==s)if(Fd(s))if("function"==typeof(t=Wd(s)))for(r=(e=Gd(s,t)).next;!(n=r.call(e)).done;){if((a=(i=(o=Gd(Nd(n.value))).next).call(o)).done||(u=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");l.push({key:Bd(a.value),value:Bd(u.value)})}else for(c in s)Dd(s,c)&&l.push({key:c,value:Bd(s[c])});else lv(l,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:Bd(s))},yv=vv.prototype;if(Ld(yv,{append:function(t,e){hv(arguments.length,2);var r=tv(this);r.entries.push({key:Bd(t),value:Bd(e)}),r.updateURL()},delete:function(t){hv(arguments.length,1);for(var e=tv(this),r=e.entries,n=Bd(t),o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;e.updateURL()},get:function(t){hv(arguments.length,1);for(var e=tv(this).entries,r=Bd(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){hv(arguments.length,1);for(var e=tv(this).entries,r=Bd(t),n=[],o=0;o<e.length;o++)e[o].key===r&&n.push(e[o].value);return n},has:function(t){hv(arguments.length,1);for(var e=tv(this).entries,r=Bd(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){hv(arguments.length,1);for(var r,n=tv(this),o=n.entries,i=!1,a=Bd(t),u=Bd(e),c=0;c<o.length;c++)(r=o[c]).key===a&&(i?o.splice(c--,1):(i=!0,r.value=u));i||o.push({key:a,value:u}),n.updateURL()},sort:function(){var t,e,r,n=tv(this),o=n.entries,i=o.slice();for(o.length=0,r=0;r<i.length;r++){for(t=i[r],e=0;e<r;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===r&&o.push(t)}n.updateURL()},forEach:function(t){for(var e,r=tv(this).entries,n=Md(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new dv(this,"keys")},values:function(){return new dv(this,"values")},entries:function(){return new dv(this,"entries")}},{enumerable:!0}),_d(yv,Kd,yv.entries),_d(yv,"toString",(function(){for(var t,e=tv(this).entries,r=[],n=0;n<e.length;)t=e[n++],r.push(fv(t.key)+"="+fv(t.value));return r.join("&")}),{enumerable:!0}),Rd(vv,Xd),Ed({global:!0,forced:!Td},{URLSearchParams:vv}),!Td&&"function"==typeof Jd){var gv=function(t){if(Fd(t)){var e,r=t.body;if(Ud(r)===Xd)return(e=t.headers?new Jd(t.headers):new Jd).has("content-type")||e.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),qd(t,{body:$d(0,String(r)),headers:$d(0,e)})}return t};if("function"==typeof Vd&&Ed({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Vd(t,arguments.length>1?gv(arguments[1]):{})}}),"function"==typeof Hd){var mv=function(t){return Cd(this,mv,"Request"),new Hd(t,arguments.length>1?gv(arguments[1]):{})};Yd.constructor=mv,mv.prototype=Yd,Ed({global:!0,forced:!0},{Request:mv})}}var bv,wv={URLSearchParams:vv,getState:tv},xv=Er,kv=u,Sv=yd,Ov=o,Av=qr,Ev=Ht.exports,jv=eo,Tv=tt,_v=pd,Lv=Ll,Rv=Jc.codeAt,Iv=function(t){var e,r,n=[],o=t.toLowerCase().replace(bd,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(md.test(r)?"xn--"+Ad(r):r);return n.join(".")},Pv=Wc,Cv=Lr,Dv=wv,Mv=ke,Uv=Ov.URL,Nv=Dv.URLSearchParams,Fv=Dv.getState,Bv=Mv.set,qv=Mv.getterFor("URL"),$v=Math.floor,Gv=Math.pow,Wv="Invalid scheme",zv="Invalid host",Vv="Invalid port",Hv=/[A-Za-z]/,Yv=/[\d+-.A-Za-z]/,Jv=/\d/,Kv=/^0x/i,Xv=/^[0-7]+$/,Zv=/^\d+$/,Qv=/^[\dA-Fa-f]+$/,ty=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ey=/[\0\t\n\r #/:<>?@[\\\]^|]/,ry=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,ny=/[\t\n\r]/g,oy=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return zv;if(!(r=ay(e.slice(1,-1))))return zv;t.host=r}else if(dy(t)){if(e=Iv(e),ty.test(e))return zv;if(null===(r=iy(e)))return zv;t.host=r}else{if(ey.test(e))return zv;for(r="",n=Lv(e),o=0;o<n.length;o++)r+=py(n[o],cy);t.host=r}},iy=function(t){var e,r,n,o,i,a,u,c=t.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(e=c.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=c[n]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=Kv.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?Zv:8==i?Xv:Qv).test(o))return t;a=parseInt(o,i)}r.push(a)}for(n=0;n<e;n++)if(a=r[n],n==e-1){if(a>=Gv(256,5-e))return null}else if(a>255)return null;for(u=r.pop(),n=0;n<r.length;n++)u+=r[n]*Gv(256,3-n);return u},ay=function(t){var e,r,n,o,i,a,u,c=[0,0,0,0,0,0,0,0],s=0,f=null,l=0,p=function(){return t.charAt(l)};if(":"==p()){if(":"!=t.charAt(1))return;l+=2,f=++s}for(;p();){if(8==s)return;if(":"!=p()){for(e=r=0;r<4&&Qv.test(p());)e=16*e+parseInt(p(),16),l++,r++;if("."==p()){if(0==r)return;if(l-=r,s>6)return;for(n=0;p();){if(o=null,n>0){if(!("."==p()&&n<4))return;l++}if(!Jv.test(p()))return;for(;Jv.test(p());){if(i=parseInt(p(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}c[s]=256*c[s]+o,2!=++n&&4!=n||s++}if(4!=n)return;break}if(":"==p()){if(l++,!p())return}else if(p())return;c[s++]=e}else{if(null!==f)return;l++,f=++s}}if(null!==f)for(a=s-f,s=7;0!=s&&a>0;)u=c[s],c[s--]=c[f+a-1],c[f+--a]=u;else if(8!=s)return;return c},uy=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=$v(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=t[r].toString(16),r<7&&(e+=":")));return"["+e+"]"}return t},cy={},sy=_v({},cy,{" ":1,'"':1,"<":1,">":1,"`":1}),fy=_v({},sy,{"#":1,"?":1,"{":1,"}":1}),ly=_v({},fy,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),py=function(t,e){var r=Rv(t,0);return r>32&&r<127&&!Tv(e,t)?t:encodeURIComponent(t)},hy={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dy=function(t){return Tv(hy,t.scheme)},vy=function(t){return""!=t.username||""!=t.password},yy=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},gy=function(t,e){var r;return 2==t.length&&Hv.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},my=function(t){var e;return t.length>1&&gy(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},by=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&gy(e[0],!0)||e.pop()},wy=function(t){return"."===t||"%2e"===t.toLowerCase()},xy={},ky={},Sy={},Oy={},Ay={},Ey={},jy={},Ty={},_y={},Ly={},Ry={},Iy={},Py={},Cy={},Dy={},My={},Uy={},Ny={},Fy={},By={},qy={},$y=function(t,e,r,n){var o,i,a,u,c,s=r||xy,f=0,l="",p=!1,h=!1,d=!1;for(r||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(ry,"")),e=e.replace(ny,""),o=Lv(e);f<=o.length;){switch(i=o[f],s){case xy:if(!i||!Hv.test(i)){if(r)return Wv;s=Sy;continue}l+=i.toLowerCase(),s=ky;break;case ky:if(i&&(Yv.test(i)||"+"==i||"-"==i||"."==i))l+=i.toLowerCase();else{if(":"!=i){if(r)return Wv;l="",s=Sy,f=0;continue}if(r&&(dy(t)!=Tv(hy,l)||"file"==l&&(vy(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=l,r)return void(dy(t)&&hy[t.scheme]==t.port&&(t.port=null));l="","file"==t.scheme?s=Cy:dy(t)&&n&&n.scheme==t.scheme?s=Oy:dy(t)?s=Ty:"/"==o[f+1]?(s=Ay,f++):(t.cannotBeABaseURL=!0,t.path.push(""),s=Fy)}break;case Sy:if(!n||n.cannotBeABaseURL&&"#"!=i)return Wv;if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,s=qy;break}s="file"==n.scheme?Cy:Ey;continue;case Oy:if("/"!=i||"/"!=o[f+1]){s=Ey;continue}s=_y,f++;break;case Ay:if("/"==i){s=Ly;break}s=Ny;continue;case Ey:if(t.scheme=n.scheme,i==bv)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query;else if("/"==i||"\\"==i&&dy(t))s=jy;else if("?"==i)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query="",s=By;else{if("#"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.path.pop(),s=Ny;continue}t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=qy}break;case jy:if(!dy(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,s=Ny;continue}s=Ly}else s=_y;break;case Ty:if(s=_y,"/"!=i||"/"!=l.charAt(f+1))continue;f++;break;case _y:if("/"!=i&&"\\"!=i){s=Ly;continue}break;case Ly:if("@"==i){p&&(l="%40"+l),p=!0,a=Lv(l);for(var v=0;v<a.length;v++){var y=a[v];if(":"!=y||d){var g=py(y,ly);d?t.password+=g:t.username+=g}else d=!0}l=""}else if(i==bv||"/"==i||"?"==i||"#"==i||"\\"==i&&dy(t)){if(p&&""==l)return"Invalid authority";f-=Lv(l).length+1,l="",s=Ry}else l+=i;break;case Ry:case Iy:if(r&&"file"==t.scheme){s=My;continue}if(":"!=i||h){if(i==bv||"/"==i||"?"==i||"#"==i||"\\"==i&&dy(t)){if(dy(t)&&""==l)return zv;if(r&&""==l&&(vy(t)||null!==t.port))return;if(u=oy(t,l))return u;if(l="",s=Uy,r)return;continue}"["==i?h=!0:"]"==i&&(h=!1),l+=i}else{if(""==l)return zv;if(u=oy(t,l))return u;if(l="",s=Py,r==Iy)return}break;case Py:if(!Jv.test(i)){if(i==bv||"/"==i||"?"==i||"#"==i||"\\"==i&&dy(t)||r){if(""!=l){var m=parseInt(l,10);if(m>65535)return Vv;t.port=dy(t)&&m===hy[t.scheme]?null:m,l=""}if(r)return;s=Uy;continue}return Vv}l+=i;break;case Cy:if(t.scheme="file","/"==i||"\\"==i)s=Dy;else{if(!n||"file"!=n.scheme){s=Ny;continue}if(i==bv)t.host=n.host,t.path=n.path.slice(),t.query=n.query;else if("?"==i)t.host=n.host,t.path=n.path.slice(),t.query="",s=By;else{if("#"!=i){my(o.slice(f).join(""))||(t.host=n.host,t.path=n.path.slice(),by(t)),s=Ny;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=qy}}break;case Dy:if("/"==i||"\\"==i){s=My;break}n&&"file"==n.scheme&&!my(o.slice(f).join(""))&&(gy(n.path[0],!0)?t.path.push(n.path[0]):t.host=n.host),s=Ny;continue;case My:if(i==bv||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&gy(l))s=Ny;else if(""==l){if(t.host="",r)return;s=Uy}else{if(u=oy(t,l))return u;if("localhost"==t.host&&(t.host=""),r)return;l="",s=Uy}continue}l+=i;break;case Uy:if(dy(t)){if(s=Ny,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=bv&&(s=Ny,"/"!=i))continue}else t.fragment="",s=qy;else t.query="",s=By;break;case Ny:if(i==bv||"/"==i||"\\"==i&&dy(t)||!r&&("?"==i||"#"==i)){if(".."===(c=(c=l).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(by(t),"/"==i||"\\"==i&&dy(t)||t.path.push("")):wy(l)?"/"==i||"\\"==i&&dy(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&gy(l)&&(t.host&&(t.host=""),l=l.charAt(0)+":"),t.path.push(l)),l="","file"==t.scheme&&(i==bv||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",s=By):"#"==i&&(t.fragment="",s=qy)}else l+=py(i,fy);break;case Fy:"?"==i?(t.query="",s=By):"#"==i?(t.fragment="",s=qy):i!=bv&&(t.path[0]+=py(i,cy));break;case By:r||"#"!=i?i!=bv&&("'"==i&&dy(t)?t.query+="%27":t.query+="#"==i?"%23":py(i,cy)):(t.fragment="",s=qy);break;case qy:i!=bv&&(t.fragment+=py(i,sy))}f++}},Gy=function(t){var e,r,n=jv(this,Gy,"URL"),o=arguments.length>1?arguments[1]:void 0,i=Pv(t),a=Bv(n,{type:"URL"});if(void 0!==o)if(o instanceof Gy)e=qv(o);else if(r=$y(e={},Pv(o)))throw TypeError(r);if(r=$y(a,i,null,e))throw TypeError(r);var u=a.searchParams=new Nv,c=Fv(u);c.updateSearchParams(a.query),c.updateURL=function(){a.query=String(u)||null},kv||(n.href=zy.call(n),n.origin=Vy.call(n),n.protocol=Hy.call(n),n.username=Yy.call(n),n.password=Jy.call(n),n.host=Ky.call(n),n.hostname=Xy.call(n),n.port=Zy.call(n),n.pathname=Qy.call(n),n.search=tg.call(n),n.searchParams=eg.call(n),n.hash=rg.call(n))},Wy=Gy.prototype,zy=function(){var t=qv(this),e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,u=t.query,c=t.fragment,s=e+":";return null!==o?(s+="//",vy(t)&&(s+=r+(n?":"+n:"")+"@"),s+=uy(o),null!==i&&(s+=":"+i)):"file"==e&&(s+="//"),s+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==u&&(s+="?"+u),null!==c&&(s+="#"+c),s},Vy=function(){var t=qv(this),e=t.scheme,r=t.port;if("blob"==e)try{return new Gy(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&dy(t)?e+"://"+uy(t.host)+(null!==r?":"+r:""):"null"},Hy=function(){return qv(this).scheme+":"},Yy=function(){return qv(this).username},Jy=function(){return qv(this).password},Ky=function(){var t=qv(this),e=t.host,r=t.port;return null===e?"":null===r?uy(e):uy(e)+":"+r},Xy=function(){var t=qv(this).host;return null===t?"":uy(t)},Zy=function(){var t=qv(this).port;return null===t?"":String(t)},Qy=function(){var t=qv(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},tg=function(){var t=qv(this).query;return t?"?"+t:""},eg=function(){return qv(this).searchParams},rg=function(){var t=qv(this).fragment;return t?"#"+t:""},ng=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(kv&&Av(Wy,{href:ng(zy,(function(t){var e=qv(this),r=Pv(t),n=$y(e,r);if(n)throw TypeError(n);Fv(e.searchParams).updateSearchParams(e.query)})),origin:ng(Vy),protocol:ng(Hy,(function(t){var e=qv(this);$y(e,Pv(t)+":",xy)})),username:ng(Yy,(function(t){var e=qv(this),r=Lv(Pv(t));if(!yy(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=py(r[n],ly)}})),password:ng(Jy,(function(t){var e=qv(this),r=Lv(Pv(t));if(!yy(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=py(r[n],ly)}})),host:ng(Ky,(function(t){var e=qv(this);e.cannotBeABaseURL||$y(e,Pv(t),Ry)})),hostname:ng(Xy,(function(t){var e=qv(this);e.cannotBeABaseURL||$y(e,Pv(t),Iy)})),port:ng(Zy,(function(t){var e=qv(this);yy(e)||(""==(t=Pv(t))?e.port=null:$y(e,t,Py))})),pathname:ng(Qy,(function(t){var e=qv(this);e.cannotBeABaseURL||(e.path=[],$y(e,Pv(t),Uy))})),search:ng(tg,(function(t){var e=qv(this);""==(t=Pv(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",$y(e,t,By)),Fv(e.searchParams).updateSearchParams(e.query)})),searchParams:ng(eg),hash:ng(rg,(function(t){var e=qv(this);""!=(t=Pv(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",$y(e,t,qy)):e.fragment=null}))}),Ev(Wy,"toJSON",(function(){return zy.call(this)}),{enumerable:!0}),Ev(Wy,"toString",(function(){return zy.call(this)}),{enumerable:!0}),Uv){var og=Uv.createObjectURL,ig=Uv.revokeObjectURL;og&&Ev(Gy,"createObjectURL",(function(t){return og.apply(Uv,arguments)})),ig&&Ev(Gy,"revokeObjectURL",(function(t){return ig.apply(Uv,arguments)}))}Cv(Gy,"URL"),xv({global:!0,forced:!Sv,sham:!kv},{URL:Gy});var ag={},ug={exports:{}};!function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports}(ug);var cg={exports:{}};!function(t){function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}(cg);var sg={exports:{}};!function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports}(sg);var fg={exports:{}},lg={exports:{}};!function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(lg),function(t){var e=lg.exports;t.exports=function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&e(t,r)},t.exports.__esModule=!0,t.exports.default=t.exports}(fg);var pg={exports:{}},hg={exports:{}};!function(t){function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(hg),function(t){var e=hg.exports.default,r=sg.exports;t.exports=function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return r(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(pg);var dg={exports:{}};!function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(dg);var vg={exports:{}};!function(t){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports}(vg),Object.defineProperty(ag,"__esModule",{value:!0});var yg=cg.exports,gg=sg.exports,mg=fg.exports,bg=pg.exports,wg=dg.exports,xg=vg.exports;function kg(t){return t&&"object"===On(t)&&"default"in t?t:{default:t}}var Sg=kg(ug.exports),Og=kg(yg),Ag=kg(gg),Eg=kg(mg),jg=kg(bg),Tg=kg(wg),_g=kg(xg);function Lg(){}function Rg(){Rg.init.call(this)}function Ig(t){return void 0===t._maxListeners?Rg.defaultMaxListeners:t._maxListeners}function Pg(t,e,r){if(e)t.call(r);else for(var n=t.length,o=qg(t,n),i=0;i<n;++i)o[i].call(r)}function Cg(t,e,r,n){if(e)t.call(r,n);else for(var o=t.length,i=qg(t,o),a=0;a<o;++a)i[a].call(r,n)}function Dg(t,e,r,n,o){if(e)t.call(r,n,o);else for(var i=t.length,a=qg(t,i),u=0;u<i;++u)a[u].call(r,n,o)}function Mg(t,e,r,n,o,i){if(e)t.call(r,n,o,i);else for(var a=t.length,u=qg(t,a),c=0;c<a;++c)u[c].call(r,n,o,i)}function Ug(t,e,r,n){if(e)t.apply(r,n);else for(var o=t.length,i=qg(t,o),a=0;a<o;++a)i[a].apply(r,n)}function Ng(t,e,r,n){var o,i,a,u;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=t._events)?(i.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),i=t._events),a=i[e]):(i=t._events=new Lg,t._eventsCount=0),a){if("function"==typeof a?a=i[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(o=Ig(t))&&o>0&&a.length>o){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=a.length,u=c,"function"==typeof console.warn?console.warn(u):console.log(u)}}else a=i[e]=r,++t._eventsCount;return t}function Fg(t,e,r){var n=!1;function o(){t.removeListener(e,o),n||(n=!0,r.apply(t,arguments))}return o.listener=r,o}function Bg(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function qg(t,e){for(var r=new Array(e);e--;)r[e]=t[e];return r}function $g(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Tg.default(t);if(e){var o=Tg.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jg.default(this,r)}}Lg.prototype=Object.create(null),Rg.EventEmitter=Rg,Rg.usingDomains=!1,Rg.prototype.domain=void 0,Rg.prototype._events=void 0,Rg.prototype._maxListeners=void 0,Rg.defaultMaxListeners=10,Rg.init=function(){this.domain=null,Rg.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Lg,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Rg.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Rg.prototype.getMaxListeners=function(){return Ig(this)},Rg.prototype.emit=function(t){var e,r,n,o,i,a,u,c="error"===t;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(u=this.domain,c){if(e=arguments[1],!u){if(e instanceof Error)throw e;var s=new Error('Uncaught, unspecified "error" event. ('+e+")");throw s.context=e,s}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=u,e.domainThrown=!1,u.emit("error",e),!1}if(!(r=a[t]))return!1;var f="function"==typeof r;switch(n=arguments.length){case 1:Pg(r,f,this);break;case 2:Cg(r,f,this,arguments[1]);break;case 3:Dg(r,f,this,arguments[1],arguments[2]);break;case 4:Mg(r,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];Ug(r,f,this,o)}return!0},Rg.prototype.addListener=function(t,e){return Ng(this,t,e,!1)},Rg.prototype.on=Rg.prototype.addListener,Rg.prototype.prependListener=function(t,e){return Ng(this,t,e,!0)},Rg.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Fg(this,t,e)),this},Rg.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Fg(this,t,e)),this},Rg.prototype.removeListener=function(t,e){var r,n,o,i,a;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[t]))return this;if(r===e||r.listener&&r.listener===e)0==--this._eventsCount?this._events=new Lg:(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(o=-1,i=r.length;i-- >0;)if(r[i]===e||r[i].listener&&r[i].listener===e){a=r[i].listener,o=i;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new Lg,this;delete n[t]}else!function(t,e){for(var r=e,n=r+1,o=t.length;n<o;r+=1,n+=1)t[r]=t[n];t.pop()}(r,o);n.removeListener&&this.emit("removeListener",t,a||e)}return this},Rg.prototype.off=function(t,e){return this.removeListener(t,e)},Rg.prototype.removeAllListeners=function(t){var e,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new Lg,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new Lg:delete r[t]),this;if(0===arguments.length){for(var n,o=Object.keys(r),i=0;i<o.length;++i)"removeListener"!==(n=o[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new Lg,this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},Rg.prototype.listeners=function(t){var e,r,n=this._events;return r=n&&(e=n[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(e):[],r},Rg.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):Bg.call(t,e)},Rg.prototype.listenerCount=Bg,Rg.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Gg=function(t){Eg.default(r,t);var e=$g(r);function r(t){var n;return Sg.default(this,r),n=e.call(this),_g.default(Ag.default(n),"timeout",null),_g.default(Ag.default(n),"startTimestamp",-1),n.minDelay=t.min,n.maxDelay=t.max,n.initialDelay=t.initial||0,n.maxAttemptsCount=t.maxAttemptsCount||0,n.maxAttemptsTime=t.maxAttemptsTime||0,n.randomness=t.randomness||0,n.inProgress=!1,n.attemptNum=0,n.prevDelay=0,n.currDelay=0,n}return Og.default(r,[{key:"attempt",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.attemptNum++,this.emit("attempt",this)}},{key:"nextDelay",value:function(t){if("number"==typeof t)return this.prevDelay=0,this.currDelay=t,t;if(0==this.attemptNum)return this.initialDelay;if(1==this.attemptNum)return this.currDelay=this.minDelay,this.currDelay;this.prevDelay=this.currDelay;var e=this.currDelay+this.prevDelay;return this.maxDelay&&e>this.maxDelay&&(this.currDelay=this.maxDelay,e=this.maxDelay),this.currDelay=e,e}},{key:"randomize",value:function(t){var e=t*this.randomness,r=Math.round(Math.random()*e*2-e);return Math.max(0,t+r)}},{key:"scheduleAttempt",value:function(t){var e=this;if(this.maxAttemptsCount&&this.attemptNum>=this.maxAttemptsCount)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt count limit reached"));var r=this.nextDelay(t);if(r=this.randomize(r),this.maxAttemptsTime&&this.startTimestamp+this.maxAttemptsTime<Date.now()+r)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt time limit reached"));this.timeout=setTimeout((function(){return e.attempt()}),r)}},{key:"cleanup",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}},{key:"start",value:function(){if(this.inProgress)throw new Error("Retrier is already in progress");this.inProgress=!0,this.startTimestamp=Date.now(),this.scheduleAttempt(this.initialDelay)}},{key:"cancel",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.emit("cancelled"))}},{key:"succeeded",value:function(t){this.emit("succeeded",t)}},{key:"failed",value:function(t,e){if(this.timeout)throw new Error("Retrier attempt is already in progress");this.scheduleAttempt(e)}}]),r}(Rg),Wg=function(t){Eg.default(r,t);var e=$g(r);function r(t){var n;return Sg.default(this,r),n=e.call(this),_g.default(Ag.default(n),"resolve",(function(){})),_g.default(Ag.default(n),"reject",(function(){})),n.retrier=new Gg(t),n}return Og.default(r,[{key:"run",value:function(t){var e=this;return this.retrier.on("attempt",(function(){t().then((function(t){return e.retrier.succeeded(t)})).catch((function(t){return e.retrier.failed(t)}))})),this.retrier.on("succeeded",(function(t){return e.resolve(t)})),this.retrier.on("cancelled",(function(){return e.reject(new Error("Cancelled"))})),this.retrier.on("failed",(function(t){return e.reject(t)})),new Promise((function(t,r){e.resolve=t,e.reject=r,e.retrier.start()}))}},{key:"cancel",value:function(){this.retrier.cancel()}}]),r}(Rg);function zg(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Tg.default(t);if(e){var o=Tg.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jg.default(this,r)}}function Vg(t){return null!=t}var Hg=function(t){Eg.default(r,t);var e=zg(r);function r(t){var n;Sg.default(this,r),n=e.call(this),_g.default(Ag.default(n),"backoffDelay",0),_g.default(Ag.default(n),"nextBackoffDelay",0),_g.default(Ag.default(n),"backoffNumber",0),_g.default(Ag.default(n),"timeoutID",null),_g.default(Ag.default(n),"maxNumberOfRetry",-1);var o=t=t||{},i=o.initialDelay,a=o.maxDelay,u=o.randomisationFactor,c=o.factor;if(Vg(i)&&i<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(Vg(a)&&a<=1)throw new Error("The maximal timeout must be greater than 1.");if(Vg(u)&&(u<0||u>1))throw new Error("The randomisation factor must be between 0 and 1.");if(Vg(c)&&c<=1)throw new Error("Exponential factor should be greater than 1.");if(n.initialDelay=i||100,n.maxDelay=a||1e4,n.maxDelay<=n.initialDelay)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");return n.randomisationFactor=u||0,n.factor=c||2,n.reset(),n}return Og.default(r,[{key:"backoff",value:function(t){null==this.timeoutID&&(this.backoffNumber===this.maxNumberOfRetry?(this.emit("fail",t),this.reset()):(this.backoffDelay=this.next(),this.timeoutID=setTimeout(this.onBackoff.bind(this),this.backoffDelay),this.emit("backoff",this.backoffNumber,this.backoffDelay,t)))}},{key:"reset",value:function(){this.backoffDelay=0,this.nextBackoffDelay=this.initialDelay,this.backoffNumber=0,this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=null}},{key:"failAfter",value:function(t){if(t<=0)throw new Error("Expected a maximum number of retry greater than 0 but got ".concat(t));this.maxNumberOfRetry=t}},{key:"next",value:function(){this.backoffDelay=Math.min(this.nextBackoffDelay,this.maxDelay),this.nextBackoffDelay=this.backoffDelay*this.factor;var t=1+Math.random()*this.randomisationFactor;return Math.min(this.maxDelay,Math.round(this.backoffDelay*t))}},{key:"onBackoff",value:function(){this.timeoutID=null,this.emit("ready",this.backoffNumber,this.backoffDelay),this.backoffNumber++}}],[{key:"exponential",value:function(t){return new r(t)}}]),r}(Rg);ag.AsyncRetrier=Wg,ag.Backoff=Hg;var Yg=ag.Retrier=Gg,Jg=Nl.scope("Network"),Kg=function(){function t(e,r){bn(this,t),this.config=e,this.transport=r}return xn(t,[{key:"backoffConfig",value:function(){return Object.assign(rp.backoffConfigDefault,this.config.backoffConfigOverride)}},{key:"retryWhenThrottled",value:function(){var t,e;return null!==(t=null!==(e=this.config.retryWhenThrottledOverride)&&void 0!==e?e:rp.retryWhenThrottledDefault)&&void 0!==t&&t}},{key:"executeWithRetry",value:function(t,e){var r=this;return new Bs(function(){var n=$s(wf.mark((function n(o,i,a){var u,c;return wf.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:u=new Yg(r.backoffConfig()),c=[502,503,504],e&&c.push(429),a((function(){u.cancel(),u.removeAllListeners()})),u.on("attempt",$s(wf.mark((function e(){var r,n;return wf.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=t(),a((function(){r.cancel(),u.cancel(),u.removeAllListeners()})),e.next=5,r;case 5:n=e.sent,u.succeeded(n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),c.indexOf(e.t0.status)>-1||"Twilsock disconnected"===e.t0.message?u.failed(e.t0):(u.removeAllListeners(),u.cancel(),i(e.t0));case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))),u.on("succeeded",(function(t){o(t)})),u.on("cancelled",(function(t){return i(t)})),u.on("failed",(function(t){return i(t)})),u.start();case 9:case"end":return n.stop()}}),n)})));return function(t,e,r){return n.apply(this,arguments)}}())}},{key:"get",value:function(t){var e=this;return new Bs(function(){var r=$s(wf.mark((function r(n,o,i){var a,u,c;return wf.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={"X-Twilio-Token":e.config.token},u=e.executeWithRetry((function(){return e.transport.get(t,a)}),e.retryWhenThrottled()),Jg.trace("sending GET request to ",t," headers ",a),i((function(){return u.cancel()})),r.prev=4,r.next=7,u;case 7:c=r.sent,Jg.trace("response",c),n(c),r.next=16;break;case 12:r.prev=12,r.t0=r.catch(4),Jg.debug("get() error ".concat(r.t0)),o(r.t0);case 16:case"end":return r.stop()}}),r,null,[[4,12]])})));return function(t,e,n){return r.apply(this,arguments)}}())}},{key:"post",value:function(t,r,n,o,i){var a=this,u={"X-Twilio-Token":this.config.token};"undefined"!=typeof FormData&&n instanceof FormData||!o||Object.assign(u,{"Content-Type":o});var c=new URL(t);return r&&c.searchParams.append("Category",r),i&&c.searchParams.append("Filename",i),new Bs(function(){var r=$s(wf.mark((function r(o,i,s){var f,l;return wf.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return f=a.transport.post(c.href,u,n),s((function(){return f.cancel()})),Jg.trace("sending POST request to ".concat(t," with headers ").concat(u)),r.prev=3,r.next=6,f;case 6:l=r.sent,r.next=17;break;case 9:if(r.prev=9,r.t0=r.catch(3),!(void 0===e.XMLHttpRequest&&n instanceof FormData)){r.next=14;break}return i(new TypeError("Posting FormData supported only with browser engine's FormData")),r.abrupt("return");case 14:return Jg.debug("post() error ".concat(r.t0)),i(r.t0),r.abrupt("return");case 17:Jg.trace("response",l),o(l);case 19:case"end":return r.stop()}}),r,null,[[3,9]])})));return function(t,e,n){return r.apply(this,arguments)}}())}}]),t}(),Xg={},Zg=Er,Qg=O,tm=function(){var t=!1,e=/[ac]/;return e.exec=function(){return t=!0,/./.exec.apply(this,arguments)},!0===e.test("abc")&&t}(),em=/./.test;Zg({target:"RegExp",proto:!0,forced:!tm},{test:function(t){if("function"!=typeof this.exec)return em.call(this,t);var e=this.exec(t);if(null!==e&&!Qg(e))throw new Error("RegExp exec method returned something other than an Object or null");return!!e}});var rm={},nm=ht;rm.f=nm;var om=o,im=tt,am=rm,um=Mt.f,cm=function(t){var e=om.Symbol||(om.Symbol={});im(e,t)||um(e,t,{value:am.f(t)})},sm=Er,fm=o,lm=j,pm=u,hm=N,dm=a,vm=tt,ym=kf,gm=O,mm=q,bm=Nt,wm=X,xm=S,km=xt,Sm=Wc,Om=d,Am=tn,Em=Ur,jm=Re,Tm=Yu,_m=er,Lm=i,Rm=Mt,Im=c,Pm=Vt,Cm=Ht.exports,Dm=G.exports,Mm=ue,Um=nt,Nm=ht,Fm=rm,Bm=cm,qm=Lr,$m=ke,Gm=il.forEach,Wm=ae("hidden"),zm="Symbol",Vm=Nm("toPrimitive"),Hm=$m.set,Ym=$m.getterFor(zm),Jm=Object.prototype,Km=fm.Symbol,Xm=lm("JSON","stringify"),Zm=Lm.f,Qm=Rm.f,tb=Tm.f,eb=Im.f,rb=Dm("symbols"),nb=Dm("op-symbols"),ob=Dm("string-to-symbol-registry"),ib=Dm("symbol-to-string-registry"),ab=Dm("wks"),ub=fm.QObject,cb=!ub||!ub.prototype||!ub.prototype.findChild,sb=pm&&dm((function(){return 7!=Am(Qm({},"a",{get:function(){return Qm(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Zm(Jm,e);n&&delete Jm[e],Qm(t,e,r),n&&t!==Jm&&Qm(Jm,e,n)}:Qm,fb=function(t,e){var r=rb[t]=Am(Km.prototype);return Hm(r,{type:zm,tag:t,description:e}),pm||(r.description=e),r},lb=function(t,e,r){t===Jm&&lb(nb,e,r),bm(t);var n=km(e);return bm(r),vm(rb,n)?(r.enumerable?(vm(t,Wm)&&t[Wm][n]&&(t[Wm][n]=!1),r=Am(r,{enumerable:Om(0,!1)})):(vm(t,Wm)||Qm(t,Wm,Om(1,{})),t[Wm][n]=!0),sb(t,n,r)):Qm(t,n,r)},pb=function(t,e){bm(t);var r=xm(e),n=Em(r).concat(yb(r));return Gm(n,(function(e){pm&&!hb.call(r,e)||lb(t,e,r[e])})),t},hb=function(t){var e=km(t),r=eb.call(this,e);return!(this===Jm&&vm(rb,e)&&!vm(nb,e))&&(!(r||!vm(this,e)||!vm(rb,e)||vm(this,Wm)&&this[Wm][e])||r)},db=function(t,e){var r=xm(t),n=km(e);if(r!==Jm||!vm(rb,n)||vm(nb,n)){var o=Zm(r,n);return!o||!vm(rb,n)||vm(r,Wm)&&r[Wm][n]||(o.enumerable=!0),o}},vb=function(t){var e=tb(xm(t)),r=[];return Gm(e,(function(t){vm(rb,t)||vm(Mm,t)||r.push(t)})),r},yb=function(t){var e=t===Jm,r=tb(e?nb:xm(t)),n=[];return Gm(r,(function(t){!vm(rb,t)||e&&!vm(Jm,t)||n.push(rb[t])})),n};(hm||(Km=function(){if(this instanceof Km)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Sm(arguments[0]):void 0,e=Um(t),r=function(t){this===Jm&&r.call(nb,t),vm(this,Wm)&&vm(this[Wm],e)&&(this[Wm][e]=!1),sb(this,e,Om(1,t))};return pm&&cb&&sb(Jm,e,{configurable:!0,set:r}),fb(e,t)},Cm(Km.prototype,"toString",(function(){return Ym(this).tag})),Cm(Km,"withoutSetter",(function(t){return fb(Um(t),t)})),Im.f=hb,Rm.f=lb,Lm.f=db,jm.f=Tm.f=vb,_m.f=yb,Fm.f=function(t){return fb(Nm(t),t)},pm&&(Qm(Km.prototype,"description",{configurable:!0,get:function(){return Ym(this).description}}),Cm(Jm,"propertyIsEnumerable",hb,{unsafe:!0}))),sm({global:!0,wrap:!0,forced:!hm,sham:!hm},{Symbol:Km}),Gm(Em(ab),(function(t){Bm(t)})),sm({target:zm,stat:!0,forced:!hm},{for:function(t){var e=Sm(t);if(vm(ob,e))return ob[e];var r=Km(e);return ob[e]=r,ib[r]=e,r},keyFor:function(t){if(!mm(t))throw TypeError(t+" is not a symbol");if(vm(ib,t))return ib[t]},useSetter:function(){cb=!0},useSimple:function(){cb=!1}}),sm({target:"Object",stat:!0,forced:!hm,sham:!pm},{create:function(t,e){return void 0===e?Am(t):pb(Am(t),e)},defineProperty:lb,defineProperties:pb,getOwnPropertyDescriptor:db}),sm({target:"Object",stat:!0,forced:!hm},{getOwnPropertyNames:vb,getOwnPropertySymbols:yb}),sm({target:"Object",stat:!0,forced:dm((function(){_m.f(1)}))},{getOwnPropertySymbols:function(t){return _m.f(wm(t))}}),Xm)&&sm({target:"JSON",stat:!0,forced:!hm||dm((function(){var t=Km();return"[null]"!=Xm([t])||"{}"!=Xm({a:t})||"{}"!=Xm(Object(t))}))},{stringify:function(t,e,r){for(var n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e,(gm(e)||void 0!==t)&&!mm(t))return ym(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!mm(e))return e}),o[1]=e,Xm.apply(null,o)}});Km.prototype[Vm]||Pm(Km.prototype,Vm,Km.prototype.valueOf),qm(Km,zm),Mm[Wm]=!0;var gb=Er,mb=u,bb=o,wb=tt,xb=O,kb=Mt.f,Sb=fr,Ob=bb.Symbol;if(mb&&"function"==typeof Ob&&(!("description"in Ob.prototype)||void 0!==Ob().description)){var Ab={},Eb=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof Eb?new Ob(t):void 0===t?Ob():Ob(t);return""===t&&(Ab[e]=!0),e};Sb(Eb,Ob);var jb=Eb.prototype=Ob.prototype;jb.constructor=Eb;var Tb=jb.toString,_b="Symbol(test)"==String(Ob("test")),Lb=/^Symbol\((.*)\)[^)]+$/;kb(jb,"description",{configurable:!0,get:function(){var t=xb(this)?this.valueOf():this,e=Tb.call(t);if(wb(Ab,t))return"";var r=_b?e.slice(7,-1):e.replace(Lb,"$1");return""===r?void 0:r}}),gb({global:!0,forced:!0},{Symbol:Eb})}cm("iterator");var Rb=u,Ib=Mt.f,Pb=Function.prototype,Cb=Pb.toString,Db=/^\s*function ([^ (]*)/,Mb="name";Rb&&!(Mb in Pb)&&Ib(Pb,Mb,{configurable:!0,get:function(){try{return Cb.call(this).match(Db)[1]}catch(t){return""}}});var Ub={exports:{}},Nb={exports:{}};!function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports}(Nb);var Fb={exports:{}};!function(t){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}},t.exports.__esModule=!0,t.exports.default=t.exports}(Fb);var Bb={exports:{}},qb={exports:{}};!function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports}(qb),function(t){var e=qb.exports;t.exports=function(t,r){if(t){if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports}(Bb);var $b={exports:{}};!function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports}($b),function(t){var e=Nb.exports,r=Fb.exports,n=Bb.exports,o=$b.exports;t.exports=function(t,i){return e(t)||r(t,i)||n(t,i)||o()},t.exports.__esModule=!0,t.exports.default=t.exports}(Ub);var Gb={exports:{}},Wb={exports:{}};!function(t){var e=qb.exports;t.exports=function(t){if(Array.isArray(t))return e(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(Wb);var zb={exports:{}};!function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(zb);var Vb={exports:{}};!function(t){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports}(Vb),function(t){var e=Wb.exports,r=zb.exports,n=Bb.exports,o=Vb.exports;t.exports=function(t){return e(t)||r(t)||n(t)||o()},t.exports.__esModule=!0,t.exports.default=t.exports}(Gb);var Hb=Ve.includes,Yb=tu;Er({target:"Array",proto:!0},{includes:function(t){return Hb(this,t,arguments.length>1?arguments[1]:void 0)}}),Yb("includes");var Jb=O,Kb=Math.floor;Er({target:"Number",stat:!0},{isInteger:function(t){return!Jb(t)&&isFinite(t)&&Kb(t)===t}});var Xb=w,Zb=Wc,Qb="[\t\n\v\f\r \u2028\u2029\ufeff]",tw=RegExp("^"+Qb+Qb+"*"),ew=RegExp(Qb+Qb+"*$"),rw=function(t){return function(e){var r=Zb(Xb(e));return 1&t&&(r=r.replace(tw,"")),2&t&&(r=r.replace(ew,"")),r}},nw={start:rw(1),end:rw(2),trim:rw(3)},ow=u,iw=o,aw=mr,uw=Ht.exports,cw=tt,sw=y,fw=yc,lw=q,pw=mt,hw=a,dw=tn,vw=Re.f,yw=i.f,gw=Mt.f,mw=nw.trim,bw="Number",ww=iw.Number,xw=ww.prototype,kw=sw(dw(xw))==bw,Sw=function(t){if(lw(t))throw TypeError("Cannot convert a Symbol value to a number");var e,r,n,o,i,a,u,c,s=pw(t,"number");if("string"==typeof s&&s.length>2)if(43===(e=(s=mw(s)).charCodeAt(0))||45===e){if(88===(r=s.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(s.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=s.slice(2)).length,u=0;u<a;u++)if((c=i.charCodeAt(u))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(aw(bw,!ww(" 0o1")||!ww("0b1")||ww("+0x1"))){for(var Ow,Aw=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof Aw&&(kw?hw((function(){xw.valueOf.call(r)})):sw(r)!=bw)?fw(new ww(Sw(e)),r,Aw):Sw(e)},Ew=ow?vw(ww):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),jw=0;Ew.length>jw;jw++)cw(ww,Ow=Ew[jw])&&!cw(Aw,Ow)&&gw(Aw,Ow,yw(ww,Ow));Aw.prototype=xw,xw.constructor=Aw,uw(iw,bw,Aw)}var Tw=u,_w=Ur,Lw=S,Rw=c.f,Iw=function(t){return function(e){for(var r,n=Lw(e),o=_w(n),i=o.length,a=0,u=[];i>a;)r=o[a++],Tw&&!Rw.call(n,r)||u.push(t?[r,n[r]]:n[r]);return u}},Pw={entries:Iw(!0),values:Iw(!1)}.entries;Er({target:"Object",stat:!0},{entries:function(t){return Pw(t)}}),Object.defineProperty(Xg,"__esModule",{value:!0});var Cw=Ub.exports,Dw=Gb.exports,Mw=cg.exports,Uw=ug.exports,Nw=fg.exports,Fw=pg.exports,Bw=dg.exports;function qw(t){return t&&"object"===On(t)&&"default"in t?t:{default:t}}var $w=qw(hg.exports),Gw=qw(Cw),Ww=qw(Dw),zw=qw(Mw),Vw=qw(Uw),Hw=qw(Nw),Yw=qw(Fw),Jw=qw(Bw),Kw=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return{checks:e}};function Xw(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return Zw(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zw(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Zw(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Qw=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Kw((function(t){var r,n=!1,o=[],i=Xw(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;"string"!=typeof a?(n=n||t instanceof a,o.push("an instance of ".concat(a.name))):(n=n||$w.default(t)===a,o.push("of type ".concat(a)))}}catch(t){i.e(t)}finally{i.f()}return[n,o]}))};function tx(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return ex(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ex(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function ex(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function rx(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=Jw.default(t);if(e){var o=Jw.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Yw.default(this,r)}}function nx(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return ox(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ox(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function ox(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ix=function(t,e){if(e.length>t.length)throw new Error("Expected at most ".concat(t.length," argument(s), but got ").concat(e.length));for(;e.length<t.length;)e.push(void 0);var r,n=nx(e.entries());try{for(n.s();!(r=n.n()).done;){var o=Gw.default(r.value,2),i=o[0],a=o[1],u=sx(t[i],a),c=Gw.default(u,4),s=c[0],f=c[1],l=c[2],p=c[3];if(!s)throw new Error("Argument ".concat(i+1," is expected to be ").concat(l).concat(p," but got ").concat(f))}}catch(t){n.e(t)}finally{n.f()}},ax=function(t){var e,r,n;(["undefined","boolean","number","bigint","string"].includes($w.default(t))&&(r="string"==typeof t?'"'.concat(t,'"'):"".concat(t)),"object"===$w.default(t)&&"Object"!==(null==t||null===(e=t.constructor)||void 0===e?void 0:e.name))&&(r=null===t?"null":"instance of ".concat(null==t||null===(n=t.constructor)||void 0===n?void 0:n.name));return r||(r=$w.default(t)),r},ux=function(t){var e,r=[],n=nx(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r.push(cx(o))}}catch(t){n.e(t)}finally{n.f()}return r},cx=function(t){var e,r=[],n=nx(Array.isArray(t)?t:[t]);try{for(n.s();!(e=n.n()).done;){var o=e.value;"string"!=typeof o&&"function"!=typeof o?r.push(o):r.push(Qw(o))}}catch(t){n.e(t)}finally{n.f()}return r},sx=function(t,e){var r,n,o=[],i=!1,a=nx(t);try{for(a.s();!(n=a.n()).done;){var u,c=nx(n.value.checks);try{for(c.s();!(u=c.n()).done;){var s=(0,u.value)(e),f=Gw.default(s,3),l=f[0],p=f[1],h=f[2];i=i||l,!r&&h&&(r=h),p&&(o=[].concat(Ww.default(o),"string"==typeof p?[p]:Ww.default(p)))}}catch(t){c.e(t)}finally{c.f()}}}catch(t){a.e(t)}finally{a.f()}if(i)return[!0];var d=r||ax(e),v=o.length-1;return[!1,d,v>0?"".concat(o.slice(0,v).join(", ")," or ").concat(o[v]):o.join(", "),v>1?";":","]};function fx(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return lx(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lx(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function lx(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var px=Kw((function(t){return["string"==typeof t&&t.length>0,"a non-empty string"]})),hx=Kw((function(t){return["number"==typeof t&&Number.isInteger(t)&&t>=0,"a non-negative integer"]})),dx=Kw((function(t){return["object"===$w.default(t)&&null!==t&&!Array.isArray(t),"a pure object (non-null and non-array)"]}));function vx(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return yx(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yx(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function yx(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}Xg.array=function(t,e){return Kw((function(r){if(!Array.isArray(r))return[!1,"an array of ".concat(t)];var n,o=vx(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Gw.default(n.value,2),a=i[0],u=i[1],c=sx(cx(e),u),s=Gw.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"a valid array of ".concat(t," (index ").concat(a," should be ").concat(p,")"),"malformed array of ".concat(t," (index ").concat(a," is ").concat(l,")")]}}catch(t){o.e(t)}finally{o.f()}return[!0]}))},Xg.custom=Kw;var gx=Xg.literal=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Kw((function(t){var r,n=!1,o=[],i=tx(e);try{for(i.s();!(r=i.n()).done;){var a=r.value;n=n||t===a,o.push("string"==typeof a?'"'.concat(a,'"'):"".concat(a))}}catch(t){i.e(t)}finally{i.f()}return[n,o]}))};Xg.nonEmptyArray=function(t,e){return Kw((function(r){if(!Array.isArray(r)||r.length<1)return[!1,"a non-empty array of ".concat(t)];var n,o=fx(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Gw.default(n.value,2),a=i[0],u=i[1],c=sx(cx(e),u),s=Gw.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"a valid non-empty array of ".concat(t," (index ").concat(a," should be ").concat(p,")"),"malformed array of ".concat(t," (index ").concat(a," is ").concat(l,")")]}}catch(t){o.e(t)}finally{o.f()}return[!0]}))};var mx=Xg.nonEmptyString=px;Xg.nonNegativeInteger=hx,Xg.objectSchema=function(t,e){return Kw((function(r){if("object"!==$w.default(r)||null===r||Array.isArray(r))return[!1,"valid ".concat(t," (should be a pure object)")];for(var n=0,o=Object.entries(e);n<o.length;n++){var i=Gw.default(o[n],2),a=i[0],u=i[1],c=sx(cx(u),r[a]),s=Gw.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"valid ".concat(t,' (key "').concat(a,'" should be ').concat(p,")"),"malformed ".concat(t,' (key "').concat(a,'" is ').concat(l,")")]}return[!0]}))};var bx=Xg.pureObject=dx;Xg.runtimeTypeValidation=ix,Xg.stringifyReceivedType=ax,Xg.type=Qw;var wx,xx=Xg.validateConstructorTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ux(e);return function(t){return function(t){Hw.default(r,t);var e=rx(r);function r(){Vw.default(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return ix(n,o),e.call.apply(e,[this].concat(o))}return zw.default(r)}(t)}},kx=Xg.validateTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ux(e);return function(t,e,r){if("function"!=typeof r.value)throw new Error("The validateTypes decorator can only be applied to methods");var o=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return ix(n,e),o.apply(this,e)}}},Sx=Xg.validateTypesAsync=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ux(e);return function(t,e,r){if("function"!=typeof r.value)throw new Error("The validateTypesAsync decorator can only be applied to methods");var o=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];try{ix(n,e)}catch(t){return Promise.reject(t)}return o.apply(this,e)}}},Ox=Nl.scope("");return t.default=(wx=function(){function t(e,r,n){var o,i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};bn(this,t),this.options=a,this.options.logLevel=null!==(o=this.options.logLevel)&&void 0!==o?o:"silent",this.config=new rp(e,r,n,this.options),Ox.setLevel(this.options.logLevel),this.options.transport=null!==(i=this.options.transport)&&void 0!==i?i:new rd,this.transport=this.options.transport,this.network=new Kg(this.config,this.transport)}return xn(t,[{key:"updateToken",value:function(t){Ox.info("updateToken"),this.config.updateToken(t)}},{key:"get",value:function(t){var e=this;return new Bs(function(){var r=$s(wf.mark((function r(n,o,i){var a,u;return wf.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=e.network.get("".concat(e.config.mediaUrl,"/").concat(t)),i((function(){return a.cancel()})),r.prev=2,r.next=5,a;case 5:u=r.sent,n(new np(e.config,e.network,u.body)),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),o(r.t0);case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(t,e,n){return r.apply(this,arguments)}}())}},{key:"post",value:function(t,e,r,n){var o=this;return new Bs(function(){var i=$s(wf.mark((function i(a,u,c){var s,f;return wf.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=o.network.post(o.config.mediaUrl,null!=r?r:"media",e,t,n),c((function(){return s.cancel()})),i.prev=2,i.next=5,s;case 5:f=i.sent,a(new np(o.config,o.network,f.body)),i.next=12;break;case 9:i.prev=9,i.t0=i.catch(2),u(i.t0);case 12:case"end":return i.stop()}}),i,null,[[2,9]])})));return function(t,e,r){return i.apply(this,arguments)}}())}},{key:"postFormData",value:function(t,e){var r=this;return new Bs(function(){var n=$s(wf.mark((function n(o,i,a){var u,c;return wf.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.network.post(r.config.mediaUrl,null!=e?e:"media",t),a((function(){return u.cancel()})),n.prev=2,n.next=5,u;case 5:c=n.sent,o(new np(r.config,r.network,c.body)),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),i(n.t0);case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(t,e,r){return n.apply(this,arguments)}}())}},{key:"mediaSetGet",value:function(t){var e=this;return new Bs(function(){var r=$s(wf.mark((function r(n,o,i){var a,u,c,s;return wf.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={command:"get",list:t.map((function(t){return{media_sid:t}}))},u=e.network.post("".concat(e.config.mediaSetUrl),null,a,"application/json"),i((function(){return u.cancel()})),r.prev=3,r.next=6,u;case 6:c=r.sent,s=c.body.map((function(t){if(200===t.code)return new np(e.config,e.network,t.media_record);o("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"))})),n(s),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(3),o(r.t0);case 14:case"end":return r.stop()}}),r,null,[[3,11]])})));return function(t,e,n){return r.apply(this,arguments)}}())}},{key:"mediaSetGetContentUrls",value:function(t){var e=this;return new Bs(function(){var r=$s(wf.mark((function r(n,o,i){var a,u,c,s;return wf.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={command:"get",list:t.map((function(t){return{media_sid:t}}))},u=e.network.post("".concat(e.config.mediaSetUrl),null,a,"application/json"),i((function(){return u.cancel()})),r.prev=3,r.next=6,u;case 6:c=r.sent,s=new Map,c.body.forEach((function(t){200===t.code?s.set(t.media_record.sid,t.media_record.links.content_direct_temporary):o("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"))})),n(s),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(3),o(r.t0);case 15:case"end":return r.stop()}}),r,null,[[3,12]])})));return function(t,e,n){return r.apply(this,arguments)}}())}}]),t}(),Ln(wx,"version","0.6.4"),wx),ml([kx(mx),bl("design:type",Function),bl("design:paramtypes",[String]),bl("design:returntype",void 0)],t.default.prototype,"updateToken",null),ml([Sx(mx),bl("design:type",Function),bl("design:paramtypes",[String]),bl("design:returntype",Bs)],t.default.prototype,"get",null),t.default=ml([xx(mx,mx,[mx,gx(null)],[bx,"undefined"]),bl("design:paramtypes",[String,String,Object,Object])],t.default),t.CancellablePromise=Bs,t.Client=t.default,t.McsClient=t.default,t.McsMedia=np,t.Media=np,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
|