Socket
Socket
Sign inDemoInstall

@pollyjs/persister

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pollyjs/persister - npm Package Compare versions

Comparing version 5.1.1 to 6.0.0

2

dist/cjs/pollyjs-persister.min.js

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

"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var stringify=_interopDefault(require("fast-json-stable-stringify")),utils=require("@pollyjs/utils"),Bowser=_interopDefault(require("bowser")),getByteLength=_interopDefault(require("utf8-byte-length")),setCookies=_interopDefault(require("set-cookie-parser")),es6_object_toString=Object.freeze({}),ceil=Math.ceil,floor=Math.floor,_toInteger=function(e){return isNaN(e=+e)?0:(e>0?floor:ceil)(e)},_defined=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},_stringAt=function(e){return function(t,r){var o,n,i=String(_defined(t)),s=_toInteger(r),a=i.length;return s<0||s>=a?e?"":void 0:(o=i.charCodeAt(s))<55296||o>56319||s+1===a||(n=i.charCodeAt(s+1))<56320||n>57343?e?i.charAt(s):o:e?i.slice(s,s+2):n-56320+(o-55296<<10)+65536}},_library=!0;function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}function getCjsExportFromNamespace(e){return e&&e.default||e}var _global=createCommonjsModule(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),_core=createCommonjsModule(function(e){var t=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=t)}),_core_1=_core.version,_aFunction=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},_ctx=function(e,t,r){if(_aFunction(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,o){return e.call(t,r,o)};case 3:return function(r,o,n){return e.call(t,r,o,n)}}return function(){return e.apply(t,arguments)}},_isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},_anObject=function(e){if(!_isObject(e))throw TypeError(e+" is not an object!");return e},_fails=function(e){try{return!!e()}catch(e){return!0}},_descriptors=!_fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),document$1=_global.document,is=_isObject(document$1)&&_isObject(document$1.createElement),_domCreate=function(e){return is?document$1.createElement(e):{}},_ie8DomDefine=!_descriptors&&!_fails(function(){return 7!=Object.defineProperty(_domCreate("div"),"a",{get:function(){return 7}}).a}),_toPrimitive=function(e,t){if(!_isObject(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!_isObject(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!_isObject(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!_isObject(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")},dP=Object.defineProperty,f=_descriptors?Object.defineProperty:function(e,t,r){if(_anObject(e),t=_toPrimitive(t,!0),_anObject(r),_ie8DomDefine)try{return dP(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e},_objectDp={f:f},_propertyDesc=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_hide=_descriptors?function(e,t,r){return _objectDp.f(e,t,_propertyDesc(1,r))}:function(e,t,r){return e[t]=r,e},hasOwnProperty={}.hasOwnProperty,_has=function(e,t){return hasOwnProperty.call(e,t)},PROTOTYPE="prototype",$export=function(e,t,r){var o,n,i,s=e&$export.F,a=e&$export.G,c=e&$export.S,u=e&$export.P,l=e&$export.B,_=e&$export.W,f=a?_core:_core[t]||(_core[t]={}),p=f[PROTOTYPE],h=a?_global:c?_global[t]:(_global[t]||{})[PROTOTYPE];for(o in a&&(r=t),r)(n=!s&&h&&void 0!==h[o])&&_has(f,o)||(i=n?h[o]:r[o],f[o]=a&&"function"!=typeof h[o]?r[o]:l&&n?_ctx(i,_global):_&&h[o]==i?function(e){var t=function(t,r,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,o)}return e.apply(this,arguments)};return t[PROTOTYPE]=e[PROTOTYPE],t}(i):u&&"function"==typeof i?_ctx(Function.call,i):i,u&&((f.virtual||(f.virtual={}))[o]=i,e&$export.R&&p&&!p[o]&&_hide(p,o,i)))};$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128;var _export=$export,_redefine=_hide,_iterators={},toString={}.toString,_cof=function(e){return toString.call(e).slice(8,-1)},_iobject=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==_cof(e)?e.split(""):Object(e)},_toIobject=function(e){return _iobject(_defined(e))},min=Math.min,_toLength=function(e){return e>0?min(_toInteger(e),9007199254740991):0},max=Math.max,min$1=Math.min,_toAbsoluteIndex=function(e,t){return(e=_toInteger(e))<0?max(e+t,0):min$1(e,t)},_arrayIncludes=function(e){return function(t,r,o){var n,i=_toIobject(t),s=_toLength(i.length),a=_toAbsoluteIndex(o,s);if(e&&r!=r){for(;s>a;)if((n=i[a++])!=n)return!0}else for(;s>a;a++)if((e||a in i)&&i[a]===r)return e||a||0;return!e&&-1}},_shared=createCommonjsModule(function(e){var t=_global["__core-js_shared__"]||(_global["__core-js_shared__"]={});(e.exports=function(e,r){return t[e]||(t[e]=void 0!==r?r:{})})("versions",[]).push({version:_core.version,mode:"pure",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),id=0,px=Math.random(),_uid=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++id+px).toString(36))},shared=_shared("keys"),_sharedKey=function(e){return shared[e]||(shared[e]=_uid(e))},arrayIndexOf=_arrayIncludes(!1),IE_PROTO=_sharedKey("IE_PROTO"),_objectKeysInternal=function(e,t){var r,o=_toIobject(e),n=0,i=[];for(r in o)r!=IE_PROTO&&_has(o,r)&&i.push(r);for(;t.length>n;)_has(o,r=t[n++])&&(~arrayIndexOf(i,r)||i.push(r));return i},_enumBugKeys="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),_objectKeys=Object.keys||function(e){return _objectKeysInternal(e,_enumBugKeys)},_objectDps=_descriptors?Object.defineProperties:function(e,t){_anObject(e);for(var r,o=_objectKeys(t),n=o.length,i=0;n>i;)_objectDp.f(e,r=o[i++],t[r]);return e},document$2=_global.document,_html=document$2&&document$2.documentElement,IE_PROTO$1=_sharedKey("IE_PROTO"),Empty=function(){},PROTOTYPE$1="prototype",createDict=function(){var e,t=_domCreate("iframe"),r=_enumBugKeys.length;for(t.style.display="none",_html.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),createDict=e.F;r--;)delete createDict[PROTOTYPE$1][_enumBugKeys[r]];return createDict()},_objectCreate=Object.create||function(e,t){var r;return null!==e?(Empty[PROTOTYPE$1]=_anObject(e),r=new Empty,Empty[PROTOTYPE$1]=null,r[IE_PROTO$1]=e):r=createDict(),void 0===t?r:_objectDps(r,t)},_wks=createCommonjsModule(function(e){var t=_shared("wks"),r=_global.Symbol,o="function"==typeof r;(e.exports=function(e){return t[e]||(t[e]=o&&r[e]||(o?r:_uid)("Symbol."+e))}).store=t}),def=_objectDp.f,TAG=_wks("toStringTag"),_setToStringTag=function(e,t,r){e&&!_has(e=r?e:e.prototype,TAG)&&def(e,TAG,{configurable:!0,value:t})},IteratorPrototype={};_hide(IteratorPrototype,_wks("iterator"),function(){return this});var _iterCreate=function(e,t,r){e.prototype=_objectCreate(IteratorPrototype,{next:_propertyDesc(1,r)}),_setToStringTag(e,t+" Iterator")},_toObject=function(e){return Object(_defined(e))},IE_PROTO$2=_sharedKey("IE_PROTO"),ObjectProto=Object.prototype,_objectGpo=Object.getPrototypeOf||function(e){return e=_toObject(e),_has(e,IE_PROTO$2)?e[IE_PROTO$2]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ObjectProto:null},ITERATOR=_wks("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",returnThis=function(){return this},_iterDefine=function(e,t,r,o,n,i,s){_iterCreate(r,t,o);var a,c,u,l=function(e){if(!BUGGY&&e in h)return h[e];switch(e){case KEYS:case VALUES:return function(){return new r(this,e)}}return function(){return new r(this,e)}},_=t+" Iterator",f=n==VALUES,p=!1,h=e.prototype,d=h[ITERATOR]||h[FF_ITERATOR]||n&&h[n],y=d||l(n),b=n?f?l("entries"):y:void 0,g="Array"==t&&h.entries||d;if(g&&(u=_objectGpo(g.call(new e)))!==Object.prototype&&u.next&&_setToStringTag(u,_,!0),f&&d&&d.name!==VALUES&&(p=!0,y=function(){return d.call(this)}),s&&(BUGGY||p||!h[ITERATOR])&&_hide(h,ITERATOR,y),_iterators[t]=y,_iterators[_]=returnThis,n)if(a={values:f?y:l(VALUES),keys:i?y:l(KEYS),entries:b},s)for(c in a)c in h||_redefine(h,c,a[c]);else _export(_export.P+_export.F*(BUGGY||p),t,a);return a},$at=_stringAt(!0);_iterDefine(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=$at(t,r),this._i+=e.length,{value:e,done:!1})});var _iterStep=function(e,t){return{value:t,done:!!e}},es6_array_iterator=_iterDefine(Array,"Array",function(e,t){this._t=_toIobject(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,_iterStep(1)):_iterStep(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])},"values");_iterators.Arguments=_iterators.Array;for(var TO_STRING_TAG=_wks("toStringTag"),DOMIterables="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(","),i=0;i<DOMIterables.length;i++){var NAME=DOMIterables[i],Collection=_global[NAME],proto=Collection&&Collection.prototype;proto&&!proto[TO_STRING_TAG]&&_hide(proto,TO_STRING_TAG,NAME),_iterators[NAME]=_iterators.Array}var defer,channel,port,TAG$1=_wks("toStringTag"),ARG="Arguments"==_cof(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},_classof=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=Object(e),TAG$1))?r:ARG?_cof(t):"Object"==(o=_cof(t))&&"function"==typeof t.callee?"Arguments":o},_anInstance=function(e,t,r,o){if(!(e instanceof t)||void 0!==o&&o in e)throw TypeError(r+": incorrect invocation!");return e},_iterCall=function(e,t,r,o){try{return o?t(_anObject(r)[0],r[1]):t(r)}catch(t){var n=e.return;throw void 0!==n&&_anObject(n.call(e)),t}},ITERATOR$1=_wks("iterator"),ArrayProto=Array.prototype,_isArrayIter=function(e){return void 0!==e&&(_iterators.Array===e||ArrayProto[ITERATOR$1]===e)},ITERATOR$2=_wks("iterator"),core_getIteratorMethod=_core.getIteratorMethod=function(e){if(null!=e)return e[ITERATOR$2]||e["@@iterator"]||_iterators[_classof(e)]},_forOf=createCommonjsModule(function(e){var t={},r={},o=e.exports=function(e,o,n,i,s){var a,c,u,l,_=s?function(){return e}:core_getIteratorMethod(e),f=_ctx(n,i,o?2:1),p=0;if("function"!=typeof _)throw TypeError(e+" is not iterable!");if(_isArrayIter(_)){for(a=_toLength(e.length);a>p;p++)if((l=o?f(_anObject(c=e[p])[0],c[1]):f(e[p]))===t||l===r)return l}else for(u=_.call(e);!(c=u.next()).done;)if((l=_iterCall(u,f,c.value,o))===t||l===r)return l};o.BREAK=t,o.RETURN=r}),SPECIES=_wks("species"),_speciesConstructor=function(e,t){var r,o=_anObject(e).constructor;return void 0===o||null==(r=_anObject(o)[SPECIES])?t:_aFunction(r)},_invoke=function(e,t,r){var o=void 0===r;switch(t.length){case 0:return o?e():e.call(r);case 1:return o?e(t[0]):e.call(r,t[0]);case 2:return o?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return o?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return o?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)},process=_global.process,setTask=_global.setImmediate,clearTask=_global.clearImmediate,MessageChannel=_global.MessageChannel,Dispatch=_global.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",run=function(){var e=+this;if(queue.hasOwnProperty(e)){var t=queue[e];delete queue[e],t()}},listener=function(e){run.call(e.data)};setTask&&clearTask||(setTask=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return queue[++counter]=function(){_invoke("function"==typeof e?e:Function(e),t)},defer(counter),counter},clearTask=function(e){delete queue[e]},"process"==_cof(process)?defer=function(e){process.nextTick(_ctx(run,e,1))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(_ctx(run,e,1))}:MessageChannel?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=listener,defer=_ctx(port.postMessage,port,1)):_global.addEventListener&&"function"==typeof postMessage&&!_global.importScripts?(defer=function(e){_global.postMessage(e+"","*")},_global.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in _domCreate("script")?function(e){_html.appendChild(_domCreate("script"))[ONREADYSTATECHANGE]=function(){_html.removeChild(this),run.call(e)}}:function(e){setTimeout(_ctx(run,e,1),0)});var _task={set:setTask,clear:clearTask},macrotask=_task.set,Observer=_global.MutationObserver||_global.WebKitMutationObserver,process$1=_global.process,Promise=_global.Promise,isNode="process"==_cof(process$1),_microtask=function(){var e,t,r,o=function(){var o,n;for(isNode&&(o=process$1.domain)&&o.exit();e;){n=e.fn,e=e.next;try{n()}catch(o){throw e?r():t=void 0,o}}t=void 0,o&&o.enter()};if(isNode)r=function(){process$1.nextTick(o)};else if(!Observer||_global.navigator&&_global.navigator.standalone)if(Promise&&Promise.resolve){var n=Promise.resolve(void 0);r=function(){n.then(o)}}else r=function(){macrotask.call(_global,o)};else{var i=!0,s=document.createTextNode("");new Observer(o).observe(s,{characterData:!0}),r=function(){s.data=i=!i}}return function(o){var n={fn:o,next:void 0};t&&(t.next=n),e||(e=n,r()),t=n}};function PromiseCapability(e){var t,r;this.promise=new e(function(e,o){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=o}),this.resolve=_aFunction(t),this.reject=_aFunction(r)}var f$1=function(e){return new PromiseCapability(e)},_newPromiseCapability={f:f$1},_perform=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}},navigator=_global.navigator,_userAgent=navigator&&navigator.userAgent||"",_promiseResolve=function(e,t){if(_anObject(e),_isObject(t)&&t.constructor===e)return t;var r=_newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},_redefineAll=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:_hide(e,o,t[o]);return e},SPECIES$1=_wks("species"),_setSpecies=function(e){var t="function"==typeof _core[e]?_core[e]:_global[e];_descriptors&&t&&!t[SPECIES$1]&&_objectDp.f(t,SPECIES$1,{configurable:!0,get:function(){return this}})},ITERATOR$3=_wks("iterator"),SAFE_CLOSING=!1;try{var riter=[7][ITERATOR$3]();riter.return=function(){SAFE_CLOSING=!0},Array.from(riter,function(){throw 2})}catch(e){}var Internal,newGenericPromiseCapability,OwnPromiseCapability,Wrapper,_iterDetect=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var r=!1;try{var o=[7],n=o[ITERATOR$3]();n.next=function(){return{done:r=!0}},o[ITERATOR$3]=function(){return n},e(o)}catch(e){}return r},task=_task.set,microtask=_microtask(),PROMISE="Promise",TypeError$1=_global.TypeError,process$2=_global.process,versions=process$2&&process$2.versions,v8=versions&&versions.v8||"",$Promise=_global[PROMISE],isNode$1="process"==_classof(process$2),empty=function(){},newPromiseCapability=newGenericPromiseCapability=_newPromiseCapability.f,USE_NATIVE=!!function(){try{var e=$Promise.resolve(1),t=(e.constructor={})[_wks("species")]=function(e){e(empty,empty)};return(isNode$1||"function"==typeof PromiseRejectionEvent)&&e.then(empty)instanceof t&&0!==v8.indexOf("6.6")&&-1===_userAgent.indexOf("Chrome/66")}catch(e){}}(),isThenable=function(e){var t;return!(!_isObject(e)||"function"!=typeof(t=e.then))&&t},notify=function(e,t){if(!e._n){e._n=!0;var r=e._c;microtask(function(){for(var o=e._v,n=1==e._s,i=0,s=function(t){var r,i,s,a=n?t.ok:t.fail,c=t.resolve,u=t.reject,l=t.domain;try{a?(n||(2==e._h&&onHandleUnhandled(e),e._h=1),!0===a?r=o:(l&&l.enter(),r=a(o),l&&(l.exit(),s=!0)),r===t.promise?u(TypeError$1("Promise-chain cycle")):(i=isThenable(r))?i.call(r,c,u):c(r)):u(o)}catch(e){l&&!s&&l.exit(),u(e)}};r.length>i;)s(r[i++]);e._c=[],e._n=!1,t&&!e._h&&onUnhandled(e)})}},onUnhandled=function(e){task.call(_global,function(){var t,r,o,n=e._v,i=isUnhandled(e);if(i&&(t=_perform(function(){isNode$1?process$2.emit("unhandledRejection",n,e):(r=_global.onunhandledrejection)?r({promise:e,reason:n}):(o=_global.console)&&o.error&&o.error("Unhandled promise rejection",n)}),e._h=isNode$1||isUnhandled(e)?2:1),e._a=void 0,i&&t.e)throw t.v})},isUnhandled=function(e){return 1!==e._h&&0===(e._a||e._c).length},onHandleUnhandled=function(e){task.call(_global,function(){var t;isNode$1?process$2.emit("rejectionHandled",e):(t=_global.onrejectionhandled)&&t({promise:e,reason:e._v})})},$reject=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),notify(t,!0))},$resolve=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw TypeError$1("Promise can't be resolved itself");(t=isThenable(e))?microtask(function(){var o={_w:r,_d:!1};try{t.call(e,_ctx($resolve,o,1),_ctx($reject,o,1))}catch(e){$reject.call(o,e)}}):(r._v=e,r._s=1,notify(r,!1))}catch(e){$reject.call({_w:r,_d:!1},e)}}};USE_NATIVE||($Promise=function(e){_anInstance(this,$Promise,PROMISE,"_h"),_aFunction(e),Internal.call(this);try{e(_ctx($resolve,this,1),_ctx($reject,this,1))}catch(e){$reject.call(this,e)}},(Internal=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=_redefineAll($Promise.prototype,{then:function(e,t){var r=newPromiseCapability(_speciesConstructor(this,$Promise));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=isNode$1?process$2.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&notify(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal;this.promise=e,this.resolve=_ctx($resolve,e,1),this.reject=_ctx($reject,e,1)},_newPromiseCapability.f=newPromiseCapability=function(e){return e===$Promise||e===Wrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)}),_export(_export.G+_export.W+_export.F*!USE_NATIVE,{Promise:$Promise}),_setToStringTag($Promise,PROMISE),_setSpecies(PROMISE),Wrapper=_core[PROMISE],_export(_export.S+_export.F*!USE_NATIVE,PROMISE,{reject:function(e){var t=newPromiseCapability(this);return(0,t.reject)(e),t.promise}}),_export(_export.S+_export.F*_library,PROMISE,{resolve:function(e){return _promiseResolve(this===Wrapper?$Promise:this,e)}}),_export(_export.S+_export.F*!(USE_NATIVE&&_iterDetect(function(e){$Promise.all(e).catch(empty)})),PROMISE,{all:function(e){var t=this,r=newPromiseCapability(t),o=r.resolve,n=r.reject,i=_perform(function(){var r=[],i=0,s=1;_forOf(e,!1,function(e){var a=i++,c=!1;r.push(void 0),s++,t.resolve(e).then(function(e){c||(c=!0,r[a]=e,--s||o(r))},n)}),--s||o(r)});return i.e&&n(i.v),r.promise},race:function(e){var t=this,r=newPromiseCapability(t),o=r.reject,n=_perform(function(){_forOf(e,!1,function(e){t.resolve(e).then(r.resolve,o)})});return n.e&&o(n.v),r.promise}}),_export(_export.P+_export.R,"Promise",{finally:function(e){var t=_speciesConstructor(this,_core.Promise||_global.Promise),r="function"==typeof e;return this.then(r?function(r){return _promiseResolve(t,e()).then(function(){return r})}:e,r?function(r){return _promiseResolve(t,e()).then(function(){throw r})}:e)}}),_export(_export.S,"Promise",{try:function(e){var t=_newPromiseCapability.f(this),r=_perform(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}}),getCjsExportFromNamespace(es6_object_toString);var promise=_core.Promise,promise$1=promise,f$2={}.propertyIsEnumerable,_objectPie={f:f$2},gOPD=Object.getOwnPropertyDescriptor,f$3=_descriptors?gOPD:function(e,t){if(e=_toIobject(e),t=_toPrimitive(t,!0),_ie8DomDefine)try{return gOPD(e,t)}catch(e){}if(_has(e,t))return _propertyDesc(!_objectPie.f.call(e,t),e[t])},_objectGopd={f:f$3},_objectSap=function(e,t){var r=(_core.Object||{})[e]||Object[e],o={};o[e]=t(r),_export(_export.S+_export.F*_fails(function(){r(1)}),"Object",o)},$getOwnPropertyDescriptor=_objectGopd.f;_objectSap("getOwnPropertyDescriptor",function(){return function(e,t){return $getOwnPropertyDescriptor(_toIobject(e),t)}});var $Object=_core.Object,getOwnPropertyDescriptor=function(e,t){return $Object.getOwnPropertyDescriptor(e,t)},getOwnPropertyDescriptor$1=getOwnPropertyDescriptor,_meta=createCommonjsModule(function(e){var t=_uid("meta"),r=_objectDp.f,o=0,n=Object.isExtensible||function(){return!0},i=!_fails(function(){return n(Object.preventExtensions({}))}),s=function(e){r(e,t,{value:{i:"O"+ ++o,w:{}}})},a=e.exports={KEY:t,NEED:!1,fastKey:function(e,r){if(!_isObject(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!_has(e,t)){if(!n(e))return"F";if(!r)return"E";s(e)}return e[t].i},getWeak:function(e,r){if(!_has(e,t)){if(!n(e))return!0;if(!r)return!1;s(e)}return e[t].w},onFreeze:function(e){return i&&a.NEED&&n(e)&&!_has(e,t)&&s(e),e}}}),_meta_1=_meta.KEY,_meta_2=_meta.NEED,_meta_3=_meta.fastKey,_meta_4=_meta.getWeak,_meta_5=_meta.onFreeze,f$4=_wks,_wksExt={f:f$4},defineProperty=_objectDp.f,_wksDefine=function(e){var t=_core.Symbol||(_core.Symbol={});"_"==e.charAt(0)||e in t||defineProperty(t,e,{value:_wksExt.f(e)})},f$5=Object.getOwnPropertySymbols,_objectGops={f:f$5},_enumKeys=function(e){var t=_objectKeys(e),r=_objectGops.f;if(r)for(var o,n=r(e),i=_objectPie.f,s=0;n.length>s;)i.call(e,o=n[s++])&&t.push(o);return t},_isArray=Array.isArray||function(e){return"Array"==_cof(e)},hiddenKeys=_enumBugKeys.concat("length","prototype"),f$6=Object.getOwnPropertyNames||function(e){return _objectKeysInternal(e,hiddenKeys)},_objectGopn={f:f$6},gOPN=_objectGopn.f,toString$1={}.toString,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return gOPN(e)}catch(e){return windowNames.slice()}},f$7=function(e){return windowNames&&"[object Window]"==toString$1.call(e)?getWindowNames(e):gOPN(_toIobject(e))},_objectGopnExt={f:f$7},META=_meta.KEY,gOPD$1=_objectGopd.f,dP$1=_objectDp.f,gOPN$1=_objectGopnExt.f,$Symbol=_global.Symbol,$JSON=_global.JSON,_stringify=$JSON&&$JSON.stringify,PROTOTYPE$2="prototype",HIDDEN=_wks("_hidden"),TO_PRIMITIVE=_wks("toPrimitive"),isEnum={}.propertyIsEnumerable,SymbolRegistry=_shared("symbol-registry"),AllSymbols=_shared("symbols"),OPSymbols=_shared("op-symbols"),ObjectProto$1=Object[PROTOTYPE$2],USE_NATIVE$1="function"==typeof $Symbol&&!!_objectGops.f,QObject=_global.QObject,setter=!QObject||!QObject[PROTOTYPE$2]||!QObject[PROTOTYPE$2].findChild,setSymbolDesc=_descriptors&&_fails(function(){return 7!=_objectCreate(dP$1({},"a",{get:function(){return dP$1(this,"a",{value:7}).a}})).a})?function(e,t,r){var o=gOPD$1(ObjectProto$1,t);o&&delete ObjectProto$1[t],dP$1(e,t,r),o&&e!==ObjectProto$1&&dP$1(ObjectProto$1,t,o)}:dP$1,wrap=function(e){var t=AllSymbols[e]=_objectCreate($Symbol[PROTOTYPE$2]);return t._k=e,t},isSymbol=USE_NATIVE$1&&"symbol"==typeof $Symbol.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof $Symbol},$defineProperty=function(e,t,r){return e===ObjectProto$1&&$defineProperty(OPSymbols,t,r),_anObject(e),t=_toPrimitive(t,!0),_anObject(r),_has(AllSymbols,t)?(r.enumerable?(_has(e,HIDDEN)&&e[HIDDEN][t]&&(e[HIDDEN][t]=!1),r=_objectCreate(r,{enumerable:_propertyDesc(0,!1)})):(_has(e,HIDDEN)||dP$1(e,HIDDEN,_propertyDesc(1,{})),e[HIDDEN][t]=!0),setSymbolDesc(e,t,r)):dP$1(e,t,r)},$defineProperties=function(e,t){_anObject(e);for(var r,o=_enumKeys(t=_toIobject(t)),n=0,i=o.length;i>n;)$defineProperty(e,r=o[n++],t[r]);return e},$create=function(e,t){return void 0===t?_objectCreate(e):$defineProperties(_objectCreate(e),t)},$propertyIsEnumerable=function(e){var t=isEnum.call(this,e=_toPrimitive(e,!0));return!(this===ObjectProto$1&&_has(AllSymbols,e)&&!_has(OPSymbols,e))&&(!(t||!_has(this,e)||!_has(AllSymbols,e)||_has(this,HIDDEN)&&this[HIDDEN][e])||t)},$getOwnPropertyDescriptor$1=function(e,t){if(e=_toIobject(e),t=_toPrimitive(t,!0),e!==ObjectProto$1||!_has(AllSymbols,t)||_has(OPSymbols,t)){var r=gOPD$1(e,t);return!r||!_has(AllSymbols,t)||_has(e,HIDDEN)&&e[HIDDEN][t]||(r.enumerable=!0),r}},$getOwnPropertyNames=function(e){for(var t,r=gOPN$1(_toIobject(e)),o=[],n=0;r.length>n;)_has(AllSymbols,t=r[n++])||t==HIDDEN||t==META||o.push(t);return o},$getOwnPropertySymbols=function(e){for(var t,r=e===ObjectProto$1,o=gOPN$1(r?OPSymbols:_toIobject(e)),n=[],i=0;o.length>i;)!_has(AllSymbols,t=o[i++])||r&&!_has(ObjectProto$1,t)||n.push(AllSymbols[t]);return n};USE_NATIVE$1||(_redefine(($Symbol=function(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor!");var e=_uid(arguments.length>0?arguments[0]:void 0),t=function(r){this===ObjectProto$1&&t.call(OPSymbols,r),_has(this,HIDDEN)&&_has(this[HIDDEN],e)&&(this[HIDDEN][e]=!1),setSymbolDesc(this,e,_propertyDesc(1,r))};return _descriptors&&setter&&setSymbolDesc(ObjectProto$1,e,{configurable:!0,set:t}),wrap(e)})[PROTOTYPE$2],"toString",function(){return this._k}),_objectGopd.f=$getOwnPropertyDescriptor$1,_objectDp.f=$defineProperty,_objectGopn.f=_objectGopnExt.f=$getOwnPropertyNames,_objectPie.f=$propertyIsEnumerable,_objectGops.f=$getOwnPropertySymbols,_descriptors&&!_library&&_redefine(ObjectProto$1,"propertyIsEnumerable",$propertyIsEnumerable,!0),_wksExt.f=function(e){return wrap(_wks(e))}),_export(_export.G+_export.W+_export.F*!USE_NATIVE$1,{Symbol:$Symbol});for(var es6Symbols="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),j=0;es6Symbols.length>j;)_wks(es6Symbols[j++]);for(var wellKnownSymbols=_objectKeys(_wks.store),k=0;wellKnownSymbols.length>k;)_wksDefine(wellKnownSymbols[k++]);_export(_export.S+_export.F*!USE_NATIVE$1,"Symbol",{for:function(e){return _has(SymbolRegistry,e+="")?SymbolRegistry[e]:SymbolRegistry[e]=$Symbol(e)},keyFor:function(e){if(!isSymbol(e))throw TypeError(e+" is not a symbol!");for(var t in SymbolRegistry)if(SymbolRegistry[t]===e)return t},useSetter:function(){setter=!0},useSimple:function(){setter=!1}}),_export(_export.S+_export.F*!USE_NATIVE$1,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor$1,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols});var FAILS_ON_PRIMITIVES=_fails(function(){_objectGops.f(1)});_export(_export.S+_export.F*FAILS_ON_PRIMITIVES,"Object",{getOwnPropertySymbols:function(e){return _objectGops.f(_toObject(e))}}),$JSON&&_export(_export.S+_export.F*(!USE_NATIVE$1||_fails(function(){var e=$Symbol();return"[null]"!=_stringify([e])||"{}"!=_stringify({a:e})||"{}"!=_stringify(Object(e))})),"JSON",{stringify:function(e){for(var t,r,o=[e],n=1;arguments.length>n;)o.push(arguments[n++]);if(r=t=o[1],(_isObject(t)||void 0!==e)&&!isSymbol(e))return _isArray(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!isSymbol(t))return t}),o[1]=t,_stringify.apply($JSON,o)}}),$Symbol[PROTOTYPE$2][TO_PRIMITIVE]||_hide($Symbol[PROTOTYPE$2],TO_PRIMITIVE,$Symbol[PROTOTYPE$2].valueOf),_setToStringTag($Symbol,"Symbol"),_setToStringTag(Math,"Math",!0),_setToStringTag(_global.JSON,"JSON",!0);var getOwnPropertySymbols=_core.Object.getOwnPropertySymbols,getOwnPropertySymbols$1=getOwnPropertySymbols;_objectSap("keys",function(){return function(e){return _objectKeys(_toObject(e))}});var keys=_core.Object.keys,keys$1=keys;_export(_export.S+_export.F*!_descriptors,"Object",{defineProperty:_objectDp.f});var $Object$1=_core.Object,defineProperty$1=function(e,t,r){return $Object$1.defineProperty(e,t,r)},defineProperty$2=defineProperty$1;function _defineProperty(e,t,r){return t in e?defineProperty$2(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var defineProperty$3=_defineProperty;function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=keys$1(r);"function"==typeof getOwnPropertySymbols$1&&(o=o.concat(getOwnPropertySymbols$1(r).filter(function(e){return getOwnPropertyDescriptor$1(r,e).enumerable}))),o.forEach(function(t){defineProperty$3(e,t,r[t])})}return e}var objectSpread=_objectSpread,_validateCollection=function(e,t){if(!_isObject(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e},dP$2=_objectDp.f,fastKey=_meta.fastKey,SIZE=_descriptors?"_s":"size",getEntry=function(e,t){var r,o=fastKey(t);if("F"!==o)return e._i[o];for(r=e._f;r;r=r.n)if(r.k==t)return r},_collectionStrong={getConstructor:function(e,t,r,o){var n=e(function(e,i){_anInstance(e,n,t,"_i"),e._t=t,e._i=_objectCreate(null),e._f=void 0,e._l=void 0,e[SIZE]=0,null!=i&&_forOf(i,r,e[o],e)});return _redefineAll(n.prototype,{clear:function(){for(var e=_validateCollection(this,t),r=e._i,o=e._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete r[o.i];e._f=e._l=void 0,e[SIZE]=0},delete:function(e){var r=_validateCollection(this,t),o=getEntry(r,e);if(o){var n=o.n,i=o.p;delete r._i[o.i],o.r=!0,i&&(i.n=n),n&&(n.p=i),r._f==o&&(r._f=n),r._l==o&&(r._l=i),r[SIZE]--}return!!o},forEach:function(e){_validateCollection(this,t);for(var r,o=_ctx(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(o(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!getEntry(_validateCollection(this,t),e)}}),_descriptors&&dP$2(n.prototype,"size",{get:function(){return _validateCollection(this,t)[SIZE]}}),n},def:function(e,t,r){var o,n,i=getEntry(e,t);return i?i.v=r:(e._l=i={i:n=fastKey(t,!0),k:t,v:r,p:o=e._l,n:void 0,r:!1},e._f||(e._f=i),o&&(o.n=i),e[SIZE]++,"F"!==n&&(e._i[n]=i)),e},getEntry:getEntry,setStrong:function(e,t,r){_iterDefine(e,t,function(e,r){this._t=_validateCollection(e,t),this._k=r,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?_iterStep(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,_iterStep(1))},r?"entries":"values",!r,!0),_setSpecies(t)}},SPECIES$2=_wks("species"),_arraySpeciesConstructor=function(e){var t;return _isArray(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!_isArray(t.prototype)||(t=void 0),_isObject(t)&&null===(t=t[SPECIES$2])&&(t=void 0)),void 0===t?Array:t},_arraySpeciesCreate=function(e,t){return new(_arraySpeciesConstructor(e))(t)},_arrayMethods=function(e,t){var r=1==e,o=2==e,n=3==e,i=4==e,s=6==e,a=5==e||s,c=t||_arraySpeciesCreate;return function(t,u,l){for(var _,f,p=_toObject(t),h=_iobject(p),d=_ctx(u,l,3),y=_toLength(h.length),b=0,g=r?c(t,y):o?c(t,0):void 0;y>b;b++)if((a||b in h)&&(f=d(_=h[b],b,p),e))if(r)g[b]=f;else if(f)switch(e){case 3:return!0;case 5:return _;case 6:return b;case 2:g.push(_)}else if(i)return!1;return s?-1:n||i?i:g}},dP$3=_objectDp.f,each=_arrayMethods(0),_collection=function(e,t,r,o,n,i){var s=_global[e],a=s,c=n?"set":"add",u=a&&a.prototype,l={};return _descriptors&&"function"==typeof a&&(i||u.forEach&&!_fails(function(){(new a).entries().next()}))?(a=t(function(t,r){_anInstance(t,a,e,"_c"),t._c=new s,null!=r&&_forOf(r,n,t[c],t)}),each("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in u&&(!i||"clear"!=e)&&_hide(a.prototype,e,function(r,o){if(_anInstance(this,a,e),!t&&i&&!_isObject(r))return"get"==e&&void 0;var n=this._c[e](0===r?0:r,o);return t?this:n})}),i||dP$3(a.prototype,"size",{get:function(){return this._c.size}})):(a=o.getConstructor(t,e,n,c),_redefineAll(a.prototype,r),_meta.NEED=!0),_setToStringTag(a,e),l[e]=a,_export(_export.G+_export.W+_export.F,l),i||o.setStrong(a,e,n),a},MAP="Map",es6_map=_collection(MAP,function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=_collectionStrong.getEntry(_validateCollection(this,MAP),e);return t&&t.v},set:function(e,t){return _collectionStrong.def(_validateCollection(this,MAP),0===e?0:e,t)}},_collectionStrong,!0),_arrayFromIterable=function(e,t){var r=[];return _forOf(e,!1,r.push,r,t),r},_collectionToJson=function(e){return function(){if(_classof(this)!=e)throw TypeError(e+"#toJSON isn't generic");return _arrayFromIterable(this)}};_export(_export.P+_export.R,"Map",{toJSON:_collectionToJson("Map")});var _setCollectionOf=function(e){_export(_export.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})};_setCollectionOf("Map");var _setCollectionFrom=function(e){_export(_export.S,e,{from:function(e){var t,r,o,n,i=arguments[1];return _aFunction(this),(t=void 0!==i)&&_aFunction(i),null==e?new this:(r=[],t?(o=0,n=_ctx(i,arguments[2],2),_forOf(e,!1,function(e){r.push(n(e,o++))})):_forOf(e,!1,r.push,r),new this(r))}})};_setCollectionFrom("Map");var map=_core.Map,map$1=map,$assign=Object.assign,_objectAssign=!$assign||_fails(function(){var e={},t={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[r]||Object.keys($assign({},t)).join("")!=o})?function(e,t){for(var r=_toObject(e),o=arguments.length,n=1,i=_objectGops.f,s=_objectPie.f;o>n;)for(var a,c=_iobject(arguments[n++]),u=i?_objectKeys(c).concat(i(c)):_objectKeys(c),l=u.length,_=0;l>_;)a=u[_++],_descriptors&&!s.call(c,a)||(r[a]=c[a]);return r}:$assign;_export(_export.S+_export.F,"Object",{assign:_objectAssign});var assign=_core.Object.assign,assign$1=assign,freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto=Object.prototype,hasOwnProperty$1=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty$1.call(e,symToStringTag),r=e[symToStringTag];try{e[symToStringTag]=void 0;var o=!0}catch(e){}var n=nativeObjectToString.call(e);return o&&(t?e[symToStringTag]=r:delete e[symToStringTag]),n}var objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString;function objectToString(e){return nativeObjectToString$1.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag$1&&symToStringTag$1 in Object(e)?getRawTag(e):objectToString(e)}function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcProto=Function.prototype,funcToString=funcProto.toString;function toSource(e){if(null!=e){try{return funcToString.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$2=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return null==e?void 0:e[t]}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HASH_UNDEFINED="__lodash_hash_undefined__",objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var r=t[e];return r===HASH_UNDEFINED?void 0:r}return hasOwnProperty$3.call(t,e)?t[e]:void 0}var objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty$4.call(t,e)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED$1:t,this}function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}function listCacheClear(){this.__data__=[],this.size=0}function eq(e,t){return e===t||e!=e&&t!=t}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,o=assocIndexOf(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var r=getMapData(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var HASH_UNDEFINED$2="__lodash_hash_undefined__";function setCacheAdd(e){return this.__data__.set(e,HASH_UNDEFINED$2),this}function setCacheHas(e){return this.__data__.has(e)}function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new MapCache;++t<r;)this.add(e[t])}function baseFindIndex(e,t,r,o){for(var n=e.length,i=r+(o?1:-1);o?i--:++i<n;)if(t(e[i],i,e))return i;return-1}function baseIsNaN(e){return e!=e}function strictIndexOf(e,t,r){for(var o=r-1,n=e.length;++o<n;)if(e[o]===t)return o;return-1}function baseIndexOf(e,t,r){return t==t?strictIndexOf(e,t,r):baseFindIndex(e,baseIsNaN,r)}function arrayIncludes(e,t){return!!(null==e?0:e.length)&&baseIndexOf(e,t,0)>-1}function arrayIncludesWith(e,t,r){for(var o=-1,n=null==e?0:e.length;++o<n;)if(r(t,e[o]))return!0;return!1}function cacheHas(e,t){return e.has(t)}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;var Set=getNative(root,"Set");function noop(){}function setToArray(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var INFINITY=1/0,createSet=Set&&1/setToArray(new Set([,-0]))[1]==INFINITY?function(e){return new Set(e)}:noop,LARGE_ARRAY_SIZE=200;function baseUniq(e,t,r){var o=-1,n=arrayIncludes,i=e.length,s=!0,a=[],c=a;if(r)s=!1,n=arrayIncludesWith;else if(i>=LARGE_ARRAY_SIZE){var u=t?null:createSet(e);if(u)return setToArray(u);s=!1,n=cacheHas,c=new SetCache}else c=t?[]:a;e:for(;++o<i;){var l=e[o],_=t?t(l):l;if(l=r||0!==l?l:0,s&&_==_){for(var f=c.length;f--;)if(c[f]===_)continue e;t&&c.push(_),a.push(l)}else n(c,_,r)||(c!==a&&c.push(_),a.push(l))}return a}function uniqWith(e,t){return t="function"==typeof t?t:void 0,e&&e.length?baseUniq(e,void 0,t):[]}const bowser=global.navigator&&global.navigator.userAgent?Bowser.getParser(global.navigator.userAgent).getBrowser():null,browser=bowser&&bowser.name&&bowser.version?{name:bowser.name,version:bowser.version}:null;class Log{constructor(e={}){assign$1(this,{version:"1.2",entries:[],pages:[]},e),!this.browser&&browser&&(this.browser=browser)}addEntries(e=[]){this.entries=uniqWith([...e,...this.entries],(e,t)=>e._id===t._id&&e._order===t._order)}sortEntries(){this.entries=this.entries.sort((e,t)=>new Date(e.startedDateTime)-new Date(t.startedDateTime))}}class HAR{constructor(e={}){this.log=new Log(e.log)}}var _stringWs="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",space="["+_stringWs+"]",non="​…",ltrim=RegExp("^"+space+space+"*"),rtrim=RegExp(space+space+"*$"),exporter=function(e,t,r){var o={},n=_fails(function(){return!!_stringWs[e]()||non[e]()!=non}),i=o[e]=n?t(trim):_stringWs[e];r&&(o[r]=i),_export(_export.P+_export.F*n,"String",o)},trim=exporter.trim=function(e,t){return e=String(_defined(e)),1&t&&(e=e.replace(ltrim,"")),2&t&&(e=e.replace(rtrim,"")),e},_stringTrim=exporter,$parseInt=_global.parseInt,$trim=_stringTrim.trim,hex=/^[-+]?0[xX]/,_parseInt=8!==$parseInt(_stringWs+"08")||22!==$parseInt(_stringWs+"0x16")?function(e,t){var r=$trim(String(e),3);return $parseInt(r,t>>>0||(hex.test(r)?16:10))}:$parseInt;_export(_export.G+_export.F*(parseInt!=_parseInt),{parseInt:_parseInt});var _parseInt$1=_core.parseInt,_parseInt$2=_parseInt$1;const{keys:keys$2}=Object,{isArray:isArray}=Array;function toNVPairs(e){return keys$2(e||{}).reduce((t,r)=>{const o=e[r];return isArray(o)?t.push(...o.map(e=>({name:r,value:e,_fromType:"array"}))):t.push({name:r,value:o}),t},[])}const{isArray:isArray$1}=Array;function getFirstHeader(e,t){const r=e.getHeader(t);return isArray$1(r)?r.length>0?r[0]:"":r}function headersSize(e){const t=[],r=[];e.headers.forEach(({name:e,value:o})=>{t.push(e),r.push(o)});const o=e.method+e.url+t.join()+r.join();return getByteLength(o)+2*t.length+2+12+2}class Request{constructor(e){this.httpVersion="HTTP/1.1",this.url=e.absoluteUrl,this.method=e.method,this.headers=toNVPairs(e.headers),this.headersSize=headersSize(this),this.queryString=toNVPairs(e.query),this.cookies=setCookies.parse(e.getHeader("Set-Cookie")),e.body&&(this.postData={mimeType:getFirstHeader(e,"Content-Type")||"text/plain",params:[]},"string"==typeof e.body&&(this.postData.text=e.body));const t=getFirstHeader(e,"Content-Length");this.bodySize=t?_parseInt$2(t,10):this.postData&&this.postData.text?getByteLength(this.postData.text):0}}function headersSize$1(e){const t=[],r=[];e.headers.forEach(({name:e,value:o})=>{t.push(e),r.push(o)});const o=t.join()+r.join();return getByteLength(o)+2*t.length+2+2}class Response{constructor(e){this.httpVersion="HTTP/1.1",this.status=e.statusCode,this.statusText=e.statusText,this.headers=toNVPairs(e.headers),this.headersSize=headersSize$1(this),this.cookies=setCookies.parse(e.getHeader("Set-Cookie")),this.redirectURL=getFirstHeader(e,"Location")||"",this.content={mimeType:getFirstHeader(e,"Content-Type")||"text/plain"},e.body&&"string"==typeof e.body&&(this.content.text=e.body,e.isBinary&&(this.content._isBinary=!0));const t=getFirstHeader(e,"Content-Length");this.content.size=t?_parseInt$2(t,10):this.content.text?getByteLength(this.content.text):0,this.bodySize=this.content.size}}const{keys:keys$3}=Object;function totalTime(e={}){return keys$3(e).reduce((t,r)=>e[r]>0?t+=e[r]:t,0)}class Entry{constructor(e){this._id=e.id,this._order=e.order,this.startedDateTime=e.timestamp,this.request=new Request(e),this.response=new Response(e.response),this.cache={},this.timings={blocked:-1,dns:-1,connect:-1,send:0,wait:e.responseTime,receive:0,ssl:-1},this.time=totalTime(this.timings)}}const CREATOR_NAME="Polly.JS";class Persister{constructor(e){this.polly=e,this.pending=new map$1,this._cache=new map$1}static get type(){return"persister"}static get id(){utils.assert("Must override the static `id` getter.")}get defaultOptions(){return{}}get options(){return objectSpread({},this.defaultOptions||{},(this.polly.config.persisterOptions||{})[this.constructor.id]||{})}get hasPending(){return this.pending.size>0}async persist(){if(!this.hasPending)return;const e=[],t={name:CREATOR_NAME,version:this.polly.constructor.VERSION,comment:`${this.constructor.type}:${this.constructor.id}`};for(const[r,{name:o,requests:n}]of this.pending){const i=[],s=await this.find(r);let a;a=new HAR(s||{log:{creator:t,_recordingName:o}});for(const e of n){const t=new Entry(e);this.assert(`Cannot persist response for [${t.request.method}] ${t.request.url} because the status code was ${t.response.status} and \`recordFailedRequests\` is \`false\``,e.response.ok||e.config.recordFailedRequests),await e._emit("beforePersist",t),i.push(t)}a.log.addEntries(i),this.polly.config.persisterOptions.disableSortingHarEntries||a.log.sortEntries(),this.polly.config.persisterOptions.keepUnusedRequests||this._removeUnusedEntries(r,a),e.push(this.save(r,a))}await promise$1.all(e),this.pending.clear()}recordRequest(e){this.assert("You must pass a PollyRequest to 'recordRequest'.",e),this.assert("Cannot save a request with no response.",e.didRespond);const{recordingId:t,recordingName:r}=e;this.pending.has(t)||this.pending.set(t,{name:r,requests:[]}),this.pending.get(t).requests.push(e)}async find(e){const{_cache:t}=this;if(!t.has(e)){const r=async()=>{const r=await this.findRecording(e);return r?(this.assert(`Recording with id '${e}' is invalid. Please delete the recording so a new one can be created.`,r.log&&r.log.creator.name===CREATOR_NAME),r):(t.delete(e),null)};t.set(e,r())}return t.get(e)}async save(e){await this.saveRecording(...arguments),this._cache.delete(e)}async delete(e){await this.deleteRecording(...arguments),this._cache.delete(e)}async findEntry(e){const{id:t,order:r,recordingId:o}=e,n=await this.find(o);return n&&n.log.entries.find(e=>e._id===t&&e._order===r)||null}stringify(){return stringify(...arguments)}assert(e,...t){utils.assert(`[${this.constructor.type}:${this.constructor.id}] ${e}`,...t)}_removeUnusedEntries(e,t){const r=this.polly._requests.filter(t=>t.recordingId===e&&(t.action===utils.ACTIONS.RECORD||t.action===utils.ACTIONS.REPLAY));t.log.entries=t.log.entries.filter(e=>r.find(t=>e._id===t.id&&e._order===t.order))}findRecording(){this.assert("Must implement the `findRecording` hook.")}saveRecording(){this.assert("Must implement the `saveRecording` hook.")}deleteRecording(){this.assert("Must implement the `deleteRecording` hook.")}}module.exports=Persister;
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var stringify=_interopDefault(require("fast-json-stable-stringify")),utils=require("@pollyjs/utils"),Bowser=_interopDefault(require("bowser")),getByteLength=_interopDefault(require("utf8-byte-length")),setCookies=_interopDefault(require("set-cookie-parser")),_defined=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},_toObject=function(e){return Object(_defined(e))},hasOwnProperty={}.hasOwnProperty,_has=function(e,t){return hasOwnProperty.call(e,t)},toString={}.toString,_cof=function(e){return toString.call(e).slice(8,-1)},_iobject=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==_cof(e)?e.split(""):Object(e)},_toIobject=function(e){return _iobject(_defined(e))},ceil=Math.ceil,floor=Math.floor,_toInteger=function(e){return isNaN(e=+e)?0:(e>0?floor:ceil)(e)},min=Math.min,_toLength=function(e){return e>0?min(_toInteger(e),9007199254740991):0},max=Math.max,min$1=Math.min,_toAbsoluteIndex=function(e,t){return(e=_toInteger(e))<0?max(e+t,0):min$1(e,t)},_arrayIncludes=function(e){return function(t,r,o){var n,i=_toIobject(t),s=_toLength(i.length),a=_toAbsoluteIndex(o,s);if(e&&r!=r){for(;s>a;)if((n=i[a++])!=n)return!0}else for(;s>a;a++)if((e||a in i)&&i[a]===r)return e||a||0;return!e&&-1}};function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var _core=createCommonjsModule((function(e){var t=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=t)})),_core_1=_core.version,_global=createCommonjsModule((function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)})),_library=!0,_shared=createCommonjsModule((function(e){var t=_global["__core-js_shared__"]||(_global["__core-js_shared__"]={});(e.exports=function(e,r){return t[e]||(t[e]=void 0!==r?r:{})})("versions",[]).push({version:_core.version,mode:"pure",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),id=0,px=Math.random(),_uid=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++id+px).toString(36))},shared=_shared("keys"),_sharedKey=function(e){return shared[e]||(shared[e]=_uid(e))},arrayIndexOf=_arrayIncludes(!1),IE_PROTO=_sharedKey("IE_PROTO"),_objectKeysInternal=function(e,t){var r,o=_toIobject(e),n=0,i=[];for(r in o)r!=IE_PROTO&&_has(o,r)&&i.push(r);for(;t.length>n;)_has(o,r=t[n++])&&(~arrayIndexOf(i,r)||i.push(r));return i},_enumBugKeys="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),_objectKeys=Object.keys||function(e){return _objectKeysInternal(e,_enumBugKeys)},_aFunction=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},_ctx=function(e,t,r){if(_aFunction(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,o){return e.call(t,r,o)};case 3:return function(r,o,n){return e.call(t,r,o,n)}}return function(){return e.apply(t,arguments)}},_isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},_anObject=function(e){if(!_isObject(e))throw TypeError(e+" is not an object!");return e},_fails=function(e){try{return!!e()}catch(e){return!0}},_descriptors=!_fails((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),document$1=_global.document,is=_isObject(document$1)&&_isObject(document$1.createElement),_domCreate=function(e){return is?document$1.createElement(e):{}},_ie8DomDefine=!_descriptors&&!_fails((function(){return 7!=Object.defineProperty(_domCreate("div"),"a",{get:function(){return 7}}).a})),_toPrimitive=function(e,t){if(!_isObject(e))return e;var r,o;if(t&&"function"==typeof(r=e.toString)&&!_isObject(o=r.call(e)))return o;if("function"==typeof(r=e.valueOf)&&!_isObject(o=r.call(e)))return o;if(!t&&"function"==typeof(r=e.toString)&&!_isObject(o=r.call(e)))return o;throw TypeError("Can't convert object to primitive value")},dP=Object.defineProperty,f=_descriptors?Object.defineProperty:function(e,t,r){if(_anObject(e),t=_toPrimitive(t,!0),_anObject(r),_ie8DomDefine)try{return dP(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e},_objectDp={f:f},_propertyDesc=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_hide=_descriptors?function(e,t,r){return _objectDp.f(e,t,_propertyDesc(1,r))}:function(e,t,r){return e[t]=r,e},PROTOTYPE="prototype",$export=function(e,t,r){var o,n,i,s=e&$export.F,a=e&$export.G,c=e&$export.S,u=e&$export.P,l=e&$export.B,_=e&$export.W,p=a?_core:_core[t]||(_core[t]={}),f=p[PROTOTYPE],h=a?_global:c?_global[t]:(_global[t]||{})[PROTOTYPE];for(o in a&&(r=t),r)(n=!s&&h&&void 0!==h[o])&&_has(p,o)||(i=n?h[o]:r[o],p[o]=a&&"function"!=typeof h[o]?r[o]:l&&n?_ctx(i,_global):_&&h[o]==i?function(e){var t=function(t,r,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,r)}return new e(t,r,o)}return e.apply(this,arguments)};return t[PROTOTYPE]=e[PROTOTYPE],t}(i):u&&"function"==typeof i?_ctx(Function.call,i):i,u&&((p.virtual||(p.virtual={}))[o]=i,e&$export.R&&f&&!f[o]&&_hide(f,o,i)))};$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128;var _export=$export,_objectSap=function(e,t){var r=(_core.Object||{})[e]||Object[e],o={};o[e]=t(r),_export(_export.S+_export.F*_fails((function(){r(1)})),"Object",o)};_objectSap("keys",(function(){return function(e){return _objectKeys(_toObject(e))}}));var keys=_core.Object.keys,keys$1=keys,_redefine=_hide,_meta=createCommonjsModule((function(e){var t=_uid("meta"),r=_objectDp.f,o=0,n=Object.isExtensible||function(){return!0},i=!_fails((function(){return n(Object.preventExtensions({}))})),s=function(e){r(e,t,{value:{i:"O"+ ++o,w:{}}})},a=e.exports={KEY:t,NEED:!1,fastKey:function(e,r){if(!_isObject(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!_has(e,t)){if(!n(e))return"F";if(!r)return"E";s(e)}return e[t].i},getWeak:function(e,r){if(!_has(e,t)){if(!n(e))return!0;if(!r)return!1;s(e)}return e[t].w},onFreeze:function(e){return i&&a.NEED&&n(e)&&!_has(e,t)&&s(e),e}}})),_meta_1=_meta.KEY,_meta_2=_meta.NEED,_meta_3=_meta.fastKey,_meta_4=_meta.getWeak,_meta_5=_meta.onFreeze,_wks=createCommonjsModule((function(e){var t=_shared("wks"),r=_global.Symbol,o="function"==typeof r;(e.exports=function(e){return t[e]||(t[e]=o&&r[e]||(o?r:_uid)("Symbol."+e))}).store=t})),def=_objectDp.f,TAG=_wks("toStringTag"),_setToStringTag=function(e,t,r){e&&!_has(e=r?e:e.prototype,TAG)&&def(e,TAG,{configurable:!0,value:t})},f$1=_wks,_wksExt={f:f$1},defineProperty=_objectDp.f,_wksDefine=function(e){var t=_core.Symbol||(_core.Symbol={});"_"==e.charAt(0)||e in t||defineProperty(t,e,{value:_wksExt.f(e)})},f$2=Object.getOwnPropertySymbols,_objectGops={f:f$2},f$3={}.propertyIsEnumerable,_objectPie={f:f$3},_enumKeys=function(e){var t=_objectKeys(e),r=_objectGops.f;if(r)for(var o,n=r(e),i=_objectPie.f,s=0;n.length>s;)i.call(e,o=n[s++])&&t.push(o);return t},_isArray=Array.isArray||function(e){return"Array"==_cof(e)},_objectDps=_descriptors?Object.defineProperties:function(e,t){_anObject(e);for(var r,o=_objectKeys(t),n=o.length,i=0;n>i;)_objectDp.f(e,r=o[i++],t[r]);return e},document$2=_global.document,_html=document$2&&document$2.documentElement,IE_PROTO$1=_sharedKey("IE_PROTO"),Empty=function(){},PROTOTYPE$1="prototype",createDict=function(){var e,t=_domCreate("iframe"),r=_enumBugKeys.length;for(t.style.display="none",_html.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),createDict=e.F;r--;)delete createDict[PROTOTYPE$1][_enumBugKeys[r]];return createDict()},_objectCreate=Object.create||function(e,t){var r;return null!==e?(Empty[PROTOTYPE$1]=_anObject(e),r=new Empty,Empty[PROTOTYPE$1]=null,r[IE_PROTO$1]=e):r=createDict(),void 0===t?r:_objectDps(r,t)},hiddenKeys=_enumBugKeys.concat("length","prototype"),f$4=Object.getOwnPropertyNames||function(e){return _objectKeysInternal(e,hiddenKeys)},_objectGopn={f:f$4},gOPN=_objectGopn.f,toString$1={}.toString,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return gOPN(e)}catch(e){return windowNames.slice()}},f$5=function(e){return windowNames&&"[object Window]"==toString$1.call(e)?getWindowNames(e):gOPN(_toIobject(e))},_objectGopnExt={f:f$5},gOPD=Object.getOwnPropertyDescriptor,f$6=_descriptors?gOPD:function(e,t){if(e=_toIobject(e),t=_toPrimitive(t,!0),_ie8DomDefine)try{return gOPD(e,t)}catch(e){}if(_has(e,t))return _propertyDesc(!_objectPie.f.call(e,t),e[t])},_objectGopd={f:f$6},META=_meta.KEY,gOPD$1=_objectGopd.f,dP$1=_objectDp.f,gOPN$1=_objectGopnExt.f,$Symbol=_global.Symbol,$JSON=_global.JSON,_stringify=$JSON&&$JSON.stringify,PROTOTYPE$2="prototype",HIDDEN=_wks("_hidden"),TO_PRIMITIVE=_wks("toPrimitive"),isEnum={}.propertyIsEnumerable,SymbolRegistry=_shared("symbol-registry"),AllSymbols=_shared("symbols"),OPSymbols=_shared("op-symbols"),ObjectProto=Object[PROTOTYPE$2],USE_NATIVE="function"==typeof $Symbol&&!!_objectGops.f,QObject=_global.QObject,setter=!QObject||!QObject[PROTOTYPE$2]||!QObject[PROTOTYPE$2].findChild,setSymbolDesc=_descriptors&&_fails((function(){return 7!=_objectCreate(dP$1({},"a",{get:function(){return dP$1(this,"a",{value:7}).a}})).a}))?function(e,t,r){var o=gOPD$1(ObjectProto,t);o&&delete ObjectProto[t],dP$1(e,t,r),o&&e!==ObjectProto&&dP$1(ObjectProto,t,o)}:dP$1,wrap=function(e){var t=AllSymbols[e]=_objectCreate($Symbol[PROTOTYPE$2]);return t._k=e,t},isSymbol=USE_NATIVE&&"symbol"==typeof $Symbol.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof $Symbol},$defineProperty=function(e,t,r){return e===ObjectProto&&$defineProperty(OPSymbols,t,r),_anObject(e),t=_toPrimitive(t,!0),_anObject(r),_has(AllSymbols,t)?(r.enumerable?(_has(e,HIDDEN)&&e[HIDDEN][t]&&(e[HIDDEN][t]=!1),r=_objectCreate(r,{enumerable:_propertyDesc(0,!1)})):(_has(e,HIDDEN)||dP$1(e,HIDDEN,_propertyDesc(1,{})),e[HIDDEN][t]=!0),setSymbolDesc(e,t,r)):dP$1(e,t,r)},$defineProperties=function(e,t){_anObject(e);for(var r,o=_enumKeys(t=_toIobject(t)),n=0,i=o.length;i>n;)$defineProperty(e,r=o[n++],t[r]);return e},$create=function(e,t){return void 0===t?_objectCreate(e):$defineProperties(_objectCreate(e),t)},$propertyIsEnumerable=function(e){var t=isEnum.call(this,e=_toPrimitive(e,!0));return!(this===ObjectProto&&_has(AllSymbols,e)&&!_has(OPSymbols,e))&&(!(t||!_has(this,e)||!_has(AllSymbols,e)||_has(this,HIDDEN)&&this[HIDDEN][e])||t)},$getOwnPropertyDescriptor=function(e,t){if(e=_toIobject(e),t=_toPrimitive(t,!0),e!==ObjectProto||!_has(AllSymbols,t)||_has(OPSymbols,t)){var r=gOPD$1(e,t);return!r||!_has(AllSymbols,t)||_has(e,HIDDEN)&&e[HIDDEN][t]||(r.enumerable=!0),r}},$getOwnPropertyNames=function(e){for(var t,r=gOPN$1(_toIobject(e)),o=[],n=0;r.length>n;)_has(AllSymbols,t=r[n++])||t==HIDDEN||t==META||o.push(t);return o},$getOwnPropertySymbols=function(e){for(var t,r=e===ObjectProto,o=gOPN$1(r?OPSymbols:_toIobject(e)),n=[],i=0;o.length>i;)!_has(AllSymbols,t=o[i++])||r&&!_has(ObjectProto,t)||n.push(AllSymbols[t]);return n};USE_NATIVE||(_redefine(($Symbol=function(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor!");var e=_uid(arguments.length>0?arguments[0]:void 0),t=function(r){this===ObjectProto&&t.call(OPSymbols,r),_has(this,HIDDEN)&&_has(this[HIDDEN],e)&&(this[HIDDEN][e]=!1),setSymbolDesc(this,e,_propertyDesc(1,r))};return _descriptors&&setter&&setSymbolDesc(ObjectProto,e,{configurable:!0,set:t}),wrap(e)})[PROTOTYPE$2],"toString",(function(){return this._k})),_objectGopd.f=$getOwnPropertyDescriptor,_objectDp.f=$defineProperty,_objectGopn.f=_objectGopnExt.f=$getOwnPropertyNames,_objectPie.f=$propertyIsEnumerable,_objectGops.f=$getOwnPropertySymbols,_descriptors&&!_library&&_redefine(ObjectProto,"propertyIsEnumerable",$propertyIsEnumerable,!0),_wksExt.f=function(e){return wrap(_wks(e))}),_export(_export.G+_export.W+_export.F*!USE_NATIVE,{Symbol:$Symbol});for(var es6Symbols="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),j=0;es6Symbols.length>j;)_wks(es6Symbols[j++]);for(var wellKnownSymbols=_objectKeys(_wks.store),k=0;wellKnownSymbols.length>k;)_wksDefine(wellKnownSymbols[k++]);_export(_export.S+_export.F*!USE_NATIVE,"Symbol",{for:function(e){return _has(SymbolRegistry,e+="")?SymbolRegistry[e]:SymbolRegistry[e]=$Symbol(e)},keyFor:function(e){if(!isSymbol(e))throw TypeError(e+" is not a symbol!");for(var t in SymbolRegistry)if(SymbolRegistry[t]===e)return t},useSetter:function(){setter=!0},useSimple:function(){setter=!1}}),_export(_export.S+_export.F*!USE_NATIVE,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols});var FAILS_ON_PRIMITIVES=_fails((function(){_objectGops.f(1)}));_export(_export.S+_export.F*FAILS_ON_PRIMITIVES,"Object",{getOwnPropertySymbols:function(e){return _objectGops.f(_toObject(e))}}),$JSON&&_export(_export.S+_export.F*(!USE_NATIVE||_fails((function(){var e=$Symbol();return"[null]"!=_stringify([e])||"{}"!=_stringify({a:e})||"{}"!=_stringify(Object(e))}))),"JSON",{stringify:function(e){for(var t,r,o=[e],n=1;arguments.length>n;)o.push(arguments[n++]);if(r=t=o[1],(_isObject(t)||void 0!==e)&&!isSymbol(e))return _isArray(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!isSymbol(t))return t}),o[1]=t,_stringify.apply($JSON,o)}}),$Symbol[PROTOTYPE$2][TO_PRIMITIVE]||_hide($Symbol[PROTOTYPE$2],TO_PRIMITIVE,$Symbol[PROTOTYPE$2].valueOf),_setToStringTag($Symbol,"Symbol"),_setToStringTag(Math,"Math",!0),_setToStringTag(_global.JSON,"JSON",!0);var getOwnPropertySymbols=_core.Object.getOwnPropertySymbols,getOwnPropertySymbols$1=getOwnPropertySymbols,$getOwnPropertyDescriptor$1=_objectGopd.f;_objectSap("getOwnPropertyDescriptor",(function(){return function(e,t){return $getOwnPropertyDescriptor$1(_toIobject(e),t)}}));var $Object=_core.Object,getOwnPropertyDescriptor=function(e,t){return $Object.getOwnPropertyDescriptor(e,t)},getOwnPropertyDescriptor$1=getOwnPropertyDescriptor,Reflect=_global.Reflect,_ownKeys=Reflect&&Reflect.ownKeys||function(e){var t=_objectGopn.f(_anObject(e)),r=_objectGops.f;return r?t.concat(r(e)):t},_createProperty=function(e,t,r){t in e?_objectDp.f(e,t,_propertyDesc(0,r)):e[t]=r};_export(_export.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,r,o=_toIobject(e),n=_objectGopd.f,i=_ownKeys(o),s={},a=0;i.length>a;)void 0!==(r=n(o,t=i[a++]))&&_createProperty(s,t,r);return s}});var getOwnPropertyDescriptors=_core.Object.getOwnPropertyDescriptors,getOwnPropertyDescriptors$1=getOwnPropertyDescriptors;_export(_export.S+_export.F*!_descriptors,"Object",{defineProperties:_objectDps});var $Object$1=_core.Object,defineProperties=function(e,t){return $Object$1.defineProperties(e,t)},defineProperties$1=defineProperties;_export(_export.S+_export.F*!_descriptors,"Object",{defineProperty:_objectDp.f});var $Object$2=_core.Object,defineProperty$1=function(e,t,r){return $Object$2.defineProperty(e,t,r)},defineProperty$2=defineProperty$1,defineProperty$3=createCommonjsModule((function(e){e.exports=function(e,t,r){return t in e?defineProperty$2(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0})),_defineProperty=unwrapExports(defineProperty$3),_stringAt=function(e){return function(t,r){var o,n,i=String(_defined(t)),s=_toInteger(r),a=i.length;return s<0||s>=a?e?"":void 0:(o=i.charCodeAt(s))<55296||o>56319||s+1===a||(n=i.charCodeAt(s+1))<56320||n>57343?e?i.charAt(s):o:e?i.slice(s,s+2):n-56320+(o-55296<<10)+65536}},_iterators={},IteratorPrototype={};_hide(IteratorPrototype,_wks("iterator"),(function(){return this}));var _iterCreate=function(e,t,r){e.prototype=_objectCreate(IteratorPrototype,{next:_propertyDesc(1,r)}),_setToStringTag(e,t+" Iterator")},IE_PROTO$2=_sharedKey("IE_PROTO"),ObjectProto$1=Object.prototype,_objectGpo=Object.getPrototypeOf||function(e){return e=_toObject(e),_has(e,IE_PROTO$2)?e[IE_PROTO$2]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?ObjectProto$1:null},ITERATOR=_wks("iterator"),BUGGY=!([].keys&&"next"in[].keys()),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",returnThis=function(){return this},_iterDefine=function(e,t,r,o,n,i,s){_iterCreate(r,t,o);var a,c,u,l=function(e){if(!BUGGY&&e in h)return h[e];switch(e){case KEYS:case VALUES:return function(){return new r(this,e)}}return function(){return new r(this,e)}},_=t+" Iterator",p=n==VALUES,f=!1,h=e.prototype,d=h[ITERATOR]||h[FF_ITERATOR]||n&&h[n],y=d||l(n),g=n?p?l("entries"):y:void 0,b="Array"==t&&h.entries||d;if(b&&(u=_objectGpo(b.call(new e)))!==Object.prototype&&u.next&&_setToStringTag(u,_,!0),p&&d&&d.name!==VALUES&&(f=!0,y=function(){return d.call(this)}),s&&(BUGGY||f||!h[ITERATOR])&&_hide(h,ITERATOR,y),_iterators[t]=y,_iterators[_]=returnThis,n)if(a={values:p?y:l(VALUES),keys:i?y:l(KEYS),entries:g},s)for(c in a)c in h||_redefine(h,c,a[c]);else _export(_export.P+_export.F*(BUGGY||f),t,a);return a},$at=_stringAt(!0);_iterDefine(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,r=this._i;return r>=t.length?{value:void 0,done:!0}:(e=$at(t,r),this._i+=e.length,{value:e,done:!1})}));var _iterStep=function(e,t){return{value:t,done:!!e}},es6_array_iterator=_iterDefine(Array,"Array",(function(e,t){this._t=_toIobject(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,_iterStep(1)):_iterStep(0,"keys"==t?r:"values"==t?e[r]:[r,e[r]])}),"values");_iterators.Arguments=_iterators.Array;for(var TO_STRING_TAG=_wks("toStringTag"),DOMIterables="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(","),i=0;i<DOMIterables.length;i++){var NAME=DOMIterables[i],Collection=_global[NAME],proto=Collection&&Collection.prototype;proto&&!proto[TO_STRING_TAG]&&_hide(proto,TO_STRING_TAG,NAME),_iterators[NAME]=_iterators.Array}var _redefineAll=function(e,t,r){for(var o in t)r&&e[o]?e[o]=t[o]:_hide(e,o,t[o]);return e},_anInstance=function(e,t,r,o){if(!(e instanceof t)||void 0!==o&&o in e)throw TypeError(r+": incorrect invocation!");return e},_iterCall=function(e,t,r,o){try{return o?t(_anObject(r)[0],r[1]):t(r)}catch(t){var n=e.return;throw void 0!==n&&_anObject(n.call(e)),t}},ITERATOR$1=_wks("iterator"),ArrayProto=Array.prototype,_isArrayIter=function(e){return void 0!==e&&(_iterators.Array===e||ArrayProto[ITERATOR$1]===e)},TAG$1=_wks("toStringTag"),ARG="Arguments"==_cof(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},_classof=function(e){var t,r,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=Object(e),TAG$1))?r:ARG?_cof(t):"Object"==(o=_cof(t))&&"function"==typeof t.callee?"Arguments":o},ITERATOR$2=_wks("iterator"),core_getIteratorMethod=_core.getIteratorMethod=function(e){if(null!=e)return e[ITERATOR$2]||e["@@iterator"]||_iterators[_classof(e)]},_forOf=createCommonjsModule((function(e){var t={},r={},o=e.exports=function(e,o,n,i,s){var a,c,u,l,_=s?function(){return e}:core_getIteratorMethod(e),p=_ctx(n,i,o?2:1),f=0;if("function"!=typeof _)throw TypeError(e+" is not iterable!");if(_isArrayIter(_)){for(a=_toLength(e.length);a>f;f++)if((l=o?p(_anObject(c=e[f])[0],c[1]):p(e[f]))===t||l===r)return l}else for(u=_.call(e);!(c=u.next()).done;)if((l=_iterCall(u,p,c.value,o))===t||l===r)return l};o.BREAK=t,o.RETURN=r})),SPECIES=_wks("species"),_setSpecies=function(e){var t="function"==typeof _core[e]?_core[e]:_global[e];_descriptors&&t&&!t[SPECIES]&&_objectDp.f(t,SPECIES,{configurable:!0,get:function(){return this}})},_validateCollection=function(e,t){if(!_isObject(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e},dP$2=_objectDp.f,fastKey=_meta.fastKey,SIZE=_descriptors?"_s":"size",getEntry=function(e,t){var r,o=fastKey(t);if("F"!==o)return e._i[o];for(r=e._f;r;r=r.n)if(r.k==t)return r},_collectionStrong={getConstructor:function(e,t,r,o){var n=e((function(e,i){_anInstance(e,n,t,"_i"),e._t=t,e._i=_objectCreate(null),e._f=void 0,e._l=void 0,e[SIZE]=0,null!=i&&_forOf(i,r,e[o],e)}));return _redefineAll(n.prototype,{clear:function(){for(var e=_validateCollection(this,t),r=e._i,o=e._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete r[o.i];e._f=e._l=void 0,e[SIZE]=0},delete:function(e){var r=_validateCollection(this,t),o=getEntry(r,e);if(o){var n=o.n,i=o.p;delete r._i[o.i],o.r=!0,i&&(i.n=n),n&&(n.p=i),r._f==o&&(r._f=n),r._l==o&&(r._l=i),r[SIZE]--}return!!o},forEach:function(e){_validateCollection(this,t);for(var r,o=_ctx(e,arguments.length>1?arguments[1]:void 0,3);r=r?r.n:this._f;)for(o(r.v,r.k,this);r&&r.r;)r=r.p},has:function(e){return!!getEntry(_validateCollection(this,t),e)}}),_descriptors&&dP$2(n.prototype,"size",{get:function(){return _validateCollection(this,t)[SIZE]}}),n},def:function(e,t,r){var o,n,i=getEntry(e,t);return i?i.v=r:(e._l=i={i:n=fastKey(t,!0),k:t,v:r,p:o=e._l,n:void 0,r:!1},e._f||(e._f=i),o&&(o.n=i),e[SIZE]++,"F"!==n&&(e._i[n]=i)),e},getEntry:getEntry,setStrong:function(e,t,r){_iterDefine(e,t,(function(e,r){this._t=_validateCollection(e,t),this._k=r,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?_iterStep(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,_iterStep(1))}),r?"entries":"values",!r,!0),_setSpecies(t)}},SPECIES$1=_wks("species"),_arraySpeciesConstructor=function(e){var t;return _isArray(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!_isArray(t.prototype)||(t=void 0),_isObject(t)&&null===(t=t[SPECIES$1])&&(t=void 0)),void 0===t?Array:t},_arraySpeciesCreate=function(e,t){return new(_arraySpeciesConstructor(e))(t)},_arrayMethods=function(e,t){var r=1==e,o=2==e,n=3==e,i=4==e,s=6==e,a=5==e||s,c=t||_arraySpeciesCreate;return function(t,u,l){for(var _,p,f=_toObject(t),h=_iobject(f),d=_ctx(u,l,3),y=_toLength(h.length),g=0,b=r?c(t,y):o?c(t,0):void 0;y>g;g++)if((a||g in h)&&(p=d(_=h[g],g,f),e))if(r)b[g]=p;else if(p)switch(e){case 3:return!0;case 5:return _;case 6:return g;case 2:b.push(_)}else if(i)return!1;return s?-1:n||i?i:b}},dP$3=_objectDp.f,each=_arrayMethods(0),_collection=function(e,t,r,o,n,i){var s=_global[e],a=s,c=n?"set":"add",u=a&&a.prototype,l={};return _descriptors&&"function"==typeof a&&(i||u.forEach&&!_fails((function(){(new a).entries().next()})))?(a=t((function(t,r){_anInstance(t,a,e,"_c"),t._c=new s,null!=r&&_forOf(r,n,t[c],t)})),each("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),(function(e){var t="add"==e||"set"==e;!(e in u)||i&&"clear"==e||_hide(a.prototype,e,(function(r,o){if(_anInstance(this,a,e),!t&&i&&!_isObject(r))return"get"==e&&void 0;var n=this._c[e](0===r?0:r,o);return t?this:n}))})),i||dP$3(a.prototype,"size",{get:function(){return this._c.size}})):(a=o.getConstructor(t,e,n,c),_redefineAll(a.prototype,r),_meta.NEED=!0),_setToStringTag(a,e),l[e]=a,_export(_export.G+_export.W+_export.F,l),i||o.setStrong(a,e,n),a},MAP="Map",es6_map=_collection(MAP,(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=_collectionStrong.getEntry(_validateCollection(this,MAP),e);return t&&t.v},set:function(e,t){return _collectionStrong.def(_validateCollection(this,MAP),0===e?0:e,t)}},_collectionStrong,!0),_arrayFromIterable=function(e,t){var r=[];return _forOf(e,!1,r.push,r,t),r},_collectionToJson=function(e){return function(){if(_classof(this)!=e)throw TypeError(e+"#toJSON isn't generic");return _arrayFromIterable(this)}};_export(_export.P+_export.R,"Map",{toJSON:_collectionToJson("Map")});var _setCollectionOf=function(e){_export(_export.S,e,{of:function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];return new this(t)}})};_setCollectionOf("Map");var _setCollectionFrom=function(e){_export(_export.S,e,{from:function(e){var t,r,o,n,i=arguments[1];return _aFunction(this),(t=void 0!==i)&&_aFunction(i),null==e?new this:(r=[],t?(o=0,n=_ctx(i,arguments[2],2),_forOf(e,!1,(function(e){r.push(n(e,o++))}))):_forOf(e,!1,r.push,r),new this(r))}})};_setCollectionFrom("Map");var defer,channel,port,map=_core.Map,map$1=map,SPECIES$2=_wks("species"),_speciesConstructor=function(e,t){var r,o=_anObject(e).constructor;return void 0===o||null==(r=_anObject(o)[SPECIES$2])?t:_aFunction(r)},_invoke=function(e,t,r){var o=void 0===r;switch(t.length){case 0:return o?e():e.call(r);case 1:return o?e(t[0]):e.call(r,t[0]);case 2:return o?e(t[0],t[1]):e.call(r,t[0],t[1]);case 3:return o?e(t[0],t[1],t[2]):e.call(r,t[0],t[1],t[2]);case 4:return o?e(t[0],t[1],t[2],t[3]):e.call(r,t[0],t[1],t[2],t[3])}return e.apply(r,t)},process=_global.process,setTask=_global.setImmediate,clearTask=_global.clearImmediate,MessageChannel=_global.MessageChannel,Dispatch=_global.Dispatch,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",run=function(){var e=+this;if(queue.hasOwnProperty(e)){var t=queue[e];delete queue[e],t()}},listener=function(e){run.call(e.data)};setTask&&clearTask||(setTask=function(e){for(var t=[],r=1;arguments.length>r;)t.push(arguments[r++]);return queue[++counter]=function(){_invoke("function"==typeof e?e:Function(e),t)},defer(counter),counter},clearTask=function(e){delete queue[e]},"process"==_cof(process)?defer=function(e){process.nextTick(_ctx(run,e,1))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(_ctx(run,e,1))}:MessageChannel?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=listener,defer=_ctx(port.postMessage,port,1)):_global.addEventListener&&"function"==typeof postMessage&&!_global.importScripts?(defer=function(e){_global.postMessage(e+"","*")},_global.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in _domCreate("script")?function(e){_html.appendChild(_domCreate("script"))[ONREADYSTATECHANGE]=function(){_html.removeChild(this),run.call(e)}}:function(e){setTimeout(_ctx(run,e,1),0)});var _task={set:setTask,clear:clearTask},macrotask=_task.set,Observer=_global.MutationObserver||_global.WebKitMutationObserver,process$1=_global.process,Promise=_global.Promise,isNode="process"==_cof(process$1),_microtask=function(){var e,t,r,o=function(){var o,n;for(isNode&&(o=process$1.domain)&&o.exit();e;){n=e.fn,e=e.next;try{n()}catch(o){throw e?r():t=void 0,o}}t=void 0,o&&o.enter()};if(isNode)r=function(){process$1.nextTick(o)};else if(!Observer||_global.navigator&&_global.navigator.standalone)if(Promise&&Promise.resolve){var n=Promise.resolve(void 0);r=function(){n.then(o)}}else r=function(){macrotask.call(_global,o)};else{var i=!0,s=document.createTextNode("");new Observer(o).observe(s,{characterData:!0}),r=function(){s.data=i=!i}}return function(o){var n={fn:o,next:void 0};t&&(t.next=n),e||(e=n,r()),t=n}};function PromiseCapability(e){var t,r;this.promise=new e((function(e,o){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=o})),this.resolve=_aFunction(t),this.reject=_aFunction(r)}var f$7=function(e){return new PromiseCapability(e)},_newPromiseCapability={f:f$7},_perform=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}},navigator=_global.navigator,_userAgent=navigator&&navigator.userAgent||"",_promiseResolve=function(e,t){if(_anObject(e),_isObject(t)&&t.constructor===e)return t;var r=_newPromiseCapability.f(e);return(0,r.resolve)(t),r.promise},ITERATOR$3=_wks("iterator"),SAFE_CLOSING=!1;try{var riter=[7][ITERATOR$3]();riter.return=function(){SAFE_CLOSING=!0},Array.from(riter,(function(){throw 2}))}catch(e){}var Internal,newGenericPromiseCapability,OwnPromiseCapability,Wrapper,_iterDetect=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var r=!1;try{var o=[7],n=o[ITERATOR$3]();n.next=function(){return{done:r=!0}},o[ITERATOR$3]=function(){return n},e(o)}catch(e){}return r},task=_task.set,microtask=_microtask(),PROMISE="Promise",TypeError$1=_global.TypeError,process$2=_global.process,versions=process$2&&process$2.versions,v8=versions&&versions.v8||"",$Promise=_global[PROMISE],isNode$1="process"==_classof(process$2),empty=function(){},newPromiseCapability=newGenericPromiseCapability=_newPromiseCapability.f,USE_NATIVE$1=!!function(){try{var e=$Promise.resolve(1),t=(e.constructor={})[_wks("species")]=function(e){e(empty,empty)};return(isNode$1||"function"==typeof PromiseRejectionEvent)&&e.then(empty)instanceof t&&0!==v8.indexOf("6.6")&&-1===_userAgent.indexOf("Chrome/66")}catch(e){}}(),isThenable=function(e){var t;return!(!_isObject(e)||"function"!=typeof(t=e.then))&&t},notify=function(e,t){if(!e._n){e._n=!0;var r=e._c;microtask((function(){for(var o=e._v,n=1==e._s,i=0,s=function(t){var r,i,s,a=n?t.ok:t.fail,c=t.resolve,u=t.reject,l=t.domain;try{a?(n||(2==e._h&&onHandleUnhandled(e),e._h=1),!0===a?r=o:(l&&l.enter(),r=a(o),l&&(l.exit(),s=!0)),r===t.promise?u(TypeError$1("Promise-chain cycle")):(i=isThenable(r))?i.call(r,c,u):c(r)):u(o)}catch(e){l&&!s&&l.exit(),u(e)}};r.length>i;)s(r[i++]);e._c=[],e._n=!1,t&&!e._h&&onUnhandled(e)}))}},onUnhandled=function(e){task.call(_global,(function(){var t,r,o,n=e._v,i=isUnhandled(e);if(i&&(t=_perform((function(){isNode$1?process$2.emit("unhandledRejection",n,e):(r=_global.onunhandledrejection)?r({promise:e,reason:n}):(o=_global.console)&&o.error&&o.error("Unhandled promise rejection",n)})),e._h=isNode$1||isUnhandled(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},isUnhandled=function(e){return 1!==e._h&&0===(e._a||e._c).length},onHandleUnhandled=function(e){task.call(_global,(function(){var t;isNode$1?process$2.emit("rejectionHandled",e):(t=_global.onrejectionhandled)&&t({promise:e,reason:e._v})}))},$reject=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),notify(t,!0))},$resolve=function(e){var t,r=this;if(!r._d){r._d=!0,r=r._w||r;try{if(r===e)throw TypeError$1("Promise can't be resolved itself");(t=isThenable(e))?microtask((function(){var o={_w:r,_d:!1};try{t.call(e,_ctx($resolve,o,1),_ctx($reject,o,1))}catch(e){$reject.call(o,e)}})):(r._v=e,r._s=1,notify(r,!1))}catch(e){$reject.call({_w:r,_d:!1},e)}}};USE_NATIVE$1||($Promise=function(e){_anInstance(this,$Promise,PROMISE,"_h"),_aFunction(e),Internal.call(this);try{e(_ctx($resolve,this,1),_ctx($reject,this,1))}catch(e){$reject.call(this,e)}},(Internal=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=_redefineAll($Promise.prototype,{then:function(e,t){var r=newPromiseCapability(_speciesConstructor(this,$Promise));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=isNode$1?process$2.domain:void 0,this._c.push(r),this._a&&this._a.push(r),this._s&&notify(this,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),OwnPromiseCapability=function(){var e=new Internal;this.promise=e,this.resolve=_ctx($resolve,e,1),this.reject=_ctx($reject,e,1)},_newPromiseCapability.f=newPromiseCapability=function(e){return e===$Promise||e===Wrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)}),_export(_export.G+_export.W+_export.F*!USE_NATIVE$1,{Promise:$Promise}),_setToStringTag($Promise,PROMISE),_setSpecies(PROMISE),Wrapper=_core[PROMISE],_export(_export.S+_export.F*!USE_NATIVE$1,PROMISE,{reject:function(e){var t=newPromiseCapability(this);return(0,t.reject)(e),t.promise}}),_export(_export.S+_export.F*_library,PROMISE,{resolve:function(e){return _promiseResolve(this===Wrapper?$Promise:this,e)}}),_export(_export.S+_export.F*!(USE_NATIVE$1&&_iterDetect((function(e){$Promise.all(e).catch(empty)}))),PROMISE,{all:function(e){var t=this,r=newPromiseCapability(t),o=r.resolve,n=r.reject,i=_perform((function(){var r=[],i=0,s=1;_forOf(e,!1,(function(e){var a=i++,c=!1;r.push(void 0),s++,t.resolve(e).then((function(e){c||(c=!0,r[a]=e,--s||o(r))}),n)})),--s||o(r)}));return i.e&&n(i.v),r.promise},race:function(e){var t=this,r=newPromiseCapability(t),o=r.reject,n=_perform((function(){_forOf(e,!1,(function(e){t.resolve(e).then(r.resolve,o)}))}));return n.e&&o(n.v),r.promise}}),_export(_export.P+_export.R,"Promise",{finally:function(e){var t=_speciesConstructor(this,_core.Promise||_global.Promise),r="function"==typeof e;return this.then(r?function(r){return _promiseResolve(t,e()).then((function(){return r}))}:e,r?function(r){return _promiseResolve(t,e()).then((function(){throw r}))}:e)}}),_export(_export.S,"Promise",{try:function(e){var t=_newPromiseCapability.f(this),r=_perform(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}});var promise=_core.Promise,promise$1=promise,$assign=Object.assign,_objectAssign=!$assign||_fails((function(){var e={},t={},r=Symbol(),o="abcdefghijklmnopqrst";return e[r]=7,o.split("").forEach((function(e){t[e]=e})),7!=$assign({},e)[r]||Object.keys($assign({},t)).join("")!=o}))?function(e,t){for(var r=_toObject(e),o=arguments.length,n=1,i=_objectGops.f,s=_objectPie.f;o>n;)for(var a,c=_iobject(arguments[n++]),u=i?_objectKeys(c).concat(i(c)):_objectKeys(c),l=u.length,_=0;l>_;)a=u[_++],_descriptors&&!s.call(c,a)||(r[a]=c[a]);return r}:$assign;_export(_export.S+_export.F,"Object",{assign:_objectAssign});var assign=_core.Object.assign,assign$1=assign,freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$1=root.Symbol,objectProto=Object.prototype,hasOwnProperty$1=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=Symbol$1?Symbol$1.toStringTag:void 0;function getRawTag(e){var t=hasOwnProperty$1.call(e,symToStringTag),r=e[symToStringTag];try{e[symToStringTag]=void 0;var o=!0}catch(e){}var n=nativeObjectToString.call(e);return o&&(t?e[symToStringTag]=r:delete e[symToStringTag]),n}var objectProto$1=Object.prototype,nativeObjectToString$1=objectProto$1.toString;function objectToString(e){return nativeObjectToString$1.call(e)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag$1=Symbol$1?Symbol$1.toStringTag:void 0;function baseGetTag(e){return null==e?void 0===e?undefinedTag:nullTag:symToStringTag$1&&symToStringTag$1 in Object(e)?getRawTag(e):objectToString(e)}function isObject(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction(e){if(!isObject(e))return!1;var t=baseGetTag(e);return t==funcTag||t==genTag||t==asyncTag||t==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var e=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function isMasked(e){return!!maskSrcKey&&maskSrcKey in e}var funcProto=Function.prototype,funcToString=funcProto.toString;function toSource(e){if(null!=e){try{return funcToString.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$2=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$2).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(e){return!(!isObject(e)||isMasked(e))&&(isFunction(e)?reIsNative:reIsHostCtor).test(toSource(e))}function getValue(e,t){return null==e?void 0:e[t]}function getNative(e,t){var r=getValue(e,t);return baseIsNative(r)?r:void 0}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var HASH_UNDEFINED="__lodash_hash_undefined__",objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function hashGet(e){var t=this.__data__;if(nativeCreate){var r=t[e];return r===HASH_UNDEFINED?void 0:r}return hasOwnProperty$3.call(t,e)?t[e]:void 0}var objectProto$4=Object.prototype,hasOwnProperty$4=objectProto$4.hasOwnProperty;function hashHas(e){var t=this.__data__;return nativeCreate?void 0!==t[e]:hasOwnProperty$4.call(t,e)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=nativeCreate&&void 0===t?HASH_UNDEFINED$1:t,this}function Hash(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}function listCacheClear(){this.__data__=[],this.size=0}function eq(e,t){return e===t||e!=e&&t!=t}function assocIndexOf(e,t){for(var r=e.length;r--;)if(eq(e[r][0],t))return r;return-1}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;var arrayProto=Array.prototype,splice=arrayProto.splice;function listCacheDelete(e){var t=this.__data__,r=assocIndexOf(t,e);return!(r<0)&&(r==t.length-1?t.pop():splice.call(t,r,1),--this.size,!0)}function listCacheGet(e){var t=this.__data__,r=assocIndexOf(t,e);return r<0?void 0:t[r][1]}function listCacheHas(e){return assocIndexOf(this.__data__,e)>-1}function listCacheSet(e,t){var r=this.__data__,o=assocIndexOf(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}function ListCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function isKeyable(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}function getMapData(e,t){var r=e.__data__;return isKeyable(t)?r["string"==typeof t?"string":"hash"]:r.map}function mapCacheDelete(e){var t=getMapData(this,e).delete(e);return this.size-=t?1:0,t}function mapCacheGet(e){return getMapData(this,e).get(e)}function mapCacheHas(e){return getMapData(this,e).has(e)}function mapCacheSet(e,t){var r=getMapData(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}function MapCache(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var HASH_UNDEFINED$2="__lodash_hash_undefined__";function setCacheAdd(e){return this.__data__.set(e,HASH_UNDEFINED$2),this}function setCacheHas(e){return this.__data__.has(e)}function SetCache(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new MapCache;++t<r;)this.add(e[t])}function baseFindIndex(e,t,r,o){for(var n=e.length,i=r+(o?1:-1);o?i--:++i<n;)if(t(e[i],i,e))return i;return-1}function baseIsNaN(e){return e!=e}function strictIndexOf(e,t,r){for(var o=r-1,n=e.length;++o<n;)if(e[o]===t)return o;return-1}function baseIndexOf(e,t,r){return t==t?strictIndexOf(e,t,r):baseFindIndex(e,baseIsNaN,r)}function arrayIncludes(e,t){return!!(null==e?0:e.length)&&baseIndexOf(e,t,0)>-1}function arrayIncludesWith(e,t,r){for(var o=-1,n=null==e?0:e.length;++o<n;)if(r(t,e[o]))return!0;return!1}function cacheHas(e,t){return e.has(t)}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;var Set=getNative(root,"Set");function noop(){}function setToArray(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}var INFINITY=1/0,createSet=Set&&1/setToArray(new Set([,-0]))[1]==INFINITY?function(e){return new Set(e)}:noop,LARGE_ARRAY_SIZE=200;function baseUniq(e,t,r){var o=-1,n=arrayIncludes,i=e.length,s=!0,a=[],c=a;if(r)s=!1,n=arrayIncludesWith;else if(i>=LARGE_ARRAY_SIZE){var u=t?null:createSet(e);if(u)return setToArray(u);s=!1,n=cacheHas,c=new SetCache}else c=t?[]:a;e:for(;++o<i;){var l=e[o],_=t?t(l):l;if(l=r||0!==l?l:0,s&&_==_){for(var p=c.length;p--;)if(c[p]===_)continue e;t&&c.push(_),a.push(l)}else n(c,_,r)||(c!==a&&c.push(_),a.push(l))}return a}function uniqWith(e,t){return t="function"==typeof t?t:void 0,e&&e.length?baseUniq(e,void 0,t):[]}const bowser=global.navigator&&global.navigator.userAgent?Bowser.getParser(global.navigator.userAgent).getBrowser():null,browser=bowser&&bowser.name&&bowser.version?{name:bowser.name,version:bowser.version}:null;class Log{constructor(e={}){assign$1(this,{version:"1.2",entries:[],pages:[]},e),!this.browser&&browser&&(this.browser=browser)}addEntries(e=[]){this.entries=uniqWith([...e,...this.entries],(e,t)=>e._id===t._id&&e._order===t._order)}sortEntries(){this.entries=this.entries.sort((e,t)=>new Date(e.startedDateTime)-new Date(t.startedDateTime))}}class HAR{constructor(e={}){this.log=new Log(e.log)}}var _stringWs="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",space="["+_stringWs+"]",non="​…",ltrim=RegExp("^"+space+space+"*"),rtrim=RegExp(space+space+"*$"),exporter=function(e,t,r){var o={},n=_fails((function(){return!!_stringWs[e]()||non[e]()!=non})),i=o[e]=n?t(trim):_stringWs[e];r&&(o[r]=i),_export(_export.P+_export.F*n,"String",o)},trim=exporter.trim=function(e,t){return e=String(_defined(e)),1&t&&(e=e.replace(ltrim,"")),2&t&&(e=e.replace(rtrim,"")),e},_stringTrim=exporter,$parseInt=_global.parseInt,$trim=_stringTrim.trim,hex=/^[-+]?0[xX]/,_parseInt=8!==$parseInt(_stringWs+"08")||22!==$parseInt(_stringWs+"0x16")?function(e,t){var r=$trim(String(e),3);return $parseInt(r,t>>>0||(hex.test(r)?16:10))}:$parseInt;_export(_export.G+_export.F*(parseInt!=_parseInt),{parseInt:_parseInt});var _parseInt$1=_core.parseInt,_parseInt$2=_parseInt$1;const{keys:keys$2}=Object,{isArray:isArray}=Array;function toNVPairs(e){return keys$2(e||{}).reduce((t,r)=>{const o=e[r];return isArray(o)?t.push(...o.map(e=>({name:r,value:e,_fromType:"array"}))):t.push({name:r,value:o}),t},[])}const{isArray:isArray$1}=Array;function getFirstHeader(e,t){const r=e.getHeader(t);return isArray$1(r)?r.length>0?r[0]:"":r}function headersSize(e){const t=[],r=[];e.headers.forEach(({name:e,value:o})=>{t.push(e),r.push(o)});const o=e.method+e.url+t.join()+r.join();return getByteLength(o)+2*t.length+2+12+2}class Request{constructor(e){this.httpVersion="HTTP/1.1",this.url=e.absoluteUrl,this.method=e.method,this.headers=toNVPairs(e.headers),this.headersSize=headersSize(this),this.queryString=toNVPairs(e.query),this.cookies=setCookies.parse(e.getHeader("Set-Cookie")),e.body&&(this.postData={mimeType:getFirstHeader(e,"Content-Type")||"text/plain",params:[]},"string"==typeof e.body&&(this.postData.text=e.body));const t=getFirstHeader(e,"Content-Length");this.bodySize=t?_parseInt$2(t,10):this.postData&&this.postData.text?getByteLength(this.postData.text):0}}function headersSize$1(e){const t=[],r=[];e.headers.forEach(({name:e,value:o})=>{t.push(e),r.push(o)});const o=t.join()+r.join();return getByteLength(o)+2*t.length+2+2}class Response{constructor(e){this.httpVersion="HTTP/1.1",this.status=e.statusCode,this.statusText=e.statusText,this.headers=toNVPairs(e.headers),this.headersSize=headersSize$1(this),this.cookies=setCookies.parse(e.getHeader("Set-Cookie")),this.redirectURL=getFirstHeader(e,"Location")||"",this.content={mimeType:getFirstHeader(e,"Content-Type")||"text/plain"},e.body&&"string"==typeof e.body&&(this.content.text=e.body,e.encoding&&(this.content.encoding=e.encoding));const t=getFirstHeader(e,"Content-Length");this.content.size=t?_parseInt$2(t,10):this.content.text?getByteLength(this.content.text):0,this.bodySize=this.content.size}}const{keys:keys$3}=Object;function totalTime(e={}){return keys$3(e).reduce((t,r)=>e[r]>0?t+=e[r]:t,0)}class Entry{constructor(e){this._id=e.id,this._order=e.order,this.startedDateTime=e.timestamp,this.request=new Request(e),this.response=new Response(e.response),this.cache={},this.timings={blocked:-1,dns:-1,connect:-1,send:0,wait:e.responseTime,receive:0,ssl:-1},this.time=totalTime(this.timings)}}function ownKeys(e,t){var r=keys$1(e);if(getOwnPropertySymbols$1){var o=getOwnPropertySymbols$1(e);t&&(o=o.filter((function(t){return getOwnPropertyDescriptor$1(e,t).enumerable}))),r.push.apply(r,o)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):getOwnPropertyDescriptors$1?defineProperties$1(e,getOwnPropertyDescriptors$1(r)):ownKeys(Object(r)).forEach((function(t){defineProperty$2(e,t,getOwnPropertyDescriptor$1(r,t))}))}return e}const CREATOR_NAME="Polly.JS";class Persister{constructor(e){this.polly=e,this.pending=new map$1,this._cache=new map$1}static get type(){return"persister"}static get id(){utils.assert("Must override the static `id` getter.")}get defaultOptions(){return{}}get options(){return _objectSpread(_objectSpread({},this.defaultOptions||{}),(this.polly.config.persisterOptions||{})[this.constructor.id]||{})}get hasPending(){return this.pending.size>0}async persist(){if(!this.hasPending)return;const e=[],t={name:"Polly.JS",version:this.polly.constructor.VERSION,comment:`${this.constructor.type}:${this.constructor.id}`};for(const[r,{name:o,requests:n}]of this.pending){const i=[],s=await this.findRecording(r);let a;a=new HAR(s||{log:{creator:t,_recordingName:o}});for(const e of n){const t=new Entry(e);this.assert(`Cannot persist response for [${t.request.method}] ${t.request.url} because the status code was ${t.response.status} and \`recordFailedRequests\` is \`false\``,t.response.status<400||e.config.recordFailedRequests),await e._emit("beforePersist",t),i.push(t)}a.log.addEntries(i),this.polly.config.persisterOptions.disableSortingHarEntries||a.log.sortEntries(),this.polly.config.persisterOptions.keepUnusedRequests||this._removeUnusedEntries(r,a),e.push(this.saveRecording(r,a))}await promise$1.all(e),this.pending.clear()}recordRequest(e){this.assert("You must pass a PollyRequest to 'recordRequest'.",e),this.assert("Cannot save a request with no response.",e.didRespond);const{recordingId:t,recordingName:r}=e;this.pending.has(t)||this.pending.set(t,{name:r,requests:[]}),this.pending.get(t).requests.push(e)}async findRecording(e){const{_cache:t}=this;if(!t.has(e)){const r=async()=>{const r=await this.onFindRecording(e);return r?(this.assert(`Recording with id '${e}' is invalid. Please delete the recording so a new one can be created.`,r.log&&"Polly.JS"===r.log.creator.name),r):(t.delete(e),null)};t.set(e,r())}return t.get(e)}onFindRecording(){this.assert("Must implement the `onFindRecording` hook.")}async saveRecording(e,t){await this.onSaveRecording(...arguments),this._cache.delete(e),this.polly.logger.log.debug("Recording saved.",{recordingId:e,har:t})}onSaveRecording(){this.assert("Must implement the `onSaveRecording` hook.")}async deleteRecording(e){await this.onDeleteRecording(...arguments),this._cache.delete(e)}onDeleteRecording(){this.assert("Must implement the `onDeleteRecording` hook.")}async findEntry(e){const{id:t,order:r,recordingId:o}=e,n=await this.findRecording(o);return n&&n.log.entries.find(e=>e._id===t&&e._order===r)||null}stringify(){return stringify(...arguments)}assert(e,...t){utils.assert(`[${this.constructor.type}:${this.constructor.id}] ${e}`,...t)}_removeUnusedEntries(e,t){const r=this.polly._requests.filter(t=>t.recordingId===e&&(t.action===utils.ACTIONS.RECORD||t.action===utils.ACTIONS.REPLAY));t.log.entries=t.log.entries.filter(e=>r.find(t=>e._id===t.id&&e._order===t.order))}}module.exports=Persister;
//# sourceMappingURL=pollyjs-persister.min.js.map

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

import t from"fast-json-stable-stringify";import{assert as e,ACTIONS as n}from"@pollyjs/utils";import r from"bowser";import o from"utf8-byte-length";import i from"set-cookie-parser";var s=Object.freeze({}),c=Math.ceil,u=Math.floor,a=function(t){return isNaN(t=+t)?0:(t>0?u:c)(t)},f=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t};function l(t,e){return t(e={exports:{}},e.exports),e.exports}var h=l(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)}),p=l(function(t){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)}),v=(p.version,function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}),d=function(t,e,n){if(v(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},y=function(t){return"object"==typeof t?null!==t:"function"==typeof t},g=function(t){if(!y(t))throw TypeError(t+" is not an object!");return t},_=function(t){try{return!!t()}catch(t){return!0}},m=!_(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),b=h.document,w=y(b)&&y(b.createElement),O=function(t){return w?b.createElement(t):{}},S=!m&&!_(function(){return 7!=Object.defineProperty(O("div"),"a",{get:function(){return 7}}).a}),j=function(t,e){if(!y(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!y(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!y(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!y(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},P=Object.defineProperty,E={f:m?Object.defineProperty:function(t,e,n){if(g(t),e=j(e,!0),g(n),S)try{return P(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},T=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},k=m?function(t,e,n){return E.f(t,e,T(1,n))}:function(t,e,n){return t[e]=n,t},x={}.hasOwnProperty,M=function(t,e){return x.call(t,e)},R=function(t,e,n){var r,o,i,s=t&R.F,c=t&R.G,u=t&R.S,a=t&R.P,f=t&R.B,l=t&R.W,v=c?p:p[e]||(p[e]={}),y=v.prototype,g=c?h:u?h[e]:(h[e]||{}).prototype;for(r in c&&(n=e),n)(o=!s&&g&&void 0!==g[r])&&M(v,r)||(i=o?g[r]:n[r],v[r]=c&&"function"!=typeof g[r]?n[r]:f&&o?d(i,h):l&&g[r]==i?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(i):a&&"function"==typeof i?d(Function.call,i):i,a&&((v.virtual||(v.virtual={}))[r]=i,t&R.R&&y&&!y[r]&&k(y,r,i)))};R.F=1,R.G=2,R.S=4,R.P=8,R.B=16,R.W=32,R.U=64,R.R=128;var F,A=R,L=k,C={},z={}.toString,N=function(t){return z.call(t).slice(8,-1)},D=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==N(t)?t.split(""):Object(t)},I=function(t){return D(f(t))},q=Math.min,$=function(t){return t>0?q(a(t),9007199254740991):0},G=Math.max,H=Math.min,U=l(function(t){var e=h["__core-js_shared__"]||(h["__core-js_shared__"]={});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:p.version,mode:"pure",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),V=0,W=Math.random(),B=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++V+W).toString(36))},J=U("keys"),K=function(t){return J[t]||(J[t]=B(t))},Y=(F=!1,function(t,e,n){var r,o=I(t),i=$(o.length),s=function(t,e){return(t=a(t))<0?G(t+e,0):H(t,e)}(n,i);if(F&&e!=e){for(;i>s;)if((r=o[s++])!=r)return!0}else for(;i>s;s++)if((F||s in o)&&o[s]===e)return F||s||0;return!F&&-1}),Q=K("IE_PROTO"),X=function(t,e){var n,r=I(t),o=0,i=[];for(n in r)n!=Q&&M(r,n)&&i.push(n);for(;e.length>o;)M(r,n=e[o++])&&(~Y(i,n)||i.push(n));return i},Z="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),tt=Object.keys||function(t){return X(t,Z)},et=m?Object.defineProperties:function(t,e){g(t);for(var n,r=tt(e),o=r.length,i=0;o>i;)E.f(t,n=r[i++],e[n]);return t},nt=h.document,rt=nt&&nt.documentElement,ot=K("IE_PROTO"),it=function(){},st=function(){var t,e=O("iframe"),n=Z.length;for(e.style.display="none",rt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),st=t.F;n--;)delete st.prototype[Z[n]];return st()},ct=Object.create||function(t,e){var n;return null!==t?(it.prototype=g(t),n=new it,it.prototype=null,n[ot]=t):n=st(),void 0===e?n:et(n,e)},ut=l(function(t){var e=U("wks"),n=h.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:B)("Symbol."+t))}).store=e}),at=E.f,ft=ut("toStringTag"),lt=function(t,e,n){t&&!M(t=n?t:t.prototype,ft)&&at(t,ft,{configurable:!0,value:e})},ht={};k(ht,ut("iterator"),function(){return this});var pt,vt=function(t,e,n){t.prototype=ct(ht,{next:T(1,n)}),lt(t,e+" Iterator")},dt=function(t){return Object(f(t))},yt=K("IE_PROTO"),gt=Object.prototype,_t=Object.getPrototypeOf||function(t){return t=dt(t),M(t,yt)?t[yt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?gt:null},mt=ut("iterator"),bt=!([].keys&&"next"in[].keys()),wt=function(){return this},Ot=function(t,e,n,r,o,i,s){vt(n,e,r);var c,u,a,f=function(t){if(!bt&&t in v)return v[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h="values"==o,p=!1,v=t.prototype,d=v[mt]||v["@@iterator"]||o&&v[o],y=d||f(o),g=o?h?f("entries"):y:void 0,_="Array"==e&&v.entries||d;if(_&&(a=_t(_.call(new t)))!==Object.prototype&&a.next&&lt(a,l,!0),h&&d&&"values"!==d.name&&(p=!0,y=function(){return d.call(this)}),s&&(bt||p||!v[mt])&&k(v,mt,y),C[e]=y,C[l]=wt,o)if(c={values:h?y:f("values"),keys:i?y:f("keys"),entries:g},s)for(u in c)u in v||L(v,u,c[u]);else A(A.P+A.F*(bt||p),e,c);return c},St=(pt=!0,function(t,e){var n,r,o=String(f(t)),i=a(e),s=o.length;return i<0||i>=s?pt?"":void 0:(n=o.charCodeAt(i))<55296||n>56319||i+1===s||(r=o.charCodeAt(i+1))<56320||r>57343?pt?o.charAt(i):n:pt?o.slice(i,i+2):r-56320+(n-55296<<10)+65536});Ot(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=St(e,n),this._i+=t.length,{value:t,done:!1})});var jt=function(t,e){return{value:e,done:!!t}};Ot(Array,"Array",function(t,e){this._t=I(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,jt(1)):jt(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");C.Arguments=C.Array;for(var Pt=ut("toStringTag"),Et="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(","),Tt=0;Tt<Et.length;Tt++){var kt=Et[Tt],xt=h[kt],Mt=xt&&xt.prototype;Mt&&!Mt[Pt]&&k(Mt,Pt,kt),C[kt]=C.Array}var Rt,Ft,At,Lt=ut("toStringTag"),Ct="Arguments"==N(function(){return arguments}()),zt=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Lt))?n:Ct?N(e):"Object"==(r=N(e))&&"function"==typeof e.callee?"Arguments":r},Nt=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},Dt=function(t,e,n,r){try{return r?e(g(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&g(o.call(t)),e}},It=ut("iterator"),qt=Array.prototype,$t=ut("iterator"),Gt=p.getIteratorMethod=function(t){if(null!=t)return t[$t]||t["@@iterator"]||C[zt(t)]},Ht=l(function(t){var e={},n={},r=t.exports=function(t,r,o,i,s){var c,u,a,f,l,h=s?function(){return t}:Gt(t),p=d(o,i,r?2:1),v=0;if("function"!=typeof h)throw TypeError(t+" is not iterable!");if(void 0===(l=h)||C.Array!==l&&qt[It]!==l){for(a=h.call(t);!(u=a.next()).done;)if((f=Dt(a,p,u.value,r))===e||f===n)return f}else for(c=$(t.length);c>v;v++)if((f=r?p(g(u=t[v])[0],u[1]):p(t[v]))===e||f===n)return f};r.BREAK=e,r.RETURN=n}),Ut=ut("species"),Vt=function(t,e){var n,r=g(t).constructor;return void 0===r||null==(n=g(r)[Ut])?e:v(n)},Wt=h.process,Bt=h.setImmediate,Jt=h.clearImmediate,Kt=h.MessageChannel,Yt=h.Dispatch,Qt=0,Xt={},Zt=function(){var t=+this;if(Xt.hasOwnProperty(t)){var e=Xt[t];delete Xt[t],e()}},te=function(t){Zt.call(t.data)};Bt&&Jt||(Bt=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Xt[++Qt]=function(){!function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}t.apply(n,e)}("function"==typeof t?t:Function(t),e)},Rt(Qt),Qt},Jt=function(t){delete Xt[t]},"process"==N(Wt)?Rt=function(t){Wt.nextTick(d(Zt,t,1))}:Yt&&Yt.now?Rt=function(t){Yt.now(d(Zt,t,1))}:Kt?(At=(Ft=new Kt).port2,Ft.port1.onmessage=te,Rt=d(At.postMessage,At,1)):h.addEventListener&&"function"==typeof postMessage&&!h.importScripts?(Rt=function(t){h.postMessage(t+"","*")},h.addEventListener("message",te,!1)):Rt="onreadystatechange"in O("script")?function(t){rt.appendChild(O("script")).onreadystatechange=function(){rt.removeChild(this),Zt.call(t)}}:function(t){setTimeout(d(Zt,t,1),0)});var ee={set:Bt,clear:Jt},ne=ee.set,re=h.MutationObserver||h.WebKitMutationObserver,oe=h.process,ie=h.Promise,se="process"==N(oe);function ce(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=v(e),this.reject=v(n)}var ue={f:function(t){return new ce(t)}},ae=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},fe=h.navigator,le=fe&&fe.userAgent||"",he=function(t,e){if(g(t),y(e)&&e.constructor===t)return e;var n=ue.f(t);return(0,n.resolve)(e),n.promise},pe=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:k(t,r,e[r]);return t},ve=ut("species"),de=function(t){var e="function"==typeof p[t]?p[t]:h[t];m&&e&&!e[ve]&&E.f(e,ve,{configurable:!0,get:function(){return this}})},ye=ut("iterator"),ge=!1;try{var _e=[7][ye]();_e.return=function(){ge=!0},Array.from(_e,function(){throw 2})}catch(t){}var me,be,we,Oe,Se,je=ee.set,Pe=function(){var t,e,n,r=function(){var r,o;for(se&&(r=oe.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(se)n=function(){oe.nextTick(r)};else if(!re||h.navigator&&h.navigator.standalone)if(ie&&ie.resolve){var o=ie.resolve(void 0);n=function(){o.then(r)}}else n=function(){ne.call(h,r)};else{var i=!0,s=document.createTextNode("");new re(r).observe(s,{characterData:!0}),n=function(){s.data=i=!i}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}(),Ee=h.TypeError,Te=h.process,ke=Te&&Te.versions,xe=ke&&ke.v8||"",Me=h.Promise,Re="process"==zt(Te),Fe=function(){},Ae=be=ue.f,Le=!!function(){try{var t=Me.resolve(1),e=(t.constructor={})[ut("species")]=function(t){t(Fe,Fe)};return(Re||"function"==typeof PromiseRejectionEvent)&&t.then(Fe)instanceof e&&0!==xe.indexOf("6.6")&&-1===le.indexOf("Chrome/66")}catch(t){}}(),Ce=function(t){var e;return!(!y(t)||"function"!=typeof(e=t.then))&&e},ze=function(t,e){if(!t._n){t._n=!0;var n=t._c;Pe(function(){for(var r=t._v,o=1==t._s,i=0,s=function(e){var n,i,s,c=o?e.ok:e.fail,u=e.resolve,a=e.reject,f=e.domain;try{c?(o||(2==t._h&&Ie(t),t._h=1),!0===c?n=r:(f&&f.enter(),n=c(r),f&&(f.exit(),s=!0)),n===e.promise?a(Ee("Promise-chain cycle")):(i=Ce(n))?i.call(n,u,a):u(n)):a(r)}catch(t){f&&!s&&f.exit(),a(t)}};n.length>i;)s(n[i++]);t._c=[],t._n=!1,e&&!t._h&&Ne(t)})}},Ne=function(t){je.call(h,function(){var e,n,r,o=t._v,i=De(t);if(i&&(e=ae(function(){Re?Te.emit("unhandledRejection",o,t):(n=h.onunhandledrejection)?n({promise:t,reason:o}):(r=h.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=Re||De(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},De=function(t){return 1!==t._h&&0===(t._a||t._c).length},Ie=function(t){je.call(h,function(){var e;Re?Te.emit("rejectionHandled",t):(e=h.onrejectionhandled)&&e({promise:t,reason:t._v})})},qe=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()),ze(e,!0))},$e=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw Ee("Promise can't be resolved itself");(e=Ce(t))?Pe(function(){var r={_w:n,_d:!1};try{e.call(t,d($e,r,1),d(qe,r,1))}catch(t){qe.call(r,t)}}):(n._v=t,n._s=1,ze(n,!1))}catch(t){qe.call({_w:n,_d:!1},t)}}};Le||(Me=function(t){Nt(this,Me,"Promise","_h"),v(t),me.call(this);try{t(d($e,this,1),d(qe,this,1))}catch(t){qe.call(this,t)}},(me=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=pe(Me.prototype,{then:function(t,e){var n=Ae(Vt(this,Me));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=Re?Te.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&ze(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),we=function(){var t=new me;this.promise=t,this.resolve=d($e,t,1),this.reject=d(qe,t,1)},ue.f=Ae=function(t){return t===Me||t===Oe?new we(t):be(t)}),A(A.G+A.W+A.F*!Le,{Promise:Me}),lt(Me,"Promise"),de("Promise"),Oe=p.Promise,A(A.S+A.F*!Le,"Promise",{reject:function(t){var e=Ae(this);return(0,e.reject)(t),e.promise}}),A(A.S+!0*A.F,"Promise",{resolve:function(t){return he(this===Oe?Me:this,t)}}),A(A.S+A.F*!(Le&&function(t,e){if(!e&&!ge)return!1;var n=!1;try{var r=[7],o=r[ye]();o.next=function(){return{done:n=!0}},r[ye]=function(){return o},t(r)}catch(t){}return n}(function(t){Me.all(t).catch(Fe)})),"Promise",{all:function(t){var e=this,n=Ae(e),r=n.resolve,o=n.reject,i=ae(function(){var n=[],i=0,s=1;Ht(t,!1,function(t){var c=i++,u=!1;n.push(void 0),s++,e.resolve(t).then(function(t){u||(u=!0,n[c]=t,--s||r(n))},o)}),--s||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=Ae(e),r=n.reject,o=ae(function(){Ht(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}}),A(A.P+A.R,"Promise",{finally:function(t){var e=Vt(this,p.Promise||h.Promise),n="function"==typeof t;return this.then(n?function(n){return he(e,t()).then(function(){return n})}:t,n?function(n){return he(e,t()).then(function(){throw n})}:t)}}),A(A.S,"Promise",{try:function(t){var e=ue.f(this),n=ae(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}}),(Se=s)&&Se.default;var Ge=p.Promise,He={f:{}.propertyIsEnumerable},Ue=Object.getOwnPropertyDescriptor,Ve={f:m?Ue:function(t,e){if(t=I(t),e=j(e,!0),S)try{return Ue(t,e)}catch(t){}if(M(t,e))return T(!He.f.call(t,e),t[e])}},We=function(t,e){var n=(p.Object||{})[t]||Object[t],r={};r[t]=e(n),A(A.S+A.F*_(function(){n(1)}),"Object",r)},Be=Ve.f;We("getOwnPropertyDescriptor",function(){return function(t,e){return Be(I(t),e)}});var Je=p.Object,Ke=function(t,e){return Je.getOwnPropertyDescriptor(t,e)},Ye=l(function(t){var e=B("meta"),n=E.f,r=0,o=Object.isExtensible||function(){return!0},i=!_(function(){return o(Object.preventExtensions({}))}),s=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},c=t.exports={KEY:e,NEED:!1,fastKey:function(t,n){if(!y(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!M(t,e)){if(!o(t))return"F";if(!n)return"E";s(t)}return t[e].i},getWeak:function(t,n){if(!M(t,e)){if(!o(t))return!0;if(!n)return!1;s(t)}return t[e].w},onFreeze:function(t){return i&&c.NEED&&o(t)&&!M(t,e)&&s(t),t}}}),Qe=(Ye.KEY,Ye.NEED,Ye.fastKey,Ye.getWeak,Ye.onFreeze,{f:ut}),Xe=E.f,Ze=function(t){var e=p.Symbol||(p.Symbol={});"_"==t.charAt(0)||t in e||Xe(e,t,{value:Qe.f(t)})},tn={f:Object.getOwnPropertySymbols},en=Array.isArray||function(t){return"Array"==N(t)},nn=Z.concat("length","prototype"),rn={f:Object.getOwnPropertyNames||function(t){return X(t,nn)}},on=rn.f,sn={}.toString,cn="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],un={f:function(t){return cn&&"[object Window]"==sn.call(t)?function(t){try{return on(t)}catch(t){return cn.slice()}}(t):on(I(t))}},an=Ye.KEY,fn=Ve.f,ln=E.f,hn=un.f,pn=h.Symbol,vn=h.JSON,dn=vn&&vn.stringify,yn=ut("_hidden"),gn=ut("toPrimitive"),_n={}.propertyIsEnumerable,mn=U("symbol-registry"),bn=U("symbols"),wn=U("op-symbols"),On=Object.prototype,Sn="function"==typeof pn&&!!tn.f,jn=h.QObject,Pn=!jn||!jn.prototype||!jn.prototype.findChild,En=m&&_(function(){return 7!=ct(ln({},"a",{get:function(){return ln(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=fn(On,e);r&&delete On[e],ln(t,e,n),r&&t!==On&&ln(On,e,r)}:ln,Tn=function(t){var e=bn[t]=ct(pn.prototype);return e._k=t,e},kn=Sn&&"symbol"==typeof pn.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof pn},xn=function(t,e,n){return t===On&&xn(wn,e,n),g(t),e=j(e,!0),g(n),M(bn,e)?(n.enumerable?(M(t,yn)&&t[yn][e]&&(t[yn][e]=!1),n=ct(n,{enumerable:T(0,!1)})):(M(t,yn)||ln(t,yn,T(1,{})),t[yn][e]=!0),En(t,e,n)):ln(t,e,n)},Mn=function(t,e){g(t);for(var n,r=function(t){var e=tt(t),n=tn.f;if(n)for(var r,o=n(t),i=He.f,s=0;o.length>s;)i.call(t,r=o[s++])&&e.push(r);return e}(e=I(e)),o=0,i=r.length;i>o;)xn(t,n=r[o++],e[n]);return t},Rn=function(t){var e=_n.call(this,t=j(t,!0));return!(this===On&&M(bn,t)&&!M(wn,t))&&(!(e||!M(this,t)||!M(bn,t)||M(this,yn)&&this[yn][t])||e)},Fn=function(t,e){if(t=I(t),e=j(e,!0),t!==On||!M(bn,e)||M(wn,e)){var n=fn(t,e);return!n||!M(bn,e)||M(t,yn)&&t[yn][e]||(n.enumerable=!0),n}},An=function(t){for(var e,n=hn(I(t)),r=[],o=0;n.length>o;)M(bn,e=n[o++])||e==yn||e==an||r.push(e);return r},Ln=function(t){for(var e,n=t===On,r=hn(n?wn:I(t)),o=[],i=0;r.length>i;)!M(bn,e=r[i++])||n&&!M(On,e)||o.push(bn[e]);return o};Sn||(L((pn=function(){if(this instanceof pn)throw TypeError("Symbol is not a constructor!");var t=B(arguments.length>0?arguments[0]:void 0),e=function(n){this===On&&e.call(wn,n),M(this,yn)&&M(this[yn],t)&&(this[yn][t]=!1),En(this,t,T(1,n))};return m&&Pn&&En(On,t,{configurable:!0,set:e}),Tn(t)}).prototype,"toString",function(){return this._k}),Ve.f=Fn,E.f=xn,rn.f=un.f=An,He.f=Rn,tn.f=Ln,Qe.f=function(t){return Tn(ut(t))}),A(A.G+A.W+A.F*!Sn,{Symbol:pn});for(var Cn="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),zn=0;Cn.length>zn;)ut(Cn[zn++]);for(var Nn=tt(ut.store),Dn=0;Nn.length>Dn;)Ze(Nn[Dn++]);A(A.S+A.F*!Sn,"Symbol",{for:function(t){return M(mn,t+="")?mn[t]:mn[t]=pn(t)},keyFor:function(t){if(!kn(t))throw TypeError(t+" is not a symbol!");for(var e in mn)if(mn[e]===t)return e},useSetter:function(){Pn=!0},useSimple:function(){Pn=!1}}),A(A.S+A.F*!Sn,"Object",{create:function(t,e){return void 0===e?ct(t):Mn(ct(t),e)},defineProperty:xn,defineProperties:Mn,getOwnPropertyDescriptor:Fn,getOwnPropertyNames:An,getOwnPropertySymbols:Ln});var In=_(function(){tn.f(1)});A(A.S+A.F*In,"Object",{getOwnPropertySymbols:function(t){return tn.f(dt(t))}}),vn&&A(A.S+A.F*(!Sn||_(function(){var t=pn();return"[null]"!=dn([t])||"{}"!=dn({a:t})||"{}"!=dn(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(y(e)||void 0!==t)&&!kn(t))return en(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!kn(e))return e}),r[1]=e,dn.apply(vn,r)}}),pn.prototype[gn]||k(pn.prototype,gn,pn.prototype.valueOf),lt(pn,"Symbol"),lt(Math,"Math",!0),lt(h.JSON,"JSON",!0);var qn=p.Object.getOwnPropertySymbols;We("keys",function(){return function(t){return tt(dt(t))}});var $n=p.Object.keys;A(A.S+A.F*!m,"Object",{defineProperty:E.f});var Gn=p.Object,Hn=function(t,e,n){return Gn.defineProperty(t,e,n)};var Un=function(t,e,n){return e in t?Hn(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};var Vn=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=$n(n);"function"==typeof qn&&(r=r.concat(qn(n).filter(function(t){return Ke(n,t).enumerable}))),r.forEach(function(e){Un(t,e,n[e])})}return t},Wn=function(t,e){if(!y(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t},Bn=E.f,Jn=Ye.fastKey,Kn=m?"_s":"size",Yn=function(t,e){var n,r=Jn(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n},Qn={getConstructor:function(t,e,n,r){var o=t(function(t,i){Nt(t,o,e,"_i"),t._t=e,t._i=ct(null),t._f=void 0,t._l=void 0,t[Kn]=0,null!=i&&Ht(i,n,t[r],t)});return pe(o.prototype,{clear:function(){for(var t=Wn(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[Kn]=0},delete:function(t){var n=Wn(this,e),r=Yn(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[Kn]--}return!!r},forEach:function(t){Wn(this,e);for(var n,r=d(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!Yn(Wn(this,e),t)}}),m&&Bn(o.prototype,"size",{get:function(){return Wn(this,e)[Kn]}}),o},def:function(t,e,n){var r,o,i=Yn(t,e);return i?i.v=n:(t._l=i={i:o=Jn(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[Kn]++,"F"!==o&&(t._i[o]=i)),t},getEntry:Yn,setStrong:function(t,e,n){Ot(t,e,function(t,n){this._t=Wn(t,e),this._k=n,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)?jt(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,jt(1))},n?"entries":"values",!n,!0),de(e)}},Xn=ut("species"),Zn=function(t,e){return new(function(t){var e;return en(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!en(e.prototype)||(e=void 0),y(e)&&null===(e=e[Xn])&&(e=void 0)),void 0===e?Array:e}(t))(e)},tr=E.f,er=function(t,e){var n=1==t,r=2==t,o=3==t,i=4==t,s=6==t,c=5==t||s,u=e||Zn;return function(e,a,f){for(var l,h,p=dt(e),v=D(p),y=d(a,f,3),g=$(v.length),_=0,m=n?u(e,g):r?u(e,0):void 0;g>_;_++)if((c||_ in v)&&(h=y(l=v[_],_,p),t))if(n)m[_]=h;else if(h)switch(t){case 3:return!0;case 5:return l;case 6:return _;case 2:m.push(l)}else if(i)return!1;return s?-1:o||i?i:m}}(0);!function(t,e,n,r,o,i){var s=h[t],c=s,u=o?"set":"add",a=c&&c.prototype,f={};m&&"function"==typeof c&&(i||a.forEach&&!_(function(){(new c).entries().next()}))?(c=e(function(e,n){Nt(e,c,t,"_c"),e._c=new s,null!=n&&Ht(n,o,e[u],e)}),er("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(t){var e="add"==t||"set"==t;t in a&&(!i||"clear"!=t)&&k(c.prototype,t,function(n,r){if(Nt(this,c,t),!e&&i&&!y(n))return"get"==t&&void 0;var o=this._c[t](0===n?0:n,r);return e?this:o})}),i||tr(c.prototype,"size",{get:function(){return this._c.size}})):(c=r.getConstructor(e,t,o,u),pe(c.prototype,n),Ye.NEED=!0),lt(c,t),f[t]=c,A(A.G+A.W+A.F,f),i||r.setStrong(c,t,o)}("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=Qn.getEntry(Wn(this,"Map"),t);return e&&e.v},set:function(t,e){return Qn.def(Wn(this,"Map"),0===t?0:t,e)}},Qn,!0);A(A.P+A.R,"Map",{toJSON:function(t){return function(){if(zt(this)!=t)throw TypeError(t+"#toJSON isn't generic");return function(t,e){var n=[];return Ht(t,!1,n.push,n,e),n}(this)}}("Map")});var nr;nr="Map",A(A.S,nr,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}});!function(t){A(A.S,t,{from:function(t){var e,n,r,o,i=arguments[1];return v(this),(e=void 0!==i)&&v(i),null==t?new this:(n=[],e?(r=0,o=d(i,arguments[2],2),Ht(t,!1,function(t){n.push(o(t,r++))})):Ht(t,!1,n.push,n),new this(n))}})}("Map");var rr=p.Map,or=Object.assign,ir=!or||_(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=or({},t)[n]||Object.keys(or({},e)).join("")!=r})?function(t,e){for(var n=dt(t),r=arguments.length,o=1,i=tn.f,s=He.f;r>o;)for(var c,u=D(arguments[o++]),a=i?tt(u).concat(i(u)):tt(u),f=a.length,l=0;f>l;)c=a[l++],m&&!s.call(u,c)||(n[c]=u[c]);return n}:or;A(A.S+A.F,"Object",{assign:ir});var sr=p.Object.assign,cr="object"==typeof global&&global&&global.Object===Object&&global,ur="object"==typeof self&&self&&self.Object===Object&&self,ar=cr||ur||Function("return this")(),fr=ar.Symbol,lr=Object.prototype,hr=lr.hasOwnProperty,pr=lr.toString,vr=fr?fr.toStringTag:void 0;var dr=Object.prototype.toString;var yr="[object Null]",gr="[object Undefined]",_r=fr?fr.toStringTag:void 0;function mr(t){return null==t?void 0===t?gr:yr:_r&&_r in Object(t)?function(t){var e=hr.call(t,vr),n=t[vr];try{t[vr]=void 0;var r=!0}catch(t){}var o=pr.call(t);return r&&(e?t[vr]=n:delete t[vr]),o}(t):function(t){return dr.call(t)}(t)}function br(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var wr="[object AsyncFunction]",Or="[object Function]",Sr="[object GeneratorFunction]",jr="[object Proxy]";var Pr,Er=ar["__core-js_shared__"],Tr=(Pr=/[^.]+$/.exec(Er&&Er.keys&&Er.keys.IE_PROTO||""))?"Symbol(src)_1."+Pr:"";var kr=Function.prototype.toString;var xr=/^\[object .+?Constructor\]$/,Mr=Function.prototype,Rr=Object.prototype,Fr=Mr.toString,Ar=Rr.hasOwnProperty,Lr=RegExp("^"+Fr.call(Ar).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cr(t){return!(!br(t)||(e=t,Tr&&Tr in e))&&(function(t){if(!br(t))return!1;var e=mr(t);return e==Or||e==Sr||e==wr||e==jr}(t)?Lr:xr).test(function(t){if(null!=t){try{return kr.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function zr(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Cr(n)?n:void 0}var Nr=zr(Object,"create");var Dr="__lodash_hash_undefined__",Ir=Object.prototype.hasOwnProperty;var qr=Object.prototype.hasOwnProperty;var $r="__lodash_hash_undefined__";function Gr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Hr(t,e){for(var n,r,o=t.length;o--;)if((n=t[o][0])===(r=e)||n!=n&&r!=r)return o;return-1}Gr.prototype.clear=function(){this.__data__=Nr?Nr(null):{},this.size=0},Gr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Gr.prototype.get=function(t){var e=this.__data__;if(Nr){var n=e[t];return n===Dr?void 0:n}return Ir.call(e,t)?e[t]:void 0},Gr.prototype.has=function(t){var e=this.__data__;return Nr?void 0!==e[t]:qr.call(e,t)},Gr.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Nr&&void 0===e?$r:e,this};var Ur=Array.prototype.splice;function Vr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(t){var e=this.__data__,n=Hr(e,t);return!(n<0||(n==e.length-1?e.pop():Ur.call(e,n,1),--this.size,0))},Vr.prototype.get=function(t){var e=this.__data__,n=Hr(e,t);return n<0?void 0:e[n][1]},Vr.prototype.has=function(t){return Hr(this.__data__,t)>-1},Vr.prototype.set=function(t,e){var n=this.__data__,r=Hr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Wr=zr(ar,"Map");function Br(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function Jr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Jr.prototype.clear=function(){this.size=0,this.__data__={hash:new Gr,map:new(Wr||Vr),string:new Gr}},Jr.prototype.delete=function(t){var e=Br(this,t).delete(t);return this.size-=e?1:0,e},Jr.prototype.get=function(t){return Br(this,t).get(t)},Jr.prototype.has=function(t){return Br(this,t).has(t)},Jr.prototype.set=function(t,e){var n=Br(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Kr="__lodash_hash_undefined__";function Yr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Jr;++e<n;)this.add(t[e])}function Qr(t){return t!=t}function Xr(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,Qr,n)}(t,e,0)>-1}function Zr(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function to(t,e){return t.has(e)}Yr.prototype.add=Yr.prototype.push=function(t){return this.__data__.set(t,Kr),this},Yr.prototype.has=function(t){return this.__data__.has(t)};var eo=zr(ar,"Set");function no(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}var ro=eo&&1/no(new eo([,-0]))[1]==1/0?function(t){return new eo(t)}:function(){},oo=200;function io(t,e){return e="function"==typeof e?e:void 0,t&&t.length?function(t,e,n){var r=-1,o=Xr,i=t.length,s=!0,c=[],u=c;if(n)s=!1,o=Zr;else if(i>=oo){var a=e?null:ro(t);if(a)return no(a);s=!1,o=to,u=new Yr}else u=e?[]:c;t:for(;++r<i;){var f=t[r],l=e?e(f):f;if(f=n||0!==f?f:0,s&&l==l){for(var h=u.length;h--;)if(u[h]===l)continue t;e&&u.push(l),c.push(f)}else o(u,l,n)||(u!==c&&u.push(l),c.push(f))}return c}(t,void 0,e):[]}const so=global.navigator&&global.navigator.userAgent?r.getParser(global.navigator.userAgent).getBrowser():null,co=so&&so.name&&so.version?{name:so.name,version:so.version}:null;class uo{constructor(t={}){sr(this,{version:"1.2",entries:[],pages:[]},t),!this.browser&&co&&(this.browser=co)}addEntries(t=[]){this.entries=io([...t,...this.entries],(t,e)=>t._id===e._id&&t._order===e._order)}sortEntries(){this.entries=this.entries.sort((t,e)=>new Date(t.startedDateTime)-new Date(e.startedDateTime))}}class ao{constructor(t={}){this.log=new uo(t.log)}}var fo="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",lo="["+fo+"]",ho=RegExp("^"+lo+lo+"*"),po=RegExp(lo+lo+"*$"),vo=function(t,e,n){var r={},o=_(function(){return!!fo[t]()||"​…"!="​…"[t]()}),i=r[t]=o?e(yo):fo[t];n&&(r[n]=i),A(A.P+A.F*o,"String",r)},yo=vo.trim=function(t,e){return t=String(f(t)),1&e&&(t=t.replace(ho,"")),2&e&&(t=t.replace(po,"")),t},go=vo,_o=h.parseInt,mo=go.trim,bo=/^[-+]?0[xX]/,wo=8!==_o(fo+"08")||22!==_o(fo+"0x16")?function(t,e){var n=mo(String(t),3);return _o(n,e>>>0||(bo.test(n)?16:10))}:_o;A(A.G+A.F*(parseInt!=wo),{parseInt:wo});var Oo=p.parseInt;const{keys:So}=Object,{isArray:jo}=Array;function Po(t){return So(t||{}).reduce((e,n)=>{const r=t[n];return jo(r)?e.push(...r.map(t=>({name:n,value:t,_fromType:"array"}))):e.push({name:n,value:r}),e},[])}const{isArray:Eo}=Array;function To(t,e){const n=t.getHeader(e);return Eo(n)?n.length>0?n[0]:"":n}class ko{constructor(t){this.httpVersion="HTTP/1.1",this.url=t.absoluteUrl,this.method=t.method,this.headers=Po(t.headers),this.headersSize=function(t){const e=[],n=[];t.headers.forEach(({name:t,value:r})=>{e.push(t),n.push(r)});const r=t.method+t.url+e.join()+n.join();return o(r)+2*e.length+2+12+2}(this),this.queryString=Po(t.query),this.cookies=i.parse(t.getHeader("Set-Cookie")),t.body&&(this.postData={mimeType:To(t,"Content-Type")||"text/plain",params:[]},"string"==typeof t.body&&(this.postData.text=t.body));const e=To(t,"Content-Length");this.bodySize=e?Oo(e,10):this.postData&&this.postData.text?o(this.postData.text):0}}class xo{constructor(t){this.httpVersion="HTTP/1.1",this.status=t.statusCode,this.statusText=t.statusText,this.headers=Po(t.headers),this.headersSize=function(t){const e=[],n=[];t.headers.forEach(({name:t,value:r})=>{e.push(t),n.push(r)});const r=e.join()+n.join();return o(r)+2*e.length+2+2}(this),this.cookies=i.parse(t.getHeader("Set-Cookie")),this.redirectURL=To(t,"Location")||"",this.content={mimeType:To(t,"Content-Type")||"text/plain"},t.body&&"string"==typeof t.body&&(this.content.text=t.body,t.isBinary&&(this.content._isBinary=!0));const e=To(t,"Content-Length");this.content.size=e?Oo(e,10):this.content.text?o(this.content.text):0,this.bodySize=this.content.size}}const{keys:Mo}=Object;class Ro{constructor(t){this._id=t.id,this._order=t.order,this.startedDateTime=t.timestamp,this.request=new ko(t),this.response=new xo(t.response),this.cache={},this.timings={blocked:-1,dns:-1,connect:-1,send:0,wait:t.responseTime,receive:0,ssl:-1},this.time=function(t={}){return Mo(t).reduce((e,n)=>t[n]>0?e+=t[n]:e,0)}(this.timings)}}const Fo="Polly.JS";export default class{constructor(t){this.polly=t,this.pending=new rr,this._cache=new rr}static get type(){return"persister"}static get id(){e("Must override the static `id` getter.")}get defaultOptions(){return{}}get options(){return Vn({},this.defaultOptions||{},(this.polly.config.persisterOptions||{})[this.constructor.id]||{})}get hasPending(){return this.pending.size>0}async persist(){if(!this.hasPending)return;const t=[],e={name:Fo,version:this.polly.constructor.VERSION,comment:`${this.constructor.type}:${this.constructor.id}`};for(const[n,{name:r,requests:o}]of this.pending){const i=[],s=await this.find(n);let c;c=new ao(s||{log:{creator:e,_recordingName:r}});for(const t of o){const e=new Ro(t);this.assert(`Cannot persist response for [${e.request.method}] ${e.request.url} because the status code was ${e.response.status} and \`recordFailedRequests\` is \`false\``,t.response.ok||t.config.recordFailedRequests),await t._emit("beforePersist",e),i.push(e)}c.log.addEntries(i),this.polly.config.persisterOptions.disableSortingHarEntries||c.log.sortEntries(),this.polly.config.persisterOptions.keepUnusedRequests||this._removeUnusedEntries(n,c),t.push(this.save(n,c))}await Ge.all(t),this.pending.clear()}recordRequest(t){this.assert("You must pass a PollyRequest to 'recordRequest'.",t),this.assert("Cannot save a request with no response.",t.didRespond);const{recordingId:e,recordingName:n}=t;this.pending.has(e)||this.pending.set(e,{name:n,requests:[]}),this.pending.get(e).requests.push(t)}async find(t){const{_cache:e}=this;if(!e.has(t)){const n=async()=>{const n=await this.findRecording(t);return n?(this.assert(`Recording with id '${t}' is invalid. Please delete the recording so a new one can be created.`,n.log&&n.log.creator.name===Fo),n):(e.delete(t),null)};e.set(t,n())}return e.get(t)}async save(t){await this.saveRecording(...arguments),this._cache.delete(t)}async delete(t){await this.deleteRecording(...arguments),this._cache.delete(t)}async findEntry(t){const{id:e,order:n,recordingId:r}=t,o=await this.find(r);return o&&o.log.entries.find(t=>t._id===e&&t._order===n)||null}stringify(){return t(...arguments)}assert(t,...n){e(`[${this.constructor.type}:${this.constructor.id}] ${t}`,...n)}_removeUnusedEntries(t,e){const r=this.polly._requests.filter(e=>e.recordingId===t&&(e.action===n.RECORD||e.action===n.REPLAY));e.log.entries=e.log.entries.filter(t=>r.find(e=>t._id===e.id&&t._order===e.order))}findRecording(){this.assert("Must implement the `findRecording` hook.")}saveRecording(){this.assert("Must implement the `saveRecording` hook.")}deleteRecording(){this.assert("Must implement the `deleteRecording` hook.")}}
import t from"fast-json-stable-stringify";import{assert as e,ACTIONS as n}from"@pollyjs/utils";import r from"bowser";import o from"utf8-byte-length";import i from"set-cookie-parser";var s=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},c=function(t){return Object(s(t))},u={}.hasOwnProperty,a=function(t,e){return u.call(t,e)},f={}.toString,l=function(t){return f.call(t).slice(8,-1)},h=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==l(t)?t.split(""):Object(t)},p=function(t){return h(s(t))},d=Math.ceil,v=Math.floor,y=function(t){return isNaN(t=+t)?0:(t>0?v:d)(t)},g=Math.min,_=function(t){return t>0?g(y(t),9007199254740991):0},m=Math.max,b=Math.min;function w(t,e){return t(e={exports:{}},e.exports),e.exports}var O,S=w((function(t){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)})),j=(S.version,w((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)}))),P=w((function(t){var e=j["__core-js_shared__"]||(j["__core-js_shared__"]={});(t.exports=function(t,n){return e[t]||(e[t]=void 0!==n?n:{})})("versions",[]).push({version:S.version,mode:"pure",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})})),E=0,T=Math.random(),x=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++E+T).toString(36))},k=P("keys"),R=function(t){return k[t]||(k[t]=x(t))},M=(O=!1,function(t,e,n){var r,o=p(t),i=_(o.length),s=function(t,e){return(t=y(t))<0?m(t+e,0):b(t,e)}(n,i);if(O&&e!=e){for(;i>s;)if((r=o[s++])!=r)return!0}else for(;i>s;s++)if((O||s in o)&&o[s]===e)return O||s||0;return!O&&-1}),F=R("IE_PROTO"),A=function(t,e){var n,r=p(t),o=0,i=[];for(n in r)n!=F&&a(r,n)&&i.push(n);for(;e.length>o;)a(r,n=e[o++])&&(~M(i,n)||i.push(n));return i},L="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),D=Object.keys||function(t){return A(t,L)},C=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},N=function(t,e,n){if(C(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},z=function(t){return"object"==typeof t?null!==t:"function"==typeof t},I=function(t){if(!z(t))throw TypeError(t+" is not an object!");return t},q=function(t){try{return!!t()}catch(t){return!0}},$=!q((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})),G=j.document,H=z(G)&&z(G.createElement),U=function(t){return H?G.createElement(t):{}},V=!$&&!q((function(){return 7!=Object.defineProperty(U("div"),"a",{get:function(){return 7}}).a})),W=function(t,e){if(!z(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!z(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!z(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!z(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},J=Object.defineProperty,K={f:$?Object.defineProperty:function(t,e,n){if(I(t),e=W(e,!0),I(n),V)try{return J(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},B=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Y=$?function(t,e,n){return K.f(t,e,B(1,n))}:function(t,e,n){return t[e]=n,t},Q=function(t,e,n){var r,o,i,s=t&Q.F,c=t&Q.G,u=t&Q.S,f=t&Q.P,l=t&Q.B,h=t&Q.W,p=c?S:S[e]||(S[e]={}),d=p.prototype,v=c?j:u?j[e]:(j[e]||{}).prototype;for(r in c&&(n=e),n)(o=!s&&v&&void 0!==v[r])&&a(p,r)||(i=o?v[r]:n[r],p[r]=c&&"function"!=typeof v[r]?n[r]:l&&o?N(i,j):h&&v[r]==i?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(i):f&&"function"==typeof i?N(Function.call,i):i,f&&((p.virtual||(p.virtual={}))[r]=i,t&Q.R&&d&&!d[r]&&Y(d,r,i)))};Q.F=1,Q.G=2,Q.S=4,Q.P=8,Q.B=16,Q.W=32,Q.U=64,Q.R=128;var X=Q,Z=function(t,e){var n=(S.Object||{})[t]||Object[t],r={};r[t]=e(n),X(X.S+X.F*q((function(){n(1)})),"Object",r)};Z("keys",(function(){return function(t){return D(c(t))}}));var tt=S.Object.keys,et=Y,nt=w((function(t){var e=x("meta"),n=K.f,r=0,o=Object.isExtensible||function(){return!0},i=!q((function(){return o(Object.preventExtensions({}))})),s=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},c=t.exports={KEY:e,NEED:!1,fastKey:function(t,n){if(!z(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,e)){if(!o(t))return"F";if(!n)return"E";s(t)}return t[e].i},getWeak:function(t,n){if(!a(t,e)){if(!o(t))return!0;if(!n)return!1;s(t)}return t[e].w},onFreeze:function(t){return i&&c.NEED&&o(t)&&!a(t,e)&&s(t),t}}})),rt=(nt.KEY,nt.NEED,nt.fastKey,nt.getWeak,nt.onFreeze,w((function(t){var e=P("wks"),n=j.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:x)("Symbol."+t))}).store=e}))),ot=K.f,it=rt("toStringTag"),st=function(t,e,n){t&&!a(t=n?t:t.prototype,it)&&ot(t,it,{configurable:!0,value:e})},ct={f:rt},ut=K.f,at=function(t){var e=S.Symbol||(S.Symbol={});"_"==t.charAt(0)||t in e||ut(e,t,{value:ct.f(t)})},ft={f:Object.getOwnPropertySymbols},lt={f:{}.propertyIsEnumerable},ht=Array.isArray||function(t){return"Array"==l(t)},pt=$?Object.defineProperties:function(t,e){I(t);for(var n,r=D(e),o=r.length,i=0;o>i;)K.f(t,n=r[i++],e[n]);return t},dt=j.document,vt=dt&&dt.documentElement,yt=R("IE_PROTO"),gt=function(){},_t=function(){var t,e=U("iframe"),n=L.length;for(e.style.display="none",vt.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),_t=t.F;n--;)delete _t.prototype[L[n]];return _t()},mt=Object.create||function(t,e){var n;return null!==t?(gt.prototype=I(t),n=new gt,gt.prototype=null,n[yt]=t):n=_t(),void 0===e?n:pt(n,e)},bt=L.concat("length","prototype"),wt={f:Object.getOwnPropertyNames||function(t){return A(t,bt)}},Ot=wt.f,St={}.toString,jt="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Pt={f:function(t){return jt&&"[object Window]"==St.call(t)?function(t){try{return Ot(t)}catch(t){return jt.slice()}}(t):Ot(p(t))}},Et=Object.getOwnPropertyDescriptor,Tt={f:$?Et:function(t,e){if(t=p(t),e=W(e,!0),V)try{return Et(t,e)}catch(t){}if(a(t,e))return B(!lt.f.call(t,e),t[e])}},xt=nt.KEY,kt=Tt.f,Rt=K.f,Mt=Pt.f,Ft=j.Symbol,At=j.JSON,Lt=At&&At.stringify,Dt=rt("_hidden"),Ct=rt("toPrimitive"),Nt={}.propertyIsEnumerable,zt=P("symbol-registry"),It=P("symbols"),qt=P("op-symbols"),$t=Object.prototype,Gt="function"==typeof Ft&&!!ft.f,Ht=j.QObject,Ut=!Ht||!Ht.prototype||!Ht.prototype.findChild,Vt=$&&q((function(){return 7!=mt(Rt({},"a",{get:function(){return Rt(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=kt($t,e);r&&delete $t[e],Rt(t,e,n),r&&t!==$t&&Rt($t,e,r)}:Rt,Wt=function(t){var e=It[t]=mt(Ft.prototype);return e._k=t,e},Jt=Gt&&"symbol"==typeof Ft.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof Ft},Kt=function(t,e,n){return t===$t&&Kt(qt,e,n),I(t),e=W(e,!0),I(n),a(It,e)?(n.enumerable?(a(t,Dt)&&t[Dt][e]&&(t[Dt][e]=!1),n=mt(n,{enumerable:B(0,!1)})):(a(t,Dt)||Rt(t,Dt,B(1,{})),t[Dt][e]=!0),Vt(t,e,n)):Rt(t,e,n)},Bt=function(t,e){I(t);for(var n,r=function(t){var e=D(t),n=ft.f;if(n)for(var r,o=n(t),i=lt.f,s=0;o.length>s;)i.call(t,r=o[s++])&&e.push(r);return e}(e=p(e)),o=0,i=r.length;i>o;)Kt(t,n=r[o++],e[n]);return t},Yt=function(t){var e=Nt.call(this,t=W(t,!0));return!(this===$t&&a(It,t)&&!a(qt,t))&&(!(e||!a(this,t)||!a(It,t)||a(this,Dt)&&this[Dt][t])||e)},Qt=function(t,e){if(t=p(t),e=W(e,!0),t!==$t||!a(It,e)||a(qt,e)){var n=kt(t,e);return!n||!a(It,e)||a(t,Dt)&&t[Dt][e]||(n.enumerable=!0),n}},Xt=function(t){for(var e,n=Mt(p(t)),r=[],o=0;n.length>o;)a(It,e=n[o++])||e==Dt||e==xt||r.push(e);return r},Zt=function(t){for(var e,n=t===$t,r=Mt(n?qt:p(t)),o=[],i=0;r.length>i;)!a(It,e=r[i++])||n&&!a($t,e)||o.push(It[e]);return o};Gt||(et((Ft=function(){if(this instanceof Ft)throw TypeError("Symbol is not a constructor!");var t=x(arguments.length>0?arguments[0]:void 0),e=function(n){this===$t&&e.call(qt,n),a(this,Dt)&&a(this[Dt],t)&&(this[Dt][t]=!1),Vt(this,t,B(1,n))};return $&&Ut&&Vt($t,t,{configurable:!0,set:e}),Wt(t)}).prototype,"toString",(function(){return this._k})),Tt.f=Qt,K.f=Kt,wt.f=Pt.f=Xt,lt.f=Yt,ft.f=Zt,ct.f=function(t){return Wt(rt(t))}),X(X.G+X.W+X.F*!Gt,{Symbol:Ft});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ee=0;te.length>ee;)rt(te[ee++]);for(var ne=D(rt.store),re=0;ne.length>re;)at(ne[re++]);X(X.S+X.F*!Gt,"Symbol",{for:function(t){return a(zt,t+="")?zt[t]:zt[t]=Ft(t)},keyFor:function(t){if(!Jt(t))throw TypeError(t+" is not a symbol!");for(var e in zt)if(zt[e]===t)return e},useSetter:function(){Ut=!0},useSimple:function(){Ut=!1}}),X(X.S+X.F*!Gt,"Object",{create:function(t,e){return void 0===e?mt(t):Bt(mt(t),e)},defineProperty:Kt,defineProperties:Bt,getOwnPropertyDescriptor:Qt,getOwnPropertyNames:Xt,getOwnPropertySymbols:Zt});var oe=q((function(){ft.f(1)}));X(X.S+X.F*oe,"Object",{getOwnPropertySymbols:function(t){return ft.f(c(t))}}),At&&X(X.S+X.F*(!Gt||q((function(){var t=Ft();return"[null]"!=Lt([t])||"{}"!=Lt({a:t})||"{}"!=Lt(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(z(e)||void 0!==t)&&!Jt(t))return ht(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Jt(e))return e}),r[1]=e,Lt.apply(At,r)}}),Ft.prototype[Ct]||Y(Ft.prototype,Ct,Ft.prototype.valueOf),st(Ft,"Symbol"),st(Math,"Math",!0),st(j.JSON,"JSON",!0);var ie=S.Object.getOwnPropertySymbols,se=Tt.f;Z("getOwnPropertyDescriptor",(function(){return function(t,e){return se(p(t),e)}}));var ce=S.Object,ue=function(t,e){return ce.getOwnPropertyDescriptor(t,e)},ae=j.Reflect,fe=ae&&ae.ownKeys||function(t){var e=wt.f(I(t)),n=ft.f;return n?e.concat(n(t)):e},le=function(t,e,n){e in t?K.f(t,e,B(0,n)):t[e]=n};X(X.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=p(t),o=Tt.f,i=fe(r),s={},c=0;i.length>c;)void 0!==(n=o(r,e=i[c++]))&&le(s,e,n);return s}});var he=S.Object.getOwnPropertyDescriptors;X(X.S+X.F*!$,"Object",{defineProperties:pt});var pe=S.Object,de=function(t,e){return pe.defineProperties(t,e)};X(X.S+X.F*!$,"Object",{defineProperty:K.f});var ve,ye=S.Object,ge=function(t,e,n){return ye.defineProperty(t,e,n)},_e=w((function(t){t.exports=function(t,e,n){return e in t?ge(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0})),me=(ve=_e)&&ve.__esModule&&Object.prototype.hasOwnProperty.call(ve,"default")?ve.default:ve,be={},we={};Y(we,rt("iterator"),(function(){return this}));var Oe,Se=function(t,e,n){t.prototype=mt(we,{next:B(1,n)}),st(t,e+" Iterator")},je=R("IE_PROTO"),Pe=Object.prototype,Ee=Object.getPrototypeOf||function(t){return t=c(t),a(t,je)?t[je]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?Pe:null},Te=rt("iterator"),xe=!([].keys&&"next"in[].keys()),ke=function(){return this},Re=function(t,e,n,r,o,i,s){Se(n,e,r);var c,u,a,f=function(t){if(!xe&&t in d)return d[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},l=e+" Iterator",h="values"==o,p=!1,d=t.prototype,v=d[Te]||d["@@iterator"]||o&&d[o],y=v||f(o),g=o?h?f("entries"):y:void 0,_="Array"==e&&d.entries||v;if(_&&(a=Ee(_.call(new t)))!==Object.prototype&&a.next&&st(a,l,!0),h&&v&&"values"!==v.name&&(p=!0,y=function(){return v.call(this)}),s&&(xe||p||!d[Te])&&Y(d,Te,y),be[e]=y,be[l]=ke,o)if(c={values:h?y:f("values"),keys:i?y:f("keys"),entries:g},s)for(u in c)u in d||et(d,u,c[u]);else X(X.P+X.F*(xe||p),e,c);return c},Me=(Oe=!0,function(t,e){var n,r,o=String(s(t)),i=y(e),c=o.length;return i<0||i>=c?Oe?"":void 0:(n=o.charCodeAt(i))<55296||n>56319||i+1===c||(r=o.charCodeAt(i+1))<56320||r>57343?Oe?o.charAt(i):n:Oe?o.slice(i,i+2):r-56320+(n-55296<<10)+65536});Re(String,"String",(function(t){this._t=String(t),this._i=0}),(function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Me(e,n),this._i+=t.length,{value:t,done:!1})}));var Fe=function(t,e){return{value:e,done:!!t}};Re(Array,"Array",(function(t,e){this._t=p(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,Fe(1)):Fe(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values");be.Arguments=be.Array;for(var Ae=rt("toStringTag"),Le="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(","),De=0;De<Le.length;De++){var Ce=Le[De],Ne=j[Ce],ze=Ne&&Ne.prototype;ze&&!ze[Ae]&&Y(ze,Ae,Ce),be[Ce]=be.Array}var Ie=function(t,e,n){for(var r in e)n&&t[r]?t[r]=e[r]:Y(t,r,e[r]);return t},qe=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},$e=function(t,e,n,r){try{return r?e(I(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&I(o.call(t)),e}},Ge=rt("iterator"),He=Array.prototype,Ue=rt("toStringTag"),Ve="Arguments"==l(function(){return arguments}()),We=function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Ue))?n:Ve?l(e):"Object"==(r=l(e))&&"function"==typeof e.callee?"Arguments":r},Je=rt("iterator"),Ke=S.getIteratorMethod=function(t){if(null!=t)return t[Je]||t["@@iterator"]||be[We(t)]},Be=w((function(t){var e={},n={},r=t.exports=function(t,r,o,i,s){var c,u,a,f,l,h=s?function(){return t}:Ke(t),p=N(o,i,r?2:1),d=0;if("function"!=typeof h)throw TypeError(t+" is not iterable!");if(void 0===(l=h)||be.Array!==l&&He[Ge]!==l){for(a=h.call(t);!(u=a.next()).done;)if((f=$e(a,p,u.value,r))===e||f===n)return f}else for(c=_(t.length);c>d;d++)if((f=r?p(I(u=t[d])[0],u[1]):p(t[d]))===e||f===n)return f};r.BREAK=e,r.RETURN=n})),Ye=rt("species"),Qe=function(t){var e="function"==typeof S[t]?S[t]:j[t];$&&e&&!e[Ye]&&K.f(e,Ye,{configurable:!0,get:function(){return this}})},Xe=function(t,e){if(!z(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t},Ze=K.f,tn=nt.fastKey,en=$?"_s":"size",nn=function(t,e){var n,r=tn(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n},rn={getConstructor:function(t,e,n,r){var o=t((function(t,i){qe(t,o,e,"_i"),t._t=e,t._i=mt(null),t._f=void 0,t._l=void 0,t[en]=0,null!=i&&Be(i,n,t[r],t)}));return Ie(o.prototype,{clear:function(){for(var t=Xe(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[en]=0},delete:function(t){var n=Xe(this,e),r=nn(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[en]--}return!!r},forEach:function(t){Xe(this,e);for(var n,r=N(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!nn(Xe(this,e),t)}}),$&&Ze(o.prototype,"size",{get:function(){return Xe(this,e)[en]}}),o},def:function(t,e,n){var r,o,i=nn(t,e);return i?i.v=n:(t._l=i={i:o=tn(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[en]++,"F"!==o&&(t._i[o]=i)),t},getEntry:nn,setStrong:function(t,e,n){Re(t,e,(function(t,n){this._t=Xe(t,e),this._k=n,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)?Fe(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,Fe(1))}),n?"entries":"values",!n,!0),Qe(e)}},on=rt("species"),sn=function(t,e){return new(function(t){var e;return ht(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!ht(e.prototype)||(e=void 0),z(e)&&null===(e=e[on])&&(e=void 0)),void 0===e?Array:e}(t))(e)},cn=K.f,un=function(t,e){var n=1==t,r=2==t,o=3==t,i=4==t,s=6==t,u=5==t||s,a=e||sn;return function(e,f,l){for(var p,d,v=c(e),y=h(v),g=N(f,l,3),m=_(y.length),b=0,w=n?a(e,m):r?a(e,0):void 0;m>b;b++)if((u||b in y)&&(d=g(p=y[b],b,v),t))if(n)w[b]=d;else if(d)switch(t){case 3:return!0;case 5:return p;case 6:return b;case 2:w.push(p)}else if(i)return!1;return s?-1:o||i?i:w}}(0);!function(t,e,n,r,o,i){var s=j[t],c=s,u=o?"set":"add",a=c&&c.prototype,f={};$&&"function"==typeof c&&(i||a.forEach&&!q((function(){(new c).entries().next()})))?(c=e((function(e,n){qe(e,c,t,"_c"),e._c=new s,null!=n&&Be(n,o,e[u],e)})),un("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),(function(t){var e="add"==t||"set"==t;!(t in a)||i&&"clear"==t||Y(c.prototype,t,(function(n,r){if(qe(this,c,t),!e&&i&&!z(n))return"get"==t&&void 0;var o=this._c[t](0===n?0:n,r);return e?this:o}))})),i||cn(c.prototype,"size",{get:function(){return this._c.size}})):(c=r.getConstructor(e,t,o,u),Ie(c.prototype,n),nt.NEED=!0),st(c,t),f[t]=c,X(X.G+X.W+X.F,f),i||r.setStrong(c,t,o)}("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=rn.getEntry(Xe(this,"Map"),t);return e&&e.v},set:function(t,e){return rn.def(Xe(this,"Map"),0===t?0:t,e)}},rn,!0);X(X.P+X.R,"Map",{toJSON:function(t){return function(){if(We(this)!=t)throw TypeError(t+"#toJSON isn't generic");return function(t,e){var n=[];return Be(t,!1,n.push,n,e),n}(this)}}("Map")});var an;an="Map",X(X.S,an,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}});!function(t){X(X.S,t,{from:function(t){var e,n,r,o,i=arguments[1];return C(this),(e=void 0!==i)&&C(i),null==t?new this:(n=[],e?(r=0,o=N(i,arguments[2],2),Be(t,!1,(function(t){n.push(o(t,r++))}))):Be(t,!1,n.push,n),new this(n))}})}("Map");var fn,ln,hn,pn=S.Map,dn=rt("species"),vn=function(t,e){var n,r=I(t).constructor;return void 0===r||null==(n=I(r)[dn])?e:C(n)},yn=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)},gn=j.process,_n=j.setImmediate,mn=j.clearImmediate,bn=j.MessageChannel,wn=j.Dispatch,On=0,Sn={},jn=function(){var t=+this;if(Sn.hasOwnProperty(t)){var e=Sn[t];delete Sn[t],e()}},Pn=function(t){jn.call(t.data)};_n&&mn||(_n=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return Sn[++On]=function(){yn("function"==typeof t?t:Function(t),e)},fn(On),On},mn=function(t){delete Sn[t]},"process"==l(gn)?fn=function(t){gn.nextTick(N(jn,t,1))}:wn&&wn.now?fn=function(t){wn.now(N(jn,t,1))}:bn?(hn=(ln=new bn).port2,ln.port1.onmessage=Pn,fn=N(hn.postMessage,hn,1)):j.addEventListener&&"function"==typeof postMessage&&!j.importScripts?(fn=function(t){j.postMessage(t+"","*")},j.addEventListener("message",Pn,!1)):fn="onreadystatechange"in U("script")?function(t){vt.appendChild(U("script")).onreadystatechange=function(){vt.removeChild(this),jn.call(t)}}:function(t){setTimeout(N(jn,t,1),0)});var En={set:_n,clear:mn},Tn=En.set,xn=j.MutationObserver||j.WebKitMutationObserver,kn=j.process,Rn=j.Promise,Mn="process"==l(kn);function Fn(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=C(e),this.reject=C(n)}var An={f:function(t){return new Fn(t)}},Ln=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}},Dn=j.navigator,Cn=Dn&&Dn.userAgent||"",Nn=function(t,e){if(I(t),z(e)&&e.constructor===t)return e;var n=An.f(t);return(0,n.resolve)(e),n.promise},zn=rt("iterator"),In=!1;try{var qn=[7][zn]();qn.return=function(){In=!0},Array.from(qn,(function(){throw 2}))}catch(t){}var $n,Gn,Hn,Un,Vn=En.set,Wn=function(){var t,e,n,r=function(){var r,o;for(Mn&&(r=kn.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(Mn)n=function(){kn.nextTick(r)};else if(!xn||j.navigator&&j.navigator.standalone)if(Rn&&Rn.resolve){var o=Rn.resolve(void 0);n=function(){o.then(r)}}else n=function(){Tn.call(j,r)};else{var i=!0,s=document.createTextNode("");new xn(r).observe(s,{characterData:!0}),n=function(){s.data=i=!i}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}(),Jn=j.TypeError,Kn=j.process,Bn=Kn&&Kn.versions,Yn=Bn&&Bn.v8||"",Qn=j.Promise,Xn="process"==We(Kn),Zn=function(){},tr=Gn=An.f,er=!!function(){try{var t=Qn.resolve(1),e=(t.constructor={})[rt("species")]=function(t){t(Zn,Zn)};return(Xn||"function"==typeof PromiseRejectionEvent)&&t.then(Zn)instanceof e&&0!==Yn.indexOf("6.6")&&-1===Cn.indexOf("Chrome/66")}catch(t){}}(),nr=function(t){var e;return!(!z(t)||"function"!=typeof(e=t.then))&&e},rr=function(t,e){if(!t._n){t._n=!0;var n=t._c;Wn((function(){for(var r=t._v,o=1==t._s,i=0,s=function(e){var n,i,s,c=o?e.ok:e.fail,u=e.resolve,a=e.reject,f=e.domain;try{c?(o||(2==t._h&&sr(t),t._h=1),!0===c?n=r:(f&&f.enter(),n=c(r),f&&(f.exit(),s=!0)),n===e.promise?a(Jn("Promise-chain cycle")):(i=nr(n))?i.call(n,u,a):u(n)):a(r)}catch(t){f&&!s&&f.exit(),a(t)}};n.length>i;)s(n[i++]);t._c=[],t._n=!1,e&&!t._h&&or(t)}))}},or=function(t){Vn.call(j,(function(){var e,n,r,o=t._v,i=ir(t);if(i&&(e=Ln((function(){Xn?Kn.emit("unhandledRejection",o,t):(n=j.onunhandledrejection)?n({promise:t,reason:o}):(r=j.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=Xn||ir(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},ir=function(t){return 1!==t._h&&0===(t._a||t._c).length},sr=function(t){Vn.call(j,(function(){var e;Xn?Kn.emit("rejectionHandled",t):(e=j.onrejectionhandled)&&e({promise:t,reason:t._v})}))},cr=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()),rr(e,!0))},ur=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw Jn("Promise can't be resolved itself");(e=nr(t))?Wn((function(){var r={_w:n,_d:!1};try{e.call(t,N(ur,r,1),N(cr,r,1))}catch(t){cr.call(r,t)}})):(n._v=t,n._s=1,rr(n,!1))}catch(t){cr.call({_w:n,_d:!1},t)}}};er||(Qn=function(t){qe(this,Qn,"Promise","_h"),C(t),$n.call(this);try{t(N(ur,this,1),N(cr,this,1))}catch(t){cr.call(this,t)}},($n=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=Ie(Qn.prototype,{then:function(t,e){var n=tr(vn(this,Qn));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=Xn?Kn.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&rr(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Hn=function(){var t=new $n;this.promise=t,this.resolve=N(ur,t,1),this.reject=N(cr,t,1)},An.f=tr=function(t){return t===Qn||t===Un?new Hn(t):Gn(t)}),X(X.G+X.W+X.F*!er,{Promise:Qn}),st(Qn,"Promise"),Qe("Promise"),Un=S.Promise,X(X.S+X.F*!er,"Promise",{reject:function(t){var e=tr(this);return(0,e.reject)(t),e.promise}}),X(X.S+!0*X.F,"Promise",{resolve:function(t){return Nn(this===Un?Qn:this,t)}}),X(X.S+X.F*!(er&&function(t,e){if(!e&&!In)return!1;var n=!1;try{var r=[7],o=r[zn]();o.next=function(){return{done:n=!0}},r[zn]=function(){return o},t(r)}catch(t){}return n}((function(t){Qn.all(t).catch(Zn)}))),"Promise",{all:function(t){var e=this,n=tr(e),r=n.resolve,o=n.reject,i=Ln((function(){var n=[],i=0,s=1;Be(t,!1,(function(t){var c=i++,u=!1;n.push(void 0),s++,e.resolve(t).then((function(t){u||(u=!0,n[c]=t,--s||r(n))}),o)})),--s||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=tr(e),r=n.reject,o=Ln((function(){Be(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}}),X(X.P+X.R,"Promise",{finally:function(t){var e=vn(this,S.Promise||j.Promise),n="function"==typeof t;return this.then(n?function(n){return Nn(e,t()).then((function(){return n}))}:t,n?function(n){return Nn(e,t()).then((function(){throw n}))}:t)}}),X(X.S,"Promise",{try:function(t){var e=An.f(this),n=Ln(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}});var ar=S.Promise,fr=Object.assign,lr=!fr||q((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=fr({},t)[n]||Object.keys(fr({},e)).join("")!=r}))?function(t,e){for(var n=c(t),r=arguments.length,o=1,i=ft.f,s=lt.f;r>o;)for(var u,a=h(arguments[o++]),f=i?D(a).concat(i(a)):D(a),l=f.length,p=0;l>p;)u=f[p++],$&&!s.call(a,u)||(n[u]=a[u]);return n}:fr;X(X.S+X.F,"Object",{assign:lr});var hr=S.Object.assign,pr="object"==typeof global&&global&&global.Object===Object&&global,dr="object"==typeof self&&self&&self.Object===Object&&self,vr=pr||dr||Function("return this")(),yr=vr.Symbol,gr=Object.prototype,_r=gr.hasOwnProperty,mr=gr.toString,br=yr?yr.toStringTag:void 0;var wr=Object.prototype.toString;var Or=yr?yr.toStringTag:void 0;function Sr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Or&&Or in Object(t)?function(t){var e=_r.call(t,br),n=t[br];try{t[br]=void 0;var r=!0}catch(t){}var o=mr.call(t);return r&&(e?t[br]=n:delete t[br]),o}(t):function(t){return wr.call(t)}(t)}function jr(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var Pr,Er=vr["__core-js_shared__"],Tr=(Pr=/[^.]+$/.exec(Er&&Er.keys&&Er.keys.IE_PROTO||""))?"Symbol(src)_1."+Pr:"";var xr=Function.prototype.toString;var kr=/^\[object .+?Constructor\]$/,Rr=Function.prototype,Mr=Object.prototype,Fr=Rr.toString,Ar=Mr.hasOwnProperty,Lr=RegExp("^"+Fr.call(Ar).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Dr(t){return!(!jr(t)||(e=t,Tr&&Tr in e))&&(function(t){if(!jr(t))return!1;var e=Sr(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(t)?Lr:kr).test(function(t){if(null!=t){try{return xr.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Cr(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Dr(n)?n:void 0}var Nr=Cr(Object,"create");var zr=Object.prototype.hasOwnProperty;var Ir=Object.prototype.hasOwnProperty;function qr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function $r(t,e){for(var n,r,o=t.length;o--;)if((n=t[o][0])===(r=e)||n!=n&&r!=r)return o;return-1}qr.prototype.clear=function(){this.__data__=Nr?Nr(null):{},this.size=0},qr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},qr.prototype.get=function(t){var e=this.__data__;if(Nr){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return zr.call(e,t)?e[t]:void 0},qr.prototype.has=function(t){var e=this.__data__;return Nr?void 0!==e[t]:Ir.call(e,t)},qr.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Nr&&void 0===e?"__lodash_hash_undefined__":e,this};var Gr=Array.prototype.splice;function Hr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Hr.prototype.clear=function(){this.__data__=[],this.size=0},Hr.prototype.delete=function(t){var e=this.__data__,n=$r(e,t);return!(n<0)&&(n==e.length-1?e.pop():Gr.call(e,n,1),--this.size,!0)},Hr.prototype.get=function(t){var e=this.__data__,n=$r(e,t);return n<0?void 0:e[n][1]},Hr.prototype.has=function(t){return $r(this.__data__,t)>-1},Hr.prototype.set=function(t,e){var n=this.__data__,r=$r(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Ur=Cr(vr,"Map");function Vr(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function Wr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Wr.prototype.clear=function(){this.size=0,this.__data__={hash:new qr,map:new(Ur||Hr),string:new qr}},Wr.prototype.delete=function(t){var e=Vr(this,t).delete(t);return this.size-=e?1:0,e},Wr.prototype.get=function(t){return Vr(this,t).get(t)},Wr.prototype.has=function(t){return Vr(this,t).has(t)},Wr.prototype.set=function(t,e){var n=Vr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Jr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Wr;++e<n;)this.add(t[e])}function Kr(t){return t!=t}function Br(t,e){return!!(null==t?0:t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,Kr,n)}(t,e,0)>-1}function Yr(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Qr(t,e){return t.has(e)}Jr.prototype.add=Jr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Jr.prototype.has=function(t){return this.__data__.has(t)};var Xr=Cr(vr,"Set");function Zr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var to=Xr&&1/Zr(new Xr([,-0]))[1]==1/0?function(t){return new Xr(t)}:function(){};function eo(t,e){return e="function"==typeof e?e:void 0,t&&t.length?function(t,e,n){var r=-1,o=Br,i=t.length,s=!0,c=[],u=c;if(n)s=!1,o=Yr;else if(i>=200){var a=e?null:to(t);if(a)return Zr(a);s=!1,o=Qr,u=new Jr}else u=e?[]:c;t:for(;++r<i;){var f=t[r],l=e?e(f):f;if(f=n||0!==f?f:0,s&&l==l){for(var h=u.length;h--;)if(u[h]===l)continue t;e&&u.push(l),c.push(f)}else o(u,l,n)||(u!==c&&u.push(l),c.push(f))}return c}(t,void 0,e):[]}const no=global.navigator&&global.navigator.userAgent?r.getParser(global.navigator.userAgent).getBrowser():null,ro=no&&no.name&&no.version?{name:no.name,version:no.version}:null;class oo{constructor(t={}){hr(this,{version:"1.2",entries:[],pages:[]},t),!this.browser&&ro&&(this.browser=ro)}addEntries(t=[]){this.entries=eo([...t,...this.entries],(t,e)=>t._id===e._id&&t._order===e._order)}sortEntries(){this.entries=this.entries.sort((t,e)=>new Date(t.startedDateTime)-new Date(e.startedDateTime))}}class io{constructor(t={}){this.log=new oo(t.log)}}var so="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff",co="["+so+"]",uo=RegExp("^"+co+co+"*"),ao=RegExp(co+co+"*$"),fo=function(t,e,n){var r={},o=q((function(){return!!so[t]()||"​…"!="​…"[t]()})),i=r[t]=o?e(lo):so[t];n&&(r[n]=i),X(X.P+X.F*o,"String",r)},lo=fo.trim=function(t,e){return t=String(s(t)),1&e&&(t=t.replace(uo,"")),2&e&&(t=t.replace(ao,"")),t},ho=fo,po=j.parseInt,vo=ho.trim,yo=/^[-+]?0[xX]/,go=8!==po(so+"08")||22!==po(so+"0x16")?function(t,e){var n=vo(String(t),3);return po(n,e>>>0||(yo.test(n)?16:10))}:po;X(X.G+X.F*(parseInt!=go),{parseInt:go});var _o=S.parseInt;const{keys:mo}=Object,{isArray:bo}=Array;function wo(t){return mo(t||{}).reduce((e,n)=>{const r=t[n];return bo(r)?e.push(...r.map(t=>({name:n,value:t,_fromType:"array"}))):e.push({name:n,value:r}),e},[])}const{isArray:Oo}=Array;function So(t,e){const n=t.getHeader(e);return Oo(n)?n.length>0?n[0]:"":n}class jo{constructor(t){this.httpVersion="HTTP/1.1",this.url=t.absoluteUrl,this.method=t.method,this.headers=wo(t.headers),this.headersSize=function(t){const e=[],n=[];t.headers.forEach(({name:t,value:r})=>{e.push(t),n.push(r)});const r=t.method+t.url+e.join()+n.join();return o(r)+2*e.length+2+12+2}(this),this.queryString=wo(t.query),this.cookies=i.parse(t.getHeader("Set-Cookie")),t.body&&(this.postData={mimeType:So(t,"Content-Type")||"text/plain",params:[]},"string"==typeof t.body&&(this.postData.text=t.body));const e=So(t,"Content-Length");this.bodySize=e?_o(e,10):this.postData&&this.postData.text?o(this.postData.text):0}}class Po{constructor(t){this.httpVersion="HTTP/1.1",this.status=t.statusCode,this.statusText=t.statusText,this.headers=wo(t.headers),this.headersSize=function(t){const e=[],n=[];t.headers.forEach(({name:t,value:r})=>{e.push(t),n.push(r)});const r=e.join()+n.join();return o(r)+2*e.length+2+2}(this),this.cookies=i.parse(t.getHeader("Set-Cookie")),this.redirectURL=So(t,"Location")||"",this.content={mimeType:So(t,"Content-Type")||"text/plain"},t.body&&"string"==typeof t.body&&(this.content.text=t.body,t.encoding&&(this.content.encoding=t.encoding));const e=So(t,"Content-Length");this.content.size=e?_o(e,10):this.content.text?o(this.content.text):0,this.bodySize=this.content.size}}const{keys:Eo}=Object;class To{constructor(t){this._id=t.id,this._order=t.order,this.startedDateTime=t.timestamp,this.request=new jo(t),this.response=new Po(t.response),this.cache={},this.timings={blocked:-1,dns:-1,connect:-1,send:0,wait:t.responseTime,receive:0,ssl:-1},this.time=function(t={}){return Eo(t).reduce((e,n)=>t[n]>0?e+=t[n]:e,0)}(this.timings)}}function xo(t,e){var n=tt(t);if(ie){var r=ie(t);e&&(r=r.filter((function(e){return ue(t,e).enumerable}))),n.push.apply(n,r)}return n}function ko(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xo(Object(n),!0).forEach((function(e){me(t,e,n[e])})):he?de(t,he(n)):xo(Object(n)).forEach((function(e){ge(t,e,ue(n,e))}))}return t}export default class{constructor(t){this.polly=t,this.pending=new pn,this._cache=new pn}static get type(){return"persister"}static get id(){e("Must override the static `id` getter.")}get defaultOptions(){return{}}get options(){return ko(ko({},this.defaultOptions||{}),(this.polly.config.persisterOptions||{})[this.constructor.id]||{})}get hasPending(){return this.pending.size>0}async persist(){if(!this.hasPending)return;const t=[],e={name:"Polly.JS",version:this.polly.constructor.VERSION,comment:`${this.constructor.type}:${this.constructor.id}`};for(const[n,{name:r,requests:o}]of this.pending){const i=[],s=await this.findRecording(n);let c;c=new io(s||{log:{creator:e,_recordingName:r}});for(const t of o){const e=new To(t);this.assert(`Cannot persist response for [${e.request.method}] ${e.request.url} because the status code was ${e.response.status} and \`recordFailedRequests\` is \`false\``,e.response.status<400||t.config.recordFailedRequests),await t._emit("beforePersist",e),i.push(e)}c.log.addEntries(i),this.polly.config.persisterOptions.disableSortingHarEntries||c.log.sortEntries(),this.polly.config.persisterOptions.keepUnusedRequests||this._removeUnusedEntries(n,c),t.push(this.saveRecording(n,c))}await ar.all(t),this.pending.clear()}recordRequest(t){this.assert("You must pass a PollyRequest to 'recordRequest'.",t),this.assert("Cannot save a request with no response.",t.didRespond);const{recordingId:e,recordingName:n}=t;this.pending.has(e)||this.pending.set(e,{name:n,requests:[]}),this.pending.get(e).requests.push(t)}async findRecording(t){const{_cache:e}=this;if(!e.has(t)){const n=async()=>{const n=await this.onFindRecording(t);return n?(this.assert(`Recording with id '${t}' is invalid. Please delete the recording so a new one can be created.`,n.log&&"Polly.JS"===n.log.creator.name),n):(e.delete(t),null)};e.set(t,n())}return e.get(t)}onFindRecording(){this.assert("Must implement the `onFindRecording` hook.")}async saveRecording(t,e){await this.onSaveRecording(...arguments),this._cache.delete(t),this.polly.logger.log.debug("Recording saved.",{recordingId:t,har:e})}onSaveRecording(){this.assert("Must implement the `onSaveRecording` hook.")}async deleteRecording(t){await this.onDeleteRecording(...arguments),this._cache.delete(t)}onDeleteRecording(){this.assert("Must implement the `onDeleteRecording` hook.")}async findEntry(t){const{id:e,order:n,recordingId:r}=t,o=await this.findRecording(r);return o&&o.log.entries.find(t=>t._id===e&&t._order===n)||null}stringify(){return t(...arguments)}assert(t,...n){e(`[${this.constructor.type}:${this.constructor.id}] ${t}`,...n)}_removeUnusedEntries(t,e){const r=this.polly._requests.filter(e=>e.recordingId===t&&(e.action===n.RECORD||e.action===n.REPLAY));e.log.entries=e.log.entries.filter(t=>r.find(e=>t._id===e.id&&t._order===e.order))}}
//# sourceMappingURL=pollyjs-persister.min.js.map
{
"name": "@pollyjs/persister",
"version": "5.1.1",
"version": "6.0.0",
"description": "Extendable base persister class used by @pollyjs",

@@ -8,2 +8,3 @@ "main": "dist/cjs/pollyjs-persister.js",

"browser": "dist/umd/pollyjs-persister.js",
"types": "types.d.ts",
"files": [

@@ -41,14 +42,14 @@ "src",

"dependencies": {
"@pollyjs/utils": "^5.1.1",
"@pollyjs/utils": "^6.0.0",
"bowser": "^2.4.0",
"fast-json-stable-stringify": "^2.0.0",
"lodash-es": "^4.17.11",
"set-cookie-parser": "^2.3.5",
"fast-json-stable-stringify": "^2.1.0",
"lodash-es": "^4.17.21",
"set-cookie-parser": "^2.4.8",
"utf8-byte-length": "^1.0.4"
},
"devDependencies": {
"har-validator": "^5.1.3",
"har-validator": "^5.1.5",
"rollup": "^1.14.6"
},
"gitHead": "bd3f8196775dbdd424836aa7a8dffa6aa7adafc8"
"gitHead": "4c3f6e0970bf6170674749b9a45b928074f136c2"
}

@@ -43,7 +43,7 @@ <p align="center">

findRecording() {}
onFindRecording() {}
saveRecording() {}
onSaveRecording() {}
deleteRecording() {}
onDeleteRecording() {}
}

@@ -50,0 +50,0 @@ ```

@@ -41,4 +41,4 @@ import getByteLength from 'utf8-byte-length';

if (response.isBinary) {
this.content._isBinary = true;
if (response.encoding) {
this.content.encoding = response.encoding;
}

@@ -45,0 +45,0 @@ }

@@ -14,3 +14,3 @@ const { keys } = Object;

// => { 'content-type': ['text/htm'] }
pairs.push(...value.map(v => ({ name, value: v, _fromType: 'array' })));
pairs.push(...value.map((v) => ({ name, value: v, _fromType: 'array' })));
} else {

@@ -17,0 +17,0 @@ pairs.push({ name, value });

@@ -59,3 +59,3 @@ import stringify from 'fast-json-stable-stringify';

const entries = [];
const recording = await this.find(recordingId);
const recording = await this.findRecording(recordingId);
let har;

@@ -74,3 +74,3 @@

`Cannot persist response for [${entry.request.method}] ${entry.request.url} because the status code was ${entry.response.status} and \`recordFailedRequests\` is \`false\``,
request.response.ok || request.config.recordFailedRequests
entry.response.status < 400 || request.config.recordFailedRequests
);

@@ -98,3 +98,3 @@

promises.push(this.save(recordingId, har));
promises.push(this.saveRecording(recordingId, har));
}

@@ -125,8 +125,8 @@

async find(recordingId) {
async findRecording(recordingId) {
const { _cache: cache } = this;
if (!cache.has(recordingId)) {
const findRecording = async () => {
const recording = await this.findRecording(recordingId);
const onFindRecording = async () => {
const recording = await this.onFindRecording(recordingId);

@@ -147,3 +147,3 @@ if (recording) {

cache.set(recordingId, findRecording());
cache.set(recordingId, onFindRecording());
}

@@ -154,15 +154,28 @@

async save(recordingId) {
await this.saveRecording(...arguments);
onFindRecording() {
this.assert('Must implement the `onFindRecording` hook.');
}
async saveRecording(recordingId, har) {
await this.onSaveRecording(...arguments);
this._cache.delete(recordingId);
this.polly.logger.log.debug('Recording saved.', { recordingId, har });
}
async delete(recordingId) {
await this.deleteRecording(...arguments);
onSaveRecording() {
this.assert('Must implement the `onSaveRecording` hook.');
}
async deleteRecording(recordingId) {
await this.onDeleteRecording(...arguments);
this._cache.delete(recordingId);
}
onDeleteRecording() {
this.assert('Must implement the `onDeleteRecording` hook.');
}
async findEntry(pollyRequest) {
const { id, order, recordingId } = pollyRequest;
const recording = await this.find(recordingId);
const recording = await this.findRecording(recordingId);

@@ -172,3 +185,3 @@ return (

recording.log.entries.find(
entry => entry._id === id && entry._order === order
(entry) => entry._id === id && entry._order === order
)) ||

@@ -199,3 +212,3 @@ null

const requests = this.polly._requests.filter(
r =>
(r) =>
r.recordingId === recordingId &&

@@ -205,18 +218,6 @@ (r.action === ACTIONS.RECORD || r.action === ACTIONS.REPLAY)

har.log.entries = har.log.entries.filter(entry =>
requests.find(r => entry._id === r.id && entry._order === r.order)
har.log.entries = har.log.entries.filter((entry) =>
requests.find((r) => entry._id === r.id && entry._order === r.order)
);
}
findRecording() {
this.assert('Must implement the `findRecording` hook.');
}
saveRecording() {
this.assert('Must implement the `saveRecording` hook.');
}
deleteRecording() {
this.assert('Must implement the `deleteRecording` hook.');
}
}

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 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 not supported yet

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

Sorry, the diff of this file is not supported yet

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