rudder-sdk-js 2.41.0 → 2.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -1
- package/LICENSE +21 -0
- package/README.md +138 -18
- package/dist/npm/index.cjs.js +1 -0
- package/{index.d.ts → dist/npm/index.d.ts} +1 -1
- package/dist/npm/index.es.js +1 -0
- package/dist/npm/index.js +1 -0
- package/dist/npm/service-worker/index.es.js +1 -0
- package/dist/npm/service-worker/index.js +1 -0
- package/package.json +93 -19
- package/index.es.js +0 -1
- package/index.js +0 -1
- package/service-worker/index.es.js +0 -5336
- package/service-worker/index.js +0 -5346
- /package/{service-worker → dist/npm/service-worker}/index.d.ts +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).rudderServiceWorker={})}(this,(function(t){"use strict";function e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function r(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function n(){n=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),u=new I(n||[]);return i(a,"_invoke",{value:S(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p="suspendedStart",d="suspendedYield",y="executing",g="completed",v={};function m(){}function b(){}function w(){}var E={};f(E,u,(function(){return this}));var _=Object.getPrototypeOf,O=_&&_(_(C([])));O&&O!==r&&o.call(O,u)&&(E=O);var A=w.prototype=m.prototype=Object.create(E);function R(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(n,i,a,u){var s=h(t[n],t,i);if("throw"!==s.type){var c=s.arg,f=c.value;return f&&"object"==typeof f&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){c.value=t,a(c)}),(function(t){return r("throw",t,a,u)}))}u(s.arg)}var n;i(this,"_invoke",{value:function(t,o){function i(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(i,i):i()}})}function S(e,r,n){var o=p;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=j(u,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var c=h(e,r,n);if("normal"===c.type){if(o=n.done?g:d,c.arg===v)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=g,n.method="throw",n.arg=c.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function x(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function C(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n<e.length;)if(o.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(typeof e+" is not iterable")}return b.prototype=w,i(A,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:b,configurable:!0}),b.displayName=f(w,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,c,"GeneratorFunction")),t.prototype=Object.create(A),t},e.awrap=function(t){return{__await:t}},R(T.prototype),f(T.prototype,s,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new T(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},R(A),f(A,c,"Generator"),f(A,u,(function(){return this})),f(A,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=C,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function u(t){i(a,n,o,u,s,"next",t)}function s(t){i(a,n,o,u,s,"throw",t)}u(void 0)}))}}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f(n.key),n)}}function s(t,e,r){return(e=f(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(){return c=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},c.apply(this,arguments)}function f(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var p=Object.prototype.toString;var d=h((function(t){switch(p.call(t)){case"[object Date]":return"date";case"[object RegExp]":return"regexp";case"[object Arguments]":return"arguments";case"[object Array]":return"array";case"[object Error]":return"error"}return null===t?"null":void 0===t?"undefined":t!=t?"nan":t&&1===t.nodeType?"element":null!=(e=t)&&(e._isBuffer||e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))?"buffer":o(t=t.valueOf?t.valueOf():Object.prototype.valueOf.apply(t));var e})),y=h((function(t,e,r){return e=e||"and",r=r||", ",t.length<2?t[0]||"":(e.slice(0,2)===r?2==t.length&&(e=e.slice(1)):e=" "+e,t.slice(0,-1).join(r)+e+" "+t[t.length-1])})),g="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v=[],m=[],b="undefined"!=typeof Uint8Array?Uint8Array:Array,w=!1;function E(){w=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)v[e]=t[e],m[t.charCodeAt(e)]=e;m["-".charCodeAt(0)]=62,m["_".charCodeAt(0)]=63}function _(t,e,r){for(var n,o,i=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],i.push(v[(o=n)>>18&63]+v[o>>12&63]+v[o>>6&63]+v[63&o]);return i.join("")}function O(t){var e;w||E();for(var r=t.length,n=r%3,o="",i=[],a=16383,u=0,s=r-n;u<s;u+=a)i.push(_(t,u,u+a>s?s:u+a));return 1===n?(e=t[r-1],o+=v[e>>2],o+=v[e<<4&63],o+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],o+=v[e>>10],o+=v[e>>4&63],o+=v[e<<2&63],o+="="),i.push(o),i.join("")}function A(t,e,r,n,o){var i,a,u=8*o-n-1,s=(1<<u)-1,c=s>>1,f=-7,l=r?o-1:0,h=r?-1:1,p=t[e+l];for(l+=h,i=p&(1<<-f)-1,p>>=-f,f+=u;f>0;i=256*i+t[e+l],l+=h,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===i)i=1-c;else{if(i===s)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),i-=c}return(p?-1:1)*a*Math.pow(2,i-n)}function R(t,e,r,n,o,i){var a,u,s,c=8*i-o-1,f=(1<<c)-1,l=f>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+l>=1?h/s:h*Math.pow(2,1-l))*s>=2&&(a++,s/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(e*s-1)*Math.pow(2,o),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+p]=255&u,p+=d,u/=256,o-=8);for(a=a<<o|u,c+=o;c>0;t[r+p]=255&a,p+=d,a/=256,c-=8);t[r+p-d]|=128*y}var T={}.toString,S=Array.isArray||function(t){return"[object Array]"==T.call(t)};function j(){return P.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function x(t,e){if(j()<e)throw new RangeError("Invalid typed array length");return P.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=P.prototype:(null===t&&(t=new P(e)),t.length=e),t}function P(t,e,r){if(!(P.TYPED_ARRAY_SUPPORT||this instanceof P))return new P(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return N(this,t)}return I(this,t,e,r)}function I(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);P.TYPED_ARRAY_SUPPORT?(t=e).__proto__=P.prototype:t=U(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!P.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|k(e,r);t=x(t,n);var o=t.write(e,r);o!==n&&(t=t.slice(0,o));return t}(t,e,r):function(t,e){if(D(e)){var r=0|L(e.length);return 0===(t=x(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?x(t,0):U(t,e);if("Buffer"===e.type&&S(e.data))return U(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function C(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function N(t,e){if(C(e),t=x(t,e<0?0:0|L(e)),!P.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function U(t,e){var r=e.length<0?0:0|L(e.length);t=x(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function L(t){if(t>=j())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+j().toString(16)+" bytes");return 0|t}function D(t){return!(null==t||!t._isBuffer)}function k(t,e){if(D(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return ft(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return lt(t).length;default:if(n)return ft(t).length;e=(""+e).toLowerCase(),n=!0}}function B(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Z(this,e,r);case"utf8":case"utf-8":return W(this,e,r);case"ascii":return X(this,e,r);case"latin1":case"binary":return Q(this,e,r);case"base64":return $(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tt(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function F(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Y(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=P.from(e,n)),D(e))return 0===e.length?-1:M(t,e,r,n,o);if("number"==typeof e)return e&=255,P.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):M(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function M(t,e,r,n,o){var i,a=1,u=t.length,s=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,u/=2,s/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var f=-1;for(i=r;i<u;i++)if(c(t,i)===c(e,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===s)return f*a}else-1!==f&&(i-=i-f),f=-1}else for(r+s>u&&(r=u-s),i=r;i>=0;i--){for(var l=!0,h=0;h<s;h++)if(c(t,i+h)!==c(e,h)){l=!1;break}if(l)return i}return-1}function q(t,e,r,n){r=Number(r)||0;var o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))return a;t[r+a]=u}return a}function z(t,e,r,n){return ht(ft(e,t.length-r),t,r,n)}function G(t,e,r,n){return ht(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function H(t,e,r,n){return G(t,e,r,n)}function V(t,e,r,n){return ht(lt(e),t,r,n)}function J(t,e,r,n){return ht(function(t,e){for(var r,n,o,i=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function $(t,e,r){return 0===e&&r===t.length?O(t):O(t.slice(e,r))}function W(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o<r;){var i,a,u,s,c=t[o],f=null,l=c>239?4:c>223?3:c>191?2:1;if(o+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&c)<<6|63&i)>127&&(f=s);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(s=(15&c)<<12|(63&i)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:i=t[o+1],a=t[o+2],u=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(f=s)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=l}return function(t){var e=t.length;if(e<=K)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=K));return r}(n)}P.TYPED_ARRAY_SUPPORT=void 0===g.TYPED_ARRAY_SUPPORT||g.TYPED_ARRAY_SUPPORT,j(),P.poolSize=8192,P._augment=function(t){return t.__proto__=P.prototype,t},P.from=function(t,e,r){return I(null,t,e,r)},P.TYPED_ARRAY_SUPPORT&&(P.prototype.__proto__=Uint8Array.prototype,P.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&P[Symbol.species]),P.alloc=function(t,e,r){return function(t,e,r,n){return C(e),e<=0?x(t,e):void 0!==r?"string"==typeof n?x(t,e).fill(r,n):x(t,e).fill(r):x(t,e)}(null,t,e,r)},P.allocUnsafe=function(t){return N(null,t)},P.allocUnsafeSlow=function(t){return N(null,t)},P.isBuffer=pt,P.compare=function(t,e){if(!D(t)||!D(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0},P.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},P.concat=function(t,e){if(!S(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return P.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=P.allocUnsafe(e),o=0;for(r=0;r<t.length;++r){var i=t[r];if(!D(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,o),o+=i.length}return n},P.byteLength=k,P.prototype._isBuffer=!0,P.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)F(this,e,e+1);return this},P.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)F(this,e,e+3),F(this,e+1,e+2);return this},P.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)F(this,e,e+7),F(this,e+1,e+6),F(this,e+2,e+5),F(this,e+3,e+4);return this},P.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?W(this,0,t):B.apply(this,arguments)},P.prototype.equals=function(t){if(!D(t))throw new TypeError("Argument must be a Buffer");return this===t||0===P.compare(this,t)},P.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},P.prototype.compare=function(t,e,r,n,o){if(!D(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),u=Math.min(i,a),s=this.slice(n,o),c=t.slice(e,r),f=0;f<u;++f)if(s[f]!==c[f]){i=s[f],a=c[f];break}return i<a?-1:a<i?1:0},P.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},P.prototype.indexOf=function(t,e,r){return Y(this,t,e,r,!0)},P.prototype.lastIndexOf=function(t,e,r){return Y(this,t,e,r,!1)},P.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return q(this,t,e,r);case"utf8":case"utf-8":return z(this,t,e,r);case"ascii":return G(this,t,e,r);case"latin1":case"binary":return H(this,t,e,r);case"base64":return V(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},P.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var K=4096;function X(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(127&t[o]);return n}function Q(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;o<r;++o)n+=String.fromCharCode(t[o]);return n}function Z(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var o="",i=e;i<r;++i)o+=ct(t[i]);return o}function tt(t,e,r){for(var n=t.slice(e,r),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function et(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function rt(t,e,r,n,o,i){if(!D(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||e<i)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function nt(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o<i;++o)t[r+o]=(e&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function ot(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o<i;++o)t[r+o]=e>>>8*(n?o:3-o)&255}function it(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function at(t,e,r,n,o){return o||it(t,0,r,4),R(t,e,r,n,23,4),r+4}function ut(t,e,r,n,o){return o||it(t,0,r,8),R(t,e,r,n,52,8),r+8}P.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),P.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=P.prototype;else{var o=e-t;r=new P(o,void 0);for(var i=0;i<o;++i)r[i]=this[i+t]}return r},P.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||et(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n},P.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||et(t,e,this.length);for(var n=this[t+--e],o=1;e>0&&(o*=256);)n+=this[t+--e]*o;return n},P.prototype.readUInt8=function(t,e){return e||et(t,1,this.length),this[t]},P.prototype.readUInt16LE=function(t,e){return e||et(t,2,this.length),this[t]|this[t+1]<<8},P.prototype.readUInt16BE=function(t,e){return e||et(t,2,this.length),this[t]<<8|this[t+1]},P.prototype.readUInt32LE=function(t,e){return e||et(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},P.prototype.readUInt32BE=function(t,e){return e||et(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},P.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||et(t,e,this.length);for(var n=this[t],o=1,i=0;++i<e&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*e)),n},P.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||et(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},P.prototype.readInt8=function(t,e){return e||et(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},P.prototype.readInt16LE=function(t,e){e||et(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},P.prototype.readInt16BE=function(t,e){e||et(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},P.prototype.readInt32LE=function(t,e){return e||et(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},P.prototype.readInt32BE=function(t,e){return e||et(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},P.prototype.readFloatLE=function(t,e){return e||et(t,4,this.length),A(this,t,!0,23,4)},P.prototype.readFloatBE=function(t,e){return e||et(t,4,this.length),A(this,t,!1,23,4)},P.prototype.readDoubleLE=function(t,e){return e||et(t,8,this.length),A(this,t,!0,52,8)},P.prototype.readDoubleBE=function(t,e){return e||et(t,8,this.length),A(this,t,!1,52,8)},P.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||rt(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i<r&&(o*=256);)this[e+i]=t/o&255;return e+r},P.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||rt(this,t,e,r,Math.pow(2,8*r)-1,0);var o=r-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+r},P.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||rt(this,t,e,1,255,0),P.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},P.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||rt(this,t,e,2,65535,0),P.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):nt(this,t,e,!0),e+2},P.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||rt(this,t,e,2,65535,0),P.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):nt(this,t,e,!1),e+2},P.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||rt(this,t,e,4,4294967295,0),P.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):ot(this,t,e,!0),e+4},P.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||rt(this,t,e,4,4294967295,0),P.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):ot(this,t,e,!1),e+4},P.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);rt(this,t,e,r,o-1,-o)}var i=0,a=1,u=0;for(this[e]=255&t;++i<r&&(a*=256);)t<0&&0===u&&0!==this[e+i-1]&&(u=1),this[e+i]=(t/a>>0)-u&255;return e+r},P.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);rt(this,t,e,r,o-1,-o)}var i=r-1,a=1,u=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===u&&0!==this[e+i+1]&&(u=1),this[e+i]=(t/a>>0)-u&255;return e+r},P.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||rt(this,t,e,1,127,-128),P.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},P.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||rt(this,t,e,2,32767,-32768),P.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):nt(this,t,e,!0),e+2},P.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||rt(this,t,e,2,32767,-32768),P.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):nt(this,t,e,!1),e+2},P.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||rt(this,t,e,4,2147483647,-2147483648),P.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):ot(this,t,e,!0),e+4},P.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||rt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),P.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):ot(this,t,e,!1),e+4},P.prototype.writeFloatLE=function(t,e,r){return at(this,t,e,!0,r)},P.prototype.writeFloatBE=function(t,e,r){return at(this,t,e,!1,r)},P.prototype.writeDoubleLE=function(t,e,r){return ut(this,t,e,!0,r)},P.prototype.writeDoubleBE=function(t,e,r){return ut(this,t,e,!1,r)},P.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var o,i=n-r;if(this===t&&r<e&&e<n)for(o=i-1;o>=0;--o)t[o+e]=this[o+r];else if(i<1e3||!P.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+i),e);return i},P.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!P.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{var a=D(t)?t:ft(new P(t,n).toString()),u=a.length;for(i=0;i<r-e;++i)this[i+e]=a[i%u]}return this};var st=/[^+\/0-9A-Za-z-_]/g;function ct(t){return t<16?"0"+t.toString(16):t.toString(16)}function ft(t,e){var r;e=e||1/0;for(var n=t.length,o=null,i=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function lt(t){return function(t){var e,r,n,o,i,a;w||E();var u=t.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===t[u-2]?2:"="===t[u-1]?1:0,a=new b(3*u/4-i),n=i>0?u-4:u;var s=0;for(e=0,r=0;e<n;e+=4,r+=3)o=m[t.charCodeAt(e)]<<18|m[t.charCodeAt(e+1)]<<12|m[t.charCodeAt(e+2)]<<6|m[t.charCodeAt(e+3)],a[s++]=o>>16&255,a[s++]=o>>8&255,a[s++]=255&o;return 2===i?(o=m[t.charCodeAt(e)]<<2|m[t.charCodeAt(e+1)]>>4,a[s++]=255&o):1===i&&(o=m[t.charCodeAt(e)]<<10|m[t.charCodeAt(e+1)]<<4|m[t.charCodeAt(e+2)]>>2,a[s++]=o>>8&255,a[s++]=255&o),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(st,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function ht(t,e,r,n){for(var o=0;o<n&&!(o+r>=e.length||o>=t.length);++o)e[o+r]=t[o];return o}function pt(t){return null!=t&&(!!t._isBuffer||dt(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&dt(t.slice(0,0))}(t))}function dt(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var yt="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t};function gt(t,e){var r={seen:[],stylize:mt};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),_t(e)?r.showHidden=e:e&&function(t,e){if(!e||!St(e))return t;var r=Object.keys(e),n=r.length;for(;n--;)t[r[n]]=e[r[n]]}(r,e),Rt(r.showHidden)&&(r.showHidden=!1),Rt(r.depth)&&(r.depth=2),Rt(r.colors)&&(r.colors=!1),Rt(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=vt),bt(r,t,r.depth)}function vt(t,e){var r=gt.styles[e];return r?"["+gt.colors[r][0]+"m"+t+"["+gt.colors[r][1]+"m":t}function mt(t,e){return t}function bt(t,e,r){if(t.customInspect&&e&&Pt(e.inspect)&&e.inspect!==gt&&(!e.constructor||e.constructor.prototype!==e)){var n=e.inspect(r,t);return At(n)||(n=bt(t,n,r)),n}var o=function(t,e){if(Rt(e))return t.stylize("undefined","undefined");if(At(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(n=e,"number"==typeof n)return t.stylize(""+e,"number");var n;if(_t(e))return t.stylize(""+e,"boolean");if(Ot(e))return t.stylize("null","null")}(t,e);if(o)return o;var i=Object.keys(e),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(e)),xt(e)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return wt(e);if(0===i.length){if(Pt(e)){var u=e.name?": "+e.name:"";return t.stylize("[Function"+u+"]","special")}if(Tt(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(jt(e))return t.stylize(Date.prototype.toString.call(e),"date");if(xt(e))return wt(e)}var s,c,f="",l=!1,h=["{","}"];(s=e,Array.isArray(s)&&(l=!0,h=["[","]"]),Pt(e))&&(f=" [Function"+(e.name?": "+e.name:"")+"]");return Tt(e)&&(f=" "+RegExp.prototype.toString.call(e)),jt(e)&&(f=" "+Date.prototype.toUTCString.call(e)),xt(e)&&(f=" "+wt(e)),0!==i.length||l&&0!=e.length?r<0?Tt(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=l?function(t,e,r,n,o){for(var i=[],a=0,u=e.length;a<u;++a)Nt(e,String(a))?i.push(Et(t,e,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(Et(t,e,r,n,o,!0))})),i}(t,e,r,a,i):i.map((function(n){return Et(t,e,r,a,n,l)})),t.seen.pop(),function(t,e,r){var n=t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,f,h)):h[0]+f+h[1]}function wt(t){return"["+Error.prototype.toString.call(t)+"]"}function Et(t,e,r,n,o,i){var a,u,s;if((s=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?u=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(u=t.stylize("[Setter]","special")),Nt(n,o)||(a="["+o+"]"),u||(t.seen.indexOf(s.value)<0?(u=Ot(r)?bt(t,s.value,null):bt(t,s.value,r-1)).indexOf("\n")>-1&&(u=i?u.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+u.split("\n").map((function(t){return" "+t})).join("\n")):u=t.stylize("[Circular]","special")),Rt(a)){if(i&&o.match(/^\d+$/))return u;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+u}function _t(t){return"boolean"==typeof t}function Ot(t){return null===t}function At(t){return"string"==typeof t}function Rt(t){return void 0===t}function Tt(t){return St(t)&&"[object RegExp]"===Ct(t)}function St(t){return"object"==typeof t&&null!==t}function jt(t){return St(t)&&"[object Date]"===Ct(t)}function xt(t){return St(t)&&("[object Error]"===Ct(t)||t instanceof Error)}function Pt(t){return"function"==typeof t}function It(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function Ct(t){return Object.prototype.toString.call(t)}function Nt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Ut(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0}gt.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},gt.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Lt,Dt=Object.prototype.hasOwnProperty,kt=Object.keys||function(t){var e=[];for(var r in t)Dt.call(t,r)&&e.push(r);return e},Bt=Array.prototype.slice;function Ft(){return void 0!==Lt?Lt:Lt="foo"===function(){}.name}function Yt(t){return Object.prototype.toString.call(t)}function Mt(t){return!pt(t)&&("function"==typeof g.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}function qt(t,e){t||$t(t,!0,e,"==",Wt)}var zt=/\s*function\s+([^\(\s]*)\s*/;function Gt(t){if(Pt(t)){if(Ft())return t.name;var e=t.toString().match(zt);return e&&e[1]}}function Ht(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return Vt(Jt(t.actual),128)+" "+t.operator+" "+Vt(Jt(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||$t;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,o=Gt(e),i=n.indexOf("\n"+o);if(i>=0){var a=n.indexOf("\n",i+1);n=n.substring(a+1)}this.stack=n}}}function Vt(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function Jt(t){if(Ft()||!Pt(t))return gt(t);var e=Gt(t);return"[Function"+(e?": "+e:"")+"]"}function $t(t,e,r,n,o){throw new Ht({message:r,actual:t,expected:e,operator:n,stackStartFunction:o})}function Wt(t,e){t||$t(t,!0,e,"==",Wt)}function Kt(t,e,r,n){if(t===e)return!0;if(pt(t)&&pt(e))return 0===Ut(t,e);if(jt(t)&&jt(e))return t.getTime()===e.getTime();if(Tt(t)&&Tt(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(Mt(t)&&Mt(e)&&Yt(t)===Yt(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===Ut(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(pt(t)!==pt(e))return!1;var o=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==o&&o===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(It(t)||It(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var o=Xt(t),i=Xt(e);if(o&&!i||!o&&i)return!1;if(o)return Kt(t=Bt.call(t),e=Bt.call(e),r);var a,u,s=kt(t),c=kt(e);if(s.length!==c.length)return!1;for(s.sort(),c.sort(),u=s.length-1;u>=0;u--)if(s[u]!==c[u])return!1;for(u=s.length-1;u>=0;u--)if(!Kt(t[a=s[u]],e[a],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function Xt(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function Qt(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function Zt(t,e,r,n){var o;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),o=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!o&&$t(o,r,"Missing expected exception"+n);var i="string"==typeof n,a=!t&&o&&!r;if((!t&&xt(o)&&i&&Qt(o,r)||a)&&$t(o,r,"Got unwanted exception"+n),t&&o&&r&&!Qt(o,r)||!t&&o)throw o}qt.AssertionError=Ht,yt(Ht,Error),qt.fail=$t,qt.ok=Wt,qt.equal=function t(e,r,n){e!=r&&$t(e,r,n,"==",t)},qt.notEqual=function t(e,r,n){e==r&&$t(e,r,n,"!=",t)},qt.deepEqual=function t(e,r,n){Kt(e,r,!1)||$t(e,r,n,"deepEqual",t)},qt.deepStrictEqual=function t(e,r,n){Kt(e,r,!0)||$t(e,r,n,"deepStrictEqual",t)},qt.notDeepEqual=function t(e,r,n){Kt(e,r,!1)&&$t(e,r,n,"notDeepEqual",t)},qt.notDeepStrictEqual=function t(e,r,n){Kt(e,r,!0)&&$t(e,r,n,"notDeepStrictEqual",t)},qt.strictEqual=function t(e,r,n){e!==r&&$t(e,r,n,"===",t)},qt.notStrictEqual=function t(e,r,n){e===r&&$t(e,r,n,"!==",t)},qt.throws=function(t,e,r){Zt(!0,t,e,r)},qt.doesNotThrow=function(t,e,r){Zt(!1,t,e,r)},qt.ifError=function(t){if(t)throw t};var te=32768;function ee(t,e){switch(ne(t),qt(e=e||t.type,"You must pass an event type."),e){case"track":return function(t){qt(t.anonymousId||t.userId,'You must pass either an "anonymousId" or a "userId".'),qt(t.event,'You must pass an "event".')}(t);case"group":return function(t){qt(t.anonymousId||t.userId,'You must pass either an "anonymousId" or a "userId".'),qt(t.groupId,'You must pass a "groupId".')}(t);case"identify":case"page":case"screen":return function(t){qt(t.anonymousId||t.userId,'You must pass either an "anonymousId" or a "userId".')}(t);case"alias":return function(t){qt(t.userId,'You must pass a "userId".'),qt(t.previousId,'You must pass a "previousId".')}(t);default:qt(0,'Invalid event type: "'+e+'"')}}var re={anonymousId:["string","number"],category:"string",context:"object",event:"string",groupId:["string","number"],integrations:"object",name:"string",previousId:["string","number"],timestamp:"date",userId:["string","number"],type:"string"};function ne(t){qt("object"===d(t),"You must pass a message object.");var e=JSON.stringify(t);for(var r in qt(Buffer.byteLength(e,"utf8")<te,"Your message must be < 32kb."),re){var n=t[r];if(n){var o=re[r];"array"!==d(o)&&(o=[o]);var i="object"===o[0]?"an":"a";qt(o.some((function(t){return d(n)===t})),'"'+r+'" must be '+i+" "+y(o,"or")+".")}}}var oe,ie={exports:{}},ae=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return t.apply(e,r)}},ue=ae,se=Object.prototype.toString,ce=(oe=Object.create(null),function(t){var e=se.call(t);return oe[e]||(oe[e]=e.slice(8,-1).toLowerCase())});function fe(t){return t=t.toLowerCase(),function(e){return ce(e)===t}}function le(t){return Array.isArray(t)}function he(t){return void 0===t}var pe=fe("ArrayBuffer");function de(t){return null!==t&&"object"===o(t)}function ye(t){if("object"!==ce(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var ge=fe("Date"),ve=fe("File"),me=fe("Blob"),be=fe("FileList");function we(t){return"[object Function]"===se.call(t)}var Ee=fe("URLSearchParams");function _e(t,e){if(null!=t)if("object"!==o(t)&&(t=[t]),le(t))for(var r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}var Oe,Ae=(Oe="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return Oe&&t instanceof Oe}),Re={isArray:le,isArrayBuffer:pe,isBuffer:function(t){return null!==t&&!he(t)&&null!==t.constructor&&!he(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){var e="[object FormData]";return t&&("function"==typeof FormData&&t instanceof FormData||se.call(t)===e||we(t.toString)&&t.toString()===e)},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&pe(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:de,isPlainObject:ye,isUndefined:he,isDate:ge,isFile:ve,isBlob:me,isFunction:we,isStream:function(t){return de(t)&&we(t.pipe)},isURLSearchParams:Ee,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:_e,merge:function t(){var e={};function r(r,n){ye(e[n])&&ye(r)?e[n]=t(e[n],r):ye(r)?e[n]=t({},r):le(r)?e[n]=r.slice():e[n]=r}for(var n=0,o=arguments.length;n<o;n++)_e(arguments[n],r);return e},extend:function(t,e,r){return _e(e,(function(e,n){t[n]=r&&"function"==typeof e?ue(e,r):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},inherits:function(t,e,r,n){t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,r&&c(t.prototype,r)},toFlatObject:function(t,e,r){var n,o,i,a={};e=e||{};do{for(o=(n=Object.getOwnPropertyNames(t)).length;o-- >0;)a[i=n[o]]||(e[i]=t[i],a[i]=!0);t=Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:ce,kindOfTest:fe,endsWith:function(t,e,r){t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;var n=t.indexOf(e,r);return-1!==n&&n===r},toArray:function(t){if(!t)return null;var e=t.length;if(he(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r},isTypedArray:Ae,isFileList:be},Te=Re;function Se(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var je=function(t,e,r){if(!e)return t;var n;if(r)n=r(e);else if(Te.isURLSearchParams(e))n=e.toString();else{var o=[];Te.forEach(e,(function(t,e){null!=t&&(Te.isArray(t)?e+="[]":t=[t],Te.forEach(t,(function(t){Te.isDate(t)?t=t.toISOString():Te.isObject(t)&&(t=JSON.stringify(t)),o.push(Se(e)+"="+Se(t))})))})),n=o.join("&")}if(n){var i=t.indexOf("#");-1!==i&&(t=t.slice(0,i)),t+=(-1===t.indexOf("?")?"?":"&")+n}return t},xe=h(je),Pe=Re;function Ie(){this.handlers=[]}Ie.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},Ie.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},Ie.prototype.forEach=function(t){Pe.forEach(this.handlers,(function(e){null!==e&&t(e)}))};var Ce,Ne,Ue=Ie,Le=Re;function De(){if(Ne)return Ce;Ne=1;var t=Re;function e(t,e,r,n,o){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}t.inherits(e,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var r=e.prototype,n={};return["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(t){n[t]={value:t}})),Object.defineProperties(e,n),Object.defineProperty(r,"isAxiosError",{value:!0}),e.from=function(n,o,i,a,u,s){var f=Object.create(r);return t.toFlatObject(n,f,(function(t){return t!==Error.prototype})),e.call(f,n.message,o,i,a,u),f.name=n.name,s&&c(f,s),f},Ce=e}var ke,Be,Fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};function Ye(){if(Be)return ke;Be=1;var t=Re;return ke=function(e,r){r=r||new FormData;var n=[];function i(e){return null===e?"":t.isDate(e)?e.toISOString():t.isArrayBuffer(e)||t.isTypedArray(e)?"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}return function e(a,u){if(t.isPlainObject(a)||t.isArray(a)){if(-1!==n.indexOf(a))throw Error("Circular reference detected in "+u);n.push(a),t.forEach(a,(function(n,a){if(!t.isUndefined(n)){var s,c=u?u+"."+a:a;if(n&&!u&&"object"===o(n))if(t.endsWith(a,"{}"))n=JSON.stringify(n);else if(t.endsWith(a,"[]")&&(s=t.toArray(n)))return void s.forEach((function(e){!t.isUndefined(e)&&r.append(c,i(e))}));e(n,c)}})),n.pop()}else r.append(u,i(a))}(e),r},ke}var Me,qe,ze=De(),Ge=function(t,e,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new ze("Request failed with status code "+r.status,[ze.ERR_BAD_REQUEST,ze.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)},He=h(Ge);function Ve(){if(qe)return Me;qe=1;var t=Re;return Me=t.isStandardBrowserEnv()?{write:function(e,r,n,o,i,a){var u=[];u.push(e+"="+encodeURIComponent(r)),t.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),t.isString(o)&&u.push("path="+o),t.isString(i)&&u.push("domain="+i),!0===a&&u.push("secure"),document.cookie=u.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}}var Je,$e,We,Ke,Xe,Qe,Ze,tr,er,rr,nr,or,ir=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)},ar=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t},ur=function(t,e){return t&&!ir(e)?ar(t,e):e},sr=h(ur);function cr(){if($e)return Je;$e=1;var t=Re,e=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Je=function(r){var n,o,i,a={};return r?(t.forEach(r.split("\n"),(function(r){if(i=r.indexOf(":"),n=t.trim(r.substr(0,i)).toLowerCase(),o=t.trim(r.substr(i+1)),n){if(a[n]&&e.indexOf(n)>=0)return;a[n]="set-cookie"===n?(a[n]?a[n]:[]).concat([o]):a[n]?a[n]+", "+o:o}})),a):a}}function fr(){if(Ke)return We;Ke=1;var t=Re;return We=t.isStandardBrowserEnv()?function(){var e,r=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var e=t;return r&&(n.setAttribute("href",e),e=n.href),n.setAttribute("href",e),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(r){var n=t.isString(r)?o(r):r;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}}function lr(){if(Qe)return Xe;Qe=1;var t=De();function e(e){t.call(this,null==e?"canceled":e,t.ERR_CANCELED),this.name="CanceledError"}return Re.inherits(e,t,{__CANCEL__:!0}),Xe=e}function hr(){return tr?Ze:(tr=1,Ze=function(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""})}function pr(){if(rr)return er;rr=1;var t=Re,e=Ge,r=Ve(),n=je,o=ur,i=cr(),a=fr(),u=Fe,s=De(),c=lr(),f=hr();return er=function(l){return new Promise((function(h,p){var d,y=l.data,g=l.headers,v=l.responseType;function m(){l.cancelToken&&l.cancelToken.unsubscribe(d),l.signal&&l.signal.removeEventListener("abort",d)}t.isFormData(y)&&t.isStandardBrowserEnv()&&delete g["Content-Type"];var b=new XMLHttpRequest;if(l.auth){var w=l.auth.username||"",E=l.auth.password?unescape(encodeURIComponent(l.auth.password)):"";g.Authorization="Basic "+btoa(w+":"+E)}var _=o(l.baseURL,l.url);function O(){if(b){var t="getAllResponseHeaders"in b?i(b.getAllResponseHeaders()):null,r={data:v&&"text"!==v&&"json"!==v?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:t,config:l,request:b};e((function(t){h(t),m()}),(function(t){p(t),m()}),r),b=null}}if(b.open(l.method.toUpperCase(),n(_,l.params,l.paramsSerializer),!0),b.timeout=l.timeout,"onloadend"in b?b.onloadend=O:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(O)},b.onabort=function(){b&&(p(new s("Request aborted",s.ECONNABORTED,l,b)),b=null)},b.onerror=function(){p(new s("Network Error",s.ERR_NETWORK,l,b,b)),b=null},b.ontimeout=function(){var t=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",e=l.transitional||u;l.timeoutErrorMessage&&(t=l.timeoutErrorMessage),p(new s(t,e.clarifyTimeoutError?s.ETIMEDOUT:s.ECONNABORTED,l,b)),b=null},t.isStandardBrowserEnv()){var A=(l.withCredentials||a(_))&&l.xsrfCookieName?r.read(l.xsrfCookieName):void 0;A&&(g[l.xsrfHeaderName]=A)}"setRequestHeader"in b&&t.forEach(g,(function(t,e){void 0===y&&"content-type"===e.toLowerCase()?delete g[e]:b.setRequestHeader(e,t)})),t.isUndefined(l.withCredentials)||(b.withCredentials=!!l.withCredentials),v&&"json"!==v&&(b.responseType=l.responseType),"function"==typeof l.onDownloadProgress&&b.addEventListener("progress",l.onDownloadProgress),"function"==typeof l.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",l.onUploadProgress),(l.cancelToken||l.signal)&&(d=function(t){b&&(p(!t||t&&t.type?new c:t),b.abort(),b=null)},l.cancelToken&&l.cancelToken.subscribe(d),l.signal&&(l.signal.aborted?d():l.signal.addEventListener("abort",d))),y||(y=null);var R=f(_);R&&-1===["http","https","file"].indexOf(R)?p(new s("Unsupported protocol "+R+":",s.ERR_BAD_REQUEST,l)):b.send(y)}))},er}var dr=Re,yr=function(t,e){Le.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))},gr=De(),vr=Fe,mr=Ye(),br={"Content-Type":"application/x-www-form-urlencoded"};function wr(t,e){!dr.isUndefined(t)&&dr.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var Er,_r={transitional:vr,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(Er=pr()),Er),transformRequest:[function(t,e){if(yr(e,"Accept"),yr(e,"Content-Type"),dr.isFormData(t)||dr.isArrayBuffer(t)||dr.isBuffer(t)||dr.isStream(t)||dr.isFile(t)||dr.isBlob(t))return t;if(dr.isArrayBufferView(t))return t.buffer;if(dr.isURLSearchParams(t))return wr(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r,n=dr.isObject(t),o=e&&e["Content-Type"];if((r=dr.isFileList(t))||n&&"multipart/form-data"===o){var i=this.env&&this.env.FormData;return mr(r?{"files[]":t}:t,i&&new i)}return n||"application/json"===o?(wr(e,"application/json"),function(t,e,r){if(dr.isString(t))try{return(e||JSON.parse)(t),dr.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||_r.transitional,r=e&&e.silentJSONParsing,n=e&&e.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&dr.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(o){if("SyntaxError"===t.name)throw gr.from(t,gr.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:or?nr:(or=1,nr=null)},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};dr.forEach(["delete","get","head"],(function(t){_r.headers[t]={}})),dr.forEach(["post","put","patch"],(function(t){_r.headers[t]=dr.merge(br)}));var Or,Ar,Rr=_r,Tr=Re,Sr=Rr;function jr(){return Ar?Or:(Ar=1,Or=function(t){return!(!t||!t.__CANCEL__)})}var xr=Re,Pr=function(t,e,r){var n=this||Sr;return Tr.forEach(r,(function(r){t=r.call(n,t,e)})),t},Ir=jr(),Cr=Rr,Nr=lr();function Ur(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Nr}var Lr,Dr,kr=Re,Br=function(t,e){e=e||{};var r={};function n(t,e){return kr.isPlainObject(t)&&kr.isPlainObject(e)?kr.merge(t,e):kr.isPlainObject(e)?kr.merge({},e):kr.isArray(e)?e.slice():e}function o(r){return kr.isUndefined(e[r])?kr.isUndefined(t[r])?void 0:n(void 0,t[r]):n(t[r],e[r])}function i(t){if(!kr.isUndefined(e[t]))return n(void 0,e[t])}function a(r){return kr.isUndefined(e[r])?kr.isUndefined(t[r])?void 0:n(void 0,t[r]):n(void 0,e[r])}function u(r){return r in e?n(t[r],e[r]):r in t?n(void 0,t[r]):void 0}var s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return kr.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=s[t]||o,n=e(t);kr.isUndefined(n)&&e!==u||(r[t]=n)})),r};function Fr(){return Dr?Lr:(Dr=1,Lr={version:"0.27.2"})}var Yr=Fr().version,Mr=De(),qr={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){qr[t]=function(r){return o(r)===t||"a"+(e<1?"n ":" ")+t}}));var zr={};qr.transitional=function(t,e,r){function n(t,e){return"[Axios v"+Yr+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,o,i){if(!1===t)throw new Mr(n(o," has been removed"+(e?" in "+e:"")),Mr.ERR_DEPRECATED);return e&&!zr[o]&&(zr[o]=!0,console.warn(n(o," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,o,i)}};var Gr,Hr,Vr,Jr,$r,Wr,Kr={assertOptions:function(t,e,r){if("object"!==o(t))throw new Mr("options must be an object",Mr.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],u=e[a];if(u){var s=t[a],c=void 0===s||u(s,a,t);if(!0!==c)throw new Mr("option "+a+" must be "+c,Mr.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new Mr("Unknown option "+a,Mr.ERR_BAD_OPTION)}},validators:qr},Xr=Re,Qr=je,Zr=Ue,tn=function(t){return Ur(t),t.headers=t.headers||{},t.data=Pr.call(t,t.data,t.headers,t.transformRequest),t.headers=xr.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),xr.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||Cr.adapter)(t).then((function(e){return Ur(t),e.data=Pr.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return Ir(e)||(Ur(t),e&&e.response&&(e.response.data=Pr.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))},en=Br,rn=ur,nn=Kr,on=nn.validators;function an(t){this.defaults=t,this.interceptors={request:new Zr,response:new Zr}}an.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=en(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;void 0!==r&&nn.assertOptions(r,{silentJSONParsing:on.transitional(on.boolean),forcedJSONParsing:on.transitional(on.boolean),clarifyTimeoutError:on.transitional(on.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(o=o&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(t){a.push(t.fulfilled,t.rejected)})),!o){var u=[tn,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var s=e;n.length;){var c=n.shift(),f=n.shift();try{s=c(s)}catch(t){f(t);break}}try{i=tn(s)}catch(t){return Promise.reject(t)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},an.prototype.getUri=function(t){t=en(this.defaults,t);var e=rn(t.baseURL,t.url);return Qr(e,t.params,t.paramsSerializer)},Xr.forEach(["delete","get","head","options"],(function(t){an.prototype[t]=function(e,r){return this.request(en(r||{},{method:t,url:e,data:(r||{}).data}))}})),Xr.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(en(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}an.prototype[t]=e(),an.prototype[t+"Form"]=e(!0)}));var un=Re,sn=ae,cn=an,fn=Br;var ln=function t(e){var r=new cn(e),n=sn(cn.prototype.request,r);return un.extend(n,cn.prototype,r),un.extend(n,r),n.create=function(r){return t(fn(e,r))},n}(Rr);ln.Axios=cn,ln.CanceledError=lr(),ln.CancelToken=function(){if(Hr)return Gr;Hr=1;var t=lr();function e(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var r;this.promise=new Promise((function(t){r=t}));var n=this;this.promise.then((function(t){if(n._listeners){var e,r=n._listeners.length;for(e=0;e<r;e++)n._listeners[e](t);n._listeners=null}})),this.promise.then=function(t){var e,r=new Promise((function(t){n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},e((function(e){n.reason||(n.reason=new t(e),r(n.reason))}))}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.prototype.subscribe=function(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]},e.prototype.unsubscribe=function(t){if(this._listeners){var e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}},e.source=function(){var t;return{token:new e((function(e){t=e})),cancel:t}},Gr=e}(),ln.isCancel=jr(),ln.VERSION=Fr().version,ln.toFormData=Ye(),ln.AxiosError=De(),ln.Cancel=ln.CanceledError,ln.all=function(t){return Promise.all(t)},ln.spread=Jr?Vr:(Jr=1,Vr=function(t){return function(e){return t.apply(null,e)}}),ln.isAxiosError=function(){if(Wr)return $r;Wr=1;var t=Re;return $r=function(e){return t.isObject(e)&&!0===e.isAxiosError}}(),ie.exports=ln,ie.exports.default=ln;var hn=h(ie.exports),pn=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]),dn=h((function(t){return!pn.has(t&&t.code)}));function yn(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function gn(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yn(i,n,o,a,u,"next",t)}function u(t){yn(i,n,o,a,u,"throw",t)}a(void 0)}))}}function vn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function mn(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vn(Object(r),!0).forEach((function(e){bn(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vn(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var wn="axios-retry";function En(t){return!t.response&&Boolean(t.code)&&"ECONNABORTED"!==t.code&&dn(t)}var _n=["get","head","options"],On=_n.concat(["put","delete"]);function An(t){return"ECONNABORTED"!==t.code&&(!t.response||t.response.status>=500&&t.response.status<=599)}function Rn(t){return!!t.config&&(An(t)&&-1!==On.indexOf(t.config.method))}function Tn(t){return En(t)||Rn(t)}function Sn(){return 0}function jn(t){var e=t[wn]||{};return e.retryCount=e.retryCount||0,t[wn]=e,e}function xn(t,e){return mn(mn({},e),t[wn])}function Pn(t,e){t.defaults.agent===e.agent&&delete e.agent,t.defaults.httpAgent===e.httpAgent&&delete e.httpAgent,t.defaults.httpsAgent===e.httpsAgent&&delete e.httpsAgent}function In(t,e,r,n){return Cn.apply(this,arguments)}function Cn(){return(Cn=gn(n().mark((function t(e,r,i,a){var u,s;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("object"!==o(u=i.retryCount<e&&r(a))){t.next=12;break}return t.prev=2,t.next=5,u;case 5:return s=t.sent,t.abrupt("return",!1!==s);case 9:return t.prev=9,t.t0=t.catch(2),t.abrupt("return",!1);case 12:return t.abrupt("return",u);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})))).apply(this,arguments)}function Nn(t,e){var r=t.interceptors.request.use((function(t){return jn(t).lastRequestTime=Date.now(),t})),o=t.interceptors.response.use(null,function(){var r=gn(n().mark((function r(o){var i,a,u,s,c,f,l,h,p,d,y,g,v,m,b,w;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=o.config){r.next=3;break}return r.abrupt("return",Promise.reject(o));case 3:return a=xn(i,e),u=a.retries,s=void 0===u?3:u,c=a.retryCondition,f=void 0===c?Tn:c,l=a.retryDelay,h=void 0===l?Sn:l,p=a.shouldResetTimeout,d=void 0!==p&&p,y=a.onRetry,g=void 0===y?function(){}:y,v=jn(i),r.next=7,In(s,f,v,o);case 7:if(!r.sent){r.next=20;break}if(v.retryCount+=1,m=h(v.retryCount,o),Pn(t,i),d||!i.timeout||!v.lastRequestTime){r.next=17;break}if(b=Date.now()-v.lastRequestTime,!((w=i.timeout-b-m)<=0)){r.next=16;break}return r.abrupt("return",Promise.reject(o));case 16:i.timeout=w;case 17:return i.transformRequest=[function(t){return t}],g(v.retryCount,o,i),r.abrupt("return",new Promise((function(e){return setTimeout((function(){return e(t(i))}),m)})));case 20:return r.abrupt("return",Promise.reject(o));case 21:case"end":return r.stop()}}),r)})));return function(t){return r.apply(this,arguments)}}());return{requestInterceptorId:r,responseInterceptorId:o}}Nn.isNetworkError=En,Nn.isSafeRequestError=function(t){return!!t.config&&(An(t)&&-1!==_n.indexOf(t.config.method))},Nn.isIdempotentRequestError=Rn,Nn.isNetworkOrIdempotentRequestError=Tn,Nn.exponentialDelay=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,r=Math.pow(2,t)*e;return r+.2*r*Math.random()},Nn.isRetryableError=An;var Un=1e3,Ln=60*Un,Dn=60*Ln,kn=24*Dn,Bn=7*kn,Fn=365.25*kn,Yn=function(t,e){e=e||{};var r=o(t);if("string"===r&&t.length>0)return function(t){if((t=String(t)).length>100)return;var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*Fn;case"weeks":case"week":case"w":return r*Bn;case"days":case"day":case"d":return r*kn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*Dn;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ln;case"seconds":case"second":case"secs":case"sec":case"s":return r*Un;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(t);if("number"===r&&isFinite(t))return e.long?function(t){var e=Math.abs(t);if(e>=kn)return Mn(t,e,kn,"day");if(e>=Dn)return Mn(t,e,Dn,"hour");if(e>=Ln)return Mn(t,e,Ln,"minute");if(e>=Un)return Mn(t,e,Un,"second");return t+" ms"}(t):function(t){var e=Math.abs(t);if(e>=kn)return Math.round(t/kn)+"d";if(e>=Dn)return Math.round(t/Dn)+"h";if(e>=Ln)return Math.round(t/Ln)+"m";if(e>=Un)return Math.round(t/Un)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function Mn(t,e,r,n){var o=e>=1.5*r;return Math.round(t/r)+" "+n+(o?"s":"")}for(var qn,zn=h(Yn),Gn=256,Hn=[];Gn--;)Hn[Gn]=(Gn+256).toString(16).substring(1);var Vn=Object.prototype.toString,Jn=Array.isArray;var $n=h((function(t){return"string"==typeof t||!Jn(t)&&function(t){return!!t&&"object"==o(t)}(t)&&"[object String]"==Vn.call(t)})),Wn={exports:{}};!function(t,e){var r="__lodash_hash_undefined__",n=9007199254740991,i="[object Arguments]",a="[object Boolean]",u="[object Date]",s="[object Function]",c="[object GeneratorFunction]",f="[object Map]",h="[object Number]",p="[object Object]",d="[object Promise]",y="[object RegExp]",g="[object Set]",v="[object String]",m="[object Symbol]",b="[object WeakMap]",w="[object ArrayBuffer]",E="[object DataView]",_="[object Float32Array]",O="[object Float64Array]",A="[object Int8Array]",R="[object Int16Array]",T="[object Int32Array]",S="[object Uint8Array]",j="[object Uint8ClampedArray]",x="[object Uint16Array]",P="[object Uint32Array]",I=/\w*$/,C=/^\[object .+?Constructor\]$/,N=/^(?:0|[1-9]\d*)$/,U={};U[i]=U["[object Array]"]=U[w]=U[E]=U[a]=U[u]=U[_]=U[O]=U[A]=U[R]=U[T]=U[f]=U[h]=U[p]=U[y]=U[g]=U[v]=U[m]=U[S]=U[j]=U[x]=U[P]=!0,U["[object Error]"]=U[s]=U[b]=!1;var L="object"==o(l)&&l&&l.Object===Object&&l,D="object"==("undefined"==typeof self?"undefined":o(self))&&self&&self.Object===Object&&self,k=L||D||Function("return this")(),B=e&&!e.nodeType&&e,F=B&&t&&!t.nodeType&&t,Y=F&&F.exports===B;function M(t,e){return t.set(e[0],e[1]),t}function q(t,e){return t.add(e),t}function z(t,e,r,n){var o=-1,i=t?t.length:0;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}function G(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}function H(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function V(t,e){return function(r){return t(e(r))}}function J(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var $,W=Array.prototype,K=Function.prototype,X=Object.prototype,Q=k["__core-js_shared__"],Z=($=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+$:"",tt=K.toString,et=X.hasOwnProperty,rt=X.toString,nt=RegExp("^"+tt.call(et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ot=Y?k.Buffer:void 0,it=k.Symbol,at=k.Uint8Array,ut=V(Object.getPrototypeOf,Object),st=Object.create,ct=X.propertyIsEnumerable,ft=W.splice,lt=Object.getOwnPropertySymbols,ht=ot?ot.isBuffer:void 0,pt=V(Object.keys,Object),dt=Ft(k,"DataView"),yt=Ft(k,"Map"),gt=Ft(k,"Promise"),vt=Ft(k,"Set"),mt=Ft(k,"WeakMap"),bt=Ft(Object,"create"),wt=Gt(dt),Et=Gt(yt),_t=Gt(gt),Ot=Gt(vt),At=Gt(mt),Rt=it?it.prototype:void 0,Tt=Rt?Rt.valueOf:void 0;function St(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function jt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function xt(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Pt(t){this.__data__=new jt(t)}function It(t,e){var r=Vt(t)||function(t){return function(t){return function(t){return!!t&&"object"==o(t)}(t)&&Jt(t)}(t)&&et.call(t,"callee")&&(!ct.call(t,"callee")||rt.call(t)==i)}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,a=!!n;for(var u in t)!e&&!et.call(t,u)||a&&("length"==u||qt(u,n))||r.push(u);return r}function Ct(t,e,r){var n=t[e];et.call(t,e)&&Ht(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function Nt(t,e){for(var r=t.length;r--;)if(Ht(t[r][0],e))return r;return-1}function Ut(t,e,r,n,o,l,d){var b;if(n&&(b=l?n(t,o,l,d):n(t)),void 0!==b)return b;if(!Kt(t))return t;var C=Vt(t);if(C){if(b=function(t){var e=t.length,r=t.constructor(e);e&&"string"==typeof t[0]&&et.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!e)return function(t,e){var r=-1,n=t.length;e||(e=Array(n));for(;++r<n;)e[r]=t[r];return e}(t,b)}else{var N=Mt(t),L=N==s||N==c;if($t(t))return function(t,e){if(e)return t.slice();var r=new t.constructor(t.length);return t.copy(r),r}(t,e);if(N==p||N==i||L&&!l){if(G(t))return l?t:{};if(b=function(t){return"function"!=typeof t.constructor||zt(t)?{}:(e=ut(t),Kt(e)?st(e):{});var e}(L?{}:t),!e)return function(t,e){return kt(t,Yt(t),e)}(t,function(t,e){return t&&kt(e,Xt(e),t)}(b,t))}else{if(!U[N])return l?t:{};b=function(t,e,r,n){var o=t.constructor;switch(e){case w:return Dt(t);case a:case u:return new o(+t);case E:return function(t,e){var r=e?Dt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,n);case _:case O:case A:case R:case T:case S:case j:case x:case P:return function(t,e){var r=e?Dt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,n);case f:return function(t,e,r){var n=e?r(H(t),!0):H(t);return z(n,M,new t.constructor)}(t,n,r);case h:case v:return new o(t);case y:return function(t){var e=new t.constructor(t.source,I.exec(t));return e.lastIndex=t.lastIndex,e}(t);case g:return function(t,e,r){var n=e?r(J(t),!0):J(t);return z(n,q,new t.constructor)}(t,n,r);case m:return i=t,Tt?Object(Tt.call(i)):{}}var i}(t,N,Ut,e)}}d||(d=new Pt);var D=d.get(t);if(D)return D;if(d.set(t,b),!C)var k=r?function(t){return function(t,e,r){var n=e(t);return Vt(t)?n:function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}(n,r(t))}(t,Xt,Yt)}(t):Xt(t);return function(t,e){for(var r=-1,n=t?t.length:0;++r<n&&!1!==e(t[r],r,t););}(k||t,(function(o,i){k&&(o=t[i=o]),Ct(b,i,Ut(o,e,r,n,i,t,d))})),b}function Lt(t){return!(!Kt(t)||(e=t,Z&&Z in e))&&(Wt(t)||G(t)?nt:C).test(Gt(t));var e}function Dt(t){var e=new t.constructor(t.byteLength);return new at(e).set(new at(t)),e}function kt(t,e,r,n){r||(r={});for(var o=-1,i=e.length;++o<i;){var a=e[o],u=n?n(r[a],t[a],a,r,t):void 0;Ct(r,a,void 0===u?t[a]:u)}return r}function Bt(t,e){var r=t.__data__;return function(t){var e=o(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?r["string"==typeof e?"string":"hash"]:r.map}function Ft(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return Lt(r)?r:void 0}St.prototype.clear=function(){this.__data__=bt?bt(null):{}},St.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},St.prototype.get=function(t){var e=this.__data__;if(bt){var n=e[t];return n===r?void 0:n}return et.call(e,t)?e[t]:void 0},St.prototype.has=function(t){var e=this.__data__;return bt?void 0!==e[t]:et.call(e,t)},St.prototype.set=function(t,e){return this.__data__[t]=bt&&void 0===e?r:e,this},jt.prototype.clear=function(){this.__data__=[]},jt.prototype.delete=function(t){var e=this.__data__,r=Nt(e,t);return!(r<0)&&(r==e.length-1?e.pop():ft.call(e,r,1),!0)},jt.prototype.get=function(t){var e=this.__data__,r=Nt(e,t);return r<0?void 0:e[r][1]},jt.prototype.has=function(t){return Nt(this.__data__,t)>-1},jt.prototype.set=function(t,e){var r=this.__data__,n=Nt(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},xt.prototype.clear=function(){this.__data__={hash:new St,map:new(yt||jt),string:new St}},xt.prototype.delete=function(t){return Bt(this,t).delete(t)},xt.prototype.get=function(t){return Bt(this,t).get(t)},xt.prototype.has=function(t){return Bt(this,t).has(t)},xt.prototype.set=function(t,e){return Bt(this,t).set(t,e),this},Pt.prototype.clear=function(){this.__data__=new jt},Pt.prototype.delete=function(t){return this.__data__.delete(t)},Pt.prototype.get=function(t){return this.__data__.get(t)},Pt.prototype.has=function(t){return this.__data__.has(t)},Pt.prototype.set=function(t,e){var r=this.__data__;if(r instanceof jt){var n=r.__data__;if(!yt||n.length<199)return n.push([t,e]),this;r=this.__data__=new xt(n)}return r.set(t,e),this};var Yt=lt?V(lt,Object):function(){return[]},Mt=function(t){return rt.call(t)};function qt(t,e){return!!(e=null==e?n:e)&&("number"==typeof t||N.test(t))&&t>-1&&t%1==0&&t<e}function zt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||X)}function Gt(t){if(null!=t){try{return tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Ht(t,e){return t===e||t!=t&&e!=e}(dt&&Mt(new dt(new ArrayBuffer(1)))!=E||yt&&Mt(new yt)!=f||gt&&Mt(gt.resolve())!=d||vt&&Mt(new vt)!=g||mt&&Mt(new mt)!=b)&&(Mt=function(t){var e=rt.call(t),r=e==p?t.constructor:void 0,n=r?Gt(r):void 0;if(n)switch(n){case wt:return E;case Et:return f;case _t:return d;case Ot:return g;case At:return b}return e});var Vt=Array.isArray;function Jt(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}(t.length)&&!Wt(t)}var $t=ht||function(){return!1};function Wt(t){var e=Kt(t)?rt.call(t):"";return e==s||e==c}function Kt(t){var e=o(t);return!!t&&("object"==e||"function"==e)}function Xt(t){return Jt(t)?It(t):function(t){if(!zt(t))return pt(t);var e=[];for(var r in Object(t))et.call(t,r)&&"constructor"!=r&&e.push(r);return e}(t)}t.exports=function(t){return Ut(t,!0,!0)}}(Wn,Wn.exports);var Kn=h(Wn.exports);function Xn(t){return Qn.apply(this,arguments)}function Qn(){return Qn=a(n().mark((function t(e){var r,o,i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=eo(e),o=[Zn(r,e)],e.timeout&&e.timeout>0&&o.push(new Promise((function(t){setTimeout((function(){var n=e.timeoutErrorMessage?e.timeoutErrorMessage:"timeout of "+e.timeout+"ms exceeded";t(ro(n,e,"ECONNABORTED",r))}),e.timeout)}))),t.next=5,Promise.race(o);case 5:return i=t.sent,t.abrupt("return",new Promise((function(t,r){i instanceof Error?r(i):"[object Function]"===Object.prototype.toString.call(e.settle)?e.settle(t,r,i):He(t,r,i)})));case 7:case"end":return t.stop()}}),t)}))),Qn.apply(this,arguments)}function Zn(t,e){return to.apply(this,arguments)}function to(){return(to=a(n().mark((function t(e,r){var o,i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(e);case 3:o=t.sent,t.next=9;break;case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",ro("Network Error",r,"ERR_NETWORK",e));case 9:if(i={ok:o.ok,status:o.status,statusText:o.statusText,headers:new Headers(o.headers),config:r,request:e},!(o.status>=200&&204!==o.status)){t.next=34;break}t.t1=r.responseType,t.next="arraybuffer"===t.t1?14:"blob"===t.t1?18:"json"===t.t1?22:"formData"===t.t1?26:30;break;case 14:return t.next=16,o.arrayBuffer();case 16:case 20:case 24:case 28:case 32:return i.data=t.sent,t.abrupt("break",34);case 18:return t.next=20,o.blob();case 22:return t.next=24,o.json();case 26:return t.next=28,o.formData();case 30:return t.next=32,o.text();case 34:return t.abrupt("return",i);case 35:case"end":return t.stop()}}),t,null,[[0,6]])})))).apply(this,arguments)}function eo(t){var e=new Headers(t.headers);if(t.auth){var r=t.auth.username||"",n=t.auth.password?decodeURI(encodeURIComponent(t.auth.password)):"";e.set("Authorization","Basic ".concat(btoa(r+":"+n)))}var o=t.method.toUpperCase(),i={headers:e,method:o};"GET"!==o&&"HEAD"!==o&&(i.body=t.data,Re.isFormData(i.body)&&Re.isStandardBrowserEnv()&&e.delete("Content-Type")),t.mode&&(i.mode=t.mode),t.cache&&(i.cache=t.cache),t.integrity&&(i.integrity=t.integrity),t.redirect&&(i.redirect=t.redirect),t.referrer&&(i.referrer=t.referrer),Re.isUndefined(t.withCredentials)||(i.credentials=t.withCredentials?"include":"omit");var a=sr(t.baseURL,t.url),u=xe(a,t.params,t.paramsSerializer);return new Request(u,i)}function ro(t,e,r,n,o){return hn.AxiosError&&"function"==typeof hn.AxiosError?new hn.AxiosError(t,hn.AxiosError[r],e,n,o):function(t,e,r,n,o){t.config=e,r&&(t.code=r);return t.request=n,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},t}(new Error(t),e,r,n,o)}var no="2.42.1",oo=process.nextTick.bind(process),io=function(){},ao=function(){function t(e,r,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=n||{},!e)throw new Error("You must pass your project's write key.");if(!r)throw new Error("You must pass our data plane url.");var o,i;this.queue=[],this.writeKey=e,this.host=(o=r)&&o.endsWith("/")?o.replace(/\/+$/,""):o,this.timeout=n.timeout||!1,this.flushAt=Math.max(n.flushAt,1)||20,this.flushInterval=n.flushInterval||2e4,this.maxInternalQueueSize=n.maxInternalQueueSize||2e4,this.logLevel=n.logLevel||"info",this.flushOverride=n.flushOverride&&("function"==typeof(i=n.flushOverride)&&Boolean(i.constructor&&i.call&&i.apply))?n.flushOverride:void 0,this.flushed=!1,this.axiosInstance=hn.create({adapter:Xn}),Object.defineProperty(this,"enable",{configurable:!1,writable:!1,enumerable:!0,value:"boolean"!=typeof n.enable||n.enable}),this.logger={error:function(t){if("off"!==this.logLevel){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=console).error.apply(e,["".concat((new Date).toISOString(),' ["Rudder"] error: ').concat(t)].concat(n))}},info:function(t){if(["silly","debug","info"].includes(this.logLevel)){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=console).log.apply(e,["".concat((new Date).toISOString(),' ["Rudder"] info: ').concat(t)].concat(n))}},debug:function(t){if(["silly","debug"].includes(this.logLevel)){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=console).debug.apply(e,["".concat((new Date).toISOString(),' ["Rudder"] debug: ').concat(t)].concat(n))}},silly:function(t){if(["silly"].includes(this.logLevel)){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];(e=console).info.apply(e,["".concat((new Date).toISOString(),' ["Rudder"] silly: ').concat(t)].concat(n))}}},Nn(this.axiosInstance,{retries:0})}var e,n,i;return e=t,n=[{key:"_validate",value:function(t,e){try{ee(t,e)}catch(e){if("Your message must be < 32kb."===e.message)return void this.logger.info("Your message must be < 32kb. This is currently surfaced as a warning. Please update your code",t);throw e}}},{key:"identify",value:function(t,e){return this._validate(t,"identify"),this.enqueue("identify",t,e),this}},{key:"group",value:function(t,e){return this._validate(t,"group"),this.enqueue("group",t,e),this}},{key:"track",value:function(t,e){return this._validate(t,"track"),this.enqueue("track",t,e),this}},{key:"page",value:function(t,e){return this._validate(t,"page"),this.enqueue("page",t,e),this}},{key:"screen",value:function(t,e){return this._validate(t,"screen"),this.enqueue("screen",t,e),this}},{key:"alias",value:function(t,e){return this._validate(t,"alias"),this.enqueue("alias",t,e),this}},{key:"enqueue",value:function(t,e,n){if(this.queue.length>=this.maxInternalQueueSize)this.logger.error("not adding events for processing as queue size ".concat(this.queue.length," >= than max configuration ").concat(this.maxInternalQueueSize));else{var o=Kn(e);if(n=n||io,!this.enable)return oo(n);if("identify"==t&&o.traits&&(o.context||(o.context={}),o.context.traits=o.traits),(o=r({},o)).type=t,o.context=r({library:{name:"analytics-service-worker",version:no}},o.context),o.channel="service-worker",o._metadata=r({serviceWorkerVersion:no},o._metadata),o.originalTimestamp||(o.originalTimestamp=new Date),o.messageId||(o.messageId=function(){var t,e=0,r="";if(!qn||Gn+16>256){for(qn=Array(e=256);e--;)qn[e]=256*Math.random()|0;e=Gn=0}for(;e<16;e++)t=qn[Gn+e],r+=6==e?Hn[15&t|64]:8==e?Hn[63&t|128]:Hn[t],1&e&&e>1&&e<11&&(r+="-");return Gn++,r}()),o.anonymousId&&!$n(o.anonymousId)&&(o.anonymousId=JSON.stringify(o.anonymousId)),o.userId&&!$n(o.userId)&&(o.userId=JSON.stringify(o.userId)),this.queue.push({message:o,callback:n}),!this.flushed)return this.flushed=!0,void this.flush();this.queue.length>=this.flushAt&&(this.logger.debug("flushAt reached, trying flush..."),this.flush()),this.flushInterval&&!this.flushTimer&&(this.logger.debug("no existing flush timer, creating new one"),this.flushTimer=setTimeout(this.flush.bind(this),this.flushInterval))}}},{key:"flush",value:function(t){var e=this;if(this.logger.debug("in flush"),t=t||io,!this.enable)return oo(t);if(this.timer&&(this.logger.debug("cancelling existing timer..."),clearTimeout(this.timer),this.timer=null),this.flushTimer&&(this.logger.debug("cancelling existing flushTimer..."),clearTimeout(this.flushTimer),this.flushTimer=null),!this.queue.length)return this.logger.debug("queue is empty, nothing to flush"),oo(t);var n=this.queue.splice(0,this.flushAt),i=n.map((function(t){return t.callback})),a={batch:n.map((function(t){return"object"===o(t.message)&&(t.message.sentAt=new Date),t.message})),sentAt:new Date};this.logger.debug("batch size is ".concat(n.length)),this.logger.silly("===data===",a);var u=function(e){i.forEach((function(t){t(e)})),t(e,a)};if(0===a.batch.length)return this.logger.debug("batch is empty, nothing to flush"),oo(t);var s={};"undefined"==typeof window&&(s["user-agent"]="analytics-service-worker/".concat(no),s["Content-Type"]="application/json");var c="string"==typeof this.timeout?zn(this.timeout):this.timeout;if(this.flushOverride)this.flushOverride({host:"".concat(this.host),writeKey:this.writeKey,data:a,headers:s,reqTimeout:c,flush:this.flush.bind(this),done:u,isErrorRetryable:this._isErrorRetryable.bind(this)});else{var f={method:"POST",url:"".concat(this.host),auth:{username:this.writeKey},data:a,headers:s};c&&(f.timeout=c),this.axiosInstance(r(r({},f),{},{"axios-retry":{retries:3,retryCondition:this._isErrorRetryable.bind(this),retryDelay:Nn.exponentialDelay}})).then((function(t){e.timer=setTimeout(e.flush.bind(e),e.flushInterval),u()})).catch((function(t){if(console.log(t),e.logger.error("got error while attempting send for 3 times, dropping ".concat(n.length," events")),e.timer=setTimeout(e.flush.bind(e),e.flushInterval),t.response){var r=new Error(t.response.statusText);return u(r)}u(t)}))}}},{key:"_isErrorRetryable",value:function(t){return!!Nn.isNetworkError(t)||!!t.response&&(this.logger.error("error status: ".concat(t.response.status)),t.response.status>=500&&t.response.status<=599||429===t.response.status)}}],n&&u(e.prototype,n),i&&u(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();t.Analytics=ao}));
|
package/package.json
CHANGED
@@ -1,40 +1,74 @@
|
|
1
1
|
{
|
2
2
|
"name": "rudder-sdk-js",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.42.1",
|
4
4
|
"description": "RudderStack Javascript SDK",
|
5
|
-
"main": "index.js",
|
6
|
-
"module": "index.es.js",
|
5
|
+
"main": "dist/npm/index.js",
|
6
|
+
"module": "dist/npm/index.es.js",
|
7
7
|
"exports": {
|
8
8
|
".": {
|
9
|
-
"types": "./index.d.ts",
|
10
|
-
"import": "./index.es.js",
|
11
|
-
"require": "./index.js"
|
9
|
+
"types": "./dist/npm/index.d.ts",
|
10
|
+
"import": "./dist/npm/index.es.js",
|
11
|
+
"require": "./dist/npm/index.js"
|
12
12
|
},
|
13
13
|
"./service-worker": {
|
14
|
-
"types": "./service-worker/index.d.ts",
|
15
|
-
"import": "./service-worker/index.es.js",
|
16
|
-
"require": "./service-worker/index.js"
|
14
|
+
"types": "./dist/npm/service-worker/index.d.ts",
|
15
|
+
"import": "./dist/npm/service-worker/index.es.js",
|
16
|
+
"require": "./dist/npm/service-worker/index.js"
|
17
17
|
},
|
18
18
|
"./service-worker/index.es": {
|
19
|
-
"types": "./service-worker/index.d.ts",
|
20
|
-
"import": "./service-worker/index.es.js"
|
19
|
+
"types": "./dist/npm/service-worker/index.d.ts",
|
20
|
+
"import": "./dist/npm/service-worker/index.es.js"
|
21
21
|
}
|
22
22
|
},
|
23
23
|
"typesVersions": {
|
24
24
|
"*": {
|
25
25
|
".": [
|
26
|
-
"index.d.ts"
|
26
|
+
"dist/npm/index.d.ts"
|
27
27
|
],
|
28
28
|
"service-worker": [
|
29
|
-
"service-worker/index.d.ts"
|
29
|
+
"dist/npm/service-worker/index.d.ts"
|
30
30
|
],
|
31
31
|
"service-worker/index.es": [
|
32
|
-
"service-worker/index.d.ts"
|
32
|
+
"dist/npm/service-worker/index.d.ts"
|
33
33
|
]
|
34
34
|
}
|
35
35
|
},
|
36
|
+
"publishConfig": {
|
37
|
+
"access": "public"
|
38
|
+
},
|
39
|
+
"files": [
|
40
|
+
"dist/npm",
|
41
|
+
"LICENSE",
|
42
|
+
"README.md",
|
43
|
+
"CHANGELOG.md"
|
44
|
+
],
|
36
45
|
"scripts": {
|
37
|
-
"
|
46
|
+
"clean": "rimraf -rf ./dist && rimraf -rf ./node_modules/.cache && rimraf -rf ./reports",
|
47
|
+
"start": "rollup --config rollup-configs/rollup.sdk.browser.mjs --watch --environment DEV_SERVER,PROD_DEBUG:inline",
|
48
|
+
"build": "npm run build:browser && npm run build:package",
|
49
|
+
"build:browser:modern": "BROWSERSLIST_ENV=modern rollup --config rollup-configs/rollup.sdk.browser.mjs --environment VERSION:$npm_package_version,UGLIFY,PROD_DEBUG,STAGING:$npm_config_staging,ENV:prod",
|
50
|
+
"build:browser": "rollup --config rollup-configs/rollup.sdk.browser.mjs --environment VERSION:$npm_package_version,UGLIFY,PROD_DEBUG,STAGING:$npm_config_staging,ENV:prod",
|
51
|
+
"build:npm": "rollup --config rollup-configs/rollup.sdk.npm.mjs --environment VERSION:$npm_package_version,UGLIFY,ENV:prod,NPM",
|
52
|
+
"build:worker": "rollup --config rollup-configs/rollup.worker.config.mjs --environment VERSION:$npm_package_version,UGLIFY,ENV:prod,NPM",
|
53
|
+
"build:package": "npm run build:npm && npm run build:worker",
|
54
|
+
"build:browser:test": "npm run build:browser && sed 's/var rudderanalytics/rudderanalytics/g' dist/cdn/legacy/rudder-analytics.min.js > __mocks__/cdnSDK.js",
|
55
|
+
"test": "npm run build:browser:test && nx test --maxWorkers=50%",
|
56
|
+
"test:ci": "npm run build:browser:test && nx test --parallel=false --configuration=ci --runInBand --maxWorkers=1 --forceExit",
|
57
|
+
"check:lint": "eslint --ext .js,.ts src -f json -o reports/eslint.json || exit 0",
|
58
|
+
"check:size:build": "npm run build:browser && npm run build:package",
|
59
|
+
"check:size": "npm run check:size:build && size-limit",
|
60
|
+
"check:size:json": "size-limit --json",
|
61
|
+
"check:circular": "madge --circular --extensions js,ts src || exit 0",
|
62
|
+
"check:support": "NODE_ENV=production npx browserslist --mobile-to-desktop",
|
63
|
+
"check:support:modern": "NODE_ENV=modern npx browserslist --mobile-to-desktop",
|
64
|
+
"check:duplicates": "jscpd src",
|
65
|
+
"check:security": "npm audit --recursive --audit-level=high",
|
66
|
+
"build:browser:debug": "rollup --config rollup-configs/rollup.sdk.browser.mjs --environment VERSION:$npm_package_version,UGLIFY,PROD_DEBUG:inline,ENV:prod",
|
67
|
+
"build:browser:bundle-size": "VISUALIZER=true npm run build:browser",
|
68
|
+
"build:browser:modern:bundle-size": "VISUALIZER=true npm run build:browser:modern",
|
69
|
+
"build:npm:dev": "rollup --config rollup-configs/rollup.sdk.npm.mjs --environment VERSION:$npm_package_version,NPM",
|
70
|
+
"package": "cd dist/npm && npm pack --pack-destination ../../",
|
71
|
+
"release": "npm publish"
|
38
72
|
},
|
39
73
|
"keywords": [
|
40
74
|
"analytics",
|
@@ -42,12 +76,52 @@
|
|
42
76
|
],
|
43
77
|
"author": "RudderStack",
|
44
78
|
"license": "MIT",
|
79
|
+
"bugs": {
|
80
|
+
"url": "https://github.com/rudderlabs/rudder-sdk-js/issues"
|
81
|
+
},
|
82
|
+
"homepage": "https://github.com/rudderlabs/rudder-sdk-js/blob/main/packages/analytics-v1.1/README.md",
|
45
83
|
"repository": {
|
46
84
|
"type": "git",
|
47
|
-
"url": "
|
85
|
+
"url": "https://github.com/rudderlabs/rudder-sdk-js.git",
|
86
|
+
"directory": "packages/analytics-v1.1"
|
48
87
|
},
|
49
|
-
"
|
50
|
-
"
|
88
|
+
"dependencies": {
|
89
|
+
"@lukeed/uuid": "2.0.1",
|
90
|
+
"@rudderstack/analytics-js-common": "3.0.0-beta.8",
|
91
|
+
"@segment/localstorage-retry": "1.3.0",
|
92
|
+
"@segment/loosely-validate-event": "2.0.0",
|
93
|
+
"@vespaiach/axios-fetch-adapter": "0.3.1",
|
94
|
+
"assert": "2.0.0",
|
95
|
+
"axios": "0.27.2",
|
96
|
+
"axios-retry": "3.7.0",
|
97
|
+
"component-emitter": "1.3.0",
|
98
|
+
"get-value": "3.0.1",
|
99
|
+
"is": "3.3.0",
|
100
|
+
"lodash.clonedeep": "4.5.0",
|
101
|
+
"lodash.isstring": "4.0.1",
|
102
|
+
"ms": "2.1.3",
|
103
|
+
"ramda": "0.29.0"
|
51
104
|
},
|
52
|
-
"
|
105
|
+
"devDependencies": {},
|
106
|
+
"overrides": {},
|
107
|
+
"browserslist": {
|
108
|
+
"production": [
|
109
|
+
"defaults",
|
110
|
+
"Edge >= 80",
|
111
|
+
"Firefox >= 47",
|
112
|
+
"IE >= 11",
|
113
|
+
"Chrome >= 54",
|
114
|
+
"Safari >= 7",
|
115
|
+
"Opera >= 43"
|
116
|
+
],
|
117
|
+
"modern": [
|
118
|
+
"defaults"
|
119
|
+
],
|
120
|
+
"development": [
|
121
|
+
"last 1 chrome version",
|
122
|
+
"last 1 firefox version",
|
123
|
+
"last 1 edge version",
|
124
|
+
"last 1 safari version"
|
125
|
+
]
|
126
|
+
}
|
53
127
|
}
|