@amplitude/plugin-network-capture-browser 1.9.15 → 1.9.16
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/lib/cjs/track-network-event.d.ts.map +1 -1
- package/lib/cjs/track-network-event.js +6 -4
- package/lib/cjs/track-network-event.js.map +1 -1
- package/lib/cjs/version.d.ts +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/cjs/version.js.map +1 -1
- package/lib/esm/track-network-event.d.ts.map +1 -1
- package/lib/esm/track-network-event.js +6 -4
- package/lib/esm/track-network-event.js.map +1 -1
- package/lib/esm/version.d.ts +1 -1
- package/lib/esm/version.js +1 -1
- package/lib/esm/version.js.map +1 -1
- package/lib/scripts/amplitude-min.js +1 -1
- package/lib/scripts/amplitude-min.js.gz +0 -0
- package/lib/scripts/amplitude-min.js.map +1 -1
- package/lib/scripts/amplitude-min.umd.js +1 -1
- package/lib/scripts/amplitude-min.umd.js.gz +0 -0
- package/lib/scripts/track-network-event.d.ts.map +1 -1
- package/lib/scripts/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amplitude={})}(this,function(e){"use strict";var t=function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};function r(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{a(n.next(e))}catch(e){i(e)}}function u(e){try{a(n.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,u)}a((n=n.apply(e,t||[])).next())})}function n(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(u){return function(a){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}function o(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function s(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var u=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],a=["authorization","cookie","set-cookie"],l=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},c=s([],i(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),d=function(e){var t,r=l();if(!(null===(t=null==r?void 0:r.crypto)||void 0===t?void 0:t.getRandomValues))return function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,d)}(e);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,s([],i(n.entries()),!1).map(function(e){var t=i(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(c[n]):c[n]}).join("")};function f(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e}function p(e,t,r){e&&h({json:e,allowlist:t.map(v),excludelist:r.map(v),ancestors:[]})}function h(e){var t,r,n=e.json,u=e.targetObject,a=e.allowlist,l=e.excludelist,c=e.ancestors,d=e.parentObject,p=e.targetKey;u||(u=n);var v=Object.keys(u);try{for(var y=o(v),g=y.next();!g.done;g=y.next()){var m=g.value,w=s(s([],i(c),!1),[m],!1);f(u[m])?b(w,a)&&!b(w,l)||delete u[m]:h({json:n,targetObject:u[m],allowlist:a,excludelist:l,ancestors:w,parentObject:u,targetKey:m})}}catch(e){t={error:e}}finally{try{g&&!g.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}0===Object.keys(u).length&&d&&p&&delete d[p]}function v(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function y(e,t,r,n){if(void 0===r&&(r=0),void 0===n&&(n=0),n===t.length)return r===e.length;if(r===e.length){for(;n<t.length&&"**"===t[n];)n++;return n===t.length}var o=t[n];if("**"===o){if(n+1===t.length)return!0;for(var i=r;i<=e.length;i++)if(y(e,t,i,n+1))return!0;return!1}return("*"===o||o===e[r])&&y(e,t,r+1,n+1)}function b(e,t){return t.some(function(t){return y(e,t)})}var g=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,r;void 0===e&&(e=[]);var n=this.request.headers,s={};if(Array.isArray(n))n.forEach(function(e){var t=i(e,2),r=t[0],n=t[1];s[r]=n});else if(n instanceof Headers)n.forEach(function(e,t){s[t]=e});else if("object"==typeof n&&null!==n)try{for(var u=o(Object.entries(n)),a=u.next();!a.done;a=u.next()){var l=i(a.value,2),c=l[0],d=l[1];s[c]=d}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return E(s,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=l();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=w(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){return n(this,function(r){return 0===e.length?[2,null]:[2,O(this.body,e,t)]})})},e}(),m=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),E(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return w(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){return n(this,function(r){return 0===e.length?[2,null]:[2,O(this.body,e,t)]})})},e}();function w(e,t){var r,n,s,u=l(),a=null==u?void 0:u.TextEncoder;if(a){var c;if("string"==typeof e)c=e,s=(new a).encode(c).length;else if(e instanceof Blob)s=(c=e).size;else if(e instanceof URLSearchParams)c=e,s=(new a).encode(c.toString()).length;else if(ArrayBuffer.isView(e))s=(c=e).byteLength;else if(e instanceof ArrayBuffer)s=(c=e).byteLength;else if(e instanceof FormData){var d=e,f=0,p=0;try{for(var h=o(d.entries()),v=h.next();!v.done;v=h.next()){var y=i(v.value,2),b=y[0],g=y[1];if(f+=b.length,"string"==typeof g)f+=(new a).encode(g).length;else{if(!(g instanceof Blob))return;f+=g.size}if(++p>=t)return}}catch(e){r={error:e}}finally{try{v&&!v.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}s=f}else if(e instanceof ReadableStream)return void(c=e);return s}}var x,S=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var r=this.response.headers,n={};return null===(t=null==r?void 0:r.forEach)||void 0===t||t.call(r,function(e,t){n[t]=e}),E(n,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var r=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return r(this,void 0,void 0,function(){var e,t;return n(this,function(r){switch(r.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),r.label=1;case 1:return r.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},500)}),[4,Promise.race([e,t])];case 2:return[2,r.sent()];case 3:return r.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){return n(this,function(r){switch(r.label){case 0:return 0===e.length?[2,null]:[4,this.text()];case 1:return[2,O(r.sent(),e,t)]}})})},e}(),q=function(){function e(e,t,r,n){this.statusCode=e,this.headersString=t,this.size=r,this.getJson=n}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,r;if(void 0===e&&(e=[]),!this.headersString)return{};var n={},s=this.headersString.split("\r\n");try{for(var u=o(s),a=u.next();!a.done;a=u.next()){var l=i(a.value.split(": "),2),c=l[0],d=l[1];c&&d&&(n[c]=d)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return E(n,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){var r;return n(this,function(n){return 0===e.length?[2,null]:(r=this.getJson())?(p(r,e,t),[2,r]):[2,null]})})},e}();function O(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return p(n,t,r),n}catch(e){return null}}!function(e){e.REDACT="redact",e.REMOVE="remove"}(x||(x={}));var T="[REDACTED]",E=function(e,t){var r,n,u=t.allow,l=void 0===u?[]:u,c=t.strategy,d=void 0===c?x.REMOVE:c,f=s([],i(a),!1),p={},h=function(t){var r=t.toLowerCase();f.find(function(e){return e.toLowerCase()===r})?d===x.REDACT&&(p[t]=T):l.find(function(e){return e.toLowerCase()===r})?p[t]=e[t]:d===x.REDACT&&(p[t]=T)};try{for(var v=o(Object.keys(e)),y=v.next();!y.done;y=v.next()){h(y.value)}}catch(e){r={error:e}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}return p},R=function(){function e(e,t,r,n,o,i,s,u,a,l,c){void 0===s&&(s=0),this.type=e,this.method=t,this.timestamp=r,this.startTime=n,this.url=o,this.requestWrapper=i,this.status=s,this.duration=u,this.responseWrapper=a,this.error=l,this.endTime=c}return e.prototype.toSerializable=function(){var e,t,r,n,o={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(e=this.requestWrapper)||void 0===e?void 0:e.headers(s([],i(u),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(r=this.responseWrapper)||void 0===r?void 0:r.headers(s([],i(u),!1)),responseBodySize:null===(n=this.responseWrapper)||void 0===n?void 0:n.bodySize};return Object.fromEntries(Object.entries(o).filter(function(e){var t=i(e,2);return t[0],void 0!==t[1]}))},e}();var j=function(e,t){void 0===t&&(t=d()),this.callback=e,this.id=t};function k(e){try{e()}catch(e){}}var _=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var r=l();e.isSupported()&&(this.globalScope=r)}return e.isSupported=function(){var e=l();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var r,n,o,i,s,u,a,l,c,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null===(o=null===(n=null===(r=this.globalScope)||void 0===r?void 0:r.XMLHttpRequest)||void 0===n?void 0:n.prototype)||void 0===o?void 0:o.open,p=null===(u=null===(s=null===(i=this.globalScope)||void 0===i?void 0:i.XMLHttpRequest)||void 0===s?void 0:s.prototype)||void 0===u?void 0:u.send,h=null===(c=null===(l=null===(a=this.globalScope)||void 0===a?void 0:a.XMLHttpRequest)||void 0===l?void 0:l.prototype)||void 0===c?void 0:c.setRequestHeader;f&&p&&h&&this.observeXhr(f,p,h);var v=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;v&&this.observeFetch(v),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(r){try{r.callback(e)}catch(e){k(function(){var r;null===(r=t.logger)||void 0===r||r.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,r,n,o,i,s){var u;if(void 0!==i&&void 0!==s){var a,l,c,d="GET";if(!function(e){return"object"==typeof e&&null!==e&&"url"in e&&"method"in e}(t)?a=null===(u=null==t?void 0:t.toString)||void 0===u?void 0:u.call(t):(a=t.url,d=t.method),a)try{var f=new URL(a);a="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==r?void 0:r.method)||d,n&&(l=n.status),o&&(c={name:o.name||"UnknownError",message:o.message||"An unknown error occurred"},l=0);var p=Math.floor(performance.now()-s),h=Math.floor(i+p),v=new R(e,d,i,i,a,r,l,p,n,c,h);this.triggerEventCallbacks(v)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(o,i){return r(t,void 0,void 0,function(){var t,r,s,u,a=this;return n(this,function(n){switch(n.label){case 0:try{t=this.getTimestamps()}catch(e){k(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e(o,i)];case 2:return r=n.sent(),[3,4];case 3:return u=n.sent(),s=u,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",o,i?new g(i):void 0,r?new S(r):void 0,s,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){k(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(r)return[2,r];throw s}})})})},e.createXhrJsonParser=function(e,t){return function(){var r;try{if("json"===e.responseType){if(null===(r=t.globalScope)||void 0===r?void 0:r.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(r){return r instanceof Error&&"InvalidStateError"===r.name&&k(function(){var r;return null===(r=t.logger)||void 0===r?void 0:r.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))}),null}return null}},e.prototype.observeXhr=function(r,n,o){if(this.globalScope&&r&&n){var s=this.globalScope.XMLHttpRequest.prototype,u=this;s.open=function(){for(var e,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var s=i(n,2),a=s[0],l=s[1];try{this.$$AmplitudeAnalyticsEvent=t({method:a,url:null===(e=null==l?void 0:l.toString)||void 0===e?void 0:e.call(l),headers:{}},u.getTimestamps())}catch(e){k(function(){var t;return null===(t=u.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return r.apply(this,n)},s.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=this,i=e.createXhrJsonParser(this,u),s=t[0],a=o.$$AmplitudeAnalyticsEvent;return o.$$AmplitudeAnalyticsEvent&&o.addEventListener("loadend",function(){try{var e=o.getAllResponseHeaders(),t=o.getResponseHeader("content-length"),r=new q(o.status,e,t?parseInt(t,10):void 0,i),n=o.$$AmplitudeAnalyticsEvent.headers,l=new m(s,n);a.status=o.status,u.handleNetworkRequestEvent("xhr",{url:a.url,method:a.method},l,r,void 0,a.startTime,a.durationStart)}catch(e){k(function(){var t;return null===(t=u.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),n.apply(o,t)},s.setRequestHeader=function(e,t){try{var r=this.$$AmplitudeAnalyticsEvent;r&&(r.headers[e]=t)}catch(e){k(function(){var t;return null===(t=u.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}o.apply(this,[e,t])}}},e}(),A=new _,z={};Object.defineProperty(z,"__esModule",{value:!0}),z.Observable=void 0;const P=e=>Boolean(Symbol[e]),H=e=>P(e)?Symbol[e]:"@@"+e,B=H("iterator"),C=H("observable"),W=H("species");function L(e,t){let r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function J(e){let t=e.constructor;return void 0!==t&&(t=t[W],null===t&&(t=void 0)),void 0!==t?t:I}function M(e){M.log?M.log(e):setTimeout(()=>{throw e})}function $(e){Promise.resolve().then(()=>{try{e()}catch(e){M(e)}})}function N(e){let t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{let e=L(t,"unsubscribe");e&&e.call(t)}}catch(e){M(e)}}function D(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function U(e,t,r){e._state="running";let n=e._observer;try{let o=L(n,t);switch(t){case"next":o&&o.call(n,r);break;case"error":if(D(e),!o)throw r;o.call(n,r);break;case"complete":D(e),o&&o.call(n)}}catch(e){M(e)}"closed"===e._state?N(e):"running"===e._state&&(e._state="ready")}function X(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void $(()=>function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(U(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e))):void U(e,t,r);e._queue.push({type:t,value:r})}}class F{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let r=this,n={get closed(){return"closed"===r._state},next(e){X(r,"next",e)},error(e){X(r,"error",e)},complete(){X(r,"complete")}};try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(D(this),N(this))}}class I{constructor(e){if(!(this instanceof I))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new F(e,this._subscriber)}forEach(e){return new Promise((t,r)=>{if("function"!=typeof e)return void r(new TypeError(e+" is not a function"));function n(){o.unsubscribe(),t()}let o=this.subscribe({next(t){try{e(t,n)}catch(e){r(e),o.unsubscribe()}},error:r,complete:t})})}map(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(J(this))(t=>this.subscribe({next(r){try{r=e(r)}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(J(this))(t=>this.subscribe({next(r){try{if(!e(r))return}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=J(this),r=arguments.length>1,n=!1,o=arguments[1];return new t(t=>this.subscribe({next(i){let s=!n;if(n=!0,!s||r)try{o=e(o,i)}catch(e){return t.error(e)}else o=i},error(e){t.error(e)},complete(){if(!n&&!r)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(o),t.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=J(this);return new t(r=>{let n,o=0;return function i(s){n=s.subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){o===e.length?(n=void 0,r.complete()):i(t.from(e[o++]))}})}(this),()=>{n&&(n.unsubscribe(),n=void 0)}})}flatMap(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=J(this);return new t(r=>{let n=[],o=this.subscribe({next(o){if(e)try{o=e(o)}catch(e){return r.error(e)}let s=t.from(o).subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){let e=n.indexOf(s);e>=0&&n.splice(e,1),i()}});n.push(s)},error(e){r.error(e)},complete(){i()}});function i(){o.closed&&0===n.length&&r.complete()}return()=>{n.forEach(e=>e.unsubscribe()),o.unsubscribe()}})}[C](){return this}static from(e){let t="function"==typeof this?this:I;if(null==e)throw new TypeError(e+" is not an object");let r=L(e,C);if(r){let n=r.call(e);if(Object(n)!==n)throw new TypeError(n+" is not an object");return function(e){return e instanceof I}(n)&&n.constructor===t?n:new t(e=>n.subscribe(e))}if(P("iterator")&&(r=L(e,B),r))return new t(t=>{$(()=>{if(!t.closed){for(let n of r.call(e))if(t.next(n),t.closed)return;t.complete()}})});if(Array.isArray(e))return new t(t=>{$(()=>{if(!t.closed){for(let r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}})});throw new TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:I)(t=>{$(()=>{if(!t.closed){for(let r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}})})}static get[W](){return this}}z.Observable=I,Object.defineProperty(I,Symbol("extensions"),{value:{symbol:C,hostReportError:M},configurable:!0});var V,Q,G=z.Observable,K="[Amplitude] Network Request",Y="500-599";function Z(e,t){var r="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(r).test(e)}function ee(e,t){var r,n,s=t.split(",");try{for(var u=o(s),a=u.next();!a.done;a=u.next()){var l=i(a.value.split("-").map(Number),2),c=l[0],d=l[1];if(e===c&&void 0===d)return!0;if(e>=c&&e<=d)return!0}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!1}function te(e){var t;if(e)try{var r=null===(t=l())||void 0===t?void 0:t.location.href,n=new URL(e,r),o=n.searchParams.toString(),i=n.hash.replace("#",""),s=n.href,u=n.host;return n.hash="",n.search="",{query:o,fragment:i,href:s,hrefWithoutQueryOrHash:n.href,host:u}}catch(e){return}}function re(e){if("object"==typeof e&&null!==e){if(0!==e.length)return e}else{if(e)return s([],i(u),!1);if(void 0===e){return}}}function ne(e){var t,r;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(r=null==e?void 0:e.blocklist)||void 0===r?void 0:r.length)}function oe(e,t){var r;void 0===t&&(t={});var n=te(e.url);if(!n)return!1;var o,u=n.host;if(!1!==t.ignoreAmplitudeRequests&&(Z(u,"*.amplitude.com")||Z(u,"amplitude.com")))return!1;if(null===(r=t.ignoreHosts)||void 0===r?void 0:r.find(function(e){return Z(u,e)}))return!1;if(!t.captureRules&&void 0!==e.status&&!ee(e.status,Y))return!1;if(t.captureRules&&(s([],i(t.captureRules),!1).reverse().find(function(t){if(o=function(e,t,r,n,o){if((!e.hosts||e.hosts.find(function(e){return Z(t,e)}))&&(!n||!e.urls||function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})}(n,e.urls))&&(!o||!e.methods||e.methods.find(function(e){return o.toLowerCase()===e.toLowerCase()||"*"===e})))return!((r||0===r)&&!ee(r,e.statusCodeRange||Y))}(t,u,e.status,e.url,e.method),o){var r=re(t.responseHeaders);if(e.responseWrapper&&r){var n=e.responseWrapper.headers(r);n&&(e.responseHeaders=n)}var i=re(t.requestHeaders);if(e.requestWrapper&&i){var s=e.requestWrapper.headers(i);s&&(e.requestHeaders=s)}e.responseWrapper&&t.responseBody&&!ne(t.responseBody)&&(e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,t.responseBody.blocklist)),e.requestWrapper&&t.requestBody&&!ne(t.requestBody)&&(e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,t.requestBody.blocklist))}return void 0!==o}),!o))return!1;return!e.requestWrapper||!function(e,t){if(e.includes("amplitude.com"))try{var r=t.body;if("string"!=typeof r)return!1;if(JSON.parse(r).events.find(function(e){return e.event_type===K}))return!0}catch(e){}return!1}(u,e.requestWrapper)}function ie(e){var t=e.allObservables,o=e.networkTrackingOptions,s=e.amplitude,u=e.loggerProvider;return t.networkObservable.filter(function(e){return oe(e.event,o)}).subscribe(function(e){var t,o,a,l=e.event,c=te(l.url);if(c){var d=null===(o=l.responseWrapper)||void 0===o?void 0:o.bodySize,f=null===(a=l.requestWrapper)||void 0===a?void 0:a.bodySize;!function(e,t,o,s){r(this,void 0,void 0,function(){var r,u,a;return n(this,function(n){switch(n.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(r=i.apply(void 0,[n.sent(),2]),u=r[0],a=r[1],u)try{e["[Amplitude] Request Body"]=JSON.stringify(u)}catch(e){null==s||s.debug("Failed to stringify request body",e)}if(a)try{e["[Amplitude] Response Body"]=JSON.stringify(a)}catch(e){null==s||s.debug("Failed to stringify response body")}n.label=2;case 2:return null==o||o.track(K,e),[2]}})})}(((t={})["[Amplitude] URL"]=c.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=c.query,t["[Amplitude] URL Fragment"]=c.fragment,t["[Amplitude] Request Method"]=l.method,t["[Amplitude] Status Code"]=l.status,t["[Amplitude] Start Time"]=l.startTime,t["[Amplitude] Completion Time"]=l.endTime,t["[Amplitude] Duration"]=l.duration,t["[Amplitude] Request Body Size"]=f,t["[Amplitude] Response Body Size"]=d,t["[Amplitude] Request Type"]=l.type,t["[Amplitude] Request Headers"]=l.requestHeaders,t["[Amplitude] Response Headers"]=l.responseHeaders,t),l,s,u)}})}!function(e){e.NetworkObservable="networkObservable"}(V||(V={}));var se=function(e){void 0===e&&(e={});var t,o="@amplitude/plugin-network-capture-browser",i=function(){var e,r=new G(function(e){var r=new j(function(t){var r=function(e,t){return{event:e,timestamp:Date.now(),type:t}}(t,"network");e.next(r)});return A.subscribe(r,t),function(){A.unsubscribe(r)}});return(e={})[V.NetworkObservable]=r,e};return{name:o,type:"enrichment",setup:function(s,u){return r(void 0,void 0,void 0,function(){var r;return n(this,function(n){return"undefined"==typeof document||(r=i(),t=null==s?void 0:s.loggerProvider,Q=ie({allObservables:r,networkTrackingOptions:e,amplitude:u,loggerProvider:t}),null==t||t.log("".concat(o," has been successfully added."))),[2]})})},execute:function(e){return r(void 0,void 0,void 0,function(){return n(this,function(t){return[2,e]})})},teardown:function(){return r(void 0,void 0,void 0,function(){return n(this,function(e){return Q.unsubscribe(),[2]})})}}};e.networkCapturePlugin=se,e.plugin=se,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).amplitude={})}(this,function(e){"use strict";var t=function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};function r(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{l(n.next(e))}catch(e){i(e)}}function u(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,u)}l((n=n.apply(e,t||[])).next())})}function n(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(u){return function(l){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&u[0]?n.return:u[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,u[1])).done)return o;switch(n=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],n=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}}function o(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function i(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function s(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var u=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],l=["authorization","cookie","set-cookie"],a=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},c=s([],i(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),d=function(e){var t,r=a();if(!(null===(t=null==r?void 0:r.crypto)||void 0===t?void 0:t.getRandomValues))return function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,d)}(e);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,s([],i(n.entries()),!1).map(function(e){var t=i(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(c[n]):c[n]}).join("")};function f(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e}function p(e,t,r){e&&h({json:e,allowlist:t.map(v),excludelist:r.map(v),ancestors:[]})}function h(e){var t,r,n=e.json,u=e.targetObject,l=e.allowlist,a=e.excludelist,c=e.ancestors,d=e.parentObject,p=e.targetKey;u||(u=n);var v=Object.keys(u);try{for(var y=o(v),g=y.next();!g.done;g=y.next()){var m=g.value,w=s(s([],i(c),!1),[m],!1);f(u[m])?b(w,l)&&!b(w,a)||delete u[m]:h({json:n,targetObject:u[m],allowlist:l,excludelist:a,ancestors:w,parentObject:u,targetKey:m})}}catch(e){t={error:e}}finally{try{g&&!g.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}0===Object.keys(u).length&&d&&p&&delete d[p]}function v(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function y(e,t,r,n){if(void 0===r&&(r=0),void 0===n&&(n=0),n===t.length)return r===e.length;if(r===e.length){for(;n<t.length&&"**"===t[n];)n++;return n===t.length}var o=t[n];if("**"===o){if(n+1===t.length)return!0;for(var i=r;i<=e.length;i++)if(y(e,t,i,n+1))return!0;return!1}return("*"===o||o===e[r])&&y(e,t,r+1,n+1)}function b(e,t){return t.some(function(t){return y(e,t)})}var g=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,r;void 0===e&&(e=[]);var n=this.request.headers,s={};if(Array.isArray(n))n.forEach(function(e){var t=i(e,2),r=t[0],n=t[1];s[r]=n});else if(n instanceof Headers)n.forEach(function(e,t){s[t]=e});else if("object"==typeof n&&null!==n)try{for(var u=o(Object.entries(n)),l=u.next();!l.done;l=u.next()){var a=i(l.value,2),c=a[0],d=a[1];s[c]=d}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return E(s,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=a();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=w(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){return n(this,function(r){return 0===e.length?[2,null]:[2,O(this.body,e,t)]})})},e}(),m=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),E(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return w(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){return n(this,function(r){return 0===e.length?[2,null]:[2,O(this.body,e,t)]})})},e}();function w(e,t){var r,n,s,u=a(),l=null==u?void 0:u.TextEncoder;if(l){var c;if("string"==typeof e)c=e,s=(new l).encode(c).length;else if(e instanceof Blob)s=(c=e).size;else if(e instanceof URLSearchParams)c=e,s=(new l).encode(c.toString()).length;else if(ArrayBuffer.isView(e))s=(c=e).byteLength;else if(e instanceof ArrayBuffer)s=(c=e).byteLength;else if(e instanceof FormData){var d=e,f=0,p=0;try{for(var h=o(d.entries()),v=h.next();!v.done;v=h.next()){var y=i(v.value,2),b=y[0],g=y[1];if(f+=b.length,"string"==typeof g)f+=(new l).encode(g).length;else{if(!(g instanceof Blob))return;f+=g.size}if(++p>=t)return}}catch(e){r={error:e}}finally{try{v&&!v.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}s=f}else if(e instanceof ReadableStream)return void(c=e);return s}}var x,S=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var r=this.response.headers,n={};return null===(t=null==r?void 0:r.forEach)||void 0===t||t.call(r,function(e,t){n[t]=e}),E(n,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var r=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),n=r?parseInt(r,10):void 0;return this._bodySize=n,n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return r(this,void 0,void 0,function(){var e,t;return n(this,function(r){switch(r.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),r.label=1;case 1:return r.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},500)}),[4,Promise.race([e,t])];case 2:return[2,r.sent()];case 3:return r.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){return n(this,function(r){switch(r.label){case 0:return 0===e.length?[2,null]:[4,this.text()];case 1:return[2,O(r.sent(),e,t)]}})})},e}(),q=function(){function e(e,t,r,n){this.statusCode=e,this.headersString=t,this.size=r,this.getJson=n}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,r;if(void 0===e&&(e=[]),!this.headersString)return{};var n={},s=this.headersString.split("\r\n");try{for(var u=o(s),l=u.next();!l.done;l=u.next()){var a=i(l.value.split(": "),2),c=a[0],d=a[1];c&&d&&(n[c]=d)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return E(n,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),r(this,void 0,void 0,function(){var r;return n(this,function(n){return 0===e.length?[2,null]:(r=this.getJson())?(p(r,e,t),[2,r]):[2,null]})})},e}();function O(e,t,r){if(!e)return null;try{var n=JSON.parse(e);return p(n,t,r),n}catch(e){return null}}!function(e){e.REDACT="redact",e.REMOVE="remove"}(x||(x={}));var T="[REDACTED]",E=function(e,t){var r,n,u=t.allow,a=void 0===u?[]:u,c=t.strategy,d=void 0===c?x.REMOVE:c,f=s([],i(l),!1),p={},h=function(t){var r=t.toLowerCase();f.find(function(e){return e.toLowerCase()===r})?d===x.REDACT&&(p[t]=T):a.find(function(e){return e.toLowerCase()===r})?p[t]=e[t]:d===x.REDACT&&(p[t]=T)};try{for(var v=o(Object.keys(e)),y=v.next();!y.done;y=v.next()){h(y.value)}}catch(e){r={error:e}}finally{try{y&&!y.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}return p},R=function(){function e(e,t,r,n,o,i,s,u,l,a,c){void 0===s&&(s=0),this.type=e,this.method=t,this.timestamp=r,this.startTime=n,this.url=o,this.requestWrapper=i,this.status=s,this.duration=u,this.responseWrapper=l,this.error=a,this.endTime=c}return e.prototype.toSerializable=function(){var e,t,r,n,o={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(e=this.requestWrapper)||void 0===e?void 0:e.headers(s([],i(u),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(r=this.responseWrapper)||void 0===r?void 0:r.headers(s([],i(u),!1)),responseBodySize:null===(n=this.responseWrapper)||void 0===n?void 0:n.bodySize};return Object.fromEntries(Object.entries(o).filter(function(e){var t=i(e,2);return t[0],void 0!==t[1]}))},e}();var j=function(e,t){void 0===t&&(t=d()),this.callback=e,this.id=t};function k(e){try{e()}catch(e){}}var _=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var r=a();e.isSupported()&&(this.globalScope=r)}return e.isSupported=function(){var e=a();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var r,n,o,i,s,u,l,a,c,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null===(o=null===(n=null===(r=this.globalScope)||void 0===r?void 0:r.XMLHttpRequest)||void 0===n?void 0:n.prototype)||void 0===o?void 0:o.open,p=null===(u=null===(s=null===(i=this.globalScope)||void 0===i?void 0:i.XMLHttpRequest)||void 0===s?void 0:s.prototype)||void 0===u?void 0:u.send,h=null===(c=null===(a=null===(l=this.globalScope)||void 0===l?void 0:l.XMLHttpRequest)||void 0===a?void 0:a.prototype)||void 0===c?void 0:c.setRequestHeader;f&&p&&h&&this.observeXhr(f,p,h);var v=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;v&&this.observeFetch(v),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(r){try{r.callback(e)}catch(e){k(function(){var r;null===(r=t.logger)||void 0===r||r.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,r,n,o,i,s){var u;if(void 0!==i&&void 0!==s){var l,a,c,d="GET";if(!function(e){return"object"==typeof e&&null!==e&&"url"in e&&"method"in e}(t)?l=null===(u=null==t?void 0:t.toString)||void 0===u?void 0:u.call(t):(l=t.url,d=t.method),l)try{var f=new URL(l);l="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==r?void 0:r.method)||d,n&&(a=n.status),o&&(c={name:o.name||"UnknownError",message:o.message||"An unknown error occurred"},a=0);var p=Math.floor(performance.now()-s),h=Math.floor(i+p),v=new R(e,d,i,i,l,r,a,p,n,c,h);this.triggerEventCallbacks(v)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(o,i){return r(t,void 0,void 0,function(){var t,r,s,u,l=this;return n(this,function(n){switch(n.label){case 0:try{t=this.getTimestamps()}catch(e){k(function(){var t;return null===(t=l.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e(o,i)];case 2:return r=n.sent(),[3,4];case 3:return u=n.sent(),s=u,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",o,i?new g(i):void 0,r?new S(r):void 0,s,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){k(function(){var t;return null===(t=l.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(r)return[2,r];throw s}})})})},e.createXhrJsonParser=function(e,t){return function(){var r;try{if("json"===e.responseType){if(null===(r=t.globalScope)||void 0===r?void 0:r.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(r){return r instanceof Error&&"InvalidStateError"===r.name&&k(function(){var r;return null===(r=t.logger)||void 0===r?void 0:r.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))}),null}return null}},e.prototype.observeXhr=function(r,n,o){if(this.globalScope&&r&&n){var s=this.globalScope.XMLHttpRequest.prototype,u=this;s.open=function(){for(var e,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var s=i(n,2),l=s[0],a=s[1];try{this.$$AmplitudeAnalyticsEvent=t({method:l,url:null===(e=null==a?void 0:a.toString)||void 0===e?void 0:e.call(a),headers:{}},u.getTimestamps())}catch(e){k(function(){var t;return null===(t=u.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return r.apply(this,n)},s.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=this,i=e.createXhrJsonParser(this,u),s=t[0],l=o.$$AmplitudeAnalyticsEvent;return o.$$AmplitudeAnalyticsEvent&&o.addEventListener("loadend",function(){try{var e=o.getAllResponseHeaders(),t=o.getResponseHeader("content-length"),r=new q(o.status,e,t?parseInt(t,10):void 0,i),n=o.$$AmplitudeAnalyticsEvent.headers,a=new m(s,n);l.status=o.status,u.handleNetworkRequestEvent("xhr",{url:l.url,method:l.method},a,r,void 0,l.startTime,l.durationStart)}catch(e){k(function(){var t;return null===(t=u.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),n.apply(o,t)},s.setRequestHeader=function(e,t){try{var r=this.$$AmplitudeAnalyticsEvent;r&&(r.headers[e]=t)}catch(e){k(function(){var t;return null===(t=u.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}o.apply(this,[e,t])}}},e}(),A=new _,z={};Object.defineProperty(z,"__esModule",{value:!0}),z.Observable=void 0;const B=e=>Boolean(Symbol[e]),P=e=>B(e)?Symbol[e]:"@@"+e,H=P("iterator"),C=P("observable"),W=P("species");function L(e,t){let r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function J(e){let t=e.constructor;return void 0!==t&&(t=t[W],null===t&&(t=void 0)),void 0!==t?t:I}function M(e){M.log?M.log(e):setTimeout(()=>{throw e})}function $(e){Promise.resolve().then(()=>{try{e()}catch(e){M(e)}})}function N(e){let t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{let e=L(t,"unsubscribe");e&&e.call(t)}}catch(e){M(e)}}function D(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function U(e,t,r){e._state="running";let n=e._observer;try{let o=L(n,t);switch(t){case"next":o&&o.call(n,r);break;case"error":if(D(e),!o)throw r;o.call(n,r);break;case"complete":D(e),o&&o.call(n)}}catch(e){M(e)}"closed"===e._state?N(e):"running"===e._state&&(e._state="ready")}function X(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void $(()=>function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(U(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e))):void U(e,t,r);e._queue.push({type:t,value:r})}}class F{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let r=this,n={get closed(){return"closed"===r._state},next(e){X(r,"next",e)},error(e){X(r,"error",e)},complete(){X(r,"complete")}};try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(D(this),N(this))}}class I{constructor(e){if(!(this instanceof I))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new F(e,this._subscriber)}forEach(e){return new Promise((t,r)=>{if("function"!=typeof e)return void r(new TypeError(e+" is not a function"));function n(){o.unsubscribe(),t()}let o=this.subscribe({next(t){try{e(t,n)}catch(e){r(e),o.unsubscribe()}},error:r,complete:t})})}map(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(J(this))(t=>this.subscribe({next(r){try{r=e(r)}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(J(this))(t=>this.subscribe({next(r){try{if(!e(r))return}catch(e){return t.error(e)}t.next(r)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=J(this),r=arguments.length>1,n=!1,o=arguments[1];return new t(t=>this.subscribe({next(i){let s=!n;if(n=!0,!s||r)try{o=e(o,i)}catch(e){return t.error(e)}else o=i},error(e){t.error(e)},complete(){if(!n&&!r)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(o),t.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=J(this);return new t(r=>{let n,o=0;return function i(s){n=s.subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){o===e.length?(n=void 0,r.complete()):i(t.from(e[o++]))}})}(this),()=>{n&&(n.unsubscribe(),n=void 0)}})}flatMap(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=J(this);return new t(r=>{let n=[],o=this.subscribe({next(o){if(e)try{o=e(o)}catch(e){return r.error(e)}let s=t.from(o).subscribe({next(e){r.next(e)},error(e){r.error(e)},complete(){let e=n.indexOf(s);e>=0&&n.splice(e,1),i()}});n.push(s)},error(e){r.error(e)},complete(){i()}});function i(){o.closed&&0===n.length&&r.complete()}return()=>{n.forEach(e=>e.unsubscribe()),o.unsubscribe()}})}[C](){return this}static from(e){let t="function"==typeof this?this:I;if(null==e)throw new TypeError(e+" is not an object");let r=L(e,C);if(r){let n=r.call(e);if(Object(n)!==n)throw new TypeError(n+" is not an object");return function(e){return e instanceof I}(n)&&n.constructor===t?n:new t(e=>n.subscribe(e))}if(B("iterator")&&(r=L(e,H),r))return new t(t=>{$(()=>{if(!t.closed){for(let n of r.call(e))if(t.next(n),t.closed)return;t.complete()}})});if(Array.isArray(e))return new t(t=>{$(()=>{if(!t.closed){for(let r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}})});throw new TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:I)(t=>{$(()=>{if(!t.closed){for(let r=0;r<e.length;++r)if(t.next(e[r]),t.closed)return;t.complete()}})})}static get[W](){return this}}z.Observable=I,Object.defineProperty(I,Symbol("extensions"),{value:{symbol:C,hostReportError:M},configurable:!0});var V,Q,G=z.Observable,K="[Amplitude] Network Request",Y="500-599";function Z(e,t){var r="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(r).test(e)}function ee(e,t){var r,n,s=t.split(",");try{for(var u=o(s),l=u.next();!l.done;l=u.next()){var a=i(l.value.split("-").map(Number),2),c=a[0],d=a[1];if(e===c&&void 0===d)return!0;if(e>=c&&e<=d)return!0}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!1}function te(e){var t;if(e)try{var r=null===(t=a())||void 0===t?void 0:t.location.href,n=new URL(e,r),o=n.searchParams.toString(),i=n.hash.replace("#",""),s=n.href,u=n.host;return n.hash="",n.search="",{query:o,fragment:i,href:s,hrefWithoutQueryOrHash:n.href,host:u}}catch(e){return}}function re(e){if("object"==typeof e&&null!==e){if(0!==e.length)return e}else{if(e)return s([],i(u),!1);if(void 0===e){return}}}function ne(e){var t,r,n;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(r=null==e?void 0:e.blocklist)||void 0===r?void 0:r.length)&&!(null===(n=null==e?void 0:e.excludelist)||void 0===n?void 0:n.length)}function oe(e,t){var r;void 0===t&&(t={});var n=te(e.url);if(!n)return!1;var o,u=n.host;if(!1!==t.ignoreAmplitudeRequests&&(Z(u,"*.amplitude.com")||Z(u,"amplitude.com")))return!1;if(null===(r=t.ignoreHosts)||void 0===r?void 0:r.find(function(e){return Z(u,e)}))return!1;if(!t.captureRules&&void 0!==e.status&&!ee(e.status,Y))return!1;if(t.captureRules&&(s([],i(t.captureRules),!1).reverse().find(function(t){if(o=function(e,t,r,n,o){if((!e.hosts||e.hosts.find(function(e){return Z(t,e)}))&&(!n||!e.urls||function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})}(n,e.urls))&&(!o||!e.methods||e.methods.find(function(e){return o.toLowerCase()===e.toLowerCase()||"*"===e})))return!((r||0===r)&&!ee(r,e.statusCodeRange||Y))}(t,u,e.status,e.url,e.method),o){var r=re(t.responseHeaders);if(e.responseWrapper&&r){var n=e.responseWrapper.headers(r);n&&(e.responseHeaders=n)}var i=re(t.requestHeaders);if(e.requestWrapper&&i){var s=e.requestWrapper.headers(i);s&&(e.requestHeaders=s)}if(e.responseWrapper&&t.responseBody&&!ne(t.responseBody)){var l=t.responseBody.excludelist||t.responseBody.blocklist;e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,l)}if(e.requestWrapper&&t.requestBody&&!ne(t.requestBody)){l=t.requestBody.excludelist||t.requestBody.blocklist;e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,l)}}return void 0!==o}),!o))return!1;return!e.requestWrapper||!function(e,t){if(e.includes("amplitude.com"))try{var r=t.body;if("string"!=typeof r)return!1;if(JSON.parse(r).events.find(function(e){return e.event_type===K}))return!0}catch(e){}return!1}(u,e.requestWrapper)}function ie(e){var t=e.allObservables,o=e.networkTrackingOptions,s=e.amplitude,u=e.loggerProvider;return t.networkObservable.filter(function(e){return oe(e.event,o)}).subscribe(function(e){var t,o,l,a=e.event,c=te(a.url);if(c){var d=null===(o=a.responseWrapper)||void 0===o?void 0:o.bodySize,f=null===(l=a.requestWrapper)||void 0===l?void 0:l.bodySize;!function(e,t,o,s){r(this,void 0,void 0,function(){var r,u,l;return n(this,function(n){switch(n.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(r=i.apply(void 0,[n.sent(),2]),u=r[0],l=r[1],u)try{e["[Amplitude] Request Body"]=JSON.stringify(u)}catch(e){null==s||s.debug("Failed to stringify request body",e)}if(l)try{e["[Amplitude] Response Body"]=JSON.stringify(l)}catch(e){null==s||s.debug("Failed to stringify response body")}n.label=2;case 2:return null==o||o.track(K,e),[2]}})})}(((t={})["[Amplitude] URL"]=c.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=c.query,t["[Amplitude] URL Fragment"]=c.fragment,t["[Amplitude] Request Method"]=a.method,t["[Amplitude] Status Code"]=a.status,t["[Amplitude] Start Time"]=a.startTime,t["[Amplitude] Completion Time"]=a.endTime,t["[Amplitude] Duration"]=a.duration,t["[Amplitude] Request Body Size"]=f,t["[Amplitude] Response Body Size"]=d,t["[Amplitude] Request Type"]=a.type,t["[Amplitude] Request Headers"]=a.requestHeaders,t["[Amplitude] Response Headers"]=a.responseHeaders,t),a,s,u)}})}!function(e){e.NetworkObservable="networkObservable"}(V||(V={}));var se=function(e){void 0===e&&(e={});var t,o="@amplitude/plugin-network-capture-browser",i=function(){var e,r=new G(function(e){var r=new j(function(t){var r=function(e,t){return{event:e,timestamp:Date.now(),type:t}}(t,"network");e.next(r)});return A.subscribe(r,t),function(){A.unsubscribe(r)}});return(e={})[V.NetworkObservable]=r,e};return{name:o,type:"enrichment",setup:function(s,u){return r(void 0,void 0,void 0,function(){var r;return n(this,function(n){return"undefined"==typeof document||(r=i(),t=null==s?void 0:s.loggerProvider,Q=ie({allObservables:r,networkTrackingOptions:e,amplitude:u,loggerProvider:t}),null==t||t.log("".concat(o," has been successfully added."))),[2]})})},execute:function(e){return r(void 0,void 0,void 0,function(){return n(this,function(t){return[2,e]})})},teardown:function(){return r(void 0,void 0,void 0,function(){return n(this,function(e){return Q.unsubscribe(),[2]})})}}};e.networkCapturePlugin=se,e.plugin=se,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track-network-event.d.ts","sourceRoot":"","sources":["../../src/track-network-event.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,mBAAmB,EAEnB,sBAAsB,EAItB,OAAO,EAEP,cAAc,EACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAoB,MAAM,0BAA0B,CAAC;AA8GlF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,EAAE,GAAG,SAAS,CAmBxG;AAOD,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,mBAAmB,EAAE,OAAO,GAAE,sBAA2B,
|
|
1
|
+
{"version":3,"file":"track-network-event.d.ts","sourceRoot":"","sources":["../../src/track-network-event.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,mBAAmB,EAEnB,sBAAsB,EAItB,OAAO,EAEP,cAAc,EACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,oBAAoB,EAAoB,MAAM,0BAA0B,CAAC;AA8GlF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,EAAE,GAAG,SAAS,CAmBxG;AAOD,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,mBAAmB,EAAE,OAAO,GAAE,sBAA2B,WAuF9G;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC5B,CAAC,uBAAuB,CAAC,CAAC,EAAE,MAAM,CAAC;IACnC,CAAC,0BAA0B,CAAC,CAAC,EAAE,MAAM,CAAC;IACtC,CAAC,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACvC,CAAC,yBAAyB,CAAC,CAAC,EAAE,MAAM,CAAC;IACrC,CAAC,wBAAwB,CAAC,CAAC,EAAE,MAAM,CAAC;IACpC,CAAC,6BAA6B,CAAC,CAAC,EAAE,MAAM,CAAC;IACzC,CAAC,sBAAsB,CAAC,CAAC,EAAE,MAAM,CAAC;IAClC,CAAC,+BAA+B,CAAC,CAAC,EAAE,MAAM,CAAC;IAC3C,CAAC,6BAA6B,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC,0BAA0B,CAAC,CAAC,EAAE,MAAM,CAAC;IACtC,CAAC,gCAAgC,CAAC,CAAC,EAAE,MAAM,CAAC;IAC5C,CAAC,8BAA8B,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1D,CAAC,2BAA2B,CAAC,CAAC,EAAE,MAAM,CAAC;IACvC,CAAC,0BAA0B,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CAChD,CAAC;AAEF,wBAAsB,wBAAwB,CAC5C,qBAAqB,EAAE,qBAAqB,EAC5C,OAAO,EAAE,mBAAmB,EAC5B,SAAS,EAAE,aAAa,EACxB,cAAc,CAAC,EAAE,OAAO,iBAuBzB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,cAAc,EACd,sBAAsB,EACtB,SAAS,EACT,cAAc,GACf,EAAE;IACD,cAAc,EAAE,oBAAoB,CAAC;IACrC,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,SAAS,EAAE,aAAa,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,cAAc,CA6CjB"}
|
package/lib/scripts/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.9.
|
|
1
|
+
export declare const VERSION = "1.9.16";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/plugin-network-capture-browser",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.16",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Amplitude Inc",
|
|
6
6
|
"homepage": "https://github.com/amplitude/Amplitude-TypeScript",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"tslib": "^2.4.1",
|
|
25
|
-
"@amplitude/analytics-core": "2.47.
|
|
25
|
+
"@amplitude/analytics-core": "2.47.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@aws-sdk/client-s3": "^3.229.0",
|