@twilio/mcs-client 0.5.3 → 0.6.0-rc.2
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/CHANGELOG.md +17 -0
- package/builds/browser.js +517 -362
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +54 -26
- package/builds/lib.js +517 -362
- package/builds/lib.js.map +1 -1
- package/builds/twilio-mcs-client.js +10206 -9443
- package/builds/twilio-mcs-client.min.js +24 -38
- package/dist/cancellable-promise.js +88 -0
- package/dist/cancellable-promise.js.map +1 -0
- package/dist/client.js +88 -23
- package/dist/client.js.map +1 -1
- package/dist/configuration.js.map +1 -1
- package/dist/index.js +5 -9
- package/dist/index.js.map +1 -1
- package/dist/logger.js +2 -4
- package/dist/logger.js.map +1 -1
- package/dist/media.js +15 -22
- package/dist/media.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +1 -1
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/packages/mcs-client/package.json.js +1 -1
- package/dist/services/network.js +48 -31
- package/dist/services/network.js.map +1 -1
- package/dist/services/transport.js +11 -5
- package/dist/services/transport.js.map +1 -1
- package/dist/services/transporterror.js.map +1 -1
- package/package.json +13 -11
|
@@ -15,48 +15,34 @@ 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,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 n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)}))}}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},a=function(t){return t&&t.Math==Math&&t},u=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof i&&i)||function(){return this}()||Function("return this")(),c={},s=function(t){try{return!!t()}catch(t){return!0}},f=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l={},p={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,d=h&&!p.call({1:2},1);l.f=d?function(t){var e=h(this,t);return!!e&&e.enumerable}:p;var v,y,g=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},m={}.toString,b=function(t){return m.call(t).slice(8,-1)},w=b,x="".split,S=s((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==w(t)?x.call(t,""):Object(t)}:Object,k=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},A=S,E=k,O=function(t){return A(E(t))},j=function(t){return"object"==typeof t?null!==t:"function"==typeof t},T=u,L=function(t){return"function"==typeof t?t:void 0},_=function(t,e){return arguments.length<2?L(T[t]):T[t]&&T[t][e]},R=_("navigator","userAgent")||"",I=u,P=R,C=I.process,D=I.Deno,M=C&&C.versions||D&&D.version,U=M&&M.v8;U?y=(v=U.split("."))[0]<4?1:v[0]+v[1]:P&&(!(v=P.match(/Edge\/(\d+)/))||v[1]>=74)&&(v=P.match(/Chrome\/(\d+)/))&&(y=v[1]);var N=y&&+y,F=N,B=s,q=!!Object.getOwnPropertySymbols&&!B((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&F&&F<41})),G=q&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,W=_,z=G?function(t){return"symbol"==typeof t}:function(t){var e=W("Symbol");return"function"==typeof e&&Object(t)instanceof e},$=j,V={exports:{}},H=u,Y=function(t,e){try{Object.defineProperty(H,t,{value:e,configurable:!0,writable:!0})}catch(r){H[t]=e}return e},X=Y,J="__core-js_shared__",K=u[J]||X(J,{}),Z=K;(V.exports=function(t,e){return Z[t]||(Z[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Q=k,tt=function(t){return Object(Q(t))},et=tt,rt={}.hasOwnProperty,nt=Object.hasOwn||function(t,e){return rt.call(et(t),e)},ot=0,it=Math.random(),at=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++ot+it).toString(36)},ut=u,ct=V.exports,st=nt,ft=at,lt=q,pt=G,ht=ct("wks"),dt=ut.Symbol,vt=pt?dt:dt&&dt.withoutSetter||ft,yt=function(t){return st(ht,t)&&(lt||"string"==typeof ht[t])||(lt&&st(dt,t)?ht[t]=dt[t]:ht[t]=vt("Symbol."+t)),ht[t]},gt=j,mt=z,bt=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")},wt=yt("toPrimitive"),xt=function(t,e){if(!gt(t)||mt(t))return t;var r,n=t[wt];if(void 0!==n){if(void 0===e&&(e="default"),r=n.call(t,e),!gt(r)||mt(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),bt(t,e)},St=xt,kt=z,At=function(t){var e=St(t,"string");return kt(e)?e:String(e)},Et=j,Ot=u.document,jt=Et(Ot)&&Et(Ot.createElement),Tt=function(t){return jt?Ot.createElement(t):{}},Lt=Tt,_t=!f&&!s((function(){return 7!=Object.defineProperty(Lt("div"),"a",{get:function(){return 7}}).a})),Rt=f,It=l,Pt=g,Ct=O,Dt=At,Mt=nt,Ut=_t,Nt=Object.getOwnPropertyDescriptor;c.f=Rt?Nt:function(t,e){if(t=Ct(t),e=Dt(e),Ut)try{return Nt(t,e)}catch(t){}if(Mt(t,e))return Pt(!It.f.call(t,e),t[e])};var Ft={},Bt=j,qt=function(t){if(!Bt(t))throw TypeError(String(t)+" is not an object");return t},Gt=f,Wt=_t,zt=qt,$t=At,Vt=Object.defineProperty;Ft.f=Gt?Vt:function(t,e,r){if(zt(t),e=$t(e),zt(r),Wt)try{return Vt(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 Ht=Ft,Yt=g,Xt=f?function(t,e,r){return Ht.f(t,e,Yt(1,r))}:function(t,e,r){return t[e]=r,t},Jt={exports:{}},Kt=K,Zt=Function.toString;"function"!=typeof Kt.inspectSource&&(Kt.inspectSource=function(t){return Zt.call(t)});var Qt,te,ee,re=Kt.inspectSource,ne=re,oe=u.WeakMap,ie="function"==typeof oe&&/native code/.test(ne(oe)),ae=V.exports,ue=at,ce=ae("keys"),se=function(t){return ce[t]||(ce[t]=ue(t))},fe={},le=ie,pe=j,he=Xt,de=nt,ve=K,ye=se,ge=fe,me="Object already initialized",be=u.WeakMap;if(le||ve.state){var we=ve.state||(ve.state=new be),xe=we.get,Se=we.has,ke=we.set;Qt=function(t,e){if(Se.call(we,t))throw new TypeError(me);return e.facade=t,ke.call(we,t,e),e},te=function(t){return xe.call(we,t)||{}},ee=function(t){return Se.call(we,t)}}else{var Ae=ye("state");ge[Ae]=!0,Qt=function(t,e){if(de(t,Ae))throw new TypeError(me);return e.facade=t,he(t,Ae,e),e},te=function(t){return de(t,Ae)?t[Ae]:{}},ee=function(t){return de(t,Ae)}}var Ee={set:Qt,get:te,has:ee,enforce:function(t){return ee(t)?te(t):Qt(t,{})},getterFor:function(t){return function(e){var r;if(!pe(e)||(r=te(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},Oe=u,je=Xt,Te=nt,Le=Y,_e=re,Re=Ee.get,Ie=Ee.enforce,Pe=String(String).split("String");(Jt.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||Te(r,"name")||je(r,"name",e),(o=Ie(r)).source||(o.source=Pe.join("string"==typeof e?e:""))),t!==Oe?(i?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=r:je(t,e,r)):a?t[e]=r:Le(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Re(this).source||_e(this)}));var Ce={},De=Math.ceil,Me=Math.floor,Ue=function(t){return isNaN(t=+t)?0:(t>0?Me:De)(t)},Ne=Ue,Fe=Math.min,Be=function(t){return t>0?Fe(Ne(t),9007199254740991):0},qe=Ue,Ge=Math.max,We=Math.min,ze=function(t,e){var r=qe(t);return r<0?Ge(r+e,0):We(r,e)},$e=O,Ve=Be,He=ze,Ye=function(t){return function(e,r,n){var o,i=$e(e),a=Ve(i.length),u=He(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}},Xe={includes:Ye(!0),indexOf:Ye(!1)},Je=nt,Ke=O,Ze=Xe.indexOf,Qe=fe,tr=function(t,e){var r,n=Ke(t),o=0,i=[];for(r in n)!Je(Qe,r)&&Je(n,r)&&i.push(r);for(;e.length>o;)Je(n,r=e[o++])&&(~Ze(i,r)||i.push(r));return i},er=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],rr=tr,nr=er.concat("length","prototype");Ce.f=Object.getOwnPropertyNames||function(t){return rr(t,nr)};var or={};or.f=Object.getOwnPropertySymbols;var ir=Ce,ar=or,ur=qt,cr=_("Reflect","ownKeys")||function(t){var e=ir.f(ur(t)),r=ar.f;return r?e.concat(r(t)):e},sr=nt,fr=cr,lr=c,pr=Ft,hr=function(t,e){for(var r=fr(e),n=pr.f,o=lr.f,i=0;i<r.length;i++){var a=r[i];sr(t,a)||n(t,a,o(e,a))}},dr=s,vr=/#|\.prototype\./,yr=function(t,e){var r=mr[gr(t)];return r==wr||r!=br&&("function"==typeof e?dr(e):!!e)},gr=yr.normalize=function(t){return String(t).replace(vr,".").toLowerCase()},mr=yr.data={},br=yr.NATIVE="N",wr=yr.POLYFILL="P",xr=yr,Sr=u,kr=c.f,Ar=Xt,Er=Jt.exports,Or=Y,jr=hr,Tr=xr,Lr=function(t,e){var r,n,o,i,a,u=t.target,c=t.global,s=t.stat;if(r=c?Sr:s?Sr[u]||Or(u,{}):(Sr[u]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(a=kr(r,n))&&a.value:r[n],!Tr(c?n:u+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;jr(i,o)}(t.sham||o&&o.sham)&&Ar(i,"sham",!0),Er(r,n,i,t)}},_r=u.Promise,Rr=Jt.exports,Ir=function(t,e,r){for(var n in e)Rr(t,n,e[n],r);return t},Pr=j,Cr=qt,Dr=function(t){if(!Pr(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},Mr=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 Cr(r),Dr(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Ur=Ft.f,Nr=nt,Fr=yt("toStringTag"),Br=function(t,e,r){t&&!Nr(t=r?t:t.prototype,Fr)&&Ur(t,Fr,{configurable:!0,value:e})},qr=_,Gr=Ft,Wr=f,zr=yt("species"),$r=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Vr=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},Hr={},Yr=Hr,Xr=yt("iterator"),Jr=Array.prototype,Kr=function(t){return void 0!==t&&(Yr.Array===t||Jr[Xr]===t)},Zr=$r,Qr=function(t,e,r){if(Zr(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)}},tn={};tn[yt("toStringTag")]="z";var en="[object z]"===String(tn),rn=en,nn=b,on=yt("toStringTag"),an="Arguments"==nn(function(){return arguments}()),un=rn?nn: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),on))?r:an?nn(e):"Object"==(n=nn(e))&&"function"==typeof e.callee?"Arguments":n},cn=un,sn=Hr,fn=yt("iterator"),ln=function(t){if(null!=t)return t[fn]||t["@@iterator"]||sn[cn(t)]},pn=qt,hn=ln,dn=function(t,e){var r=arguments.length<2?hn(t):e;if("function"!=typeof r)throw TypeError(String(t)+" is not iterable");return pn(r.call(t))},vn=qt,yn=function(t,e,r){var n,o;vn(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 vn(n),r},gn=qt,mn=Kr,bn=Be,wn=Qr,xn=dn,Sn=ln,kn=yn,An=function(t,e){this.stopped=t,this.result=e},En=yt("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=qt,Dn=$r,Mn=yt("species"),Un=function(t,e){var r,n=Cn(t).constructor;return void 0===n||null==(r=Cn(n)[Mn])?e:Dn(r)},Nn=_("document","documentElement"),Fn=/(?:ipad|iphone|ipod).*applewebkit/i.test(R),Bn="process"==b(u.process),qn=u,Gn=s,Wn=Qr,zn=Nn,$n=Tt,Vn=Fn,Hn=Bn,Yn=qn.setImmediate,Xn=qn.clearImmediate,Jn=qn.process,Kn=qn.MessageChannel,Zn=qn.Dispatch,Qn=0,to={},eo="onreadystatechange";try{Ln=qn.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){qn.postMessage(String(t),Ln.protocol+"//"+Ln.host)};Yn&&Xn||(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},Xn=function(t){delete to[t]},Hn?_n=function(t){Jn.nextTick(no(t))}:Zn&&Zn.now?_n=function(t){Zn.now(no(t))}:Kn&&!Vn?(In=(Rn=new Kn).port2,Rn.port1.onmessage=oo,_n=Wn(In.postMessage,In,1)):qn.addEventListener&&"function"==typeof postMessage&&!qn.importScripts&&Ln&&"file:"!==Ln.protocol&&!Gn(io)?(_n=io,qn.addEventListener("message",oo,!1)):_n=eo in $n("script")?function(t){zn.appendChild($n("script")).onreadystatechange=function(){zn.removeChild(this),ro(t)}}:function(t){setTimeout(no(t),0)});var ao,uo,co,so,fo,lo,po,ho,vo={set:Yn,clear:Xn},yo=u,go=/ipad|iphone|ipod/i.test(R)&&void 0!==yo.Pebble,mo=/web0s(?!.*chrome)/i.test(R),bo=u,wo=c.f,xo=vo.set,So=Fn,ko=go,Ao=mo,Eo=Bn,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)}:(fo=!0,lo=jo.createTextNode(""),new Oo(ao).observe(lo,{characterData:!0}),so=function(){lo.data=fo=!fo}));var Io=Ro||function(t){var e={fn:t,next:void 0};co&&(co.next=e),uo||(uo=e,so()),co=e},Po={},Co=$r,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,Bo=qt,qo=j,Go=Po,Wo=u,zo="object"==typeof window,$o=Lr,Vo=u,Ho=_,Yo=_r,Xo=Jt.exports,Jo=Ir,Ko=Mr,Zo=Br,Qo=function(t){var e=qr(t),r=Gr.f;Wr&&e&&!e[zr]&&r(e,zr,{configurable:!0,get:function(){return this}})},ti=j,ei=$r,ri=Vr,ni=re,oi=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=wn(e,f,1+l+h),v=function(t){return n&&kn(n,"normal",t),new An(!0,t)},y=function(t){return l?(gn(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=Sn(t)))throw TypeError("Target is not iterable");if(mn(o)){for(i=0,a=bn(t.length);a>i;i++)if((u=y(t[i]))&&u instanceof An)return u;return new An(!1)}n=xn(t,o)}for(c=n.next;!(s=c.call(n)).done;){try{u=y(s.value)}catch(t){kn(n,"throw",t)}if("object"==typeof u&&u&&u instanceof An)return u}return new An(!1)},ii=Pn,ai=Un,ui=vo.set,ci=Io,si=function(t,e){if(Bo(t),qo(e)&&e.constructor===t)return e;var r=Go.f(t);return(0,r.resolve)(e),r.promise},fi=function(t,e){var r=Wo.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))},li=Po,pi=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},hi=Ee,di=xr,vi=zo,yi=Bn,gi=N,mi=yt("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=li.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++],f=o?s.ok:s.fail,l=s.resolve,p=s.reject,h=s.domain;try{f?(o||(2===t.rejection&&Gi(t),t.rejection=1),!0===f?a=n:(h&&h.enter(),a=f(n),h&&(h.exit(),c=!0)),a===s.promise?p(Oi("Promise-chain cycle")):(u=Ui(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&&Bi(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&&fi("Unhandled promise rejection",r)},Bi=function(t){ui.call(Vo,(function(){var e,r=t.facade,n=t.value;if(qi(t)&&(e=pi((function(){yi?Ti.emit("unhandledRejection",n,r):Fi(Pi,r,n)})),t.rejection=yi||qi(t)?2:1,e.error))throw e.value}))},qi=function(t){return 1!==t.rejection&&!t.parent},Gi=function(t){ui.call(Vo,(function(){var e=t.facade;yi?Ti.emit("rejectionHandled",e):Fi("rejectionhandled",e,t.value)}))},Wi=function(t,e,r){return function(n){t(e,n,r)}},zi=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Ni(t,!0))},$i=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,Wi($i,r,t),Wi(zi,r,t))}catch(e){zi(r,e,t)}})):(t.value=e,t.state=1,Ni(t,!1))}catch(e){zi({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(Wi($i,e),Wi(zi,e))}catch(t){zi(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=Jo(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=Wi($i,e),this.reject=Wi(zi,e)},li.f=Li=function(t){return t===Ai||t===No?new Uo(t):_i(t)},"function"==typeof Yo&&ki!==Object.prototype)){Fo=ki.then,Ci||(Xo(ki,"then",(function(t,e){var r=this;return new Ai((function(t,e){Fo.call(r,t,e)})).then(t,e)}),{unsafe:!0}),Xo(ki,"catch",Ei.catch,{unsafe:!0}));try{delete ki.constructor}catch(t){}Ko&&Ko(ki,Ei)}$o({global:!0,wrap:!0,forced:Di},{Promise:Ai}),Zo(Ai,bi,!1),Qo(bi),No=Ho(bi),$o({target:bi,stat:!0,forced:Di},{reject:function(t){var e=Li(this);return e.reject.call(void 0,t),e.promise}}),$o({target:bi,stat:!0,forced:Di},{resolve:function(t){return si(this,t)}}),$o({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=Object.prototype,Yi=Hi.hasOwnProperty,Xi="function"==typeof Symbol?Symbol:{},Ji=Xi.iterator||"@@iterator",Ki=Xi.asyncIterator||"@@asyncIterator",Zi=Xi.toStringTag||"@@toStringTag";function Qi(t,e,r,n){var o=e&&e.prototype instanceof aa?e:aa,i=Object.create(o.prototype),a=new ba(n||[]);return i._invoke=function(t,e,r){var n=ea;return function(o,i){if(n===na)throw new Error("Generator is already running");if(n===oa){if("throw"===o)throw i;return xa()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=ya(a,r);if(u){if(u===ia)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===ea)throw n=oa,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=na;var c=ta(t,e,r);if("normal"===c.type){if(n=r.done?oa:ra,c.arg===ia)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=oa,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function ta(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}var ea="suspendedStart",ra="suspendedYield",na="executing",oa="completed",ia={};function aa(){}function ua(){}function ca(){}var sa={};sa[Ji]=function(){return this};var fa=Object.getPrototypeOf,la=fa&&fa(fa(wa([])));la&&la!==Hi&&Yi.call(la,Ji)&&(sa=la);var pa=ca.prototype=aa.prototype=Object.create(sa);function ha(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function da(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===ua||"GeneratorFunction"===(e.displayName||e.name))}function va(t,e){function r(n,o,i,a){var u=ta(t[n],t,o);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&Yi.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 ya(t,e){var r=t.iterator[e.method];if(r===Vi){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=Vi,ya(t,e),"throw"===e.method))return ia;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return ia}var n=ta(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,ia;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=Vi),e.delegate=null,ia):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,ia)}function ga(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 ma(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function ba(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(ga,this),this.reset(!0)}function wa(t){if(t){var e=t[Ji];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(Yi.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=Vi,e.done=!0,e};return n.next=n}}return{next:xa}}function xa(){return{value:Vi,done:!0}}ua.prototype=pa.constructor=ca,ca.constructor=ua,ca[Zi]=ua.displayName="GeneratorFunction",ha(va.prototype),va.prototype[Ki]=function(){return this},ha(pa),pa[Zi]="Generator",pa[Ji]=function(){return this},pa.toString=function(){return"[object Generator]"},ba.prototype={constructor:ba,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=Vi,this.done=!1,this.delegate=null,this.method="next",this.arg=Vi,this.tryEntries.forEach(ma),!t)for(var e in this)"t"===e.charAt(0)&&Yi.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=Vi)},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=Vi),!!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=Yi.call(o,"catchLoc"),u=Yi.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&&Yi.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,ia):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),ia},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),ma(r),ia}},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;ma(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:wa(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=Vi),ia}};var Sa={wrap:Qi,isGeneratorFunction:da,AsyncIterator:va,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,ca):(t.__proto__=ca,Zi in t||(t[Zi]="GeneratorFunction")),t.prototype=Object.create(pa),t},awrap:function(t){return{__await:t}},async:function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new va(Qi(t,e,r,n),o);return da(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:wa};
|
|
19
|
-
/*! *****************************************************************************
|
|
20
|
-
Copyright (c) Microsoft Corporation.
|
|
21
|
-
|
|
22
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
23
|
-
purpose with or without fee is hereby granted.
|
|
24
|
-
|
|
25
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
26
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
27
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
28
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
29
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
30
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
31
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
32
|
-
***************************************************************************** */function ka(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 Aa(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}var Ea=qt,Oa=yn,ja=At,Ta=Ft,La=g,_a=function(t,e,r){var n=ja(e);n in t?Ta.f(t,n,La(0,r)):t[n]=r},Ra=Qr,Ia=tt,Pa=function(t,e,r,n){try{return n?e(Ea(r)[0],r[1]):e(r)}catch(e){Oa(t,"throw",e)}},Ca=Kr,Da=Be,Ma=_a,Ua=dn,Na=ln,Fa=function(t){var e,r,n,o,i,a,u=Ia(t),c="function"==typeof this?this:Array,s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,p=Na(u),h=0;if(l&&(f=Ra(f,s>2?arguments[2]:void 0,2)),null==p||c==Array&&Ca(p))for(r=new c(e=Da(u.length));e>h;h++)a=l?f(u[h],h):u[h],Ma(r,h,a);else for(i=(o=Ua(u,p)).next,r=new c;!(n=i.call(o)).done;h++)a=l?Pa(o,f,[n.value,h],!0):n.value,Ma(r,h,a);return r.length=h,r},Ba=Fa;Lr({target:"Array",stat:!0,forced:!Pn((function(t){Array.from(t)}))},{from:Ba});var qa,Ga,Wa,za={exports:{}};function $a(t,e){return["".concat((new Date).toISOString()," MCS Client ").concat(t,":")].concat(Array.from(e))}Ga=i,Wa=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 f(t,r,o){var i,a=this,c="loglevel";function f(){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){f()||a.setLevel(t,!1)},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=null==r?"WARN":r),a.setLevel(l,!1)}var l=new f,p={};l.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 f(t,l.getLevel(),l.methodFactory)),e};var h=typeof window!==e?window.log:void 0;return l.noConflict=function(){return typeof window!==e&&window.log===l&&(window.log=h),l},l.getLoggers=function(){return p},l.default=l,l},(qa=za).exports?qa.exports=Wa():Ga.log=Wa();class Va{constructor(t){o(this,"prefix",""),this.prefix=null!=t&&t.length>0?t+" ":""}static scope(t){return new Va(t)}setLevel(t){za.exports.setLevel(t)}static setLevel(t){za.exports.setLevel(t)}trace(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];za.exports.trace.apply(null,$a(this.prefix+"T",e))}debug(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];za.exports.debug.apply(null,$a(this.prefix+"D",e))}info(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];za.exports.info.apply(null,$a(this.prefix+"I",e))}warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];za.exports.warn.apply(null,$a(this.prefix+"W",e))}error(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];za.exports.error.apply(null,$a(this.prefix+"E",e))}static trace(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];za.exports.trace.apply(null,$a("T",e))}static debug(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];za.exports.debug.apply(null,$a("D",e))}static info(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];za.exports.info.apply(null,$a("I",e))}static warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];za.exports.warn.apply(null,$a("W",e))}static error(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];za.exports.error.apply(null,$a("E",e))}}var Ha,Ya=z,Xa=function(t){if(Ya(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},Ja=j,Ka=b,Za=yt("match"),Qa=function(t){var e;return Ja(t)&&(void 0!==(e=t[Za])?!!e:"RegExp"==Ka(t))},tu=Qa,eu=yt("match"),ru=Lr,nu=c.f,ou=Be,iu=Xa,au=function(t){if(tu(t))throw TypeError("The method doesn't accept regular expressions");return t},uu=k,cu=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[eu]=!1,"/./"[t](e)}catch(t){}}return!1},su="".startsWith,fu=Math.min,lu=cu("startsWith");ru({target:"String",proto:!0,forced:!!(lu||(Ha=nu(String.prototype,"startsWith"),!Ha||Ha.writable))&&!lu},{startsWith:function(t){var e=iu(uu(this));au(t);var r=ou(fu(arguments.length>1?arguments[1]:void 0,e.length)),n=iu(t);return su?su.call(e,n,r):e.slice(r,r+n.length)===n}});var pu=(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 hu{constructor(t,e,r,n){var o,i,a,u,c,s,f=null!==(o=null!==(i=n.MCS)&&void 0!==i?i:n)&&void 0!==o?o:{};this.region=null!==(a=null!==(u=f.region)&&void 0!==u?u:n.region)&&void 0!==a?a:"us1",this.mediaUrl=pu(e,this.region),this.mediaSetUrl=r?pu(r):"".concat(this.mediaUrl,"Set"),this.token=t,this.retryWhenThrottledOverride=null===(c=f.retryWhenThrottledOverride)||void 0===c||c,this.backoffConfigOverride=null!==(s=f.backoffConfigOverride)&&void 0!==s?s:hu.backoffConfigDefault}static get backoffConfigDefault(){return{min:1e3,max:4e3,maxAttemptsCount:3}}static get retryWhenThrottledDefault(){return true}updateToken(t){this.token=t}}class du{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 n(Sa.mark((function e(){var r;return Sa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.network.get("".concat(t.config.mediaUrl,"/").concat(t.sid));case 2:return r=e.sent,t._update(r.body),e.abrupt("return",Promise.resolve(t.state.contentDirectUrl));case 5:case"end":return e.stop()}}),e)})))()}getCachedContentUrl(){var t=this;return n(Sa.mark((function e(){return Sa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.state.contentDirectUrl){e.next=2;break}return e.abrupt("return",Promise.resolve(t.state.contentDirectUrl));case 2:return e.next=4,t.getContentUrl();case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))()}_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 vu=$r,yu=tt,gu=S,mu=Be,bu=function(t){return function(e,r,n,o){vu(r);var i=yu(e),a=gu(i),u=mu(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}},wu={left:bu(!1),right:bu(!0)},xu=s,Su=function(t,e){var r=[][t];return!!r&&xu((function(){r.call(null,e||function(){throw 1},1)}))},ku=wu.left,Au=N,Eu=Bn;Lr({target:"Array",proto:!0,forced:!Su("reduce")||!Eu&&Au>79&&Au<83},{reduce:function(t){return ku(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Ou=qt,ju={},Tu=s,Lu=u.RegExp;ju.UNSUPPORTED_Y=Tu((function(){var t=Lu("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),ju.BROKEN_CARET=Tu((function(){var t=Lu("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));var _u,Ru=tr,Iu=er,Pu=Object.keys||function(t){return Ru(t,Iu)},Cu=Ft,Du=qt,Mu=Pu,Uu=f?Object.defineProperties:function(t,e){Du(t);for(var r,n=Mu(e),o=n.length,i=0;o>i;)Cu.f(t,r=n[i++],e[r]);return t},Nu=qt,Fu=Uu,Bu=er,qu=fe,Gu=Nn,Wu=Tt,zu=se("IE_PROTO"),$u=function(){},Vu=function(t){return"<script>"+t+"</"+"script>"},Hu=function(t){t.write(Vu("")),t.close();var e=t.parentWindow.Object;return t=null,e},Yu=function(){try{_u=new ActiveXObject("htmlfile")}catch(t){}var t,e;Yu="undefined"!=typeof document?document.domain&&_u?Hu(_u):((e=Wu("iframe")).style.display="none",Gu.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Vu("document.F=Object")),t.close(),t.F):Hu(_u);for(var r=Bu.length;r--;)delete Yu.prototype[Bu[r]];return Yu()};qu[zu]=!0;var Xu,Ju,Ku=Object.create||function(t,e){var r;return null!==t?($u.prototype=Nu(t),r=new $u,$u.prototype=null,r[zu]=t):r=Yu(),void 0===e?r:Fu(r,e)},Zu=s,Qu=u.RegExp,tc=Zu((function(){var t=Qu(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),ec=s,rc=u.RegExp,nc=ec((function(){var t=rc("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),oc=Xa,ic=function(){var t=Ou(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},ac=ju,uc=V.exports,cc=Ku,sc=Ee.get,fc=tc,lc=nc,pc=RegExp.prototype.exec,hc=uc("native-string-replace",String.prototype.replace),dc=pc,vc=(Xu=/a/,Ju=/b*/g,pc.call(Xu,"a"),pc.call(Ju,"a"),0!==Xu.lastIndex||0!==Ju.lastIndex),yc=ac.UNSUPPORTED_Y||ac.BROKEN_CARET,gc=void 0!==/()??/.exec("")[1];(vc||gc||yc||fc||lc)&&(dc=function(t){var e,r,n,o,i,a,u,c=this,s=sc(c),f=oc(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=dc.call(l,f),c.lastIndex=l.lastIndex,e;var p=s.groups,h=yc&&c.sticky,d=ic.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)),gc&&(r=new RegExp("^"+v+"$(?!\\s)",d)),vc&&(n=c.lastIndex),o=pc.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:vc&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),gc&&o&&o.length>1&&hc.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=cc(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var mc=dc;Lr({target:"RegExp",proto:!0,forced:/./.exec!==mc},{exec:mc});var bc=Jt.exports,wc=mc,xc=s,Sc=yt,kc=Xt,Ac=Sc("species"),Ec=RegExp.prototype,Oc=Ue,jc=Xa,Tc=k,Lc=function(t){return function(e,r){var n,o,i=jc(Tc(e)),a=Oc(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}},_c={codeAt:Lc(!1),charAt:Lc(!0)},Rc=_c.charAt,Ic=b,Pc=mc,Cc=function(t,e,r,n){var o=Sc(t),i=!xc((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!xc((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Ac]=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===wc||a===Ec.exec?i&&!o?{done:!0,value:u.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}));bc(String.prototype,t,c[0]),bc(Ec,o,c[1])}n&&kc(Ec[o],"sham",!0)},Dc=Qa,Mc=qt,Uc=k,Nc=Un,Fc=function(t,e,r){return e+(r?Rc(t,e).length:1)},Bc=Be,qc=Xa,Gc=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"!==Ic(t))throw TypeError("RegExp#exec called on incompatible receiver");return Pc.call(t,e)},Wc=mc,zc=s,$c=ju.UNSUPPORTED_Y,Vc=[].push,Hc=Math.min,Yc=4294967295;Cc("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=qc(Uc(this)),o=void 0===r?Yc:r>>>0;if(0===o)return[];if(void 0===t)return[n];if(!Dc(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=Wc.call(l,n))&&!((a=l.lastIndex)>f&&(c.push(n.slice(f,i.index)),i.length>1&&i.index<n.length&&Vc.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=Uc(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(qc(o),e,r)},function(t,o){var i=Mc(this),a=qc(t),u=r(n,i,a,o,n!==e);if(u.done)return u.value;var c=Nc(i,RegExp),s=i.unicode,f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+($c?"g":"y"),l=new c($c?"^(?:"+i.source+")":i,f),p=void 0===o?Yc:o>>>0;if(0===p)return[];if(0===a.length)return null===Gc(l,a)?[a]:[];for(var h=0,d=0,v=[];d<a.length;){l.lastIndex=$c?0:d;var y,g=Gc(l,$c?a.slice(d):a);if(null===g||(y=Hc(Bc(l.lastIndex+($c?d:0)),a.length))===h)d=Fc(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}]}),!!zc((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]})),$c);class Xc extends Error{constructor(t,e,r,n,o){super(t),this.code=e,this.body=r,this.status=n,this.headers=o}}var Jc=e.XMLHttpRequest||{};function Kc(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}}class Zc{static request(t,e,r,o){return n(Sa.mark((function n(){return Sa.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",new Promise(((n,i)=>{var a=new Jc;for(var u in a.open(t,e,!0),a.onreadystatechange=function(){if(4===a.readyState){var t,e=(t=a.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=Kc(a);if(200<=a.status&&a.status<300)n({status:a.status,headers:e,body:r});else{var o,u,c=null!==(o=a.statusText)&&void 0!==o?o:"NONE";u="string"==typeof r?r&&1===r.split("\n",2).length?r:"":JSON.stringify(r);var s="".concat(a.status,": [").concat(c,"] ").concat(u);i(new Xc(s,a.status,r,c,e))}}},r)a.setRequestHeader(u,r[u]),"Content-Type"===u&&"application/json"===r[u]&&(o=JSON.stringify(o));a.send(o)})));case 1:case"end":return n.stop()}}),n)})))()}get(t,e){return n(Sa.mark((function r(){return Sa.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Zc.request("GET",t,e));case 1:case"end":return r.stop()}}),r)})))()}post(t,e,r){return n(Sa.mark((function n(){return Sa.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Zc.request("POST",t,e,r));case 1:case"end":return n.stop()}}),n)})))()}}var Qc=f,ts=s,es=Pu,rs=or,ns=l,os=tt,is=S,as=Object.assign,us=Object.defineProperty,cs=!as||ts((function(){if(Qc&&1!==as({b:1},as(us({},"a",{enumerable:!0,get:function(){us(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!=as({},t)[r]||es(as({},e)).join("")!=n}))?function(t,e){for(var r=os(t),n=arguments.length,o=1,i=rs.f,a=ns.f;n>o;)for(var u,c=is(arguments[o++]),s=i?es(c).concat(i(c)):es(c),f=s.length,l=0;f>l;)u=s[l++],Qc&&!a.call(c,u)||(r[u]=c[u]);return r}:as,ss=cs;Lr({target:"Object",stat:!0,forced:Object.assign!==ss},{assign:ss});var fs=Ku,ls=Ft,ps=yt("unscopables"),hs=Array.prototype;null==hs[ps]&&ls.f(hs,ps,{configurable:!0,value:fs(null)});var ds,vs,ys,gs=function(t){hs[ps][t]=!0},ms=!s((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),bs=nt,ws=tt,xs=ms,Ss=se("IE_PROTO"),ks=Object.prototype,As=xs?Object.getPrototypeOf:function(t){return t=ws(t),bs(t,Ss)?t[Ss]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ks:null},Es=s,Os=As,js=Xt,Ts=yt("iterator"),Ls=!1;[].keys&&("next"in(ys=[].keys())?(vs=Os(Os(ys)))!==Object.prototype&&(ds=vs):Ls=!0),(null==ds||Es((function(){var t={};return ds[Ts].call(t)!==t})))&&(ds={}),"function"!=typeof ds[Ts]&&js(ds,Ts,(function(){return this}));var _s={IteratorPrototype:ds,BUGGY_SAFARI_ITERATORS:Ls},Rs=_s.IteratorPrototype,Is=Ku,Ps=g,Cs=Br,Ds=Hr,Ms=function(){return this},Us=function(t,e,r){var n=e+" Iterator";return t.prototype=Is(Rs,{next:Ps(1,r)}),Cs(t,n,!1),Ds[n]=Ms,t},Ns=Lr,Fs=Us,Bs=As,qs=Mr,Gs=Br,Ws=Xt,zs=Jt.exports,$s=Hr,Vs=_s.IteratorPrototype,Hs=_s.BUGGY_SAFARI_ITERATORS,Ys=yt("iterator"),Xs="keys",Js="values",Ks="entries",Zs=function(){return this},Qs=function(t,e,r,n,o,i,a){Fs(r,e,n);var u,c,s,f=function(t){if(t===o&&v)return v;if(!Hs&&t in h)return h[t];switch(t){case Xs:case Js:case Ks:return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",p=!1,h=t.prototype,d=h[Ys]||h["@@iterator"]||o&&h[o],v=!Hs&&d||f(o),y="Array"==e&&h.entries||d;if(y&&(u=Bs(y.call(new t)))!==Object.prototype&&u.next&&(Bs(u)!==Vs&&(qs?qs(u,Vs):"function"!=typeof u[Ys]&&Ws(u,Ys,Zs)),Gs(u,l,!0)),o==Js&&d&&d.name!==Js&&(p=!0,v=function(){return d.call(this)}),h[Ys]!==v&&Ws(h,Ys,v),$s[e]=v,o)if(c={values:f(Js),keys:i?v:f(Xs),entries:f(Ks)},a)for(s in c)(Hs||p||!(s in h))&&zs(h,s,c[s]);else Ns({target:e,proto:!0,forced:Hs||p},c);return c},tf=O,ef=gs,rf=Hr,nf=Ee,of=Qs,af="Array Iterator",uf=nf.set,cf=nf.getterFor(af),sf=of(Array,"Array",(function(t,e){uf(this,{type:af,target:tf(t),index:0,kind:e})}),(function(){var t=cf(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");rf.Arguments=rf.Array,ef("keys"),ef("values"),ef("entries");var ff=Tt("span").classList,lf=ff&&ff.constructor&&ff.constructor.prototype,pf=lf===Object.prototype?void 0:lf,hf=u,df={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},vf=pf,yf=sf,gf=Xt,mf=yt,bf=mf("iterator"),wf=mf("toStringTag"),xf=yf.values,Sf=function(t,e){if(t){if(t[bf]!==xf)try{gf(t,bf,xf)}catch(e){t[bf]=xf}if(t[wf]||gf(t,wf,e),df[e])for(var r in yf)if(t[r]!==yf[r])try{gf(t,r,yf[r])}catch(e){t[r]=yf[r]}}};for(var kf in df)Sf(hf[kf]&&hf[kf].prototype,kf);Sf(vf,"DOMTokenList");var Af=_c.charAt,Ef=Xa,Of=Ee,jf=Qs,Tf="String Iterator",Lf=Of.set,_f=Of.getterFor(Tf);jf(String,"String",(function(t){Lf(this,{type:Tf,string:Ef(t),index:0})}),(function(){var t,e=_f(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Af(r,n),e.index+=t.length,{value:t,done:!1})}));var Rf=s,If=yt("iterator"),Pf=!Rf((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[If]||"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})),Cf=2147483647,Df=/[^\0-\u007E]/,Mf=/[.\u3002\uFF0E\uFF61]/g,Uf="Overflow: input needs wider integers to process",Nf=Math.floor,Ff=String.fromCharCode,Bf=function(t){return t+22+75*(t<26)},qf=function(t,e,r){var n=0;for(t=r?Nf(t/700):t>>1,t+=Nf(t/e);t>455;n+=36)t=Nf(t/35);return Nf(n+36*t/(t+38))},Gf=function(t){var e,r,n=[],o=(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)).length,i=128,a=0,u=72;for(e=0;e<t.length;e++)(r=t[e])<128&&n.push(Ff(r));var c=n.length,s=c;for(c&&n.push("-");s<o;){var f=Cf;for(e=0;e<t.length;e++)(r=t[e])>=i&&r<f&&(f=r);var l=s+1;if(f-i>Nf((Cf-a)/l))throw RangeError(Uf);for(a+=(f-i)*l,i=f,e=0;e<t.length;e++){if((r=t[e])<i&&++a>Cf)throw RangeError(Uf);if(r==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;n.push(Ff(Bf(d+v%y))),p=Nf(v/y)}n.push(Ff(Bf(p))),u=qf(a,l,s==c),a=0,++s}}++a,++i}return n.join("")},Wf=Lr,zf=_,$f=Pf,Vf=Jt.exports,Hf=Ir,Yf=Br,Xf=Us,Jf=Ee,Kf=Vr,Zf=nt,Qf=Qr,tl=un,el=qt,rl=j,nl=Xa,ol=Ku,il=g,al=dn,ul=ln,cl=yt,sl=zf("fetch"),fl=zf("Request"),ll=fl&&fl.prototype,pl=zf("Headers"),hl=cl("iterator"),dl="URLSearchParams",vl="URLSearchParamsIterator",yl=Jf.set,gl=Jf.getterFor(dl),ml=Jf.getterFor(vl),bl=/\+/g,wl=Array(4),xl=function(t){return wl[t-1]||(wl[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},Sl=function(t){try{return decodeURIComponent(t)}catch(e){return t}},kl=function(t){var e=t.replace(bl," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(xl(r--),Sl);return e}},Al=/[!'()~]|%20/g,El={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ol=function(t){return El[t]},jl=function(t){return encodeURIComponent(t).replace(Al,Ol)},Tl=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:kl(n.shift()),value:kl(n.join("="))}))},Ll=function(t){this.entries.length=0,Tl(this.entries,t)},_l=function(t,e){if(t<e)throw TypeError("Not enough arguments")},Rl=Xf((function(t,e){yl(this,{type:vl,iterator:al(gl(t).entries),kind:e})}),"Iterator",(function(){var t=ml(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})),Il=function(){Kf(this,Il,dl);var t,e,r,n,o,i,a,u,c,s=arguments.length>0?arguments[0]:void 0,f=this,l=[];if(yl(f,{type:dl,entries:l,updateURL:function(){},updateSearchParams:Ll}),void 0!==s)if(rl(s))if("function"==typeof(t=ul(s)))for(r=(e=al(s,t)).next;!(n=r.call(e)).done;){if((a=(i=(o=al(el(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:nl(a.value),value:nl(u.value)})}else for(c in s)Zf(s,c)&&l.push({key:c,value:nl(s[c])});else Tl(l,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:nl(s))},Pl=Il.prototype;if(Hf(Pl,{append:function(t,e){_l(arguments.length,2);var r=gl(this);r.entries.push({key:nl(t),value:nl(e)}),r.updateURL()},delete:function(t){_l(arguments.length,1);for(var e=gl(this),r=e.entries,n=nl(t),o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;e.updateURL()},get:function(t){_l(arguments.length,1);for(var e=gl(this).entries,r=nl(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){_l(arguments.length,1);for(var e=gl(this).entries,r=nl(t),n=[],o=0;o<e.length;o++)e[o].key===r&&n.push(e[o].value);return n},has:function(t){_l(arguments.length,1);for(var e=gl(this).entries,r=nl(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){_l(arguments.length,1);for(var r,n=gl(this),o=n.entries,i=!1,a=nl(t),u=nl(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=gl(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=gl(this).entries,n=Qf(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 Rl(this,"keys")},values:function(){return new Rl(this,"values")},entries:function(){return new Rl(this,"entries")}},{enumerable:!0}),Vf(Pl,hl,Pl.entries),Vf(Pl,"toString",(function(){for(var t,e=gl(this).entries,r=[],n=0;n<e.length;)t=e[n++],r.push(jl(t.key)+"="+jl(t.value));return r.join("&")}),{enumerable:!0}),Yf(Il,dl),Wf({global:!0,forced:!$f},{URLSearchParams:Il}),!$f&&"function"==typeof pl){var Cl=function(t){if(rl(t)){var e,r=t.body;if(tl(r)===dl)return(e=t.headers?new pl(t.headers):new pl).has("content-type")||e.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),ol(t,{body:il(0,String(r)),headers:il(0,e)})}return t};if("function"==typeof sl&&Wf({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return sl(t,arguments.length>1?Cl(arguments[1]):{})}}),"function"==typeof fl){var Dl=function(t){return Kf(this,Dl,"Request"),new fl(t,arguments.length>1?Cl(arguments[1]):{})};ll.constructor=Dl,Dl.prototype=ll,Wf({global:!0,forced:!0},{Request:Dl})}}var Ml,Ul={URLSearchParams:Il,getState:gl},Nl=Lr,Fl=f,Bl=Pf,ql=u,Gl=Uu,Wl=Jt.exports,zl=Vr,$l=nt,Vl=cs,Hl=Fa,Yl=_c.codeAt,Xl=function(t){var e,r,n=[],o=t.toLowerCase().replace(Mf,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(Df.test(r)?"xn--"+Gf(r):r);return n.join(".")},Jl=Xa,Kl=Br,Zl=Ul,Ql=Ee,tp=ql.URL,ep=Zl.URLSearchParams,rp=Zl.getState,np=Ql.set,op=Ql.getterFor("URL"),ip=Math.floor,ap=Math.pow,up="Invalid scheme",cp="Invalid host",sp="Invalid port",fp=/[A-Za-z]/,lp=/[\d+-.A-Za-z]/,pp=/\d/,hp=/^0x/i,dp=/^[0-7]+$/,vp=/^\d+$/,yp=/^[\dA-Fa-f]+$/,gp=/[\0\t\n\r #%/:<>?@[\\\]^|]/,mp=/[\0\t\n\r #/:<>?@[\\\]^|]/,bp=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,wp=/[\t\n\r]/g,xp=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return cp;if(!(r=kp(e.slice(1,-1))))return cp;t.host=r}else if(Rp(t)){if(e=Xl(e),gp.test(e))return cp;if(null===(r=Sp(e)))return cp;t.host=r}else{if(mp.test(e))return cp;for(r="",n=Hl(e),o=0;o<n.length;o++)r+=Lp(n[o],Ep);t.host=r}},Sp=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=hp.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?vp:8==i?dp:yp).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>=ap(256,5-e))return null}else if(a>255)return null;for(u=r.pop(),n=0;n<r.length;n++)u+=r[n]*ap(256,3-n);return u},kp=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&&yp.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(!pp.test(p()))return;for(;pp.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},Ap=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=ip(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},Ep={},Op=Vl({},Ep,{" ":1,'"':1,"<":1,">":1,"`":1}),jp=Vl({},Op,{"#":1,"?":1,"{":1,"}":1}),Tp=Vl({},jp,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Lp=function(t,e){var r=Yl(t,0);return r>32&&r<127&&!$l(e,t)?t:encodeURIComponent(t)},_p={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Rp=function(t){return $l(_p,t.scheme)},Ip=function(t){return""!=t.username||""!=t.password},Pp=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},Cp=function(t,e){var r;return 2==t.length&&fp.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},Dp=function(t){var e;return t.length>1&&Cp(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},Mp=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&Cp(e[0],!0)||e.pop()},Up=function(t){return"."===t||"%2e"===t.toLowerCase()},Np={},Fp={},Bp={},qp={},Gp={},Wp={},zp={},$p={},Vp={},Hp={},Yp={},Xp={},Jp={},Kp={},Zp={},Qp={},th={},eh={},rh={},nh={},oh={},ih=function(t,e,r,n){var o,i,a,u,c,s=r||Np,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(bp,"")),e=e.replace(wp,""),o=Hl(e);f<=o.length;){switch(i=o[f],s){case Np:if(!i||!fp.test(i)){if(r)return up;s=Bp;continue}l+=i.toLowerCase(),s=Fp;break;case Fp:if(i&&(lp.test(i)||"+"==i||"-"==i||"."==i))l+=i.toLowerCase();else{if(":"!=i){if(r)return up;l="",s=Bp,f=0;continue}if(r&&(Rp(t)!=$l(_p,l)||"file"==l&&(Ip(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=l,r)return void(Rp(t)&&_p[t.scheme]==t.port&&(t.port=null));l="","file"==t.scheme?s=Kp:Rp(t)&&n&&n.scheme==t.scheme?s=qp:Rp(t)?s=$p:"/"==o[f+1]?(s=Gp,f++):(t.cannotBeABaseURL=!0,t.path.push(""),s=rh)}break;case Bp:if(!n||n.cannotBeABaseURL&&"#"!=i)return up;if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,s=oh;break}s="file"==n.scheme?Kp:Wp;continue;case qp:if("/"!=i||"/"!=o[f+1]){s=Wp;continue}s=Vp,f++;break;case Gp:if("/"==i){s=Hp;break}s=eh;continue;case Wp:if(t.scheme=n.scheme,i==Ml)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&&Rp(t))s=zp;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=nh;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=eh;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=oh}break;case zp:if(!Rp(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,s=eh;continue}s=Hp}else s=Vp;break;case $p:if(s=Vp,"/"!=i||"/"!=l.charAt(f+1))continue;f++;break;case Vp:if("/"!=i&&"\\"!=i){s=Hp;continue}break;case Hp:if("@"==i){p&&(l="%40"+l),p=!0,a=Hl(l);for(var v=0;v<a.length;v++){var y=a[v];if(":"!=y||d){var g=Lp(y,Tp);d?t.password+=g:t.username+=g}else d=!0}l=""}else if(i==Ml||"/"==i||"?"==i||"#"==i||"\\"==i&&Rp(t)){if(p&&""==l)return"Invalid authority";f-=Hl(l).length+1,l="",s=Yp}else l+=i;break;case Yp:case Xp:if(r&&"file"==t.scheme){s=Qp;continue}if(":"!=i||h){if(i==Ml||"/"==i||"?"==i||"#"==i||"\\"==i&&Rp(t)){if(Rp(t)&&""==l)return cp;if(r&&""==l&&(Ip(t)||null!==t.port))return;if(u=xp(t,l))return u;if(l="",s=th,r)return;continue}"["==i?h=!0:"]"==i&&(h=!1),l+=i}else{if(""==l)return cp;if(u=xp(t,l))return u;if(l="",s=Jp,r==Xp)return}break;case Jp:if(!pp.test(i)){if(i==Ml||"/"==i||"?"==i||"#"==i||"\\"==i&&Rp(t)||r){if(""!=l){var m=parseInt(l,10);if(m>65535)return sp;t.port=Rp(t)&&m===_p[t.scheme]?null:m,l=""}if(r)return;s=th;continue}return sp}l+=i;break;case Kp:if(t.scheme="file","/"==i||"\\"==i)s=Zp;else{if(!n||"file"!=n.scheme){s=eh;continue}if(i==Ml)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=nh;else{if("#"!=i){Dp(o.slice(f).join(""))||(t.host=n.host,t.path=n.path.slice(),Mp(t)),s=eh;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=oh}}break;case Zp:if("/"==i||"\\"==i){s=Qp;break}n&&"file"==n.scheme&&!Dp(o.slice(f).join(""))&&(Cp(n.path[0],!0)?t.path.push(n.path[0]):t.host=n.host),s=eh;continue;case Qp:if(i==Ml||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&Cp(l))s=eh;else if(""==l){if(t.host="",r)return;s=th}else{if(u=xp(t,l))return u;if("localhost"==t.host&&(t.host=""),r)return;l="",s=th}continue}l+=i;break;case th:if(Rp(t)){if(s=eh,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=Ml&&(s=eh,"/"!=i))continue}else t.fragment="",s=oh;else t.query="",s=nh;break;case eh:if(i==Ml||"/"==i||"\\"==i&&Rp(t)||!r&&("?"==i||"#"==i)){if(".."===(c=(c=l).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(Mp(t),"/"==i||"\\"==i&&Rp(t)||t.path.push("")):Up(l)?"/"==i||"\\"==i&&Rp(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&Cp(l)&&(t.host&&(t.host=""),l=l.charAt(0)+":"),t.path.push(l)),l="","file"==t.scheme&&(i==Ml||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",s=nh):"#"==i&&(t.fragment="",s=oh)}else l+=Lp(i,jp);break;case rh:"?"==i?(t.query="",s=nh):"#"==i?(t.fragment="",s=oh):i!=Ml&&(t.path[0]+=Lp(i,Ep));break;case nh:r||"#"!=i?i!=Ml&&("'"==i&&Rp(t)?t.query+="%27":t.query+="#"==i?"%23":Lp(i,Ep)):(t.fragment="",s=oh);break;case oh:i!=Ml&&(t.fragment+=Lp(i,Op))}f++}},ah=function(t){var e,r,n=zl(this,ah,"URL"),o=arguments.length>1?arguments[1]:void 0,i=Jl(t),a=np(n,{type:"URL"});if(void 0!==o)if(o instanceof ah)e=op(o);else if(r=ih(e={},Jl(o)))throw TypeError(r);if(r=ih(a,i,null,e))throw TypeError(r);var u=a.searchParams=new ep,c=rp(u);c.updateSearchParams(a.query),c.updateURL=function(){a.query=String(u)||null},Fl||(n.href=ch.call(n),n.origin=sh.call(n),n.protocol=fh.call(n),n.username=lh.call(n),n.password=ph.call(n),n.host=hh.call(n),n.hostname=dh.call(n),n.port=vh.call(n),n.pathname=yh.call(n),n.search=gh.call(n),n.searchParams=mh.call(n),n.hash=bh.call(n))},uh=ah.prototype,ch=function(){var t=op(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+="//",Ip(t)&&(s+=r+(n?":"+n:"")+"@"),s+=Ap(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},sh=function(){var t=op(this),e=t.scheme,r=t.port;if("blob"==e)try{return new ah(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&Rp(t)?e+"://"+Ap(t.host)+(null!==r?":"+r:""):"null"},fh=function(){return op(this).scheme+":"},lh=function(){return op(this).username},ph=function(){return op(this).password},hh=function(){var t=op(this),e=t.host,r=t.port;return null===e?"":null===r?Ap(e):Ap(e)+":"+r},dh=function(){var t=op(this).host;return null===t?"":Ap(t)},vh=function(){var t=op(this).port;return null===t?"":String(t)},yh=function(){var t=op(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},gh=function(){var t=op(this).query;return t?"?"+t:""},mh=function(){return op(this).searchParams},bh=function(){var t=op(this).fragment;return t?"#"+t:""},wh=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(Fl&&Gl(uh,{href:wh(ch,(function(t){var e=op(this),r=Jl(t),n=ih(e,r);if(n)throw TypeError(n);rp(e.searchParams).updateSearchParams(e.query)})),origin:wh(sh),protocol:wh(fh,(function(t){var e=op(this);ih(e,Jl(t)+":",Np)})),username:wh(lh,(function(t){var e=op(this),r=Hl(Jl(t));if(!Pp(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=Lp(r[n],Tp)}})),password:wh(ph,(function(t){var e=op(this),r=Hl(Jl(t));if(!Pp(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=Lp(r[n],Tp)}})),host:wh(hh,(function(t){var e=op(this);e.cannotBeABaseURL||ih(e,Jl(t),Yp)})),hostname:wh(dh,(function(t){var e=op(this);e.cannotBeABaseURL||ih(e,Jl(t),Xp)})),port:wh(vh,(function(t){var e=op(this);Pp(e)||(""==(t=Jl(t))?e.port=null:ih(e,t,Jp))})),pathname:wh(yh,(function(t){var e=op(this);e.cannotBeABaseURL||(e.path=[],ih(e,Jl(t),th))})),search:wh(gh,(function(t){var e=op(this);""==(t=Jl(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",ih(e,t,nh)),rp(e.searchParams).updateSearchParams(e.query)})),searchParams:wh(mh),hash:wh(bh,(function(t){var e=op(this);""!=(t=Jl(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",ih(e,t,oh)):e.fragment=null}))}),Wl(uh,"toJSON",(function(){return ch.call(this)}),{enumerable:!0}),Wl(uh,"toString",(function(){return ch.call(this)}),{enumerable:!0}),tp){var xh=tp.createObjectURL,Sh=tp.revokeObjectURL;xh&&Wl(ah,"createObjectURL",(function(t){return xh.apply(tp,arguments)})),Sh&&Wl(ah,"revokeObjectURL",(function(t){return Sh.apply(tp,arguments)}))}Kl(ah,"URL"),Nl({global:!0,forced:!Bl,sham:!Fl},{URL:ah});var kh={},Ah=$r,Eh=j,Oh=[].slice,jh={},Th=function(t,e,r){if(!(e in jh)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";jh[e]=Function("C,a","return new C("+n.join(",")+")")}return jh[e](t,r)},Lh=Function.bind||function(t){var e=Ah(this),r=Oh.call(arguments,1),n=function(){var o=r.concat(Oh.call(arguments));return this instanceof n?Th(e,o.length,o):e.apply(t,o)};return Eh(e.prototype)&&(n.prototype=e.prototype),n},_h=Lr,Rh=$r,Ih=qt,Ph=j,Ch=Ku,Dh=Lh,Mh=s,Uh=_("Reflect","construct"),Nh=Mh((function(){function t(){}return!(Uh((function(){}),[],t)instanceof t)})),Fh=!Mh((function(){Uh((function(){}))})),Bh=Nh||Fh;_h({target:"Reflect",stat:!0,forced:Bh,sham:Bh},{construct:function(t,e){Rh(t),Ih(e);var r=arguments.length<3?t:Rh(arguments[2]);if(Fh&&!Nh)return Uh(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(Dh.apply(t,n))}var o=r.prototype,i=Ch(Ph(o)?o:Object.prototype),a=Function.apply.call(t,i,e);return Ph(a)?a:i}});var qh={exports:{}};!function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.default=t.exports,t.exports.__esModule=!0}(qh);var Gh={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),t},t.exports.default=t.exports,t.exports.__esModule=!0}(Gh);var Wh={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.default=t.exports,t.exports.__esModule=!0}(Wh);var zh={exports:{}},$h={exports:{}};!function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.default=t.exports,t.exports.__esModule=!0,e(r,n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0}($h),function(t){var e=$h.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}}),r&&e(t,r)},t.exports.default=t.exports,t.exports.__esModule=!0}(zh);var Vh={exports:{}},Hh={exports:{}};!function(t){function e(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(r)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0}(Hh),function(t){var e=Hh.exports.default,r=Wh.exports;t.exports=function(t,n){return!n||"object"!==e(n)&&"function"!=typeof n?r(t):n},t.exports.default=t.exports,t.exports.__esModule=!0}(Vh);var Yh={exports:{}};!function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.default=t.exports,t.exports.__esModule=!0,e(r)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0}(Yh);var Xh={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.default=t.exports,t.exports.__esModule=!0}(Xh);var Jh=un,Kh=en?{}.toString:function(){return"[object "+Jh(this)+"]"},Zh=en,Qh=Jt.exports,td=Kh;Zh||Qh(Object.prototype,"toString",td,{unsafe:!0})
|
|
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,S=w,k=function(t){return x(S(t))},E=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=o,O=function(t){return"function"==typeof t?t:void 0},j=function(t,e){return arguments.length<2?O(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,D=P&&P.v8;D?h=(p=D.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 C=h&&+h,M=C,N=a,U=!!Object.getOwnPropertySymbols&&!N((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&M&&M<41})),F=U&&!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},G=E,W={exports:{}},z=o,$=function(t,e){try{Object.defineProperty(z,t,{value:e,configurable:!0,writable:!0})}catch(r){z[t]=e}return e},V=$,H="__core-js_shared__",Y=o[H]||V(H,{}),J=Y;(W.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=W.exports,at=tt,ut=nt,ct=U,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=E,vt=q,yt=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")},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)},St=E,kt=o.document,Et=St(kt)&&St(kt.createElement),At=function(t){return Et?kt.createElement(t):{}},Ot=At,jt=!u&&!a((function(){return 7!=Object.defineProperty(Ot("div"),"a",{get:function(){return 7}}).a})),Tt=u,_t=c,Lt=d,Rt=k,It=xt,Pt=tt,Dt=jt,Ct=Object.getOwnPropertyDescriptor;i.f=Tt?Ct:function(t,e){if(t=Rt(t),e=It(e),Dt)try{return Ct(t,e)}catch(t){}if(Pt(t,e))return Lt(!_t.f.call(t,e),t[e])};var Mt={},Nt=E,Ut=function(t){if(!Nt(t))throw TypeError(String(t)+" is not an object");return t},Ft=u,Bt=jt,qt=Ut,Gt=xt,Wt=Object.defineProperty;Mt.f=Ft?Wt:function(t,e,r){if(qt(t),e=Gt(e),qt(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=Mt,$t=d,Vt=u?function(t,e,r){return zt.f(t,e,$t(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=W.exports,oe=nt,ie=ne("keys"),ae=function(t){return ie[t]||(ie[t]=oe(t))},ue={},ce=re,se=E,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 Se={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}}},ke=o,Ee=Vt,Ae=tt,Oe=$,je=Qt,Te=Se.get,_e=Se.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")||Ee(r,"name",e),(o=_e(r)).source||(o.source=Le.join("string"==typeof e?e:""))),t!==ke?(i?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=r:Ee(t,e,r)):a?t[e]=r:Oe(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Te(this).source||je(this)}));var Re={},Ie=Math.ceil,Pe=Math.floor,De=function(t){return isNaN(t=+t)?0:(t>0?Pe:Ie)(t)},Ce=De,Me=Math.min,Ne=function(t){return t>0?Me(Ce(t),9007199254740991):0},Ue=De,Fe=Math.max,Be=Math.min,qe=function(t,e){var r=Ue(t);return r<0?Fe(r+e,0):Be(r,e)},Ge=k,We=Ne,ze=qe,$e=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}},Ve={includes:$e(!0),indexOf:$e(!1)},He=tt,Ye=k,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=Ut,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,Sr=Ht.exports,kr=$,Er=fr,Ar=mr,Or=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]||kr(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;Er(i,o)}(t.sham||o&&o.sham)&&xr(i,"sham",!0),Sr(r,n,i,t)}},jr=o.Promise,Tr=Ht.exports,_r=function(t,e,r){for(var n in e)Tr(t,n,e[n],r);return t},Lr=E,Rr=Ut,Ir=function(t){if(!Lr(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},Pr=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 Rr(r),Ir(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Dr=Mt.f,Cr=tt,Mr=ht("toStringTag"),Nr=function(t,e,r){t&&!Cr(t=r?t:t.prototype,Mr)&&Dr(t,Mr,{configurable:!0,value:e})},Ur=j,Fr=Mt,Br=u,qr=ht("species"),Gr=function(t){var e=Ur(t),r=Fr.f;Br&&e&&!e[qr]&&r(e,qr,{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},$r={},Vr=$r,Hr=ht("iterator"),Yr=Array.prototype,Jr=function(t){return void 0!==t&&(Vr.Array===t||Yr[Hr]===t)},Kr=Wr,Xr=function(t,e,r){if(Kr(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)}},Zr={};Zr[ht("toStringTag")]="z";var Qr="[object z]"===String(Zr),tn=Qr,en=y,rn=ht("toStringTag"),nn="Arguments"==en(function(){return arguments}()),on=tn?en: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),rn))?r:nn?en(e):"Object"==(n=en(e))&&"function"==typeof e.callee?"Arguments":n},an=on,un=$r,cn=ht("iterator"),sn=function(t){if(null!=t)return t[cn]||t["@@iterator"]||un[an(t)]},fn=Ut,ln=sn,pn=function(t,e){var r=arguments.length<2?ln(t):e;if("function"!=typeof r)throw TypeError(String(t)+" is not iterable");return fn(r.call(t))},hn=Ut,dn=function(t,e,r){var n,o;hn(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 hn(n),r},vn=Ut,yn=Jr,gn=Ne,mn=Xr,bn=pn,wn=sn,xn=dn,Sn=function(t,e){this.stopped=t,this.result=e},kn=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=mn(e,f,1+l+h),v=function(t){return n&&xn(n,"normal",t),new Sn(!0,t)},y=function(t){return l?(vn(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=wn(t)))throw TypeError("Target is not iterable");if(yn(o)){for(i=0,a=gn(t.length);a>i;i++)if((u=y(t[i]))&&u instanceof Sn)return u;return new Sn(!1)}n=bn(t,o)}for(c=n.next;!(s=c.call(n)).done;){try{u=y(s.value)}catch(t){xn(n,"throw",t)}if("object"==typeof u&&u&&u instanceof Sn)return u}return new Sn(!1)},En=ht("iterator"),An=!1;try{var On=0,jn={next:function(){return{done:!!On++}},return:function(){An=!0}};jn[En]=function(){return this},Array.from(jn,(function(){throw 2}))}catch(t){}var Tn,_n,Ln,Rn,In=function(t,e){if(!e&&!An)return!1;var r=!1;try{var n={};n[En]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Pn=Ut,Dn=Wr,Cn=ht("species"),Mn=function(t,e){var r,n=Pn(t).constructor;return void 0===n||null==(r=Pn(n)[Cn])?e:Dn(r)},Nn=j("document","documentElement"),Un=/(?:ipad|iphone|ipod).*applewebkit/i.test(T),Fn="process"==y(o.process),Bn=o,qn=a,Gn=Xr,Wn=Nn,zn=At,$n=Un,Vn=Fn,Hn=Bn.setImmediate,Yn=Bn.clearImmediate,Jn=Bn.process,Kn=Bn.MessageChannel,Xn=Bn.Dispatch,Zn=0,Qn={},to="onreadystatechange";try{Tn=Bn.location}catch(t){}var eo=function(t){if(Qn.hasOwnProperty(t)){var e=Qn[t];delete Qn[t],e()}},ro=function(t){return function(){eo(t)}},no=function(t){eo(t.data)},oo=function(t){Bn.postMessage(String(t),Tn.protocol+"//"+Tn.host)};Hn&&Yn||(Hn=function(t){for(var e=[],r=arguments.length,n=1;r>n;)e.push(arguments[n++]);return Qn[++Zn]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},_n(Zn),Zn},Yn=function(t){delete Qn[t]},Vn?_n=function(t){Jn.nextTick(ro(t))}:Xn&&Xn.now?_n=function(t){Xn.now(ro(t))}:Kn&&!$n?(Rn=(Ln=new Kn).port2,Ln.port1.onmessage=no,_n=Gn(Rn.postMessage,Rn,1)):Bn.addEventListener&&"function"==typeof postMessage&&!Bn.importScripts&&Tn&&"file:"!==Tn.protocol&&!qn(oo)?(_n=oo,Bn.addEventListener("message",no,!1)):_n=to in zn("script")?function(t){Wn.appendChild(zn("script")).onreadystatechange=function(){Wn.removeChild(this),eo(t)}}:function(t){setTimeout(ro(t),0)});var io,ao,uo,co,so,fo,lo,po,ho={set:Hn,clear:Yn},vo=o,yo=/ipad|iphone|ipod/i.test(T)&&void 0!==vo.Pebble,go=/web0s(?!.*chrome)/i.test(T),mo=o,bo=i.f,wo=ho.set,xo=Un,So=yo,ko=go,Eo=Fn,Ao=mo.MutationObserver||mo.WebKitMutationObserver,Oo=mo.document,jo=mo.process,To=mo.Promise,_o=bo(mo,"queueMicrotask"),Lo=_o&&_o.value;Lo||(io=function(){var t,e;for(Eo&&(t=jo.domain)&&t.exit();ao;){e=ao.fn,ao=ao.next;try{e()}catch(t){throw ao?co():uo=void 0,t}}uo=void 0,t&&t.enter()},xo||Eo||ko||!Ao||!Oo?!So&&To&&To.resolve?((lo=To.resolve(void 0)).constructor=To,po=lo.then,co=function(){po.call(lo,io)}):co=Eo?function(){jo.nextTick(io)}:function(){wo.call(mo,io)}:(so=!0,fo=Oo.createTextNode(""),new Ao(io).observe(fo,{characterData:!0}),co=function(){fo.data=so=!so}));var Ro=Lo||function(t){var e={fn:t,next:void 0};uo&&(uo.next=e),ao||(ao=e,co()),uo=e},Io={},Po=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=Po(e),this.reject=Po(r)};Io.f=function(t){return new Do(t)};var Co,Mo,No,Uo,Fo=Ut,Bo=E,qo=Io,Go=o,Wo="object"==typeof window,zo=Or,$o=o,Vo=j,Ho=jr,Yo=Ht.exports,Jo=_r,Ko=Pr,Xo=Nr,Zo=Gr,Qo=E,ti=Wr,ei=zr,ri=Qt,ni=kn,oi=In,ii=Mn,ai=ho.set,ui=Ro,ci=function(t,e){if(Fo(t),Bo(e)&&e.constructor===t)return e;var r=qo.f(t);return(0,r.resolve)(e),r.promise},si=function(t,e){var r=Go.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))},fi=Io,li=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},pi=Se,hi=mr,di=Wo,vi=Fn,yi=C,gi=ht("species"),mi="Promise",bi=pi.get,wi=pi.set,xi=pi.getterFor(mi),Si=Ho&&Ho.prototype,ki=Ho,Ei=Si,Ai=$o.TypeError,Oi=$o.document,ji=$o.process,Ti=fi.f,_i=Ti,Li=!!(Oi&&Oi.createEvent&&$o.dispatchEvent),Ri="function"==typeof PromiseRejectionEvent,Ii="unhandledrejection",Pi=!1,Di=hi(mi,(function(){var t=ri(ki),e=t!==String(ki);if(!e&&66===yi)return!0;if(yi>=51&&/native code/.test(t))return!1;var r=new ki((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[gi]=n,!(Pi=r.then((function(){}))instanceof n)||!e&&di&&!Ri})),Ci=Di||!oi((function(t){ki.all(t).catch((function(){}))})),Mi=function(t){var e;return!(!Qo(t)||"function"!=typeof(e=t.then))&&e},Ni=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;ui((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&&qi(t),t.rejection=1),!0===f?a=n:(h&&h.enter(),a=f(n),h&&(h.exit(),c=!0)),a===s.promise?p(Ai("Promise-chain cycle")):(u=Mi(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&&Fi(t)}))}},Ui=function(t,e,r){var n,o;Li?((n=Oi.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),$o.dispatchEvent(n)):n={promise:e,reason:r},!Ri&&(o=$o["on"+t])?o(n):t===Ii&&si("Unhandled promise rejection",r)},Fi=function(t){ai.call($o,(function(){var e,r=t.facade,n=t.value;if(Bi(t)&&(e=li((function(){vi?ji.emit("unhandledRejection",n,r):Ui(Ii,r,n)})),t.rejection=vi||Bi(t)?2:1,e.error))throw e.value}))},Bi=function(t){return 1!==t.rejection&&!t.parent},qi=function(t){ai.call($o,(function(){var e=t.facade;vi?ji.emit("rejectionHandled",e):Ui("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 Ai("Promise can't be resolved itself");var n=Mi(e);n?ui((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=(ki=function(t){ei(this,ki,mi),ti(t),Co.call(this);var e=bi(this);try{t(Gi(zi,e),Gi(Wi,e))}catch(t){Wi(e,t)}}).prototype,(Co=function(t){wi(this,{type:mi,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Jo(Ei,{then:function(t,e){var r=xi(this),n=Ti(ii(this,ki));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=vi?ji.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)}}),Mo=function(){var t=new Co,e=bi(t);this.promise=t,this.resolve=Gi(zi,e),this.reject=Gi(Wi,e)},fi.f=Ti=function(t){return t===ki||t===No?new Mo(t):_i(t)},"function"==typeof Ho&&Si!==Object.prototype)){Uo=Si.then,Pi||(Yo(Si,"then",(function(t,e){var r=this;return new ki((function(t,e){Uo.call(r,t,e)})).then(t,e)}),{unsafe:!0}),Yo(Si,"catch",Ei.catch,{unsafe:!0}));try{delete Si.constructor}catch(t){}Ko&&Ko(Si,Ei)}zo({global:!0,wrap:!0,forced:Di},{Promise:ki}),Xo(ki,mi,!1),Zo(mi),No=Vo(mi),zo({target:mi,stat:!0,forced:Di},{reject:function(t){var e=Ti(this);return e.reject.call(void 0,t),e.promise}}),zo({target:mi,stat:!0,forced:Di},{resolve:function(t){return ci(this,t)}}),zo({target:mi,stat:!0,forced:Ci},{all:function(t){var e=this,r=Ti(e),n=r.resolve,o=r.reject,i=li((function(){var r=ti(e.resolve),i=[],a=0,u=1;ni(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=Ti(e),n=r.reject,o=li((function(){var o=ti(e.resolve);ni(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});class $i extends Promise{constructor(t){var e,r;super(((n,o)=>(r=o,t(n,o,(t=>{e=t}))))),this.cancel=e,this.rejectPromise=r}cancel(){this.onCancel&&this.onCancel(),this.rejectPromise&&this.rejectPromise(new Error("Promise was cancelled"))}}function Vi(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 Hi(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Vi(i,n,o,a,u,"next",t)}function u(t){Vi(i,n,o,a,u,"throw",t)}a(void 0)}))}}function Yi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ji,Ki=Xe,Xi=Ze,Zi=Object.keys||function(t){return Ki(t,Xi)},Qi=Mt,ta=Ut,ea=Zi,ra=u?Object.defineProperties:function(t,e){ta(t);for(var r,n=ea(e),o=n.length,i=0;o>i;)Qi.f(t,r=n[i++],e[r]);return t},na=Ut,oa=ra,ia=Ze,aa=ue,ua=Nn,ca=At,sa=ae("IE_PROTO"),fa=function(){},la=function(t){return"<script>"+t+"</"+"script>"},pa=function(t){t.write(la("")),t.close();var e=t.parentWindow.Object;return t=null,e},ha=function(){try{Ji=new ActiveXObject("htmlfile")}catch(t){}var t,e;ha="undefined"!=typeof document?document.domain&&Ji?pa(Ji):((e=ca("iframe")).style.display="none",ua.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(la("document.F=Object")),t.close(),t.F):pa(Ji);for(var r=ia.length;r--;)delete ha.prototype[ia[r]];return ha()};aa[sa]=!0;var da=Object.create||function(t,e){var r;return null!==t?(fa.prototype=na(t),r=new fa,fa.prototype=null,r[sa]=t):r=ha(),void 0===e?r:oa(r,e)},va=da,ya=Mt,ga=ht("unscopables"),ma=Array.prototype;null==ma[ga]&&ya.f(ma,ga,{configurable:!0,value:va(null)});var ba,wa,xa,Sa=function(t){ma[ga][t]=!0},ka=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Ea=tt,Aa=X,Oa=ka,ja=ae("IE_PROTO"),Ta=Object.prototype,_a=Oa?Object.getPrototypeOf:function(t){return t=Aa(t),Ea(t,ja)?t[ja]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Ta:null},La=a,Ra=_a,Ia=Vt,Pa=ht("iterator"),Da=!1;[].keys&&("next"in(xa=[].keys())?(wa=Ra(Ra(xa)))!==Object.prototype&&(ba=wa):Da=!0),(null==ba||La((function(){var t={};return ba[Pa].call(t)!==t})))&&(ba={}),"function"!=typeof ba[Pa]&&Ia(ba,Pa,(function(){return this}));var Ca={IteratorPrototype:ba,BUGGY_SAFARI_ITERATORS:Da},Ma=Ca.IteratorPrototype,Na=da,Ua=d,Fa=Nr,Ba=$r,qa=function(){return this},Ga=function(t,e,r){var n=e+" Iterator";return t.prototype=Na(Ma,{next:Ua(1,r)}),Fa(t,n,!1),Ba[n]=qa,t},Wa=Or,za=Ga,$a=_a,Va=Pr,Ha=Nr,Ya=Vt,Ja=Ht.exports,Ka=$r,Xa=Ca.IteratorPrototype,Za=Ca.BUGGY_SAFARI_ITERATORS,Qa=ht("iterator"),tu="keys",eu="values",ru="entries",nu=function(){return this},ou=function(t,e,r,n,o,i,a){za(r,e,n);var u,c,s,f=function(t){if(t===o&&v)return v;if(!Za&&t in h)return h[t];switch(t){case tu:case eu:case ru:return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",p=!1,h=t.prototype,d=h[Qa]||h["@@iterator"]||o&&h[o],v=!Za&&d||f(o),y="Array"==e&&h.entries||d;if(y&&(u=$a(y.call(new t)))!==Object.prototype&&u.next&&($a(u)!==Xa&&(Va?Va(u,Xa):"function"!=typeof u[Qa]&&Ya(u,Qa,nu)),Ha(u,l,!0)),o==eu&&d&&d.name!==eu&&(p=!0,v=function(){return d.call(this)}),h[Qa]!==v&&Ya(h,Qa,v),Ka[e]=v,o)if(c={values:f(eu),keys:i?v:f(tu),entries:f(ru)},a)for(s in c)(Za||p||!(s in h))&&Ja(h,s,c[s]);else Wa({target:e,proto:!0,forced:Za||p},c);return c},iu=k,au=Sa,uu=$r,cu=Se,su=ou,fu="Array Iterator",lu=cu.set,pu=cu.getterFor(fu),hu=su(Array,"Array",(function(t,e){lu(this,{type:fu,target:iu(t),index:0,kind:e})}),(function(){var t=pu(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");uu.Arguments=uu.Array,au("keys"),au("values"),au("entries");var du={exports:{}},vu={},yu=k,gu=Re.f,mu={}.toString,bu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];vu.f=function(t){return bu&&"[object Window]"==mu.call(t)?function(t){try{return gu(t)}catch(t){return bu.slice()}}(t):gu(yu(t))};var wu=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),xu=Or,Su=ue,ku=E,Eu=tt,Au=Mt.f,Ou=Re,ju=vu,Tu=wu,_u=!1,Lu=nt("meta"),Ru=0,Iu=Object.isExtensible||function(){return!0},Pu=function(t){Au(t,Lu,{value:{objectID:"O"+Ru++,weakData:{}}})},Du=du.exports={enable:function(){Du.enable=function(){},_u=!0;var t=Ou.f,e=[].splice,r={};r[Lu]=1,t(r).length&&(Ou.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===Lu){e.call(n,o,1);break}return n},xu({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ju.f}))},fastKey:function(t,e){if(!ku(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!Eu(t,Lu)){if(!Iu(t))return"F";if(!e)return"E";Pu(t)}return t[Lu].objectID},getWeakData:function(t,e){if(!Eu(t,Lu)){if(!Iu(t))return!0;if(!e)return!1;Pu(t)}return t[Lu].weakData},onFreeze:function(t){return Tu&&_u&&Iu(t)&&!Eu(t,Lu)&&Pu(t),t}};Su[Lu]=!0;var Cu=E,Mu=Pr,Nu=function(t,e,r){var n,o;return Mu&&"function"==typeof(n=e.constructor)&&n!==r&&Cu(o=n.prototype)&&o!==r.prototype&&Mu(t,o),t},Uu=Or,Fu=o,Bu=mr,qu=Ht.exports,Gu=du.exports,Wu=kn,zu=zr,$u=E,Vu=a,Hu=In,Yu=Nr,Ju=Nu,Ku=Mt.f,Xu=da,Zu=_r,Qu=Xr,tc=zr,ec=kn,rc=ou,nc=Gr,oc=u,ic=du.exports.fastKey,ac=Se.set,uc=Se.getterFor;(function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",a=Fu[t],u=a&&a.prototype,c=a,s={},f=function(t){var e=u[t];qu(u,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!$u(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return o&&!$u(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!$u(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(Bu(t,"function"!=typeof a||!(o||u.forEach&&!Vu((function(){(new a).entries().next()})))))c=r.getConstructor(e,t,n,i),Gu.enable();else if(Bu(t,!0)){var l=new c,p=l[i](o?{}:-0,1)!=l,h=Vu((function(){l.has(1)})),d=Hu((function(t){new a(t)})),v=!o&&Vu((function(){for(var t=new a,e=5;e--;)t[i](e,e);return!t.has(-0)}));d||((c=e((function(e,r){zu(e,c,t);var o=Ju(new a,e,c);return null!=r&&Wu(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}s[t]=c,Uu({global:!0,forced:c!=a},s),Yu(c,t),o||r.setStrong(c,t,n)})("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),{getConstructor:function(t,e,r,n){var o=t((function(t,i){tc(t,o,e),ac(t,{type:e,index:Xu(null),first:void 0,last:void 0,size:0}),oc||(t.size=0),null!=i&&ec(i,t[n],{that:t,AS_ENTRIES:r})})),i=uc(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=ic(e,!0),key:e,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=c),n&&(n.next=c),oc?a.size++:t.size++,"F"!==o&&(a.index[o]=c)),t},u=function(t,e){var r,n=i(t),o=ic(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return Zu(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,oc?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),oc?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=i(this),n=Qu(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)}}),Zu(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)}}),oc&&Ku(o.prototype,"size",{get:function(){return i(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=uc(e),i=uc(n);rc(t,e,(function(t,e){ac(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),nc(e)}});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=At("span").classList,fc=sc&&sc.constructor&&sc.constructor.prototype,lc=fc===Object.prototype?void 0:fc,pc=o,hc=cc,dc=lc,vc=hu,yc=Vt,gc=ht,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=y,Ec=Array.isArray||function(t){return"Array"==kc(t)},Ac=E,Oc=Ec,jc=ht("species"),Tc=function(t){var e;return Oc(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!Oc(e.prototype)?Ac(e)&&null===(e=e[jc])&&(e=void 0):e=void 0),void 0===e?Array:e},_c=function(t,e){return new(Tc(t))(0===e?0:e)},Lc=Xr,Rc=b,Ic=X,Pc=Ne,Dc=_c,Cc=[].push,Mc=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=Ic(c),v=Rc(d),y=Lc(s,f,3),g=Pc(v.length),m=0,b=l||Dc,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:Cc.call(w,p)}else switch(t){case 4:return!1;case 7:Cc.call(w,p)}return i?-1:n||o?o:w}},Nc={forEach:Mc(0),map:Mc(1),filter:Mc(2),some:Mc(3),every:Mc(4),find:Mc(5),findIndex:Mc(6),filterReject:Mc(7)},Uc=a,Fc=function(t,e){var r=[][t];return!!r&&Uc((function(){r.call(null,e||function(){throw 1},1)}))},Bc=Nc.forEach,qc=o,Gc=cc,Wc=lc,zc=Fc("forEach")?[].forEach:function(t){return Bc(this,t,arguments.length>1?arguments[1]:void 0)},$c=Vt,Vc=function(t){if(t&&t.forEach!==zc)try{$c(t,"forEach",zc)}catch(e){t.forEach=zc}};for(var Hc in Gc)Vc(qc[Hc]&&qc[Hc].prototype);Vc(Wc);var Yc,Jc=Object.prototype,Kc=Jc.hasOwnProperty,Xc="function"==typeof Symbol?Symbol:{},Zc=Xc.iterator||"@@iterator",Qc=Xc.asyncIterator||"@@asyncIterator",ts=Xc.toStringTag||"@@toStringTag";function es(t,e,r,n){var o=e&&e.prototype instanceof cs?e:cs,i=Object.create(o.prototype),a=new xs(n||[]);return i._invoke=function(t,e,r){var n=ns;return function(o,i){if(n===is)throw new Error("Generator is already running");if(n===as){if("throw"===o)throw i;return ks()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=ms(a,r);if(u){if(u===us)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===ns)throw n=as,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=is;var c=rs(t,e,r);if("normal"===c.type){if(n=r.done?as:os,c.arg===us)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=as,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function rs(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}var ns="suspendedStart",os="suspendedYield",is="executing",as="completed",us={};function cs(){}function ss(){}function fs(){}var ls={};ls[Zc]=function(){return this};var ps=Object.getPrototypeOf,hs=ps&&ps(ps(Ss([])));hs&&hs!==Jc&&Kc.call(hs,Zc)&&(ls=hs);var ds=fs.prototype=cs.prototype=Object.create(ls);function vs(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function ys(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===ss||"GeneratorFunction"===(e.displayName||e.name))}function gs(t,e){function r(n,o,i,a){var u=rs(t[n],t,o);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==typeof s&&Kc.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 ms(t,e){var r=t.iterator[e.method];if(r===Yc){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=Yc,ms(t,e),"throw"===e.method))return us;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return us}var n=rs(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,us;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=Yc),e.delegate=null,us):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,us)}function bs(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 ws(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function xs(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(bs,this),this.reset(!0)}function Ss(t){if(t){var e=t[Zc];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(Kc.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=Yc,e.done=!0,e};return n.next=n}}return{next:ks}}function ks(){return{value:Yc,done:!0}}ss.prototype=ds.constructor=fs,fs.constructor=ss,fs[ts]=ss.displayName="GeneratorFunction",vs(gs.prototype),gs.prototype[Qc]=function(){return this},vs(ds),ds[ts]="Generator",ds[Zc]=function(){return this},ds.toString=function(){return"[object Generator]"},xs.prototype={constructor:xs,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=Yc,this.done=!1,this.delegate=null,this.method="next",this.arg=Yc,this.tryEntries.forEach(ws),!t)for(var e in this)"t"===e.charAt(0)&&Kc.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=Yc)},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=Yc),!!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=Kc.call(o,"catchLoc"),u=Kc.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&&Kc.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,us):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),us},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),ws(r),us}},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;ws(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:Ss(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=Yc),us}};var Es={wrap:es,isGeneratorFunction:ys,AsyncIterator:gs,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,fs):(t.__proto__=fs,ts in t||(t[ts]="GeneratorFunction")),t.prototype=Object.create(ds),t},awrap:function(t){return{__await:t}},async:function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new gs(es(t,e,r,n),o);return ys(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:Ss};function As(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 Os(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}var js=Ut,Ts=dn,_s=xt,Ls=Mt,Rs=d,Is=function(t,e,r){var n=_s(e);n in t?Ls.f(t,n,Rs(0,r)):t[n]=r},Ps=Xr,Ds=X,Cs=function(t,e,r,n){try{return n?e(js(r)[0],r[1]):e(r)}catch(e){Ts(t,"throw",e)}},Ms=Jr,Ns=Ne,Us=Is,Fs=pn,Bs=sn,qs=function(t){var e,r,n,o,i,a,u=Ds(t),c="function"==typeof this?this:Array,s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,p=Bs(u),h=0;if(l&&(f=Ps(f,s>2?arguments[2]:void 0,2)),null==p||c==Array&&Ms(p))for(r=new c(e=Ns(u.length));e>h;h++)a=l?f(u[h],h):u[h],Us(r,h,a);else for(i=(o=Fs(u,p)).next,r=new c;!(n=i.call(o)).done;h++)a=l?Cs(o,f,[n.value,h],!0):n.value,Us(r,h,a);return r.length=h,r},Gs=qs;Or({target:"Array",stat:!0,forced:!In((function(t){Array.from(t)}))},{from:Gs});var Ws,zs,$s,Vs={exports:{}};function Hs(t,e){return["".concat((new Date).toISOString()," MCS Client ").concat(t,":")].concat(Array.from(e))}zs=r,$s=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 f(t,r,o){var i,a=this,c="loglevel";function f(){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){f()||a.setLevel(t,!1)},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=null==r?"WARN":r),a.setLevel(l,!1)}var l=new f,p={};l.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 f(t,l.getLevel(),l.methodFactory)),e};var h=typeof window!==e?window.log:void 0;return l.noConflict=function(){return typeof window!==e&&window.log===l&&(window.log=h),l},l.getLoggers=function(){return p},l.default=l,l},(Ws=Vs).exports?Ws.exports=$s():zs.log=$s();class Ys{constructor(t){Yi(this,"prefix",""),this.prefix=null!=t&&t.length>0?t+" ":""}static scope(t){return new Ys(t)}setLevel(t){Vs.exports.setLevel(t)}static setLevel(t){Vs.exports.setLevel(t)}trace(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Vs.exports.trace.apply(null,Hs(this.prefix+"T",e))}debug(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Vs.exports.debug.apply(null,Hs(this.prefix+"D",e))}info(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Vs.exports.info.apply(null,Hs(this.prefix+"I",e))}warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Vs.exports.warn.apply(null,Hs(this.prefix+"W",e))}error(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Vs.exports.error.apply(null,Hs(this.prefix+"E",e))}static trace(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Vs.exports.trace.apply(null,Hs("T",e))}static debug(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Vs.exports.debug.apply(null,Hs("D",e))}static info(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Vs.exports.info.apply(null,Hs("I",e))}static warn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Vs.exports.warn.apply(null,Hs("W",e))}static error(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Vs.exports.error.apply(null,Hs("E",e))}}var Js,Ks=q,Xs=function(t){if(Ks(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},Zs=E,Qs=y,tf=ht("match"),ef=function(t){var e;return Zs(t)&&(void 0!==(e=t[tf])?!!e:"RegExp"==Qs(t))},rf=ef,nf=ht("match"),of=Or,af=i.f,uf=Ne,cf=Xs,sf=function(t){if(rf(t))throw TypeError("The method doesn't accept regular expressions");return t},ff=w,lf=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[nf]=!1,"/./"[t](e)}catch(t){}}return!1},pf="".startsWith,hf=Math.min,df=lf("startsWith");of({target:"String",proto:!0,forced:!!(df||(Js=af(String.prototype,"startsWith"),!Js||Js.writable))&&!df},{startsWith:function(t){var e=cf(ff(this));sf(t);var r=uf(hf(arguments.length>1?arguments[1]:void 0,e.length)),n=cf(t);return pf?pf.call(e,n,r):e.slice(r,r+n.length)===n}});var vf=(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 yf{constructor(t,e,r,n){var o,i,a,u,c,s,f=null!==(o=null!==(i=n.MCS)&&void 0!==i?i:n)&&void 0!==o?o:{};this.region=null!==(a=null!==(u=f.region)&&void 0!==u?u:n.region)&&void 0!==a?a:"us1",this.mediaUrl=vf(e,this.region),this.mediaSetUrl=r?vf(r):"".concat(this.mediaUrl,"Set"),this.token=t,this.retryWhenThrottledOverride=null===(c=f.retryWhenThrottledOverride)||void 0===c||c,this.backoffConfigOverride=null!==(s=f.backoffConfigOverride)&&void 0!==s?s:yf.backoffConfigDefault}static get backoffConfigDefault(){return{min:1e3,max:4e3,maxAttemptsCount:3}}static get retryWhenThrottledDefault(){return true}updateToken(t){this.token=t}}class gf{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 $i(function(){var e=Hi(Es.mark((function e(r,n,o){var i,a;return Es.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 mf=Wr,bf=X,wf=b,xf=Ne,Sf=function(t){return function(e,r,n,o){mf(r);var i=bf(e),a=wf(i),u=xf(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}},kf={left:Sf(!1),right:Sf(!0)}.left,Ef=C,Af=Fn;Or({target:"Array",proto:!0,forced:!Fc("reduce")||!Af&&Ef>79&&Ef<83},{reduce:function(t){return kf(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}});var Of=Ut,jf={},Tf=a,_f=o.RegExp;jf.UNSUPPORTED_Y=Tf((function(){var t=_f("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),jf.BROKEN_CARET=Tf((function(){var t=_f("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));var Lf,Rf,If=a,Pf=o.RegExp,Df=If((function(){var t=Pf(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Cf=a,Mf=o.RegExp,Nf=Cf((function(){var t=Mf("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Uf=Xs,Ff=function(){var t=Of(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},Bf=jf,qf=W.exports,Gf=da,Wf=Se.get,zf=Df,$f=Nf,Vf=RegExp.prototype.exec,Hf=qf("native-string-replace",String.prototype.replace),Yf=Vf,Jf=(Lf=/a/,Rf=/b*/g,Vf.call(Lf,"a"),Vf.call(Rf,"a"),0!==Lf.lastIndex||0!==Rf.lastIndex),Kf=Bf.UNSUPPORTED_Y||Bf.BROKEN_CARET,Xf=void 0!==/()??/.exec("")[1];(Jf||Xf||Kf||zf||$f)&&(Yf=function(t){var e,r,n,o,i,a,u,c=this,s=Wf(c),f=Uf(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=Yf.call(l,f),c.lastIndex=l.lastIndex,e;var p=s.groups,h=Kf&&c.sticky,d=Ff.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)),Xf&&(r=new RegExp("^"+v+"$(?!\\s)",d)),Jf&&(n=c.lastIndex),o=Vf.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:Jf&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Xf&&o&&o.length>1&&Hf.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=Gf(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Zf=Yf;Or({target:"RegExp",proto:!0,forced:/./.exec!==Zf},{exec:Zf});var Qf=Ht.exports,tl=Zf,el=a,rl=ht,nl=Vt,ol=rl("species"),il=RegExp.prototype,al=De,ul=Xs,cl=w,sl=function(t){return function(e,r){var n,o,i=ul(cl(e)),a=al(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}},fl={codeAt:sl(!1),charAt:sl(!0)},ll=fl.charAt,pl=y,hl=Zf,dl=function(t,e,r,n){var o=rl(t),i=!el((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!el((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[ol]=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===tl||a===il.exec?i&&!o?{done:!0,value:u.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}));Qf(String.prototype,t,c[0]),Qf(il,o,c[1])}n&&nl(il[o],"sham",!0)},vl=ef,yl=Ut,gl=w,ml=Mn,bl=function(t,e,r){return e+(r?ll(t,e).length:1)},wl=Ne,xl=Xs,Sl=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"!==pl(t))throw TypeError("RegExp#exec called on incompatible receiver");return hl.call(t,e)},kl=Zf,El=a,Al=jf.UNSUPPORTED_Y,Ol=[].push,jl=Math.min,Tl=4294967295;dl("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=xl(gl(this)),o=void 0===r?Tl:r>>>0;if(0===o)return[];if(void 0===t)return[n];if(!vl(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=kl.call(l,n))&&!((a=l.lastIndex)>f&&(c.push(n.slice(f,i.index)),i.length>1&&i.index<n.length&&Ol.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=gl(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(xl(o),e,r)},function(t,o){var i=yl(this),a=xl(t),u=r(n,i,a,o,n!==e);if(u.done)return u.value;var c=ml(i,RegExp),s=i.unicode,f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(Al?"g":"y"),l=new c(Al?"^(?:"+i.source+")":i,f),p=void 0===o?Tl:o>>>0;if(0===p)return[];if(0===a.length)return null===Sl(l,a)?[a]:[];for(var h=0,d=0,v=[];d<a.length;){l.lastIndex=Al?0:d;var y,g=Sl(l,Al?a.slice(d):a);if(null===g||(y=jl(wl(l.lastIndex+(Al?d:0)),a.length))===h)d=bl(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}]}),!!El((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]})),Al);var _l=Or,Ll=a,Rl=j("JSON","stringify"),Il=/[\uD800-\uDFFF]/g,Pl=/^[\uD800-\uDBFF]$/,Dl=/^[\uDC00-\uDFFF]$/,Cl=function(t,e,r){var n=r.charAt(e-1),o=r.charAt(e+1);return Pl.test(t)&&!Dl.test(o)||Dl.test(t)&&!Pl.test(n)?"\\u"+t.charCodeAt(0).toString(16):t},Ml=Ll((function(){return'"\\udf06\\ud834"'!==Rl("\udf06\ud834")||'"\\udead"'!==Rl("\udead")}));Rl&&_l({target:"JSON",stat:!0,forced:Ml},{stringify:function(t,e,r){var n=Rl.apply(null,arguments);return"string"==typeof n?n.replace(Il,Cl):n}});class Nl extends Error{constructor(t,e,r,n,o){super(t),this.code=e,this.body=r,this.status=n,this.headers=o}}var Ul=e.XMLHttpRequest||{};class Fl{static request(t,e,r,n){return new $i(((o,i,a)=>{var u=new Ul,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";a="string"==typeof r?r&&1===r.split("\n",2).length?r:"":JSON.stringify(r);var f="".concat(u.status,": [").concat(s,"] ").concat(a);i(new Nl(f,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 Fl.request("GET",t,e)}post(t,e,r){return Fl.request("POST",t,e,r)}}var Bl=u,ql=a,Gl=Zi,Wl=er,zl=c,$l=X,Vl=b,Hl=Object.assign,Yl=Object.defineProperty,Jl=!Hl||ql((function(){if(Bl&&1!==Hl({b:1},Hl(Yl({},"a",{enumerable:!0,get:function(){Yl(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!=Hl({},t)[r]||Gl(Hl({},e)).join("")!=n}))?function(t,e){for(var r=$l(t),n=arguments.length,o=1,i=Wl.f,a=zl.f;n>o;)for(var u,c=Vl(arguments[o++]),s=i?Gl(c).concat(i(c)):Gl(c),f=s.length,l=0;f>l;)u=s[l++],Bl&&!a.call(c,u)||(r[u]=c[u]);return r}:Hl,Kl=Jl;Or({target:"Object",stat:!0,forced:Object.assign!==Kl},{assign:Kl});var Xl=fl.charAt,Zl=Xs,Ql=Se,tp=ou,ep="String Iterator",rp=Ql.set,np=Ql.getterFor(ep);tp(String,"String",(function(t){rp(this,{type:ep,string:Zl(t),index:0})}),(function(){var t,e=np(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Xl(r,n),e.index+=t.length,{value:t,done:!1})}));var op=a,ip=ht("iterator"),ap=!op((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[ip]||"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})),up=2147483647,cp=/[^\0-\u007E]/,sp=/[.\u3002\uFF0E\uFF61]/g,fp="Overflow: input needs wider integers to process",lp=Math.floor,pp=String.fromCharCode,hp=function(t){return t+22+75*(t<26)},dp=function(t,e,r){var n=0;for(t=r?lp(t/700):t>>1,t+=lp(t/e);t>455;n+=36)t=lp(t/35);return lp(n+36*t/(t+38))},vp=function(t){var e,r,n=[],o=(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)).length,i=128,a=0,u=72;for(e=0;e<t.length;e++)(r=t[e])<128&&n.push(pp(r));var c=n.length,s=c;for(c&&n.push("-");s<o;){var f=up;for(e=0;e<t.length;e++)(r=t[e])>=i&&r<f&&(f=r);var l=s+1;if(f-i>lp((up-a)/l))throw RangeError(fp);for(a+=(f-i)*l,i=f,e=0;e<t.length;e++){if((r=t[e])<i&&++a>up)throw RangeError(fp);if(r==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;n.push(pp(hp(d+v%y))),p=lp(v/y)}n.push(pp(hp(p))),u=dp(a,l,s==c),a=0,++s}}++a,++i}return n.join("")},yp=Or,gp=j,mp=ap,bp=Ht.exports,wp=_r,xp=Nr,Sp=Ga,kp=Se,Ep=zr,Ap=tt,Op=Xr,jp=on,Tp=Ut,_p=E,Lp=Xs,Rp=da,Ip=d,Pp=pn,Dp=sn,Cp=ht,Mp=gp("fetch"),Np=gp("Request"),Up=Np&&Np.prototype,Fp=gp("Headers"),Bp=Cp("iterator"),qp="URLSearchParams",Gp="URLSearchParamsIterator",Wp=kp.set,zp=kp.getterFor(qp),$p=kp.getterFor(Gp),Vp=/\+/g,Hp=Array(4),Yp=function(t){return Hp[t-1]||(Hp[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},Jp=function(t){try{return decodeURIComponent(t)}catch(e){return t}},Kp=function(t){var e=t.replace(Vp," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(Yp(r--),Jp);return e}},Xp=/[!'()~]|%20/g,Zp={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Qp=function(t){return Zp[t]},th=function(t){return encodeURIComponent(t).replace(Xp,Qp)},eh=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:Kp(n.shift()),value:Kp(n.join("="))}))},rh=function(t){this.entries.length=0,eh(this.entries,t)},nh=function(t,e){if(t<e)throw TypeError("Not enough arguments")},oh=Sp((function(t,e){Wp(this,{type:Gp,iterator:Pp(zp(t).entries),kind:e})}),"Iterator",(function(){var t=$p(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})),ih=function(){Ep(this,ih,qp);var t,e,r,n,o,i,a,u,c,s=arguments.length>0?arguments[0]:void 0,f=this,l=[];if(Wp(f,{type:qp,entries:l,updateURL:function(){},updateSearchParams:rh}),void 0!==s)if(_p(s))if("function"==typeof(t=Dp(s)))for(r=(e=Pp(s,t)).next;!(n=r.call(e)).done;){if((a=(i=(o=Pp(Tp(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:Lp(a.value),value:Lp(u.value)})}else for(c in s)Ap(s,c)&&l.push({key:c,value:Lp(s[c])});else eh(l,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:Lp(s))},ah=ih.prototype;if(wp(ah,{append:function(t,e){nh(arguments.length,2);var r=zp(this);r.entries.push({key:Lp(t),value:Lp(e)}),r.updateURL()},delete:function(t){nh(arguments.length,1);for(var e=zp(this),r=e.entries,n=Lp(t),o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;e.updateURL()},get:function(t){nh(arguments.length,1);for(var e=zp(this).entries,r=Lp(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){nh(arguments.length,1);for(var e=zp(this).entries,r=Lp(t),n=[],o=0;o<e.length;o++)e[o].key===r&&n.push(e[o].value);return n},has:function(t){nh(arguments.length,1);for(var e=zp(this).entries,r=Lp(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){nh(arguments.length,1);for(var r,n=zp(this),o=n.entries,i=!1,a=Lp(t),u=Lp(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=zp(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=zp(this).entries,n=Op(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 oh(this,"keys")},values:function(){return new oh(this,"values")},entries:function(){return new oh(this,"entries")}},{enumerable:!0}),bp(ah,Bp,ah.entries),bp(ah,"toString",(function(){for(var t,e=zp(this).entries,r=[],n=0;n<e.length;)t=e[n++],r.push(th(t.key)+"="+th(t.value));return r.join("&")}),{enumerable:!0}),xp(ih,qp),yp({global:!0,forced:!mp},{URLSearchParams:ih}),!mp&&"function"==typeof Fp){var uh=function(t){if(_p(t)){var e,r=t.body;if(jp(r)===qp)return(e=t.headers?new Fp(t.headers):new Fp).has("content-type")||e.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),Rp(t,{body:Ip(0,String(r)),headers:Ip(0,e)})}return t};if("function"==typeof Mp&&yp({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Mp(t,arguments.length>1?uh(arguments[1]):{})}}),"function"==typeof Np){var ch=function(t){return Ep(this,ch,"Request"),new Np(t,arguments.length>1?uh(arguments[1]):{})};Up.constructor=ch,ch.prototype=Up,yp({global:!0,forced:!0},{Request:ch})}}var sh,fh={URLSearchParams:ih,getState:zp},lh=Or,ph=u,hh=ap,dh=o,vh=ra,yh=Ht.exports,gh=zr,mh=tt,bh=Jl,wh=qs,xh=fl.codeAt,Sh=function(t){var e,r,n=[],o=t.toLowerCase().replace(sp,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(cp.test(r)?"xn--"+vp(r):r);return n.join(".")},kh=Xs,Eh=Nr,Ah=fh,Oh=Se,jh=dh.URL,Th=Ah.URLSearchParams,_h=Ah.getState,Lh=Oh.set,Rh=Oh.getterFor("URL"),Ih=Math.floor,Ph=Math.pow,Dh="Invalid scheme",Ch="Invalid host",Mh="Invalid port",Nh=/[A-Za-z]/,Uh=/[\d+-.A-Za-z]/,Fh=/\d/,Bh=/^0x/i,qh=/^[0-7]+$/,Gh=/^\d+$/,Wh=/^[\dA-Fa-f]+$/,zh=/[\0\t\n\r #%/:<>?@[\\\]^|]/,$h=/[\0\t\n\r #/:<>?@[\\\]^|]/,Vh=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Hh=/[\t\n\r]/g,Yh=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return Ch;if(!(r=Kh(e.slice(1,-1))))return Ch;t.host=r}else if(od(t)){if(e=Sh(e),zh.test(e))return Ch;if(null===(r=Jh(e)))return Ch;t.host=r}else{if($h.test(e))return Ch;for(r="",n=wh(e),o=0;o<n.length;o++)r+=rd(n[o],Zh);t.host=r}},Jh=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=Bh.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?Gh:8==i?qh:Wh).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>=Ph(256,5-e))return null}else if(a>255)return null;for(u=r.pop(),n=0;n<r.length;n++)u+=r[n]*Ph(256,3-n);return u},Kh=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&&Wh.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(!Fh.test(p()))return;for(;Fh.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},Xh=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=Ih(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},Zh={},Qh=bh({},Zh,{" ":1,'"':1,"<":1,">":1,"`":1}),td=bh({},Qh,{"#":1,"?":1,"{":1,"}":1}),ed=bh({},td,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),rd=function(t,e){var r=xh(t,0);return r>32&&r<127&&!mh(e,t)?t:encodeURIComponent(t)},nd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},od=function(t){return mh(nd,t.scheme)},id=function(t){return""!=t.username||""!=t.password},ad=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},ud=function(t,e){var r;return 2==t.length&&Nh.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},cd=function(t){var e;return t.length>1&&ud(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},sd=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&ud(e[0],!0)||e.pop()},fd=function(t){return"."===t||"%2e"===t.toLowerCase()},ld={},pd={},hd={},dd={},vd={},yd={},gd={},md={},bd={},wd={},xd={},Sd={},kd={},Ed={},Ad={},Od={},jd={},Td={},_d={},Ld={},Rd={},Id=function(t,e,r,n){var o,i,a,u,c,s=r||ld,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(Vh,"")),e=e.replace(Hh,""),o=wh(e);f<=o.length;){switch(i=o[f],s){case ld:if(!i||!Nh.test(i)){if(r)return Dh;s=hd;continue}l+=i.toLowerCase(),s=pd;break;case pd:if(i&&(Uh.test(i)||"+"==i||"-"==i||"."==i))l+=i.toLowerCase();else{if(":"!=i){if(r)return Dh;l="",s=hd,f=0;continue}if(r&&(od(t)!=mh(nd,l)||"file"==l&&(id(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=l,r)return void(od(t)&&nd[t.scheme]==t.port&&(t.port=null));l="","file"==t.scheme?s=Ed:od(t)&&n&&n.scheme==t.scheme?s=dd:od(t)?s=md:"/"==o[f+1]?(s=vd,f++):(t.cannotBeABaseURL=!0,t.path.push(""),s=_d)}break;case hd:if(!n||n.cannotBeABaseURL&&"#"!=i)return Dh;if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,s=Rd;break}s="file"==n.scheme?Ed:yd;continue;case dd:if("/"!=i||"/"!=o[f+1]){s=yd;continue}s=bd,f++;break;case vd:if("/"==i){s=wd;break}s=Td;continue;case yd:if(t.scheme=n.scheme,i==sh)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&&od(t))s=gd;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=Ld;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=Td;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=Rd}break;case gd:if(!od(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,s=Td;continue}s=wd}else s=bd;break;case md:if(s=bd,"/"!=i||"/"!=l.charAt(f+1))continue;f++;break;case bd:if("/"!=i&&"\\"!=i){s=wd;continue}break;case wd:if("@"==i){p&&(l="%40"+l),p=!0,a=wh(l);for(var v=0;v<a.length;v++){var y=a[v];if(":"!=y||d){var g=rd(y,ed);d?t.password+=g:t.username+=g}else d=!0}l=""}else if(i==sh||"/"==i||"?"==i||"#"==i||"\\"==i&&od(t)){if(p&&""==l)return"Invalid authority";f-=wh(l).length+1,l="",s=xd}else l+=i;break;case xd:case Sd:if(r&&"file"==t.scheme){s=Od;continue}if(":"!=i||h){if(i==sh||"/"==i||"?"==i||"#"==i||"\\"==i&&od(t)){if(od(t)&&""==l)return Ch;if(r&&""==l&&(id(t)||null!==t.port))return;if(u=Yh(t,l))return u;if(l="",s=jd,r)return;continue}"["==i?h=!0:"]"==i&&(h=!1),l+=i}else{if(""==l)return Ch;if(u=Yh(t,l))return u;if(l="",s=kd,r==Sd)return}break;case kd:if(!Fh.test(i)){if(i==sh||"/"==i||"?"==i||"#"==i||"\\"==i&&od(t)||r){if(""!=l){var m=parseInt(l,10);if(m>65535)return Mh;t.port=od(t)&&m===nd[t.scheme]?null:m,l=""}if(r)return;s=jd;continue}return Mh}l+=i;break;case Ed:if(t.scheme="file","/"==i||"\\"==i)s=Ad;else{if(!n||"file"!=n.scheme){s=Td;continue}if(i==sh)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=Ld;else{if("#"!=i){cd(o.slice(f).join(""))||(t.host=n.host,t.path=n.path.slice(),sd(t)),s=Td;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=Rd}}break;case Ad:if("/"==i||"\\"==i){s=Od;break}n&&"file"==n.scheme&&!cd(o.slice(f).join(""))&&(ud(n.path[0],!0)?t.path.push(n.path[0]):t.host=n.host),s=Td;continue;case Od:if(i==sh||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&ud(l))s=Td;else if(""==l){if(t.host="",r)return;s=jd}else{if(u=Yh(t,l))return u;if("localhost"==t.host&&(t.host=""),r)return;l="",s=jd}continue}l+=i;break;case jd:if(od(t)){if(s=Td,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=sh&&(s=Td,"/"!=i))continue}else t.fragment="",s=Rd;else t.query="",s=Ld;break;case Td:if(i==sh||"/"==i||"\\"==i&&od(t)||!r&&("?"==i||"#"==i)){if(".."===(c=(c=l).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(sd(t),"/"==i||"\\"==i&&od(t)||t.path.push("")):fd(l)?"/"==i||"\\"==i&&od(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&ud(l)&&(t.host&&(t.host=""),l=l.charAt(0)+":"),t.path.push(l)),l="","file"==t.scheme&&(i==sh||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",s=Ld):"#"==i&&(t.fragment="",s=Rd)}else l+=rd(i,td);break;case _d:"?"==i?(t.query="",s=Ld):"#"==i?(t.fragment="",s=Rd):i!=sh&&(t.path[0]+=rd(i,Zh));break;case Ld:r||"#"!=i?i!=sh&&("'"==i&&od(t)?t.query+="%27":t.query+="#"==i?"%23":rd(i,Zh)):(t.fragment="",s=Rd);break;case Rd:i!=sh&&(t.fragment+=rd(i,Qh))}f++}},Pd=function(t){var e,r,n=gh(this,Pd,"URL"),o=arguments.length>1?arguments[1]:void 0,i=kh(t),a=Lh(n,{type:"URL"});if(void 0!==o)if(o instanceof Pd)e=Rh(o);else if(r=Id(e={},kh(o)))throw TypeError(r);if(r=Id(a,i,null,e))throw TypeError(r);var u=a.searchParams=new Th,c=_h(u);c.updateSearchParams(a.query),c.updateURL=function(){a.query=String(u)||null},ph||(n.href=Cd.call(n),n.origin=Md.call(n),n.protocol=Nd.call(n),n.username=Ud.call(n),n.password=Fd.call(n),n.host=Bd.call(n),n.hostname=qd.call(n),n.port=Gd.call(n),n.pathname=Wd.call(n),n.search=zd.call(n),n.searchParams=$d.call(n),n.hash=Vd.call(n))},Dd=Pd.prototype,Cd=function(){var t=Rh(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+="//",id(t)&&(s+=r+(n?":"+n:"")+"@"),s+=Xh(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},Md=function(){var t=Rh(this),e=t.scheme,r=t.port;if("blob"==e)try{return new Pd(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&od(t)?e+"://"+Xh(t.host)+(null!==r?":"+r:""):"null"},Nd=function(){return Rh(this).scheme+":"},Ud=function(){return Rh(this).username},Fd=function(){return Rh(this).password},Bd=function(){var t=Rh(this),e=t.host,r=t.port;return null===e?"":null===r?Xh(e):Xh(e)+":"+r},qd=function(){var t=Rh(this).host;return null===t?"":Xh(t)},Gd=function(){var t=Rh(this).port;return null===t?"":String(t)},Wd=function(){var t=Rh(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},zd=function(){var t=Rh(this).query;return t?"?"+t:""},$d=function(){return Rh(this).searchParams},Vd=function(){var t=Rh(this).fragment;return t?"#"+t:""},Hd=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(ph&&vh(Dd,{href:Hd(Cd,(function(t){var e=Rh(this),r=kh(t),n=Id(e,r);if(n)throw TypeError(n);_h(e.searchParams).updateSearchParams(e.query)})),origin:Hd(Md),protocol:Hd(Nd,(function(t){var e=Rh(this);Id(e,kh(t)+":",ld)})),username:Hd(Ud,(function(t){var e=Rh(this),r=wh(kh(t));if(!ad(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=rd(r[n],ed)}})),password:Hd(Fd,(function(t){var e=Rh(this),r=wh(kh(t));if(!ad(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=rd(r[n],ed)}})),host:Hd(Bd,(function(t){var e=Rh(this);e.cannotBeABaseURL||Id(e,kh(t),xd)})),hostname:Hd(qd,(function(t){var e=Rh(this);e.cannotBeABaseURL||Id(e,kh(t),Sd)})),port:Hd(Gd,(function(t){var e=Rh(this);ad(e)||(""==(t=kh(t))?e.port=null:Id(e,t,kd))})),pathname:Hd(Wd,(function(t){var e=Rh(this);e.cannotBeABaseURL||(e.path=[],Id(e,kh(t),jd))})),search:Hd(zd,(function(t){var e=Rh(this);""==(t=kh(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",Id(e,t,Ld)),_h(e.searchParams).updateSearchParams(e.query)})),searchParams:Hd($d),hash:Hd(Vd,(function(t){var e=Rh(this);""!=(t=kh(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",Id(e,t,Rd)):e.fragment=null}))}),yh(Dd,"toJSON",(function(){return Cd.call(this)}),{enumerable:!0}),yh(Dd,"toString",(function(){return Cd.call(this)}),{enumerable:!0}),jh){var Yd=jh.createObjectURL,Jd=jh.revokeObjectURL;Yd&&yh(Pd,"createObjectURL",(function(t){return Yd.apply(jh,arguments)})),Jd&&yh(Pd,"revokeObjectURL",(function(t){return Jd.apply(jh,arguments)}))}Eh(Pd,"URL"),lh({global:!0,forced:!hh,sham:!ph},{URL:Pd});var Kd={},Xd=o,Zd=Nr;Or({global:!0},{Reflect:{}}),Zd(Xd.Reflect,"Reflect",!0);var Qd=Wr,tv=E,ev=[].slice,rv={},nv=function(t,e,r){if(!(e in rv)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";rv[e]=Function("C,a","return new C("+n.join(",")+")")}return rv[e](t,r)},ov=Function.bind||function(t){var e=Qd(this),r=ev.call(arguments,1),n=function(){var o=r.concat(ev.call(arguments));return this instanceof n?nv(e,o.length,o):e.apply(t,o)};return tv(e.prototype)&&(n.prototype=e.prototype),n},iv=Or,av=Wr,uv=Ut,cv=E,sv=da,fv=ov,lv=a,pv=j("Reflect","construct"),hv=lv((function(){function t(){}return!(pv((function(){}),[],t)instanceof t)})),dv=!lv((function(){pv((function(){}))})),vv=hv||dv;iv({target:"Reflect",stat:!0,forced:vv,sham:vv},{construct:function(t,e){av(t),uv(e);var r=arguments.length<3?t:av(arguments[2]);if(dv&&!hv)return pv(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(fv.apply(t,n))}var o=r.prototype,i=sv(cv(o)?o:Object.prototype),a=Function.apply.call(t,i,e);return cv(a)?a:i}});var yv={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}(yv);var gv={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}(gv);var mv={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}(mv);var bv={exports:{}},wv={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}(wv),function(t){var e=wv.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}(bv);var xv={exports:{}},Sv={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}(Sv),function(t){var e=Sv.exports.default,r=mv.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}(xv);var kv={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}(kv);var Ev={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}(Ev);var Av=on,Ov=Qr?{}.toString:function(){return"[object "+Av(this)+"]"},jv=Qr,Tv=Ht.exports,_v=Ov;jv||Tv(Object.prototype,"toString",_v,{unsafe:!0})
|
|
33
19
|
/*
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*/,Object.defineProperty(kh,"__esModule",{value:!0});var ed=Gh.exports,rd=Wh.exports,nd=zh.exports,od=Vh.exports,id=Yh.exports,ad=Xh.exports;function ud(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var cd=ud(qh.exports),sd=ud(ed),fd=ud(rd),ld=ud(nd),pd=ud(od),hd=ud(id),dd=ud(ad);function vd(){}function yd(){yd.init.call(this)}function gd(t){return void 0===t._maxListeners?yd.defaultMaxListeners:t._maxListeners}function md(t,e,r){if(e)t.call(r);else for(var n=t.length,o=Od(t,n),i=0;i<n;++i)o[i].call(r)}function bd(t,e,r,n){if(e)t.call(r,n);else for(var o=t.length,i=Od(t,o),a=0;a<o;++a)i[a].call(r,n)}function wd(t,e,r,n,o){if(e)t.call(r,n,o);else for(var i=t.length,a=Od(t,i),u=0;u<i;++u)a[u].call(r,n,o)}function xd(t,e,r,n,o,i){if(e)t.call(r,n,o,i);else for(var a=t.length,u=Od(t,a),c=0;c<a;++c)u[c].call(r,n,o,i)}function Sd(t,e,r,n){if(e)t.apply(r,n);else for(var o=t.length,i=Od(t,o),a=0;a<o;++a)i[a].apply(r,n)}function kd(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 vd,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=gd(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 Ad(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 Ed(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 Od(t,e){for(var r=new Array(e);e--;)r[e]=t[e];return r}function jd(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=hd.default(t);if(e){var o=hd.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pd.default(this,r)}}vd.prototype=Object.create(null),yd.EventEmitter=yd,yd.usingDomains=!1,yd.prototype.domain=void 0,yd.prototype._events=void 0,yd.prototype._maxListeners=void 0,yd.defaultMaxListeners=10,yd.init=function(){this.domain=null,yd.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new vd,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},yd.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},yd.prototype.getMaxListeners=function(){return gd(this)},yd.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:md(r,f,this);break;case 2:bd(r,f,this,arguments[1]);break;case 3:wd(r,f,this,arguments[1],arguments[2]);break;case 4:xd(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];Sd(r,f,this,o)}return!0},yd.prototype.addListener=function(t,e){return kd(this,t,e,!1)},yd.prototype.on=yd.prototype.addListener,yd.prototype.prependListener=function(t,e){return kd(this,t,e,!0)},yd.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Ad(this,t,e)),this},yd.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Ad(this,t,e)),this},yd.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 vd:(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 vd,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},yd.prototype.off=function(t,e){return this.removeListener(t,e)},yd.prototype.removeAllListeners=function(t){var e,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new vd,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new vd: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 vd,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},yd.prototype.listeners=function(t){var e,r=this._events;return r&&(e=r[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):[]},yd.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):Ed.call(t,e)},yd.prototype.listenerCount=Ed,yd.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var Td=function(t){ld.default(r,t);var e=jd(r);function r(t){var n;return cd.default(this,r),n=e.call(this),dd.default(fd.default(n),"timeout",null),dd.default(fd.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 sd.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}(yd),Ld=function(t){ld.default(r,t);var e=jd(r);function r(t){var n;return cd.default(this,r),n=e.call(this),dd.default(fd.default(n),"resolve",(function(){})),dd.default(fd.default(n),"reject",(function(){})),n.retrier=new Td(t),n}return sd.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}(yd);function _d(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=hd.default(t);if(e){var o=hd.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return pd.default(this,r)}}function Rd(t){return null!=t}var Id=function(t){ld.default(r,t);var e=_d(r);function r(t){var n;cd.default(this,r),n=e.call(this),dd.default(fd.default(n),"backoffDelay",0),dd.default(fd.default(n),"nextBackoffDelay",0),dd.default(fd.default(n),"backoffNumber",0),dd.default(fd.default(n),"timeoutID",null),dd.default(fd.default(n),"maxNumberOfRetry",-1);var o=t=t||{},i=o.initialDelay,a=o.maxDelay,u=o.randomisationFactor,c=o.factor;if(Rd(i)&&i<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(Rd(a)&&a<=1)throw new Error("The maximal timeout must be greater than 1.");if(Rd(u)&&(u<0||u>1))throw new Error("The randomisation factor must be between 0 and 1.");if(Rd(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 sd.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}(yd);kh.AsyncRetrier=Ld,kh.Backoff=Id;var Pd=kh.Retrier=Td,Cd=Va.scope("Network");class Dd{constructor(t,e){this.config=t,this.transport=e}backoffConfig(){return Object.assign(hu.backoffConfigDefault,this.config.backoffConfigOverride)}retryWhenThrottled(){var t,e;return null!==(t=null!==(e=this.config.retryWhenThrottledOverride)&&void 0!==e?e:hu.retryWhenThrottledDefault)&&void 0!==t&&t}executeWithRetry(t,e){var r=this;return n(Sa.mark((function o(){return Sa.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",new Promise(((o,i)=>{var a=[502,503,504];e&&a.push(429);var u=new Pd(r.backoffConfig());u.on("attempt",n(Sa.mark((function e(){var r;return Sa.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t();case 3:r=e.sent,u.succeeded(r),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),a.indexOf(e.t0.status)>-1||"Twilsock disconnected"===e.t0.message?u.failed(e.t0):(u.removeAllListeners(),u.cancel(),i(e.t0));case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))),u.on("succeeded",(t=>{o(t)})),u.on("cancelled",(t=>i(t))),u.on("failed",(t=>i(t))),u.start()})));case 1:case"end":return o.stop()}}),o)})))()}get(t){var e=this;return n(Sa.mark((function r(){var n,o;return Sa.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n={"X-Twilio-Token":e.config.token},Cd.trace("sending GET request to ",t," headers ",n),r.prev=2,r.next=5,e.executeWithRetry((()=>e.transport.get(t,n)),e.retryWhenThrottled());case 5:return o=r.sent,Cd.trace("response",o),r.abrupt("return",o);case 10:throw r.prev=10,r.t0=r.catch(2),Cd.debug("get() error ".concat(r.t0)),r.t0;case 14:case"end":return r.stop()}}),r,null,[[2,10]])})))()}post(t,r,o,i,a){var u=this;return n(Sa.mark((function n(){var c,s,f;return Sa.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return c={"X-Twilio-Token":u.config.token},"undefined"!=typeof FormData&&o instanceof FormData||!i||Object.assign(c,{"Content-Type":i}),s=new URL(t),r&&s.searchParams.append("Category",r),a&&s.searchParams.append("Filename",a),Cd.trace("sending POST request to ".concat(t," with headers ").concat(c)),n.prev=6,n.next=9,u.transport.post(s.href,c,o);case 9:f=n.sent,n.next=18;break;case 12:if(n.prev=12,n.t0=n.catch(6),!(void 0===e.XMLHttpRequest&&o instanceof FormData)){n.next=16;break}throw new TypeError("Posting FormData supported only with browser engine's FormData");case 16:throw Cd.debug("post() error ".concat(n.t0)),n.t0;case 18:return Cd.trace("response",f),n.abrupt("return",f);case 20:case"end":return n.stop()}}),n,null,[[6,12]])})))()}}var Md={},Ud=b,Nd=Array.isArray||function(t){return"Array"==Ud(t)},Fd=s,Bd=N,qd=yt("species"),Gd=function(t){return Bd>=51||!Fd((function(){var e=[];return(e.constructor={})[qd]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Wd=Lr,zd=j,$d=Nd,Vd=ze,Hd=Be,Yd=O,Xd=_a,Jd=yt,Kd=Gd("slice"),Zd=Jd("species"),Qd=[].slice,tv=Math.max;Wd({target:"Array",proto:!0,forced:!Kd},{slice:function(t,e){var r,n,o,i=Yd(this),a=Hd(i.length),u=Vd(t,a),c=Vd(void 0===e?a:e,a);if($d(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!$d(r.prototype)?zd(r)&&null===(r=r[Zd])&&(r=void 0):r=void 0,r===Array||void 0===r))return Qd.call(i,u,c);for(n=new(void 0===r?Array:r)(tv(c-u,0)),o=0;u<c;u++,o++)u in i&&Xd(n,o,i[u]);return n.length=o,n}});var ev={},rv=O,nv=Ce.f,ov={}.toString,iv="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];ev.f=function(t){return iv&&"[object Window]"==ov.call(t)?function(t){try{return nv(t)}catch(t){return iv.slice()}}(t):nv(rv(t))};var av={},uv=yt;av.f=uv;var cv=u,sv=nt,fv=av,lv=Ft.f,pv=function(t){var e=cv.Symbol||(cv.Symbol={});sv(e,t)||lv(e,t,{value:fv.f(t)})},hv=j,dv=Nd,vv=yt("species"),yv=function(t){var e;return dv(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!dv(e.prototype)?hv(e)&&null===(e=e[vv])&&(e=void 0):e=void 0),void 0===e?Array:e},gv=function(t,e){return new(yv(t))(0===e?0:e)},mv=Qr,bv=S,wv=tt,xv=Be,Sv=gv,kv=[].push,Av=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=wv(c),v=bv(d),y=mv(s,f,3),g=xv(v.length),m=0,b=l||Sv,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:kv.call(w,p)}else switch(t){case 4:return!1;case 7:kv.call(w,p)}return i?-1:n||o?o:w}},Ev={forEach:Av(0),map:Av(1),filter:Av(2),some:Av(3),every:Av(4),find:Av(5),findIndex:Av(6),filterReject:Av(7)},Ov=Lr,jv=u,Tv=_,Lv=f,_v=q,Rv=s,Iv=nt,Pv=Nd,Cv=j,Dv=z,Mv=qt,Uv=tt,Nv=O,Fv=At,Bv=Xa,qv=g,Gv=Ku,Wv=Pu,zv=Ce,$v=ev,Vv=or,Hv=c,Yv=Ft,Xv=l,Jv=Xt,Kv=Jt.exports,Zv=V.exports,Qv=fe,ty=at,ey=yt,ry=av,ny=pv,oy=Br,iy=Ee,ay=Ev.forEach,uy=se("hidden"),cy="Symbol",sy=ey("toPrimitive"),fy=iy.set,ly=iy.getterFor(cy),py=Object.prototype,hy=jv.Symbol,dy=Tv("JSON","stringify"),vy=Hv.f,yy=Yv.f,gy=$v.f,my=Xv.f,by=Zv("symbols"),wy=Zv("op-symbols"),xy=Zv("string-to-symbol-registry"),Sy=Zv("symbol-to-string-registry"),ky=Zv("wks"),Ay=jv.QObject,Ey=!Ay||!Ay.prototype||!Ay.prototype.findChild,Oy=Lv&&Rv((function(){return 7!=Gv(yy({},"a",{get:function(){return yy(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=vy(py,e);n&&delete py[e],yy(t,e,r),n&&t!==py&&yy(py,e,n)}:yy,jy=function(t,e){var r=by[t]=Gv(hy.prototype);return fy(r,{type:cy,tag:t,description:e}),Lv||(r.description=e),r},Ty=function(t,e,r){t===py&&Ty(wy,e,r),Mv(t);var n=Fv(e);return Mv(r),Iv(by,n)?(r.enumerable?(Iv(t,uy)&&t[uy][n]&&(t[uy][n]=!1),r=Gv(r,{enumerable:qv(0,!1)})):(Iv(t,uy)||yy(t,uy,qv(1,{})),t[uy][n]=!0),Oy(t,n,r)):yy(t,n,r)},Ly=function(t,e){Mv(t);var r=Nv(e),n=Wv(r).concat(Py(r));return ay(n,(function(e){Lv&&!_y.call(r,e)||Ty(t,e,r[e])})),t},_y=function(t){var e=Fv(t),r=my.call(this,e);return!(this===py&&Iv(by,e)&&!Iv(wy,e))&&(!(r||!Iv(this,e)||!Iv(by,e)||Iv(this,uy)&&this[uy][e])||r)},Ry=function(t,e){var r=Nv(t),n=Fv(e);if(r!==py||!Iv(by,n)||Iv(wy,n)){var o=vy(r,n);return!o||!Iv(by,n)||Iv(r,uy)&&r[uy][n]||(o.enumerable=!0),o}},Iy=function(t){var e=gy(Nv(t)),r=[];return ay(e,(function(t){Iv(by,t)||Iv(Qv,t)||r.push(t)})),r},Py=function(t){var e=t===py,r=gy(e?wy:Nv(t)),n=[];return ay(r,(function(t){!Iv(by,t)||e&&!Iv(py,t)||n.push(by[t])})),n};(_v||(Kv((hy=function(){if(this instanceof hy)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Bv(arguments[0]):void 0,e=ty(t),r=function(t){this===py&&r.call(wy,t),Iv(this,uy)&&Iv(this[uy],e)&&(this[uy][e]=!1),Oy(this,e,qv(1,t))};return Lv&&Ey&&Oy(py,e,{configurable:!0,set:r}),jy(e,t)}).prototype,"toString",(function(){return ly(this).tag})),Kv(hy,"withoutSetter",(function(t){return jy(ty(t),t)})),Xv.f=_y,Yv.f=Ty,Hv.f=Ry,zv.f=$v.f=Iy,Vv.f=Py,ry.f=function(t){return jy(ey(t),t)},Lv&&(yy(hy.prototype,"description",{configurable:!0,get:function(){return ly(this).description}}),Kv(py,"propertyIsEnumerable",_y,{unsafe:!0}))),Ov({global:!0,wrap:!0,forced:!_v,sham:!_v},{Symbol:hy}),ay(Wv(ky),(function(t){ny(t)})),Ov({target:cy,stat:!0,forced:!_v},{for:function(t){var e=Bv(t);if(Iv(xy,e))return xy[e];var r=hy(e);return xy[e]=r,Sy[r]=e,r},keyFor:function(t){if(!Dv(t))throw TypeError(t+" is not a symbol");if(Iv(Sy,t))return Sy[t]},useSetter:function(){Ey=!0},useSimple:function(){Ey=!1}}),Ov({target:"Object",stat:!0,forced:!_v,sham:!Lv},{create:function(t,e){return void 0===e?Gv(t):Ly(Gv(t),e)},defineProperty:Ty,defineProperties:Ly,getOwnPropertyDescriptor:Ry}),Ov({target:"Object",stat:!0,forced:!_v},{getOwnPropertyNames:Iy,getOwnPropertySymbols:Py}),Ov({target:"Object",stat:!0,forced:Rv((function(){Vv.f(1)}))},{getOwnPropertySymbols:function(t){return Vv.f(Uv(t))}}),dy)&&Ov({target:"JSON",stat:!0,forced:!_v||Rv((function(){var t=hy();return"[null]"!=dy([t])||"{}"!=dy({a:t})||"{}"!=dy(Object(t))}))},{stringify:function(t,e,r){for(var n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e,(Cv(e)||void 0!==t)&&!Dv(t))return Pv(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Dv(e))return e}),o[1]=e,dy.apply(null,o)}});hy.prototype[sy]||Jv(hy.prototype,sy,hy.prototype.valueOf),oy(hy,cy),Qv[uy]=!0;var Cy=Lr,Dy=f,My=u,Uy=nt,Ny=j,Fy=Ft.f,By=hr,qy=My.Symbol;if(Dy&&"function"==typeof qy&&(!("description"in qy.prototype)||void 0!==qy().description)){var Gy={},Wy=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof Wy?new qy(t):void 0===t?qy():qy(t);return""===t&&(Gy[e]=!0),e};By(Wy,qy);var zy=Wy.prototype=qy.prototype;zy.constructor=Wy;var $y=zy.toString,Vy="Symbol(test)"==String(qy("test")),Hy=/^Symbol\((.*)\)[^)]+$/;Fy(zy,"description",{configurable:!0,get:function(){var t=Ny(this)?this.valueOf():this,e=$y.call(t);if(Uy(Gy,t))return"";var r=Vy?e.slice(7,-1):e.replace(Hy,"$1");return""===r?void 0:r}}),Cy({global:!0,forced:!0},{Symbol:Wy})}pv("iterator");var Yy=f,Xy=Ft.f,Jy=Function.prototype,Ky=Jy.toString,Zy=/^\s*function ([^ (]*)/,Qy="name";Yy&&!(Qy in Jy)&&Xy(Jy,Qy,{configurable:!0,get:function(){try{return Ky.call(this).match(Zy)[1]}catch(t){return""}}});var tg=j,eg=Math.floor;Lr({target:"Number",stat:!0},{isInteger:function(t){return!tg(t)&&isFinite(t)&&eg(t)===t}});var rg=j,ng=Mr,og=k,ig=Xa,ag="[\t\n\v\f\r \u2028\u2029\ufeff]",ug=RegExp("^"+ag+ag+"*"),cg=RegExp(ag+ag+"*$"),sg=function(t){return function(e){var r=ig(og(e));return 1&t&&(r=r.replace(ug,"")),2&t&&(r=r.replace(cg,"")),r}},fg={start:sg(1),end:sg(2),trim:sg(3)},lg=f,pg=u,hg=xr,dg=Jt.exports,vg=nt,yg=b,gg=function(t,e,r){var n,o;return ng&&"function"==typeof(n=e.constructor)&&n!==r&&rg(o=n.prototype)&&o!==r.prototype&&ng(t,o),t},mg=z,bg=xt,wg=s,xg=Ku,Sg=Ce.f,kg=c.f,Ag=Ft.f,Eg=fg.trim,Og="Number",jg=pg.Number,Tg=jg.prototype,Lg=yg(xg(Tg))==Og,_g=function(t){if(mg(t))throw TypeError("Cannot convert a Symbol value to a number");var e,r,n,o,i,a,u,c,s=bg(t,"number");if("string"==typeof s&&s.length>2)if(43===(e=(s=Eg(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(hg(Og,!jg(" 0o1")||!jg("0b1")||jg("+0x1"))){for(var Rg,Ig=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof Ig&&(Lg?wg((function(){Tg.valueOf.call(r)})):yg(r)!=Og)?gg(new jg(_g(e)),r,Ig):_g(e)},Pg=lg?Sg(jg):"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(","),Cg=0;Pg.length>Cg;Cg++)vg(jg,Rg=Pg[Cg])&&!vg(Ig,Rg)&&Ag(Ig,Rg,kg(jg,Rg));Ig.prototype=Tg,Tg.constructor=Ig,dg(pg,Og,Ig)}var Dg={exports:{}},Mg={exports:{}};!function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.default=t.exports,t.exports.__esModule=!0}(Mg);var Ug={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.default=t.exports,t.exports.__esModule=!0}(Ug);var Ng={exports:{}},Fg={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.default=t.exports,t.exports.__esModule=!0}(Fg),function(t){var e=Fg.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.default=t.exports,t.exports.__esModule=!0}(Ng);var Bg={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.default=t.exports,t.exports.__esModule=!0}(Bg),function(t){var e=Mg.exports,r=Ug.exports,n=Ng.exports,o=Bg.exports;t.exports=function(t,i){return e(t)||r(t,i)||n(t,i)||o()},t.exports.default=t.exports,t.exports.__esModule=!0}(Dg);var qg=f,Gg=Pu,Wg=O,zg=l.f,$g=function(t){return function(e){for(var r,n=Wg(e),o=Gg(n),i=o.length,a=0,u=[];i>a;)r=o[a++],qg&&!zg.call(n,r)||u.push(t?[r,n[r]]:n[r]);return u}},Vg={entries:$g(!0),values:$g(!1)}.entries;Lr({target:"Object",stat:!0},{entries:function(t){return Vg(t)}});var Hg=Lr,Yg=s,Xg=Nd,Jg=j,Kg=tt,Zg=Be,Qg=_a,tm=gv,em=Gd,rm=N,nm=yt("isConcatSpreadable"),om=9007199254740991,im="Maximum allowed index exceeded",am=rm>=51||!Yg((function(){var t=[];return t[nm]=!1,t.concat()[0]!==t})),um=em("concat"),cm=function(t){if(!Jg(t))return!1;var e=t[nm];return void 0!==e?!!e:Xg(t)};Hg({target:"Array",proto:!0,forced:!am||!um},{concat:function(t){var e,r,n,o,i,a=Kg(this),u=tm(a,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(cm(i=-1===e?a:arguments[e])){if(c+(o=Zg(i.length))>om)throw TypeError(im);for(r=0;r<o;r++,c++)r in i&&Qg(u,c,i[r])}else{if(c>=om)throw TypeError(im);Qg(u,c++,i)}return u.length=c,u}});var sm={exports:{}},fm={exports:{}};!function(t){var e=Fg.exports;t.exports=function(t){if(Array.isArray(t))return e(t)},t.exports.default=t.exports,t.exports.__esModule=!0}(fm);var lm={exports:{}};!function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0}(lm);var pm={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.default=t.exports,t.exports.__esModule=!0}(pm),function(t){var e=fm.exports,r=lm.exports,n=Ng.exports,o=pm.exports;t.exports=function(t){return e(t)||r(t)||n(t)||o()},t.exports.default=t.exports,t.exports.__esModule=!0}(sm);var hm=Xe.includes,dm=gs;Lr({target:"Array",proto:!0},{includes:function(t){return hm(this,t,arguments.length>1?arguments[1]:void 0)}}),dm("includes");var vm=Lr,ym=O,gm=[].join,mm=S!=Object,bm=Su("join",",");vm({target:"Array",proto:!0,forced:mm||!bm},{join:function(t){return gm.call(ym(this),void 0===t?",":t)}}),
|
|
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(Kd,"__esModule",{value:!0});var Lv=gv.exports,Rv=mv.exports,Iv=bv.exports,Pv=xv.exports,Dv=kv.exports,Cv=Ev.exports;function Mv(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var Nv=Mv(yv.exports),Uv=Mv(Lv),Fv=Mv(Rv),Bv=Mv(Iv),qv=Mv(Pv),Gv=Mv(Dv),Wv=Mv(Cv);function zv(){}function $v(){$v.init.call(this)}function Vv(t){return void 0===t._maxListeners?$v.defaultMaxListeners:t._maxListeners}function Hv(t,e,r){if(e)t.call(r);else for(var n=t.length,o=ey(t,n),i=0;i<n;++i)o[i].call(r)}function Yv(t,e,r,n){if(e)t.call(r,n);else for(var o=t.length,i=ey(t,o),a=0;a<o;++a)i[a].call(r,n)}function Jv(t,e,r,n,o){if(e)t.call(r,n,o);else for(var i=t.length,a=ey(t,i),u=0;u<i;++u)a[u].call(r,n,o)}function Kv(t,e,r,n,o,i){if(e)t.call(r,n,o,i);else for(var a=t.length,u=ey(t,a),c=0;c<a;++c)u[c].call(r,n,o,i)}function Xv(t,e,r,n){if(e)t.apply(r,n);else for(var o=t.length,i=ey(t,o),a=0;a<o;++a)i[a].apply(r,n)}function Zv(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 zv,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=Vv(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 Qv(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 ty(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 ey(t,e){for(var r=new Array(e);e--;)r[e]=t[e];return r}function ry(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=Gv.default(t);if(e){var o=Gv.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qv.default(this,r)}}zv.prototype=Object.create(null),$v.EventEmitter=$v,$v.usingDomains=!1,$v.prototype.domain=void 0,$v.prototype._events=void 0,$v.prototype._maxListeners=void 0,$v.defaultMaxListeners=10,$v.init=function(){this.domain=null,$v.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new zv,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},$v.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},$v.prototype.getMaxListeners=function(){return Vv(this)},$v.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:Hv(r,f,this);break;case 2:Yv(r,f,this,arguments[1]);break;case 3:Jv(r,f,this,arguments[1],arguments[2]);break;case 4:Kv(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];Xv(r,f,this,o)}return!0},$v.prototype.addListener=function(t,e){return Zv(this,t,e,!1)},$v.prototype.on=$v.prototype.addListener,$v.prototype.prependListener=function(t,e){return Zv(this,t,e,!0)},$v.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Qv(this,t,e)),this},$v.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Qv(this,t,e)),this},$v.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 zv:(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 zv,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},$v.prototype.off=function(t,e){return this.removeListener(t,e)},$v.prototype.removeAllListeners=function(t){var e,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new zv,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new zv: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 zv,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},$v.prototype.listeners=function(t){var e,r=this._events;return r&&(e=r[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):[]},$v.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):ty.call(t,e)},$v.prototype.listenerCount=ty,$v.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var ny=function(t){Bv.default(r,t);var e=ry(r);function r(t){var n;return Nv.default(this,r),n=e.call(this),Wv.default(Fv.default(n),"timeout",null),Wv.default(Fv.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 Uv.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}($v),oy=function(t){Bv.default(r,t);var e=ry(r);function r(t){var n;return Nv.default(this,r),n=e.call(this),Wv.default(Fv.default(n),"resolve",(function(){})),Wv.default(Fv.default(n),"reject",(function(){})),n.retrier=new ny(t),n}return Uv.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}($v);function iy(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=Gv.default(t);if(e){var o=Gv.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qv.default(this,r)}}function ay(t){return null!=t}var uy=function(t){Bv.default(r,t);var e=iy(r);function r(t){var n;Nv.default(this,r),n=e.call(this),Wv.default(Fv.default(n),"backoffDelay",0),Wv.default(Fv.default(n),"nextBackoffDelay",0),Wv.default(Fv.default(n),"backoffNumber",0),Wv.default(Fv.default(n),"timeoutID",null),Wv.default(Fv.default(n),"maxNumberOfRetry",-1);var o=t=t||{},i=o.initialDelay,a=o.maxDelay,u=o.randomisationFactor,c=o.factor;if(ay(i)&&i<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(ay(a)&&a<=1)throw new Error("The maximal timeout must be greater than 1.");if(ay(u)&&(u<0||u>1))throw new Error("The randomisation factor must be between 0 and 1.");if(ay(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 Uv.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}($v);Kd.AsyncRetrier=oy,Kd.Backoff=uy;var cy=Kd.Retrier=ny,sy=Ys.scope("Network");class fy{constructor(t,e){this.config=t,this.transport=e}backoffConfig(){return Object.assign(yf.backoffConfigDefault,this.config.backoffConfigOverride)}retryWhenThrottled(){var t,e;return null!==(t=null!==(e=this.config.retryWhenThrottledOverride)&&void 0!==e?e:yf.retryWhenThrottledDefault)&&void 0!==t&&t}executeWithRetry(t,e){var r=this;return new $i(function(){var n=Hi(Es.mark((function n(o,i,a){var u,c;return Es.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:u=new cy(r.backoffConfig()),a((()=>{t.cancel(),u.removeAllListeners(),u.cancel()})),c=[502,503,504],e&&c.push(429),u.on("attempt",Hi(Es.mark((function e(){var r;return Es.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t();case 3:r=e.sent,u.succeeded(r),e.next=10;break;case 7:e.prev=7,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 10:case"end":return e.stop()}}),e,null,[[0,7]])})))),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 $i(function(){var r=Hi(Es.mark((function r(n,o,i){var a,u,c;return Es.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()),sy.trace("sending GET request to ",t," headers ",a),i((()=>u.cancel())),r.prev=4,r.next=7,u;case 7:c=r.sent,sy.trace("response",c),n(c),r.next=16;break;case 12:r.prev=12,r.t0=r.catch(4),sy.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 $i(function(){var r=Hi(Es.mark((function r(o,i,s){var f,l;return Es.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return f=a.transport.post(c.href,u,n),s((()=>f.cancel())),sy.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 sy.debug("post() error ".concat(r.t0)),i(r.t0),r.abrupt("return");case 17:sy.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)}}())}}var ly={},py=a,hy=C,dy=ht("species"),vy=function(t){return hy>=51||!py((function(){var e=[];return(e.constructor={})[dy]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},yy=Or,gy=E,my=Ec,by=qe,wy=Ne,xy=k,Sy=Is,ky=ht,Ey=vy("slice"),Ay=ky("species"),Oy=[].slice,jy=Math.max;yy({target:"Array",proto:!0,forced:!Ey},{slice:function(t,e){var r,n,o,i=xy(this),a=wy(i.length),u=by(t,a),c=by(void 0===e?a:e,a);if(my(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!my(r.prototype)?gy(r)&&null===(r=r[Ay])&&(r=void 0):r=void 0,r===Array||void 0===r))return Oy.call(i,u,c);for(n=new(void 0===r?Array:r)(jy(c-u,0)),o=0;u<c;u++,o++)u in i&&Sy(n,o,i[u]);return n.length=o,n}});var Ty=Or,_y=E,Ly=function(){var t=!1,e=/[ac]/;return e.exec=function(){return t=!0,/./.exec.apply(this,arguments)},!0===e.test("abc")&&t}(),Ry=/./.test;Ty({target:"RegExp",proto:!0,forced:!Ly},{test:function(t){if("function"!=typeof this.exec)return Ry.call(this,t);var e=this.exec(t);if(null!==e&&!_y(e))throw new Error("RegExp exec method returned something other than an Object or null");return!!e}});var Iy={},Py=ht;Iy.f=Py;var Dy=o,Cy=tt,My=Iy,Ny=Mt.f,Uy=function(t){var e=Dy.Symbol||(Dy.Symbol={});Cy(e,t)||Ny(e,t,{value:My.f(t)})},Fy=Or,By=o,qy=j,Gy=u,Wy=U,zy=a,$y=tt,Vy=Ec,Hy=E,Yy=q,Jy=Ut,Ky=X,Xy=k,Zy=xt,Qy=Xs,tg=d,eg=da,rg=Zi,ng=Re,og=vu,ig=er,ag=i,ug=Mt,cg=c,sg=Vt,fg=Ht.exports,lg=W.exports,pg=ue,hg=nt,dg=ht,vg=Iy,yg=Uy,gg=Nr,mg=Se,bg=Nc.forEach,wg=ae("hidden"),xg="Symbol",Sg=dg("toPrimitive"),kg=mg.set,Eg=mg.getterFor(xg),Ag=Object.prototype,Og=By.Symbol,jg=qy("JSON","stringify"),Tg=ag.f,_g=ug.f,Lg=og.f,Rg=cg.f,Ig=lg("symbols"),Pg=lg("op-symbols"),Dg=lg("string-to-symbol-registry"),Cg=lg("symbol-to-string-registry"),Mg=lg("wks"),Ng=By.QObject,Ug=!Ng||!Ng.prototype||!Ng.prototype.findChild,Fg=Gy&&zy((function(){return 7!=eg(_g({},"a",{get:function(){return _g(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=Tg(Ag,e);n&&delete Ag[e],_g(t,e,r),n&&t!==Ag&&_g(Ag,e,n)}:_g,Bg=function(t,e){var r=Ig[t]=eg(Og.prototype);return kg(r,{type:xg,tag:t,description:e}),Gy||(r.description=e),r},qg=function(t,e,r){t===Ag&&qg(Pg,e,r),Jy(t);var n=Zy(e);return Jy(r),$y(Ig,n)?(r.enumerable?($y(t,wg)&&t[wg][n]&&(t[wg][n]=!1),r=eg(r,{enumerable:tg(0,!1)})):($y(t,wg)||_g(t,wg,tg(1,{})),t[wg][n]=!0),Fg(t,n,r)):_g(t,n,r)},Gg=function(t,e){Jy(t);var r=Xy(e),n=rg(r).concat(Vg(r));return bg(n,(function(e){Gy&&!Wg.call(r,e)||qg(t,e,r[e])})),t},Wg=function(t){var e=Zy(t),r=Rg.call(this,e);return!(this===Ag&&$y(Ig,e)&&!$y(Pg,e))&&(!(r||!$y(this,e)||!$y(Ig,e)||$y(this,wg)&&this[wg][e])||r)},zg=function(t,e){var r=Xy(t),n=Zy(e);if(r!==Ag||!$y(Ig,n)||$y(Pg,n)){var o=Tg(r,n);return!o||!$y(Ig,n)||$y(r,wg)&&r[wg][n]||(o.enumerable=!0),o}},$g=function(t){var e=Lg(Xy(t)),r=[];return bg(e,(function(t){$y(Ig,t)||$y(pg,t)||r.push(t)})),r},Vg=function(t){var e=t===Ag,r=Lg(e?Pg:Xy(t)),n=[];return bg(r,(function(t){!$y(Ig,t)||e&&!$y(Ag,t)||n.push(Ig[t])})),n};(Wy||(fg((Og=function(){if(this instanceof Og)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Qy(arguments[0]):void 0,e=hg(t),r=function(t){this===Ag&&r.call(Pg,t),$y(this,wg)&&$y(this[wg],e)&&(this[wg][e]=!1),Fg(this,e,tg(1,t))};return Gy&&Ug&&Fg(Ag,e,{configurable:!0,set:r}),Bg(e,t)}).prototype,"toString",(function(){return Eg(this).tag})),fg(Og,"withoutSetter",(function(t){return Bg(hg(t),t)})),cg.f=Wg,ug.f=qg,ag.f=zg,ng.f=og.f=$g,ig.f=Vg,vg.f=function(t){return Bg(dg(t),t)},Gy&&(_g(Og.prototype,"description",{configurable:!0,get:function(){return Eg(this).description}}),fg(Ag,"propertyIsEnumerable",Wg,{unsafe:!0}))),Fy({global:!0,wrap:!0,forced:!Wy,sham:!Wy},{Symbol:Og}),bg(rg(Mg),(function(t){yg(t)})),Fy({target:xg,stat:!0,forced:!Wy},{for:function(t){var e=Qy(t);if($y(Dg,e))return Dg[e];var r=Og(e);return Dg[e]=r,Cg[r]=e,r},keyFor:function(t){if(!Yy(t))throw TypeError(t+" is not a symbol");if($y(Cg,t))return Cg[t]},useSetter:function(){Ug=!0},useSimple:function(){Ug=!1}}),Fy({target:"Object",stat:!0,forced:!Wy,sham:!Gy},{create:function(t,e){return void 0===e?eg(t):Gg(eg(t),e)},defineProperty:qg,defineProperties:Gg,getOwnPropertyDescriptor:zg}),Fy({target:"Object",stat:!0,forced:!Wy},{getOwnPropertyNames:$g,getOwnPropertySymbols:Vg}),Fy({target:"Object",stat:!0,forced:zy((function(){ig.f(1)}))},{getOwnPropertySymbols:function(t){return ig.f(Ky(t))}}),jg)&&Fy({target:"JSON",stat:!0,forced:!Wy||zy((function(){var t=Og();return"[null]"!=jg([t])||"{}"!=jg({a:t})||"{}"!=jg(Object(t))}))},{stringify:function(t,e,r){for(var n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e,(Hy(e)||void 0!==t)&&!Yy(t))return Vy(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Yy(e))return e}),o[1]=e,jg.apply(null,o)}});Og.prototype[Sg]||sg(Og.prototype,Sg,Og.prototype.valueOf),gg(Og,xg),pg[wg]=!0;var Hg=Or,Yg=u,Jg=o,Kg=tt,Xg=E,Zg=Mt.f,Qg=fr,tm=Jg.Symbol;if(Yg&&"function"==typeof tm&&(!("description"in tm.prototype)||void 0!==tm().description)){var em={},rm=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof rm?new tm(t):void 0===t?tm():tm(t);return""===t&&(em[e]=!0),e};Qg(rm,tm);var nm=rm.prototype=tm.prototype;nm.constructor=rm;var om=nm.toString,im="Symbol(test)"==String(tm("test")),am=/^Symbol\((.*)\)[^)]+$/;Zg(nm,"description",{configurable:!0,get:function(){var t=Xg(this)?this.valueOf():this,e=om.call(t);if(Kg(em,t))return"";var r=im?e.slice(7,-1):e.replace(am,"$1");return""===r?void 0:r}}),Hg({global:!0,forced:!0},{Symbol:rm})}Uy("iterator");var um=u,cm=Mt.f,sm=Function.prototype,fm=sm.toString,lm=/^\s*function ([^ (]*)/,pm="name";um&&!(pm in sm)&&cm(sm,pm,{configurable:!0,get:function(){try{return fm.call(this).match(lm)[1]}catch(t){return""}}});var hm={exports:{}},dm={exports:{}};!function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports}(dm);var vm={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}(vm);var ym={exports:{}},gm={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}(gm),function(t){var e=gm.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}(ym);var mm={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}(mm),function(t){var e=dm.exports,r=vm.exports,n=ym.exports,o=mm.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}(hm);var bm=Or,wm=a,xm=Ec,Sm=E,km=X,Em=Ne,Am=Is,Om=_c,jm=vy,Tm=C,_m=ht("isConcatSpreadable"),Lm=9007199254740991,Rm="Maximum allowed index exceeded",Im=Tm>=51||!wm((function(){var t=[];return t[_m]=!1,t.concat()[0]!==t})),Pm=jm("concat"),Dm=function(t){if(!Sm(t))return!1;var e=t[_m];return void 0!==e?!!e:xm(t)};bm({target:"Array",proto:!0,forced:!Im||!Pm},{concat:function(t){var e,r,n,o,i,a=km(this),u=Om(a,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(Dm(i=-1===e?a:arguments[e])){if(c+(o=Em(i.length))>Lm)throw TypeError(Rm);for(r=0;r<o;r++,c++)r in i&&Am(u,c,i[r])}else{if(c>=Lm)throw TypeError(Rm);Am(u,c++,i)}return u.length=c,u}});var Cm={exports:{}},Mm={exports:{}};!function(t){var e=gm.exports;t.exports=function(t){if(Array.isArray(t))return e(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(Mm);var Nm={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}(Nm);var Um={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}(Um),function(t){var e=Mm.exports,r=Nm.exports,n=ym.exports,o=Um.exports;t.exports=function(t){return e(t)||r(t)||n(t)||o()},t.exports.__esModule=!0,t.exports.default=t.exports}(Cm);var Fm=Ve.includes,Bm=Sa;Or({target:"Array",proto:!0},{includes:function(t){return Fm(this,t,arguments.length>1?arguments[1]:void 0)}}),Bm("includes");var qm=Or,Gm=k,Wm=[].join,zm=b!=Object,$m=Fc("join",",");qm({target:"Array",proto:!0,forced:zm||!$m},{join:function(t){return Wm.call(Gm(this),void 0===t?",":t)}});var Vm=E,Hm=Math.floor;Or({target:"Number",stat:!0},{isInteger:function(t){return!Vm(t)&&isFinite(t)&&Hm(t)===t}});var Ym=w,Jm=Xs,Km="[\t\n\v\f\r \u2028\u2029\ufeff]",Xm=RegExp("^"+Km+Km+"*"),Zm=RegExp(Km+Km+"*$"),Qm=function(t){return function(e){var r=Jm(Ym(e));return 1&t&&(r=r.replace(Xm,"")),2&t&&(r=r.replace(Zm,"")),r}},tb={start:Qm(1),end:Qm(2),trim:Qm(3)},eb=u,rb=o,nb=mr,ob=Ht.exports,ib=tt,ab=y,ub=Nu,cb=q,sb=mt,fb=a,lb=da,pb=Re.f,hb=i.f,db=Mt.f,vb=tb.trim,yb="Number",gb=rb.Number,mb=gb.prototype,bb=ab(lb(mb))==yb,wb=function(t){if(cb(t))throw TypeError("Cannot convert a Symbol value to a number");var e,r,n,o,i,a,u,c,s=sb(t,"number");if("string"==typeof s&&s.length>2)if(43===(e=(s=vb(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(nb(yb,!gb(" 0o1")||!gb("0b1")||gb("+0x1"))){for(var xb,Sb=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof Sb&&(bb?fb((function(){mb.valueOf.call(r)})):ab(r)!=yb)?ub(new gb(wb(e)),r,Sb):wb(e)},kb=eb?pb(gb):"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(","),Eb=0;kb.length>Eb;Eb++)ib(gb,xb=kb[Eb])&&!ib(Sb,xb)&&db(Sb,xb,hb(gb,xb));Sb.prototype=mb,mb.constructor=Sb,ob(rb,yb,Sb)}var Ab=u,Ob=Zi,jb=k,Tb=c.f,_b=function(t){return function(e){for(var r,n=jb(e),o=Ob(n),i=o.length,a=0,u=[];i>a;)r=o[a++],Ab&&!Tb.call(n,r)||u.push(t?[r,n[r]]:n[r]);return u}},Lb={entries:_b(!0),values:_b(!1)}.entries;Or({target:"Object",stat:!0},{entries:function(t){return Lb(t)}}),
|
|
50
36
|
/*
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
@license
|
|
38
|
+
Copyright (c) 2021 Twilio Inc.
|
|
53
39
|
|
|
54
|
-
|
|
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:
|
|
55
41
|
|
|
56
|
-
|
|
42
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
57
43
|
|
|
58
|
-
|
|
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.
|
|
59
45
|
|
|
60
46
|
|
|
61
|
-
|
|
62
|
-
Object.defineProperty(Md,"__esModule",{value:!0});var wm=Dg.exports,xm=sm.exports,Sm=qh.exports,km=zh.exports,Am=Vh.exports,Em=Yh.exports;function Om(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var jm=Om(Hh.exports),Tm=Om(wm),Lm=Om(xm),_m=Om(Sm),Rm=Om(km),Im=Om(Am),Pm=Om(Em),Cm=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return{checks:e}};function Dm(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 Mm(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 Mm(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 Mm(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 Um=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Cm((function(t){var r,n=!1,o=[],i=Dm(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||jm.default(t)===a,o.push("of type ".concat(a)))}}catch(t){i.e(t)}finally{i.f()}return[n,o]}))};function Nm(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 Fm(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 Fm(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 Fm(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 Bm=Cm((function(t){return["string"==typeof t&&t.length>0,"a non-empty string"]})),qm=Cm((function(t){return["number"==typeof t&&Number.isInteger(t)&&t>=0,"a non-negative integer"]})),Gm=Cm((function(t){return["object"===jm.default(t)&&null!==t&&!Array.isArray(t),"a pure object (non-null and non-array)"]}));function Wm(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=Pm.default(t);if(e){var o=Pm.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Im.default(this,r)}}function zm(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 $m(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 $m(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 $m(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 Vm=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=zm(e.entries());try{for(n.s();!(r=n.n()).done;){var o=Tm.default(r.value,2),i=o[0],a=o[1],u=Jm(t[i],a),c=Tm.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()}},Hm=function(t){var e,r,n;(["undefined","boolean","number","bigint","string"].includes(jm.default(t))&&(r="string"==typeof t?'"'.concat(t,'"'):"".concat(t)),"object"===jm.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=jm.default(t)),r},Ym=function(t){var e,r=[],n=zm(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r.push(Xm(o))}}catch(t){n.e(t)}finally{n.f()}return r},Xm=function(t){var e,r=[],n=zm(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(Um(o))}}catch(t){n.e(t)}finally{n.f()}return r},Jm=function(t,e){var r,n,o=[],i=!1,a=zm(t);try{for(a.s();!(n=a.n()).done;){var u,c=zm(n.value.checks);try{for(c.s();!(u=c.n()).done;){var s=(0,u.value)(e),f=Tm.default(s,3),l=f[0],p=f[1],h=f[2];i=i||l,!r&&h&&(r=h),p&&(o=[].concat(Lm.default(o),"string"==typeof p?[p]:Lm.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||Hm(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 Km(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 Zm(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 Zm(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 Zm(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}Md.array=function(t,e){return Cm((function(r){if(!Array.isArray(r))return[!1,"an array of ".concat(t)];var n,o=Km(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Tm.default(n.value,2),a=i[0],u=i[1],c=Jm(Xm(e),u),s=Tm.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]}))},Md.custom=Cm;var Qm=Md.literal=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Cm((function(t){var r,n=!1,o=[],i=Nm(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]}))},tb=Md.nonEmptyString=Bm;Md.nonNegativeInteger=qm,Md.objectSchema=function(t,e){return Cm((function(r){if("object"!==jm.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=Tm.default(o[n],2),a=i[0],u=i[1],c=Jm(Xm(u),r[a]),s=Tm.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 eb=Md.pureObject=Gm;Md.runtimeTypeValidation=Vm,Md.stringifyReceivedType=Hm,Md.type=Um;var rb,nb,ob=Md.validateConstructorTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=Ym(e);return function(t){return function(t){Rm.default(r,t);var e=Wm(r);function r(){_m.default(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return Vm(n,o),e.call.apply(e,[this].concat(o))}return r}(t)}},ib=Md.validateTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=Ym(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 Vm(n,e),o.apply(this,e)}}},ab=Md.validateTypesAsync=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=Ym(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{Vm(n,e)}catch(t){return Promise.reject(t)}return o.apply(this,e)}}},ub=Va.scope("");return t.default=(nb=rb=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 hu(t,e,r,this.options),ub.setLevel(this.options.logLevel),this.options.transport=null!==(o=this.options.transport)&&void 0!==o?o:new Zc,this.transport=this.options.transport,this.network=new Dd(this.config,this.transport)}updateToken(t){ub.info("updateToken"),this.config.updateToken(t)}get(t){var e=this;return n(Sa.mark((function r(){var n;return Sa.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.network.get("".concat(e.config.mediaUrl,"/").concat(t));case 2:return n=r.sent,r.abrupt("return",new du(e.config,e.network,n.body));case 4:case"end":return r.stop()}}),r)})))()}post(t,e,r,o){var i=this;return n(Sa.mark((function n(){var a;return Sa.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.network.post(i.config.mediaUrl,null!=r?r:"media",e,t,o);case 2:return a=n.sent,n.abrupt("return",new du(i.config,i.network,a.body));case 4:case"end":return n.stop()}}),n)})))()}postFormData(t,e){var r=this;return n(Sa.mark((function n(){var o;return Sa.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.network.post(r.config.mediaUrl,null!=e?e:"media",t);case 2:return o=n.sent,n.abrupt("return",new du(r.config,r.network,o.body));case 4:case"end":return n.stop()}}),n)})))()}mediaSetGet(t){var e=this;return n(Sa.mark((function r(){var n,o;return Sa.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n={command:"get",list:t.map((t=>({media_sid:t})))},r.next=3,e.network.post("".concat(e.config.mediaSetUrl),null,n,"application/json");case 3:return o=r.sent,r.abrupt("return",o.body.map((t=>{if(200!==t.code)throw new Error("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"));return new du(e.config,e.network,t.media_record)})));case 5:case"end":return r.stop()}}),r)})))()}},o(rb,"version","0.5.3"),nb),ka([ib(tb),Aa("design:type",Function),Aa("design:paramtypes",[String]),Aa("design:returntype",void 0)],t.default.prototype,"updateToken",null),ka([ab(tb),Aa("design:type",Function),Aa("design:paramtypes",[String]),Aa("design:returntype",Promise)],t.default.prototype,"get",null),t.default=ka([ob(tb,tb,[tb,Qm(null)],[eb,"undefined"]),Aa("design:paramtypes",[String,String,Object,Object])],t.default),t.Client=t.default,t.McsClient=t.default,t.McsMedia=du,t.Media=du,t.default=t.default,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
|
|
47
|
+
*/
|
|
48
|
+
Object.defineProperty(ly,"__esModule",{value:!0});var Rb=hm.exports,Ib=Cm.exports,Pb=gv.exports,Db=yv.exports,Cb=bv.exports,Mb=xv.exports,Nb=kv.exports;function Ub(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var Fb=Ub(Sv.exports),Bb=Ub(Rb),qb=Ub(Ib),Gb=Ub(Pb),Wb=Ub(Db),zb=Ub(Cb),$b=Ub(Mb),Vb=Ub(Nb),Hb=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return{checks:e}};function Yb(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 Jb(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 Jb(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 Jb(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 Kb=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Hb((function(t){var r,n=!1,o=[],i=Yb(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||Fb.default(t)===a,o.push("of type ".concat(a)))}}catch(t){i.e(t)}finally{i.f()}return[n,o]}))};function Xb(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 Zb(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 Zb(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 Zb(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 Qb(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=Vb.default(t);if(e){var o=Vb.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $b.default(this,r)}}function tw(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 ew(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 ew(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 ew(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 rw=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=tw(e.entries());try{for(n.s();!(r=n.n()).done;){var o=Bb.default(r.value,2),i=o[0],a=o[1],u=aw(t[i],a),c=Bb.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()}},nw=function(t){var e,r,n;(["undefined","boolean","number","bigint","string"].includes(Fb.default(t))&&(r="string"==typeof t?'"'.concat(t,'"'):"".concat(t)),"object"===Fb.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=Fb.default(t)),r},ow=function(t){var e,r=[],n=tw(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r.push(iw(o))}}catch(t){n.e(t)}finally{n.f()}return r},iw=function(t){var e,r=[],n=tw(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(Kb(o))}}catch(t){n.e(t)}finally{n.f()}return r},aw=function(t,e){var r,n,o=[],i=!1,a=tw(t);try{for(a.s();!(n=a.n()).done;){var u,c=tw(n.value.checks);try{for(c.s();!(u=c.n()).done;){var s=(0,u.value)(e),f=Bb.default(s,3),l=f[0],p=f[1],h=f[2];i=i||l,!r&&h&&(r=h),p&&(o=[].concat(qb.default(o),"string"==typeof p?[p]:qb.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||nw(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 uw(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 cw(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 cw(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 cw(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 sw=Hb((function(t){return["string"==typeof t&&t.length>0,"a non-empty string"]})),fw=Hb((function(t){return["number"==typeof t&&Number.isInteger(t)&&t>=0,"a non-negative integer"]})),lw=Hb((function(t){return["object"===Fb.default(t)&&null!==t&&!Array.isArray(t),"a pure object (non-null and non-array)"]}));function pw(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 hw(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 hw(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 hw(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}ly.array=function(t,e){return Hb((function(r){if(!Array.isArray(r))return[!1,"an array of ".concat(t)];var n,o=pw(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Bb.default(n.value,2),a=i[0],u=i[1],c=aw(iw(e),u),s=Bb.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]}))},ly.custom=Hb;var dw=ly.literal=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Hb((function(t){var r,n=!1,o=[],i=Xb(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]}))};ly.nonEmptyArray=function(t,e){return Hb((function(r){if(!Array.isArray(r)||r.length<1)return[!1,"a non-empty array of ".concat(t)];var n,o=uw(r.entries());try{for(o.s();!(n=o.n()).done;){var i=Bb.default(n.value,2),a=i[0],u=i[1],c=aw(iw(e),u),s=Bb.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 vw=ly.nonEmptyString=sw;ly.nonNegativeInteger=fw,ly.objectSchema=function(t,e){return Hb((function(r){if("object"!==Fb.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=Bb.default(o[n],2),a=i[0],u=i[1],c=aw(iw(u),r[a]),s=Bb.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 yw=ly.pureObject=lw;ly.runtimeTypeValidation=rw,ly.stringifyReceivedType=nw,ly.type=Kb;var gw,mw=ly.validateConstructorTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ow(e);return function(t){return function(t){zb.default(r,t);var e=Qb(r);function r(){Wb.default(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return rw(n,o),e.call.apply(e,[this].concat(o))}return Gb.default(r)}(t)}},bw=ly.validateTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ow(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 rw(n,e),o.apply(this,e)}}},ww=ly.validateTypesAsync=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=ow(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{rw(n,e)}catch(t){return Promise.reject(t)}return o.apply(this,e)}}},xw=Ys.scope("");return t.default=(Yi(gw=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 yf(t,e,r,this.options),xw.setLevel(this.options.logLevel),this.options.transport=null!==(o=this.options.transport)&&void 0!==o?o:new Fl,this.transport=this.options.transport,this.network=new fy(this.config,this.transport)}updateToken(t){xw.info("updateToken"),this.config.updateToken(t)}get(t){var e=this;return new $i(function(){var r=Hi(Es.mark((function r(n,o,i){var a,u;return Es.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 gf(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 $i(function(){var i=Hi(Es.mark((function i(a,u,c){var s,f;return Es.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:f=i.sent,a(new gf(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)}}())}postFormData(t,e){var r=this;return new $i(function(){var n=Hi(Es.mark((function n(o,i,a){var u,c;return Es.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 gf(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 $i(function(){var r=Hi(Es.mark((function r(n,o,i){var a,u,c,s;return Es.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 gf(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 $i(function(){var r=Hi(Es.mark((function r(n,o,i){var a,u,c,s;return Es.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)}}())}},"version","0.6.0-rc.2"),gw),As([bw(vw),Os("design:type",Function),Os("design:paramtypes",[String]),Os("design:returntype",void 0)],t.default.prototype,"updateToken",null),As([ww(vw),Os("design:type",Function),Os("design:paramtypes",[String]),Os("design:returntype",$i)],t.default.prototype,"get",null),t.default=As([mw(vw,vw,[vw,dw(null)],[yw,"undefined"]),Os("design:paramtypes",[String,String,Object,Object])],t.default),t.CancellablePromise=$i,t.Client=t.default,t.McsClient=t.default,t.McsMedia=gf,t.Media=gf,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
|