Socket
Socket
Sign inDemoInstall

@pollyjs/core

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pollyjs/core - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

types.d.ts

2

dist/es/pollyjs-core.min.js

@@ -1,2 +0,2 @@

import{ACTIONS as t,assert as e,timeout as r,MODES as n,EXPIRY_STRATEGIES as i,URL as o,HTTP_STATUS_CODES as s,timestamp as u,buildUrl as c,HTTP_METHODS as a,PollyError as f}from"@pollyjs/utils";import h from"loglevel";import l from"blueimp-md5";import p from"fast-json-stable-stringify";import d from"is-absolute-url";import v from"@sindresorhus/fnv1a";import g from"slugify";import y from"route-recognizer";function m(t,e){return t(e={exports:{}},e.exports),e.exports}var _=m((function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)})),b={}.hasOwnProperty,w=function(t,e){return b.call(t,e)},O=function(t){try{return!!t()}catch(t){return!0}},j=!O((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),S=m((function(t){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)})),E=(S.version,function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}),P=function(t,e,r){if(E(t),void 0===e)return t;switch(r){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,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=function(t){if(!x(t))throw TypeError(t+" is not an object!");return t},T=_.document,R=x(T)&&x(T.createElement),k=function(t){return R?T.createElement(t):{}},I=!j&&!O((function(){return 7!=Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a})),N=function(t,e){if(!x(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!x(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!x(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!x(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},L=Object.defineProperty,F={f:j?Object.defineProperty:function(t,e,r){if(A(t),e=N(e,!0),A(r),I)try{return L(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}},M=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},q=j?function(t,e,r){return F.f(t,e,M(1,r))}:function(t,e,r){return t[e]=r,t},C=function(t,e,r){var n,i,o,s=t&C.F,u=t&C.G,c=t&C.S,a=t&C.P,f=t&C.B,h=t&C.W,l=u?S:S[e]||(S[e]={}),p=l.prototype,d=u?_:c?_[e]:(_[e]||{}).prototype;for(n in u&&(r=e),r)(i=!s&&d&&void 0!==d[n])&&w(l,n)||(o=i?d[n]:r[n],l[n]=u&&"function"!=typeof d[n]?r[n]:f&&i?P(o,_):h&&d[n]==o?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(o):a&&"function"==typeof o?P(Function.call,o):o,a&&((l.virtual||(l.virtual={}))[n]=o,t&C.R&&p&&!p[n]&&q(p,n,o)))};C.F=1,C.G=2,C.S=4,C.P=8,C.B=16,C.W=32,C.U=64,C.R=128;var $,z=C,D=q,H=0,U=Math.random(),W=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++H+U).toString(36))},B=m((function(t){var e=W("meta"),r=F.f,n=0,i=Object.isExtensible||function(){return!0},o=!O((function(){return i(Object.preventExtensions({}))})),s=function(t){r(t,e,{value:{i:"O"+ ++n,w:{}}})},u=t.exports={KEY:e,NEED:!1,fastKey:function(t,r){if(!x(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!w(t,e)){if(!i(t))return"F";if(!r)return"E";s(t)}return t[e].i},getWeak:function(t,r){if(!w(t,e)){if(!i(t))return!0;if(!r)return!1;s(t)}return t[e].w},onFreeze:function(t){return o&&u.NEED&&i(t)&&!w(t,e)&&s(t),t}}})),G=(B.KEY,B.NEED,B.fastKey,B.getWeak,B.onFreeze,m((function(t){var e=_["__core-js_shared__"]||(_["__core-js_shared__"]={});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:S.version,mode:"pure",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}))),J=m((function(t){var e=G("wks"),r=_.Symbol,n="function"==typeof r;(t.exports=function(t){return e[t]||(e[t]=n&&r[t]||(n?r:W)("Symbol."+t))}).store=e})),K=F.f,V=J("toStringTag"),Y=function(t,e,r){t&&!w(t=r?t:t.prototype,V)&&K(t,V,{configurable:!0,value:e})},X={f:J},Q=F.f,Z=function(t){var e=S.Symbol||(S.Symbol={});"_"==t.charAt(0)||t in e||Q(e,t,{value:X.f(t)})},tt={}.toString,et=function(t){return tt.call(t).slice(8,-1)},rt=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==et(t)?t.split(""):Object(t)},nt=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},it=function(t){return rt(nt(t))},ot=Math.ceil,st=Math.floor,ut=function(t){return isNaN(t=+t)?0:(t>0?st:ot)(t)},ct=Math.min,at=function(t){return t>0?ct(ut(t),9007199254740991):0},ft=Math.max,ht=Math.min,lt=G("keys"),pt=function(t){return lt[t]||(lt[t]=W(t))},dt=($=!1,function(t,e,r){var n,i=it(t),o=at(i.length),s=function(t,e){return(t=ut(t))<0?ft(t+e,0):ht(t,e)}(r,o);if($&&e!=e){for(;o>s;)if((n=i[s++])!=n)return!0}else for(;o>s;s++)if(($||s in i)&&i[s]===e)return $||s||0;return!$&&-1}),vt=pt("IE_PROTO"),gt=function(t,e){var r,n=it(t),i=0,o=[];for(r in n)r!=vt&&w(n,r)&&o.push(r);for(;e.length>i;)w(n,r=e[i++])&&(~dt(o,r)||o.push(r));return o},yt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),mt=Object.keys||function(t){return gt(t,yt)},_t={f:Object.getOwnPropertySymbols},bt={f:{}.propertyIsEnumerable},wt=Array.isArray||function(t){return"Array"==et(t)},Ot=function(t){return Object(nt(t))},jt=j?Object.defineProperties:function(t,e){A(t);for(var r,n=mt(e),i=n.length,o=0;i>o;)F.f(t,r=n[o++],e[r]);return t},St=_.document,Et=St&&St.documentElement,Pt=pt("IE_PROTO"),xt=function(){},At=function(){var t,e=k("iframe"),r=yt.length;for(e.style.display="none",Et.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),At=t.F;r--;)delete At.prototype[yt[r]];return At()},Tt=Object.create||function(t,e){var r;return null!==t?(xt.prototype=A(t),r=new xt,xt.prototype=null,r[Pt]=t):r=At(),void 0===e?r:jt(r,e)},Rt=yt.concat("length","prototype"),kt={f:Object.getOwnPropertyNames||function(t){return gt(t,Rt)}},It=kt.f,Nt={}.toString,Lt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ft={f:function(t){return Lt&&"[object Window]"==Nt.call(t)?function(t){try{return It(t)}catch(t){return Lt.slice()}}(t):It(it(t))}},Mt=Object.getOwnPropertyDescriptor,qt={f:j?Mt:function(t,e){if(t=it(t),e=N(e,!0),I)try{return Mt(t,e)}catch(t){}if(w(t,e))return M(!bt.f.call(t,e),t[e])}},Ct=B.KEY,$t=qt.f,zt=F.f,Dt=Ft.f,Ht=_.Symbol,Ut=_.JSON,Wt=Ut&&Ut.stringify,Bt=J("_hidden"),Gt=J("toPrimitive"),Jt={}.propertyIsEnumerable,Kt=G("symbol-registry"),Vt=G("symbols"),Yt=G("op-symbols"),Xt=Object.prototype,Qt="function"==typeof Ht&&!!_t.f,Zt=_.QObject,te=!Zt||!Zt.prototype||!Zt.prototype.findChild,ee=j&&O((function(){return 7!=Tt(zt({},"a",{get:function(){return zt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=$t(Xt,e);n&&delete Xt[e],zt(t,e,r),n&&t!==Xt&&zt(Xt,e,n)}:zt,re=function(t){var e=Vt[t]=Tt(Ht.prototype);return e._k=t,e},ne=Qt&&"symbol"==typeof Ht.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof Ht},ie=function(t,e,r){return t===Xt&&ie(Yt,e,r),A(t),e=N(e,!0),A(r),w(Vt,e)?(r.enumerable?(w(t,Bt)&&t[Bt][e]&&(t[Bt][e]=!1),r=Tt(r,{enumerable:M(0,!1)})):(w(t,Bt)||zt(t,Bt,M(1,{})),t[Bt][e]=!0),ee(t,e,r)):zt(t,e,r)},oe=function(t,e){A(t);for(var r,n=function(t){var e=mt(t),r=_t.f;if(r)for(var n,i=r(t),o=bt.f,s=0;i.length>s;)o.call(t,n=i[s++])&&e.push(n);return e}(e=it(e)),i=0,o=n.length;o>i;)ie(t,r=n[i++],e[r]);return t},se=function(t){var e=Jt.call(this,t=N(t,!0));return!(this===Xt&&w(Vt,t)&&!w(Yt,t))&&(!(e||!w(this,t)||!w(Vt,t)||w(this,Bt)&&this[Bt][t])||e)},ue=function(t,e){if(t=it(t),e=N(e,!0),t!==Xt||!w(Vt,e)||w(Yt,e)){var r=$t(t,e);return!r||!w(Vt,e)||w(t,Bt)&&t[Bt][e]||(r.enumerable=!0),r}},ce=function(t){for(var e,r=Dt(it(t)),n=[],i=0;r.length>i;)w(Vt,e=r[i++])||e==Bt||e==Ct||n.push(e);return n},ae=function(t){for(var e,r=t===Xt,n=Dt(r?Yt:it(t)),i=[],o=0;n.length>o;)!w(Vt,e=n[o++])||r&&!w(Xt,e)||i.push(Vt[e]);return i};Qt||(D((Ht=function(){if(this instanceof Ht)throw TypeError("Symbol is not a constructor!");var t=W(arguments.length>0?arguments[0]:void 0),e=function(r){this===Xt&&e.call(Yt,r),w(this,Bt)&&w(this[Bt],t)&&(this[Bt][t]=!1),ee(this,t,M(1,r))};return j&&te&&ee(Xt,t,{configurable:!0,set:e}),re(t)}).prototype,"toString",(function(){return this._k})),qt.f=ue,F.f=ie,kt.f=Ft.f=ce,bt.f=se,_t.f=ae,X.f=function(t){return re(J(t))}),z(z.G+z.W+z.F*!Qt,{Symbol:Ht});for(var fe="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),he=0;fe.length>he;)J(fe[he++]);for(var le=mt(J.store),pe=0;le.length>pe;)Z(le[pe++]);z(z.S+z.F*!Qt,"Symbol",{for:function(t){return w(Kt,t+="")?Kt[t]:Kt[t]=Ht(t)},keyFor:function(t){if(!ne(t))throw TypeError(t+" is not a symbol!");for(var e in Kt)if(Kt[e]===t)return e},useSetter:function(){te=!0},useSimple:function(){te=!1}}),z(z.S+z.F*!Qt,"Object",{create:function(t,e){return void 0===e?Tt(t):oe(Tt(t),e)},defineProperty:ie,defineProperties:oe,getOwnPropertyDescriptor:ue,getOwnPropertyNames:ce,getOwnPropertySymbols:ae});var de=O((function(){_t.f(1)}));z(z.S+z.F*de,"Object",{getOwnPropertySymbols:function(t){return _t.f(Ot(t))}}),Ut&&z(z.S+z.F*(!Qt||O((function(){var t=Ht();return"[null]"!=Wt([t])||"{}"!=Wt({a:t})||"{}"!=Wt(Object(t))}))),"JSON",{stringify:function(t){for(var e,r,n=[t],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=e=n[1],(x(e)||void 0!==t)&&!ne(t))return wt(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!ne(e))return e}),n[1]=e,Wt.apply(Ut,n)}}),Ht.prototype[Gt]||q(Ht.prototype,Gt,Ht.prototype.valueOf),Y(Ht,"Symbol"),Y(Math,"Math",!0),Y(_.JSON,"JSON",!0);var ve,ge=Object.freeze({});Z("asyncIterator"),Z("observable"),(ve=ge)&&ve.default;var ye=S.Symbol,me=function(t,e){return{value:e,done:!!t}},_e={},be={};q(be,J("iterator"),(function(){return this}));var we=function(t,e,r){t.prototype=Tt(be,{next:M(1,r)}),Y(t,e+" Iterator")},Oe=pt("IE_PROTO"),je=Object.prototype,Se=Object.getPrototypeOf||function(t){return t=Ot(t),w(t,Oe)?t[Oe]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?je:null},Ee=J("iterator"),Pe=!([].keys&&"next"in[].keys()),xe=function(){return this},Ae=function(t,e,r,n,i,o,s){we(r,e,n);var u,c,a,f=function(t){if(!Pe&&t in d)return d[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},h=e+" Iterator",l="values"==i,p=!1,d=t.prototype,v=d[Ee]||d["@@iterator"]||i&&d[i],g=v||f(i),y=i?l?f("entries"):g:void 0,m="Array"==e&&d.entries||v;if(m&&(a=Se(m.call(new t)))!==Object.prototype&&a.next&&Y(a,h,!0),l&&v&&"values"!==v.name&&(p=!0,g=function(){return v.call(this)}),s&&(Pe||p||!d[Ee])&&q(d,Ee,g),_e[e]=g,_e[h]=xe,i)if(u={values:l?g:f("values"),keys:o?g:f("keys"),entries:y},s)for(c in u)c in d||D(d,c,u[c]);else z(z.P+z.F*(Pe||p),e,u);return u};Ae(Array,"Array",(function(t,e){this._t=it(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,me(1)):me(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])}),"values");_e.Arguments=_e.Array;for(var Te=J("toStringTag"),Re="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),ke=0;ke<Re.length;ke++){var Ie=Re[ke],Ne=_[Ie],Le=Ne&&Ne.prototype;Le&&!Le[Te]&&q(Le,Te,Ie),_e[Ie]=_e.Array}var Fe=J("species"),Me=function(t,e){return new(function(t){var e;return wt(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!wt(e.prototype)||(e=void 0),x(e)&&null===(e=e[Fe])&&(e=void 0)),void 0===e?Array:e}(t))(e)},qe=function(t,e){var r=1==t,n=2==t,i=3==t,o=4==t,s=6==t,u=5==t||s,c=e||Me;return function(e,a,f){for(var h,l,p=Ot(e),d=rt(p),v=P(a,f,3),g=at(d.length),y=0,m=r?c(e,g):n?c(e,0):void 0;g>y;y++)if((u||y in d)&&(l=v(h=d[y],y,p),t))if(r)m[y]=l;else if(l)switch(t){case 3:return!0;case 5:return h;case 6:return y;case 2:m.push(h)}else if(o)return!1;return s?-1:i||o?o:m}},Ce=Object.assign,$e=!Ce||O((function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=Ce({},t)[r]||Object.keys(Ce({},e)).join("")!=n}))?function(t,e){for(var r=Ot(t),n=arguments.length,i=1,o=_t.f,s=bt.f;n>i;)for(var u,c=rt(arguments[i++]),a=o?mt(c).concat(o(c)):mt(c),f=a.length,h=0;f>h;)u=a[h++],j&&!s.call(c,u)||(r[u]=c[u]);return r}:Ce,ze=function(t,e,r){for(var n in e)r&&t[n]?t[n]=e[n]:q(t,n,e[n]);return t},De=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t},He=function(t,e,r,n){try{return n?e(A(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&A(i.call(t)),e}},Ue=J("iterator"),We=Array.prototype,Be=J("toStringTag"),Ge="Arguments"==et(function(){return arguments}()),Je=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),Be))?r:Ge?et(e):"Object"==(n=et(e))&&"function"==typeof e.callee?"Arguments":n},Ke=J("iterator"),Ve=S.getIteratorMethod=function(t){if(null!=t)return t[Ke]||t["@@iterator"]||_e[Je(t)]},Ye=m((function(t){var e={},r={},n=t.exports=function(t,n,i,o,s){var u,c,a,f,h,l=s?function(){return t}:Ve(t),p=P(i,o,n?2:1),d=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(void 0===(h=l)||_e.Array!==h&&We[Ue]!==h){for(a=l.call(t);!(c=a.next()).done;)if((f=He(a,p,c.value,n))===e||f===r)return f}else for(u=at(t.length);u>d;d++)if((f=n?p(A(c=t[d])[0],c[1]):p(t[d]))===e||f===r)return f};n.BREAK=e,n.RETURN=r})),Xe=function(t,e){if(!x(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t},Qe=B.getWeak,Ze=qe(5),tr=qe(6),er=0,rr=function(t){return t._l||(t._l=new nr)},nr=function(){this.a=[]},ir=function(t,e){return Ze(t.a,(function(t){return t[0]===e}))};nr.prototype={get:function(t){var e=ir(this,t);if(e)return e[1]},has:function(t){return!!ir(this,t)},set:function(t,e){var r=ir(this,t);r?r[1]=e:this.a.push([t,e])},delete:function(t){var e=tr(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}};var or={getConstructor:function(t,e,r,n){var i=t((function(t,o){De(t,i,e,"_i"),t._t=e,t._i=er++,t._l=void 0,null!=o&&Ye(o,r,t[n],t)}));return ze(i.prototype,{delete:function(t){if(!x(t))return!1;var r=Qe(t);return!0===r?rr(Xe(this,e)).delete(t):r&&w(r,this._i)&&delete r[this._i]},has:function(t){if(!x(t))return!1;var r=Qe(t);return!0===r?rr(Xe(this,e)).has(t):r&&w(r,this._i)}}),i},def:function(t,e,r){var n=Qe(A(e),!0);return!0===n?rr(t).set(e,r):n[t._i]=r,t},ufstore:rr},sr=F.f,ur=qe(0),cr=function(t,e,r,n,i,o){var s=_[t],u=s,c=i?"set":"add",a=u&&u.prototype,f={};return j&&"function"==typeof u&&(o||a.forEach&&!O((function(){(new u).entries().next()})))?(u=e((function(e,r){De(e,u,t,"_c"),e._c=new s,null!=r&&Ye(r,i,e[c],e)})),ur("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),(function(t){var e="add"==t||"set"==t;!(t in a)||o&&"clear"==t||q(u.prototype,t,(function(r,n){if(De(this,u,t),!e&&o&&!x(r))return"get"==t&&void 0;var i=this._c[t](0===r?0:r,n);return e?this:i}))})),o||sr(u.prototype,"size",{get:function(){return this._c.size}})):(u=n.getConstructor(e,t,i,c),ze(u.prototype,r),B.NEED=!0),Y(u,t),f[t]=u,z(z.G+z.W+z.F,f),o||n.setStrong(u,t,i),u},ar=(m((function(t){var e,r=qe(0),n=Xe,i=!_.ActiveXObject&&"ActiveXObject"in _,o=B.getWeak,s=Object.isExtensible,u=or.ufstore,c=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},a={get:function(t){if(x(t)){var e=o(t);return!0===e?u(Xe(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return or.def(Xe(this,"WeakMap"),t,e)}},f=t.exports=cr("WeakMap",c,a,or,!0,!0);n&&i&&(e=or.getConstructor(c,"WeakMap"),$e(e.prototype,a),B.NEED=!0,r(["delete","has","get","set"],(function(t){var r=f.prototype,n=r[t];D(r,t,(function(r,i){if(x(r)&&!s(r)){this._f||(this._f=new e);var o=this._f[t](r,i);return"set"==t?this:o}return n.call(this,r,i)}))})))})),function(t){z(z.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})});ar("WeakMap");var fr=function(t){z(z.S,t,{from:function(t){var e,r,n,i,o=arguments[1];return E(this),(e=void 0!==o)&&E(o),null==t?new this:(r=[],e?(n=0,i=P(o,arguments[2],2),Ye(t,!1,(function(t){r.push(i(t,n++))}))):Ye(t,!1,r.push,r),new this(r))}})};fr("WeakMap");var hr,lr=S.WeakMap,pr=(hr=!0,function(t,e){var r,n,i=String(nt(t)),o=ut(e),s=i.length;return o<0||o>=s?hr?"":void 0:(r=i.charCodeAt(o))<55296||r>56319||o+1===s||(n=i.charCodeAt(o+1))<56320||n>57343?hr?i.charAt(o):r:hr?i.slice(o,o+2):n-56320+(r-55296<<10)+65536});Ae(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=pr(e,r),this._i+=t.length,{value:t,done:!1})}));var dr=J("species"),vr=function(t){var e="function"==typeof S[t]?S[t]:_[t];j&&e&&!e[dr]&&F.f(e,dr,{configurable:!0,get:function(){return this}})},gr=F.f,yr=B.fastKey,mr=j?"_s":"size",_r=function(t,e){var r,n=yr(e);if("F"!==n)return t._i[n];for(r=t._f;r;r=r.n)if(r.k==e)return r},br={getConstructor:function(t,e,r,n){var i=t((function(t,o){De(t,i,e,"_i"),t._t=e,t._i=Tt(null),t._f=void 0,t._l=void 0,t[mr]=0,null!=o&&Ye(o,r,t[n],t)}));return ze(i.prototype,{clear:function(){for(var t=Xe(this,e),r=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];t._f=t._l=void 0,t[mr]=0},delete:function(t){var r=Xe(this,e),n=_r(r,t);if(n){var i=n.n,o=n.p;delete r._i[n.i],n.r=!0,o&&(o.n=i),i&&(i.p=o),r._f==n&&(r._f=i),r._l==n&&(r._l=o),r[mr]--}return!!n},forEach:function(t){Xe(this,e);for(var r,n=P(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(t){return!!_r(Xe(this,e),t)}}),j&&gr(i.prototype,"size",{get:function(){return Xe(this,e)[mr]}}),i},def:function(t,e,r){var n,i,o=_r(t,e);return o?o.v=r:(t._l=o={i:i=yr(e,!0),k:e,v:r,p:n=t._l,n:void 0,r:!1},t._f||(t._f=o),n&&(n.n=o),t[mr]++,"F"!==i&&(t._i[i]=o)),t},getEntry:_r,setStrong:function(t,e,r){Ae(t,e,(function(t,r){this._t=Xe(t,e),this._k=r,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?me(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,me(1))}),r?"entries":"values",!r,!0),vr(e)}},wr=(cr("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=br.getEntry(Xe(this,"Map"),t);return e&&e.v},set:function(t,e){return br.def(Xe(this,"Map"),0===t?0:t,e)}},br,!0),function(t){return function(){if(Je(this)!=t)throw TypeError(t+"#toJSON isn't generic");return function(t,e){var r=[];return Ye(t,!1,r.push,r,e),r}(this)}});z(z.P+z.R,"Map",{toJSON:wr("Map")}),ar("Map"),fr("Map");var Or,jr=S.Map,Sr=bt.f,Er=(Or=!1,function(t){for(var e,r=it(t),n=mt(r),i=n.length,o=0,s=[];i>o;)e=n[o++],j&&!Sr.call(r,e)||s.push(Or?[e,r[e]]:r[e]);return s});z(z.S,"Object",{values:function(t){return Er(t)}});var Pr,xr,Ar,Tr=S.Object.values,Rr=J("species"),kr=function(t,e){var r,n=A(t).constructor;return void 0===n||null==(r=A(n)[Rr])?e:E(r)},Ir=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)},Nr=_.process,Lr=_.setImmediate,Fr=_.clearImmediate,Mr=_.MessageChannel,qr=_.Dispatch,Cr=0,$r={},zr=function(){var t=+this;if($r.hasOwnProperty(t)){var e=$r[t];delete $r[t],e()}},Dr=function(t){zr.call(t.data)};Lr&&Fr||(Lr=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return $r[++Cr]=function(){Ir("function"==typeof t?t:Function(t),e)},Pr(Cr),Cr},Fr=function(t){delete $r[t]},"process"==et(Nr)?Pr=function(t){Nr.nextTick(P(zr,t,1))}:qr&&qr.now?Pr=function(t){qr.now(P(zr,t,1))}:Mr?(Ar=(xr=new Mr).port2,xr.port1.onmessage=Dr,Pr=P(Ar.postMessage,Ar,1)):_.addEventListener&&"function"==typeof postMessage&&!_.importScripts?(Pr=function(t){_.postMessage(t+"","*")},_.addEventListener("message",Dr,!1)):Pr="onreadystatechange"in k("script")?function(t){Et.appendChild(k("script")).onreadystatechange=function(){Et.removeChild(this),zr.call(t)}}:function(t){setTimeout(P(zr,t,1),0)});var Hr={set:Lr,clear:Fr},Ur=Hr.set,Wr=_.MutationObserver||_.WebKitMutationObserver,Br=_.process,Gr=_.Promise,Jr="process"==et(Br);function Kr(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=E(e),this.reject=E(r)}var Vr={f:function(t){return new Kr(t)}},Yr=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},Xr=_.navigator,Qr=Xr&&Xr.userAgent||"",Zr=function(t,e){if(A(t),x(e)&&e.constructor===t)return e;var r=Vr.f(t);return(0,r.resolve)(e),r.promise},tn=J("iterator"),en=!1;try{var rn=[7][tn]();rn.return=function(){en=!0},Array.from(rn,(function(){throw 2}))}catch(t){}var nn,on,sn,un,cn=Hr.set,an=function(){var t,e,r,n=function(){var n,i;for(Jr&&(n=Br.domain)&&n.exit();t;){i=t.fn,t=t.next;try{i()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(Jr)r=function(){Br.nextTick(n)};else if(!Wr||_.navigator&&_.navigator.standalone)if(Gr&&Gr.resolve){var i=Gr.resolve(void 0);r=function(){i.then(n)}}else r=function(){Ur.call(_,n)};else{var o=!0,s=document.createTextNode("");new Wr(n).observe(s,{characterData:!0}),r=function(){s.data=o=!o}}return function(n){var i={fn:n,next:void 0};e&&(e.next=i),t||(t=i,r()),e=i}}(),fn=_.TypeError,hn=_.process,ln=hn&&hn.versions,pn=ln&&ln.v8||"",dn=_.Promise,vn="process"==Je(hn),gn=function(){},yn=on=Vr.f,mn=!!function(){try{var t=dn.resolve(1),e=(t.constructor={})[J("species")]=function(t){t(gn,gn)};return(vn||"function"==typeof PromiseRejectionEvent)&&t.then(gn)instanceof e&&0!==pn.indexOf("6.6")&&-1===Qr.indexOf("Chrome/66")}catch(t){}}(),_n=function(t){var e;return!(!x(t)||"function"!=typeof(e=t.then))&&e},bn=function(t,e){if(!t._n){t._n=!0;var r=t._c;an((function(){for(var n=t._v,i=1==t._s,o=0,s=function(e){var r,o,s,u=i?e.ok:e.fail,c=e.resolve,a=e.reject,f=e.domain;try{u?(i||(2==t._h&&jn(t),t._h=1),!0===u?r=n:(f&&f.enter(),r=u(n),f&&(f.exit(),s=!0)),r===e.promise?a(fn("Promise-chain cycle")):(o=_n(r))?o.call(r,c,a):c(r)):a(n)}catch(t){f&&!s&&f.exit(),a(t)}};r.length>o;)s(r[o++]);t._c=[],t._n=!1,e&&!t._h&&wn(t)}))}},wn=function(t){cn.call(_,(function(){var e,r,n,i=t._v,o=On(t);if(o&&(e=Yr((function(){vn?hn.emit("unhandledRejection",i,t):(r=_.onunhandledrejection)?r({promise:t,reason:i}):(n=_.console)&&n.error&&n.error("Unhandled promise rejection",i)})),t._h=vn||On(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},On=function(t){return 1!==t._h&&0===(t._a||t._c).length},jn=function(t){cn.call(_,(function(){var e;vn?hn.emit("rejectionHandled",t):(e=_.onrejectionhandled)&&e({promise:t,reason:t._v})}))},Sn=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),bn(e,!0))},En=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw fn("Promise can't be resolved itself");(e=_n(t))?an((function(){var n={_w:r,_d:!1};try{e.call(t,P(En,n,1),P(Sn,n,1))}catch(t){Sn.call(n,t)}})):(r._v=t,r._s=1,bn(r,!1))}catch(t){Sn.call({_w:r,_d:!1},t)}}};mn||(dn=function(t){De(this,dn,"Promise","_h"),E(t),nn.call(this);try{t(P(En,this,1),P(Sn,this,1))}catch(t){Sn.call(this,t)}},(nn=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=ze(dn.prototype,{then:function(t,e){var r=yn(kr(this,dn));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=vn?hn.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&bn(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),sn=function(){var t=new nn;this.promise=t,this.resolve=P(En,t,1),this.reject=P(Sn,t,1)},Vr.f=yn=function(t){return t===dn||t===un?new sn(t):on(t)}),z(z.G+z.W+z.F*!mn,{Promise:dn}),Y(dn,"Promise"),vr("Promise"),un=S.Promise,z(z.S+z.F*!mn,"Promise",{reject:function(t){var e=yn(this);return(0,e.reject)(t),e.promise}}),z(z.S+!0*z.F,"Promise",{resolve:function(t){return Zr(this===un?dn:this,t)}}),z(z.S+z.F*!(mn&&function(t,e){if(!e&&!en)return!1;var r=!1;try{var n=[7],i=n[tn]();i.next=function(){return{done:r=!0}},n[tn]=function(){return i},t(n)}catch(t){}return r}((function(t){dn.all(t).catch(gn)}))),"Promise",{all:function(t){var e=this,r=yn(e),n=r.resolve,i=r.reject,o=Yr((function(){var r=[],o=0,s=1;Ye(t,!1,(function(t){var u=o++,c=!1;r.push(void 0),s++,e.resolve(t).then((function(t){c||(c=!0,r[u]=t,--s||n(r))}),i)})),--s||n(r)}));return o.e&&i(o.v),r.promise},race:function(t){var e=this,r=yn(e),n=r.reject,i=Yr((function(){Ye(t,!1,(function(t){e.resolve(t).then(r.resolve,n)}))}));return i.e&&n(i.v),r.promise}}),z(z.P+z.R,"Promise",{finally:function(t){var e=kr(this,S.Promise||_.Promise),r="function"==typeof t;return this.then(r?function(r){return Zr(e,t()).then((function(){return r}))}:t,r?function(r){return Zr(e,t()).then((function(){throw r}))}:t)}}),z(z.S,"Promise",{try:function(t){var e=Vr.f(this),r=Yr(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}});var Pn=S.Promise;const xn={[t.RECORD]:"Recorded",[t.REPLAY]:"Replayed",[t.INTERCEPT]:"Intercepted",[t.PASSTHROUGH]:"Passthrough"};class An{constructor(t){this.polly=t,this.log=h.getLogger("@pollyjs/core:"+this.polly.recordingName),this.log.setLevel(t.config.logLevel)}connect(){this._middleware=this.polly.server.any().on("error",(...t)=>this.logRequestError(...t)).on("request",(...t)=>this.logRequest(...t)).on("response",(...t)=>this.logRequestResponse(...t))}disconnect(){this._middleware.off("error"),this._middleware.off("response")}logRequest(t){const{log:e}=t,r=e.getLevel()<=e.levels.DEBUG;e.info(`Request: ${t.method} ${t.url}`,...r?[{request:t}]:[])}logRequestResponse(t,e){const{log:r}=t,n=r.getLevel()<=r.levels.DEBUG;r.info(`Response: ${xn[t.action]} ➞ ${t.method} ${t.url} ${e.statusCode} • ${t.responseTime}ms`,...n?[{request:t,response:e}]:[])}logRequestError(t,e){const{log:r}=t,n=r.getLevel()<=r.levels.DEBUG;r.error(`Errored ➞ ${t.method} ${t.url}`,e,...n?[{request:t}]:[])}}function Tn(t){return`${t.type}:${t.id}`}class Rn{constructor(){this._registry=new jr}register(t){e(`Attempted to register ${t} but invalid factory provided. Expected function, received: "${typeof t}"`,"function"==typeof t);const{type:r}=t,n=t.id;e(`Invalid registration id provided. Expected string, received: "${typeof n}"`,"string"==typeof n),e(`Invalid registration type provided. Expected string, received: "${typeof r}"`,"string"==typeof r),this._registry.set(Tn(t),t)}unregister(t){const{_registry:e}=this,r="function"==typeof t?Tn(t):t;e.delete(r)}lookup(t){return this._registry.get(t)||null}has(t){const{_registry:e}=this,r="function"==typeof t?Tn(t):t;return e.has(r)}}var kn={fixed:t=>()=>r(t),relative:t=>e=>r(t*e)},In={mode:n.REPLAY,adapters:[],adapterOptions:{},persister:null,persisterOptions:{keepUnusedRequests:!1,disableSortingHarEntries:!1},logLevel:h.levels.WARN,flushRequestsOnStop:!1,recordIfMissing:!0,recordFailedRequests:!1,expiresIn:null,expiryStrategy:i.WARN,timing:kn.fixed(0),matchRequestsBy:{method:!0,headers:!0,body:!0,order:!0,url:{protocol:!0,username:!0,password:!0,hostname:!0,port:!0,pathname:!0,query:!0,hash:!1}}};function Nn(t){return null!=t&&"object"==typeof t}function Ln(t,...e){const r=new o(t,...e);return d(t)||(t.startsWith("//")?r.set("protocol",""):function(t){t.set("protocol",""),t.set("host",""),t.set("slashes",!1)}(r)),r}const{keys:Fn}=Object,Mn={get:(t,e)=>t["string"==typeof e?e.toLowerCase():e],set:(t,e,r)=>"string"==typeof e&&(null==r?delete t[e.toLowerCase()]:t[e.toLowerCase()]=r,!0),deleteProperty:(t,e)=>"string"==typeof e&&(delete t[e.toLowerCase()],!0)};function qn(t){const e=new Proxy({},Mn);return Nn(t)&&Fn(t).forEach(r=>e[r]=t[r]),e}const{keys:Cn}=Object,{isArray:$n}=Array,{parse:zn}=JSON;function Dn(t){return"function"==typeof t}var Hn={headers:function(t,e,r){const n=new qn(t);return Dn(e)?e(n,r):(Nn(e)&&$n(e.exclude)&&e.exclude.forEach(t=>delete n[t]),n)},method:function(t,e,r){return Dn(e)?e(t,r):t.toUpperCase()},body:function(t,e,r){return Dn(e)?e(t,r):t},url:function(t,e,r){let n=Ln(t,!0);return Dn(e)?n=Ln(e(t,r),!0):Cn(e||{}).forEach(t=>{Dn(e[t])?n.set(t,e[t](n[t],r)):e[t]||n.set(t,"")}),Nn(n.query)&&n.set("query",zn(p(n.query))),n.href}};function Un(t){const e=v(t).toString();let r=g(function(t){return t.replace(/\W/g,"-")}(t));return r=r.substring(0,100-e.length-1),`${r}_${e}`}function Wn(t){return(t||"").split("/").map(Un).join("/")}z(z.S,"Array",{isArray:wt});var Bn=S.Array.isArray;function Gn(t,e){return t===e||t!=t&&e!=e}function Jn(t,e){for(var r=t.length;r--;)if(Gn(t[r][0],e))return r;return-1}var Kn=Array.prototype.splice;function Vn(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,r=Jn(e,t);return!(r<0)&&(r==e.length-1?e.pop():Kn.call(e,r,1),--this.size,!0)},Vn.prototype.get=function(t){var e=this.__data__,r=Jn(e,t);return r<0?void 0:e[r][1]},Vn.prototype.has=function(t){return Jn(this.__data__,t)>-1},Vn.prototype.set=function(t,e){var r=this.__data__,n=Jn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var Yn="object"==typeof global&&global&&global.Object===Object&&global,Xn="object"==typeof self&&self&&self.Object===Object&&self,Qn=Yn||Xn||Function("return this")(),Zn=Qn.Symbol,ti=Object.prototype,ei=ti.hasOwnProperty,ri=ti.toString,ni=Zn?Zn.toStringTag:void 0;var ii=Object.prototype.toString;var oi=Zn?Zn.toStringTag:void 0;function si(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":oi&&oi in Object(t)?function(t){var e=ei.call(t,ni),r=t[ni];try{t[ni]=void 0;var n=!0}catch(t){}var i=ri.call(t);return n&&(e?t[ni]=r:delete t[ni]),i}(t):function(t){return ii.call(t)}(t)}function ui(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ci(t){if(!ui(t))return!1;var e=si(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var ai,fi=Qn["__core-js_shared__"],hi=(ai=/[^.]+$/.exec(fi&&fi.keys&&fi.keys.IE_PROTO||""))?"Symbol(src)_1."+ai:"";var li=Function.prototype.toString;var pi=/^\[object .+?Constructor\]$/,di=Function.prototype,vi=Object.prototype,gi=di.toString,yi=vi.hasOwnProperty,mi=RegExp("^"+gi.call(yi).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _i(t){return!(!ui(t)||(e=t,hi&&hi in e))&&(ci(t)?mi:pi).test(function(t){if(null!=t){try{return li.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function bi(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return _i(r)?r:void 0}var wi=bi(Qn,"Map"),Oi=bi(Object,"create");var ji=Object.prototype.hasOwnProperty;var Si=Object.prototype.hasOwnProperty;function Ei(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Pi(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function xi(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ei.prototype.clear=function(){this.__data__=Oi?Oi(null):{},this.size=0},Ei.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ei.prototype.get=function(t){var e=this.__data__;if(Oi){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return ji.call(e,t)?e[t]:void 0},Ei.prototype.has=function(t){var e=this.__data__;return Oi?void 0!==e[t]:Si.call(e,t)},Ei.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Oi&&void 0===e?"__lodash_hash_undefined__":e,this},xi.prototype.clear=function(){this.size=0,this.__data__={hash:new Ei,map:new(wi||Vn),string:new Ei}},xi.prototype.delete=function(t){var e=Pi(this,t).delete(t);return this.size-=e?1:0,e},xi.prototype.get=function(t){return Pi(this,t).get(t)},xi.prototype.has=function(t){return Pi(this,t).has(t)},xi.prototype.set=function(t,e){var r=Pi(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Ai(t){var e=this.__data__=new Vn(t);this.size=e.size}Ai.prototype.clear=function(){this.__data__=new Vn,this.size=0},Ai.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Ai.prototype.get=function(t){return this.__data__.get(t)},Ai.prototype.has=function(t){return this.__data__.has(t)},Ai.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Vn){var n=r.__data__;if(!wi||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new xi(n)}return r.set(t,e),this.size=r.size,this};var Ti=function(){try{var t=bi(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();function Ri(t,e,r){"__proto__"==e&&Ti?Ti(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function ki(t,e,r){(void 0!==r&&!Gn(t[e],r)||void 0===r&&!(e in t))&&Ri(t,e,r)}var Ii,Ni=function(t,e,r){for(var n=-1,i=Object(t),o=r(t),s=o.length;s--;){var u=o[Ii?s:++n];if(!1===e(i[u],u,i))break}return t},Li="object"==typeof exports&&exports&&!exports.nodeType&&exports,Fi=Li&&"object"==typeof module&&module&&!module.nodeType&&module,Mi=Fi&&Fi.exports===Li?Qn.Buffer:void 0,qi=Mi?Mi.allocUnsafe:void 0;var Ci=Qn.Uint8Array;function $i(t,e){var r,n,i=e?(r=t.buffer,n=new r.constructor(r.byteLength),new Ci(n).set(new Ci(r)),n):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}var zi=Object.create,Di=function(){function t(){}return function(e){if(!ui(e))return{};if(zi)return zi(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var Hi,Ui,Wi=(Hi=Object.getPrototypeOf,Ui=Object,function(t){return Hi(Ui(t))}),Bi=Object.prototype;function Gi(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Bi)}function Ji(t){return Nn(t)&&"[object Arguments]"==si(t)}var Ki=Object.prototype,Vi=Ki.hasOwnProperty,Yi=Ki.propertyIsEnumerable,Xi=Ji(function(){return arguments}())?Ji:function(t){return Nn(t)&&Vi.call(t,"callee")&&!Yi.call(t,"callee")},Qi=Array.isArray;function Zi(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function to(t){return null!=t&&Zi(t.length)&&!ci(t)}var eo="object"==typeof exports&&exports&&!exports.nodeType&&exports,ro=eo&&"object"==typeof module&&module&&!module.nodeType&&module,no=ro&&ro.exports===eo?Qn.Buffer:void 0,io=(no?no.isBuffer:void 0)||function(){return!1},oo=Function.prototype,so=Object.prototype,uo=oo.toString,co=so.hasOwnProperty,ao=uo.call(Object);var fo={};fo["[object Float32Array]"]=fo["[object Float64Array]"]=fo["[object Int8Array]"]=fo["[object Int16Array]"]=fo["[object Int32Array]"]=fo["[object Uint8Array]"]=fo["[object Uint8ClampedArray]"]=fo["[object Uint16Array]"]=fo["[object Uint32Array]"]=!0,fo["[object Arguments]"]=fo["[object Array]"]=fo["[object ArrayBuffer]"]=fo["[object Boolean]"]=fo["[object DataView]"]=fo["[object Date]"]=fo["[object Error]"]=fo["[object Function]"]=fo["[object Map]"]=fo["[object Number]"]=fo["[object Object]"]=fo["[object RegExp]"]=fo["[object Set]"]=fo["[object String]"]=fo["[object WeakMap]"]=!1;var ho="object"==typeof exports&&exports&&!exports.nodeType&&exports,lo=ho&&"object"==typeof module&&module&&!module.nodeType&&module,po=lo&&lo.exports===ho&&Yn.process,vo=function(){try{var t=lo&&lo.require&&lo.require("util").types;return t||po&&po.binding&&po.binding("util")}catch(t){}}(),go=vo&&vo.isTypedArray,yo=go?function(t){return function(e){return t(e)}}(go):function(t){return Nn(t)&&Zi(t.length)&&!!fo[si(t)]};function mo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var _o=Object.prototype.hasOwnProperty;function bo(t,e,r){var n=t[e];_o.call(t,e)&&Gn(n,r)&&(void 0!==r||e in t)||Ri(t,e,r)}var wo=/^(?:0|[1-9]\d*)$/;function Oo(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&wo.test(t))&&t>-1&&t%1==0&&t<e}var jo=Object.prototype.hasOwnProperty;function So(t,e){var r=Qi(t),n=!r&&Xi(t),i=!r&&!n&&io(t),o=!r&&!n&&!i&&yo(t),s=r||n||i||o,u=s?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=u.length;for(var a in t)!e&&!jo.call(t,a)||s&&("length"==a||i&&("offset"==a||"parent"==a)||o&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Oo(a,c))||u.push(a);return u}var Eo=Object.prototype.hasOwnProperty;function Po(t){if(!ui(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=Gi(t),r=[];for(var n in t)("constructor"!=n||!e&&Eo.call(t,n))&&r.push(n);return r}function xo(t){return to(t)?So(t,!0):Po(t)}function Ao(t){return function(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var u=e[o],c=n?n(r[u],t[u],u,r,t):void 0;void 0===c&&(c=t[u]),i?Ri(r,u,c):bo(r,u,c)}return r}(t,xo(t))}function To(t,e,r,n,i,o,s){var u=mo(t,r),c=mo(e,r),a=s.get(c);if(a)ki(t,r,a);else{var f,h=o?o(u,c,r+"",t,e,s):void 0,l=void 0===h;if(l){var p=Qi(c),d=!p&&io(c),v=!p&&!d&&yo(c);h=c,p||d||v?Qi(u)?h=u:Nn(f=u)&&to(f)?h=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(u):d?(l=!1,h=function(t,e){if(e)return t.slice();var r=t.length,n=qi?qi(r):new t.constructor(r);return t.copy(n),n}(c,!0)):v?(l=!1,h=$i(c,!0)):h=[]:function(t){if(!Nn(t)||"[object Object]"!=si(t))return!1;var e=Wi(t);if(null===e)return!0;var r=co.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&uo.call(r)==ao}(c)||Xi(c)?(h=u,Xi(u)?h=Ao(u):ui(u)&&!ci(u)||(h=function(t){return"function"!=typeof t.constructor||Gi(t)?{}:Di(Wi(t))}(c))):l=!1}l&&(s.set(c,h),i(h,c,n,o,s),s.delete(c)),ki(t,r,h)}}function Ro(t,e,r,n,i){t!==e&&Ni(e,(function(o,s){if(i||(i=new Ai),ui(o))To(t,e,s,r,Ro,n,i);else{var u=n?n(mo(t,s),o,s+"",t,e,i):void 0;void 0===u&&(u=o),ki(t,s,u)}}),xo)}function ko(t){return t}function Io(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var No=Math.max;var Lo=Ti?function(t,e){return Ti(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:ko,Fo=Date.now;var Mo=function(t){var e=0,r=0;return function(){var n=Fo(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Lo);function qo(t,e){return Mo(function(t,e,r){return e=No(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=No(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var u=Array(e+1);++i<e;)u[i]=n[i];return u[e]=r(s),Io(t,this,u)}}(t,e,ko),t+"")}var Co,$o=(Co=function(t,e,r,n){Ro(t,e,r,n)},qo((function(t,e){var r=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=Co.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(t,e,r){if(!ui(r))return!1;var n=typeof e;return!!("number"==n?to(r)&&Oo(e,r.length):"string"==n&&e in r)&&Gn(r[e],t)}(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var s=e[r];s&&Co(t,s,r,i)}return t})));function zo(t,e,r){if(Bn(t)||["context"].includes(r))return e}function Do(...t){return $o({},...t,zo)}function Ho(t){e(`Invalid recording name provided. Expected string, received: "${typeof t}".`,"string"==typeof t),e("Invalid recording name provided. Received An empty or blank string.",t.trim().length>0)}function Uo(t){e(`Invalid config provided. Expected object, received: "${typeof t}".`,Nn(t)&&!Bn(t)),["mode","adapters","adapterOptions","persister","persisterOptions"].forEach(r=>e(`Invalid configuration option provided. The "${r}" option cannot be overridden using the server configuration API.`,!(r in t)))}function Wo(t){e(`Invalid number provided. Expected number, received: "${typeof t}".`,"number"==typeof t),e(`Invalid number provided. The number must be greater than 0, received "${typeof t}".`,t>0)}const{freeze:Bo}=Object,{parse:Go}=JSON;class Jo{constructor(){this.headers=new qn}getHeader(t){return this.headers[t]}setHeader(t,e){return this.headers[t]=e,this}setHeaders(t={}){for(const e in t)this.setHeader(e,t[e]);return this}removeHeader(t){return this.setHeader(t,null),this}removeHeaders(t=[]){for(const e of t)this.removeHeader(e);return this}hasHeader(t){return!!this.getHeader(t)}type(t){return this.setHeader("Content-Type",t)}send(t){let e=t;switch(typeof e){case"string":this.hasHeader("Content-Type")||this.type("text/html");break;case"boolean":case"number":case"object":if(null!==e)return this.json(e);e=""}if("string"==typeof e){const t=this.getHeader("Content-Type");t&&!t.includes("charset")&&this.type(t+"; charset=utf-8")}return this.body=e,this}json(t){return this.hasHeader("Content-Type")||this.type("application/json"),this.send(p(t))}jsonBody(){return Go(this.body)}end(){return Bo(this),Bo(this.headers),this}}var Ko="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",Vo="["+Ko+"]",Yo=RegExp("^"+Vo+Vo+"*"),Xo=RegExp(Vo+Vo+"*$"),Qo=function(t,e,r){var n={},i=O((function(){return!!Ko[t]()||"​…"!="​…"[t]()})),o=n[t]=i?e(Zo):Ko[t];r&&(n[r]=o),z(z.P+z.F*i,"String",n)},Zo=Qo.trim=function(t,e){return t=String(nt(t)),1&e&&(t=t.replace(Yo,"")),2&e&&(t=t.replace(Xo,"")),t},ts=Qo,es=_.parseInt,rs=ts.trim,ns=/^[-+]?0[xX]/,is=8!==es(Ko+"08")||22!==es(Ko+"0x16")?function(t,e){var r=rs(String(t),3);return es(r,e>>>0||(ns.test(r)?16:10))}:es;z(z.G+z.F*(parseInt!=is),{parseInt:is});var os=S.parseInt;class ss extends Jo{constructor(t,e,r,n){super(),this.status(t||200),this.setHeaders(e),this.body=r,this.encoding=n}get ok(){return this.statusCode&&this.statusCode>=200&&this.statusCode<300}get statusText(){return s[this.statusCode]||s[200]}status(t){const r=os(t,10);return e("[Response] Invalid status code: "+r,r>=100&&r<600),this.statusCode=r,this}sendStatus(t){return this.status(t),this.type("text/plain"),this.send(this.statusText)}}var us=function(t,e){var r=(S.Object||{})[t]||Object[t],n={};n[t]=e(r),z(z.S+z.F*O((function(){r(1)})),"Object",n)};us("keys",(function(){return function(t){return mt(Ot(t))}}));var cs=S.Object.keys,as=S.Object.getOwnPropertySymbols,fs=qt.f;us("getOwnPropertyDescriptor",(function(){return function(t,e){return fs(it(t),e)}}));var hs=S.Object,ls=function(t,e){return hs.getOwnPropertyDescriptor(t,e)},ps=_.Reflect,ds=ps&&ps.ownKeys||function(t){var e=kt.f(A(t)),r=_t.f;return r?e.concat(r(t)):e},vs=function(t,e,r){e in t?F.f(t,e,M(0,r)):t[e]=r};z(z.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,r,n=it(t),i=qt.f,o=ds(n),s={},u=0;o.length>u;)void 0!==(r=i(n,e=o[u++]))&&vs(s,e,r);return s}});var gs=S.Object.getOwnPropertyDescriptors;z(z.S+z.F*!j,"Object",{defineProperties:jt});var ys=S.Object,ms=function(t,e){return ys.defineProperties(t,e)};z(z.S+z.F*!j,"Object",{defineProperty:F.f});var _s,bs=S.Object,ws=function(t,e,r){return bs.defineProperty(t,e,r)},Os=m((function(t){t.exports=function(t,e,r){return e in t?ws(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0})),js=(_s=Os)&&_s.__esModule&&Object.prototype.hasOwnProperty.call(_s,"default")?_s.default:_s;cr("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return br.def(Xe(this,"Set"),t=0===t?0:t,t)}},br);z(z.P+z.R,"Set",{toJSON:wr("Set")}),ar("Set"),fr("Set");var Ss=S.Set;function Es(t,e,r){let n=0;return function(...i){return++n>=e&&r(),t(...i)}}z(z.S+z.F,"Object",{assign:$e});var Ps=S.Object.assign;const xs=ye();class As{constructor(t,r){e(`Invalid type provided. Expected a non-empty string, received: "${typeof t}".`,t&&"string"==typeof t),ws(this,"type",{value:t}),Ps(this,r||{}),this[xs]=!1}stopPropagation(){this[xs]=!0}get shouldStopPropagating(){return this[xs]}}function Ts(t,e){var r=cs(t);if(as){var n=as(t);e&&(n=n.filter((function(e){return ls(t,e).enumerable}))),r.push.apply(r,n)}return r}function Rs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ts(Object(r),!0).forEach((function(e){js(t,e,r[e])})):gs?ms(t,gs(r)):Ts(Object(r)).forEach((function(e){ws(t,e,ls(r,e))}))}return t}const ks=ye(),Is=ye();function Ns(t,r){e(`Invalid event name provided. Expected string, received: "${typeof t}".`,"string"==typeof t),e(`Invalid event name provided: "${t}". Possible events: ${[...r].join(", ")}.`,r.has(t))}class Ls{constructor(t={}){const{eventNames:r}=t;e("An array of supported events must be provided via the `eventNames` option.",Bn(r)&&r.length>0),this[ks]=new jr,this[Is]=new Ss(r)}eventNames(){const t=[];return this[ks].forEach((e,r)=>this.hasListeners(r)&&t.push(r)),t}on(t,r,n={}){Ns(t,this[Is]),function(t){e(`Invalid listener provided. Expected function, received: "${typeof t}".`,"function"==typeof t)}(r);const i=this[ks],{times:o}=n;if(i.has(t)||i.set(t,new Ss),o){Wo(o);const e=Es(r,o,()=>this.off(t,e));this.off(t,r),e.listener=r,r=e}return i.get(t).add(r),this}once(t,e,r={}){return this.on(t,e,Rs(Rs({},r),{},{times:1})),this}off(t,e){Ns(t,this[Is]);const r=this[ks];return this.hasListeners(t)&&("function"==typeof e?(r.get(t).delete(e),this.listeners(t).forEach(n=>{n.listener===e&&r.get(t).delete(n)})):r.get(t).clear(t)),this}listeners(t){return Ns(t,this[Is]),this.hasListeners(t)?[...this[ks].get(t)]:[]}hasListeners(t){Ns(t,this[Is]);const e=this[ks];return e.has(t)&&e.get(t).size>0}async emit(t,...e){Ns(t,this[Is]);const r=new As(t);for(const n of this.listeners(t))if(await n(...e,r),r.shouldStopPropagating)return!1;return!0}async emitParallel(t,...e){Ns(t,this[Is]);const r=new As(t);return await Pn.all(this.listeners(t).map(t=>t(...e,r))),!r.shouldStopPropagating}emitSync(t,...r){Ns(t,this[Is]);const n=new As(t);for(const i of this.listeners(t)){const o=i(...r,n);if(e(`Attempted to emit a synchronous event "${t}" but an asynchronous listener was called.`,!(Nn(o)&&"function"==typeof o.then)),n.shouldStopPropagating)return!1}return!0}}const Fs=ye(),Ms=ye();function qs(t){t[Fs]=!1,t[Ms]=!1}class Cs extends As{constructor(){super("intercept"),qs(this)}abort(){qs(this),this[Fs]=!0}passthrough(){qs(this),this[Ms]=!0}get shouldAbort(){return this[Fs]}get shouldPassthrough(){return this[Ms]}get shouldIntercept(){return!this.shouldAbort&&!this.shouldPassthrough}}const{keys:$s,freeze:zs}=Object,Ds=ye(),Hs=ye(),Us=ye(),Ws=ye(),Bs=["identify"];class Gs extends Jo{constructor(t,r){super(),e("Url is required.",r.url),e("Method is required.",r.method&&"string"==typeof r.method),this.didRespond=!1,this.aborted=!1,this.url=r.url,this.method=r.method.toUpperCase(),this.body=r.body,this.setHeaders(r.headers),this.recordingName=t.recordingName,this.recordingId=t.recordingId,this.requestArguments=zs(r.requestArguments),this.promise=function(){let t,e;const r=new Pn((r,n)=>{t=r,e=n});return r.catch(()=>{}),r.resolve=t,r.reject=e,r}(),this[Hs]=t,this[Ws]=new Ls({eventNames:Bs}),this.action=null,this._interceptor=new Cs,this[Ds]=t.server.lookup(this.method,this.url),this[Ds].applyFiltersWithArgs(this),this.configure(this[Ds].config());const n=this[Ds].recordingName();n&&this.overrideRecordingName(n)}get url(){return this[Us].toString()}set url(t){this[Us]=Ln(""+t,!0)}get absoluteUrl(){const{url:t}=this;return d(t)?t:new o(t).href}get protocol(){return this[Us].protocol}get hostname(){return this[Us].hostname}get port(){return this[Us].port}get origin(){return this[Us].origin}get pathname(){return this[Us].pathname}get query(){return this[Us].query}set query(t){this[Us].set("query",t)}get hash(){return this[Us].hash}set hash(t){this[Us].set("hash",t)}get shouldPassthrough(){return this[Ds].shouldPassthrough()}get shouldIntercept(){return this[Ds].shouldIntercept()}get log(){if(this.id){const t=h.getLogger(`@pollyjs/core:${this.recordingName}:${this.id}`);return t.setLevel(this.config.logLevel),t}return this[Hs].logger.log}on(t,e){return this[Ws].on(t,e),this}once(t,e){return this[Ws].once(t,e),this}off(t,e){return this[Ws].off(t,e),this}async init(){await this._emit("request"),this.response=new ss,this.didRespond=!1,await this._identify(),this.timestamp=u()}async respond(t){const{statusCode:r,headers:n,body:i,encoding:o}=t||{};e("Cannot respond to a request that already has a response.",!this.didRespond),this.aborted||(this.response.timestamp=u(),this.response.status(r),this.response.setHeaders(n),this.response.body=i,this.response.encoding=o,await this._emit("beforeResponse",this.response),this.response.end(),this.responseTime=new Date(this.response.timestamp).getTime()-new Date(this.timestamp).getTime(),this.didRespond=!0,this.end(),await this._emit("response",this.response))}abort(){this.aborted=!0}overrideRecordingName(t){Ho(t),this.recordingName=t,this.recordingId=Wn(t)}configure(t){Uo(t),this.config=Do(this[Hs].config,this.config||{},t)}_intercept(){return this[Ds].intercept(this,this.response,...arguments)}_emit(t,...e){return this[Ds].emit(t,this,...e)}async _identify(){const t=this[Hs],{_requests:e}=t,{matchRequestsBy:r}=this.config;this.identifiers={},$s(Hn).forEach(t=>{this[t]&&r[t]&&(this.identifiers[t]=Hn[t](this[t],r[t],this))}),await this[Ws].emit("identify",this),zs(this.identifiers),this.id=l(p(this.identifiers)),this.order=!r.order||this.shouldPassthrough||this.shouldIntercept?0:e.slice(0,e.indexOf(this)).filter(t=>t.id===this.id&&t.recordingId===this.recordingId).length,this.log.debug("Request Identified:",{id:this.id,order:this.order,identifiers:this.identifiers,request:this})}}function Js(){if(!arguments.length)return[];var t=arguments[0];return Qi(t)?t:[t]}z(z.S,"Reflect",{get:function t(e,r){var n,i,o=arguments.length<3?e:arguments[2];return A(e)===o?e[r]:(n=qt.f(e,r))?w(n,"value")?n.value:void 0!==n.get?n.get.call(o):void 0:x(i=Se(e))?t(i,r,o):void 0}});var Ks=S.Reflect.get;function Vs(t,e){var r=cs(t);if(as){var n=as(t);e&&(n=n.filter((function(e){return ls(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ys(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Vs(Object(r),!0).forEach((function(e){js(t,e,r[e])})):gs?ms(t,gs(r)):Vs(Object(r)).forEach((function(e){ws(t,e,ls(r,e))}))}return t}const Xs=ye();function Qs(t,{params:e}){return new Proxy(t,{set:(t,e,r)=>(t[e]=r,!0),get:(t,r)=>"params"===r?Ys({},e):Ks(t,r)})}class Zs{constructor(t,e){const r=t&&t[0];this.params={},this.queryParams={},this.handlers=[],this.middleware=e||[],r&&(this.handlers=r.handler,this.params=Ys({},r.params),this.queryParams=t.queryParams),this[Xs]=this._orderedHandlers()}shouldPassthrough(){return Boolean(this._valueFor("passthrough"))}shouldIntercept(){return Boolean(this._valueFor("intercept"))}recordingName(){return this._valueFor("recordingName")||null}config(){return Do(...this[Xs].map(({handler:t})=>t.get("config")))}applyFiltersWithArgs(t,...e){this[Xs]=this[Xs].filter(({route:r,handler:n})=>[...n.get("filters")].every(n=>n(Qs(t,r),...e)))}async intercept(t,e,r){for(const{route:n,handler:i}of this[Xs]){if(!r.shouldIntercept||r.shouldStopPropagating)return;i.has("intercept")&&await i.get("intercept")(Qs(t,n),e,r)}}async emit(t,e,...r){for(const{route:n,handler:i}of this[Xs]){if(!await i._eventEmitter.emit(t,Qs(e,n),...r))return}}_orderedHandlers(){return[...this.middleware,this].reduce((t,e)=>(t.push(...e.handlers.map(t=>({route:e,handler:t}))),t),[])}_valueFor(t){let e;for(const{handler:r}of this[Xs])r.has(t)&&(e=r.get(t));return e}}function tu(t,e){var r=cs(t);if(as){var n=as(t);e&&(n=n.filter((function(e){return ls(t,e).enumerable}))),r.push.apply(r,n)}return r}function eu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?tu(Object(r),!0).forEach((function(e){js(t,e,r[e])})):gs?ms(t,gs(r)):tu(Object(r)).forEach((function(e){ws(t,e,ls(r,e))}))}return t}class ru extends jr{constructor(){super(),this.set("config",{}),this.set("defaultOptions",{}),this.set("filters",new Ss),this._eventEmitter=new Ls({eventNames:["error","abort","request","beforeReplay","beforePersist","beforeResponse","response"]})}on(t,e,r={}){return this._eventEmitter.on(t,e,eu(eu({},this.get("defaultOptions")),r)),this}once(t,e){return this._eventEmitter.once(t,e),this}off(t,e){return this._eventEmitter.off(t,e),this}passthrough(t=!0){return this.set("passthrough",Boolean(t)),this.get("passthrough")&&this.delete("intercept"),this}intercept(t,r={}){return e(`Invalid intercept handler provided. Expected function, received: "${typeof t}".`,"function"==typeof t),"times"in(r=eu(eu({},this.get("defaultOptions")),r))&&(Wo(r.times),t=Es(t,r.times,()=>this.delete("intercept"))),this.set("intercept",t),this.passthrough(!1),this}recordingName(t){return t&&Ho(t),this.set("recordingName",t),this}configure(t){return Uo(t),this.set("config",t),this}filter(t){return e(`Invalid filter callback provided. Expected function, received: "${typeof t}".`,"function"==typeof t),this.get("filters").add(t),this}times(t){return t||"number"==typeof t?(Wo(t),this.get("defaultOptions").times=t):delete this.get("defaultOptions").times,this}}class nu{constructor({host:t,paths:e,global:r,handler:n}){this.global=Boolean(r),this.handler=n,this.host=t,this.paths=this.global?["__GLOBAL__"]:e,this._routeRecognizer=new y,this.paths.forEach(t=>this._routeRecognizer.add([{path:t,handler:[n]}]))}match(t,e){if(this.global)return new Zs(this._routeRecognizer.recognize("__GLOBAL__"));if(this.host===t){const t=this._routeRecognizer.recognize(e);return t&&new Zs(t)}}}const iu=ye(),ou=ye(),su=ye(),uu=ye(),cu=ye(),au="/",fu="*",hu=":",{keys:lu}=Object;function pu(t){const e=new o(t);return{host:e.host?e.origin:au,path:e.pathname||au}}class du{constructor(){this[iu]="",this[su]={},this[ou]=[],this[uu]=[]}host(t,r){const n=this[iu];e("[Server] A host cannot be specified within another host.",!n),this[iu]=t,r(this),this[iu]=n}namespace(t,e){const r=this[ou];this[ou]=[...r,t],e(this),this[ou]=r}timeout(){return r(...arguments)}get(){return this._register("GET",...arguments)}put(){return this._register("PUT",...arguments)}post(){return this._register("POST",...arguments)}delete(){return this._register("DELETE",...arguments)}patch(){return this._register("PATCH",...arguments)}merge(){return this._register("MERGE",...arguments)}head(){return this._register("HEAD",...arguments)}options(){return this._register("OPTIONS",...arguments)}any(){return this._registerMiddleware(...arguments)}lookup(t,e){return new Zs(this._recognize(t,e),this._lookupMiddleware(e))}_lookupMiddleware(t){const{host:e,path:r}=pu(t);return this[uu].map(t=>t.match(e,r)).filter(Boolean)}_register(t,e){const r=new ru;return Js(e).forEach(e=>{const{host:n,path:i}=pu(this._buildUrl(e)),o=this._registryForHost(n),s=this._nameForPath(i),u=o[t.toUpperCase()];u[cu].has(s)?u[cu].get(s).push(r):(u[cu].set(s,[r]),u.add([{path:i,handler:u[cu].get(s)}]))}),r}_registerMiddleware(t){const e=new ru,r={};return Js(t).forEach(t=>{if(t&&t!==fu||this[iu]||0!==this[ou].length){const{host:e,path:n}=pu(this._buildUrl(t));r[e]=r[e]||[],r[e].push(n)}else this[uu].push(new nu({global:!0,handler:e}))}),lu(r).forEach(t=>{this[uu].push(new nu({host:t,paths:r[t],handler:e}))}),e}_recognize(t,e){const{host:r,path:n}=pu(e);return this._registryForHost(r)[t.toUpperCase()].recognize(n)}_buildUrl(t){return c(this[iu],...this[ou],t)}_nameForPath(t=""){return t.split(au).map(t=>{switch(t.charAt(0)){case hu:return hu;case fu:return fu;default:return t}}).join(au).replace(/\/$/,"")||au}_registryForHost(t){return this[su][t]||(this[su][t]=a.reduce((t,e)=>(t[e]=new y,t[e][cu]=new jr,t),{})),this[su][t]}}const vu=ye(),gu=ye(),yu=ye(),mu=new lr,_u=new Ls({eventNames:["register","create","stop"]});class bu{constructor(t,e){this.recordingName=t,this.server=new du,this.config={},this.container=new Rn,_u.emitSync("register",this.container),this.adapters=new jr,this.persister=null,this._requests=[],_u.emitSync("create",this),this.configure(e)}static get VERSION(){return"6.0.0"}get recordingName(){return this[vu]}set recordingName(t){Ho(t),this[vu]=t,this[gu]=Wn(t)}get recordingId(){return this[gu]}get mode(){return this.config.mode}set mode(t){const r=Tr(n);e(`Invalid mode provided: "${t}". Possible modes: ${r.join(", ")}.`,r.includes(t)),this.config.mode=t}static on(t,e){return _u.on(t,e),this}static once(t,e){return _u.once(t,e),this}static off(t,e){return _u.off(t,e),this}static register(t){return mu.has(t)||mu.set(t,e=>e.register(t)),this.on("register",mu.get(t)),this}static unregister(t){return mu.has(t)&&this.off("register",mu.get(t)),this}configure(t={}){const{container:r}=this;e("Cannot call `configure` once requests have been handled.",0===this._requests.length),e("Cannot call `configure` on an instance of Polly that is not running.",this.mode!==n.STOPPED),this.disconnect(),this.logger&&this.logger.disconnect(),this.config=Do(In,this.config,t),this.logger=new An(this),this.logger.connect(),this.config.adapters.forEach(t=>this.connectTo(t));let{persister:i}=this.config;i&&("function"==typeof i&&(r.register(i),i=i.id),e(`Persister matching the name \`${i}\` was not registered.`,r.has("persister:"+i)),this.persister=new(r.lookup("persister:"+i))(this)),this.logger.log.debug("Polly instance configured.",{config:this.config})}record(){this.mode=n.RECORD}replay(){this.mode=n.REPLAY}passthrough(){this.mode=n.PASSTHROUGH}pause(){this[yu]=[...this.adapters.keys()],this.disconnect()}play(){this[yu]&&(this[yu].forEach(t=>this.connectTo(t)),delete this[yu])}async stop(){this.mode!==n.STOPPED&&(this.config.flushRequestsOnStop&&await this.flush(),this.disconnect(),await(this.persister&&this.persister.persist()),this.mode=n.STOPPED,await _u.emit("stop",this),this.logger.log.debug("Polly instance stopped.",{recordingName:this.recordingName}),this.logger.disconnect())}async flush(){const t=()=>{};await Pn.all(this._requests.map(e=>Pn.resolve(e.promise).then(t,t)))}connectTo(t){const{container:r,adapters:n}=this;let i=t;"function"==typeof t&&(r.register(t),i=t.id),e(`Adapter matching the name \`${i}\` was not registered.`,r.has("adapter:"+i)),this.disconnectFrom(i);const o=new(r.lookup("adapter:"+i))(this);o.connect(),n.set(i,o)}disconnectFrom(t){const{adapters:e}=this;let r=t;"function"==typeof t&&(r=t.id),e.has(r)&&(e.get(r).disconnect(),e.delete(r))}disconnect(){for(const t of this.adapters.keys())this.disconnectFrom(t)}registerRequest(t={}){const e=new Gs(this,t);return this._requests.push(e),e}}const{defineProperty:wu}=Object;function Ou(t,e,r){wu(t,"polly",{writable:!0,enumerable:!0,configurable:!0,value:new bu(e,r)})}async function ju(t,e){await t.polly.stop(),wu(t,"polly",{enumerable:!0,configurable:!0,get(){throw new f(`You are trying to access an instance of Polly that is no longer available.\nSee: https://netflix.github.io/pollyjs/#/test-frameworks/${e}?id=test-hook-ordering`)}})}function Su(t){return t.test.testReport.fullName.join("/")}function Eu(t,e={}){Eu.beforeEach(t,e),Eu.afterEach(t)}function Pu(t={},e=global){Pu.beforeEach(t,e),Pu.afterEach(e)}Eu.beforeEach=function(t,e={}){t.beforeEach((function(){return Ou(this,Su(...arguments),e)}))},Eu.afterEach=function(t){t.afterEach((function(){return ju(this,"qunit")}))},Pu.beforeEach=function(t,e=global){e.beforeEach((function(){return Ou(this,function(t){const{currentTest:e}=t,r=[e.title];let n=e.parent;for(;n&&n.title;)r.push(n.title),n=n.parent;return r.reverse().join("/")}(this),t)}))},Pu.afterEach=function(t=global){t.afterEach((function(){return ju(this,"mocha")}))};export{bu as Polly,kn as Timing,Pu as setupMocha,Eu as setupQunit};
import{ACTIONS as t,assert as e,timeout as r,MODES as n,EXPIRY_STRATEGIES as i,URL as o,HTTP_STATUS_CODES as s,timestamp as u,buildUrl as c,HTTP_METHODS as a,PollyError as f}from"@pollyjs/utils";import h from"loglevel";import l from"blueimp-md5";import p from"fast-json-stable-stringify";import d from"is-absolute-url";import v from"@sindresorhus/fnv1a";import g from"slugify";import y from"route-recognizer";function m(t,e){return t(e={exports:{}},e.exports),e.exports}var _=m((function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)})),b={}.hasOwnProperty,w=function(t,e){return b.call(t,e)},O=function(t){try{return!!t()}catch(t){return!0}},j=!O((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),S=m((function(t){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)})),E=(S.version,function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}),P=function(t,e,r){if(E(t),void 0===e)return t;switch(r){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,i){return t.call(e,r,n,i)}}return function(){return t.apply(e,arguments)}},x=function(t){return"object"==typeof t?null!==t:"function"==typeof t},A=function(t){if(!x(t))throw TypeError(t+" is not an object!");return t},T=_.document,R=x(T)&&x(T.createElement),k=function(t){return R?T.createElement(t):{}},I=!j&&!O((function(){return 7!=Object.defineProperty(k("div"),"a",{get:function(){return 7}}).a})),N=function(t,e){if(!x(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!x(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!x(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!x(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},L=Object.defineProperty,F={f:j?Object.defineProperty:function(t,e,r){if(A(t),e=N(e,!0),A(r),I)try{return L(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}},M=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},q=j?function(t,e,r){return F.f(t,e,M(1,r))}:function(t,e,r){return t[e]=r,t},C=function(t,e,r){var n,i,o,s=t&C.F,u=t&C.G,c=t&C.S,a=t&C.P,f=t&C.B,h=t&C.W,l=u?S:S[e]||(S[e]={}),p=l.prototype,d=u?_:c?_[e]:(_[e]||{}).prototype;for(n in u&&(r=e),r)(i=!s&&d&&void 0!==d[n])&&w(l,n)||(o=i?d[n]:r[n],l[n]=u&&"function"!=typeof d[n]?r[n]:f&&i?P(o,_):h&&d[n]==o?function(t){var e=function(e,r,n){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(o):a&&"function"==typeof o?P(Function.call,o):o,a&&((l.virtual||(l.virtual={}))[n]=o,t&C.R&&p&&!p[n]&&q(p,n,o)))};C.F=1,C.G=2,C.S=4,C.P=8,C.B=16,C.W=32,C.U=64,C.R=128;var $,z=C,D=q,H=0,U=Math.random(),W=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++H+U).toString(36))},B=m((function(t){var e=W("meta"),r=F.f,n=0,i=Object.isExtensible||function(){return!0},o=!O((function(){return i(Object.preventExtensions({}))})),s=function(t){r(t,e,{value:{i:"O"+ ++n,w:{}}})},u=t.exports={KEY:e,NEED:!1,fastKey:function(t,r){if(!x(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!w(t,e)){if(!i(t))return"F";if(!r)return"E";s(t)}return t[e].i},getWeak:function(t,r){if(!w(t,e)){if(!i(t))return!0;if(!r)return!1;s(t)}return t[e].w},onFreeze:function(t){return o&&u.NEED&&i(t)&&!w(t,e)&&s(t),t}}})),G=(B.KEY,B.NEED,B.fastKey,B.getWeak,B.onFreeze,m((function(t){var e=_["__core-js_shared__"]||(_["__core-js_shared__"]={});(t.exports=function(t,r){return e[t]||(e[t]=void 0!==r?r:{})})("versions",[]).push({version:S.version,mode:"pure",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}))),J=m((function(t){var e=G("wks"),r=_.Symbol,n="function"==typeof r;(t.exports=function(t){return e[t]||(e[t]=n&&r[t]||(n?r:W)("Symbol."+t))}).store=e})),K=F.f,V=J("toStringTag"),Y=function(t,e,r){t&&!w(t=r?t:t.prototype,V)&&K(t,V,{configurable:!0,value:e})},X={f:J},Q=F.f,Z=function(t){var e=S.Symbol||(S.Symbol={});"_"==t.charAt(0)||t in e||Q(e,t,{value:X.f(t)})},tt={}.toString,et=function(t){return tt.call(t).slice(8,-1)},rt=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==et(t)?t.split(""):Object(t)},nt=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},it=function(t){return rt(nt(t))},ot=Math.ceil,st=Math.floor,ut=function(t){return isNaN(t=+t)?0:(t>0?st:ot)(t)},ct=Math.min,at=function(t){return t>0?ct(ut(t),9007199254740991):0},ft=Math.max,ht=Math.min,lt=G("keys"),pt=function(t){return lt[t]||(lt[t]=W(t))},dt=($=!1,function(t,e,r){var n,i=it(t),o=at(i.length),s=function(t,e){return(t=ut(t))<0?ft(t+e,0):ht(t,e)}(r,o);if($&&e!=e){for(;o>s;)if((n=i[s++])!=n)return!0}else for(;o>s;s++)if(($||s in i)&&i[s]===e)return $||s||0;return!$&&-1}),vt=pt("IE_PROTO"),gt=function(t,e){var r,n=it(t),i=0,o=[];for(r in n)r!=vt&&w(n,r)&&o.push(r);for(;e.length>i;)w(n,r=e[i++])&&(~dt(o,r)||o.push(r));return o},yt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),mt=Object.keys||function(t){return gt(t,yt)},_t={f:Object.getOwnPropertySymbols},bt={f:{}.propertyIsEnumerable},wt=Array.isArray||function(t){return"Array"==et(t)},Ot=function(t){return Object(nt(t))},jt=j?Object.defineProperties:function(t,e){A(t);for(var r,n=mt(e),i=n.length,o=0;i>o;)F.f(t,r=n[o++],e[r]);return t},St=_.document,Et=St&&St.documentElement,Pt=pt("IE_PROTO"),xt=function(){},At=function(){var t,e=k("iframe"),r=yt.length;for(e.style.display="none",Et.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),At=t.F;r--;)delete At.prototype[yt[r]];return At()},Tt=Object.create||function(t,e){var r;return null!==t?(xt.prototype=A(t),r=new xt,xt.prototype=null,r[Pt]=t):r=At(),void 0===e?r:jt(r,e)},Rt=yt.concat("length","prototype"),kt={f:Object.getOwnPropertyNames||function(t){return gt(t,Rt)}},It=kt.f,Nt={}.toString,Lt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Ft={f:function(t){return Lt&&"[object Window]"==Nt.call(t)?function(t){try{return It(t)}catch(t){return Lt.slice()}}(t):It(it(t))}},Mt=Object.getOwnPropertyDescriptor,qt={f:j?Mt:function(t,e){if(t=it(t),e=N(e,!0),I)try{return Mt(t,e)}catch(t){}if(w(t,e))return M(!bt.f.call(t,e),t[e])}},Ct=B.KEY,$t=qt.f,zt=F.f,Dt=Ft.f,Ht=_.Symbol,Ut=_.JSON,Wt=Ut&&Ut.stringify,Bt=J("_hidden"),Gt=J("toPrimitive"),Jt={}.propertyIsEnumerable,Kt=G("symbol-registry"),Vt=G("symbols"),Yt=G("op-symbols"),Xt=Object.prototype,Qt="function"==typeof Ht&&!!_t.f,Zt=_.QObject,te=!Zt||!Zt.prototype||!Zt.prototype.findChild,ee=j&&O((function(){return 7!=Tt(zt({},"a",{get:function(){return zt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=$t(Xt,e);n&&delete Xt[e],zt(t,e,r),n&&t!==Xt&&zt(Xt,e,n)}:zt,re=function(t){var e=Vt[t]=Tt(Ht.prototype);return e._k=t,e},ne=Qt&&"symbol"==typeof Ht.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof Ht},ie=function(t,e,r){return t===Xt&&ie(Yt,e,r),A(t),e=N(e,!0),A(r),w(Vt,e)?(r.enumerable?(w(t,Bt)&&t[Bt][e]&&(t[Bt][e]=!1),r=Tt(r,{enumerable:M(0,!1)})):(w(t,Bt)||zt(t,Bt,M(1,{})),t[Bt][e]=!0),ee(t,e,r)):zt(t,e,r)},oe=function(t,e){A(t);for(var r,n=function(t){var e=mt(t),r=_t.f;if(r)for(var n,i=r(t),o=bt.f,s=0;i.length>s;)o.call(t,n=i[s++])&&e.push(n);return e}(e=it(e)),i=0,o=n.length;o>i;)ie(t,r=n[i++],e[r]);return t},se=function(t){var e=Jt.call(this,t=N(t,!0));return!(this===Xt&&w(Vt,t)&&!w(Yt,t))&&(!(e||!w(this,t)||!w(Vt,t)||w(this,Bt)&&this[Bt][t])||e)},ue=function(t,e){if(t=it(t),e=N(e,!0),t!==Xt||!w(Vt,e)||w(Yt,e)){var r=$t(t,e);return!r||!w(Vt,e)||w(t,Bt)&&t[Bt][e]||(r.enumerable=!0),r}},ce=function(t){for(var e,r=Dt(it(t)),n=[],i=0;r.length>i;)w(Vt,e=r[i++])||e==Bt||e==Ct||n.push(e);return n},ae=function(t){for(var e,r=t===Xt,n=Dt(r?Yt:it(t)),i=[],o=0;n.length>o;)!w(Vt,e=n[o++])||r&&!w(Xt,e)||i.push(Vt[e]);return i};Qt||(D((Ht=function(){if(this instanceof Ht)throw TypeError("Symbol is not a constructor!");var t=W(arguments.length>0?arguments[0]:void 0),e=function(r){this===Xt&&e.call(Yt,r),w(this,Bt)&&w(this[Bt],t)&&(this[Bt][t]=!1),ee(this,t,M(1,r))};return j&&te&&ee(Xt,t,{configurable:!0,set:e}),re(t)}).prototype,"toString",(function(){return this._k})),qt.f=ue,F.f=ie,kt.f=Ft.f=ce,bt.f=se,_t.f=ae,X.f=function(t){return re(J(t))}),z(z.G+z.W+z.F*!Qt,{Symbol:Ht});for(var fe="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),he=0;fe.length>he;)J(fe[he++]);for(var le=mt(J.store),pe=0;le.length>pe;)Z(le[pe++]);z(z.S+z.F*!Qt,"Symbol",{for:function(t){return w(Kt,t+="")?Kt[t]:Kt[t]=Ht(t)},keyFor:function(t){if(!ne(t))throw TypeError(t+" is not a symbol!");for(var e in Kt)if(Kt[e]===t)return e},useSetter:function(){te=!0},useSimple:function(){te=!1}}),z(z.S+z.F*!Qt,"Object",{create:function(t,e){return void 0===e?Tt(t):oe(Tt(t),e)},defineProperty:ie,defineProperties:oe,getOwnPropertyDescriptor:ue,getOwnPropertyNames:ce,getOwnPropertySymbols:ae});var de=O((function(){_t.f(1)}));z(z.S+z.F*de,"Object",{getOwnPropertySymbols:function(t){return _t.f(Ot(t))}}),Ut&&z(z.S+z.F*(!Qt||O((function(){var t=Ht();return"[null]"!=Wt([t])||"{}"!=Wt({a:t})||"{}"!=Wt(Object(t))}))),"JSON",{stringify:function(t){for(var e,r,n=[t],i=1;arguments.length>i;)n.push(arguments[i++]);if(r=e=n[1],(x(e)||void 0!==t)&&!ne(t))return wt(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!ne(e))return e}),n[1]=e,Wt.apply(Ut,n)}}),Ht.prototype[Gt]||q(Ht.prototype,Gt,Ht.prototype.valueOf),Y(Ht,"Symbol"),Y(Math,"Math",!0),Y(_.JSON,"JSON",!0),Z("asyncIterator"),Z("observable");var ve=S.Symbol,ge=function(t,e){return{value:e,done:!!t}},ye={},me={};q(me,J("iterator"),(function(){return this}));var _e=function(t,e,r){t.prototype=Tt(me,{next:M(1,r)}),Y(t,e+" Iterator")},be=pt("IE_PROTO"),we=Object.prototype,Oe=Object.getPrototypeOf||function(t){return t=Ot(t),w(t,be)?t[be]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?we:null},je=J("iterator"),Se=!([].keys&&"next"in[].keys()),Ee=function(){return this},Pe=function(t,e,r,n,i,o,s){_e(r,e,n);var u,c,a,f=function(t){if(!Se&&t in d)return d[t];switch(t){case"keys":case"values":return function(){return new r(this,t)}}return function(){return new r(this,t)}},h=e+" Iterator",l="values"==i,p=!1,d=t.prototype,v=d[je]||d["@@iterator"]||i&&d[i],g=v||f(i),y=i?l?f("entries"):g:void 0,m="Array"==e&&d.entries||v;if(m&&(a=Oe(m.call(new t)))!==Object.prototype&&a.next&&Y(a,h,!0),l&&v&&"values"!==v.name&&(p=!0,g=function(){return v.call(this)}),s&&(Se||p||!d[je])&&q(d,je,g),ye[e]=g,ye[h]=Ee,i)if(u={values:l?g:f("values"),keys:o?g:f("keys"),entries:y},s)for(c in u)c in d||D(d,c,u[c]);else z(z.P+z.F*(Se||p),e,u);return u};Pe(Array,"Array",(function(t,e){this._t=it(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,r=this._i++;return!t||r>=t.length?(this._t=void 0,ge(1)):ge(0,"keys"==e?r:"values"==e?t[r]:[r,t[r]])}),"values");ye.Arguments=ye.Array;for(var xe=J("toStringTag"),Ae="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),Te=0;Te<Ae.length;Te++){var Re=Ae[Te],ke=_[Re],Ie=ke&&ke.prototype;Ie&&!Ie[xe]&&q(Ie,xe,Re),ye[Re]=ye.Array}var Ne=J("species"),Le=function(t,e){return new(function(t){var e;return wt(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!wt(e.prototype)||(e=void 0),x(e)&&null===(e=e[Ne])&&(e=void 0)),void 0===e?Array:e}(t))(e)},Fe=function(t,e){var r=1==t,n=2==t,i=3==t,o=4==t,s=6==t,u=5==t||s,c=e||Le;return function(e,a,f){for(var h,l,p=Ot(e),d=rt(p),v=P(a,f,3),g=at(d.length),y=0,m=r?c(e,g):n?c(e,0):void 0;g>y;y++)if((u||y in d)&&(l=v(h=d[y],y,p),t))if(r)m[y]=l;else if(l)switch(t){case 3:return!0;case 5:return h;case 6:return y;case 2:m.push(h)}else if(o)return!1;return s?-1:i||o?o:m}},Me=Object.assign,qe=!Me||O((function(){var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=Me({},t)[r]||Object.keys(Me({},e)).join("")!=n}))?function(t,e){for(var r=Ot(t),n=arguments.length,i=1,o=_t.f,s=bt.f;n>i;)for(var u,c=rt(arguments[i++]),a=o?mt(c).concat(o(c)):mt(c),f=a.length,h=0;f>h;)u=a[h++],j&&!s.call(c,u)||(r[u]=c[u]);return r}:Me,Ce=function(t,e,r){for(var n in e)r&&t[n]?t[n]=e[n]:q(t,n,e[n]);return t},$e=function(t,e,r,n){if(!(t instanceof e)||void 0!==n&&n in t)throw TypeError(r+": incorrect invocation!");return t},ze=function(t,e,r,n){try{return n?e(A(r)[0],r[1]):e(r)}catch(e){var i=t.return;throw void 0!==i&&A(i.call(t)),e}},De=J("iterator"),He=Array.prototype,Ue=J("toStringTag"),We="Arguments"==et(function(){return arguments}()),Be=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),Ue))?r:We?et(e):"Object"==(n=et(e))&&"function"==typeof e.callee?"Arguments":n},Ge=J("iterator"),Je=S.getIteratorMethod=function(t){if(null!=t)return t[Ge]||t["@@iterator"]||ye[Be(t)]},Ke=m((function(t){var e={},r={},n=t.exports=function(t,n,i,o,s){var u,c,a,f,h,l=s?function(){return t}:Je(t),p=P(i,o,n?2:1),d=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(void 0===(h=l)||ye.Array!==h&&He[De]!==h){for(a=l.call(t);!(c=a.next()).done;)if((f=ze(a,p,c.value,n))===e||f===r)return f}else for(u=at(t.length);u>d;d++)if((f=n?p(A(c=t[d])[0],c[1]):p(t[d]))===e||f===r)return f};n.BREAK=e,n.RETURN=r})),Ve=function(t,e){if(!x(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t},Ye=B.getWeak,Xe=Fe(5),Qe=Fe(6),Ze=0,tr=function(t){return t._l||(t._l=new er)},er=function(){this.a=[]},rr=function(t,e){return Xe(t.a,(function(t){return t[0]===e}))};er.prototype={get:function(t){var e=rr(this,t);if(e)return e[1]},has:function(t){return!!rr(this,t)},set:function(t,e){var r=rr(this,t);r?r[1]=e:this.a.push([t,e])},delete:function(t){var e=Qe(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}};var nr={getConstructor:function(t,e,r,n){var i=t((function(t,o){$e(t,i,e,"_i"),t._t=e,t._i=Ze++,t._l=void 0,null!=o&&Ke(o,r,t[n],t)}));return Ce(i.prototype,{delete:function(t){if(!x(t))return!1;var r=Ye(t);return!0===r?tr(Ve(this,e)).delete(t):r&&w(r,this._i)&&delete r[this._i]},has:function(t){if(!x(t))return!1;var r=Ye(t);return!0===r?tr(Ve(this,e)).has(t):r&&w(r,this._i)}}),i},def:function(t,e,r){var n=Ye(A(e),!0);return!0===n?tr(t).set(e,r):n[t._i]=r,t},ufstore:tr},ir=F.f,or=Fe(0),sr=function(t,e,r,n,i,o){var s=_[t],u=s,c=i?"set":"add",a=u&&u.prototype,f={};return j&&"function"==typeof u&&(o||a.forEach&&!O((function(){(new u).entries().next()})))?(u=e((function(e,r){$e(e,u,t,"_c"),e._c=new s,null!=r&&Ke(r,i,e[c],e)})),or("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),(function(t){var e="add"==t||"set"==t;!(t in a)||o&&"clear"==t||q(u.prototype,t,(function(r,n){if($e(this,u,t),!e&&o&&!x(r))return"get"==t&&void 0;var i=this._c[t](0===r?0:r,n);return e?this:i}))})),o||ir(u.prototype,"size",{get:function(){return this._c.size}})):(u=n.getConstructor(e,t,i,c),Ce(u.prototype,r),B.NEED=!0),Y(u,t),f[t]=u,z(z.G+z.W+z.F,f),o||n.setStrong(u,t,i),u},ur=(m((function(t){var e,r=Fe(0),n=Ve,i=!_.ActiveXObject&&"ActiveXObject"in _,o=B.getWeak,s=Object.isExtensible,u=nr.ufstore,c=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},a={get:function(t){if(x(t)){var e=o(t);return!0===e?u(Ve(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return nr.def(Ve(this,"WeakMap"),t,e)}},f=t.exports=sr("WeakMap",c,a,nr,!0,!0);n&&i&&(e=nr.getConstructor(c,"WeakMap"),qe(e.prototype,a),B.NEED=!0,r(["delete","has","get","set"],(function(t){var r=f.prototype,n=r[t];D(r,t,(function(r,i){if(x(r)&&!s(r)){this._f||(this._f=new e);var o=this._f[t](r,i);return"set"==t?this:o}return n.call(this,r,i)}))})))})),function(t){z(z.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})});ur("WeakMap");var cr=function(t){z(z.S,t,{from:function(t){var e,r,n,i,o=arguments[1];return E(this),(e=void 0!==o)&&E(o),null==t?new this:(r=[],e?(n=0,i=P(o,arguments[2],2),Ke(t,!1,(function(t){r.push(i(t,n++))}))):Ke(t,!1,r.push,r),new this(r))}})};cr("WeakMap");var ar,fr=S.WeakMap,hr=(ar=!0,function(t,e){var r,n,i=String(nt(t)),o=ut(e),s=i.length;return o<0||o>=s?ar?"":void 0:(r=i.charCodeAt(o))<55296||r>56319||o+1===s||(n=i.charCodeAt(o+1))<56320||n>57343?ar?i.charAt(o):r:ar?i.slice(o,o+2):n-56320+(r-55296<<10)+65536});Pe(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,r=this._i;return r>=e.length?{value:void 0,done:!0}:(t=hr(e,r),this._i+=t.length,{value:t,done:!1})}));var lr=J("species"),pr=function(t){var e="function"==typeof S[t]?S[t]:_[t];j&&e&&!e[lr]&&F.f(e,lr,{configurable:!0,get:function(){return this}})},dr=F.f,vr=B.fastKey,gr=j?"_s":"size",yr=function(t,e){var r,n=vr(e);if("F"!==n)return t._i[n];for(r=t._f;r;r=r.n)if(r.k==e)return r},mr={getConstructor:function(t,e,r,n){var i=t((function(t,o){$e(t,i,e,"_i"),t._t=e,t._i=Tt(null),t._f=void 0,t._l=void 0,t[gr]=0,null!=o&&Ke(o,r,t[n],t)}));return Ce(i.prototype,{clear:function(){for(var t=Ve(this,e),r=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete r[n.i];t._f=t._l=void 0,t[gr]=0},delete:function(t){var r=Ve(this,e),n=yr(r,t);if(n){var i=n.n,o=n.p;delete r._i[n.i],n.r=!0,o&&(o.n=i),i&&(i.p=o),r._f==n&&(r._f=i),r._l==n&&(r._l=o),r[gr]--}return!!n},forEach:function(t){Ve(this,e);for(var r,n=P(t,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(n(r.v,r.k,this);r&&r.r;)r=r.p},has:function(t){return!!yr(Ve(this,e),t)}}),j&&dr(i.prototype,"size",{get:function(){return Ve(this,e)[gr]}}),i},def:function(t,e,r){var n,i,o=yr(t,e);return o?o.v=r:(t._l=o={i:i=vr(e,!0),k:e,v:r,p:n=t._l,n:void 0,r:!1},t._f||(t._f=o),n&&(n.n=o),t[gr]++,"F"!==i&&(t._i[i]=o)),t},getEntry:yr,setStrong:function(t,e,r){Pe(t,e,(function(t,r){this._t=Ve(t,e),this._k=r,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?ge(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,ge(1))}),r?"entries":"values",!r,!0),pr(e)}},_r=(sr("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=mr.getEntry(Ve(this,"Map"),t);return e&&e.v},set:function(t,e){return mr.def(Ve(this,"Map"),0===t?0:t,e)}},mr,!0),function(t){return function(){if(Be(this)!=t)throw TypeError(t+"#toJSON isn't generic");return function(t,e){var r=[];return Ke(t,!1,r.push,r,e),r}(this)}});z(z.P+z.R,"Map",{toJSON:_r("Map")}),ur("Map"),cr("Map");var br,wr=S.Map,Or=bt.f,jr=(br=!1,function(t){for(var e,r=it(t),n=mt(r),i=n.length,o=0,s=[];i>o;)e=n[o++],j&&!Or.call(r,e)||s.push(br?[e,r[e]]:r[e]);return s});z(z.S,"Object",{values:function(t){return jr(t)}});var Sr,Er,Pr,xr=S.Object.values,Ar=J("species"),Tr=function(t,e){var r,n=A(t).constructor;return void 0===n||null==(r=A(n)[Ar])?e:E(r)},Rr=function(t,e,r){var n=void 0===r;switch(e.length){case 0:return n?t():t.call(r);case 1:return n?t(e[0]):t.call(r,e[0]);case 2:return n?t(e[0],e[1]):t.call(r,e[0],e[1]);case 3:return n?t(e[0],e[1],e[2]):t.call(r,e[0],e[1],e[2]);case 4:return n?t(e[0],e[1],e[2],e[3]):t.call(r,e[0],e[1],e[2],e[3])}return t.apply(r,e)},kr=_.process,Ir=_.setImmediate,Nr=_.clearImmediate,Lr=_.MessageChannel,Fr=_.Dispatch,Mr=0,qr={},Cr=function(){var t=+this;if(qr.hasOwnProperty(t)){var e=qr[t];delete qr[t],e()}},$r=function(t){Cr.call(t.data)};Ir&&Nr||(Ir=function(t){for(var e=[],r=1;arguments.length>r;)e.push(arguments[r++]);return qr[++Mr]=function(){Rr("function"==typeof t?t:Function(t),e)},Sr(Mr),Mr},Nr=function(t){delete qr[t]},"process"==et(kr)?Sr=function(t){kr.nextTick(P(Cr,t,1))}:Fr&&Fr.now?Sr=function(t){Fr.now(P(Cr,t,1))}:Lr?(Pr=(Er=new Lr).port2,Er.port1.onmessage=$r,Sr=P(Pr.postMessage,Pr,1)):_.addEventListener&&"function"==typeof postMessage&&!_.importScripts?(Sr=function(t){_.postMessage(t+"","*")},_.addEventListener("message",$r,!1)):Sr="onreadystatechange"in k("script")?function(t){Et.appendChild(k("script")).onreadystatechange=function(){Et.removeChild(this),Cr.call(t)}}:function(t){setTimeout(P(Cr,t,1),0)});var zr={set:Ir,clear:Nr},Dr=zr.set,Hr=_.MutationObserver||_.WebKitMutationObserver,Ur=_.process,Wr=_.Promise,Br="process"==et(Ur);function Gr(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=E(e),this.reject=E(r)}var Jr={f:function(t){return new Gr(t)}},Kr=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},Vr=_.navigator,Yr=Vr&&Vr.userAgent||"",Xr=function(t,e){if(A(t),x(e)&&e.constructor===t)return e;var r=Jr.f(t);return(0,r.resolve)(e),r.promise},Qr=J("iterator"),Zr=!1;try{var tn=[7][Qr]();tn.return=function(){Zr=!0},Array.from(tn,(function(){throw 2}))}catch(t){}var en,rn,nn,on,sn=zr.set,un=function(){var t,e,r,n=function(){var n,i;for(Br&&(n=Ur.domain)&&n.exit();t;){i=t.fn,t=t.next;try{i()}catch(n){throw t?r():e=void 0,n}}e=void 0,n&&n.enter()};if(Br)r=function(){Ur.nextTick(n)};else if(!Hr||_.navigator&&_.navigator.standalone)if(Wr&&Wr.resolve){var i=Wr.resolve(void 0);r=function(){i.then(n)}}else r=function(){Dr.call(_,n)};else{var o=!0,s=document.createTextNode("");new Hr(n).observe(s,{characterData:!0}),r=function(){s.data=o=!o}}return function(n){var i={fn:n,next:void 0};e&&(e.next=i),t||(t=i,r()),e=i}}(),cn=_.TypeError,an=_.process,fn=an&&an.versions,hn=fn&&fn.v8||"",ln=_.Promise,pn="process"==Be(an),dn=function(){},vn=rn=Jr.f,gn=!!function(){try{var t=ln.resolve(1),e=(t.constructor={})[J("species")]=function(t){t(dn,dn)};return(pn||"function"==typeof PromiseRejectionEvent)&&t.then(dn)instanceof e&&0!==hn.indexOf("6.6")&&-1===Yr.indexOf("Chrome/66")}catch(t){}}(),yn=function(t){var e;return!(!x(t)||"function"!=typeof(e=t.then))&&e},mn=function(t,e){if(!t._n){t._n=!0;var r=t._c;un((function(){for(var n=t._v,i=1==t._s,o=0,s=function(e){var r,o,s,u=i?e.ok:e.fail,c=e.resolve,a=e.reject,f=e.domain;try{u?(i||(2==t._h&&wn(t),t._h=1),!0===u?r=n:(f&&f.enter(),r=u(n),f&&(f.exit(),s=!0)),r===e.promise?a(cn("Promise-chain cycle")):(o=yn(r))?o.call(r,c,a):c(r)):a(n)}catch(t){f&&!s&&f.exit(),a(t)}};r.length>o;)s(r[o++]);t._c=[],t._n=!1,e&&!t._h&&_n(t)}))}},_n=function(t){sn.call(_,(function(){var e,r,n,i=t._v,o=bn(t);if(o&&(e=Kr((function(){pn?an.emit("unhandledRejection",i,t):(r=_.onunhandledrejection)?r({promise:t,reason:i}):(n=_.console)&&n.error&&n.error("Unhandled promise rejection",i)})),t._h=pn||bn(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},bn=function(t){return 1!==t._h&&0===(t._a||t._c).length},wn=function(t){sn.call(_,(function(){var e;pn?an.emit("rejectionHandled",t):(e=_.onrejectionhandled)&&e({promise:t,reason:t._v})}))},On=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),mn(e,!0))},jn=function(t){var e,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===t)throw cn("Promise can't be resolved itself");(e=yn(t))?un((function(){var n={_w:r,_d:!1};try{e.call(t,P(jn,n,1),P(On,n,1))}catch(t){On.call(n,t)}})):(r._v=t,r._s=1,mn(r,!1))}catch(t){On.call({_w:r,_d:!1},t)}}};gn||(ln=function(t){$e(this,ln,"Promise","_h"),E(t),en.call(this);try{t(P(jn,this,1),P(On,this,1))}catch(t){On.call(this,t)}},(en=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=Ce(ln.prototype,{then:function(t,e){var r=vn(Tr(this,ln));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=pn?an.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&mn(this,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),nn=function(){var t=new en;this.promise=t,this.resolve=P(jn,t,1),this.reject=P(On,t,1)},Jr.f=vn=function(t){return t===ln||t===on?new nn(t):rn(t)}),z(z.G+z.W+z.F*!gn,{Promise:ln}),Y(ln,"Promise"),pr("Promise"),on=S.Promise,z(z.S+z.F*!gn,"Promise",{reject:function(t){var e=vn(this);return(0,e.reject)(t),e.promise}}),z(z.S+!0*z.F,"Promise",{resolve:function(t){return Xr(this===on?ln:this,t)}}),z(z.S+z.F*!(gn&&function(t,e){if(!e&&!Zr)return!1;var r=!1;try{var n=[7],i=n[Qr]();i.next=function(){return{done:r=!0}},n[Qr]=function(){return i},t(n)}catch(t){}return r}((function(t){ln.all(t).catch(dn)}))),"Promise",{all:function(t){var e=this,r=vn(e),n=r.resolve,i=r.reject,o=Kr((function(){var r=[],o=0,s=1;Ke(t,!1,(function(t){var u=o++,c=!1;r.push(void 0),s++,e.resolve(t).then((function(t){c||(c=!0,r[u]=t,--s||n(r))}),i)})),--s||n(r)}));return o.e&&i(o.v),r.promise},race:function(t){var e=this,r=vn(e),n=r.reject,i=Kr((function(){Ke(t,!1,(function(t){e.resolve(t).then(r.resolve,n)}))}));return i.e&&n(i.v),r.promise}}),z(z.P+z.R,"Promise",{finally:function(t){var e=Tr(this,S.Promise||_.Promise),r="function"==typeof t;return this.then(r?function(r){return Xr(e,t()).then((function(){return r}))}:t,r?function(r){return Xr(e,t()).then((function(){throw r}))}:t)}}),z(z.S,"Promise",{try:function(t){var e=Jr.f(this),r=Kr(t);return(r.e?e.reject:e.resolve)(r.v),e.promise}});var Sn=S.Promise;const En={[t.RECORD]:"Recorded",[t.REPLAY]:"Replayed",[t.INTERCEPT]:"Intercepted",[t.PASSTHROUGH]:"Passthrough"};class Pn{constructor(t){this.polly=t,this.log=h.getLogger("@pollyjs/core:"+this.polly.recordingName),this.log.setLevel(t.config.logLevel)}connect(){this._middleware=this.polly.server.any().on("error",(...t)=>this.logRequestError(...t)).on("request",(...t)=>this.logRequest(...t)).on("response",(...t)=>this.logRequestResponse(...t))}disconnect(){this._middleware.off("error"),this._middleware.off("response")}logRequest(t){const{log:e}=t,r=e.getLevel()<=e.levels.DEBUG;e.info(`Request: ${t.method} ${t.url}`,...r?[{request:t}]:[])}logRequestResponse(t,e){const{log:r}=t,n=r.getLevel()<=r.levels.DEBUG;r.info(`Response: ${En[t.action]} ➞ ${t.method} ${t.url} ${e.statusCode} • ${t.responseTime}ms`,...n?[{request:t,response:e}]:[])}logRequestError(t,e){const{log:r}=t,n=r.getLevel()<=r.levels.DEBUG;r.error(`Errored ➞ ${t.method} ${t.url}`,e,...n?[{request:t}]:[])}}function xn(t){return`${t.type}:${t.id}`}class An{constructor(){this._registry=new wr}register(t){e(`Attempted to register ${t} but invalid factory provided. Expected function, received: "${typeof t}"`,"function"==typeof t);const{type:r}=t,n=t.id;e(`Invalid registration id provided. Expected string, received: "${typeof n}"`,"string"==typeof n),e(`Invalid registration type provided. Expected string, received: "${typeof r}"`,"string"==typeof r),this._registry.set(xn(t),t)}unregister(t){const{_registry:e}=this,r="function"==typeof t?xn(t):t;e.delete(r)}lookup(t){return this._registry.get(t)||null}has(t){const{_registry:e}=this,r="function"==typeof t?xn(t):t;return e.has(r)}}var Tn={fixed:t=>()=>r(t),relative:t=>e=>r(t*e)},Rn={mode:n.REPLAY,adapters:[],adapterOptions:{},persister:null,persisterOptions:{keepUnusedRequests:!1,disableSortingHarEntries:!1},logLevel:h.levels.WARN,flushRequestsOnStop:!1,recordIfMissing:!0,recordFailedRequests:!1,expiresIn:null,expiryStrategy:i.WARN,timing:Tn.fixed(0),matchRequestsBy:{method:!0,headers:!0,body:!0,order:!0,url:{protocol:!0,username:!0,password:!0,hostname:!0,port:!0,pathname:!0,query:!0,hash:!1}}};function kn(t){return null!=t&&"object"==typeof t}function In(t,...e){const r=new o(t,...e);return d(t)||(t.startsWith("//")?r.set("protocol",""):function(t){t.set("protocol",""),t.set("host",""),t.set("slashes",!1)}(r)),r}const{keys:Nn}=Object,Ln={get:(t,e)=>t["string"==typeof e?e.toLowerCase():e],set:(t,e,r)=>"string"==typeof e&&(null==r?delete t[e.toLowerCase()]:t[e.toLowerCase()]=r,!0),deleteProperty:(t,e)=>"string"==typeof e&&(delete t[e.toLowerCase()],!0)};function Fn(t){const e=new Proxy({},Ln);return kn(t)&&Nn(t).forEach(r=>e[r]=t[r]),e}const{keys:Mn}=Object,{isArray:qn}=Array,{parse:Cn}=JSON;function $n(t){return"function"==typeof t}var zn={headers:function(t,e,r){const n=new Fn(t);return $n(e)?e(n,r):(kn(e)&&qn(e.exclude)&&e.exclude.forEach(t=>delete n[t]),n)},method:function(t,e,r){return $n(e)?e(t,r):t.toUpperCase()},body:function(t,e,r){return $n(e)?e(t,r):t},url:function(t,e,r){let n=In(t,!0);return $n(e)?n=In(e(t,r),!0):Mn(e||{}).forEach(t=>{$n(e[t])?n.set(t,e[t](n[t],r)):e[t]||n.set(t,"")}),kn(n.query)&&n.set("query",Cn(p(n.query))),n.href}};function Dn(t){const e=v(t).toString();let r=g(function(t){return t.replace(/\W/g,"-")}(t));return r=r.substring(0,100-e.length-1),`${r}_${e}`}function Hn(t){return(t||"").split("/").map(Dn).join("/")}z(z.S,"Array",{isArray:wt});var Un=S.Array.isArray;function Wn(t,e){return t===e||t!=t&&e!=e}function Bn(t,e){for(var r=t.length;r--;)if(Wn(t[r][0],e))return r;return-1}var Gn=Array.prototype.splice;function Jn(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Jn.prototype.clear=function(){this.__data__=[],this.size=0},Jn.prototype.delete=function(t){var e=this.__data__,r=Bn(e,t);return!(r<0)&&(r==e.length-1?e.pop():Gn.call(e,r,1),--this.size,!0)},Jn.prototype.get=function(t){var e=this.__data__,r=Bn(e,t);return r<0?void 0:e[r][1]},Jn.prototype.has=function(t){return Bn(this.__data__,t)>-1},Jn.prototype.set=function(t,e){var r=this.__data__,n=Bn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};var Kn="object"==typeof global&&global&&global.Object===Object&&global,Vn="object"==typeof self&&self&&self.Object===Object&&self,Yn=Kn||Vn||Function("return this")(),Xn=Yn.Symbol,Qn=Object.prototype,Zn=Qn.hasOwnProperty,ti=Qn.toString,ei=Xn?Xn.toStringTag:void 0;var ri=Object.prototype.toString;var ni=Xn?Xn.toStringTag:void 0;function ii(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ni&&ni in Object(t)?function(t){var e=Zn.call(t,ei),r=t[ei];try{t[ei]=void 0;var n=!0}catch(t){}var i=ti.call(t);return n&&(e?t[ei]=r:delete t[ei]),i}(t):function(t){return ri.call(t)}(t)}function oi(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function si(t){if(!oi(t))return!1;var e=ii(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var ui,ci=Yn["__core-js_shared__"],ai=(ui=/[^.]+$/.exec(ci&&ci.keys&&ci.keys.IE_PROTO||""))?"Symbol(src)_1."+ui:"";var fi=Function.prototype.toString;var hi=/^\[object .+?Constructor\]$/,li=Function.prototype,pi=Object.prototype,di=li.toString,vi=pi.hasOwnProperty,gi=RegExp("^"+di.call(vi).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yi(t){return!(!oi(t)||(e=t,ai&&ai in e))&&(si(t)?gi:hi).test(function(t){if(null!=t){try{return fi.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function mi(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return yi(r)?r:void 0}var _i=mi(Yn,"Map"),bi=mi(Object,"create");var wi=Object.prototype.hasOwnProperty;var Oi=Object.prototype.hasOwnProperty;function ji(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Si(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function Ei(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ji.prototype.clear=function(){this.__data__=bi?bi(null):{},this.size=0},ji.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ji.prototype.get=function(t){var e=this.__data__;if(bi){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return wi.call(e,t)?e[t]:void 0},ji.prototype.has=function(t){var e=this.__data__;return bi?void 0!==e[t]:Oi.call(e,t)},ji.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=bi&&void 0===e?"__lodash_hash_undefined__":e,this},Ei.prototype.clear=function(){this.size=0,this.__data__={hash:new ji,map:new(_i||Jn),string:new ji}},Ei.prototype.delete=function(t){var e=Si(this,t).delete(t);return this.size-=e?1:0,e},Ei.prototype.get=function(t){return Si(this,t).get(t)},Ei.prototype.has=function(t){return Si(this,t).has(t)},Ei.prototype.set=function(t,e){var r=Si(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Pi(t){var e=this.__data__=new Jn(t);this.size=e.size}Pi.prototype.clear=function(){this.__data__=new Jn,this.size=0},Pi.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Pi.prototype.get=function(t){return this.__data__.get(t)},Pi.prototype.has=function(t){return this.__data__.has(t)},Pi.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Jn){var n=r.__data__;if(!_i||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Ei(n)}return r.set(t,e),this.size=r.size,this};var xi=function(){try{var t=mi(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();function Ai(t,e,r){"__proto__"==e&&xi?xi(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Ti(t,e,r){(void 0!==r&&!Wn(t[e],r)||void 0===r&&!(e in t))&&Ai(t,e,r)}var Ri,ki=function(t,e,r){for(var n=-1,i=Object(t),o=r(t),s=o.length;s--;){var u=o[Ri?s:++n];if(!1===e(i[u],u,i))break}return t},Ii="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ni=Ii&&"object"==typeof module&&module&&!module.nodeType&&module,Li=Ni&&Ni.exports===Ii?Yn.Buffer:void 0,Fi=Li?Li.allocUnsafe:void 0;var Mi=Yn.Uint8Array;function qi(t,e){var r,n,i=e?(r=t.buffer,n=new r.constructor(r.byteLength),new Mi(n).set(new Mi(r)),n):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}var Ci=Object.create,$i=function(){function t(){}return function(e){if(!oi(e))return{};if(Ci)return Ci(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var zi,Di,Hi=(zi=Object.getPrototypeOf,Di=Object,function(t){return zi(Di(t))}),Ui=Object.prototype;function Wi(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ui)}function Bi(t){return kn(t)&&"[object Arguments]"==ii(t)}var Gi=Object.prototype,Ji=Gi.hasOwnProperty,Ki=Gi.propertyIsEnumerable,Vi=Bi(function(){return arguments}())?Bi:function(t){return kn(t)&&Ji.call(t,"callee")&&!Ki.call(t,"callee")},Yi=Array.isArray;function Xi(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Qi(t){return null!=t&&Xi(t.length)&&!si(t)}var Zi="object"==typeof exports&&exports&&!exports.nodeType&&exports,to=Zi&&"object"==typeof module&&module&&!module.nodeType&&module,eo=to&&to.exports===Zi?Yn.Buffer:void 0,ro=(eo?eo.isBuffer:void 0)||function(){return!1},no=Function.prototype,io=Object.prototype,oo=no.toString,so=io.hasOwnProperty,uo=oo.call(Object);var co={};co["[object Float32Array]"]=co["[object Float64Array]"]=co["[object Int8Array]"]=co["[object Int16Array]"]=co["[object Int32Array]"]=co["[object Uint8Array]"]=co["[object Uint8ClampedArray]"]=co["[object Uint16Array]"]=co["[object Uint32Array]"]=!0,co["[object Arguments]"]=co["[object Array]"]=co["[object ArrayBuffer]"]=co["[object Boolean]"]=co["[object DataView]"]=co["[object Date]"]=co["[object Error]"]=co["[object Function]"]=co["[object Map]"]=co["[object Number]"]=co["[object Object]"]=co["[object RegExp]"]=co["[object Set]"]=co["[object String]"]=co["[object WeakMap]"]=!1;var ao="object"==typeof exports&&exports&&!exports.nodeType&&exports,fo=ao&&"object"==typeof module&&module&&!module.nodeType&&module,ho=fo&&fo.exports===ao&&Kn.process,lo=function(){try{var t=fo&&fo.require&&fo.require("util").types;return t||ho&&ho.binding&&ho.binding("util")}catch(t){}}(),po=lo&&lo.isTypedArray,vo=po?function(t){return function(e){return t(e)}}(po):function(t){return kn(t)&&Xi(t.length)&&!!co[ii(t)]};function go(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var yo=Object.prototype.hasOwnProperty;function mo(t,e,r){var n=t[e];yo.call(t,e)&&Wn(n,r)&&(void 0!==r||e in t)||Ai(t,e,r)}var _o=/^(?:0|[1-9]\d*)$/;function bo(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&_o.test(t))&&t>-1&&t%1==0&&t<e}var wo=Object.prototype.hasOwnProperty;function Oo(t,e){var r=Yi(t),n=!r&&Vi(t),i=!r&&!n&&ro(t),o=!r&&!n&&!i&&vo(t),s=r||n||i||o,u=s?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],c=u.length;for(var a in t)!e&&!wo.call(t,a)||s&&("length"==a||i&&("offset"==a||"parent"==a)||o&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||bo(a,c))||u.push(a);return u}var jo=Object.prototype.hasOwnProperty;function So(t){if(!oi(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=Wi(t),r=[];for(var n in t)("constructor"!=n||!e&&jo.call(t,n))&&r.push(n);return r}function Eo(t){return Qi(t)?Oo(t,!0):So(t)}function Po(t){return function(t,e,r,n){var i=!r;r||(r={});for(var o=-1,s=e.length;++o<s;){var u=e[o],c=n?n(r[u],t[u],u,r,t):void 0;void 0===c&&(c=t[u]),i?Ai(r,u,c):mo(r,u,c)}return r}(t,Eo(t))}function xo(t,e,r,n,i,o,s){var u=go(t,r),c=go(e,r),a=s.get(c);if(a)Ti(t,r,a);else{var f,h=o?o(u,c,r+"",t,e,s):void 0,l=void 0===h;if(l){var p=Yi(c),d=!p&&ro(c),v=!p&&!d&&vo(c);h=c,p||d||v?Yi(u)?h=u:kn(f=u)&&Qi(f)?h=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(u):d?(l=!1,h=function(t,e){if(e)return t.slice();var r=t.length,n=Fi?Fi(r):new t.constructor(r);return t.copy(n),n}(c,!0)):v?(l=!1,h=qi(c,!0)):h=[]:function(t){if(!kn(t)||"[object Object]"!=ii(t))return!1;var e=Hi(t);if(null===e)return!0;var r=so.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&oo.call(r)==uo}(c)||Vi(c)?(h=u,Vi(u)?h=Po(u):oi(u)&&!si(u)||(h=function(t){return"function"!=typeof t.constructor||Wi(t)?{}:$i(Hi(t))}(c))):l=!1}l&&(s.set(c,h),i(h,c,n,o,s),s.delete(c)),Ti(t,r,h)}}function Ao(t,e,r,n,i){t!==e&&ki(e,(function(o,s){if(i||(i=new Pi),oi(o))xo(t,e,s,r,Ao,n,i);else{var u=n?n(go(t,s),o,s+"",t,e,i):void 0;void 0===u&&(u=o),Ti(t,s,u)}}),Eo)}function To(t){return t}function Ro(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var ko=Math.max;var Io=xi?function(t,e){return xi(t,"toString",{configurable:!0,enumerable:!1,value:(r=e,function(){return r}),writable:!0});var r}:To,No=Date.now;var Lo=function(t){var e=0,r=0;return function(){var n=No(),i=16-(n-r);if(r=n,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Io);function Fo(t,e){return Lo(function(t,e,r){return e=ko(void 0===e?t.length-1:e,0),function(){for(var n=arguments,i=-1,o=ko(n.length-e,0),s=Array(o);++i<o;)s[i]=n[e+i];i=-1;for(var u=Array(e+1);++i<e;)u[i]=n[i];return u[e]=r(s),Ro(t,this,u)}}(t,e,To),t+"")}var Mo,qo=(Mo=function(t,e,r,n){Ao(t,e,r,n)},Fo((function(t,e){var r=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=Mo.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(t,e,r){if(!oi(r))return!1;var n=typeof e;return!!("number"==n?Qi(r)&&bo(e,r.length):"string"==n&&e in r)&&Wn(r[e],t)}(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var s=e[r];s&&Mo(t,s,r,i)}return t})));function Co(t,e,r){if(Un(t)||["context"].includes(r))return e}function $o(...t){return qo({},...t,Co)}function zo(t){e(`Invalid recording name provided. Expected string, received: "${typeof t}".`,"string"==typeof t),e("Invalid recording name provided. Received An empty or blank string.",t.trim().length>0)}function Do(t){e(`Invalid config provided. Expected object, received: "${typeof t}".`,kn(t)&&!Un(t)),["mode","adapters","adapterOptions","persister","persisterOptions"].forEach(r=>e(`Invalid configuration option provided. The "${r}" option cannot be overridden using the server configuration API.`,!(r in t)))}function Ho(t){e(`Invalid number provided. Expected number, received: "${typeof t}".`,"number"==typeof t),e(`Invalid number provided. The number must be greater than 0, received "${typeof t}".`,t>0)}const{freeze:Uo}=Object,{parse:Wo}=JSON;class Bo{constructor(){this.headers=new Fn}getHeader(t){return this.headers[t]}setHeader(t,e){return this.headers[t]=e,this}setHeaders(t={}){for(const e in t)this.setHeader(e,t[e]);return this}removeHeader(t){return this.setHeader(t,null),this}removeHeaders(t=[]){for(const e of t)this.removeHeader(e);return this}hasHeader(t){return!!this.getHeader(t)}type(t){return this.setHeader("Content-Type",t)}send(t){let e=t;switch(typeof e){case"string":this.hasHeader("Content-Type")||this.type("text/html");break;case"boolean":case"number":case"object":if(null!==e)return this.json(e);e=""}if("string"==typeof e){const t=this.getHeader("Content-Type");t&&!t.includes("charset")&&this.type(t+"; charset=utf-8")}return this.body=e,this}json(t){return this.hasHeader("Content-Type")||this.type("application/json"),this.send(p(t))}jsonBody(){return Wo(this.body)}end(){return Uo(this),Uo(this.headers),this}}var Go="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",Jo="["+Go+"]",Ko=RegExp("^"+Jo+Jo+"*"),Vo=RegExp(Jo+Jo+"*$"),Yo=function(t,e,r){var n={},i=O((function(){return!!Go[t]()||"​…"!="​…"[t]()})),o=n[t]=i?e(Xo):Go[t];r&&(n[r]=o),z(z.P+z.F*i,"String",n)},Xo=Yo.trim=function(t,e){return t=String(nt(t)),1&e&&(t=t.replace(Ko,"")),2&e&&(t=t.replace(Vo,"")),t},Qo=Yo,Zo=_.parseInt,ts=Qo.trim,es=/^[-+]?0[xX]/,rs=8!==Zo(Go+"08")||22!==Zo(Go+"0x16")?function(t,e){var r=ts(String(t),3);return Zo(r,e>>>0||(es.test(r)?16:10))}:Zo;z(z.G+z.F*(parseInt!=rs),{parseInt:rs});var ns=S.parseInt;class is extends Bo{constructor(t,e,r,n){super(),this.status(t||200),this.setHeaders(e),this.body=r,this.encoding=n}get ok(){return this.statusCode&&this.statusCode>=200&&this.statusCode<300}get statusText(){return s[this.statusCode]||s[200]}status(t){const r=ns(t,10);return e("[Response] Invalid status code: "+r,r>=100&&r<600),this.statusCode=r,this}sendStatus(t){return this.status(t),this.type("text/plain"),this.send(this.statusText)}}var os=function(t,e){var r=(S.Object||{})[t]||Object[t],n={};n[t]=e(r),z(z.S+z.F*O((function(){r(1)})),"Object",n)};os("keys",(function(){return function(t){return mt(Ot(t))}}));var ss=S.Object.keys,us=S.Object.getOwnPropertySymbols,cs=qt.f;os("getOwnPropertyDescriptor",(function(){return function(t,e){return cs(it(t),e)}}));var as=S.Object,fs=function(t,e){return as.getOwnPropertyDescriptor(t,e)},hs=_.Reflect,ls=hs&&hs.ownKeys||function(t){var e=kt.f(A(t)),r=_t.f;return r?e.concat(r(t)):e},ps=function(t,e,r){e in t?F.f(t,e,M(0,r)):t[e]=r};z(z.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,r,n=it(t),i=qt.f,o=ls(n),s={},u=0;o.length>u;)void 0!==(r=i(n,e=o[u++]))&&ps(s,e,r);return s}});var ds=S.Object.getOwnPropertyDescriptors;z(z.S+z.F*!j,"Object",{defineProperties:jt});var vs=S.Object,gs=function(t,e){return vs.defineProperties(t,e)};z(z.S+z.F*!j,"Object",{defineProperty:F.f});var ys,ms=S.Object,_s=function(t,e,r){return ms.defineProperty(t,e,r)},bs=m((function(t){t.exports=function(t,e,r){return e in t?_s(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.default=t.exports,t.exports.__esModule=!0})),ws=(ys=bs)&&ys.__esModule&&Object.prototype.hasOwnProperty.call(ys,"default")?ys.default:ys;sr("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return mr.def(Ve(this,"Set"),t=0===t?0:t,t)}},mr);z(z.P+z.R,"Set",{toJSON:_r("Set")}),ur("Set"),cr("Set");var Os=S.Set;function js(t,e,r){let n=0;return function(...i){return++n>=e&&r(),t(...i)}}z(z.S+z.F,"Object",{assign:qe});var Ss=S.Object.assign;const Es=ve();class Ps{constructor(t,r){e(`Invalid type provided. Expected a non-empty string, received: "${typeof t}".`,t&&"string"==typeof t),_s(this,"type",{value:t}),Ss(this,r||{}),this[Es]=!1}stopPropagation(){this[Es]=!0}get shouldStopPropagating(){return this[Es]}}function xs(t,e){var r=ss(t);if(us){var n=us(t);e&&(n=n.filter((function(e){return fs(t,e).enumerable}))),r.push.apply(r,n)}return r}function As(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xs(Object(r),!0).forEach((function(e){ws(t,e,r[e])})):ds?gs(t,ds(r)):xs(Object(r)).forEach((function(e){_s(t,e,fs(r,e))}))}return t}const Ts=ve(),Rs=ve();function ks(t,r){e(`Invalid event name provided. Expected string, received: "${typeof t}".`,"string"==typeof t),e(`Invalid event name provided: "${t}". Possible events: ${[...r].join(", ")}.`,r.has(t))}class Is{constructor(t={}){const{eventNames:r}=t;e("An array of supported events must be provided via the `eventNames` option.",Un(r)&&r.length>0),this[Ts]=new wr,this[Rs]=new Os(r)}eventNames(){const t=[];return this[Ts].forEach((e,r)=>this.hasListeners(r)&&t.push(r)),t}on(t,r,n={}){ks(t,this[Rs]),function(t){e(`Invalid listener provided. Expected function, received: "${typeof t}".`,"function"==typeof t)}(r);const i=this[Ts],{times:o}=n;if(i.has(t)||i.set(t,new Os),o){Ho(o);const e=js(r,o,()=>this.off(t,e));this.off(t,r),e.listener=r,r=e}return i.get(t).add(r),this}once(t,e,r={}){return this.on(t,e,As(As({},r),{},{times:1})),this}off(t,e){ks(t,this[Rs]);const r=this[Ts];return this.hasListeners(t)&&("function"==typeof e?(r.get(t).delete(e),this.listeners(t).forEach(n=>{n.listener===e&&r.get(t).delete(n)})):r.get(t).clear(t)),this}listeners(t){return ks(t,this[Rs]),this.hasListeners(t)?[...this[Ts].get(t)]:[]}hasListeners(t){ks(t,this[Rs]);const e=this[Ts];return e.has(t)&&e.get(t).size>0}async emit(t,...e){ks(t,this[Rs]);const r=new Ps(t);for(const n of this.listeners(t))if(await n(...e,r),r.shouldStopPropagating)return!1;return!0}async emitParallel(t,...e){ks(t,this[Rs]);const r=new Ps(t);return await Sn.all(this.listeners(t).map(t=>t(...e,r))),!r.shouldStopPropagating}emitSync(t,...r){ks(t,this[Rs]);const n=new Ps(t);for(const i of this.listeners(t)){const o=i(...r,n);if(e(`Attempted to emit a synchronous event "${t}" but an asynchronous listener was called.`,!(kn(o)&&"function"==typeof o.then)),n.shouldStopPropagating)return!1}return!0}}const Ns=ve(),Ls=ve();function Fs(t){t[Ns]=!1,t[Ls]=!1}class Ms extends Ps{constructor(){super("intercept"),Fs(this)}abort(){Fs(this),this[Ns]=!0}passthrough(){Fs(this),this[Ls]=!0}get shouldAbort(){return this[Ns]}get shouldPassthrough(){return this[Ls]}get shouldIntercept(){return!this.shouldAbort&&!this.shouldPassthrough}}const{keys:qs,freeze:Cs}=Object,$s=ve(),zs=ve(),Ds=ve(),Hs=ve(),Us=["identify"];class Ws extends Bo{constructor(t,r){super(),e("Url is required.",r.url),e("Method is required.",r.method&&"string"==typeof r.method),this.didRespond=!1,this.aborted=!1,this.url=r.url,this.method=r.method.toUpperCase(),this.body=r.body,this.setHeaders(r.headers),this.recordingName=t.recordingName,this.recordingId=t.recordingId,this.requestArguments=Cs(r.requestArguments),this.promise=function(){let t,e;const r=new Sn((r,n)=>{t=r,e=n});return r.catch(()=>{}),r.resolve=t,r.reject=e,r}(),this[zs]=t,this[Hs]=new Is({eventNames:Us}),this.action=null,this._interceptor=new Ms,this[$s]=t.server.lookup(this.method,this.url),this[$s].applyFiltersWithArgs(this),this.configure(this[$s].config());const n=this[$s].recordingName();n&&this.overrideRecordingName(n)}get url(){return this[Ds].toString()}set url(t){this[Ds]=In(""+t,!0)}get absoluteUrl(){const{url:t}=this;return d(t)?t:new o(t).href}get protocol(){return this[Ds].protocol}get hostname(){return this[Ds].hostname}get port(){return this[Ds].port}get origin(){return this[Ds].origin}get pathname(){return this[Ds].pathname}get query(){return this[Ds].query}set query(t){this[Ds].set("query",t)}get hash(){return this[Ds].hash}set hash(t){this[Ds].set("hash",t)}get shouldPassthrough(){return this[$s].shouldPassthrough()}get shouldIntercept(){return this[$s].shouldIntercept()}get log(){if(this.id){const t=h.getLogger(`@pollyjs/core:${this.recordingName}:${this.id}`);return t.setLevel(this.config.logLevel),t}return this[zs].logger.log}on(t,e){return this[Hs].on(t,e),this}once(t,e){return this[Hs].once(t,e),this}off(t,e){return this[Hs].off(t,e),this}async init(){await this._emit("request"),this.response=new is,this.didRespond=!1,await this._identify(),this.timestamp=u()}async respond(t){const{statusCode:r,headers:n,body:i,encoding:o}=t||{};e("Cannot respond to a request that already has a response.",!this.didRespond),this.aborted||(this.response.timestamp=u(),this.response.status(r),this.response.setHeaders(n),this.response.body=i,this.response.encoding=o,await this._emit("beforeResponse",this.response),this.response.end(),this.responseTime=new Date(this.response.timestamp).getTime()-new Date(this.timestamp).getTime(),this.didRespond=!0,this.end(),await this._emit("response",this.response))}abort(){this.aborted=!0}overrideRecordingName(t){zo(t),this.recordingName=t,this.recordingId=Hn(t)}configure(t){Do(t),this.config=$o(this[zs].config,this.config||{},t)}_intercept(){return this[$s].intercept(this,this.response,...arguments)}_emit(t,...e){return this[$s].emit(t,this,...e)}async _identify(){const t=this[zs],{_requests:e}=t,{matchRequestsBy:r}=this.config;this.identifiers={},qs(zn).forEach(t=>{this[t]&&r[t]&&(this.identifiers[t]=zn[t](this[t],r[t],this))}),await this[Hs].emit("identify",this),Cs(this.identifiers),this.id=l(p(this.identifiers)),this.order=!r.order||this.shouldPassthrough||this.shouldIntercept?0:e.slice(0,e.indexOf(this)).filter(t=>t.id===this.id&&t.recordingId===this.recordingId).length,this.log.debug("Request Identified:",{id:this.id,order:this.order,identifiers:this.identifiers,request:this})}}function Bs(){if(!arguments.length)return[];var t=arguments[0];return Yi(t)?t:[t]}z(z.S,"Reflect",{get:function t(e,r){var n,i,o=arguments.length<3?e:arguments[2];return A(e)===o?e[r]:(n=qt.f(e,r))?w(n,"value")?n.value:void 0!==n.get?n.get.call(o):void 0:x(i=Oe(e))?t(i,r,o):void 0}});var Gs=S.Reflect.get;function Js(t,e){var r=ss(t);if(us){var n=us(t);e&&(n=n.filter((function(e){return fs(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ks(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Js(Object(r),!0).forEach((function(e){ws(t,e,r[e])})):ds?gs(t,ds(r)):Js(Object(r)).forEach((function(e){_s(t,e,fs(r,e))}))}return t}const Vs=ve();function Ys(t,{params:e}){return new Proxy(t,{set:(t,e,r)=>(t[e]=r,!0),get:(t,r)=>"params"===r?Ks({},e):Gs(t,r)})}class Xs{constructor(t,e){const r=t&&t[0];this.params={},this.queryParams={},this.handlers=[],this.middleware=e||[],r&&(this.handlers=r.handler,this.params=Ks({},r.params),this.queryParams=t.queryParams),this[Vs]=this._orderedHandlers()}shouldPassthrough(){return Boolean(this._valueFor("passthrough"))}shouldIntercept(){return Boolean(this._valueFor("intercept"))}recordingName(){return this._valueFor("recordingName")||null}config(){return $o(...this[Vs].map(({handler:t})=>t.get("config")))}applyFiltersWithArgs(t,...e){this[Vs]=this[Vs].filter(({route:r,handler:n})=>[...n.get("filters")].every(n=>n(Ys(t,r),...e)))}async intercept(t,e,r){for(const{route:n,handler:i}of this[Vs]){if(!r.shouldIntercept||r.shouldStopPropagating)return;i.has("intercept")&&await i.get("intercept")(Ys(t,n),e,r)}}async emit(t,e,...r){for(const{route:n,handler:i}of this[Vs]){if(!await i._eventEmitter.emit(t,Ys(e,n),...r))return}}_orderedHandlers(){return[...this.middleware,this].reduce((t,e)=>(t.push(...e.handlers.map(t=>({route:e,handler:t}))),t),[])}_valueFor(t){let e;for(const{handler:r}of this[Vs])r.has(t)&&(e=r.get(t));return e}}function Qs(t,e){var r=ss(t);if(us){var n=us(t);e&&(n=n.filter((function(e){return fs(t,e).enumerable}))),r.push.apply(r,n)}return r}function Zs(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Qs(Object(r),!0).forEach((function(e){ws(t,e,r[e])})):ds?gs(t,ds(r)):Qs(Object(r)).forEach((function(e){_s(t,e,fs(r,e))}))}return t}class tu extends wr{constructor(){super(),this.set("config",{}),this.set("defaultOptions",{}),this.set("filters",new Os),this._eventEmitter=new Is({eventNames:["error","abort","request","beforeReplay","beforePersist","beforeResponse","response"]})}on(t,e,r={}){return this._eventEmitter.on(t,e,Zs(Zs({},this.get("defaultOptions")),r)),this}once(t,e){return this._eventEmitter.once(t,e),this}off(t,e){return this._eventEmitter.off(t,e),this}passthrough(t=!0){return this.set("passthrough",Boolean(t)),this.get("passthrough")&&this.delete("intercept"),this}intercept(t,r={}){return e(`Invalid intercept handler provided. Expected function, received: "${typeof t}".`,"function"==typeof t),"times"in(r=Zs(Zs({},this.get("defaultOptions")),r))&&(Ho(r.times),t=js(t,r.times,()=>this.delete("intercept"))),this.set("intercept",t),this.passthrough(!1),this}recordingName(t){return t&&zo(t),this.set("recordingName",t),this}configure(t){return Do(t),this.set("config",t),this}filter(t){return e(`Invalid filter callback provided. Expected function, received: "${typeof t}".`,"function"==typeof t),this.get("filters").add(t),this}times(t){return t||"number"==typeof t?(Ho(t),this.get("defaultOptions").times=t):delete this.get("defaultOptions").times,this}}class eu{constructor({host:t,paths:e,global:r,handler:n}){this.global=Boolean(r),this.handler=n,this.host=t,this.paths=this.global?["__GLOBAL__"]:e,this._routeRecognizer=new y,this.paths.forEach(t=>this._routeRecognizer.add([{path:t,handler:[n]}]))}match(t,e){if(this.global)return new Xs(this._routeRecognizer.recognize("__GLOBAL__"));if(this.host===t){const t=this._routeRecognizer.recognize(e);return t&&new Xs(t)}}}const ru=ve(),nu=ve(),iu=ve(),ou=ve(),su=ve(),uu="/",cu="*",au=":",{keys:fu}=Object;function hu(t){const e=new o(t);return{host:e.host?e.origin:uu,path:e.pathname||uu}}class lu{constructor(){this[ru]="",this[iu]={},this[nu]=[],this[ou]=[]}host(t,r){const n=this[ru];e("[Server] A host cannot be specified within another host.",!n),this[ru]=t,r(this),this[ru]=n}namespace(t,e){const r=this[nu];this[nu]=[...r,t],e(this),this[nu]=r}timeout(){return r(...arguments)}get(){return this._register("GET",...arguments)}put(){return this._register("PUT",...arguments)}post(){return this._register("POST",...arguments)}delete(){return this._register("DELETE",...arguments)}patch(){return this._register("PATCH",...arguments)}merge(){return this._register("MERGE",...arguments)}head(){return this._register("HEAD",...arguments)}options(){return this._register("OPTIONS",...arguments)}any(){return this._registerMiddleware(...arguments)}lookup(t,e){return new Xs(this._recognize(t,e),this._lookupMiddleware(e))}_lookupMiddleware(t){const{host:e,path:r}=hu(t);return this[ou].map(t=>t.match(e,r)).filter(Boolean)}_register(t,e){const r=new tu;return Bs(e).forEach(e=>{const{host:n,path:i}=hu(this._buildUrl(e)),o=this._registryForHost(n),s=this._nameForPath(i),u=o[t.toUpperCase()];u[su].has(s)?u[su].get(s).push(r):(u[su].set(s,[r]),u.add([{path:i,handler:u[su].get(s)}]))}),r}_registerMiddleware(t){const e=new tu,r={};return Bs(t).forEach(t=>{if(t&&t!==cu||this[ru]||0!==this[nu].length){const{host:e,path:n}=hu(this._buildUrl(t));r[e]=r[e]||[],r[e].push(n)}else this[ou].push(new eu({global:!0,handler:e}))}),fu(r).forEach(t=>{this[ou].push(new eu({host:t,paths:r[t],handler:e}))}),e}_recognize(t,e){const{host:r,path:n}=hu(e);return this._registryForHost(r)[t.toUpperCase()].recognize(n)}_buildUrl(t){return c(this[ru],...this[nu],t)}_nameForPath(t=""){return t.split(uu).map(t=>{switch(t.charAt(0)){case au:return au;case cu:return cu;default:return t}}).join(uu).replace(/\/$/,"")||uu}_registryForHost(t){return this[iu][t]||(this[iu][t]=a.reduce((t,e)=>(t[e]=new y,t[e][su]=new wr,t),{})),this[iu][t]}}const pu=ve(),du=ve(),vu=ve(),gu=new fr,yu=new Is({eventNames:["register","create","stop"]});class mu{constructor(t,e){this.recordingName=t,this.server=new lu,this.config={},this.container=new An,yu.emitSync("register",this.container),this.adapters=new wr,this.persister=null,this._requests=[],yu.emitSync("create",this),this.configure(e)}static get VERSION(){return"6.0.1"}get recordingName(){return this[pu]}set recordingName(t){zo(t),this[pu]=t,this[du]=Hn(t)}get recordingId(){return this[du]}get mode(){return this.config.mode}set mode(t){const r=xr(n);e(`Invalid mode provided: "${t}". Possible modes: ${r.join(", ")}.`,r.includes(t)),this.config.mode=t}static on(t,e){return yu.on(t,e),this}static once(t,e){return yu.once(t,e),this}static off(t,e){return yu.off(t,e),this}static register(t){return gu.has(t)||gu.set(t,e=>e.register(t)),this.on("register",gu.get(t)),this}static unregister(t){return gu.has(t)&&this.off("register",gu.get(t)),this}configure(t={}){const{container:r}=this;e("Cannot call `configure` once requests have been handled.",0===this._requests.length),e("Cannot call `configure` on an instance of Polly that is not running.",this.mode!==n.STOPPED),this.disconnect(),this.logger&&this.logger.disconnect(),this.config=$o(Rn,this.config,t),this.logger=new Pn(this),this.logger.connect(),this.config.adapters.forEach(t=>this.connectTo(t));let{persister:i}=this.config;i&&("function"==typeof i&&(r.register(i),i=i.id),e(`Persister matching the name \`${i}\` was not registered.`,r.has("persister:"+i)),this.persister=new(r.lookup("persister:"+i))(this)),this.logger.log.debug("Polly instance configured.",{config:this.config})}record(){this.mode=n.RECORD}replay(){this.mode=n.REPLAY}passthrough(){this.mode=n.PASSTHROUGH}pause(){this[vu]=[...this.adapters.keys()],this.disconnect()}play(){this[vu]&&(this[vu].forEach(t=>this.connectTo(t)),delete this[vu])}async stop(){this.mode!==n.STOPPED&&(this.config.flushRequestsOnStop&&await this.flush(),this.disconnect(),await(this.persister&&this.persister.persist()),this.mode=n.STOPPED,await yu.emit("stop",this),this.logger.log.debug("Polly instance stopped.",{recordingName:this.recordingName}),this.logger.disconnect())}async flush(){const t=()=>{};await Sn.all(this._requests.map(e=>Sn.resolve(e.promise).then(t,t)))}connectTo(t){const{container:r,adapters:n}=this;let i=t;"function"==typeof t&&(r.register(t),i=t.id),e(`Adapter matching the name \`${i}\` was not registered.`,r.has("adapter:"+i)),this.disconnectFrom(i);const o=new(r.lookup("adapter:"+i))(this);o.connect(),n.set(i,o)}disconnectFrom(t){const{adapters:e}=this;let r=t;"function"==typeof t&&(r=t.id),e.has(r)&&(e.get(r).disconnect(),e.delete(r))}disconnect(){for(const t of this.adapters.keys())this.disconnectFrom(t)}registerRequest(t={}){const e=new Ws(this,t);return this._requests.push(e),e}}const{defineProperty:_u}=Object;function bu(t,e,r){_u(t,"polly",{writable:!0,enumerable:!0,configurable:!0,value:new mu(e,r)})}async function wu(t,e){await t.polly.stop(),_u(t,"polly",{enumerable:!0,configurable:!0,get(){throw new f(`You are trying to access an instance of Polly that is no longer available.\nSee: https://netflix.github.io/pollyjs/#/test-frameworks/${e}?id=test-hook-ordering`)}})}function Ou(t){return t.test.testReport.fullName.join("/")}function ju(t,e={}){ju.beforeEach(t,e),ju.afterEach(t)}function Su(t={},e=global){Su.beforeEach(t,e),Su.afterEach(e)}ju.beforeEach=function(t,e={}){t.beforeEach((function(){return bu(this,Ou(...arguments),e)}))},ju.afterEach=function(t){t.afterEach((function(){return wu(this,"qunit")}))},Su.beforeEach=function(t,e=global){e.beforeEach((function(){return bu(this,function(t){const{currentTest:e}=t,r=[e.title];let n=e.parent;for(;n&&n.title;)r.push(n.title),n=n.parent;return r.reverse().join("/")}(this),t)}))},Su.afterEach=function(t=global){t.afterEach((function(){return wu(this,"mocha")}))};export{mu as Polly,Tn as Timing,Su as setupMocha,ju as setupQunit};
//# sourceMappingURL=pollyjs-core.min.js.map
{
"name": "@pollyjs/core",
"version": "6.0.0",
"version": "6.0.1",
"description": "Record, replay, and stub HTTP Interactions",

@@ -11,3 +11,4 @@ "main": "dist/cjs/pollyjs-core.js",

"src",
"dist"
"dist",
"types.d.ts"
],

@@ -47,3 +48,3 @@ "repository": "https://github.com/netflix/pollyjs/tree/master/packages/@pollyjs/core",

"dependencies": {
"@pollyjs/utils": "^6.0.0",
"@pollyjs/utils": "^6.0.1",
"@sindresorhus/fnv1a": "^2.0.1",

@@ -59,7 +60,7 @@ "blueimp-md5": "^2.19.0",

"devDependencies": {
"@pollyjs/adapter": "^6.0.0",
"@pollyjs/persister": "^6.0.0",
"@pollyjs/adapter": "^6.0.1",
"@pollyjs/persister": "^6.0.1",
"rollup": "^1.14.6"
},
"gitHead": "4c3f6e0970bf6170674749b9a45b928074f136c2"
"gitHead": "7536915c5ae7252ba89714d1b2685a0274f3cf84"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc