@amplitude/plugin-autocapture-browser 1.22.3 → 1.23.0
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/version.d.ts +1 -1
- package/lib/cjs/version.js +1 -1
- package/lib/cjs/version.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/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,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,l)}u((r=r.apply(e,t||[])).next())})}function r(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(u){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,u])}}}function i(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function a(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var 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},u=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},c=l(),s=null==c?void 0:c.console,d={},f={},v=!1;var p={addListener:function(e,t){var n,r=(n=e,!!s&&"function"==typeof s[n]&&(f[n]||(f[n]=s[n],s[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{if(d[n]&&!v){v=!0;var r=d[n];r&&r.forEach(function(t){try{t(n,e)}catch(e){}})}}catch(e){}return v=!1,f[n].apply(s,e)}),!0));if(!r)return new Error("Console override failed");d[e]?d[e].push(t):d[e]=[t]},removeListener:function(e){var t,n;try{for(var r=i(Object.values(d)),o=r.next();!o.done;o=r.next())for(var a=o.value,l=a.length-1;l>=0;l--)if(a[l]===e){a.splice(l,1);break}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},_restoreConsole:function(){var e,t;try{for(var n=i(Object.entries(f)),r=n.next();!r.done;r=n.next()){var a=o(r.value,2),l=a[0],u=a[1];u&&(s[l]=u)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}f={},d={}}},h=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],g="data-amp-track-",m=["div","span","h1","h2","h3","h4","h5","h6"],b=a(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],o(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),y=b,w=b,E=["*"],T="data-amp-mask",k="*****",A=/\b(?:\d[ -]*?){13,16}\b/,x=/(\d{3}-?\d{2}-?\d{4})/g,C=/[^\s@]+@[^\s@.]+\.[^\s@]+/g;function S(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function M(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),e}var P=function(){return"function"==typeof Symbol},L=function(e){return P()&&Boolean(Symbol[e])},N=function(e){return L(e)?Symbol[e]:"@@"+e};P()&&!L("observable")&&(Symbol.observable=Symbol("observable"));var D=N("iterator"),R=N("observable"),I=N("species");function j(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function H(e){var t=e.constructor;return void 0!==t&&null===(t=t[I])&&(t=void 0),void 0!==t?t:W}function U(e){return e instanceof W}function q(e){q.log?q.log(e):setTimeout(function(){throw e})}function G(e){Promise.resolve().then(function(){try{e()}catch(e){q(e)}})}function B(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=j(t,"unsubscribe");n&&n.call(t)}}catch(e){q(e)}}function X(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function z(e,t,n){e._state="running";var r=e._observer;try{var i=j(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(X(e),!i)throw n;i.call(r,n);break;case"complete":X(e),i&&i.call(r)}}catch(e){q(e)}"closed"===e._state?B(e):"running"===e._state&&(e._state="ready")}function F(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void G(function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(z(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)})):void z(e,t,n);e._queue.push({type:t,value:n})}}var Y=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new V(this);try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(X(this),B(this))},M(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),V=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){F(this._subscription,"next",e)},t.error=function(e){F(this._subscription,"error",e)},t.complete=function(){F(this._subscription,"complete")},M(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),W=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new Y(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise(function(n,r){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),n()}})},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(H(this))(function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(H(this))(function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=H(this),r=arguments.length>1,i=!1,o=arguments[1];return new n(function(n){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||r)try{o=e(o,t)}catch(e){return n.error(e)}else o=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(o),n.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=H(this);return new i(function(t){var r,o=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}})},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=H(this);return new n(function(r){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var o=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})},t[R]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=j(t,R);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return U(i)&&i.constructor===n?i:new n(function(e){return i.subscribe(e)})}if(L("iterator")&&(r=j(t,D)))return new n(function(e){G(function(){if(!e.closed){for(var n,i=S(r.call(t));!(n=i()).done;){var o=n.value;if(e.next(o),e.closed)return}e.complete()}})});if(Array.isArray(t))return new n(function(e){G(function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}})});throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new("function"==typeof this?this:e)(function(e){G(function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})})},M(e,null,[{key:I,get:function(){return this}}]),e}();function K(e,t){return new W(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})}function J(e,t){return new W(function(n){var r=!1,o=new Set,a=function(){var e,t;r=!0;try{for(var n=i(o),a=n.next();!a.done;a=n.next()){var l=a.value;try{l.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}o.clear()},l=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),a())},complete:function(){o.delete(t),r||0!==o.size||(n.complete(),a(),r=!0)}});o.add(t)};return l(e),l(t),a})}function Z(e){var t=new Set,n=null;function r(){null==n||n.unsubscribe(),n=null,t.clear()}return new W(function(o){return t.add(o),null===n&&(n=e.subscribe({next:function(e){var n,r,o;try{for(var a=i(t),l=a.next();!l.done;l=a.next()){var u=l.value;null===(o=u.next)||void 0===o||o.call(u,e)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},error:function(e){var n,o,a;try{for(var l=i(t),u=l.next();!u.done;u=l.next()){var c=u.value;null===(a=c.error)||void 0===a||a.call(c,e)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}r()},complete:function(){var e,n,o;try{for(var a=i(t),l=a.next();!l.done;l=a.next()){var u=l.value;null===(o=u.complete)||void 0===o||o.call(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}r()}})),function(){t.delete(o),0===t.size&&n&&(n.unsubscribe(),n=null)}})}P()&&Object.defineProperty(W,Symbol("extensions"),{value:{symbol:R,hostReportError:q},configurable:!0});var $,Q="https://app.amplitude.com",ee={US:Q,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"};var te="__AMPLITUDE_MESSENGER_INSTANCE__",ne="__AMPLITUDE_MESSENGER__",re=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?Q:t;this[$]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(r=window.opener)||void 0===r?void 0:r.postMessage)||void 0===i||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,a){r.requestCallbacks[i]={resolve:t,reject:a},r.notify(o),n.timeout>0&&setTimeout(function(){a(new Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},e.prototype.registerActionHandler=function(e,t){var n,r,o,a;this.actionHandlers.has(e)&&(null===(a=null===(o=this.logger)||void 0===o?void 0:o.warn)||void 0===a||a.call(o,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var l=this.pendingMessages.get(e);if(l){this.pendingMessages.delete(e);try{for(var u=i(l),c=u.next();!c.done;c=u.next()){t(c.value)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(e){return n(this,void 0,void 0,function(){var t,n,i;return r(this,function(r){switch(r.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];n=function(e){return document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),null===(r=document.head)||void 0===r||r.appendChild(i)}catch(e){n(e)}})}(e).then(function(){}),this.scriptLoadPromises.set(e,n),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,n];case 2:return r.sent(),[3,4];case 3:throw i=r.sent(),this.scriptLoadPromises.delete(e),i;case 4:return[2]}})})},e.prototype.setup=function(e){var t,n,r=this,i=void 0===e?{}:e,o=i.logger,a=i.endpoint;o&&(this.logger=o),a&&this.endpoint===Q&&(this.endpoint=a),this.isSetup||(this.isSetup=!0,null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Setting up messenger"),this.messageHandler=function(e){var t,n,i,o,a;if(null===(n=null===(t=r.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message received: ",JSON.stringify(e)),r.endpoint===e.origin){var l=e.data,u=null==l?void 0:l.action;if(u)if("id"in l&&l.id)null===(o=null===(i=r.logger)||void 0===i?void 0:i.debug)||void 0===o||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),r.handleResponse(l);else{if("ping"===u)return void r.notify({action:"pong"});var c=r.actionHandlers.get(u);if(c)c(l.data);else{var s=null!==(a=r.pendingMessages.get(u))&&void 0!==a?a:[];s.push(l.data),r.pendingMessages.set(u,s)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=l();(null==e?void 0:e[ne])===this&&delete e[ne]},e}();function ie(e){var t,n=l(),r=null==n?void 0:n[ne];if("object"==typeof(t=r)&&null!==t&&te in t&&!0===t[te])return r;var i=new re(e);return n&&(n[ne]=i),i}$=te;var oe="__AMPLITUDE_BACKGROUND_CAPTURE__";var ae,le="1.22.3",ue="[Amplitude] Element Clicked",ce="[Amplitude] Element Tag",se="[Amplitude] Element Text",de="[Amplitude] Page URL",fe="data-amp-mask-attributes",ve=["input","select","textarea"],pe=function(e,t){var n,r=null===(n=null===window||void 0===window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,e);return"pointer"===(null==r?void 0:r.getPropertyValue("cursor"))&&"click"===t},he=function(e){var t=e.pageUrlAllowlist,n=e.pageUrlExcludelist;return!(n&&n.length>0&&u(window.location.href,n))&&!!u(window.location.href,t)},ge=function(e,t,n){return void 0===n&&(n=!1),function(r,i){var o,a,l=e.shouldTrackEventResolver,u=null===(a=null===(o=null==i?void 0:i.tagName)||void 0===o?void 0:o.toLowerCase)||void 0===a?void 0:a.call(o);if(!u)return!1;if(l)return l(r,i);if(!he(e))return!1;var c=String(null==i?void 0:i.getAttribute("type"))||"";if("string"==typeof c)switch(c.toLowerCase()){case"hidden":case"password":return!1}var s=pe(i,r);if(n&&s)return!0;if(t){var d=t.some(function(e){var t;return!!(null===(t=null==i?void 0:i.matches)||void 0===t?void 0:t.call(i,e))});if(!d)return!1}switch(u){case"input":case"select":case"textarea":return"change"===r||"click"===r;default:return!!s||"click"===r}}},me=function(e){return e?e.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[]},be=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return function(e){return null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length}(r)||(t[n]=r),t},{})},ye=function(e,t){return e?t.some(function(t){var n;return null===(n=null==e?void 0:e.matches)||void 0===n?void 0:n.call(e,t)})?e:ye(null==e?void 0:e.parentElement,t):null},we=function(e){return!(null===e.event.target||!e.closestTrackedAncestor)};!function(e){e[e.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",e[e.MIDDLE=1]="MIDDLE",e[e.RIGHT=2]="RIGHT"}(ae||(ae={}));var Ee="__AMPLITUDE_VISUAL_TAGGING__";function Te(e,t){var n=e;if(!0!==n[Ee]){n[Ee]=!0;var r=t.dataExtractor,i=t.isElementSelectable,o=t.cssSelectorAllowlist,a=t.actionClickAllowlist,l=null,u=function(t){e.notify({action:"element-selected",data:t})},c=function(t,n){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:n}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:n})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce("https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz").then(function(){var n;l=null===(n=null===window||void 0===window?void 0:window.amplitudeVisualTaggingSelector)||void 0===n?void 0:n.call(window,{getEventTagProps:r.getEventTagProps,isElementSelectable:function(e){return!i||i((null==t?void 0:t.actionType)||"click",e)},onTrack:c,onSelect:u,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:e,cssSelectorAllowlist:o,actionClickAllowlist:a,extractDataFromDataSource:r.extractDataFromDataSource,dataExtractor:r,diagnostics:{autocapture:{version:le}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null===(e=null==l?void 0:l.close)||void 0===e||e.call(l)})}}var ke=l(),Ae=function(){return new W(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},xe=function(e){return void 0===e&&(e="click"),new W(function(t){var n=function(e){t.next(e)};return ke.document.addEventListener(e,n,{capture:!0}),function(){ke.document.removeEventListener(e,n,{capture:!0})}})},Ce=function(){var e=J(new W(function(e){var n=function(n){if(n instanceof ErrorEvent){var r={kind:"error"};n.error instanceof Error||n.error instanceof DOMException?r=t(t({},r),{message:n.error.message,stack:n.error.stack,filename:n.filename,lineNumber:n.lineno,columnNumber:n.colno}):"string"==typeof n.error&&(r.message=n.error),e.next(r)}};return ke.addEventListener("error",n),function(){ke.removeEventListener("error",n)}}),new W(function(e){var t=function(t){var n={kind:"unhandledrejection"};t.reason instanceof Error||t.reason instanceof DOMException?(n.message=t.reason.message,n.stack=t.reason.stack):"string"==typeof t.reason&&(n.message=t.reason),e.next(n)};return ke.addEventListener("unhandledrejection",t),function(){ke.removeEventListener("unhandledrejection",t)}}));return J(e,new W(function(e){var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=void 0;Array.isArray(n[0])&&"string"==typeof n[0][0]&&(i=n[0][0]),e.next({kind:"console",message:i})};return p.addListener("error",t),function(){p.removeListener(t)}}))},Se=function(e,t,n){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},Oe={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},_e=function(e){var t,n,r,o,a=Object.values(Oe).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return a;try{for(var l=i(e),u=l.next();!u.done;u=l.next()){var c=u.value;try{try{for(var s=(r=void 0,i(c.definition)),d=s.next();!d.done;d=s.next()){var f=d.value,v=Oe[f.event_type];v&&a[v].add(c.id)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==c?void 0:c.id,e)}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return a},Me=function(e){var t,n,r,o,a=new Map;try{for(var l=i(e),u=l.next();!u.done;u=l.next()){var c=u.value;try{for(var s=(r=void 0,i(c.conditions)),d=s.next();!d.done;d=s.next()){var f=d.value;if("LABELED_EVENT"===f.type){var v=f.match.eventId,p=a.get(v);p||(p=[],a.set(v,p)),p.push(c)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return a},Pe=function(e,t){return t.filter(function(t){return t.definition.some(function(t){return Oe[t.event_type]===e.type&&t.filters.every(function(t){return function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){return console.error("Error matching event to filter",e),!1}return!1}(e,t)})})})},Le=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var o=function(e,t){var n,r,o,a,l=new Set;try{for(var u=i(e),c=u.next();!c.done;c=u.next()){var s=c.value,d=t.get(s.id);if(d)try{for(var f=(o=void 0,i(d)),v=f.next();!v.done;v=f.next()){var p=v.value;l.add(p)}}catch(e){o={error:e}}finally{try{v&&!v.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return Array.from(l)}(Pe(e,Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]})),this.labeledEventToTriggerMap);try{for(var a=i(o),l=a.next();!l.done;l=a.next()){var u=l.value;Se(u.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}(),Ne=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",fe,T]),De=["type"],Re=["svg","path","g"],Ie=["password","hidden"];function je(e,t){var n,r,o,a,l,u;if(null===e)return null;var c=String(e.tagName).toLowerCase(),s={tag:c},d=Array.from(null!==(a=null===(o=e.parentElement)||void 0===o?void 0:o.children)&&void 0!==a?a:[]);d.length&&(s.index=d.indexOf(e),s.indexOfType=d.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var f=null===(u=null===(l=e.previousElementSibling)||void 0===l?void 0:l.tagName)||void 0===u?void 0:u.toLowerCase();f&&(s.prevSib=String(f));var v=e.getAttribute("id");v&&(s.id=String(v));var p=Array.from(e.classList);p.length&&(s.classes=p);var h={},g=Array.from(e.attributes).filter(function(e){return!Ne.has(e.name)}),m=!function(e){var t,n,r,i=null===(n=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t),o=e instanceof HTMLElement&&"true"===(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase());return!ve.includes(i)&&!o}(e);if(!Ie.includes(String(e.getAttribute("type")))&&!Re.includes(c))try{for(var b=i(g),y=b.next();!y.done;y=b.next()){var w=y.value;m&&!De.includes(w.name)||(t.has(w.name)?h[w.name]=k:h[w.name]=String(w.value).substring(0,128))}}catch(e){n={error:e}}finally{try{y&&!y.done&&(r=b.return)&&r.call(b)}finally{if(n)throw n.error}}return Object.keys(h).length&&(s.attrs=h),s}var He,Ue=function(e,t){var n,r,l,u=this;this.replaceSensitiveString=function(e){return function(e,t){var n,r;if(void 0===t&&(t=[]),"string"!=typeof e)return"";var o=e;o=(o=(o=o.replace(A,k)).replace(x,k)).replace(C,k);try{for(var a=i(t),l=a.next();!l.done;l=a.next()){var u=l.value;try{o=o.replace(u,k)}catch(e){}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o}(e,u.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,l,c,s=performance.now();if(!e)return[];for(var d=function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e),f=new Map,v=d.length-1;v>=0;v--){var p=d[v];if(p){var h=me(p.getAttribute(fe)),g=v===d.length-1?[]:null!==(r=f.get(d[v+1]))&&void 0!==r?r:new Set,m=new Set(a(a([],o(g),!1),o(h),!1));f.set(p,m)}}c=d.map(function(e){var t;return je(e,null!==(t=f.get(e))&&void 0!==t?t:new Set)});var b=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var n=o(t,2),r=n[0],i=n[1];e.attrs&&(e.attrs[r]=u.replaceSensitiveString(i))})};try{for(var y=i(c),w=y.next();!w.done;w=y.next())b(w.value)}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}var E=performance.now();return null===(l=u.diagnosticsClient)||void 0===l||l.recordHistogram("autocapturePlugin.getHierarchy",E-s),c},this.getNearestLabel=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?u.getText(t):u.getNearestLabel(n)},this.getEventProperties=function(e,t,n){var r,i,a,l,c,s,d=null===(a=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===a?void 0:a.call(i),f="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},v=u.getHierarchy(t),p=null===(l=v[0])||void 0===l?void 0:l.attrs,h=u.getNearestLabel(t),g=(c=null!=p?p:{},s=n,Object.entries(c).reduce(function(e,t){var n=o(t,2),r=n[0],i=n[1];if(r.startsWith(s)){var a=r.replace(s,"");a&&(e[a]=i||"")}return e},{})),m=((r={})["[Amplitude] Element Hierarchy"]=v,r[ce]=d,r[se]=u.getText(t),r["[Amplitude] Element Position Left"]=null==f.left?null:Math.round(f.left),r["[Amplitude] Element Position Top"]=null==f.top?null:Math.round(f.top),r["[Amplitude] Element Attributes"]=g,r["[Amplitude] Element Parent Label"]=h,r[de]=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return n}(window.location.href.split("?")[0]),r["[Amplitude] Page Title"]=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(T)?k:e?e(document.title):document.title}(u.replaceSensitiveString),r["[Amplitude] Viewport Height"]=window.innerHeight,r["[Amplitude] Viewport Width"]=window.innerWidth,r);if(m["[Amplitude] Element ID"]=t.getAttribute("id")||"",m["[Amplitude] Element Class"]=t.getAttribute("class"),m["[Amplitude] Element Aria Label"]=null==p?void 0:p["aria-label"],"a"===d&&"click"===e&&t instanceof HTMLAnchorElement){var b=t.href.substring(0,128);m["[Amplitude] Element Href"]=u.replaceSensitiveString(b)}return be(m)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,i){void 0===i&&(i=!1);var o=u.addTypeAndTimestamp(e,t);if(function(e){return"click"===e.type||"change"===e.type}(o)&&null!==o.event.target){if(i&&pe(o.event.target,o.type))return o.closestTrackedAncestor=o.event.target,o.targetElementProperties=u.getEventProperties(o.type,o.closestTrackedAncestor,r),o;var a=ye(o.event.target,n);return a&&(o.closestTrackedAncestor=a,o.targetElementProperties=u.getEventProperties(o.type,a,r)),o}return o},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var n=document.documentElement;return e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector?n.querySelector(e.selector):n}}catch(e){return}}(e,t);if(!n)return;return"TEXT"===e.elementExtractType?u.getText(n):"ATTRIBUTE"===e.elementExtractType&&e.attribute?n.getAttribute(e.attribute):void 0}},this.getTextWithMaskedDescendants=function(e){var t,n,r="[".concat(T,"], [contenteditable]");if(!e.querySelector(r))return e.innerText;var o="",a=Array.from(e.childNodes);try{for(var l=i(a),c=l.next();!c.done;c=l.next()){var s=c.value;s.nodeType!==Node.TEXT_NODE?s instanceof Element&&(s.hasAttribute(T)||s.hasAttribute("contenteditable")?o+=k:o+=u.getTextWithMaskedDescendants(s)):o+=s.textContent||""}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return o},this.getText=function(e){if(null!==e.closest("[".concat(T,"]")))return k;var t="";return t=e.querySelector("[".concat(T,"], [contenteditable]"))?u.getTextWithMaskedDescendants(e):e.innerText||"",u.replaceSensitiveString(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){var t,n,r;if(!e)return{};var i=null===(r=null===(n=null==e?void 0:e.tagName)||void 0===n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n),o=((t={})[ce]=i,t[se]=u.getText(e),t[de]=window.location.href.split("?")[0],t);return be(o)},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient;var c=null!==(l=e.maskTextRegex)&&void 0!==l?l:[],s=[];try{for(var d=i(c),f=d.next();!f.done;f=d.next()){var v=f.value;if(s.length>=25)break;if(v instanceof RegExp)s.push(v);else if("pattern"in v&&"string"==typeof v.pattern)try{s.push(new RegExp(v.pattern,"i"))}catch(e){}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=s};!function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable",e.BrowserErrorObservable="browserErrorObservable",e.SelectionObservable="selectionObservable",e.MouseMoveObservable="mouseMoveObservable"}(He||(He={}));var qe=function(e,u){var c,s,d,f,v,p,b,y;void 0===e&&(e={}),null==u||u.diagnosticsClient.setTag("plugin.autocapture.version",le);var w=e.dataAttributePrefix,E=void 0===w?g:w,T=e.visualTaggingOptions,k=void 0===T?{enabled:!0}:T;e.cssSelectorAllowlist=null!==(c=e.cssSelectorAllowlist)&&void 0!==c?c:h,e.actionClickAllowlist=null!==(s=e.actionClickAllowlist)&&void 0!==s?s:m,e.debounceTime=null!==(d=e.debounceTime)&&void 0!==d?d:0,e.pageUrlExcludelist=null===(f=e.pageUrlExcludelist)||void 0===f?void 0:f.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(n){return console.warn("Invalid regex pattern: ".concat(t.pattern),n),e}return e},[]);var A="@amplitude/plugin-autocapture-browser",x=[],C=new Ue(e,u),S=_e(Object.values(null!==(p=null===(v=e.pageActions)||void 0===v?void 0:v.labeledEvents)&&void 0!==p?p:{})),O=Me(null!==(y=null===(b=e.pageActions)||void 0===b?void 0:b.triggers)&&void 0!==y?y:[]),_=function(e,t,n,r){return new Le(e,t,n,r)}(S,O,C,e);return{name:A,type:"enrichment",setup:function(i,u){return n(void 0,void 0,void 0,function(){var n,c,s,d,f,v,p,h,g,m;return r(this,function(r){return"undefined"==typeof document||(i.fetchRemoteConfig&&(i.remoteConfigClient?i.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(n){!function(n){var r,i;n&&(e.pageActions=t(t({},e.pageActions),n),S=_e(Object.values(null!==(r=e.pageActions.labeledEvents)&&void 0!==r?r:{})),O=Me(null!==(i=e.pageActions.triggers)&&void 0!==i?i:[]),_.update(S,O,e))}(n)}):i.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),n=ge(e,e.cssSelectorAllowlist),c=ge(e,e.actionClickAllowlist),s=function(){var t,n,r=Z(xe().map(function(t){return C.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,E)})),i=Z(new W(function(t){var n,r=function(n){var r=C.addAdditionalEventProperties(n,"change",e.cssSelectorAllowlist,E);t.next(r)};return null===(n=l())||void 0===n||n.document.addEventListener("change",r,{capture:!0}),function(){var e;return null===(e=l())||void 0===e?void 0:e.document.removeEventListener("change",r)}}));window.navigation&&(n=Z(new W(function(t){var n=function(n){var r=C.addAdditionalEventProperties(n,"navigate",e.cssSelectorAllowlist,E);t.next(r)};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}})));var o=Z(Ae().map(function(t){return C.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,E)}));return(t={})[He.ChangeObservable]=i,t[He.ClickObservable]=r,t[He.MutationObservable]=o,t[He.NavigateObservable]=n,t}(),d=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackEvent,i=e.evaluateTriggers;return n.clickObservable.filter(we).filter(function(e){return r("click",e.closestTrackedAncestor)}).map(function(e){return i(e)}).subscribe(function(e){null==t||t.track(ue,e.targetElementProperties)})}({allObservables:s,amplitude:u,shouldTrackEvent:n,evaluateTriggers:_.evaluate.bind(_)}),x.push(d),f=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers;return n.changeObservable.filter(we).filter(function(e){return i("change",e.closestTrackedAncestor)}).map(function(e){return o(e)}).subscribe(function(e){null==t||t.track("[Amplitude] Element Changed",r("change",e.closestTrackedAncestor))})}({allObservables:s,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return C.getEventProperties.apply(C,a(a([],o(e),!1),[E],!1))},amplitude:u,shouldTrackEvent:n,evaluateTriggers:_.evaluate.bind(_)}),x.push(f),v=function(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,a=e.shouldTrackActionClick,l=n.clickObservable,u=n.mutationObservable,c=n.navigateObservable,s=l.filter(function(e){return!o("click",e.closestTrackedAncestor)}).map(function(e){var t=ye(e.event.target,r.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=i(e.type,e.closestTrackedAncestor)),e}).filter(we).filter(function(e){return a("click",e.closestTrackedAncestor)}),d=c?J(u,c):u,f=J(s,d),v=null,p=null;return K(f,function(e){if(v&&(clearTimeout(v),v=null),"click"===e.type)return p=e,v=setTimeout(function(){v=null,p=null},500),Promise.resolve(null);if(p){var t=p;return p=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==t||t.track(ue,i("click",e.closestTrackedAncestor)))})}({allObservables:s,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return C.getEventProperties.apply(C,a(a([],o(e),!1),[E],!1))},amplitude:u,shouldTrackEvent:n,shouldTrackActionClick:c}),v&&x.push(v),null===(m=null==i?void 0:i.loggerProvider)||void 0===m||m.log("".concat(A," has been successfully added.")),window.opener&&k.enabled&&(p=e.cssSelectorAllowlist,h=e.actionClickAllowlist,Te(g=ie(),{dataExtractor:C,isElementSelectable:ge(e,a(a([],o(p),!1),o(h),!1)),cssSelectorAllowlist:p,actionClickAllowlist:h}),function(e,t){var n,r=e;if(!0!==r[oe]){r[oe]=!0;var i=null!==(n=null==t?void 0:t.scriptUrl)&&void 0!==n?n:"https://cdn.amplitude.com/libs/background-capture-1.0.0-alpha.1.js.gz",o=null,a=function(t,n){var r,i;"background-capture-complete"===t&&(null===(i=null===(r=e.logger)||void 0===r?void 0:r.debug)||void 0===i||i.call(r,"Background capture complete"),e.notify({action:"background-capture-complete",data:n}))};e.registerActionHandler("initialize-background-capture",function(){var t,n;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Initializing background capture (external script)");var r=new URL(i,e.endpoint).toString();e.loadScriptOnce(r).then(function(){var t,n,r;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Background capture script loaded (external)"),o=null===(r=null===window||void 0===window?void 0:window.amplitudeBackgroundCapture)||void 0===r?void 0:r.call(window,{messenger:e,onBackgroundCapture:a}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null===(e=null==o?void 0:o.close)||void 0===e||e.call(o),o=null})}}(g),g.setup(t({logger:null==i?void 0:i.loggerProvider},(null==i?void 0:i.serverZone)&&{endpoint:ee[i.serverZone]})))),[2]})})},execute:function(e){return n(void 0,void 0,void 0,function(){return r(this,function(t){return[2,e]})})},teardown:function(){return n(void 0,void 0,void 0,function(){var e,t,n,o;return r(this,function(r){try{for(e=i(x),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(n)throw n.error}}return[2]})})}}},Ge=["mutation","navigate"];function Be(e,t){var n,r,i,o,a=t.event,l=a.pageX,u=a.pageY;e.yMin=Math.min(null!==(n=e.yMin)&&void 0!==n?n:u,u),e.yMax=Math.max(null!==(r=e.yMax)&&void 0!==r?r:u,u),e.xMin=Math.min(null!==(i=e.xMin)&&void 0!==i?i:l,l),e.xMax=Math.max(null!==(o=e.xMax)&&void 0!==o?o:l,l),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function Xe(e){if(0===e.length)return null;var n=e[0],r=e[e.length-1];return{rageClickEvent:t({"[Amplitude] Begin Time":new Date(n.timestamp).toISOString(),"[Amplitude] End Time":new Date(r.timestamp).toISOString(),"[Amplitude] Duration":r.timestamp-n.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},n.targetElementProperties),time:n.timestamp}}function ze(e){var t=this,i=e.amplitude,o=e.allObservables,a=e.shouldTrackRageClick,l=o.clickObservable,u=o.selectionObservable,c=[],s={},d=null;function f(e){c=[],s={},e&&(Be(s,e),c.push(e))}var v=K(l.filter(function(e){return a("click",e.closestTrackedAncestor)}),function(e){return n(t,void 0,void 0,function(){var t;return r(this,function(n){return Be(s,e),t=null,0===c.length||function(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}(c,e)||function(e,t){var n=e[Math.max(0,e.length-4+1)];return t.timestamp-n.timestamp>=1e3}(c,e)||s.isOutOfBounds?(d&&(t=Xe(c)),f(e)):c.push(e),d&&(clearTimeout(d.timerId),d.resolve(t),d=null),c.length>=4?[2,new Promise(function(e){d={resolve:e,timerId:setTimeout(function(){e(Xe(c))},1e3)}})]:[2,null]})})}),p=null==u?void 0:u.subscribe(function(){f()}),h=v.subscribe(function(e){null!==e&&i.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){h.unsubscribe(),null==p||p.unsubscribe()}}}var Fe,Ye;!function(e){e.INCREASING="increasing",e.DECREASING="decreasing"}(Fe||(Fe={})),function(e){e.X="x",e.Y="y"}(Ye||(Ye={}));function Ve(e){var t=e.changes,n=e.changesThreshold,r=e.thresholdMs;return!(t.length<n)&&t[t.length-1]-t[0]<r}function We(e){e.changes=[],e.startTime=void 0}function Ke(e){for(var t=e.changes,n=e.thresholdMs,r=0,i=t[t.length-1];r<t.length;r++){if(i-t[r]<n)break}0!==r&&(e.startTime=t[r],e.changes.splice(0,r))}var Je=function(e){var t=e.mouseDirectionChangeObservable,n=e.directionChanges,r=void 0===n?10:n,i=e.thresholdMs,o=void 0===i?2e3:i;return new W(function(e){var n={changes:[],changesThreshold:r,thresholdMs:o},i={changes:[],changesThreshold:r,thresholdMs:o},a=void 0,l=null;function u(){void 0!==a&&(e.next(a),a=void 0,null!==l&&clearTimeout(l),We(n),We(i))}return t.subscribe(function(e){null!==l&&clearTimeout(l),function(e){var t=+Date.now();e.startTime=e.startTime||t;var n=e.changes,r=e.changesThreshold;n.push(t),n.length>r&&n.shift()}(e===Ye.X?n:i);var t=function(e,t){var n=void 0;if(Ve(e)&&(n=e.startTime),Ve(t)){var r=t.startTime;r&&(!n||r<n)&&(n=r)}return n}(n,i);return t?(a=a||t,l=setTimeout(function(){u(),l=null},o)):u(),Ke(n),Ke(i),function(){null!==l&&(clearTimeout(l),l=null)}})})},Ze=function(e){var t=e.amplitude,n=e.options,r=e.allObservables,i=e.directionChanges,o=void 0===i?10:i,a=e.thresholdMs,l=void 0===a?2e3:a,u=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new W(function(e){var n=null,r=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};null!==n?(o.x>n.x?(r===Fe.DECREASING&&e.next(Ye.X),r=Fe.INCREASING):o.x<n.x&&(r===Fe.INCREASING&&e.next(Ye.X),r=Fe.DECREASING),o.y>n.y?(i===Fe.DECREASING&&e.next(Ye.Y),i=Fe.INCREASING):o.y<n.y&&(i===Fe.INCREASING&&e.next(Ye.Y),i=Fe.DECREASING),n=o):n=o})})}({allWindowObservables:r});return Je({mouseDirectionChangeObservable:u,directionChanges:o,thresholdMs:l}).subscribe(function(e){he(n)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})};function $e(e,t,n,r){if(!r)return[];var i=e[t];return"object"==typeof i&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n}var Qe=4e3;e.DataExtractor=Ue,e.autocapturePlugin=qe,e.enableVisualTagging=Te,e.frustrationPlugin=function(e){var l;void 0===e&&(e={});var u="@amplitude/plugin-frustration-browser",c=[],s=!1!==e.errorClicks;e.errorClicks||(s=!1);var d=!1!==e.deadClicks&&null!==e.deadClicks,f=!1!==e.rageClicks&&null!==e.rageClicks,v=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(v=!1);var p=$e(e,"rageClicks",E,f),h=$e(e,"deadClicks",y,d),m=$e(e,"errorClicks",w,s),b=null!==(l=e.dataAttributePrefix)&&void 0!==l?l:g,T=new Ue(e),k=a([],o(new Set(a(a(a([],o(p),!1),o(h),!1),o(m),!1))),!1),A=function(){var e,n,r=Z(xe("pointerdown").map(function(e){return T.addAdditionalEventProperties(e,"click",k,b,!0)})),i=Z(Ce().map(function(e){return T.addTypeAndTimestamp(e,"error")})),o=Z(Ae().map(function(e){return T.addAdditionalEventProperties(e,"mutation",k,b)}));window.navigation&&(n=Z(new W(function(e){var n=function(n){e.next(t(t({},n),{type:"navigate"}))};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}}).map(function(e){return T.addAdditionalEventProperties(e,"navigate",k,b)})));var a=Z(new W(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){try{if(t.selectionStart===t.selectionEnd)return}catch(e){return}return e.next()}var n=window.getSelection();if(n&&!n.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),l=Z(new W(function(e){var t=function(t){e.next(t)},n={capture:!0};return ke.document.addEventListener("mousemove",t,n),function(){ke.document.removeEventListener("mousemove",t,n)}}));return(e={})[He.ClickObservable]=r,e[He.MutationObservable]=o,e[He.NavigateObservable]=n,e[He.BrowserErrorObservable]=i,e[He.SelectionObservable]=a,e[He.MouseMoveObservable]=l,e};return{name:u,type:"enrichment",setup:function(i,o){return n(void 0,void 0,void 0,function(){var n,a,l,g,y,w,E,k,x,C,S;return r(this,function(r){return"undefined"==typeof document||(n=A(),f&&(a=ge(e,p),l=ze({allObservables:n,amplitude:o,shouldTrackRageClick:a}),c.push(l)),d&&(g=ge(e,h),y=function(e){var n=e.amplitude,r=e.allObservables,i=e.getEventProperties,o=e.shouldTrackDeadClick,a=r.clickObservable,l=r.mutationObservable,u=r.navigateObservable,c=a.filter(function(e){return we(e)&&o("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ae.LEFT_OR_TOUCH_CONTACT}),s=u?J(l,u):l,d=J(c,s),f=null;return K(d,function(e){return f&&Ge.includes(e.type)?(clearTimeout(f),f=null,Promise.resolve(null)):"click"===e.type?f?Promise.resolve(null):new Promise(function(t){f=setTimeout(function(){t(e),f=null},3e3)}):Promise.resolve(null)}).subscribe(function(e){if(e){var r={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};n.track("[Amplitude] Dead Click",t(t({},i("click",e.closestTrackedAncestor)),r),{time:e.timestamp})}})}({amplitude:o,allObservables:n,getEventProperties:function(e,t){return T.getEventProperties(e,t,b)},shouldTrackDeadClick:g}),c.push(y)),s&&(w=ge(e,m),E=function(e){var n=e.amplitude,r=e.allObservables,i=e.shouldTrackErrorClick,o=r.clickObservable,a=r.browserErrorObservable,l=o.filter(function(e){return we(e)&&i("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ae.LEFT_OR_TOUCH_CONTACT}),u=null,c=null,s=function(){null!==u&&(clearTimeout(u),u=null),c=null};return J(l,a).subscribe(function(e){var r;if("click"===e.type)return s(),c=e,void(u=setTimeout(s,2e3));"error"===e.type&&c&&(n.track("[Amplitude] Error Click",t(((r={})["[Amplitude] Kind"]=e.event.kind,r["[Amplitude] Message"]=e.event.message,r["[Amplitude] Stack"]=e.event.stack,r["[Amplitude] Filename"]=e.event.filename,r["[Amplitude] Line Number"]=e.event.lineNumber,r["[Amplitude] Column Number"]=e.event.columnNumber,r),c.targetElementProperties)),s())})}({amplitude:o,allObservables:n,shouldTrackErrorClick:w}),c.push(E)),v&&(k=void 0,x=void 0,"object"==typeof e.thrashedCursor&&(k=e.thrashedCursor.directionChanges,x=e.thrashedCursor.threshold,k&&k<5&&(i.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(k," is below the minimum of ").concat(5,", setting to ").concat(5)),k=5),x&&x>Qe&&(i.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(x," is above the maximum of ").concat(Qe,", setting to ").concat(Qe)),x=Qe)),C=Ze({amplitude:o,options:e,allObservables:n,directionChanges:k,thresholdMs:x}),c.push(C)),null===(S=null==i?void 0:i.loggerProvider)||void 0===S||S.log("".concat(u," has been successfully added."))),[2]})})},execute:function(e){return n(void 0,void 0,void 0,function(){return r(this,function(t){return[2,e]})})},teardown:function(){return n(void 0,void 0,void 0,function(){var e,t,n,o;return r(this,function(r){try{for(e=i(c),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(n)throw n.error}}return[2]})})}}},e.plugin=qe,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,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function l(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,l)}u((r=r.apply(e,t||[])).next())})}function r(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=l(0),a.throw=l(1),a.return=l(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(u){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&l[0]?r.return:l[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,l[1])).done)return i;switch(r=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){o.label=l[1];break}if(6===l[0]&&o.label<i[1]){o.label=i[1],i=l;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(l);break}i[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e],r=0}finally{n=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,u])}}}function i(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function a(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var 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},u=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},c=l(),s=null==c?void 0:c.console,d={},f={},v=!1;var p={addListener:function(e,t){var n,r=(n=e,!!s&&"function"==typeof s[n]&&(f[n]||(f[n]=s[n],s[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{if(d[n]&&!v){v=!0;var r=d[n];r&&r.forEach(function(t){try{t(n,e)}catch(e){}})}}catch(e){}return v=!1,f[n].apply(s,e)}),!0));if(!r)return new Error("Console override failed");d[e]?d[e].push(t):d[e]=[t]},removeListener:function(e){var t,n;try{for(var r=i(Object.values(d)),o=r.next();!o.done;o=r.next())for(var a=o.value,l=a.length-1;l>=0;l--)if(a[l]===e){a.splice(l,1);break}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},_restoreConsole:function(){var e,t;try{for(var n=i(Object.entries(f)),r=n.next();!r.done;r=n.next()){var a=o(r.value,2),l=a[0],u=a[1];u&&(s[l]=u)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}f={},d={}}},h=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],g="data-amp-track-",m=["div","span","h1","h2","h3","h4","h5","h6"],b=a(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],o(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),y=b,w=b,E=["*"],T="data-amp-mask",k="*****",A=/\b(?:\d[ -]*?){13,16}\b/,x=/(\d{3}-?\d{2}-?\d{4})/g,C=/[^\s@]+@[^\s@.]+\.[^\s@]+/g;function S(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return O(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function M(e,t,n){return t&&_(e.prototype,t),n&&_(e,n),e}var P=function(){return"function"==typeof Symbol},L=function(e){return P()&&Boolean(Symbol[e])},N=function(e){return L(e)?Symbol[e]:"@@"+e};P()&&!L("observable")&&(Symbol.observable=Symbol("observable"));var D=N("iterator"),R=N("observable"),I=N("species");function j(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function H(e){var t=e.constructor;return void 0!==t&&null===(t=t[I])&&(t=void 0),void 0!==t?t:W}function U(e){return e instanceof W}function q(e){q.log?q.log(e):setTimeout(function(){throw e})}function G(e){Promise.resolve().then(function(){try{e()}catch(e){q(e)}})}function B(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=j(t,"unsubscribe");n&&n.call(t)}}catch(e){q(e)}}function X(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function z(e,t,n){e._state="running";var r=e._observer;try{var i=j(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(X(e),!i)throw n;i.call(r,n);break;case"complete":X(e),i&&i.call(r)}}catch(e){q(e)}"closed"===e._state?B(e):"running"===e._state&&(e._state="ready")}function F(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void G(function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var n=0;n<t.length&&(z(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e)})):void z(e,t,n);e._queue.push({type:t,value:n})}}var Y=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new V(this);try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(X(this),B(this))},M(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),V=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){F(this._subscription,"next",e)},t.error=function(e){F(this._subscription,"error",e)},t.complete=function(){F(this._subscription,"complete")},M(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),W=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new Y(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise(function(n,r){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),n()}})},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(H(this))(function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(H(this))(function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})})},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=H(this),r=arguments.length>1,i=!1,o=arguments[1];return new n(function(n){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||r)try{o=e(o,t)}catch(e){return n.error(e)}else o=t},error:function(e){n.error(e)},complete:function(){if(!i&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(o),n.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=H(this);return new i(function(t){var r,o=0;return function e(a){r=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===n.length?(r=void 0,t.complete()):e(i.from(n[o++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}})},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=H(this);return new n(function(r){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var o=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){r.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&r.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})},t[R]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=j(t,R);if(r){var i=r.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return U(i)&&i.constructor===n?i:new n(function(e){return i.subscribe(e)})}if(L("iterator")&&(r=j(t,D)))return new n(function(e){G(function(){if(!e.closed){for(var n,i=S(r.call(t));!(n=i()).done;){var o=n.value;if(e.next(o),e.closed)return}e.complete()}})});if(Array.isArray(t))return new n(function(e){G(function(){if(!e.closed){for(var n=0;n<t.length;++n)if(e.next(t[n]),e.closed)return;e.complete()}})});throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return new("function"==typeof this?this:e)(function(e){G(function(){if(!e.closed){for(var t=0;t<n.length;++t)if(e.next(n[t]),e.closed)return;e.complete()}})})},M(e,null,[{key:I,get:function(){return this}}]),e}();function K(e,t){return new W(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})}function J(e,t){return new W(function(n){var r=!1,o=new Set,a=function(){var e,t;r=!0;try{for(var n=i(o),a=n.next();!a.done;a=n.next()){var l=a.value;try{l.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}o.clear()},l=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),a())},complete:function(){o.delete(t),r||0!==o.size||(n.complete(),a(),r=!0)}});o.add(t)};return l(e),l(t),a})}function Z(e){var t=new Set,n=null;function r(){null==n||n.unsubscribe(),n=null,t.clear()}return new W(function(o){return t.add(o),null===n&&(n=e.subscribe({next:function(e){var n,r,o;try{for(var a=i(t),l=a.next();!l.done;l=a.next()){var u=l.value;null===(o=u.next)||void 0===o||o.call(u,e)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}},error:function(e){var n,o,a;try{for(var l=i(t),u=l.next();!u.done;u=l.next()){var c=u.value;null===(a=c.error)||void 0===a||a.call(c,e)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}r()},complete:function(){var e,n,o;try{for(var a=i(t),l=a.next();!l.done;l=a.next()){var u=l.value;null===(o=u.complete)||void 0===o||o.call(u)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}r()}})),function(){t.delete(o),0===t.size&&n&&(n.unsubscribe(),n=null)}})}P()&&Object.defineProperty(W,Symbol("extensions"),{value:{symbol:R,hostReportError:q},configurable:!0});var $,Q="https://app.amplitude.com",ee={US:Q,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"};var te="__AMPLITUDE_MESSENGER_INSTANCE__",ne="__AMPLITUDE_MESSENGER__",re=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?Q:t;this[$]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(r=window.opener)||void 0===r?void 0:r.postMessage)||void 0===i||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,a){r.requestCallbacks[i]={resolve:t,reject:a},r.notify(o),n.timeout>0&&setTimeout(function(){a(new Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},e.prototype.registerActionHandler=function(e,t){var n,r,o,a;this.actionHandlers.has(e)&&(null===(a=null===(o=this.logger)||void 0===o?void 0:o.warn)||void 0===a||a.call(o,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var l=this.pendingMessages.get(e);if(l){this.pendingMessages.delete(e);try{for(var u=i(l),c=u.next();!c.done;c=u.next()){t(c.value)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(e){return n(this,void 0,void 0,function(){var t,n,i;return r(this,function(r){switch(r.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];n=function(e){return document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),null===(r=document.head)||void 0===r||r.appendChild(i)}catch(e){n(e)}})}(e).then(function(){}),this.scriptLoadPromises.set(e,n),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,n];case 2:return r.sent(),[3,4];case 3:throw i=r.sent(),this.scriptLoadPromises.delete(e),i;case 4:return[2]}})})},e.prototype.setup=function(e){var t,n,r=this,i=void 0===e?{}:e,o=i.logger,a=i.endpoint;o&&(this.logger=o),a&&this.endpoint===Q&&(this.endpoint=a),this.isSetup||(this.isSetup=!0,null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Setting up messenger"),this.messageHandler=function(e){var t,n,i,o,a;if(null===(n=null===(t=r.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message received: ",JSON.stringify(e)),r.endpoint===e.origin){var l=e.data,u=null==l?void 0:l.action;if(u)if("id"in l&&l.id)null===(o=null===(i=r.logger)||void 0===i?void 0:i.debug)||void 0===o||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),r.handleResponse(l);else{if("ping"===u)return void r.notify({action:"pong"});var c=r.actionHandlers.get(u);if(c)c(l.data);else{var s=null!==(a=r.pendingMessages.get(u))&&void 0!==a?a:[];s.push(l.data),r.pendingMessages.set(u,s)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=l();(null==e?void 0:e[ne])===this&&delete e[ne]},e}();function ie(e){var t,n=l(),r=null==n?void 0:n[ne];if("object"==typeof(t=r)&&null!==t&&te in t&&!0===t[te])return r;var i=new re(e);return n&&(n[ne]=i),i}$=te;var oe="__AMPLITUDE_BACKGROUND_CAPTURE__";var ae,le="1.23.0",ue="[Amplitude] Element Clicked",ce="[Amplitude] Element Tag",se="[Amplitude] Element Text",de="[Amplitude] Page URL",fe="data-amp-mask-attributes",ve=["input","select","textarea"],pe=function(e,t){var n,r=null===(n=null===window||void 0===window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,e);return"pointer"===(null==r?void 0:r.getPropertyValue("cursor"))&&"click"===t},he=function(e){var t=e.pageUrlAllowlist,n=e.pageUrlExcludelist;return!(n&&n.length>0&&u(window.location.href,n))&&!!u(window.location.href,t)},ge=function(e,t,n){return void 0===n&&(n=!1),function(r,i){var o,a,l=e.shouldTrackEventResolver,u=null===(a=null===(o=null==i?void 0:i.tagName)||void 0===o?void 0:o.toLowerCase)||void 0===a?void 0:a.call(o);if(!u)return!1;if(l)return l(r,i);if(!he(e))return!1;var c=String(null==i?void 0:i.getAttribute("type"))||"";if("string"==typeof c)switch(c.toLowerCase()){case"hidden":case"password":return!1}var s=pe(i,r);if(n&&s)return!0;if(t){var d=t.some(function(e){var t;return!!(null===(t=null==i?void 0:i.matches)||void 0===t?void 0:t.call(i,e))});if(!d)return!1}switch(u){case"input":case"select":case"textarea":return"change"===r||"click"===r;default:return!!s||"click"===r}}},me=function(e){return e?e.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[]},be=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return function(e){return null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length}(r)||(t[n]=r),t},{})},ye=function(e,t){return e?t.some(function(t){var n;return null===(n=null==e?void 0:e.matches)||void 0===n?void 0:n.call(e,t)})?e:ye(null==e?void 0:e.parentElement,t):null},we=function(e){return!(null===e.event.target||!e.closestTrackedAncestor)};!function(e){e[e.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",e[e.MIDDLE=1]="MIDDLE",e[e.RIGHT=2]="RIGHT"}(ae||(ae={}));var Ee="__AMPLITUDE_VISUAL_TAGGING__";function Te(e,t){var n=e;if(!0!==n[Ee]){n[Ee]=!0;var r=t.dataExtractor,i=t.isElementSelectable,o=t.cssSelectorAllowlist,a=t.actionClickAllowlist,l=null,u=function(t){e.notify({action:"element-selected",data:t})},c=function(t,n){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:n}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:n})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce("https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz").then(function(){var n;l=null===(n=null===window||void 0===window?void 0:window.amplitudeVisualTaggingSelector)||void 0===n?void 0:n.call(window,{getEventTagProps:r.getEventTagProps,isElementSelectable:function(e){return!i||i((null==t?void 0:t.actionType)||"click",e)},onTrack:c,onSelect:u,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:e,cssSelectorAllowlist:o,actionClickAllowlist:a,extractDataFromDataSource:r.extractDataFromDataSource,dataExtractor:r,diagnostics:{autocapture:{version:le}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null===(e=null==l?void 0:l.close)||void 0===e||e.call(l)})}}var ke=l(),Ae=function(){return new W(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},xe=function(e){return void 0===e&&(e="click"),new W(function(t){var n=function(e){t.next(e)};return ke.document.addEventListener(e,n,{capture:!0}),function(){ke.document.removeEventListener(e,n,{capture:!0})}})},Ce=function(){var e=J(new W(function(e){var n=function(n){if(n instanceof ErrorEvent){var r={kind:"error"};n.error instanceof Error||n.error instanceof DOMException?r=t(t({},r),{message:n.error.message,stack:n.error.stack,filename:n.filename,lineNumber:n.lineno,columnNumber:n.colno}):"string"==typeof n.error&&(r.message=n.error),e.next(r)}};return ke.addEventListener("error",n),function(){ke.removeEventListener("error",n)}}),new W(function(e){var t=function(t){var n={kind:"unhandledrejection"};t.reason instanceof Error||t.reason instanceof DOMException?(n.message=t.reason.message,n.stack=t.reason.stack):"string"==typeof t.reason&&(n.message=t.reason),e.next(n)};return ke.addEventListener("unhandledrejection",t),function(){ke.removeEventListener("unhandledrejection",t)}}));return J(e,new W(function(e){var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=void 0;Array.isArray(n[0])&&"string"==typeof n[0][0]&&(i=n[0][0]),e.next({kind:"console",message:i})};return p.addListener("error",t),function(){p.removeListener(t)}}))},Se=function(e,t,n){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},Oe={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},_e=function(e){var t,n,r,o,a=Object.values(Oe).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return a;try{for(var l=i(e),u=l.next();!u.done;u=l.next()){var c=u.value;try{try{for(var s=(r=void 0,i(c.definition)),d=s.next();!d.done;d=s.next()){var f=d.value,v=Oe[f.event_type];v&&a[v].add(c.id)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==c?void 0:c.id,e)}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return a},Me=function(e){var t,n,r,o,a=new Map;try{for(var l=i(e),u=l.next();!u.done;u=l.next()){var c=u.value;try{for(var s=(r=void 0,i(c.conditions)),d=s.next();!d.done;d=s.next()){var f=d.value;if("LABELED_EVENT"===f.type){var v=f.match.eventId,p=a.get(v);p||(p=[],a.set(v,p)),p.push(c)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return a},Pe=function(e,t){return t.filter(function(t){return t.definition.some(function(t){return Oe[t.event_type]===e.type&&t.filters.every(function(t){return function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){return console.error("Error matching event to filter",e),!1}return!1}(e,t)})})})},Le=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var o=function(e,t){var n,r,o,a,l=new Set;try{for(var u=i(e),c=u.next();!c.done;c=u.next()){var s=c.value,d=t.get(s.id);if(d)try{for(var f=(o=void 0,i(d)),v=f.next();!v.done;v=f.next()){var p=v.value;l.add(p)}}catch(e){o={error:e}}finally{try{v&&!v.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return Array.from(l)}(Pe(e,Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]})),this.labeledEventToTriggerMap);try{for(var a=i(o),l=a.next();!l.done;l=a.next()){var u=l.value;Se(u.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}(),Ne=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",fe,T]),De=["type"],Re=["svg","path","g"],Ie=["password","hidden"];function je(e,t){var n,r,o,a,l,u;if(null===e)return null;var c=String(e.tagName).toLowerCase(),s={tag:c},d=Array.from(null!==(a=null===(o=e.parentElement)||void 0===o?void 0:o.children)&&void 0!==a?a:[]);d.length&&(s.index=d.indexOf(e),s.indexOfType=d.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var f=null===(u=null===(l=e.previousElementSibling)||void 0===l?void 0:l.tagName)||void 0===u?void 0:u.toLowerCase();f&&(s.prevSib=String(f));var v=e.getAttribute("id");v&&(s.id=String(v));var p=Array.from(e.classList);p.length&&(s.classes=p);var h={},g=Array.from(e.attributes).filter(function(e){return!Ne.has(e.name)}),m=!function(e){var t,n,r,i=null===(n=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t),o=e instanceof HTMLElement&&"true"===(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase());return!ve.includes(i)&&!o}(e);if(!Ie.includes(String(e.getAttribute("type")))&&!Re.includes(c))try{for(var b=i(g),y=b.next();!y.done;y=b.next()){var w=y.value;m&&!De.includes(w.name)||(t.has(w.name)?h[w.name]=k:h[w.name]=String(w.value).substring(0,128))}}catch(e){n={error:e}}finally{try{y&&!y.done&&(r=b.return)&&r.call(b)}finally{if(n)throw n.error}}return Object.keys(h).length&&(s.attrs=h),s}var He,Ue=function(e,t){var n,r,l,u=this;this.replaceSensitiveString=function(e){return function(e,t){var n,r;if(void 0===t&&(t=[]),"string"!=typeof e)return"";var o=e;o=(o=(o=o.replace(A,k)).replace(x,k)).replace(C,k);try{for(var a=i(t),l=a.next();!l.done;l=a.next()){var u=l.value;try{o=o.replace(u,k)}catch(e){}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o}(e,u.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,l,c,s=performance.now();if(!e)return[];for(var d=function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e),f=new Map,v=d.length-1;v>=0;v--){var p=d[v];if(p){var h=me(p.getAttribute(fe)),g=v===d.length-1?[]:null!==(r=f.get(d[v+1]))&&void 0!==r?r:new Set,m=new Set(a(a([],o(g),!1),o(h),!1));f.set(p,m)}}c=d.map(function(e){var t;return je(e,null!==(t=f.get(e))&&void 0!==t?t:new Set)});var b=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var n=o(t,2),r=n[0],i=n[1];e.attrs&&(e.attrs[r]=u.replaceSensitiveString(i))})};try{for(var y=i(c),w=y.next();!w.done;w=y.next())b(w.value)}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=y.return)&&n.call(y)}finally{if(t)throw t.error}}var E=performance.now();return null===(l=u.diagnosticsClient)||void 0===l||l.recordHistogram("autocapturePlugin.getHierarchy",E-s),c},this.getNearestLabel=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?u.getText(t):u.getNearestLabel(n)},this.getEventProperties=function(e,t,n){var r,i,a,l,c,s,d=null===(a=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===a?void 0:a.call(i),f="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},v=u.getHierarchy(t),p=null===(l=v[0])||void 0===l?void 0:l.attrs,h=u.getNearestLabel(t),g=(c=null!=p?p:{},s=n,Object.entries(c).reduce(function(e,t){var n=o(t,2),r=n[0],i=n[1];if(r.startsWith(s)){var a=r.replace(s,"");a&&(e[a]=i||"")}return e},{})),m=((r={})["[Amplitude] Element Hierarchy"]=v,r[ce]=d,r[se]=u.getText(t),r["[Amplitude] Element Position Left"]=null==f.left?null:Math.round(f.left),r["[Amplitude] Element Position Top"]=null==f.top?null:Math.round(f.top),r["[Amplitude] Element Attributes"]=g,r["[Amplitude] Element Parent Label"]=h,r[de]=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return n}(window.location.href.split("?")[0]),r["[Amplitude] Page Title"]=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(T)?k:e?e(document.title):document.title}(u.replaceSensitiveString),r["[Amplitude] Viewport Height"]=window.innerHeight,r["[Amplitude] Viewport Width"]=window.innerWidth,r);if(m["[Amplitude] Element ID"]=t.getAttribute("id")||"",m["[Amplitude] Element Class"]=t.getAttribute("class"),m["[Amplitude] Element Aria Label"]=null==p?void 0:p["aria-label"],"a"===d&&"click"===e&&t instanceof HTMLAnchorElement){var b=t.href.substring(0,128);m["[Amplitude] Element Href"]=u.replaceSensitiveString(b)}return be(m)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,i){void 0===i&&(i=!1);var o=u.addTypeAndTimestamp(e,t);if(function(e){return"click"===e.type||"change"===e.type}(o)&&null!==o.event.target){if(i&&pe(o.event.target,o.type))return o.closestTrackedAncestor=o.event.target,o.targetElementProperties=u.getEventProperties(o.type,o.closestTrackedAncestor,r),o;var a=ye(o.event.target,n);return a&&(o.closestTrackedAncestor=a,o.targetElementProperties=u.getEventProperties(o.type,a,r)),o}return o},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var n=document.documentElement;return e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector?n.querySelector(e.selector):n}}catch(e){return}}(e,t);if(!n)return;return"TEXT"===e.elementExtractType?u.getText(n):"ATTRIBUTE"===e.elementExtractType&&e.attribute?n.getAttribute(e.attribute):void 0}},this.getTextWithMaskedDescendants=function(e){var t,n,r="[".concat(T,"], [contenteditable]");if(!e.querySelector(r))return e.innerText;var o="",a=Array.from(e.childNodes);try{for(var l=i(a),c=l.next();!c.done;c=l.next()){var s=c.value;s.nodeType!==Node.TEXT_NODE?s instanceof Element&&(s.hasAttribute(T)||s.hasAttribute("contenteditable")?o+=k:o+=u.getTextWithMaskedDescendants(s)):o+=s.textContent||""}}catch(e){t={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return o},this.getText=function(e){if(null!==e.closest("[".concat(T,"]")))return k;var t="";return t=e.querySelector("[".concat(T,"], [contenteditable]"))?u.getTextWithMaskedDescendants(e):e.innerText||"",u.replaceSensitiveString(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){var t,n,r;if(!e)return{};var i=null===(r=null===(n=null==e?void 0:e.tagName)||void 0===n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n),o=((t={})[ce]=i,t[se]=u.getText(e),t[de]=window.location.href.split("?")[0],t);return be(o)},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient;var c=null!==(l=e.maskTextRegex)&&void 0!==l?l:[],s=[];try{for(var d=i(c),f=d.next();!f.done;f=d.next()){var v=f.value;if(s.length>=25)break;if(v instanceof RegExp)s.push(v);else if("pattern"in v&&"string"==typeof v.pattern)try{s.push(new RegExp(v.pattern,"i"))}catch(e){}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=s};!function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable",e.BrowserErrorObservable="browserErrorObservable",e.SelectionObservable="selectionObservable",e.MouseMoveObservable="mouseMoveObservable"}(He||(He={}));var qe=function(e,u){var c,s,d,f,v,p,b,y;void 0===e&&(e={}),null==u||u.diagnosticsClient.setTag("plugin.autocapture.version",le);var w=e.dataAttributePrefix,E=void 0===w?g:w,T=e.visualTaggingOptions,k=void 0===T?{enabled:!0}:T;e.cssSelectorAllowlist=null!==(c=e.cssSelectorAllowlist)&&void 0!==c?c:h,e.actionClickAllowlist=null!==(s=e.actionClickAllowlist)&&void 0!==s?s:m,e.debounceTime=null!==(d=e.debounceTime)&&void 0!==d?d:0,e.pageUrlExcludelist=null===(f=e.pageUrlExcludelist)||void 0===f?void 0:f.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(n){return console.warn("Invalid regex pattern: ".concat(t.pattern),n),e}return e},[]);var A="@amplitude/plugin-autocapture-browser",x=[],C=new Ue(e,u),S=_e(Object.values(null!==(p=null===(v=e.pageActions)||void 0===v?void 0:v.labeledEvents)&&void 0!==p?p:{})),O=Me(null!==(y=null===(b=e.pageActions)||void 0===b?void 0:b.triggers)&&void 0!==y?y:[]),_=function(e,t,n,r){return new Le(e,t,n,r)}(S,O,C,e);return{name:A,type:"enrichment",setup:function(i,u){return n(void 0,void 0,void 0,function(){var n,c,s,d,f,v,p,h,g,m;return r(this,function(r){return"undefined"==typeof document||(i.fetchRemoteConfig&&(i.remoteConfigClient?i.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(n){!function(n){var r,i;n&&(e.pageActions=t(t({},e.pageActions),n),S=_e(Object.values(null!==(r=e.pageActions.labeledEvents)&&void 0!==r?r:{})),O=Me(null!==(i=e.pageActions.triggers)&&void 0!==i?i:[]),_.update(S,O,e))}(n)}):i.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),n=ge(e,e.cssSelectorAllowlist),c=ge(e,e.actionClickAllowlist),s=function(){var t,n,r=Z(xe().map(function(t){return C.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,E)})),i=Z(new W(function(t){var n,r=function(n){var r=C.addAdditionalEventProperties(n,"change",e.cssSelectorAllowlist,E);t.next(r)};return null===(n=l())||void 0===n||n.document.addEventListener("change",r,{capture:!0}),function(){var e;return null===(e=l())||void 0===e?void 0:e.document.removeEventListener("change",r)}}));window.navigation&&(n=Z(new W(function(t){var n=function(n){var r=C.addAdditionalEventProperties(n,"navigate",e.cssSelectorAllowlist,E);t.next(r)};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}})));var o=Z(Ae().map(function(t){return C.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,E)}));return(t={})[He.ChangeObservable]=i,t[He.ClickObservable]=r,t[He.MutationObservable]=o,t[He.NavigateObservable]=n,t}(),d=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackEvent,i=e.evaluateTriggers;return n.clickObservable.filter(we).filter(function(e){return r("click",e.closestTrackedAncestor)}).map(function(e){return i(e)}).subscribe(function(e){null==t||t.track(ue,e.targetElementProperties)})}({allObservables:s,amplitude:u,shouldTrackEvent:n,evaluateTriggers:_.evaluate.bind(_)}),x.push(d),f=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers;return n.changeObservable.filter(we).filter(function(e){return i("change",e.closestTrackedAncestor)}).map(function(e){return o(e)}).subscribe(function(e){null==t||t.track("[Amplitude] Element Changed",r("change",e.closestTrackedAncestor))})}({allObservables:s,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return C.getEventProperties.apply(C,a(a([],o(e),!1),[E],!1))},amplitude:u,shouldTrackEvent:n,evaluateTriggers:_.evaluate.bind(_)}),x.push(f),v=function(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,a=e.shouldTrackActionClick,l=n.clickObservable,u=n.mutationObservable,c=n.navigateObservable,s=l.filter(function(e){return!o("click",e.closestTrackedAncestor)}).map(function(e){var t=ye(e.event.target,r.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=i(e.type,e.closestTrackedAncestor)),e}).filter(we).filter(function(e){return a("click",e.closestTrackedAncestor)}),d=c?J(u,c):u,f=J(s,d),v=null,p=null;return K(f,function(e){if(v&&(clearTimeout(v),v=null),"click"===e.type)return p=e,v=setTimeout(function(){v=null,p=null},500),Promise.resolve(null);if(p){var t=p;return p=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==t||t.track(ue,i("click",e.closestTrackedAncestor)))})}({allObservables:s,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return C.getEventProperties.apply(C,a(a([],o(e),!1),[E],!1))},amplitude:u,shouldTrackEvent:n,shouldTrackActionClick:c}),v&&x.push(v),null===(m=null==i?void 0:i.loggerProvider)||void 0===m||m.log("".concat(A," has been successfully added.")),window.opener&&k.enabled&&(p=e.cssSelectorAllowlist,h=e.actionClickAllowlist,Te(g=ie(),{dataExtractor:C,isElementSelectable:ge(e,a(a([],o(p),!1),o(h),!1)),cssSelectorAllowlist:p,actionClickAllowlist:h}),function(e,t){var n,r=e;if(!0!==r[oe]){r[oe]=!0;var i=null!==(n=null==t?void 0:t.scriptUrl)&&void 0!==n?n:"https://cdn.amplitude.com/libs/background-capture-1.0.0-alpha.1.js.gz",o=null,a=function(t,n){var r,i;"background-capture-complete"===t&&(null===(i=null===(r=e.logger)||void 0===r?void 0:r.debug)||void 0===i||i.call(r,"Background capture complete"),e.notify({action:"background-capture-complete",data:n}))};e.registerActionHandler("initialize-background-capture",function(){var t,n;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Initializing background capture (external script)");var r=new URL(i,e.endpoint).toString();e.loadScriptOnce(r).then(function(){var t,n,r;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Background capture script loaded (external)"),o=null===(r=null===window||void 0===window?void 0:window.amplitudeBackgroundCapture)||void 0===r?void 0:r.call(window,{messenger:e,onBackgroundCapture:a}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null===(e=null==o?void 0:o.close)||void 0===e||e.call(o),o=null})}}(g),g.setup(t({logger:null==i?void 0:i.loggerProvider},(null==i?void 0:i.serverZone)&&{endpoint:ee[i.serverZone]})))),[2]})})},execute:function(e){return n(void 0,void 0,void 0,function(){return r(this,function(t){return[2,e]})})},teardown:function(){return n(void 0,void 0,void 0,function(){var e,t,n,o;return r(this,function(r){try{for(e=i(x),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(n)throw n.error}}return[2]})})}}},Ge=["mutation","navigate"];function Be(e,t){var n,r,i,o,a=t.event,l=a.pageX,u=a.pageY;e.yMin=Math.min(null!==(n=e.yMin)&&void 0!==n?n:u,u),e.yMax=Math.max(null!==(r=e.yMax)&&void 0!==r?r:u,u),e.xMin=Math.min(null!==(i=e.xMin)&&void 0!==i?i:l,l),e.xMax=Math.max(null!==(o=e.xMax)&&void 0!==o?o:l,l),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function Xe(e){if(0===e.length)return null;var n=e[0],r=e[e.length-1];return{rageClickEvent:t({"[Amplitude] Begin Time":new Date(n.timestamp).toISOString(),"[Amplitude] End Time":new Date(r.timestamp).toISOString(),"[Amplitude] Duration":r.timestamp-n.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},n.targetElementProperties),time:n.timestamp}}function ze(e){var t=this,i=e.amplitude,o=e.allObservables,a=e.shouldTrackRageClick,l=o.clickObservable,u=o.selectionObservable,c=[],s={},d=null;function f(e){c=[],s={},e&&(Be(s,e),c.push(e))}var v=K(l.filter(function(e){return a("click",e.closestTrackedAncestor)}),function(e){return n(t,void 0,void 0,function(){var t;return r(this,function(n){return Be(s,e),t=null,0===c.length||function(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}(c,e)||function(e,t){var n=e[Math.max(0,e.length-4+1)];return t.timestamp-n.timestamp>=1e3}(c,e)||s.isOutOfBounds?(d&&(t=Xe(c)),f(e)):c.push(e),d&&(clearTimeout(d.timerId),d.resolve(t),d=null),c.length>=4?[2,new Promise(function(e){d={resolve:e,timerId:setTimeout(function(){e(Xe(c))},1e3)}})]:[2,null]})})}),p=null==u?void 0:u.subscribe(function(){f()}),h=v.subscribe(function(e){null!==e&&i.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){h.unsubscribe(),null==p||p.unsubscribe()}}}var Fe,Ye;!function(e){e.INCREASING="increasing",e.DECREASING="decreasing"}(Fe||(Fe={})),function(e){e.X="x",e.Y="y"}(Ye||(Ye={}));function Ve(e){var t=e.changes,n=e.changesThreshold,r=e.thresholdMs;return!(t.length<n)&&t[t.length-1]-t[0]<r}function We(e){e.changes=[],e.startTime=void 0}function Ke(e){for(var t=e.changes,n=e.thresholdMs,r=0,i=t[t.length-1];r<t.length;r++){if(i-t[r]<n)break}0!==r&&(e.startTime=t[r],e.changes.splice(0,r))}var Je=function(e){var t=e.mouseDirectionChangeObservable,n=e.directionChanges,r=void 0===n?10:n,i=e.thresholdMs,o=void 0===i?2e3:i;return new W(function(e){var n={changes:[],changesThreshold:r,thresholdMs:o},i={changes:[],changesThreshold:r,thresholdMs:o},a=void 0,l=null;function u(){void 0!==a&&(e.next(a),a=void 0,null!==l&&clearTimeout(l),We(n),We(i))}return t.subscribe(function(e){null!==l&&clearTimeout(l),function(e){var t=+Date.now();e.startTime=e.startTime||t;var n=e.changes,r=e.changesThreshold;n.push(t),n.length>r&&n.shift()}(e===Ye.X?n:i);var t=function(e,t){var n=void 0;if(Ve(e)&&(n=e.startTime),Ve(t)){var r=t.startTime;r&&(!n||r<n)&&(n=r)}return n}(n,i);return t?(a=a||t,l=setTimeout(function(){u(),l=null},o)):u(),Ke(n),Ke(i),function(){null!==l&&(clearTimeout(l),l=null)}})})},Ze=function(e){var t=e.amplitude,n=e.options,r=e.allObservables,i=e.directionChanges,o=void 0===i?10:i,a=e.thresholdMs,l=void 0===a?2e3:a,u=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new W(function(e){var n=null,r=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};null!==n?(o.x>n.x?(r===Fe.DECREASING&&e.next(Ye.X),r=Fe.INCREASING):o.x<n.x&&(r===Fe.INCREASING&&e.next(Ye.X),r=Fe.DECREASING),o.y>n.y?(i===Fe.DECREASING&&e.next(Ye.Y),i=Fe.INCREASING):o.y<n.y&&(i===Fe.INCREASING&&e.next(Ye.Y),i=Fe.DECREASING),n=o):n=o})})}({allWindowObservables:r});return Je({mouseDirectionChangeObservable:u,directionChanges:o,thresholdMs:l}).subscribe(function(e){he(n)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})};function $e(e,t,n,r){if(!r)return[];var i=e[t];return"object"==typeof i&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n}var Qe=4e3;e.DataExtractor=Ue,e.autocapturePlugin=qe,e.enableVisualTagging=Te,e.frustrationPlugin=function(e){var l;void 0===e&&(e={});var u="@amplitude/plugin-frustration-browser",c=[],s=!1!==e.errorClicks;e.errorClicks||(s=!1);var d=!1!==e.deadClicks&&null!==e.deadClicks,f=!1!==e.rageClicks&&null!==e.rageClicks,v=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(v=!1);var p=$e(e,"rageClicks",E,f),h=$e(e,"deadClicks",y,d),m=$e(e,"errorClicks",w,s),b=null!==(l=e.dataAttributePrefix)&&void 0!==l?l:g,T=new Ue(e),k=a([],o(new Set(a(a(a([],o(p),!1),o(h),!1),o(m),!1))),!1),A=function(){var e,n,r=Z(xe("pointerdown").map(function(e){return T.addAdditionalEventProperties(e,"click",k,b,!0)})),i=Z(Ce().map(function(e){return T.addTypeAndTimestamp(e,"error")})),o=Z(Ae().map(function(e){return T.addAdditionalEventProperties(e,"mutation",k,b)}));window.navigation&&(n=Z(new W(function(e){var n=function(n){e.next(t(t({},n),{type:"navigate"}))};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}}).map(function(e){return T.addAdditionalEventProperties(e,"navigate",k,b)})));var a=Z(new W(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){try{if(t.selectionStart===t.selectionEnd)return}catch(e){return}return e.next()}var n=window.getSelection();if(n&&!n.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),l=Z(new W(function(e){var t=function(t){e.next(t)},n={capture:!0};return ke.document.addEventListener("mousemove",t,n),function(){ke.document.removeEventListener("mousemove",t,n)}}));return(e={})[He.ClickObservable]=r,e[He.MutationObservable]=o,e[He.NavigateObservable]=n,e[He.BrowserErrorObservable]=i,e[He.SelectionObservable]=a,e[He.MouseMoveObservable]=l,e};return{name:u,type:"enrichment",setup:function(i,o){return n(void 0,void 0,void 0,function(){var n,a,l,g,y,w,E,k,x,C,S;return r(this,function(r){return"undefined"==typeof document||(n=A(),f&&(a=ge(e,p),l=ze({allObservables:n,amplitude:o,shouldTrackRageClick:a}),c.push(l)),d&&(g=ge(e,h),y=function(e){var n=e.amplitude,r=e.allObservables,i=e.getEventProperties,o=e.shouldTrackDeadClick,a=r.clickObservable,l=r.mutationObservable,u=r.navigateObservable,c=a.filter(function(e){return we(e)&&o("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ae.LEFT_OR_TOUCH_CONTACT}),s=u?J(l,u):l,d=J(c,s),f=null;return K(d,function(e){return f&&Ge.includes(e.type)?(clearTimeout(f),f=null,Promise.resolve(null)):"click"===e.type?f?Promise.resolve(null):new Promise(function(t){f=setTimeout(function(){t(e),f=null},3e3)}):Promise.resolve(null)}).subscribe(function(e){if(e){var r={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};n.track("[Amplitude] Dead Click",t(t({},i("click",e.closestTrackedAncestor)),r),{time:e.timestamp})}})}({amplitude:o,allObservables:n,getEventProperties:function(e,t){return T.getEventProperties(e,t,b)},shouldTrackDeadClick:g}),c.push(y)),s&&(w=ge(e,m),E=function(e){var n=e.amplitude,r=e.allObservables,i=e.shouldTrackErrorClick,o=r.clickObservable,a=r.browserErrorObservable,l=o.filter(function(e){return we(e)&&i("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ae.LEFT_OR_TOUCH_CONTACT}),u=null,c=null,s=function(){null!==u&&(clearTimeout(u),u=null),c=null};return J(l,a).subscribe(function(e){var r;if("click"===e.type)return s(),c=e,void(u=setTimeout(s,2e3));"error"===e.type&&c&&(n.track("[Amplitude] Error Click",t(((r={})["[Amplitude] Kind"]=e.event.kind,r["[Amplitude] Message"]=e.event.message,r["[Amplitude] Stack"]=e.event.stack,r["[Amplitude] Filename"]=e.event.filename,r["[Amplitude] Line Number"]=e.event.lineNumber,r["[Amplitude] Column Number"]=e.event.columnNumber,r),c.targetElementProperties)),s())})}({amplitude:o,allObservables:n,shouldTrackErrorClick:w}),c.push(E)),v&&(k=void 0,x=void 0,"object"==typeof e.thrashedCursor&&(k=e.thrashedCursor.directionChanges,x=e.thrashedCursor.threshold,k&&k<5&&(i.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(k," is below the minimum of ").concat(5,", setting to ").concat(5)),k=5),x&&x>Qe&&(i.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(x," is above the maximum of ").concat(Qe,", setting to ").concat(Qe)),x=Qe)),C=Ze({amplitude:o,options:e,allObservables:n,directionChanges:k,thresholdMs:x}),c.push(C)),null===(S=null==i?void 0:i.loggerProvider)||void 0===S||S.log("".concat(u," has been successfully added."))),[2]})})},execute:function(e){return n(void 0,void 0,void 0,function(){return r(this,function(t){return[2,e]})})},teardown:function(){return n(void 0,void 0,void 0,function(){var e,t,n,o;return r(this,function(r){try{for(e=i(c),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(o=e.return)&&o.call(e)}finally{if(n)throw n.error}}return[2]})})}}},e.plugin=qe,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
Binary file
|
package/lib/scripts/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.23.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amplitude/plugin-autocapture-browser",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
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.
|
|
25
|
+
"@amplitude/analytics-core": "2.41.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@aws-sdk/client-s3": "^3.229.0",
|